2011-10-19 Adam Barth Another attempted build fix. I managed to screw up every line of this file. * CodeGenerators.pri: 2011-10-19 Adam Barth Attempt to fix the Qt build. * CodeGenerators.pri: 2011-10-19 Adam Barth Document.cpp shouldn't need to know about every event for every feature https://bugs.webkit.org/show_bug.cgi?id=70469 Reviewed by Eric Seidel. make_event_factory.pl generates the implementation of EventFactory based on a simple ".in" file. * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_makenames.py: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::createEvent): * dom/EventFactory.h: Added. * dom/EventFactory.in: Added. * dom/make_event_factory.pl: Added. (defaultEventPropertyHash): (eventHandler): (parametersHandler): (readNames): (readEvents): (interfaceForEvent): (printCppFile): (printLicenseHeader): 2011-10-19 Kentaro Hara Added a ConstructorMode check to all existing custom V8 constructors. https://bugs.webkit.org/show_bug.cgi?id=70464 Reviewed by Adam Barth. This patch adds the following two lines to all existing custom V8 constructors: if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) return args.Holder(); This checks whether a programmer is trying to allocate an object via "new X", or C++ is trying to allocate an object via the function template and wrap the object with a JS flavor. (See here for more details: bug 70015) In the latter case, a constructor callback should not be executed (i.e. should return immediately). No new tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferCustom.cpp: Added the ConstructorMode check. (WebCore::V8ArrayBuffer::constructorCallback): * bindings/v8/custom/V8ArrayBufferViewCustom.h: Ditto. (WebCore::constructWebGLArray): * bindings/v8/custom/V8AudioContextCustom.cpp: Ditto. (WebCore::V8AudioContext::constructorCallback): * bindings/v8/custom/V8DOMFormDataCustom.cpp: Ditto. (WebCore::V8DOMFormData::constructorCallback): * bindings/v8/custom/V8DataViewCustom.cpp: Ditto. (WebCore::V8DataView::constructorCallback): * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: Ditto. (WebCore::v8HTMLAudioElementConstructorCallback): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Ditto. (WebCore::v8HTMLImageElementConstructorCallback): * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Ditto. (WebCore::v8HTMLOptionElementConstructorCallback): * bindings/v8/custom/V8MessageChannelConstructor.cpp: Ditto. (WebCore::V8MessageChannel::constructorCallback): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: Ditto. (WebCore::V8WebKitMutationObserver::constructorCallback): * bindings/v8/custom/V8WebKitPointConstructor.cpp: Ditto. (WebCore::V8WebKitPoint::constructorCallback): * bindings/v8/custom/V8WebSocketCustom.cpp: Ditto. (WebCore::V8WebSocket::constructorCallback): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Ditto. (WebCore::V8XMLHttpRequest::constructorCallback): 2011-10-19 Carol Szabo CSS Counters have wrong values https://bugs.webkit.org/show_bug.cgi?id=69605 Reviewed by Darin Adler. Test: fast/css/counters/after-continuation.html Added a new method for getting the renderer of the "after" pseudo-element that handles continuations. Hooked up the new method with the CSS counter code. * rendering/RenderCounter.cpp: (WebCore::rendererOfAfterPseudoElement): (WebCore::previousInPreOrder): (WebCore::nextInPreOrder): * rendering/RenderObject.h: 2011-10-19 Anna Cavender Adding some IDL files for . https://bugs.webkit.org/show_bug.cgi?id=62887 Reviewed by Adam Barth. Tests: MutableTextTrack.idl and addTrack() in HTMLMediaElement.idl are tested by: media/track/track-mutable.html TextTrack.idl is tested by: media/track/track-text-track.html TextTrackCue.idl is tested by: media/track/track-webvtt-tc006-cue-identifiers.html media/track/track-webvtt-tc007-cue-no-id.html media/track/track-webvtt-tc008-timings-no-hours.html media/track/track-webvtt-tc009-timings-hour.html media/track/track-webvtt-tc013-settings.html media/track/track-webvtt-tc023-markup.html TextTrackCueList.idl is tested by: media/track/track-text-track-cue-list.html * CMakeLists.txt: Adding files to build systems. * CodeGenerators.pri: Adding files to build systems. * DerivedSources.cpp: Adding files to build systems. * DerivedSources.make: Adding files to build systems. * GNUmakefile.list.am: Adding files to build systems. * WebCore.gypi: Adding files to build systems. * WebCore.pro: Adding files to build systems. * WebCore.xcodeproj/project.pbxproj: Adding files to build systems. * bindings/gobject/GNUmakefile.am: Adding files to build systems. * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Adding files to build systems. * bindings/js/JSBindingsAllInOne.cpp: Adding files to build systems. * bindings/js/JSTextTrackCustom.cpp: Added. (WebCore::toJS): * bindings/scripts/CodeGeneratorV8.pm: (HasCustomToV8Implementation): Special check for TextTrack since V8 can auto-generate it, but JS cannot yet. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::addTrack): creates and returns a new MutableTextTrack. * html/HTMLMediaElement.h: Adding addTrack() function. * html/HTMLMediaElement.idl: Adding addTrack() function. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::track): Adding track getter. * html/HTMLTrackElement.h: Adding track getter. * html/HTMLTrackElement.idl: Adding track getter. * html/MutableTextTrack.idl: Added. * html/TextTrack.idl: Added. * html/TextTrackCue.idl: Added. * html/TextTrackCueList.cpp: (WebCore::TextTrackCueList::length): (WebCore::TextTrackCueList::item): Used for [] operator. * html/TextTrackCueList.h: Added item() for [] operator. * html/TextTrackCueList.idl: Added. * page/DOMWindow.idl: Adding TextTrackCue new operator. 2011-10-19 Shawn Singh [chromium] Fix webkit style on a few files. https://bugs.webkit.org/show_bug.cgi?id=70441 Reviewed by James Robinson. Tested with existing layout and unit tests. * platform/graphics/chromium/LayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setIsMask): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/LayerRendererChromium.h: 2011-10-19 Nat Duca [chromium] Route requestAnimationFrame through CCProxy in threaded mode https://bugs.webkit.org/show_bug.cgi?id=70160 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsAnimate): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::requestAnimate): * platform/graphics/chromium/cc/CCScheduler.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsAnimate): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsAnimate): (WebCore::CCThreadProxy::setNeedsAnimateOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-19 Kent Tamura Reject invalid MIME type strings for a file selection dialog parameter https://bugs.webkit.org/show_bug.cgi?id=70095 Reviewed by Darin Fisher and Darin Adler. No new tests. This affect only a value passed to WebKit layer. * html/HTMLInputElement.cpp: (WebCore::isRFC2616TokenCharacter): Added. (WebCore::HTMLInputElement::acceptMIMETypes): Validate a MIME type string, and don't add invalid strings to the output Vector. 2011-10-19 Darin Adler Remove OptionElement (first half) https://bugs.webkit.org/show_bug.cgi?id=70276 Reviewed by Kent Tamura. Refactoring that does not require new tests. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): Use hasTagName and toHTMLOptionElement instead of toOptionElement. * dom/OptionElement.cpp: Deleted contents. Remove file later. * dom/OptionElement.h: Ditto. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::HTMLOptionElement): Initialize m_isSelected. (WebCore::HTMLOptionElement::createForJSConstructor): Initialize the selected attribute rather than calling setDefaultSelected. (WebCore::HTMLOptionElement::text): Moved the code here from OptionElement::collectOptionLabelOrText. (WebCore::HTMLOptionElement::index): Moved the code here from OptionElement::optionIndex. (WebCore::HTMLOptionElement::parseMappedAttribute): Removed unneeded code to call setValue and setLabel. Changed the code that called setSelected to instead set m_isSelected and added a FIXME about why that's probably wrong, but same behavior as before. (WebCore::HTMLOptionElement::value): Moved the code here from OptionElement::collectOptionValue. Added a FIXME about incorrect whitespace stripping. (WebCore::HTMLOptionElement::selected): Use m_isSelected. (WebCore::HTMLOptionElement::setSelected): Use m_isSelected and call setSelectedState instead of OptionElement::setSelectedState. (WebCore::HTMLOptionElement::setSelectedState): Moved the code here from OptionElement::setSelectedState. (WebCore::HTMLOptionElement::label): Streamlined the code. (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel): Moved the code here from OptionElement::collectOptionTextRespectingGroupLabel. (WebCore::HTMLOptionElement::insertedIntoTree): Use m_isSelected and rewrote comment for clarity. (WebCore::HTMLOptionElement::collectOptionInnerText): Moved this here from OptionElement, and changed to use StringBuilder. (WebCore::toHTMLOptionElement): Added. * html/HTMLOptionElement.h: Removed OptionElement.h include. Removed OptionElement base class. Removed unneeded friend declarations. Made value and selected functions non-virtual. Removed unneeded defaultSelected and setDefaultSelected functions. Made the textIndentedToRespectGroupLabel and setSelectedState functions be non-virtual and public. Added a collectOptionInnerText function. Replaced m_data with m_value, m_label, and m_selected. * html/HTMLSelectElement.cpp: (WebCore::toOptionElement): Added. Helper to keep existing code close to the same. (WebCore::HTMLSelectElement::nextValidIndex): Use hasTagName instead of isOptionElement. (WebCore::HTMLSelectElement::saveLastSelection): Use HTMLOptionElement type instead of OptionElement. (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): Ditto. (WebCore::HTMLSelectElement::updateListBoxSelection): Ditto. (WebCore::HTMLSelectElement::listBoxOnChange): Ditto. (WebCore::HTMLSelectElement::recalcListItems): Ditto. (WebCore::HTMLSelectElement::selectedIndex): Ditto. (WebCore::HTMLSelectElement::setSelectedIndex): Ditto. (WebCore::HTMLSelectElement::optionToListIndex): Ditto. (WebCore::HTMLSelectElement::listToOptionIndex): Ditto. (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): Ditto. (WebCore::HTMLSelectElement::saveFormControlState): Ditto. (WebCore::HTMLSelectElement::restoreFormControlState): Ditto. (WebCore::HTMLSelectElement::appendFormData): Ditto. (WebCore::HTMLSelectElement::reset): Ditto. (WebCore::HTMLSelectElement::updateSelectedState): Ditto. (WebCore::HTMLSelectElement::lastSelectedListIndex): Ditto. (WebCore::HTMLSelectElement::typeAheadFind): Ditto. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Ditto. (WebCore::HTMLSelectElement::length): Ditto. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): Use HTMLOptionElement, hasTagName, and toHTMLOptionElement. (WebCore::RenderListBox::addFocusRingRects): Ditto. (WebCore::RenderListBox::paintItemForeground): Ditto. (WebCore::RenderListBox::paintItemBackground): Ditto. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): Ditto. (WebCore::RenderMenuList::setTextFromOption): Ditto. (WebCore::RenderMenuList::itemText): Ditto. (WebCore::RenderMenuList::itemIsSelected): Ditto. 2011-10-19 Raymond Toy Flush denormals to zero on Windows. https://bugs.webkit.org/show_bug.cgi?id=70140 Reviewed by Kenneth Russell. * platform/audio/AudioBus.cpp: (WebCore::AudioBus::processWithGainFromMonoStereo): Flush any denormals to zero before saving the result. Change double gain to float gain to match existing float operations. * platform/audio/DenormalDisabler.h: (WebCore::DenormalDisabler::flushDenormalFloatToZero): New function to flush the given float to zero, if it is a denormal number. 2011-10-19 Raphael Kubo da Costa [EFL] Remove the empty paint() implementation in ScrollbarEfl. https://bugs.webkit.org/show_bug.cgi?id=70428 Reviewed by Antonio Gomes. Remove the empty reimplementation of Scrollbar::paint(), as this would cause ScrollView::paintScrollbars() to paint nothing at all. If we have mock scrollbars enabled, this will paint them; otherwise, the code path will end up in WidgetEfl::paint(), which also does nothing, so the behavior should not change. No new tests, this is machinery needed to run the current ones. * platform/efl/ScrollbarEfl.cpp: (ScrollbarEfl::frameRectsChanged): * platform/efl/ScrollbarEfl.h: 2011-10-19 Raphael Kubo da Costa [EFL] Do not always consider a ScrollView will have an Evas/Evas_Object. https://bugs.webkit.org/show_bug.cgi?id=70426 Reviewed by Antonio Gomes. After r95234 turned on a new code path for the port (we erroneously used ENABLE_AS_IMAGE instead of ENABLE_SVG_AS_IMAGE before), some tests, such as compositing/image/direct-svg-image.html or fast/writing-mode/block-level-images.html started writing stderr messages about the parent passed to ScrollbarEfl::setParent not having an Evas. It turns out that a FrameView can be created in places other than ewk_frame_view_create_for_view, in which case the view will not have an Evas or an Evas_Object. This is not an error condition, so we can just return earlier. No new tests, this was detected by existing ones. * platform/efl/ScrollbarEfl.cpp: (ScrollbarEfl::setParent): 2011-10-19 Julien Chaffraix Multiple crashes in RenderTable during layout https://bugs.webkit.org/show_bug.cgi?id=70392 Reviewed by Simon Fraser. Tests: fast/table/crash-anonymous-table-computeLogicalWidth.html fast/table/crash-anonymous-table-layout.html r97555 forgot to take into account anonymous tables during layout where RenderObject::node() is NULL. * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): (WebCore::RenderTable::layout): Added a check for node() before calling Node::hasTagName. 2011-10-19 Adam Bergkvist Update MediaStream to use WebCore platform interfaces https://bugs.webkit.org/show_bug.cgi?id=68464 Reviewed by Adam Barth. This is one in a series of patches that update the MediaStream feature to use WebCore platform interfaces. Tests will be provided by http://webkit.org/b/56587 * dom/LocalMediaStream.cpp: (WebCore::LocalMediaStream::create): (WebCore::LocalMediaStream::LocalMediaStream): (WebCore::LocalMediaStream::stop): (WebCore::LocalMediaStream::stopTimerFired): (WebCore::LocalMediaStream::~LocalMediaStream): (WebCore::LocalMediaStream::toLocalMediaStream): * dom/LocalMediaStream.h: * dom/LocalMediaStream.idl: * dom/MediaStream.cpp: (WebCore::MediaStream::create): (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::readyState): (WebCore::MediaStream::streamEnded): (WebCore::MediaStream::scriptExecutionContext): * dom/MediaStream.h: (WebCore::MediaStream::label): (WebCore::MediaStream::tracks): (WebCore::MediaStream::descriptor): * dom/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::create): (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::kind): (WebCore::MediaStreamTrack::label): (WebCore::MediaStreamTrack::enabled): (WebCore::MediaStreamTrack::setEnabled): * dom/MediaStreamTrack.h: * dom/MediaStreamTrack.idl: * dom/MediaStreamTrackList.cpp: (WebCore::MediaStreamTrackList::create): (WebCore::MediaStreamTrackList::MediaStreamTrackList): (WebCore::MediaStreamTrackList::length): (WebCore::MediaStreamTrackList::item): * dom/MediaStreamTrackList.h: * p2p/PeerConnection.cpp: (WebCore::PeerConnection::addStream): (WebCore::PeerConnection::removeStream): (WebCore::PeerConnection::remoteStreamAdded): * page/MediaStreamClient.h: * page/MediaStreamController.cpp: (WebCore::MediaStreamController::unregisterFrameController): (WebCore::MediaStreamController::streamGenerated): * page/MediaStreamController.h: * page/MediaStreamFrameController.cpp: (WebCore::MediaStreamFrameController::enterDetachedState): (WebCore::MediaStreamFrameController::disconnectFrame): (WebCore::MediaStreamFrameController::streamGenerated): * page/MediaStreamFrameController.h: 2011-10-19 W. James MacLean [chromium] Shorten animation time for ZoomAnimator. https://bugs.webkit.org/show_bug.cgi?id=70419 Reviewed by Kenneth Russell. Shorten animation time for ZoomAnimator. Existing test coverage sufficient. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::zoom): 2011-10-19 Zhenyao Mo Implement WEBGL_debug_shaders and WEBGL_debug_renderer_info extensions https://bugs.webkit.org/show_bug.cgi?id=70077 Reviewed by Kenneth Russell. * WebCore.gypi: added new extension class files. * WebCore.xcodeproj/project.pbxproj: ditto. * WebCore.pro: ditto. * CMakeLists.txt: ditto. * GNUmakefile.list.am: ditto. * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): Handles two new extensions. * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): Ditto. * html/canvas/WebGLDebugRendererInfo.cpp: Added. (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo): (WebCore::WebGLDebugRendererInfo::~WebGLDebugRendererInfo): (WebCore::WebGLDebugRendererInfo::getName): (WebCore::WebGLDebugRendererInfo::create): * html/canvas/WebGLDebugRendererInfo.h: Added. * html/canvas/WebGLDebugRendererInfo.idl: Added. * html/canvas/WebGLDebugShaders.cpp: Added. (WebCore::WebGLDebugShaders::WebGLDebugShaders): (WebCore::WebGLDebugShaders::~WebGLDebugShaders): (WebCore::WebGLDebugShaders::getName): (WebCore::WebGLDebugShaders::create): (WebCore::WebGLDebugShaders::getTranslatedShaderSource): * html/canvas/WebGLDebugShaders.h: Added. * html/canvas/WebGLDebugShaders.idl: Added. * html/canvas/WebGLExtension.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::allowPrivilegedExtensions): To be implemented - deciding whether the two extensions should be allowed or not. (WebCore::WebGLRenderingContext::getExtension): Handles two new extensions. (WebCore::WebGLRenderingContext::getParameter): Handles UNMASKED_VENDOR_WEBGL / UNMASKED_RENDERER_WEBGL (WebCore::WebGLRenderingContext::getSupportedExtensions): Handles two new extensions. * html/canvas/WebGLRenderingContext.h: * platform/graphics/Extensions3D.h: Ditto. * platform/graphics/GraphicsTypes3D.h: Add GC3Dchar. * platform/graphics/chromium/Extensions3DChromium.h: Handles two new extensions. * platform/graphics/opengl/Extensions3DOpenGL.cpp: Ditto. (WebCore::getTranslatedShaderSourceANGLE): * platform/graphics/opengl/Extensions3DOpenGL.h: Ditto. * platform/graphics/qt/Extensions3DQt.cpp: Ditto. (WebCore::Extensions3DQt::getTranslatedShaderSourceANGLE): * platform/graphics/qt/Extensions3DQt.h: Ditto. 2011-10-19 Geoffrey Garen Removed StringImplBase, fusing it into StringImpl https://bugs.webkit.org/show_bug.cgi?id=70443 Reviewed by Gavin Barraclough. * ForwardingHeaders/runtime/RopeImpl.h: Removed. * ForwardingHeaders/wtf/text/StringImplBase.h: Removed. 2011-10-19 Shinya Kawanaka ArrayBuffer should have slice method. https://bugs.webkit.org/show_bug.cgi?id=66646 Reviewed by Kenneth Russell. * html/canvas/ArrayBuffer.cpp: (WebCore::clampValue): (WebCore::ArrayBuffer::slice): (WebCore::ArrayBuffer::sliceImpl): (WebCore::ArrayBuffer::clampIndex): * html/canvas/ArrayBuffer.h: Added declaration. * html/canvas/ArrayBuffer.idl: Added interface. 2011-10-19 Mark Hahnenberg Add getConstructData to the MethodTable https://bugs.webkit.org/show_bug.cgi?id=70163 Reviewed by Geoffrey Garen. No new tests. Adding getConstructData to the MethodTable in order to be able to remove all calls to getConstructDataVirtual soon. Part of the process of de-virtualizing JSCell. * WebCore.exp.in: 2011-10-19 Dan Bernstein Incorrect pagination in flipped-blocks writing modes with border/padding before https://bugs.webkit.org/show_bug.cgi?id=70444 Reviewed by Darin Adler. Test: fast/multicol/flipped-blocks-border-after.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): Account for flipped blocks when adjusting the page offset. 2011-10-19 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=70396 Focus rings are too thin in HiDPI in WebKit2 -and corresponding- Reviewed by Dan Bernstein. Rename wkSetPatternBaseCTM to wkSetBaseCTM * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: New CG-only function calls into wkSetBaseCTM. * platform/graphics/GraphicsContext.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setBaseCTM): Call GraphicsContext::setBaseCTM() rather than calling into WebKitSystemInterface directly. * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): 2011-10-19 Anna Cavender Update WebVTTParser to require at least one space between timestamps and arrows, e.g.: 00:04:01.000 --> 00:03:00.500 is OK 00:04:01.000-->00:03:00.500 is not OK https://bugs.webkit.org/show_bug.cgi?id=70274 Reviewed by Eric Carlson. Existing tests: media/track/track-webvtt-tc008-timings-no-hours.html (see media/track/captions-webvtt/tc008-timings-no-hour-errors.vtt #6) media/track/track-webvtt-tc009-timings-hour.html (see media/track/captions-webvtt/tc009-timings-hour-error.vtt #6) * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::collectTimingsAndSettings): Check that the character before and after the '-->' is a space character 2011-10-19 Daniel Cheng Don't always select images during an image drag. https://bugs.webkit.org/show_bug.cgi?id=62998 Reviewed by Tony Chang. Only select an image being dragged if it is contenteditable. Test: fast/events/drag-selects-image.html * dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): * dom/Node.h: * page/DragController.cpp: (WebCore::prepareClipboardForImageDrag): 2011-10-19 Andreas Kling HTMLBodyElement: Simplify link/alink/vlink attribute parsing. https://bugs.webkit.org/show_bug.cgi?id=70429 Reviewed by Antonio Gomes. Instead of carrying around a CSSMutableStyleDeclaration with the body element, just use CSSParser::parseColor() to parse the three link color attributes. * html/HTMLBodyElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::~HTMLBodyElement): Remove HTMLBodyElement::m_linkDecl and all the voodoo that went along with it. (WebCore::HTMLBodyElement::parseMappedAttribute): Use CSSParser directly to parse the color values for {link,alink,vlink}Attr. 2011-10-18 Oliver Hunt Support CanvasPixelArray in the DFG https://bugs.webkit.org/show_bug.cgi?id=70384 Reviewed by Filip Pizlo. Make CanvasPixelArray inherit from ByteArray's ClassInfo so can identify it more sensibly. * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): 2011-10-19 Chang Shu [Qt] Disable fullscreen api on Qt by default https://bugs.webkit.org/show_bug.cgi?id=70413 Reviewed by Noam Rosenthal. As the WebKit side of implementation for fullscreen api feature has not been done yet, we'd better turn off the feature on the WebCore side by default. * features.pri: 2011-10-19 Dirk Schulze Unreviewed, rolling out r97863. http://trac.webkit.org/changeset/97863 https://bugs.webkit.org/show_bug.cgi?id=65769 Rollout * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * platform/graphics/FloatRect.cpp: * platform/graphics/FloatRect.h: (WebCore::FloatRect::contains): * rendering/RenderObject.h: (WebCore::RenderObject::isSVGPath): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/svg/RenderSVGAllInOne.cpp: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::isGraphicsElement): * rendering/svg/RenderSVGPath.cpp: (WebCore::BoundingRectStrokeStyleApplier::BoundingRectStrokeStyleApplier): (WebCore::BoundingRectStrokeStyleApplier::strokeStyle): (WebCore::RenderSVGPath::RenderSVGPath): (WebCore::RenderSVGPath::fillContains): (WebCore::RenderSVGPath::strokeContains): (WebCore::RenderSVGPath::layout): (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath): (WebCore::RenderSVGPath::zeroLengthSubpathRect): (WebCore::RenderSVGPath::setupSquareCapPath): (WebCore::RenderSVGPath::setupNonScalingStrokePath): (WebCore::RenderSVGPath::fillAndStrokePath): (WebCore::RenderSVGPath::paint): (WebCore::RenderSVGPath::addFocusRingRects): (WebCore::RenderSVGPath::nodeAtFloatPoint): (WebCore::RenderSVGPath::calculateMarkerBoundsIfNeeded): (WebCore::RenderSVGPath::updateCachedBoundaries): * rendering/svg/RenderSVGPath.h: (WebCore::RenderSVGPath::path): (WebCore::RenderSVGPath::setNeedsPathUpdate): (WebCore::RenderSVGPath::setNeedsBoundariesUpdate): (WebCore::RenderSVGPath::setNeedsTransformUpdate): (WebCore::RenderSVGPath::objectBoundingBox): (WebCore::RenderSVGPath::strokeBoundingBox): (WebCore::RenderSVGPath::repaintRectInLocalCoordinates): (WebCore::RenderSVGPath::localToParentTransform): (WebCore::RenderSVGPath::localTransform): (WebCore::toRenderSVGPath): * rendering/svg/RenderSVGRect.cpp: Removed. * rendering/svg/RenderSVGRect.h: Removed. * rendering/svg/RenderSVGResource.h: (WebCore::RenderSVGResource::postApplyResource): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect): (WebCore::RenderSVGResourceClipper::hitTestClipContent): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceGradient.h: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::postApplyResource): * rendering/svg/RenderSVGResourcePattern.h: * rendering/svg/RenderSVGResourceSolidColor.cpp: (WebCore::RenderSVGResourceSolidColor::postApplyResource): * rendering/svg/RenderSVGResourceSolidColor.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): * rendering/svg/RenderSVGShape.cpp: Removed. * rendering/svg/RenderSVGShape.h: Removed. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::releasePaintingResource): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::prepareToRenderSVGContent): (WebCore::SVGRenderSupport::finishRenderSVGContent): (WebCore::SVGRenderSupport::layoutChildren): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeStyle): (WebCore::operator<<): (WebCore::write): * rendering/svg/SVGRenderTreeAsText.h: * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::svgAttributeChanged): (WebCore::SVGPathElement::pathSegListChanged): * svg/SVGPathElement.h: * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGRectElement.h: 2011-10-19 Yury Semikhatsky Web Inspector: worker inspector title should contain worker URL https://bugs.webkit.org/show_bug.cgi?id=70424 Worker inspector title is now evaluated when the front-end starts. Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.loaded): (WebInspector.WorkerManager._calculateWorkerInspectorTitle): 2011-10-19 Martin Robinson [GTK] Avoid unecessarily calling gtk_widget_size_allocate on plugin widgets https://bugs.webkit.org/show_bug.cgi?id=70190 Reviewed by Xan Lopez. Instead of always calling gtk_widget_size_allocate on every single plugin widget during scrolling, only call it on widgets that are both in the view and that have moved. No new tests. It's difficult to test scrolling performance in an automated way. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::setNPWindowIfNeeded): Reverse the if statement detecting a clipped out plugin. It was incorrect. (WebCore::PluginView::updateWidgetAllocationAndClip): If the current allocation of the plugin widget has not changed or if the widget remains scrolled out, do not call gtk_widget_size_allocate. 2011-10-19 Renata Hodovan Add new renderer for SVGRectElement. https://bugs.webkit.org/show_bug.cgi?id=65769 Reviewed by Dirk Schulze. This patch introduces a new common base class called RenderSVGShape which replaces the RenderSVGPath. This new base class has the same purpose as the replaced class and has specialized descendants for common shapes (like Rectangles and Circles), which allows faster painting of these shapes when certain conditions are fulfilled. On some benchmark programs we have seen 5% speedup. The biggest motivation of this refactor is taking advantage of faster primitive drawing in the most common and frequent cases. However in some rare cases, like painting rounded rects, we need to fallback to the original code path, which is fully kept in the RenderSVGShape base class. Some other cases, like dashed strokes, can be painted but mouse pointer events cannot be handled by the descendant classes. A different fallback mechanism is used in such cases which redirects only the pointer event handling to the base class. Tests: svg/custom/pointer-events-on-rounded-rect.xhtml svg/custom/pointer-events-with-linecaps-and-miterlimits.xhtml * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * platform/graphics/FloatRect.cpp: (WebCore::FloatRect::contains): * platform/graphics/FloatRect.h: (WebCore::FloatRect::contains): * rendering/RenderObject.h: (WebCore::RenderObject::isSVGRect): (WebCore::RenderObject::isSVGShape): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/svg/RenderSVGAllInOne.cpp: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::isGraphicsElement): * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::RenderSVGPath): (WebCore::RenderSVGPath::inflateWithMarkerBounds): Unite the markerBounds with strokeBoundingBox. * rendering/svg/RenderSVGPath.h: * rendering/svg/RenderSVGRect.cpp: Added. (WebCore::RenderSVGRect::RenderSVGRect): (WebCore::RenderSVGRect::~RenderSVGRect): (WebCore::RenderSVGRect::createShape): (WebCore::RenderSVGRect::objectBoundingBox): (WebCore::RenderSVGRect::strokeBoundingBox): (WebCore::RenderSVGRect::fillShape): (WebCore::RenderSVGRect::strokeShape): (WebCore::RenderSVGRect::shapeDependentStrokeContains): (WebCore::RenderSVGRect::shapeDependentFillContains): * rendering/svg/RenderSVGRect.h: Added. (WebCore::RenderSVGRect::isSVGRect): (WebCore::RenderSVGRect::renderName): (WebCore::RenderSVGRect::isEmpty): * rendering/svg/RenderSVGResource.h: (WebCore::RenderSVGResource::postApplyResource): A new shape argument was added to allow shape specific faster painting. * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect): (WebCore::RenderSVGResourceClipper::hitTestClipContent): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceGradient.h: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::postApplyResource): * rendering/svg/RenderSVGResourcePattern.h: * rendering/svg/RenderSVGResourceSolidColor.cpp: (WebCore::RenderSVGResourceSolidColor::postApplyResource): * rendering/svg/RenderSVGResourceSolidColor.h: * rendering/svg/RenderSVGShape.cpp: Copied from Source/WebCore/rendering/svg/RenderSVGPath.cpp. (WebCore::RenderSVGShape::RenderSVGShape): (WebCore::RenderSVGShape::~RenderSVGShape): (WebCore::RenderSVGShape::createShape): (WebCore::RenderSVGShape::isEmpty): (WebCore::RenderSVGShape::fillShape): (WebCore::RenderSVGShape::objectBoundingBox): (WebCore::RenderSVGShape::strokeBoundingBox): (WebCore::RenderSVGShape::strokeShape): (WebCore::RenderSVGShape::shapeDependentStrokeContains): The purpose of this virtual function allows decendants to use their own fast checks. (WebCore::RenderSVGShape::shapeDependentFillContains): The purpose of this virtual function allows decendants to use their own fast checks. (WebCore::RenderSVGShape::fillContains): (WebCore::RenderSVGShape::strokeContains): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::shouldStrokeZeroLengthSubpath): (WebCore::RenderSVGShape::zeroLengthSubpathRect): (WebCore::RenderSVGShape::setupSquareCapPath): (WebCore::RenderSVGShape::setupNonScalingStrokePath): (WebCore::RenderSVGShape::fillAndStrokePath): (WebCore::RenderSVGShape::paint): (WebCore::RenderSVGShape::addFocusRingRects): (WebCore::RenderSVGShape::nodeAtFloatPoint): (WebCore::RenderSVGShape::calculateMarkerBoundsIfNeeded): (WebCore::RenderSVGShape::updateCachedBoundaries): (WebCore::RenderSVGShape::strokeWidth): * rendering/svg/RenderSVGShape.h: Copied from Source/WebCore/rendering/svg/RenderSVGPath.h. (WebCore::BoundingRectStrokeStyleApplier::BoundingRectStrokeStyleApplier): (WebCore::BoundingRectStrokeStyleApplier::strokeStyle): (WebCore::RenderSVGShape::setNeedsShapeUpdate): (WebCore::RenderSVGShape::setNeedsBoundariesUpdate): (WebCore::RenderSVGShape::setNeedsTransformUpdate): (WebCore::RenderSVGShape::isPaintingFallback): (WebCore::RenderSVGShape::path): (WebCore::RenderSVGShape::setIsPaintingFallback): (WebCore::RenderSVGShape::setStrokeAndMarkerBoundingBox): (WebCore::RenderSVGShape::hasPath): (WebCore::RenderSVGShape::repaintRectInLocalCoordinates): (WebCore::RenderSVGShape::localToParentTransform): (WebCore::RenderSVGShape::localTransform): (WebCore::RenderSVGShape::isSVGShape): (WebCore::RenderSVGShape::renderName): (WebCore::RenderSVGShape::isRoundedRect): (WebCore::RenderSVGShape::inflateWithMarkerBounds): (WebCore::toRenderSVGShape): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::releasePaintingResource): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::finishRenderSVGContent): (WebCore::SVGRenderSupport::layoutChildren): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeStyle): (WebCore::operator<<): (WebCore::write): * rendering/svg/SVGRenderTreeAsText.h: * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::svgAttributeChanged): (WebCore::SVGPathElement::pathSegListChanged): (WebCore::SVGPathElement::createRenderer): * svg/SVGPathElement.h: * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): (WebCore::SVGRectElement::createRenderer): * svg/SVGRectElement.h: 2011-10-19 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Unreviewed. Fix missing tag in Windows WebCore project file. * WebCore.vcproj/WebCore.vcproj: 2011-10-19 Ilya Tikhonovsky Web Inspector: [Chromium] Add an ability to show the objects that were allocated between snapshot N-2 and snapshot N-1 and still alive in snapshot N. https://bugs.webkit.org/show_bug.cgi?id=61178 This ability will help us to see only the leaked objects. Scenario: 1) do an action on inspected page which leaks javascript data; 2) make snapshot; 3) repeat first two steps three or more times; 4) select the last snapshot and select the filter 'Objects allocated between Snapshot 1 and Snapshot2' instead of 'All objects'. The view shows the object that were allocated between snapshot N-2 and snapshot N-1 and still alive in snapshot N Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged.firstSnapshotLoaded): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged.secondSnapshotLoaded): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid.prototype._baseProfileIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren): (WebInspector.DetailedHeapshotView.profileCallback): (WebInspector.DetailedHeapshotView): (WebInspector.DetailedHeapshotView.prototype.get statusBarItems): (WebInspector.DetailedHeapshotView.prototype._changeBase): (WebInspector.DetailedHeapshotView.prototype._changeFilter): (WebInspector.DetailedHeapshotView.prototype._loadProfileByIndex): (WebInspector.DetailedHeapshotView.prototype._changeView): (WebInspector.DetailedHeapshotView.prototype._updateFilterOptions): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype.get maxNodeId): (WebInspector.HeapSnapshot.prototype.aggregates): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._sortAggregateIndexes): (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass): (WebInspector.HeapSnapshot.prototype.updateStaticData): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): (WebInspector.HeapSnapshotProxy.prototype.aggregates): (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass): (WebInspector.HeapSnapshotProxy.prototype.get maxNodeId): (WebInspector.HeapSnapshotProxy.prototype.startLoading): 2011-10-19 Alexander Pavlov Strip trailing whitespace in the WebCore/css C++ code. https://bugs.webkit.org/show_bug.cgi?id=70410 Reviewed by Dirk Schulze. Only affected file names retained below for brevity. Multiline boolean expression were fixed where necessary to avoid patch style violations. * css/CSSBorderImageSliceValue.cpp: * css/CSSBorderImageSliceValue.h: * css/CSSBorderImageValue.cpp: * css/CSSCanvasValue.cpp: * css/CSSCanvasValue.h: * css/CSSComputedStyleDeclaration.cpp: * css/CSSCursorImageValue.cpp: * css/CSSFontFace.cpp: * css/CSSFontFace.h: * css/CSSFontFaceSource.cpp: * css/CSSFontFaceSource.h: * css/CSSFontFaceSrcValue.cpp: * css/CSSFontFaceSrcValue.h: * css/CSSFontSelector.cpp: * css/CSSFontSelector.h: * css/CSSFunctionValue.cpp: * css/CSSFunctionValue.h: * css/CSSGradientValue.cpp: * css/CSSGradientValue.h: * css/CSSImageGeneratorValue.cpp: * css/CSSImageGeneratorValue.h: * css/CSSImageValue.cpp: * css/CSSImageValue.h: * css/CSSImportRule.cpp: * css/CSSInitialValue.cpp: * css/CSSInitialValue.h: * css/CSSMutableStyleDeclaration.cpp: * css/CSSMutableStyleDeclaration.h: * css/CSSParser.cpp: * css/CSSParser.h: * css/CSSParserValues.cpp: * css/CSSParserValues.h: * css/CSSPrimitiveValue.cpp: * css/CSSPrimitiveValue.h: * css/CSSPrimitiveValueCache.cpp: * css/CSSPrimitiveValueCache.h: * css/CSSPrimitiveValueMappings.h: * css/CSSProperty.cpp: * css/CSSProperty.h: * css/CSSPropertyLonghand.cpp: * css/CSSReflectValue.cpp: * css/CSSReflectValue.h: * css/CSSReflectionDirection.h: * css/CSSSegmentedFontFace.cpp: * css/CSSSegmentedFontFace.h: * css/CSSSelector.cpp: * css/CSSSelector.h: * css/CSSSelectorList.cpp: * css/CSSSelectorList.h: * css/CSSStyleApplyProperty.cpp: * css/CSSStyleDeclaration.h: * css/CSSStyleSelector.cpp: * css/CSSStyleSelector.h: * css/CSSStyleSheet.cpp: * css/CSSTimingFunctionValue.cpp: * css/CSSTimingFunctionValue.h: * css/CSSUnicodeRangeValue.cpp: * css/CSSUnicodeRangeValue.h: * css/CSSValueList.cpp: * css/CSSWrapShapes.cpp: * css/CSSWrapShapes.h: * css/FontValue.cpp: * css/MediaList.cpp: * css/MediaQuery.cpp: * css/MediaQuery.h: * css/MediaQueryEvaluator.h: * css/MediaQueryExp.cpp: * css/MediaQueryExp.h: * css/Pair.h: * css/SVGCSSComputedStyleDeclaration.cpp: * css/SVGCSSParser.cpp: * css/SVGCSSStyleSelector.cpp: * css/SelectorChecker.cpp: * css/SelectorChecker.h: * css/StyleBase.cpp: * css/StyleMedia.cpp: * css/StyleMedia.h: * css/StyleSheetList.cpp: * css/StyleSheetList.h: * css/WebKitCSSFilterValue.cpp: * css/WebKitCSSFilterValue.h: * css/WebKitCSSKeyframeRule.cpp: * css/WebKitCSSKeyframeRule.h: * css/WebKitCSSKeyframesRule.cpp: * css/WebKitCSSKeyframesRule.h: * css/WebKitCSSMatrix.cpp: * css/WebKitCSSMatrix.h: * css/WebKitCSSTransformValue.cpp: * css/WebKitCSSTransformValue.h: 2011-10-19 Dirk Schulze Make FilterEffect::apply() independent of image data management https://bugs.webkit.org/show_bug.cgi?id=70350 Reviewed by Zoltan Herczeg. FilterEffect::apply() needs to be independent from the image data management in FilterEffect. This allows implementing effective hardware accelerated alternatives, like OpenGL, CI or OpenCL based filters, to the software rendering. The software rendering code will be used as fallback and moves to platformApplySoftware(). The patch does not change the behavior of SVG filters. Did not add new test cases. * platform/graphics/filters/FEBlend.cpp: Renamed apply() to platformApplyGeneric() and removed validity checks that are done by FilterEffect::apply(). This is a recurring pattern for all following effects. (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEBlend.h: * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::FEColorMatrix::platformApplySoftware): * platform/graphics/filters/FEColorMatrix.h: * platform/graphics/filters/FEComponentTransfer.cpp: (WebCore::FEComponentTransfer::platformApplySoftware): * platform/graphics/filters/FEComponentTransfer.h: * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * platform/graphics/filters/FEComposite.h: * platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::platformApplySoftware): * platform/graphics/filters/FEConvolveMatrix.h: * platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::FEDisplacementMap::platformApplySoftware): * platform/graphics/filters/FEDisplacementMap.h: * platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::platformApplySoftware): * platform/graphics/filters/FEDropShadow.h: * platform/graphics/filters/FEFlood.cpp: (WebCore::FEFlood::platformApplySoftware): * platform/graphics/filters/FEFlood.h: * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplySoftware): * platform/graphics/filters/FEGaussianBlur.h: * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplySoftware): * platform/graphics/filters/FELighting.h: * platform/graphics/filters/FEMerge.cpp: (WebCore::FEMerge::platformApplySoftware): * platform/graphics/filters/FEMerge.h: * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplySoftware): * platform/graphics/filters/FEMorphology.h: * platform/graphics/filters/FEOffset.cpp: (WebCore::FEOffset::platformApplySoftware): * platform/graphics/filters/FEOffset.h: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/FETile.h: * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::platformApplySoftware): * platform/graphics/filters/FETurbulence.h: * platform/graphics/filters/FilterEffect.cpp: Added non-virtual apply() function. This will call the platform specific apply functions, which need to be virtual now. (WebCore::FilterEffect::hasResult): Added a comment for new implementations. This function needs to be updated for every new port. (WebCore::FilterEffect::apply): (WebCore::FilterEffect::createImageBufferResult): Removed determineAbsolutePaintRect() call. This is done in apply() now. (WebCore::FilterEffect::createUnmultipliedImageResult): Ditto. (WebCore::FilterEffect::createPremultipliedImageResult): Ditto. * platform/graphics/filters/FilterEffect.h: * platform/graphics/filters/SourceAlpha.cpp: (WebCore::SourceAlpha::platformApplySoftware): * platform/graphics/filters/SourceAlpha.h: * platform/graphics/filters/SourceGraphic.cpp: (WebCore::SourceGraphic::platformApplySoftware): * platform/graphics/filters/SourceGraphic.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): * svg/graphics/filters/SVGFEImage.h: 2011-10-19 Vsevolod Vlasov Web Inspector: Enable caseSensitive search / Regex support in advanced search. https://bugs.webkit.org/show_bug.cgi?id=70335 Reviewed by Pavel Feldman. * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::createSearchRegex): (WebCore::ContentSearchUtils::searchInTextByLines): * inspector/ContentSearchUtils.h: * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::searchInContent): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::searchInResource): * inspector/InspectorPageAgent.h: * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView): (WebInspector.SearchView.prototype.get searchConfig): (WebInspector.FileBasedSearchResultsPane.prototype._createSearchRegex): (WebInspector.FileBasedSearchResultsPane.prototype.addSearchResult): (WebInspector.FileBasedSearchResultsPane.SearchResult): * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel.prototype.performSearch): * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.searchCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): (WebInspector.ResourceContentProvider.prototype.searchInContent): (WebInspector.CompilerSourceMappingContentProvider.prototype.searchInContent): (WebInspector.StaticContentProvider.prototype.searchInContent): * inspector/front-end/ElementsTreeOutline.js: (): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.performSearch): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.searchInContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.searchInContent): * inspector/front-end/ScriptsSearchScope.js: (WebInspector.ScriptsSearchScope.prototype.performSearch.searchCallbackWrapper): (WebInspector.ScriptsSearchScope.prototype.performSearch): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.createSearchRegex): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.searchInContent): (WebInspector.ContentProvider.prototype.searchInContent): * inspector/front-end/inspector.css: (.search-view .search-panel input[type="search"].search-config-search): (.search-view .search-panel label.search-config-label): (.search-view .search-panel input[type="checkbox"].search-config-checkbox): * inspector/front-end/utilities.js: (): 2011-10-19 Andreas Kling MediaList: Remove inheritance from StyleBase. https://bugs.webkit.org/show_bug.cgi?id=70203 Reviewed by Darin Adler. * css/MediaList.h: (WebCore::MediaList::parentStyleSheet): (WebCore::MediaList::setParentStyleSheet): * css/MediaList.cpp: (WebCore::MediaList::MediaList): (WebCore::MediaList::notifyChanged): Change MediaList to no longer inherit from StyleBase. The parent()/setParent() mechanism was replaced by explicit parentStyleSheet()/setParentStyleSheet(). * css/CSSImportRule.cpp: (WebCore::CSSImportRule::CSSImportRule): (WebCore::CSSImportRule::~CSSImportRule): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::CSSMediaRule): (WebCore::CSSMediaRule::~CSSMediaRule): Change StyleBase::setParent() calls to MediaList::setParentStyleSheet(). CSSRules are never moved between stylesheets, so the parent style sheet pointer is valid for the MediaList's lifetime. * css/StyleSheet.cpp: (WebCore::StyleSheet::~StyleSheet): Change StyleBase::setParent() calls to MediaList::setParentStyleSheet(). (WebCore::StyleSheet::setMedia): Change StyleBase::setParent() calls to MediaList::setParentStyleSheet(). Assert that the parent sheet is either null, or this, as MediaLists should never be reparented to other sheets. Assert that the StyleSheet is indeed a CSSStyleSheet. XSLStyleSheet inherits from StyleSheet, but it shouldn't be using the MediaList. * bindings/js/JSDOMBinding.h: (WebCore::root): Add MediaList* specific overload for root() since it can't fall back to root(StyleBase*) anymore. * WebCore.xcodeproj/project.pbxproj: Add some PrivateHeaders to accomodate the JSDOMBinding.h changes. * css/CSSMediaRule.h: Remove unnecessary forward-declaration of MediaList. 2011-10-19 Vsevolod Vlasov Web Inspector: Console messages for XHR logging should show call stack if available. https://bugs.webkit.org/show_bug.cgi?id=70324 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatMessage): 2011-10-13 Pavel Podivilov Web Inspector: move JS specific popover handling to JavaScriptSourceFrame. https://bugs.webkit.org/show_bug.cgi?id=70033 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes): (WebInspector.DebuggerPresentationModel.prototype.get paused): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.shouldShowPopover): (WebInspector.JavaScriptSourceFrame.prototype.onShowPopover.showObjectPopover): (WebInspector.JavaScriptSourceFrame.prototype.onShowPopover): (WebInspector.JavaScriptSourceFrame.prototype.onHidePopover): (WebInspector.JavaScriptSourceFrame.prototype._highlightExpression): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._getPopoverAnchor): (WebInspector.SourceFrame.prototype.get readOnly): (WebInspector.SourceFrame.prototype._setReadOnly): (WebInspector.SourceFrame.prototype.contentChanged): (WebInspector.SourceFrame.prototype.shouldShowPopover): (WebInspector.SourceFrame.prototype.onShowPopover): (WebInspector.SourceFrame.prototype.onHidePopover): 2011-10-19 Tomasz Morawski [EFL][WK2] Added missing files to build WebKit2 EFL https://bugs.webkit.org/show_bug.cgi?id=70312 Reviewed by Ryosuke Niwa. Added missing files to WebCore/CMakeListEfl.txt script: - platform/network/soup/CredentialStorageSoup.cpp - platform/network/soup/ProxyServerSoup.cpp Fixes few linking time errors. * CMakeListsEfl.txt: 2011-10-19 Kentaro Hara Rename AllowAllocation to ConstructorMode https://bugs.webkit.org/show_bug.cgi?id=70397 Reviewed by Adam Barth. The name 'AllowAllocation' is confusing (See discussion here: bug 70015). This patch renames 'AllowAllocation' to 'ConstructorMode' to clarify that this class is for distinguishing the following two situations: 1. A programmer allocates an object via "new X"; X is a function with a C++ constructCallback. 2. C++ allocates an object via the function template and tries to wrap the object with a JS flavor. Tests: fast/events/constructors/* * bindings/scripts/CodeGeneratorV8.pm: Renamed AllowAllocation to ConstructorMode. (GenerateConstructorCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated a run-binding-tests result. (WebCore::V8TestInterface::constructorCallback): * bindings/v8/V8Binding.cpp: Renamed AllowAllocation to ConstructorMode. (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData): * bindings/v8/V8Binding.h: Ditto. (WebCore::ConstructorMode::ConstructorMode): (WebCore::ConstructorMode::~ConstructorMode): (WebCore::ConstructorMode::current): (WebCore::SafeAllocation::newInstance): * bindings/v8/V8Proxy.cpp: Ditto. (WebCore::V8Proxy::checkNewLegal): * bindings/v8/custom/V8EventConstructors.cpp: Ditto. (WebCore::constructV8Event): 2011-10-19 Tomasz Morawski [EFL] Added missing dummy platformDescription function https://bugs.webkit.org/show_bug.cgi?id=70310 Reviewed by Ryosuke Niwa. Added dummy platformDescription function needed to compile WK2. * platform/efl/ContextMenuEfl.cpp: (WebCore::ContextMenu::platformDescription): 2011-10-18 Kentaro Hara Generate a SharedWorker constructor of V8 using [Constructor] IDL https://bugs.webkit.org/show_bug.cgi?id=67879 Reviewed by Hajime Morita. Spec: http://dev.w3.org/html5/workers/#shared-workers-and-the-sharedworker-interface This patch changed SharedWorker::create(..., context, ec) to SharedWorker::create(context, ..., ec), since a parameter specified by [CallWith] should come at the beginning (c.f. bug 69799). Test: ui_tests:WorkerTest.FLAKY_SharedWorkerFastConstructor ui_tests:WorkerTest.FLAKY_SharedWorkerFastName * WebCore.gypi: Removed bindings/v8/custom/V8SharedWorkerCustom.cpp * WebCore.pro: Ditto. * bindings/js/JSSharedWorkerCustom.cpp: Moved ScriptExecutionContext parameter to the beginning. (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): * bindings/v8/custom/V8SharedWorkerCustom.cpp: Removed. * workers/SharedWorker.cpp: Moved ScriptExecutionContext parameter to the beginning. (WebCore::SharedWorker::create): Ditto. * workers/SharedWorker.h: Ditto. * workers/SharedWorker.idl: Added [Constructor] IDL. 2011-10-18 Johnny Ding Implement NSProcessInfo::systemUptime on Mac Leopard. https://bugs.webkit.org/show_bug.cgi?id=66577 Reviewed by Tony Chang. * WebCore.gyp/WebCore.gyp: * platform/chromium/ScrollAnimatorChromiumMac.mm: (-[NSProcessInfo systemUptime]): 2011-10-18 Sam Weinig Try to jostle the windows build back to life. * rendering/HitTestResult.h: 2011-10-18 Anders Carlsson Assertion failure when going back in page with navigated subframes https://bugs.webkit.org/show_bug.cgi?id=70389 Reviewed by Darin Adler. Test: fast/history/history-back-twice-with-subframes-assert.html If a single navigation ends up loading multiple frame, the first committed frame will end up calling recursiveUpdateForCommit on the main frame which will null out the provisional item for all frames on the page. This means that it can null out the provisional item for any frames that are still yet to be committed which causes the aforementioned assertion failure. Fix this by only nulling out the provisional history item (and saving/restoring the scroll position and some other things) for frames that already contain the URL that the item requested. If a frame is being loaded, it will null out its provisional history item when it's committed. * loader/HistoryController.cpp: (WebCore::HistoryController::recursiveUpdateForCommit): 2011-10-18 Sheriff Bot Unreviewed, rolling out r97765. http://trac.webkit.org/changeset/97765 https://bugs.webkit.org/show_bug.cgi?id=70388 "broke webkit_unit_tests, http/tests/xmlhttprequest /xmlhttprequest-test-send-flag.html on linux debug" (Requested by dpranke on #webkit). * WebCore.gypi: * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::create): (WebCore::DocumentThreadableLoader::~DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::cancel): (WebCore::DocumentThreadableLoader::setDefersLoading): (WebCore::DocumentThreadableLoader::willSendRequest): (WebCore::DocumentThreadableLoader::didSendData): (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::didReceiveData): (WebCore::DocumentThreadableLoader::didReceiveCachedMetadata): (WebCore::DocumentThreadableLoader::didFinishLoading): (WebCore::DocumentThreadableLoader::didFail): (WebCore::DocumentThreadableLoader::preflightSuccess): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::CachedRawResource): (WebCore::CachedRawResource::data): * loader/cache/CachedRawResource.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): * loader/cache/CachedResource.h: (WebCore::CachedResource::setRequestedFromNetworkingLayer): * loader/cache/CachedResourceClient.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::~CachedResourceRequest): (WebCore::CachedResourceRequest::willSendRequest): (WebCore::CachedResourceRequest::didFinishLoading): (WebCore::CachedResourceRequest::didReceiveResponse): (WebCore::CachedResourceRequest::didReceiveData): * loader/cache/CachedResourceRequest.h: * loader/chromium/CachedRawResourceChromium.cpp: Removed. * loader/chromium/CachedResourceRequestChromium.cpp: Removed. * loader/chromium/DocumentThreadableLoaderChromium.cpp: (WebCore::DocumentThreadableLoader::didDownloadData): * loader/icon/IconLoader.h: * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponse): 2011-10-18 Mark Hahnenberg Rename static put to putByIndex https://bugs.webkit.org/show_bug.cgi?id=70281 Reviewed by Geoffrey Garen. No new tests. Renaming versions of deleteProperty that use an unsigned as the property name to "deletePropertyByIndex" in preparation for adding them to the MethodTable, which requires unique names for each method. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/runtime_array.cpp: (JSC::RuntimeArray::putVirtual): (JSC::RuntimeArray::putByIndex): * bridge/runtime_array.h: 2011-10-18 Sam Weinig Fix the build. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absolutePDFURL): Fix typo. 2011-10-18 Alexis Menard Unreviewed warning fix after https://bugs.webkit.org/show_bug.cgi?id=70269 * WebCore.pro: 2011-10-18 Alexey Proskuryakov Expose PDF information in hit test result https://bugs.webkit.org/show_bug.cgi?id=70353 Reviewed by Sam Weinig. * WebCore.exp.in: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absolutePDFURL): * rendering/HitTestResult.h: Added HitTestResult::absolutePDFURL(). It will contain a URL when over a PDF object or embed; not sure if we want this for PDFImageDocuments. 2011-10-18 Adrienne Walker [chromium] Preserve offscreen tiles instead of immediately recycling them https://bugs.webkit.org/show_bug.cgi?id=70352 Reviewed by James Robinson. Tested by existing layout tests. Prior to having a TextureManager class, tiled layers recycled their textures internally to avoid reallocation. Unfortunately, it recycled these tiles as soon as they went offscreen, even if they were still valid. Instead, keep tiles around forever, letting the TextureManager decide (via LRU) when to reclaim the underlying textures. This will improve scrolling performance due to not needing to repaint tiles. This change does lead to more texture reallocation for any textures that get reclaimed, but the command buffer implementation already pools and reuses texture ids, so it should not introduce additional flush syncs. If there's any performance penalty, it'll be at the driver level, but I'd prefer to measure that there's a problem before prematurely optimizing and adding complexity to the TextureManager. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::prepareToUpdate): * platform/graphics/chromium/TiledLayerChromium.h: 2011-10-18 Adam Klein [MutationObservers] Implement WebKitMutationObserver.observe for characterData changes https://bugs.webkit.org/show_bug.cgi?id=68957 Reviewed by Ryosuke Niwa. Test: fast/mutation/observe-characterdata.html * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent): 2011-10-18 Scott Byer Scroll animator tracing https://bugs.webkit.org/show_bug.cgi?id=70280 Reviewed by James Robinson. No functional difference, no test needed. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::scroll): (WebCore::ScrollAnimatorNone::animationTimerFired): 2011-10-18 James Robinson [chromium] Remove USE(THREADED_COMPOSITING) from the tree, this is controlled by a runtime setting https://bugs.webkit.org/show_bug.cgi?id=70356 Reviewed by Kenneth Russell. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-18 Ojan Vafai cleanup some FIXMEs in RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=70374 Reviewed by Darin Adler. No new tests. Existing tests cover all changes. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight): (WebCore::RenderFlexibleBox::flowAwareMarginLogicalHeightForChild): * rendering/RenderFlexibleBox.h: Removed the FIXME to implement computePreferredLogicalWidths. It doesn't seem to be necessary, at least not with the current test cases. 2011-10-18 Joseph Pecoraro Web Inspector: Some localizedStrings.js Updates https://bugs.webkit.org/show_bug.cgi?id=70365 Reviewed by Darin Adler. Fixed syntax issue, added missing strings, and removed a duplicate. * English.lproj/localizedStrings.js: 2011-10-18 Tony Chang fix unused-but-set-variable warnings in WebCore https://bugs.webkit.org/show_bug.cgi?id=70344 Reviewed by Adam Barth. This is a new compiler warning in gcc 4.6. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::isWrapperOfType): * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::ComplexTextController::normalizeSpacesAndMirrorChars): 2011-10-18 Dan Bernstein Certain column-rule styles render incorrectly in vertical writing modes https://bugs.webkit.org/show_bug.cgi?id=70362 Reviewed by Darin Adler. Test: fast/multicol/vertical-rl/rule-style.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): Use the correct border sides for vertical writing modes. 2011-10-18 Anna Cavender Fix broken binding tests by changing G_MAXUSHORT to G_MAXUINT in WebKitDOMTestObj.cpp. https://bugs.webkit.org/show_bug.cgi?id=70267 Reviewed by Daniel Bates. Tests: fixing WebKitDOMTestObj.cpp * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_class_init): Change G_MAXUSHORT to G_MAXUINT 2011-10-18 Julien Chaffraix Crash in RenderDeprecatedFlexibleBox::layoutHorizontalBox https://bugs.webkit.org/show_bug.cgi?id=70183 Reviewed by David Hyatt. Test: fast/flexbox/layoutHorizontal-crash.html The deferred scroll information update logic was not updated when an object was destroy'ed. The fix is very simple. As the deferred logic was only used with deprecated flexbox, it is a pretty uncommon cases so let's optimize the new code for the common case. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::willBeDestroyed): 2011-10-18 Adam Klein [MutationObservers] Clean up MutationObserver code in Node https://bugs.webkit.org/show_bug.cgi?id=70349 Reviewed by Ryosuke Niwa. Three small cleanups. No new tests, no behavior change. * dom/Node.cpp: (WebCore::Node::clearRareData): Use indices instead of iterator in for loop; fix typo. (WebCore::Node::registerMutationObserver): Inline single call to Node::ensureMutationObserverEntries. * dom/Node.h: Make mutationObserverEntries private. 2011-10-18 James Robinson [chromium] Fix shutdown race when posting main thread task to CCThreadProxy and enable tests https://bugs.webkit.org/show_bug.cgi?id=70161 Reviewed by David Levin. Adds a weak pointer mechanism to cancel main thread tasks posted to CCThreadProxy instances from the compositor thread. Previously there was a race condition where main thread tasks could run even after the CCThreadProxy was destroyed. This race does not exist in the other direction because when tearing down a CCThreadProxy we first post a quit task to the compositor thread and then suspend execution of the main thread until all compositor tasks for the CCThreadProxy have been drained. Covered by the now-enabled CCLayerTreeHostTest* unit tests. * WebCore.gypi: * platform/graphics/chromium/cc/CCScopedMainThreadProxy.h: Added. (WebCore::CCScopedMainThreadProxy::create): (WebCore::CCScopedMainThreadProxy::postTask): (WebCore::CCScopedMainThreadProxy::shutdown): (WebCore::CCScopedMainThreadProxy::CCScopedMainThreadProxy): (WebCore::CCScopedMainThreadProxy::runTaskIfNotShutdown): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-13 Ojan Vafai implement flex-flow:column https://bugs.webkit.org/show_bug.cgi?id=70082 Reviewed by David Hyatt. There's still a bug with a FIXME where we don't compute the right size for the container of the flexbox in the presence of orthogonal flows. That's the cause of all the failing cases in the tests. Tests: css3/flexbox/flex-flow-border.html css3/flexbox/flex-flow-margins.html css3/flexbox/flex-flow-orientations.html css3/flexbox/flex-flow-overflow.html css3/flexbox/flex-flow-padding.html css3/flexbox/flex-flow.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::hasOrthogonalFlow): (WebCore::RenderFlexibleBox::isColumnFlow): (WebCore::RenderFlexibleBox::isHorizontalFlow): (WebCore::RenderFlexibleBox::isLeftToRightFlow): Use isHorizontalFlow and isLeftToRightFlow so that methods like flowAwareBorderStart look exactly like borderStart with isHorizontalWritingMode and isLeftToRightDirection replaced. (WebCore::RenderFlexibleBox::setFlowAwareLogicalHeight): (WebCore::RenderFlexibleBox::flowAwareLogicalHeightForChild): (WebCore::RenderFlexibleBox::flowAwareLogicalWidthForChild): (WebCore::RenderFlexibleBox::flowAwareLogicalHeight): (WebCore::RenderFlexibleBox::flowAwareLogicalWidth): (WebCore::RenderFlexibleBox::flowAwareContentLogicalHeight): (WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth): (WebCore::RenderFlexibleBox::transformedWritingMode): Transform the writing-mode based of the flex-flow and direction values. That methods like flowAwareBorderBefore look exactly like borderBefore, except it switches over a different value. (WebCore::RenderFlexibleBox::flowAwareBorderStart): (WebCore::RenderFlexibleBox::flowAwareBorderBefore): (WebCore::RenderFlexibleBox::flowAwareBorderAfter): (WebCore::RenderFlexibleBox::flowAwarePaddingStart): (WebCore::RenderFlexibleBox::flowAwarePaddingBefore): (WebCore::RenderFlexibleBox::flowAwarePaddingAfter): (WebCore::RenderFlexibleBox::flowAwareMarginStartForChild): (WebCore::RenderFlexibleBox::flowAwareMarginEndForChild): (WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild): (WebCore::RenderFlexibleBox::flowAwareMarginAfterForChild): (WebCore::RenderFlexibleBox::setFlowAwareMarginStartForChild): (WebCore::RenderFlexibleBox::setFlowAwareMarginEndForChild): (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): (WebCore::RenderFlexibleBox::alignChildrenBlockDirection): * rendering/RenderFlexibleBox.h: 2011-10-18 Shawn Singh [chromium] Tracking update rects in LayerChromium and CCLayerImpl. https://bugs.webkit.org/show_bug.cgi?id=69441 Reviewed by James Robinson. This patch does not do much on its own, but is just part 1 of a string of other patches which will use these rects for visualization and scissoring. The appropriate testing will be associated with those patches. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::prepareToUpdate): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::updateRect): (WebCore::CCLayerImpl::setUpdateRect): 2011-10-18 Anna Cavender Change CodeGeneratorGObject.pm to use g_value_get_uint() instead of g_value_get_ushort() for IDL attributes of type unsigned short. https://bugs.webkit.org/show_bug.cgi?id=70267 Reviewed by Xan Lopez. Tests: small change to WebKitDOMTestObj.cpp * bindings/scripts/CodeGeneratorGObject.pm: (GetGValueTypeName): convert unsigned short to uint instead of ushort * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_set_property): expect g_value_get_uint instead of g_value_get_ushort (webkit_dom_test_obj_class_init): expect G_MAXUSHORT instead of G_MAXUINT16 2011-10-18 Vsevolod Vlasov Web Inspector: ScriptsPanel's should use similar logic to decide whether it could show an anchor location and actually showing it. https://bugs.webkit.org/show_bug.cgi?id=70322 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): (WebInspector.ScriptsPanel.prototype._showSourceLine): 2011-10-18 Eric Carlson Use the new cached cue loader https://bugs.webkit.org/show_bug.cgi?id=70269 Reviewed by Antti Koivisto. No new tests, no functionality changed. * CMakeLists.txt: Remove CueParser.cpp/h and CueParserPrivate.h. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadTextTracks): (WebCore::HTMLMediaElement::textTrackReadyStateChanged): New, not implemented yet. (WebCore::HTMLMediaElement::textTrackModeChanged): Ditto. (WebCore::HTMLMediaElement::textTrackCreated): Ditto. (WebCore::HTMLMediaElement::textTrackAddCues): Ditto. (WebCore::HTMLMediaElement::textTrackRemoveCues): Ditto. (WebCore::HTMLMediaElement::textTrackAddCue): Ditto. (WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto. * html/HTMLMediaElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::load): Update for interface change (WebCore::HTMLTrackElement::textTrackLoadingCompleted): New, dispatch 'load' or 'error' event. * html/HTMLTrackElement.h: * html/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::LoadableTextTrack): Add TextTrackClient and TextTrackLoadingClient parameters. (WebCore::LoadableTextTrack::load): Make url parameter KURL instead of String. Create the cue loader, trigger the load. (WebCore::LoadableTextTrack::newCuesAvailable): New callback from the loader. Not implemented yet. (WebCore::LoadableTextTrack::cueLoadingStarted): Ditto. (WebCore::LoadableTextTrack::cueLoadingCompleted): Ditto. * html/LoadableTextTrack.h: * html/MutableTextTrack.cpp: (WebCore::MutableTextTrack::MutableTextTrack): Add TextTrackClient parameter. * html/MutableTextTrack.h: (WebCore::MutableTextTrack::create): * html/TextTrack.cpp: (WebCore::TextTrack::TextTrack): Add TextTrackClient parameter. (WebCore::TextTrack::~TextTrack): Tell the client to remove all cues, forget the client. (WebCore::TextTrack::setReadyState): Tell client about ready state change. (WebCore::TextTrack::setMode): Tell client about mode change. * html/TextTrack.h: (WebCore::TextTrackClient::textTrackAddCues): New client interface. (WebCore::TextTrackClient::textTrackRemoveCues): Ditto. (WebCore::TextTrackClient::textTrackAddCue): Ditto. (WebCore::TextTrackClient::textTrackRemoveCue): Ditto. (WebCore::TextTrack::create): (WebCore::TextTrack::trackType): New. (WebCore::TextTrack::client): Ditto. (WebCore::TextTrack::setClient): Ditto. * html/track/CueParser.cpp: Removed. * html/track/CueParser.h: Removed. * html/track/CueParserPrivate.h: Removed. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::fileIdentifierMaximumLength): New, return length of WebVTT file magic number. (WebCore::WebVTTParser::hasRequiredFileIdentifier): Update to use constants instead of hard coded lengths. (WebCore::WebVTTParser::WebVTTParser): Initialize "m_client" in the initilization list instead of setting it in the constructor. (WebCore::WebVTTParser::getNewCues): Renamed from fetchParsedCues. * html/track/WebVTTParser.h: (WebCore::WebVTTParser::create): Take a WebVTTParserClient* instead of a CueParserPrivateClient*. * loader/CueLoader.cpp: (WebCore::CueLoader::CueLoader): (WebCore::CueLoader::~CueLoader): Remove client. (WebCore::CueLoader::cueLoadTimerFired): Tell client about new clues and/or that the load has finished. (WebCore::CueLoader::processNewCueData): Process newly loaded data. (WebCore::CueLoader::didReceiveData): Ditto. (WebCore::CueLoader::notifyFinished): Do final processing as necessary, prime the timer to call client. (WebCore::CueLoader::load): Create resource loader, initiate loading. (WebCore::CueLoader::newCuesParsed): Prime timer to tell client about newly parsed cues. (WebCore::CueLoader::getNewCues): Get new cues from parser. * loader/CueLoader.h: (WebCore::CueLoader::create): 2011-10-18 Adam Barth Always enable ENABLE(XPATH) https://bugs.webkit.org/show_bug.cgi?id=70217 Reviewed by Eric Seidel. As discussed on webkit-dev, we're reducing the complexity of WebKit by removing unneeded configuration options. ENABLE(XPATH) is enabled on every port, so we are removing the ability to disable the feature. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.pro: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSCustomXPathNSResolver.h: * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * bindings/js/JSXPathResultCustom.cpp: * bindings/objc/DOMCustomXPathNSResolver.h: * bindings/objc/DOMCustomXPathNSResolver.mm: * bindings/objc/DOMInternal.h: * bindings/objc/DOMUtility.mm: (JSC::createDOMWrapper): * bindings/objc/DOMXPath.mm: (kit): * bindings/objc/PublicDOMInterfaces.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::getXPathNSResolver): * bindings/v8/V8DOMWrapper.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomXPathNSResolver.cpp: * bindings/v8/custom/V8CustomXPathNSResolver.h: * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::evaluateCallback): * dom/Document.cpp: * dom/Document.h: * dom/Document.idl: * dom/ExceptionCode.cpp: (WebCore::getExceptionCodeDescription): * dom/ExceptionCode.h: * features.pri: * inspector/InspectorDOMAgent.cpp: * page/DOMWindow.idl: * xml/NativeXPathNSResolver.cpp: * xml/NativeXPathNSResolver.h: * xml/XPathEvaluator.cpp: * xml/XPathEvaluator.h: * xml/XPathEvaluator.idl: * xml/XPathException.h: * xml/XPathException.idl: * xml/XPathExpression.cpp: * xml/XPathExpression.h: * xml/XPathExpression.idl: * xml/XPathExpressionNode.cpp: * xml/XPathExpressionNode.h: * xml/XPathFunctions.cpp: * xml/XPathFunctions.h: * xml/XPathGrammar.y: * xml/XPathNSResolver.cpp: * xml/XPathNSResolver.h: * xml/XPathNSResolver.idl: * xml/XPathNodeSet.cpp: * xml/XPathNodeSet.h: * xml/XPathParser.cpp: * xml/XPathParser.h: * xml/XPathPath.cpp: * xml/XPathPath.h: * xml/XPathPredicate.cpp: * xml/XPathPredicate.h: * xml/XPathResult.cpp: * xml/XPathResult.h: * xml/XPathResult.idl: * xml/XPathStep.cpp: * xml/XPathStep.h: * xml/XPathUtil.cpp: * xml/XPathUtil.h: * xml/XPathValue.cpp: * xml/XPathValue.h: * xml/XPathVariableReference.cpp: * xml/XPathVariableReference.h: 2011-10-18 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Staged commit, part 6. Reviewed by Darin Adler. Test: platform/mac/accessibility/html5-input-number.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::addImageMapChildren): (WebCore::AccessibilityRenderObject::addTextFieldChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: 2011-10-18 Nate Chapin Make DocumentThreadableLoader a CachedResourceClient. This will allow us to cache ThreadableLoaderClients as appropriate in a later patch. https://bugs.webkit.org/show_bug.cgi?id=61225 Reviewed by Antti Koivisto. No new tests, no functionality change intended. * WebCore.gypi: * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::notifyFinished): CachedResourceClients don't send separate callbacks for didFail() and didFinishLoading(), so we need to differentiate here. (WebCore::DocumentThreadableLoader::loadRequest): Call CachedResourceLoader::requestRawResource() instead of ResourceLoadScheduler::scheduleSubresourceLoad(). * loader/DocumentThreadableLoader.h: * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::data): Handle the complexity of some ThreadableLoaderClients setting DoNotBufferData in ResoureLoaderOptions. If the DataBufferingPolicy is BufferData, then the 'data' input parameter will contain all data received so far, and we need to determine the incremental data to forward to the clients. If the policy is DoNotBufferData, 'data' is just the incremental data. * loader/cache/CachedRawResource.h: * loader/cache/CachedResource.cpp: * loader/cache/CachedResource.h: (WebCore::CachedResource::preloadResult): (WebCore::CachedResource::didSendData): (WebCore::CachedResource::didDownloadData): (WebCore::CachedResource::setLoadFinishTime): (WebCore::CachedResource::loadFinishTime): * loader/cache/CachedResourceClient.h: Add several new callbacks needed by DocumentThreadableLoader. * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::didReceiveResponse): CachedResource::setResponse() can now cancel the request, so protect appropriately. * loader/cache/CachedResourceRequest.h: * loader/chromium/CachedRawResourceChromium.cpp: Added (plumb didDownloadData() to DocumentThreadableLoader). * loader/chromium/CachedResourceRequestChromium.cpp: Added (plumb didDownloadData() to DocumentThreadableLoader). * loader/chromium/DocumentThreadableLoaderChromium.cpp: * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponse): Protect before setting response, since it might kill us. 2011-10-18 Sheriff Bot Unreviewed, rolling out r97752. http://trac.webkit.org/changeset/97752 https://bugs.webkit.org/show_bug.cgi?id=70332 Caused assertion failures in MediaList::setParentStyleSheet() on the apple bots. (Requested by kling on #webkit). * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBinding.h: * css/CSSImportRule.cpp: (WebCore::CSSImportRule::CSSImportRule): (WebCore::CSSImportRule::~CSSImportRule): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::CSSMediaRule): (WebCore::CSSMediaRule::~CSSMediaRule): * css/CSSMediaRule.h: * css/MediaList.cpp: (WebCore::MediaList::MediaList): (WebCore::MediaList::notifyChanged): * css/MediaList.h: * css/StyleSheet.cpp: (WebCore::StyleSheet::~StyleSheet): (WebCore::StyleSheet::setMedia): 2011-10-18 Anna Cavender Change TextTrack to use the word DISABLED instead of OFF for mode https://bugs.webkit.org/show_bug.cgi?id=70268 Reviewed by Daniel Bates. No new tests. No new functionality. * html/TextTrack.cpp: (WebCore::TextTrack::setMode): use Disabled instead of Off * html/TextTrack.h: update Mode enum to use Disabled instead of Off 2011-10-18 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Staged commit, part 5. Reviewed by Darin Adler. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): 2011-10-18 Antti Koivisto Move default stylesheet loading to a separate function https://bugs.webkit.org/show_bug.cgi?id=70331 Reviewed by Andreas Kling. - Move default stylesheet loading out from CSSStyleSelector::styleForElement() - Rename e -> element - Remove pointless reffing of the placeholder style. * css/CSSStyleSelector.cpp: (WebCore::ensureDefaultStyleSheetsForElement): (WebCore::isAtShadowBoundary): (WebCore::CSSStyleSelector::styleForElement): 2011-10-18 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Staged commit part 4. Reviewed by Darin Adler. * accessibility/AccessibilityMockObject.h: (WebCore::AccessibilityMockObject::isMockObject): (WebCore::AccessibilityMockObject::detachFromParent): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::elementAccessibilityHitTest): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityActionNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapper subrole]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-10-18 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Staged commit part 3. Committing the new spin button classes. Reviewed by Darin Adler. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * accessibility/AccessibilitySpinButton.cpp: Added. (WebCore::AccessibilitySpinButton::create): (WebCore::AccessibilitySpinButton::AccessibilitySpinButton): (WebCore::AccessibilitySpinButton::~AccessibilitySpinButton): (WebCore::AccessibilitySpinButton::incrementButton): (WebCore::AccessibilitySpinButton::decrementButton): (WebCore::AccessibilitySpinButton::elementRect): (WebCore::AccessibilitySpinButton::addChildren): (WebCore::AccessibilitySpinButton::step): (WebCore::AccessibilitySpinButtonPart::AccessibilitySpinButtonPart): (WebCore::AccessibilitySpinButtonPart::create): (WebCore::AccessibilitySpinButtonPart::elementRect): (WebCore::AccessibilitySpinButtonPart::press): * accessibility/AccessibilitySpinButton.h: Added. (WebCore::AccessibilitySpinButton::setSpinButtonElement): (WebCore::AccessibilitySpinButton::roleValue): (WebCore::AccessibilitySpinButton::accessibilityIsIgnored): (WebCore::AccessibilitySpinButton::isSpinButton): (WebCore::AccessibilitySpinButtonPart::~AccessibilitySpinButtonPart): (WebCore::AccessibilitySpinButtonPart::isIncrementor): (WebCore::AccessibilitySpinButtonPart::setIsIncrementor): (WebCore::AccessibilitySpinButtonPart::roleValue): (WebCore::AccessibilitySpinButtonPart::isSpinButtonPart): (WebCore::AccessibilitySpinButtonPart::accessibilityIsIgnored): (WebCore::toAccessibilitySpinButton): (WebCore::toAccessibilitySpinButtonPart): 2011-10-18 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Phase 2 of the staged commit. Reviewed by Darin Adler. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::boundingBoxForQuads): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isSpinButton): (WebCore::AccessibilityObject::isSpinButtonPart): (WebCore::AccessibilityObject::isMockObject): 2011-10-18 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Expose the spin button object to the AX hierarchy. Since there is no distinct render object that backs this object, a mock object needs to be created for the entire spin button and the actual increment and decrement buttons inside. This will be a staged commit since the first time around Windows layout tests started crashing for an undeterminable reason. Reviewed by Darin Adler. * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::step): (WebCore::SpinButtonElement::repeatingTimerFired): * html/shadow/TextControlInnerElements.h: 2011-10-18 Andreas Kling MediaList: Remove inheritance from StyleBase. https://bugs.webkit.org/show_bug.cgi?id=70203 Reviewed by Darin Adler. * css/MediaList.h: (WebCore::MediaList::parentStyleSheet): (WebCore::MediaList::setParentStyleSheet): * css/MediaList.cpp: (WebCore::MediaList::MediaList): (WebCore::MediaList::notifyChanged): Change MediaList to no longer inherit from StyleBase. The parent()/setParent() mechanism was replaced by explicit parentStyleSheet()/setParentStyleSheet(). * css/CSSImportRule.cpp: (WebCore::CSSImportRule::CSSImportRule): (WebCore::CSSImportRule::~CSSImportRule): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::CSSMediaRule): (WebCore::CSSMediaRule::~CSSMediaRule): Change StyleBase::setParent() calls to MediaList::setParentStyleSheet(). CSSRules are never moved between stylesheets, so the parent style sheet pointer is valid for the MediaList's lifetime. * css/StyleSheet.cpp: (WebCore::StyleSheet::~StyleSheet): Change StyleBase::setParent() calls to MediaList::setParentStyleSheet(). (WebCore::StyleSheet::setMedia): Change StyleBase::setParent() calls to MediaList::setParentStyleSheet(). Assert that the parent sheet is either null, or this, as MediaLists should never be reparented to other sheets. Assert that the StyleSheet is indeed a CSSStyleSheet. XSLStyleSheet inherits from StyleSheet, but it shouldn't be using the MediaList. * bindings/js/JSDOMBinding.h: (WebCore::root): Add MediaList* specific overload for root() since it can't fall back to root(StyleBase*) anymore. * WebCore.xcodeproj/project.pbxproj: Add some PrivateHeaders to accomodate the JSDOMBinding.h changes. * css/CSSMediaRule.h: Remove unnecessary forward-declaration of MediaList. 2011-10-18 Andreas Kling XSLStyleSheet only needs to manage XSLImportRule children. https://bugs.webkit.org/show_bug.cgi?id=70326 Reviewed by Antti Koivisto. * css/StyleBase.h: * xml/XSLImportRule.h: * css/CSSRule.h: (WebCore::CSSRule::isImportRule): Move StyleBase::isImportRule() down to CSSRule. Since XSLImportRule no longer implements it, it's now specific to CSSImportRule. * xml/XSLStyleSheet.h: Change m_children to be a vector of XSLImportRules. Also remove length(), item() and append() since they were only used internally to modify m_children. * xml/XSLStyleSheetQt.cpp: (WebCore::XSLStyleSheet::~XSLStyleSheet): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::~XSLStyleSheet): (WebCore::XSLStyleSheet::isLoading): (WebCore::XSLStyleSheet::clearDocuments): (WebCore::XSLStyleSheet::loadChildSheet): (WebCore::XSLStyleSheet::locateStylesheetSubResource): Remove now-unnecessary isImportRule() checks and tidy up the code a bit. 2011-10-18 Zan Dobersek [Gtk] Support for client-based geolocation https://bugs.webkit.org/show_bug.cgi?id=64970 Reviewed by Martin Robinson. Add feature defines for client-based geolocation when geolocation is enabled, since this is the providing method that is now used by default. Remove service-based providing method completely as it is not needed anymore. * GNUmakefile.am: Add feature defines for client-based geolocation. * GNUmakefile.list.am: Remove GeolocationServiceGtk.* files from compilation. * platform/gtk/GeolocationServiceGtk.cpp: Removed. * platform/gtk/GeolocationServiceGtk.h: Removed. 2011-10-18 Antti Koivisto REGRESSION(r97248): :visited as descendant selector broken https://bugs.webkit.org/show_bug.cgi?id=70122 Reviewed by Nikolas Zimmerman. Make ":visited foo" and similar selectors work correctly again. They can affect the visited style of an element inside a visited link. Test: fast/selectors/visited-descendant.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyDeclarations): Apply visited style to children of visited links too. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): Don't disable visited matching until we run into first ancestor link or use combinator other than child/descendant. (WebCore::SelectorChecker::determineLinkMatchType): Look into child/descendant component selectors too to determine the link match type. 2011-10-18 Andreas Kling Move CSSRule specific virtuals from StyleBase down into CSSRule. https://bugs.webkit.org/show_bug.cgi?id=70240 Reviewed by Darin Adler. Move all the isFooRule() virtuals except isImportRule() to CSSRule since they only make sense for its subclasses. isRule() remains in StyleBase since we still need it for the parent chain traversal. isImportRule() remains because XSLImportRule implements it. Also moved insertedIntoParent() and removed its usage in XSLStyleSheet since it is only reimplemented by CSSImportRule. * css/CSSRule.h: (WebCore::CSSRule::isCharsetRule): (WebCore::CSSRule::isFontFaceRule): (WebCore::CSSRule::isKeyframeRule): (WebCore::CSSRule::isKeyframesRule): (WebCore::CSSRule::isMediaRule): (WebCore::CSSRule::isPageRule): (WebCore::CSSRule::isStyleRule): (WebCore::CSSRule::isRegionStyleRule): (WebCore::CSSRule::insertedIntoParent): * css/StyleBase.h: (WebCore::StyleBase::isImportRule): (WebCore::StyleBase::isCSSStyleSheet): * xml/XSLStyleSheet.h: (WebCore::XSLStyleSheet::append): 2011-10-18 Sachin Puranik Option.value should trim extra internal html spaces https://bugs.webkit.org/show_bug.cgi?id=69455 Reviewed by Kent Tamura. Currently option.value does not trim the internal white space as suggested by spec. This patch implements the same. Test: fast/forms/option-value-trim-html-spaces.html * dom/OptionElement.cpp: Removed a function as this implementation is moved to the HTMLOptionElement.cpp file. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::value): Implementation of .value function which will now trim the html white spaces. 2011-10-18 Mihnea Ovidenie [CSS Regions]Parse @-webkit-region rule https://bugs.webkit.org/show_bug.cgi?id=70021 Reviewed by David Hyatt. Test: fast/regions/parsing-region-style-rule.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOMCSS.mm: (kitClass): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * css/CSSGrammar.y: * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::cssText): * css/CSSParser.cpp: (WebCore::CSSParser::setReusableRegionSelectorVector): (WebCore::CSSParser::createRegionStylingRule): * css/CSSParser.h: (WebCore::CSSParser::reusableRegionSelectorVector): * css/CSSRegionStyleRule.cpp: Added. (WebCore::CSSRegionStyleRule::CSSRegionStyleRule): (WebCore::CSSRegionStyleRule::~CSSRegionStyleRule): (WebCore::CSSRegionStyleRule::cssText): * css/CSSRegionStyleRule.h: Added. * css/CSSRule.h: * css/CSSRule.idl: * css/CSSRuleList.cpp: (WebCore::CSSRuleList::item): (WebCore::CSSRuleList::rulesText): * css/CSSRuleList.h: * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::selectorsText): * css/CSSSelectorList.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::addRegionStyleRule): (WebCore::RuleSet::addRulesFromSheet): * css/CSSStyleSelector.h: * css/StyleBase.h: (WebCore::StyleBase::isRegionStyleRule): * css/tokenizer.flex: 2011-10-11 Pavel Podivilov Web Inspector: support displaying multiple sources per single script in ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=69847 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): 2011-10-18 Nikolas Zimmermann Prepare SVGImage intrinsic size negotiation: Add intrinsic size & ratio calculation functionality to Image https://bugs.webkit.org/show_bug.cgi?id=70314 Reviewed by Antti Koivisto. Add a "void computeIntrinsicDimension(Length& intrinsicWidth, Lengt& intrinsicHeight, FloatSize& intrinsicRatio)" helper method to Image/GeneratedImage/SVGImage and make it accessible through StyleImage. For a regular Image the intrinsicWidth/Height contains just a Length(size().width(), Fixed). In contrary SVGImages pass on the style()->width()/height() values from the render style of the RenderSVGRoot renderer. These information are needed to implement the size negotiation between embedded SVG images and the embedder. No new tests, as this new functionality is not yet used. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::computeIntrinsicDimensions): * loader/cache/CachedImage.h: * platform/graphics/GeneratedImage.cpp: (WebCore::GeneratedImage::computeIntrinsicDimensions): * platform/graphics/GeneratedImage.h: * platform/graphics/Image.cpp: (WebCore::Image::computeIntrinsicDimensions): * platform/graphics/Image.h: * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::computeIntrinsicDimensions): * platform/graphics/cg/PDFDocumentImage.h: * rendering/style/StyleCachedImage.cpp: (WebCore::StyleCachedImage::computeIntrinsicDimensions): * rendering/style/StyleCachedImage.h: * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::computeIntrinsicDimensions): * rendering/style/StyleGeneratedImage.h: * rendering/style/StyleImage.h: * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::computeIntrinsicDimensions): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::computeIntrinsicDimensions): * svg/graphics/SVGImage.h: 2011-10-17 Alexander Pavlov Web Inspector: [Chromium] Different dimensions are reported for elements onscreen and in the Metrics pane https://bugs.webkit.org/show_bug.cgi?id=70242 Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-10-18 Kentaro Hara Unreviewed, rolling out r97697. http://trac.webkit.org/changeset/97697 https://bugs.webkit.org/show_bug.cgi?id=68978 some tests are broken * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): (WebCore::V8MessageEvent::portsAccessorGetter): (WebCore::V8MessageEvent::initMessageEventCallback): * dom/MessageEvent.cpp: (WebCore::MessageEventInit::MessageEventInit): (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::isMessageEvent): * dom/MessageEvent.h: (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataAsSerializedScriptValue): (WebCore::MessageEvent::dataAsString): (WebCore::MessageEvent::dataAsBlob): (WebCore::MessageEvent::dataAsArrayBuffer): * dom/MessageEvent.idl: 2011-10-17 Antti Koivisto r97638 caused 3 printing crashes https://bugs.webkit.org/show_bug.cgi?id=70284 Reviewed by Kent Tamura. Null check element. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyDeclarations): 2011-10-17 Sheriff Bot Unreviewed, rolling out r97669. http://trac.webkit.org/changeset/97669 https://bugs.webkit.org/show_bug.cgi?id=70305 Broke accessibility tests on Windows (Requested by rniwa on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): * accessibility/AccessibilityMockObject.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::elementAccessibilityHitTest): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): (WebCore::AccessibilityRenderObject::clearChildren): (WebCore::AccessibilityRenderObject::updateChildrenIfNecessary): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilitySpinButton.cpp: Removed. * accessibility/AccessibilitySpinButton.h: Removed. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityActionNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapper subrole]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::repeatingTimerFired): * html/shadow/TextControlInnerElements.h: 2011-10-17 Kent Tamura Remove OptionGroupElement https://bugs.webkit.org/show_bug.cgi?id=70220 Reviewed by Darin Adler. No new tests, just a refactoring. * CMakeLists.txt: Remove OptionGroupElement.cpp and/or OptionGroupElement.h. * GNUMakefile.am.list: ditto. * WebCore.gypi: ditto. * WebCore.pro: ditto. * WebCore.vcproj/WebCore.vcproj: ditto. * WebCore.xcodeproj/project.pbxproj: ditto. * dom/DOMAllInOne.cpp: ditto. * dom/OptionElement.cpp: (WebCore::OptionElement::collectOptionTextRespectingGroupLabel): Use hasTagName(optgroupTag) and static_cast<> instead of toOptionGroupElement(). * dom/OptionGroupElement.cpp: Removed. * dom/OptionGroupElement.h: Removed. * html/HTMLOptGroupElement.cpp: (WebCore::isHTMLOptGroupElement): Added. * html/HTMLOptGroupElement.h: - Don't inherit OptionGroupElement. - Make groupLabelText() non-virtual. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): Use Use hasTagName(optgroupTag) instead of isOptionGroupElement(). * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): Use hasTagName(optgroupTag) and static_cast<> instead of toOptionGroupElement(). (WebCore::RenderListBox::paintItemForeground): Use hasTagName(optgroupTag) instead of isOptionGroupElement(). * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemText): Use hasTagName(optgroupTag) and static_cast<> instead of toOptionGroupElement(). (WebCore::RenderMenuList::itemIsEnabled): Use Use hasTagName(optgroupTag) instead of isOptionGroupElement(). (WebCore::RenderMenuList::itemIsLabel): ditto. 2011-10-17 Huang Dongsung [TexMap][QT] TexMapGL renders a strange one-pixel border of BitmapTexture. https://bugs.webkit.org/show_bug.cgi?id=70293 TextureMapperGL renders the strange border in http://www.webkit.org/blog-files/leaves/index.html Bug occurs because BitmapTexture is larger than the content due to rounding to NPOT, and its pixel data is never initialized. Reviewed by Noam Rosenthal. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::texImage2DResourceSafe): (WebCore::BitmapTextureGL::reset): 2011-10-17 Jochen Eisinger Make NavigationAction wrap a ResourceRequest instead of a KURL. https://bugs.webkit.org/show_bug.cgi?id=68803 With this, FrameLoaderClient::dispatchCreatePage knows about the request that will be used for the initial navigaion of the to be created page. Reviewed by Nate Chapin. Test: platform/chromium/fast/loader/create-view-target-blank.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::reload): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): (WebCore::FrameLoader::loadDifferentDocumentItem): (WebCore::createWindow): * loader/NavigationAction.cpp: (WebCore::NavigationAction::NavigationAction): * loader/NavigationAction.h: (WebCore::NavigationAction::isEmpty): (WebCore::NavigationAction::url): (WebCore::NavigationAction::resourceRequest): * loader/PolicyChecker.cpp: (WebCore::PolicyChecker::checkNavigationPolicy): * page/ContextMenuController.cpp: (WebCore::openNewWindow): * WebCore.exp: updated 2011-10-17 Tom Sepez XSSAuditor bypass with remote script ending in ? character https://bugs.webkit.org/show_bug.cgi?id=70255 Reviewed by Daniel Bates. Fix XSSAuditor bypass where unterminated src="" attribute could pick up text from page causing failed XSS detection. Constrain match to domain portions of src attribute only. Test: http/tests/security/xssAuditor/script-tag-with-source-unterminated.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterScriptToken): (WebCore::XSSAuditor::filterObjectToken): (WebCore::XSSAuditor::filterParamToken): (WebCore::XSSAuditor::filterEmbedToken): (WebCore::XSSAuditor::filterAppletToken): (WebCore::XSSAuditor::filterIframeToken): (WebCore::XSSAuditor::eraseAttributeIfInjected): (WebCore::XSSAuditor::decodedSnippetForAttribute): * html/parser/XSSAuditor.h: 2011-10-17 Adam Klein Parse MutationObserverOptions directly into a bitfield https://bugs.webkit.org/show_bug.cgi?id=70287 Reviewed by Ryosuke Niwa. Replaces the MutationObserverOptions class with a typedef, used to pass a bitfield composed of enums defined in WebKitMutationObserver.h. No new tests because no behavior should change. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDictionary.h: Removed now-unused method. * bindings/js/JSWebKitMutationObserverCustom.cpp: (WebCore::JSWebKitMutationObserver::observe): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::observeCallback): * dom/MutationObserverOptions.h: Removed. * dom/Node.cpp: (WebCore::Node::registerMutationObserver): * dom/Node.h: * dom/NodeRareData.h: (WebCore::MutationObserverEntry::MutationObserverEntry): (WebCore::MutationObserverEntry::matches): * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::observe): * dom/WebKitMutationObserver.h: 2011-10-17 Luke Macpherson Add compile-time asserts for RenderStyle::(Non)InheritedFlags size. https://bugs.webkit.org/show_bug.cgi?id=69803 Reviewed by Darin Adler. No new tests. Adds COMPILE_ASSERTs for the size of RenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags to ensure that they are not accidentally grown in future changes. Change types of unsigned bitfields to unsigned char to ensure that the above assertions remain true when building on windows. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle): Adds assertions to ensure struct sizes do not change. * rendering/style/RenderStyle.h: Changes unsigned to unsigned char as outlined above. 2011-10-17 Ojan Vafai Unreviewed, rolling out r97662. http://trac.webkit.org/changeset/97662 https://bugs.webkit.org/show_bug.cgi?id=68497 Was not the cause of the test failures. * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): 2011-10-17 Ryosuke Niwa Rename deregister* to unregister* https://bugs.webkit.org/show_bug.cgi?id=70272 Reviewed by Darin Adler. Renamed deregisterHandler to unregisterHandler. * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.ExtensionServerClient.prototype.unregisterHandler): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onSetOpenResourceHandler): * inspector/front-end/HandlerRegistry.js: (get WebInspector.HandlerRegistry.prototype.unregisterHandler): 2011-10-17 Huang Dongsung [TexMap][QT] The BGRA32PremultimpliedBuffer should not inherit the RefCounted class. https://bugs.webkit.org/show_bug.cgi?id=70098 The BitmapTexture has a BGRA32PremultimpliedBuffer object using OwnPtr, not RefPtr. It causes following assertion fail, RefCountedBase::m_deletionHasBegun. It is better that the BGRA32PremultimpliedBuffer does not inherit the RefCounted because the BitmapTexture only has and uses a BGRA32PremultimpliedBuffer object. Reviewed by Noam Rosenthal. * platform/graphics/opengl/TextureMapperGL.h: 2011-10-17 Vsevolod Vlasov Web Inspector: Search in resource crashes when there is no resource with given url. https://bugs.webkit.org/show_bug.cgi?id=69767 Reviewed by Pavel Feldman. Test: http/tests/inspector/search/search-in-non-existing-resource.html * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::searchInResource): 2011-10-17 Mihnea Ovidenie [CSS Regions]Change content:-webkit-from-flow to -webkit-flow-from https://bugs.webkit.org/show_bug.cgi?id=70104 Reviewed by David Hyatt. 1. -webkit-flow-from is now a property instead of being an addition to content property. 2. -webkit-flow-from takes an identifier instead of string. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseRegionThread): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getStringValue): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-10-17 Kentaro Hara MessageEvent.data can be stored as ScriptValue. https://bugs.webkit.org/show_bug.cgi?id=68978 Reviewed by Hajime Morita. Currently, the following test cases fail or crash: - shouldBe("new MessageEvent('eventType', { data: test_object }).data", "test_object") -> FAIL - new MessageEvent('eventType', { data: document }).data -> CRASH This is because MessageEvent.data is implemented just as SerializedScriptValue and it cannot keep ScriptValue passed by JavaScript. This patch makes the following changes: - If MessageEvent is constructed with ScriptValue, it is stored as ScriptValue internally. When MessageEvent.data is called, the ScriptValue is returned. - If MessageEvent is constructed with SerializedScriptValue, it is stored as SerializedScriptValue internally (since we cannot deserialize it into ScriptValue at this point because of lack of ExecState). When MessageEvent.data is called, the SerializedScriptValue is deserialized into the corresponding ScriptValue, and the ScriptValue is returned. This patch does not make a fix for ObjC bindings code, since we need to first fix the bug 28774, as commented in dom/MessageEvent.h and dom/MessageEvent.cpp. Test: fast/events/constructors/message-event-constructor.html * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Custom getter for MessageEvent.data. Supported ScriptValue. (WebCore::JSMessageEvent::initMessageEvent): Changed SerializedScriptValue to ScriptValue. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): Custom getter for MessageEvent.data. Supported ScriptValue. (WebCore::V8MessageEvent::portsAccessorGetter): Removed extra spaces. (WebCore::V8MessageEvent::initMessageEventCallback): Changed SerializedScriptValue to ScriptValue. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): Supported ScriptValue. (WebCore::MessageEvent::initMessageEvent): Supported ScriptValue. (WebCore::MessageEvent::isMessageEvent): Removed extra spaces. * dom/MessageEvent.h: Added DataType::DataTypeScriptValue. (WebCore::MessageEvent::create): Supported ScriptValue. (WebCore::MessageEvent::dataAsScriptValue): Getter for data. Insert ASSERT() to guarantee that this accessor is not called for unintended type of data. (WebCore::MessageEvent::dataAsSerializedScriptValue): Ditto. (WebCore::MessageEvent::dataAsString): Ditto. (WebCore::MessageEvent::dataAsBlob): Ditto. (WebCore::MessageEvent::dataAsArrayBuffer): Ditto. * dom/MessageEvent.idl: Changed SerializedScriptValue to DOMObject (i.e. ScriptValue). This patch does not touch an ObjC part. 2011-10-17 Shinya Kawanaka Unified spell-checking and legacy spell checking should be easy to switch https://bugs.webkit.org/show_bug.cgi?id=69242 Reviewed by Hajime Morita. WebCore has two different code paths for spell-checking: 1) checkTextOfParagraph() for Snow Leopard or later 2) checkSpellingOfString() for checkGrammarOfString() for other platforms. This patch introduces a flag to change code paths dynamically. This patch also includes build fix for QT, GTK, and Windows platforms. No new tests because this patch does not change a behavior. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::hasMisspelling): Changed static if-USE(UNIFIED_TEXT_CHECKING) statement to dynamic condition branch to achieve easy code path change. * accessibility/mac/WebAccessibilityObjectWrapper.mm: ditto. (AXAttributeStringSetSpelling): * editing/EditingAllInOne.cpp: * editing/Editor.cpp: (WebCore::Editor::advanceToNextMisspelling): ditto. (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection): ditto. (WebCore::Editor::markMisspellingsAfterTypingToWord): ditto. (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): ditto. (WebCore::Editor::changeBackToReplacedString): ditto. (WebCore::Editor::markMisspellingsAndBadGrammar): ditto. (WebCore::Editor::unifiedTextCheckerEnabled): Utility method to check using unified text checking or not. * editing/Editor.h: * editing/TextCheckingHelper.cpp: (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Same as WebCore::AccessibilityObject::hasMisspelling. (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange): ditto. (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled): Utility method to check using unified text checking or not. (WebCore::unifiedTextCheckerEnabled): ditto. * editing/TextCheckingHelper.h: * page/Settings.cpp: (WebCore::Settings::Settings): Includes a flag to change the code path. * page/Settings.h: (WebCore::Settings::setUnifiedTextCheckerEnabled): Sets a flag to change the code path. (WebCore::Settings::unifiedTextCheckerEnabled): A flag to change the code path. 2011-10-17 Julien Chaffraix Unreviewed build fix after 97691. * html/HTMLTableCellElement.h: (WebCore::toHTMLTableCellElement): Avoid declaring the same function twice. 2011-10-12 Ojan Vafai Unreviewed, rolling out r97661. http://trac.webkit.org/changeset/97661 Confirmed this patch was not the cause of the test failures. display:inline-block elements don't correctly handle orthogonal writing-modes https://bugs.webkit.org/show_bug.cgi?id=69957 Reading min/maxPreferredLogicalWidth from a child uses the child's writing-mode. Instead, we need to grab the result based on the parent's writing-mode. In the case of orthogonal writing-modes, we need the child's logical height. Tests: fast/writing-mode/borders-expected.html fast/writing-mode/borders.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): 2011-10-17 James Robinson Unreviewed, rolling out r97690. http://trac.webkit.org/changeset/97690 https://bugs.webkit.org/show_bug.cgi?id=70161 Hits assertion in CCLayerTreeHostTests * WebCore.gypi: * platform/graphics/chromium/cc/CCMainThread.h: * platform/graphics/chromium/cc/CCMainThreadTask.h: (WebCore::createMainThreadTask): * platform/graphics/chromium/cc/CCScopedMainThreadProxy.h: Removed. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxySchedulerClient::scheduleBeginFrameAndCommit): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::stop): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-17 Julien Chaffraix Remove colSpan / rowSpan caching from RenderTableCell https://bugs.webkit.org/show_bug.cgi?id=69569 Reviewed by Darin Adler. Memory optimization, no change in behavior expected. This change removes m_colSpan & m_rowSpan from RenderTableCell (inspired by kling's memory shaving effort). This makes us save 8 bytes per RenderTableCell on my machine (x86-64). No slowdown on PageCycler Alexa-US. This change refactored the way we handle updates from the DOM side to simplify the code using the following: colspan / rowspan updates always go through parseMappedAttribute where we already check for the renderer type. Thus removed the generic updateFromElement and replaced it with colSpanOrRowSpanChanged. This removes a virtual dispatch. As there is no way to know if an attribute has changed in the parseMappedAttribute code, we now unconditionally call colSpanOrRowSpanChanged. Looking at Chromium's page data, colSpan and rowSpan are never changed outside the HTML markup thus such a change should have a limited impact. * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::parseMappedAttribute): Updated after updateFromElement removal. * html/HTMLTableCellElement.h: (WebCore::toHTMLTableCellElement): Added the usual conversion functions. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::RenderTableCell): Added a boolean to know if we have the right type of associated DOM node to avoid the cost of checking that every time. (WebCore::RenderTableCell::colSpan): (WebCore::RenderTableCell::rowSpan): Forwarded the calls to our object if we have the right type (normal case). (WebCore::RenderTableCell::colSpanOrRowSpanChanged): Handles the updateFromElement calls but in a more streamlined way. * rendering/RenderTableCell.h: 2011-10-17 James Robinson [chromium] Fix shutdown race when posting main thread task to CCThreadProxy and enable tests https://bugs.webkit.org/show_bug.cgi?id=70161 Reviewed by David Levin. Adds a weak pointer mechanism to cancel main thread tasks posted to CCThreadProxy instances from the compositor thread. Previously there was a race condition where main thread tasks could run even after the CCThreadProxy was destroyed. This race does not exist in the other direction because when tearing down a CCThreadProxy we first post a quit task to the compositor thread and then suspend execution of the main thread until all compositor tasks for the CCThreadProxy have been drained. Covered by the now-enabled CCLayerTreeHostTest* unit tests. * WebCore.gypi: * platform/graphics/chromium/cc/CCScopedMainThreadProxy.h: Added. (WebCore::CCScopedMainThreadProxy::create): (WebCore::CCScopedMainThreadProxy::postTask): (WebCore::CCScopedMainThreadProxy::shutdown): (WebCore::CCScopedMainThreadProxy::CCScopedMainThreadProxy): (WebCore::CCScopedMainThreadProxy::runTaskIfNotShutdown): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-17 Sheriff Bot Unreviewed, rolling out r97641. http://trac.webkit.org/changeset/97641 https://bugs.webkit.org/show_bug.cgi?id=70288 "This change may have broken mouse/hit-test coordinate tests." (Requested by jeffm7 on #webkit). * platform/Widget.cpp: (WebCore::Widget::convertFromContainingWindow): (WebCore::Widget::convertToContainingWindow): 2011-10-17 Andreas Kling CSSParser: Remove unused variable 'propertyComponents' https://bugs.webkit.org/show_bug.cgi?id=70230 Reviewed by Darin Adler. (WebCore::CSSParser::markPropertyEnd): 2011-10-17 Shawn Singh [chromium] Update comments about transform hierarchy in CCLayerTreeHostCommon https://bugs.webkit.org/show_bug.cgi?id=69765 Reviewed by James Robinson. Only comments changed, no tests needed. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): 2011-10-17 Dan Bernstein Remove unnecessary calls to columnRectAt() https://bugs.webkit.org/show_bug.cgi?id=70283 Reviewed by Darin Adler. These call sites only needed one of the column dimensions, which are independent of the column index, and can be retrieved directly from the ColumnInfo. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::hitTestColumns): 2011-10-17 Andreas Kling Protect against incorrect Element::fast*Attribute() usage. https://bugs.webkit.org/show_bug.cgi?id=67612 Reviewed by Darin Adler. Add debug-only checks in Element's fastHasAttribute() and fastGetAttribute() to verify that we aren't looking up the "style" attribute or any of the SVG animatable attributes. No new tests, erroneous behavior is covered by assertions. * WebCore.exp.in: Export Element::fastAttributeLookupAllowed() for debug builds since it's used by the inline fast*Attribute() calls. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): Use getAttribute() for class. * css/SelectorChecker.cpp: (WebCore::linkAttribute): Use getAttribute() for xlink:href. * dom/Element.cpp: (WebCore::Element::getAttribute): Manually inline fastGetAttribute() in ideal case. (WebCore::Element::fastAttributeLookupAllowed): Checks if an attribute can be used with the fast lookup functions. * dom/Element.h: (WebCore::Element::fastHasAttribute): Add assertion. (WebCore::Element::fastGetAttribute): Ditto. * editing/ApplyStyleCommand.cpp: (WebCore::hasNoAttributeOrOnlyStyleAttribute): Use getAttribute() for class. * editing/ReplaceSelectionCommand.cpp: (WebCore::isInlineNodeWithStyle): Ditto. * html/ClassList.cpp: (WebCore::ClassList::ClassList): Ditto. (WebCore::ClassList::addInternal): Ditto. (WebCore::ClassList::removeInternal): Ditto. (WebCore::ClassList::toString): Ditto. * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElements): Use getAttribute() for xlink:href. * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::rotateMode): Use getAttribute() for rotate. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::animationMode): Use getAttribute() for values. * svg/SVGElement.cpp: (WebCore::SVGElement::isAnimatableAttribute): Added, returns true if the given QualifiedName represents an animatable attribute. * svg/SVGElement.h: * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::srcValue): Use getAttribute() for xlink:href. (WebCore::SVGFontFaceUriElement::loadFont): Ditto. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::xlinkHref): Ditto. * svg/SVGGlyphRefElement.cpp: (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Ditto. * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::type): Use getAttribute() for type. 2011-10-17 Chris Fleizach AX: buttons of number type controls are not fully accessible https://bugs.webkit.org/show_bug.cgi?id=70241 Expose the spin button object to the AX hierarchy. Since there is no distinct render object that backs this object, a mock object needs to be created for the entire spin button and the actual increment and decrement buttons inside. Reviewed by Darin Adler. Test: platform/mac/accessibility/html5-input-number.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): * accessibility/AccessibilityMockObject.cpp: (WebCore::AccessibilityMockObject::AccessibilityMockObject): * accessibility/AccessibilityMockObject.h: (WebCore::AccessibilityMockObject::isMockObject): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::boundingBoxForQuads): (WebCore::AccessibilityObject::elementAccessibilityHitTest): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isSpinButton): (WebCore::AccessibilityObject::isSpinButtonPart): (WebCore::AccessibilityObject::isMockObject): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): (WebCore::AccessibilityRenderObject::addImageMapChildren): (WebCore::AccessibilityRenderObject::addTextFieldChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilitySpinButton.cpp: Added. (WebCore::AccessibilitySpinButton::create): (WebCore::AccessibilitySpinButton::AccessibilitySpinButton): (WebCore::AccessibilitySpinButton::~AccessibilitySpinButton): (WebCore::AccessibilitySpinButton::incrementButton): (WebCore::AccessibilitySpinButton::decrementButton): (WebCore::AccessibilitySpinButton::elementRect): (WebCore::AccessibilitySpinButton::addChildren): (WebCore::AccessibilitySpinButton::step): (WebCore::AccessibilitySpinButtonPart::AccessibilitySpinButtonPart): (WebCore::AccessibilitySpinButtonPart::create): (WebCore::AccessibilitySpinButtonPart::elementRect): (WebCore::AccessibilitySpinButtonPart::press): * accessibility/AccessibilitySpinButton.h: Added. (WebCore::AccessibilitySpinButton::setSpinButtonElement): (WebCore::AccessibilitySpinButton::roleValue): (WebCore::AccessibilitySpinButton::accessibilityIsIgnored): (WebCore::AccessibilitySpinButton::isSpinButton): (WebCore::AccessibilitySpinButtonPart::~AccessibilitySpinButtonPart): (WebCore::AccessibilitySpinButtonPart::isIncrementor): (WebCore::AccessibilitySpinButtonPart::setIsIncrementor): (WebCore::AccessibilitySpinButtonPart::roleValue): (WebCore::AccessibilitySpinButtonPart::isSpinButtonPart): (WebCore::AccessibilitySpinButtonPart::accessibilityIsIgnored): (WebCore::toAccessibilitySpinButton): (WebCore::toAccessibilitySpinButtonPart): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityActionNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapper subrole]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::step): (WebCore::SpinButtonElement::repeatingTimerFired): * html/shadow/TextControlInnerElements.h: 2011-10-17 Dmitry Titov Re-landing: window.webkitNotifications uses deallocated NotificationPresenter after live Iframe transfer. https://bugs.webkit.org/show_bug.cgi?id=70147 Reviewed by David Levin. I only found a way to test this manually, since Chromium TestShell uses static instance of NotificationPresenter instead of per-page one so the issue does not reproduce. Adding manual test that works in full build of Chromium. * manual-tests/iframe_notifications/iframe-reparenting-close-window-child.html: Added. * manual-tests/iframe_notifications/iframe-reparenting-close-window-iframe.html: Added. * manual-tests/iframe_notifications/iframe-reparenting-close-window.html: Added. * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::disconnectFrame): * page/DOMWindow.cpp: (WebCore::DOMWindow::resetNotifications): * page/DOMWindow.h: * page/Frame.cpp: (WebCore::Frame::transferChildFrameToNewDocument): reset webkitNotifications object. 2011-10-17 Arno Renevier quote "attributes" keyword in CodeGeneratorGObject.pm https://bugs.webkit.org/show_bug.cgi?id=64348 Reviewed by Darin Adler. No change of functionality. No new tests. * bindings/scripts/CodeGeneratorGObject.pm: 2011-10-17 Ojan Vafai Unreviewed, rolling out r97654. http://trac.webkit.org/changeset/97654 https://bugs.webkit.org/show_bug.cgi?id=68497 Caused a number of Chromium failures. * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): 2011-10-17 Ojan Vafai Unreviewed, rolling out r97653. http://trac.webkit.org/changeset/97653 https://bugs.webkit.org/show_bug.cgi?id=69957 Caused a number of Chromium failures. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): 2011-10-17 Rafael Weinstein [MutationObservers] Implement WebKitMutationObserver.observe for attributes https://bugs.webkit.org/show_bug.cgi?id=68956 Reviewed by Ryosuke Niwa. Test: fast/mutation/observe-attributes.html This adds an initial implementation for registering mutation observers on nodes, delivering mutation records at the end of the outer-most script invokation and observing mutations to element attributes. Note that the outer-most script invokation only works in V8. Note also that support for observing changes to the style attribute when updated via the style property is not implemented here. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::didLeaveScriptContext): * dom/Element.cpp: (WebCore::enqueueAttributesMutationRecord): (WebCore::Element::setAttribute): * dom/MutationRecord.cpp: (WebCore::MutationRecord::createAttributes): * dom/MutationRecord.h: * dom/MutationRecord.idl: * dom/Node.cpp: (WebCore::Node::clearRareData): (WebCore::Node::mutationObserverData): (WebCore::Node::ensureMutationObserverData): (WebCore::Node::registeredMutationObserversOfType): (WebCore::Node::registerMutationObserver): (WebCore::Node::deregisterMutationObserver): * dom/Node.h: * dom/NodeRareData.h: (WebCore::MutationObserverRegistration::MutationObserverRegistration): (WebCore::MutationObserverRegistration::operator==): (WebCore::MutationObserverData::MutationObserverData): (WebCore::MutationObserverData::~MutationObserverData): (WebCore::NodeRareData::mutationObserverData): (WebCore::NodeRareData::ensureMutationObserverData): * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::observe): (WebCore::WebKitMutationObserver::disconnect): (WebCore::WebKitMutationObserver::wasDeregistered): (WebCore::activeMutationObservers): (WebCore::WebKitMutationObserver::enqueueMutationRecord): (WebCore::WebKitMutationObserver::deliverAllMutations): (WebCore::WebKitMutationObserver::deliver): * dom/WebKitMutationObserver.h: 2011-10-17 Andreas Kling HTMLKeygenElement: Don't cache keytype and challenge attributes. https://bugs.webkit.org/show_bug.cgi?id=68365 Reviewed by Darin Adler. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::parseMappedAttribute): (WebCore::HTMLKeygenElement::appendFormData): * html/HTMLKeygenElement.h: 2011-09-22 Ojan Vafai incorrect height with height:auto and writing-mode:vertical-rl https://bugs.webkit.org/show_bug.cgi?id=68497 Reviewed by David Hyatt. * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): 2011-10-12 Ojan Vafai display:inline-block elements don't correctly handle orthogonal writing-modes https://bugs.webkit.org/show_bug.cgi?id=69957 Reviewed by David Hyatt. Reading min/maxPreferredLogicalWidth from a child uses the child's writing-mode. Instead, we need to grab the result based on the parent's writing-mode. In the case of orthogonal writing-modes, we need the child's logical height. Tests: fast/writing-mode/borders-expected.html fast/writing-mode/borders.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): 2011-10-17 Sheriff Bot Unreviewed, rolling out r97643. http://trac.webkit.org/changeset/97643 https://bugs.webkit.org/show_bug.cgi?id=70270 Broke iframe reparenting tests (Requested by dimich on #webkit). * manual-tests/iframe_notifications/iframe-reparenting-close-window-child.html: Removed. * manual-tests/iframe_notifications/iframe-reparenting-close-window-iframe.html: Removed. * manual-tests/iframe_notifications/iframe-reparenting-close-window.html: Removed. * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::disconnectFrame): * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitNotifications): * page/DOMWindow.h: * page/Frame.cpp: (WebCore::Frame::transferChildFrameToNewDocument): 2011-10-17 Dmitry Titov window.webkitNotifications uses deallocated NotificationPresenter after live Iframe transfer. https://bugs.webkit.org/show_bug.cgi?id=70147 Reviewed by David Levin. I only found a way to test this manually, since Chromium TestShell uses static instance of NotificationPresenter instead of per-page one so the issue does not reproduce. Adding manual test that works in full build of Chromium. * manual-tests/iframe_notifications/iframe-reparenting-close-window-child.html: Added. * manual-tests/iframe_notifications/iframe-reparenting-close-window-iframe.html: Added. * manual-tests/iframe_notifications/iframe-reparenting-close-window.html: Added. * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::disconnectFrame): * page/DOMWindow.cpp: (WebCore::DOMWindow::resetNotifications): * page/DOMWindow.h: * page/Frame.cpp: (WebCore::Frame::transferChildFrameToNewDocument): reset webkitNotifications object. 2011-10-17 Jeff Miller Widget window coordinate functions should use root view coordinate functions https://bugs.webkit.org/show_bug.cgi?id=70152 Reviewed by Darin Adler. No new tests, no changes to functionality. * platform/Widget.cpp: (WebCore::Widget::convertFromContainingWindow): Use convertFromRootView(). (WebCore::Widget::convertToContainingWindow): Use convertToRootView(). 2011-10-14 Chris Marrin Throttle rate of requestAnimationFrame when page is not visible https://bugs.webkit.org/show_bug.cgi?id=67873 Reviewed by Anders Carlsson. Add logic to suspend and resume scripted animations when page is hidden, minimized or the tab is not visible. The hide/minimize notification comes in from WebKit/WebKit2 to a new set of functions. * WebCore.exp.in: * page/Page.cpp: (WebCore::Page::didMoveOnscreen): (WebCore::Page::willMoveOffscreen): (WebCore::Page::suspendScriptedAnimations): (WebCore::Page::resumeScriptedAnimations): * page/Page.h: 2011-10-17 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=69966 Eliminate separate RenderStyle for visited link style Reviewed by Dave Hyatt and Nikolas Zimmermann. There are only a few properties that can apply to visited links and they can be part of the regular style. Many things will get simpler when the separate RenderStyle for visited links is eliminated. - Add valid visited link properties as separate fields to RenderStyle. The visitedLinkColor goes to inherited, everything else goes to rare data structures. - Make RenderStyle::visitedDependentColor() get the visited style from the new fields. - As VISITED_LINK pseudo style doesn't exists anymore, remove all code dealing with it. - Make CSSStyleSelector and ApplyPropertyColor apply the visited link style to the newly added fields instead of a separate RenderStyle. - Same thing with SVGRenderStyle, SVGCSSStyleSelector. - Fixup the SVG visited link style code to use the new fields. This is ~15% progression in styleForElement performance over the HTML5 spec load. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::ApplyPropertyColor): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyColor::applyColorValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::CSSStyleSelector::updateFont): (WebCore::CSSStyleSelector::applyDeclaration): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::applyPropertyToRegularStyle): (WebCore::CSSStyleSelector::applyPropertyToVisitedLinkStyle): * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * dom/Element.cpp: (WebCore::Element::pseudoStyleCacheIsInvalid): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getCachedPseudoStyle): (WebCore::RenderStyle::colorIncludingFallback): (WebCore::RenderStyle::visitedDependentColor): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setVisitedLinkColor): (WebCore::InheritedFlags::setVisitedLinkBackgroundColor): (WebCore::InheritedFlags::setVisitedLinkBorderLeftColor): (WebCore::InheritedFlags::setVisitedLinkBorderRightColor): (WebCore::InheritedFlags::setVisitedLinkBorderBottomColor): (WebCore::InheritedFlags::setVisitedLinkBorderTopColor): (WebCore::InheritedFlags::setVisitedLinkOutlineColor): (WebCore::InheritedFlags::setVisitedLinkColumnRuleColor): (WebCore::InheritedFlags::setVisitedLinkTextEmphasisColor): (WebCore::InheritedFlags::setVisitedLinkTextFillColor): (WebCore::InheritedFlags::setVisitedLinkTextStrokeColor): * rendering/style/RenderStyleConstants.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setVisitedLinkFillPaint): (WebCore::SVGRenderStyle::setVisitedLinkStrokePaint): (WebCore::SVGRenderStyle::visitedLinkFillPaintType): (WebCore::SVGRenderStyle::visitedLinkFillPaintColor): (WebCore::SVGRenderStyle::visitedLinkStrokePaintType): (WebCore::SVGRenderStyle::visitedLinkStrokePaintColor): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleFillData::StyleFillData): (WebCore::StyleFillData::operator==): (WebCore::StyleStrokeData::StyleStrokeData): (WebCore::StyleStrokeData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/style/StyleInheritedData.cpp: (WebCore::StyleInheritedData::StyleInheritedData): (WebCore::StyleInheritedData::operator==): * rendering/style/StyleInheritedData.h: * rendering/style/StyleMultiColData.cpp: (WebCore::StyleMultiColData::StyleMultiColData): (WebCore::StyleMultiColData::operator==): * rendering/style/StyleMultiColData.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: * rendering/svg/RenderSVGResource.cpp: (WebCore::requestPaintingResource): 2011-10-17 Eric Carlson Cues should be loaded by the cached resource loader https://bugs.webkit.org/show_bug.cgi?id=70134 Reviewed by Darin Adler. No new tests, changes covered by existing tests. * CMakeLists.txt: Add CachedCues.cpp/h. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * loader/cache/CachedCues.cpp: Added. (WebCore::CachedCues::CachedCues): (WebCore::CachedCues::~CachedCues): (WebCore::CachedCues::data): Called when new data has been loaded, pass it to all registered clients. * loader/cache/CachedCues.h: Added. * loader/cache/CachedResource.cpp: (WebCore::defaultPriorityForResourceType): Cues have low loader priority. * loader/cache/CachedResource.h: * loader/cache/CachedResourceClient.h: (WebCore::CachedResourceClient::didReceiveData): New client interface. * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): Create and return a new cue loader. (WebCore::CachedResourceLoader::requestCues): (WebCore::CachedResourceLoader::checkInsecureContent): Cues aren't mentioned in the CPS spec yet, but they only work with a media element so use the mdia policy. (WebCore::CachedResourceLoader::canRequest): Allow cues to be loaded from any origin like media. * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::cachedResourceTypeToTargetType): * platform/network/chromium/ResourceRequest.h: 2011-10-17 Dan Bernstein REGRESSION (r97525): iChat transcript has horizontal scroll bar when the conversation includes a wide image https://bugs.webkit.org/show_bug.cgi?id=70204 Reviewed by Darin Adler. Reverted r97525, which was supposed to fix . * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: 2011-10-17 Ada Chan Export KURL::baseAsString() so it can be called in WebProcessProxy::assumeReadAccessToBaseURL() in WebKit2. https://bugs.webkit.org/show_bug.cgi?id=70168 Reviewed by Alexey Proskuryakov. No new tests. There is no change in functionality. * WebCore.exp.in: Export KURL::baseAsString(). 2011-10-17 Ryosuke Niwa Touch Internals.cpp to make 64-bit GTK+ build happy. * testing/Internals.cpp: 2011-10-17 Chris Fleizach AX: children() method should be consolidated in AccessibilityObject https://bugs.webkit.org/show_bug.cgi?id=70243 Code cleanup, no new tests. Reviewed by Darin Adler. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::children): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::updateChildrenIfNecessary): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::updateScrollbars): (WebCore::AccessibilityScrollView::addChildren): * accessibility/AccessibilityScrollView.h: * accessibility/AccessibilitySlider.cpp: * accessibility/AccessibilitySlider.h: * accessibility/AccessibilityTableColumn.cpp: * accessibility/AccessibilityTableColumn.h: * accessibility/AccessibilityTableHeaderContainer.cpp: * accessibility/AccessibilityTableHeaderContainer.h: 2011-10-17 Vsevolod Vlasov Web Inspector: Search matches highlighting in text does not work correctly. https://bugs.webkit.org/show_bug.cgi?id=70244 Reviewed by Pavel Feldman. Test: inspector/utilities-highlight-results.html * inspector/front-end/utilities.js: (): 2011-10-17 Chris Fleizach AX: webkit won't always send live region notifications https://bugs.webkit.org/show_bug.cgi?id=70030 Webkit purposefully does not send live region notifications if some AT client has not accessed the AX tree in between the last live region update (ostensibly to improve performance). However, this is problematic if a screen reader misses one notification... it has no idea what happened and the only recourse is to rescan the page for changes. The correct thing to do is to always send notifications. Reviewed by Darin Adler. Test: platform/mac/accessibility/aria-liveregions-notifications-always-sent.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::childrenChanged): 2011-10-12 Pavel Podivilov Web Inspector: fix handling of source mapping entries with no mapping. https://bugs.webkit.org/show_bug.cgi?id=69941 Reviewed by Pavel Feldman. * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping.prototype._parseMappings): 2011-10-17 Mikhail Naganov Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile. https://bugs.webkit.org/show_bug.cgi?id=61179 This is exteremely helpful when dealing with DOM wrappers, as their properties are mostly implemented with getters and thus not stored in heap snapshots. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): * bindings/js/ScriptProfiler.h: * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): * bindings/v8/ScriptProfiler.h: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::create): (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult): (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent): (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._showObjectPopover): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get canBeQueried): (WebInspector.HeapSnapshotNode.prototype.get flags): (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype._flagsOfNode): (WebInspector.HeapSnapshot.prototype._calculateFlags): (WebInspector.HeapSnapshot.prototype.updateStaticData): (WebInspector.HeapSnapshotNodesProvider.prototype._serialize): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.fromError): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight): 2011-10-17 Alexander Pavlov Web Inspector: Editing CSS selector doesn't fire onResourceContentCommitted https://bugs.webkit.org/show_bug.cgi?id=70018 Reviewed by Yury Semikhatsky. Test: inspector/styles/commit-selector.html * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback): (WebInspector.CSSStyleModel.prototype.setRuleSelector): 2011-10-17 Andreas Kling CSS/XSLStyleSheet: Remove insert() and remove(). https://bugs.webkit.org/show_bug.cgi?id=70226 Reviewed by Antti Koivisto. Remove insert() and remove() from XSLStyleSheet. CSSStyleSheet retains remove() since it's used by InspectorStyleSheet as well as SVGFontFaceElement. * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::remove): Remove range check. This method is internal to WebKit and the call sites already take care of it. (WebCore::CSSStyleSheet::insertRule): (WebCore::CSSStyleSheet::deleteRule): * css/CSSStyleSheet.h: * xml/XSLStyleSheet.h: 2011-10-17 Rosen Dash when CSS pseudo selectors are applied (:before and :after) the *-of-line keyboard navigation does not work https://bugs.webkit.org/show_bug.cgi?id=10123 Reviewed by Ryosuke Niwa. This patch addresses folllowing two issues: 1. When CSS pseudo elements are before or after is used with content attribute containing single character at the start/end of text and we try to move cursor by right navigation key, the page freezes falling into an infinite loop. 2. When these elements try to insert some text between a text line, navigation by right/left arrow key is prohibited. Tests: editing/selection/css-pseudo-element-hang.html editing/selection/css-pseudo-element.html * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): 2011-10-15 Antti Koivisto Test :visited pseudo class https://bugs.webkit.org/show_bug.cgi?id=70219 Reviewed by Andreas Kling. Currently DRT doesn't support :visited. All tests where it should match have wrong checked in results. - Make to match :visited in DRT. It already does on browsers. A number of existing tests for :visited use it already, the rest can be modified to use it. - Make render tree dumps correctly dump the visited state dependent color. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineLinkStateSlowCase): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): 2011-10-17 Satish Sampath Avoid leaking document when leaving google.com due to geolocation permission request. https://bugs.webkit.org/show_bug.cgi?id=58027 Reviewed by Kenneth Rohde Christiansen. * page/Geolocation.cpp: (WebCore::Geolocation::Watchers::find): added (WebCore::Geolocation::reset): cleared all pending notifiers. (WebCore::Geolocation::clearWatch): removed from pending notifier set. * page/Geolocation.h: (WebCore::Geolocation::Watchers::find): added 2011-10-17 Andrei Lavreniyuk Fix clang WebKitGTK+ build. Reviewed by Martin Robinson. * plugins/gtk/PluginViewGtk.cpp: 2011-10-16 Adam Barth Always disable ENABLE(ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL) and delete associated code https://bugs.webkit.org/show_bug.cgi?id=70216 Reviewed by Eric Seidel. No port enables this feature. It was added for the previous Android port (and should have been an editing behavior in any case). * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateFocusAppearance): 2011-10-16 Ryosuke Niwa Expose rangeFromLocationAndLength and locationAndLengthFromRange via internals object https://bugs.webkit.org/show_bug.cgi?id=68330 Reviewed by Hajime Morita. Add rangeFromLocationAndLength, locationFromRange, and lengthFromRange to window.internals. Test: editing/text-iterator/range-to-from-location-and-length.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::scrollElementToRect): (WebCore::Internals::rangeFromLocationAndLength): (WebCore::Internals::locationFromRange): (WebCore::Internals::lengthFromRange): * testing/Internals.h: * testing/Internals.idl: 2011-10-16 Kentaro Hara Generate MessageChannel constructor by [Constructor] IDL https://bugs.webkit.org/show_bug.cgi?id=70214 Reviewed by Adam Barth. This patch generates an MessageChannel constructor for JSC by [Constructor] IDL, but V8 is still using a custom constructor since the V8 constructor requires special logic. Tests: fast/dom/global-constructors.html fast/events/message-port.html fast/events/message-port-no-wrapper.html fast/dom/Window/window-postmessage-args.html * bindings/js/JSMessageChannelCustom.cpp: Removed the MessageChannel constructor. * dom/MessageChannel.idl: Generates the MessageChannel constructor for JSC. 2011-10-16 Ryosuke Niwa [Mac] fontForSelection and styleForSelectionStart should be moved to EditorMac https://bugs.webkit.org/show_bug.cgi?id=70114 Reviewed by Hajime Morita. Moved fontForSelection and styleForSelectionStart from Editor to EditorMac and made styleForSelectionStart static local. * editing/Editor.cpp: * editing/Editor.h: * editing/mac/EditorMac.mm: (WebCore::styleForSelectionStart): (WebCore::Editor::fontForSelection): (WebCore::Editor::fontAttributesForSelectionStart): 2011-10-16 Kentaro Hara Generate EventSource constructor for JSC by [Constructor] IDL https://bugs.webkit.org/show_bug.cgi?id=70212 Reviewed by Adam Barth. Removed JSEventSourceCustom.cpp. Tests: fast/dom/global-constructors.html fast/eventsource/eventsource-constructor.html fast/eventsource/eventsource-attribute-listeners.html * GNUmakefile.list.am: Removed JSEventSourceCustom.cpp. * UseJSC.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Ditto. * bindings/js/JSEventSourceCustom.cpp: Removed this file. * page/EventSource.idl: Removed 'JSCustomConstructor' IDL. 2011-10-16 David Barr Inline CSSPrimitiveValue::isQuirkValue() as non-virtual function https://bugs.webkit.org/show_bug.cgi?id=64865 Reviewed by Darin Adler. Based on profiling and patch from: Tamas Czene This is expected to produce a small performance progression. Additional memory overhead is avoided by using spare bits. CSSQuirkPrimitiveValue is removed as it becomes just a factory. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSParser.cpp: (WebCore::CSSParser::parseValidPrimitive): * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::createAllowingMarginQuirk): Moved from CSSQuirkPrimitiveValue::create. (WebCore::CSSPrimitiveValue::isQuirkValue): * css/CSSQuirkPrimitiveValue.h: Removed. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): 2011-10-16 Kentaro Hara Generate XMLHttpRequest constructor for JSC by [Constructor] IDL https://bugs.webkit.org/show_bug.cgi?id=70208 Reviewed by Adam Barth. This patch generates an XMLHttpRequest constructor for JSC by [Constructor] IDL, but V8 is still using a custom constructor since the V8 constructor requires a special logic. Tests: fast/dom/global-constructors.html fast/dom/XMLHttpRequest-constants.html fast/dom/xmlhttprequest-constructor-in-detached-document.html http/tests/security/cookies/xmlhttprequest.html * bindings/js/JSXMLHttpRequestCustom.cpp: Removed an XMLHttpRequest custom constructor. * bindings/scripts/CodeGeneratorV8.pm: Currently, CodeGeneratorV8.pm generates constructor code whenever [Constructor] is specified, even if [V8CustomConstructor] is specified. This is wrong. This patch fixes the condition where the constructor code is generated. * bindings/scripts/test/V8/V8TestObj.cpp: Updated a run-binding-tests result. * xml/XMLHttpRequest.h: Added a necessary header. * xml/XMLHttpRequest.idl: V8 is still using a custom constructor. 2011-10-16 Kentaro Hara Generate XSLTProcessor constructor for JSC by [Constructor] IDL. https://bugs.webkit.org/show_bug.cgi?id=70206 Reviewed by Adam Barth. Tests: fast/xsl/xslt-processor.html fast/xsl/default-html.html fast/dom/global-constructors.html * bindings/js/JSXSLTProcessorCustom.cpp: Removed a custom constructor. * xml/XSLTProcessor.idl: Removed 'JSCustomConstructor'. 2011-10-16 Kentaro Hara Support [Constructor] IDL for JSC. https://bugs.webkit.org/show_bug.cgi?id=70101 Reviewed by Adam Barth. The spec for [Constructor] IDL is here: http://www.w3.org/TR/WebIDL/#Constructor This patch introduced [Constructor] IDL for JSC. This patch also added [ConstructorRaisesException] for JSC. If [ConstructorRaisesException] is specified, a placeholder for ExceptionCode is passed to XXX::create(), like XXX::create(..., ec). Notes: - We do not yet support constructor overloading. - We do not yet support [Optional] without CallWithDefaultValue for constructor arguments. Tests: Source/WebCore/bindings/scripts/test/TestInterface.idl Source/WebCore/bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): Generates constructor declaration code to a header file, if a given DOM object has constructor. (GenerateImplementation): Uses GenerateArgumentsCountCheck() and GenerateParametersCheck(). (GenerateArgumentsCountCheck): Splits out of GenerateImplementation() for reuse. (GenerateParametersCheck): Splits out of GenerateImplementation() for reuse. (GenerateConstructorDefinition): Generates constructor definition code. * bindings/scripts/test/JS/JSTestInterface.cpp: Updated the run-binding-tests results. (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): * bindings/scripts/test/JS/JSTestInterface.h: Ditto. (WebCore::JSTestInterfaceConstructor::create): (WebCore::JSTestInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto. (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Ditto. (WebCore::JSTestMediaQueryListListenerConstructor::create): (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore::jsTestObjPrototypeFunctionVoidMethod): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethod): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethod): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionMethodWithException): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionConditionalMethod1): (WebCore::jsTestObjPrototypeFunctionConditionalMethod2): (WebCore::jsTestObjPrototypeFunctionConditionalMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionClassMethod): (WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional): * bindings/scripts/test/JS/JSTestObj.h: Ditto. (WebCore::JSTestObjConstructor::create): (WebCore::JSTestObjConstructor::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto. * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Ditto. (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): 2011-10-16 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=70186 Pass MessagePortArray to JSC's SerializedScriptValue::serialize/deserialize. Reviewed by Oliver Hunt. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::handlePostMessage): (WebCore::JSDOMWindow::postMessage): (WebCore::JSDOMWindow::webkitPostMessage): * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::pushState): (WebCore::JSHistory::replaceState): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): (WebCore::handleInitMessageEvent): (WebCore::JSMessageEvent::initMessageEvent): (WebCore::JSMessageEvent::webkitInitMessageEvent): * bindings/js/JSMessagePortCustom.h: (WebCore::handlePostMessage): * bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state): * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::serialize): (WebCore::ScriptValue::deserialize): * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::deserialize): * bindings/js/SerializedScriptValue.h: 2011-10-16 Dan Bernstein REGRESSION (r96620): Float-avoiding block positioned incorrectly in right-to-left block https://bugs.webkit.org/show_bug.cgi?id=70197 Reviewed by Dave Kilzer. Test: fast/block/float/avoidance-rtl.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): Changed logicalLeftOffsetForContent() to startOffsetForContent() to get the right value in the right-to-left case. 2011-10-16 Adam Barth Always enable ENABLE(DOM_STORAGE) https://bugs.webkit.org/show_bug.cgi?id=70189 Reviewed by Eric Seidel. As discussed on webkit-dev, we are reducing the complexity of WebKit by removing unnecessary configuration options. DOMStorage is not a core part of the web platform. It should always be enabled. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.exp.in: * WebCore.pro: * bindings/js/JSEventCustom.cpp: * bindings/js/JSInjectedScriptHostCustom.cpp: * bindings/js/JSStorageCustom.cpp: * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::storageIdCallback): * bindings/v8/custom/V8StorageCustom.cpp: * dom/Document.cpp: (WebCore::Document::createEvent): * dom/Event.cpp: (WebCore::Event::isStorageEvent): * dom/Event.h: * dom/Node.cpp: * features.pri: * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): (WebCore::InjectedScriptHost::disconnect): (WebCore::InjectedScriptHost::storageIdImpl): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::restoreInspectorStateFromCookie): * inspector/InspectorController.h: * inspector/InspectorDOMStorageAgent.cpp: * inspector/InspectorDOMStorageResource.cpp: * inspector/InspectorDOMStorageResource.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): (WebCore::InspectorInstrumentation::didUseDOMStorageImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didUseDOMStorage): * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::InstrumentingAgents): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): * inspector/generate-inspector-idl: * page/Chrome.cpp: * page/DOMWindow.cpp: (WebCore::DOMWindow::~DOMWindow): (WebCore::DOMWindow::clear): (WebCore::DOMWindow::localStorage): * page/DOMWindow.h: * page/DOMWindow.idl: * page/Navigator.cpp: (WebCore::Navigator::getStorageUpdates): * page/Navigator.h: * page/Navigator.idl: * page/Page.cpp: * page/Page.h: * page/PageGroup.cpp: (WebCore::PageGroup::closeLocalStorage): * page/PageGroup.h: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setSessionStorageQuota): * page/Settings.h: (WebCore::Settings::sessionStorageQuota): * storage/LocalStorageTask.cpp: * storage/LocalStorageTask.h: * storage/LocalStorageThread.cpp: * storage/LocalStorageThread.h: * storage/Storage.cpp: * storage/Storage.h: * storage/Storage.idl: * storage/StorageArea.h: * storage/StorageAreaImpl.cpp: * storage/StorageAreaImpl.h: * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::scheduleSync): * storage/StorageAreaSync.h: * storage/StorageEvent.cpp: * storage/StorageEvent.h: * storage/StorageEvent.idl: * storage/StorageEventDispatcher.cpp: * storage/StorageEventDispatcher.h: * storage/StorageMap.cpp: * storage/StorageMap.h: * storage/StorageNamespace.cpp: * storage/StorageNamespace.h: * storage/StorageNamespaceImpl.cpp: * storage/StorageNamespaceImpl.h: * storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase): * storage/StorageSyncManager.h: * storage/StorageTracker.cpp: * storage/StorageTracker.h: 2011-10-15 Adam Barth Rename ENABLE(SKIA_TEXT) to USE(SKIA_TEXT) https://bugs.webkit.org/show_bug.cgi?id=70191 Reviewed by Daniel Bates. SKIA_TEXT is not a WebKit feature. It's a macro that determines whether we use a feature of the underly library (Skia). * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: * platform/graphics/skia/SkiaFontWin.h: 2011-10-15 Eric Carlson Make VIDEO_TRACK compile with warnings as errors enabled https://bugs.webkit.org/show_bug.cgi?id=70188 Reviewed by Filip Pizlo. No new tests, no functionality changed. * html/TextTrackCueList.h: Fix an include. * html/track/CueParser.cpp: (WebCore::CueParser::supportsType): Remove unused param. * html/track/CueParser.h: (WebCore::CueParserClient::~CueParserClient): Add virtual destructor. * html/track/CueParserPrivate.h: (WebCore::CueParserPrivateClient::~CueParserPrivateClient): Ditto. * loader/CueLoader.h: (WebCore::CueLoaderClient::~CueLoaderClient): Ditto. (WebCore::CueLoader::~CueLoader): Ditto. 2011-10-15 Adam Barth Rename ENABLE(TILED_BACKING_STORE) to USE(TILED_BACKING_STORE) https://bugs.webkit.org/show_bug.cgi?id=70194 Reviewed by Daniel Bates. TILED_BACKING_STORE isn't a web platform feature. It's an implementation strategy for WebKit that's used by some ports and not by others. * features.pri: * loader/EmptyClients.h: * page/Chrome.cpp: * page/Chrome.h: * page/ChromeClient.h: * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::setView): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::repaintContentRectangle): (WebCore::FrameView::doDeferredRepaints): * page/Settings.cpp: (WebCore::Settings::setTiledBackingStoreEnabled): * platform/HostWindow.h: * platform/ScrollView.cpp: (WebCore::ScrollView::setScrollPosition): * platform/graphics/Tile.h: * platform/graphics/TiledBackingStore.cpp: * platform/graphics/TiledBackingStore.h: * platform/graphics/TiledBackingStoreBackend.h: * platform/graphics/TiledBackingStoreClient.h: * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): (WebCore::GraphicsLayerQtImpl::~GraphicsLayerQtImpl): (WebCore::GraphicsLayerQtImpl::recache): (WebCore::GraphicsLayerQtImpl::paint): * platform/graphics/qt/TileQt.cpp: * platform/graphics/qt/TileQt.h: * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::computeTiles): (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::paintSelf): (WebCore::TextureMapperNode::syncCompositingStateSelf): * platform/graphics/texmap/TextureMapperNode.h: (WebCore::TextureMapperNode::State::State): 2011-10-15 Adam Barth Remove the last remnant of WBXML https://bugs.webkit.org/show_bug.cgi?id=70187 Reviewed by Daniel Bates. The bulk of the WBXML code was removed in 2009, but we missed one block. * platform/wince/MIMETypeRegistryWinCE.cpp: (WebCore::initMIMETypeEntensionMap): 2011-10-15 Darin Adler REGRESSION(r97533): fast/forms/select-script-onchange.html failed after https://bugs.webkit.org/show_bug.cgi?id=70173 Reviewed by Ryosuke Niwa. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setValue): Removed unneeded boolean argument [true for deselect]. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Added explicit boolean arguments for all calls to setSelectedIndex to restore pre-r97533 behavior. (WebCore::HTMLSelectElement::typeAheadFind): Ditto. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Ditto. * html/HTMLSelectElement.h: Removed default of true for userDrivenChange. Each caller should pass it explicitly. Longer term we should use an enum instead of a boolean or find some other way of avoiding the argument. (WebCore::HTMLSelectElement::setSelectedIndex): Pass false for userDrivenChange as the old code did pre-r97533. 2011-10-15 Laszlo Gombos [Qt] [Symbian] Remove support for the Symbian platform for the QtWebKit port https://bugs.webkit.org/show_bug.cgi?id=69920 Reviewed by Kenneth Rohde Christiansen. No new tests as there is no new functionality. * WebCore.gypi: * WebCore.pri: * WebCore.pro: * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * config.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator int): * features.pri: * page/NavigatorBase.cpp: * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/network/qt/ResourceRequestQt.cpp: (WebCore::initializeMaximumHTTPConnectionCountPerHost): * platform/text/qt/TextCodecQt.cpp: (WebCore::TextCodecQt::decode): * plugins/PluginDatabase.cpp: * plugins/PluginPackage.cpp: (WebCore::PluginPackage::unload): * plugins/PluginPackage.h: (WebCore::PluginPackage::version): * plugins/PluginView.cpp: (WebCore::PluginView::setFrameRect): * plugins/PluginView.h: * plugins/npapi.h: * plugins/symbian: Removed. * plugins/symbian/PluginContainerSymbian.cpp: Removed. * plugins/symbian/PluginContainerSymbian.h: Removed. * plugins/symbian/PluginDatabaseSymbian.cpp: Removed. * plugins/symbian/PluginPackageSymbian.cpp: Removed. * plugins/symbian/PluginViewSymbian.cpp: Removed. * plugins/symbian/npinterface.h: Removed. 2011-10-08 Robert Hogan CSS 2.1 failure: height-width-table-001.htm https://bugs.webkit.org/show_bug.cgi?id=69709 Reviewed by Simon Fraser. CSS 2.1 expects CSS table elements to treat fixed height/width as excluding table borders, but HTML table elements to treat fixed height/width as including them. See http://lists.w3.org/Archives/Public/www-style/2011Jan/0178.html http://lists.w3.org/Archives/Public/public-css-testsuite/2011Oct/0005.html It looks like some clarification is pending in the specs, but the new behaviour lets WebKit pass the following tests in the suite CSS and also match FF: height-width-table-001.htm height-width-inline-table-001.htm abspos-containing-block-initial-004d.htm * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): (WebCore::RenderTable::layout): 2011-10-15 Darin Adler Make toHTMLElement fail to compile if you try to use it on an HTMLElement* https://bugs.webkit.org/show_bug.cgi?id=70164 Reviewed by Adam Barth. Refactoring covered by existing tests. * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): Removed unneeded casts and some unneeded local variables as well. Changed the name of the local variable for the HTMLFrameElement to frameElement to avoid confusion with the Frame. * dom/Document.cpp: (WebCore::Document::openSearchDescriptionURL): Removed unneeded HTMLElement check; we can call hasTagName directly on a Node and that takes care of checking both that it's an HTMLElement and checking the tag name. * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::nodeMatches): Use toHTMLElement instead of a cast. Also changed hasAttribute calls to fastHasAttribute and getAttribute calls to fastGetAttribute since these are neither style attributes nor SVG animatables. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Use toHTMLElement. (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::show): Removed unneeded toHTMLElement call. * html/HTMLElement.cpp: (WebCore::HTMLElement::setOuterHTML): Use toHTMLElement. * html/HTMLElement.h: Added toHTMLElement overload to catch calls when the pointer is already HTMLElement* or a pointer to a class derived from it. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): Use toHTMLElement. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::innerTextElement): Use toHTMLElement. 2011-10-15 Antoine Labour Add WebAcceleratedContentLayer backed by a texture to support accelerated content hosting https://bugs.webkit.org/show_bug.cgi?id=70084 Reviewed by James Robinson. Covered by existing compositing/ tests * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::pluginLayerProgramFlip): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::PluginLayerChromium): (WebCore::PluginLayerChromium::setTextureId): (WebCore::PluginLayerChromium::setFlipped): (WebCore::PluginLayerChromium::pushPropertiesTo): * platform/graphics/chromium/PluginLayerChromium.h: (WebCore::PluginLayerChromium::flipped): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::CCPluginLayerImpl): (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: (WebCore::CCPluginLayerImpl::setFlipped): 2011-10-15 Michael Nordman [Chromium] Some WebSQLDatabase in worker bug fixes. https://bugs.webkit.org/show_bug.cgi?id=70071 - Test for a NULL webView WebWorkerClientImpl. - Avoid altering Database instance lifetimes during WorkerThread::stop(). Existing tests coverage applies. Reviewed by David Levin. * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::interruptAllDatabasesForContext): 2011-10-14 Adam Barth Update expected results. * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::serializedValueCallback): 2011-10-14 Ryosuke Niwa GTK build fix after r97533. * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::notifyChildrenSelectionChange): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (optionFromSelection): (webkit_accessible_selection_get_selection_count): 2011-10-14 David Kilzer Fix clang compiler warnings Reviewed by Darin Adler. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): Use std::max() instead of std::max(). 2011-10-14 Mark Hahnenberg Rename getOwnPropertySlot to getOwnPropertySlotVirtual https://bugs.webkit.org/show_bug.cgi?id=69810 Reviewed by Geoffrey Garen. No new tests. Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual in preparation for when we add the static getOwnPropertySlot to the MethodTable in ClassInfo. Also added a few static getOwnPropertySlot functions where they had been overlooked before (especially in CodeGeneratorJS.pm). * WebCore.exp.in: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlotVirtual): (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::DialogHandler::returnValue): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::getOwnPropertySlotVirtual): (WebCore::JSDOMWindowShell::getOwnPropertySlot): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::getOwnPropertySlotDelegate): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::getSparseIndex): (WebCore::CloneSerializer::getProperty): * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::getOwnPropertySlotVirtual): (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot): (WebCore::JSTestInterface::getOwnPropertySlotVirtual): (WebCore::JSTestInterface::getOwnPropertySlot): * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlotVirtual): (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot): (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlotVirtual): (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot): (WebCore::JSTestMediaQueryListListener::getOwnPropertySlotVirtual): (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::getOwnPropertySlotVirtual): (WebCore::JSTestObjConstructor::getOwnPropertySlot): (WebCore::JSTestObjPrototype::getOwnPropertySlotVirtual): (WebCore::JSTestObjPrototype::getOwnPropertySlot): (WebCore::JSTestObj::getOwnPropertySlotVirtual): (WebCore::JSTestObj::getOwnPropertySlot): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlotVirtual): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot): (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlotVirtual): (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlotVirtual): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::getOwnPropertySlot): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlotVirtual): (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlotVirtual): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlotVirtual): * bridge/runtime_array.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::getOwnPropertySlotVirtual): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getOwnPropertySlotVirtual): * bridge/runtime_object.h: 2011-10-14 Ryosuke Niwa Windows build fix attempt after r97533. * html/HTMLSelectElementWin.cpp: (WebCore::HTMLSelectElement::platformHandleKeydownEvent): 2011-10-14 Darin Adler Follow up the recent HTMLSelectElement improvements with a little bit more https://bugs.webkit.org/show_bug.cgi?id=70139 Reviewed by Ryosuke Niwa. Refactoring, covered by existing tests. Mostly, this adds a toHTMLSelectElement and uses it wherever possible. * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute): Use toHTMLSelectElement. (WebCore::AccessibilityListBox::addChildren): Ditto. Also removed unneeded toHTMLElement. * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::addChildren): Ditto. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isMultiSelectable): Ditto. (WebCore::AccessibilityRenderObject::stringValue): Removed checks on the type of the underlying node, since other code already assumes that a menu list renderer is only created for a select element. Streamlined the code a bit and removed some unneeded local variables. * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::indexSetter): Use toHTMLSelectElement. * bindings/js/JSHTMLSelectElementCustom.cpp: (WebCore::JSHTMLSelectElement::remove): Ditto. (WebCore::JSHTMLSelectElement::indexSetter): Ditto. * editing/FrameSelection.cpp: (WebCore::FrameSelection::selectAll): Ditto. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::shadowSelect): Ditto. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::recalcSelectOptions): Ditto. (WebCore::HTMLOptGroupElement::ownerSelectElement): Ditto. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::selected): Changed code to call renamed updateListItemSelectedStates rather than the confusing old name recalcListItemsIfNeeded. (WebCore::HTMLOptionElement::childrenChanged): Changed to call optionElementChildrenChanged rather than calling childrenChanged, because the children of the select element did not change! (WebCore::HTMLOptionElement::ownerSelectElement): Use toHTMLSelectElement. * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::add): Use toHTMLSelectElement. (WebCore::HTMLOptionsCollection::remove): Use toHTMLSelectElement. (WebCore::HTMLOptionsCollection::selectedIndex): Use toHTMLSelectElement. (WebCore::HTMLOptionsCollection::setSelectedIndex): Use toHTMLSelectElement. (WebCore::HTMLOptionsCollection::setLength): Use toHTMLSelectElement. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setSelectedIndexByUser): Call setSelectedIndex without the now-unneeded internal suffix. (WebCore::HTMLSelectElement::parseMappedAttribute): When the code says that we should "determine selectedness of the items", call updateListItemSelectedStates rather than the confusingly named recalcListItemsIfNeeded. (WebCore::HTMLSelectElement::updateListItemSelectedStates): Renamed recalcListItemsIfNeeded to this, since that's what this function is for. (WebCore::HTMLSelectElement::optionElementChildrenChanged): Added. Does the same work as childrenChanged, although it does not call up to the base class childrenChanged function. Later we might find we can remove some of the work here, for example it's not clear we should call the accessibility childrenChanged function. (WebCore::HTMLSelectElement::nextValidIndex): Changed this to a member function and made it get the list items itself rather than requiring they be passed in. (WebCore::HTMLSelectElement::nextSelectableListIndex): Updated for change to nextValidIndex. (WebCore::HTMLSelectElement::previousSelectableListIndex): Ditto. (WebCore::HTMLSelectElement::firstSelectableListIndex): Ditto. (WebCore::HTMLSelectElement::lastSelectableListIndex): Ditto. (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): Ditto. (WebCore::HTMLSelectElement::listItems): Removed unneeded const_cast, since recalcListItems is now a const member function. Call recalcListItems by that name instead of recalcListItemsInternal. (WebCore::HTMLSelectElement::recalcListItems): Renamed from recalcListItemsInternal and made this a const member function. The data members that this needs to modify are now mutable. (WebCore::HTMLSelectElement::setSelectedIndex): Renamed from setSelectedIndexInternal. Changed call to updateValidity to instead call setNeedsValidityCheck, since both do the same thing. (WebCore::HTMLSelectElement::parseMultipleAttribute): Ditto. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Updated for change to nextValidIndex, removed unneeded comparison with zero that's already handled by casting to an unsigned type, and use setSelectedIndex instead of using setSelectedIndexInternal since they are both the same thing. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Removed another unneeded comparision with zero that's handled by casting to an unsigned type. (WebCore::HTMLSelectElement::lastSelectedListIndex): Use size_t instead of unsigned for a vector index. (WebCore::HTMLSelectElement::typeAheadFind): Use setSelectedIndex instead of setSelectedIndexInternal. (WebCore::HTMLSelectElement::insertedIntoTree): Removed unneeded explicit boolean when calling a function that already has a default value of true. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Use setSelectedIndex instead of setSelectedIndexInternal. * html/HTMLSelectElement.h: Made childrenChanged private. Added optionElementChildrenChanged. Renamed recalcListItemsIfNeeded to the clearer updateListItemSelectedStates. Removed unused listBoxSelectItem. Removed updateValidity after changing all callers to instead call setNeedsValidityCheck. Made canSelectAll and selectAll non-virtual. Removed recalcListItemsInternal since it's the same thing as recalcListItems now. Renamed setSelectedIndexInternal to setSelectedIndex since it's the same function, just with a few arguments we don't want to allow outside callers to pass. Changed nextValidIndex into a non-static member function. Made m_listItems and m_shouldRecalcListItems mutable. Added a toHTMLSelectElement function, modeled on the toElement function. * html/ValidityState.cpp: (WebCore::ValidityState::valueMissing): Use toHTMLSelectElement. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): Ditto. (WebCore::RenderListBox::scrollToRevealSelection): Ditto. (WebCore::RenderListBox::size): Ditto. (WebCore::RenderListBox::numItems): Ditto. (WebCore::RenderListBox::addFocusRingRects): Ditto. (WebCore::RenderListBox::paintItemForeground): Ditto. (WebCore::RenderListBox::paintItemBackground): Ditto. (WebCore::RenderListBox::panScroll): Ditto. (WebCore::RenderListBox::autoscroll): Ditto. (WebCore::RenderListBox::stopAutoscroll): Ditto. (WebCore::RenderListBox::valueChanged): Ditto. (WebCore::RenderListBox::nodeAtPoint): Ditto. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): Ditto. (WebCore::RenderMenuList::updateFromElement): Ditto. (WebCore::RenderMenuList::setTextFromOption): Ditto. (WebCore::RenderMenuList::showPopup): Ditto. (WebCore::RenderMenuList::valueChanged): Ditto. (WebCore::RenderMenuList::listBoxSelectItem): Ditto. (WebCore::RenderMenuList::multiple): Ditto. (WebCore::RenderMenuList::didSetSelectedIndex): Ditto. (WebCore::RenderMenuList::didUpdateActiveOption): Ditto. (WebCore::RenderMenuList::itemText): Ditto. (WebCore::RenderMenuList::itemAccessibilityText): Ditto. (WebCore::RenderMenuList::itemToolTip): Ditto. (WebCore::RenderMenuList::itemIsEnabled): Ditto. Also use the disabled function instead of the virtual isEnabledFormControl function to check if the optgroup is enabled. (WebCore::RenderMenuList::itemStyle): Ditto. (WebCore::RenderMenuList::itemBackgroundColor): Ditto. (WebCore::RenderMenuList::listSize): Ditto. (WebCore::RenderMenuList::selectedIndex): Ditto. (WebCore::RenderMenuList::itemIsSeparator): Ditto. (WebCore::RenderMenuList::itemIsLabel): Ditto. (WebCore::RenderMenuList::itemIsSelected): Ditto. (WebCore::RenderMenuList::setTextFromItem): Ditto. 2011-10-14 Mark Hahnenberg Rename virtual put to putVirtual https://bugs.webkit.org/show_bug.cgi?id=69851 Reviewed by Darin Adler. No new tests. Renamed virtual versions of put to putVirtual in prepration for adding the static put to the MethodTable in ClassInfo since the compiler gets mad if the virtual and static versions have the same name. * WebCore.exp.in: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::putVirtual): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::putVirtual): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::putDelegate): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectCustomPut): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::putProperty): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject setWebScriptValueAtIndex:value:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::putVirtual): * bindings/scripts/test/JS/JSTestObj.h: * bridge/NP_jsobject.cpp: (_NPN_SetProperty): * bridge/jni/jni_jsobject.mm: (JavaJSObject::setMember): (JavaJSObject::setSlot): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::putVirtual): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::put): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): * bridge/runtime_array.cpp: (JSC::RuntimeArray::putVirtual): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::putVirtual): * bridge/runtime_object.h: * bridge/testqtbindings.cpp: (main): 2011-10-14 Sheriff Bot Unreviewed, rolling out r97519. http://trac.webkit.org/changeset/97519 https://bugs.webkit.org/show_bug.cgi?id=70156 Broke 79+ tests on bots (Requested by dglazkov on #webkit). * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-09-28 Robert Hogan Replaced elements squeezed when width is specified as percentage inside a table with Auto layout https://bugs.webkit.org/show_bug.cgi?id=29447 If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height. Reviewed by David Hyatt. Test: fast/replaced/table-percent-width.html * rendering/RenderBox.cpp: (WebCore::shouldExpandToIntrinsicDimension): (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: 2011-10-14 Cary Clark [Chromium Skia on Mac] Improve focus ring https://bugs.webkit.org/show_bug.cgi?id=70124 Reviewed by Eric Seidel. The focus ring code formerly outset the bounds of the component rectangles by fractional amounts. Because the rectangles are SkIRect (integer based), the fractional outset had no effect. The equivalent code in GraphicsContextMac.mm computes the curve radius and rectangle outset with integers, so the use of floats in Skia's case, besides not working, is unnecessary. The Skia code also failed to take the offset into account. In LayoutTests, the focus rings either have an offset of 0 or 2. The CoreGraphics code increases the ring's rectangles by the offset, then passes the result to wkDrawFocusRing. I did not find any documentation about how wkDrawFocusRing further inflates the focus ring, but empirically I determined that adding 2 to the offset generated rings with identical outer diameters. With these adjustments, the layout tests generate focus rings in the Skia on Mac case that match the coverage of the Chromium CG-based platform, in particular, matching: editing/inserting/editable-inline-element.html editing/selection/3690703-2.html * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-10-14 Chang Shu [Qt] Enable fullscreen api on Qt https://bugs.webkit.org/show_bug.cgi?id=70131 As a result, we have 3 passed tests. Reviewed by Noam Rosenthal. * features.pri: 2011-10-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=70148 Should switch to CoreUI version of CorrectionDot, GrammarDot, and SpellingDot -and corresponding- Reviewed by Anders Carlsson. Use NS*Dot whenever it's available, and fallback to *Dot only when it is not. * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::createPatternColor): (WebCore::GraphicsContext::drawLineForTextChecking): 2011-10-14 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=70120 [Chromium] Pass MessagePortArray to SerializedScriptValue::serialize/deserialize. This patch augments SerializedScriptValue with MessagePortArray* parameter to implement MessagePort transfer within the message in the future. Reviewed by David Levin. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::deserialize): * bindings/v8/SerializedScriptValue.h: * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8DOMWindow::postMessageCallback): (WebCore::V8DOMWindow::webkitPostMessageCallback): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8DedicatedWorkerContext::postMessageCallback): (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::pushStateCallback): (WebCore::V8History::replaceStateCallback): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8MessagePort::postMessageCallback): (WebCore::V8MessagePort::webkitPostMessageCallback): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8Worker::postMessageCallback): (WebCore::V8Worker::webkitPostMessageCallback): * workers/Worker.idl: 2011-10-14 Jeff Miller InjectedBundleHitTestResult::imageRect() should return rect in WKView coordinates https://bugs.webkit.org/show_bug.cgi?id=69963 Add infrastructure to convert from any frame view's coordinate system to the root view's coordinate system. Reviewed by Simon Fraser. No new tests (yet), this is covered by . * WebCore.exp.in: Exported WebCore::ScrollView::contentsToRootView(), used by InjectedBundleHitTestResult.cpp. * platform/ScrollView.cpp: (WebCore::ScrollView::rootViewToContents): Added (both point and rect versions). (WebCore::ScrollView::contentsToRootView): Ditto. * platform/ScrollView.h: Added member functions to convert to/from root view coordinates. * platform/Widget.cpp: (WebCore::Widget::convertFromRootView): Added (both point and rect versions). (WebCore::Widget::convertToRootView): Ditto. * platform/Widget.h: Added member functions to convert to/from root view coordinates. 2011-10-14 Andreas Kling CSSParser: Remove StyleBase usage. https://bugs.webkit.org/show_bug.cgi?id=70150 Reviewed by Darin Adler. Split CSSParser::m_parsedStyleObjects into two vectors of CSSRules and MediaLists. * css/CSSParser.cpp: (WebCore::CSSParser::createMediaList): (WebCore::CSSParser::createCharsetRule): (WebCore::CSSParser::createImportRule): (WebCore::CSSParser::createMediaRule): (WebCore::CSSParser::createKeyframesRule): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createKeyframeRule): * css/CSSParser.h: 2011-10-14 Adam Barth canvas getImageData should explain why it throws SECURITY_ERR https://bugs.webkit.org/show_bug.cgi?id=70088 Reviewed by Darin Adler. Log as message to the console when getImageData fails because the canvas is tainted. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::getImageData): 2011-10-14 Andreas Kling Inspector: Remove StyleBase usage. https://bugs.webkit.org/show_bug.cgi?id=70138 Reviewed by Antti Koivisto. Be fully specific about whether we're operating on a CSSRule or a CSSStyleSheet. No behavior change expected, this merely is a cleanup. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::parentStyleSheet): (WebCore::InspectorCSSAgent::asCSSStyleRule): * inspector/InspectorCSSAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::asCSSRuleList): 2011-10-14 Mark Hahnenberg Rename virtual deleteProperty to deletePropertyVirtual https://bugs.webkit.org/show_bug.cgi?id=69884 Reviewed by Darin Adler. No new tests. Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for adding the static deleteProperty to the MethodTable in ClassInfo since the compiler gets mad if the virtual and static versions have the same name. * WebCore.exp.in: * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::deletePropertyVirtual): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::deletePropertyVirtual): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::deletePropertyVirtual): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::deletePropertyVirtual): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::deletePropertyVirtual): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::deletePropertyVirtual): * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::remove): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject removeWebScriptKey:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/NP_jsobject.cpp: (_NPN_RemoveProperty): * bridge/jni/jni_jsobject.mm: (JavaJSObject::removeMember): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::deletePropertyVirtual): * bridge/runtime_array.cpp: (JSC::RuntimeArray::deletePropertyVirtual): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::deletePropertyVirtual): * bridge/runtime_object.h: 2011-10-14 Simon Fraser Web Inspector: WebProcess crashes hard when inspecting elements with border-images applied https://bugs.webkit.org/show_bug.cgi?id=70105 Reviewed by Dave Hyatt. Fix three different crashes related to getting computed style for border-image. In both valueForNinePieceImageSlice() and valueForNinePieceImageQuad(), assign 'right' to 'left' because we've computed a value for 'right' already. Otherwise this would leave 'right' as null, causing later crashes in cssText(). In mapNinePieceImage(), borderImage->imageValue() can be null for a border-image shorthand that is missing the image value. Test: fast/css/getComputedStyle/computed-style-border-image.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageQuad): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapNinePieceImage): 2011-10-14 Ryosuke Niwa Mac build fix after r97497. * editing/markup.cpp: (WebCore::isNonTableCellHTMLBlockElement): 2011-10-14 Daniel Cheng Context-aware HTML paste for Chromium https://bugs.webkit.org/show_bug.cgi?id=62112 Reviewed by Ryosuke Niwa. Add createFragmentFromMarkupWithContext which understands enough about DOM structure to retain necessary elements to preserve structure and appearance when extracting a subset of a DOM tree. Covered by existing layout tests. * editing/MarkupAccumulator.h: * editing/markup.cpp: (WebCore::isNonTableCellHTMLBlockElement): (WebCore::isHTMLBlockElement): (WebCore::ancestorToRetainStructureAndAppearanceForBlock): (WebCore::ancestorToRetainStructureAndAppearance): (WebCore::ancestorToRetainStructureAndAppearanceWithNoRenderer): (WebCore::findNodesSurroundingContext): (WebCore::trimFragment): (WebCore::createFragmentFromMarkupWithContext): * editing/markup.h: * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::getData): * platform/chromium/DataTransferItemChromium.cpp: (WebCore::DataTransferItemChromium::getAsString): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::documentFragment): * platform/chromium/PlatformSupport.h: 2011-10-14 Peter Beverloo [Chromium] Inherit settings from Chromium's envsetup.sh, address a NDK todo https://bugs.webkit.org/show_bug.cgi?id=70028 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2011-10-14 Nate Chapin Check CachedResourceClient types with ASSERTs rather than if statements. https://bugs.webkit.org/show_bug.cgi?id=70113 Reviewed by Adam Barth. No new tests, no functionality change. * loader/cache/CachedCSSStyleSheet.cpp: * loader/cache/CachedFont.cpp: * loader/cache/CachedImage.cpp: * loader/cache/CachedResourceClientWalker.h: * loader/cache/CachedXSLStyleSheet.cpp: 2011-10-14 Andreas Kling Don't assert that CSSRules are CSSRules. Rubber-stamped by Antti Koivisto. * css/CSSRule.h: (WebCore::CSSRule::isRule): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::append): (WebCore::CSSStyleSheet::insert): 2011-10-14 Beth Dakin Attempted Leopard build fix. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::createCompatibleBuffer): 2011-10-14 Andreas Kling CSSStyleSheet should only ever contain CSSRules. https://bugs.webkit.org/show_bug.cgi?id=70116 Reviewed by Antti Koivisto. Move child management from the StyleSheet class down into CSSStyleSheet and XSLStyleSheet. XSLStyleSheet continues to manage StyleBase objects, while CSSStyleSheet now only contains CSSRule. This is enforced at both compile time and runtime with explicit types and assertions. * css/CSSRule.h: (WebCore::CSSRule::isRule): Promoted to a public method so we can use it in assertions. * css/CSSRuleList.h: (WebCore::CSSRuleList::create): (WebCore::CSSRuleList::styleSheet): * css/CSSRuleList.cpp: (WebCore::CSSRuleList::CSSRuleList): * bindings/js/JSCSSRuleListCustom.cpp: (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots): Change backing to a CSSStyleSheet instead of a StyleSheet. * css/CSSRuleList.cpp: (WebCore::CSSRuleList::item): Remove redundant assertions. * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::isLoading): (WebCore::CSSStyleSheet::addSubresourceStyleURLs): * css/CSSStyleSelector.cpp: (WebCore::RuleSet::addRulesFromSheet): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::collectStyleSheets): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeCSSStyleSheet): Use more specific CSSRule* since that's what we get from CSSStyleSheet::item() now. * css/StyleSheet.cpp: (WebCore::StyleSheet::~StyleSheet): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::~CSSStyleSheet): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::~XSLStyleSheet): * xml/XSLStyleSheetQt.cpp: (WebCore::XSLStyleSheet::~XSLStyleSheet): Orphaning logic from ~StyleSheet() moved to subclass dtors. * css/StyleSheet.h: * css/CSSStyleSheet.h: (WebCore::CSSStyleSheet::length): (WebCore::CSSStyleSheet::item): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::append): (WebCore::CSSStyleSheet::insert): (WebCore::CSSStyleSheet::remove): Moved from StyleSheet and changed to only accept CSSRules. * css/StyleSheet.h: * xml/XSLStyleSheet.h: (WebCore::XSLStyleSheet::length): (WebCore::XSLStyleSheet::item): (WebCore::XSLStyleSheet::append): (WebCore::XSLStyleSheet::insert): (WebCore::XSLStyleSheet::remove): Moved from StyleSheet though still uses StyleBase. 2011-10-14 Yuji Sanachan Include dom/ExceptionCode.h instead of Filesystem APIs headers to fix compile error when ENABLE_WORKERS=1 and ENABLE_FILE_SYSTEM=0 https://bugs.webkit.org/show_bug.cgi?id=70036 Reviewed by Darin Adler. * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScript): 2011-10-14 Darin Adler Text drawn via -webkit-background-clip:text should be non-blurry with all scaling techniques https://bugs.webkit.org/show_bug.cgi?id=68641 Reviewed by Simon Fraser. Committed by Beth Dakin. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::createCompatibleBuffer): Allocate a buffer based on the scale factor of the context. * platform/graphics/GraphicsContext.h: Added createCompatibleBuffer. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use createCompatibleBuffer. 2011-10-14 Ryosuke Niwa Move selectionStartStyle and selectionHasStyle to EditingStyle https://bugs.webkit.org/show_bug.cgi?id=69882 Reviewed by Enrica Casucci. Moved selectionHasStyle and selectionStartStyle from Editor to EditingStyle. Also moved much of code in Editor::selectionStartCSSPropertyValue to method of EditingStyle. In addition, moved Range::editingStartPosition to htmlediting where it belongs and renamed it to adjustedSelectionStartForStyleComputation. * dom/Range.cpp: * dom/Range.h: * editing/EditingStyle.cpp: (WebCore::EditingStyle::triStateOfStyle): Extracted from selectionHasStyle. (WebCore::EditingStyle::legacyFontSize): Extracted from selectionStartCSSPropertyValue. (WebCore::EditingStyle::styleAtSelectionStart): Moved from Editor::selectionStartStyle. * editing/EditingStyle.h: * editing/Editor.cpp: (WebCore::Editor::fontForSelection): (WebCore::Editor::selectionStartHasStyle): (WebCore::Editor::selectionHasStyle): (WebCore::Editor::selectionStartCSSPropertyValue): * editing/Editor.h: * editing/EditorCommand.cpp: (WebCore::executeToggleStyleInList): * editing/htmlediting.cpp: (WebCore::adjustedSelectionStartForStyleComputation): Moved from Range::editingStartPosition. * editing/htmlediting.h: 2011-10-14 Ryosuke Niwa Redundant comparison in AccessibilityObject.cpp updateAXLineStartForVisiblePosition https://bugs.webkit.org/show_bug.cgi?id=70074 Reviewed by Chris Fleizach. Removed redundant code. * accessibility/AccessibilityObject.cpp: (WebCore::updateAXLineStartForVisiblePosition): 2011-10-12 Ryosuke Niwa Make the interface of locationAndLengthFromRange and rangeFromLocationAndLength consistent https://bugs.webkit.org/show_bug.cgi?id=69964 Reviewed by Enrica Casucci. Extracted the logic to determine the scope element as FrameSelection::rootEditableElementOrDocumentElement and deployed it in WebKit layer. Made locationAndLengthFromRange take a scope element and renamed it to getLocationAndLengthFromRange. * WebCore.exp.in: * editing/FrameSelection.cpp: (WebCore::FrameSelection::rootEditableElementOrDocumentElement): * editing/FrameSelection.h: * editing/TextIterator.cpp: (WebCore::TextIterator::getLocationAndLengthFromRange): * editing/TextIterator.h: 2011-10-13 Arko Saha Microdata: Basic implementation of document.getItems() method. https://bugs.webkit.org/show_bug.cgi?id=68610 Reviewed by Ryosuke Niwa. Added ENABLE(MICRODATA) feature flag. Implement document.getItems() DOM API. Spec: http://www.whatwg.org/specs/web-apps/current-work/complete/microdata.html Tests: fast/dom/MicroData/001.html fast/dom/MicroData/002.html fast/dom/MicroData/003.html fast/dom/MicroData/004.html fast/dom/MicroData/005.html fast/dom/MicroData/006.html fast/dom/MicroData/007.html fast/dom/MicroData/008.html fast/dom/MicroData/009.html * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * dom/Document.cpp: (WebCore::Document::getItems): Returns NodeList of the element in the Document that create items, that are not part of other items, and that are of one of the types given in the argument. If no tokens specified/undefined in the argument, then return a NodeList containing all top level microdata items. (WebCore::Document::removeCachedMicroDataItemList): Remove Microdata item node list from cache. * dom/Document.h: * dom/Document.idl: Added getItems() microdata DOM API. * dom/MicroDataItemList.cpp: Added. (WebCore::MicroDataItemList::MicroDataItemList): (WebCore::MicroDataItemList::~MicroDataItemList): (WebCore::MicroDataItemList::nodeMatches): * dom/MicroDataItemList.h: Added. (WebCore::MicroDataItemList::create): * dom/Node.cpp: (WebCore::Node::itemTypeAttributeChanged): It is responsible to invalidate the Microdata item node cache when itemType attribute changes. (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): (WebCore::NodeListsNodeData::invalidateMicrodataItemListCaches): Invalidate Microdata item list cache. (WebCore::NodeListsNodeData::isEmpty): * dom/Node.h: * dom/NodeRareData.h: * features.pri: * html/HTMLAttributeNames.in: Added itemid, itemprop, itemscope, itemtype attributes. * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): Handle itemtype attribute change. * html/HTMLElement.idl: Added itemid, itemprop, itemscope, itemtypes microdata attributes. 2011-10-14 Andreas Kling Stricter management of WebKitCSSKeyframeRules. https://bugs.webkit.org/show_bug.cgi?id=70109 Reviewed by Antti Koivisto. Covered by existing tests. * css/CSSParser.h: * css/CSSParser.cpp: (WebCore::CSSParser::parseKeyframeRule): Return a WebKitCSSKeyframeRule instead of a CSSRule. * css/CSSRuleList.cpp: (WebCore::CSSRuleList::deleteRule): * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::deleteRule): Moved style sheet orphaning logic for @-webkit-keyframe from CSSRuleList into WebKitCSSKeyframesRule::deleteRule() since that's the only caller operating on those rules. * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule): (WebCore::WebKitCSSKeyframesRule::length): (WebCore::WebKitCSSKeyframesRule::item): (WebCore::WebKitCSSKeyframesRule::insertRule): Change isKeyframeRule() checks to assertions since we know our rules are always WebKitCSSKeyframeRules. Also tidied up. 2011-10-14 Andreas Kling Unreviewed, actually remove StyleList.* after r97640. * css/StyleList.cpp: Removed. * css/StyleList.h: Removed. 2011-10-14 Andreas Kling Merge StyleList into StyleSheet. https://bugs.webkit.org/show_bug.cgi?id=70100 Reviewed by Antti "printf" Koivisto. Merge all functionality from StyleList into StyleSheet, since StyleSheet was the only subclass of StyleList anyway. Also removed FIXME's about throwing exceptions in CSSRuleList since they were incorrect. The call sites already handle the relevant cases. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSRuleListCustom.cpp: (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots): * css/CSSRuleList.cpp: (WebCore::CSSRuleList::CSSRuleList): (WebCore::CSSRuleList::length): (WebCore::CSSRuleList::item): (WebCore::CSSRuleList::deleteRule): (WebCore::CSSRuleList::append): (WebCore::CSSRuleList::insertRule): * css/CSSRuleList.h: (WebCore::CSSRuleList::create): (WebCore::CSSRuleList::styleSheet): * css/StyleList.cpp: Removed. * css/StyleList.h: Removed. * css/StyleSheet.cpp: (WebCore::StyleSheet::StyleSheet): (WebCore::StyleSheet::append): (WebCore::StyleSheet::insert): (WebCore::StyleSheet::remove): * css/StyleSheet.h: (WebCore::StyleSheet::length): (WebCore::StyleSheet::item): 2011-10-14 Mihnea Ovidenie [CSS Regions] Change -webkit-flow to -webkit-flow-into https://bugs.webkit.org/show_bug.cgi?id=70014 Reviewed by David Hyatt. 1. -webkit-flow is renamed to -webkit-flow-into 2. -webkit-flow-into takes instead of strings * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::validFlowName): (WebCore::CSSParser::parseFlowThread): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-10-12 Hans Wennborg IndexedDB: Remove SQLite backing store https://bugs.webkit.org/show_bug.cgi?id=69620 Reviewed by Darin Fisher. Remove the SQLite backing store implementation; it is not used anymore. Also remove the maximumSize parameter, it is not used either. No new functionality, so no new tests. * GNUmakefile.list.am: * WebCore.gypi: * storage/IDBBackingStore.h: * storage/IDBFactory.cpp: (WebCore::IDBFactory::getDatabaseNames): (WebCore::IDBFactory::open): * storage/IDBFactoryBackendImpl.cpp: (WebCore::computeFileIdentifier): (WebCore::computeUniqueIdentifier): (WebCore::IDBFactoryBackendImpl::getDatabaseNames): (WebCore::IDBFactoryBackendImpl::open): (WebCore::IDBFactoryBackendImpl::openBackingStore): * storage/IDBFactoryBackendImpl.h: * storage/IDBFactoryBackendInterface.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::open): * storage/IDBLevelDBBackingStore.h: * storage/IDBSQLiteBackingStore.cpp: Removed. * storage/IDBSQLiteBackingStore.h: Removed. 2011-10-14 Nikolas Zimmermann Not reviewed. Fix mac builds. r97448 broke them. * WebCore.xcodeproj/project.pbxproj: Set ImageBySizeCache.h role to private. 2011-10-14 Justin Schuh Clear WebMediaPlayerClientImpl back pointer on destruction https://bugs.webkit.org/show_bug.cgi?id=69973 Reviewed by James Robinson. Clear the backpointer and remove the unused m_currentFrame * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::cleanupResources): (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::releaseProvider): * platform/graphics/chromium/VideoLayerChromium.h: 2011-10-13 Hans Wennborg IndexedDB: Make IDBCursor.value() return an IDBAny object https://bugs.webkit.org/show_bug.cgi?id=70024 Reviewed by Tony Chang. This is to work around the fact that the V8 bindings mechanism does eager deserialization of SerializedScriptValue attributes. This means that the value is fetched from the back-end only once, when the IDBCursor is first wrapped. When the cursor's value changes, this is not reflected. We work around this by making IDBCursor.value() return the SerializedScriptValue wrapped in an IDBAny object. * storage/IDBCursor.cpp: (WebCore::IDBCursor::value): * storage/IDBCursor.h: * storage/IDBCursorWithValue.idl: 2011-10-14 Rémi Duraffort Fix compilation when the JS Debugger is disabled. https://bugs.webkit.org/show_bug.cgi?id=70007 Reviewed by Antti Koivisto. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): * inspector/InspectorRuntimeAgent.cpp: * inspector/InspectorRuntimeAgent.h: * inspector/WorkerInspectorController.cpp: * inspector/WorkerInspectorController.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::disconnectFromInspector): (WebCore::WorkerMessagingProxy::sendMessageToInspector): 2011-10-13 Nikolas Zimmermann Prepare SVGImage intrinsic size negotiation: Introduce an IntSize <-> SVGImage cache in CachedImage https://bugs.webkit.org/show_bug.cgi?id=69416 Reviewed by Antti Koivisto. Refactor ImageBySizeCache out of CSSImageGeneratorValue as CachedImage wants to use the same type of cache for its purposes. When introducing the SVGImage intrinsic size negotiation the container size of an SVGImage is dependant on the place where it gets embedded (eg width/height attributes of host documents force a certain size). Currently CachedImage only contains a single RefPtr, which it constructs out of the decoded data. Multiple RenderObjects share the same CachedImages, when embedding eg. a SVG document in a or using it in a background-image for a
. Consider the case where two RenderObjects use the same CachedImage, each with a different container size (200x100 vs 100x200) and the embedded document contains a viewBox and some arbitary preserveAspectRatio settings. To honour these we have to relayout the document with the desired size (percentual unit resolving etc, all depend on the RenderSVGRoots size). With the current design this is hard to realize, w/o requring to relayout the embedded document for each embedder that uses an SVGImage. This patch introduces a cache right within CachedImage, which manages a map of images to certain sizes, by utilizing the new ImageBySizeCache. CachedImage::imageForRenderer() takes a RenderObject* parameter, which it uses to look up the last set image container size for a renderer. Using that size it queries the cache whether it already has an SVGImage for that size, if not it gets created, by creating a whole new instance of SVGImage, filling it with the already decoded data, and passing on a fixed image container size, which overrides the size that RenderSVGRoot reports, when computeReplacedLogicalWidth/Height is called and thus laying out the document at the desired size. This image is then put in the cache for further reusability. Likewise CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter and stores that in the cache with an associated container size. It requires to touch several files which use CachedImage throughout WebCore/WebKit/WebKit2. The actual cache is not yet turned on yet, so this is not a functional change so far, as it needs some other changes to SVGImage, which will come with the master patch in bug 47156. No new tests yet, as the new cache isn't turned on yet. * CMakeLists.txt: Add rendering/ImageBySizeCache.* to build. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use new CachedImage::imageSizeForRenderer(RenderObject*) method. * bindings/objc/DOM.mm: Ditto (for CachedImage::image()). (-[DOMElement image]): (-[DOMElement _imageTIFFRepresentation]): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::variantFromObject): Ditto (for CachedImage::image()). * css/CSSCanvasValue.cpp: s/m_clients/clients()/, which now live in the ImageBySizeCache instead of CSSImageGeneratorValue. (WebCore::CSSCanvasValue::canvasChanged): (WebCore::CSSCanvasValue::canvasResized): (WebCore::CSSCanvasValue::image): * css/CSSGradientValue.cpp: Ditto. (WebCore::CSSGradientValue::image): * css/CSSImageGeneratorValue.cpp: Move the sizes/clients/images cache into a new ImageBySizeCache class, to make it usable for CachedImage as well. (WebCore::CSSImageGeneratorValue::addClient): Adapt to move. (WebCore::CSSImageGeneratorValue::removeClient): Ditto. (WebCore::CSSImageGeneratorValue::getImage): Ditto. (WebCore::CSSImageGeneratorValue::putImage): Ditto. * css/CSSImageGeneratorValue.h: (WebCore::CSSImageGeneratorValue::clients): Forwarded to the ImageBySizeCache. * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): CachedImage::canRender() now takes a RenderObject* parameter. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::width): Use new CachedImage::imageSizeForRenderer(RenderObject*) method. (WebCore::HTMLImageElement::height): Ditto. (WebCore::HTMLImageElement::naturalWidth): Ditto. (WebCore::HTMLImageElement::naturalHeight): Ditto. * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::finish): Ditto. (WebCore::ImageDocument::scale): Ditto. (WebCore::ImageDocument::resizeImageToFit): Ditto. (WebCore::ImageDocument::imageUpdated): Ditto. (WebCore::ImageDocument::restoreImageSize): Ditto. (WebCore::ImageDocument::imageFitsInWindow): Ditto. * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): Use new CachedImage::imageForRenderer(RenderObject*) method. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::isOriginClean): Ditto. (WebCore::size): Ditto (for CachedImage::imageSizeForRenderer()). (WebCore::CanvasRenderingContext2D::drawImage): Ditto. (WebCore::CanvasRenderingContext2D::createPattern): Ditto. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::texImage2D): Ditto. (WebCore::WebGLRenderingContext::texSubImage2D): Ditto. * loader/cache/CachedImage.cpp: Add currently _disabled_ cache for SVGImages. The intrinsic size negotiation will need to use multiple SVGImages for each requested size (equal to the size of the embedding place for the image) - make it possible to cache these SVGImages, and maintain a cache for them. The hash code is a 1:1 refactoring from the already present code in CSSImageGeneratorValue, now named 'ImageBySizeCache'. (WebCore::CachedImage::lookupImageForSize): Looks up an Image from the cache for a given IntSize. Currently turned off. (WebCore::CachedImage::lookupImageForRenderer): Looks up an Image from the cache for a given renderer. Currently turned off. (WebCore::CachedImage::lookupOrCreateImageForRenderer): Looks up an Image from the cache or creates a new SVGImage for a given size and caches it, if possible. Currently turned off. All following changes share this: Don't operate on m_image directly, instead always look up one from the cache for a given size or renderer - if that's not present fallback to m_image. When an SVGImage is first created by CachedImage::createImage() and stored in m_image, the cache remains empty. If eg. is used which implies a container size of 30x70 a new SVGImage is created with the additional information of a 30x70 container size which is immediately passed to the SVGImage after its creation. This SVGImage is put in the ImageBySizeCache associated with a container size of 30x70. We now have two SVGImage objects present, one living in CachedImage::m_image, created by createImage() during data decoding, and one living in the ImageBySizeCache created by lookupOrCreateImageForRenderer() associated with the 30x70 container. The first SVGImage::size() will return a value as defined in the referenced foo.svg, whereas the SVGImage::size() call of the new SVGImage living in the cache reports 30x70 and renders according to that. Whenever any method of CachedImage is called with a RenderObject* or IntSize, we can't just operate on m_image anymore but instead have to lookup the right images for a certain renderer/size from the cache and operate on these. When calling eg. CachedImage::image() with a null renderer, m_image is returned. When passing with a valid renderer only cache lookups are done if the m_image is actually a SVGImage, otherwhise lookupImageForSize/Renderer will just return the m_image. There is no logical change induced for non-SVGImage derived images. CachedImage::image() of course needs a RenderObject* parameter now, to identify which of the images from the cache to use, if the underlying image is a SVGImage. Luckily these information are already present in StyleCachedImage/StyleImage & friends and only need to be added for some additional methods. (WebCore::CachedImage::image): FIXME (WebCore::CachedImage::imageForRenderer): Call lookupOrCreateImageForRenderer() instead of returning m_image, if it's not null. Its a no-op for non SVGImage derived objects. (WebCore::CachedImage::setContainerSizeForRenderer): For non-SVGImages, just pass on the size to the m_image. For SVGImages, associate the passed in renderer with the IntSize in the cache. This does NOT create the SVGImage yet, this is delayed until imageForRenderer() is called for a given renderer that wants this size. (WebCore::CachedImage::imageSize): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer. (WebCore::CachedImage::imageRect): Ditto. (WebCore::CachedImage::clear): Force clearing the m_svgImageCache. (WebCore::CachedImage::data): Call m_image->size() instead of imageSize(), to avoid having to pass a null renderer to imageSize() as here no renderer is available yet. (WebCore::CachedImage::destroyDecodedData): Don't destroy decoded data for SVG images, as m_data needs to be accessable at any time to construct a cloned SVGImage. In future we don't need this anymore if we make sure multiple SVGImages share the same trees, but that's for a follow-up patch. (WebCore::CachedImage::decodedSizeChanged): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer. (WebCore::CachedImage::didDraw): Ditto. (WebCore::CachedImage::shouldPauseAnimation): Ditto. (WebCore::CachedImage::animationAdvanced): Ditto. (WebCore::CachedImage::changedInRect): Ditto. (eg. when leaving out this change animated SVG images wouldn't update anymore, as the animation didn't happen on m_image!) * loader/cache/CachedImage.h: imageForRenderer/canRender/setContainerSizeForRenderer/imageSizeForRenderer now all take a RenderObject* parameter to identifiy the current user of the image. (WebCore::CachedImage::canRender): Pass on the incoming renderer to imageSizeForRenderer(). * page/DragController.cpp: (WebCore::getImage): Use new CachedImage::imageForRenderer(RenderObject*) method. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): Ditto. * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): Ditto. (WebCore::PageSerializer::addImageToResources): Ditto. (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): Ditto. * page/PageSerializer.h: * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): Ditto. * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): Ditto. * platform/graphics/Image.h: (WebCore::Image::isSVGImage): Add boolean helper to identify SVGImages, just like isBitmapImage(). * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::declareAndWriteDragImage): Use new CachedImage::imageForRenderer(RenderObject*) method. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeImage): Ditto. * platform/mac/HTMLConverter.mm: (fileWrapperForElement): Ditto. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeImage): Ditto. * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::declareAndWriteDragImage): Ditto. * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeImage): Ditto. * platform/win/ClipboardWin.cpp: (WebCore::writeImageToDataObject): Ditto. * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeImage): Ditto. * platform/wince/PasteboardWinCE.cpp: (WebCore::Pasteboard::writeImage): Ditto. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::image): Ditto. * rendering/ImageBySizeCache.cpp: Copied from WebCore/css/CSSImageGeneratorValue.cpp, to preserve history for the original cache code. (WebCore::ImageBySizeCache::ImageBySizeCache): Straight copy from CSSImageGeneratorValue, renamed to ImageBySizeCache, removing all but the cache relevant code. (WebCore::ImageBySizeCache::addClient): Ditto. (WebCore::ImageBySizeCache::removeClient): Ditto. (WebCore::ImageBySizeCache::getImage): Ditto. (WebCore::ImageBySizeCache::putImage): Ditto. (WebCore::ImageBySizeCache::clear): New function, that clears the cache, introduced for the needs of CachedImage. (WebCore::ImageBySizeCache::imageForSize): New function to query an Image* for a given IntSize, introduced for the needs of CachedImage. (WebCore::ImageBySizeCache::sizeForClient): New function to query an IntSize for a given renderer. * rendering/ImageBySizeCache.h: Copied from WebCore/css/CSSImageGeneratorValue.h. (WebCore::ImageBySizeCache::clients): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintFillLayer): CachedImage::canRender() now takes a RenderObject* parameter. (WebCore::InlineFlowBox::paintBoxDecorations): Ditto. (WebCore::InlineFlowBox::paintMask): Ditto. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMaskImages): Ditto. (WebCore::RenderBox::repaintLayerRectsForImage): Ditto. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto. (WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto (for CachedImage::setContainerSizeForRenderer()). (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): Use new CachedImage::imageForRenderer(RenderObject*) method. (WebCore::RenderImage::setImageSizeForAltText): Ditto. (WebCore::RenderImage::computeReplacedLogicalWidth): FIXME * rendering/RenderImageResource.cpp: (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass on m_renderer to CachedImage::setContainerSizeForRenderer(). * rendering/RenderImageResource.h: Remove constness from setContainerSizeForRenderer. (WebCore::RenderImageResource::image): Pass on m_renderer to CachedImage::image(). (WebCore::RenderImageResource::imageSize): Pass on m_renderer to CachedImage::imageSizeForRenderer(). * rendering/RenderImageResourceStyleImage.h: (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Remove constness, pass on m_renderer to StyleImage::setContainerSizeForRenderer(). * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Use new CachedImage::imageForRenderer(RenderObject*) method. (WebCore::RenderLayerBacking::updateImageContents): Ditto. * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::computePreferredLogicalWidths): CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter. * rendering/RenderObject.cpp: (WebCore::mustRepaintFillLayers): CachedImage::canRender() now takes a RenderObject* parameter. (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered): Ditto. * rendering/style/StyleCachedImage.cpp: (WebCore::StyleCachedImage::canRender): Pass on incoming renderer to CachedImage::canRender(). (WebCore::StyleCachedImage::imageSize): Pass on incoming renderer to CachedImage::imageSizeForRenderer(). (WebCore::StyleCachedImage::setContainerSizeForRenderer): Pass on incoming renderer to CachedImage::setContainerSizeForRenderer(). (WebCore::StyleCachedImage::addClient): Remove unneeded return statment in void method. (WebCore::StyleCachedImage::removeClient): Ditto. (WebCore::StyleCachedImage::image): Pass on incoming renderer to CachedImage::image(). * rendering/style/StyleCachedImage.h: Add RenderObject* parameter to canRender()/setContainerSizeForRenderer(). image() already has one, that was unused so far. * rendering/style/StyleGeneratedImage.cpp: Inlined setContainerSizeForRenderer. * rendering/style/StyleGeneratedImage.h: (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Add RenderObject* parameter. * rendering/style/StyleImage.h: (WebCore::StyleImage::canRender): Ditto. * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto. * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build): Use new CachedImage::imageForRenderer(RenderObject*) method. * svg/graphics/SVGImage.cpp: Cleanup file, the include hack seems not needed anymore. (WebCore::SVGImage::setContainerSize): s/LayoutSize/IntSize/ to match the code in platform/. * svg/graphics/SVGImage.h: Ditto. (WebCore::SVGImage::isSVGImage): Return true. 2011-10-13 Kenichi Ishibashi [Chromium] Uninitialized read in WebCore::*Font* / HB_GSUB_Select_Feature https://bugs.webkit.org/show_bug.cgi?id=70087 Reviewed by Kent Tamura. Initialize local variables in ComplexTextControllerLinux::setupfontFeatures. No new tests because there is no behavior change. Manually tested with valgrind. * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::setupFontFeatures): 2011-10-13 Csaba Osztrogonác [Qt][Win] Unreviewed buildfix after r97433. * platform/MemoryPressureHandler.h: Add a missing include. 2011-10-13 Adam Barth Spelling error in v8WebSocket::constructorCallback error https://bugs.webkit.org/show_bug.cgi?id=63943 Reviewed by Kent Tamura. Fix typo. * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): 2011-10-13 Mark Hahnenberg Rename virtual getConstructData to getConstructDataVirtual https://bugs.webkit.org/show_bug.cgi?id=69872 Reviewed by Geoffrey Garen. No new tests. Renamed virtual getConstructData functions to getConstructDataVirtual to avoid conflicts when we add static getConstructData to the MethodTable. * WebCore.exp.in: * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::getConstructDataVirtual): * bindings/js/JSAudioConstructor.h: * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::getConstructDataVirtual): * bindings/js/JSImageConstructor.h: * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::getConstructDataVirtual): * bindings/js/JSOptionConstructor.h: * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::construct): * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::getConstructDataVirtual): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getConstructDataVirtual): * bridge/runtime_object.h: 2011-10-13 Simon Fraser Remove #include of in a widely-used header. Reviewed by Sam Weinig. * platform/PlatformScreen.h: Typedef PlatformDisplayID to a uint32_t. * platform/graphics/DisplayRefreshMonitor.h: Typedef CVDisplayLinkRef as an opaque type to avoid bringing in QuartzCore.h, and move displayLinkCallback to the .cpp file since it uses Core Video types. * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: (WebCore::displayLinkCallback): Make this a local static function, that calls a member fuction on the object. (WebCore::DisplayRefreshMonitor::requestRefreshCallback): (WebCore::DisplayRefreshMonitor::displayLinkFired): 2011-10-13 Michael Saboff REGRESSION: High frequency memory warnings cause Safari to hog the CPU doing useless garbage collection https://bugs.webkit.org/show_bug.cgi?id=69774 Throttle the processing of memory pressure events to no more often than once every 5 seconds. Reviewed by Geoffrey Garen. No new tests. * platform/MemoryPressureHandler.cpp: (WebCore::MemoryPressureHandler::MemoryPressureHandler): * platform/MemoryPressureHandler.h: * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::respondToMemoryPressure): 2011-10-13 Kentaro Hara Implement an OverflowEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=70017 Reviewed by Adam Barth. Test: fast/events/constructors/overflow-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added an OverflowEvent constructor. * dom/OverflowEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'. 2011-10-13 Anantanarayanan G Iyengar https://bugs.webkit.org/show_bug.cgi?id=70064 The NPObjectWrapper class used by V8 bindings in Chromium to wrap the window script object was allocating an instance of itself in the NPAllocate implementation and returning this pointer. It should be returning a pointer to the wrapped NPObject structure (NPProxyObject). The member function getUnderlyingNPObject should return 0 if we fail to find the underlying NPObject for the call. It was incorrectly returning a pointer to the same NPObject in this case which could cause recursion. Reviewed by Nate Chapin. No new tests as there is no change in functionality. * bindings/v8/NPObjectWrapper.cpp: (WebCore::NPObjectWrapper::getObjectForCall): (WebCore::NPObjectWrapper::NPAllocate): * bindings/v8/NPObjectWrapper.h: 2011-10-13 Arthur Hsu Ensure font loaded before calling Skia to drawPosText in Chrome sandbox https://bugs.webkit.org/show_bug.cgi?id=69370 Reviewed by James Robinson. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-10-13 Kentaro Hara Regarding constructor, replace [ConstructorWith=...] IDL with [CallWith=...] IDL https://bugs.webkit.org/show_bug.cgi?id=69801 As for constructors, [ConstructorWith=...] has the same meaning as [CallWith=...]. We should deprecate [ConstructorWith=...]. This is a clean-up bug for the bug 65839. Reviewed by Adam Barth. No new tests, since no change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Replaced [ConstructorWith=...] IDL with [CallWith=...] IDL. (GenerateConstructorCallback): * bindings/scripts/test/TestInterface.idl: Ditto. * fileapi/FileReader.idl: Ditto. * p2p/PeerConnection.idl: Ditto. * page/EventSource.idl: Ditto. * workers/Worker.idl: Ditto. 2011-10-13 Kentaro Hara Constructor should not be called if the object is being constructed inside WebCore https://bugs.webkit.org/show_bug.cgi?id=70015 Reviewed by Adam Barth. Summary: A DOM object can be created from the JS context and from the WebCore context. Constructor should be called if the object is created from the JS context, but should not be called if the object is created from the WebCore context. Details: - Expected behavior when the object is created from the JS context (e.g. "new Event()"): (1) V8XXXX::constructorCallback() is called. (2) V8XXXX::constructorCallback() calls XXXX::create(). (3) XXXX::create() creates a C++ object. (4) V8XXXX::constructorCallback() calls toV8() for the C++ object. (5) toV8() wraps the C++ object and returns the wrapped JS object. - Actual behavior when the object is created from the JS context (e.g. "new Event()"): As described above (1) - (5). That's fine!! - Expected behavior when the object is created from the WebCore context. (e.g. "window.addEventListener("load", function (event) { ... });". In this case, the Event object is created inside the WebCore context): (1) WebCore calls XXXX::create(). (2) XXXX::create() creates a C++ object. (3) WebCore calls toV8() for the C++ object. (4) toV8() wraps the C++ object and returns the wrapped JS object. - Actual behavior when the object is created from the WebCore context. (e.g. "window.addEventListener("load", function (event) { ... });"): (1) WebCore calls XXXX::create(). (2) XXXX::create() creates a C++ object. (3) WebCore calls toV8() for the C++ object. (4) toV8() can call XXXX::constructorCallback(). (Whether or not toV8() calls XXXX::constructorCallback() depends on the implementation of toV8().) (5) V8XXXX::constructorCallback() calls XXXX::create(). (6) XXXX::create() creates __another__ C++ object. (7) V8XXXX::constructorCallback() calls toV8() for the C++ object. (8) toV8() wraps the C++ object and returns the wrapped JS object. This actual behavior definitely causes the following problems: - Problem1: The object returned to JS is not the object created in (2) but the object created in (6). However, I do not yet know a test case that causes some visible bug because of this problem. - Problem2: In (4), XXXX::constructorCallback() can be called with no argument. If XXXX::constructorCallback() expects at least one argument, XXXX::constructorCallback() throws TypeError, resulting in crash. For example, Event caused this problem when I implemented constructor for Event. Based on the discussion with Dominicc, we solved this problem by adding the following two lines of code to Event::constructorCallback() (See here: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp&exact_package=chromium&q=allowallocation&type=cs): XXXX::constructorCallback(...) { ...; if (AllowAllocation::current()) return args.Holder(); ...; } This if check means "XXXX::constructorCallback() returns immediately if it is called from the WebCore context". With these observations, we think that all constructorCallback() should have the above if check. This patch adds the if check to CodeGeneratorV8.pm. After this patch is landed, I would like to add the if check to all existing custom V8 constructors. No new tests, since we could not find a test case that causes some visible bug without the if check. * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): Generates a constructor so that it returns immediately without doing anything if the constructor is called from the WebCore context. * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the result. (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::V8TestObj::constructorCallback): 2011-10-13 Kentaro Hara Implement a BeforeLoadEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=69980 Reviewed by Adam Barth. Test: fast/events/constructors/before-load-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added a BeforeLoadEvent constructor. * dom/BeforeLoadEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'. 2011-10-13 Joshua Bell make IDBFactory.open wait for pending setVersion transactions to complete https://bugs.webkit.org/show_bug.cgi?id=69307 Reviewed by Tony Chang. Added a queue of pending open calls, similar to the queue of pending setVersion calls. Ensure pending calls are processed in the correct order when transactions complete. Tests: storage/indexeddb/open-close-version.html storage/indexeddb/two-version-changes.html storage/indexeddb/version-change-exclusive.html * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::callbacks): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::transactionStarted): (WebCore::IDBDatabaseBackendImpl::transactionFinished): (WebCore::IDBDatabaseBackendImpl::processPendingCalls): (WebCore::IDBDatabaseBackendImpl::openConnection): (WebCore::IDBDatabaseBackendImpl::close): * storage/IDBDatabaseBackendImpl.h: * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): * storage/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::abort): (WebCore::IDBTransactionBackendImpl::start): (WebCore::IDBTransactionBackendImpl::commit): 2011-10-13 Chris Marrin Fix Leopard build Unreviewed. * platform/graphics/DisplayRefreshMonitor.h: Added. 2011-10-12 Chris Marrin Sync requestAnimationFrame callback to CVDisplayLink on Mac https://bugs.webkit.org/show_bug.cgi?id=68911 Reviewed by Simon Fraser. Test: fast/animation/request-animation-frame-iframe.html Implement CVDisplayLink which checks to see if any scheduleAnimation requests have come in. If so, remember the timestamp and do a callOnMainThread to fire the callbacks. A DisplayRefreshMonitorManager is a singleton which has a list of DisplayRefreshMonitors, one for each display. Each monitor has one or more DisplayRefreshMonitorClients, which is a abstract virtual class implemented by ScriptAnimationController. When an animation is scheduled, the displayRefreshFired method is called on the client, which in turn calls the requestAnimationFrame callbacks. DisplayRefreshMonitor and therefore the CVDisplayLink it owns is discarded when it no longer has any clients. This minimizes the number of concurrent CVDisplayLink threads. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::windowScreenDidChange): (WebCore::Document::webkitRequestAnimationFrame): * dom/Document.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::windowScreenDidChange): (WebCore::ScriptedAnimationController::scheduleAnimation): * dom/ScriptedAnimationController.h: (WebCore::ScriptedAnimationController::displayRefreshFired): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::windowScreenDidChange): * page/Page.h: (WebCore::Page::displayID): * platform/PlatformScreen.h: * platform/graphics/DisplayRefreshMonitor.cpp: Added. (WebCore::DisplayRefreshMonitorClient::DisplayRefreshMonitorClient): (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient): (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded): (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread): (WebCore::DisplayRefreshMonitorManager::sharedManager): (WebCore::DisplayRefreshMonitorManager::findMonitor): (WebCore::DisplayRefreshMonitorManager::registerClient): (WebCore::DisplayRefreshMonitorManager::unregisterClient): (WebCore::DisplayRefreshMonitorManager::scheduleAnimation): (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange): * platform/graphics/DisplayRefreshMonitor.h: Added. (WebCore::DisplayRefreshMonitorClient::scheduleAnimation): (WebCore::DisplayRefreshMonitor::hasClients): (WebCore::DisplayRefreshMonitor::addClient): (WebCore::DisplayRefreshMonitor::removeClient): (WebCore::DisplayRefreshMonitor::displayID): (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: Added. (WebCore::DisplayRefreshMonitor::displayLinkCallback): (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor): (WebCore::DisplayRefreshMonitor::scheduleAnimation): 2011-10-13 Abhishek Arya Unreviewed. Qt compile fix. * css/CSSFontFaceSource.cpp: include Document.h. 2011-10-12 Abhishek Arya Register custom fonts at their creation time, rather than at retirement time. https://bugs.webkit.org/show_bug.cgi?id=68929 Reviewed by Dan Bernstein. Test: fast/text/custom-font-data-crash2.html * css/CSSFontFace.cpp: * css/CSSFontFace.h: remove function added in r94508, which is no longer needed. We now register custom fonts at creation time. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::pruneTable): no longer need to delete/retire font data here, it will be handled in ~Document. (WebCore::CSSFontFaceSource::getFontData): register custom font to document's m_customFonts. * css/CSSFontSelector.cpp: * css/CSSFontSelector.h: remove function added in r94508, which is no longer needed. We now register custom fonts at creation time. * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::pruneTable): no longer need to delete/retire font data here, it will be handled in ~Document. (WebCore::CSSSegmentedFontFace::getFontData): register custom font to document's m_customFonts. * dom/Document.cpp: Change function names to registerCustomFont , deleteCustomFonts and local to m_customFont. (WebCore::Document::~Document): (WebCore::Document::recalcStyle): yanking out the comment. We no longer keep retired custom fonts. We clear all custom fonts on Document destruction. (WebCore::Document::registerCustomFont): (WebCore::Document::deleteCustomFonts): * dom/Document.h: 2011-10-13 Ryosuke Niwa Crash in DeleteSelectionCommand::handleGeneralDelete https://bugs.webkit.org/show_bug.cgi?id=70045 Reviewed by Darin Adler. Exit early when m_upstreamStart is null. No new tests because we don't have a reduction. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete): 2011-10-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=70049 [CSS Regions] Add a test of a float being pushed down because it can't fit next to another float and make sure it re-evaluates its position when it changes regions as a result of the push. Reviewed by Sam Weinig. Added new test in fast/regions. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeLogicalLocationForFloat): 2011-10-13 Adam Barth Move XSTL to script-src in Content-Security-Policy https://bugs.webkit.org/show_bug.cgi?id=63637 Reviewed by Eric Seidel. The spec was unclear about how to treat XSLT. My reading was that they should fall under style-src, but further discussion on the mailing list settled on using script-src because an XSLT can inject arbitrary DOM and script into a page, which is more risky than including style. Tests: http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-1.php http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-2.php * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::canRequest): 2011-10-13 Zeno Albisser [Qt] QtWebKit build error for Mac 32bit https://bugs.webkit.org/show_bug.cgi?id=69914 In WebCore.pro and QtWebKit.pro we define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES when compiling with ENABLE_VIDEO and with WTF_USE_QTKIT. But this is meant to be defined in NSGeometry.h under certain preconditions. Without setting NS_BUILD_32_LIKE_64 none of these preconditions is met and therefore NSGeometry.h will create several conflicting type definitions. With this patch we create consistent definitions again. Due to the order of include files we cannot remove NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES from WebCore.pro. Reviewed by Andreas Kling. * WebCore.pro: 2011-10-13 Tom Hudson Revert border radius clips (r95239) for Chromium due to performance issues. Update test expectations to skip border radius clip layout tests. https://bugs.webkit.org/show_bug.cgi?id=69844 Reviewed by Simon Fraser. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::clipToRect): Only process border radius clips #if !PLATFORM(CHROMIUM) 2011-10-13 Julien Chaffraix Deprecate event.layerX and event.layerY in WebKit https://bugs.webkit.org/show_bug.cgi?id=69951 Reviewed by Darin Adler. layerX and layerY were concepts of the old Netscape code that stayed in WebKit for a long time without changes. Now the code is completely wrong and Mozilla has expressed some interest in removing it from their API too. This is a first step in the removal as layerX and layerY are exposed in some APIs. Chromium and Win are fine with removing the property directly, but ObjC needs to deprecate them first. * bindings/objc/PublicDOMInterfaces.h: Mark the API as deprecated. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::layerX): (WebCore::MouseRelatedEvent::layerY): * dom/UIEvent.cpp: (WebCore::UIEvent::layerX): (WebCore::UIEvent::layerY): Added a call to warnDeprecatedLayerXYUsage in the previous functions. (WebCore::UIEvent::warnDeprecatedLayerXYUsage): Print a warning in the console about the removal of event.layerX and event.layerY in the near future. * dom/UIEvent.h: Added warnDeprecatedLayerXYUsage. 2011-10-03 Robert Hogan CSS 2.1 failure: inline-replaced-height-008.htm https://bugs.webkit.org/show_bug.cgi?id=69273 Reviewed by Simon Fraser. Test: css2.1/20110323/inline-block-replaced-height-008.html Per http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height, if 'height' has computed value of 'auto', the replaced element has an intrinsic ratio and its used width is known or resolved, then the used value of 'height' is determined by the equation (used width) / (intrinsic ratio). * rendering/RenderImage.cpp: (WebCore::RenderImage::computeReplacedLogicalHeight): * rendering/RenderReplaced.h: 2011-10-13 Sheriff Bot Unreviewed, rolling out r97362. http://trac.webkit.org/changeset/97362 https://bugs.webkit.org/show_bug.cgi?id=70039 Relies on V8 APIs that have been reverted upstream. (Requested by dglazkov on #webkit). * English.lproj/localizedStrings.js: * bindings/js/ScriptProfiler.cpp: * bindings/js/ScriptProfiler.h: * bindings/v8/ScriptProfiler.cpp: * bindings/v8/ScriptProfiler.h: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::create): (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): * inspector/InspectorProfilerAgent.h: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.hoverMessage): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotGenericObjectNode.prototype.hoverMessage): (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._showStringContentPopover): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype.updateStaticData): (WebInspector.HeapSnapshotNodesProvider.prototype._serialize): * inspector/front-end/HeapSnapshotProxy.js: * inspector/front-end/RemoteObject.js: * inspector/front-end/heapProfiler.css: 2011-10-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69932 Layout repainting messed up for objects in regions. There were two bugs here. The first is that the regionOverflowRect needs to at least be the size of the region's rect. When you're in the middle of layout, you haven't computed the overflow rect for the flow thread yet (the flow thread's height could even be 0), and so you just need to enforce a minimum size. Also removed the region-overflow:break clipping behavior, since it was established that was wrong. The second bug is that when you tell a region to repaint, you need to disable layout state, since applying layout deltas from the flow thread makes no sense. The region is in a totally different place in the render tree, so the current flow thread layout state can't be used to determine your coordinate offset. Reviewed by Dan Bernstein. Added fast/repaint test. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): 2011-10-13 Renata Hodovan FEComponentTransfer element doesn't support dynamic invalidation https://bugs.webkit.org/show_bug.cgi?id=69747 The dynamic changes are captured by the svgAttributeChange() function, and invalidate the filter primitive if necessary. invalidateFilterPrimitiveParent() is a new free function in SVGFilterPrimitiveStanardAttributes what makes the invalidation possible by objects not inherited from SVGFilterPrimitiveStanardAttributes too. This solution was used in SVGFEMergeNodeElement::svgAttributeChanged() previously and now it can use this new function too. Reviewed by Nikolas Zimmermann. Tests: svg/dynamic-updates/SVGFEComponentTransferElement-dom-amplitude-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-dom-exponent-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-dom-intercept-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-dom-offset-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-dom-slope-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-dom-type-attr.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-amplitude-prop.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-exponent-prop.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-intercept-prop.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-offset-prop.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-slope-prop.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-tableValues-prop.html svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-type-prop.html * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): * svg/SVGComponentTransferFunctionElement.h: * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::build): * svg/SVGFEMergeNodeElement.cpp: (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::invalidateFilterPrimitiveParent): * svg/SVGFilterPrimitiveStandardAttributes.h: 2011-10-13 Deepak Sherveghar REGRESSION (r95381): Standalone video can be focused and draws a focus ring. https://bugs.webkit.org/show_bug.cgi?id=69097 Reviewed by Eric Carlson. We don't want to focus a media element in a standalone document. Test: fast/events/media-focus-in-standalone-media-document.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::supportsFocus): return false if media element is in a standalone media document. 2011-10-13 Mikhail Naganov Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile. https://bugs.webkit.org/show_bug.cgi?id=61179 This is exteremely helpful when dealing with DOM wrappers, as their properties are mostly implemented with getters and thus not stored in heap snapshots. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): * bindings/js/ScriptProfiler.h: * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): * bindings/v8/ScriptProfiler.h: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::create): (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult): (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent): (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._showObjectPopover): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get canBeQueried): (WebInspector.HeapSnapshotNode.prototype.get flags): (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype._flagsOfNode): (WebInspector.HeapSnapshot.prototype._calculateFlags): (WebInspector.HeapSnapshot.prototype.updateStaticData): (WebInspector.HeapSnapshotNodesProvider.prototype._serialize): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.fromError): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight): 2011-10-13 Adam Barth script-src * should allow all URLs https://bugs.webkit.org/show_bug.cgi?id=70011 Reviewed by Eric Seidel. This patch gets us slightly ahead of the spec. Technically, script-src means "any host" and inherits the current scheme. However, that's not what developers expect and it's even contradicted by examples in the spec itself. After this patch, * matches all URLs. Test: http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html * page/ContentSecurityPolicy.cpp: (WebCore::CSPSourceList::CSPSourceList): (WebCore::CSPSourceList::matches): (WebCore::CSPSourceList::parseSource): (WebCore::CSPSourceList::addSourceStar): 2011-10-13 Kentaro Hara Implement an OverflowEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=69907 Reviewed by Adam Barth. There is no spec for the OverflowEvent constructor since it is WebKit-specific. However, judging from the current IDL of initOverflowEvent(), the constructor IDL should be as follows. [Constructor(DOMString type, optional OverflowEventInit eventInitDict)] interface OverflowEvent : Event { ...; } dictionary OverflowEventInit : EventInit { unsigned short orient; boolean horizontalOverflow; boolean verticalOverflow; } Note: In initOverflowEvent(), we cannot specify |bubbles| and |cancelable|. I do not know why, but we can find a comment in fast/events/script-tests/init-events.js that says "initOverflowEvent has an interface that has a design that's inconsistent with the init functions from other events". On the other hand, the above constructor enables to specify |bubbles| and |cancelable|, which is consistent with other constructors. Test: fast/events/constructors/overflow-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the OverflowEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for OverflowEvent. * dom/OverflowEvent.cpp: (WebCore::OverflowEventInit::OverflowEventInit): (WebCore::OverflowEvent::OverflowEvent): (WebCore::OverflowEvent::initOverflowEvent): * dom/OverflowEvent.h: Added a definition for OverflowEventInit. (WebCore::OverflowEvent::create): (WebCore::OverflowEvent::orient): (WebCore::OverflowEvent::horizontalOverflow): (WebCore::OverflowEvent::verticalOverflow): * dom/OverflowEvent.idl: Makes OverflowEvent constructible. 2011-10-13 Kent Tamura Cleanup of HTMLSelectElement https://bugs.webkit.org/show_bug.cgi?id=69908 Reviewed by Darin Adler. - Change the m_listItems type: Vector -> Vector - Rename a member: m_recalcListItems -> m_shouldRecalcListItems - Fold checkListItems() into listItems() - Style fixes No new tests, just a cleanup. * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::addChildren): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::listBoxOptionIndex): * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::addChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::stringValue): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (optionFromSelection): (webkit_accessible_selection_get_selection_count): * dom/OptionElement.cpp: (WebCore::OptionElement::optionIndex): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::HTMLSelectElement): (WebCore::HTMLSelectElement::add): (WebCore::HTMLSelectElement::value): (WebCore::HTMLSelectElement::setValue): (WebCore::HTMLSelectElement::parseMappedAttribute): (WebCore::HTMLSelectElement::recalcListItemsIfNeeded): (WebCore::HTMLSelectElement::setOption): (WebCore::HTMLSelectElement::setLength): (WebCore::HTMLSelectElement::nextValidIndex): (WebCore::HTMLSelectElement::firstSelectableListIndex): (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): (WebCore::HTMLSelectElement::selectAll): (WebCore::HTMLSelectElement::saveLastSelection): (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): (WebCore::HTMLSelectElement::updateListBoxSelection): (WebCore::HTMLSelectElement::listBoxOnChange): (WebCore::HTMLSelectElement::listItems): (WebCore::HTMLSelectElement::setRecalcListItems): (WebCore::HTMLSelectElement::recalcListItemsInternal): (WebCore::HTMLSelectElement::selectedIndex): (WebCore::HTMLSelectElement::setSelectedIndexInternal): (WebCore::HTMLSelectElement::optionToListIndex): (WebCore::HTMLSelectElement::listToOptionIndex): (WebCore::HTMLSelectElement::dispatchFocusEvent): (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): (WebCore::HTMLSelectElement::saveFormControlState): Use StringBuilder. (WebCore::HTMLSelectElement::restoreFormControlState): (WebCore::HTMLSelectElement::appendFormData): (WebCore::HTMLSelectElement::reset): (WebCore::HTMLSelectElement::menuListDefaultEventHandler): (WebCore::HTMLSelectElement::updateSelectedState): (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): (WebCore::HTMLSelectElement::lastSelectedListIndex): Optimize the code by iterating in the reverse order. (WebCore::HTMLSelectElement::typeAheadFind): (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): (WebCore::HTMLSelectElement::length): (WebCore::toSelectElement): * html/HTMLSelectElement.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): (WebCore::RenderListBox::addFocusRingRects): (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): (WebCore::RenderListBox::nodeAtPoint): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): (WebCore::RenderMenuList::setTextFromOption): (WebCore::RenderMenuList::itemText): (WebCore::RenderMenuList::itemAccessibilityText): (WebCore::RenderMenuList::itemToolTip): (WebCore::RenderMenuList::itemIsEnabled): (WebCore::RenderMenuList::itemStyle): (WebCore::RenderMenuList::itemBackgroundColor): (WebCore::RenderMenuList::itemIsSeparator): (WebCore::RenderMenuList::itemIsLabel): (WebCore::RenderMenuList::itemIsSelected): 2011-10-13 Adam Barth DOMWindow subobjects can be re-created after navigation https://bugs.webkit.org/show_bug.cgi?id=68849 Reviewed by Sam Weinig. Test: http/tests/security/xss-DENIED-getSelection-from-inactive-domwindow.html * page/DOMWindow.cpp: (WebCore::DOMWindow::~DOMWindow): - Add ASSERTs to show that we're not recreating these objects. - Add a call to clear() as defense in depth in case we have any of these objects hanging around. (WebCore::DOMWindow::clear): - Clear out a couple of objects that weren't getting cleared. These are actually not likely to cause problems, but clearing them out is the safe thing to do. (WebCore::DOMWindow::isActive): - Add a concept of whether the DOMWindow is "active" in its frame. We had this concept in a couple places already, but centralizing it into a helper function make it easier to use and talk about. (WebCore::DOMWindow::orientation): - Whitespace nit. (WebCore::DOMWindow::screen): (WebCore::DOMWindow::history): (WebCore::DOMWindow::crypto): (WebCore::DOMWindow::locationbar): (WebCore::DOMWindow::menubar): (WebCore::DOMWindow::personalbar): (WebCore::DOMWindow::scrollbars): (WebCore::DOMWindow::statusbar): (WebCore::DOMWindow::toolbar): (WebCore::DOMWindow::console): (WebCore::DOMWindow::applicationCache): (WebCore::DOMWindow::navigator): (WebCore::DOMWindow::performance): (WebCore::DOMWindow::location): (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): (WebCore::DOMWindow::webkitNotifications): (WebCore::DOMWindow::webkitIndexedDB): (WebCore::DOMWindow::getSelection): (WebCore::DOMWindow::styleMedia): (WebCore::DOMWindow::webkitURL): (WebCore::DOMWindow::webkitStorageInfo): - Avoid creating these objects when we're not active. That can only lead to sadness. (WebCore::DOMWindow::webkitRequestFileSystem): (WebCore::DOMWindow::webkitResolveLocalFileSystemURL): (WebCore::DOMWindow::openDatabase): (WebCore::DOMWindow::postMessage): - While not techincally creating subobjects, these functions also seem unwise when the DOMWindow is inactive. (WebCore::DOMWindow::find): (WebCore::DOMWindow::length): (WebCore::DOMWindow::getMatchedCSSRules): - These functions operate on the active Document. When we're not active, that's not us! (WebCore::DOMWindow::document): - Update to use the new concept of being active rather than having this function roll its own implementation. (WebCore::DOMWindow::webkitConvertPointFromNodeToPage): (WebCore::DOMWindow::webkitConvertPointFromPageToNode): (WebCore::DOMWindow::scrollBy): (WebCore::DOMWindow::scrollTo): - These functions also look unwise to run when inactive because they're reading information from the active document. - I added a RefPtr for node because the call to updateLayoutIgnorePendingStylesheets() seems likely to be able to run script somehow. (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): (WebCore::DOMWindow::dispatchLoadEvent): (WebCore::DOMWindow::dispatchEvent): - I don't think these functions worked when inactive anyway, but explicitly blocking them seems wise. (WebCore::DOMWindow::setLocation): (WebCore::DOMWindow::isInsecureScriptAccess): (WebCore::DOMWindow::open): (WebCore::DOMWindow::showModalDialog): - These already have checks for being active, but it can't hurt to be explicit at the top of the function. * page/DOMWindow.h: 2011-10-13 Kent Tamura REGRESSION(r89915): don't show the default value https://bugs.webkit.org/show_bug.cgi?id=69895 Reviewed by Hajime Morita. m_valueIfDirty became unexpectedly empty because EmailInputType::sanitizeValue() returned an empty string for a null input string. To solve this issue, HTMLInputElement::sanitizeValue() checks nullness, and remove the null check of sanitizeValue() of InputType subclasses. Also, we make InputType::sanitizeValue() const. * html/ColorInputType.cpp: (WebCore::ColorInputType::sanitizeValue): - Make this const. - Remove null check. * html/ColorInputType.h: Make sanitizeValue() const. * html/EmailInputType.cpp: (WebCore::EmailInputType::sanitizeValue): Make this const. * html/EmailInputType.h: Make sanitizeValue() const. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::sanitizeValue): (WebCore::HTMLInputElement::updateValueIfNeeded): * html/InputType.cpp: (WebCore::InputType::sanitizeValue): Returns a null string if the input string is null, and don't call InputType::sanitizeValue() in this case. * html/InputType.h: Make sanitizeValue() const. * html/NumberInputType.cpp: (WebCore::NumberInputType::sanitizeValue): Make this const. * html/NumberInputType.h: Make sanitizeValue() const. * html/RangeInputType.cpp: (WebCore::RangeInputType::sanitizeValue): - Make this const. - Remove null check. * html/RangeInputType.h: Make sanitizeValue() const. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::sanitizeValue): Make this const. * html/TextFieldInputType.h: Make sanitizeValue() const. 2011-10-12 Joseph Pecoraro Pass Parsed Accept Attribute MIME Types to WebKit Clients https://bugs.webkit.org/show_bug.cgi?id=69598 Reviewed by David Kilzer. No new tests. No new functionality in WebCore, just exposing more information to the WebKit port. * html/FileInputType.cpp: (WebCore::FileInputType::handleDOMActivateEvent): (WebCore::FileInputType::receiveDropForDirectoryUpload): Set the MIME type list on the FileChooser settings. * html/HTMLInputElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::acceptMIMETypes): Accessor for a parsed list of MIME types from the accept attribute. * platform/FileChooser.h: Add a slot for a MIME type list on the chooser settings. 2011-10-12 Joseph Pecoraro Pass Parsed Accept Attribute MIME Types to WebKit Clients https://bugs.webkit.org/show_bug.cgi?id=69598 Reviewed by Kent Tamura. Deprecate the old String version of getting the "accept" mime type values. Instead we will change to include a list of MIME types. * html/FileInputType.cpp: (WebCore::FileInputType::handleDOMActivateEvent): (WebCore::FileInputType::receiveDropForDirectoryUpload): * platform/FileChooser.h: 2011-10-12 Adam Barth Remove ENABLE(XHTMLMP) and associated code https://bugs.webkit.org/show_bug.cgi?id=69729 Reviewed by David Levin. As discussed on webkit-dev, we are removing this feature as part of our cleanup of unmaintained code in WebKit. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::isMediaDocument): * dom/Node.cpp: * dom/make_names.pl: (usesDefaultJSWrapper): * features.pri: * html/HTMLElement.cpp: (WebCore::HTMLElement::rendererIsNeeded): * html/HTMLElementsAllInOne.cpp: * html/HTMLNoScriptElement.cpp: Removed. * html/HTMLNoScriptElement.h: Removed. * html/HTMLTagNames.in: * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createParser): * loader/FrameLoader.cpp: * platform/wince/MIMETypeRegistryWinCE.cpp: (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): * xml/parser/XMLDocumentParser.h: (WebCore::XMLDocumentParser::isXHTMLDocument): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::endElementNs): (WebCore::XMLDocumentParser::endDocument): (WebCore::XMLDocumentParser::internalSubset): (WebCore::getEntityHandler): (WebCore::externalSubsetHandler): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseEndElement): (WebCore::XMLDocumentParser::endDocument): (WebCore::XMLDocumentParser::parseDtd): 2011-10-12 Kentaro Hara Implement a WebKitTransitionEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=69911 Reviewed by Adam Barth. Test: fast/events/constructors/webkit-transition-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added a WebKitTransitionEvent constructor. * dom/WebKitTransitionEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'. 2011-10-12 Kentaro Hara Implement a BeforeLoadEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=69893 Reviewed by Adam Barth. There is no spec for the BeforeLoadEvent constructor since it is WebKit-specific. However, judging from the current IDL of initBeforeLoadEvent(), the constructor IDL should be as follows. [Constructor(DOMString type, optional BeforeLoadEventInit eventInitDict)] interface BeforeLoadEvent : Event { ...; } dictionary BeforeLoadEventInit : EventInit { DOMString url; } Test: fast/events/constructors/before-load-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the BeforeLoadEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for BeforeLoadEvent. * dom/BeforeLoadEvent.h: Added a definition for BeforeLoadEventInit. (WebCore::BeforeLoadEventInit::BeforeLoadEventInit): (WebCore::BeforeLoadEvent::create): (WebCore::BeforeLoadEvent::initBeforeLoadEvent): (WebCore::BeforeLoadEvent::BeforeLoadEvent): * dom/BeforeLoadEvent.idl: Makes BeforeLoadEvent constructible. 2011-10-12 Ben Wells [skia] Implement Path.currentPoint for skia https://bugs.webkit.org/show_bug.cgi?id=69817 Replace FIXME with implementation. Reviewed by Kenneth Russell. * platform/graphics/skia/PathSkia.cpp: (WebCore::Path::currentPoint): 2011-10-12 Ben Wells Incorrect rendering with one-sided thick border and border-radius https://bugs.webkit.org/show_bug.cgi?id=38787 Reviewed by Simon Fraser. Incorrect rendering resulted when the inner border could not be properly represented as a rounded rectangle. When this happens, and the inner border is clipped out, the clipping code clips out the enclosing rectangle instead. This change addresses this by clipping in a different way in this case only. The inside is clipped out one side at a time with a rounded rect created by adjusting the unrenderable inner border rounded rectangle. The side polygon which is clipped to is also increased in this case to include the inside of the border so that no areas are missing. Test: fast/borders/border-radius-complex-inner.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintOneBorderSide): (WebCore::RenderBoxModelObject::paintBorder): (WebCore::calculateSideRectIncludingInner): (WebCore::calculateAdjustedInnerBorder): (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath): * rendering/RenderBoxModelObject.h: 2011-10-12 Luke Macpherson Clean up CSSPropertyTextDecoration implementation and ETextDecoration usage. https://bugs.webkit.org/show_bug.cgi?id=67625 Reviewed by Eric Seidel. No new tests - no functionality changed. The implementation of CSSPropertyTextDecoration is simlified because 1) CSSValueListIterator produces a valid iterator when no results available. 2) CSSParser only allows CSSValueNone or a list of appropriate idents. 3) CSSParser will treat a zero-length list as invalid at parse time. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ETextDecoration): Implement cast from CSSPrimitiveValue to ETextDecoration. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: Use ETextDecoration enum instead of int throughout. (WebCore::InheritedFlags::textDecorationsInEffect): (WebCore::InheritedFlags::textDecoration): (WebCore::InheritedFlags::addToTextDecorationsInEffect): (WebCore::InheritedFlags::setTextDecorationsInEffect): (WebCore::InheritedFlags::setTextDecoration): * rendering/style/RenderStyleConstants.h: Introduce constant for number of bits required to represent enum. (WebCore::operator|): Implement | operator for bitfield enum. (WebCore::operator|=): Implement |= operator for bitfield enum. * rendering/style/StyleVisualData.h: Use ETextDecoration instead of int. 2011-10-12 Tony Chang Implement -webkit-flex-align for cross axis alignment in flex-flow: row https://bugs.webkit.org/show_bug.cgi?id=69808 Reviewed by David Hyatt. Tests: css3/flexbox/flex-align-percent-height.html css3/flexbox/flex-align-vertical-writing-mode.html css3/flexbox/flex-align.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::isFlowAwareLogicalHeightAuto): (WebCore::RenderFlexibleBox::flowAwareContentLogicalHeight): (WebCore::RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight): (WebCore::RenderFlexibleBox::flowAwareMarginLogicalHeightForChild): (WebCore::RenderFlexibleBox::flowAwareLogicalLocationForChild): (WebCore::RenderFlexibleBox::layoutInlineDirection): (WebCore::RenderFlexibleBox::availableLogicalHeightForChild): (WebCore::RenderFlexibleBox::marginBoxAscent): (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): (WebCore::RenderFlexibleBox::adjustLocationLogicalTopForChild): (WebCore::RenderFlexibleBox::alignChildrenBlockDirection): * rendering/RenderFlexibleBox.h: 2011-10-12 Mihnea Ovidenie [CSS Regions]Remove -webkit-content-order property https://bugs.webkit.org/show_bug.cgi?id=69848 Reviewed by Tony Chang. -webkit-content-order property is removed from latest CSS Regions spec. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * dom/Node.cpp: (WebCore::Node::diff): * rendering/RenderFlowThread.cpp: (WebCore::compareRenderRegions): * rendering/RenderTreeAsText.cpp: (WebCore::writeRenderFlowThreads): * rendering/style/RenderStyle.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-10-12 Adam Bergkvist Update PeerConnection to use WebCore platform interfaces https://bugs.webkit.org/show_bug.cgi?id=68462 Reviewed by Adam Barth. Currently not testable. * WebCore.gypi: * WebCore.pro: * bindings/js/JSPeerConnectionCustom.cpp: (WebCore::JSPeerConnectionConstructor::constructJSPeerConnection): * bindings/v8/custom/V8PeerConnectionCustom.cpp: Removed. * dom/MediaStreamList.cpp: (WebCore::MediaStreamList::item): (WebCore::MediaStreamList::append): (WebCore::MediaStreamList::remove): (WebCore::MediaStreamList::contains): * dom/MediaStreamList.h: * p2p/PeerConnection.cpp: (WebCore::PeerConnection::create): (WebCore::PeerConnection::PeerConnection): (WebCore::PeerConnection::processSignalingMessage): (WebCore::PeerConnection::readyState): (WebCore::PeerConnection::send): (WebCore::PeerConnection::addStream): (WebCore::PeerConnection::removeStream): (WebCore::PeerConnection::localStreams): (WebCore::PeerConnection::remoteStreams): (WebCore::PeerConnection::close): (WebCore::PeerConnection::iceProcessingCompleted): (WebCore::PeerConnection::sdpGenerated): (WebCore::PeerConnection::dataStreamMessageReceived): (WebCore::PeerConnection::remoteStreamAdded): (WebCore::PeerConnection::remoteStreamRemoved): (WebCore::PeerConnection::scriptExecutionContext): (WebCore::PeerConnection::stop): (WebCore::PeerConnection::scheduleInitialNegotiation): (WebCore::PeerConnection::initialNegotiationTimerFired): (WebCore::PeerConnection::ensureStreamChangeScheduled): (WebCore::PeerConnection::streamChangeTimerFired): (WebCore::PeerConnection::scheduleReadyStateChange): (WebCore::PeerConnection::readyStateChangeTimerFired): (WebCore::PeerConnection::changeReadyState): * p2p/PeerConnection.h: (WebCore::PeerConnection::refEventTarget): (WebCore::PeerConnection::derefEventTarget): * p2p/PeerConnection.idl: * page/MediaStreamClient.h: * page/MediaStreamController.cpp: (WebCore::MediaStreamController::MediaStreamController): * page/MediaStreamController.h: * page/MediaStreamFrameController.cpp: * page/MediaStreamFrameController.h: 2011-10-12 Chris Fleizach AX: CrashTracer: [USER] 296 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityScrollbar::document const + 29 https://bugs.webkit.org/show_bug.cgi?id=69936 AX Scrollbars have a weak pointer to their parent. They need to become AccessibilityMockObjects, so that they can participate in the detachFromParent() methods that happens when those parents go away. Could not reproduce the crash, but the backtrace is unequivocal. Reviewed by Darin Adler. * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::removeChildScrollbar): * accessibility/AccessibilityScrollbar.cpp: (WebCore::AccessibilityScrollbar::AccessibilityScrollbar): * accessibility/AccessibilityScrollbar.h: (WebCore::AccessibilityScrollbar::scrollbar): (WebCore::AccessibilityScrollbar::isAccessibilityScrollbar): 2011-10-12 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69950 REGRESSION: Printing broken because of the isWritingModeRoot addition for unsplittable paginated content. Make sure not to include the RenderView when checking for writing mode roots. We only care about children that differ from their parents. Reviewed by Dimitri Glazkov. * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustForUnsplittableChild): * rendering/RenderBox.cpp: (WebCore::RenderBox::isUnsplittableForPagination): * rendering/RenderBox.h: 2011-10-12 Anna Cavender Moving ScriptExecutionContext to the front of the argument list for IDL constructors that use ConstructorWith=ScriptExecutionContext. https://bugs.webkit.org/show_bug.cgi?id=69799 Reviewed by Adam Barth. Tests: - http/tests/eventsource/* (for EventSource) - fast/filesystem/* (for Worker) * bindings/js/JSEventSourceCustom.cpp: (WebCore::JSEventSourceConstructor::constructJSEventSource): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorkerConstructor::constructJSWorker): * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::constructorCallback): * page/EventSource.cpp: (WebCore::EventSource::create): * page/EventSource.h: * workers/Worker.cpp: (WebCore::Worker::create): * workers/Worker.h: 2011-10-11 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69896 [CSS Regions] Make positioned blocks work with variable width regions. Make positioned objects able to position and size independently in each region. This involves lifting the restriction in renderBoxRegionInfo for positioned objects and passing in region information to computeLogicalWidthForPositioned so that it can compute answers for a given region. In order to make mixed writing modes work with positioned objects, this patch also takes some baby steps towards fixing differing writing modes in paginated environments. Reviewed by Sam Weinig. Added many new tests in fast/regions. * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): Disable pagination whenever differing writing modes are encountered. The block effectively becomes unsplittable (as though it was an image). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Remove a FIXME that looks incorrect now. (WebCore::RenderBlock::adjustPositionedBlock): Patch static inline position caching to call a new method that unshifts the position to put it back in the overall block's space rather than having it be per-region. (WebCore::RenderBlock::layoutPositionedObjects): Make sure to attempt to set a logicalTop for positioned objects before they lay out so that they have a chance of paginating correctly the first time around. If for some reason the top estimate proves to be incorrect, we lay out again. Technically this bug exists for multi-column and printing as well, but for now just fixing it for regions. (WebCore::RenderBlock::adjustForUnsplittableChild): Add writing mode roots to the set of objects we consider to be unsplittable. (WebCore::RenderBlock::setStaticInlinePositionForChild): New helper function that handles shifting the inline static position back into the overall block's space rather than leaving it in a translated region-specific space. * rendering/RenderBlock.h: (WebCore::RenderBlock::startOffsetForContent): New helper function for computing the start offset when no regions are involved. * rendering/RenderBlockLineLayout.cpp: (WebCore::setStaticPositions): (WebCore::RenderBlock::LineBreaker::nextLineBreak): Patched to call the new helper function, setStaticInlinePositionForChild. * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox): Patched to call the new helper function, setStaticInlinePositionForChild. (WebCore::RenderBox::computeLogicalWidthInRegion): Pass region information into the positioning logical width computation function. (WebCore::RenderBox::renderBoxRegionInfo): Remove the positioning restriction and properly compute shifting and left/right offsets for positioned objects. (WebCore::RenderBox::computeLogicalHeight): Add code for perpendicular flows that just positions the object within the first region it is encountered in. Since the object is unsplittable, this will work out. Should the object be so tall that it can't fit in any region, then the resulting rendering will potentially be terrible, but the expectation is that authors should avoid having perpendicular flows break across pages. (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Patched to handle regions when they are passed in. Also makes sure that the pagination direction axis computation uses the flow thread's first region when the flow thread is the positioned object's containing block. (WebCore::computeInlineStaticDistance): Patched to examine regions and to modify the static distance computation accordingly so that it is per-region. (WebCore::RenderBox::computePositionedLogicalWidth): Pass along the region information when computing the positioned logical width. (WebCore::computeLogicalLeftPositionedOffset): Handle the adjustment of the logical left offset for differing writing modes (in this case when the writing mode is flipped relative to us). (WebCore::RenderBox::computePositionedLogicalHeight): Deal with perpendicular writing modes and make sure the object is placed properly using the first region it occurs in. (WebCore::computeLogicalTopPositionedOffset): Remove code that is no longer needed. (WebCore::RenderBox::computePositionedLogicalWidthReplaced): Patched to pass in 0 instead of a region since replaced elements aren't handled yet. * rendering/RenderBox.h: Changing the computePositionedLogicalWidth method to take region information. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Didn't bother fixing deprecated flexible box, and the new flexbox still can't handle positioned objects. When it does, it will use the new method. Put in some FIXMEs to help the flexbox coders see the issue when they port the code over to the new flexbox. * rendering/RenderLayer.h: (WebCore::RenderLayer::staticInlinePosition): (WebCore::RenderLayer::staticBlockPosition): (WebCore::RenderLayer::setStaticInlinePosition): (WebCore::RenderLayer::setStaticBlockPosition): Patched to take LayoutUnits instead of ints. 2011-10-12 Nate Chapin Remove logging to determine how null v8::Contexts are happening, and check the return value of V8DOMWindowShell::initContextIfNeeded() before using the context it initialized. https://bugs.webkit.org/show_bug.cgi?id=68099 Reviewed by Adam Barth. No new tests, the only symptom is a crash without a known repro. * bindings/v8/ScriptController.cpp: * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): Return true if a context already existed. (WebCore::V8DOMWindowShell::namedItemAdded): Remove logging. * bindings/v8/V8Proxy.cpp: 2011-10-06 Robert Hogan CSS 2.1 failure: border-conflict-style-079 https://bugs.webkit.org/show_bug.cgi?id=69551 Reviewed by Antonio Gomes. * css/CSSValueKeywords.in: ridge and outset were the wrong way round * rendering/style/RenderStyleConstants.h: ditto 2011-10-12 Jian Li Support passing optional filename when FormData.append() is used to append a blob https://bugs.webkit.org/show_bug.cgi?id=69885 Reviewed by David Levin. Covered by existing test with new test case added: http/tests/local/formdata/send-form-data-with-sliced-file.html * bindings/js/JSDOMFormDataCustom.cpp: (WebCore::JSDOMFormData::append): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::appendCallback): * html/DOMFormData.cpp: (WebCore::DOMFormData::append): * html/DOMFormData.h: * html/DOMFormData.idl: * html/FormDataList.cpp: (WebCore::FormDataList::appendBlob): * html/FormDataList.h: (WebCore::FormDataList::Item::Item): (WebCore::FormDataList::Item::filename): (WebCore::FormDataList::appendBlob): * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems): 2011-10-12 Sergey Glazunov ScriptController::executeIfJavaScriptURL gets confused by synchronous frame loads https://bugs.webkit.org/show_bug.cgi?id=69777 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-synchronous-frame-load-in-javascript-url.html * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::replaceDocument): (WebCore::DocumentWriter::begin): * loader/DocumentWriter.h: 2011-10-12 Vsevolod Vlasov Web Inspector: Searching in multiple scripts in the scripts tab https://bugs.webkit.org/show_bug.cgi?id=38807 Reviewed by Pavel Feldman. Added support for advanced search capabilities in inspector by means of showing the new SearchView in Drawer. Advanced search is activated with Ctrl+Shift+F (Cmd+Shift+F) shortcut. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/AdvancedSearchController.js: Added. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/ScriptsSearchScope.js: Added. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.searchInContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (WebInspector.showViewInDrawer): * inspector/front-end/inspector.css: (.search-view): (.search-view .search-panel): (.search-view .search-results): (#search-results-pane-file-based .search-result): (#search-results-pane-file-based .search-result:first-child): (#search-results-pane-file-based .search-result .search-result-file-name): (#search-results-pane-file-based .search-result .search-result-matches-count): (#search-results-pane-file-based .search-match): (#search-results-pane-file-based .search-match .webkit-line-number.search-match-line-number): (#search-results-pane-file-based .search-match:not(:hover) .webkit-line-number.search-match-line-number): (#search-results-pane-file-based .search-match:hover): (#search-results-pane-file-based .search-match .highlighted-match): (#search-results-pane-file-based a): (#search-results-pane-file-based .search-match .search-match-content): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): * inspector/front-end/utilities.js: (): 2011-10-12 Vsevolod Vlasov Web Inspector: Fix Drawer to make it possible to show views other than Console. https://bugs.webkit.org/show_bug.cgi?id=69831 Reviewed by Pavel Feldman. Animation type extracted to distinguish between slow and normal animation and immediate show/hide. Implemented correct console toggle button behavior on showing views other than console in Drawer. View shown in Drawer is now shown in drawer-contents div with common styles moved there. Removed unused "_safelyRemoveChildren" method from Drawer. * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel.prototype.show): (WebInspector.ConsolePanel.prototype.hide): * inspector/front-end/Drawer.js: (WebInspector.Drawer): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype._animationDuration): * inspector/front-end/inspector.css: (body.drawer-visible #drawer-contents): * inspector/front-end/inspector.js: (WebInspector._toggleConsoleButtonClicked): (WebInspector._escPressed): (WebInspector.showViewInDrawer): (WebInspector.documentKeyDown): 2011-10-12 Yury Semikhatsky [v8] Use V8DOMWrapper::isWrapperOfType for determining global object type https://bugs.webkit.org/show_bug.cgi?id=69923 Get rid of globalObjectPrototypeIsDOMWindow, use V8DOMWrapper::isWrapperOfType instead. Reviewed by Pavel Feldman. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): (WebCore::V8DOMWrapper::getEventListener): 2011-10-12 Yury Semikhatsky [Chromium] Web Inspector: assertion failure when evaluating expression in worker inspector console https://bugs.webkit.org/show_bug.cgi?id=69922 Check that the global object is a DOMWindow wrapper befor casting it to V8DOMWindow. Reviewed by Pavel Feldman. * bindings/v8/ScriptState.cpp: (WebCore::ScriptState::domWindow): 2011-10-12 Yuta Kitamura WebSocket: Update WebSocket protocol to hybi-17 https://bugs.webkit.org/show_bug.cgi?id=69910 Reviewed by Kent Tamura. Essential changes between hybi-10 and hybi-17 are: - Sec-WebSocket-Origin header has been renamed to "Origin". - Sec-WebSocket-Version header value has been bumped to 13. No new tests are necessary. pywebsocket has already been updated to the latest version which understands the new protocol. Tests under http/tests/websocket/ should keep passing. * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): 2011-10-11 Antti Koivisto Resolve regular and visited link style in a single pass https://bugs.webkit.org/show_bug.cgi?id=69838 Reviewed by Darin Adler We can simplify and speed up selector matching by removing the recursive matching done to generate the style for the :visited pseudo selector. Both regular and visited link style can be generated in a single pass through the style selector. - Make SelectorChecker::checkSelector to return both :visited and :link matches for all links. - For each selector statically determine and cache the link states it may match. - When applying the matched style declarations, apply them to the right RenderStyle (regular, visited, or both). Statically determining which link state will be matched works since we only support :visited matching based on the current element state (not ancestors or siblings). A later patch will eliminate the separate RenderStyle for visited style completely and include the few allowed properties to the regular RenderStyle. * css/CSSStyleSelector.cpp: (WebCore::RuleData::linkMatchType): (WebCore::RuleSet::linkPseudoClassRules): (WebCore::CSSStyleSelector::addMatchedDeclaration): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::CSSStyleSelector::updateFont): (WebCore::CSSStyleSelector::checkSelector): (WebCore::RuleData::RuleData): (WebCore::RuleSet::addRule): (WebCore::RuleSet::collectFeatures): (WebCore::RuleSet::shrinkToFit): (WebCore::CSSStyleSelector::applyDeclaration): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::MatchedStyleDeclaration::MatchedStyleDeclaration): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::SelectorChecker): (WebCore::SelectorChecker::checkSelector): (WebCore::SelectorChecker::fastCheckRightmostSelector): (WebCore::SelectorChecker::fastCheckSelector): (WebCore::SelectorChecker::checkOneSelector): (WebCore::SelectorChecker::commonPseudoClassSelectorMatches): (WebCore::SelectorChecker::determineLinkMatchType): * css/SelectorChecker.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::addCachedPseudoStyle): 2011-10-12 Kent Tamura REGRESSION(r94836): An assertion fails in HTMLFormControlElement::isValidFormControlElement when HTMLInputElement::setValue() is called while the element is focused. https://bugs.webkit.org/show_bug.cgi?id=69909 Reviewed by Ryosuke Niwa. setNeedsValidityCheck() should be called after the value update and before any style recalculation. r94836 moved setSelectionRange() call, and it recalculates the element style. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Move setNeedsValidityCheck() to setValueInternal(). (WebCore::HTMLInputElement::setValueInternal): Move setNeedsValidityCheck() from setValue(). 2011-10-12 Kent Tamura Build fixes for r97238. https://bugs.webkit.org/show_bug.cgi?id=69828 * GNUmakefile.list.am: Remove SelectElement.{cpp,h}. * dom/DOMAllInOne.cpp: Remove SelectElement.cpp. 2011-10-12 Kent Tamura Move the content of SelectElementData into HTMLSelectElement, and remove SelectElement.{cpp,h} https://bugs.webkit.org/show_bug.cgi?id=69828 Reviewed by Darin Adler. - Move all of the data members of SelectElementData to HTMLSelectElement, and their accessor functions are not needed anymore. - Move SelectElementData::useMenuList() to HTMLSelectElement. No new tests, just a refactoring. * CMakeLists.txt: Remove SelectElement.cpp. * WebCore.gypi: Remove SelectElement.{cpp,h}. * WebCore.pro: ditto. * WebCore.vcproj/WebCore.vcproj: ditto. * WebCore.xcodeproj/project.pbxproj: ditto. * dom/OptionElement.cpp: Remove a reference to SelectElement.h. * dom/SelectElement.cpp: Removed. * dom/SelectElement.h: Removed. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::HTMLSelectElement): Initializes the moved data members. (WebCore::HTMLSelectElement::formControlType): (WebCore::HTMLSelectElement::setSelectedIndexByUser): (WebCore::HTMLSelectElement::activeSelectionStartListIndex): (WebCore::HTMLSelectElement::activeSelectionEndListIndex): (WebCore::HTMLSelectElement::parseMappedAttribute): (WebCore::HTMLSelectElement::canSelectAll): (WebCore::HTMLSelectElement::createRenderer): (WebCore::HTMLSelectElement::setOption): (WebCore::HTMLSelectElement::selectAll): (WebCore::HTMLSelectElement::saveLastSelection): (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): (WebCore::HTMLSelectElement::setActiveSelectionEndIndex): (WebCore::HTMLSelectElement::updateListBoxSelection): (WebCore::HTMLSelectElement::listBoxOnChange): (WebCore::HTMLSelectElement::menuListOnChange): (WebCore::HTMLSelectElement::scrollToSelection): (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): (WebCore::HTMLSelectElement::setRecalcListItems): (WebCore::HTMLSelectElement::recalcListItemsInternal): (WebCore::HTMLSelectElement::setSelectedIndexInternal): (WebCore::HTMLSelectElement::dispatchFocusEvent): (WebCore::HTMLSelectElement::dispatchBlurEvent): (WebCore::HTMLSelectElement::parseMultipleAttribute): (WebCore::HTMLSelectElement::reset): (WebCore::HTMLSelectElement::menuListDefaultEventHandler): (WebCore::HTMLSelectElement::updateSelectedState): (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): (WebCore::HTMLSelectElement::defaultEventHandler): (WebCore::HTMLSelectElement::typeAheadFind): (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::size): (WebCore::HTMLSelectElement::multiple): (WebCore::HTMLSelectElement::usesMenuList): 2011-10-12 Ryosuke Niwa Chromium Mac build fix after r97227. * platform/chromium/ScrollbarThemeChromiumMac.mm: (+[ScrollbarPrefsObserver appearancePrefsChanged:]): 2011-10-11 Antoine Labour Separate compositor client thread from webkit's main thread. https://bugs.webkit.org/show_bug.cgi?id=69048 Reviewed by Darin Fisher. Covered by compositing tests. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): * platform/graphics/chromium/cc/CCMainThread.cpp: * platform/graphics/chromium/cc/CCMainThread.h: * platform/graphics/chromium/cc/CCProxy.cpp: (WebCore::CCProxy::isMainThread): (WebCore::CCProxy::setMainThread): (WebCore::CCProxy::CCProxy): * platform/graphics/chromium/cc/CCProxy.h: 2011-10-11 Simon Fraser Fix Leopard and Snow Leopard builds, which don't use the scrollbar painter. * platform/mac/ScrollAnimatorMac.mm: 2011-10-11 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by Darin Adler. Use ScrollbarThemeMock when the setting to use mock scrollbars is enabled. Make ScrollbarTheme::nativeTheme() private, and add a new static theme() method that reads the setting, and returns the mock theme if set. All callers now use theme() rther than nativeTheme(). Add the new ScrollbarTheme.cpp file to the build. Fix scroll animator code for Mac and Chromium that was casting the ScrollbarTheme without type-checking it to test whether it's the mock theme. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::startRepeatingTimer): * platform/ScrollAnimatorWin.cpp: (WebCore::ScrollAnimatorWin::scroll): (WebCore::ScrollAnimatorWin::accelerationTime): (WebCore::ScrollAnimatorWin::animateScroll): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setScrollbarOverlayStyle): * platform/Scrollbar.cpp: (WebCore::Scrollbar::maxOverlapBetweenPages): (WebCore::Scrollbar::Scrollbar): * platform/ScrollbarTheme.cpp: Copied from Source/WebCore/platform/mock/ScrollbarThemeMock.h. (WebCore::ScrollbarTheme::theme): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::isMockTheme): * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::layout): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::chromiumScrollbarTheme): (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle): * platform/chromium/ScrollbarThemeChromiumMac.mm: (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (+[ScrollbarPrefsObserver behaviorPrefsChanged:]): * platform/mac/ScrollAnimatorMac.mm: (WebCore::macScrollbarTheme): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::updateScrollerStyle): * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): * platform/mock/ScrollbarThemeMock.h: (WebCore::ScrollbarThemeMock::isMockTheme): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::calculatePositionAndSize): * rendering/RenderLayer.cpp: (WebCore::cornerRect): * rendering/RenderScrollbarPart.cpp: (WebCore::calcScrollbarThicknessUsing): * rendering/RenderScrollbarTheme.h: (WebCore::RenderScrollbarTheme::scrollbarThickness): (WebCore::RenderScrollbarTheme::buttonsPlacement): (WebCore::RenderScrollbarTheme::shouldCenterOnThumb): (WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): (WebCore::RenderScrollbarTheme::autoscrollTimerDelay): (WebCore::RenderScrollbarTheme::registerScrollbar): (WebCore::RenderScrollbarTheme::unregisterScrollbar): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::scrollbarThickness): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::menuListInternalPadding): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::adjustInnerSpinButtonStyle): 2011-10-11 Kentaro Hara Implement a WebKitTransitionEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=69829 Reviewed by Adam Barth. There is no spec for the WebKitTransitionEvent constructor since it is WebKit-specific. However, judging from the current IDL of initWebKitTransitionEvent(), the constructor IDL should be as follows. [Constructor(DOMString type, optional WebKitTransitionEventInit eventInitDict)] interface WebKitTransitionEvent : Event { ...; } dictionary WebKitTransitionEventInit : EventInit { DOMString propertyName; double elapsedTime; } Test: fast/events/constructors/webkit-transition-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the WebKitTransitionEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitTransitionEvent. * dom/WebKitTransitionEvent.cpp: (WebCore::WebKitTransitionEventInit::WebKitTransitionEventInit): (WebCore::WebKitTransitionEvent::WebKitTransitionEvent): (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent): * dom/WebKitTransitionEvent.h: Added a definition for WebKitTransitionEventInit. (WebCore::WebKitTransitionEvent::create): (WebCore::WebKitTransitionEvent::isWebKitTransitionEvent): * dom/WebKitTransitionEvent.idl: Makes WebKitTransitionEvent constructible. 2011-10-11 Sameer Patil :checked pseudo selector not matching selected option https://bugs.webkit.org/show_bug.cgi?id=63192 Reviewed by Kent Tamura. Test: fast/css/checked-pseudo-selector.html Option element selected state need to be checked in checkOneSelector, so that it can be considered as checked on querySelectorAll(':checked'). * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): 2011-10-11 Ryuan Choi StorageAreaSync::sync needs a transaction for better performance. https://bugs.webkit.org/show_bug.cgi?id=57694 Reviewed by Darin Adler. For now, StorageAreaSync::sync execute SQLite operations for all items outside a transaction. However, SQLite operations outside a transaction are all atomic and thus writes will block on I/O, which makes the process slow during heavy I/O. This wrapped them with BEGIN TRANSACTION and END TRANSACTION for the better performance. No new tests required. No functional changes if transaction doesn't fail. And also, it is difficult to test the case of transaction fails. * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::sync): 2011-10-11 Ojan Vafai margin-right is ignored with vertical writing mode https://bugs.webkit.org/show_bug.cgi?id=69686 Reviewed by Darin Adler. We need to use the parent's writing mode when grabbing the margin start/end for the purposes of computing the parent's preferred widths. Test: fast/writing-mode/margins.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): * rendering/RenderBlock.h: 2011-10-11 Sheriff Bot Unreviewed, rolling out r97202, r97207, and r97215. http://trac.webkit.org/changeset/97202 http://trac.webkit.org/changeset/97207 http://trac.webkit.org/changeset/97215 https://bugs.webkit.org/show_bug.cgi?id=69894 Broke builds (Requested by rniwa on #webkit). * platform/PopupMenuClient.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): * rendering/RenderMenuList.h: * rendering/RenderObject.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::showPopup): * rendering/RenderTextControlSingleLine.h: * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: 2011-10-11 Martin Robinson [Soup] ResourceHandleSoup does not handle encodedBlobData https://bugs.webkit.org/show_bug.cgi?id=52092 Reviewed by Gustavo Noronha Silva. Add support for sending encoded blob data during requests. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::addFileToSoupMessageBody): Added this helper. (WebCore::blobIsOutOfDate): Ditto. (WebCore::addEncodedBlobItemToSoupMessageBody): Ditto. (WebCore::addEncodedBlobToSoupMessageBody): Ditto. (WebCore::addFormElementsToSoupMessage): No longer flatten form data, as we cannot do this in the case where the form data contains blobs. Now handle the blob case. (WebCore::loadResourceSynchronously): Add blob support for synchronous loading. 2011-10-11 Chris Rogers Heap buffer overflow in Webaudio FFTFrame::doFFT https://bugs.webkit.org/show_bug.cgi?id=69447 Reviewed by Kenneth Russell. No new tests. This only changes internal implementation details. * platform/audio/HRTFKernel.cpp: (WebCore::extractAverageGroupDelay): * platform/audio/HRTFPanner.cpp: (WebCore::HRTFPanner::fftSizeForSampleRate): 2011-10-11 Ryosuke Niwa Second Qt minimum release build fix attempt after r97163. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): 2011-10-11 Ryosuke Niwa Qt minimum release build fix attempt after r97163. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): 2011-10-11 Oliver Hunt Clang build broken https://bugs.webkit.org/show_bug.cgi?id=69891 Reviewed by Darin Adler. Rename CachedResourceClient::type to CachedResourceClient::resourceClientType to avoid conflict in CSSImportRule. * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::didAddClient): * loader/cache/CachedFont.cpp: (WebCore::CachedFont::didAddClient): * loader/cache/CachedFont.h: (WebCore::CachedFontClient::resourceClientType): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::didAddClient): * loader/cache/CachedImage.h: (WebCore::CachedImageClient::resourceClientType): * loader/cache/CachedResourceClient.h: (WebCore::CachedResourceClient::resourceClientType): * loader/cache/CachedResourceClientWalker.h: (WebCore::CachedResourceClientWalker::next): * loader/cache/CachedStyleSheetClient.h: (WebCore::CachedStyleSheetClient::resourceClientType): * loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::didAddClient): 2011-10-11 Ryosuke Niwa Dir attribute is converted into direction property when merging paragraphs https://bugs.webkit.org/show_bug.cgi?id=69680 Reviewed by Enrica Casucci. Don't include direction and unicode-bidi properties in the wrapping style. Tests: editing/deleting/merge-paragraph-into-h1-with-dir-2.html editing/deleting/merge-paragraph-into-h1-with-dir.html * editing/EditingStyle.cpp: (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Skip unicode-bidi and direction properties. (WebCore::EditingStyle::wrappingStyleForSerialization): Extracted from StyledMarkupAccumulator::serializeNodes. * editing/EditingStyle.h: * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::serializeNodes): Calls wrappingStyleForSerialization. 2011-10-11 Nico Weber [chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes. https://bugs.webkit.org/show_bug.cgi?id=69589 Reviewed by Dirk Pranke. When building with `make -j40`, all the binding rules are built en bloc. Since this script currently uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of 255 by default, so the build used to fail with "open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60" As a fix, use execvp() instead, which replaces the current process instead of spawning a new one. * WebCore.gyp/scripts/rule_binding.py: 2011-10-11 Fady Samuel Towards making PopupMenuClient more testable https://bugs.webkit.org/show_bug.cgi?id=69631 Reviewed by Simon Fraser. Added some functions to window.internals to allow testing of parts of PopupMenuClient. Test: fast/dom/popup-menu-client-test.html * platform/PopupMenuClient.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): (WebCore::RenderMenuList::boundingBoxRect): * rendering/RenderMenuList.h: (WebCore::RenderMenuList::RenderMenuList::isPopupMenuClient): * rendering/RenderObject.h: (WebCore::RenderObject::isPopupMenuClient): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::boundingBoxRect): * rendering/RenderTextControlSingleLine.h: (WebCore::RenderTextControlSingleLine::isPopupMenuClient): * testing/Internals.cpp: (WebCore::Internals::toPopupMenuClient): (WebCore::Internals::popupClientPaddingLeft): (WebCore::Internals::popupClientPaddingRight): (WebCore::Internals::popupClientBoundingBoxRect): * testing/Internals.h: * testing/Internals.idl: 2011-10-11 Nate Chapin Make CachedResourceClientWalker templates, and have it check and filter out bad casts when iterating (currently we rely on CachedResourceClients being careful to inherit from the right subclass for the type of resource they want to load). https://bugs.webkit.org/show_bug.cgi?id=69877 Reviewed by Adam Barth. No new tests, no functionality change. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/cache/CachedCSSStyleSheet.cpp: * loader/cache/CachedFont.cpp: * loader/cache/CachedFont.h: * loader/cache/CachedImage.cpp: * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: * loader/cache/CachedResourceClient.h: * loader/cache/CachedResourceClientWalker.cpp: Removed. * loader/cache/CachedResourceClientWalker.h: * loader/cache/CachedStyleSheetClient.h: * loader/cache/CachedXSLStyleSheet.cpp: 2011-10-11 W. James MacLean [chromium] Fix compilation guards in ScrollAnimatorNone (GESTURE_EVENTS). https://bugs.webkit.org/show_bug.cgi?id=69853 Reviewed by Kenneth Russell. Adding missing guards ENABLE(GESTURE_EVENTS) in ScrollAnimatorNone. So far this hasn't been a problem since GESTURE_EVENTS are usually turned on whenever SMOOTH_SCROLLING is, but it could be a problem if this changes. No new tests (compilation without errors is the test). * platform/ScrollAnimatorNone.cpp: * platform/ScrollAnimatorNone.h: 2011-10-11 Kenneth Russell [chromium] Check for lost context at beginning of compositor's execution https://bugs.webkit.org/show_bug.cgi?id=69776 Reviewed by James Robinson. Test: platform/chromium/compositing/webgl-loses-compositor-context.html * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): 2011-10-11 W. James MacLean Loss of precision when converting from double to int and double to float in FrameView::zoomAnimatorTransformChanged() https://bugs.webkit.org/show_bug.cgi?id=69739 Reviewed by Simon Fraser. Change 'double' parameters in FrameView:: & ScrollableArea::zoomAnimatorTransformChanged() to 'float' to avoid loss of precision warnings when invoking setPageScalefactor. Test coverage provided by existing zoom-animator tests. * page/FrameView.cpp: (WebCore::FrameView::zoomAnimatorTransformChanged): * page/FrameView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::zoomAnimatorTransformChanged): * platform/ScrollableArea.h: 2011-10-11 No'am Rosenthal Unreviewed build fix, unbreaking the Qt minimal bot. Some #ifdef ENABLED(TILED_BACKING_STORE) clauses were missing. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::computeTiles): (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::paintSelf): 2011-10-11 Abhishek Arya Generalize r95461 change to include table-cell and allow splitting between :before, :after content. https://bugs.webkit.org/show_bug.cgi?id=69854 Reviewed by Eric Seidel. Test: fast/table/table-row-before-after-content-around-table-cell.html * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): 2011-10-11 Dominic Mazzoni AccessibilityMenuList should fire change notification when popup is not open. https://bugs.webkit.org/show_bug.cgi?id=69440 Reviewed by Chris Fleizach. Test: accessibility/menu-list-sends-change-notification.html * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::didUpdateActiveOption): 2011-10-11 Joshua Bell IndexedDB: implement IDBFactory.cmp method https://bugs.webkit.org/show_bug.cgi?id=62293 Reviewed by Tony Chang. * storage/IDBFactory.cpp: (WebCore::IDBFactory::cmp): * storage/IDBFactory.h: * storage/IDBFactory.idl: * storage/IDBKey.cpp: (WebCore::IDBKey::compare): (WebCore::IDBKey::isLessThan): (WebCore::IDBKey::isEqual): * storage/IDBKey.h: 2011-10-11 No'am Rosenthal [Texmap] TextureMapperGL leaves GL in a modified state. https://bugs.webkit.org/show_bug.cgi?id=68983 Reviewed by Andreas Kling. Disable the vertexAttribArray after clipping. No new functionality so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::beginClip): 2011-10-11 No'am Rosenthal [Qt][WK2] Synchronize tiling with accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=69151 Reviewed by Kenneth Rohde Christiansen. Enable "externally managed" tiles in TextureMapperNodes. Currently, TextureMapperNodes manage tiles themselves, the tiles being there only to overcome the 2k texture size limitation. For WebKit2, we want those tiles to be managed externally, namely through the web process via the remote tile backend for TiledBackingStore. This patch adds a store for those externally managed tiles, and adds the necessary code to paint them instead of the owned tiles when appropriate. In addition, in order to support externally managed remote tiles, we have to calculate per- layer visible rects and pass them to the web process. The new collectVisibleContentRects does this - and is directly tied to the externally-managed tile approach. Code is disabled for now, but covered by existing compositing tests. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::computeTiles): (WebCore::clampRect): (WebCore::TextureMapperNode::collectVisibleContentRects): (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::targetRectForTileRect): (WebCore::TextureMapperNode::paintSelf): (WebCore::TextureMapperNode::createContentsTile): (WebCore::TextureMapperNode::removeContentsTile): (WebCore::TextureMapperNode::setTileBackBufferTextureForDirectlyCompositedImage): (WebCore::TextureMapperNode::clearAllDirectlyCompositedImageTiles): (WebCore::TextureMapperNode::setContentsTileBackBuffer): (WebCore::TextureMapperNode::swapContentsBuffers): (WebCore::TextureMapperNode::syncCompositingStateSelf): (WebCore::TextureMapperNode::syncCompositingState): * platform/graphics/texmap/TextureMapperNode.h: (WebCore::TextureMapperNode::size): (WebCore::TextureMapperNode::setTileOwnership): (WebCore::TextureMapperNode::setID): (WebCore::TextureMapperNode::id): (WebCore::TextureMapperNode::texture): (WebCore::TextureMapperNode::ExternallyManagedTile::ExternallyManagedTile): (WebCore::TextureMapperNode::State::State): 2011-10-11 Claudio Saavedra [GTK] GtkAuthenticationDialog: use GtkGrid instead of GtkTable https://bugs.webkit.org/show_bug.cgi?id=69749 Reviewed by Martin Robinson. * platform/gtk/GtkAuthenticationDialog.cpp: (WebCore::addEntryToGrid): Migrate to GtkGrid when using GTK+ 3 (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Ditto. 2011-10-11 Alexey Proskuryakov Build fix. * WebCore.exp.in: Export GraphicsContext::clearShadow(). 2011-10-10 Adam Klein [MutationObservers] Add stub implementation of WebKitMutationObserver https://bugs.webkit.org/show_bug.cgi?id=68949 Reviewed by Ryosuke Niwa, Oliver Hunt, and Dimitri Glazkov. See https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug. This patch adds a stub WebKitMutationObserver and its supporting classes MutationCallback and MutationObserverOptions. No implementation is provided for the all-important observe() and disconnect() methods. Note that WebKitMutationObserver is vendor-prefixed since it has a constructor exposed on DOMWindow. None of the rest of the API needs prefixing, as it's only available via a call through a MutationObserver callback (created by instantiating WebKitMutationObserver). Given the number of files required to get just the stub up and running, it seems reasonable to leave the actual implementation for the next patch (or more likely several patches). I've left FIXMEs in all the places that'll need augmentation. Tests: fast/mutation/mutation-observer-constructor.html fast/mutation/observe-exceptions.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDictionary.h: (WebCore::JSDictionary::tryGetProperty): * bindings/js/JSMutationCallbackCustom.cpp: Added. (WebCore::JSMutationCallback::handleEvent): * bindings/js/JSWebKitMutationObserverCustom.cpp: Added. (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver): (WebCore::JSWebKitMutationObserver::observe): * bindings/v8/custom/V8MutationCallbackCustom.cpp: Added. (WebCore::V8MutationCallback::handleEvent): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: Added. (WebCore::V8WebKitMutationObserver::constructorCallback): (WebCore::V8WebKitMutationObserver::observeCallback): * dom/MutationCallback.h: Added. (WebCore::MutationCallback::~MutationCallback): * dom/MutationCallback.idl: Added. * dom/MutationObserverOptions.h: Added. (WebCore::MutationObserverOptions::create): (WebCore::MutationObserverOptions::childList): (WebCore::MutationObserverOptions::setChildList): (WebCore::MutationObserverOptions::attributes): (WebCore::MutationObserverOptions::setAttributes): (WebCore::MutationObserverOptions::characterData): (WebCore::MutationObserverOptions::setCharacterData): (WebCore::MutationObserverOptions::subtree): (WebCore::MutationObserverOptions::setSubtree): (WebCore::MutationObserverOptions::attributeOldValue): (WebCore::MutationObserverOptions::setAttributeOldValue): (WebCore::MutationObserverOptions::characterDataOldValue): (WebCore::MutationObserverOptions::setCharacterDataOldValue): (WebCore::MutationObserverOptions::MutationObserverOptions): * dom/WebKitMutationObserver.cpp: Added. (WebCore::WebKitMutationObserver::create): (WebCore::WebKitMutationObserver::WebKitMutationObserver): (WebCore::WebKitMutationObserver::~WebKitMutationObserver): (WebCore::WebKitMutationObserver::observe): (WebCore::WebKitMutationObserver::disconnect): * dom/WebKitMutationObserver.h: Added. * dom/WebKitMutationObserver.idl: Added. * page/DOMWindow.idl: 2011-10-11 Arun Patole Need more efficient ways to set inline CSS styles https://bugs.webkit.org/show_bug.cgi?id=58157 Reviewed by Dimitri Glazkov. No new tests added as this is just a code optimization. Code optimization: -Used CSSPropertyNames, CSSValues and CSSPrimitiveValues instead of Strings. -Removed displayString(), webkitTransitionString(), opacityString() functions as they will no longer be needed after this change. -Moved makeOpaque and makeTransparent functionality to MediaControlPanelElement from MediaControlRootElement. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRateChanged): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlElement::show): (WebCore::MediaControlElement::hide): (WebCore::MediaControlPanelElement::MediaControlPanelElement): (WebCore::MediaControlPanelElement::makeOpaque): (WebCore::MediaControlPanelElement::makeTransparent): (WebCore::MediaControlInputElement::show): (WebCore::MediaControlInputElement::hide): * html/shadow/MediaControlElements.h: * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::MediaControlRootElement): (WebCore::MediaControlRootElement::makeOpaque): (WebCore::MediaControlRootElement::makeTransparent): * html/shadow/MediaControlRootElement.h: * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::makeOpaque): (WebCore::MediaControlRootElementChromium::makeTransparent): 2011-10-11 Pavel Feldman Web Inspector: make Extensions component compile. https://bugs.webkit.org/show_bug.cgi?id=69833 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/BinarySearch.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.Network.prototype.addRequestHeaders): (injectedExtensionAPI.AuditResultImpl.prototype.addResult): (injectedExtensionAPI.AuditResultNode.prototype.addChild): * inspector/front-end/ExtensionAuditCategory.js: * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionSidebarPane.prototype.setExpression): * inspector/front-end/ExtensionRegistryStub.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._postNotification): (WebInspector.ExtensionServer.prototype._onAddRequestHeaders): (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage): (WebInspector.ExtensionServer.prototype._registerExtension): (WebInspector.ExtensionStatus): * inspector/front-end/NetworkLog.js: (WebInspector.NetworkLog.prototype._onResourceStarted): * inspector/front-end/Object.js: (WebInspector.Object.prototype.dispatchEventToListeners): * inspector/front-end/externs.js: (console.warn): (console.assert): (console.error): (): (AuditResult): (EventSink): (ExtensionSidebarPane): (Panel): (PanelWithSidebar): (Request): (Resource): (Timeline): 2011-10-05 Pavel Podivilov Web Inspector: implement CompilerSourceMappingProvider. https://bugs.webkit.org/show_bug.cgi?id=69423 Reviewed by Pavel Feldman. CompilerSourceMappingProvider implements a cross-domain communication channel for loading source mappings and source files. Front-end page can't send XHRs to source mapping server directly due to SOP restrictions. Instead, we inject an invisible iframe that is loaded from source mapping server and use window.postMessage to communicate with it. iframe has a different origin and thus doesn't have access to front-end window. Test: http/tests/inspector/compiler-source-mapping-provider.html * inspector/front-end/CompilerSourceMappingProvider.js: (WebInspector.CompilerSourceMappingProvider): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping.frameLoaded.didLoadData): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping.frameLoaded): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode): (WebInspector.CompilerSourceMappingProvider.prototype._sendRequest): (WebInspector.CompilerSourceMappingProvider.prototype._onMessage): (WebInspector.CompilerSourceMappingProvider.prototype._cancelRequest): * inspector/front-end/inspector.js: (WebInspector.installSourceMappingForTest): 2011-10-11 Mike Reed re-add support for GDI text behind a compile flag https://bugs.webkit.org/show_bug.cgi?id=69530 Reviewed by James Robinson. Reverts back to using GDI for text (when possible) but keeps skia-text version behind a compile-flag. If/when we can resolve the outstanding soft-clip and intl-performance bugs with the skia version, we may change the compile-flag to reenable skia. Previous change http://trac.webkit.org/changeset/94589 removed the GDI code. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds): (WebCore::drawGlyphsWin): (WebCore::Font::drawGlyphs): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): (WebCore::windowsCanHandleTextDrawingWithoutShadow): * platform/graphics/skia/SkiaFontWin.h: 2011-10-11 Tor Arne Vestbø [Qt] Remove all references to QTDIR_build and standalone_package Qt is now modularized, which means we no longer import WebKit into the Qt source tree. Instead we use git submodules, and building QtWebKit as "part of Qt" is really building QtWebKit as from trunk. To decrease the number of buildsystem configurations we also remove the standalone_package code-path used when we were providing tarballs with the derived sources pre-generated. Reviewed by Simon Hausmann. * CodeGenerators.pri: * WebCore.pri: * features.pri: 2011-10-10 Andreas Kling Shrink WebCore::Node on 64-bit. https://bugs.webkit.org/show_bug.cgi?id=69768 Reviewed by Antti Koivisto. Rearrange TreeShared and Node members so that the node flags fall into the padding at the end of TreeShared on 64-bit, reducing the size of Node (and all subclasses) by 8 bytes. * dom/Document.h: (WebCore::Node::Node): * dom/Node.h: * platform/TreeShared.h: (WebCore::TreeShared::TreeShared): 2011-10-11 Kent Tamura Move m_listItems and m_recalcListItems from SelectElementData to HTMLSelectElement https://bugs.webkit.org/show_bug.cgi?id=69812 Reviewed by Ryosuke Niwa. Move SelectElementData::m_recalcListItems, SelectElementData::m_listItems, and related functions of SelectElementData class to HTMLSelectElement. Non-const listItems() was removed because it is used only in recalcListItemsInternal() and it can access m_listItems diretly. Static recalcListItems() is changed to non-static, and renamed to recalcListItemsInternal() in order to avoid confusion with the existing recalcListItems(). No new tests, just a refactoring. * dom/SelectElement.cpp: Move checkListItems() and listItems() to HTMLSelectElement. (WebCore::SelectElementData::SelectElementData): Remove Initialization of m_recalcListItems. * dom/SelectElement.h: Move m_recalcListItems, m_listItems, and related functions to HTMLSelectElement. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::HTMLSelectElement): Initializes m_recalcListItems. (WebCore::HTMLSelectElement::recalcListItems): Rename the static recalcListItems() to recalcListItemsInternal(). (WebCore::HTMLSelectElement::recalcListItemsIfNeeded): Use m_recalcListItems directly. (WebCore::HTMLSelectElement::nextSelectableListIndex): Update a listItems() callsite. (WebCore::HTMLSelectElement::previousSelectableListIndex): ditto. (WebCore::HTMLSelectElement::firstSelectableListIndex): ditto. (WebCore::HTMLSelectElement::lastSelectableListIndex): ditto. (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): ditto. (WebCore::HTMLSelectElement::saveLastSelection): ditto. (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto. (WebCore::HTMLSelectElement::updateListBoxSelection): ditto. (WebCore::HTMLSelectElement::listBoxOnChange): ditto. (WebCore::HTMLSelectElement::checkListItems): Moved from SelectElementData. (WebCore::HTMLSelectElement::listItems): ditto. (WebCore::HTMLSelectElement::setRecalcListItems): Use m_recalcListItems directly. (WebCore::HTMLSelectElement::recalcListItemsInternal): - Make this non-static. - Renamed from recalcListItems() to avoid confilct with another recalcListItems(). - Use m_recalcListItems and m_listItems directly. (WebCore::HTMLSelectElement::selectedIndex): Update a listItems() callsite. (WebCore::HTMLSelectElement::setSelectedIndexInternal): ditto. (WebCore::HTMLSelectElement::optionToListIndex): ditto. (WebCore::HTMLSelectElement::listToOptionIndex): ditto. (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): ditto. (WebCore::HTMLSelectElement::saveFormControlState): Update callsites of listItems() and recalcListItems(). (WebCore::HTMLSelectElement::restoreFormControlState): Update a listItems() callsite. (WebCore::HTMLSelectElement::appendFormData): ditto. (WebCore::HTMLSelectElement::reset): ditto. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::updateSelectedState): ditto. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::lastSelectedListIndex): ditto. (WebCore::HTMLSelectElement::typeAheadFind): ditto. (WebCore::HTMLSelectElement::insertedIntoTree): Update a recalcListItems() callsite. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Update a listItems() callsite. (WebCore::HTMLSelectElement::length): ditto. * html/HTMLSelectElement.h: Move m_recalcListItems, m_listItems, and related functions from SelectElementData. * html/HTMLSelectElementWin.cpp: (WebCore::HTMLSelectElement::platformHandleKeydownEvent): Update a listItems() callsite. 2011-10-11 Kenichi Ishibashi [Chromium] Complex script code path breaks on Windows XP when a CFF font is used https://bugs.webkit.org/show_bug.cgi?id=69497 Reviewed by Kent Tamura. Don't use CFF webfonts when ScriptShape() can't handle it. ScriptShape() indicates us the case by setting fNoGlyphIndex to TRUE. If it's TRUE, we don't use the font. This could happen with early version of Uniscribe on WinXP. No new tests because the version of Uniscribe depends on environment. One can install newer version of Uniscribe on WinXP. * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::canUseGlyphIndex): Added. (WebCore::UniscribeHelper::shape): Don't use the shape result when canUseGlyphIndex() returns false. 2011-10-11 John Bauman Fix crash with toDataURL to JPEG https://bugs.webkit.org/show_bug.cgi?id=69681 Reviewed by Kenneth Russell. Move RefPtr declaration outside if to make sure image data still exists through CGImageToDataURL. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::toDataURL): 2011-10-10 Adam Barth Update test results. * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::V8TestInterface::existingWrapper): (WebCore::V8TestInterface::wrap): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::V8TestMediaQueryListListener::existingWrapper): (WebCore::V8TestMediaQueryListListener::wrap): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter): (WebCore::TestObjInternal::cachedAttribute1AttrGetter): (WebCore::TestObjInternal::cachedAttribute2AttrGetter): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::V8TestObj::existingWrapper): (WebCore::V8TestObj::wrap): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::V8TestSerializedScriptValueInterface::existingWrapper): (WebCore::V8TestSerializedScriptValueInterface::wrap): 2011-10-10 Abhishek Arya Style not updated on text fragment in :first-letter nested in :before table. https://bugs.webkit.org/show_bug.cgi?id=69540 Reviewed by Dan Bernstein. Test: fast/css-generated-content/first-letter-in-nested-before-table.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-10-10 Sheriff Bot Unreviewed, rolling out r97121. http://trac.webkit.org/changeset/97121 https://bugs.webkit.org/show_bug.cgi?id=69815 Many layout tests failed (Requested by tkent on #webkit). * dom/SelectElement.cpp: (WebCore::SelectElementData::SelectElementData): (WebCore::SelectElementData::checkListItems): (WebCore::SelectElementData::listItems): * dom/SelectElement.h: (WebCore::SelectElementData::shouldRecalcListItems): (WebCore::SelectElementData::setShouldRecalcListItems): (WebCore::SelectElementData::rawListItems): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::HTMLSelectElement): (WebCore::HTMLSelectElement::recalcListItems): (WebCore::HTMLSelectElement::recalcListItemsIfNeeded): (WebCore::HTMLSelectElement::nextSelectableListIndex): (WebCore::HTMLSelectElement::previousSelectableListIndex): (WebCore::HTMLSelectElement::firstSelectableListIndex): (WebCore::HTMLSelectElement::lastSelectableListIndex): (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): (WebCore::HTMLSelectElement::saveLastSelection): (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): (WebCore::HTMLSelectElement::updateListBoxSelection): (WebCore::HTMLSelectElement::listBoxOnChange): (WebCore::HTMLSelectElement::setRecalcListItems): (WebCore::HTMLSelectElement::selectedIndex): (WebCore::HTMLSelectElement::setSelectedIndexInternal): (WebCore::HTMLSelectElement::optionToListIndex): (WebCore::HTMLSelectElement::listToOptionIndex): (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): (WebCore::HTMLSelectElement::saveFormControlState): (WebCore::HTMLSelectElement::restoreFormControlState): (WebCore::HTMLSelectElement::appendFormData): (WebCore::HTMLSelectElement::reset): (WebCore::HTMLSelectElement::menuListDefaultEventHandler): (WebCore::HTMLSelectElement::updateSelectedState): (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): (WebCore::HTMLSelectElement::lastSelectedListIndex): (WebCore::HTMLSelectElement::typeAheadFind): (WebCore::HTMLSelectElement::insertedIntoTree): (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): (WebCore::HTMLSelectElement::length): * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::listItems): * html/HTMLSelectElementWin.cpp: (WebCore::HTMLSelectElement::platformHandleKeydownEvent): 2011-10-10 Kent Tamura Move m_listItems and m_recalcListItems from SelectElementData to HTMLSelectElement https://bugs.webkit.org/show_bug.cgi?id=69812 Reviewed by Ryosuke Niwa. Move SelectElementData::m_recalcListItems, SelectElementData::m_listItems, and related functions of SelectElementData class to HTMLSelectElement. Non-const listItems() was removed because it is used only in recalcListItemsInternal() and it can access m_listItems diretly. Static recalcListItems() is changed to non-static, and renamed to recalcListItemsInternal() in order to avoid confusion with the existing recalcListItems(). No new tests, just a refactoring. * dom/SelectElement.cpp: Move checkListItems() and listItems() to HTMLSelectElement. (WebCore::SelectElementData::SelectElementData): Remove Initialization of m_recalcListItems. * dom/SelectElement.h: Move m_recalcListItems, m_listItems, and related functions to HTMLSelectElement. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::HTMLSelectElement): Initializes m_recalcListItems. (WebCore::HTMLSelectElement::recalcListItems): Rename the static recalcListItems() to recalcListItemsInternal(). (WebCore::HTMLSelectElement::recalcListItemsIfNeeded): Use m_recalcListItems directly. (WebCore::HTMLSelectElement::nextSelectableListIndex): Update a listItems() callsite. (WebCore::HTMLSelectElement::previousSelectableListIndex): ditto. (WebCore::HTMLSelectElement::firstSelectableListIndex): ditto. (WebCore::HTMLSelectElement::lastSelectableListIndex): ditto. (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): ditto. (WebCore::HTMLSelectElement::saveLastSelection): ditto. (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto. (WebCore::HTMLSelectElement::updateListBoxSelection): ditto. (WebCore::HTMLSelectElement::listBoxOnChange): ditto. (WebCore::HTMLSelectElement::checkListItems): Moved from SelectElementData. (WebCore::HTMLSelectElement::listItems): ditto. (WebCore::HTMLSelectElement::setRecalcListItems): Use m_recalcListItems directly. (WebCore::HTMLSelectElement::recalcListItemsInternal): - Make this non-static. - Renamed from recalcListItems() to avoid confilct with another recalcListItems(). - Use m_recalcListItems and m_listItems directly. (WebCore::HTMLSelectElement::selectedIndex): Update a listItems() callsite. (WebCore::HTMLSelectElement::setSelectedIndexInternal): ditto. (WebCore::HTMLSelectElement::optionToListIndex): ditto. (WebCore::HTMLSelectElement::listToOptionIndex): ditto. (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): ditto. (WebCore::HTMLSelectElement::saveFormControlState): Update callsites of listItems() and recalcListItems(). (WebCore::HTMLSelectElement::restoreFormControlState): Update a listItems() callsite. (WebCore::HTMLSelectElement::appendFormData): ditto. (WebCore::HTMLSelectElement::reset): ditto. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::updateSelectedState): ditto. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::lastSelectedListIndex): ditto. (WebCore::HTMLSelectElement::typeAheadFind): ditto. (WebCore::HTMLSelectElement::insertedIntoTree): Update a recalcListItems() callsite. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Update a listItems() callsite. (WebCore::HTMLSelectElement::length): ditto. * html/HTMLSelectElement.h: Move m_recalcListItems, m_listItems, and related functions from SelectElementData. * html/HTMLSelectElementWin.cpp: (WebCore::HTMLSelectElement::platformHandleKeydownEvent): Update a listItems() callsite. 2011-10-10 Dan Bernstein Duplicate ::after content when both ::before and ::after are styled as table parts Reviewed by Sam Weinig. Test: fast/css-generated-content/table-parts-before-and-after.html * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): Prevented table part childern after a ::before table from being merged into it. * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Prevented children after a ::before table section from being merged into it. 2011-10-10 Nate Chapin Most of the functions in CachedResourceClient are specific to a single type of CachedResource. Move these callbacks into separate subclasses of CachedResourceClient, and leave only the common callback (notifyFinished) in the base class. https://bugs.webkit.org/show_bug.cgi?id=69790 Reviewed by Adam Barth. No new tests, no functionality changed intended. * css/CSSFontFaceSource.h: * css/CSSImageValue.h: * css/CSSImportRule.h: * dom/ProcessingInstruction.cpp: * dom/ProcessingInstruction.h: * html/HTMLLinkElement.h: * html/ImageDocument.h: * loader/ImageLoader.h: * loader/cache/CachedCSSStyleSheet.cpp: * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedFont.cpp: * loader/cache/CachedFont.h: * loader/cache/CachedImage.cpp: * loader/cache/CachedImage.h: * loader/cache/CachedResourceClient.h: * loader/cache/CachedXSLStyleSheet.cpp: * loader/cache/CachedXSLStyleSheet.h: * platform/chromium/ClipboardChromium.h: * platform/gtk/ClipboardGtk.h: * platform/mac/ClipboardMac.h: * platform/qt/ClipboardQt.h: * platform/win/ClipboardWin.h: * rendering/RenderObject.cpp: * rendering/RenderObject.h: * svg/SVGFEImageElement.h: * svg/SVGFontFaceUriElement.h: * xml/XSLImportRule.h: 2011-10-10 Sheriff Bot Unreviewed, rolling out r97087. http://trac.webkit.org/changeset/97087 https://bugs.webkit.org/show_bug.cgi?id=69805 failing assert on debug builds (Requested by simonjam on #webkit). * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::replaceDocument): (WebCore::DocumentWriter::begin): * loader/DocumentWriter.h: 2011-10-10 Adam Barth [V8] CodeGeneratorV8 shouldn't hardcode the list of ActiveDOMObjects https://bugs.webkit.org/show_bug.cgi?id=69792 Reviewed by Nate Chapin. We used to hard code the list of active DOM objects in the code generator, but now we have an IDL attribute. This patch switches the code generator over to using the IDL attribute. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNormalAttrGetter): (GenerateImplementation): (GetDomMapFunction): 2011-10-10 Nico Weber PluginDocumentParser uses incorrect syntax for background color https://bugs.webkit.org/show_bug.cgi?id=69694 Reviewed by Adam Barth. * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): 2011-10-10 Ryosuke Niwa REGRESSION(r96870): editing/pasteboard/smart-paste-008.html fails on non-Mac https://bugs.webkit.org/show_bug.cgi?id=69587 Reviewed by Enrica Casucci. Insert a space at the correct offset when startNode is a text node. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): 2011-09-20 Jer Noble MediaControlSeekButtonElement should support seeking by changing the playback rate. https://bugs.webkit.org/show_bug.cgi?id=63595 Reviewed by Eric Carlson. Test: media/video-controls-scanning.html Add a new property to HTMLMediaElement, supportsScanning(), which returns whether the element is capable of playing its media at a rate greater than 1x. HTMLMediaElement passes this call through to MediaPlayer and MediaPlayerPrivate. If this property returns true, the built-in scanning controls can prefer to scan by changing the playbackRate, rather than by repeatedly seeking small amounts of time. Unless overridden by specific media engines, this property defaults to "false". * html/HTMLMediaElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::supportsScanning): Added. Calls through to MediaPlayer. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::supportsScanning): Added. Calls through to MediaPlayerPrivate. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::supportsScanning): Added. Defaults to "false". * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Added. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Added. MediaControlSeekButtonElement now queries HTMLMediaElement::supportsScanning() to see if the media element can implement its seeking behavior by scanning the media at greater than 1x rate. Note whether the media was playing or paused when the seek begins, so that the playing state can be restored when seeking ends. Instead of capturing the mouse after mouseDown, the seek button now responds to setActive() and begins seeking when the button is active and stops when it becomes inactive. Some behaviors have changed: clicking on the seek button no longer causes the media element to pause; the media will end in the same state it began after the click. cStepTime has been eliminated; Clicking the seek button will always skip by at least cSeekTime, or 0.2s. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Initialize new ivars. (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Mark mouseDown and mouseUp as defaultHandled, so as not to trigger drag start and drag end actions. (WebCore::MediaControlSeekButtonElement::setActive): Call startTimer or stopTimer based on whether the button is active or not. (WebCore::MediaControlSeekButtonElement::startTimer): Determine whether to scan or skip and start the seekTimer. (WebCore::MediaControlSeekButtonElement::stopTimer): Restore the playing state and stop the timer. (WebCore::MediaControlSeekButtonElement::seekTimerFired): Depending on whether we're scanning or skipping, jump ahead or change the playback rate. * html/shadow/MediaControlElements.h: 2011-10-10 Mark Hahnenberg Remove getCallDataVirtual methods https://bugs.webkit.org/show_bug.cgi?id=69186 Reviewed by Geoffrey Garen. No new tests. Removed all getCallDataVirtual methods and replaced their call sites with an explicit lookup in the MethodTable. * WebCore.exp.in: * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSHTMLAllCollectionCustom.cpp: * bindings/js/JSHTMLAppletElementCustom.cpp: * bindings/js/JSHTMLEmbedElementCustom.cpp: * bindings/js/JSHTMLObjectElementCustom.cpp: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::evaluate): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetCallData): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::isJavaScriptFunction): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): (JSC::Bindings::QtRuntimeMetaMethod::createStructure): (JSC::Bindings::QtRuntimeConnectionMethod::create): (JSC::Bindings::QtRuntimeConnectionMethod::createStructure): * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: 2011-10-06 Jer Noble media/video-loop.html is failing on Lion because of negative currentTime() https://bugs.webkit.org/show_bug.cgi?id=69468 Reviewed by Darin Adler. No new tests. Covered by media/video-loop.html test. AVFoundation will occasionally return small, negative current times during loop operations. Clean up these negative times before returning the currentTime. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): 2011-10-10 Jeremy Apthorp Exiting fullscreen shouldn't crash if the element that was fullscreened had associated anonymous blocks. https://bugs.webkit.org/show_bug.cgi?id=68503 Reviewed by Simon Fraser. Test: fullscreen/full-screen-render-inline.html Test: fullscreen/parent-flow-inline-with-block-child.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveChildrenTo): * rendering/RenderBlock.h: (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): (WebCore::RenderBlock::moveChildrenTo): * rendering/RenderFullScreen.cpp: (RenderFullScreen::unwrapRenderer): Move all children back to the parent, not just the firstChild. 2011-10-10 Sergey Glazunov ScriptController::executeIfJavaScriptURL gets confused by synchronous frame loads https://bugs.webkit.org/show_bug.cgi?id=69777 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-synchronous-frame-load-in-javascript-url.html * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::replaceDocument): (WebCore::DocumentWriter::begin): * loader/DocumentWriter.h: 2011-10-10 Nayan Kumar K Add missing ifdef for JAVASCRIPT_DEBUGGER feature. https://bugs.webkit.org/show_bug.cgi?id=69758 Reviewed by Adam Barth. No new tests added since this is a build failure fix. * bindings/v8/custom/V8ScriptProfileCustom.cpp: * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: 2011-10-10 Simon Fraser REGRESSION(96070) 25% intl1 PLT regression from scrollbar invalidation https://bugs.webkit.org/show_bug.cgi?id=69238 Reviewed by Darin Adler. Fix PLT regression from additional scrollbars invalidations. Don't invalidate the scrollbar rect from setHasHorizontalScrollbar() and setHasVerticalScrollbar(), because this is called during FrameView teardown, at which point the invalidation is redundant. Instead, invalidate from ScrollView::updateScrollbars(), which is called only when scrollbars change because of size or layout changes. * platform/ScrollView.cpp: (WebCore::ScrollView::setHasHorizontalScrollbar): (WebCore::ScrollView::setHasVerticalScrollbar): (WebCore::ScrollView::updateScrollbars): 2011-10-10 Abhishek Arya Style for updated due to inability to locate :before content in presence of listmarkers and runins. https://bugs.webkit.org/show_bug.cgi?id=68624 Reviewed by Dan Bernstein. Tests: fast/lists/inline-before-content-after-list-marker.html fast/runin/runin-between-list-marker-and-before-content.html fast/runin/runin-into-div-with-float-child.html fast/runin/runin-not-go-into-float.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild): Fix as per spec that we should not be skipping over floating/positioned renderers to push runins into neighbouring block. This matches Opera renderings. * rendering/RenderObject.cpp: Add const to parameter variable to make call from beforePseudoElementRenderer easier. Also matches CounterNode.h definition. (WebCore::RenderObject::nextInPreOrder): (WebCore::RenderObject::nextInPreOrderAfterChildren): * rendering/RenderObject.h: Same const addition. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::beforePseudoElementRenderer): Remove skipping of floating/positioned renderers, similar to handleRunIn. Revert code change in r94857 and add better next sibling iterator. This addresses the layouttest in r94857 where :before content is in its own anonymous rendertable. 2011-10-10 Abhishek Arya Handle insertion into an anonymous table part that is followed by a non-anonymous block correctly. https://bugs.webkit.org/show_bug.cgi?id=69536 Reviewed by Dan Bernstein. Tests: fast/table/table-insert-before-non-anonymous-block.html * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): (WebCore::RenderTableSection::splitColumn): 2011-10-10 Kent Tamura Make static functions in HTMLSelectElement.cpp member functions of HTMLSelectElement class https://bugs.webkit.org/show_bug.cgi?id=69755 Reviewed by Ryosuke Niwa. No new tests, just a refactoring. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::nextValidIndex): Make this a static member function of HTMLSelectElement. (WebCore::HTMLSelectElement::nextSelectableListIndex): Make this a member function of HTMLSelectElement. (WebCore::HTMLSelectElement::previousSelectableListIndex): ditto. (WebCore::HTMLSelectElement::firstSelectableListIndex): ditto. (WebCore::HTMLSelectElement::lastSelectableListIndex): ditto. (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): ditto. (WebCore::HTMLSelectElement::selectAll): Update callsite of the above functions. (WebCore::HTMLSelectElement::setSelectedIndexInternal): ditto. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto. * html/HTMLSelectElement.h: - Add the above function declarations. - Move SkipDirection definition from HTMLSelectElement.cpp. 2011-10-10 Pavel Feldman Web Inspector: annotate DOMAgent, Debugger(Presentation)Model with types. https://bugs.webkit.org/show_bug.cgi?id=69726 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._breakpointResolved): * inspector/front-end/CSSStyleModel.js: * inspector/front-end/CompilerSourceMapping.js: (WebInspector.CompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.CompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.CompilerSourceMapping.prototype.sources): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._completions.evaluated): (WebInspector.ConsoleView.prototype._completions.receivedPropertyNamesFromEval): (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.isXMLNode): (WebInspector.DOMDocument): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable): (WebInspector.DOMDispatcher.prototype.characterDataModified): (WebInspector.DOMDispatcher.prototype.childNodeCountUpdated): (WebInspector.DOMDispatcher.prototype.childNodeInserted): (WebInspector.DOMDispatcher.prototype.childNodeRemoved): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): (WebInspector.DebuggerPausedDetails): (WebInspector.DebuggerModel.prototype.reset): (WebInspector.DebuggerModel.prototype.get callFrames): (WebInspector.DebuggerModel.prototype._pausedScript): (WebInspector.DebuggerModel.prototype._resumedScript): (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerModel.prototype._failedToParseScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): (WebInspector.DebuggerDispatcher.prototype.breakpointResolved): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource): (WebInspector.DebuggerPresentationModel.prototype._failedToParseScriptSource): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage): (WebInspector.PresentationConsoleMessage): (WebInspector.PresentationCallFrame.prototype.evaluate): (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateSourceAnchors): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._documentUpdated.selectLastSelectedNode): (WebInspector.ElementsPanel.prototype._documentUpdated): * inspector/front-end/NetworkPanel.js: * inspector/front-end/Object.js: (WebInspector.Object.prototype.dispatchEventToListeners): (WebInspector.Event): (WebInspector.Event.prototype.stopPropagation): (WebInspector.Event.prototype.preventDefault): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.SourceMapping): (WebInspector.RawSourceCode.SourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation): * inspector/front-end/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.requestSource): (WebInspector.Script.prototype.searchInContent): (WebInspector.Script.prototype.editSource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.ContentProvider.SearchMatch): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): * inspector/front-end/externs.js: * inspector/generate-protocol-externs: 2011-10-10 Ilya Tikhonovsky Web Inspector: Linkifier.reset throw an exception if it is called after reset of debuggerPresentationModel. https://bugs.webkit.org/show_bug.cgi?id=69756 Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.Linkifier.prototype.reset): 2011-09-28 Pavel Podivilov Web Inspector: RawSourceCode could be mapped to multiple sources. https://bugs.webkit.org/show_bug.cgi?id=68526 Replace SourceMapping.uiSourceCode with SourceMapping.uiSourceCodeList as there could be more then one UISourceCode associated with a RawSourceCode. Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.PresentationCallFrame.prototype.get url): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.RawSourceCode.PlainSourceMapping): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCodeList): (WebInspector.RawSourceCode.FormattedSourceMapping): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCodeList): 2011-10-10 Andreas Kling Shrink RenderLayer and ScrollableArea. https://bugs.webkit.org/show_bug.cgi?id=69759 Reviewed by Antti Koivisto. Rearrange the members of RenderLayer and its base class ScrollableArea to maximize struct packing, shrinking RenderLayer by one CPU word on 32-bit (and two on 64-bit.) This reduces memory consumption by 134 kB (on 64-bit) when loading the full HTML5 spec. * platform/ScrollableArea.h: (WebCore::ScrollableArea::verticalScrollElasticity): (WebCore::ScrollableArea::horizontalScrollElasticity): (WebCore::ScrollableArea::scrollbarOverlayStyle): Cast the now-bitfield members to the appropriate enum types. * rendering/RenderLayer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): Move shouldBeNormalFlowOnly() call out of initializer list since it depends on m_renderer being initialized. 2011-10-10 Cary Clark [Skia on Chromium Mac] Set canExpandAroundIdeographsInComplexText to true https://bugs.webkit.org/show_bug.cgi?id=69656 https://bugs.webkit.org/show_bug.cgi?id=62987 https://bugs.webkit.org/show_bug.cgi?id=62889 Reviewed by Stephen White. Skia on Linux and Windows uses different font engines from Skia on Mac. After determining that the underlying CoreText can handle it, enabling this allows justification to work correctly. Tests: fast/text/justify-ideograph-complex.html * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::canExpandAroundIdeographsInComplexText): 2011-10-10 Ilya Tikhonovsky Web Inspector: memory leak in Resource panel. https://bugs.webkit.org/show_bug.cgi?id=69754 Reviewed by Yury Semikhatsky. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): * inspector/front-end/View.js: (WebInspector.View.prototype.childViews): 2011-10-06 Pavel Podivilov Web Inspector: saving JavaScript after live edit resets scroller position. https://bugs.webkit.org/show_bug.cgi?id=69340 Do not recreate SourceFrame when content is changed. Instead, update text model in existing SourceFrame. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype.setCompilerSourceMappingProvider): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._setReadOnly): (WebInspector.SourceFrame.prototype.contentChanged): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.contentChanged): 2011-10-10 Ilya Tikhonovsky Unreviewed test fix for r97050. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): 2011-10-10 Andreas Kling Shrink RenderListItem on 64-bit. https://bugs.webkit.org/show_bug.cgi?id=69751 Reviewed by Kenneth Rohde Christiansen. Rearrange members to utilize the padding at the end of RenderBlock. This shrinks RenderListItem by 8 bytes on 64-bit, reducing memory consumption by 60 kB when loading the full HTML5 spec. * rendering/RenderListItem.h: 2011-10-10 Andreas Kling Shrink RootInlineBox. https://bugs.webkit.org/show_bug.cgi?id=69707 Reviewed by Antti Koivisto. Move the bitfields from RootInlineBox up into its base class (InlineFlowBox.) This shrinks RootInlineBox by one CPU word without growing InlineFlowBox. Enum bitfields were changed to "unsigned" for the MSVC signedness quirk. Also move one 32-bit member to the head of RootInlineBox so it falls into the padding at the end of InlineFlowBox on 64-bit. This reduces memory consumption by 780 kB (on 64-bit) when loading the full HTML5 spec. * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::InlineFlowBox): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::RootInlineBox): (WebCore::RootInlineBox::lineBreakBidiStatus): * rendering/RootInlineBox.h: 2011-10-10 Pavel Podivilov Unreviewed, attempt to fix chromium mac build after r97034. * platform/ScrollAnimatorNone.h: 2011-10-10 Ilya Tikhonovsky Web Inspector: small memory leak in scripts panel. https://bugs.webkit.org/show_bug.cgi?id=69744 Scripts panel doesn't clean the list of child views. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): 2011-10-07 Yury Semikhatsky Web Inspector: allow to start WorkerContext paused https://bugs.webkit.org/show_bug.cgi?id=69635 Allow to pause WorkerContext on start. Reviewed by Pavel Feldman. * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setPauseOnNextStatement): * bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause): * bindings/v8/WorkerScriptDebugServer.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): * inspector/InspectorInstrumentation.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent): (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent): (WebCore::InspectorRuntimeAgent::pauseWorkerContext): this method will start running worker message loop in "debug" mode, i.e. it will process only inspector tasks until method InspectorRuntimeAgent::resume is called. (WebCore::InspectorRuntimeAgent::resume): * inspector/InspectorRuntimeAgent.h: * inspector/WorkerDebuggerAgent.cpp: * inspector/WorkerDebuggerAgent.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::resume): method which is called from WebKit layer when it is known that inspector state was restored and it is OK to resume worker execution. * inspector/WorkerInspectorController.h: * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::create): (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): * workers/DedicatedWorkerThread.h: * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::create): (WebCore::SharedWorkerThread::SharedWorkerThread): * workers/SharedWorkerThread.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): (WebCore::WorkerMessagingProxy::disconnectFromInspector): (WebCore::WorkerMessagingProxy::sendMessageToInspector): * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): WorkerThread is passed a booleand flag indicating whether the context should be paused and wait for explicit resume command before it starts running its script. (WebCore::WorkerThread::workerThread): * workers/WorkerThread.h: 2011-10-10 Sheriff Bot Unreviewed, rolling out r97045. http://trac.webkit.org/changeset/97045 https://bugs.webkit.org/show_bug.cgi?id=69746 makes apple bots very crashy :( (Requested by kling on #webkit). * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyInheritValue): * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): (WebCore::AnimationBase::ensurePropertyMap): * platform/graphics/Color.h: (WebCore::Color::Color): * rendering/style/BorderValue.h: (WebCore::BorderValue::BorderValue): (WebCore::BorderValue::isTransparent): (WebCore::BorderValue::operator==): (WebCore::BorderValue::color): * rendering/style/OutlineValue.h: (WebCore::OutlineValue::operator==): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setBorderLeftColor): (WebCore::InheritedFlags::setBorderRightColor): (WebCore::InheritedFlags::setBorderTopColor): (WebCore::InheritedFlags::setBorderBottomColor): (WebCore::InheritedFlags::setOutlineColor): (WebCore::InheritedFlags::setColumnRuleColor): (WebCore::InheritedFlags::fillPaintColor): (WebCore::InheritedFlags::strokePaintColor): (WebCore::InheritedFlags::borderLeftColor): (WebCore::InheritedFlags::borderRightColor): (WebCore::InheritedFlags::borderTopColor): (WebCore::InheritedFlags::borderBottomColor): (WebCore::InheritedFlags::backgroundColor): (WebCore::InheritedFlags::color): (WebCore::InheritedFlags::columnRuleColor): (WebCore::InheritedFlags::outlineColor): (WebCore::InheritedFlags::textEmphasisColor): (WebCore::InheritedFlags::textFillColor): (WebCore::InheritedFlags::textStrokeColor): (WebCore::InheritedFlags::stopColor): (WebCore::InheritedFlags::floodColor): (WebCore::InheritedFlags::lightingColor): 2011-10-06 Andreas Kling Shrink BorderValue. https://bugs.webkit.org/show_bug.cgi?id=69521 Reviewed by Antti Koivisto. Unroll BorderValue's Color member so we can pack the color's validity flag in BorderValue's bitfield. This shrinks BorderValue by 32 bit, which in turn shrinks BorderData by 16 bytes. This reduces memory consumption by 760 kB when loading the full HTML5 spec. * platform/graphics/Color.h: (WebCore::Color::Color): Allow construction of Color objects with specific validity. * rendering/style/BorderValue.h: (WebCore::BorderValue::BorderValue): (WebCore::BorderValue::isTransparent): (WebCore::BorderValue::operator==): (WebCore::BorderValue::setColor): (WebCore::BorderValue::color): * rendering/style/OutlineValue.h: (WebCore::OutlineValue::operator==): Unroll m_color into BorderValue by splitting it into an RGBA32 and a bool. Made those variables private and added color(), setColor() accessors. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setBorderLeftColor): (WebCore::InheritedFlags::setBorderRightColor): (WebCore::InheritedFlags::setBorderTopColor): (WebCore::InheritedFlags::setBorderBottomColor): (WebCore::InheritedFlags::setOutlineColor): (WebCore::InheritedFlags::setColumnRuleColor): Added a SET_BORDERVALUE_COLOR macro and use that instead of SET_VAR when setting BorderValue colors. (WebCore::InheritedFlags::fillPaintColor): (WebCore::InheritedFlags::strokePaintColor): (WebCore::InheritedFlags::borderLeftColor): (WebCore::InheritedFlags::borderRightColor): (WebCore::InheritedFlags::borderTopColor): (WebCore::InheritedFlags::borderBottomColor): (WebCore::InheritedFlags::backgroundColor): (WebCore::InheritedFlags::color): (WebCore::InheritedFlags::columnRuleColor): (WebCore::InheritedFlags::outlineColor): (WebCore::InheritedFlags::textEmphasisColor): (WebCore::InheritedFlags::textFillColor): (WebCore::InheritedFlags::textStrokeColor): (WebCore::InheritedFlags::stopColor): (WebCore::InheritedFlags::floodColor): (WebCore::InheritedFlags::lightingColor): Made color getters return "Color" instead of "const Color&" since BorderValue no longer has an actual object to return the reference to. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyInheritValue): * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperColor::PropertyWrapperColor): (WebCore::PropertyWrapperColor::blend): (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): (WebCore::AnimationBase::ensurePropertyMap): Adapt to RenderStyle color getters now returning "Color" instead of "const Color&". 2011-10-09 Yury Semikhatsky Missing m_notificationPresenter initialization in WorkerThread constructor https://bugs.webkit.org/show_bug.cgi?id=69741 Added missing m_notificationPresenter(0) Reviewed by Pavel Feldman. * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): 2011-10-09 Daniel Bates Another attempt to fix the Leopard Intel Debug build after changeset 97034 (https://bugs.webkit.org/show_bug.cgi?id=68035) * page/FrameView.cpp: (WebCore::FrameView::zoomAnimatorTransformChanged): Explicitly convert a double precision result to a single precision result. I am unsure if this fix is correct. We need to look into this some more. See for more details. 2011-10-09 Daniel Bates Attempt to fix the Leopard Intel Debug build after changeset 97034 (https://bugs.webkit.org/show_bug.cgi?id=68035) * page/FrameView.cpp: (WebCore::FrameView::zoomAnimatorTransformChanged): Explicitly convert double precision result to an integer. I am unsure if this fix is correct. We need to look into this some more. See for more details. 2011-10-09 Luke Macpherson Fix Lion, Leopard and Snow Leopard builds after changeset 97034 (https://bugs.webkit.org/show_bug.cgi?id=68035) https://bugs.webkit.org/show_bug.cgi?id=69735 Reviewed by Daniel Bates. * testing/Internals.cpp: Mark unused parameters to prevent compile errors when GESTURE_EVENTS and SMOOTH_SCROLLING are disabled. (WebCore::Internals::setEnableScrollAnimator): (WebCore::Internals::setZoomAnimatorTransform): (WebCore::Internals::setZoomParameters): 2011-10-09 Kent Tamura Remove redundant code of HTMLSelectElement. https://bugs.webkit.org/show_bug.cgi?id=69701 Reviewed by Darin Adler. No new tests, just a refactoring. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::deselectItems): Rename inner deselectItems() to deselectItemsWithoutValidation(). (WebCore::HTMLSelectElement::setSelectedIndex): Rename a callsite of another setSelectedIndex() to setSelectedIndexInternal(). (WebCore::HTMLSelectElement::setSelectedIndexByUser): ditto, and update a callsite of updateSelectedState(). (WebCore::HTMLSelectElement::listBoxSelectItem): Update a callsite of updateSelectedState(). (WebCore::HTMLSelectElement::activeSelectionEndListIndex): Update a callsite of lastSelectedListIndex(). (WebCore::HTMLSelectElement::selectAll): Update callsites of functions which are changed to non-static. (WebCore::HTMLSelectElement::saveLastSelection): Merge a static function and a non-static function. (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto. (WebCore::HTMLSelectElement::setActiveSelectionEndIndex): ditto. (WebCore::HTMLSelectElement::updateListBoxSelection): ditto. (WebCore::HTMLSelectElement::listBoxOnChange): ditto. (WebCore::HTMLSelectElement::menuListOnChange): ditto. (WebCore::HTMLSelectElement::scrollToSelection): ditto. (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): Made this non-static. (WebCore::HTMLSelectElement::setRecalcListItems): Merge a static function and a non-static function. (WebCore::HTMLSelectElement::selectedIndex): ditto. (WebCore::HTMLSelectElement::setSelectedIndexInternal): Made this non-static, and renamed from setSelectedIndex() because of conflict with an existing function. (WebCore::HTMLSelectElement::optionToListIndex): Merge a static function and a non-static function. (WebCore::HTMLSelectElement::listToOptionIndex): ditto. (WebCore::HTMLSelectElement::dispatchFocusEvent): Update a callsite of function which is changed to no-staic. (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto. (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): Made this non-static, and renamed from deselectItems() to avoid conflict. (WebCore::HTMLSelectElement::restoreFormControlState): Update a callsite of function which is changed to no-staic. (WebCore::HTMLSelectElement::reset): ditto. (WebCore::HTMLSelectElement::platformHandleKeydownEvent): Made this non-static. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::updateSelectedState): ditto. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::defaultEventHandler): Merged a static function and a non-static function. (WebCore::HTMLSelectElement::lastSelectedListIndex): Made this non-static. (WebCore::HTMLSelectElement::typeAheadFind): ditto. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): ditto. * html/HTMLSelectElement.h: * html/HTMLSelectElementWin.cpp: (WebCore::HTMLSelectElement::platformHandleKeydownEvent): Made this non-static. 2011-10-09 Adam Barth CSP should log unrecognized directives to the console https://bugs.webkit.org/show_bug.cgi?id=69728 Reviewed by Sam Weinig. Several of the web developers who have been experimenting with CSP have run into trouble with directives we don't support. For example, one developer was confused for a while why image-src didn't do what he expected. Logging a message to the console will help these folks figure out what's going on. * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::reportUnrecognizedDirective): (WebCore::ContentSecurityPolicy::addDirective): * page/ContentSecurityPolicy.h: 2011-10-09 W. James MacLean [chromium] Zoom animator front-end https://bugs.webkit.org/show_bug.cgi?id=68035 Adds necessary components to ScrollAnimatorNone to support a zoom animation feature. Includes test infrastructure via testing/Internals to capture in-progress texture scaling (zoom-animator-scale-test.html) as well as a final view --- after pageScaleFactor has been applied --- in zoom-animator-scale-test2.html. Removes temporary test fields from Settings. Reviewed by Kenneth Russell. Test: platform/chromium/compositing/zoom-animator-scale-test2.html * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): * page/FrameView.cpp: (WebCore::FrameView::zoomAnimatorTransformChanged): * page/FrameView.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::ScrollAnimator): (WebCore::ScrollAnimator::notifyZoomChanged): (WebCore::ScrollAnimator::zoomTranslation): (WebCore::ScrollAnimator::resetZoom): (WebCore::ScrollAnimator::setZoomParametersForTest): * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::zoomScale): * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::ZoomData::ZoomData): (WebCore::ScrollAnimatorNone::ZoomData::animateZoom): (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::zoom): (WebCore::ScrollAnimatorNone::handleGestureEvent): (WebCore::ScrollAnimatorNone::animationTimerFired): * platform/ScrollAnimatorNone.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::zoomAnimatorTransformChanged): * platform/ScrollableArea.h: * testing/Internals.cpp: (WebCore::Internals::setEnableScrollAnimator): (WebCore::Internals::setZoomAnimatorTransform): (WebCore::Internals::getPageScaleFactor): (WebCore::Internals::setZoomParameters): * testing/Internals.h: * testing/Internals.idl: 2011-10-09 Dan Bernstein REGRESSION (WebKit2): Checkboxes and radio buttons are drawn 1 pixel too high, not repainted properly https://bugs.webkit.org/show_bug.cgi?id=69727 Reviewed by Anders Carlsson. * platform/mac/ThemeMac.mm: Made WebCoreFlippedView an NSControl subclass so that the NSButtonCell used to draw checkboxes and radio buttons can make it its controlView, and consequently check and obey its flippedness. 2011-10-09 Benjamin Poulain Do not compare the first glyph to itself in Font::drawGlyphBuffer() https://bugs.webkit.org/show_bug.cgi?id=69715 Reviewed by Andreas Kling. When looking for glyphs with similar properties, we should skip the first one since the comparison of fontData and offset will always fail. This is covered by the existing tests. * platform/graphics/FontFastPath.cpp: (WebCore::Font::drawGlyphBuffer): 2011-10-08 Justin Schuh Make ThreadGlobalData members use OwnPtr https://bugs.webkit.org/show_bug.cgi?id=69710 Reviewed by Adam Barth. No functional changes. No new tests required. * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): (WebCore::ThreadGlobalData::~ThreadGlobalData): (WebCore::ThreadGlobalData::destroy): * platform/ThreadGlobalData.h: 2011-10-08 Mark Hahnenberg Add static version of JSCell::getConstructData https://bugs.webkit.org/show_bug.cgi?id=69673 Reviewed by Geoffrey Garen. No new tests. Added static version of getConstructData to all classes that override it and changed the virtual versions to call the static versions. This is the first step in de-virtualizing JSCell::getConstructData. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::getConstructData): * bindings/js/JSAudioConstructor.h: * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::getConstructData): * bindings/js/JSImageConstructor.h: * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::getConstructData): * bindings/js/JSOptionConstructor.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::getConstructData): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getConstructData): * bridge/runtime_object.h: 2011-10-08 Mark Hahnenberg Add static version of JSCell::getOwnPropertySlot https://bugs.webkit.org/show_bug.cgi?id=69593 Reviewed by Geoffrey Garen. No new tests. Added static version of getOwnPropertySlot to every class that overrides JSCell::getOwnPropertySlot. The virtual versions now call the static versions. This is the first step in de-virtualizing JSCell::getOwnPropertySlot. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::getOwnPropertySlot): * bindings/js/JSDOMWindowShell.h: * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlot): (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlot): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlot): * bridge/runtime_array.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::getOwnPropertySlot): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getOwnPropertySlot): * bridge/runtime_object.h: 2011-10-03 Carlos Garcia Campos and Martin Robinson [GTK] Implement drag and drop support in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=63706 Reviewed by Philippe Normand. * platform/DragData.h: * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::text): Mark as const. (WebCore::DataObjectGtk::markup): Ditto. (WebCore::DataObjectGtk::urlLabel): Ditto. * platform/gtk/DataObjectGtk.h: Remove unused member m_dragContext. (WebCore::DataObjectGtk::url): Mark as const. (WebCore::DataObjectGtk::uriList): Ditto. (WebCore::DataObjectGtk::filenames): Ditto. (WebCore::DataObjectGtk::image): Ditto. (WebCore::DataObjectGtk::hasText): Ditto. (WebCore::DataObjectGtk::hasMarkup): Ditto. (WebCore::DataObjectGtk::hasURIList): Ditto. (WebCore::DataObjectGtk::hasURL): Ditto. (WebCore::DataObjectGtk::hasFilenames): Ditto. (WebCore::DataObjectGtk::hasImage): Ditto. * platform/gtk/DragIcon.cpp: Added. A helper which takes care of creating a transparent drag window for drags. * platform/gtk/DragIcon.h: Added. 2011-10-08 Abhishek Arya Add support for ADDRESS_SANITIZER in RenderArena allocate, free calls. https://bugs.webkit.org/show_bug.cgi?id=69636 Reviewed by Darin Adler. Use malloc, free directly without using the debug header. Otherwise, we won't be able to detect out of bounds access in debug header. * rendering/RenderArena.cpp: (WebCore::RenderArena::allocate): (WebCore::RenderArena::free): 2011-10-08 Kent Tamura Remove some static functions of HTMLSelectElement https://bugs.webkit.org/show_bug.cgi?id=69621 Reviewed by Darin Adler. Merge a static function and the corresponding non-static member function into one function if there are no other callers of the static function. No new tests, just a refactoring. * html/HTMLFormControlElement.h: Make formControlName() protected because it is called from HTMLSelectElement. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): Remove two argument of parseMultipleAttribute(). (WebCore::HTMLSelectElement::selectAll): Merged the static function and the member function. (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto. (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto. (WebCore::HTMLSelectElement::saveFormControlState): ditto. (WebCore::HTMLSelectElement::restoreFormControlState): (WebCore::HTMLSelectElement::parseMultipleAttribute): - Make this non-static member function. - Use reattachIfAttached(). (WebCore::HTMLSelectElement::appendFormData): Merged. (WebCore::HTMLSelectElement::reset): ditto. (WebCore::HTMLSelectElement::insertedIntoTree): ditto. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): ditto. (WebCore::HTMLSelectElement::length): Merged with optionCount(). * html/HTMLSelectElement.h: 2011-10-08 Sheriff Bot Unreviewed, rolling out r96996. http://trac.webkit.org/changeset/96996 https://bugs.webkit.org/show_bug.cgi?id=69697 It broke all tests on the Qt bot (Requested by Ossy_night on #webkit). * WebCore.exp.in: * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::getCallDataVirtual): * bindings/js/JSHTMLAppletElementCustom.cpp: (WebCore::JSHTMLAppletElement::getCallDataVirtual): * bindings/js/JSHTMLEmbedElementCustom.cpp: (WebCore::JSHTMLEmbedElement::getCallDataVirtual): * bindings/js/JSHTMLObjectElementCustom.cpp: (WebCore::JSHTMLObjectElement::getCallDataVirtual): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::evaluate): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetCallData): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::getCallDataVirtual): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::getCallDataVirtual): (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::getCallDataVirtual): (JSC::Bindings::isJavaScriptFunction): * bridge/qt/qt_runtime.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::getCallDataVirtual): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getCallDataVirtual): * bridge/runtime_object.h: 2011-10-08 Ryosuke Niwa Snow Leopard build fix after r96976. Apparently we just need a full rebuild. * config.h: 2011-10-07 Mark Hahnenberg Add static version of JSCell::deleteProperty https://bugs.webkit.org/show_bug.cgi?id=69659 Reviewed by Geoffrey Garen. No new tests. Added static version of both versions of put to all classes that override them and changed the virtual versions to call the static versions. This is the first step in de-virtualizing JSCell::deleteProperty. * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty): * bridge/runtime_array.cpp: (JSC::RuntimeArray::deleteProperty): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::deleteProperty): * bridge/runtime_object.h: 2011-10-07 Justin Schuh Make isXMLMIMEType regex use TLS https://bugs.webkit.org/show_bug.cgi?id=69665 Reviewed by Adam Barth. Test: fast/workers/worker-multi-startup.html * dom/DOMImplementation.cpp: (WebCore::XMLMIMETypeRegExp::XMLMIMETypeRegExp): (WebCore::XMLMIMETypeRegExp::~XMLMIMETypeRegExp): (WebCore::XMLMIMETypeRegExp::isXMLMIMEType): (WebCore::DOMImplementation::isXMLMIMEType): * dom/DOMImplementation.h: * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): (WebCore::ThreadGlobalData::destroy): * platform/ThreadGlobalData.h: (WebCore::ThreadGlobalData::xmlTypeRegExp): 2011-10-07 Sheriff Bot Unreviewed, rolling out r96847. http://trac.webkit.org/changeset/96847 https://bugs.webkit.org/show_bug.cgi?id=69684 may have caused memory regression on win chromium (Requested by simonjam on #webkit). * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-10-07 Mark Hahnenberg Remove getCallDataVirtual methods https://bugs.webkit.org/show_bug.cgi?id=69186 Reviewed by Geoffrey Garen. No new tests. Removed all getCallDataVirtual methods and replaced their call sites with an explicit lookup in the MethodTable. * WebCore.exp.in: * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSHTMLAllCollectionCustom.cpp: * bindings/js/JSHTMLAppletElementCustom.cpp: * bindings/js/JSHTMLEmbedElementCustom.cpp: * bindings/js/JSHTMLObjectElementCustom.cpp: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::evaluate): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetCallData): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::isJavaScriptFunction): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::createStructure): (JSC::Bindings::QtRuntimeConnectionMethod::createStructure): * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: 2011-10-07 Mark Hahnenberg Add static version of JSCell::put https://bugs.webkit.org/show_bug.cgi?id=69382 Reviewed by Geoffrey Garen. No new tests. Added static version of both versions of put to all classes that override them and changed the virtual versions to call the static versions. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::put): * bindings/scripts/test/JS/JSTestObj.h: * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::put): * bridge/runtime_array.cpp: (JSC::RuntimeArray::put): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::put): * bridge/runtime_object.h: 2011-10-07 Anantanarayanan G Iyengar https://bugs.webkit.org/show_bug.cgi?id=69471 We now wrap the window script NPObject which is requested by NPAPI plugins for scripting. The wrapped NPObject pointer maintains a weak reference to the window script NPObject and is cleared out when the window script object is destroyed. The NPObject wrapper is destroyed when the last outstanding reference is released. Reviewed by Nate Chapin. No tests added as there is no change in functionality. * WebCore.gypi: * bindings/v8/NPObjectWrapper.cpp: Added. (WebCore::NPObjectWrapper::NPObjectWrapper): (WebCore::NPObjectWrapper::create): (WebCore::NPObjectWrapper::clear): (WebCore::NPObjectWrapper::getWrapper): (WebCore::NPObjectWrapper::getUnderlyingNPObject): (WebCore::NPObjectWrapper::getObjectForCall): (WebCore::NPObjectWrapper::NPAllocate): (WebCore::NPObjectWrapper::NPDeallocate): (WebCore::NPObjectWrapper::NPPInvalidate): (WebCore::NPObjectWrapper::NPHasMethod): (WebCore::NPObjectWrapper::NPInvoke): (WebCore::NPObjectWrapper::NPInvokeDefault): (WebCore::NPObjectWrapper::NPHasProperty): (WebCore::NPObjectWrapper::NPGetProperty): (WebCore::NPObjectWrapper::NPSetProperty): (WebCore::NPObjectWrapper::NPRemoveProperty): (WebCore::NPObjectWrapper::NPNEnumerate): (WebCore::NPObjectWrapper::NPNConstruct): (WebCore::NPObjectWrapper::NPInvokePrivate): * bindings/v8/NPObjectWrapper.h: Added. * bindings/v8/NPV8Object.cpp: (_NPN_EvaluateHelper): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::clearScriptObjects): (WebCore::ScriptController::windowScriptNPObject): * bindings/v8/ScriptController.h: 2011-10-07 Antoine Labour Webkit API for compositor https://bugs.webkit.org/show_bug.cgi?id=69107 Reviewed by Darin Fisher. Covered by existing compositing tests. * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-07 Ben Wells CSS text-transform should apply to select elements https://bugs.webkit.org/show_bug.cgi?id=69503 Reviewed by Ojan Vafai. Select elements are drawn in two ways depending on whether they are multiple and what their size is. Neither method previously handled text-transforms. Both of these rendering styles are now updated to transform their text correctly. Test: fast/css/text-transform-select.html * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): (WebCore::RenderListBox::paintItemForeground): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): (WebCore::RenderMenuList::setText): (WebCore::RenderMenuList::itemText): * rendering/RenderText.cpp: (WebCore::makeCapitalized): (WebCore::applyTextTransform): (WebCore::RenderText::setTextInternal): (WebCore::RenderText::textWithoutTranscoding): * rendering/RenderText.h: 2011-10-07 Tony Chang fix a crash when loading non-html multipart data https://bugs.webkit.org/show_bug.cgi?id=69675 Reviewed by Adam Barth. setupForReplaceByMIMEType calls DocumentWriter::end(). This leads to a crash on Mac because WebHTMLRepresentation() calls commitLoad(nil), which tries to write to the DocumentWriter. By just inlining the code to load the last page, we avoid this crash (and makes the non-html multipart code more like the html multipart code). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): 2011-10-07 Sergey Glazunov XSLT-generated document should inherit its SecurityOrigin from the source document https://bugs.webkit.org/show_bug.cgi?id=69661 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): 2011-10-07 Sheriff Bot Unreviewed, rolling out r96944. http://trac.webkit.org/changeset/96944 https://bugs.webkit.org/show_bug.cgi?id=69662 Caused many tests to crash on Snow Leopard (Requested by rniwa on #webkit). * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyInheritValue): * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): (WebCore::AnimationBase::ensurePropertyMap): * platform/graphics/Color.h: (WebCore::Color::Color): * rendering/style/BorderValue.h: (WebCore::BorderValue::BorderValue): (WebCore::BorderValue::isTransparent): (WebCore::BorderValue::operator==): (WebCore::BorderValue::color): * rendering/style/OutlineValue.h: (WebCore::OutlineValue::operator==): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setBorderLeftColor): (WebCore::InheritedFlags::setBorderRightColor): (WebCore::InheritedFlags::setBorderTopColor): (WebCore::InheritedFlags::setBorderBottomColor): (WebCore::InheritedFlags::setOutlineColor): (WebCore::InheritedFlags::setColumnRuleColor): (WebCore::InheritedFlags::fillPaintColor): (WebCore::InheritedFlags::strokePaintColor): (WebCore::InheritedFlags::borderLeftColor): (WebCore::InheritedFlags::borderRightColor): (WebCore::InheritedFlags::borderTopColor): (WebCore::InheritedFlags::borderBottomColor): (WebCore::InheritedFlags::backgroundColor): (WebCore::InheritedFlags::color): (WebCore::InheritedFlags::columnRuleColor): (WebCore::InheritedFlags::outlineColor): (WebCore::InheritedFlags::textEmphasisColor): (WebCore::InheritedFlags::textFillColor): (WebCore::InheritedFlags::textStrokeColor): (WebCore::InheritedFlags::stopColor): (WebCore::InheritedFlags::floodColor): (WebCore::InheritedFlags::lightingColor): 2011-10-07 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69658 [CSS3 Regions] Box painting of overflow into regions is incorrect because children were being incorrectly clamped to their containing block region ranges. Change the clamping model so that renderRegionForLine no longer does it. A block will now truly have an accurate range across all the regions that paint it. Instead, do the clamping at the time a child box asks the containing block for its information. At that time clamp to the start and end regions, so that we never ask a containing block for info about a region that it doesn't exist in. Reviewed by Anders Carlsson. Added new test in fast/regions and updated an old result to be correct. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::regionAtBlockOffset): (WebCore::RenderBlock::clampToStartAndEndRegions): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): (WebCore::RenderBox::renderBoxRegionInfo): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): (WebCore::RenderFlowThread::regionLogicalHeightForLine): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): (WebCore::RenderFlowThread::mapFromFlowToRegion): (WebCore::RenderFlowThread::setRegionRangeForBox): * rendering/RenderFlowThread.h: 2011-10-07 Chang Shu Remove compile time flag ENABLE_PASSWORD_ECHO https://bugs.webkit.org/show_bug.cgi?id=69647 As we have runtime flag in the page/Settings, we should remove this redundant compile time flag. Reviewed by Andreas Kling. * config.h: * page/Settings.cpp: (WebCore::Settings::Settings): 2011-10-07 Chris Fleizach Bug 69562 - AccessibilityImageMapLink holds onto it's parent even after it's been freed https://bugs.webkit.org/show_bug.cgi?id=69562 Some fake objects, like AXImageMapLink, have weak references to their parent's (since they are fake objects and need some connection to the parent). However, if the parent disappears before the child, then we're left with a out of date reference to that parent. The fix is to allow these elements to clear their parentage when the parent goes away. Reviewed by Darin Adler. Test: accessibility/image-map-update-parent-crash.html * accessibility/AccessibilityMenuListOption.cpp: (WebCore::AccessibilityMenuListOption::isVisible): * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::isOffScreen): (WebCore::AccessibilityMenuListPopup::isEnabled): (WebCore::AccessibilityMenuListPopup::press): (WebCore::AccessibilityMenuListPopup::addChildren): (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMockObject.h: (WebCore::AccessibilityMockObject::detachFromParent): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clearChildren): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::detachFromParent): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySliderThumb::elementRect): * accessibility/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::headerObjectForSection): 2011-10-07 Andreas Kling Pack StyleRareNonInheritedData even harder on 64-bit. https://bugs.webkit.org/show_bug.cgi?id=69648 Reviewed by Benjamin Poulain. Rearrange the members of StyleRareNonInheritedData to fold as much as possible into the padding at the end of RefCounted. This shrinks StyleRareNonInheritedData by 16 bytes on 64-bit, reducing memory consumption by another 140 kB when loading the full HTML5 spec. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleRareNonInheritedData.h: 2011-10-07 Cary Clark Enable color profiles, unless profile is grayscale https://bugs.webkit.org/show_bug.cgi?id=69622 https://bugs.webkit.org/show_bug.cgi?id=49950 http://code.google.com/p/chromium/issues/detail?id=80844 Further specialize the earlier fix described in 49950 to allow color profiles in YCbCr images, but disallow color profiles marked as grayData. (see http://www.color.org/ICC1v42_2006-05.pdf 7.2.6 ) Reviewed by Adam Barth. Test: fast/images/gray-scale-jpeg-with-color-profile.html fast/images/color-jpeg-with-color-profile.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::readColorProfile): (WebCore::JPEGImageReader::decode): 2011-10-07 Chris Fleizach AX: re-organize fake elements to use new AccessibilityMockObject https://bugs.webkit.org/show_bug.cgi?id=69588 This adds an AccessibilityMockObject for "fake" elements to descend from. Its benefit is to consolidate the various ways that these fake elements are setting and returning their parent objects. No functional change, hence no new tests. Reviewed by Jon Honeycutt. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::addChildren): * accessibility/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::AccessibilityImageMapLink): * accessibility/AccessibilityImageMapLink.h: (WebCore::AccessibilityImageMapLink::node): * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::addChildren): * accessibility/AccessibilityMenuList.h: (WebCore::toAccessibilityMenuList): * accessibility/AccessibilityMenuListOption.cpp: (WebCore::AccessibilityMenuListOption::AccessibilityMenuListOption): (WebCore::AccessibilityMenuListOption::isVisible): * accessibility/AccessibilityMenuListOption.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::AccessibilityMenuListPopup): (WebCore::AccessibilityMenuListPopup::isOffScreen): (WebCore::AccessibilityMenuListPopup::isEnabled): (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject): (WebCore::AccessibilityMenuListPopup::press): (WebCore::AccessibilityMenuListPopup::addChildren): (WebCore::AccessibilityMenuListPopup::childrenChanged): (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityMockObject.cpp: Added. (WebCore::AccessibilityMockObject::AccessibilityMockObject): (WebCore::AccessibilityMockObject::~AccessibilityMockObject): * accessibility/AccessibilityMockObject.h: Added. (WebCore::AccessibilityMockObject::parentObject): (WebCore::AccessibilityMockObject::setParent): (WebCore::AccessibilityMockObject::detachFromParent): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::addChildren): (WebCore::AccessibilitySliderThumb::AccessibilitySliderThumb): (WebCore::AccessibilitySliderThumb::elementRect): * accessibility/AccessibilitySlider.h: * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildren): (WebCore::AccessibilityTable::headerContainer): * accessibility/AccessibilityTable.h: (WebCore::toAccessibilityTable): * accessibility/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::AccessibilityTableColumn): (WebCore::AccessibilityTableColumn::setParent): (WebCore::AccessibilityTableColumn::headerObject): (WebCore::AccessibilityTableColumn::headerObjectForSection): (WebCore::AccessibilityTableColumn::accessibilityIsIgnored): (WebCore::AccessibilityTableColumn::addChildren): * accessibility/AccessibilityTableColumn.h: * accessibility/AccessibilityTableHeaderContainer.cpp: (WebCore::AccessibilityTableHeaderContainer::AccessibilityTableHeaderContainer): (WebCore::AccessibilityTableHeaderContainer::accessibilityIsIgnored): (WebCore::AccessibilityTableHeaderContainer::addChildren): * accessibility/AccessibilityTableHeaderContainer.h: 2011-10-07 Nate Chapin Make IconLoader a CachedResourceClient instead of a SubresourceLoaderClient. This is one of the steps required to remove the SubresourceLoaderClient interface, which will simplify the layering in the loader. https://bugs.webkit.org/show_bug.cgi?id=69567 Reviewed by Adam Barth. No new tests, no functionality change intended. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/cache/CachedRawResource.cpp: Added. * loader/cache/CachedRawResource.h: Added. * loader/cache/CachedResource.cpp: * loader/cache/CachedResource.h: (WebCore::CachedResource::ignoreForRequestCount): Renamed and generalized from isLinkResource(), which was only used to decided whether the CachedResource should count toward CachedResourceLoader::requestCount(). * loader/cache/CachedResourceLoader.cpp: * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: * loader/cache/CachedResourceRequest.h: * loader/icon/IconLoader.cpp: Get a CachedResource instead of a SubresourceLoader. (WebCore::IconLoader::notifyFinished): Merge in the status code check that was in didReceiveResponse(), since we won't be checking any callbacks before the load completes. * loader/icon/IconLoader.h: 2011-10-07 Adam Bergkvist Add WebCore platform interfaces needed by updated PeerConnection design https://bugs.webkit.org/show_bug.cgi?id=68460 Reviewed by Adam Barth. Added the PeerConnection platform files to WebCore/platform/mediastream Currently not testable. * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/mediastream/MediaStreamComponent.h: Added. (WebCore::MediaStreamComponent::create): (WebCore::MediaStreamComponent::source): (WebCore::MediaStreamComponent::enabled): (WebCore::MediaStreamComponent::setEnabled): (WebCore::MediaStreamComponent::MediaStreamComponent): * platform/mediastream/MediaStreamDescriptor.h: Added. (WebCore::MediaStreamDescriptor::create): (WebCore::MediaStreamDescriptor::owner): (WebCore::MediaStreamDescriptor::setOwner): (WebCore::MediaStreamDescriptor::label): (WebCore::MediaStreamDescriptor::component): (WebCore::MediaStreamDescriptor::numberOfComponents): (WebCore::MediaStreamDescriptor::ended): (WebCore::MediaStreamDescriptor::setEnded): (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): * platform/mediastream/MediaStreamSource.h: Added. (WebCore::MediaStreamSource::create): (WebCore::MediaStreamSource::id): (WebCore::MediaStreamSource::type): (WebCore::MediaStreamSource::name): (WebCore::MediaStreamSource::muted): (WebCore::MediaStreamSource::setMuted): (WebCore::MediaStreamSource::MediaStreamSource): * platform/mediastream/PeerHandler.cpp: Added. (WebCore::PeerHandler::PeerHandler): (WebCore::PeerHandler::~PeerHandler): (WebCore::PeerHandler::produceInitialOffer): (WebCore::PeerHandler::handleInitialOffer): (WebCore::PeerHandler::processSDP): (WebCore::PeerHandler::processPendingStreams): (WebCore::PeerHandler::sendDataStreamMessage): (WebCore::PeerHandler::stop): * platform/mediastream/PeerHandler.h: Added. (WebCore::PeerHandlerClient::~PeerHandlerClient): (WebCore::PeerHandler::create): 2011-10-07 Vineet Chaudary background-color affects the font color in disabled textarea. https://bugs.webkit.org/show_bug.cgi?id=65361 Reviewed by Darin Adler. For the transparent/translucent background colors use lightening fortext color. * rendering/RenderTextControl.cpp: (WebCore::disabledTextColor): 2011-10-07 David Barr Implement currentColor support for box-shadow and text-shadow https://bugs.webkit.org/show_bug.cgi?id=68218 Reviewed by Simon Fraser. Test: fast/box-shadow/box-shadow-currentcolor.html * css/CSSParser.cpp: (WebCore::CSSParser::parseShadow): Add CSSValueCurrentcolor to supported keywords. 2011-10-07 Pavel Feldman Web Inspector: add Audits panel to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69633 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/AuditCategories.js: * inspector/front-end/AuditLauncherView.js: * inspector/front-end/AuditResultView.js: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun): (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun): (WebInspector.AuditRules.CacheControlRule.prototype.handleNonCacheableResources): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/NetworkLog.js: * inspector/front-end/treeoutline.js: 2011-10-07 Andreas Kling Functions that return "const Color" should simply return "Color". Rubber-stamped by Antti Koivisto. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::rendererBackgroundColor): * rendering/RenderLayerBacking.h: * rendering/RenderTable.h: (WebCore::RenderTable::bgColor): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::colorIncludingFallback): (WebCore::RenderStyle::visitedDependentColor): * rendering/style/RenderStyle.h: 2011-10-07 Pavel Feldman Web Inspector: TypeError: Cannot read property 'styleSheetId' of undefined in tests. https://bugs.webkit.org/show_bug.cgi?id=69634 Reviewed by Yury Semikhatsky. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): 2011-10-06 Andreas Kling Shrink BorderValue. https://bugs.webkit.org/show_bug.cgi?id=69521 Reviewed by Antti Koivisto. Unroll BorderValue's Color member so we can pack the color's validity flag in BorderValue's bitfield. This shrinks BorderValue by 32 bit, which in turn shrinks BorderData by 16 bytes. This reduces memory consumption by 760 kB when loading the full HTML5 spec. * platform/graphics/Color.h: (WebCore::Color::Color): Allow construction of Color objects with specific validity. * rendering/style/BorderValue.h: (WebCore::BorderValue::BorderValue): (WebCore::BorderValue::isTransparent): (WebCore::BorderValue::operator==): (WebCore::BorderValue::setColor): (WebCore::BorderValue::color): * rendering/style/OutlineValue.h: (WebCore::OutlineValue::operator==): Unroll m_color into BorderValue by splitting it into an RGBA32 and a bool. Made those variables private and added color(), setColor() accessors. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setBorderLeftColor): (WebCore::InheritedFlags::setBorderRightColor): (WebCore::InheritedFlags::setBorderTopColor): (WebCore::InheritedFlags::setBorderBottomColor): (WebCore::InheritedFlags::setOutlineColor): (WebCore::InheritedFlags::setColumnRuleColor): Added a SET_BORDERVALUE_COLOR macro and use that instead of SET_VAR when setting BorderValue colors. (WebCore::InheritedFlags::fillPaintColor): (WebCore::InheritedFlags::strokePaintColor): (WebCore::InheritedFlags::borderLeftColor): (WebCore::InheritedFlags::borderRightColor): (WebCore::InheritedFlags::borderTopColor): (WebCore::InheritedFlags::borderBottomColor): (WebCore::InheritedFlags::backgroundColor): (WebCore::InheritedFlags::color): (WebCore::InheritedFlags::columnRuleColor): (WebCore::InheritedFlags::outlineColor): (WebCore::InheritedFlags::textEmphasisColor): (WebCore::InheritedFlags::textFillColor): (WebCore::InheritedFlags::textStrokeColor): (WebCore::InheritedFlags::stopColor): (WebCore::InheritedFlags::floodColor): (WebCore::InheritedFlags::lightingColor): Made color getters return "Color" instead of "const Color&" since BorderValue no longer has an actual object to return the reference to. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyInheritValue): * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperColor::PropertyWrapperColor): (WebCore::PropertyWrapperColor::blend): (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): (WebCore::AnimationBase::ensurePropertyMap): Adapt to RenderStyle color getters now returning "Color" instead of "const Color&". 2011-10-07 Philippe Normand [GStreamer] webkitwebsrc: avoid GST_BOILERPLATE_FULL https://bugs.webkit.org/show_bug.cgi?id=69630 Reviewed by Martin Robinson. Use G_DEFINE_TYPE_WITH_CODE instead of GST_BOILERPLATE_FULL and replace use of gst_ghost_pad_new_no_target_from_template() and gst_ghost_pad_set_target() with a single call to gst_ghost_pad_new_from_template(). These changes keep the element compatible with GStreamer 0.10 while preparing the port to 0.11. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webkit_web_src_class_init): (webkit_web_src_init): 2011-10-07 Martin Robinson [Freetype] Pseudo-italics do not work https://bugs.webkit.org/show_bug.cgi?id=40856 Reviewed by Philippe Normand. * platform/graphics/freetype/FontPlatformData.h: Add the font description as an argument initializeWithFontFace. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::FontPlatformData): Pass the font description to initializeWithFontFace. (WebCore::FontPlatformData::initializeWithFontFace): If we were asked for an italic font and we were given one that wasn't oblique or italic, activate the synthetic oblique bit. 2011-10-07 Philippe Normand [GStreamer] avoid direct access to GstMessage structure field https://bugs.webkit.org/show_bug.cgi?id=69629 Reviewed by Martin Robinson. Use gst_message_get_structure() instead of direct access to the structure field. No direct benefit apart from compatibility with GStreamer 0.11. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::gstGWorldSyncMessageCallback): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): (WebCore::MediaPlayerPrivateGStreamer::mediaLocationChanged): 2011-10-07 Pavel Feldman Web Inspector: add timeline panel to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69628 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/SidebarTreeElement.js: (WebInspector.SidebarTreeElement): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceHTMLTokenizer.js: (WebInspector.SourceHTMLTokenizer.prototype.nextToken): * inspector/front-end/SourceHTMLTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken): * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/TimelineGrid.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createEventDivider): (WebInspector.TimelinePanel.prototype._addRecordToTimeline): (WebInspector.TimelinePanel.prototype._findParentRecord): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype.updateMainViewWidth): (WebInspector.TimelinePanel.prototype.onResize): (WebInspector.TimelinePanel.prototype._windowChanged): (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelineRecordGraphRow.prototype._onClick): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-10-07 Sheriff Bot Unreviewed, rolling out r96892. http://trac.webkit.org/changeset/96892 https://bugs.webkit.org/show_bug.cgi?id=69626 it broke windows canary bots (Requested by podivilov on #webkit). * WebCore.gyp/scripts/rule_binding.py: 2011-10-07 Andreas Kling Shrink StyleInheritedData. https://bugs.webkit.org/show_bug.cgi?id=69625 Reviewed by Antti Koivisto. Rearrange the members of StyleInheritedData to fold as much as possible into the padding at the end of RefCounted. This shrinks StyleInheritedData by 8 bytes on 64-bit, reducing memory consumption by 500 kB when loading the full HTML5 spec. * rendering/style/StyleInheritedData.cpp: (WebCore::StyleInheritedData::StyleInheritedData): * rendering/style/StyleInheritedData.h: 2011-10-07 Pavel Feldman Web Inspector: make ScriptsPanel compile https://bugs.webkit.org/show_bug.cgi?id=69623 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update): (WebInspector.CallStackSidebarPane.prototype._placardSelected): * inspector/front-end/DebuggerModel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): * inspector/front-end/KeyboardShortcut.js: * inspector/front-end/Object.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/StatusBarButton.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update.appendResult): (WebInspector.WatchExpressionsSection.prototype.update): (WebInspector.WatchExpressionTreeElement.prototype.startEditing): * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.WorkerManager.prototype._pageInspectorClosing): (WebInspector.DedicatedWorkerMessageForwarder.prototype._receiveMessage): * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkersSidebarPane.prototype.removeWorker): * inspector/front-end/externs.js: (WebInspector.linkifyURL): (InjectedFakeWorker): * inspector/front-end/inspector.js: 2011-10-07 Sheriff Bot Unreviewed, rolling out r96879. http://trac.webkit.org/changeset/96879 https://bugs.webkit.org/show_bug.cgi?id=69618 Broke CCLayerTreeHostTestShortlived1 on chromium mac. (Requested by podivilov on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-07 Pavel Feldman Web Inspector: add ResourcesPanel to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69612 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid): * inspector/front-end/NetworkPanel.js: * inspector/front-end/ResourceView.js: * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): (WebInspector.ResourcesPanel.prototype.showResource): (WebInspector.BaseStorageTreeElement.prototype.isEventWithinDisclosureTriangle): (WebInspector.FrameTreeElement.prototype.frameNavigated): (WebInspector.StorageCategoryView): (WebInspector.SearchResultsTreeElementsTraverser.prototype.last): * inspector/front-end/externs.js: (WebInspector.openRequestInNetworkPanel): 2011-10-07 Sheriff Bot Unreviewed, rolling out r96909. http://trac.webkit.org/changeset/96909 https://bugs.webkit.org/show_bug.cgi?id=69616 Broke chromium mac compilation (Requested by podivilov on #webkit). * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-07 Vsevolod Vlasov Web Inspector: Element highlighting does not highlight padding/border/margin for inline elements. https://bugs.webkit.org/show_bug.cgi?id=69558 Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-10-07 Mario Sanchez Prada [GTK] Don't expose objects with unknown role on GTK https://bugs.webkit.org/show_bug.cgi?id=69561 Reviewed by Chris Fleizach. Ignore accessibility objects in accessibilityPlatformIncludesObject. Test: platform/gtk/accessibility/unknown-roles-not-exposed.html * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): For unknown accessibility objects, return IgnoreObject. 2011-10-07 Pavel Feldman Web Inspector: add Elements and Network panels to the compilation https://bugs.webkit.org/show_bug.cgi?id=69604 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked): (WebInspector.XHRBreakpointsSidebarPane.prototype._labelClicked): * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMBreakpointsSidebarPane.js: * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._startEditingConfig): * inspector/front-end/Drawer.js: * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._hideSearchHighlights): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes.collapseDimmed): (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes): (WebInspector.ElementsPanel.prototype._registerShortcuts): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): (WebInspector.ElementsTreeElement.prototype._startEditingTextNode): (WebInspector.ElementsTreeElement.prototype._startEditingTagName): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): * inspector/front-end/GoToLineDialog.js: (WebInspector.GoToLineDialog._show): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype.startEditing): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._onLoadEventFired): (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired): (WebInspector.NetworkLogView.prototype._updateOffscreenRows): (WebInspector.NetworkLogView.prototype._removeAllNodeHighlights): (WebInspector.NetworkPanel.prototype._resourceByAnchor): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.startEditing): * inspector/front-end/Panel.js: * inspector/front-end/Popover.js: * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._editBreakpointCondition): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/TimelineGrid.js: * inspector/front-end/UIUtils.js: (WebInspector.EditingConfig): (WebInspector.startEditing.editingCancelled): (WebInspector.startEditing.editingCommitted): (WebInspector.formatLocalized): (WebInspector.openLinkExternallyLabel): (WebInspector.openInNetworkPanelLabel): (WebInspector.copyLinkAddressLabel): * inspector/front-end/externs.js: (WebInspector.extensionServer.notifyObjectSelected): (WebInspector.openResource): * inspector/front-end/inspector.js: (WebInspector.resourceForURL): 2011-10-07 Anna Cavender Change enum value names for TextTrack::readyState and TextTrack::mode https://bugs.webkit.org/show_bug.cgi?id=69603 Reviewed by David Levin. No new tests. No new functionality. * html/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::trackLoadStarted): (WebCore::LoadableTextTrack::trackLoadError): (WebCore::LoadableTextTrack::trackLoadCompleted): * html/TextTrack.cpp: (WebCore::TextTrack::TextTrack): (WebCore::TextTrack::setMode): * html/TextTrack.h: 2011-10-07 Anna Cavender Adding parens in WebVTTParser.cpp to appease compiler preferences. https://bugs.webkit.org/show_bug.cgi?id=69602 Reviewed by David Levin. No new tests. No new functionality. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2011-10-06 Antoine Labour Webkit API for compositor https://bugs.webkit.org/show_bug.cgi?id=69107 Reviewed by Darin Fisher. Covered by existing compositing tests. * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-06 Kent Tamura Remove SelectElement class https://bugs.webkit.org/show_bug.cgi?id=69518 Reviewed by Ryosuke Niwa. SelectElement used to be an abstract class for HTMLSelectElement and WMLSelectElement. SelectElement is not needed anymore because WML was removed. This patch just removes SelectElement by moving SelectElement functions to HTMLSelectElement. No new tests. Just a refactoring. * WebCore.vcproj/WebCore.vcproj: Rename dom\SelectElementWin.cpp to html\HTMLSelectElementWin.cpp. * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::setSelected): Remove unnecessary cast. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::stringValue): Use HTMLSelectElement instead of SelectElement. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (optionFromSelection): ditto. (webkit_accessible_selection_get_selection_count): ditto. * accessibility/gtk/AXObjectCacheAtk.cpp: (notifyChildrenSelectionChange): ditto. * dom/OptionElement.cpp: (WebCore::OptionElement::optionIndex): ditto. * dom/OptionElement.h: ditto. * dom/SelectElement.cpp: (WebCore::SelectElementData::checkListItems): ditto. (WebCore::SelectElementData::listItems): ditto. * dom/SelectElementWin.cpp: Removed. * dom/SelectElement.h: Removed SelectElement class declaration. * html/HTMLSelectElement.cpp: Move functions from SelectElement.cpp. (WebCore::HTMLSelectElement::selectedIndex): Removed 'SelectElement::' because the function is moved to HTMLSelectElement. (WebCore::HTMLSelectElement::deselectItems): dito. (WebCore::HTMLSelectElement::setSelectedIndex): dito. (WebCore::HTMLSelectElement::setSelectedIndexByUser): ditto. (WebCore::HTMLSelectElement::activeSelectionEndListIndex): ditto. (WebCore::HTMLSelectElement::length): ditto. (WebCore::HTMLSelectElement::saveFormControlState): ditto. (WebCore::HTMLSelectElement::restoreFormControlState): ditto. (WebCore::HTMLSelectElement::parseMappedAttribute): ditto. (WebCore::HTMLSelectElement::selectAll): ditto. (WebCore::HTMLSelectElement::appendFormData): ditto. (WebCore::HTMLSelectElement::optionToListIndex): ditto. (WebCore::HTMLSelectElement::listToOptionIndex): ditto. (WebCore::HTMLSelectElement::recalcListItems): ditto. (WebCore::HTMLSelectElement::setRecalcListItems): ditto. (WebCore::HTMLSelectElement::reset): ditto. (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto. (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto. (WebCore::HTMLSelectElement::defaultEventHandler): ditto. (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto. (WebCore::HTMLSelectElement::setActiveSelectionEndIndex): ditto. (WebCore::HTMLSelectElement::updateListBoxSelection): ditto. (WebCore::HTMLSelectElement::menuListOnChange): ditto. (WebCore::HTMLSelectElement::listBoxOnChange): ditto. (WebCore::HTMLSelectElement::saveLastSelection): ditto. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): ditto. (WebCore::HTMLSelectElement::scrollToSelection): ditto. (WebCore::HTMLSelectElement::insertedIntoTree): ditto. (WebCore::nextValidIndex): Moved from SelectElement.cpp. (WebCore::nextSelectableListIndex): ditto. (WebCore::previousSelectableListIndex): ditto. (WebCore::firstSelectableListIndex): ditto. (WebCore::lastSelectableListIndex): ditto. (WebCore::nextSelectableListIndexPageAway): ditto. (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): ditto. (WebCore::HTMLSelectElement::parseMultipleAttribute): ditto. (WebCore::HTMLSelectElement::platformHandleKeydownEvent): ditto. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::updateSelectedState): ditto. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::lastSelectedListIndex): ditto. (WebCore::stripLeadingWhiteSpace): ditto. (WebCore::HTMLSelectElement::typeAheadFind): ditto. (WebCore::HTMLSelectElement::optionCount): ditto. (WebCore::toSelectElement): ditto. * html/HTMLSelectElementWin.cpp: Copied from Source/WebCore/dom/SelectElementWin.cpp. (WebCore::HTMLSelectElement::platformHandleKeydownEvent): * html/HTMLSelectElement.h: Removed 'virtual' of SelectElement functions. (WebCore::HTMLSelectElement::size): (WebCore::HTMLSelectElement::multiple): (WebCore::HTMLSelectElement::listItems): (WebCore::HTMLSelectElement::updateValidity): * rendering/RenderListBox.cpp: Replace SelectElement with HTMLSelectElement (WebCore::RenderListBox::RenderListBox): (WebCore::RenderListBox::scrollToRevealSelection): (WebCore::RenderListBox::addFocusRingRects): (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): (WebCore::RenderListBox::panScroll): (WebCore::RenderListBox::autoscroll): (WebCore::RenderListBox::valueChanged): * rendering/RenderMenuList.cpp: Replace SelectElement with HTMLSelectElement (WebCore::RenderMenuList::RenderMenuList): (WebCore::RenderMenuList::setTextFromOption): (WebCore::RenderMenuList::showPopup): (WebCore::RenderMenuList::valueChanged): (WebCore::RenderMenuList::listBoxSelectItem): (WebCore::RenderMenuList::multiple): (WebCore::RenderMenuList::didSetSelectedIndex): (WebCore::RenderMenuList::didUpdateActiveOption): (WebCore::RenderMenuList::itemText): (WebCore::RenderMenuList::itemAccessibilityText): (WebCore::RenderMenuList::itemToolTip): (WebCore::RenderMenuList::itemIsEnabled): (WebCore::RenderMenuList::itemStyle): (WebCore::RenderMenuList::itemBackgroundColor): (WebCore::RenderMenuList::listSize): (WebCore::RenderMenuList::selectedIndex): (WebCore::RenderMenuList::itemIsSeparator): (WebCore::RenderMenuList::itemIsLabel): (WebCore::RenderMenuList::itemIsSelected): (WebCore::RenderMenuList::setTextFromItem): 2011-10-06 Sheriff Bot Unreviewed, rolling out r96896. http://trac.webkit.org/changeset/96896 https://bugs.webkit.org/show_bug.cgi?id=69601 broke windows and mac chromium builds (Requested by simonjam on #webkit). * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-06 Antoine Labour Webkit API for compositor https://bugs.webkit.org/show_bug.cgi?id=69107 Reviewed by Darin Fisher. Covered by existing compositing tests. * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-06 Joseph Pecoraro Reviewed by Kent Tamura. Pass "accept" mime type information into FileChooser at all call sites https://bugs.webkit.org/show_bug.cgi?id=69592 No new tests. This only exposes some more information to WebKit ports, no functionality change in WebCore. * html/FileInputType.cpp: (WebCore::FileInputType::receiveDropForDirectoryUpload): 2011-10-06 Kent Tamura [JSC binding] Fix inconsistent behavior of DOMStringMap https://bugs.webkit.org/show_bug.cgi?id=53752 Reviewed by Darin Adler. The dataset behavior was inconsistent. The get operation handled data-* attributes first, and the put and delete operations handled JavaScript properties first. Like Firefox and Opera, the put and delete operations should handle data-* attribute first. * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::deleteProperty): Handles DOMStringMap first, then returns false if the DOMStringMap makes an error. (WebCore::JSDOMStringMap::putDelegate): ditto. 2011-10-06 Nico Weber [chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes. https://bugs.webkit.org/show_bug.cgi?id=69589 Reviewed by Adam Barth. When building with `make -j40`, all the binding rules are built en bloc. Since this script currently uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of 255 by default, so the build used to fail with "open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60" As a fix, use execvp() instead, which replaces the current process instead of spawning a new one. * WebCore.gyp/scripts/rule_binding.py: 2011-10-06 Anders Carlsson When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors https://bugs.webkit.org/show_bug.cgi?id=69586 Reviewed by Darin Adler. * Configurations/Base.xcconfig: Add -Wglobal-constructors and -Wexit-time-destructors when building with clang. * WebCore.xcodeproj/project.pbxproj: When building with clang, we don't need to run the check-for-global-initializers and check-for-exit-time-destructors anymore. * platform/graphics/filters/FEGaussianBlur.cpp: (gaussianKernelFactor): (WebCore::FEGaussianBlur::calculateKernelSize): (WebCore::FEGaussianBlur::calculateStdDeviation): Change the gaussian kernel factor global to be an inline function instead. 2011-10-06 Anders Carlsson Add DEFINE_DEBUG_ONLY_GLOBAL for globals that should be defined in debug builds https://bugs.webkit.org/show_bug.cgi?id=69584 Reviewed by Darin Adler. Adopt the DEFINE_DEBUG_ONLY_GLOBAL macro. * bindings/js/JSLazyEventListener.cpp: * dom/Node.cpp: * dom/Range.cpp: * history/CachedPage.cpp: * loader/SubresourceLoader.cpp: * loader/cache/CachedResource.cpp: * page/Frame.cpp: * page/Page.cpp: * rendering/BidiRun.cpp: * rendering/RenderObject.cpp: * svg/SVGElementInstance.cpp: * xml/XMLHttpRequest.cpp: 2011-10-06 James Robinson [chromium] Remove USE(THREADED_COMPOSITING) from the tree https://bugs.webkit.org/show_bug.cgi?id=69489 Reviewed by Darin Fisher. This macro isn't needed any more since the logic it guarded is guarded by a runtime switch. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-06 David Grogan Return null for the value of IDB key cursors instead of ASSERTing https://bugs.webkit.org/show_bug.cgi?id=69131 This is in support of the IndexedDB performance improvement here: http://codereview.chromium.org/7834006/ Reviewed by Tony Chang. * storage/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::value): 2011-10-06 Alexey Proskuryakov [Mac] Should be able to scroll embedded PDFs using mouse https://bugs.webkit.org/show_bug.cgi?id=69579 Reviewed by Darin Adler. Hit testing doesn't find scrollbars installed by a plug-in, so mouse events don't work. As we want to use WebKit scrollbars with PDF plug-in, a cleaner long-term solution would be to have a base class under PluginViewBase that can handle scrolling instead of doing that in PluginView and Plugin. * plugins/PluginViewBase.h: (WebCore::PluginViewBase::horizontalScrollbar): (WebCore::PluginViewBase::verticalScrollbar): Added accessors for scrollbars installed by plug-in. * rendering/nodeAtPoint.cpp: (WebCore::RenderEmbeddedObject::nodeAtPoint): Like RenderLayer, add scrollbars to hit result after normal hit testing. * rendering/RenderEmbeddedObject.h: Added a nodeAtPoint override. * rendering/RenderWidget.h: Made nodeAtPoint() protected instead of private, so that RenderEmbeddedObject could call it. 2011-10-06 Dan Bernstein Flash of white when navigating daringfireball.net https://bugs.webkit.org/show_bug.cgi?id=69581 Reviewed by Darin Adler. * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): Moved the calls to Scrollbar::setEnabled() into the code section where invalidation is suppressed if necessary, so that they do not trigger premature invalidation. 2011-10-06 Dan Bernstein Added a comment explaining code added in r96834. Suggested by Darin Adler. * editing/FrameSelection.cpp: (WebCore::FrameSelection::updateAppearance): 2011-10-05 Ryosuke Niwa Deleting line break before h1 converts h1 to span https://bugs.webkit.org/show_bug.cgi?id=45784 Reviewed by Enrica Casucci. This patch fundamentally alters the kind of styles we preserve while merging or moving paragraphs. StylizedMarkupAccumulator no longer wraps nodes by computed style when it's not annotating for interchange. Instead, it accumulates implicit and inline styles of ancestors of the serialized contents. The most significant code change is in StyledMarkupAccumulator::serializeNodes where we setup m_wrappingStyle by merging implicit and inline style of ancestors with mergeInlineAndImplicitStyleOfElement. Because it walks up the DOM tree upwards, it should not be overriding any CSS properties. Consequently, mergeStyle, mergeInlineStyleOfElement, and mergeInlineAndImplicitStyleOfElement are modified to take CSSPropertyOverrideMode. New behavior matches that of Internet Explorer and Firefox when merging paragraphs. Tests: editing/deleting/merge-paragraph-from-address.html editing/deleting/merge-paragraph-from-h6-with-style-2.html editing/deleting/merge-paragraph-from-h6-with-style.html editing/deleting/merge-paragraph-from-h6.html editing/deleting/merge-paragraph-from-listing.html editing/deleting/merge-paragraph-from-p-with-style-2.html editing/deleting/merge-paragraph-from-p-with-style-3.html editing/deleting/merge-paragraph-from-p-with-style.html editing/deleting/merge-paragraph-into-h1-with-style.html editing/deleting/merge-paragraph-into-h1.html editing/deleting/merge-paragraph-into-pre.html * css/CSSValueList.cpp: (WebCore::CSSValueList::hasValue): Made const. * css/CSSValueList.h: * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Calls mergeInlineStyleOfElement. (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Ditto. * editing/EditingStyle.cpp: (WebCore::copyEditingProperties): Takes a boolean includeBackgroundColor. (WebCore::isEditingProperty): Extracted from elementIsStyledSpanOrHTMLEquivalent. (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent): Calls isEditingProperty. (WebCore::EditingStyle::mergeTypingStyle): Calls mergeStyle. (WebCore::EditingStyle::mergeInlineStyleOfElement): Takes CSSPropertyOverrideMode. (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Added. (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Added. (WebCore::mergeTextDecorationValues): Extracted from mergeStyle. (WebCore::EditingStyle::mergeStyle): Takes CSSPropertyOverrideMode. * editing/EditingStyle.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::nodeToSplitToAvoidPastingIntoInlineNodesWithStyle): Extracted from doApply. (WebCore::ReplaceSelectionCommand::doApply): Calls nodeToSplitToAvoidPastingIntoInlineNodesWithStyle. (WebCore::ReplaceSelectionCommand::performTrivialReplace): Exit early when we need to split the tree to avoid pasting into inline nodes with style. Also remove a collapsed or spurious br. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::serializeNodes): 2011-10-06 Abhishek Arya Crash in VisiblePosition::canonicalPosition. https://bugs.webkit.org/show_bug.cgi?id=69568 Reviewed by Ryosuke Niwa. Move the position's containerNode calculation after layout is complete(in updateLayoutIgnorePendingStylesheets). Test: editing/selection/selection-plugin-clear-crash.html * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::canonicalPosition): 2011-10-06 Sheriff Bot Unreviewed, rolling out r96861. http://trac.webkit.org/changeset/96861 https://bugs.webkit.org/show_bug.cgi?id=69573 This patch didn't compile on windows (Requested by annacc on #webkit). * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2011-10-06 Anna Cavender Adding parens in WebVTTParser.cpp to appease compiler preferences. https://bugs.webkit.org/show_bug.cgi?id=69460 Reviewed by David Levin. No new tests. No new functionality. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2011-10-06 Fady Samuel Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false https://bugs.webkit.org/show_bug.cgi?id=69009 Reviewed by Simon Fraser. Upcoming patches may make use of absoluteBoundingBoxRect on a const RenderObject, so this needed to be fixed. Making useTransforms default to true instead of false and replacing instances of absoluteBoundingBoxRect() to absoluteBoundingBoxRectIgnoringTransforms() partially addreses // FIXME: useTransforms should go away eventually. * WebCore.exp.in: * dom/Element.cpp: (WebCore::Element::screenRect): * dom/Node.cpp: (WebCore::Node::getRect): (WebCore::Node::renderRect): * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * inspector/DOMNodeHighlighter.cpp: * plugins/IFrameShimSupport.cpp: (WebCore::getPluginOcclusions): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): (WebCore::RenderBlock::absoluteQuads): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteQuads): * rendering/RenderBox.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::flattenFrame): * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): (WebCore::RenderInline::culledInlineAbsoluteRects): (WebCore::RenderInline::absoluteQuads): (WebCore::RenderInline::culledInlineAbsoluteQuads): * rendering/RenderInline.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRect): (WebCore::RenderObject::addAbsoluteRectForLayer): (WebCore::RenderObject::paintingRootRect): * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): (WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms): (WebCore::RenderObject::absoluteQuads): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): (WebCore::RenderText::absoluteQuads): * rendering/RenderText.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::showPopup): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintSearchFieldCancelButton): (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): (WebCore::RenderView::absoluteQuads): * rendering/RenderView.h: * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::absoluteRects): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::absoluteQuads): * rendering/svg/RenderSVGHiddenContainer.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::absoluteQuads): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteRects): (WebCore::RenderSVGModelObject::absoluteQuads): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::absoluteQuads): * rendering/svg/RenderSVGText.h: * testing/Internals.cpp: (WebCore::Internals::boundingBox): 2011-10-06 Simon Hausmann [Qt][Wk2] Fix build with Qt 5 when QtScript is built as standalone module https://bugs.webkit.org/show_bug.cgi?id=69520 Reviewed by Csaba Osztrogonác. * WebCore.pri: Use qt5 scope. * WebCore.pro: Use qt5 scope and pull in QtScript for the time being. 2011-10-06 Tony Chang last frame of a multipart response is not displayed https://bugs.webkit.org/show_bug.cgi?id=69449 Reviewed by Adam Barth. Test: http/tests/multipart/load-last-non-html-frame.php * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): for non-progressive load pages, commit the load so the last frame will be displayed. * loader/DocumentLoader.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didFinishLoading): 2011-10-06 Gavin Peters conditionalize m_cachedScript stacks to just Chromium port https://bugs.webkit.org/show_bug.cgi?id=69537 New stack saving telemetry code in ScriptElement shouldn't have been put in all ports; just narrowing it to the chromium port will save other ports the memory hit of this diagnostic code. Reviewed by Nate Chapin. No new tests. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-06 Arthur Hsu Ensure font loaded before calling Skia to drawPosText in Chrome sandbox https://bugs.webkit.org/show_bug.cgi?id=69370 Reviewed by James Robinson. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-10-06 Chris Rogers BiquadFilterNode must not reset filter state if type attribute is set to the same type https://bugs.webkit.org/show_bug.cgi?id=69485 Reviewed by Kenneth Russell. No new tests. This particular case is difficult to test with a layout test using OfflineAudioContext. * webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::setType): * webaudio/BiquadProcessor.h: 2011-10-06 Raphael Kubo da Costa [EFL] Do not create cairo surfaces with the wrong size for form elements https://bugs.webkit.org/show_bug.cgi?id=69533 Reviewed by Ryosuke Niwa. RenderThemeEfl::cacheThemePartResizeAndReset resizes the Ecore_Evas associated with an entry, but did not reset the `size` attribute of the struct -- in practice, this meant the subsequent call to themePartCacheEntrySurfaceCreate would create a cairo surface with the previous size, thus rendering an element with the wrong size. No new tests, this is triggered by running running pixel tests for running, in this order, fast/forms/button-sizes.html, fast/forms/input-appearance-preventDefault.html, fast/forms/input-appearance-spinbutton-disabled-readonly.html, fast/forms/input-appearance-width.html, fast/forms/input-button-sizes.html, fast/forms/input-placeholder-text-indent.html and fast/forms/input-text-click-inside.html (!). * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::cacheThemePartResizeAndReset): Reset the size attribute when resizing the canvas. 2011-10-06 Chris Rogers Make sure OfflineAudioContext can not be created with a sample-rate less than 44.1KHz https://bugs.webkit.org/show_bug.cgi?id=69483 Reviewed by Kenneth Russell. No new tests. * webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::createBuffer): 2011-10-06 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69544 [CSS3 Regions] Compute the starting and ending regions of a block, so that we can clamp descendants to those regions. This is preparation for having true overflow in the boxes in each region, and it's also a performance optimization to reduce the amount of region walking that the RenderFlowThread is doing. Add a range map to RenderFlowThread to cache the start/end regions for each box. Amend everyone who calls renderRegionForLine to pass in the box that is making the query. This box is then used to clamp to start and end regions so that any regions outside of that range will never be examined. Reviewed by Dan Bernstein. Test: fast/regions/top-overflow-out-of-second-region.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::hasNextPage): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::regionAtBlockOffset): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::~RenderFlowThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): (WebCore::RenderFlowThread::regionLogicalHeightForLine): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): (WebCore::RenderFlowThread::mapFromFlowToRegion): (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): (WebCore::RenderFlowThread::logicalWidthChangedInRegions): (WebCore::RenderFlowThread::setRegionRangeForBox): (WebCore::RenderFlowThread::getRegionRangeForBox): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::takeRenderBoxRegionInfo): (WebCore::RenderRegion::removeRenderBoxRegionInfo): * rendering/RenderRegion.h: 2011-10-05 Gavin Barraclough Add explicit JSGlobalThis type. https://bugs.webkit.org/show_bug.cgi?id=69478 Reviewed by Darin Adler. JSC supports a split global object, as used by WebCore for the Window. As a stage of making this visible to JSC, make it so that if the global this value is not the global object itself, it must be a subclass of JSGlobalThis. * ForwardingHeaders/runtime/JSGlobalThis.h: Added. - Added forwarding header. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: - finishCreation takes a JSGlobalThis, or thisValue is implicit. * bindings/js/JSDOMWindowShell.h: - Make the window shell a subclass of JSGlobalThis. * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::finishCreation): - Don't pass the thisValue to JSGlobalObject::finishCreation. * bindings/js/JSWorkerContextBase.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): - Don't pass the thisValue to JSGlobalObject::finishCreation, for worker contexts. 2011-10-06 Anna Cavender Fix CodeGeneratorV8 for EnabledAtRuntime when class has no parent class. https://bugs.webkit.org/show_bug.cgi?id=69480 Reviewed by Adam Barth. No new tests. No new functionality, yet. * bindings/scripts/CodeGeneratorV8.pm: 2011-10-06 Dan Bernstein Assertion failure beneath blockSelectionGaps() when a selected node is removed Reviewed by Ryosuke Niwa. Test: editing/selection/invalid-in-RenderView.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::updateAppearance): Ensure that the VisibleSelection used to set the selection in the RenderView is valid, by reconstructing it from the current selection. 2011-10-06 Andreas Kling InlineBox's virtualLogicalHeight() partially limited to builds with SVG. https://bugs.webkit.org/show_bug.cgi?id=69538 Reviewed by Dan Bernstein. Remove erroneous ENABLE(SVG) guards around the initialization and use of InlineBox::hasVirtualLogicalHeight. This variable is used by TrailingFloatsRootInlineBox and should always be respected regardless of SVG support. * rendering/InlineBox.cpp: (WebCore::InlineBox::logicalHeight): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-10-06 Carlos Garcia Campos [GTK] Implement cache model for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=68434 Reviewed by Martin Robinson. Add a function to FileSystem to get the free space of the file system where the given path is on. * platform/FileSystem.h: * platform/gtk/FileSystemGtk.cpp: (WebCore::getVolumeFreeSizeForPath): 2011-10-06 Sergey Glazunov Add check for JavaScript URLs in HTMLPlugInImageElement::allowedToLoadFrameURL https://bugs.webkit.org/show_bug.cgi?id=68813 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-object-element.html * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL): 2011-10-06 Yury Semikhatsky Web Inspector: avoid assertion failure in ~InspectorDebuggerAgent in case of workers https://bugs.webkit.org/show_bug.cgi?id=69534 Make sure frontend is disconnected before WorkerInspectorController is destroyed. Reviewed by Pavel Feldman. * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::~WorkerInspectorController): 2011-10-05 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=69492 [Mac] Should be able to scroll embedded PDFs from keyboard Reviewed by Darin Adler. * WebCore.exp.in: Export ScrollableArea::scroll. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Call base class default event handler, so that events on focused plug-in elements would fall through to EventHandler::defaultKeyboardEventHandler. * plugins/PluginViewBase.h: (WebCore::PluginViewBase::scroll): Added a method that's called on a plug-in when WebCore asks it to scroll. Plug-in cannot really know what key events result in scroll actions. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::scroll): (WebCore::RenderEmbeddedObject::logicalScroll): * rendering/RenderEmbeddedObject.h: Ask plug-in to scroll when EventHandler::scrollOverflow() is called. 2011-10-06 Konstantin Scheglov REGRESSION (r95852?): Disappearing Border on bugs.webkit.org attachments https://bugs.webkit.org/show_bug.cgi?id=69296 Reviewed by David Hyatt. Test: fast/table/border-collapsing/cached-69296.html Remember BorderValue in CollapsedBorderValue by value. See https://bugs.webkit.org/show_bug.cgi?id=69296#c7 for motivation. * rendering/style/CollapsedBorderValue.h: (WebCore::CollapsedBorderValue::CollapsedBorderValue): (WebCore::CollapsedBorderValue::width): (WebCore::CollapsedBorderValue::style): (WebCore::CollapsedBorderValue::exists): (WebCore::CollapsedBorderValue::isTransparent): (WebCore::CollapsedBorderValue::operator==): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::collapsedStartBorder): (WebCore::RenderTableCell::collapsedEndBorder): (WebCore::RenderTableCell::collapsedBeforeBorder): (WebCore::RenderTableCell::collapsedAfterBorder): 2011-10-06 Gavin Peters save resource zeroing stacks in ScriptElement for debugging https://bugs.webkit.org/show_bug.cgi?id=69453 The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug 75604). This patch will save a stack in the ScriptElement when this happens, so that if we do later crash, we can see how we did the first zeroing. See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that this change will help track down. Reviewed by Nate Chapin. No new tests, this shouldn't affect output at all, and isn't particularly testable. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-06 Rémi Duraffort Fix compilation by adding some missing ENABLE(VIDEO|XSLT) https://bugs.webkit.org/show_bug.cgi?id=69522 Unreviewed build fix * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: * bindings/v8/custom/V8HTMLAudioElementConstructor.h: * bindings/v8/custom/V8XSLTProcessorCustom.cpp: 2011-10-06 Pavel Feldman Web Inspector: add Styles and Metrics sidebars to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69529 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions.requestCSSNameCompletions): * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.forProperty): (WebInspector.CSSKeywordCompletions.isColorAwareProperty): * inspector/front-end/Checkbox.js: * inspector/front-end/ElementsPanel.js: * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._updateMetrics): (WebInspector.MetricsSidebarPane.prototype.startEditing): (WebInspector.MetricsSidebarPane.prototype._handleKeyDown): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.BlankStylePropertiesSection.prototype.makeNormal): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/externs.js: (WebInspector.linkifyResourceAsNode): (Element.prototype.scrollIntoViewIfNeeded): (Element.prototype.selectionLeftOffset): * inspector/front-end/inspector.js: * inspector/front-end/utilities.js: 2011-10-06 Pavel Feldman Web Inspector: extract DOMPresentation, make EventListenersSidebar compile https://bugs.webkit.org/show_bug.cgi?id=69527 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.nodeNameInCorrectCase): (WebInspector.DOMNode.prototype.moveTo): (WebInspector.DOMNode.prototype.isXMLNode): * inspector/front-end/DOMBreakpointsSidebarPane.js: (WebInspector.DOMBreakpointsSidebarPane.prototype._setBreakpoint): * inspector/front-end/DOMPresentation.js: Added. (WebInspector.DOMPresentation.decorateNodeLabel): (WebInspector.DOMPresentation.linkifyNodeReference): (WebInspector.DOMPresentation.linkifyNodeById): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode): * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/PropertiesSection.js: * inspector/front-end/Section.js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-10-06 Pavel Feldman Web Inspector: add all Resource panel views to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69526 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._contextMenu): (WebInspector.Cookies.cookieMatchesResourceURL): * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable): (WebInspector.CookiesTable.prototype._onDeleteFromGrid): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid.comparator): (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid): (WebInspector.DataGrid.createSortableDataGrid): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._queryFinished): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype.showDatabase): * inspector/front-end/TextPrompt.js: 2011-10-06 Pavel Feldman Web Inspector: add all Resource panel views to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69526 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._contextMenu): (WebInspector.Cookies.cookieMatchesResourceURL): * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable): (WebInspector.CookiesTable.prototype._onDeleteFromGrid): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid.comparator): (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid): (WebInspector.DataGrid.createSortableDataGrid): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._queryFinished): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype.showDatabase): * inspector/front-end/TextPrompt.js: 2011-10-06 Sheriff Bot Unreviewed, rolling out r96791. http://trac.webkit.org/changeset/96791 https://bugs.webkit.org/show_bug.cgi?id=69528 webkit_unit_tests broken on Mac and Win (Requested by hwennborg on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-05 Mikhail Naganov Web Inspector: [Chromium] Heap Snapshot colors legend help popup is not shown. https://bugs.webkit.org/show_bug.cgi?id=69482 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._helpClicked): 2011-10-05 Pavel Feldman Web Inspector: add 10 more front-end classes to the compilation process. https://bugs.webkit.org/show_bug.cgi?id=69445 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/HAREntry.js: * inspector/front-end/HandlerRegistry.js: * inspector/front-end/IFrameView.js: * inspector/front-end/JavaScriptSourceFrame.js: * inspector/front-end/PanelEnablerView.js: (WebInspector.PanelEnablerView): * inspector/front-end/PartialQuickSort.js: * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.fillSection): (WebInspector.PropertiesSidebarPane.prototype.update): * inspector/front-end/ShowMoreDataGridNode.js: * inspector/front-end/SidebarTreeElement.js: * inspector/front-end/TimelineAgent.js: * inspector/front-end/WelcomeView.js: * inspector/front-end/externs.js: (WebInspector.addMainEventListeners): 2011-10-05 Pavel Feldman Web Inspector: make ElementsTreeOutline compile https://bugs.webkit.org/show_bug.cgi?id=69439 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMSyntaxHighlighter.js: * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._populateContextMenu): (WebInspector.ElementsPanel.prototype._inspectElementRequested): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired): (WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes): (WebInspector.ElementsTreeOutline.prototype._populateContextMenu): (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): (WebInspector.ElementsTreeElement.prototype._startEditingTextNode): (WebInspector.ElementsTreeElement.prototype._startEditingTagName): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted): (): * inspector/front-end/externs.js: (WebInspector.highlightDOMNode): (WebInspector.resourceURLForRelatedNode): 2011-10-06 Pavel Feldman Web Inspector: Inspector fails to start if there was at least one watch expression. https://bugs.webkit.org/show_bug.cgi?id=69516 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane): 2011-10-06 Dominic Cooney Don't make virtual calls in Node::parentNode. https://bugs.webkit.org/show_bug.cgi?id=69266 Reviewed by Antti Koivisto. ShadowRoot and SVGShadowRoot remain semantically separate (eg isShadowRoot/isSVGShadowRoot) but share a flag (IsShadowRootOrSVGShadowRootFlag, hitherto IsShadowRootFlag just for ShadowRoot). In combination with IsSVGFlag ShadowRoot (false) can be distinguished from SVGShadowRoot (true). This lets us make isSVGShadowRoot non-virtual. No change in behavior => No new tests. * dom/Node.cpp: (WebCore::Node::shadowHost): * dom/Node.h: (WebCore::Node::isSVGShadowRoot): (WebCore::Node::isShadowRoot): (WebCore::Node::parentNode): (WebCore::Node::parentNodeGuaranteedHostFree): * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::SVGShadowTreeContainerElement): (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): * rendering/svg/SVGShadowTreeElements.h: * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): * svg/SVGElement.h: * svg/SVGGElement.cpp: (WebCore::SVGGElement::SVGGElement): * svg/SVGGElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::SVGStyledElement): * svg/SVGStyledElement.h: * svg/SVGStyledLocatableElement.cpp: (WebCore::SVGStyledLocatableElement::SVGStyledLocatableElement): * svg/SVGStyledLocatableElement.h: * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): * svg/SVGStyledTransformableElement.h: 2011-10-06 John Knottenbelt Take pageScaleFactor into account for MouseRelatedEvents. https://bugs.webkit.org/show_bug.cgi?id=67592 Reviewed by Tony Gentilcore. Tests: fast/events/page-scaled-mouse-click-iframe.html fast/events/page-scaled-mouse-click.html * dom/MouseRelatedEvent.cpp: (WebCore::contentsScrollOffset): (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::frameScaleFactor): (WebCore::MouseRelatedEvent::computePageLocation): (WebCore::MouseRelatedEvent::computeRelativePosition): 2011-10-03 Hans Wennborg IndexedDB: Remove SQLite-LevelDB migration code https://bugs.webkit.org/show_bug.cgi?id=69264 Reviewed by Tony Chang. Remove migration functionality. Just removing code, so no new tests. * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): * storage/IDBFactoryBackendImpl.h: 2011-10-06 James Robinson [chromium] Remove USE(THREADED_COMPOSITING) from the tree https://bugs.webkit.org/show_bug.cgi?id=69489 Reviewed by Darin Fisher. This macro isn't needed any more since the logic it guarded is guarded by a runtime switch. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-05 Kentaro Hara Refactor IDL attributes about constructor https://bugs.webkit.org/show_bug.cgi?id=69074 Reviewed by Adam Barth. Currently, IDL attributes about constructor are confusing: - [CustomConstructFunction] means that there is a custom constructor for JSC. - [V8CustomConstructor] means that there is a custom constructor for V8. - [CustomConstructor] exists in CodeGenerator*.pm but is not used in any IDL files. - For almost all IDL files, [CustomConstructFunction] and [V8CustomConstructor] are used at the same time. - ObjC, CPP and GObject bindings do not support custom constructors. This patch makes the following changes: - Rename [CustomConstructFunction] to [JSCustomConstructor]. - [JSCustomConstructor] means that there is a custom constructor for JSC. - [V8CustomConstructor] means that there is a custom constructor for V8. - [CustomConstructor] means that there is a custom constructor for both JSC and V8. No new tests. No change in behavior. Confirm that build succeeds. * bindings/scripts/CodeGeneratorJS.pm: Removed [CustomConstructFunction] and added [JSCustomConstructor] (GenerateHeader): (GenerateAttributesHashTable): (GenerateImplementation): (GenerateConstructorDefinition): * css/WebKitCSSMatrix.idl: Renamed [CustomConstructFunction] to [JSCustomConstructor]. If both [JSCustomConstructor] and [V8CustomConstructor] are specified, then we replaced them with [CustomConstructor]. * dom/CustomEvent.idl: Ditto. * dom/ErrorEvent.idl: Ditto. * dom/Event.idl: Ditto. * dom/HashChangeEvent.idl: Ditto. * dom/MessageChannel.idl: Ditto. * dom/MessageEvent.idl: Ditto. * dom/PageTransitionEvent.idl: Ditto. * dom/PopStateEvent.idl: Ditto. * dom/ProgressEvent.idl: Ditto. * dom/WebKitAnimationEvent.idl: Ditto. * html/DOMFormData.idl: Ditto. * html/canvas/ArrayBuffer.idl: Ditto. * html/canvas/DataView.idl: Ditto. * html/canvas/Float32Array.idl: Ditto. * html/canvas/Float64Array.idl: Ditto. * html/canvas/Int16Array.idl: Ditto. * html/canvas/Int32Array.idl: Ditto. * html/canvas/Int8Array.idl: Ditto. * html/canvas/Uint16Array.idl: Ditto. * html/canvas/Uint32Array.idl: Ditto. * html/canvas/Uint8Array.idl: Ditto. * p2p/PeerConnection.idl: Ditto. * page/EventSource.idl: Ditto. * page/WebKitPoint.idl: Ditto. * webaudio/AudioContext.idl: Ditto. * websockets/CloseEvent.idl: Ditto. * websockets/WebSocket.idl: Ditto. * workers/SharedWorker.idl: Ditto. * workers/Worker.idl: Ditto. * xml/XMLHttpRequest.idl: Ditto. * xml/XSLTProcessor.idl: Ditto. 2011-10-03 Andy Estes Add the option to suppress rendering until the document's load event fires. https://bugs.webkit.org/show_bug.cgi?id=69298 Reviewed by Simon Fraser. Add a WebCore setting that suppresses painting and compositing layer updates until the document's load event fires. This masks the effects of incremental rendering (for clients that opt in) by ensuring that all sub-resources have loaded and a full layout has taken place before painting the document for the first time. No tests currently possible. Testing this would require the ability for DRT to dump state while resources are loading, which it doesn't currently do. * dom/Document.cpp: (WebCore::Document::implicitClose): If rendering was previously suppressed, force a repaint and compositing layer update. (WebCore::Document::visualUpdatesAllowed): Add a helper method to determine if the document is in a state where rendering is allowed. * dom/Document.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setSuppressIncrementalRendering): (WebCore::Settings::suppressIncrementalRendering): * rendering/RenderLayer.cpp: (WebCore::shouldSuppressPaintingLayer): Encapsulate the FOUC and painting suppression checks into a single helper function for readability's sake. (WebCore::RenderLayer::paintLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): If we should suppress compositing layer updates and the load event has yet to fire, return early. 2011-10-05 Yuta Kitamura WebSocket: Add extensions attribute https://bugs.webkit.org/show_bug.cgi?id=69408 Reviewed by Kent Tamura. Add WebSocket's "extensions" attribute as specified in the WebSocket API . WebSocket protocol extension is not implemented at all, thus this attribute always returns an empty string. Test: http/tests/websocket/tests/hybi/extensions.html http/tests/websocket/tests/hixie76/undefined-attributes.html (updated) * websockets/WebSocket.cpp: (WebCore::WebSocket::extensions): If the hixie-76 protocol is chosen, we need to return "undefined" in order to keep behavior of the ports which have not used the newer hybi protocol yet. * websockets/WebSocket.h: * websockets/WebSocket.idl: 2011-10-05 Dominic Cooney IsShadowRootFlag should not depend on whether a ShadowRoot is attached to a host. https://bugs.webkit.org/show_bug.cgi?id=69406 Reviewed by Hajime Morita. No change in behavior => No new tests. * dom/Node.cpp: (WebCore::Node::setShadowHost): Don't twiddle the flag. * dom/Node.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): Set the IsShadowRootFlag on creation. * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): Let ShadowRoot set creation flags. * dom/TreeScope.h: 2011-10-05 Chris Rogers Define a log2f() function for Windows in wtf/MathExtras.h https://bugs.webkit.org/show_bug.cgi?id=69491 Reviewed by Darin Adler. No new tests. This change is tested in existing layout tests. * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 2011-10-05 Erik Arvidsson window.location.href and others needlessly decodes URI-encoded characters https://bugs.webkit.org/show_bug.cgi?id=30225 Reviewed by Darin Adler. Don't decode KURL::path() and stop using KURL::deprecatedString() in Location methods. This slightly changes how we parse data and javascript URLs (non hierarchical URLs) to not encode so aggressively. * fileapi/DOMFileSystemBase.cpp: (WebCore::DOMFileSystemBase::crackFileSystemURL): Manually decode path() * loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): Manually decode path() * page/Location.cpp: (WebCore::Location::href): Use string() instead of deprecatedString() * page/Location.h: (WebCore::Location::toString): Inline call to href() * platform/KURL.cpp: (WebCore::KURL::path): Don't decode. (WebCore::escapeAndAppendNonHierarchicalPart): Rename escapeAndAppendFragment to escapeAndAppendNonHierarchicalPart since this is now used for more than just fragments. (WebCore::KURL::parse): Don't decode * platform/KURLGoogle.cpp: (WebCore::KURL::path): Remove out of date comment * platform/qt/KURLQt.cpp: (WebCore::KURL::fileSystemPath): Manually decode path() * platform/win/ClipboardWin.cpp: (WebCore::createGlobalHDropContent): Manually decode path() * workers/WorkerLocation.cpp: (WebCore::WorkerLocation::href): Use string() instead of deprecatedString() * workers/WorkerLocation.h: (WebCore::WorkerLocation::toString): Inline call to href() 2011-10-05 Darin Adler [Mac] Use four more named cursors if present https://bugs.webkit.org/show_bug.cgi?id=69488 Reviewed by Dan Bernstein. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use the names "Help", "Cell", "ZoomIn", and "ZoomOut" to get those cursors. Structure the code so it falls back if the cursors are not present. 2011-10-05 Tony Chang force margin:auto to 0 in flex items https://bugs.webkit.org/show_bug.cgi?id=69475 Reviewed by Ojan Vafai. The spec used to say the margin had a value of flex(1 0 0), but changed to just be 0. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computePreferredLogicalWidth): (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): 2011-10-05 Dean Jackson Computed style for filter property https://bugs.webkit.org/show_bug.cgi?id=68477 Reviewed by Simon Fraser. Reports the computed style for the new -webkit-filter property value. Test: css3/filters/filter-property-computed-style.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::computedFilter): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-10-05 Jer Noble Enable WEB_AUDIO by default in the WebKit/mac port. https://bugs.webkit.org/show_bug.cgi?id=68587 Reviewed by Simon Fraser. No new tests; existing webaudio/ layout tests cover this. * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: Add a build step which copies audio resources to the WebCore.framework bundle. 2011-10-03 Ojan Vafai [flexbox] take marginBeforeForChild into account when positioning children https://bugs.webkit.org/show_bug.cgi?id=69313 Reviewed by Tony Chang. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): 2011-10-05 Vangelis Kokkevis Switching threaded compositor from a compile time option to a run time one. https://bugs.webkit.org/show_bug.cgi?id=69391 Reviewed by Darin Fisher. Mostly converted #if USE(THREADED_COMPOSITING) to a regular if statements. In addition, CCLayerTreeHost::scheduleComposite() is removed as it wasn't being called from anywhere, No new tests as it doesn't add new functionality. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsCommitThenRedraw): (WebCore::CCLayerTreeHost::setNeedsRedraw): (WebCore::CCLayerTreeHost::composite): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommitThenRedraw): (WebCore::CCSingleThreadProxy::compositeImmediately): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2011-10-05 Dean Jackson Parse '-webkit-filter' property syntax https://bugs.webkit.org/show_bug.cgi?id=68473 Reviewed by Nikolas Zimmermann. Parse the new -webkit-filter property, looking for shorthand functions then testing number, type and value of parameters. Note that support for drop-shadow() was omitted from this patch because parsing CSS shadow syntax was going to require some refactoring of the box and text shadow code. The followup bug is https://bugs.webkit.org/show_bug.cgi?id=69108. Also, computed style will return null for filters at the moment. That's https://bugs.webkit.org/show_bug.cgi?id=68477. Tests: css3/filters/filter-property-parsing-invalid.html css3/filters/filter-property-parsing.html * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Build files updated for new WebKitCSSFilterValue classes. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS): * bindings/objc/DOMCSS.mm: Test if value is WebKitCSSFilterValue. * css/CSSParser.cpp: (WebCore::filterInfoForName): (WebCore::CSSParser::isValidFilterArgument): (WebCore::CSSParser::parseFilter): * css/CSSParser.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::filterOperationForType): (WebCore::CSSStyleSelector::createFilterOperations): * css/CSSStyleSelector.h: Handle the new shorthand functions in -webkit-filter. * css/CSSValue.h: (WebCore::CSSValue::isWebKitCSSFilterValue): Add virtual function that returns false here. * css/WebKitCSSFilterValue.cpp: Added. (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue): (WebCore::WebKitCSSFilterValue::~WebKitCSSFilterValue): (WebCore::WebKitCSSFilterValue::cssText): * css/WebKitCSSFilterValue.h: Added. (WebCore::WebKitCSSFilterValue::create): (WebCore::WebKitCSSFilterValue::operationType): (WebCore::WebKitCSSFilterValue::isWebKitCSSFilterValue): * css/WebKitCSSFilterValue.idl: Added. WebKitCSSFilterValue modelled closely on WebKitCSSTransformValue, basically identifying the type of operation in a CSSValueList. * page/DOMWindow.idl: New WebKitCSSFilterValue constructor. * platform/graphics/filters/FilterOperation.h: (WebCore::BlurFilterOperation::create): (WebCore::BlurFilterOperation::stdDeviationX): (WebCore::BlurFilterOperation::stdDeviationY): (WebCore::BlurFilterOperation::BlurFilterOperation): (WebCore::SharpenFilterOperation::create): (WebCore::SharpenFilterOperation::radius): (WebCore::SharpenFilterOperation::threshold): (WebCore::SharpenFilterOperation::SharpenFilterOperation): Use Length rather than double for parameters that are CSS lengths. 2011-10-05 Chris Rogers Fix Windows build - it doesn't have a log2f() function... https://bugs.webkit.org/show_bug.cgi?id=69473 Unreviewed build fix. * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 2011-10-05 James Robinson [chromium] ASSERT triggered when gpu process lost in single-threaded compositing path https://bugs.webkit.org/show_bug.cgi?id=69467 Reviewed by Kenneth Russell. Shuffles debug-only bookkeeping around to more closely match what we do in the threaded path and not trip a false-positive ASSERT(). * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): 2011-10-05 Sheriff Bot Unreviewed, rolling out r96756. http://trac.webkit.org/changeset/96756 https://bugs.webkit.org/show_bug.cgi?id=69472 Many builds broken due to WTFGetBacktrace not being exported from JavaScriptCore (Requested by aroben on #webkit). * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-05 Gavin Peters save resource zeroing stacks in ScriptElement for debugging https://bugs.webkit.org/show_bug.cgi?id=69453 The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug 75604). This patch will save a stack in the ScriptElement when this happens, so that if we do later crash, we can see how we did the first zeroing. See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that this change will help track down. Reviewed by Nate Chapin. No new tests, this shouldn't affect output at all, and isn't particularly testable. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-05 Alexey Proskuryakov More build fix. * WebCore.exp.in: Made a typo in a last minute change for my 32-bit build fix. 2011-10-05 Anna Cavender Fix CueParser::didFinishLoading to match changes in ThreadableLoaderClient https://bugs.webkit.org/show_bug.cgi?id=69456 Reviewed by David Levin. No new tests. No new functionality. * html/track/CueParser.cpp: (WebCore::CueParser::didFinishLoading): * html/track/CueParser.h: 2011-10-05 Alexey Proskuryakov 32-bit build fix. * WebCore.exp.in: In 32-bit, WebCore needs to export both NSSize and CGSize constructors. In 64-bit, NSSize is just a typedef for CGSize. Also fixed conversion operators, for good measure. 2011-10-05 Jer Noble WEB_AUDIO does not compile on Leopard 32-bit. https://bugs.webkit.org/show_bug.cgi?id=69292 Reviewed by Simon Fraser. No new tests; covered by all existing audio tests. Use of float and double within the WEB_AUDIO implementation have been harmonized, with most calculations done using floats, with narrowPrecisionToFloat() added when necessary to narrow double results down to floats, and with float constants initialized with float values: * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): (WebCore::AudioBus::createByMixingToMono): * platform/audio/AudioBus.h: (WebCore::AudioBus::sampleRate): (WebCore::AudioBus::setSampleRate): * platform/audio/AudioDSPKernel.h: (WebCore::AudioDSPKernel::AudioDSPKernel): (WebCore::AudioDSPKernel::sampleRate): * platform/audio/AudioDSPKernelProcessor.cpp: (WebCore::AudioDSPKernelProcessor::AudioDSPKernelProcessor): * platform/audio/AudioDSPKernelProcessor.h: * platform/audio/AudioDestination.h: * platform/audio/AudioFileReader.h: * platform/audio/AudioProcessor.h: (WebCore::AudioProcessor::AudioProcessor): (WebCore::AudioProcessor::sampleRate): * platform/audio/AudioUtilities.cpp: (WebCore::AudioUtilities::decibelsToLinear): (WebCore::AudioUtilities::linearToDecibels): (WebCore::AudioUtilities::discreteTimeConstantForSampleRate): * platform/audio/AudioUtilities.h: * platform/audio/DynamicsCompressor.cpp: (WebCore::DynamicsCompressor::DynamicsCompressor): (WebCore::DynamicsCompressor::initializeParameters): (WebCore::DynamicsCompressor::parameterValue): (WebCore::DynamicsCompressor::setEmphasisStageParameters): (WebCore::DynamicsCompressor::process): * platform/audio/DynamicsCompressor.h: (WebCore::DynamicsCompressor::sampleRate): (WebCore::DynamicsCompressor::nyquist): * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::saturate): (WebCore::DynamicsCompressorKernel::DynamicsCompressorKernel): (WebCore::DynamicsCompressorKernel::process): * platform/audio/DynamicsCompressorKernel.h: * platform/audio/EqualPowerPanner.cpp: (WebCore::EqualPowerPanner::EqualPowerPanner): * platform/audio/EqualPowerPanner.h: * platform/audio/HRTFDatabase.cpp: (WebCore::HRTFDatabase::create): (WebCore::HRTFDatabase::HRTFDatabase): * platform/audio/HRTFDatabase.h: (WebCore::HRTFDatabase::sampleRate): * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary): (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader): * platform/audio/HRTFDatabaseLoader.h: (WebCore::HRTFDatabaseLoader::databaseSampleRate): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::calculateSymmetricKernelsForAzimuthElevation): (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation): (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFElevation.h: (WebCore::HRTFElevation::sampleRate): (WebCore::HRTFElevation::HRTFElevation): * platform/audio/HRTFKernel.cpp: (WebCore::extractAverageGroupDelay): (WebCore::HRTFKernel::HRTFKernel): (WebCore::HRTFKernel::createInterpolatedKernel): * platform/audio/HRTFKernel.h: (WebCore::HRTFKernel::create): (WebCore::HRTFKernel::frameDelay): (WebCore::HRTFKernel::sampleRate): (WebCore::HRTFKernel::HRTFKernel): * platform/audio/HRTFPanner.cpp: (WebCore::HRTFPanner::HRTFPanner): (WebCore::HRTFPanner::fftSizeForSampleRate): * platform/audio/HRTFPanner.h: (WebCore::HRTFPanner::sampleRate): * platform/audio/Panner.cpp: (WebCore::Panner::create): * platform/audio/Panner.h: * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): * platform/audio/mac/AudioBusMac.mm: (WebCore::AudioBus::loadPlatformResource): * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestination::create): (WebCore::AudioDestination::hardwareSampleRate): (WebCore::AudioDestinationMac::AudioDestinationMac): * platform/audio/mac/AudioDestinationMac.h: (WebCore::AudioDestinationMac::sampleRate): * platform/audio/mac/AudioFileReaderMac.cpp: (WebCore::AudioFileReader::createBus): (WebCore::createBusFromAudioFile): (WebCore::createBusFromInMemoryAudioFile): * platform/audio/mac/AudioFileReaderMac.h: * webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): (WebCore::AsyncAudioDecoder::DecodingTask::create): (WebCore::AsyncAudioDecoder::DecodingTask::DecodingTask): * webaudio/AsyncAudioDecoder.h: (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate): * webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): * webaudio/AudioBasicProcessorNode.h: * webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::create): (WebCore::AudioBuffer::createFromAudioFileData): (WebCore::AudioBuffer::AudioBuffer): * webaudio/AudioBuffer.h: (WebCore::AudioBuffer::sampleRate): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::create): (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): (WebCore::AudioBufferSourceNode::process): (WebCore::AudioBufferSourceNode::renderFromBuffer): * webaudio/AudioBufferSourceNode.h: * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::AudioChannelMerger): * webaudio/AudioChannelMerger.h: (WebCore::AudioChannelMerger::create): * webaudio/AudioChannelSplitter.cpp: (WebCore::AudioChannelSplitter::AudioChannelSplitter): * webaudio/AudioChannelSplitter.h: (WebCore::AudioChannelSplitter::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::createOfflineContext): (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::createBuffer): * webaudio/AudioContext.h: (WebCore::AudioContext::sampleRate): * webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * webaudio/AudioDestinationNode.h: * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::AudioGainNode): * webaudio/AudioGainNode.h: (WebCore::AudioGainNode::create): * webaudio/AudioListener.cpp: (WebCore::AudioListener::AudioListener): * webaudio/AudioListener.h: (WebCore::AudioListener::setPosition): (WebCore::AudioListener::setOrientation): (WebCore::AudioListener::setVelocity): * webaudio/AudioNode.cpp: (WebCore::AudioNode::AudioNode): * webaudio/AudioNode.h: (WebCore::AudioNode::sampleRate): * webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::AudioPannerNode): (WebCore::AudioPannerNode::getAzimuthElevation): * webaudio/AudioPannerNode.h: (WebCore::AudioPannerNode::create): * webaudio/AudioParam.cpp: (WebCore::AudioParam::value): (WebCore::AudioParam::smoothedValue): (WebCore::AudioParam::smooth): (WebCore::AudioParam::calculateSampleAccurateValues): * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::timeToSampleFrame): (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): * webaudio/AudioSourceNode.h: (WebCore::AudioSourceNode::AudioSourceNode): * webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * webaudio/BiquadFilterNode.h: (WebCore::BiquadFilterNode::create): * webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::BiquadProcessor): * webaudio/BiquadProcessor.h: * webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): * webaudio/ConvolverNode.h: (WebCore::ConvolverNode::create): * webaudio/DefaultAudioDestinationNode.cpp: (WebCore::DefaultAudioDestinationNode::initialize): * webaudio/DefaultAudioDestinationNode.h: (WebCore::DefaultAudioDestinationNode::sampleRate): * webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::DelayDSPKernel): (WebCore::DelayDSPKernel::process): * webaudio/DelayDSPKernel.h: * webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * webaudio/DelayNode.h: (WebCore::DelayNode::create): * webaudio/DelayProcessor.cpp: (WebCore::DelayProcessor::DelayProcessor): * webaudio/DelayProcessor.h: * webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): * webaudio/DynamicsCompressorNode.h: (WebCore::DynamicsCompressorNode::create): * webaudio/HighPass2FilterNode.cpp: (WebCore::HighPass2FilterNode::HighPass2FilterNode): * webaudio/HighPass2FilterNode.h: (WebCore::HighPass2FilterNode::create): * webaudio/JavaScriptAudioNode.cpp: (WebCore::JavaScriptAudioNode::create): (WebCore::JavaScriptAudioNode::JavaScriptAudioNode): (WebCore::JavaScriptAudioNode::initialize): * webaudio/JavaScriptAudioNode.h: * webaudio/LowPass2FilterNode.cpp: (WebCore::LowPass2FilterNode::LowPass2FilterNode): * webaudio/LowPass2FilterNode.h: (WebCore::LowPass2FilterNode::create): * webaudio/OfflineAudioDestinationNode.h: (WebCore::OfflineAudioDestinationNode::sampleRate): * webaudio/RealtimeAnalyserNode.cpp: (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode): * webaudio/RealtimeAnalyserNode.h: (WebCore::RealtimeAnalyserNode::create): * webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::process): * webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::WaveShaperProcessor): * webaudio/WaveShaperProcessor.h: 2011-10-05 Alexey Proskuryakov [Mac] Make built-in PDF description localizable https://bugs.webkit.org/show_bug.cgi?id=69442 Reviewed by Dan Bernstein. Added strings for plug-in's name and for its supported MIME type. * English.lproj/Localizable.strings: * WebCore.exp.in: * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::builtInPDFPluginName): (WebCore::DefaultLocalizationStrategy::pdfDocumentTypeDescription): * platform/DefaultLocalizationStrategy.h: * platform/LocalizationStrategy.h: * platform/LocalizedStrings.cpp: (WebCore::builtInPDFPluginName): (WebCore::pdfDocumentTypeDescription): * platform/LocalizedStrings.h: 2011-10-05 David Levin Attempt to fix the bindings test (broken by r96727). Reviewed by Adam Barth. * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::ConfigureV8TestMediaQueryListListenerTemplate): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): 2011-10-05 James Robinson [chromium] Hook WebCompositor interface for input events up to the compositor proper https://bugs.webkit.org/show_bug.cgi?id=69394 Reviewed by Darin Fisher. This wires up WebCompositorImpl to the compositor itself so we can handle input events as scrolls on the compositor thread, although it doesn't actually wire up any input events to actual scrolling. The way this works: - CCThreadProxy owns an adapter that implements the CCScrollController interface - CCThreadProxy owns a CCInputHandler, which is implemented by WebKit::WebCompositorImpl, that has a pointer to the adapter - CCLayerTreeHost has an identifier (an int) for its WebKit::WebCompositorImpl that's initialized in initializeLayerRenderer. This identifier is exposed to its owner (WebKit::WebViewImpl) so the embedder can wire up the threading logic behind the scenes. This is just plumbing, no change in behavior. * WebCore.gypi: * platform/graphics/chromium/cc/CCInputHandler.h: Added. (WebCore::CCInputHandler::~CCInputHandler): (WebCore::CCInputHandler::CCInputHandler): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::compositorIdentifier): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::scrollRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCScrollController.h: Added. (WebCore::CCScrollController::CCScrollController): (WebCore::CCScrollController::~CCScrollController): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore::CCSingleThreadProxy::compositorIdentifier): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxyScrollControllerAdapter::create): (WebCore::CCThreadProxyScrollControllerAdapter::~CCThreadProxyScrollControllerAdapter): (WebCore::CCThreadProxyScrollControllerAdapter::scrollRootLayer): (WebCore::CCThreadProxyScrollControllerAdapter::CCThreadProxyScrollControllerAdapter): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::compositorIdentifier): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-05 Andreas Kling Shrink OutlineValue. https://bugs.webkit.org/show_bug.cgi?id=69436 Reviewed by Darin Adler. Move OutlineValue::m_isAuto up into the base class (BorderValue.) This shrinks OutlineValue by 32 bit, which in turn shrinks StyleBackgroundData by one CPU word. This reduces memory consumption by 250 kB (on 64-bit) when loading the full HTML5 spec. * rendering/style/BorderValue.h: (WebCore::BorderValue::BorderValue): * rendering/style/OutlineValue.h: (WebCore::OutlineValue::OutlineValue): (WebCore::OutlineValue::isAuto): 2011-10-05 Chang Shu [WK2] WebKitTestRunner needs LayoutTestController.dumpConfigurationForViewport https://bugs.webkit.org/show_bug.cgi?id=69365 Reviewed by Darin Adler. Expose computeViewportAttributes for mac build. * WebCore.exp.in: 2011-10-05 Anna Cavender Functions to make enabled at runtime, including changes to CodeGeneratorvV8 to allow entire interfaces (not just attributes) to be runtime-enabled. https://bugs.webkit.org/show_bug.cgi?id=69352 Reviewed by Adam Barth. No new tests. No new functionality. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled): * bindings/scripts/CodeGeneratorV8.pm: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadTextTracks): * html/HTMLTrackElement.idl: 2011-10-05 Kenneth Russell Mask underlying RENDERER and VENDOR strings https://bugs.webkit.org/show_bug.cgi?id=69389 Reviewed by Sam Weinig. Test: fast/canvas/webgl/renderer-and-vendor-strings.html * html/canvas/WebGLGetInfo.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getParameter): 2011-10-05 Sachin Puranik Spec change - option.label should be reflected like option.value https://bugs.webkit.org/show_bug.cgi?id=68684 Reviewed by Darin Adler. Incorporating the recent change in spec for label attribute of option element. While retrieving the "Label" IDL attribute return the "Label" content attribute if present , else return the value of textContent attribute. Tests: fast/forms/option-label-trim-html-spaces.html fast/forms/option-value-and-label-changed-by-js.html * dom/OptionElement.cpp: (WebCore::OptionElement::normalizeText):style fixes * dom/OptionElement.h: make collectOptionInnerText() protected. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::label): return innerText if label attribute un-available. (WebCore::HTMLOptionElement::setLabel):setLabel() implementation. * html/HTMLOptionElement.h: add setLabel declaration. * html/HTMLOptionElement.idl: Change reflect to ConvertNullToNullString in idl 2011-10-05 Rémi Duraffort [GTK] Fix compilation with gtk v2.20.1 https://bugs.webkit.org/show_bug.cgi?id=69418 Unreviewed build fix * platform/gtk/GtkDragAndDropHelper.cpp: 2011-10-05 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68731 Outline sides not painted for region. Fix the painting and hit testing code for regions to add in the maximalOutlineSize on unclipped sides. Also fix some math errors with the computation of the translation offset and clip rects when overflow or outlines spill out. Reviewed by Darin Adler. Added new test in fast/regions. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): 2011-10-05 Yury Semikhatsky Unreviewed. Build fix: make InspectorStateClient.h Private in XCode project. * WebCore.xcodeproj/project.pbxproj: 2011-10-05 Martin Robinson libsoup-CRITICAL **: soup_message_io_pause: assertion `io != NULL' failed https://bugs.webkit.org/show_bug.cgi?id=64263 Reviewed by Xan Lopez. No new tests. This is difficult to test because it relies on network timing and to catch and parse stdout. Instead of allowing messages to pause and unpause after receiving headers, we wait until the completion of the sendRequestCallback. This will ensure that the SoupSession is in the correct state to allow for pausing and unpausing. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::platformSetDefersLoading): Don't pause and unpause until the sendRequestCallback is called. We detect this situation by checking whether or not we have an input stream yet. Previously the code was only pausing until after soupMessage->status_code was not equal to SOUP_STATUS_NONE. This means that the message was pausable right after headers are received. sendRequestCallback happens some time after that. 2011-10-05 Ilya Tikhonovsky Unreviewed build fix for Debug builders. * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::restoreInspectorStateFromCookie): 2011-10-05 Dirk Schulze SVG 1.1: ineffectual transform attribute for ClipPath https://bugs.webkit.org/show_bug.cgi?id=55361 Reviewed by Nikolas Zimmermann. Respect 'transform' attribute/property for . If the masking code path is used the mask context gets transformed, otherwise the path itself. Tests: svg/clip-path/clip-path-transform-1.svg svg/clip-path/clip-path-transform-2.svg svg/dynamic-updates/SVGClipPathElement-transform-influences-hitTesting.html * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::pathOnlyClipping): Transform the clip path. (WebCore::RenderSVGResourceClipper::applyClippingToContext): (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): Transform the context of the mask image. (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect): Repaint rect must get concatenated with the current animated transformation. (WebCore::RenderSVGResourceClipper::hitTestClipContent): Point for hit testing must be transformed by the current animated transformation. * rendering/svg/RenderSVGResourceClipper.h: 2011-10-05 Pavel Feldman Web Inspector: move elements panel update semantics from ElementsPanel to ElementsTreeOutline. https://bugs.webkit.org/show_bug.cgi?id=69431 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.show): (WebInspector.ElementsPanel.prototype.hide): (WebInspector.ElementsPanel.prototype._selectedNodeChanged): (WebInspector.ElementsPanel.prototype._reset): (WebInspector.ElementsPanel.prototype._nodeRemoved): (WebInspector.ElementsPanel.prototype.updateBreadcrumb.selectCrumbFunction): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype.wireToDomAgent): (WebInspector.ElementsTreeOutline.prototype.setVisible): (WebInspector.ElementsTreeOutline.prototype.addEventListener): (WebInspector.ElementsTreeOutline.prototype.removeEventListener): (WebInspector.ElementsTreeOutline.prototype.selectDOMNode): (WebInspector.ElementsTreeOutline.prototype.update): (WebInspector.ElementsTreeOutline.prototype._selectedNodeChanged): (WebInspector.ElementsTreeOutline.prototype.findTreeElement.parentNode): (WebInspector.ElementsTreeOutline.prototype.findTreeElement): (WebInspector.ElementsTreeOutline.prototype.createTreeElementFor): (WebInspector.ElementsTreeOutline.prototype._ondrop.callback): (WebInspector.ElementsTreeOutline.prototype._ondrop): (WebInspector.ElementsTreeOutline.prototype.adjustCollapsedRange): (WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes): (WebInspector.ElementsTreeElement.prototype.insertChildElement): (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted): (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): (WebInspector.ElementsTreeElement.prototype._editingCancelled): (): * inspector/front-end/externs.js: (WebInspector.ElementsTreeOutline): * inspector/front-end/utilities.js: 2011-10-05 Yury Semikhatsky Web Inspector: provide a way for persisting worker inspector state https://bugs.webkit.org/show_bug.cgi?id=69422 Worker inspector can persist and restore its state. InspectorStateClient is exctracted into a separate interface and has a custom implementation in case of worker inspector. Reviewed by Pavel Feldman. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorClient.h: * inspector/InspectorState.cpp: (WebCore::InspectorState::InspectorState): * inspector/InspectorState.h: * inspector/InspectorStateClient.h: Copied from Source/WebCore/inspector/InspectorClient.h. (WebCore::InspectorStateClient::~InspectorStateClient): (WebCore::InspectorStateClient::updateInspectorStateCookie): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::restoreInspectorStateFromCookie): * inspector/WorkerInspectorController.h: * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerProxy::postMessageToPageInspector): (WebCore::SharedWorkerProxy::updateInspectorStateCookie): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::updateInspectorStateCookie): * workers/WorkerMessagingProxy.h: * workers/WorkerReportingProxy.h: 2011-10-05 Abhishek Arya Crash in SVGTRefElement::updateReferencedText. https://bugs.webkit.org/show_bug.cgi?id=67555 Reviewed by Rob Buis. Test: svg/text/tref-event-listener-crash.svg * svg/SVGTRefElement.cpp: (WebCore::SubtreeModificationEventListener::clear): This fixes the crash. there can be cases when our target is removed, but our event listener is alive. when our tref is going away, we need to disable those event listeners by nulling out our tref element. (WebCore::SubtreeModificationEventListener::handleEvent): Adding null check for tref element, which can happen in cases where event listener's clear is called, but we could not remove it from the target. (WebCore::SVGTRefElement::~SVGTRefElement): There are always cases when removedFromDocument is not called. So, important to clear event listener in those cases. (WebCore::SVGTRefElement::svgAttributeChanged): Use common function buildPendingResource. (WebCore::SVGTRefElement::buildPendingResource): Common function to prevent triple duplication of same code. made it more readable. (WebCore::SVGTRefElement::insertedIntoDocument): Use common function buildPendingResource. (WebCore::SVGTRefElement::removedFromDocument): Use new helper removeEventListener. (WebCore::SVGTRefElement::clearEventListener): Helper to clear event listener. Name chosen to not collide with Node::removeEventListener. * svg/SVGTRefElement.h: definition of new helpers. * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedIntoDocument): Copy same logic as tref and use element. more asserts and easy bailouts. 2011-10-05 Pavel Feldman Not reviewed: restoring : shortcut in inspector. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSidebarButtons): 2011-10-05 Andreas Kling Shrink FontDescription. https://bugs.webkit.org/show_bug.cgi?id=69426 Reviewed by Nikolas Zimmermann. Pack FontDescription's members in a bitfield, effectively shrinking the class by two CPU-words. This reduces memory consumption by ~1 MB on 64-bit when loading the full HTML5 spec. * platform/graphics/FontDescription.h: (WebCore::FontDescription::orientation): (WebCore::FontDescription::textOrientation): (WebCore::FontDescription::widthVariant): 2011-10-05 Vsevolod Vlasov Web Inspector: Add support for search in script content. https://bugs.webkit.org/show_bug.cgi?id=69015 Reviewed by Pavel Feldman. Tests: http/tests/inspector/search/search-in-concatenated-script.html http/tests/inspector/search/search-in-script.html * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::getScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._sortedScripts.var): (WebInspector.ConcatenatedScriptsContentProvider.prototype._sortedScripts): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.maybeCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.searchCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.requestSource.didGetScriptSource): (WebInspector.Script.prototype.requestSource): (WebInspector.Script.prototype.searchInContent): 2011-10-05 Alexis Menard [Qt][WK2] Default directories and paths are missing for LocalStorage, Database and IconDatabase. https://bugs.webkit.org/show_bug.cgi?id=69111 Reviewed by Kenneth Rohde Christiansen. Provide default path for LocalStorage, Database and IconDatabase using QDesktopServices. No new tests : existing ones should cover. * platform/qt/CookieJarQt.cpp: (WebCore::SharedCookieJarQt::SharedCookieJarQt): 2011-10-05 Patrick Gansterer Unreviewed build fix for !ENABLE(FILTERS) after r96203. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientUpdatedFromElement): 2011-10-05 Ilya Tikhonovsky Unreviewed build fix for windows bots after r96679. * html/NumberInputType.h: 2011-10-04 Pavel Feldman Web Inspector: make ResourceView(s) compile https://bugs.webkit.org/show_bug.cgi?id=69351 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable.prototype._sortCookies): * inspector/front-end/DataGrid.js: * inspector/front-end/EmptyView.js: * inspector/front-end/FontView.js: (WebInspector.FontView.prototype._createContentIfNeeded): * inspector/front-end/ImageView.js: (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad): (WebInspector.ImageView.prototype._createContentIfNeeded): (WebInspector.ImageView.prototype._openInNewTab): * inspector/front-end/NetworkItemView.js: * inspector/front-end/ResourceCookiesView.js: * inspector/front-end/ResourceHTMLView.js: (WebInspector.ResourceHTMLView.prototype.hide): * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._refreshParms): (WebInspector.ResourceHeadersView.prototype._refreshHeadersTitle): (WebInspector.ResourceHeadersView.prototype._refreshHeaders): (WebInspector.ResourceHeadersView.prototype._refreshHeadersText): * inspector/front-end/ResourceJSONView.js: (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.parseJSONP): * inspector/front-end/ResourcePreviewView.js: * inspector/front-end/ResourceResponseView.js: * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.createTimingTable): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame): * inspector/front-end/SourceFrame.js: * inspector/front-end/TabbedPane.js: * inspector/front-end/UIUtils.js: (Number.secondsToString): (Number.bytesToString): * inspector/front-end/inspector.js: 2011-10-04 Ilya Tikhonovsky Web Inspector: debuggerPresentatioModel.linkifyLocation leaks updateAnchor closure instances. https://bugs.webkit.org/show_bug.cgi?id=69146 In many places we use linkifyLocation function to produce a link node which updates automatically when the source file is changed on the fly. Such changes happen when we use pretty print or another operation that changes the source code somehow. linkifyLocation associates a new instance of updateAnchor closure with the each link node and add the closure to the SourceMappingUpdated event's list. As the result the node<->closure pairs wouldn't be collected until reset the UI and DebuggerPresentationModel. Reviewed by Pavel Feldman. Test: inspector/debugger/linkifier.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl): (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleCommandResult): (WebInspector.ConsoleMessage.create): (WebInspector.ConsoleMessage.createTextMessage): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.createLinkifier): (WebInspector.DebuggerPresentationModel.Linkifier): (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.Linkifier.prototype.reset): (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateSourceAnchors): (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView): (WebInspector.CPUProfileView.prototype._resetClicked): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._linkifyLocation): (WebInspector.TimelinePanel.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/inspector.js: 2011-10-03 Andreas Kling REGRESSION(r82611) InlineBox has 33 bits of bitset, causing alignment issues and extra memory use. https://bugs.webkit.org/show_bug.cgi?id=64914 Reviewed by Antti Koivisto. Remove InlineBox::prevOnLineExists() and its two accompanying bitfields since nobody is using them anymore. nextOnLineExists() is still used by GTK+ accessibility code. Also added a compile-time assertion to guard against future bloating of the InlineBox class. * rendering/InlineBox.cpp: (WebCore::SameSizeAsInlineBox::~SameSizeAsInlineBox): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-10-05 Andreas Kling Shrink FontFallbackList. https://bugs.webkit.org/show_bug.cgi?id=69093 Rubber-stamped by Antti Koivisto. Workaround MSVC quirk by making enum bitfield "unsigned". * platform/graphics/FontFallbackList.h: 2011-10-05 Andreas Kling Shrink StyleRareNonInheritedData. https://bugs.webkit.org/show_bug.cgi?id=69331 Reviewed by Darin Adler. Workaround MSVC quirk by making enum bitfields "unsigned". * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionOverflow): (WebCore::InheritedFlags::transformStyle3D): (WebCore::InheritedFlags::backfaceVisibility): (WebCore::InheritedFlags::pageSizeType): * rendering/style/StyleRareNonInheritedData.h: 2011-10-05 Pavel Feldman Web Inspector: add CSS model classes to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69376 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CSSCompletions.js: * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.forProperty): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleDeclaration): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): (WebInspector.CSSStyleModelResourceBinding.prototype.canSetContent): * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._containsInherited): (WebInspector.StylePropertiesSection.prototype.isPropertyInherited): (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded): (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): * inspector/front-end/externs.js: (Array.prototype.keySet): 2011-10-05 Kent Tamura Input styles are unexpectedly shared regardless of required status difference. https://bugs.webkit.org/show_bug.cgi?id=69402 Reviewed by Daniel Bates. Tests: fast/css/pseudo-required-shared.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): Check the difference of required(). 2011-10-04 Kent Tamura Remove Node::willBlur() https://bugs.webkit.org/show_bug.cgi?id=69395 Reviewed by Ryosuke Niwa. Revert the WebCore part of r87371 because FrameSelection::textWillBeReplaced() doesn't set focus anymore. No new tests. Covered by fast/forms/input-number-blur-twice.html. * dom/Document.cpp: (WebCore::Document::setFocusedNode): Revert r87371. * dom/Node.cpp: ditto. * dom/Node.h: ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::handleBlurEvent): ditto. * html/HTMLInputElement.h: ditto. * html/InputType.cpp: (WebCore::InputType::handleBlurEvent): ditto. * html/InputType.h: ditto. * html/NumberInputType.cpp: (WebCore::NumberInputType::handleBlurEvent): ditto. * html/NumberInputType.h: ditto. 2011-10-04 Kent Tamura Introduce feature flags for incomplete input types https://bugs.webkit.org/show_bug.cgi?id=68971 Reviewed by Hajime Morita. * Configurations/FeatureDefines.xcconfig: Add ENABLE_INPUT_TYPE_* flags. They are enabled only for iOS. * html/DateInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_DATE) * html/DateInputType.h: ditto. * html/DateTimeInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_DATETIME) * html/DateTimeInputType.h: ditto. * html/DateTimeLocalInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_DATETIMELOCAL) * html/DateTimeLocalInputType.h: ditto. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): Recognizes type attribute value only if it is enabled by ENABLE(INPUT_TYPE_*). * html/MonthInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_MONTH) * html/MonthInputType.h: ditto. * html/TimeInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_TIME) * html/TimeInputType.h: ditto. * html/WeekInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_WEEK) * html/WeekInputType.h: ditto. 2011-10-04 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69398 [CSS3 Regions] Support the region-overflow property properly. (1) Change -webkit-break to break, since the -webkit-region-overflow property already has the -webkit- extension. (2) Fix clipping so that it works when overflow is set or when region break is set. (3) Refactor all the pagination spots to check if a next page is available using the new hasNextPage function. This prevents us from paginating if we hit the last region and further breaks are no longer allowed. Reviewed by Dan Bernstein. Added new tests in fast/regions. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator RegionOverflow): * css/CSSValueKeywords.in: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::hasNextPage): (WebCore::RenderBlock::nextPageLogicalTop): (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::pushToNextPageWithMinimumLogicalHeight): (WebCore::RenderBlock::adjustLinePositionForPagination): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::repaintRectangleInRegions): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): 2011-10-04 Mark Hahnenberg Add static ClassInfo structs to classes that override JSCell::getCallData https://bugs.webkit.org/show_bug.cgi?id=69311 Reviewed by Darin Adler. No new tests. Added ClassInfo structs to each class that defined its own getCallData function but did not already have its own ClassInfo struct. This is a necessary addition for when we switch over to looking up getCallData from the MethodTable in ClassInfo rather than doing the virtual call (which we are removing). These new ClassInfo structs are public because we often use these structs in other areas of the code to uniquely identify JSC classes and to enforce runtime invariants based on those class identities using ASSERTs. Also added new createStructure methods to those classes that didn't have them so that the new ClassInfo structs would be used when creating the Structures in these classes. * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-10-03 Geoffrey Garen Some JSValue cleanup https://bugs.webkit.org/show_bug.cgi?id=69320 Reviewed by Darin Adler. * bindings/js/JSDOMBinding.cpp: (WebCore::valueToDate): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSQLTransactionSyncCustom.cpp: (WebCore::JSSQLTransactionSync::executeSql): * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): Updated for JSC changes. 2011-10-04 Sadrul Habib Chowdhury Fix FrameView::scrollElementToRect to take already scrolled amount into consideration. https://bugs.webkit.org/show_bug.cgi?id=69220 Reviewed by Simon Fraser. * page/FrameView.cpp: (WebCore::FrameView::scrollElementToRect): 2011-10-04 Anders Carlsson Ignore the warning about using 'override'. * WebCore.vcproj/WebCore.vcproj: 2011-10-04 Sam Weinig Stub out WorkerScriptController::disableEval for v8 to fix the build. * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): * bindings/v8/WorkerScriptController.h: 2011-10-04 Sam Weinig OVERRIDE seems to not be working for Windows. Remove it for now. * dom/Document.h: * workers/WorkerContext.h: 2011-10-04 Sam Weinig Wean ContentSecurityPolicy from the Document https://bugs.webkit.org/show_bug.cgi?id=69387 Reviewed by Adam Barth. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): * bindings/js/WorkerScriptController.h: * dom/Document.cpp: (WebCore::Document::disableEval): * dom/Document.h: * workers/WorkerContext.cpp: (WebCore::WorkerContext::disableEval): * workers/WorkerContext.h: * dom/ScriptExecutionContext.h: Add pure virtual disableEval to ScriptExecutionContext, so that ContentSecurityPolicy can call it for both Documents and WorkerContexts. * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): Call the new ScriptExecutionContext::disableEval() function. (WebCore::ContentSecurityPolicy::reportViolation): Use ScriptExecutionContext::addMessage() instead of going directly to the DOMWindow. 2011-10-04 Anders Carlsson Move code into ScrollElasticityController::beginScrollGesture() https://bugs.webkit.org/show_bug.cgi?id=69383 Reviewed by John Sullivan. * platform/mac/ScrollAnimatorMac.h: Add new ScrollElasticityControllerClient member functions. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::isHorizontalScrollerPinnedToMinimumPosition): (WebCore::ScrollAnimatorMac::isHorizontalScrollerPinnedToMaximumPosition): (WebCore::ScrollAnimatorMac::stretchAmount): (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Implement the new ScrollElasticityControllerClient member functions. (WebCore::ScrollAnimatorMac::beginScrollGesture): Move code into ScrollElasticityController::beginScrollGesture and call it directly. * platform/mac/ScrollElasticityController.h: Add new ScrollElasticityControllerClient member functions. * platform/mac/ScrollElasticityController.mm: (WebCore::reboundDeltaForElasticDelta): (WebCore::ScrollElasticityController::beginScrollGesture): Set up the scroll gesture state. (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): New helper function. 2011-10-04 Scott Graham Add GAMEPAD feature flag https://bugs.webkit.org/show_bug.cgi?id=66859 Reviewed by Darin Fisher. No new tests, as no new functionality yet. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * features.pri: 2011-10-04 Fady Samuel [Chromium] Moved files towards GTK removal https://bugs.webkit.org/show_bug.cgi?id=69229 Reviewed by Tony Chang. * WebCore.gypi: * platform/chromium/PlatformThemeChromiumLinux.cpp: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp. (WebCore::PlatformThemeChromiumLinux::setScrollbarColors): (WebCore::clamp): (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten): (WebCore::PlatformThemeChromiumLinux::outlineColor): (WebCore::PlatformThemeChromiumLinux::paintArrowButton): * platform/chromium/PlatformThemeChromiumLinux.h: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.h. (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor): (WebCore::PlatformThemeChromiumLinux::thumbActiveColor): (WebCore::PlatformThemeChromiumLinux::trackColor): (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux): 2011-10-04 James Robinson [chromium] Extract scheduling logic from CCThreadProxy to its own class https://bugs.webkit.org/show_bug.cgi?id=69049 Reviewed by Kenneth Russell. This partially extracts the commit/draw scheduling from CCThreadProxy to a separate isolated class. This makes the commit/draw logic easier to test, understand and extend. There is one subtle behavior change here to the way that the function formerly known as CCLayerTreeHost::setNeedsCommitAndRedraw works. Previously, this would trigger a begin frame message, if one wasn't pending, and then trigger a redraw if one wasn't pending. This was subtly wrong - the intent of that call is that a redraw should happen after the commit. It isn't useful to draw before the commit occurs. This patch changes the name of the function to setNeedsCommitThenRedraw and only requests a redraw after a commit occurs. Covered by new CCSchedulerTest unit tests, CCLayerTreeHostTest unit tests, and compositing/ layout tests. * WebCore.gypi: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::setZoomAnimatorTransform): (WebCore::CCLayerTreeHost::setNeedsCommitThenRedraw): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCScheduler.cpp: Added. (WebCore::CCScheduler::CCScheduler): (WebCore::CCScheduler::requestCommit): (WebCore::CCScheduler::requestCommitThenRedraw): (WebCore::CCScheduler::requestRedraw): (WebCore::CCScheduler::didCommit): (WebCore::CCScheduler::didDraw): * platform/graphics/chromium/cc/CCScheduler.h: Added. (WebCore::CCSchedulerClient::~CCSchedulerClient): (WebCore::CCScheduler::create): (WebCore::CCScheduler::commitPending): (WebCore::CCScheduler::redrawPending): (WebCore::CCScheduler::redrawAfterCommit): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommitThenRedraw): (WebCore::CCSingleThreadProxy::setNeedsRedraw): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxySchedulerClient::create): (WebCore::CCThreadProxySchedulerClient::~CCThreadProxySchedulerClient): (WebCore::CCThreadProxySchedulerClient::scheduleBeginFrameAndCommit): (WebCore::CCThreadProxySchedulerClient::scheduleDrawAndPresent): (WebCore::CCThreadProxySchedulerClient::CCThreadProxySchedulerClient): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitThenRedraw): (WebCore::CCThreadProxy::setNeedsCommitThenRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): (WebCore::CCThreadProxy::finishAllRenderingOnCCThread): (WebCore::CCThreadProxy::obtainBeginFrameAndCommitTaskFromCCThread): (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::drawLayersAndPresentOnCCThread): (WebCore::CCThreadProxy::initializeImplOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-04 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=67774 PDF in a frameset is not displayed, always downloads Reviewed by Darin Adler. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: Added exports necessary to subclass a ScrollableArea. 2011-10-04 Anders Carlsson ScrollElasticityController should keep track of the rubberband timer state https://bugs.webkit.org/show_bug.cgi?id=69381 Reviewed by Sam Weinig. Add a m_snapRubberbandTimerIsActive member variable to ScrollElasticityController and use it instead of checking whether the m_snapRubberbandTimer is active. Eventually, ScrollElasticityControllerClient will have two member functions for starting and stopping the timer, and the ScrollElasticityController will call them at the appropriate times. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): It's OK to stop the timer unconditionally. (WebCore::ScrollAnimatorMac::snapRubberBand): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::ScrollElasticityController): 2011-10-04 Anders Carlsson Move all rubber-banding related member variables to ScrollElasticityController https://bugs.webkit.org/show_bug.cgi?id=69379 Reviewed by Dan Bernstein. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): (WebCore::ScrollAnimatorMac::snapRubberBand): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::ScrollElasticityController): 2011-10-04 Anders Carlsson Build fixes for everyone. * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): Fix Chromium build. * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Fix GTK+ build. 2011-10-04 Anders Carlsson Add a ScrollElasticityController class and move some members over from ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=69373 Reviewed by David Hyatt. ScrollElasticityController is a new class that will handle the rubber-banding when handling scroll events. * WebCore.xcodeproj/project.pbxproj: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): (WebCore::ScrollAnimatorMac::snapRubberBand): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * platform/mac/ScrollElasticityController.h: Added. (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): * platform/mac/ScrollElasticityController.mm: Added. (WebCore::ScrollElasticityController::ScrollElasticityController): 2011-10-04 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69372 [CSS3 Regions] Make sure overflow:visible lets content spill out of regions. Reviewed by Anders Carlsson. No new tests, since plenty of results changed. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): (WebCore::RenderFlowThread::hitTestRegion): (WebCore::RenderFlowThread::repaintRectangleInRegions): (WebCore::RenderFlowThread::firstRegion): (WebCore::RenderFlowThread::lastRegion): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): (WebCore::RenderRegion::isFirstRegion): (WebCore::RenderRegion::isLastRegion): (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: (WebCore::RenderRegion::setRegionRect): (WebCore::RenderRegion::regionRect): 2011-10-04 Chris Rogers Avoid unnecessary ASSERT in AudioDSPKernelProcessor::setNumberOfChannels() https://bugs.webkit.org/show_bug.cgi?id=69361 Reviewed by James Robinson. No new tests. This changes no JavaScript API. * platform/audio/AudioDSPKernelProcessor.cpp: (WebCore::AudioDSPKernelProcessor::setNumberOfChannels): 2011-10-04 Anders Carlsson Use const PlatformWheelEvent references where possible https://bugs.webkit.org/show_bug.cgi?id=69367 Reviewed by Sam Weinig. * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): * platform/ScrollAnimator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::handleWheelEvent): * platform/ScrollableArea.h: * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): 2011-10-04 Andreas Kling Shrink HTMLTableCellElement. https://bugs.webkit.org/show_bug.cgi?id=69347 Reviewed by Antti Koivisto. Don't cache the rowspan and colspan attributes on the element. This shrinks HTMLTableCellElement by one CPU word, reducing memory consumption by 80 kB (on 64-bit) when loading the full HTML5 spec. * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::HTMLTableCellElement): (WebCore::HTMLTableCellElement::colSpan): (WebCore::HTMLTableCellElement::rowSpan): (WebCore::HTMLTableCellElement::parseMappedAttribute): * html/HTMLTableCellElement.h: 2011-10-04 Sheriff Bot Unreviewed, rolling out r96630. http://trac.webkit.org/changeset/96630 https://bugs.webkit.org/show_bug.cgi?id=69368 Caused assertion failures in validateCell (Requested by mhahnenberg on #webkit). * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-10-04 Cary Clark Enable sub pixel text (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69354 http://code.google.com/p/chromium/issues/detail?id=98165 Reviewed by Eric Seidel. No new tests. Layout test pixel results have been disabled and will be rebaselined once all Skia on Mac changes are in. * platform/graphics/skia/FontSkia.cpp: (WebCore::setupPaint): Enable sub pixel text. This is set by default to enabled by CoreGraphics, but by default disabled on Skia. 2011-10-04 Anders Carlsson Remove PlatformWheelEvent::m_isAccepted https://bugs.webkit.org/show_bug.cgi?id=69357 Reviewed by Darin Adler. Remove PlatformWheelEvent::m_isAccepted and all the getters/setters. * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::handleGestureEvent): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::handleGestureEvent): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): * platform/efl/PlatformWheelEventEfl.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2011-09-21 Cris Neckar Hold refptr to identified previous sibling within findPlaceForCounter. https://bugs.webkit.org/show_bug.cgi?id=68563 Reviewed by Adam Barth. Test: fast/css/counters/counter-after-style-crash.html * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): 2011-10-04 Joshua Bell IndexedDB add() should fail if key is NaN https://bugs.webkit.org/show_bug.cgi?id=62286 Reviewed by Tony Chang. Test: storage/indexeddb/invalid-keys.html Implement special case - numbers are valid keys, except for NaN. * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): 2011-10-04 Mark Hahnenberg Add static ClassInfo structs to classes that override JSCell::getCallData https://bugs.webkit.org/show_bug.cgi?id=69311 Reviewed by Darin Adler. No new tests. Added ClassInfo structs to each class that defined its own getCallData function but did not already have its own ClassInfo struct. This is a necessary addition for when we switch over to looking up getCallData from the MethodTable in ClassInfo rather than doing the virtual call (which we are removing). These new ClassInfo structs are public because we often use these structs in other areas of the code to uniquely identify JSC classes and to enforce runtime invariants based on those class identities using ASSERTs. * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-10-04 Ryosuke Niwa REGRESSION(r94274): setting input.value erroneously triggers focus event https://bugs.webkit.org/show_bug.cgi?id=69315 Reviewed by Kent Tamura. Fixed the bug by adding a new flag to setSelection to avoid calling setFocusedNodeIfNeeded when called by nodeWillBeRemoved and textWillBeReplaced. Added a manual test. Unfortunately, the test always passes in DRT. * editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelection): (WebCore::FrameSelection::respondToNodeModification): (WebCore::FrameSelection::textWillBeReplaced): * editing/FrameSelection.h: * manual-tests/mutate-unfocused-text-with-selection.html: Added. 2011-10-04 Young Han Lee HTML canvas strokes with dash and dashOffset https://bugs.webkit.org/show_bug.cgi?id=63933 Reviewed by Simon Fraser. Add webkitLineDash and webkitLineDashOffset attributes to CanvasRenderingContext2D for JSC. These attributes can be used to determine the dash-style of stroke in HTML Canvas. As this kind of attributes are not specified in the HTML Canvas specification yet, the 'webkit' prefix is added to its names. Mozilla already implemented these attributes, mozDash and mozDashOffset [1], and this patch is created by referring to the implementation. This patch is basically using the specified behavior of stroke-dasharray and stroke-dashoffset in the SVG specification [2], except that doesn't support units or percentages, just floating point numbers. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=662038 [2] http://www.w3.org/TR/SVG/painting.html#StrokeProperties Tests: fast/canvas/canvas-webkitLineDash-invalid.html fast/canvas/canvas-webkitLineDash.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::webkitLineDash): (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::webkitLineDash): (WebCore::CanvasRenderingContext2D::setWebkitLineDash): (WebCore::CanvasRenderingContext2D::webkitLineDashOffset): (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: 2011-10-04 Matthew Delaney Allow canvas backing store to be lazily allocated https://bugs.webkit.org/show_bug.cgi?id=67054 Reviewed by Darin Adler. No new tests; doesn't affect behavior. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): Removed the setting of lineWidth that caused the eager creation of ImageBuffer to use its GraphicsContext. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Added in default line width setting along with other default context settings. 2011-10-04 Sam Weinig Add support for the CSP connect-src directive https://bugs.webkit.org/show_bug.cgi?id=69353 Reviewed by Adam Barth. Add CSP support for XMLHttpRequest, WebSockets and EventSource. Tests: http/tests/security/contentSecurityPolicy/connect-src-eventsource-allowed.html http/tests/security/contentSecurityPolicy/connect-src-eventsource-blocked.html http/tests/security/contentSecurityPolicy/connect-src-websocket-allowed.html http/tests/security/contentSecurityPolicy/connect-src-websocket-blocked.html http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-allowed.html http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked.html * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::allowConnectFromSource): (WebCore::ContentSecurityPolicy::addDirective): * page/ContentSecurityPolicy.h: Add connect-src directive parsing and predicate. * page/EventSource.cpp: (WebCore::EventSource::create): * websockets/WebSocket.cpp: (WebCore::WebSocket::connect): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): Test allowConnectFromSource when establishing a connection. 2011-10-03 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69317 [CSS3 Regions] Make overflow:hidden/auto/scroll sections behave properly when split across regions. This includes sizing and positioning independently in each region, clipping independently in each region, and shifting to avoid floats in each region. Reviewed by Anders Carlsson. Added many new tests in fast/regions. * editing/Editor.cpp: (WebCore::Editor::insideVisibleArea): Patching a call to overflowClipRect, which now includes a region argument so that clipping can be adjusted per-region. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't clear out the cached region information when the width changes. Instead make a new call to the flow thread to check if widths changed in any region and set relayoutChildren to true if so. (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): This is a new function that has been split out from determineLogicalLeftPositionForChild so that it can be called by region code to compute offsets independently in each region without altering the overall object's logical left position. (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Patched to call computeStartPositionDeltaForChildAvoidingFloats instead of doing the work of avoiding the floats itself. (WebCore::RenderBlock::computeLogicalLocationForFloat): Fix the left clamping code to clamp to the left border in the correct region rather than always just clamping to 0. (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::logicalRightOffsetForContent): Tweaked to handle the new signature of borderBoxRectInRegion. (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Reworked not to return 0 on failure or when done, but to just return the current height. This is a more fitting answer for the function to return when no more floats remain. (WebCore::RenderBlock::getClearDelta): Big changes to this function. It was never patched to support writing modes, so the new code is all writing-mode-aware now. Also improved the computeLogicalWidth() call to make sure margins didn't get incorrectly changed. The code computes transient information in each region as the object tries to find a place to fit, so that the old widths are properly retained when layout of that child later checks to see if it needs to relayout children or not. (WebCore::RenderBlock::nodeAtPoint): Patched to call overflowClipRect with the region being hit tested. (WebCore::inNormalFlow): Tweaked to not need the initialBlock variable. (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::adjustLinePositionForPagination): (WebCore::RenderBlock::lineWidthForPaginatedLineChanged): Tweaked to use inRenderFlowThread() now that it exists. Also removing the regionsHaveUniformLogicalWidth() optimization, since you can't rely on that when objects size differently depending on floats. In other words, the future of pagination is variable width objects even in printing/columns. (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage): Renamed to make it more clear what logicalPageOffset() was. It's your offset from the top of the first page. (WebCore::RenderBlock::regionAtBlockOffset): New helper function for accessing the region at a given offset within your block. (WebCore::RenderBlock::logicalWidthChangedInRegions): New helper function that computes whether or not your logical width information changed in any regions. If so, relayoutChildren gets set to true (just as it would have when computeLogicalWidth for the overall block changes values). (WebCore::RenderBlock::collapsedMarginBeforeForChild): (WebCore::RenderBlock::collapsedMarginAfterForChild): (WebCore::RenderBlock::marginBeforeForChild): (WebCore::RenderBlock::marginAfterForChild): (WebCore::RenderBlock::marginLogicalLeftForChild): (WebCore::RenderBlock::marginLogicalRightForChild): (WebCore::RenderBlock::marginStartForChild): (WebCore::RenderBlock::marginEndForChild): Tweaked because of const to take const arguments. * rendering/RenderBlock.h: (WebCore::RenderBlock::availableLogicalWidthForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::startOffsetForLine): (WebCore::RenderBlock::logicalWidthForChild): (WebCore::RenderBlock::logicalHeightForChild): (WebCore::RenderBlock::logicalTopForChild): (WebCore::RenderBlock::logicalLeftForChild): (WebCore::RenderBlock::availableLogicalWidthForContent): (WebCore::RenderBlock::startOffsetForContent): (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::logicalRightOffsetForContent): Reworking these functions so versions exist that take regions and page offsets to avoid having to recalculate where you are over and over again as you walk up a containing block chain. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitBelowFloats): Changed to handle the better return value for nextFloatLogicalBottomBelow. (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Removing the uniform logical width optimization. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): Changed to take a region and offset from the first page so that it doesn't have to be recomputed as you recur up the containing block chain. (WebCore::RenderBox::clearRenderBoxRegionInfo): Changed to just use inRenderFlowThread(). (WebCore::RenderBox::pushContentsClip): Changed for the new region-parameterized overflow clip function. (WebCore::RenderBox::overflowClipRect): Now takes a region so that a specific clip rect can be returned sized to the appropriate border box in that region. (WebCore::RenderBox::containingBlockLogicalWidthForContent): (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): Objects in flow threads no longer shrink to avoid floats when computing their overall widths. The region-specific check now does the shrinking. It checks at the point where the region slices the object, or the top of the object if it begins in the middle of the region. (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalWidthInRegion): Push all the rest of the computeLogicalWidth code into computeLogicalWidthInRegion. (WebCore::RenderBox::renderBoxRegionInfo): Changed to take the region and the offset from the top of the first page to avoid recomputation. * rendering/RenderBox.h: (WebCore::RenderBox::hasRenderOverflow): (WebCore::RenderBox::hasVisualOverflow): New helper used by the RenderLayer code to avoid having to check visual overflow when none exists. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use the new region-specific overflow clip. * rendering/RenderBoxRegionInfo.h: (WebCore::RenderBoxRegionInfo::shiftLogicalLeft): Helper used by the region code to shift a box over when floats cause it to move. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::computeLogicalWidth): Remove the optimization to avoid creating box info for uniform widths. (WebCore::RenderFlowThread::paintIntoRegion): Make the clip rects used when painting the flow thread's layer tree temporary in each region. (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Removing the uniform logical width optimization (WebCore::RenderFlowThread::logicalWidthChangedInRegions): * rendering/RenderFlowThread.h: New helper called to see if a block needs to relayout its children because its width changed in some region. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::parentClipRects): (WebCore::RenderLayer::backgroundClipRect): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::childrenClipRect): (WebCore::RenderLayer::selfClipRect): (WebCore::RenderLayer::repaintBlockSelectionGaps): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::clipBox): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::clippedByAncestor): Changing all the layer clipping code to pass regions through to all of the helper functions involved. This is so overflowClipRect can ultimately take a region. Eventually when we get positioned objects moving independently in each region, we'll patch the "clip" property as well, and it will be much easier because all the plumbing has been put in place here for overflow. * rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingRenderFlowThread): Optimized to not walk up the render tree if we're in layout and a currentRenderFlowThread() exists. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::renderBoxRegionInfo): (WebCore::RenderRegion::setRenderBoxRegionInfo): (WebCore::RenderRegion::takeRenderBoxRegionInfo): Removing the optimization for uniform logical width regions. Changed remove to take so that the caller can examine it before deleting. (WebCore::RenderRegion::offsetFromLogicalTopOfFirstPage): * rendering/RenderRegion.h: Helper function that computes the region's offset from the top of the first page. * rendering/RenderTable.cpp: (WebCore::RenderTable::overflowClipRect): (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTable.h: * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): Changed to pass the region to overflowClipRect. * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): Modified because the layer clip functions need regions now. * rendering/RenderView.h: (WebCore::RenderView::pushLayoutState): Changed to use inRenderFlowThread over view()->hasRenderFlowThread. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): Patched to use the new overflowClipRect that is region-specific. 2011-10-04 Anders Carlsson More work towards making PlatformWheelEvent immutable https://bugs.webkit.org/show_bug.cgi?id=69348 Reviewed by Sam Weinig. More work on getting rid of m_isAccepted from PlatformWheelEvent. Add more asserts that the return value of handleWheelEvent is equal to m_isAccepted. * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): 2011-10-04 Cary Clark Inset focus ring (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69166 http://code.google.com/p/chromium/issues/detail?id=97956 This focus ring was drawn too large and was left tracks in subsequent invalidations. Make it more closely match the CG version. Reviewed by Adam Barth. No new tests. This platform is not enabled. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-10-03 Jon Lee Extend DOM WheelEvent to differentiate between physical and logical scroll directions https://bugs.webkit.org/show_bug.cgi?id=68959 Reviewed by Sam Weinig. Test: fast/events/wheelevent-direction-inverted-from-device.html * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * dom/WheelEvent.h: (WebCore::WheelEvent::create): (WebCore::WheelEvent::webkitDirectionInvertedFromDevice): * dom/WheelEvent.idl: Added the webkitDirectionInvertedFromDevice idl attribute. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): (WebCore::PlatformWheelEvent::webkitDirectionInvertedFromDevice): * platform/efl/PlatformWheelEventEfl.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): if building on Lion or later, use [NSEvent isDirectionInvertedFromDevice]. * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. 2011-10-04 Rémi Duraffort [EFL] Fix compilation when SQLite and/or libxslt are not installed in /usr/include https://bugs.webkit.org/show_bug.cgi?id=69338 Unreviewed build fix * CMakeListsEfl.txt: 2011-10-03 Ken Buchanan Resource loader should block HTTP redirects to local resources https://bugs.webkit.org/show_bug.cgi?id=68706 Reviewed by Adam Barth. Modified MainResourceLoader to add an extra security check on HTTP redirects. Also, moved isFeedWithNestedProtocolInHTTPFamily to SecurityOrigin.cpp. * loader/FrameLoader.cpp: (WebCore::isFeedWithNestedProtocolInHTTPFamily): (WebCore::FrameLoader::loadFrameRequest): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::willSendRequest): * page/SecurityOrigin.cpp: (WebCore::isFeedWithNestedProtocolInHTTPFamily): (WebCore::SecurityOrigin::canDisplay): 2011-10-04 Cary Clark Apply color profile found to decoded bitmap (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69144 This fixes http://code.google.com/p/chromium/issues/detail?id=97830 Reviewed by Stephen White. No new tests. This platform is not enabled. * platform/image-decoders/ImageDecoder.h: Add color profile slot to Skia variation. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::resolveColorSpace): Adjust the bitmap in place to use the supplied color space. (WebCore::createColorSpace): Create a CGColorSpace from a color profile. (WebCore::ImageFrame::setColorProfile): Save the image's color profile until the image is complete. (WebCore::ImageFrame::setStatus): Apply the color profile, if any, to the image. 2011-10-04 Leandro Pereira [CMake] Unreviewed: pass feature definitions in the right format for the CSS scripts. The Perl scripts in the css/ directory expect the definitions passed via --defines to be a string of space-separated entries, however we were passing a list of semicolon-separated strings, thus making all feature defines actually be ignored. Detected after r96433, which checked for some definitions in CSSPropertyNames.in. No new tests, this is a build fix. * CMakeLists.txt: 2011-10-04 Pavel Feldman Web Inspector: make SourceFrame compile. https://bugs.webkit.org/show_bug.cgi?id=69345 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype.inspectElement): (WebInspector.DOMDispatcher.prototype.inspectElementRequested): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._inspectElementRequested): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired): (WebInspector.ObjectPropertyTreeElement.prototype.startEditing): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._applyDiffMarkup): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._onShowPopover.showObjectPopover): (WebInspector.SourceFrame.prototype._onShowPopover): (WebInspector.SourceFrame.prototype._editBreakpointCondition): (WebInspector.SourceFrame.prototype.startEditing): (WebInspector.SourceFrame.prototype.commitEditing.didEditContent): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrameDelegate.prototype.requestContent): (WebInspector.SourceFrameDelegate.prototype.debuggingSupported): (WebInspector.SourceFrameDelegate.prototype.setBreakpoint): (WebInspector.SourceFrameDelegate.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegate.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegate.prototype.findBreakpoint): (WebInspector.SourceFrameDelegate.prototype.continueToLine): (WebInspector.SourceFrameDelegate.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegate.prototype.setScriptSource): (WebInspector.SourceFrameDelegate.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegate.prototype.debuggerPaused): (WebInspector.SourceFrameDelegate.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegate.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegate.prototype.suggestedFileName): * inspector/front-end/externs.js: (WebInspector.log): * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): * inspector/front-end/utilities.js: (): 2011-10-04 Mikhail Naganov Web Inspector: Factor out object properties popup. https://bugs.webkit.org/show_bug.cgi?id=69234 Also, for HTML elements, show a non-empty id value in the element name. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ObjectPopoverHelper.js: Added. * inspector/front-end/SourceFrame.js: Extracted from here. (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._mouseDown): (WebInspector.SourceFrame.prototype._onShowPopover.showObjectPopover): (WebInspector.SourceFrame.prototype._onShowPopover): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-10-04 Pavel Feldman Web Inspector: compile text editor. https://bugs.webkit.org/show_bug.cgi?id=69339 Drive-by compilation for color, database and dom storage entities. Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/Color.js: (WebInspector.Color.prototype._individualRGBValueToFloatValue): * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut.makeKey): (WebInspector.KeyboardShortcut.makeKeyFromEvent): (WebInspector.KeyboardShortcut.makeDescriptor): * inspector/front-end/SourceCSSTokenizer.js: * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceHTMLTokenizer.js: * inspector/front-end/SourceHTMLTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/SourceTokenizer.js: (WebInspector.SourceTokenizer.prototype._charAt): (WebInspector.SourceTokenizer.prototype.createInitialCondition): (WebInspector.SourceTokenizer.prototype.nextToken): * inspector/front-end/TextEditorHighlighter.js: (WebInspector.TextEditorHighlighter.prototype.highlight): (WebInspector.TextEditorHighlighter.prototype._highlightLines): * inspector/front-end/TextEditorModel.js: * inspector/front-end/TextViewer.js: (WebInspector.TextViewerDelegate.prototype.doubleClick): (WebInspector.TextViewerDelegate.prototype.beforeTextChanged): (WebInspector.TextViewerDelegate.prototype.afterTextChanged): (WebInspector.TextViewerDelegate.prototype.commitEditing): (WebInspector.TextViewerDelegate.prototype.cancelEditing): (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu): (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu): (WebInspector.TextViewerDelegate.prototype.suggestedFileName): (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf): (WebInspector.TextEditorMainPanel.prototype._createLink): (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges): * inspector/front-end/externs.js: (WebInspector.completeURL): (window.getComputedStyle): (Event.prototype.initWebKitWheelEvent): * inspector/front-end/utilities.js: 2011-10-04 Vsevolod Vlasov Web Inspector: Timeline panel shortcut for filtering short records should have shorter description. https://bugs.webkit.org/show_bug.cgi?id=69333 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._registerShortcuts): 2011-10-04 Andreas Kling Shrink StyleRareNonInheritedData. https://bugs.webkit.org/show_bug.cgi?id=69331 Reviewed by Antti Koivisto. Rearrange the members and move all small types into the bitfield. This shrinks StyleRareNonInheritedData by two CPU words, reducing memory consumption by 140 kB (on 64-bit) when loading the full HTML5 spec. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleRareNonInheritedData.h: 2011-10-04 Vsevolod Vlasov Web Inspector: Remove http/tests/inspector/network/disabled-cache-crash.html. https://bugs.webkit.org/show_bug.cgi?id=69332 Reviewed by Pavel Feldman. * WebCore.exp.in: * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: 2011-10-04 Pavel Feldman Web Inspector: make DataGrid compile https://bugs.webkit.org/show_bug.cgi?id=69334 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode): (WebInspector.DataGrid.prototype._startEditing): (WebInspector.DataGrid.prototype._startEditingConfig): (WebInspector.DataGrid.prototype._editingCommitted.moveToNextIfNeeded): (WebInspector.DataGrid.prototype._editingCommitted): (WebInspector.DataGrid.prototype._editingCancelled): (WebInspector.DataGrid.prototype.removeChildrenRecursive): (WebInspector.DataGrid.prototype._keyDown): (WebInspector.DataGrid.prototype._startResizerDragging): (WebInspector.DataGrid.prototype._resizerDragging): (WebInspector.DataGrid.prototype._endResizerDragging): (WebInspector.DataGridNode.prototype._attach): * inspector/front-end/UIUtils.js: (WebInspector.isBeingEdited): (WebInspector.markBeingEdited): (WebInspector.isEditingAnyField): (WebInspector.EditingConfig): (WebInspector.startEditing.blurEventListener): (WebInspector.startEditing.getContent): (WebInspector.startEditing.cleanUpAfterEditing): (WebInspector.startEditing.editingCancelled): (WebInspector.startEditing.editingCommitted): (WebInspector.startEditing.defaultFinishHandler): (WebInspector.startEditing): (WebInspector.startEditing.pasteEventListener): (WebInspector.startEditing.keyDownEventListener): * inspector/front-end/externs.js: (Array.prototype.remove): (window.getComputedStyle): * inspector/front-end/inspector.js: 2011-10-04 Andrey Kosyakov Web Inspector: [Extensions API] extension panel's toolbar icon is incorrect when inspector window is docked https://bugs.webkit.org/show_bug.cgi?id=69336 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): 2011-10-04 Pavel Podivilov Web Inspector: update call frame location when source mapping is changed. https://bugs.webkit.org/show_bug.cgi?id=68997 Currently we use fake "debugger-paused" event hack to update execution line and call stack placards when source mapping is changed. - add PresentationCallFrame.createPlacard method to create "live" placards that are updated on source mapping changes. - remove PresentationCallFrame functionName, isInternalScript, and url getters. - fire execution-line-changed event when selected call frame or source mapping is changed. Reviewed by Pavel Feldman. * inspector/compile-front-end.sh: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update): * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMappingPayload): (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMappings): * inspector/front-end/ContentProviders.js: (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent): (WebInspector.CompilerSourceMappingContentProvider.prototype.searchInContent): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.createPlacard.updatePlacard): (WebInspector.DebuggerPresentationModel.prototype.createPlacard): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed): (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame): (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame): (WebInspector.DebuggerPresentationModel.prototype._dispatchExecutionLineChanged): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationCallFrame): (WebInspector.PresentationCallFrame.prototype.get rawSourceCode): (WebInspector.PresentationCallFrame.prototype.uiLocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype._executionLineChanged): (WebInspector.ScriptsPanel.prototype._callFrameSelected): * inspector/front-end/externs.js: (WebInspector.displayNameForURL): 2011-10-04 Pavel Feldman Not reviewed: inspector tests fix. * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): (WebInspector.ExtensionPanel.prototype.get toolbarItemLabel): 2011-09-29 Pavel Podivilov Web Inspector: add compiler source mapping support to RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=68891 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): * inspector/front-end/CompilerSourceMappingProvider.js: Added. (WebInspector.CompilerSourceMappingProvider): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.continueToLine): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype.setCompilerSourceMappingProvider): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createSourceMapping.didLoadSourceMapping): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.get uiSourceCodeList): (WebInspector.CompilerSourceMappingProvider): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode): * inspector/front-end/UISourceCodeContentProviders.js: (WebInspector.CompilerSourceMappingContentProvider): (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-10-04 Pavel Feldman Web Inspector: start adding UI components to the compilation process. https://bugs.webkit.org/show_bug.cgi?id=69319 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.resize): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.statusBarResized): * inspector/front-end/EmptyView.js: * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.set get toolbarItemLabel): (WebInspector.Panel.prototype.get statusBarItems): (WebInspector.Panel.prototype.updateMainViewWidth): (WebInspector.Panel.prototype.statusBarResized): * inspector/front-end/PropertiesSection.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype._onKeyDown): * inspector/front-end/Section.js: (WebInspector.Section.prototype.set populated): (WebInspector.Section.prototype.onpopulate): (WebInspector.Section.prototype.expand): * inspector/front-end/SidebarPane.js: * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.createPanelToolbarItem): (WebInspector.ToolbarDropdown.prototype.show): * inspector/front-end/UIUtils.js: Added. (WebInspector.elementDragStart): (WebInspector.elementDragEnd): (WebInspector.animateStyle): (WebInspector.animateStyle.forceComplete): (WebInspector.animateStyle.cancel): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (WebInspector.extensionServer.notifyPanelShown): (WebInspector.extensionServer.notifyPanelHidden): (WebInspector.currentPanel): (WebInspector.setCurrentPanel): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-10-04 Kenichi Ishibashi [Chromium] Implement font shaping with font-feature-settings on Windows https://bugs.webkit.org/show_bug.cgi?id=65904 Reviewed by Kenneth Russell. Use Uniscribe's OpenType APIs to shape complex text to support -webkit-font-feature-settings property. No new tests. css3/font-feature-settings-rendering.html should pass by this patch. * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::loadOpenTypeFunctions): (WebCore::UniscribeHelper::UniscribeHelper): Calls loadOpenTypeFunctions if needed. (WebCore::UniscribeHelper::fillRuns): Uses ScriptItemizeOpenType() if possible. (WebCore::UniscribeHelper::shape): Uses ScriptShapeOpenType() if possible. (WebCore::UniscribeHelper::fillShapes): Adds OpenType script tag as an argument. (WebCore::convertFeatureTag): Added. (WebCore::UniscribeHelper::setRangeProperties): Added. * platform/graphics/chromium/UniscribeHelper.h: * platform/graphics/chromium/UniscribeHelperTextRun.cpp: (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun): Calls setRangeProperties(). 2011-10-04 Ryuan Choi [EFL] Implement declared but missing functions. https://bugs.webkit.org/show_bug.cgi?id=65368 Unreviewed build fix for WebKit/Efl builds after r96566. * platform/efl/CursorEfl.cpp: (WebCore::Cursor::operator=): * platform/efl/LocalizedStringsEfl.cpp: (WebCore::localizedString): 2011-10-04 Pavel Feldman Web Inspector: move abstract panel search logic into the only view that is using it. https://bugs.webkit.org/show_bug.cgi?id=69328 Reviewed by Yury Semikhatsky. * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.searchCanceled): (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.performSearch.updateMatchesCount): (WebInspector.ProfilesPanel.prototype.performSearch.updateMatchesCountSoon): (WebInspector.ProfilesPanel.prototype.performSearch.finishedCallback): (WebInspector.ProfilesPanel.prototype.performSearch.processChunk): (WebInspector.ProfilesPanel.prototype.performSearch): (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult): (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult): (WebInspector.ProfilesPanel.prototype._searchableViews): (WebInspector.ProfilesPanel.prototype.searchCanceled): 2011-10-04 Pavel Feldman Not reviewed: fixed poor inspector merge, drive-by front-endcompilation fix. * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): * inspector/front-end/DebuggerPresentationModel.js: 2011-10-04 Pavel Feldman Web Inspector: remove dependency from GoToLine dialog from Panel. https://bugs.webkit.org/show_bug.cgi?id=69327 Reviewed by Yury Semikhatsky. * inspector/front-end/GoToLineDialog.js: (WebInspector.GoToLineDialog.install): (WebInspector.GoToLineDialog._show): * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView.prototype._tabSelected): (WebInspector.ResourceContentView.prototype.contentLoaded): (WebInspector.ResourceContentView.prototype.canHighlightLine): (WebInspector.ResourceContentView.prototype.highlightLine): (set WebInspector): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.viewGetter): (WebInspector.NetworkPanel): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.registerShortcut): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.viewGetter): (WebInspector.ResourcesPanel): (WebInspector.ResourcesPanel.prototype.showResource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.viewGetter): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.canHighlightLine): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype._hideTab): (WebInspector.TabbedPane.prototype.canHighlightLine): (WebInspector.TabbedPane.prototype.highlightLine): * inspector/front-end/View.js: (WebInspector.View.prototype.canHighlightLine): (WebInspector.View.prototype.highlightLine): 2011-10-04 Sheriff Bot Unreviewed, rolling out r96491. http://trac.webkit.org/changeset/96491 https://bugs.webkit.org/show_bug.cgi?id=69326 Breaks Slow Leopard inspector tests (Requested by pfeldman on #webkit). * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::getScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.requestContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.requestSource.didGetScriptSource): (WebInspector.Script.prototype.requestSource): 2011-10-03 Pavel Feldman Web Inspector: add DebuggerPresentationModel and ConsoleView to compilation. https://bugs.webkit.org/show_bug.cgi?id=69269 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._completions.evaluated.getCompletions): (WebInspector.ConsoleView.prototype._completions.evaluated): (WebInspector.ConsoleView.prototype._messagesClicked): * inspector/front-end/ContentProviders.js: (WebInspector.StaticContentProvider.prototype.requestContent): (WebInspector.StaticContentProvider.prototype.searchInContent): * inspector/front-end/ContextMenu.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScriptWithURL): (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript): (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): * inspector/front-end/HelpScreen.js: * inspector/front-end/JavaScriptContextManager.js: (WebInspector.FrameEvaluationContext.prototype.get displayName): * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut): * inspector/front-end/Resource.js: (WebInspector.Resource.displayName): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype._didFormatContent): * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/StatusBarButton.js: * inspector/front-end/TextPrompt.js: * inspector/front-end/externs.js: (WebInspector.populateHrefContextMenu): (WebInspector.useLowerCaseMenuTitles): (WebInspector.ScriptsPanel.this.evaluateInSelectedCallFrame): (WebInspector.ScriptsPanel.this.getSelectedCallFrameVariables): (WebInspector.ScriptsPanel): * inspector/front-end/inspector.js: * inspector/front-end/utilities.js: 2011-10-03 Ryosuke Niwa Mac release build fix after r96561, and Leopard build fix after r96568. * editing/TextCheckingHelper.h: (WebCore::TextCheckingParagraph::textCharAt): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): 2011-10-03 Ryosuke Niwa Build fix after r96568. * accessibility/AccessibilityObject.cpp: * accessibility/mac/WebAccessibilityObjectWrapper.mm: * editing/Editor.cpp: 2011-10-03 Shinya Kawanaka Should call checkTextOfParagraph() indirectly to make unifying spell-checking code path easy. https://bugs.webkit.org/show_bug.cgi?id=69241 Reviewed by Ryosuke Niwa. WebCore has two different code paths for spell-checking: 1) checkTextOfParagraph() for Snow Leopard or later 2) checkSpellingOfString() for checkGrammarOfString() for other platforms. At the first step, this patch introduces an indirect wrapper to call checkTextOfParagraph() in Snow Leopard or later. This is intended to make it easy to introduce a function for mimicing checkTextOfParagraph() in Chromium platform or other non-SL or non-Lion platform. No new tests because this patch does not change a behavior. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::hasMisspelling): Calling checkTextOfParagraph() indirectly. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (AXAttributeStringSetSpelling): ditto. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): ditto. * editing/TextCheckingHelper.cpp: (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): ditto. (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange): ditto. (WebCore::checkTextOfParagraph): Added. * editing/TextCheckingHelper.h: 2011-10-03 Darin Adler Change cursor to hand over missing plug-in message https://bugs.webkit.org/show_bug.cgi?id=69312 Reviewed by Sam Weinig. No tests because we currently don't have any test machinery for cursors. * page/EventHandler.cpp: (WebCore::OptionalCursor::OptionalCursor): Added. Construct an object to represent either a cursor, or no cursor change. (WebCore::OptionalCursor::isCursorChange): Added. (WebCore::OptionalCursor::cursor): Added. (WebCore::EventHandler::selectCursor): Changed return type to OptionalCursor, moved some special cases from handleMouseMoveEvent in here. Moved the logic for plug-ins and framesets into the specific renderer classes for those. Added a call to the new getCursor virtual function. (WebCore::EventHandler::handleMouseMoveEvent): Changed cursor setting code to just be a call to selectCursor and then setCursor. Plug-in-specific code is now in RenderWidget. * page/EventHandler.h: Changed return type of selectCursor. * page/MouseEventWithHitTestResults.cpp: Made some functions be inline. * page/MouseEventWithHitTestResults.h: (WebCore::MouseEventWithHitTestResults::localPoint): Made this inline. (WebCore::MouseEventWithHitTestResults::scrollbar): Made this inline. Yes, this has nothing to do with the rest of the patch, but it's good. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): Made const. (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator): Made const. Overloaded so it can be called with a point rather than an event. (WebCore::shouldMissingPluginMessageBeButton): Added. Helps streamline the logic below. (WebCore::RenderEmbeddedObject::handleMissingPluginIndicatorEvent): Changed to use shouldMissingPluginMessageBeButton. (WebCore::RenderEmbeddedObject::getCursor): Added. Sets the cursor to a hand when over the missing plug-in message. * rendering/RenderEmbeddedObject.h: Added getCursor override. Also updated for other changes above. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::getCursor): Added. Contains the logic that used to be hardcoded in EventHandler::selectCursor about cursors when over resizable frame borders. * rendering/RenderFrameSet.h: Added getCursor. * rendering/RenderObject.cpp: (WebCore::RenderObject::getCursor): Added. Returns SetCursorBasedOnStyle. * rendering/RenderObject.h: Added getCursor. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::getCursor): Added. Contains the logic that used to be hardcoded in EventHandler::handleMouseMoveEvent to prevent setting the cursor when the pointer is over a plug-in. This new code is much better, because it only kicks in when there is actually a plug-in present. The old was based on the HTML tag! * rendering/RenderWidget.h: Added getCursor. 2011-10-03 Anders Carlsson Work towards making PlatformWheelEvent immutable https://bugs.webkit.org/show_bug.cgi?id=69306 Reviewed by Sam Weinig. Currently, PlatformWheelEvent has an m_isAccepted flag that tracks whether the event has been handled or not. For all other event types, that state is instead tracked by the return value of the various event handlers. As a first step, add return values to the various handleWheelEvent functions and add an assertion in EventHandler::wheelEvent that the return value is the same as the state of PlatformWheelEvent::isAccepted. * Configurations/Base.xcconfig: Don't warn when using C++11 extensions. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): Assert that isAccepted matches the return value. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): Return isAccepted. * platform/ScrollAnimator.h: HandleWheelEvent now returns a boolean. * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): Return whether the event was handled or not. * platform/ScrollView.h: ScrollView::wheelEvent now returns a bool. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::handleWheelEvent): * platform/ScrollableArea.h: ScrollableArea::handleWheelEvent now returns a bool. * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): Add return values, based on either the base class calls or the state of PlatformWheelEvent::isAccepted(). * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): Ditto. 2011-10-03 Dan Bernstein REGRESSION (r66599): -[DOMNode boundingBox] returns the zero rect for SVG elements https://bugs.webkit.org/show_bug.cgi?id=69305 Reviewed by Simon Fraser. Test: svg/custom/boundingBox.html Rather than asserting and returning the zero rect, take the transform-aware code path for computing SVG bounding rects. * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer(). * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto. (WebCore::RenderSVGModelObject::absoluteRects): Replaced an incorrect assertion with code to approximate the bounding box. * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer(). * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): Removed the fixed and useTransform boolean parameters. * rendering/svg/SVGRenderSupport.h: 2011-10-03 Michael Nordman A little more WebSQLDatabase thread safety. https://bugs.webkit.org/show_bug.cgi?id=69277 - switch to using AtomicallyInitializedStatic where appropiate - avoid using some Strings across threads Reviewed by David Levin. Existing tests apply. * storage/AbstractDatabase.cpp: (WebCore::guidMutex): (WebCore::guidToVersionMap): (WebCore::guidToDatabaseMap): (WebCore::guidForOriginAndName): (WebCore::AbstractDatabase::databaseInfoTableName): (WebCore::AbstractDatabase::AbstractDatabase): (WebCore::AbstractDatabase::performOpenAndVerify): (WebCore::AbstractDatabase::getVersionFromDatabase): (WebCore::AbstractDatabase::setVersionInDatabase): * storage/AbstractDatabase.h: * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::tracker): * storage/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::instance): 2011-10-03 Ryosuke Niwa Replace m_firstNodeInserted and m_lastLeafInserted in ReplaceSelectionCommand by positions https://bugs.webkit.org/show_bug.cgi?id=68874 Reviewed by Enrica Casucci. Replaced m_firstNodeInserted and m_lastLeafInserted by m_startOfInsertedContent and m_endOfInsertedContent respectively. Also removed removeNodePreservingChildren and removeNodeAndPruneAncestors in ReplaceSelectionCommand because they were not virtual in CompositeEditCommand and implicitly overriding the functions was confusing. Since each of these two functions is used at exactly one place, just update positions and insertedNodes explicitly. * editing/CompositeEditCommand.cpp: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): (WebCore::ReplaceSelectionCommand::handleStyleSpans): (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Update m_endOfInsertedContent by endingSelection().visibleEnd() instead of m_lastLeafInserted with destination.previous() because moveParagraph could have removed leading whitespace in the text node referenced by destination. This is tested by an existing layout test. (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Update positions as needed. All changes are tested by the existing layout tests in editing/pasteboard. (WebCore::ReplaceSelectionCommand::updateNodesInserted): * editing/ReplaceSelectionCommand.h: * editing/htmlediting.cpp: (WebCore::hasARenderedDescendant): Moved from CompositeEditCommand.cpp. (WebCore::highestNodeToRemoveInPruning): Ditto. * editing/htmlediting.h: 2011-10-03 Ryosuke Niwa REGRESSION(r94274): cloned text input loses value https://bugs.webkit.org/show_bug.cgi?id=69095 Reviewed by Darin Adler. The bug was caused by copyNonAttributeProperties not updating inner element text after copying m_valueIfDirty. Fixed the bug by calling updateInnerTextValue. Test: fast/forms/clone-input-with-dirty-value.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::copyNonAttributeProperties): 2011-10-03 Ryosuke Niwa Leopard build fix after r96530. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): 2011-10-03 Sam Weinig Move ContentSecurityPolicy to the ScriptExecutionContext to prepare it for working with XHR and workers https://bugs.webkit.org/show_bug.cgi?id=69294 Reviewed by Darin Adler. * dom/Document.cpp: (WebCore::Document::initSecurityContext): Initialize the ContentSecurityPolicy by calling down to the ScriptExecutionContext. * dom/Document.h: Move the ContentSecurityPolicy member and getter from here to ScriptExecutionContext.h. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::setContentSecurityPolicy): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::contentSecurityPolicy): Add ContentSecurityPolicy member and getter/setter. * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::ContentSecurityPolicy): (WebCore::ContentSecurityPolicy::didReceiveHeader): (WebCore::ContentSecurityPolicy::reportViolation): (WebCore::ContentSecurityPolicy::parseReportURI): (WebCore::ContentSecurityPolicy::createCSPDirective): * page/ContentSecurityPolicy.h: (WebCore::ContentSecurityPolicy::create): Replace Document with ScriptExecutionContext. Add temporary checked casts to document where necessary. * workers/WorkerContext.cpp: (WebCore::WorkerContext::WorkerContext): Add initialization of the ContentSecurityPolicy. 2011-10-03 Anders Carlsson Remove custom scrollbar painting hooks https://bugs.webkit.org/show_bug.cgi?id=69163 Reviewed by Alexey Proskuryakov. The custom scrollbar and scroll corner painting hooks aren't used by anyone so go ahead and remove them. This removes the setter/getter and ChromeClient functions. * page/Chrome.cpp: * page/ChromeClient.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): (WebCore::ScrollbarThemeComposite::paintScrollCorner): 2011-09-22 Darin Adler Rename many obviously-correct call sites in WebCore using releaseRef to use it by its new name leakRef https://bugs.webkit.org/show_bug.cgi?id=68672 Reviewed by Daniel Bates. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): * css/CSSInitialValue.h: (WebCore::CSSInitialValue::createExplicit): (WebCore::CSSInitialValue::createImplicit): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::init): * css/CSSStyleSelector.cpp: (WebCore::parseUASheet): (WebCore::CSSStyleSelector::styleForElement): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderTheme::themeForPage): * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderTheme::themeForPage): * platform/haiku/RenderThemeHaiku.cpp: (WebCore::RenderTheme::themeForPage): * platform/network/cf/DNSCFNet.cpp: (WebCore::DNSResolveQueue::resolve): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::releaseConnectionForDownload): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderTheme::themeForPage): (WebCore::RenderThemeQt::paintSearchFieldCancelButton): * platform/text/BidiContext.cpp: (WebCore::BidiContext::create): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeMac.mm: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeSafari.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeWin.cpp: (WebCore::RenderTheme::themeForPage): (WebCore::RenderThemeWin::paintSearchFieldCancelButton): (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration): (WebCore::RenderThemeWin::paintSearchFieldResultsButton): * rendering/RenderThemeWinCE.cpp: (WebCore::RenderTheme::themeForPage): * rendering/style/RenderStyle.cpp: (WebCore::defaultStyle): Call leakRef instead of releaseRef. I did this only in the cases where it was obvious to me this was the right way to do it. I'll keep revisiting sites still calling it releaseRef until they are all gone. 2011-09-27 Ojan Vafai remove dead code in flipForWritingMode https://bugs.webkit.org/show_bug.cgi?id=68948 Reviewed by Hajime Morita. ChildToParentFlippingAdjustment is never used, so the third argument to flipForWritingMode always has the same value. In addition, renamed to flipForWritingModeForChild to be more clear that it's operating on the child and renamed flipFloatForWritingMode to match. No new tests. This is just a code cleanup. No functional changes. * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::flipFloatForWritingModeForChild): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestContents): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::flipForWritingModeForChild): (WebCore::RenderBox::topLeftLocation): * rendering/RenderBox.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): (WebCore::RenderTableSection::nodeAtPoint): 2011-10-03 Jer Noble Unreviewed, rolling out r96526. http://trac.webkit.org/changeset/96526 https://bugs.webkit.org/show_bug.cgi?id=68587 WEB_AUDIO has numerous 64->32 bit casting warnings, causing build breakages where -Wall is enabled. * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: 2011-10-03 Joseph Pecoraro Web Inspector: rgb() with percentages shows wrong hex/hsl values https://bugs.webkit.org/show_bug.cgi?id=69152 Reviewed by Pavel Feldman. Previously we assumed rgb values were always in byte form, but they could include percentage values. Ex. rgb(100%,0,0). This patch fixes this, and in the process includes clamping for invalid percentages, byte values, and alpha values. Test: inspector/styles/styles-invalid-color-values.html * inspector/front-end/Color.js: (WebInspector.Color.prototype._clamp): (WebInspector.Color.prototype._individualRGBValueToFloatValue): (WebInspector.Color.prototype._individualRGBValueToHexValue): (WebInspector.Color.prototype._rgbToHex): (WebInspector.Color.prototype._rgbToHSL): An individual rgb value can be either a decimal/float or a percentage. Rewrite the conversion functions to handle either input. Regardless of the type of input, always return a clamped decimal/float value between 0 and 255. (WebInspector.Color.prototype._rgbaToHSLA): (WebInspector.Color.prototype._hslaToRGBA): (WebInspector.Color.prototype._parse): Clamp the alpha value between 0 and 1. 2011-10-03 Dirk Schulze SVG Pattern tile pixelated on patternTransform https://bugs.webkit.org/show_bug.cgi?id=69261 Reviewed by Rob Buis. Scale the SVG pattern tile by the scale level of patternTransform to avoid pixelation. Test: svg/custom/pattern-scaled-pattern-space.svg * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): 2011-10-03 Jer Noble Enable WEB_AUDIO by default in the WebKit/mac port. https://bugs.webkit.org/show_bug.cgi?id=68587 Reviewed by Simon Fraser. No new tests; existing webaudio/ layout tests cover this. * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: Add a build step which copies audio resources to the WebCore.framework bundle. 2011-10-03 Chris Rogers BiquadFilterNode .type attribute is not handled correctly https://bugs.webkit.org/show_bug.cgi?id=69182 Reviewed by Kenneth Russell. Test: webaudio/biquadfilternode-basic.html * platform/audio/AudioDSPKernelProcessor.cpp: (WebCore::AudioDSPKernelProcessor::initialize): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::AudioChannelMerger): * webaudio/AudioChannelSplitter.cpp: (WebCore::AudioChannelSplitter::AudioChannelSplitter): * webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::AudioGainNode): * webaudio/AudioNode.cpp: (WebCore::AudioNode::AudioNode): (WebCore::AudioNode::~AudioNode): (WebCore::AudioNode::setNodeType): (WebCore::AudioNode::ref): (WebCore::AudioNode::finishDeref): * webaudio/AudioNode.h: (WebCore::AudioNode::nodeType): * webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::AudioPannerNode): (WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode): * webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): (WebCore::BiquadFilterNode::setType): * webaudio/BiquadFilterNode.h: * webaudio/BiquadFilterNode.idl: * webaudio/BiquadProcessor.h: (WebCore::BiquadProcessor::setType): * webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): * webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): * webaudio/HighPass2FilterNode.cpp: (WebCore::HighPass2FilterNode::HighPass2FilterNode): * webaudio/JavaScriptAudioNode.cpp: (WebCore::JavaScriptAudioNode::JavaScriptAudioNode): * webaudio/LowPass2FilterNode.cpp: (WebCore::LowPass2FilterNode::LowPass2FilterNode): * webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): * webaudio/RealtimeAnalyserNode.cpp: (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode): * webaudio/WaveShaperNode.cpp: (WebCore::WaveShaperNode::WaveShaperNode): 2011-10-03 Chris Fleizach AX: support role mapping for HTML5 section elements https://bugs.webkit.org/show_bug.cgi?id=69150 We need to map these HTML5 elements to appropriate ARIA roles. That mapping is: article -> Document article nav -> Landmark navigation aside -> Landmark complementary section -> Document region address -> Landmark content info header -> Landmark banner (unless it's in an article or section) footer -> Landmark content info (unless it's in an article or section) Reviewed by Darin Adler. Test: platform/mac/accessibility/html-section-elements.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isDescendantOfElementType): (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/AccessibilityRenderObject.h: 2011-10-03 Chris Fleizach AX: click point for AXHeadings often returns point on empty space (results in wrong context menu) https://bugs.webkit.org/show_bug.cgi?id=69262 When the contextual menu is opened for a heading, often it will open on empty space because the heading is wider than the content inside. The click point should thus use the content inside the heading as the click point. To accomplish this we need to query whether we have children using children() which is a non-const method, hence the removal of const from clickPoint(). Reviewed by John Sullivan. Test: platform/mac/accessibility/heading-clickpoint.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clickPoint): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::clickPoint): * accessibility/AccessibilityRenderObject.h: 2011-10-03 Sheriff Bot Unreviewed, rolling out r96500. http://trac.webkit.org/changeset/96500 https://bugs.webkit.org/show_bug.cgi?id=69268 Breaks inspector, change landed with no test. (Requested by pfeldman on #webkit). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (): * inspector/front-end/Linkifier.js: Removed. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView): (WebInspector.CPUProfileView.prototype._resetClicked): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation): (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-09-30 Antti Koivisto Add exact match attribute selectors to the fast path https://bugs.webkit.org/show_bug.cgi?id=69159 Reviewed by Sam Weinig. Attribute selectors are increasingly common and we have them in our default style sheet too. [foo] and [foo="bar"] type selectors can be resolved quickly and easily in the fast path. - Implement fast path checking for simple attribute selectors. - Get rid of the ill-defined CSSSelector::hasAttribute(), inline CSSSelector::attribute() This is ~20% progression in styleForElement() performance loading the full HTML5 spec (~0.8s). * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): * css/CSSSelector.h: (WebCore::CSSSelector::hasTag): (WebCore::CSSSelector::attribute): (WebCore::CSSSelector::isAttributeSelector): * css/CSSSelectorList.cpp: (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::fastCheckRightmostSelector): (WebCore::SelectorChecker::fastCheckSelector): (WebCore::isFastCheckableMatch): (WebCore::isFastCheckableRightmostSelector): (WebCore::SelectorChecker::isFastCheckableSelector): (WebCore::SelectorChecker::checkSelector): (WebCore::htmlAttributeHasCaseInsensitiveValue): (WebCore::anyAttributeMatches): (WebCore::SelectorChecker::checkOneSelector): * css/SelectorChecker.h: (WebCore::SelectorChecker::attributeNameMatches): (WebCore::SelectorChecker::checkExactAttribute): (WebCore::SelectorChecker::fastCheckRightmostAttributeSelector): 2011-10-03 Mike Reed respect other paint flags when setting flags for the font. No need to fiddle with DC(0) in paintSkiaText. https://bugs.webkit.org/show_bug.cgi?id=69172 Reviewed by Stephen White. No new tests. This is a cleanup/optimization, existing tests apply * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::getDefaultGDITextFlags): (WebCore::setupPaintForFont): (WebCore::paintSkiaText): 2011-10-03 Andreas Kling FontFallbackList: Glyph pages waste a lot of memory. https://bugs.webkit.org/show_bug.cgi?id=69260 Reviewed by Dan Bernstein. Use a minimum hash table size of 16 (down from 64) for FontFallbackList's glyph pages. This reduces memory consumption by ~900 kB when loading the full HTML5 spec. The cost is two additional rehash()es of FontFallbackList::m_pages when adding the 32nd and 64th pages to the hash map. * platform/graphics/FontFallbackList.h: 2011-10-03 Konstantin Scheglov Right border missing from table with colspan and collapsing border https://bugs.webkit.org/show_bug.cgi?id=14274 Reviewed by David Hyatt. Test: fast/table/border-collapsing/bug14274.html * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): * rendering/RenderTable.h: (WebCore::RenderTable::colToEffCol): 2011-10-03 Carlos Garcia Campos [GTK] Fix make distcheck build https://bugs.webkit.org/show_bug.cgi?id=69243 Reviewed by Martin Robinson. * GNUmakefile.am: * GNUmakefile.list.am: 2011-10-03 Pierre Rossi [Qt] Build fix: Qt::escape is deprecated in Qt5 https://bugs.webkit.org/show_bug.cgi?id=69162 Use QString::toHtmlEscaped in the Qt5 case. Reviewed by Andreas Kling. No new tests needed. * WebCore.pro: adjust the include path accordingly in the v8 case. 2011-10-03 Ilya Tikhonovsky Web Inspector: debuggerPresentatioModel.linkifyLocation leaks updateAnchor closure instances. https://bugs.webkit.org/show_bug.cgi?id=69146 In many places we use linkifyLocation function to produce a link node which updates automatically when the source file is changed on the fly. Such changes happen when we use pretty print or another operation that changes the source code somehow. linkifyLocation associates a new instance of updateAnchor closure with the each link node and add the closure to the SourceMappingUpdated event's list. As the result the node<->closure pairs wouldn't be collected until reset the UI and DebuggerPresentationModel. Reviewed by Yury Semikhatsky. Test: inspector/performance/resources/network-append-30-requests.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype._linkifyLocation): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (): * inspector/front-end/Linkifier.js: Added. (WebInspector.Linkifier): (WebInspector.Linkifier.prototype.linkifyLocation): (WebInspector.Linkifier.prototype.reset): (WebInspector.Linkifier.prototype._updateSourceAnchors): (WebInspector.Linkifier.prototype._updateAnchor): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView): (WebInspector.CPUProfileView.prototype._resetClicked): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._linkifyLocation): (WebInspector.TimelinePanel.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-10-03 Pavel Feldman Web Inspector: more compilation fixes including making ConsoleMessage a part of console model. https://bugs.webkit.org/show_bug.cgi?id=69253 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.create): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleMessageImpl): * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleMessage.create): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleDispatcher.prototype.messageAdded): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleCommandResult): (WebInspector.ConsoleCommandResult.prototype.toMessageElement): * inspector/front-end/CookieParser.js: (WebInspector.Cookie.prototype.get path): (WebInspector.Cookie.prototype.get domain): (WebInspector.Cookie.prototype.expires): * inspector/front-end/DOMAgent.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onAddConsoleMessage): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.setContent): (WebInspector.Resource.prototype.searchInContent): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._createResource): * inspector/front-end/externs.js: (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): (WebInspector.extensionServer.notifyResourceContentCommitted): (WebInspector.resourceForURL): (WebInspector.debuggerPresentationModel.linkifyLocation): (WebInspector.ObjectPropertiesSection): (WebInspector.ElementsTreeOutline): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): * inspector/generate-protocol-externs: 2011-10-03 Pavel Feldman Web Inspector: move console message formatting from ConsoleView.js into ConsoleMessage.js https://bugs.webkit.org/show_bug.cgi?id=69244 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier): (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatParameter): (WebInspector.ConsoleMessage.prototype._formatParameterAsValue): (WebInspector.ConsoleMessage.prototype._formatParameterAsObject): (WebInspector.ConsoleMessage.prototype._formatParameterAsNode): (WebInspector.ConsoleMessage.prototype._formatParameterAsArray): (WebInspector.ConsoleMessage.prototype._formatParameterAsString): (WebInspector.ConsoleMessage.prototype._printArray): (WebInspector.ConsoleMessage.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString): * inspector/front-end/ConsoleView.js: 2011-10-03 Dirk Schulze feColorMatrix saturation is not limited to range 0..1 anymore https://bugs.webkit.org/show_bug.cgi?id=69245 Reviewed by Nikolas Zimmermann. Opera doesn't limit the range of values for saturation on feColorMatrix from 0 to 1. The limitation was also removed from the new Filter Effects 1.0 specification. Values outside this range lead to under- or oversaturation of the filter input image. https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html#feColorMatrixElement Test: svg/filters/feColorMatrix-saturate.svg * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::build): 2011-10-03 Andreas Kling Shrink HTMLLIElement. https://bugs.webkit.org/show_bug.cgi?id=69250 Reviewed by Antti Koivisto. Don't cache the explicit "value" attribute on the HTMLLIElement, but fetch it with fastGetAttribute when needed. This shrinks HTMLLIElement by one CPU word. * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::HTMLLIElement): (WebCore::HTMLLIElement::parseMappedAttribute): (WebCore::HTMLLIElement::attach): * html/HTMLLIElement.h: 2011-10-03 Vsevolod Vlasov Web Inspector: Add support for backend search in script content. https://bugs.webkit.org/show_bug.cgi?id=69015 Reviewed by Pavel Feldman. Tests: http/tests/inspector/search/search-in-concatenated-script.html http/tests/inspector/search/search-in-script.html * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::getScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.maybeCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.searchCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.requestSource): (WebInspector.Script.prototype.searchInContent): 2011-10-03 Pavel Feldman Web Inspector: move console message formatting from ConsoleView.js into ConsoleMessage.js https://bugs.webkit.org/show_bug.cgi?id=69244 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier): (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatParameter): (WebInspector.ConsoleMessage.prototype._formatParameterAsValue): (WebInspector.ConsoleMessage.prototype._formatParameterAsObject): (WebInspector.ConsoleMessage.prototype._formatParameterAsNode): (WebInspector.ConsoleMessage.prototype._formatParameterAsArray): (WebInspector.ConsoleMessage.prototype._formatParameterAsString): (WebInspector.ConsoleMessage.prototype._printArray): (WebInspector.ConsoleMessage.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString): * inspector/front-end/ConsoleView.js: 2011-10-03 Pavel Feldman Web Inspector: restore partial front-end compilability https://bugs.webkit.org/show_bug.cgi?id=69221 Removed unused isWhitespace; introduced missing classes in Inspector.json; generated externs for the protocol types along with the commands. Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (): * inspector/front-end/Object.js: * inspector/front-end/Popover.js: (WebInspector.PopoverHelper.prototype._mouseMove): * inspector/front-end/View.js: * inspector/front-end/externs.js: (Array.prototype.remove): * inspector/generate-protocol-externs: 2011-10-02 Kent Tamura method/enctype/formMethod/formEnctype properties should be limited to known values. https://bugs.webkit.org/show_bug.cgi?id=68887 Reviewed by Hajime Morita. According to the standard and other browser behaviors, the following IDL properties should be reflected to the corresponding HTML attributes on setting, but should return normalized values on getting. - HTMLFormElement::method - HTMLFormElement::enctype - HTMLInputElement::formMethod - HTMLInputElement::formEnctype - HTMLButtonElement::formMethod - HTMLButtonElement::formEnctype Tests: fast/forms/enctype-attribute.html fast/forms/method-attribute.html * html/HTMLButtonElement.idl: Replace 'Reflect' with 'ConvertNullToNullString' in order to use a getter function. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::formEnctype): Normalizes the value by parseEncodingType(). (WebCore::HTMLFormControlElement::setFormEnctype): Simply calls setAttribute() (WebCore::HTMLFormControlElement::formMethod): Normalizes the value by parseMethodType(). (WebCore::HTMLFormControlElement::setFormMethod): Simply calls setAttribute() * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): Follow the Attributes function renaming. (WebCore::HTMLFormElement::method): Normalizes the value by parseMethodType(). * html/HTMLFormElement.idl: Replace 'Reflect' with 'ConvertNullToNullString' in order to use a getter function. * html/HTMLInputElement.idl: ditto. * loader/FormSubmission.cpp: (WebCore::FormSubmission::Attributes::parseEncodingType): New function made from a part of old parseEncodingType(). (WebCore::FormSubmission::Attributes::updateEncodingType): Renamed from parseEncodingType(). (WebCore::FormSubmission::Attributes::parseMethodType): New function made from a part of old parseMethodType(). (WebCore::FormSubmission::Attributes::updateMethodType): Renamed from parseMethodType(). (WebCore::FormSubmission::create): Follow the Attributes function renaming. * loader/FormSubmission.h: (WebCore::FormSubmission::Attributes::methodString): A helper function to provide normalized strings for FormSubmission::Method. 2011-10-02 Sam Weinig Strength reduce Mac only Frame::searchForLabelsBeforeElement and Frame::matchLabelsAgainstElement into callers https://bugs.webkit.org/show_bug.cgi?id=69230 Reviewed by Anders Carlsson. * WebCore.exp.in: * page/Frame.h: * page/mac/FrameMac.mm: 2011-10-02 Zeno Albisser [Qt][WK2][Mac] WebKit2 does not build on mac after merge of Qt5 refactor branch. https://bugs.webkit.org/show_bug.cgi?id=69223 Add a missing import (NSWindow.h) in WebVideoFullscreenHUDWindowController. Add a missing include path and a missing objective source file to WebCore.pro. Reviewed by Noam Rosenthal. No new tests, build fix. * WebCore.pro: * platform/mac/WebVideoFullscreenHUDWindowController.h: 2011-10-02 Julien Chaffraix Remove an unused member in RenderTable::ColumnStruct https://bugs.webkit.org/show_bug.cgi?id=69119 Reviewed by Darin Adler. No test as there should be no change in behavior. The member was added several years ago and its users were removed or changed. The code would need a refactoring but this would be tricky to get right. This change just removes the member to reap the short-term benefits. * rendering/RenderTable.h: (WebCore::RenderTable::ColumnStruct::ColumnStruct): Remove anything associated with m_width. 2011-10-02 Dan Bernstein REGRESSION (r95502): Assertion failure in CSSPrimitiveValue::computeLengthDouble() when media query specifies unit-less length https://bugs.webkit.org/show_bug.cgi?id=68760 Reviewed by Antti Koivisto. Test: fast/media/invalid-lengths.html Made length-comparison media queries accept only length values. In compatibility mode, numbers are allowed as well, and they are interpreted as pixels. * css/MediaQueryEvaluator.cpp: (WebCore::computeLength): Added this helper function. (WebCore::device_heightMediaFeatureEval): Changed to use computeLength(). (WebCore::device_widthMediaFeatureEval): Ditto. (WebCore::heightMediaFeatureEval): Ditto. (WebCore::widthMediaFeatureEval): Ditto. 2011-10-02 Dirk Schulze SVG Mask should take 'color-interpolation' into account to determine the color space of the mask image https://bugs.webkit.org/show_bug.cgi?id=69076 Reviewed by Simon Fraser. SVG Masks should take 'color-interpolation' into account to determine the color space of the mask image. The behavior was changed in SVG 1.1 SE. The color space of the mask image gets defined by the computed value of the 'color-interpolation' property. This will switch the default color space from linearRGB to sRGB for mask images and is a performance improvement for platforms without native support for linearRGB color space. The color space transformation can be avoided. Test: svg/custom/grayscale-gradient-mask-2.svg * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceMasker.h: 2011-10-01 Vangelis Kokkevis [chromium] Fixing draw matrix for composited layers. This was a regression introduced by: http://trac.webkit.org/changeset/96454 https://bugs.webkit.org/show_bug.cgi?id=69217 Reviewed by James Robinson. Tests: compositor test now pass * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: 2011-10-01 Geoffrey Garen Removed redundant helper functions for allocating Strong handles https://bugs.webkit.org/show_bug.cgi?id=69218 Reviewed by Sam Weinig. * ForwardingHeaders/heap/StrongInlines.h: Added. * bindings/js/JSCallbackData.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/ScheduledAction.h: * bindings/js/ScriptCachedFrameData.cpp: * bindings/js/ScriptController.cpp: * bindings/js/ScriptState.cpp: * bindings/js/ScriptValue.h: * bindings/js/WorkerScriptController.cpp: * bridge/runtime_root.cpp: 2011-10-01 Sheriff Bot Unreviewed, rolling out r96421. http://trac.webkit.org/changeset/96421 https://bugs.webkit.org/show_bug.cgi?id=69206 It broke Qt-WK2 build (Requested by ossy on #webkit). * WebCore.pro: 2011-09-30 Adrienne Walker [chromium] Track separate scroll deltas on the compositor thread https://bugs.webkit.org/show_bug.cgi?id=69034 Reviewed by James Robinson. Test: new tests in CCLayerTreeHostImplTest/CCLayerTreeHostTest Track scroll deltas and maximum scrolls on LayerChromium/CCLayerImpl. The CCLayerImpl tree is now able to adjust these scroll deltas independent of the main thread. To push them back to the main thread, CCLayerTreeHostImpl collects them all and then bakes them into the scroll position during a begin frame and commit call. This allows new deltas to be collected while the scroll position containing the old delta and the old scroll position will be overwritten during the next commit. Only the main frame is supported right now for pushing this scroll delta back into the authoritative WebKit source to keep both sides in sync. Move tilingTransform() to the impl tree because drawTransform() is now updated using scroll deltas and so the results from calculating draw transforms needs to be dynamic so that children are updated properly. Also, exposed DebugScopedSetImplThread public because it's used in a few places. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::maxScrollPosition): (WebCore::LayerChromium::setMaxScrollPosition): (WebCore::LayerChromium::scrollDelta): (WebCore::LayerChromium::scrollable): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::setViewport): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::scrollBy): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::maxScrollPosition): (WebCore::CCLayerImpl::setMaxScrollPosition): (WebCore::CCLayerImpl::scrollDelta): (WebCore::CCLayerImpl::setScrollDelta): (WebCore::CCLayerImpl::scrollable): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::applyScrollDeltas): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::scrollRootLayer): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::start): (WebCore::CCSingleThreadProxy::context): (WebCore::CCSingleThreadProxy::finishAllRendering): (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore::DebugScopedSetImplThread::DebugScopedSetImplThread): (WebCore::DebugScopedSetImplThread::~DebugScopedSetImplThread): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread): (WebCore::CCThreadProxy::beginFrameAndCommit): * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::tilingTransform): (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: 2011-09-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69202 [CSS3 Regions] Make positioned objects use the first region as the ICB when it is their containing block. Make sure static distance computations take into account the current region as well. Reviewed by Sam Weinig. Added new tests in fast/regions. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock): * rendering/RenderBlock.h: (WebCore::RenderBlock::startOffsetForContent): * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): (WebCore::computeInlineStaticDistance): (WebCore::computeLogicalLeftPositionedOffset): (WebCore::computeLogicalTopPositionedOffset): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion): (WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion): (WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion): * rendering/RenderFlowThread.h: 2011-09-30 David Barr Implement currentColor support for CSS gradients https://bugs.webkit.org/show_bug.cgi?id=58730 Reviewed by Adam Barth. Allow currentColor as a CSS3 gradient color-stop. Test: fast/css/linear-gradient-currentcolor.html * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::isCacheable): Make currentColor uncacheable since the background image may be invalidated if currentColor is used as a gradient stop and the value of the 'color' property changes. * css/CSSParser.cpp: (WebCore::parseGradientColorOrKeyword): Accept the currentColor keyword. * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::image): Initialize document styleSelector so that currentColor may be computed for a StyleGeneratedImage. 2011-09-30 Gavin Barraclough Remove toStrictThisObject, toThisString, toThisJSString https://bugs.webkit.org/show_bug.cgi?id=69203 Rubber stamped by Sam Weinig These are no longer used. * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: 2011-09-30 Adam Barth Remove ASSERT introduced in http://trac.webkit.org/changeset/96427 which is triggering all over the place. Sorting this out is covered in this bug: https://bugs.webkit.org/show_bug.cgi?id=69200 * rendering/RenderView.cpp: (WebCore::RenderView::layout): 2011-09-30 Sheriff Bot Unreviewed, rolling out r96426. http://trac.webkit.org/changeset/96426 https://bugs.webkit.org/show_bug.cgi?id=69199 Broke a zillion image results on Chromium Skia Mac (Requested by abarth|gardener on #webkit). * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-09-30 Ilya Sherman Fix assertion failure in XSS Auditor https://bugs.webkit.org/show_bug.cgi?id=69050 https://code.google.com/p/chromium/issues/detail?id=97346 Reviewed by Daniel Bates. Test: fast/forms/xss-auditor-doesnt-crash.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::init): Don't try to decode the HTML body if it is empty. 2011-09-30 Maciej Stachowiak Loading page on potterybankids causes reproducible assertion failure in debug builds https://bugs.webkit.org/show_bug.cgi?id=69185 Reviewed by Simon Fraser. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeRepaintRects): Remove assert condition that isn't guaranteed to be true. 2011-09-30 Johnny Ding Support -webkit-tap-highlight-color when enabling touch events support. https://bugs.webkit.org/show_bug.cgi?id=48544 Reviewed by Kenneth Rohde Christiansen. Original code from the iOS WebCore code dump, extracted and modified by tijiang@rim and jnd@chromium. Supports the new CSS property -webkit-tap-highlight-color on platforms which support touch events. Platform can override WebCore::RenderTheme::platformTapHighlightColor to use its own platform specific default tap highlight color. Otherwise RenderTheme::defaultTapHighlightColor will be used as default tap highlight color. Test: fast/events/touch/tap-highlight-color.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::tapHighlightColor): * rendering/RenderTheme.h: (WebCore::RenderTheme::platformTapHighlightColor): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::initialTapHighlightColor): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::tapHighlightColor): (WebCore::InheritedFlags::setTapHighlightColor): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: 2011-09-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69173 RTL/LTR mixtures still not correct in regions. Simplify the loop once I realized it's only your directionality that matters and not your containing block's. Reviewed by Dan Bernstein. Added new test in fast/regions. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): 2011-09-30 Dan Bernstein first-letter in generated before content with display: table is not updated Reviewed by Sam Weinig. Test: fast/css-generated-content/first-letter-in-nested-before.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): Preserve the style type of anonymous containers around the generated content when updating their style. This preserves the first-letter-ness of the inline wrapping the first letter, which allows updateFirstLetter() to identify it later. 2011-09-30 Cary Clark Inset focus ring (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69166 http://code.google.com/p/chromium/issues/detail?id=97956 This focus ring was drawn too large and was left tracks in subsequent invalidations. Make it more closely match the CG version. Reviewed by Stephen White. No new tests. This platform is not enabled. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-09-30 Sheriff Bot Unreviewed, rolling out r96422. http://trac.webkit.org/changeset/96422 https://bugs.webkit.org/show_bug.cgi?id=69170 Broke Windows build and kling wanted to roll it out as well (Requested by rniwa on #webkit). * rendering/InlineBox.cpp: (WebCore::InlineBox::prevOnLineExists): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-09-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69167 [CSS3 Regions] Fix some bugs in the computation of the logical left and width offsets for blocks in variable width regions. Specifically, this patch addresses a minor bug with overflow:hidden/scroll/auto block placement and with RTL directionality. Reviewed by Sam Weinig. Added five new tests in fast/regions. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalRightOffsetForContent): Avoid a double fetch of the border box in a given region by not calling logicalLeftOffsetForContent. No correctness change here. It's just cleaner. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): Change the shifted optimization to be cached for "self" rather than for "containing block". Rework the adjustment loop to handle changes in directionality and to fix correctness issues with RTL. (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): Don't double adjust if an object uses line width as the containing block width. In that case we already computed the line width in the region, so we don't need to apply any additional fixup. (WebCore::RenderBox::renderBoxRegionInfo): * rendering/RenderBoxRegionInfo.h: (WebCore::RenderBoxRegionInfo::RenderBoxRegionInfo): (WebCore::RenderBoxRegionInfo::isShifted): Changed the shifted code to be on self rather than on containing block. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): Refactor the layout code for RenderFlowThread to properly set up region rects assuming right alignment in RTL code. This change forces us to compute our maximum logical width first before looping through the regions again to set their content rects. 2011-09-30 Andreas Kling REGRESSION(r82611) InlineBox has 33 bits of bitset, causing alignment issues and extra memory use. https://bugs.webkit.org/show_bug.cgi?id=64914 Reviewed by Antti Koivisto. Remove InlineBox::prevOnLineExists() and its two accompanying bitfields since nobody is using them anymore. nextOnLineExists() is still used by GTK+ accessibility code. Also added a compile-time assertion to guard against future bloating of the InlineBox class. * rendering/InlineBox.cpp: (WebCore::SameSizeAsInlineBox::~SameSizeAsInlineBox): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-09-30 Pierre Rossi [Qt] Build fix: Qt::escape is deprecated in Qt5 https://bugs.webkit.org/show_bug.cgi?id=69162 Use QString::toHtmlEscaped in the Qt5 case. Reviewed by Andreas Kling. No new tests needed. * WebCore.pro: adjust the include path accordingly in the v8 case. 2011-09-30 Ryosuke Niwa Remove unused ReplaceSelectionCommand::copyStyleToChildren https://bugs.webkit.org/show_bug.cgi?id=69153 Reviewed by Antonio Gomes. Removed the function because it's no called anywhere. * editing/ReplaceSelectionCommand.cpp: * editing/ReplaceSelectionCommand.h: 2011-09-30 Aaron Colwell Fix EnabledAtRuntime support for constants. https://bugs.webkit.org/show_bug.cgi?id=67311 Reviewed by Adam Barth. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): 2011-09-29 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69043 [CSS3 Regions] Blocks split across regions with variable width need to size differently in each region. This patch adds the capability for blocks to have variable width and positioning when split across regions. It is very rudimentary and so far only operates on basic normal flow RenderBlocks. Future patches will expand the support to cover other layout constructs like flexible boxes and tables. Reviewed by Sam Weinig. Added new tests in fast/regions and updated existing results. * WebCore.xcodeproj/project.pbxproj: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): * rendering/HitTestResult.h: (WebCore::HitTestResult::region): (WebCore::HitTestResult::setRegion): The hit test result now holds the active RenderRegion so that hit testing can adjust block widths and positions when hit testing their border boxes. * rendering/PaintInfo.h: (WebCore::PaintInfo::PaintInfo): The paint info struct now holds the active RenderRegion so that painting can adjust block widths and positions when painting borders and backgrounds and shadows. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): If our width ever changes, we invalidate all of our cached RenderBoxRegionInfo in all regions that we span. (WebCore::RenderBlock::clearRenderBoxRegionInfo): Called to clear out our cached region-specific information in all regions that we span. (WebCore::RenderBlock::borderBoxRectInRegionAtPosition): Returns the borderBoxRect for the region at the specified vertical offset. This rect can be both shifted horizontally and have a different width from our original border rect. (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::logicalRightOffsetForContent): Modified to call borderBoxRectInRegionAtPosition so that lines will fit inside the content rect of the border box rect for the specific region. * rendering/RenderBlock.h: (WebCore::RenderBlock::logicalRightOffsetForContent): Modified to call logicalLeftOffsetForContent since it's cleaner. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): Called to compute the border box rect in a specific region. The result is cached in a HashMap in the region itself so that subsequent lookups are fast. (WebCore::RenderBox::nodeAtPoint): Modified to use the border box rect in the active region when hit testing the backgrounds of boxes. (WebCore::RenderBox::paintBoxDecorations): Modified to use the border box rect in the active region when painting the backgrounds of boxes. (WebCore::RenderBox::containingBlockLogicalWidthForContent): (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalWidthInRegion): Helpers for computing logical widths and margins in a specific region. The result is then cached in a HashMap in the region. (WebCore::RenderBox::renderBoxRegionInfo): The function for obtaining the region-specific information for a given box. * rendering/RenderBox.h: (WebCore::RenderBox::borderBoxRectInRegion): New function for returning the border box rect in a given region. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Make sure mask painting honors the active region. * rendering/RenderBoxRegionInfo.h: Added. (WebCore::RenderBoxRegionInfo::RenderBoxRegionInfo): (WebCore::RenderBoxRegionInfo::logicalLeft): (WebCore::RenderBoxRegionInfo::logicalWidth): (WebCore::RenderBoxRegionInfo::containingBlockChainIsShifted): New class held by RenderRegions that caches box-specific info for a given region. This will eventually expand to include custom styles as well, but for now it is limited to a new logical left and a new logical width, along with a bit for optimizing accumulated shifting when painting/hit testing to avoid too much groveling up the containing block chain. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): Removed the region fitting optimization, since eventually everyone is going to care, and there's no reason to limit it with the results now being cached. (WebCore::RenderFlowThread::layout): All box-specific region information is always cleared whenever the regions are invalidated. (WebCore::RenderFlowThread::computeLogicalWidth): Modified to set up RenderBoxRegionInfo for the flow thread in all regions. (WebCore::RenderFlowThread::paintIntoRegion): (WebCore::RenderFlowThread::hitTestRegion): Modified to take the region instead of the region's rectangle so that painting and hit testing of the flow thread layer tree can properly receive the active region. (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Helper for removing a box's information from all regions. For now it grovels through every region, so eventually we may want to have a cache of the start/end regions for a given box somewhere. * rendering/RenderFlowThread.h: Removal of the region fitting stuff. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::paintOverlayScrollbars): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintList): (WebCore::RenderLayer::paintPaginatedChildLayer): (WebCore::RenderLayer::paintChildLayerIntoColumns): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): Modified to pass the current region down through painting functions so that it is known at paint time. * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): Added a new bit to RenderObjects, inRenderFlowThread(), so that it is quick to determine whether or not an object needs flow thread special casing. (WebCore::RenderObject::enclosingRenderFlowThread): Modified enclosingRenderFlowThread to be able to quickly return 0 if the object is not in a flow thread. (WebCore::RenderObject::containerForRepaint): Same. * rendering/RenderObject.h: (WebCore::RenderObject::setParent): setParent now updates inRenderFlowThread() state. (WebCore::RenderObject::inRenderFlowThread): (WebCore::RenderObject::setInRenderFlowThread): Adding the new bit. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): Make sure when an object is removed from a RenderFlowThread that it deletes its box-specific information in all regions. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::~RenderRegion): (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::nodeAtPoint): (WebCore::RenderRegion::renderBoxRegionInfo): (WebCore::RenderRegion::setRenderBoxRegionInfo): (WebCore::RenderRegion::removeRenderBoxRegionInfo): (WebCore::RenderRegion::deleteAllRenderBoxRegionInfo): (WebCore::RenderRegion::matchesRenderFlowThreadLogicalWidth): * rendering/RenderRegion.h: Added the new HashMap for holding box-specific region information. Also added an additional optimization to check if a specific region matches the overall width of the RenderFlowThread. If it does, we don't need to cache box-specific information for that region. * rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer): Modified the PaintInfo construction to include the region argument. It's not optional so that callers will have to consider it (since masks illustrated this is necessary). 2011-09-30 Tim Horton feBlend uses a table of function pointers which reduces inlineability inside the main loop https://bugs.webkit.org/show_bug.cgi?id=69154 Reviewed by Darin Adler. Don't use a table of function pointers inside the feBlend inner loop, instead use switch and inline functions, bringing a 20% performance gain across the board to feBlend. No new tests, minor performance improvement. * platform/graphics/filters/FEBlend.cpp: (WebCore::normal): (WebCore::multiply): (WebCore::screen): (WebCore::darken): (WebCore::lighten): (WebCore::FEBlend::apply): 2011-09-30 Mark Hahnenberg Add getCallData to MethodTable in ClassInfo https://bugs.webkit.org/show_bug.cgi?id=69024 Reviewed by Sam Weinig. No new tests. * WebCore.exp.in: Changed getCallData from private to protected to allow subclasses who don't override getCallData themselves to reference it in their own method tables when calling the CREATE_METHOD_TABLE macro. * bridge/runtime_method.h: 2011-09-30 Ned Holbrook Complex spaces with synthetic bold are too wide https://bugs.webkit.org/show_bug.cgi?id=69033 Reviewed by Dan Bernstein. Test: fast/text/complex-synthetic-bold-space-width.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Subtract synthetic bold offset from spaceWidth. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): Ditto. 2011-09-30 Pavel Feldman Web Inspector: [chromium] expose inspector protocol version to the embedder. https://bugs.webkit.org/show_bug.cgi?id=69092 This change also introduces major/minor inspector version components. Reviewed by Yury Semikhatsky. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * inspector/Inspector-0.1.json: Renamed from Source/WebCore/inspector/Inspector.draft-01.json. * inspector/Inspector.json: * inspector/generate-inspector-protocol-version: Renamed from Source/WebCore/inspector/validate-protocol-compatibility. 2011-09-29 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=69106 Universal attribute selectors disable style sharing Reviewed by Dave Hyatt. Selectors of type [foo="bar"] ended up marking every element style with the affectedByAttributeSelectors bit rendering style sharing inoperative. This happens on http://www.whatwg.org/specs/web-apps/current-work/ for example. Instead we now mark style with affectedByUncommonAttributeSelectors bit only if an attribute selector actually matches the element. Before sharing, we also check the current element against collected attribute rules. We can share the style if neither element was affected. This speeds up style matching and applying ~15% on full HTML5 spec (=~0.7s). Sharing percentage goes from 0% to ~30%. Increased sharing should also save a substantial amount of memory. * css/CSSSelector.h: (WebCore::CSSSelector::isAttributeSelector): * css/CSSStyleSelector.cpp: (WebCore::RuleData::containsUncommonAttributeSelector): (WebCore::collectSpecialRulesInDefaultStyle): (WebCore::assertNoSiblingRulesInDefaultStyle): (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchesRuleSet): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::locateSharedStyle): (WebCore::CSSStyleSelector::styleForElement): (WebCore::selectorListContainsUncommonAttributeSelector): (WebCore::isCommonAttributeSelectorAttribute): (WebCore::containsUncommonAttributeSelector): (WebCore::RuleData::RuleData): (WebCore::collectFeaturesFromSelector): (WebCore::collectFeaturesFromList): * css/CSSStyleSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::affectedByUncommonAttributeSelectors): (WebCore::InheritedFlags::setAffectedByUncommonAttributeSelectors): 2011-09-30 James Robinson [chromium] Add WebKit API for sending input events to the compositor thread https://bugs.webkit.org/show_bug.cgi?id=69117 Reviewed by Darin Fisher. Convert to using an externally-provided thread instead of one managed by CCThreadProxy internally. Most changes in these files are mechanically changing references from ccThread to s_ccThread to reflect the class-static nature of this pointer, the rest are removing the old thread creation codepath. These changes are covered by the CC* unit tests and by the gpu layout tests when run with the use_threaded_compositing=1 gyp define. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setThread): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::finishAllRendering): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitAndRedraw): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::start): (WebCore::CCThreadProxy::stop): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::scheduleDrawTaskOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-29 Fady Samuel Fixed Hit testing on Framesets when Frameset is transformed https://bugs.webkit.org/show_bug.cgi?id=67740 Reviewed by Simon Fraser. Tests: fast/frames/frame-set-rotation-hit.html fast/frames/frame-set-scaling-hit.html * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize): 2011-09-29 Dirk Pranke fix gyp warnings in chromium for renamed files https://bugs.webkit.org/show_bug.cgi?id=69116 Reviewed by Adam Barth. * WebCore.gypi: 2011-09-29 Martin Robinson [Freetype] Some text in Planet GNOME renders in the wrong place https://bugs.webkit.org/show_bug.cgi?id=69099 Reviewed by Dirk Schulze. Test: platform/gtk/fonts/synthetic-oblique-positioning.html Fold the oblique transform into the font matrix itself rather than transforming the CTM of the context at render time. Not only does this fix the issue, it prevents unnecessary work on every paint. * platform/graphics/cairo/FontCairo.cpp: No longer set the synthetic oblique transformation matrix on the context when rendering the text. Instead it is now folded into the TM of the font itself. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::initializeWithFontFace): Fold the oblique transform into the scaled font. * platform/graphics/win/FontPlatformDataCairoWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Ditto. 2011-09-29 Dan Bernstein Follow-up fix for Glyph variants (line final swashes) appear where they should not Reviewed by Simon Fraser. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): Check for Hoefler Text Black Italic as well. 2011-09-29 Cary Clark Enable LCD text in Skia on Mac https://bugs.webkit.org/show_bug.cgi?id=68734 Reviewed by Stephen White. No new tests. Existing layout tests are generated with LCD text disabled for pixel comparisons. Duplicate the logic in FontMac.mm to pass settings for antialiasing and smoothing. Also disable smoothing for DumpRenderTree. * platform/graphics/skia/FontSkia.cpp: (WebCore::setupPaint): (WebCore::Font::drawGlyphs): 2011-09-29 Varun Jain Implement flick gesture in Chromium Gesture Recognizer https://bugs.webkit.org/show_bug.cgi?id=67930 Reviewed by Dimitri Glazkov. Test: Source/WebKit/chromium/tests/InnerGestureRecognizerTest.cpp * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::GestureRecognizerChromium::isOverMinFlickSpeed): (WebCore::GestureRecognizerChromium::appendScrollGestureEnd): (WebCore::GestureRecognizerChromium::updateValues): (WebCore::GestureRecognizerChromium::scrollEnd): * platform/chromium/GestureRecognizerChromium.h: 2011-09-29 Noel Gordon [chromium] canvas.toDataURL("image/jpeg"): use libjpeg-turbo data swizzle https://bugs.webkit.org/show_bug.cgi?id=67402 Reviewed by Kenneth Russell. libjpeg-turbo can read directly from the input data for the premultiplied BRGX (SkBitmap) encoding case. No change in behavior, covered by existing canvas 2d/3d tests canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::encodePixels): If JCS_EXTENSIONS is defined (libjpeg-turbo), swizzle the input BRGX pixels directly within libjpeg-turbo. 2011-09-29 Adam Barth Fixenate the build. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-29 Ryosuke Niwa Remove direct reads to m_firstNodeInserted and m_lastLeafInserted in ReplaceSelectionCommand https://bugs.webkit.org/show_bug.cgi?id=69023 Reviewed by Enrica Casucci. Converted to removeUnrenderedTextNodesAtEnds to use InsertedNodes instead of m_firstNodeInserted and m_lastLeafInserted. Extracted the logic to update nodes as InsertedNodes::willRemoveNode (old one was renamed to InsertedNodes::willRemoveNodePreservingChildren). Also extracted shouldPerformSmartReplace and addSpacesForSmartReplace out of doApply, and rewrote the logic to obtain endNode and startNode using startOfInsertedContent and endOfInsertedContent instead of m_firstNodeInserted and m_lastLeafInserted. Finally, replaced the nullity checks of m_firstNodeInserted and m_lastLeafInserted in completeHTMLReplacement by nullity checks of start and end positions. * dom/Node.cpp: (WebCore::Node::traversePreviousSibling): Added. * dom/Node.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren): Renamed from willRemoveNode. (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode): Extracted from removeUnrenderedTextNodesAtEnds. (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Made const. (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Made const. (WebCore::ReplaceSelectionCommand::handleStyleSpans): Takes firstNodeInserted instead of directly accessing m_firstNodeInserted. (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace): (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): * editing/ReplaceSelectionCommand.h: 2011-09-29 Andreas Kling Shrink HTMLAnchorElement on 32-bit. https://bugs.webkit.org/show_bug.cgi?id=69094 Reviewed by Antti Koivisto. * html/HTMLAnchorElement.h: Pack members into a bitfield. 2011-09-29 Dan Bernstein Glyph variants (line final swashes) appear where they should not Reviewed by Simon Fraser. Test: fast/text/line-initial-and-final-swashes.html Hoefler Text Italic enables line-initial and -final swashes by default, so disable them. This change targets only this known-bad font rather than all fonts, because at least one font (Khmer MN) incorrectly claims to have the line-initial feature enabled, but disabling it actually does something different and bad (breaking some combining marks). * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::createFeatureSettingDictionary): Added this helper function. (WebCore::cascadeToLastResortFontDescriptor): Deployed WTF_ARRAY_LENGTH(). (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Added. Returns a font descriptor that, in addition to having a cascade list consisting of the last resort font, also has feature settings to disable line-initial and line-final swashes. (WebCore::FontPlatformData::ctFont): For Hoefler Text Italic, use cascadeToLastResortAndDisableSwashesFontDescriptor(). 2011-09-29 Mark Hahnenberg Unreviewed: resetting baseline for code generator bindings Unreviewed build fix No new tests. * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: 2011-09-29 Nate Chapin [V8, chromium] More logging to determine cause of a null v8::Context in V8DOMWindowShell::namedItemAdded(). https://bugs.webkit.org/show_bug.cgi?id=68099 Reviewed by Adam Barth. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-29 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=69040 ScrollbarThemeComposite requires a ScrollView to draw scroll corner Reviewed by Simon Fraser. No new tests. This will be needed later. * platform/ScrollbarThemeComposite.cpp: (WebCore::pageForScrollView): (WebCore::ScrollbarThemeComposite::paintScrollCorner): Use pageForScrollView() function which already existed in this file, used in another similar location. * platform/chromium/FramelessScrollView.cpp: * platform/chromium/FramelessScrollView.h: * platform/gtk/ScrollbarThemeGtk.cpp: * platform/gtk/ScrollbarThemeGtk.h: * platform/wx/ScrollbarThemeWx.cpp: * platform/wx/ScrollbarThemeWx.h: All these overrides are no longer needed, ScrollbarThemeComposite will do the right thing. * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paintScrollCorner): Removed a special case for updatingControlTints phase. The same case is present in cross-platform code now, and Qt doesn't have any custom subclasses of ScrollableArea or ScrollView to need special handling. This was added in r37377 without a bug or much ChangeLog explanation. 2011-09-29 Mark Hahnenberg De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods https://bugs.webkit.org/show_bug.cgi?id=68839 Reviewed by Geoffrey Garen. No new tests. Removed the remaining visitChildrenVirtual methods. This patch completes the process of de-virtualizing visitChildren. * WebCore.exp.in: * bindings/js/JSAttrCustom.cpp: * bindings/js/JSAudioContextCustom.cpp: * bindings/js/JSCSSRuleCustom.cpp: * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSCanvasRenderingContextCustom.cpp: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: * bindings/js/JSJavaScriptAudioNodeCustom.cpp: * bindings/js/JSMessageChannelCustom.cpp: * bindings/js/JSMessagePortCustom.cpp: * bindings/js/JSNamedNodeMapCustom.cpp: * bindings/js/JSNodeCustom.cpp: * bindings/js/JSNodeFilterCustom.cpp: * bindings/js/JSNodeIteratorCustom.cpp: * bindings/js/JSSVGElementInstanceCustom.cpp: * bindings/js/JSSharedWorkerCustom.cpp: * bindings/js/JSStyleSheetCustom.cpp: * bindings/js/JSTreeWalkerCustom.cpp: * bindings/js/JSWebGLRenderingContextCustom.cpp: * bindings/js/JSWorkerContextCustom.cpp: * bindings/js/JSXMLHttpRequestCustom.cpp: * bindings/js/JSXPathResultCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/qt/qt_instance.cpp: * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-09-23 Tor Arne Vestbø [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi QWidget and friends now live in the QtWidgets library. We update includes in implementation files and private headers to us the non-module-prefixed path, and leave the lookup for the include path. For public headers we have to ifdef the includes as the user might now have the modules we need in his QT config. Finally, QSGCanvas is no longer a QWidget but a QWindow, so we have to update our code and use windowHandle() for setting the parent relationships. https://bugs.webkit.org/show_bug.cgi?id=68687 Reviewed by Andreas Kling. * WebCore.pri: * platform/graphics/qt/GraphicsLayerQt.cpp: 2011-09-29 Sheriff Bot Unreviewed, rolling out r96340. http://trac.webkit.org/changeset/96340 https://bugs.webkit.org/show_bug.cgi?id=69098 Caused 10 tests to crash in Debug (Requested by abarth|gardener on #webkit). * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::childrenChanged): * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::childrenChanged): * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): 2011-09-29 Andreas Kling Shrink FontFallbackList. https://bugs.webkit.org/show_bug.cgi?id=69093 Reviewed by Antti Koivisto. Reduce the size of FontFallbackList by one CPU word, decreasing memory consumption by 300 kB (on 64-bit) when loading the full HTML5 spec. * platform/graphics/FontCache.h: * platform/graphics/FontCache.cpp: (WebCore::FontCache::generation): Store the FontCache generation as an ushort rather than uint. * platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): * platform/graphics/FontFallbackList.h: Pack enum and bool members in a bitfield. 2011-09-29 Adam Barth We should ignore the return value of GetRealNamedProperty https://bugs.webkit.org/show_bug.cgi?id=68840 Reviewed by Nate Chapin. Instead of skipping the lookup process by using the result of real named property, we should just indiciate that it wasn't handled by the interceptor. Test: http/tests/security/window-named-valueOf.html * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedPropertyGetter): 2011-09-29 Chris Fleizach ARIA live regions don't trigger notifications for elements that aren't in the AX tree https://bugs.webkit.org/show_bug.cgi?id=62289 If an ARIA Live region udpates an element that is not in the AX object cache, then the Live region notification is not sent. To fix this, the childrenChanged() method needs to actually create the appropriate objects, but since that method gets called during a render tree update, we've learned that it's generally not safe to create objects. Instead a one shot timer can be fired that will update and create the necessary objects so that the correct notification can be sent. Reviewed by Darin Adler. Test: platform/mac/accessibility/aria-liveregion-without-element-access.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenUpdateTimerFired): (WebCore::AXObjectCache::childrenChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::childrenChanged): * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::childrenChanged): * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): 2011-09-29 Martin Robinson [GTK] Dragging a selection does not produce a drag image https://bugs.webkit.org/show_bug.cgi?id=69064 Reviewed by Andreas Kling. Moved Chromium's generic implementation of Frame::nodeImage and Frame::dragImageForSeletion to Frame.cpp and simply excluded via #ifdefs platforms that do not have their own implementation. Removed all empty implementations of these functions and Qt's which was functionally identical. No new tests. Drag-and-drop drag image functionality changes are incredibly difficult to test in a non-manual way. * CMakeListsEfl.txt: Delist FrameEfl.cpp. * GNUmakefile.list.am: Delist FrameGtk.cpp. * WebCore.gypi: Delist removed Frame*.cpp. * WebCore.pro: Delist FrameQt.cpp. * page/Frame.cpp: Moved FrameChromium implementation here. (WebCore::ScopedFramePaintingState::ScopedFramePaintingState): (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState): (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * page/chromium/FrameChromium.cpp: Removed. * page/efl/FrameEfl.cpp: Removed. * page/gtk/FrameGtk.cpp: Removed. * page/qt/FrameQt.cpp: Removed. * page/wx/FrameWx.cpp: Removed. * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::createDragImage): Call nodeImage to get the drag image for a node. 2011-09-29 Noel Gordon [chromium skia] PNGImageEncoder: hoist constants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=68988 Reviewed by Kenneth Russell. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.png.*.html fast/canvas/toDataURL-alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/PNGImageEncoder.cpp: (WebCore::encodePixels): Move constant out of the encoding loop. (WebCore::PNGImageEncoder::encode): Consistency & style: call encodePixels() just like we do in the JPEG encoder. 2011-09-29 Iain Merrick Add unit test for CCLayerSorter https://bugs.webkit.org/show_bug.cgi?id=68622 Minor refactoring for testability: - Made pointInTriangle public. - Added LayerShape to decouple LayerIntersector and GraphNode. - Added a public wrapper function for LayerIntersector. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::pointInTriangle): (WebCore::CCLayerSorter::calculateZDiff): (WebCore::CCLayerSorter::LayerIntersector::LayerIntersector): (WebCore::CCLayerSorter::LayerIntersector::go): (WebCore::CCLayerSorter::LayerIntersector::checkZDiff): (WebCore::CCLayerSorter::LayerIntersector::layerZFromProjectedPoint): (WebCore::CCLayerSorter::checkOverlap): (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::createGraphNodes): * platform/graphics/chromium/cc/CCLayerSorter.h: (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::GraphNode::GraphNode): 2011-09-29 Ilya Tikhonovsky Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh. https://bugs.webkit.org/show_bug.cgi?id=69087 The fix has the changes for the test and minor perf framework improvements. Reviewed by Yury Semikhatsky. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh): 2011-09-29 Vsevolod Vlasov Web Inspector: Make search-in-resource test simpler. https://bugs.webkit.org/show_bug.cgi?id=69025 Changed search-in-resource test. Removed error parameter from content provider's searchInContent callback. Reviewed by Pavel Feldman. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.searchInContent): 2011-09-29 Hans Wennborg IndexedDB: Use LevelDB also for in-memory databases https://bugs.webkit.org/show_bug.cgi?id=68903 Reviewed by Steve Block. Add LevelDBDatabase::openInMemory() which uses leveldb::NewMemEnv() to create in-memory LevelDB databases. Use this in IDBLeveLDBBackingStore::open() when the caller passes in an empty file path. This happens in Chromium's incognito mode, and when running layout tests. Fix IDBSQLiteBackingStore::backingStoreExists() so it doesn't create files when passed in an empty file path, but uses the in-memory mode instead. Existing layout tests will all be run in-memory. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::~LevelDBDatabase): (WebCore::openDB): (WebCore::LevelDBDatabase::open): (WebCore::LevelDBDatabase::openInMemory): * platform/leveldb/LevelDBDatabase.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::open): * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::backingStoreExists): 2011-09-29 Ilya Tikhonovsky Web Inspector: speed-up Network panel. Change _staleResources type from array to object. https://bugs.webkit.org/show_bug.cgi?id=69081 There is a test with 30 requests. For the each stage of loading a resource we have an entry in _staleResources array. There are at least 4 stages per request. NetworkLogView._refresh function is creating/updating the resource row for the each such entry. This array can be replaced with a hash map just because the resource associated with the entry is the same for all the entries with the same request id. Reviewed by Pavel Feldman. Test: inspector/performance/resources/network-append-30-requests.html * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._invalidateAllItems): (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkLogView.prototype._refreshResource): 2011-09-28 Pavel Feldman Web Inspector: make inspector protocol validation a part of the build process. https://bugs.webkit.org/show_bug.cgi?id=68999 Since we'd like to commit to inspector protocol backwards compatibility, violating it should be a build failure. Reviewed by Yury Semikhatsky. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * inspector/Inspector.draft-01.json: * inspector/Inspector.json: * inspector/generate-inspector-idl: * inspector/generate-protocol-externs: * inspector/validate-protocol-compatibility: 2011-09-27 Pavel Feldman Web Inspector: Scripts panel without folders causes errors when creating content scripts section. https://bugs.webkit.org/show_bug.cgi?id=68827 Reviewed by Yury Semikhatsky. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): 2011-09-28 Andrey Kosyakov Web Inspector: network log view refresh optimizations https://bugs.webkit.org/show_bug.cgi?id=69010 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.refresh): 2011-09-29 Pavel Podivilov Web Inspector: split SourceFile.js into RawSourceCode.js and UISourceCodeContentProviders.js. https://bugs.webkit.org/show_bug.cgi?id=69068 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/RawSourceCode.js: Renamed from Source/WebCore/inspector/front-end/SourceFile.js. (WebInspector.RawSourceCode): Moved from SourceFile.js. (WebInspector.UILocation): Moved from SourceFile.js. * inspector/front-end/UISourceCodeContentProviders.js: Added. Moved ContentProvider implementations from SourceFile.js (WebInspector.ScriptContentProvider): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent.appendChunk): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): (WebInspector.ResourceContentProvider): (WebInspector.ResourceContentProvider.prototype.requestContent): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-29 Philippe Normand [GStreamer] 2 flaky media tests https://bugs.webkit.org/show_bug.cgi?id=67407 Reviewed by Martin Robinson. Workaround for GStreamer bug#639941. In GStreamer 0.10.35 basesink reports wrong duration in case of EOS and negative playback rate. This workaround fixes two media tests, media/video-timeupdate-reverse-play.html and media/video-reverse-play-duration.html. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): (WebCore::MediaPlayerPrivateGStreamer::currentTime): (WebCore::MediaPlayerPrivateGStreamer::didEnd): 2011-09-29 Philippe Normand [GStreamer] fullscreen video pause/play fails https://bugs.webkit.org/show_bug.cgi?id=66936 Reviewed by Martin Robinson. Don't use the identity element to avoid painting of the in-window video. Instead simply make the sink aware of the fullscreen state and ignore buffers if fullscreen and autovideosink are active. Also fixed two deadlocks happening when a paused pipeline is switched to fullscreen and when fullscreen is disabled for a paused pipeline. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::enterFullscreen): (WebCore::GStreamerGWorld::exitFullscreen): * platform/graphics/gstreamer/GStreamerGWorld.h: (WebCore::GStreamerGWorld::isFullscreen): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkit_video_sink_render): (webkit_video_sink_new): * platform/graphics/gstreamer/VideoSinkGStreamer.h: 2011-09-29 Tim Horton REGRESSION(87010): elements in ECMA-cloud neither filled nor blurred https://bugs.webkit.org/show_bug.cgi?id=68679 Reviewed by Nikolas Zimmermann. Strip prefixes from SVG attributes before testing if they're supported. Namespaced attributes will be matched using their namespace instead of the (user-choosable) prefix. Test: svg/custom/xlink-custom-namespace.svg * svg/SVGAElement.cpp: (WebCore::SVGAElement::isSupportedAttribute): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::isSupportedAttribute): * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::isSupportedAttribute): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isSupportedAttribute): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::isSupportedAttribute): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::isSupportedAttribute): * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::isSupportedAttribute): * svg/SVGElement.h: (WebCore::SVGAttributeHashTranslator::hash): (WebCore::SVGAttributeHashTranslator::equal): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::isSupportedAttribute): * svg/SVGExternalResourcesRequired.h: * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::isSupportedAttribute): * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::isSupportedAttribute): * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): * svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::isSupportedAttribute): * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::isSupportedAttribute): * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::isSupportedAttribute): * svg/SVGFEMergeNodeElement.cpp: (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::isSupportedAttribute): * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::isSupportedAttribute): * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::isSupportedAttribute): * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::isSupportedAttribute): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::isSupportedAttribute): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::isSupportedAttribute): * svg/SVGGElement.cpp: (WebCore::SVGGElement::isSupportedAttribute): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::isSupportedAttribute): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::isSupportedAttribute): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::isSupportedAttribute): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::isSupportedAttribute): * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::isSupportedAttribute): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::isSupportedAttribute): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::isSupportedAttribute): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::isSupportedAttribute): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::isSupportedAttribute): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::isSupportedAttribute): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::isSupportedAttribute): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::isSupportedAttribute): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::isSupportedAttribute): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::isSupportedAttribute): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::isSupportedAttribute): * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::isSupportedAttribute): * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::isSupportedAttribute): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::isSupportedAttribute): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::isSupportedAttribute): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::isSupportedAttribute): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::isSupportedAttribute): * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::isSupportedAttribute): * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::addSupportedAttributes): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::isSupportedAttribute): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::isSupportedAttribute): 2011-09-28 Kentaro Hara "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&" https://bugs.webkit.org/show_bug.cgi?id=68984 Reviewed by Darin Adler. Just a follow-up fix for the bug 68345. For performance, "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&". Tests: fast/events/constructors/pop-state-event-constructor.html fast/events/fire-popstate-event.html * dom/PopStateEvent.cpp: (WebCore::PopStateEvent::PopStateEvent): (WebCore::PopStateEvent::create): (WebCore::PopStateEvent::initPopStateEvent): * dom/PopStateEvent.h: 2011-09-28 Martin Robinson [GTK] Move drag-and-drop code which can be shared with WebKit2 to WebCore https://bugs.webkit.org/show_bug.cgi?id=66890 Added a GtkDragAndDropHelper class to hold all the logic that is common between WebKit1 and WebKit2. This will allow greater code sharing between the two ports. Reviewed by Philippe Normand. No new tests. This patch should not change behavior. * GNUmakefile.list.am: Added the GtkDragAndDropHelper to the sources list. * platform/gtk/GtkDragAndDropHelper.cpp: Added. * platform/gtk/GtkDragAndDropHelper.h: Added. 2011-09-28 Dan Bernstein first-letter after list marker not updated correctly Reviewed by Simon Fraser. Test: fast/dynamic/first-letter-after-list-marker.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): Improved the logic for continuing past list markers when trying to locate a first letter to update. 2011-09-28 Kent Tamura REGRESSION(r93858): Can't type anything into input elements when maxlength is greater than 2^31 https://bugs.webkit.org/show_bug.cgi?id=68981 Reviewed by Darin Adler. * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTMLInteger): Check the failure of charactersToIntStrict(). (WebCore::parseHTMLNonNegativeInteger): Check the failure of charactersToUIntStrict(). 2011-09-28 Antoine Labour Remove unused createRootLayerPainter from CCLayerTreeHostClient https://bugs.webkit.org/show_bug.cgi?id=69042 Reviewed by James Robinson. No new test needed: no semantic change. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-09-28 Luke Macpherson Only resolve direction aware properties when properties are direction aware. https://bugs.webkit.org/show_bug.cgi?id=68968 Reviewed by Eric Seidel. No new tests / no functionality changed. Profiling showed a ~8% improvement in applyProperty by not calling resolveDirectionAwareProperty for every property. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-28 Simon Fraser fast/dom/scroll-element-to-rect.html fails on WK1 Mac port https://bugs.webkit.org/show_bug.cgi?id=68815 Reviewed by Dan Bernstein. FrameView::scrollElementToRect() was incorrectly using Element::boundsInWindowSpace(), which is window-relative (not web view-relative), and has flipped coordinates in WebKit1. Change to use Node::getRect() which is what the author intended. * dom/Element.h: * page/FrameView.cpp: (WebCore::FrameView::scrollElementToRect): 2011-09-28 Peter Beverloo Don't clamp cubic-bezier timing functions between 0 and 1 https://bugs.webkit.org/show_bug.cgi?id=45761 Remove the limitation of clamping the cubic-bezier timing function values between 0 and 1, following the specification change made on April 5 of this year. Reviewed by Dean Jackson. Tests: transitions/cubic-bezier-overflow-color.html transitions/cubic-bezier-overflow-length.html transitions/cubic-bezier-overflow-shadow.html transitions/cubic-bezier-overflow-svg-length.html transitions/cubic-bezier-overflow-transform.html * css/CSSParser.cpp: (WebCore::CSSParser::parseCubicBezierTimingFunctionValue): 2011-09-28 Chris Rogers DelayNode must set the context on delayTime AudioParam to support automation https://bugs.webkit.org/show_bug.cgi?id=68828 Reviewed by Kenneth Russell. Test: webaudio/delaynode-scheduling.html * webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): 2011-09-28 Sergey Glazunov JavaScript generated documents don't inherit the cookie URL https://bugs.webkit.org/show_bug.cgi?id=69003 Reviewed by Adam Barth. Test: http/tests/security/cookies/cookie-theft-with-javascript-doc.html * dom/Document.h: (WebCore::Document::setCookieURL): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::replaceDocument): (WebCore::DocumentWriter::begin): * loader/DocumentWriter.h: 2011-09-27 Dimitri Glazkov REGRESSION(r95573): Crash when loading SVG documents in a flattened frame or any SVG document in Chromium/Mac. https://bugs.webkit.org/show_bug.cgi?id=68938 Reviewed by David Hyatt. Test: all svg tests in LayoutTests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): Added a null-check for containingBlock. 2011-09-28 Una Sabovic Setting innerText to an empty string on editable div loses focus https://bugs.webkit.org/show_bug.cgi?id=62092 Reviewed by Ryosuke Niwa. When selection start or end node is being deleted do not clear the selection. Instead update the start/end position to an equivalent parent-anchored positions. When text is inserted/deleted update selection per range modification spec: http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Mutation Tests: editing/selection/document-mutation.html editing/selection/editable-div-clear-on-keydown.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::respondToNodeModification): (WebCore::updatePositionAfterAdoptingTextReplacement): (WebCore::FrameSelection::textWillBeReplaced): * editing/htmlediting.cpp: (WebCore::updatePositionForNodeRemoval): 2011-09-28 Joseph Pecoraro FTPDirectoryDocument Shows Garbled String for Last Modified Date https://bugs.webkit.org/show_bug.cgi?id=69011 Reviewed by Dan Bernstein. Force WTF::String concatenation instead of an accidental char* pointer addition. * html/FTPDirectoryDocument.cpp: (WebCore::processFileDateString): 2011-09-28 Nate Chapin Fix a regression in r96060. ResourceLoader shouldn't get initialized with a null DocumentLoader. https://bugs.webkit.org/show_bug.cgi?id=69004 Reviewed by Csaba Osztrogonác. This should fix a debug crash in some platforms in plugins/js-from-destroy.html * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): Move the activeDocumentLoader() null checks back to SubresouceLoader::create(). * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): 2011-09-28 Adam Barth CSP doesn't work for a wide variety of cases https://bugs.webkit.org/show_bug.cgi?id=68921 Reviewed by Darin Adler. Patch suggested by Sam Weinig. It's unclear to me how to test this change because all our tests run on non-default ports, which is why we have this bug in the first place. Mozilla uses a proxy while testing so they can test with URLs like http://example.com, but we don't have such a facility. * page/ContentSecurityPolicy.cpp: (WebCore::CSPSource::portMatches): 2011-09-28 Fady Samuel [Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules https://bugs.webkit.org/show_bug.cgi?id=68936 Reviewed by Tony Chang. Chromium need to be built without Gtk for future version of ChromiumOS. * WebCore.gyp/WebCore.gyp: 2011-09-28 Tom Sepez Revert change which broke displaying end script tags in view-source, instead deal with any trailing tag included by mistake in the XSSAuditor itself. Correct tests to detect the missing close tags. https://bugs.webkit.org/show_bug.cgi?id=68898 Reviewed by Adam Barth. * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::end): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::nextToken): * html/parser/XSSAuditor.cpp: (WebCore::startsHTMLEndTagAt): (WebCore::XSSAuditor::snippetForJavaScript): 2011-09-28 Adam Barth Remove empty directories. * editing/brew: Removed. * page/brew: Removed. * platform/brew: Removed. * platform/graphics/brew: Removed. * platform/network/brew: Removed. * platform/text/brew: Removed. 2011-09-28 Ilya Tikhonovsky Web Inspector: optional arguments support for the frontend needs to be extended. https://bugs.webkit.org/show_bug.cgi?id=69005 Generator supports optional arguments but they are transferred by value. It is not suitable if the used type doesn't have operator bool. I'll transfer such arguments by pointer. Reviewed by Pavel Feldman. Build is the test. * inspector/CodeGeneratorInspector.pm: (generateFrontendFunction): (paramTypeTraits): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didFailLoading): 2011-09-28 Antaryami Pandia Reflected attribute input.size wraps on negative values (Chrome), or returns them (Safari). https://bugs.webkit.org/show_bug.cgi?id=44886 Reviewed by Darin Adler. Test: fast/dom/HTMLInputElement/input-size-attribute.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): 2011-09-28 Vsevolod Vlasov Web Inspector: Add support for search in single resource to page agent. https://bugs.webkit.org/show_bug.cgi?id=68998 Reviewed by Pavel Feldman. Test: http/tests/inspector/search/search-in-resource.html * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines): * inspector/ContentSearchUtils.h: * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::buildObjectForSearchMatch): (WebCore::InspectorPageAgent::searchInResource): * inspector/InspectorPageAgent.h: * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.searchInContent): * inspector/front-end/SourceFile.js: (WebInspector.ResourceContentProvider.prototype.requestContent): (WebInspector.ResourceContentProvider.prototype.searchInContent): * inspector/front-end/UISourceCode.js: (WebInspector.ContentProvider.prototype.requestContent): (WebInspector.ContentProvider.prototype.searchInContent): 2011-09-28 Ilya Tikhonovsky Web Inspector: It'd be useful to have performance stats for the back-end to front-end communication channel. https://bugs.webkit.org/show_bug.cgi?id=69002 Reviewed by Yury Semikhatsky. * inspector/CodeGeneratorInspector.pm: 2011-09-27 Pavel Podivilov Web Inspector: live edit cursor always appears at the beginning of the file. https://bugs.webkit.org/show_bug.cgi?id=68900 Reviewed by Pavel Feldman. * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing): 2011-09-28 Vsevolod Vlasov Web Inspector: Refactor searching in inspector, add test (fixed non regex search). https://bugs.webkit.org/show_bug.cgi?id=68930 Reviewed by Yury Semikhatsky. Search moved out from page agent. Fixed search for non regex case which is not yet used. Test: http/tests/inspector/search/search-in-resources.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/ContentSearchUtils.cpp: Added. (WebCore::ContentSearchUtils::createSearchRegexSource): (WebCore::ContentSearchUtils::createSearchRegex): (WebCore::ContentSearchUtils::countRegularExpressionMatches): * inspector/ContentSearchUtils.h: Added. * inspector/InspectorPageAgent.cpp: (WebCore::hasTextContent): (WebCore::InspectorPageAgent::cachedResourceContent): (WebCore::textContentForCachedResource): (WebCore::buildObjectForSearchResult): (WebCore::InspectorPageAgent::searchInResources): * inspector/front-end/utilities.js: (): 2011-09-28 Kentaro Hara Implement a PopStateEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=68896 Reviewed by Adam Barth. Test: fast/events/constructors/pop-state-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added a PopStateEvent constructor. * dom/PopStateEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-28 No'am Rosenthal [Texmap] Allow TextureMapperGL to work without a GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=68980 Reviewed by Andreas Kling. Perform a null-check for m_context and initialize that variable. If a graphics-context doesn't exist, we don't need to reset it. No new functionality so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapperGL::beginPainting): (WebCore::TextureMapperGL::endPainting): 2011-09-28 Kentaro Hara Implement an ErrorEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=68336 Reviewed by Adam Barth. Test: fast/events/constructors/error-event-constructor.html * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyValue): Returns an unsigned value corresponding to a given key. * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Added the ErrorEvent constructor. * dom/ErrorEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-27 Andy Estes WebKitLinkedOnOrAfter() check is ineffective for Solar Walk app-specific hack. https://bugs.webkit.org/show_bug.cgi?id=68863 Reviewed by Darin Adler. The SolarWalk binary does not link against WebKit.framework directly, so calling NSVersionOfLinkTimeLibrary() will not return the version of WebKit against which SolarWalk was linked. Since Solar Walk has released an update that addresses the issue for which this app-specific hack was originally added, we should just remove the hack. * WebCore.exp.in: Remove applicationIsSolarWalkMac(). * platform/RuntimeApplicationChecks.cpp: Ditto. * platform/RuntimeApplicationChecks.h: Ditto. 2011-09-28 Tim Horton Fix potential SVG performance regression (over-invalidation of caches) from 96052 https://bugs.webkit.org/show_bug.cgi?id=68941 Reviewed by Zoltan Herczeg. Only invalidate the cache of a filter when target style changes, as of the different types of cached resources, only filters make use of the style of the target element and thus need to be invalidated when the target style changes. No new tests, performance improvement. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientUpdatedFromElement): 2011-09-28 Adenilson Cavalcanti Missing initialization of member in ImageFrameQt class https://bugs.webkit.org/show_bug.cgi?id=68943 Reviewed by Kenneth Rohde Christiansen. No new tests, this fixes internal implementation detail. * platform/image-decoders/qt/ImageFrameQt.cpp: (WebCore::ImageFrame::ImageFrame): (WebCore::ImageFrame::operator=): 2011-09-27 Luke Macpherson Defer call to CSSValue::isPrimitiveValue(), saves ~4% in CSSStyleSelector::applyProperty(). https://bugs.webkit.org/show_bug.cgi?id=68964 Reviewed by Eric Seidel. No new tests / no functionality changed. Doing value->isPrimitiveValue() is relatviely expensive, so moving it after the early returns but before the result is used saves a significant number of cycles. (Tested with Shark profiler in Safari). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-27 Ryosuke Niwa Simplify ReplaceSelectionCommand::positionAtStartOfInsertedContent https://bugs.webkit.org/show_bug.cgi?id=68939 Reviewed by Darin Adler. Simplified ReplaceSelectionCommand::positionAtStartOfInsertedContent. This change revealed a bug in removeUnrenderedTextNodesAtEnds that text nodes without any visible text at ends are not removed when it has a render object. Fixed the bug by checking the length of the rendered text. (Tested by editing/pasteboard/pasting-word-in-div-extra-line.html) This further revealed that caretMaxRenderedOffset doesn't return an offset and caretMaxRenderedOffset on InlineBox, InlineTextBox, RenderObject, RenderBR, RenderPlaced are never called. To address this issue, renamed caretMaxRenderedOffset to renderedTextLength for RenderText and removed the rest. * dom/Position.cpp: (WebCore::Position::rendersInDifferentPosition): * editing/ReplaceSelectionCommand.cpp: (WebCore::nodeHasVisibleRenderText): Added. (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Calls nodeHasVisibleRenderText. (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Simplified. * editing/visible_units.cpp: (WebCore::startOfParagraph): Calls renderedTextLength. (WebCore::endOfParagraph): Ditto. * rendering/InlineBox.cpp: Removed caretMaxRenderedOffset. * rendering/InlineBox.h: Ditto. * rendering/InlineTextBox.cpp: Ditto. * rendering/InlineTextBox.h: Ditto. * rendering/RenderBR.cpp: Ditto. * rendering/RenderBR.h: Ditto. * rendering/RenderObject.cpp: Ditto. * rendering/RenderObject.h: Ditto. * rendering/RenderReplaced.cpp: Ditto. * rendering/RenderReplaced.h: Ditto. * rendering/RenderText.cpp: (WebCore::RenderText::renderedTextLength): Renamed from caretMaxRenderedOffset. * rendering/RenderText.h: 2011-09-27 James Robinson [chromium] LayerRenderChromium asserts about leaking textures. https://bugs.webkit.org/show_bug.cgi?id=68190 Reviewed by Kenneth Russell. This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures. This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format enum type, making it more testable. It also allows us to track the allocations by subclassing TextureAllocator to make sure we aren't leaking any textures. * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator): (WebCore::LayerRendererChromium::contentsTextureAllocator): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::memoryUseBytes): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::evictAndDeleteAllTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureAllocator::~TextureAllocator): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added. (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h. (WebCore::TrackingTextureAllocator::create): (WebCore::TrackingTextureAllocator::currentMemoryUseBytes): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::updateTexture): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread): (WebCore::CCLayerTreeHost::commitToOnCCThread): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): 2011-09-27 James Robinson [chromium] Only initiate the beginFrameAndCommit sequence if a commit has been requested https://bugs.webkit.org/show_bug.cgi?id=68967 Reviewed by Kenneth Russell. When updating the scheduler state, we should only initiate a new commit flow if a commit has been requested (as opposed to only a redraw). Covered by the unit test CCLayerTreeHostTestSetNeedsRedraw with USE(THREADED_COMPOSITING) set to true. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread): 2011-09-27 Kentaro Hara Implement a PageTransitionEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=68067 Reviewed by Adam Barth. Test: fast/events/constructors/page-transition-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the PageTransitionEvent constructor. * dom/PageTransitionEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-27 Kentaro Hara Implement a MessageEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=68883 Reviewed by Adam Barth. The spec for MessageEvent is here: http://www.whatwg.org/specs/web-apps/current-work/#messageevent Currently, some tests in fast/events/constructors/message-event-constructor.html are failing or crashing in DRT, as we commented in the test file. This is because MessageEvent.data is implemented as SerializedScriptValue, and thus it cannot keep ScriptValue passed by JavaScript. This is the same issue as the bug (https://bugs.webkit.org/show_bug.cgi?id=68345). We will soon make a follow-up patch to fix these failures, after this patch is landed. Test: fast/events/constructors/message-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the MessageEvent constructor. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Generates MessagePortArray from the list of message ports in the format of JSValues. * bindings/js/JSDictionary.h: * bindings/js/JSEventConstructors.cpp: Added #includes for MessageEvent. * dom/MessageEvent.cpp: (WebCore::MessageEventInit::MessageEventInit): (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): * dom/MessageEvent.h: Added a definition for MessageEvent. Removed an extra leading spaces. (WebCore::MessageEvent::create): (WebCore::MessageEvent::origin): (WebCore::MessageEvent::lastEventId): (WebCore::MessageEvent::source): (WebCore::MessageEvent::ports): (WebCore::MessageEvent::dataType): (WebCore::MessageEvent::dataAsSerializedScriptValue): (WebCore::MessageEvent::dataAsString): (WebCore::MessageEvent::dataAsBlob): (WebCore::MessageEvent::dataAsArrayBuffer): * dom/MessageEvent.idl: Makes MessageEvent constructible. 2011-09-27 Eric Uhrhane [Chromium/FileWriter] race condition in FileWriter completion can lead to assert https://bugs.webkit.org/show_bug.cgi?id=67684 Reviewed by David Levin. Tests: fast/filesystem/file-writer-abort-continue.html fast/filesystem/file-writer-abort.html Track the state of the backend and be prepared for reentrant user requests. Limit recursion depth to an arbitrary small constant. * fileapi/FileWriter.cpp: Lots of event-handling changes. * fileapi/FileWriter.h: 2011-09-27 Mihai Parparita Unreviewed, rolling out r96141. http://trac.webkit.org/changeset/96141 https://bugs.webkit.org/show_bug.cgi?id=68190 Breaks PrerenderBrowserTest.PrerenderHTML5Video in browser_tests * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::createLayerTexture): (WebCore::LayerRendererChromium::deleteLayerTexture): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::memoryUseBytes): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::evictAndDeleteAllTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/TrackingTextureAllocator.cpp: Removed. * platform/graphics/chromium/TrackingTextureAllocator.h: Removed. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::updateTexture): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp.rej: Removed. * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): 2011-09-27 James Robinson [chromium] Guard accelerated skia drawing logic with its own define to remove dependency on USE(THREADED_COMPOSITING) https://bugs.webkit.org/show_bug.cgi?id=68953 Reviewed by Kenneth Russell. The accelerated drawing code is incompatible with threaded compositing. Rather than tying the two behaviors together via USE(THREADED_COMPOSITING), this patch guards the accelerated drawing code with its own USE() guard so the features can advance independently. Today, it's not safe to set both of these flags. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: 2011-09-27 Luke Macpherson Slightly improve performance of CSSStyleApplyProperty handler lookup. https://bugs.webkit.org/show_bug.cgi?id=68868 Reviewed by Eric Seidel. No new tests as no functionality changed. * css/CSSStyleApplyProperty.h: (WebCore::CSSStyleApplyProperty::propertyHandler): Make propertyHandler() public and remove redirecting functions. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Perform property handler lookup once and reuse the result. 2011-09-27 Kent Tamura [V8] element.dataset.nonExistingKey should return undefined. https://bugs.webkit.org/show_bug.cgi?id=68877 Reviewed by Nate Chapin. * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyGetter): Uses v8StringOrUndefined() instead of v8String(). 2011-09-23 Mark Hahnenberg Add static version of JSCell::visitChildren https://bugs.webkit.org/show_bug.cgi?id=68404 Reviewed by Darin Adler. No new tests. In this patch we just extract the bodies of the virtual visitChildren methods throughout the JSCell inheritance hierarchy out into static methods, which are now called from the virtual methods. This is an intermediate step in trying to move the virtual-ness of visitChildren into our own custom vtable stored in ClassInfo. We need to convert the methods to static methods in order to be able to more easily store and refer to them in our custom vtable since normal member methods store some implicit information in their types, making it impossible to store them generically in ClassInfo. * WebCore.exp.in: * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::visitChildrenVirtual): (WebCore::JSAttr::visitChildren): * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContext::visitChildrenVirtual): (WebCore::JSAudioContext::visitChildren): * bindings/js/JSCSSRuleCustom.cpp: (WebCore::JSCSSRule::visitChildrenVirtual): (WebCore::JSCSSRule::visitChildren): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual): (WebCore::JSCSSStyleDeclaration::visitChildren): * bindings/js/JSCanvasRenderingContextCustom.cpp: (WebCore::JSCanvasRenderingContext::visitChildrenVirtual): (WebCore::JSCanvasRenderingContext::visitChildren): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::visitChildrenVirtual): (WebCore::JSDOMGlobalObject::visitChildren): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::visitChildrenVirtual): (WebCore::JSDOMWindow::visitChildren): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::visitChildrenVirtual): (WebCore::JSDOMWindowShell::visitChildren): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSJavaScriptAudioNodeCustom.cpp: (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual): (WebCore::JSJavaScriptAudioNode::visitChildren): * bindings/js/JSMessageChannelCustom.cpp: (WebCore::JSMessageChannel::visitChildrenVirtual): (WebCore::JSMessageChannel::visitChildren): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::visitChildrenVirtual): (WebCore::JSMessagePort::visitChildren): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::visitChildrenVirtual): (WebCore::JSNamedNodeMap::visitChildren): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::visitChildrenVirtual): (WebCore::JSNode::visitChildren): * bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::visitChildrenVirtual): (WebCore::JSNodeFilter::visitChildren): * bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::visitChildrenVirtual): (WebCore::JSNodeIterator::visitChildren): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::visitChildrenVirtual): (WebCore::JSSVGElementInstance::visitChildren): * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorker::visitChildrenVirtual): (WebCore::JSSharedWorker::visitChildren): * bindings/js/JSStyleSheetCustom.cpp: (WebCore::JSStyleSheet::visitChildrenVirtual): (WebCore::JSStyleSheet::visitChildren): * bindings/js/JSTreeWalkerCustom.cpp: (WebCore::JSTreeWalker::visitChildrenVirtual): (WebCore::JSTreeWalker::visitChildren): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::visitChildrenVirtual): (WebCore::JSWebGLRenderingContext::visitChildren): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::visitChildrenVirtual): (WebCore::JSWorkerContext::visitChildren): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::visitChildrenVirtual): (WebCore::JSXMLHttpRequest::visitChildren): * bindings/js/JSXPathResultCustom.cpp: (WebCore::JSXPathResult::visitChildrenVirtual): (WebCore::JSXPathResult::visitChildren): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::visitChildrenVirtual): (WebCore::JSTestObj::visitChildren): * bindings/scripts/test/JS/JSTestObj.h: * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual): (JSC::Bindings::QtRuntimeObject::visitChildren): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual): (JSC::Bindings::QtRuntimeMetaMethod::visitChildren): * bridge/qt/qt_runtime.h: * workers/WorkerContext.h: 2011-09-27 Mark Hahnenberg Add static version of JSCell::getCallData https://bugs.webkit.org/show_bug.cgi?id=68741 Reviewed by Darin Adler. No new tests. In this patch we just extract the bodies of the virtual getCallData methods throughout the JSCell inheritance hierarchy out into static methods, which are now called from the virtual methods. This is an intermediate step in trying to move the virtual-ness of getCallData into our own method table stored in ClassInfo. We need to convert the methods to static methods because static methods can be represented as function pointers rather than pointers to member functions, and function pointers are smaller and faster to call than pointers to member functions. * WebCore.exp.in: * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::getCallDataVirtual): (WebCore::JSHTMLAllCollection::getCallData): * bindings/js/JSHTMLAppletElementCustom.cpp: (WebCore::JSHTMLAppletElement::getCallDataVirtual): (WebCore::JSHTMLAppletElement::getCallData): * bindings/js/JSHTMLEmbedElementCustom.cpp: (WebCore::JSHTMLEmbedElement::getCallDataVirtual): (WebCore::JSHTMLEmbedElement::getCallData): * bindings/js/JSHTMLObjectElementCustom.cpp: (WebCore::JSHTMLObjectElement::getCallDataVirtual): (WebCore::JSHTMLObjectElement::getCallData): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::evaluate): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetCallData): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::getCallDataVirtual): (JSC::Bindings::ObjcFallbackObjectImp::getCallData): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::getCallDataVirtual): (JSC::Bindings::QtRuntimeMetaMethod::getCallData): (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::getCallDataVirtual): (JSC::Bindings::QtRuntimeConnectionMethod::getCallData): (JSC::Bindings::isJavaScriptFunction): * bridge/qt/qt_runtime.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::getCallDataVirtual): (JSC::RuntimeMethod::getCallData): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getCallDataVirtual): (JSC::Bindings::RuntimeObject::getCallData): * bridge/runtime_object.h: 2011-09-27 Dean Jackson Unreviewed. Remove duplicate FilterOperation{s}.h that were accidentally added to the top level of the Xcode project. * WebCore.xcodeproj/project.pbxproj: 2011-09-27 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68940 Narrow the float/lines pagination heuristic to only kick in if the previous line broke cleanly and if the floats are occurring at the start of the line. Reviewed by Dan Bernstein. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::positionNewFloatOnLine): 2011-09-27 James Robinson Add a mechanism to test for the compositing tree mutated during painting https://bugs.webkit.org/show_bug.cgi?id=68738 Reviewed by Adam Barth. Sets a static bool during GraphicsLayer::paintGraphicsLayerContents and ASSERT()s that we never create or destroy a GraphicsLayer inside this function. Painting should never mutate the GraphicsLayer tree. Test: compositing/video/video-with-invalid-source.html * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): (WebCore::GraphicsLayer::~GraphicsLayer): (WebCore::GraphicsLayer::paintGraphicsLayerContents): 2011-09-27 Ojan Vafai take padding/border on flexbox into account with direction:rtl https://bugs.webkit.org/show_bug.cgi?id=68846 Reviewed by David Hyatt. Use the logicalWidth of the flexbox instead of it's availableLogicalWidth so that we include the flexbox's border and padding. Also, change all uses of availableLogicalWidth to contentLogicalWidth. The former takes multi-column into account. Multi-column flexboxes don't make any sense, so there's no point in calling availableLogicalWidth. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::flowAwareLogicalWidth): (WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth): (WebCore::RenderFlexibleBox::computePreferredLogicalWidth): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection): (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): * rendering/RenderFlexibleBox.h: 2011-09-27 Sheriff Bot Unreviewed, rolling out r96139. http://trac.webkit.org/changeset/96139 https://bugs.webkit.org/show_bug.cgi?id=68933 Broke table-percent-height.html on Mac bots (Requested by mwenge2 on #webkit). * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: 2011-09-27 Tim Horton REGRESSION(65665): Pattern size being clamped to SVG size can prevent transformed elements from being fully covered by userSpaceOnUse patterns https://bugs.webkit.org/show_bug.cgi?id=67700 Reviewed by Darin Adler. Clamp all resources to the same size, 4096x4096 (arbitrarily chosen), instead of to the size of the element. This fixes the case where a transformed element displays part of a resource outside of the size of the element. When drawing an oversized pattern into its tile image, scale the content down to fit. When drawing the tile image to the screen, scale it back up to fit the expected area. This will cause pixelation when patterns are over the 4k limit. Tests: svg/custom/transformed-pattern-clamp-svg-root.svg, svg/custom/oversized-pattern-scale.svg * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/RenderSVGResourcePattern.h: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect): * rendering/svg/SVGImageBufferTools.h: 2011-09-27 Dan Bernstein Assertion failure in RenderLayer::paintPaginatedChildLayer() Reviewed by Simon Fraser. Test: fast/dynamic/layer-no-longer-paginated.html FrameView::layout() calls adjustViewSize() before calling RenderLayer::updateLayerPositions(). The former may trigger painting with a layer tree that is not entirely up-to-date. Specifically, the isPaginated() state of a layer may be incorrect, leading to the assertion in this bug. Instead of asserting, return early and count on the upcoming updateLayerPositions() to repaint as needed. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintPaginatedChildLayer): Replaced the assertion with an early return. 2011-09-27 Ojan Vafai offsetTop/offsetLeft return the wrong values for horizontal-bt/vertical-rl writing modes https://bugs.webkit.org/show_bug.cgi?id=68304 Reviewed by David Hyatt. When grabbing the x/y values of the RenderBox, we need to take writing mode flipping into account. Test: fast/dom/offset-position-writing-modes.html * rendering/RenderBox.cpp: (WebCore::RenderBox::locationIncludingFlipping): * rendering/RenderBox.h: (WebCore::RenderBox::yFlippedForWritingMode): (WebCore::RenderBox::xFlippedForWritingMode): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::offsetLeft): (WebCore::RenderBoxModelObject::offsetTop): 2011-09-27 Tim Horton Rapidly refreshing a feMorphology[erode] with r=0 can sometimes cause display corruption https://bugs.webkit.org/show_bug.cgi?id=68816 Reviewed by Simon Fraser. If a filter returns without writing into its result buffer, make sure to return an cleared buffer. Test: svg/filters/feMorphology-zero-radius.svg * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::apply): * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::apply): 2011-09-27 Ryosuke Niwa CompositeEditCommand::prune should remove subtree at once https://bugs.webkit.org/show_bug.cgi?id=68866 Reviewed by Darin Adler. Extracted the logic to find the highest ancestor to remove as highestNodeToRemoveInPruning from prune. This reduces the number of node removals from O(n) to O(1) where n is the depth of the tree. * editing/CompositeEditCommand.cpp: (WebCore::hasARenderedDescendant): Takes excludedNode in addition to node. excludedNode is used to ignore the child node from which we climbed up the tree in highestNodeToRemoveInPruning. (WebCore::highestNodeToRemoveInPruning): Extracted from prune. (WebCore::CompositeEditCommand::prune): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): 2011-09-27 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68922 Paginated floats should not grow the height of a block when they don't end up being tied to a line. Floats encountered in skipLeadingWhitespace that paginate can't immediately grow the height of the block, since there may not end up being any actual line content. We only want to push the height of the block down if we have actual line content that we want to keep with the float. Make positionNewFloatOnLine check if the line is empty or not, and if it is, it just puts the desired pagination strut into LineInfo. If and when actual line content is encountered and setEmpty becomes false, we'll grow the block height then. Reviewed by Dan Bernstein. Added fast/multicol/float-paginate-empty-lines.html and fast/regions/webkit-flow-double-pagination-float-push.html. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::LineWidth): (WebCore::LineWidth::fitsOnLine): (WebCore::LineWidth::currentWidth): (WebCore::LineWidth::uncommittedWidth): (WebCore::LineWidth::committedWidth): (WebCore::LineWidth::availableWidth): (WebCore::LineWidth::addUncommittedWidth): (WebCore::LineWidth::commit): (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight): (WebCore::LineWidth::updateAvailableWidth): (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): (WebCore::LineWidth::applyOverhang): (WebCore::LineWidth::fitBelowFloats): (WebCore::LineInfo::LineInfo): (WebCore::LineInfo::floatPaginationStrut): (WebCore::LineInfo::setEmpty): (WebCore::LineInfo::setFloatPaginationStrut): (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): (WebCore::RenderBlock::LineBreaker::nextLineBreak): (WebCore::RenderBlock::positionNewFloatOnLine): 2011-09-27 Dean Jackson Add 'filter' value to RenderStyle https://bugs.webkit.org/show_bug.cgi?id=68471 Reviewed by Simon Fraser. Add a filter property to RenderStyle when ENABLE(CSS_FILTERS) is turned on. Similar to -webkit-transform, -webkit-filter is a list of FilterOperations, each identifying what type of operation it is. This change simply adds the basic objects, it does not parse the property to generate the list. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FilterOperation.h: Added. (WebCore::FilterOperation::~FilterOperation): (WebCore::FilterOperation::operator!=): (WebCore::FilterOperation::getOperationType): (WebCore::FilterOperation::isSameType): (WebCore::FilterOperation::FilterOperation): (WebCore::ReferenceFilterOperation::create): (WebCore::ReferenceFilterOperation::reference): (WebCore::ReferenceFilterOperation::operator==): (WebCore::ReferenceFilterOperation::ReferenceFilterOperation): (WebCore::BasicColorMatrixFilterOperation::create): (WebCore::BasicColorMatrixFilterOperation::amount): (WebCore::BasicColorMatrixFilterOperation::operator==): (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation): (WebCore::BasicComponentTransferFilterOperation::create): (WebCore::BasicComponentTransferFilterOperation::amount): (WebCore::BasicComponentTransferFilterOperation::operator==): (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation): (WebCore::GammaFilterOperation::create): (WebCore::GammaFilterOperation::amplitude): (WebCore::GammaFilterOperation::exponent): (WebCore::GammaFilterOperation::offset): (WebCore::GammaFilterOperation::operator==): (WebCore::GammaFilterOperation::GammaFilterOperation): (WebCore::BlurFilterOperation::create): (WebCore::BlurFilterOperation::stdDeviationX): (WebCore::BlurFilterOperation::stdDeviationY): (WebCore::BlurFilterOperation::operator==): (WebCore::BlurFilterOperation::BlurFilterOperation): (WebCore::SharpenFilterOperation::create): (WebCore::SharpenFilterOperation::radius): (WebCore::SharpenFilterOperation::threshold): (WebCore::SharpenFilterOperation::amount): (WebCore::SharpenFilterOperation::operator==): (WebCore::SharpenFilterOperation::SharpenFilterOperation): (WebCore::DropShadowFilterOperation::create): (WebCore::DropShadowFilterOperation::shadow): (WebCore::DropShadowFilterOperation::operator==): (WebCore::DropShadowFilterOperation::DropShadowFilterOperation): * platform/graphics/filters/FilterOperations.cpp: Added. (WebCore::FilterOperations::FilterOperations): (WebCore::FilterOperations::operator==): * platform/graphics/filters/FilterOperations.h: Added. (WebCore::FilterOperations::operator!=): (WebCore::FilterOperations::clear): (WebCore::FilterOperations::operations): (WebCore::FilterOperations::size): (WebCore::FilterOperations::at): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::filter): (WebCore::InheritedFlags::hasFilter): (WebCore::InheritedFlags::setFilter): (WebCore::InheritedFlags::initialFilter): * rendering/style/StyleAllInOne.cpp: Added include of new StyleFilterData. * rendering/style/StyleFilterData.cpp: Added. (WebCore::StyleFilterData::StyleFilterData): (WebCore::StyleFilterData::operator==): * rendering/style/StyleFilterData.h: Added. (WebCore::StyleFilterData::create): (WebCore::StyleFilterData::copy): (WebCore::StyleFilterData::operator!=): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: New filter DataRef. 2011-09-27 James Robinson [chromium] LayerRenderChromium asserts about leaking textures. https://bugs.webkit.org/show_bug.cgi?id=68190 Reviewed by Kenneth Russell. This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures. This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format enum type, making it more testable. It also allows us to track the allocations by subclassing TextureAllocator to make sure we aren't leaking any textures. * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator): (WebCore::LayerRendererChromium::contentsTextureAllocator): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::memoryUseBytes): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::evictAndDeleteAllTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureAllocator::~TextureAllocator): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added. (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h. (WebCore::TrackingTextureAllocator::create): (WebCore::TrackingTextureAllocator::currentMemoryUseBytes): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::updateTexture): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread): (WebCore::CCLayerTreeHost::commitToOnCCThread): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): 2011-06-28 Robert Hogan Reviewed by David Hyatt. Replaced elements squeezed when width is specified as percentage inside a table with Auto layout https://bugs.webkit.org/show_bug.cgi?id=29447 If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height. Test: fast/replaced/table-percent-width.html * rendering/RenderBox.cpp: (WebCore::avoidSqueezingWidth): (WebCore::avoidSqueezingHeight): (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: 2011-09-27 Simon Fraser https://bugs.webkit.org/show_bug.cgi?id=67858 Roll r96070 back in now that the crash has been fixed in r96130. Reviewed by Darin Adler. When non-overlay scrollbars are hidden on a composited iframe, nothing invalidated the scrollbar areas or the scroll corner, so the scrollbars appear to remain. Fix by invalidating the scrollbars and scroll corner when they are removed. Invalidation on scrollbar creation appears to happen via updating the scrollbar style. Tested by compositing/iframes/repaint-after-losing-scrollbars.html which no longer shows stale scrollbars when run manually, even though the green squares are missing from the pixel result (bug 67878). * page/FrameView.cpp: (WebCore::FrameView::updateScrollCorner): Pass the corner rect into invalidateScrollCorner(). * platform/ScrollView.cpp: (WebCore::ScrollView::setHasHorizontalScrollbar): Invalidate the scrollbar area if hiding it. (WebCore::ScrollView::setHasVerticalScrollbar): Ditto. (WebCore::ScrollView::updateScrollbars): In the case where both scrollbars are going away, compute the scroll corner rect while we still have scrollbars, and then invalidate it explicitly. (updateScrollCorner() doesn't, because it doesn't have access to the old corner rect.) * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::invalidateScrollCorner): Pass the rect in, because we can't compute it in the case where the scrollbars are going away. * platform/ScrollableArea.h: Pass in a rect to invalidateScrollCorner(), which matches invalidateScrollbar(). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::destroyRootLayer): Pass the corner rect into invalidateScrollCorner(). * rendering/RenderScrollbarPart.cpp: Ditto. (WebCore::RenderScrollbarPart::imageChanged): Ditto. 2011-09-27 Mihai Parparita Fix Chromium Mac build after r96130. * page/FrameView.cpp: (WebCore::FrameView::layerForOverhangAreas): 2011-09-27 Kaustubh Atrawalkar Autofocus on readonly inputs does not focus the element. https://bugs.webkit.org/show_bug.cgi?id=24092 Reviewed by Ryosuke Niwa. Readonly input elements should be autofocusable. Removed the check. Tests: fast/forms/autofocus-readonly-attribute.html * html/HTMLFormControlElement.cpp: (WebCore::shouldAutofocus): 2011-09-27 Simon Fraser Clean up how FrameView accesses the RenderView https://bugs.webkit.org/show_bug.cgi?id=68914 Reviewed by Sam Weinig. Clean up how FrameView accesses the content renderer of its frame. Previously, this was done in several different ways, only some of which did null-checking. Use an inline method to avoid having to expose Frame in the header. Standardize the terminology to use 'root' for this RenderView. * page/FrameView.cpp: (WebCore::rootRenderer): (WebCore::FrameView::setFrameRect): (WebCore::FrameView::adjustViewSize): (WebCore::FrameView::updateCompositingLayers): (WebCore::FrameView::clearBackingStores): (WebCore::FrameView::restoreBackingStores): (WebCore::FrameView::layerForHorizontalScrollbar): (WebCore::FrameView::layerForVerticalScrollbar): (WebCore::FrameView::layerForScrollCorner): (WebCore::FrameView::layerForOverhangAreas): (WebCore::FrameView::syncCompositingStateForThisFrame): (WebCore::FrameView::hasCompositedContent): (WebCore::FrameView::enterCompositingMode): (WebCore::FrameView::isSoftwareRenderable): (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): (WebCore::FrameView::layout): (WebCore::FrameView::embeddedContentBox): (WebCore::FrameView::contentsInCompositedLayer): (WebCore::FrameView::scrollContentsFastPath): (WebCore::FrameView::scrollContentsSlowPath): (WebCore::FrameView::maintainScrollPositionAtAnchor): (WebCore::FrameView::scrollPositionChanged): (WebCore::FrameView::repaintFixedElementsAfterScrolling): (WebCore::FrameView::visibleContentsResized): (WebCore::FrameView::scheduleRelayoutOfSubtree): (WebCore::FrameView::needsLayout): (WebCore::FrameView::setNeedsLayout): (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::updateControlTints): (WebCore::FrameView::paintContents): (WebCore::FrameView::forceLayoutForPagination): (WebCore::FrameView::adjustPageHeightDeprecated): (WebCore::FrameView::isVerticalDocument): (WebCore::FrameView::isFlippedDocument): 2011-09-27 Dominic Mazzoni AXObjectCache cleared unnecessarily when non-top Document is detached. https://bugs.webkit.org/show_bug.cgi?id=68636 Reviewed by Chris Fleizach. Test: accessibility/deleting-iframe-destroys-axcache.html * dom/Document.cpp: (WebCore::Document::attach): (WebCore::Document::detach): 2011-09-27 Sheriff Bot Unreviewed, rolling out r96108, r96111, r96113, and r96116. http://trac.webkit.org/changeset/96108 http://trac.webkit.org/changeset/96111 http://trac.webkit.org/changeset/96113 http://trac.webkit.org/changeset/96116 https://bugs.webkit.org/show_bug.cgi?id=68913 Wait for working Qt5 (Requested by ossy on #webkit). * WebCore.pri: * platform/graphics/qt/GraphicsLayerQt.cpp: 2011-09-27 Csaba Osztrogonác Fix ENABLE(SQL_DATABASE)=0 build after r95919 https://bugs.webkit.org/show_bug.cgi?id=68902 r95919 enabled OFFLINE_WEB_APPLICATIONS by default and it needs SQLite stuff even if ENABLE_SQL_DATABASE=0. Reviewed by Adam Barth. * platform/sql/SQLiteAuthorizer.cpp: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteFileSystem.cpp: * platform/sql/SQLiteStatement.cpp: * platform/sql/SQLiteTransaction.cpp: * storage/DatabaseAuthorizer.cpp: 2011-09-27 Julien Chaffraix Crash because CSSPrimitiveValue::computeLengthDouble assumes fontMetrics are available https://bugs.webkit.org/show_bug.cgi?id=66291 Reviewed by Darin Adler. Test: fast/canvas/crash-set-font.html This is Yet Another Missing updateFont (similar to bug 57756 and likely others). Here the issue is that applying one of the font properties could mutate the parent style's font if m_parentStyle == m_style. We would then query the newly created font when applying CSSPropertyFontSize, which has no font fallback list as Font::update was never called. The right fix would be to refactor of how we handle fonts to avoid such manual updates (see bug 62390). Until this happens, it is better not to crash. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Added updateFont() here as the fonts could have been mutated by the previous property change. Also added a comment explaining why it is safe to do it this way. 2011-09-27 No'am Rosenthal [Texmap] Code cleanup: remove unused boundingRect/visibleRect calculations https://bugs.webkit.org/show_bug.cgi?id=68897 Reviewed by Andreas Kling. No new functionality so no new tests. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::computeAllTransforms): (WebCore::TextureMapperNode::computeTiles): (WebCore::TextureMapperNode::syncCompositingState): * platform/graphics/texmap/TextureMapperNode.h: 2011-09-27 No'am Rosenthal [Texmap][Qt] Refactor texture-upload to allow direct chunk update https://bugs.webkit.org/show_bug.cgi?id=68808 Add a function to BitmapTexture for direct pixel updates. Modify BitmapTextureGL::endPaint to use that function. Since the BGRA to RGBA swizzling is done inside that function, there's no need for the RGBA32PremultipliedBuffer class to contain such function. Also, RGBA32PremultipliedBuffer was renamed to BGRA32PremultipliedBuffer, correcting an old mistake. Reviewed by Andreas Kling. No new tests. Existing tests in LayoutTests/compositing test this. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::beginPaint): (WebCore::BitmapTextureGL::endPaint): (WebCore::swizzleBGRAToRGBA): (WebCore::BitmapTextureGL::updateContents): * platform/graphics/opengl/TextureMapperGL.h: (WebCore::BGRA32PremultimpliedBuffer::~BGRA32PremultimpliedBuffer): * platform/graphics/qt/TextureMapperQt.cpp: (WebCore::BitmapTextureQt::updateContents): (WebCore::BGRA32PremultimpliedBufferQt::data): (WebCore::BGRA32PremultimpliedBuffer::create): * platform/graphics/qt/TextureMapperQt.h: * platform/graphics/texmap/TextureMapper.h: 2011-09-23 Tor Arne Vestbø [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi QWidget and friends now live in the QtWidgets library. We update includes in implementation files and private headers to us the non-module-prefixed path, and leave the lookup for the include path. For public headers we have to ifdef the includes as the user might now have the modules we need in his QT config. Finally, QSGCanvas is no longer a QWidget but a QWindow, so we have to update our code and use windowHandle() for setting the parent relationships. https://bugs.webkit.org/show_bug.cgi?id=68687 Reviewed by Andreas Kling. * WebCore.pri: * platform/graphics/qt/GraphicsLayerQt.cpp: 2011-09-27 Pavel Feldman Web Inspector: split DOM.attributesUpdated into attributeModified and attributeRemoved. Send attribute name and value within the event. https://bugs.webkit.org/show_bug.cgi?id=68613 Reviewed by Yury Semikhatsky. * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::removeAttribute): * inspector/Inspector.draft-01.json: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didModifyDOMAttr): (WebCore::InspectorDOMAgent::didRemoveDOMAttr): * inspector/InspectorDOMAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl): (WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didModifyDOMAttr): (WebCore::InspectorInstrumentation::didRemoveDOMAttr): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype._addAttribute): (WebInspector.DOMNode.prototype._setAttribute): (WebInspector.DOMNode.prototype._removeAttribute): (WebInspector.DOMAgent.prototype._attributeModified): (WebInspector.DOMAgent.prototype._attributeRemoved): (WebInspector.DOMAgent.prototype._inlineStyleInvalidated): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMDispatcher.prototype.attributeModified): (WebInspector.DOMDispatcher.prototype.attributeRemoved): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._attributesUpdated): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane): (WebInspector.MetricsSidebarPane.prototype._attributesUpdated): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype._attributesModified): (WebInspector.StylesSidebarPane.prototype._attributesRemoved): (WebInspector.StylesSidebarPane.prototype._styleInvalidated): (WebInspector.StylePropertyTreeElement.prototype.event): (WebInspector.StylePropertyTreeElement.prototype): * inspector/validate-protocol-compatibility: 2011-09-27 Sheriff Bot Unreviewed, rolling out r96070 and r96075. http://trac.webkit.org/changeset/96070 http://trac.webkit.org/changeset/96075 https://bugs.webkit.org/show_bug.cgi?id=68893 WK2 tests started crashing after r96070 for SL and Qt (Requested by torarne on #webkit). * page/FrameView.cpp: (WebCore::FrameView::updateScrollCorner): * platform/ScrollView.cpp: (WebCore::ScrollView::setHasHorizontalScrollbar): (WebCore::ScrollView::setHasVerticalScrollbar): (WebCore::ScrollView::updateScrollbars): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::invalidateScrollCorner): * platform/ScrollableArea.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::destroyRootLayer): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::imageChanged): 2011-09-27 Andrey Kosyakov Web Inspector: JS exception upon clicking on "Word Wrap" checkbox in Settings screen https://bugs.webkit.org/show_bug.cgi?id=68888 Reviewed by Pavel Feldman. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged): 2011-09-21 Pavel Podivilov Web Inspector: migrate RawSourceCode clients to SourceMapping class. https://bugs.webkit.org/show_bug.cgi?id=68524 Clients should use uiSourceCode(), rawLocationToUILocation(), uiLocationToRawLocation() methods of SourceMapping class. Initially, RawSourceCode may not have associated SourceMapping, so it is natural to extract this methods and associated state to a separate class. Reviewed by Yury Semikhatsky. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.PresentationCallFrame.prototype.get url): (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated): (WebInspector.PresentationCallFrame.prototype.sourceLine): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.get sourceMapping): 2011-09-27 Vineet Chaudhary wrap attribute of textarea element cannot be accessed by JavaScript. https://bugs.webkit.org/show_bug.cgi?id=68592 Reviewed by Kent Tamura. Added JS interface for wrap attribute to HTMLTextAreaElement.idl. Test: fast/forms/textarea-wrap-attribute.html * html/HTMLTextAreaElement.idl: 2011-09-27 Xan Lopez [GTK] Add compatibility methods for DOM bindings https://bugs.webkit.org/show_bug.cgi?id=68884 Reviewed by Philippe Normand. Add compatibility methods for our DOM bindings. * bindings/gobject/WebKitDOMCustom.cpp: (webkit_dom_blob_slice): alias to the new method name. (webkit_dom_html_form_element_dispatch_form_change): this was removed from WebCore, so just print a warning about it. (webkit_dom_html_form_element_dispatch_form_input): ditto. * bindings/gobject/WebKitDOMCustom.h: 2011-09-27 Ryosuke Niwa Encapsulate m_firstNodeInserted and m_lastLeafInserted in node insertion logic https://bugs.webkit.org/show_bug.cgi?id=68875 Reviewed by Kent Tamura. Added InsertedNode class inside ReplaceSelection to encapsulate m_firstNodeInserted and m_lastLeafInserted. Deployed it in removeRedundantStylesAndKeepStyleSpanInline, doApply, and insertAsListItems of ReplaceSelectionCommand. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): (WebCore::DeleteSelectionCommand::handleGeneralDelete): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::insertAsListItems): * editing/ReplaceSelectionCommand.h: (WebCore::ReplaceSelectionCommand::InsertedNodes::respondToNodeInsertion): (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode): (WebCore::ReplaceSelectionCommand::InsertedNodes::firstNodeInserted): (WebCore::ReplaceSelectionCommand::InsertedNodes::lastLeafInserted): (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf): * editing/htmlediting.cpp: (WebCore::updatePositionForNodeRemoval): Moved from DeleteSelectionCommand.cpp. * editing/htmlediting.h: 2011-09-27 Arun Patole Audio element doesn't emit the 'playing' event every time it starts playing, after it has finished playing. https://bugs.webkit.org/show_bug.cgi?id=60972 Reviewed by Philippe Normand. The paused attribute should be set to true and the media element should emit a 'paused' at the end of playback. WHATWG revision r6562: http://html5.org/tools/web-apps-tracker?from=6561&to=6562 Test: media/media-element-play-after-eos.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): set m_paused to true and schedule 'pause' event when playback ended. 2011-09-27 Rakesh KN xxxxxxxlyyyyyyy". In order to avoid the two rubies overlapping with each other, this patch overhangs the ruby by no more than half the ruby font size and no more than half the width of the neighboring text. Tests: fast/ruby/overhang-horizontal-no-overlap1.html fast/ruby/overhang-horizontal-no-overlap2.html fast/ruby/overhang-vertical-no-overlap1.html fast/ruby/overhang-vertical-no-overlap2.html * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::getOverhang): Calculates the width of ruby overhanging. 2011-09-16 Sheriff Bot Unreviewed, rolling out r95304. http://trac.webkit.org/changeset/95304 https://bugs.webkit.org/show_bug.cgi?id=68299 Broke GTK+ builds. It pulls derived headers into main.c (Requested by rniwa on #webkit). * bindings/scripts/CodeGeneratorGObject.pm: (): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2011-09-16 Shawn Singh Re-named isRootLayer to isNonCompositedContent because that is what the flag actually means. https://bugs.webkit.org/show_bug.cgi?id=68214 Reviewed by James Robinson. Code cleanup towards unit testing. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setIsNonCompositedContent): (WebCore::LayerChromium::isNonCompositedContent): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::NonCompositedContentHost): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setIsNonCompositedContent): (WebCore::CCLayerImpl::isNonCompositedContent): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-09-16 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by Sam Weinig. Add a new setting to control whether the mock scrollbar theme is used. This is a global setting, so that it can be set without having to access a specific Settings object. * page/Settings.h: (WebCore::Settings::setMockScrollbarsEnabled): (WebCore::Settings::mockScrollbarsEnabled): 2011-09-16 Ben Wells Large canvas fills should not crash or create unnecessarily large image buffers https://bugs.webkit.org/show_bug.cgi?id=67988 When using source-in, destination-in, source-out, or destination-atop a temporary buffer is created. This buffer only needs to be big enough to cover the intersection of the path and the canvas. If the area of intersection between the fill and the canvas is empty the canvas is completely cleared and a temporary buffer is not used. This change also adds some null checks for failures to create contexts or buffers. Reviewed by Darin Adler. Test: fast/canvas/canvas-large-fills.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-16 Shawn Singh Remove default NULL argument in LayerChromium::create(). https://bugs.webkit.org/show_bug.cgi?id=68211 Reviewed by James Robinson. Code cleanup related to creating unit testing. * platform/graphics/chromium/LayerChromium.h: 2011-09-16 Adrienne Walker [chromium] Move quad drawing code from LayerChromium to LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=68272 Reviewed by James Robinson. All the OpenGL code is in LayerRendererChromium and the CCLayerImpl tree, so move the static drawTexturedQuad/toGLMatrix functions to LayerRendererChromium, where they really belong. Just moving code around. Tested by existing compositor tests. * platform/graphics/chromium/LayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::toGLMatrix): (WebCore::LayerRendererChromium::drawTexturedQuad): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::drawDebugBorder): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): 2011-09-16 Shawn Singh Fixed const correctness on accessors in LayerChromium https://bugs.webkit.org/show_bug.cgi?id=68210 Reviewed by James Robinson. Code cleanup related to creating unit testing. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::preserves3D): (WebCore::LayerChromium::replicaLayer): 2011-09-14 Ryosuke Niwa Deleting line break before h1 converts h1 to span https://bugs.webkit.org/show_bug.cgi?id=45784 Reviewed by Kenneth Rohde Christiansen. Fixed the bug by treating h1 and other elements that retain structure like Mail blockquote. We already had a logic to overriding styles of merged paragraphs by Mail blockquote so just extend this logic for h1-h6, pre, etc... Tests: editing/deleting/merge-paragraph-from-address.html editing/deleting/merge-paragraph-from-h6-with-style.html editing/deleting/merge-paragraph-from-h6.html editing/deleting/merge-paragraph-from-listing.html editing/deleting/merge-paragraph-into-h1-with-style.html editing/deleting/merge-paragraph-into-h1.html editing/deleting/merge-paragraph-into-pre.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * editing/markup.cpp: (WebCore::isBlockNodeToRetainAppearance): Extracted from ancestorToRetainStructureAndAppearance. (WebCore::StyledMarkupAccumulator::serializeNodes): (WebCore::ancestorToRetainStructureAndAppearance): * editing/markup.h: 2011-09-16 Max Perepelitsyn Set but not used variables cleanup (gcc 4.6) https://bugs.webkit.org/show_bug.cgi?id=68157 Reviewed by Darin Adler. * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::process): * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaButton): 2011-09-16 Geoffrey Garen Removed undetectable style.filter. Reviewed by Sam Weinig. This feature was added in http://trac.webkit.org/changeset/15557 to support housingmaps.com. But housingmaps.com no longer needs this hack, we don't know of other websites that need it, and we don't know of any other browsers that have implemented this feature. * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h: Removed. * WebCore.order: * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): 2011-09-16 Adam Barth Update JSC results to account for intrinsics change. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 2011-09-16 Sheriff Bot Unreviewed, rolling out r95312. http://trac.webkit.org/changeset/95312 https://bugs.webkit.org/show_bug.cgi?id=68277 It's innocent, innocent I tell you! (Requested by jamesr_ on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Sheriff Bot Unreviewed, rolling out r95309. http://trac.webkit.org/changeset/95309 https://bugs.webkit.org/show_bug.cgi?id=68271 Broke many chromium gpu tests. (Requested by dave_levin on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Filip Pizlo DFG JIT should inline Math.abs https://bugs.webkit.org/show_bug.cgi?id=68227 Reviewed by Oliver Hunt. Added JavaScriptCore/dfg to include path path. Changed the bindings scripts to handle the presence of intrinsics. * CMakeLists.txt: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHashTable): 2011-09-16 Iain Merrick [chromium] Fix CCLayerTreeHostTest https://bugs.webkit.org/show_bug.cgi?id=67418 This is a minimal set of changes to get CCLayerTreeHostTest compiling, running and passing with USE_THREADED_COMPOSITING enabled. Reviewed by James Robinson. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::createLayerTreeHostImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Sheriff Bot Unreviewed, rolling out r95227. http://trac.webkit.org/changeset/95227 https://bugs.webkit.org/show_bug.cgi?id=68262 Broke a bunch of SVG tests (Requested by andersca on #webkit). * platform/ScrollView.cpp: (WebCore::ScrollView::contentsSize): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformContentsSize): * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformContentsSize): 2011-09-16 James Simonsen Fix HTML5 parser's adoption agency algorithm to reparent correctly https://bugs.webkit.org/show_bug.cgi?id=68147 Reviewed by Eric Seidel. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-09-16 Adam Barth CodeGeneratorGObject should use C++ style comments for ENABLE guards https://bugs.webkit.org/show_bug.cgi?id=68256 Reviewed by Darin Adler. This patch should have not behavioral effect. It just cleans up the GObject code generator to use C++-style comments for ENABLE guards and to use the usual comment style for license blocks. * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2011-09-16 Csaba Osztrogonác [Qt] REGRESSION(r95091) It made many tests flakey https://bugs.webkit.org/show_bug.cgi?id=68232 Unreviewed rolling out r95091 and followup patches. * English.lproj/localizedStrings.js: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willCallFunction): * inspector/InspectorTimelineAgent.cpp: * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-09-16 Abhishek Arya cachedFont not getting updated for inline SVG text. https://bugs.webkit.org/show_bug.cgi?id=68060 Reviewed by Nikolas Zimmermann. The cached scaledFont needs to be updated on every style set call. It is not similar to m_style which can get derived from parent's style and hence will get automatically updated on ancestor's style change. This is required, otherwise we will maintain stale font list in cached scaledFont when custom fonts are retired on Document::recalcStyle. Test: svg/text/text-style-recalc-crash.html * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::styleDidChange): (WebCore::RenderSVGInlineText::setStyle): * rendering/svg/RenderSVGInlineText.h: 2011-09-16 Antti Koivisto REGRESSION (r95052): SelectorChecker identifier filter not working https://bugs.webkit.org/show_bug.cgi?id=68244 Reviewed by Dan Bernstein. Missing &. * css/SelectorChecker.cpp: (WebCore::collectDescendantSelectorIdentifierHashes): 2011-09-16 Csaba Osztrogonác Unreviewed typo fix after r95271. * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: 2011-09-16 Andrey Kosyakov Web Inspector: [Extensions API] support extensions for remote inspector front-end https://bugs.webkit.org/show_bug.cgi?id=67840 Reviewed by Pavel Feldman. - Merge ExtensionCommon.js into ExtensionAPI.js - refactor building of extension API for better reuse - expose interface for extension registration * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (buildExtensionAPIInjectedScript): * inspector/front-end/ExtensionCommon.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): (WebInspector.ExtensionServer.prototype._buildExtensionAPIScript): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerExtension): (WebInspector.ExtensionServer.prototype._expandResourcePath): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-16 Ilya Tikhonovsky Web Inspector: change WebInspector.currentPanel getter/setter to functions. https://bugs.webkit.org/show_bug.cgi?id=68242 This is necessary for the panel switching performance tests. Reviewed by Pavel Feldman. * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished): (WebInspector.Drawer.prototype._animateDrawerHeight): (WebInspector.Drawer.prototype._statusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.switchToAndFocus): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchMatchesCount): (WebInspector.SearchController.prototype.updateCurrentMatchIndex): (WebInspector.SearchController.prototype.updateSearchLabel): (WebInspector.SearchController.prototype.handleShortcut): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.createPanelToolbarItem.onToolbarItemClicked): (WebInspector.Toolbar.createPanelToolbarItem): * inspector/front-end/inspector.js: (WebInspector.currentPanel): (WebInspector._updateFocusedNode): (WebInspector.windowResize): (WebInspector.documentKeyDown): (WebInspector.documentCanCopy): (WebInspector.documentCopy): (WebInspector.showPanel): (WebInspector.startUserInitiatedDebugging): (WebInspector.inspect): (WebInspector._showAnchorLocationInPanel): (WebInspector._toolbarItemClicked): (WebInspector.PanelHistory.prototype.goBack): (WebInspector.PanelHistory.prototype.goForward): 2011-09-15 Pavel Feldman Web Inspector: rename Console.clearConsoleMessages to Console.clearMessages, brush up console domain doc. https://bugs.webkit.org/show_bug.cgi?id=68165 Reviewed by Yury Semikhatsky. * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::clearConsoleMessages): * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::clearMessages): * inspector/InspectorConsoleAgent.h: * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype.requestClearMessages): 2011-09-16 Alejandro G. Castro Fix GTK build after r95245. * GNUmakefile.list.am: 2011-09-16 Leo Yang [Qt] Crash when dragging google maps. https://bugs.webkit.org/show_bug.cgi?id=68223 The custom image for a cursor might not be ready when WebKit trying to use it to construct the cursor in Qt porting. This patch is using arrow image to substitute the unready custom image. Reviewed by Adam Barth. Test: fast/css/crash-on-custom-cursor-when-loading.html * platform/qt/CursorQt.cpp: (WebCore::createCustomCursor): (WebCore::Cursor::ensurePlatformCursor): 2011-09-15 Adam Barth Rename ENABLE(DATABASE) to ENABLE(SQL_DATABASE) https://bugs.webkit.org/show_bug.cgi?id=68205 Reviewed by Eric Seidel. As discussed on webkit-dev. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * UseJSC.cmake: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::databaseId): * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSSQLTransactionSyncCustom.cpp: * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: * bindings/scripts/test/CPP/WebDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/JS/JSTestCallback.cpp: * bindings/scripts/test/JS/JSTestCallback.h: * bindings/scripts/test/ObjC/DOMTestCallback.mm: * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: * bindings/scripts/test/V8/V8TestCallback.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::databaseIdCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8SQLTransactionCustom.cpp: * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: * dom/Document.cpp: * dom/Document.h: * dom/ExceptionCode.cpp: (WebCore::getExceptionCodeDescription): * dom/ExceptionCode.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): * dom/ScriptExecutionContext.h: * features.pri: * history/PageCache.cpp: (WebCore::logCanCacheFrameDecision): (WebCore::PageCache::canCachePageContainingThisFrame): * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): (WebCore::InjectedScriptHost::disconnect): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::restoreInspectorStateFromCookie): * inspector/InspectorController.h: * inspector/InspectorDatabaseAgent.cpp: * inspector/InspectorDatabaseInstrumentation.h: * inspector/InspectorDatabaseResource.cpp: * inspector/InspectorDatabaseResource.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::InstrumentingAgents): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): * loader/EmptyClients.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/ChromeClient.h: * page/DOMWindow.cpp: * page/DOMWindow.h: * page/DOMWindow.idl: * platform/sql/SQLiteAuthorizer.cpp: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteFileSystem.cpp: * platform/sql/SQLiteStatement.cpp: * platform/sql/SQLiteTransaction.cpp: * storage/AbstractDatabase.cpp: * storage/AbstractDatabase.h: * storage/ChangeVersionWrapper.cpp: * storage/ChangeVersionWrapper.h: * storage/Database.cpp: * storage/Database.h: * storage/Database.idl: * storage/DatabaseAuthorizer.cpp: * storage/DatabaseCallback.h: * storage/DatabaseCallback.idl: * storage/DatabaseDetails.h: * storage/DatabaseSync.cpp: * storage/DatabaseSync.h: * storage/DatabaseSync.idl: * storage/DatabaseTask.cpp: * storage/DatabaseTask.h: * storage/DatabaseThread.cpp: * storage/DatabaseThread.h: * storage/DatabaseTracker.cpp: * storage/DatabaseTracker.h: * storage/DatabaseTrackerClient.h: * storage/OriginQuotaManager.cpp: * storage/OriginQuotaManager.h: * storage/OriginUsageRecord.cpp: * storage/OriginUsageRecord.h: * storage/SQLCallbackWrapper.h: * storage/SQLError.h: * storage/SQLError.idl: * storage/SQLException.h: * storage/SQLException.idl: * storage/SQLResultSet.cpp: * storage/SQLResultSet.h: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.cpp: * storage/SQLResultSetRowList.h: * storage/SQLResultSetRowList.idl: * storage/SQLStatement.cpp: * storage/SQLStatement.h: * storage/SQLStatementCallback.h: * storage/SQLStatementCallback.idl: * storage/SQLStatementErrorCallback.h: * storage/SQLStatementErrorCallback.idl: * storage/SQLStatementSync.cpp: * storage/SQLStatementSync.h: * storage/SQLTransaction.cpp: * storage/SQLTransaction.h: * storage/SQLTransaction.idl: * storage/SQLTransactionCallback.h: * storage/SQLTransactionCallback.idl: * storage/SQLTransactionClient.cpp: * storage/SQLTransactionClient.h: * storage/SQLTransactionCoordinator.cpp: * storage/SQLTransactionCoordinator.h: * storage/SQLTransactionErrorCallback.h: * storage/SQLTransactionErrorCallback.idl: * storage/SQLTransactionSync.cpp: * storage/SQLTransactionSync.h: * storage/SQLTransactionSync.idl: * storage/SQLTransactionSyncCallback.h: * storage/SQLTransactionSyncCallback.idl: * storage/chromium/DatabaseObserver.h: * storage/chromium/DatabaseTrackerChromium.cpp: * storage/chromium/QuotaTracker.cpp: * storage/chromium/QuotaTracker.h: * storage/chromium/SQLTransactionClientChromium.cpp: * workers/WorkerContext.cpp: * workers/WorkerContext.h: * workers/WorkerContext.idl: * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownStartTask::performTask): (WebCore::WorkerThread::stop): 2011-09-15 Alexandru Chiculita [CSSRegions] Regions should not slice line box rendering https://bugs.webkit.org/show_bug.cgi?id=66198 Created a new LayoutState constructor for the RenderFlowThread. It will set m_isPaginated to true and force a pageHeight if 1. The actual pageHeight is not used, because pageLogicalHeightForOffset will actually redirect the call to RenderFlowThread. Removed some of the duplicate code that calculated the page logical offset. Added new methods like logicalPageOffset, pageLogicalHeightForOffset, pageRemainingLogicalHeightForOffset. There are still some issues related to incremental layout and different region widths. Those issues will be addressed in different patches. Reviewed by David Hyatt. Tests: fast/regions/text-region-breaks.html fast/regions/text-region-split-horizontal-bt.html fast/regions/text-region-split-vertical-rl.html fast/regions/text-region-split-vertical.html fast/regions/text-region-split.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/LayoutState.h: (WebCore::LayoutState::LayoutState): (WebCore::LayoutState::isPaginated): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::nextPageLogicalTopExcludingBoundaryPoint): (WebCore::RenderBlock::nextPageLogicalTopIncludingBoundaryPoint): (WebCore::inNormalFlow): (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::logicalPageOffset): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::adjustLinePositionForPagination): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::regionLogicalHeightForLine): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): * rendering/RenderFlowThread.h: * rendering/RenderView.cpp: (WebCore::RenderView::pushLayoutState): * rendering/RenderView.h: (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): (WebCore::LayoutStateMaintainer::push): 2011-09-15 Kentaro Hara Implement a PopStateEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67977 Reviewed by Sam Weinig. Test: fast/events/constructors/pop-state-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the PopStateEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for PopStateEvent. * dom/PopStateEvent.cpp: (WebCore::PopStateEventInit::PopStateEventInit): (WebCore::PopStateEvent::PopStateEvent): (WebCore::PopStateEvent::create): * dom/PopStateEvent.h: Added a definition for PopStateEventInit. * dom/PopStateEvent.idl: Makes PopStateEvent constructible. 2011-09-15 Mihai Parparita Fragment navigations should interrupt a provisional load of a different document https://bugs.webkit.org/show_bug.cgi?id=64556 Reviewed by Adam Barth. Tests: http/tests/history/back-with-fragment-change.php http/tests/navigation/navigation-interrupted-by-fragment.html * loader/FrameLoader.cpp: Stop provisional load if a fragment commits. * loader/HistoryController.cpp: Don't commit the wrong provisional item. 2011-09-15 Adrienne Walker [chromium] Add temporary diagnostics for LayerTreeHost::commitTo crash https://bugs.webkit.org/show_bug.cgi?id=68204 Reviewed by James Robinson. Add CRASH calls to determine which assumptions are being violated. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): 2011-09-15 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (7/7) https://bugs.webkit.org/show_bug.cgi?id=68122 Reviewed by Geoffrey Garen. No new tests. Completed the seventh and final level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This consists of moving the finishCreation() method call into the create methods of the sixth level of the hierarchy as was done in previous patches. The special cases for JSAudioConstructor, JSOptionConstructor, and JSImageConstructor were also lumped in and given finishCreation() methods that are called in their create methods because we are at the end and want to avoid a trivial patch just for moving their finishCreation() methods from their constructor to their create method. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): (WebCore::JSAudioConstructor::finishCreation): * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::create): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): (WebCore::JSImageConstructor::finishCreation): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::create): * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): (WebCore::JSOptionConstructor::finishCreation): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::create): * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::JSWorkerContextBase): The bindings generation script was also changed to move the finishCreation() call into the create methods for descendants of JSWorkerContextBase and JSDOMWindowBase because those base classes had it removed from their constructors. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): (JavaRuntimeMethod::JavaRuntimeMethod): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): (ObjCRuntimeMethod::ObjCRuntimeMethod): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): (JSC::Bindings::QtRuntimeConnectionMethod::create): 2011-09-15 Kentaro Hara A single line must not be split into two pages. https://bugs.webkit.org/show_bug.cgi?id=65005 Reviewed by David Hyatt. When the document width of a page is overflowed, the last line of the page can be split into the next page. This is the regression caused by r88737. r88737 tried to fix rounding errors in rendering calculations by expanding and shrinking a page using one common method, resizePageRectsKeepingRatio(), but overlooked the case where a document width gets overflowed. This patch fixes the problem by also using resizePageRectsKeepingRatio() for the case where the document width gets overflowed. Test: printing/single-line-must-not-be-split-into-two-pages.html * WebCore.exp.in: Updated the signature of forceLayoutForPagination(). * page/Frame.cpp: (WebCore::Frame::setPrinting): Added a new argument |originalPageSize|, which is an original page size before being expanded or shrunk. * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): Uses resizePageRectsKeepingRatio() in the case where the document width gets overflowed. * page/FrameView.h: * page/PrintContext.cpp: (WebCore::PrintContext::begin): Passes an original page size to setPrinting(). (WebCore::PrintContext::end): Ditto. 2011-09-15 Sheriff Bot Unreviewed, rolling out r95243 and r95246. http://trac.webkit.org/changeset/95243 http://trac.webkit.org/changeset/95246 https://bugs.webkit.org/show_bug.cgi?id=68202 Broke the Windows build (Requested by smfr on #webkit). * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::hookCallback): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copy): * platform/win/StructuredExceptionHandlerSupressor.h: Removed. 2011-09-15 Simon Fraser Attempt to fix Windows build after r95243. * WebCore.vcproj/WebCore.vcproj: 2011-09-15 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel differences between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by James Robinson. Add new scrollbar theme, called ScrollbarThemeMock, for use in layout tests. The mock scrollbar simply draws a light gray box in the track, with a dark gray box for the thumb. Add ScrollbarThemeMock files to the build on all platforms. It isn't hooked up yet. * CMakeLists.txt: * CMakeListsEfl.txt: * CMakeListsWinCE.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarTheme::nativeTheme): * platform/mock/ScrollbarThemeMock.cpp: Added. (WebCore::ScrollbarThemeMock::trackRect): (WebCore::ScrollbarThemeMock::scrollbarThickness): (WebCore::ScrollbarThemeMock::paintTrackBackground): (WebCore::ScrollbarThemeMock::paintThumb): * platform/mock/ScrollbarThemeMock.h: Added. (WebCore::ScrollbarThemeMock::hasButtons): (WebCore::ScrollbarThemeMock::hasThumb): (WebCore::ScrollbarThemeMock::backButtonRect): (WebCore::ScrollbarThemeMock::forwardButtonRect): 2011-09-15 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67884 Delete button icon does not properly update when the device resolution changes dynamically -and corresponding- Reviewed by Darin Adler. In DeleteButtonController::deviceScaleFactorChanged(), if the delete button is currently showing, hide it and re-show it, forcing it to re-create the deletion UI. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::deviceScaleFactorChanged): * editing/DeleteButtonController.h: * editing/Editor.cpp: (WebCore::Editor::deviceScaleFactorChanged): * editing/Editor.h: Iterate through all of the frames and propagate the deviceScaleFactorChange() message to Editor. * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): 2011-09-15 Chris Marrin Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction https://bugs.webkit.org/show_bug.cgi?id=67510 Reviewed by Adam Roben. Another fix to take care of one last crash when running pause-crash.html. CACF can't deal with null valueFunctions, so avoid setting it when it doesn't exist. This also adds logic to the Windows Hook in LayerChangesFlusher to prevent it from catching the null pointer exception generated by the pause-crash.html test before this bug was fixed. Windows was ignoring the exception, so the testcase would appear to succeed, even though it should have crashed. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::hookCallback): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copy): * platform\win\StructuredExceptionHandlerSupressor.h: New file to encapsulate the exception handling supression. 2011-09-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=27579 Make sure that the border shorthand also resets border-image. Reviewed by Beth Dakin. Added fast/borders/border-image-reset-by-border-shorthand.html. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2011-09-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=50072 Make overflow clipping to border-radius work across layers. This patch makes painting work but does not attempt to fix hit testing. It also doesn't work when a composited layer is clipped by a non-composited ancestor. Add a new ClipRect class (used by ClipRects and RenderLayer) that is basically just tracking a rect and a border radius taint. At the time we set a clip, if the rectangle is listed as also being clipped by a radius, then we walk up the layer tree and push those inner border rounded rect clips for any overflow areas in the containing block chain. Reviewed by Beth Dakin. Added new tests in fast/clip. * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): * rendering/RenderLayer.cpp: (WebCore::inContainingBlockChain): (WebCore::RenderLayer::clipToRect): (WebCore::RenderLayer::restoreClip): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::backgroundClipRect): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::childrenClipRect): (WebCore::RenderLayer::selfClipRect): * rendering/RenderLayer.h: (WebCore::ClipRect::ClipRect): (WebCore::ClipRect::rect): (WebCore::ClipRect::setRect): (WebCore::ClipRect::hasRadius): (WebCore::ClipRect::setHasRadius): (WebCore::ClipRect::operator==): (WebCore::ClipRect::intersect): (WebCore::ClipRect::move): (WebCore::ClipRect::isEmpty): (WebCore::ClipRect::intersects): (WebCore::intersection): (WebCore::ClipRects::overflowClipRect): (WebCore::ClipRects::setOverflowClipRect): (WebCore::ClipRects::fixedClipRect): (WebCore::ClipRects::setFixedClipRect): (WebCore::ClipRects::posClipRect): (WebCore::ClipRects::setPosClipRect): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::clippedByAncestor): * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): 2011-09-15 Julien Chaffraix Crash in RenderBox::paintMaskImages due to a mask without an associated image https://bugs.webkit.org/show_bug.cgi?id=50151 Reviewed by Simon Fraser. Test: fast/css/empty-webkit-mask-crash.html The crash stems from the fact that FillLayer::hasImage would walk over the linked list of FillLayers and return true if one had an image. This means that hasImage() is true does not mean that image() is non-NULL on all FillLayers. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMaskImages): Simplify the logic by doing the hasImage() check up-front and properly check image() for each FillLayers. This has the nice benefit of changing the complexity from O(n^2) to O(n), which was what the code expected anyway. 2011-09-15 Eric Seidel Remove ENABLE(SVG_AS_IMAGE) since all major ports have it on by default https://bugs.webkit.org/show_bug.cgi?id=68182 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::createImage): 2011-09-15 Andy Estes Having an empty listener to beforeload events changes the behavior of other scripts https://bugs.webkit.org/show_bug.cgi?id=45586 Reviewed by Darin Adler. Test: fast/dom/beforeload/cached-image-before-load.html When loading a cached image after a beforeload handler has been installed on the document, ImageLoader would dispatch both the beforeload and load events asynchronously in such a way that caused load to fire first. Since a side effect of firing the beforeload event is to wire up the CachedImage to its associated RenderImage object, this work was not done by the time load fired, and scripts that queried renderer-dependent attributes of the image in an onload handler would get bogus values in return. Fix this by ensuring load fires after beforeload in the cached image case. * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Call setClient() after dispatching beforeload, since setClient() will dispatch the load event if the image is cached. 2011-09-15 Anders Carlsson Remove ScrollView::platformContentsSize https://bugs.webkit.org/show_bug.cgi?id=68188 Reviewed by Darin Adler. Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never have to ask the underlying platform scroll view for contents size since it should always just be equal to m_contentsSize. * platform/ScrollView.cpp: (WebCore::ScrollView::contentsSize): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: * platform/wx/ScrollViewWx.cpp: 2011-09-15 Jon Lee Submitting a form with target=_blank works only once https://bugs.webkit.org/show_bug.cgi?id=28633 Reviewed by Andy Estes. Test: fast/forms/submit-to-blank-multiple-times.html The call to reset the multiple form submission bool is pushed down from the mouseDown handler to handleMousePressEvent(), to include WK2 coverage, similar to keyEvent. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::keyEvent): clarified old FIXME comment. Both key events and mouse events may submit a form multiple times, but the call to reset the handler should probably be in another abstraction layer. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::mouseDown): 2011-09-15 Peter Rybin XMLDocumentParserQt.cpp incorrectly converts 0-based number into 1-based number https://bugs.webkit.org/show_bug.cgi?id=63540 ZeroBasedNumber/OneBasedNumber are used in more places, inconsistency in xml parser is fixed. Reviewed by Adam Barth. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::eventHandlerLineNumber): * dom/ScriptableDocumentParser.h: * dom/StyleElement.cpp: (WebCore::StyleElement::StyleElement): * dom/ViewportArguments.cpp: (WebCore::parserLineNumber): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::lineNumber): * html/parser/HTMLDocumentParser.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::buildInitiatorObject): * svg/SVGDocumentExtensions.cpp: (WebCore::parserLineNumber): * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::lineNumber): * xml/parser/NewXMLDocumentParser.h: * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::pushCurrentNode): * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::error): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): 2011-09-15 Peter Kasting Fix WebCore.gypi after r95130. Unreviewed, build fix. * WebCore.gypi: 2011-09-15 Eric Seidel Remove ENABLE_SVG_ANIMATION as all major ports have it on by default https://bugs.webkit.org/show_bug.cgi?id=68022 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: * page/DOMWindow.idl: * svg/svgtags.in: 2011-09-15 Matthew Delaney REGRESSION (Safari 5.1-r95043): Incorrect box-shadow offset https://bugs.webkit.org/show_bug.cgi?id=68041 Reviewed by Dan Bernstein. Test: fast/box-shadow/no-blur-multiple-offsets.html * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): Add hack back in for Lion if context is not accelerated. 2011-09-15 James Simonsen Ref protect HTMLObjectElement and HTMLEmbedElement while requesting plugins https://bugs.webkit.org/show_bug.cgi?id=68014 Reviewed by Adam Barth. Test: plugins/destroy-during-npp-new.html under valgrind plugins/destroy-during-npp-new-object-with-fallback-content.html under valgrind * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): 2011-09-15 Sam Weinig Experiment with removing ability to call a collection (except document.all) https://bugs.webkit.org/show_bug.cgi?id=67579 Reviewed by Anders Carlsson. At the request of the public-script-coord mailing list (specifically Brendan Eich, see http://lists.w3.org/Archives/Public/public-script-coord/2011JulSep/0360.html), this patch removes the ability to call a collection (either a NodeList or HTMLCollection, but not an HTMLAllCollection) as function, a syntax that we adopted to emulate IE. It is being landed to find out if there are any sites relying on this behavior of WebKit, or, if it is only used in IE only paths. If we find sites are breaking, it should be rolled out and we should inform the public-script-coord mailing list. * bindings/js/JSHTMLAllCollectionCustom.cpp: Update comment. * bindings/js/JSHTMLCollectionCustom.cpp: * bindings/js/JSNodeListCustom.cpp: Remove custom call code. * bindings/scripts/CodeGeneratorV8.pm: Add support for V8CustomCall. * dom/NodeList.idl: * html/HTMLCollection.idl: Remove CustomCall. 2011-09-15 Andreas Kling CanvasRenderingContext2D::State copy ctor should use initializer list. https://bugs.webkit.org/show_bug.cgi?id=68152 Reviewed by Darin Adler. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): 2011-09-15 Andreas Kling Don't bother calculating dirty rect for accelerated 2D canvases. https://bugs.webkit.org/show_bug.cgi?id=68158 Reviewed by Kenneth Rohde Christiansen. For accelerated CanvasRenderingContext2D, didDraw() simply calls out to RenderLayer::contentChanged(). Move this to the top of didDraw() so we don't waste time calculating a precise dirty rect. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::didDraw): 2011-09-15 Brian Salomon [Skia/Chrome] Cleanup unneeded code now that GrGLInterface is used to set GL ctx per GL call. https://bugs.webkit.org/show_bug.cgi?id=68096 Reviewed by Stephen White. This change removes PlatformContextSkia::makeGrContextCurrent now that GrGLInterface is used to set the context on every Skia GL call. Tested by every canvas layout test. * platform/graphics/chromium/FontLinux.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clearRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::drawFocusRing): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawLineForTextChecking): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::strokeRect): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::paintSkiaText): 2011-09-15 Peter Beverloo [Chromium] Make sure that the ARM NEON files build with -marm https://bugs.webkit.org/show_bug.cgi?id=68088 Simply adding the -marm cflag for OS=Android compiles results in it being overridden by an -mthumb cflag later in the project generating process. Therefore we should explicitly exclude -mthumb. Reviewed by Tony Gentilcore. * WebCore.gyp/WebCore.gyp: 2011-09-15 Keishi Hattori [chromium] Build fix: Remove use of GraphicsContext::setIsAcceleratedContext r95174 introduced GraphicsContext::setIsAcceleratedContext into Skia code and caused chromium builds to fail. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): 2011-09-15 Yuta Kitamura ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. https://bugs.webkit.org/show_bug.cgi?id=67908 Reviewed by David Levin. Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector. ThreadableWebSocketChannelClientWrapper is derived from ThreadSafeRefCounted. It may be destroyed on different threads, which will affect String's refcounting. Therefore, classes derived from ThreadSafeRefCounted must not have a String member variable. No change in functionality, thus no new tests. WebSocket worker tests (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): Create a String from Vector. Note that String constructor taking an empty vector returns a null string, not an empty string. We want an empty string in that case, so I had to add special-case handling for an empty vector. (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Copy the content of the given String into Vector. * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-14 Matthew Delaney Use isAcceleratedContext() on the GraphicsContext instead of flags in ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=68137 Reviewed by Simon Fraser. No new tests. No change in behavior. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::isAccelerated): Have all just query the context directly. (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): just use isAccelerated directly * platform/graphics/ImageBuffer.h: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): Set isAcceleratedContext on the GraphicsContext instead of carrying the bit around on the ImageBuffer itself. (WebCore::ImageBuffer::copyNativeImage): Update the check. Same for all below... (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): * platform/graphics/skia/ImageBufferSkia.cpp: Set isAcceleratedContext on the GraphicsContext instead of carrying the bit around on the ImageBuffer itself. (WebCore::ImageBuffer::ImageBuffer): Remove m_acceleratesRendering flag and getter. 2011-09-14 Jeffrey Pfau libxml2 fragment parser loses prefix namespaces https://bugs.webkit.org/show_bug.cgi?id=66423 This makes the loop over the elements outside of the context actually update the element it's processing. Reviewed by Eric Seidel. Test: fast/parser/innerhtml-with-prefixed-elements.xhtml * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-09-14 Nate Chapin [V8] Null-check the v8::Context in V8DOMWindowShell:namedItemAdded() before using it. Also, add some logging to figure out how we're getting into this bad state. https://bugs.webkit.org/show_bug.cgi?id=68099 Reviewed by Adam Barth. No new tests, no known repro. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-14 Patrick Gansterer Replace ENABLE_XHR_RESPONSE_BLOB preprocessor statements in IDL files with Conditional attribute https://bugs.webkit.org/show_bug.cgi?id=64960 Reviewed by Ryosuke Niwa. * xml/XMLHttpRequest.idl: 2011-09-14 Alexei Svitkine Chromium: Add a layer for rubber-band overhang painting to the hardware path. https://bugs.webkit.org/show_bug.cgi?id=66969 Also, add layout tests for rubber-band overhang drawing for compositing path. Reviewed by James Robinson. * page/FrameView.cpp: (WebCore::FrameView::layerForOverhangAreas): * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::scrollContents): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/ScrollableArea.h: (WebCore::ScrollableArea::layerForOverhangAreas): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::paintContents): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): (WebCore::RenderLayerCompositor::destroyRootLayer): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::layerForOverhangAreas): 2011-09-14 Antoine Labour Remove the dependency on GraphicsLayer from CCLayerTreeHost. Move root layer management into the NonCompositedContentHost. Have WebViewImpl create a NonCompositedContentHost explicitly. https://bugs.webkit.org/show_bug.cgi?id=67883 Reviewed by James Robinson. Covered by compositing/ layout tests. * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::setRootLayer): (WebCore::NonCompositedContentHost::setViewport): (WebCore::NonCompositedContentHost::setVisible): (WebCore::NonCompositedContentHost::clearRenderSurfacesRecursive): (WebCore::NonCompositedContentHost::invalidateRect): * platform/graphics/chromium/NonCompositedContentHost.h: (WebCore::NonCompositedContentHost::topLevelRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): 2011-09-14 Henrik Grunell MediaStream API: Change PeerConnection constructor name to webkitPeerConnection https://bugs.webkit.org/show_bug.cgi?id=67843 Reviewed by Tony Gentilcore. Tests for the MediaStream API will be provided by the bug 56587, pending enough landed code. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitPeerConnectionEnabled): * page/DOMWindow.idl: 2011-09-14 John Bauman Make sure to GC decoded images that are only used with WebGL https://bugs.webkit.org/show_bug.cgi?id=67899 Reviewed by James Robinson. Tell CachedImage that the WebGL image was drawn so WebGL-only content will have decoded images collected. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractImageData): 2011-09-14 Antoine Labour Added a pure virtual class CCLayerDelegate which helps to isolate the chromium compositor from the rest of WebCore, and aids unit testing by being easily mockable. The compositor layers no longer directly see instances of GraphicsLayerChromium, instead they use this interface. https://bugs.webkit.org/show_bug.cgi?id=67750 Reviewed by James Robinson. No new tests: changes already covered by existing compositing layout tests. * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerChromium::create): (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::getDrawsContent): (WebCore::GraphicsLayerChromium::getPreserves3D): (WebCore::GraphicsLayerChromium::paintingGoesToWindow): (WebCore::GraphicsLayerChromium::doPaintGraphicsLayerContents): (WebCore::GraphicsLayerChromium::notifySyncRequired): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::create): (WebCore::ImageLayerChromium::ImageLayerChromium): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::create): (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/LayerChromium.h: (WebCore::CCLayerDelegate::~CCLayerDelegate): (WebCore::LayerChromium::preserves3D): (WebCore::LayerChromium::setOwner): * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::create): (WebCore::PluginLayerChromium::PluginLayerChromium): * platform/graphics/chromium/PluginLayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::create): (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::create): (WebCore::WebGLLayerChromium::WebGLLayerChromium): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-09-14 Anders Carlsson Try to fix GTK+ build. * GNUmakefile.list.am: 2011-09-14 James Robinson [chromium] LayerRendererChromium shouldn't be RefCounted https://bugs.webkit.org/show_bug.cgi?id=68121 Reviewed by Kenneth Russell. LayerRendererChromium is owned exclusively by CCLayerTreeHostImpl, so there's no reason to have it be refcounted. Making it an OwnPtr<> makes the lifecycle for these objects much cleaner and reduces the chance of introducing accidental reference cycles. This also removes the LayerRendererChromium pointers from CCLayerImpls since it only needed at draw time. Covered by compositing/ tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::draw): (WebCore::CCLayerImpl::bindContentsTexture): (WebCore::CCLayerImpl::drawDebugBorder): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::cleanupResources): (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-09-14 Anders Carlsson Get rid of WebCoreViewFactory and its WebViewFactory subclass https://bugs.webkit.org/show_bug.cgi?id=68124 Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/mac/FrameSelectionMac.mm: * page/mac/FrameMac.mm: * page/mac/WebCoreViewFactory.h: Removed. * page/mac/WebCoreViewFactory.m: Removed. 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=52736 Tiles were not being properly centered within border image sides for the "repeat" keyword. This patch fixes the buggy math behind the pattern tiling to actually get the initial phases correct. Reviewed by Sam Weinig. Added new tests in fast/borders and updated broken existing tests. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): 2011-09-14 Anders Carlsson Remove DocTypeStrings.gperf https://bugs.webkit.org/show_bug.cgi?id=68119 Reviewed by Sam Weinig. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/DocTypeStrings.gperf: Removed. * make-hash-tools.pl: * platform/HashTools.h: 2011-09-14 Chris Rogers Address lifetime issues in OfflineAudioDestinationNode (take 2) https://bugs.webkit.org/show_bug.cgi?id=68111 Reviewed by Kenneth Russell. No new tests. This fixes existing layout tests. * webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::startRendering): (WebCore::OfflineAudioDestinationNode::render): 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68103 Centered portions of border images don't render correctly. Make the tile scale factor have to be explicitly passed in and modify paintNinePieceImage to compute it for all sides. The attempts to implicitly compute the scale for the pattern based off the source and destination rects just don't work, since the center image rects don't provide the right information to be able to infer the scale factor. Reviewed by Sam Weinig. Reset all the existing fast/borders pixel results to Lion for these changes. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2011-09-14 Anders Carlsson Get rid of ResourceHandle::bufferedData() https://bugs.webkit.org/show_bug.cgi?id=68112 Reviewed by David Hyatt. ResourceHandle::bufferedData() was only implemented on Mac, and the support in the underlying NSURLConnection class hasn't been there for several OS releases. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::resourceData): (WebCore::ResourceLoader::addData): * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: * platform/network/curl/ResourceHandleCurl.cpp: * platform/network/mac/ResourceHandleMac.mm: * platform/network/qt/ResourceHandleQt.cpp: * platform/network/soup/ResourceHandleSoup.cpp: * platform/network/win/ResourceHandleWin.cpp: 2011-09-14 Mark Hahnenberg REGRESSION: r95108 broke Qt Linux tests https://bugs.webkit.org/show_bug.cgi?id=68104 Reviewed by Csaba Osztrogonác. No new tests. Build fix for Qt tests broken in r95108. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: 2011-09-14 James Robinson [skia] fast/canvas/setWidthResetAfterForcedRender is flaky https://bugs.webkit.org/show_bug.cgi?id=67955 Reviewed by Stephen White. When destroying an ImageBuffer due to a canvas resize, we weren't clearing the texture ID on the layer, resulting in future compositor draw calls binding an invalid texture. This results in the test failing and possibly drawing from a bad texture. Covered by fast/canvas/setWidthResetAfterForcedRender.html in the GPU configuration. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent) * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-09-14 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. I missed a couple uses of SVG_USE in my previous patch. * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/SVGUseElement.h: 2011-09-14 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (6/7) https://bugs.webkit.org/show_bug.cgi?id=67692 Reviewed by Geoffrey Garen. No new tests. Completed the sixth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the fifth level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): (WebCore::DOMConstructorWithDocument::finishCreation): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::finishCreation): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::JSWorkerContextBase): (WebCore::JSWorkerContextBase::finishCreation): * bindings/js/JSWorkerContextBase.h: * bindings/scripts/CodeGeneratorJS.pm: Added a finishCreation declaration and Moved the finishCreation call into the create method for all classes except for subclasses of JSWorkerContextBase and JSDOMWindowBase because those classes are on the next level, and it's easier to do all of these classes in one fell swoop rather than level by level. (GenerateHeader): Added the implementation of the finishCreation method for the classes described above. (GenerateImplementation): Also added the finishCreation calls to the autogenerated DOM constructor classes. (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::create): (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor): (WebCore::JSTestInterfaceConstructor::finishCreation): (WebCore::JSTestInterface::JSTestInterface): (WebCore::JSTestInterface::finishCreation): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::create): (WebCore::JSTestInterfacePrototype::create): (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::create): (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor): (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation): (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): (WebCore::JSTestMediaQueryListListener::finishCreation): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): (WebCore::JSTestMediaQueryListListenerPrototype::create): (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::create): (WebCore::JSTestObjConstructor::JSTestObjConstructor): (WebCore::JSTestObjConstructor::finishCreation): (WebCore::JSTestObj::JSTestObj): (WebCore::JSTestObj::finishCreation): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): (WebCore::JSTestObjPrototype::create): (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation): (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): (WebCore::JSTestSerializedScriptValueInterface::finishCreation): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): (JSC::Bindings::CRuntimeMethod::finishCreation): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::JavaRuntimeMethod): (JavaRuntimeMethod::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::ObjCRuntimeMethod): (ObjCRuntimeMethod::finishCreation): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::create): (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::create): (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeMetaMethod::finishCreation): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): (JSC::Bindings::QtRuntimeConnectionMethod::finishCreation): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_method.h: (JSC::RuntimeMethod::create): 2011-09-13 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: 2011-09-14 Eric Carlson MediaPlayerPrivateAVFoundationObjC's "periodic time observer" is unnecessary https://bugs.webkit.org/show_bug.cgi?id=68056 MediaPlayerPrivateAVFoundationObjC creates a "periodic time observer" not because it wants periodic callbacks, but because a time observer also fires whenever a seek completes. This is no longer necessary because it now uses but AVPlayerItem's -seekToTime:toleranceBefore:toleranceAfter:completionHandler to seek, so seek completions are always notified. Reviewed by Darin Adler. No new tests, code removed is tested by existing tests. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): 2011-09-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=68054 Return an image scale factor as well as an Image* from CachedImage::brokenImage() Reviewed by Darin Adler. CachedImage::brokenImage() now returns a pair where the float represents the image's scale factor. This is important because currently, the broken image will either be only 1x or 2x, but a deviceScaleFactor could theoretically be something different (1.5, 3, etc). So it is not safe to assume that the image's scale factor is equivalent to the deviceScaleFactor, and hardcoding 2 for now is lame. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): * loader/cache/CachedImage.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): 2011-09-14 James Robinson [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67440 Reviewed by Kenneth Russell. This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path to make sure that textures are deleted even if the page is not visible. This move also removed the need for LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well. That meant moving the layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway. Covered by existing compositing/ tests and platform/chromium/compositor/lost-compositor-context-with-rendersurface.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): (WebCore::TextureManager::lowLimitBytes): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68040 Make sure border image sub-properties can be specified in any order. Reviewed by Beth Dakin. New tests in fast/borders. * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::canAdvance): (WebCore::BorderImageParseContext::setCanAdvance): (WebCore::BorderImageParseContext::allowCommit): (WebCore::BorderImageParseContext::allowImage): (WebCore::BorderImageParseContext::allowImageSlice): (WebCore::BorderImageParseContext::allowSlash): (WebCore::BorderImageParseContext::requireWidth): (WebCore::BorderImageParseContext::requireOutset): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: (WebCore::CSSParserValueList::previous): 2011-09-14 Mike Reed query SystemParametersInfo for GDI font smoothing settings https://bugs.webkit.org/show_bug.cgi?id=68080 Reviewed by Stephen White. No new tests. fixes antialiasing issues based on User settings * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::getDefaultGDITextFlags): (WebCore::setupPaintForFont): 2011-09-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68050 Regressions in some layout tests from making border/mask/reflection nine-piece-image parsing match the spec, which allows any of the pieces to be omitted and to also be specifiable in any order. When the higher level code suddenly allowed the image slices to be omitted, the fixup for legacy compatibility for reflections and masks in the parseBorderImageSlice function no longer happened because that function no longer got called. The fix is to properly set the defaults to include the "fill" keyword, so the fixup is applied to the NinePieceImages you create before you ever map anything in from the rules. This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as "0 fill" instead of just "0", which is the correct initial value for this property. Reviewed by Adam Roben. * css/CSSParser.cpp: (WebCore::CSSParser::parseBorderImageSlice): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleReflection.h: (WebCore::StyleReflection::StyleReflection): 2011-09-13 Pavel Feldman Web Inspector: InspectorInstrumentation::frameDestroyed is called after m_page has been reset. https://bugs.webkit.org/show_bug.cgi?id=67997 We should not instrument frameDestroyed event from within Frame's destructor since frame's m_page pointer is likely to be 0 by that time and appropriate instrumenting agent won't be found. As a result, stale frame with its id end up in the inspector. This change wipes out frame binding from the inspector upon detach rather than destroy. Reviewed by Tony Gentilcore. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDetachedImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): * inspector/InspectorPageAgent.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::detachFromPage): * page/Frame.h: 2011-09-14 Pavel Feldman Not reviewed: rolling out r95089. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDestroyedImpl): (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameWindowDiscarded): (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): (WebCore::InspectorInstrumentation::didCommitLoad): (WebCore::InspectorInstrumentation::frameDestroyed): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): (WebCore::InspectorPageAgent::frameDestroyed): * inspector/InspectorPageAgent.h: * page/Frame.cpp: (WebCore::Frame::~Frame): 2011-09-14 Ilya Tikhonovsky Web Inspector: requestAnimationFrame callbacks don't show up in the timeline panel. https://bugs.webkit.org/show_bug.cgi?id=67986 Reviewed by Pavel Feldman. Test: inspector/timeline/timeline-animation-frame.html * English.lproj/localizedStrings.js: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::callFunctionWithoutFrame): (WebCore::V8Proxy::instrumentedCallFunction): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didRegisterAnimationFrameCallbackImpl): (WebCore::InspectorInstrumentation::didCancelAnimationFrameCallbackImpl): (WebCore::InspectorInstrumentation::willFireAnimationFrameEventImpl): (WebCore::InspectorInstrumentation::didFireAnimationFrameEventImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willCallFunction): (WebCore::InspectorInstrumentation::didRegisterAnimationFrameCallback): (WebCore::InspectorInstrumentation::didCancelAnimationFrameCallback): (WebCore::InspectorInstrumentation::willFireAnimationFrameEvent): (WebCore::InspectorInstrumentation::didFireAnimationFrameEvent): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didRegisterAnimationFrameCallback): (WebCore::InspectorTimelineAgent::didCancelAnimationFrameCallback): (WebCore::InspectorTimelineAgent::willFireAnimationFrameEvent): (WebCore::InspectorTimelineAgent::didFireAnimationFrameEvent): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createAnimationFrameCallbackData): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-09-13 Pavel Feldman Web Inspector: InspectorInstrumentation::frameDestroyed is called after m_page has been reset. https://bugs.webkit.org/show_bug.cgi?id=67997 We should not instrument frameDestroyed event from within Frame's destructor since frame's m_page pointer is likely to be 0 by that time and appropriate instrumenting agent won't be found. As a result, stale frame with its id end up in the inspector. This change wipes out frame binding from the inspector upon detach rather than destroy + adds an assertion into the inspector agents lookup with 0 page. Reviewed by Tony Gentilcore. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDetachedImpl): (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameWindowDiscarded): (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): (WebCore::InspectorInstrumentation::frameDetached): (WebCore::InspectorInstrumentation::didCommitLoad): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): * inspector/InspectorPageAgent.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::detachFromPage): (WebCore::Frame::transferChildFrameToNewDocument): * page/Frame.h: 2011-09-14 Sheriff Bot Unreviewed, rolling out r95080. http://trac.webkit.org/changeset/95080 https://bugs.webkit.org/show_bug.cgi?id=68070 It caused some 2d.composite.uncovered tests fail (Requested by rgabor on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-13 Pavel Feldman Web Inspector: [v8] building call frame info for location-less internal script function crashes. https://bugs.webkit.org/show_bug.cgi?id=67991 Reviewed by Yury Semikhatsky. Test: inspector/debugger/debugger-pause-in-internal.html * bindings/v8/DebuggerScript.js: (): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::currentCallFrame): 2011-09-14 Ben Wells Large canvas fills should not crash or create unnecessarily large image buffers https://bugs.webkit.org/show_bug.cgi?id=67988 When using source-in, destination-in, source-out, or destination-atop a temporary buffer is created. This buffer only needs to be big enough to cover the intersection of the path and the canvas. This change also adds some null checks for failures to create contexts or buffers. Reviewed by Stephen White. Test: fast/canvas/canvas-large-fills.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-14 Kentaro Hara Implement a PageTransitionEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=68048 Reviewed by Sam Weinig. The spec for the PageTransitionEvent constructor is here: http://www.whatwg.org/specs/web-apps/current-work/#pagetransitionevent Test: fast/events/constructors/page-transition-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the PageTransitionEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for PageTransitionEvent. * dom/PageTransitionEvent.cpp: (WebCore::PageTransitionEventInit::PageTransitionEventInit): (WebCore::PageTransitionEvent::PageTransitionEvent): (WebCore::PageTransitionEvent::initPageTransitionEvent): * dom/PageTransitionEvent.h: Added a definition for PageTransitionEventInit. (WebCore::PageTransitionEvent::create): (WebCore::PageTransitionEvent::isPageTransitionEvent): (WebCore::PageTransitionEvent::persisted): * dom/PageTransitionEvent.idl: Makes PageTransitionEvent constructible. 2011-09-13 Sheriff Bot Unreviewed, rolling out r95058. http://trac.webkit.org/changeset/95058 https://bugs.webkit.org/show_bug.cgi?id=68058 It made css3/calc/regression-62276.html crash (Requested by Ossy on #webkit). * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowBreak): (WebCore::BorderImageParseContext::allowWidth): (WebCore::BorderImageParseContext::allowOutset): (WebCore::BorderImageParseContext::allowRepeat): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: 2011-09-13 Abhishek Arya Crash in RenderScrollbarPart::imageChanged. https://bugs.webkit.org/show_bug.cgi?id=68009 Reviewed by Simon Fraser. When a custom scrollbar is removed from its FrameView, its destruction can be delayed because of RefPtr maintained in EventHandler class (m_lastScrollbarUnderMouse). Upon removal, we delete all the scrollbar parts so that they don't link back to scrollbar. However, because of the delay, we can have a call to updateScrollbarPart which recreates it. When scrollbar is getting destroyed, we just check to see if there are remaining scrollbar parts and if yes, we destroy them. Test: scrollbars/scrollbar-part-created-with-no-parent-crash.html * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::~RenderScrollbar): 2011-09-13 Adam Klein Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized read https://bugs.webkit.org/show_bug.cgi?id=68021 Reviewed by Tony Chang. Reported by valgrind in http://crbug.com/60653. Besides fixing the uninitialized read, add support for outputting the list separator for counters() calls and the list-style name. Test: fast/css/counters/counter-cssText.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): 2011-09-13 Kenichi Ishibashi WebFont followed tiny monospace text displays weird https://bugs.webkit.org/show_bug.cgi?id=67996 Reviewed by Darin Adler. Always call wkSetCGFontRenderingMode() in Font::drawGlyphs() so that the rendering mode is set correctly. Test: platform/mac/fast/text/webfont-after-tiny-monospace-text.html * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): 2011-09-13 Tom Sepez Fix XSS auditor bypass when inline handlers contain comments. https://bugs.webkit.org/show_bug.cgi?id=27895 Reviewed by Adam Barth. Tests: http/tests/security/xssAuditor/property-escape-comment.html http/tests/security/xssAuditor/property-escape-entity.html http/tests/security/xssAuditor/property-escape-quote.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::snippetForAttribute): 2011-09-13 Kentaro Hara Implement a HashChangeEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67969 Reviewed by Nate Chapin. Test: fast/events/constructors/hash-change-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the HashChangeEvent constructor. * dom/HashChangeEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-13 Jeremy Apthorp Fix crash when an iframe element is removed during a transition to fullscreen. https://bugs.webkit.org/show_bug.cgi?id=67960 Reviewed by Adam Barth. Test: fullscreen/full-screen-remove-ancestor-during-transition.html * dom/Document.cpp: (WebCore::Document::~Document): Clear the list of elements to which we need to send a fullscreenchange event. 2011-09-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68040 Make sure border image sub-properties can be specified in any order. Reviewed by Beth Dakin. New tests in fast/borders. * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::canAdvance): (WebCore::BorderImageParseContext::setCanAdvance): (WebCore::BorderImageParseContext::allowCommit): (WebCore::BorderImageParseContext::allowImage): (WebCore::BorderImageParseContext::allowImageSlice): (WebCore::BorderImageParseContext::allowSlash): (WebCore::BorderImageParseContext::requireWidth): (WebCore::BorderImageParseContext::requireOutset): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: (WebCore::CSSParserValueList::previous): 2011-09-13 Jeff Miller WebCore::Cursor::ensurePlatformCursor() should always set a valid platform cursor on Windows https://bugs.webkit.org/show_bug.cgi?id=68043 Make sure we set a valid platform cursor in the Cursor::NoDrop case, and add a default clause that uses the arrow cursor in case another cursor type is added in the future and we forget to update ensurePlatformCursor(). Reviewed by Anders Carlsson. * platform/win/CursorWin.cpp: (WebCore::Cursor::ensurePlatformCursor): Always set a valid platform cursor. 2011-09-12 Jon Honeycutt MSAA: WebKit reports the document state as disabled https://bugs.webkit.org/show_bug.cgi?id=67974 Reviewed by Brian Weinstein. Test: platform/win/accessibility/document-enabled-state.html * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::isEnabled): This object backs the AccessibleDocument on Windows - always return true for its enabled state. 2011-08-11 Cris Neckar Fixes several bugs when adding CounterNodes to a tree which can cause asymetrical relationships. https://bugs.webkit.org/show_bug.cgi?id=65996 Reviewed by Eric Seidel. Test: fast/css/counters/counter-reparent-table-children-crash.html * rendering/CounterNode.cpp: (WebCore::CounterNode::insertAfter): * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): (WebCore::makeCounterNode): 2011-09-13 Beth Dakin Adding a comment I forgot to add before. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-13 Antti Koivisto Move identifier filter from CSSStyleSelector to SelectorChecker https://bugs.webkit.org/show_bug.cgi?id=68025 Reviewed by Sam Weinig. This is a more logical place for this code. It also makes CSSStyleSelector slightly less bloated. It will make it possible to use fastRejectSelector for querySelectorAll in the future. * css/CSSStyleSelector.cpp: (WebCore::loadViewSourceStyle): (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::RuleData::RuleData): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::pushParent): (WebCore::CSSStyleSelector::popParent): * css/SelectorChecker.cpp: (WebCore::collectElementIdentifierHashes): (WebCore::SelectorChecker::pushParentStackFrame): (WebCore::SelectorChecker::popParentStackFrame): (WebCore::SelectorChecker::pushParent): (WebCore::SelectorChecker::popParent): (WebCore::collectDescendantSelectorIdentifierHashes): (WebCore::SelectorChecker::collectIdentifierHashes): * css/SelectorChecker.h: (WebCore::SelectorChecker::parentStackIsConsistent): (WebCore::SelectorChecker::ParentStackFrame::ParentStackFrame): (WebCore::SelectorChecker::fastRejectSelector): 2011-09-13 Kiyoto Tamura For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS' https://bugs.webkit.org/show_bug.cgi?id=36683 Reviewed by Ryosuke Niwa. In addition to supporting the deprecated 'useCSS', 'styleWithCSS' now accepts any argument other than the boolean false or the case-insensitive string "false". This is per http://aryeh.name/spec/editing/editing.html#the-stylewithcss-command Tests: editing/execCommand/style-with-css.html editing/execCommand/use-css.html * editing/EditorCommand.cpp: (WebCore::executeStyleWithCSS): (WebCore::executeUseCSS): (WebCore::createCommandMap): 2011-09-13 Anders Carlsson Disable C++ exceptions when building with clang https://bugs.webkit.org/show_bug.cgi?id=68031 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: 2011-09-13 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67885 Outline for the high-resolution broken image icon draws at 2x -and corresponding- Reviewed by Dan Bernstein. Scaled the image size to account for the deviceScaleFactor. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-13 Tim Horton REGRESSION (64275): Shape pattern-image fill turns black https://bugs.webkit.org/show_bug.cgi?id=51061 Reviewed by Simon Fraser. When destroying a resource, register clients who are losing their resource as having pending resources, so they can be resolved in the case a resource with that id is re-registered. Test: svg/custom/pending-resource-after-removal.xhtml * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::resourceDestroyed): * svg/SVGStyledElement.h: (WebCore::toSVGStyledElement): Added. 2011-09-13 Eric Seidel Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5 https://bugs.webkit.org/show_bug.cgi?id=68018 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * WebCore.exp.in: * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): * dom/Text.cpp: (WebCore::Text::createRenderer): * features.pri: * page/DOMWindow.idl: * rendering/svg/RenderSVGForeignObject.cpp: * rendering/svg/RenderSVGForeignObject.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::hasValidAttributeType): * svg/SVGForeignObjectElement.cpp: * svg/SVGForeignObjectElement.h: * svg/SVGForeignObjectElement.idl: * svg/SVGLocatable.cpp: (WebCore::isViewportElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::isOutermostSVG): * svg/SVGUseElement.cpp: (WebCore::isDisallowedElement): (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/svgtags.in: 2011-09-13 Joseph Pecoraro CRASH under WebCore::ArchiveResourceCollection::addAllResources loading WebArchive https://bugs.webkit.org/show_bug.cgi?id=67983 Reviewed by Darin Adler. Null mimetypes are okay for subresources, but as previously discovered in bug 41082 they were required for main resources. Here we ensure that they are required for main resources, but we allow null mimetypes for subresources. To fix a crash for bad input we never add a null ArchiveResource to the Archive's subresource collection. It is useless and causes crashes whenever someone iterates the Archive's subresource collection. Test: webarchive/loading/test-loading-archive-subresource-null-mimetype.html * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::createResource): Allow a null mimetype, just type check from the dictionary. (WebCore::LegacyWebArchive::extract): Require a mimetype for the main resource. Do not add null subresources to the subresource list. 2011-09-13 Mihai Parparita [Chromium] Remove javascript_engine from WebCore.gyp https://bugs.webkit.org/show_bug.cgi?id=68001 Reviewed by Tony Chang. Remove javascript_engine GYP variable (similar to the removal done on the Chromium side with http://crrev.com/100692) * WebCore.gyp/WebCore.gyp: 2011-09-12 Ryosuke Niwa [CSS3 Backgrounds and Borders] Add unprefixed border-image shorthand. https://bugs.webkit.org/show_bug.cgi?id=67970 Reviewed by David Hyatt. Also update CSSStyleSelector.cpp to support border-image to suppress assertion in fast/borders/border-image-omit-right-slice.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): 2011-09-13 Xianzhu Wang Reviewed by Darin Adler. Webkit wraps between hyphen-minus and numeric characters https://bugs.webkit.org/show_bug.cgi?id=20677 Disallow wrapping between a hyphen-minus and a digit if the hyphen-minus is not directly after a digit or a letter. Test: fast/text/line-breaks-after-hyphen-before-number.html * rendering/break_lines.cpp: (WebCore::asciiLineBreakTable): Disabled line-breaking after '-' and before '.', '0'-'9'. Note: the change for '0'-'9' doesn't really matter because the case is handled hard-coded in shouldBreakAfter(). (WebCore::shouldBreakAfter): Changed line-breaking behavior after '-'. (WebCore::nextBreakablePosition): Passes lastLastCh to shouldBreakAfter. 2011-09-13 Erik Wright platform/graphics/gtk/FontGtk.cpp was renamed to platform/graphics/pango/FontPango.cpp . Reflect this change in WebCore.gypi to fix a Chromium build breakage. https://bugs.webkit.org/show_bug.cgi?id=68000 Reviewed by Tony Gentilcore. No change in functionality, thus no new tests. * WebCore.gypi: 2011-09-10 Mikhail Naganov Web Inspector: Profiler: Fix overlapping data in function names column. https://bugs.webkit.org/show_bug.cgi?id=67896 Reviewed by Pavel Feldman. * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/dataGrid.css: (.data-grid table.data): (.data-grid td): 2011-09-13 Sheriff Bot Unreviewed, rolling out r95025. http://trac.webkit.org/changeset/95025 https://bugs.webkit.org/show_bug.cgi?id=68005 Test failed on Snow Leopard bots. (Requested by yutak_home on #webkit). * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-13 Yuta Kitamura ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. https://bugs.webkit.org/show_bug.cgi?id=67908 Reviewed by David Levin. Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector. No change in functionality, thus no new tests. WebSocket worker tests (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): Create a String from Vector. (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Copy the content of the given String into Vector. * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-13 Fumitoshi Ukai Unreviewed, build fix. CSSPropertyBorderImage was added in r94989, but not yet added in WebCore::CSSStyleSelector::applyProperty CSSStyleSelector.cpp:2481: warning: enumeration value 'CSSPropertyBorderImage' not handled in switch * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-12 Shinya Kawanaka Crashes in WebCore::InsertListCommand::unlistifyParagraph. https://bugs.webkit.org/show_bug.cgi?id=67918 Reviewed by Ryosuke Niwa. execCommand("InsertUnorderedList") was crashing if the parent node of the target is a kind of list element and it is not contenteditable. This patch checks the parent node is contenteditable. Test: editing/execCommand/insert-list-in-noneditable-list-parent.html * editing/htmlediting.cpp: (WebCore::enclosingListChild): Checks the parent node is contenteditable. 2011-09-12 Sheriff Bot Unreviewed, rolling out r94975. http://trac.webkit.org/changeset/94975 https://bugs.webkit.org/show_bug.cgi?id=67984 crash in PrerenderBrowserTest.PrerenderHTML5VideoJs (Requested by ukai on #webkit). * platform/graphics/chromium/CanvasLayerChromium.h: (WebCore::CanvasLayerChromium::layerTypeAsString): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore::ContentLayerChromium::layerTypeAsString): * platform/graphics/chromium/ImageLayerChromium.h: (WebCore::ImageLayerChromium::layerTypeAsString): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::layerTreeAsText): (WebCore::writeIndent): (WebCore::LayerChromium::dumpLayer): (WebCore::LayerChromium::dumpLayerProperties): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTypeAsString): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::textureMemoryReclaimLimit): (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::close): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::owner): (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::rootLayerImpl): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::contentsTextureManager): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/PluginLayerChromium.h: (WebCore::PluginLayerChromium::layerTypeAsString): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::name): (WebCore::writeIndent): (WebCore::RenderSurfaceChromium::dumpSurface): * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureManager::setAssociatedContextDebugOnly): (WebCore::TextureManager::associatedContextDebugOnly): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::writeIndent): (WebCore::TiledLayerChromium::dumpLayerProperties): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.h: (WebCore::VideoLayerChromium::layerTypeAsString): * platform/graphics/chromium/WebGLLayerChromium.h: (WebCore::WebGLLayerChromium::layerTypeAsString): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::setVisible): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::contentsTextureManager): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::contentsTextureManager): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-09-12 Joseph Pecoraro Possible ASSERT(!storageTracker) in Lazily Initialized StorageTracker https://bugs.webkit.org/show_bug.cgi?id=67957 Reviewed by Darin Adler. The storageTracker singleton may already have been created through StorageTracker::tracker before initializeTracker gets called. Update the ASSERT in this case to check that there is no client for the tracker. No test, this depends on how the port initializes the tracker. * storage/StorageTracker.cpp: (WebCore::StorageTracker::initializeTracker): 2011-09-12 Adam Klein Fix out-of-bounds access in Gradient::sortStopsIfNecessary https://bugs.webkit.org/show_bug.cgi?id=67958 Reviewed by Darin Adler. Reported by Valgrind in http://crbug.com/77049. The errant code was added as an optimization in r67804. This patch reverts that one, as all parties agree that the optimization doesn't seem worthwhile, and there clearly aren't any tests covering the special case. No new tests, as existing tests should cover the remaining call to |std::stable_sort|. * platform/graphics/Gradient.cpp: (WebCore::Gradient::sortStopsIfNecessary): 2011-09-12 Jacky Jiang Setting document.title doesn't affect contents of title tag of XHTML documents https://bugs.webkit.org/show_bug.cgi?id=57537 Reviewed by Alexey Proskuryakov. Update the contents of the tag of XHTML documents when setting document.title. Test: fast/dom/title-content-set-innerText-get.xhtml * dom/Document.cpp: (WebCore::Document::setTitle): 2011-09-12 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Initialize m_unmodifiedText in PlatformKeyboardEventEfl. https://bugs.webkit.org/show_bug.cgi?id=67038 Reviewed by Kenneth Rohde Christiansen. Since most of the time it will return the same thing as text(), we initialize it the same way we initialize m_text. The other case (what would have been generated if no modifiers were pressed) should be covered by this as well. As this method is used when handling access keys, tests such as fast/events/access-key-self-destruct.html should now pass. No new tests, as this fixes a problem uncovered by the existing ones. * platform/efl/PlatformKeyboardEventEfl.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2011-09-12 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Eric Seidel. [EFL] Add GraphicsContext3DEfl for WebGL and accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=62709 Add GraphicsContext3D implementation for EFL port. GraphicsContext3D delegates to GraphicsContext3DInternal. * platform/graphics/efl/GraphicsContext3DEfl.cpp: Added. (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::isGLES2Compliant): (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::clear): (WebCore::GraphicsContext3D::clearColor): (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::getAttachedShaders): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (WebCore::GraphicsContext3D::getContextAttributes): (WebCore::GraphicsContext3D::getError): (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::getString): (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::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::texImage2D): (WebCore::GraphicsContext3D::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (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::reshape): (WebCore::GraphicsContext3D::markContextChanged): (WebCore::GraphicsContext3D::markLayerComposited): (WebCore::GraphicsContext3D::layerComposited): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): (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::synthesizeGLError): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::getInternalFramebufferSize): (WebCore::GraphicsContext3D::setContextLostCallback): (WebCore::GraphicsContext3D::getImageData): 2011-09-12 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Eric Seidel. [CMAKE] Remove platform/graphics/opengl/*OpenGL.cpp files in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=62707 No change in fuctionality so no new tests. Bug 62376 makes all ports use GraphicsContext3DOpenGL and Extensions3DOpenGL when enabling WebGL. However, some ports already have their own GC3D implementation. In QT and chromium, for example, GC3D delegates to GC3DInternal. So, it would be better to allow each port to decide whether or not to include files in platform/graphics/opengl. * CMakeLists.txt: 2011-09-12 Dan Bernstein <mitz@apple.com> <rdar://problem/10054615> Floats in ruby text intrude into the base Reviewed by Darin Adler. Test: fast/ruby/float-overhang-from-ruby-text.html * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::avoidsFloats): Added. Returns true. This ensures that RenderBlock::clearFloats() will not consider ruby text as having intruding floats. * rendering/RenderRubyText.h: 2011-09-12 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67970 Add unprefixed border-image property. Reviewed by Beth Dakin. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: 2011-09-12 Ryosuke Niwa <rniwa@webkit.org> REGRESSION: Moving up doesn't work in some cases https://bugs.webkit.org/show_bug.cgi?id=67522 Reviewed by Eric Seidel. The bug was caused by previousLinePosition's attempting to obtain the last root line box using a position at minCaretOffset (which is, in practice, located at the beginning of wrapped lines). Fix the bug by calling maxCaretOffset instead. Because isCandidate returns false at (br, 1), use the positionBeforeNode for br elements. Test: editing/selection/move-up-into-wrapped-line.html * editing/visible_units.cpp: (WebCore::previousLinePosition): 2011-09-12 David Levin <levin@chromium.org> Make the ThreadSafeRefCounted support in CrossThreadCopier work for T*. https://bugs.webkit.org/show_bug.cgi?id=67947 Reviewed by Adam Barth. The changes are tested by compiling and added compile asserts to do some verification as well. * platform/CrossThreadCopier.cpp: Added some compile asserts to verify various match and non-matches for CrossThreadCopier. * platform/CrossThreadCopier.h: Added a typedef to convert T* to T, just like the typedef's to remove RefPtr and PassRefPtr. Added a compile assert to verify that only one of the typedef did anything. (CrossThreadCopierBase<false, true, T>::copy): Remove "get" as it is unnecessary. It shouldn't have been here (PassRefPtr and RefPtr easily and sometimes more efficiently convert to PassRefPtr without get). Also, a raw pointer doesn't have a get() method. 2011-09-12 Chris Rogers <crogers@google.com> Address lifetime issues in OfflineAudioDestinationNode https://bugs.webkit.org/show_bug.cgi?id=67949 Reviewed by Kenneth Russell. No new tests. This does not change JavaScript API. * webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::render): (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): 2011-09-12 Jeff Timanus <twiz@chromium.org> [chromium] Prevent a crash when tearing down an ImageBuffer that was not successfully initialized. https://bugs.webkit.org/show_bug.cgi?id=67944 Reviewed by Stephen White. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-09-12 Michael Saboff <msaboff@apple.com> Update RegExp and related classes to use 8 bit strings when available https://bugs.webkit.org/show_bug.cgi?id=67337 Updated call to match to use UString& instead of UChar*. Reviewed by Gavin Barraclough. No new tests, Covered by existing tests. * platform/text/RegularExpression.cpp: (WebCore::RegularExpression::match): 2011-09-12 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67898 REGRESSION(r94900): fast/images/support-broken-image-delegate.html fails on Mac Reviewed by Simon Fraser. New function willPaintBrokenImage() returns true when there has been an error loading the image and the broken image icon will be used in its place. This is necessary since it is possible to have an error loading an image and to NOT use the broken image icon. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::willPaintBrokenImage): * loader/cache/CachedImage.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-12 James Robinson <jamesr@chromium.org> [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67440 Reviewed by Kenneth Russell. This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path to make sure that textures are deleted even if the page is not visible. This move also removed the need for LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well. That meant moving the layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway. Covered by existing compositing/ tests and platform/chromium/compositor/lost-compositor-context-with-rendersurface.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): (WebCore::TextureManager::lowLimitBytes): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-12 Chris Rogers <crogers@google.com> DelayNode delay buffer is not correctly wrapping around https://bugs.webkit.org/show_bug.cgi?id=67872 Reviewed by Kenneth Russell. Test: webaudio/delaynode.html * webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::process): 2011-09-12 Arko Saha <arko@motorola.com> Selectstart is not fired when selection was created by arrow keys. https://bugs.webkit.org/show_bug.cgi?id=60430 Reviewed by Ryosuke Niwa. Fire selectstart when a user starts extending the selection using arrow key. Fixed by Arko Saha <arko@motorola.com> and Kaustubh Atrawalkar <kaustubh@motorola.com> Tests: fast/events/selectstart-by-arrow-keys-prevent-default.html fast/events/selectstart-by-arrow-keys.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::modify): (WebCore::FrameSelection::shouldChangeSelection): (WebCore::FrameSelection::dispatchSelectStart): * editing/FrameSelection.h: 2011-09-12 James Robinson <jamesr@chromium.org> [chromium] REGRESSION(94353): Compositor textures and resources leaked when tab closed that is not last tab in the process https://bugs.webkit.org/show_bug.cgi?id=67816 Reviewed by Kenneth Russell. We lack infrastructure to construct an automated test for this today. To test manually, open up a composited page (like the poster circle), duplicate the tab many times, close all the duplicates, and verify that the memory use returns to the single tab level. * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::clearRenderSurfacesRecursive): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-09-12 Kentaro Hara <haraken@google.com> Implement a HashChangeEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67924 Reviewed by Sam Weinig. The spec for the HashChangeEvent constructor is here: http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent Test: fast/events/constructors/hash-change-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the HashChangeEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for HashChangeEvent. * dom/HashChangeEvent.h: Added a definition for HashChangeEventInit. (WebCore::HashChangeEventInit::HashChangeEventInit): (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::HashChangeEvent): * dom/HashChangeEvent.idl: Makes HashChangeEvent constructible. 2011-09-12 Mike Reed <reed@google.com> [skia] remove dead code, no functionality change https://bugs.webkit.org/show_bug.cgi?id=67844 Reviewed by Kenneth Russell. No new tests. just removing dead-code, existing tests apply * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-09-12 Pavel Feldman <pfeldman@google.com> Web Inspector: Runtime.callFunctionOn does not accept arguments that evaluate to false. https://bugs.webkit.org/show_bug.cgi?id=67934 Reviewed by Tony Gentilcore. * inspector/InjectedScriptSource.js: 2011-09-12 Pavel Feldman <pfeldman@google.com> Web Inspector: event dividers do not update timeline boundaries. https://bugs.webkit.org/show_bug.cgi?id=67932 * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._onLoadEventFired): (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired): (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventTime): 2011-09-12 Kentaro Hara <haraken@google.com> Implement a WebKitAnimationEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67922 Reviewed by Adam Barth. Test: fast/events/constructors/webkit-animation-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the WebKitAnimationEvent constructor. * dom/WebKitAnimationEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-12 Andreas Kling <kling@webkit.org> Shrink CanvasGradient for builds without ENABLE(DASHBOARD_SUPPORT). https://bugs.webkit.org/show_bug.cgi?id=67916 Reviewed by Kenneth Rohde Christiansen. * html/canvas/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): (WebCore::CanvasGradient::addColorStop): * html/canvas/CanvasGradient.h: 2011-09-12 Shinya Kawanaka <shinyak@google.com> Characters beyond U+10000 should be deleted by one pressing delete key. https://bugs.webkit.org/show_bug.cgi?id=40351 Reviewed by Kent Tamura. If a character is the trail part of unicode surrogate pair, the lead part of it should also be deleted. Also, If in MacOSX, the deletion should honor Mac's behavior. Test: editing/deleting/delete-surrogatepair.html * rendering/RenderText.cpp: (WebCore::RenderText::previousOffsetForBackwardDeletion): Added if-macro to support chromium on mac, and added trail part check for unicode character. 2011-09-11 Kentaro Hara <haraken@google.com> Implement a ProgressEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67800 Reviewed by Sam Weinig. Test: fast/events/constructors/progress-event-constructor.html * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Replaced UnsignedLongLongMax with std::numeric_limits<unsigned long long>::max(). * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyValue): Returns an unsigned long long value corresponding to a given key. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Added the ProgressEvent constructor. * dom/ProgressEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-11 Dimitri Glazkov <dglazkov@chromium.org> REGRESSION (r87351): toggling display of lots (thousands) of elements with display:none is very slow https://bugs.webkit.org/show_bug.cgi?id=67581 Reviewed by Darin Adler. Test: perf/show-hide-table-rows.html * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): Moved style-creating code into createRendererIfNeeded, renamed to createRenderer. (WebCore::NodeRendererFactory::createRendererIfNeeded): Re-arrange code to avoid unnecessary creation of renderers. 2011-09-11 Jeremy Moskovich <jeremy@chromium.org> [Chromium] Change OOP Font loading code to use CGFont*() APIs. https://bugs.webkit.org/show_bug.cgi?id=66935 This change is necessary due a bug in ATSFontDeactivate() on 10.7. See crbug.com/93191 for details. Reviewed by Eric Seidel. No new tests - covered by existing tests. * platform/chromium/PlatformBridge.h: * platform/graphics/chromium/CrossProcessFontLoading.h: * platform/graphics/chromium/CrossProcessFontLoading.mm: (WebCore::MemoryActivatedFont::create): (WebCore::MemoryActivatedFont::MemoryActivatedFont): (WebCore::MemoryActivatedFont::~MemoryActivatedFont): 2011-09-09 Oliver Hunt <oliver@apple.com> Remove support for anonymous storage from jsobjects https://bugs.webkit.org/show_bug.cgi?id=67881 Reviewed by Sam Weinig. Remove all use of anonymous slots, this required modifying bindings generation to add member variables for cached attributes, and override visitChildren with the necessary logic to mark those new members. I added bindings generation tests for these values. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): * bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure): * bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::createStructure): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure): * bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::createStructure): (WebCore::JSTestInterfacePrototype::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure): (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::createStructure): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::JSTestObj::visitChildren): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure): (WebCore::JSTestObjPrototype::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure): (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::cachedAttribute1AttrGetter): (WebCore::TestObjInternal::cachedAttribute2AttrGetter): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure): 2011-09-01 Filip Pizlo <fpizlo@apple.com> The executable allocator makes it difficult to free individual chunks of executable memory https://bugs.webkit.org/show_bug.cgi?id=66363 Reviewed by Oliver Hunt. Introduced a best-fit, balanced-tree based allocator. The allocator required a balanced tree that does not allocate memory and that permits the removal of individual nodes directly (as opposed to by key); neither AVLTree nor WebCore's PODRedBlackTree supported this. Changed all references to executable code to use a reference counted handle. No new layout tests because behavior is not changed. New API unit tests: Tests/WTF/RedBlackTree.cpp Tests/WTF/MetaAllocator.cpp * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added. 2011-09-10 Sam Weinig <sam@webkit.org> Add isInterruptedExecutionException and isTerminatedExecutionException predicates https://bugs.webkit.org/show_bug.cgi?id=67892 Reviewed by Andy "First Time Reviewer" Estes. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): Use the new predicates instead of probing the ClassInfo directly. 2011-09-10 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. MSW build fixes. * config.h: 2011-09-09 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67861 Implement border-image-outset (and the mask equivalents). Reviewed by Beth Dakin. Added new tests in fast/borders and fast/reflections. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Add m_outset field to CSSBorderImageValue and teach it how to dump the field as part of cssText(). * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageQuad): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for border-image-outset and -webkit-mask-box-image-outset. Refactor the code so that border-image-width and border-image-outset use a common function. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowOutset): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Teach the border image parsing code about outsets. This code will soon be replaced by true shorthand parsing code, but for now keep it working and add outset support to it. (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): (WebCore::CSSParser::parseBorderImageQuad): (WebCore::CSSParser::parseBorderImageWidth): (WebCore::CSSParser::parseBorderImageOutset): * css/CSSParser.h: Refactor the border-image-width code so that it can be shared by border-image-outset, since they are extremely similar. * css/CSSPropertyNames.in: Add the new properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageQuad): (WebCore::CSSStyleSelector::loadPendingImages): * css/CSSStyleSelector.h: Refactor the code so that width/outset share common mapping functions. Add support for outset. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::addBoxShadowVisualOverflow): (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): (WebCore::InlineFlowBox::computeOverflow): Add new functions for computing the visual overflow caused by border outsets. Fix bugs in the shadow overflow code as well. (WebCore::clipRectForNinePieceImageStrip): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: Make sure the clip rect pushed when painting one piece of a split inline strip is expanded to include the border and mask outsets. Always include the block direction expansion, and conditionally include the inline direction expansion based off includeLogicalLeftEdge()/includeLogicalRightEdge(). clipRectForNinePieceImageStrip is a common function shared by masks and border images that does this work. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeOverflow): * rendering/RenderBox.cpp: (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::addBoxShadowAndBorderOverflow): * rendering/RenderBox.h: Rename addShadowOverflow to addBoxShadowAndBorderOverflow. Have it compute both shadow and border image outset overflow. Fix bugs with shadow overflow computation. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): Change painting to apply the outsets to inflate the border image drawing area. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::layout): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::layout): Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateRects): Patched to no longer apply box-shadow to overflow clip areas when inflating the intersection area for the layer bounds. Instead we generically apply all visual overflow so that border image outsets will also be included. This fixes https://bugs.webkit.org/show_bug.cgi?id=37467. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::layout): Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::outset): (WebCore::NinePieceImage::setOutset): (WebCore::NinePieceImage::computeOutset): (WebCore::NinePieceImage::copyOutsetFrom): Add the outset field to NinePieceImage along with some helpers for manipulating outsets. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getImageOutsets): (WebCore::RenderStyle::getImageHorizontalOutsets): (WebCore::RenderStyle::getImageVerticalOutsets): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hasBorderImageOutsets): (WebCore::InheritedFlags::getBorderImageOutsets): (WebCore::InheritedFlags::getBorderImageHorizontalOutsets): (WebCore::InheritedFlags::getBorderImageVerticalOutsets): (WebCore::InheritedFlags::getBorderImageInlineDirectionOutsets): (WebCore::InheritedFlags::getBorderImageBlockDirectionOutsets): (WebCore::InheritedFlags::getImageInlineDirectionOutsets): (WebCore::InheritedFlags::getImageBlockDirectionOutsets): Helpers for outset computation used by painting and overflow functions. 2011-09-10 Dan Bernstein <mitz@apple.com> Actually prevent unnecessary casts to MediaControls*. Reviewed by Oliver Hunt. * html/shadow/MediaControls.h: 2011-09-10 Ryosuke Niwa <rniwa@webkit.org> Remove printf added by r94900. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): 2011-09-09 Chris Marrin <cmarrin@apple.com> requestAnimationFrame doesn't throttle on Mac https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Changed requestAnimationFrame to use a Timer in ScriptedAnimationController on Mac, rather than runLoopObservers. The Timer is throttled to fire no faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER flag and can be used by any implementation, but currently it is only enabled by PLATFORM(MAC). * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::resume): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::scheduleAnimation): * page/ChromeClient.h: 2011-09-10 Jarred Nicholls <jarred@sencha.com> [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters https://bugs.webkit.org/show_bug.cgi?id=34884 KURL::path() alone does not handle removing the leading slash from a windows file path. Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately. Reviewed by Andreas Kling. * platform/qt/KURLQt.cpp: (WebCore::KURL::fileSystemPath): 2011-09-10 Ken Buchanan <kenrb@chromium.org> Crash due to bad data in SVGDocumentExtensions m_pendingResources https://bugs.webkit.org/show_bug.cgi?id=67488 Reviewed by Nikolas Zimmermann. Resolving a crash condition caused by the deletion of elements while pending resource entries for those elements are still recorded. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource) * svg/SVGDocumentExtensions.h: (WebCore::SVGDocumentExtensions::isElementInPendingResources) * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource) (WebCore::SVGDocumentExtensions::isElementInPendingResources) (WebCore::SVGDocumentExtensions::removeElementFromPendingResources) * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded) (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged) 2011-09-10 Adam Barth <abarth@webkit.org> Remove DocumentWriter::deprecatedFrameEncoding() https://bugs.webkit.org/show_bug.cgi?id=67882 Reviewed by Eric Seidel. Three years ago, in http://trac.webkit.org/changeset/39026, Alexey Proskuryakov added ContentDispositionEncodingFallbackArray to work around a web site compatibility issue with a non-ASCII file name becoming garbled when received in the Content-Disposition header. Since that time, there has been copious discussion of this topic among browser vendors, in the IETF, and in the broader web community. For example, here is a Stack Overflow thread about this topic: http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http Eric Lawrence has written a blog post that summarizes IE's perspective on this issue: http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx The current consensus is that browsers should implement RFC 6266, which is a new RFC that updates the definition of the Content-Disposition header. Chrome and Firefox have both implemented RFC 6266 and have encountered only one issue, which was then fixed by the web site operator. IE has also implemented RFC 6266, but I don't have detailed information about their compatibility experience. This patch add explicit PLATFORM #ifdefs around the quirky implementation previously used in Apple's Mac and Windows ports. This code is already only used on Apple's ports, so this patch introduces no functional changes. It does, however, discourage other ports from adopting this quirk. IMHO, Apple should remove this quirk as soon as compatibility allows and converge behavior with the other major browser vendors. See bug for manual test (the bug manifests in Safari download UI). * loader/DocumentWriter.cpp: * loader/DocumentWriter.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::adopt): (WebCore::ResourceRequestBase::copyData): * platform/network/ResourceRequestBase.h: 2011-09-09 Beth Dakin <bdakin@apple.com> Attempted Leopard build fix. * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): 2011-09-09 Beth Dakin <bdakin@apple.com> Fix for https://bugs.webkit.org/show_bug.cgi?id=67819 Use high resolution platform images when the deviceScaleFactor > 1 -and corresponding- <rdar://problem/10003098> Reviewed by Darin Adler. Add all of the new high resolution images. I also removed some tiffs from the project and replaced them with png equivalents (that are already checked into WebCore anyway). Since the high resolution images are pngs, it makes sense to use pngs for all of the images that load through Image::loadPlatformResource() * WebCore.xcodeproj/project.pbxproj: * platform/graphics/mac/ImageMac.mm: (WebCore::Image::loadPlatformResource): Load the @2x resource for deviceScaleFactors >= 2. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): CachedImage::brokenImage() is no longer a static helper function, but a real member function. It also now loads the @2x resource for deviceScaleFactors >= 2 and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns the brokenImage(), it just returns the 1x version. brokenImage() has to be called directly to reliably return the deviceScaleFactor-appropriate resource. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): * loader/cache/CachedImage.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): (WebCore::RenderLayer::paintResizer): * rendering/RenderLayer.h: New static function to retrieve the deviceScaleFactor for callers that do not have direct access to a Page. * page/Page.cpp: (WebCore::Page::deviceScaleFactor): * page/Page.h: Call CachedImage::brokenImage() for the broken-image image at an accurate resolution. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): 2011-09-09 Erik Arvidsson <arv@chromium.org> Move Element.contains to Node https://bugs.webkit.org/show_bug.cgi?id=67651 Reviewed by Darin Adler. This moves the contains method from Element to Node as in the DOM4 working draft: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains This also special cases Document contains to make it O(1) instead of O(depth). Tests: fast/dom/Node/contains-method.html perf/document-contains.html * bindings/objc/PublicDOMInterfaces.h: Move contains from DOMElement to DOMNode. * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): Added document special case. * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check. 2011-09-09 Tim Horton <timothy_horton@apple.com> Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow https://bugs.webkit.org/show_bug.cgi?id=67543 <rdar://problem/10070536> Reviewed by Darin Adler. Generalize (begin|end)TransparencyLayer, which now forward through to (begin|end)PlatformTransparencyLayer, so that isInTransparencyLayer can exist on every platform. Make use of isInTransparencyLayer in FontMac to disable "simple" shadow drawing when the text is being rendered into a transparency layer. Test: svg/custom/simple-text-double-shadow.svg * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::isInTransparencyLayer): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::isInTransparencyLayer): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/win/ScrollbarThemeWin.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeWin.cpp: 2011-09-09 Julien Chaffraix <jchaffraix@webkit.org> [V8] V8WebKitPoint::constructorCallback leaks https://bugs.webkit.org/show_bug.cgi?id=67865 Reviewed by Adam Barth. Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind. * bindings/v8/custom/V8WebKitPointConstructor.cpp: (WebCore::V8WebKitPoint::constructorCallback): Changed the code to use a RefPtr (per our usual style). Also use toV8 that will take care of properly wrapping the object. 2011-09-09 Chris Rogers <crogers@google.com> HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once https://bugs.webkit.org/show_bug.cgi?id=67866 Reviewed by David Levin. No new tests since this is difficult to test. This is designed to fix existing webaudio layout test failures. * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader): (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader): (WebCore::HRTFDatabaseLoader::loadAsynchronously): (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion): * platform/audio/HRTFDatabaseLoader.h: 2011-09-09 Jessie Berlin <jberlin@apple.com> Cookies are not available after turning off Private Browsing after the last window has been closed. https://bugs.webkit.org/show_bug.cgi?id=67874 Reviewed by Darin Adler. The private browsing storage session is a global setting that is being incorrectly set on a per-page basis (see http://webkit.org/b/67870). In this case, the global value was getting out of sync with the per-page setting: 1. The global value was getting set to true when setPrivateBrowsingEnabled(true) was called. 2. All Pages were then closed, destroying their Settings objects. 3. When a new Page was created, a new Settings object was created and its m_privateBrowsingEnabled value was getting set to false. 4. The WebPage settings were then applied to the new Settings object, resulting in setPrivateBrowsingEnabled(false) to be called. 5. An if (m_privateBrowsingEnabled == privateBrowsingEnabled) early return prevented the global value for the storage session from being destroyed. * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): Move the early return to be after setting the global private browsing values, and add a clearer comment + FIXME. 2011-09-09 Kentaro Hara <haraken@google.com> Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67458 Reviewed by Adam Barth. Added a 'CallWithNullValue' extended attribute. If a parameter is optional and missing, 'CallWithDefaultValue' handles it as a string "undefined". On the other hand, 'CallWithNullValue' handles it as a null string (Note: not a string "null", but a null string). Tests: fast/dom/Window/custom-constructors.html transforms/svg-vs-css.xhtml transforms/cssmatrix-2d-interface.xhtml transforms/cssmatrix-3d-interface.xhtmlGenerate a WebKitCSSMatrix constructor * WebCore.gypi: Removed V8WebKitCSSMatrixConstructor.cpp. * WebCore.pro: Removed V8WebKitCSSMatrixConstructor.cpp. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): If the 'CallWithNullValue' extended attribute is set, we call MAYBE_MISSING_PARAMETER() with MissingIsEmpty mode to obtain a maybe missing parameter. Otherwise, we call MAYBE_MISSING_PARAMETER() with MissingIsUndefined mode. (RequiresCustomSignature): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated test results. (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. (WebCore::TestMediaQueryListListenerInternal::methodCallback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::optionsObjectCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::withDynamicFrameAndArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::TestObjInternal::classMethodWithOptionalCallback): (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): * bindings/v8/V8Binding.h: (WebCore::V8ParameterBase::prepareBase): The fact that V8ParameterBase does not have any object means that we do not need to prepare anything, i.e. we should just return true in this case. (WebCore::::prepare): If V8ParameterBase does not have any object, then we set a null string. * bindings/v8/custom/V8BindingMacros.h: MAYBE_MISSING_PARAMETER() returns the parameter of a given index if the parameter exists. If the parameter does not exist and MissingIsUndefined is set, this macro returns an object that represents undefined. If the parameter does not exist and MissingIsEmpty is set, this macro returns an empty object. * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Removed. * css/WebKitCSSMatrix.idl: Added the 'Constructor' extended attribute. 2011-09-09 Geoffrey Garen <ggaren@apple.com> Reviewed by Dan Bernstein. Removed ENABLE(SINGLE_THREADED) support, since it is always false https://bugs.webkit.org/show_bug.cgi?id=67862 Next step toward making the baseline platform assumption that threads exist. * WebCore.pri: * features.pri: * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): Removed now-dead code. 2011-09-09 Fady Samuel <fsamuel@chromium.org> Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp} https://bugs.webkit.org/show_bug.cgi?id=67250 Reviewed by Simon Fraser. No new tests because there's no change in functionality. * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): * dom/Element.cpp: (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): * dom/Range.cpp: (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::pageScaleFactor): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setPageScaleFactor): * page/Page.h: (WebCore::Page::pageScaleFactor): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): (WebCore::RenderLayerCompositor::pageScaleFactor): * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2011-09-09 Dominic Mazzoni <dmazzoni@google.com> AX: Images within anchors causes crash https://bugs.webkit.org/show_bug.cgi?id=44149 Reviewed by Chris Fleizach. Fixes the way parent RenderObject of an AccessibilityRenderObject is computed in the presence of adjacent continuations. Test: accessibility/div-within-anchors-causes-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::renderParentObject): 2011-09-09 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> CSS rules not being applied when a hidden field is inserted between an input[type=checkbox] and a label https://bugs.webkit.org/show_bug.cgi?id=66887 Reviewed by David Hyatt. Test: fast/css/adjacent-sibling-selector.html This patch addresses the problem of elements not getting their style recomputed when they are affected by direct adjacent sibling rules and one of their sibling in their corresponding rules is modified dynamically. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::parentStylePreventsSharing): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::checkForSiblingStyleChanges): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::affectedByDirectAdjacentRules): (WebCore::InheritedFlags::setAffectedByDirectAdjacentRules): 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Make the EFL port use the correct rendering file. https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. When compiling with Pango support, the EFL port should use FontPango.cpp instead of FontEfl.cpp (which is just full of stubs). No new functionality so no new tests. * CMakeListsEfl.txt: 2011-09-09 Chris Rogers <crogers@google.com> AudioBufferSourceNode must validate AudioBuffer in .buffer attribute setter https://bugs.webkit.org/show_bug.cgi?id=67749 Reviewed by Kenneth Russell. Test: webaudio/audiobuffersource-channels.html * WebCore.gypi: * bindings/js/JSAudioBufferSourceNodeCustom.cpp: (WebCore::JSAudioBufferSourceNode::setBuffer): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: Copied from Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp. (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::setBuffer): * webaudio/AudioBufferSourceNode.h: * webaudio/AudioBufferSourceNode.idl: 2011-09-09 Dan Bernstein <mitz@apple.com> RenderBlock::addOverhangingFloats() takes superfluous parameters https://bugs.webkit.org/show_bug.cgi?id=67863 Reviewed by Dave Hyatt. No new tests, because behavior is unchanged. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters, since they were always the inverse of the logical{Left, Top}() of the child parameter. * rendering/RenderBlock.h: 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Add replacement functions for gdk ones. https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. This will allow the EFL port to don't depend on gdk anymore. No new functionality so no new tests. * CMakeListsEfl.txt: * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::appendRegionToCairoContext): * platform/graphics/cairo/CairoUtilities.h: * platform/graphics/pango/FontPango.cpp: (WebCore::drawGlyphsShadow): (WebCore::Font::drawComplexText): * platform/graphics/pango/PangoUtilities.cpp: Added. (WebCore::getLineClipRegionFromLayoutIter): (WebCore::getClipRegionFromPangoLayoutLine): * platform/graphics/pango/PangoUtilities.h: Added. 2011-09-09 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. No new tests. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::finishCreation): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::finishCreation): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): (JSC::RuntimeMethod::finishCreation): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Rename FontGtk.cpp to FontPango.cpp https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. This file will be used by the EFL port too, and since it's not GTK specific anymore, rename it to something better. No new functionality so no new tests. * GNUmakefile.list.am: * platform/graphics/pango/FontPango.cpp: Renamed from Source/WebCore/platform/graphics/gtk/FontGtk.cpp. 2011-09-09 Adam Klein <adamk@chromium.org> Initialize ExceptionCode in Element::removeAttribute https://bugs.webkit.org/show_bug.cgi?id=67820 Reviewed by Darin Adler. Silences valgrind warning reported in http://crbug.com/76490. No new tests since this would only very occasionally be flaky, and in the codepath in the valgrind report, the ec is ignored anyway. * dom/Element.cpp: (WebCore::Element::removeAttribute): Initialize ec to 0. 2011-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> [Qt] Remove common.pri https://bugs.webkit.org/show_bug.cgi?id=67814 Reviewed by Andreas Kling. No new tests, no change in functionality. * CodeGenerators.pri: * WebCore.pri: 2011-09-09 Dominic Mazzoni <dmazzoni@google.com> Assert being hit in AccessibilityRenderObject::addChildren() https://bugs.webkit.org/show_bug.cgi?id=61805 Reviewed by Chris Fleizach. Fix nextSibling and previousSibling to handle adjacent continuations properly, otherwise nodes end up appearing in the accessibility tree twice (or a debug assertion could be raised). Test: accessibility/adjacent-continuations-cause-assertion-failure.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::previousSibling): (WebCore::AccessibilityRenderObject::nextSibling): 2011-09-08 Kentaro Hara <haraken@google.com> Implement a WebKitAnimationEvent constructor. https://bugs.webkit.org/show_bug.cgi?id=67825 Reviewed by Sam Weinig. There is no spec for the WebKitAnimationEvent constructor since it is WebKit-specific. However, based on the current IDL of initWebKitAnimationEvent(), the constructor IDL should be as follows. [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)] interface WebKitAnimationEvent : Event { ...; } dictionary WebKitAnimationEventInit : EventInit { DOMString animationName; double elapsedTime; } Test: fast/events/constructors/webkit-animation-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the WebKitAnimationEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitAnimationEvent. * dom/WebKitAnimationEvent.cpp: (WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit): (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): * dom/WebKitAnimationEvent.h: Added a definition for WebKitAnimationEventInit. (WebCore::WebKitAnimationEvent::create): * dom/WebKitAnimationEvent.idl: Makes WebKitAnimationEvent constructible. 2011-09-08 Abhishek Arya <inferno@chromium.org> :before content rendering issues with list markers and run-ins. https://bugs.webkit.org/show_bug.cgi?id=67735 1) Remove the isAnonymous checks for run-in detection since the run-in can belong to a node. 2) When the parent has block children, then the list marker will be enclosed in an anonymous block. In that case, for going to the next list marker, we need to traverse one level up. We don't need this check when searching for generated run-in (loop 2), since we know parent will have inline children, so the list marker wont be enclosed in an anonymous block. Reviewed by Dave Hyatt. Tests: fast/lists/list-marker-before-content-table.html fast/runin/runin-generated-before-content.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::beforePseudoElementRenderer): 2011-09-09 Pavel Podivilov <podivilov@chromium.org> Web Inspector: introduce JavaScriptSourceFrame class. https://bugs.webkit.org/show_bug.cgi?id=67838 SourceFrame should not deal with JavaScript debugging since it is a base class for all source frame implementations. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/JavaScriptSourceFrame.js: Added. (WebInspector.JavaScriptSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): moved from ScriptsPanel.js (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94845. http://trac.webkit.org/changeset/94845 https://bugs.webkit.org/show_bug.cgi?id=67839 This patch kicked Qt-SL bots, but we don't need this modification. (Requested by ossy_ on #webkit). * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: 2011-09-09 Csaba Osztrogonác <ossy@webkit.org> [Qt][Mac]REGRESSION(r94774): Build is broken https://bugs.webkit.org/show_bug.cgi?id=67799 It seems these files didn't rebuilt because of a dependency bug. Touch them to trigger a rebuild. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: 2011-09-09 Alexander Pavlov <apavlov@chromium.org> Unreviewed, Chromium valgrind build fix. Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle https://bugs.webkit.org/show_bug.cgi?id=67837 * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): 2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94536. http://trac.webkit.org/changeset/94536 https://bugs.webkit.org/show_bug.cgi?id=67836 breaks absoluteLocation() of RelatedMouseEvent (Requested by jknotten on #webkit). * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: live edit both for JS and CSS is not discoverable. https://bugs.webkit.org/show_bug.cgi?id=65962 Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the Resources and the Scripts panels. The button is grayed out if the resource/script is not editable. Reviewed by Yury Semikhatsky. * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype.canEditSource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype.set visibleView): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.get statusBarItems): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._editButtonClicked): (WebInspector.SourceFrame.prototype.canEditSource): (WebInspector.SourceFrame.prototype.startEditing): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype._setReadOnly): (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick): * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype.set readOnly): (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing): * inspector/front-end/inspector.css: (button.edit-source-status-bar-item .glyph): (button.edit-source-status-bar-item.toggled-on .glyph): 2011-09-09 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::AppendNodeCommand::create(). https://bugs.webkit.org/show_bug.cgi?id=67767 Reviewed by Darin Adler. In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node. The current code assumes lastNode is an Element node. This patch checks it. Test: editing/execCommand/ident-crashes-topnode-is-text.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check. 2011-09-09 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::ApplyStyleCommand.doApply() https://bugs.webkit.org/show_bug.cgi?id=67765 Reviewed by Ryosuke Niwa. WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked. Test: editing/style/remove-format-without-enclosing-block.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check. 2011-09-09 James Simonsen <simonjam@chromium.org> [Chromium] Fix leak of Skia stream with custom CSS fonts https://bugs.webkit.org/show_bug.cgi?id=67815 Reviewed by Adam Barth. Test: fast/css/font-face-opentype.html under valgrind * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue https://bugs.webkit.org/show_bug.cgi?id=67742 Reviewed by Darin Adler. Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged InputType::valueChanged into InputType::setValue. Also introduced InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType. * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): * html/BaseCheckableInputType.h: * html/ColorInputType.cpp: * html/ColorInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue): * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): (WebCore::InputType::dispatchChangeEventInResponseToSetValue): * html/InputType.h: * html/RangeInputType.cpp: (WebCore::RangeInputType::setValue): * html/RangeInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue): * html/TextFieldInputType.h: 2011-09-08 Annie Sullivan <sullivan@chromium.org> Crashes in WebCore::InsertNodeBeforeCommand constructor. https://bugs.webkit.org/show_bug.cgi?id=67763 Reviewed by Ryosuke Niwa. Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that positions which are before or after a given node cannot return that node as the editable root. Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html * editing/htmlediting.cpp: (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode. 2011-09-08 James Weatherall <wez@chromium.org> Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document. This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down. https://bugs.webkit.org/show_bug.cgi?id=66181 Reviewed by Anders Carlsson. No new tests - no functional change. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::removedFromDocument): * html/HTMLPlugInElement.h: 2011-09-08 Daniel Bates <dbates@webkit.org> XSS filter bypass via non-standard URL encoding https://bugs.webkit.org/show_bug.cgi?id=66588 Reviewed by Adam Barth. Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html Implement support for decoding non-standard 16-bit Unicode escape sequences of the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>. See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>. * GNUmakefile.list.am: Added DecodeEscapeSequences.h. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/parser/XSSAuditor.cpp: (WebCore::decode16BitUnicodeEscapeSequences): Added. (WebCore::decodeStandardURLEscapeSequences): Added. (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences(). (WebCore::XSSAuditor::init): Modified to return early when the URL of the document is the empty string. This can happen when opening a new browser window or calling window.open(""). * platform/KURL.cpp: (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences(). This function just calls decodeEscapeSequences<URLEscapeSequence>(). * platform/text/DecodeEscapeSequences.h: Added. (WebCore::Unicode16BitEscapeSequence::findInString): (WebCore::Unicode16BitEscapeSequence::matchStringPrefix): (WebCore::Unicode16BitEscapeSequence::decodeRun): (WebCore::URLEscapeSequence::findInString): (WebCore::URLEscapeSequence::matchStringPrefix): (WebCore::URLEscapeSequence::decodeRun): (WebCore::decodeEscapeSequences): 2011-09-08 Adam Barth <abarth@webkit.org> DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings https://bugs.webkit.org/show_bug.cgi?id=67812 Reviewed by Eric Seidel. The one caller of this function does this work already. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::deprecatedFrameEncoding): 2011-09-08 Adam Klein <adamk@chromium.org> Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator https://bugs.webkit.org/show_bug.cgi?id=67810 Reviewed by Tony Chang. Reported as a valgrind failure in http://crbug.com/84777. No possible change in behavior, so no tests. The unitialized read could never have an impact: if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ... Since m_sortedTextBoxes.size() will be zero here if m_sortedTextBoxesPosition is uninitialized, and they're both unsigned, so no possible value of m_sortedTextBoxesPosition could be < 0. * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): 2011-09-08 Tony Chang <tony@chromium.org> Cleanup of switch statements with default cases https://bugs.webkit.org/show_bug.cgi?id=67808 Reviewed by Adam Barth. No new tests, just a small refactoring. * page/WebKitAnimation.cpp: (WebCore::WebKitAnimation::fillMode): * platform/audio/Distance.cpp: (WebCore::DistanceEffect::gain): 2011-09-08 Eric Seidel <eric@webkit.org> [BiDi] Add support for the BDI element https://bugs.webkit.org/show_bug.cgi?id=50913 Reviewed by Ryosuke Niwa. This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit. Test: css3/bdi-element.html * css/html.css: (bdi): 2011-09-08 David Levin <levin@chromium.org> [chromium] KURL::copy doesn't produce something usable on another thread. https://bugs.webkit.org/show_bug.cgi?id=67809 Reviewed by Adam Barth. No new functionality exposed so no new test. This was caught by testing code: the thread sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708). * platform/KURLGoogle.cpp: (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will not be used on another thread. 2011-09-08 Alexey Proskuryakov <ap@apple.com> REGRESSION (r66874): Missing RefPtr in ScriptController https://bugs.webkit.org/show_bug.cgi?id=67748 Reviewed by Adam Barth. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): 2011-09-08 Adam Barth <abarth@webkit.org> Second attempt to fix Chromium build. * dom/Document.h: 2011-09-08 Oliver Hunt <oliver@apple.com> Use bump allocator for initial property storage https://bugs.webkit.org/show_bug.cgi?id=67494 Reviewed by Geoffrey Garen. Add a forwarding header. * ForwardingHeaders/runtime/StorageBarrier.h: Added. 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> Unreviewed, rolling out r94809. http://trac.webkit.org/changeset/94809 https://bugs.webkit.org/show_bug.cgi?id=67718 commit _still_ premature, despite CQ eagerness * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Sam Weinig <sam@webkit.org> Remove the Completion object from JSC, I have never liked it https://bugs.webkit.org/show_bug.cgi?id=67755 Reviewed by Gavin Barraclough. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::evaluate): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject evaluateWebScript:]): * bridge/NP_jsobject.cpp: (_NPN_Evaluate): * bridge/jni/jni_jsobject.mm: (JavaJSObject::eval): 2011-09-08 Adam Barth <abarth@webkit.org> Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding() https://bugs.webkit.org/show_bug.cgi?id=67807 Reviewed by Eric Seidel. This function is super nutty. We don't want any more folks to call it thinking that it does something sane. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::deprecatedFrameEncoding): * loader/DocumentWriter.h: 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> <style scoped>: Add 'scoped' attribute https://bugs.webkit.org/show_bug.cgi?id=67718 Add 'scoped' attribute to IDL and attribute list, implement and test setting/resetting of the attribute. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/basic-attribute.html * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::scoped): (WebCore::HTMLStyleElement::setScoped): (WebCore::HTMLStyleElement::scopingElement): * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94781. http://trac.webkit.org/changeset/94781 https://bugs.webkit.org/show_bug.cgi?id=67806 Broke Objective-C binding on Mac (Requested by rniwa on #webkit). * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): 2011-09-08 Eric Seidel <eric@webkit.org> Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers https://bugs.webkit.org/show_bug.cgi?id=67803 Reviewed by Adam Barth. Smells like dead code. * loader/DocumentWriter.cpp: * loader/DocumentWriter.h: 2011-09-08 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::ReplaceSelectionCommand::doApply https://bugs.webkit.org/show_bug.cgi?id=67762 Reviewed by Ryosuke Niwa. WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it. Tests: editing/inserting/insert-without-enclosing-block.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Added null check. 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94784. http://trac.webkit.org/changeset/94784 https://bugs.webkit.org/show_bug.cgi?id=67796 Commit was premature (Requested by rolandsteiner on #webkit). * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 W. James MacLean <wjmaclean@chromium.org> [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation. https://bugs.webkit.org/show_bug.cgi?id=66472 This patch contains plumbing from Internals to WebViewImpl that can be removed at a later time when the zoom animator code is complete. Reviewed by James Robinson. Test: platform/chromium/compositing/zoom-animator-scale-test.html * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setZoomAnimatorScale): (WebCore::Settings::zoomAnimatorScale): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setZoomAnimatorScale): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setZoomAnimatorScale): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * testing/Internals.cpp: (WebCore::Internals::setZoomAnimatorScale): * testing/Internals.h: * testing/Internals.idl: 2011-09-08 Eric Carlson <eric.carlson@apple.com> HTMLMediaElement is missing initialTime attribute https://bugs.webkit.org/show_bug.cgi?id=67791 Reviewed by Darin Adler. Test: media/media-initialTime.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initialTime): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::initialTime): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::initialTime): 2011-09-03 Robert Hogan <robert@webkit.org> Elements with position:absolute don't move to correct position after images load https://bugs.webkit.org/show_bug.cgi?id=54611 Reviewed by Simon Fraser. Test: fast/block/positioning/absolute-layout-after-image-load.html In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Note: Although the issue is encountered only on first load without a fragment identifier, it happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so because scrolling to the fragment always happens before the image has loaded, rendering the page and clearing the initial dirty bits in the positioned element's renderer. When the image finally loads in this scenario, the positioned element is otherwise clean and relies on the above code to get re-rendered. Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately in bug 67759. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when deciding whether to mark children for layout 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> <style scoped>: Add 'scoped' attribute https://bugs.webkit.org/show_bug.cgi?id=67718 Add 'scoped' attribute to IDL and attribute list, implement and test setting/resetting of the attribute. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/basic-attribute.html * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::scoped): (WebCore::HTMLStyleElement::setScoped): (WebCore::HTMLStyleElement::scopingElement): * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Erik Arvidsson <arv@chromium.org> Move Element.contains to Node https://bugs.webkit.org/show_bug.cgi?id=67651 Reviewed by Darin Adler. This moves the contains method from Element to Node as in the DOM4 working draft: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains This also special cases Document contains to make it O(1) instead of O(depth). Tests: fast/dom/Node/contains-method.html perf/document-contains.html * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): Added document special case. * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check. 2011-09-08 Chris Rogers <crogers@google.com> Check AudioContext createChannelMerger() for thread safety https://bugs.webkit.org/show_bug.cgi?id=67247 Reviewed by Kenneth Russell. Test: webaudio/audiochannelmerger-stereo.html * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::process): (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput): * webaudio/AudioChannelMerger.h: 2011-09-08 Ned Holbrook <nholbrook@apple.com> Refactor hyphen measurement https://bugs.webkit.org/show_bug.cgi?id=67728 Reviewed by Darin Adler. No new tests, purely refactoring. * rendering/RenderBlockLineLayout.cpp: (WebCore::measureHyphenWidth): Added. (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth(). (WebCore::tryHyphenating): Ditto. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto. 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> Remove LayoutStateDisabler instances from RenderLayer https://bugs.webkit.org/show_bug.cgi?id=66896 Reviewed by Simon Fraser. As part of r93614, scrollTo does not call updateLayerPositions anymore. This means that we don't need to disable LayoutState from the scrolling code in RenderLayer. This change is covered by the existing tests. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Updated the comment that was not accurate anymore. Also explained what is wrong with LayoutState vs RenderLayer now. Note that the ASSERT is still valid and will not trigger as the remaining calls to updateLayerPositions are done *outside* layout() where LayoutState is not set (thus disabled). (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed 2 LayoutStateDisabler surrounding scrollToOffset. 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> Factor out the code to get the first non-null RenderTableSection in RenderTable https://bugs.webkit.org/show_bug.cgi?id=66972 Reviewed by Darin Adler. Refactoring only, covered by existing tests. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildren): (WebCore::AccessibilityTable::cellForColumnAndRow): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::rowIndexRange): Updated those for the signature change in sectionBelow. Also added a FIXME where topSection should be used instead of iterating over the section (and likely missing some corner cases). * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): * rendering/RenderTable.cpp: (WebCore::RenderTable::calcBorderStart): (WebCore::RenderTable::calcBorderEnd): (WebCore::RenderTable::outerBorderBefore): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): (WebCore::RenderTable::firstLineBoxBaseline): Updated all those functions to use the newly added functions. Also changed the variable names to match the functions. (WebCore::RenderTable::layout): (WebCore::RenderTable::topNonEmptySection): Newly added function that returns the top non null section of the table that has at least a row. (WebCore::RenderTable::cellAbove): (WebCore::RenderTable::cellBelow): Update the signature of those 2 functions to take an enum as it makes the rest of the code more readable. * rendering/RenderTable.h: (WebCore::RenderTable::topSection): Newly added function to return the top non null section in the table. 2011-04-19 Eric Seidel <eric@webkit.org> Reviewed by Ryosuke Niwa. [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property https://bugs.webkit.org/show_bug.cgi?id=50912 This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix. Parsing support was added in a previous patch, this wires up the RenderStyle values to code changes in the BidiResolver. The effect of this patch is that it makes it possible to "isolate" runs of text so that their RTL-ness or LTR-ness does not bleed out into the rest of your text and effect layout. This is important because many unicode characters (like parenthesis, ':', '-', etc.) do not have intrinsic directionality and are affected by whatever characters come before/after. If you have usernames which include RTL text, if you inject those usernames in your page you might end up with nearby characters moving! (like 'RTL USERNAME - my awesome site' as a title, could end up as 'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.) This patch makes it possible to wrap sections of text in isolated spans, so that they correctly order all their RTL/LTR contents, but also correctly participate in the larger RTL/LTR ordering without affecting nearby characters. Because much of this code is old and rarely touched, I've included extra background information in hopes of expanding my set of potential reviewers: WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA. The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart. Text layout is done per-block (<div>, <p>, etc), and begins with a string of text (which in our case comes from the rendering tree) and a specified width. First: Text is measured and wrapped into lines. Second: The UBA is run over the lines of text. Third: WebKit builds InlineBoxes (its linebox tree) and eventually render the text. This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters) and then adds another step after running the UBA, where we run the UBA recursively on any previously identified "isolated" content. The result of the UBA is an ordered list of "runs" of text with the RTL runs correctly RTL and the LTR runs LTR. The UBA does three things: 1. It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.) 2. Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR). 3. Re-orders those runs. The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree) walks along its InlineIterators, looking at each character and running the Unicode Bidi Algorithm (UBA). It walks through the rendering tree subtree under a block, using a (poorly named) bidiNext function which returns the next inline object. Each inline object (or text character there-in) has a corresponding meaning in the UBA such as a "strong RTL" character or a "neutral" character. The UBA reads these sequence of characters, and figures out what direction (RTL or LTR) to assign to any neutral characters it encounters, based on surrounding characters. As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance() function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject notifying InlineBidiResolver that it is entering or exiting an "isolated" span, at which point it will either start or stop ignoring the stream of characters from the InlineIterator. When the InlineBidiResolver is ignoring the stream of characters, instead of creating separate BidiRuns at each RTL/LTR boundary as it normally would, it instead creates one "fake" run for the entire isolated span. These fake runs participate in the normal UBA run ordering process, but after the main UBA, a second pass is made where we examine the list of isolatedRuns() and run the UBA on each of them, replacing the fake run we previously inserted, with the resulting list of runs from that inner UBA run. The way it "ignores" characters is by treating them all as neutral when inside an isolate. Thus all the characters end up grouped in a single run, but their directionality (as a group) is correctly affected by any surrounding strong characters. If you understood that last paragraph, than the rest of the change is just plumbing. I added a huge number of FIXMEs to this code, because this code has a variety of design choices (or lack there of) which make some of this very difficult. For example the bidiNext iterator function has two sets of mutually exclusive parameters and can be used optionally with or without an observer. Prior to this change there was only ever one object which cared about observing a walk over inlines and that was InlineBidiResolver. This patch (regretfully) templatizes bidiNext to support a new Observer type. The correct fix would be to rip bidiNext into multiple functions and rip need for observation out of InlineBidiResolver. Unfortunately I've tried both in separate bugs and failed. This code is very very old and very poorly understood. We're slowly moving forward, this is another tiny step. This is my fourth iteration of this patch (I'm happy to do more!), but I believe it's a good compromise between fixing all of the design gotcha's of our bidi system and doing the minimum amount to add this killer CSS feature. I ran the PLT. (It averaged 0.2% faster with this change, but I attribute that to noise). Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html * platform/text/BidiResolver.h: (WebCore::BidiCharacterRun::setNext): - Needed by the new replaceRunWithRuns function. (WebCore::BidiResolver::BidiResolver): (WebCore::BidiResolver::~BidiResolver): (WebCore::BidiResolver::enterIsolate): (WebCore::BidiResolver::exitIsolate): (WebCore::BidiResolver::inIsolate): (WebCore::BidiResolver::isolatedRuns): - Used to track isolated spans of text as they're encoutered. They're stuffed away here to be processed recursively after the main UBA has done its thang. (WebCore::::appendRun): (WebCore::::embed): (WebCore::::commitExplicitEmbedding): (WebCore::::createBidiRunsForLine): * platform/text/BidiRunList.h: (WebCore::::replaceRunWithRuns): - This effectively takes all the runs from one runlist and adds them to this one, replacing the fake run we inserted during a previous pass of the UBA. - This RunList now owns the runs, so we call clear() on the other RunList so that we don't end up double-freeing the runs. (WebCore::::clear): - This allows us to "take" runs from another run list and then clear it. * rendering/BidiRun.h: (WebCore::BidiRun::object): * rendering/InlineIterator.h: (WebCore::InlineIterator::object): (WebCore::InlineIterator::offset): (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext. (WebCore::notifyObserverWillExitObject): Mostly just renaming. (WebCore::addPlaceholderRunForIsolatedInline): (WebCore::isIsolatedInline): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::statusWithDirection): (WebCore::constructBidiRuns): - This is the heavy-lifting of this change. This function runs the UBA recursively on all the previously identified isolated spans. - If we encounter more isolated spans in our run, we just add them to the main list an keep going. Because the runs are linked lists and we have direct pointers to our placeholder objects, we don't care what order we process the placeholders in, so long as when we're done, they're all processed. (WebCore::RenderBlock::layoutInlineChildren): 2011-09-08 Kentaro Hara <haraken@google.com> Implement a ProgressEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67537 Reviewed by Sam Weinig. The spec for the ProgressEvent constructor is here: http://www.w3.org/TR/progress-events/#interface-progressevent Test: fast/events/constructors/progress-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent. * dom/ProgressEvent.cpp: (WebCore::ProgressEventInit::ProgressEventInit): (WebCore::ProgressEvent::ProgressEvent): * dom/ProgressEvent.h: Added a definition for ProgressEventInit. (WebCore::ProgressEvent::create): * dom/ProgressEvent.idl: Makes ProgressEvent constructible. 2011-09-08 Ryosuke Niwa <rniwa@webkit.org> Make bindings tests quiet after r94701. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): 2011-09-07 Pavel Podivilov <podivilov@chromium.org> Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded. https://bugs.webkit.org/show_bug.cgi?id=67717 Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage): (WebInspector.DebuggerPresentationModel.prototype._consoleCleared): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated): (WebInspector.PresentationCallFrame.prototype.sourceLine): * inspector/front-end/SourceFile.js: 2011-09-06 Pavel Podivilov <podivilov@chromium.org> Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=67647 1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything. 2) Add RawSourceCode unit tests. 3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now). Reviewed by Yury Semikhatsky. Test: inspector/debugger/raw-source-code.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken https://bugs.webkit.org/show_bug.cgi?id=67711 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._registerShortcuts): (WebInspector.ConsoleView.prototype._promptKeyDown): 2011-09-08 Andras Becsi <andras.becsi@nokia.com> [Qt] Build fails with strict compiler https://bugs.webkit.org/show_bug.cgi?id=67778 Reviewed by Csaba Osztrogonác. No new tests needed. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable]. 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94695. http://trac.webkit.org/changeset/94695 https://bugs.webkit.org/show_bug.cgi?id=67776 Hitting an assertion on Snow Leopard, Qt, GTK (Requested by Zoltan on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionedFloatsNeedRelayout): (WebCore::RenderBlock::layoutPositionedObjects): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css). * inspector/front-end/ApplicationCacheItemsView.js: * inspector/front-end/AuditResultView.js: * inspector/front-end/BinarySearch.js: * inspector/front-end/CSSStyleModel.js: * inspector/front-end/ConsoleMessage.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/CookieItemsView.js: * inspector/front-end/CookieParser.js: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMStorage.js: * inspector/front-end/DOMStorageItemsView.js: * inspector/front-end/DataGrid.js: * inspector/front-end/Database.js: * inspector/front-end/DatabaseQueryView.js: * inspector/front-end/DetailedHeapshotGridNodes.js: * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/EmptyView.js: * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/ExtensionCommon.js: * inspector/front-end/GoToLineDialog.js: * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotProxy.js: * inspector/front-end/HeapSnapshotWorkerDispatcher.js: * inspector/front-end/ImageView.js: * inspector/front-end/InjectedFakeWorker.js: * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/MetricsSidebarPane.js: * inspector/front-end/NetworkManager.js: * inspector/front-end/NetworkPanel.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/PartialQuickSort.js: * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: * inspector/front-end/RemoteObject.js: * inspector/front-end/Resource.js: * inspector/front-end/ResourceCategory.js: * inspector/front-end/ResourceHTMLView.js: * inspector/front-end/ResourceHeadersView.js: * inspector/front-end/ResourceJSONView.js: * inspector/front-end/ResourceTimingView.js: * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/ResourceView.js: * inspector/front-end/ResourcesPanel.js: * inspector/front-end/SearchController.js: * inspector/front-end/SettingsScreen.js: * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/SourceCSSTokenizer.js: * inspector/front-end/SourceHTMLTokenizer.js: * inspector/front-end/SourceJavaScriptTokenizer.js: * inspector/front-end/StatusBarButton.js: * inspector/front-end/TextEditorModel.js: * inspector/front-end/TimelineGrid.js: * inspector/front-end/View.js: * inspector/front-end/heapProfiler.css: * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: * inspector/front-end/inspectorSyntaxHighlight.css: * inspector/front-end/networkPanel.css: * inspector/front-end/treeoutline.js: * inspector/front-end/utilities.js: 2011-09-07 Andrey Kosyakov <caseq@chromium.org> Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR https://bugs.webkit.org/show_bug.cgi?id=67715 Reviewed by Yury Semikhatsky. - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.forwardWheelEvent): (WebInspector.TextViewer): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94674 and r94689. http://trac.webkit.org/changeset/94674 http://trac.webkit.org/changeset/94689 https://bugs.webkit.org/show_bug.cgi?id=67754 Broke inspector/debugger/script-formatter.html (Requested by rniwa on #webkit). * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.get rawSourceCode): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-07 Julien Chaffraix <jchaffraix@webkit.org> offsetFromRoot optimization is disabled after r93837 https://bugs.webkit.org/show_bug.cgi?id=67677 Reviewed by Simon Fraser. Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2) because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't have a good test harness to cover such slowdown. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss the optimization altogether. (WebCore::RenderLayer::computeRepaintRects): (WebCore::RenderLayer::updateLayerPositionsAfterScroll): * rendering/RenderLayer.h: Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming. 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Windows build fix after r94737. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): 2011-09-07 Dan Bernstein <mitz@apple.com> Removed hyphenation function implementations for an usupported build configuration. Reviewed by Sam Weinig. * platform/text/cf/HyphenationCF.cpp: 2011-09-07 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67739 adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this function by removing the loop and just computing the start and end column for a repaint rect and uniting everything in between. Reviewed by Dan Bernstein. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94714 and r94723. http://trac.webkit.org/changeset/94714 http://trac.webkit.org/changeset/94723 https://bugs.webkit.org/show_bug.cgi?id=67746 breaks gtk-linux tests with assertion failure (Requested by thorton on #webkit). * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::inTransparencyLayer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintTrackPiece): (WebCore::ScrollbarThemeWin::paintButton): (WebCore::ScrollbarThemeWin::paintThumb): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::paint): * rendering/RenderThemeWin.cpp: (WebCore::drawControl): 2011-09-07 Chris Fleizach <cfleizach@apple.com> Changes to aria-hidden don't change VO navigation https://bugs.webkit.org/show_bug.cgi?id=67722 Reviewed by Darin Adler. When altering aria-hidden, WebCore needs to update the children caches of affected elements. However, for elements that were children, but ignored, their caches did not get updated, and stale information would be propagated. The fix is to always clearChildren() when a parent is asking for children. This ensures information is always up to date when the parent itself is asking for new data. Test: accessibility/aria-hidden-updates-alldescendants.html * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaIsHidden): (WebCore::AccessibilityRenderObject::childrenChanged): (WebCore::AccessibilityRenderObject::addChildren): 2011-09-07 Tim Horton <timothy_horton@apple.com> Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow https://bugs.webkit.org/show_bug.cgi?id=67543 <rdar://problem/10070536> Reviewed by Simon Fraser. Generalize (begin|end)TransparencyLayer, which now forward through to (begin|end)PlatformTransparencyLayer, so that isInTransparencyLayer can exist on every platform. Make use of isInTransparencyLayer in FontMac to disable "simple" shadow drawing when the text is being rendered into a transparency layer. Test: svg/custom/simple-text-double-shadow.svg * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::isInTransparencyLayer): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::isInTransparencyLayer): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/win/ScrollbarThemeWin.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeWin.cpp: 2011-09-07 Dan Bernstein <mitz@apple.com> <rdar://problem/8881922> Support the hyphenate-limit-lines property https://bugs.webkit.org/show_bug.cgi?id=67730 Reviewed by Dave Hyatt. Tests: fast/css/parsing-hyphenate-limit-lines.html fast/text/hyphenate-limit-lines.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword "no-limit". * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines. * css/CSSValueKeywords.in: Added the "no-limit" value keyword. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines before the start line and pass it to layoutRunsAndFloatsInRange(). (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak(). (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before the current line and the limit on consecutive hyphenated lines, and an early return if the limit has been reached. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive hyphenated lines before the current line, which is passed through to tryHyphenating, along with the value of hyphenate-limit-lines. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated. * rendering/RootInlineBox.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter. (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter. (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1, corresponding to "no-limit". * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable. (WebCore::StyleRareInheritedData::operator==): Compare new member variable. * rendering/style/StyleRareInheritedData.h: 2011-09-02 Ojan Vafai <ojan@chromium.org> split overrideSize into overrideHeight and overrideWidth https://bugs.webkit.org/show_bug.cgi?id=67550 Reviewed by Sam Weinig. All uses of overrideSize only set one of the width or the height. This change removes a bool from RenderObject and removes some flexbox specific logic from RenderBox. The only downside is that we have two global maps where we used to have one. No functional changes so existing tests are sufficient. * rendering/RenderBox.cpp: (WebCore::RenderBox::hasOverrideHeight): (WebCore::RenderBox::hasOverrideWidth): (WebCore::RenderBox::setOverrideHeight): (WebCore::RenderBox::setOverrideWidth): (WebCore::RenderBox::clearOverrideSize): (WebCore::RenderBox::overrideWidth): (WebCore::RenderBox::overrideHeight): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBox.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::setOverrideHeightFromRowHeight): * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): (WebCore::RenderTableSection::layoutRows): 2011-09-07 Alexei Svitkine <asvitkine@chromium.org> Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path. https://bugs.webkit.org/show_bug.cgi?id=67511 Reviewed by Dimitri Glazkov. Tests: platform/chromium-mac/rubberbanding/overhang-e.html platform/chromium-mac/rubberbanding/overhang-n.html platform/chromium-mac/rubberbanding/overhang-ne.html platform/chromium-mac/rubberbanding/overhang-nw.html platform/chromium-mac/rubberbanding/overhang-s.html platform/chromium-mac/rubberbanding/overhang-se.html platform/chromium-mac/rubberbanding/overhang-sw.html platform/chromium-mac/rubberbanding/overhang-w.html * WebCore.exp.in: * platform/ScrollableArea.h: * testing/Internals.cpp: (WebCore::Internals::setScrollViewPosition): * testing/Internals.h: * testing/Internals.idl: 2011-09-07 David Reveman <reveman@chromium.org> [Chromium] Render surface anti-aliasing. https://bugs.webkit.org/show_bug.cgi?id=66437 Reviewed by James Robinson. Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow edge computations to be shared between tiled layers and render surfaces. Move isCCW utility function to FloatQuad class and add to2dTransform method to TransformationMatrix class. Add necessary anti-aliasing shaders for render surfaces and use them to avoid aliased edges. Tests: compositing/reflections/nested-reflection-transformed.html (existing) * WebCore.gypi: * platform/graphics/FloatQuad.cpp: (WebCore::FloatQuad::isCounterclockwise): * platform/graphics/FloatQuad.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::drawTexturedQuad): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceProgramAA): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::sharedGeometryQuad): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderQuad::VertexShaderQuad): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderQuad::getShaderString): (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA): (WebCore::FragmentShaderRGBATexAlphaAA::init): (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString): (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding): (WebCore::FragmentTexClampAlphaAABinding::init): (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::VertexShaderQuad::matrixLocation): (WebCore::VertexShaderQuad::pointLocation): (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation): (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation): (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added. (WebCore::CCLayerQuad::Edge::Edge): (WebCore::CCLayerQuad::CCLayerQuad): (WebCore::CCLayerQuad::floatQuad): (WebCore::CCLayerQuad::toFloatArray): * platform/graphics/chromium/cc/CCLayerQuad.h: Added. (WebCore::CCLayerQuad::Edge::Edge): (WebCore::CCLayerQuad::Edge::x): (WebCore::CCLayerQuad::Edge::y): (WebCore::CCLayerQuad::Edge::z): (WebCore::CCLayerQuad::Edge::setX): (WebCore::CCLayerQuad::Edge::setY): (WebCore::CCLayerQuad::Edge::setZ): (WebCore::CCLayerQuad::Edge::set): (WebCore::CCLayerQuad::Edge::moveX): (WebCore::CCLayerQuad::Edge::moveY): (WebCore::CCLayerQuad::Edge::moveZ): (WebCore::CCLayerQuad::Edge::move): (WebCore::CCLayerQuad::Edge::scaleX): (WebCore::CCLayerQuad::Edge::scaleY): (WebCore::CCLayerQuad::Edge::scaleZ): (WebCore::CCLayerQuad::Edge::scale): (WebCore::CCLayerQuad::Edge::intersect): (WebCore::CCLayerQuad::CCLayerQuad): (WebCore::CCLayerQuad::left): (WebCore::CCLayerQuad::top): (WebCore::CCLayerQuad::right): (WebCore::CCLayerQuad::bottom): (WebCore::CCLayerQuad::inflateX): (WebCore::CCLayerQuad::inflateY): (WebCore::CCLayerQuad::inflate): (WebCore::CCLayerQuad::inflateAntiAliasingDistance): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::to2dTransform): * platform/graphics/transforms/TransformationMatrix.h: 2011-09-06 Oliver Hunt <oliver@apple.com> Remove JSObjectWithGlobalObject https://bugs.webkit.org/show_bug.cgi?id=67689 Reviewed by Geoff Garen. Remove use of anonymous storage and JSObjectWithGlobalObject for accessing a JSObject's global object now that they're available on the object's structure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::globalObject): (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): (JSC::Bindings::ObjcFallbackObjectImp::finishCreation): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): (JSC::Bindings::RuntimeObject::finishCreation): * bridge/runtime_object.h: 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r94694. * WebCore.xcodeproj/project.pbxproj: 2011-09-07 Tim Horton <timothy_horton@apple.com> FELighting is using width instead of height to determine skip for parallel(n>2) case https://bugs.webkit.org/show_bug.cgi?id=67719 <rdar://problem/10086178> Reviewed by Dirk Schulze. No new tests, because the bug only exhibits under conditions which are currently impossible by default (using more than 2 cores) on some platforms. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplyGeneric): 2011-09-07 W. James MacLean <wjmaclean@chromium.org> Eliminate motion jitter in animated, blurred SVG image https://bugs.webkit.org/show_bug.cgi?id=67503 Fixes filter shear-free transform applied to SVG images. In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region, which is based on the object bounding box (which doesn't move). For a rotation around the centre of the box, this should really just be the identity matrix, since the BB should neither change size nor location. So really, we're just interested in the scale change of the BB here, and not in moving it. This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions for vertical and horizontal slices, so the test verifies these. Reviewed by Dirk Schulze. Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): 2011-09-03 Robert Hogan <robert@webkit.org> Elements with position:absolute don't move to correct position after images load https://bugs.webkit.org/show_bug.cgi?id=54611 Reviewed by Simon Fraser. Test: fast/block/positioning/absolute-layout-after-image-load.html fast/block/positioning/positioned-float-layout-after-image-load.html In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects() takes care of it this at least ensures no regression in future. Note: Although the issue is encountered only on first load without a fragment identifier, it happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so because scrolling to the fragment always happens before the image has loaded, rendering the page and clearing the initial dirty bits in the positioned element's renderer. When the image finally loads in this scenario, the positioned element is otherwise clean and relies on the above code to get re-rendered. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when deciding whether to mark children for layout (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto 2011-09-07 Anna Cavender <annacc@chromium.org> Moving platform/track to html/track to avoid layering violation. https://bugs.webkit.org/show_bug.cgi?id=67680 Reviewed by Adam Barth. No new tests. No new functionality. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp. * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h. * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h. * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp. * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h. * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h. * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp. * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h. 2011-09-07 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67286 REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084. Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with leading to just be the block height. Reviewed by Dan Bernstein. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::linkToEndLineIfNeeded): 2011-09-06 Abhishek Arya <inferno@chromium.org> Null owningRenderer crash in RenderScrollbar::updateScrollbarParts. https://bugs.webkit.org/show_bug.cgi?id=67669 Reviewed by James Robinson. Owning renderer can be cleared for custom scrollbars in clearOwningRenderer() call. We need a null check in updateScrollbarParts, so that we do not crash. No tests since issue seen in crash reports only and I donot know a way to reproduce. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::updateScrollbarParts): 2011-09-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to. https://bugs.webkit.org/show_bug.cgi?id=67606 Reviewed by Noam Rosenthal. TiledBackingStore previously used different values for horizontal and vertial multiplication to calculate the cover area. This patch replaces this mechanism, used to give a bigger panning range to vertical panning, with the possibility to use the motion vector of the viewport to request tiles ahead instead. This allows economies on rendering resources as tiles won't be rendered beside the trajectory of the viewport. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers): (WebCore::TiledBackingStore::setCoverAreaFocusVector): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::calculateKeepRect): (WebCore::TiledBackingStore::calculateCoverRect): * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers): 2011-09-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy. https://bugs.webkit.org/show_bug.cgi?id=67416 Reviewed by Kenneth Rohde Christiansen. Original code by Antti Koivisto. With the current code, when the page is layouted during load, edge tiles will get removed instead of continuing to show their front buffer while the tile is being rendered for the new size. * platform/graphics/Tile.h: * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::resizeEdgeTiles): * platform/graphics/TiledBackingStore.h: * platform/graphics/qt/TileQt.cpp: (WebCore::TileQt::resize): * platform/graphics/qt/TileQt.h: 2011-09-07 Tim Horton <timothy_horton@apple.com> Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation https://bugs.webkit.org/show_bug.cgi?id=67242 <rdar://problem/10069770> Reviewed by Dirk Schulze. No new tests, minor performance improvement. * platform/graphics/transforms/AffineTransform.cpp: (WebCore::AffineTransform::blend): (WebCore::AffineTransform::decompose): (WebCore::AffineTransform::recompose): * platform/graphics/transforms/AffineTransform.h: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::clear2DRotation): 2011-09-06 Pavel Podivilov <podivilov@chromium.org> Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=67647 1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything. 2) Add RawSourceCode unit tests. 3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now). Reviewed by Yury Semikhatsky. Test: inspector/debugger/raw-source-code.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-07 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Implement circular tabbing through the Styles sidebar pane contents https://bugs.webkit.org/show_bug.cgi?id=67127 Reviewed by Yury Semikhatsky. * inspector/front-end/Section.js: (WebInspector.Section.prototype.get firstSibling): (WebInspector.Section.prototype.get lastSibling): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.nextEditableSibling): (WebInspector.StylePropertiesSection.prototype.previousEditableSibling): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection): 2011-09-02 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] expose console API https://bugs.webkit.org/show_bug.cgi?id=67506 Reviewed by Pavel Feldman. Test: inspector/extensions/extensions-console.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype.get text): (WebInspector.ConsoleMessage.prototype.get parameters): * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.InspectorExtensionAPI): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.Console.prototype.getMessages): (WebInspector.injectedExtensionAPI.Console.prototype.addMessage): (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel): (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent): (WebInspector.injectedExtensionAPI.Network): (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent): (WebInspector.injectedExtensionAPI.AuditCategoryImpl): (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent): (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent): (WebInspector.injectedExtensionAPI.InspectedWindow): * inspector/front-end/ExtensionCommon.js: (WebInspector.commonExtensionSymbols): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded): (WebInspector.ExtensionServer.prototype._onGetConsoleMessages): (WebInspector.ExtensionServer.prototype._onAddConsoleMessage): (WebInspector.ExtensionServer.prototype._makeConsoleMessage): (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter): (WebInspector.ExtensionServer.prototype._dispatchCallback): (WebInspector.ExtensionServer.prototype.initExtensions): 2011-09-05 Andrey Kosyakov <caseq@chromium.org> Web Inspector: disable popover when a mouse button is pressed https://bugs.webkit.org/show_bug.cgi?id=67610 Reviewed by Pavel Feldman. - disable popover when a mouse button is pressed - disable popover in a SourceFrame when the source is being edited * inspector/front-end/Popover.js: (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseUp): (WebInspector.PopoverHelper.prototype._mouseDown): (WebInspector.PopoverHelper.prototype._handleMouseAction): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._onHidePopover): (WebInspector.SourceFrame.prototype.doubleClick): 2011-09-07 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67634 De-virtualize styleForRenderer() Reviewed by Sam Weinig. This has performance and code clarity benefits. - move styleForRenderer from Node to Element - get rid of the now unnecessary NodeRenderingContext parameter - de-virtualize, add virtual customStyleForRenderer() * dom/Element.cpp: (WebCore::Element::customStyleForRenderer): (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): * dom/Element.h: * dom/Node.cpp: * dom/Node.h: (WebCore::Node::hasCustomWillOrDidRecalcStyle): (WebCore::Node::setHasCustomWillOrDidRecalcStyle): (WebCore::Node::hasCustomStyleForRenderer): (WebCore::Node::setHasCustomStyleForRenderer): Move styleForRenderer, add customStyleForRenderer, add a bit. * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): Handle non-element case separately since styleForRenderer was moved from Node to Element. * html/HTMLNoScriptElement.cpp: (WebCore::HTMLNoScriptElement::HTMLNoScriptElement): (WebCore::HTMLNoScriptElement::customStyleForRenderer): * html/HTMLNoScriptElement.h: Move a strange XHTMLMP special case to where it belongs. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::textWithDirection): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerElement::customStyleForRenderer): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): (WebCore::TextControlInnerTextElement::customStyleForRenderer): * html/shadow/TextControlInnerElements.h: * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::customStyleForRenderer): * rendering/svg/SVGShadowTreeElements.h: * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::customStyleForRenderer): * svg/SVGElement.h: Adopt customStyleForRenderer(). 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Change event is not fired for input[type=number] when the user reverts a change made by script https://bugs.webkit.org/show_bug.cgi?id=67697 Reviewed by Kent Tamura. The bug was caused by HTMLInputElement::setValue not calling setTextAsOfLastFormControlChangeEvent for text fields other than type=text. Also fixed a that stepUpFromRenderer does not call setTextAsOfLastFormControlChangeEvent at appropriate timing due to setValueAsNumber always passing sendChangeEvent=false to setValue by propagating values through setValueAsNumber and applyStep. This refactoring allows us to remove calls to dispatch* in stepUpFromRenderer because they're now called in setValueAsNumber or applyStep. Test: fast/forms/number-input-changeevent.html * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsNumber): * html/BaseDateAndTimeInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::applyStep): (WebCore::HTMLInputElement::stepUp): (WebCore::HTMLInputElement::stepDown): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setValueAsNumber): (WebCore::HTMLInputElement::stepUpFromRenderer): * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::setValueAsNumber): * html/InputType.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsNumber): * html/NumberInputType.h: * html/RangeInputType.cpp: (WebCore::RangeInputType::setValueAsNumber): (WebCore::RangeInputType::handleKeydownEvent): * html/RangeInputType.h: 2011-09-07 Antti Koivisto <antti@apple.com> Try to fix Qt build by moving the Qt specific include (which is not really allowed here!). Not reviewed. * css/CSSStyleSelector.cpp: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineLinkStateSlowCase): 2011-09-07 Antti Koivisto <antti@apple.com> Move SelectorChecker out from CSSStyleSelector scope https://bugs.webkit.org/show_bug.cgi?id=67648 Reviewed by Sam Weinig. - Move SelectorChecker to SelectorChecker.h/cpp - Make private functions private - Make members private, add accessors - Move m_sameOriginOnly to CSSStyleSelector as it is not used by SelectorChecker * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::CSSStyleSelector::sortMatchedRules): (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::matchUARules): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::CSSStyleSelector::styleForPage): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): (WebCore::CSSStyleSelector::checkSelector): (WebCore::RuleData::RuleData): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::checkForGenericFamilyChange): (WebCore::CSSStyleSelector::setFontSize): (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::style): (WebCore::CSSStyleSelector::parentStyle): (WebCore::CSSStyleSelector::rootElementStyle): (WebCore::CSSStyleSelector::element): (WebCore::CSSStyleSelector::fontDescription): (WebCore::CSSStyleSelector::parentFontDescription): (WebCore::CSSStyleSelector::setFontDescription): (WebCore::CSSStyleSelector::setZoom): (WebCore::CSSStyleSelector::setEffectiveZoom): (WebCore::CSSStyleSelector::setTextSizeAdjust): (WebCore::CSSStyleSelector::setStyle): (WebCore::CSSStyleSelector::fontSelector): (WebCore::CSSStyleSelector::allVisitedStateChanged): (WebCore::CSSStyleSelector::visitedStateChanged): (WebCore::CSSStyleSelector::usesSiblingRules): (WebCore::CSSStyleSelector::usesFirstLineRules): (WebCore::CSSStyleSelector::usesBeforeAfterRules): (WebCore::CSSStyleSelector::usesLinkRules): (WebCore::CSSStyleSelector::addMatchedRule): (WebCore::CSSStyleSelector::isRightPage): (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame): (WebCore::CSSStyleSelector::styleNotYetAvailable): * css/SelectorChecker.cpp: Added. (WebCore::SelectorChecker::SelectorChecker): (WebCore::linkAttribute): (WebCore::SelectorChecker::determineLinkStateSlowCase): (WebCore::SelectorChecker::checkSelector): (WebCore::SelectorChecker::fastCheckSelector): (WebCore::SelectorChecker::isFastCheckableSelector): (WebCore::addLocalNameToSet): (WebCore::createHtmlCaseInsensitiveAttributesSet): (WebCore::htmlAttributeHasCaseInsensitiveValue): (WebCore::attributeQualifiedNameMatches): (WebCore::attributeValueMatches): (WebCore::anyAttributeMatches): (WebCore::SelectorChecker::checkOneSelector): (WebCore::SelectorChecker::checkScrollbarPseudoClass): (WebCore::SelectorChecker::allVisitedStateChanged): (WebCore::SelectorChecker::visitedStateChanged): * css/SelectorChecker.h: Added. (WebCore::SelectorChecker::document): (WebCore::SelectorChecker::strictParsing): (WebCore::SelectorChecker::isCollectingRulesOnly): (WebCore::SelectorChecker::setCollectingRulesOnly): (WebCore::SelectorChecker::isMatchingVisitedPseudoClass): (WebCore::SelectorChecker::setMatchingVisitedPseudoClass): (WebCore::SelectorChecker::pseudoStyle): (WebCore::SelectorChecker::setPseudoStyle): (WebCore::SelectorChecker::hasUnknownPseudoElements): (WebCore::SelectorChecker::clearHasUnknownPseudoElements): (WebCore::SelectorChecker::determineLinkState): * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): * dom/SelectorQuery.h: 2011-09-07 Dmitry Lomov <dslomov@google.com> https://bugs.webkit.org/show_bug.cgi?id=67413 [Chromium]Web Inspector: inspected page with dedicated worker crashes on refresh. This patch enforces lifetime ordering between WorkerInspectorController and WorkerScriptController. Reviewed by Yury Semikhatsky. * workers/WorkerContext.cpp: (WebCore::WorkerContext::clearInspector): * workers/WorkerContext.h: * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94627 and r94632. http://trac.webkit.org/changeset/94627 http://trac.webkit.org/changeset/94632 https://bugs.webkit.org/show_bug.cgi?id=67698 It broke tests on GTK and Qt (Requested by Ossy on #webkit). * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-08-31 Yury Semikhatsky <yurys@chromium.org> fast/workers/worker-script-error.html fails on Chromium after r94061 https://bugs.webkit.org/show_bug.cgi?id=67206 Default action should be prevented if window.onerror returned true and stay not prevented otherwise. Reviewed by Dmitry Titov. Tests: fast/events/window-onerror14.html fast/events/window-onerror15.html fast/events/window-onerror16.html * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::invokeEventHandler): (WebCore::V8AbstractEventListener::shouldPreventDefault): allow specific event listeners to decide when to prevent default action based on the handler return value. * bindings/v8/V8AbstractEventListener.h: * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): (WebCore::V8WindowErrorHandler::shouldPreventDefault): * bindings/v8/V8WindowErrorHandler.h: * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): (WebCore::V8WorkerContextErrorHandler::shouldPreventDefault): * bindings/v8/V8WorkerContextErrorHandler.h: 2011-09-06 Xianzhu Wang <wangxianzhu@chromium.org> Replace usages of Vector<UChar> with existing StringBuilder https://bugs.webkit.org/show_bug.cgi?id=67079 Reviewed by Gavin Barraclough. No new tests. All existing unit tests and layout tests should run as before. * css/CSSOMUtils.cpp: (WebCore::appendCharacter): (WebCore::serializeCharacter): (WebCore::serializeCharacterAsCodePoint): (WebCore::serializeIdentifier): (WebCore::serializeString): * css/CSSOMUtils.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase): * css/CSSWrapShapes.cpp: (WebCore::CSSWrapShapeRect::cssText): (WebCore::CSSWrapShapeCircle::cssText): (WebCore::CSSWrapShapeEllipse::cssText): (WebCore::CSSWrapShapePolygon::cssText): * editing/HTMLInterchange.cpp: (WebCore::convertHTMLTextToInterchangeFormat): * editing/MarkupAccumulator.cpp: (WebCore::appendCharactersReplacingEntities): (WebCore::MarkupAccumulator::serializeNodes): (WebCore::MarkupAccumulator::appendStartTag): (WebCore::MarkupAccumulator::appendEndTag): (WebCore::MarkupAccumulator::concatenateMarkup): (WebCore::MarkupAccumulator::appendAttributeValue): (WebCore::MarkupAccumulator::appendCustomAttributes): (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): (WebCore::MarkupAccumulator::appendNodeValue): (WebCore::MarkupAccumulator::appendNamespace): (WebCore::MarkupAccumulator::appendText): (WebCore::MarkupAccumulator::appendComment): (WebCore::MarkupAccumulator::appendDocumentType): (WebCore::MarkupAccumulator::appendProcessingInstruction): (WebCore::MarkupAccumulator::appendElement): (WebCore::MarkupAccumulator::appendOpenTag): (WebCore::MarkupAccumulator::appendCloseTag): (WebCore::MarkupAccumulator::appendAttribute): (WebCore::MarkupAccumulator::appendCDATASection): (WebCore::MarkupAccumulator::appendStartMarkup): (WebCore::MarkupAccumulator::appendEndMarkup): * editing/MarkupAccumulator.h: * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendElement): (WebCore::StyledMarkupAccumulator::wrapWithNode): (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): (WebCore::StyledMarkupAccumulator::takeResults): (WebCore::StyledMarkupAccumulator::appendText): (WebCore::urlToMarkup): * html/DOMTokenList.cpp: (WebCore::DOMTokenList::removeToken): * html/HTMLFontElement.cpp: (WebCore::parseFontSize): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/CSSPreloadScanner.h: * html/parser/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * html/parser/HTMLEntityParser.h: * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTMLInteger): (WebCore::parseHTMLNonNegativeInteger): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::processEntity): (WebCore::HTMLTokenizer::nextToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo): (WebCore::HTMLTreeBuilder::defaultForInTableText): * html/parser/HTMLTreeBuilder.h: * inspector/InspectorValues.cpp: (WebCore::InspectorValue::toJSONString): (WebCore::InspectorValue::writeJSON): (WebCore::InspectorBasicValue::writeJSON): (WebCore::InspectorString::writeJSON): (WebCore::InspectorObject::writeJSON): (WebCore::InspectorArray::writeJSON): * inspector/InspectorValues.h: * loader/CrossOriginAccessControl.cpp: (WebCore::createAccessControlPreflightRequest): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): * page/Chrome.cpp: (WebCore::Chrome::setToolTip): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendText): (WebCore::SerializerMarkupAccumulator::appendElement): (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::toString): * platform/KURL.cpp: (WebCore::KURL::deprecatedString): (WebCore::decodeURLEscapeSequences): * platform/LinkHash.cpp: (WebCore::squeezeOutNullCharacters): (WebCore::cleanSlashDotDotSlashes): (WebCore::mergeDoubleSlashes): (WebCore::cleanSlashDotSlashes): (WebCore::cleanPath): (WebCore::visitedURLInline): (WebCore::visitedURL): (WebCore::visitedLinkHash): * platform/LinkHash.h: * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::setURL): * platform/network/HTTPParsers.cpp: (WebCore::extractMIMETypeFromMediaType): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode): * platform/text/TextStream.cpp: (WebCore::TextStream::operator<<): (WebCore::TextStream::release): * platform/text/TextStream.h: * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): * rendering/InlineTextBox.cpp: (WebCore::adjustCharactersAndLengthForHyphen): * rendering/InlineTextBox.h: (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::markerTextWithSuffix): * rendering/RenderListMarker.cpp: (WebCore::toSymbolic): (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::suffix): * rendering/RenderTreeAsText.cpp: (WebCore::quoteAndEscapeNonPrintables): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::decodeString): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::getAllResponseHeaders): * xml/XPathFunctions.cpp: (WebCore::XPath::FunId::evaluate): (WebCore::XPath::FunConcat::evaluate): * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): * xml/XSLTProcessorLibxslt.cpp: (WebCore::writeToStringBuilder): (WebCore::saveResultToString): * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::unconsumeCharacters): (WebCore::consumeCharacterReference): * xml/parser/XMLCharacterReferenceParser.cpp: (WebCore::consumeXMLCharacterReference): * xml/parser/XMLCharacterReferenceParser.h: * xml/parser/XMLTokenizer.cpp: (WebCore::XMLTokenizer::nextToken): 2011-09-05 Kent Tamura <tkent@chromium.org> REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset https://bugs.webkit.org/show_bug.cgi?id=67567 Reviewed by Dimitri Glazkov. - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue(). - Clear m_icon in FileInputType::setValue(). Tests: fast/forms/file/file-reset-in-change-expected.html fast/forms/file/file-reset-in-change.html * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): Implemenation for the "default" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): Implemenation for the "default/on" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on * html/BaseCheckableInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): Implemenation for the "filename" mode, and clearing m_icon. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Move some code to InputType::setValue(). (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue(). * html/HTMLInputElement.h: * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): Implementation for the "default" mode. * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): Implementation for the "value" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): In addition to the "value" mode processing, updates placeholder visibililty. * html/TextFieldInputType.h: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): The inner text value of an input element is not updated when input.value is set https://bugs.webkit.org/show_bug.cgi?id=67681 Reviewed by Kent Tamura. The bug was caused by HTMLInputElement::setValue's not clearing m_suggestedValue before updateInnerTextValue is called. Since updateInnerTextValue uses the suggested value when one is present, we need to clear m_suggestedValue in advance. Test: fast/forms/suggested-value-after-setvalue.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): 2011-09-06 Adam Barth <abarth@webkit.org> Attempt to fix GTK build. * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: (WebKit::createHTMLElementWrapper): 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> fast/forms/suggested-value-crash.html crashes on Windows https://bugs.webkit.org/show_bug.cgi?id=67688 Reviewed by Adam Barth. The crash was caused because functions in internals were accessing uninitialized QualifiedNames. Fixed the bug by avoiding to link to inputTag and textareaTag. Instead, we resort to toInputElement and string comparison. * testing/Internals.cpp: (WebCore::Internals::wasLastChangeUserEdit): (WebCore::Internals::suggestedValue): (WebCore::Internals::setSuggestedValue): 2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. No new tests. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::finishCreation): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::finishCreation): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): (JSC::RuntimeMethod::finishCreation): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-09-06 Luke Macpherson <macpherson@chromium.org> Implement list style properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=67103 Reviewed by Eric Seidel. No new tests / no behavioral changes. * css/CSSStyleApplyProperty.cpp: Add class to wrap call to CSSStyleSelector::styleImage(). (WebCore::ApplyPropertyStyleImage::ApplyPropertyStyleImage): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize handlers for list style properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing property implementations. 2011-09-06 Alexis Menard <alexis.menard@openbossa.org> [Qt] Move away from QPointer as it is slow and it has a replacement QWeakPointer. https://bugs.webkit.org/show_bug.cgi?id=67673 Reviewed by Ariya Hidayat. Move away from QPointer to QWeakPointer, it is faster. No new tests, the existing ones should cover. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getClass): (JSC::Bindings::QtField::name): (JSC::Bindings::QtField::valueFromInstance): * bridge/qt/qt_instance.h: (JSC::Bindings::QtInstance::getObject): * bridge/qt/qt_runtime.h: * platform/qt/SharedTimerQt.cpp: (WebCore::SharedTimerQt::inst): 2011-09-06 Oliver Hunt <oliver@apple.com> Update expected results of bindings tests. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::createStructure): (WebCore::JSTestInterface::createPrototype): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::createStructure): (WebCore::JSTestInterfacePrototype::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): (WebCore::JSTestMediaQueryListListener::createPrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure): (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::createStructure): (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure): (WebCore::JSTestObjPrototype::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): (WebCore::JSTestSerializedScriptValueInterface::createPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure): (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): 2011-09-06 Eric Seidel <eric@webkit.org> Remove window.HTMLBlockquoteElement per HTML5 (and DOM Core 1) https://bugs.webkit.org/show_bug.cgi?id=67678 Reviewed by Darin Adler. This is why we can't have nice things. There was some confusion in the original DOM HTML 1 spec about the existence of HTMlBlockquoteElement which was clarified by a later errata, removing HTMLBlockquoteElement: http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html "This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements" Le sigh. Personally I think having a separate HTMLBlockquoteElement is clearer, but thats not how the web works. Removed it and updated test results. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * editing/IndentOutdentCommand.cpp: * html/HTMLBlockquoteElement.cpp: Removed. * html/HTMLBlockquoteElement.h: Removed. * html/HTMLBlockquoteElement.idl: Removed. * html/HTMLElementsAllInOne.cpp: * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::HTMLQuoteElement): (WebCore::HTMLQuoteElement::insertedIntoDocument): * html/HTMLTagNames.in: * page/DOMWindow.idl: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> Rename confirmCompositionWithoutDisturbingSelection to cancelComposition https://bugs.webkit.org/show_bug.cgi?id=67569 Reviewed by Antonio Gomes. Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition. Also renamed the shared function from confirmComposition to setComposition. * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::confirmComposition): (WebCore::Editor::cancelComposition): (WebCore::Editor::setComposition): * editing/Editor.h: 2011-09-06 Sam Weinig <sam@webkit.org> WebVTTTokenizer files in the wrong place in the Xcode project. * WebCore.xcodeproj/project.pbxproj: Move WebVTTTokenizer files so they are in the right place in the project. 2011-09-06 Chris Rogers <crogers@google.com> MediaElementAudioSourceNode destruction triggers ASSERTS https://bugs.webkit.org/show_bug.cgi?id=67665 Reviewed by Nate Chapin. Test: webaudio/mediaelementaudiosourcenode-gc.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setAudioSourceNode): * webaudio/AudioContext.cpp: (WebCore::AudioContext::uninitializeDispatch): (WebCore::AudioContext::stop): * webaudio/AudioContext.h: 2011-09-05 Oliver Hunt <oliver@apple.com> An object's structure should reference the global object responsible for its creation https://bugs.webkit.org/show_bug.cgi?id=67624 Reviewed by Gavin Barraclough. Update calls to Structure::create() to pass the globalObject in, and update the CodeGenerator to generate appropriate createStructure methods. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): (WebCore::getDOMStructure): * bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure): (WebCore::getDOMConstructor): * bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::createStructure): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure): * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure): * bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure): 2011-09-06 Anders Carlsson <andersca@apple.com> Move NPAPI headers in bridge to plugins https://bugs.webkit.org/show_bug.cgi?id=67661 Reviewed by Darin Adler. * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Update build systems. * bridge/npapi.h: Removed. * bridge/npruntime.h: Removed. * bridge/nptypes.h: Removed. * plugins/npapi.h: Copied from Source/WebCore/bridge/npapi.h. * plugins/npruntime.h: Copied from Source/WebCore/bridge/npruntime.h. * plugins/nptypes.h: Copied from Source/WebCore/bridge/nptypes.h. 2011-09-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67672 Improve background-size parsing. Make it actually dump auto values properly, and also make it omit auto if it is the second value. Fix the parsing to not create a value list when only a singleton value is specified. Reviewed by Beth Dakin. Covered well by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::fillSizeToCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseFillSize): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapFillSize): 2011-09-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67657 Implement border-image-width. This patch stops short of converting -webkit-border-image to a shorthand. I'll do that in the next patch. Note that unlike the -webkit-border-image syntax, border-image-width does not actually set the border width values. It simply makes cuts into the border image drawing area (which for now is just the border box, but that will change once border-image-outset is implemented). This means we need additional storage for the slices, since they are now separate from the border widths. For backwards compatibility, -webkit-border-image will continue to set the border widths when border-image-width is specified in the -webkit-border-image shorthand. Reviewed by Beth Dakin. Added new tests in fast/borders. * css/CSSBorderImageSliceValue.cpp: (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::cssText): * css/CSSBorderImageSliceValue.h: (WebCore::CSSBorderImageSliceValue::create): (WebCore::CSSBorderImageSliceValue::slices): Rename slices() to imageSlices() and add borderSlices() and m_borderSlices to hold the desired cuts for the border image drawing area. Converted the slices over to the new Quad primitive value (a RectBase subclass that is identical to Rect but dumps as a quad instead of a rect primitive). * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Make CSSBorderImageValue take the border slices during construction now. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageWidth): (WebCore::valueForNinePieceImageRepeat): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for computed style via valueForNinePieceImageWidth. Patch all of the border image properties to dump the most compact form possible for the property values, e.g., "stretch stretch" becomes "stretch." * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseReflect): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): (WebCore::isBorderImageRepeatKeyword): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::BorderImageWidthParseContext::BorderImageWidthParseContext): (WebCore::BorderImageWidthParseContext::allowNumber): (WebCore::BorderImageWidthParseContext::allowFinalCommit): (WebCore::BorderImageWidthParseContext::top): (WebCore::BorderImageWidthParseContext::commitNumber): (WebCore::BorderImageWidthParseContext::setAllowFinalCommit): (WebCore::BorderImageWidthParseContext::setTop): (WebCore::BorderImageWidthParseContext::commitBorderImageWidth): (WebCore::CSSParser::parseBorderImageWidth): * css/CSSParser.h: Modify the border-image code to pass off border-image-width parsing to parseBorderImageWidth. * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::init): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getQuadValue): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getQuadValue): Add the new Quad value to CSSPrimitiveValue. * css/CSSPropertyNames.in: Add the new properties for border-image-width and -webkit-mask-box-image-width. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageSlice): (WebCore::CSSStyleSelector::mapNinePieceImageWidth): (WebCore::CSSStyleSelector::loadPendingImages): * css/CSSStyleSelector.h: Add the code to map the image width into border slices. * css/Rect.h: (WebCore::RectBase::top): (WebCore::RectBase::right): (WebCore::RectBase::bottom): (WebCore::RectBase::left): (WebCore::RectBase::setTop): (WebCore::RectBase::setRight): (WebCore::RectBase::setBottom): (WebCore::RectBase::setLeft): (WebCore::RectBase::RectBase): (WebCore::RectBase::~RectBase): (WebCore::Rect::create): (WebCore::Rect::Rect): (WebCore::Quad::create): (WebCore::Quad::Quad): Adding the new Quad value. * rendering/RenderBoxModelObject.cpp: (WebCore::computeBorderImageSide): (WebCore::RenderBoxModelObject::paintNinePieceImage): Modify painting to treat the border slices as separate from the border widths. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::imageSlices): (WebCore::NinePieceImage::setImageSlices): (WebCore::NinePieceImage::borderSlices): (WebCore::NinePieceImage::setBorderSlices): (WebCore::NinePieceImage::copyImageSlicesFrom): (WebCore::NinePieceImage::copyBorderSlicesFrom): * rendering/style/StyleRareNonInheritedData.cpp: Add the border slices. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleReflection.h: (WebCore::StyleReflection::StyleReflection): Make sure masks and reflections default border-image-width to auto instead of 1, since that matches old behavior. 2011-09-06 Noel Gordon <noel.gordon@gmail.com> [chromium skia] JPEGImageEncoder: hoist constants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=67589 Reviewed by Kenneth Russell. Change the row converter function signatures to be the same. Call them via a function pointer during the encoding loop. Minor webkit style cleanup, remove unused include. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: Remove SkUnPreMultiply.h (not used). (WebCore::preMultipliedBGRAtoRGB): Use unsigned char* instead of void* for pixels. (WebCore::RGBAtoRGB): pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature. (WebCore::encodePixels): Move constants out of the encoding loop: use a function pointer to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures), define and use pixelRowStride constant. (WebCore::JPEGImageEncoder::encode): 2011-09-06 Aaron Colwell <acolwell@chromium.org> Allow MediaSource API to be enabled at runtime. https://bugs.webkit.org/show_bug.cgi?id=67306 Reviewed by Eric Carlson. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitMediaSourceEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitMediaSourceEnabled): * html/HTMLMediaElement.idl: 2011-09-06 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::skiaDrawText): * platform/graphics/skia/SkiaFontWin.h: 2011-09-06 Nat Duca <nduca@chromium.org> [chromium] REGRESSION(94353): requestAnimationFrame not throttled in compositing path https://bugs.webkit.org/show_bug.cgi?id=67621 CCSingleThreadProxy should not perform layout when called via the compositeImmediately path. Doing so makes it look like frame rate is unbounded. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::compositeImmediately): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium https://bugs.webkit.org/show_bug.cgi?id=67453 Reviewed by Kent Tamura. Fixed the bug by updating inner text value in setSuggestedValue. Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes. Test: fast/forms/suggested-value.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::suggestedValue): (WebCore::Internals::setSuggestedValue): * testing/Internals.h: * testing/Internals.idl: 2011-09-06 Eric Carlson <eric.carlson@apple.com> load() does not reset the resource selection algorithm https://bugs.webkit.org/show_bug.cgi?id=64917 Reviewed by Darin Adler. Test: media/video-source-load.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): Reset m_nextChildNodeToConsider, update comments and rearrange logic to more closely match logic in spec. (WebCore::HTMLMediaElement::noneSupported): Update comments. 2011-09-06 Abhishek Arya <inferno@chromium.org> Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: 2011-09-06 Robin Cao <robin.cao@torchmobile.com.cn> [skia] States of GraphicsContext may never be restored after clipToImageBuffer https://bugs.webkit.org/show_bug.cgi?id=67358 beginLayerClippedToImage/applyClipFromImage are mismatched when clipping to an empty ImageBuffer, which will make states of GraphicsContext incorrect. Reviewed by James Robinson. Test: fast/repaint/background-clip-text.html * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::beginLayerClippedToImage): 2011-09-06 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Do not allocate memory for extremely large surfaces. https://bugs.webkit.org/show_bug.cgi?id=65192 Reviewed by Martin Robinson. So far, RenderThemeEfl tried to allocate a buffer and a cairo surface the size of the whole form element passed to it. In the case of fast/overflow/overflow-height-float-not-removed-crash.html and others, this meant extremely large widgets, which crashed the code. We now only render the widgets if they are smaller than some hardcoded and sufficiently large values which should work in most cases. No new tests, as this was uncovered by existing ones. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::isFormElementTooLargeToDisplay): (WebCore::RenderThemeEfl::cacheThemePartNew): (WebCore::RenderThemeEfl::paintThemePart): * platform/efl/RenderThemeEfl.h: 2011-08-30 Pavel Podivilov <podivilov@chromium.org> Web Inspector: implement source map v3 consumer. https://bugs.webkit.org/show_bug.cgi?id=67205 Reviewed by Yury Semikhatsky. Test: inspector/debugger/compiler-source-mapping.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/CompilerSourceMapping.js: Added. (WebInspector.CompilerSourceMapping): (WebInspector.CompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.CompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.CompilerSourceMapping.prototype.get sources): (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.ClosureCompilerSourceMapping.prototype.get sources): (WebInspector.ClosureCompilerSourceMapping.prototype._findMapping): (WebInspector.ClosureCompilerSourceMapping.prototype._parsePayload): (WebInspector.ClosureCompilerSourceMapping.prototype._isSeparator): (WebInspector.ClosureCompilerSourceMapping.prototype._decodeVLQ): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.next): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.peek): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.hasNext): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-05 Pavel Podivilov <podivilov@chromium.org> Web Inspector: re-implement RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=67609 RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): 2011-09-06 Csaba Osztrogonác <ossy@webkit.org> Unreviewed, rolling out r94564. http://trac.webkit.org/changeset/94564 https://bugs.webkit.org/show_bug.cgi?id=67555 It broke many tests * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): 2011-09-06 Rob Buis <rbuis@rim.com> use after free in WebCore::SVGTRefElement::updateReferencedText https://bugs.webkit.org/show_bug.cgi?id=67555 Reviewed by Nikolas Zimmermann. Do not install event listener if tref is not part of any document. Test: svg/custom/tref-clone-crash.html * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): 2011-09-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94560. http://trac.webkit.org/changeset/94560 https://bugs.webkit.org/show_bug.cgi?id=67636 It made inspector/debugger/script-formatter.html flakey (Requested by Ossy on #webkit). * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.set reset): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.PresenationCallFrame.prototype.select): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.didRequestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype._setContentProvider): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._reload): (WebInspector.RawSourceCode.prototype._requestContent): (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.RawSourceCode.prototype._didRequestContent): (WebInspector.RawSourceCode.prototype._hasPendingResource): (WebInspector.FormattedContentProvider): (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent): (WebInspector.FormattedContentProvider.prototype.requestContent): 2011-09-06 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67480 [Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing Reviewed by Dimitri Glazkov. The text node needs willRecalcStyle mechanism too. * dom/Text.cpp: (WebCore::Text::recalcTextStyle): * dom/Text.h: (WebCore::Text::willRecalcTextStyle): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): (WebCore::SVGShadowText::SVGShadowText): (WebCore::SVGShadowText::willRecalcTextStyle): 2011-09-05 Pavel Podivilov <podivilov@chromium.org> Web Inspector: re-implement RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=67609 RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): 2011-09-06 Dirk Schulze <krit@webkit.org> Return to transform multiplication: motion transform * other transforms https://bugs.webkit.org/show_bug.cgi?id=67601 Reviewed by Nikolas Zimmermann. Right now we take the current transform of a transformable SVG element, post multiply the animation transform and post multiply the motion transform to the other both: transform * animation transform * motion transform We switched to this behavior with the clean up of AffineTransform. While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to: motion transform * transform * animation transform This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms on the SVG WG, their is a consense that the current specified behavior is unwanted. See http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details. We pass the following tests of the official W3C SVG test suite again now: - animate-elem-24-t.svg - animate-elem-30-t.svg * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::animatedLocalTransform): 2011-09-05 Adam Barth <abarth@webkit.org> window.HTMLSpanElement does not exist https://bugs.webkit.org/show_bug.cgi?id=67571 Reviewed by Sam Weinig. We have these objects for most other elements and HTMLSpanElement exists in Firefox and in the HTML5 spec. This patch adds it. Test: fast/dom/wrapper-classes.html * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLElementsAllInOne.cpp: * html/HTMLSpanElement.cpp: Added. (WebCore::HTMLSpanElement::HTMLSpanElement): (WebCore::HTMLSpanElement::create): * html/HTMLSpanElement.h: Added. * html/HTMLSpanElement.idl: Added. * html/HTMLTagNames.in: * page/DOMWindow.idl: 2011-09-04 Abhishek Arya <inferno@chromium.org> Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html fast/ruby/ruby-block-style-not-updated.html fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html fast/ruby/ruby-inline-style-not-updated.html fast/table/table-row-style-not-updated-with-after-content.html fast/table/table-row-style-not-updated-with-before-content.html fast/table/table-row-style-not-updated.html fast/table/table-style-not-updated.html * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: (WebCore::RenderObject::isBeforeAfterContent): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::styleDidChange): (WebCore::RenderRubyAsBlock::styleDidChange): * rendering/RenderRuby.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): (WebCore::RenderTableSection::addChild): * rendering/RenderTableSection.h: 2011-09-05 Abhishek Arya <inferno@chromium.org> Crash in RenderObjectChildList::destroyLeftOverChildren() https://bugs.webkit.org/show_bug.cgi?id=64753 Reviewed by James Robinson. If any of the ancestors between column span element and containing column's block is a continuation, then don't attempt to render the column span by splitting the block into continuations. Test: fast/multicol/column-span-parent-continuation-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::columnsBlockForSpanningElement): 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94537. http://trac.webkit.org/changeset/94537 https://bugs.webkit.org/show_bug.cgi?id=67618 Does not compile on Chromium Mac (Requested by abarth_ on #webkit). * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::preMultipliedBGRAtoRGB): (WebCore::RGBAtoRGB): (WebCore::encodePixels): (WebCore::JPEGImageEncoder::encode): 2011-09-05 Noel Gordon <noel.gordon@gmail.com> [chromium skia] JPEGImageEncoder: hoist contants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=67589 Reviewed by Adam Barth. Change the row converter function signatures to be the same. Call them via a function pointer during the encoding loop. Minor webkit stlye cleanup, remove unused include. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: Remove SkUnPreMultiply.h (not used). (WebCore::preMultipliedBGRAtoRGB): Use unsigned char* instead of void* for pixels. (WebCore::RGBAtoRGB): pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature. (WebCore::encodePixels): Move contants out of the encoding loop: use a function pointer to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures) during the image row encoding loop. Add/use pixelRowStride constant. (WebCore::JPEGImageEncoder::encode): webkit style: no need to split lines. 2011-09-05 John Knottenbelt <jknotten@chromium.org> Take pageScaleFactor into account for MouseRelatedEvents. https://bugs.webkit.org/show_bug.cgi?id=67592 Reviewed by Dimitri Glazkov. Test: fast/events/page-scaled-mouse-click.html * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2011-09-02 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename RawSourceCode.reload to contentEdited. https://bugs.webkit.org/show_bug.cgi?id=67504 Make RawSourceCode.reload private and remove RawSourceCode.content getter and setter (RawSourceCode isn't supposed to have any content). Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._reload): (WebInspector.RawSourceCode.prototype._didRequestContent): 2011-09-05 Leandro Gracia Gil <leandrogracia@chromium.org> Fix the regression of bug 65333 introduced by 60170. This caused the speech input bubble to appear in the wrong side for RTL text inputs. https://bugs.webkit.org/show_bug.cgi?id=67597 Reviewed by Tony Gentilcore. No new tests. Fixing regression. * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): 2011-09-05 Alexander Pavlov <apavlov@chromium.org> Web Inspector: F5 results in a Web Inspector frontend reload on non-Macs https://bugs.webkit.org/show_bug.cgi?id=67602 Reviewed by Yury Semikhatsky. * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94525. http://trac.webkit.org/changeset/94525 https://bugs.webkit.org/show_bug.cgi?id=67599 WinCE compilation failed. (Requested by loislo on #webkit). * platform/text/TextBoundaries.cpp: * platform/text/TextBreakIteratorICU.cpp: * platform/text/qt/TextBoundariesQt.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2011-09-05 Alexander Færøy <alexander.faeroy@nokia.com> [Qt] Compiling using system ICU uses QTextBreakIterator in some cases. https://bugs.webkit.org/show_bug.cgi?id=67391 Reviewed by Kenneth Rohde Christiansen. * platform/text/TextBoundaries.cpp: * platform/text/TextBreakIteratorICU.cpp: * platform/text/qt/TextBoundariesQt.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2011-09-05 Kaustubh Atrawalkar <kaustubh@motorola.com> Logic from HTMLElement::deprecatedCreateContextualFragment moved into Range::createContextualFragment function. https://bugs.webkit.org/show_bug.cgi?id=67056 Reviewed by Ryosuke Niwa. Code Refactoring for deprecatedCreateContextualFragment. No new tests. Code Re-factoring. * dom/Element.cpp: * dom/Element.h: * dom/Range.cpp: (WebCore::insertIntoFragment): (WebCore::Range::createDocumentFragmentForElement): (WebCore::Range::createContextualFragment): * dom/Range.h: * editing/markup.cpp: (WebCore::createFragmentFromMarkup): * html/HTMLElement.cpp: * html/HTMLElement.h: 2011-09-04 James Kozianski <koz@chromium.org> Unreviewed, rolling out r94510. http://trac.webkit.org/changeset/94510 https://bugs.webkit.org/show_bug.cgi?id=66531 Causes layout test crashes. * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::wrapWithRenderFullScreen): (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (RenderFullScreen::createFullScreenStyle): * rendering/RenderFullScreen.h: 2011-09-04 Abhishek Arya <inferno@chromium.org> Unreviewed. Compile fix for r94511. * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-09-04 Abhishek Arya <inferno@chromium.org> Crash in Range::processAncestorsAndTheirSiblings. https://bugs.webkit.org/show_bug.cgi?id=67556 Reviewed by Ryosuke Niwa. Create a temporary RefPtr Node vector to keep all the ancestor's childs so that we don't access removed child nodes. Test: fast/dom/Range/range-delete-contents-event-fire-crash.html * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-09-04 Jeremy Apthorp <jeremya@google.com> Don't detach elements from the render tree when entering fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=66531 This prevents plugin instances from being destroyed and reinstantiated when entering fullscreen mode. Reviewed by Darin Fisher. Test: plugins/fullscreen-plugins-dont-reload.html * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): (RenderFullScreen::wrapRenderer): (RenderFullScreen::unwrapRenderer): * rendering/RenderFullScreen.h: 2011-09-04 Dan Bernstein <mitz@apple.com> <rdar://problem/10071256> Retain retired custom fonts until the next style recalc Reviewed by Darin Adler. Test: fast/css/font-face-used-after-retired.html During style recalc, existing renderers may reference their old style, including font data. Allow them to do so safely by keeping retired custom font data around until after style recalc. * css/CSSFontFace.cpp: (WebCore::CSSFontFace::retireCustomFont): Added. Calls through to CSSFontSelector, if the font face is still part of any segmented font face. Otherwise, deletes the custom font data. * css/CSSFontFace.h: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::pruneTable): Changed to call retireCustomFont() instead of deleting retired font data. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::retireCustomFont): Added. Calls through to the Document, if this is still the active font selector for a document. Otherwise, deletes the custom font data. * css/CSSFontSelector.h: * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::pruneTable): Changed to call retireCustomFont() instead of deleting retired font data. * dom/Document.cpp: (WebCore::Document::~Document): Added a call to deleteRetiredCustomFonts(), in case the Document is destroyed before getting a chance to recalc style after custom fonts have been retired. (WebCore::Document::recalcStyle): Added a call to deleteRetiredCustomFonts() after style recalc. (WebCore::Document::deleteRetiredCustomFonts): Added. Deletes all previously-retired custom font data. * dom/Document.h: (WebCore::Document::retireCustomFont): Added. 2011-09-04 Sam Weinig <sam@webkit.org> Document.createEvent should support all the interfaces of Event we got https://bugs.webkit.org/show_bug.cgi?id=67568 Reviewed by Anders Carlsson. Updated fast/events/event-creation.html * dom/BeforeLoadEvent.h: (WebCore::BeforeLoadEvent::create): (WebCore::BeforeLoadEvent::BeforeLoadEvent): Added empty create. * dom/Document.cpp: (WebCore::Document::createEvent): Add missing interfaces. * dom/HashChangeEvent.h: (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::HashChangeEvent): Added empty create. * page/SpeechInputEvent.cpp: (WebCore::SpeechInputEvent::create): (WebCore::SpeechInputEvent::SpeechInputEvent): (WebCore::SpeechInputEvent::~SpeechInputEvent): * page/SpeechInputEvent.h: Added empty create. 2011-09-04 Adam Barth <abarth@webkit.org> [Chromium] Add memory threshold values to WebKitPlatformSupport.h https://bugs.webkit.org/show_bug.cgi?id=67575 Reviewed by Darin Fisher. Grab these memory thresholds from PlatformSupport rather than hard-coding them. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * platform/chromium/PlatformSupport.h: * platform/qt/PlatformSupport.h: (WebCore::PlatformSupport::lowMemoryUsageMB): (WebCore::PlatformSupport::highMemoryUsageMB): (WebCore::PlatformSupport::highUsageDeltaMB): 2011-09-04 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Add new / moved files missing from last commit. * platform/wx/LocalDC.h: Added. (WebCore::LocalDC::LocalDC): (WebCore::LocalDC::context): (WebCore::LocalDC::~LocalDC): * platform/wx/wxcode/cairo: Added. * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added. (WebCore::pangoFontMap): (WebCore::createPangoFontForFont): (WebCore::createScaledFontForFont): (WebCore::pango_font_get_glyph): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gdiplus: Added. * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added. (dmin): (dmax): (DegToRad): (RadToDeg): (WebCore::drawTextWithSpacing): 2011-09-04 Robin Dunn <robin@alldunn.com> [wx] Enable wxWebKit to run using the wxGC Cairo backend on platforms other than GTK. https://bugs.webkit.org/show_bug.cgi?id=67577 Reviewed by Kevin Ollivier. * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::glyphAt): (WebCore::GlyphBuffer::add): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipPath): * platform/graphics/wx/PathWx.cpp: (WebCore::Path::Path): (WebCore::Path::clear): * platform/graphics/wx/TransformationMatrixWx.cpp: (WebCore::TransformationMatrix::operator wxGraphicsMatrix): (WebCore::AffineTransform::operator wxGraphicsMatrix): * platform/image-decoders/wx/ImageDecoderWx.cpp: (WebCore::ImageFrame::asNewNativeImage): * platform/wx/ContextMenuWx.cpp: (ContextMenu::ContextMenu): * platform/wx/LocalDC.h: Added. (WebCore::LocalDC::LocalDC): (WebCore::LocalDC::context): (WebCore::LocalDC::~LocalDC): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderThemeWx::paintButton): (WebCore::RenderThemeWx::paintTextField): (WebCore::RenderThemeWx::paintMenuList): (WebCore::RenderThemeWx::paintMenuListButton): * platform/wx/ScrollbarThemeWx.cpp: (WebCore::ScrollbarThemeWx::paint): * platform/wx/wxcode/cairo: Added. * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added. (WebCore::pangoFontMap): (WebCore::createPangoFontForFont): (WebCore::createScaledFontForFont): (WebCore::pango_font_get_glyph): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gdiplus: Added. * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added. (dmin): (dmax): (DegToRad): (RadToDeg): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Removed. * platform/wx/wxcode/win/non-kerned-drawing.cpp: Removed. * platform/wx/wxcode/win/scrollbar_render.cpp: (GraphicsHDC::GraphicsHDC): (GraphicsHDC::~GraphicsHDC): (wxRenderer_DrawScrollbar): 2011-09-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> REGRESSION (r86268): Fix for qt_networkAccessAllowed() https://bugs.webkit.org/show_bug.cgi?id=67570 Reviewed by Noam Rosenthal. No new tests as this change only removes dead code. Support for Qt 4.6 has been removed a while back. * WebCore.pri: * WebCore.pro: * features.pri: * platform/network/NetworkStateNotifier.h: * platform/network/qt/NetworkStateNotifierQt.cpp: 2011-09-03 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): selection-change-closes-typing.html fails https://bugs.webkit.org/show_bug.cgi?id=67377 Reviewed by Kent Tamura. The problem was that when the shadow DOM is updated by setInnerTextValue, WebKit layer detects the selection change and calls confirmCompositionWithoutDisturbingSelection, which in turn modifies the shadow DOM by inserting text. Fixed the bug by not inserting text in confirmCompositionWithoutDisturbingSelection. It turned out that this function is only used to cancel composition but never to confirming composition and restoring selection. Test: platform/mac/editing/input/selection-change-closes-typing-2.html * editing/Editor.cpp: (WebCore::Editor::confirmCompositionWithoutDisturbingSelection): (WebCore::Editor::confirmComposition): 2011-09-03 Sam Weinig <sam@webkit.org> Add missing Event constructors to DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=67449 Reviewed by Anders Carlsson. Covered by existing tests. * page/DOMWindow.idl: 2011-08-27 Robert Hogan <robert@webkit.org> div align="center" rendering problem https://bugs.webkit.org/show_bug.cgi?id=4860 Reviewed by David Hyatt. When an inline element with absolute position was the sole or first child of a render block with centred alignment, it wasn't obeying its parent's alignment. However it would obey the alignment if it was preceded by some text. The problem was that the element's render object was getting skipped as leading white space, so it was not included in a normal line block in a bidi run. Instead, its position was getting set by RenderBlockLineLayout::setStaticPositions() which does not pay attention to alignment. Preceding the element with some text allowed the object to get included in a Bidi run and so get a linebox which would get properly aligned. The fix is to get RenderBlockLineLayout::setStaticPositions() to obey the alignment specified by the object's container. This allows WebKit to get the same result on the test as Firefox and IE. Opera has the same bug as unpatched WebKit. Tests: fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html - Ensure positioned block elements inherit alignment. fast/css/bug4860-absolute-inline-child-inherits-alignment.html - Ensure positioned inline elements inherit alignment. fast/inline/absolute-positioned-inline-in-centred-block.html - Ensure positioned inline element that's the sole or first child of a rendered block obeys parents alignment. fast/inline/absolute-positioned-block-in-centred-block.html - As above, but a positioned block should not inherit alignment. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine and use startAlignedOffsetForBlock (WebCore::RenderBlock::startAlignedOffsetForLine): New function, find the aligned offset using updateLogicalWidthForAlignment 2011-09-03 Andreas Kling <kling@webkit.org> Remove two unused functions from Element. https://bugs.webkit.org/show_bug.cgi?id=67492 Reviewed by Benjamin Poulain. Removed openTagStartToString() and setCStringAttribute() as they are not called from anywhere. * dom/Element.cpp: * dom/Element.h: 2011-09-03 Andrew Wason <rectalogic@rectalogic.com> [Qt] Enable support for WebGL OES_standard_derivatives for Qt https://bugs.webkit.org/show_bug.cgi?id=67430 Reviewed by Noam Rosenthal. Tested using https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/extensions/oes-standard-derivatives.html Enable existing support for OES_standard_derivatives for Qt. * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::ensureEnabled): (WebCore::Extensions3DOpenGL::isEnabled): 2011-09-03 Yuta Kitamura <yutak@chromium.org> WebSocket: Send ArrayBuffer as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67477 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/send-arraybuffer.html http/tests/websocket/tests/hybi/workers/send-arraybuffer.html http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::sendRequestResult): (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult): * websockets/ThreadableWebSocketChannelClientWrapper.h: Rename "sent" to "sendRequestResult" to clarify the meaning. Messages from the script may not be sent immediately, thus the return value of WebSocketChannel::send() indicates whether the message has been queued successfully, rather than whether the message has been sent or not. * websockets/WebSocket.cpp: (WebCore::WebSocket::send): Case of sending "[object ArrayBuffer]" is covered by an existing test http/tests/websocket/tests/{hybi,hixie76}/send-object.html. * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::workerContextDidSend): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Construct an ArrayBuffer from the data on Vector<char>. (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Copy the content into temporary buffer of Vector<char>, and send it to the main thread. * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Kentaro Hara <haraken@google.com> Implement a CustomEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67527 Reviewed by Sam Weinig. Test: fast/events/constructors/custom-event-constructor.html * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns ScriptValue corresponding to a given key. * bindings/v8/custom/V8EventConstructors.cpp: Added the CustomEvent constructor. * dom/CustomEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-02 Adrienne Walker <enne@google.com> [chromium] Move updateLayers from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67438 Reviewed by James Robinson. Covered by existing tests. Move functionality used by both CCLayerTreeHost and LayerRendererChromium into CCLayerTreeHostCommon. Move update, paint, and updateCompositorResource functions into CClayerTreeHost. * WebCore.gypi: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::sortLayers): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::textureMemoryReclaimLimit): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::sortLayers): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::paintContentsIfDirty): (WebCore::CCLayerTreeHost::paintLayerContents): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: Added. (WebCore::CCLayerTreeHostCommon::isScaleOrTranslation): (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: Added. (WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::commitIfNeeded): 2011-09-02 Chris Marrin <cmarrin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67510 Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction Reviewed by Simon Fraser. Do a null check in two places to avoid sending nulls to CACF ValueFunction API. Test: animations/pause-crash.html * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::valueFunction): (PlatformCAAnimation::setValueFunction): 2011-09-02 Bill Budge <bbudge@chromium.org> Add a 'didDownloadData' method to ResourceLoader, SubresourceLoader, SubresourceLoaderClient, DocumentThreadableLoader, ResourceHandleClient, and ThreadableLoaderClient for the Chromium port only, so we can pass these notifications from our ResourceHandle implementation through the WebCore loader framework. https://bugs.webkit.org/show_bug.cgi?id=67229 Reviewed by Darin Fisher. No new tests. Exposes no new functionality. * WebCore.gypi: * loader/DocumentThreadableLoader.h: * loader/ResourceLoader.h: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::didDownloadData): * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didDownloadData): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didDownloadData): * loader/chromium: Added. * loader/chromium/DocumentThreadableLoaderChromium.cpp: Added. (WebCore::DocumentThreadableLoader::didDownloadData): * loader/chromium/ResourceLoaderChromium.cpp: Added. (WebCore::ResourceLoader::didDownloadData): * loader/chromium/SubresourceLoaderChromium.cpp: Added. (WebCore::SubresourceLoader::didDownloadData): * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didDownloadData): 2011-09-02 Jeff Miller <jeffm@apple.com> Assert that PlatformCALayerWinInternal::displayCallback() is only called on the main thread https://bugs.webkit.org/show_bug.cgi?id=67541 Reviewed by Simon Fraser. No new tests, covered by existing media tests. * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): Assert that is function is only called on the main thread. 2011-09-02 Julien Chaffraix <jchaffraix@webkit.org> Enable RenderLayer::updateLayerPosition's cachedOffset optimization for more cases https://bugs.webkit.org/show_bug.cgi?id=66901 Reviewed by Simon Fraser. Test: fast/layers/assert-RenderLayer-update-positions.html Also covered by existing tests under the new ASSERT. This change extends the range of callers making use of the cachedOffset optimization. Most callers did not make use of cachedOffset as it did not work when called on a subtree. This limitation is now gone thus we can enable it more widely. The semantics of the optimization are changed a bit as we now return if it is enabled whereas the old code would check if it was *disabled*. Also there were some renames done to match more closely what was going on (s/cachedOffset/offsetFromRoot/ and s/cachedOffsetDisabled/hasLayerOffset/). Note that this is an optimistic optimization: if cachedOffset is not used, then we have done at least an extra traversal up to the root. I have found it to be a wash on file cycler (alexa) but to be a nice improvement (~20%) on some table benchmarks (modifying a cell, scrolling). * page/FrameView.cpp: (WebCore::FrameView::layout): Extended the use of cachedOffset to subtree layouts. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleDidChange): Forbid the use cachedOffset in this case as we have only a single layer to update. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeOffsetFromRoot): Added this function to get the offset from the root layer at a certain point in the RenderLayer's tree. It gets the root layer's checking if no layer in between would prevent convertToLayerCoords to work and return the position relative to this layer. (WebCore::RenderLayer::updateLayerPositions): Added a new ASSERT to make sure our cachedOffset is always fine. Also added a comment about calling convertToLayerCoords. (WebCore::RenderLayer::removeOnlyThisLayer): Added cachedOffset here too as we may have to update several layers. We save the offset prior to being removed from the hierarchy for correctness. (WebCore::RenderLayer::paintChildLayerIntoColumns): Added a comment here about calling convertToLayerCoords. * rendering/RenderLayer.h: Swapped the argument in updateLayerPositions to make cachedOffset a mandatory field. Patched all the callers. (WebCore::RenderLayer::canUseConvertToLayerCoords): Added this helper method to know when a renderer prevents convertToLayerCoords from working. Added some FIXME around suspicious use of convertToLayerCoords. 2011-08-30 Matthew Delaney <mdelaney@apple.com> Read out of bounds in sUnpremultiplyData_RGBA8888 / ImageBufferData::getData https://bugs.webkit.org/show_bug.cgi?id=65352 Reviewed by Simon Fraser. New test: fast/canvas/canvas-getImageData-large-crash.html This patch prevents overflows from happening in getImageData, createImageData, and canvas creation calls that specify widths and heights that end up overflowing the ints that we store those values in as well as derived values such as area and maxX / maxY of the bounding rects involved. Overflow of integer arithmetic is detected via the use of the new Checked type that was introduced in r94207. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::convertLogicalToDevice): Removed dependency on ints, using FloatRects/Sizes instead. (WebCore::HTMLCanvasElement::createImageBuffer): Moved the check for max canvas area and dimensions here. Added in check that prevents us from having canvases of sizes that will cause overflows. (WebCore::HTMLCanvasElement::baseTransform): Updated use of convertLogicalToDevice. * html/HTMLCanvasElement.h: Updated method signatures. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::createEmptyImageData): Added in check to prevent creating ImageData objects that will cause overflow when computing their size. (WebCore::CanvasRenderingContext2D::createImageData): Avoid creating ImageData objects of size that will overflow later. (WebCore::CanvasRenderingContext2D::getImageData): Added in check to prevent trying to get ImageData objects that will cause overflow when computing their size. * platform/graphics/FloatRect.cpp: (WebCore::FloatRect::isExpressibleAsIntRect): New method that tests whether a FloatRect can become an IntRect without overflow or having to be clamped. * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.cpp: (WebCore::FloatSize::isExpressibleAsIntSize): Same as FloatRect, but for FloatSize->IntSize. * platform/graphics/FloatSize.h: * platform/graphics/cg/ImageBufferCG.cpp: Added check for overflow. (WebCore::ImageBuffer::ImageBuffer): 2011-09-02 Dan Bernstein <mitz@apple.com> <rdar://problem/9755843> anonymous RenderMathMLOperator sets itself as the renderer of its parent mfenced node Reviewed by Darin Adler. Test: mathml/operator-hijacks-fenced-node.xhtml * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): Rather than unconditionally setting the node’s renderer to this, just restore it to whatever it was before calling destroyLeftoverChildren(). 2011-09-02 Mark Hahnenberg <mhahnenberg@apple.com> Incorporate newer, faster dtoa library https://bugs.webkit.org/show_bug.cgi?id=66346 Reviewed by Oliver Hunt. No new tests. Added new dtoa library at http://code.google.com/p/double-conversion/. Replaced old call to dtoa. The new library is much faster than the old one. We still use the old dtoa for some stuff in WebCore as well as the old strtod, but we can phase these out eventually as well. * ForwardingHeaders/wtf/dtoa/double-conversion.h: Added. * WebCore.vcproj/copyForwardingHeaders.cmd: * css/CSSPrimitiveValue.cpp: (WebCore::formatNumber): * html/parser/HTMLParserIdioms.cpp: (WebCore::serializeForNumberType): * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): * platform/graphics/Color.cpp: (WebCore::Color::serialized): 2011-09-02 Nat Duca <nduca@chromium.org> [chromium] Check for null context when reinitializing compositor https://bugs.webkit.org/show_bug.cgi?id=67507 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): 2011-09-02 Sam Weinig <sam@webkit.org> Remove BeforeProcessEvent, it was never meant to be https://bugs.webkit.org/show_bug.cgi?id=67493 Reviewed by Anders Carlsson. BeforeProcessEvent was added, never hooked up, and never removed. Now it is being removed. * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/BeforeProcessEvent.cpp: Removed. * dom/BeforeProcessEvent.h: Removed. * dom/BeforeProcessEvent.idl: Removed. * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::addListenerTypeIfNeeded): * dom/Document.h: * dom/EventNames.h: * html/HTMLAttributeNames.in: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::parseMappedAttribute): 2011-09-02 Adrienne Walker <enne@google.com> [chromium] Remove LayerRendererChromium references from the LayerChromium tree https://bugs.webkit.org/show_bug.cgi?id=66430 Reviewed by James Robinson. Covered by existing tests. Replace references to LayerRendererChromium in the LayerChromium tree with references to LayerTreeHost. The LayerRendererChromium property is no longer synced and instead is set recursively on the CCLayerImpl tree during commit. WebGLLayerChromium's paintRenderedResultsToCanvas function is temporarily turned off for threaded compositing because it needs access to the compositor context. Previously, changing the layer renderer on a layer called cleanup resources on that layer. Now, call that explicitly clean up all resources explicitly from the proxy when the layer renderer gets created. This cleans up all of the ManagedTexture objects which may be hanging onto stale GraphicsContext3D pointers. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::cleanupResourcesRecursive): (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTreeHost): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::paintLayerContents): * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore::TiledLayerChromium::textureManager): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::cleanupResources): (WebCore::VideoLayerChromium::setLayerTreeHost): (WebCore::VideoLayerChromium::reserveTextures): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas): (WebCore::WebGLLayerChromium::setTextureUpdated): (WebCore::WebGLLayerChromium::layerRendererContext): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setLayerRendererRecursive): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): 2011-09-02 Alexey Proskuryakov <ap@apple.com> Build fix. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): Can't use BUILDING_ON_SNOW_LEOPARD without defined() when not on Snow Leopard. 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94421. http://trac.webkit.org/changeset/94421 https://bugs.webkit.org/show_bug.cgi?id=67496 Broke a number of tests on Chromium builders (including the "cr-linux" EWS bot) (Requested by apavlov on #webkit). * accessibility/AXObjectCache.cpp: (WebCore::nodeHasRole): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_name): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::recalcStyleSelector): * dom/Element.cpp: (WebCore::Element::baseURI): (WebCore::Element::formatForDebugger): (WebCore::Element::spellcheckAttributeState): * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::doUnapply): * editing/markup.cpp: (WebCore::shouldIncludeWrapperForFullySelectedRoot): (WebCore::createMarkup): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::draggable): (WebCore::HTMLAnchorElement::href): (WebCore::HTMLAnchorElement::name): (WebCore::HTMLAnchorElement::target): (WebCore::HTMLAnchorElement::sendPings): (WebCore::HTMLAnchorElement::handleClick): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::target): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::aLink): (WebCore::HTMLBodyElement::bgColor): (WebCore::HTMLBodyElement::link): (WebCore::HTMLBodyElement::text): (WebCore::HTMLBodyElement::vLink): (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::value): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::updateNameCache): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::dir): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): (WebCore::HTMLElement::draggable): (WebCore::HTMLElement::title): (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): (WebCore::HTMLEmbedElement::insertedIntoDocument): (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::autofocus): (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::name): (WebCore::HTMLFormElement::action): (WebCore::HTMLFormElement::method): (WebCore::HTMLFormElement::target): * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::noResize): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setNameAndOpenURL): (WebCore::HTMLFrameElementBase::location): (WebCore::HTMLFrameElementBase::allowFullScreen): * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::insertedByParser): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::altText): (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): (WebCore::HTMLImageElement::alt): (WebCore::HTMLImageElement::draggable): (WebCore::HTMLImageElement::src): (WebCore::HTMLImageElement::addSubresourceAttributeURLs): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::finishParsingChildren): (WebCore::HTMLInputElement::altText): (WebCore::HTMLInputElement::reset): (WebCore::HTMLInputElement::searchEventsShouldBeDispatched): (WebCore::HTMLInputElement::isSpeechEnabled): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::href): (WebCore::HTMLLinkElement::rel): (WebCore::HTMLLinkElement::target): (WebCore::HTMLLinkElement::type): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): (WebCore::HTMLMediaElement::insertedIntoDocument): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::content): (WebCore::HTMLMetaElement::httpEquiv): (WebCore::HTMLMetaElement::name): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::min): (WebCore::HTMLMeterElement::max): (WebCore::HTMLMeterElement::value): (WebCore::HTMLMeterElement::low): (WebCore::HTMLMeterElement::high): (WebCore::HTMLMeterElement::optimum): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): (WebCore::HTMLObjectElement::containsJavaApplet): (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::groupLabelText): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::max): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::sourceAttributeValue): (WebCore::HTMLScriptElement::charsetAttributeValue): (WebCore::HTMLScriptElement::typeAttributeValue): (WebCore::HTMLScriptElement::languageAttributeValue): (WebCore::HTMLScriptElement::forAttributeValue): (WebCore::HTMLScriptElement::eventAttributeValue): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::media): (WebCore::HTMLSourceElement::type): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::media): (WebCore::HTMLStyleElement::type): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::abbr): (WebCore::HTMLTableCellElement::axis): (WebCore::HTMLTableCellElement::headers): (WebCore::HTMLTableCellElement::scope): (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::width): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rules): (WebCore::HTMLTableElement::summary): (WebCore::HTMLTableElement::addSubresourceAttributeURLs): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::align): (WebCore::HTMLTableSectionElement::ch): (WebCore::HTMLTableSectionElement::chOff): (WebCore::HTMLTableSectionElement::vAlign): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::maxLength): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::src): (WebCore::HTMLTrackElement::kind): (WebCore::HTMLTrackElement::srclang): (WebCore::HTMLTrackElement::label): (WebCore::HTMLTrackElement::isDefault): (WebCore::HTMLTrackElement::load): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::width): (WebCore::HTMLVideoElement::height): * html/StepRange.cpp: (WebCore::StepRange::StepRange): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement): * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardGtk.cpp: (WebCore::getURLForImageNode): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): * platform/win/ClipboardWin.cpp: (WebCore::writeImageToDataObject): (WebCore::ClipboardWin::declareAndWriteDragImage): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::altDisplayString): (WebCore::HitTestResult::absoluteImageURL): (WebCore::HitTestResult::absoluteLinkURL): * rendering/RenderDetails.cpp: (WebCore::RenderDetails::isOpen): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemAccessibilityText): * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computePreferredLogicalWidths): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::autosaveName): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::calculateIntrinsicSize): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): 2011-09-02 Alexey Proskuryakov <ap@apple.com> REGRESSION (r94093): Private browsing doesn't start with a clean state on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=67356 Reviewed by Darin Adler. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): Don't enable old-style private browsing when using sessions - it would take precedence over session cookie storage on Snow Leopard. 2011-09-02 Mihnea Ovidenie <mihnea@adobe.com> BORDER attribute percent with the input image tag not working. https://bugs.webkit.org/show_bug.cgi?id=66467 Reviewed by Simon Fraser. This patch fixes 2 issues regarding the border attribute of an input image element. 1. The border attribute, if specified, is now taken into account and the border of the input image element is displayed. 2. If the border attribute contains percent, the border is displayed. The value of the border attribute for input image element is now parsed according to the rules for parsing non-negative integers. This implies that when percent is specified in the border attribute, parsing takes place and the percent is ignored. If after parsing, the value of the border is greater than zero, the border of the input image element is displayed. * html/HTMLElement.cpp: (WebCore::parseBorderWidthAttribute): (WebCore::HTMLElement::applyBorderAttribute): * html/HTMLElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): 2011-09-02 Kentaro Hara <haraken@google.com> Implement the Event constructor for V8. https://bugs.webkit.org/show_bug.cgi?id=66756 Reviewed by Adam Barth. The spec of the Event constructor is here: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor This patch implements the Event constructor for V8 in V8EventConstructors.cpp, similar to the implementation for JSC in JSEventConstructors.cpp. * WebCore.gypi: Added V8EventConstructors.cpp. * WebCore.pro: Ditto. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyDouble): Returns a value of type double corresponding to a given key. * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns a value corresponding to a given key. * bindings/v8/custom/V8EventConstructors.cpp: Added. (WebCore::constructV8Event): AllowAllocation::current() means that a DOM object created by WebCore is going to be just wrapped into a V8 object. In this case, we skip the code of constructorCallback(). * dom/Event.idl: Added |V8CustomConstructor|. 2011-09-02 Anton Muhin <antonm@chromium.org> [v8] Use size_t instead of unsigned when iterating over Vector in V8DOMStringMap https://bugs.webkit.org/show_bug.cgi?id=67484 Reviewed by Yury Semikhatsky. No new tests, minor cleanup. * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyEnumerator): 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94404. http://trac.webkit.org/changeset/94404 https://bugs.webkit.org/show_bug.cgi?id=67490 "Patch is wrong, new API needs two reviewers, we are already working on how to add notifications elsewhere" (Requested by xan_ on #webkit). * bindings/gobject/GNUmakefile.am: 2011-09-02 Andreas Kling <kling@webkit.org> Use fastGetAttribute() and fastHasAttribute() where appropriate. https://bugs.webkit.org/show_bug.cgi?id=67394 Reviewed by Darin Adler. Change call sites that don't check the "style" or SVG animatable attributes to use fastGetAttribute()/fastHasAttribute() instead of getAttribute()/hasAttribute(). No new tests, this is a minor performance optimization. * accessibility/AXObjectCache.cpp: (WebCore::nodeHasRole): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_name): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::recalcStyleSelector): * dom/Element.cpp: (WebCore::Element::baseURI): (WebCore::Element::formatForDebugger): (WebCore::Element::spellcheckAttributeState): * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::doUnapply): * editing/markup.cpp: (WebCore::shouldIncludeWrapperForFullySelectedRoot): (WebCore::createMarkup): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::draggable): (WebCore::HTMLAnchorElement::href): (WebCore::HTMLAnchorElement::name): (WebCore::HTMLAnchorElement::target): (WebCore::HTMLAnchorElement::sendPings): (WebCore::HTMLAnchorElement::handleClick): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::target): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::aLink): (WebCore::HTMLBodyElement::bgColor): (WebCore::HTMLBodyElement::link): (WebCore::HTMLBodyElement::text): (WebCore::HTMLBodyElement::vLink): (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::value): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::updateNameCache): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::dir): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): (WebCore::HTMLElement::draggable): (WebCore::HTMLElement::title): (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): (WebCore::HTMLEmbedElement::insertedIntoDocument): (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::autofocus): (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::name): (WebCore::HTMLFormElement::action): (WebCore::HTMLFormElement::method): (WebCore::HTMLFormElement::target): * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::noResize): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setNameAndOpenURL): (WebCore::HTMLFrameElementBase::location): (WebCore::HTMLFrameElementBase::allowFullScreen): * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::insertedByParser): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::altText): (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): (WebCore::HTMLImageElement::alt): (WebCore::HTMLImageElement::draggable): (WebCore::HTMLImageElement::src): (WebCore::HTMLImageElement::addSubresourceAttributeURLs): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::finishParsingChildren): (WebCore::HTMLInputElement::altText): (WebCore::HTMLInputElement::reset): (WebCore::HTMLInputElement::searchEventsShouldBeDispatched): (WebCore::HTMLInputElement::isSpeechEnabled): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::href): (WebCore::HTMLLinkElement::rel): (WebCore::HTMLLinkElement::target): (WebCore::HTMLLinkElement::type): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): (WebCore::HTMLMediaElement::insertedIntoDocument): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::content): (WebCore::HTMLMetaElement::httpEquiv): (WebCore::HTMLMetaElement::name): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::min): (WebCore::HTMLMeterElement::max): (WebCore::HTMLMeterElement::value): (WebCore::HTMLMeterElement::low): (WebCore::HTMLMeterElement::high): (WebCore::HTMLMeterElement::optimum): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): (WebCore::HTMLObjectElement::containsJavaApplet): (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::groupLabelText): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::max): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::sourceAttributeValue): (WebCore::HTMLScriptElement::charsetAttributeValue): (WebCore::HTMLScriptElement::typeAttributeValue): (WebCore::HTMLScriptElement::languageAttributeValue): (WebCore::HTMLScriptElement::forAttributeValue): (WebCore::HTMLScriptElement::eventAttributeValue): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::media): (WebCore::HTMLSourceElement::type): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::media): (WebCore::HTMLStyleElement::type): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::abbr): (WebCore::HTMLTableCellElement::axis): (WebCore::HTMLTableCellElement::headers): (WebCore::HTMLTableCellElement::scope): (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::width): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rules): (WebCore::HTMLTableElement::summary): (WebCore::HTMLTableElement::addSubresourceAttributeURLs): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::align): (WebCore::HTMLTableSectionElement::ch): (WebCore::HTMLTableSectionElement::chOff): (WebCore::HTMLTableSectionElement::vAlign): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::maxLength): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::src): (WebCore::HTMLTrackElement::kind): (WebCore::HTMLTrackElement::srclang): (WebCore::HTMLTrackElement::label): (WebCore::HTMLTrackElement::isDefault): (WebCore::HTMLTrackElement::load): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::width): (WebCore::HTMLVideoElement::height): * html/StepRange.cpp: (WebCore::StepRange::StepRange): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement): * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardGtk.cpp: (WebCore::getURLForImageNode): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): * platform/win/ClipboardWin.cpp: (WebCore::writeImageToDataObject): (WebCore::ClipboardWin::declareAndWriteDragImage): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::altDisplayString): (WebCore::HitTestResult::absoluteImageURL): (WebCore::HitTestResult::absoluteLinkURL): * rendering/RenderDetails.cpp: (WebCore::RenderDetails::isOpen): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemAccessibilityText): * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computePreferredLogicalWidths): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::autosaveName): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::calculateIntrinsicSize): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): 2011-09-01 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67431 Implement border-image-repeat. Similar to how border-image-slice was implemented, the parsing of the two repeat values has been moved into separate functions. The value is represented as a Pair (similar to how we handle border radius). Reviewed by Beth Dakin. Added fast/borders/border-image-repeat.html. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Modified the CSSBorderImageValue (you're living on borrowed time, my friend!) to have a CSSValue that contains a Pair. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForRepeatRule): (WebCore::valueForNinePieceImageRepeat): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for the new properties. Break out the value retrieval for the image repeat rules into its own function, valueForNinePieceImageRepeat. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowRepeat): (WebCore::BorderImageParseContext::commitSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitWidth): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Modified the parsing of border image to call into parseBorderImageRepeat for the repeat values. (WebCore::isBorderImageRepeatKeyword): (WebCore::CSSParser::parseBorderImageRepeat): The new parsing code for border-image-repeat is here. It will build up a CSSValue containing a Pair and return the result. * css/CSSParser.h: * css/CSSPropertyNames.in: Add the new properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageRepeat): * css/CSSStyleSelector.h: The mapping into the front end is done the same way as border-image-slice. Factor out the image repeat rules portion into mapNinePieceImageRepeat. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: Add the new 'space' value as a valid image tiling rule. It's not yet supported and, like the 'round' value, is just mapped to 'repeat' for now. * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::copyRepeatFrom): Helper for copying only the repeat rules from another NinePieceImage. 2011-09-02 Jarred Nicholls <jarred@sencha.com> [Qt] number input not rendering spin buttons properly in RTL direction https://bugs.webkit.org/show_bug.cgi?id=67445 Properly render Qt's number input with RTL direction, and fix Plastique styling. Reviewed by Andreas Kling. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintInnerSpinButton): 2011-09-02 Arko Saha <nghq36@motorola.com> Resetting media controls when the src is changed from a valid url to an invalid url. https://bugs.webkit.org/show_bug.cgi?id=64880 Reviewed by Eric Carlson. Test: media/media-controls-invalid-url.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaLoadingFailed): 2011-09-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Make it more clear when requests are loaded from cache on network panel. https://bugs.webkit.org/show_bug.cgi?id=67396 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._refreshHTTPInformation): * inspector/front-end/networkPanel.css: (.resource-headers-view .outline-disclosure li .status-from-cache): 2011-09-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Should remove resource highlight on sort/filter in network panel. https://bugs.webkit.org/show_bug.cgi?id=67411 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._sortItems): (WebInspector.NetworkLogView.prototype._sortByTimeline): (WebInspector.NetworkLogView.prototype._updateFilter): 2011-09-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network: jump to initiator's record in case of redirect https://bugs.webkit.org/show_bug.cgi?id=67367 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get redirectSource): (WebInspector.Resource.prototype.set redirectSource): 2011-09-02 Antti Koivisto <antti@apple.com> De-virtualize recalcStyle() https://bugs.webkit.org/show_bug.cgi?id=67378 Reviewed by Dimitri Glazkov. Element::recalcStyle() does not need to be virtual, there are very few legit overrides. This will also make it possible to de-recursify it later. Added willRecalcStyle()/didRecalcStyle() virtual function for subclasses that need custom style recalc. These are only invoked if hasCustomWillOrDidRecalcStyle() bit is set. * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::recalcStyle): * dom/Element.h: (WebCore::Element::willRecalcStyle): (WebCore::Element::didRecalcStyle): * dom/Node.h: (WebCore::Node::hasCustomWillOrDidRecalcStyle): (WebCore::Node::setHasCustomWillOrDidRecalcStyle): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcShadowTreeStyle): * dom/ShadowRoot.h: * dom/Text.cpp: (WebCore::Text::recalcTextStyle): * dom/Text.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): (WebCore::HTMLFormControlElement::didRecalcStyle): * html/HTMLFormControlElement.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::HTMLFrameSetElement): (WebCore::HTMLFrameSetElement::willRecalcStyle): * html/HTMLFrameSetElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::didRecalcStyle): * html/HTMLMediaElement.h: * html/HTMLNoScriptElement.cpp: (WebCore::HTMLNoScriptElement::HTMLNoScriptElement): (WebCore::HTMLNoScriptElement::willRecalcStyle): * html/HTMLNoScriptElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::willRecalcStyle): * html/HTMLPlugInImageElement.h: * html/HTMLSelectElement.cpp: * html/HTMLSelectElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): (WebCore::SVGShadowText::willRecalcStyle): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): (WebCore::SVGUseElement::willRecalcStyle): (WebCore::SVGUseElement::didRecalcStyle): * svg/SVGUseElement.h: 2011-09-02 Yuta Kitamura <yutak@chromium.org> WebSocket: Send Blob as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67465 Reviewed by Kent Tamura. Re-lands r94399 with a fix for Leopard builds. * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Patrick Gansterer <paroga@webkit.org> [GTK] Generate gobject bindings for Notification and NotificationCenter https://bugs.webkit.org/show_bug.cgi?id=67380 Reviewed by Philippe Normand. * bindings/gobject/GNUmakefile.am: 2011-09-02 Kenichi Ishibashi <bashi@chromium.org> [chromium] editing/selection/regional-indicators.html timing out on Linux https://bugs.webkit.org/show_bug.cgi?id=66510 Reviewed by Kent Tamura. Uses SurrogatePairAwareTextIerator in ComplexTextControllerLinux to handle surrogate pairs correctly. No new tests. editing/selection/regional-indicators.html should pass with this patch. * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::ComplexTextController::nextScriptRun): Used SurrogatePairAwareTextIterator to split run. (WebCore::surrogatePairAwareFirstCharacter): Added. (WebCore::ComplexTextController::setupFontForScriptRun): Used surrogatePairAwareFirstCharacter() to get appropriate FontData. 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94399. http://trac.webkit.org/changeset/94399 https://bugs.webkit.org/show_bug.cgi?id=67471 Broke Leopard build (Requested by yutak on #webkit). * bindings/js/JSWebSocketCustom.cpp: * bindings/v8/custom/V8WebSocketCustom.cpp: * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94393. http://trac.webkit.org/changeset/94393 https://bugs.webkit.org/show_bug.cgi?id=67470 It broke Qt-SL build (Requested by ossy on #webkit). * WebCore.pro: 2011-09-02 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Webfonts display bold in Windows https://bugs.webkit.org/show_bug.cgi?id=67387 Uses font's default weight for webfonts by setting FW_DONTCARE. Reviewed by Kent Tamura. No new tests. We don't have fonts to test this change. * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Sets FW_DONTCARE to use default font weight. 2011-09-02 Yuta Kitamura <yutak@chromium.org> WebSocket: Send Blob as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67465 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hixie76/send-empty.html http/tests/websocket/tests/hixie76/send-object.html http/tests/websocket/tests/hybi/send-blob.html http/tests/websocket/tests/hybi/send-empty.html http/tests/websocket/tests/hybi/send-file-blob-fail.html http/tests/websocket/tests/hybi/send-file-blob.html http/tests/websocket/tests/hybi/workers/send-blob.html http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): * websockets/WebSocket.h: * websockets/WebSocket.idl: Fixing code generator did not sound easy, because there are some classes depending on broken behavior of current code generator (one such example is CanvasRenderingContext2D). As a temporary workaround, new custom handlers for send() are added. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): A Blob can be deserialized from url, type and size. (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): KURL, String and long long (corresponding to url, type and size, respectively) can be passed safely across threads. * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Philippe Normand <pnormand@igalia.com> [WebAudio] Undeclared dependency to VIDEO https://bugs.webkit.org/show_bug.cgi?id=66893 Reviewed by Kenneth Russell. Build MediaAudioSourceNode only if VIDEO is enabled * webaudio/AudioContext.cpp: * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/MediaElementAudioSourceNode.cpp: * webaudio/MediaElementAudioSourceNode.h: * webaudio/MediaElementAudioSourceNode.idl: 2011-09-02 Csaba Osztrogonác <ossy@webkit.org> [Qt][WK2] Unreviewed speculative buildfix. * WebCore.pro: Add platform/graphics/GlyphPageTreeNode.cpp to SOURCES. 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94389. http://trac.webkit.org/changeset/94389 https://bugs.webkit.org/show_bug.cgi?id=67468 breaks mac build (Requested by philn-tp on #webkit). * webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaElementSource): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/MediaElementAudioSourceNode.cpp: * webaudio/MediaElementAudioSourceNode.h: * webaudio/MediaElementAudioSourceNode.idl: 2011-09-02 Kentaro Hara <haraken@google.com> Generate an EventSource constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67459 Reviewed by Adam Barth. Tests: fast/eventsource/eventsource-constructor.html fast/eventsource/eventsource-attribute-listeners.html * WebCore.gypi: Removed V8EventSourceConstructor.cpp. * WebCore.pro: Removed V8EventSourceConstructor.cpp. * bindings/v8/custom/V8EventSourceConstructor.cpp: Removed. * page/EventSource.idl: Added the 'Constructor' extended attribute. 2011-09-02 Philippe Normand <pnormand@igalia.com> [WebAudio] Undeclared dependency to VIDEO https://bugs.webkit.org/show_bug.cgi?id=66893 Reviewed by Kenneth Russell. Build MediaAudioSourceNode only if VIDEO is enabled * webaudio/AudioContext.cpp: * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/MediaElementAudioSourceNode.cpp: * webaudio/MediaElementAudioSourceNode.h: * webaudio/MediaElementAudioSourceNode.idl: 2011-09-01 Takashi Toyoshima <toyoshim@chromium.org> [WebSocket] Implement WebSocket::close() code and reason handling. https://bugs.webkit.org/show_bug.cgi?id=66925 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/close.html http/tests/websocket/tests/hybi/workers/close.html * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::close): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::closeCallback): Add custom bridge for WebSocket::close(). * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::close): * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::close): Add code and reason arguments handling. (WebCore::WebSocketChannel::startClosingHandshake): Send a close frame without code and reason on server initiated closing handshakes. (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::processFrameHixie76): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::close): (WebCore::WorkerThreadableWebSocketChannel::Peer::close): (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): * websockets/WorkerThreadableWebSocketChannel.h: Add code and reason arguments handling. 2011-09-01 Mark Rowe <mrowe@apple.com> Fix the build by adding some more missing return types. * page/mac/WebCoreViewFactory.m: (-[WebCoreViewFactory init]): 2011-09-01 Michael Nordman <michaeln@google.com> [Chromium] Fix a crashing bug due to raciness around SQL database shutdown. https://bugs.webkit.org/show_bug.cgi?id=67457 The removeOpenDatabase() method can get called multiple times. Subsequent calls to it should be harmeless instead of cause a crash. Reviewed by David Levin. * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::removeOpenDatabase): 2011-09-01 Kent Tamura <tkent@chromium.org> The filename text color of a file upload control should be inherited. https://bugs.webkit.org/show_bug.cgi?id=67368 Reviewed by Darin Adler. * css/html.css: (input[type="file"]): Add 'color: inherit'. The declaration for 'input' contains 'color: initial;'. So a file upload control has had black foreground color unless it has been specified 'color' property explicitly. Because a file upload control uses inherited background color, the foreground color also should be inherited. 2011-09-01 Kentaro Hara <haraken@google.com> Generate a Worker constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67447 Reviewed by Dimitri Glazkov. Test: fast/workers/worker-constructor.html fast/workers/worker-event-listener.html * bindings/v8/custom/V8WorkerCustom.cpp: Removed constructorCallback(). * workers/Worker.idl: Added the 'Constructor' extended attribute. 2011-09-01 Kentaro Hara <haraken@google.com> Generate a FileReader constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67412 Reviewed by Adam Barth. Test: fast/files/blob-slice-test.html fast/files/file-reader-abort.html * bindings/v8/custom/V8FileReaderCustom.cpp: Removed constructorCallback(). * fileapi/FileReader.idl: Added the 'Constructor' extended attribute. 2011-09-01 Robert Kroeger <rjkroege@chromium.org> [chromium] Code cleanup FIXME in Chromium recognizer https://bugs.webkit.org/show_bug.cgi?id=67448 Reviewed by Adam Barth. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): Fixed a bug noticed by a benjaminp while reviewing a different ndonned patch where global positions were not being set correctly on gesture-driven mouse wheel events. * platform/chromium/GestureRecognizerChromium.cpp: Changed static per-edge functions into methods and improves encapsulation. No new functionality is present. (WebCore::GestureRecognizerChromium::GestureRecognizerChromium): (WebCore::GestureRecognizerChromium::reset): (WebCore::GestureRecognizerChromium::~GestureRecognizerChromium): (WebCore::GestureRecognizerChromium::addEdgeFunction): (WebCore::GestureRecognizerChromium::isInClickTimeWindow): (WebCore::GestureRecognizerChromium::isInsideManhattanSquare): (WebCore::GestureRecognizerChromium::appendClickGestureEvent): (WebCore::GestureRecognizerChromium::processTouchEventForGestures): (WebCore::GestureRecognizerChromium::appendScrollGestureBegin): (WebCore::GestureRecognizerChromium::appendScrollGestureEnd): (WebCore::GestureRecognizerChromium::appendScrollGestureUpdate): (WebCore::GestureRecognizerChromium::updateValues): (WebCore::GestureRecognizerChromium::signature): (WebCore::GestureRecognizerChromium::touchDown): (WebCore::GestureRecognizerChromium::scrollEnd): (WebCore::GestureRecognizerChromium::noGesture): (WebCore::GestureRecognizerChromium::click): (WebCore::GestureRecognizerChromium::isClickOrScroll): (WebCore::GestureRecognizerChromium::inScroll): * platform/chromium/GestureRecognizerChromium.h: (WebCore::GestureRecognizerChromium::setState): 2011-09-01 Julien Chaffraix <jchaffraix@webkit.org> Move LayoutRepainter to its own class https://bugs.webkit.org/show_bug.cgi?id=66255 Reviewed by Hajime Morita. No new tests, code movement only. * rendering/RenderObject.h: Moved code from here ... * rendering/LayoutRepainter.cpp: Added. (WebCore::LayoutRepainter::LayoutRepainter): (WebCore::LayoutRepainter::repaintAfterLayout): * rendering/LayoutRepainter.h: Added. (WebCore::LayoutRepainter::checkForRepaint): ... to those 2 files. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Updated our build systems. * rendering/RenderingAllInOne.cpp: Needed for the Windows bot. * rendering/RenderBlock.cpp: * rendering/RenderDeprecatedFlexibleBox.cpp: * rendering/RenderReplaced.cpp: * rendering/RenderTable.cpp: * rendering/svg/RenderSVGContainer.cpp: * rendering/svg/RenderSVGForeignObject.cpp: * rendering/svg/RenderSVGImage.cpp: * rendering/svg/RenderSVGPath.cpp: * rendering/svg/RenderSVGRoot.cpp: * rendering/svg/RenderSVGText.cpp: Added #include "LayoutRepainter". 2011-09-01 Ada Chan <adachan@apple.com> Cleanup refactoring for https://bugs.webkit.org/show_bug.cgi?id=67160 Don't ifdef out the data member xslStyleSheets in MemoryCache::Statistics to cut down the ifdefs in getWebCoreMemoryCacheStatistics() in WebKit2/WebProcess/WebProcess.cpp. Reviewed by Darin Adler. No new tests required. Just small code refactoring. * loader/cache/MemoryCache.h: 2011-09-01 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page https://bugs.webkit.org/show_bug.cgi?id=65140 Reviewed by Darin Adler. Tests: fast/css/stylesheet-enable-first-alternate-link.html fast/css/stylesheet-enable-first-alternate-on-load-link.html fast/css/stylesheet-enable-first-alternate-on-load-sheet.html fast/css/stylesheet-enable-second-alternate-link.html fast/css/stylesheet-enable-second-alternate-on-load-link.html fast/css/stylesheet-enable-second-alternate-on-load-sheet.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html This patch basically reverts 88479 and 84329 while keeping the tests we developped during the implementation. Following discussion, it looks like HTML5 will need to be amended. In the meantime, we will just revert the changes so that we can come up with a better change. * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::setDisabledState): (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::process): Revert those method to their original content. * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isDisabled): (WebCore::HTMLLinkElement::isEnabledViaScript): (WebCore::HTMLLinkElement::isAlternate): Re-introduced the DisabledState enum. * html/HTMLLinkElement.idl: |disabled| is Reflect'ed again. 2011-09-01 Dan Bernstein <mitz@apple.com> Fix layout test regressions from r94352. Reviewed by Anders Carlsson. * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters): In the custom font case (that is, when there is not base NSFont) always get and use the best variation. 2011-09-01 Ryosuke Niwa <rniwa@webkit.org> Revert r94355 because it caused bunch of builds to break. * page/DOMWindow.idl: 2011-09-01 Mark Rowe <mrowe@apple.com> <rdar://problem/10063411> WebScriptObject.h declares an Objective-C method without a return type. Rubber-stamped by Anders Carlsson. * bridge/objc/WebScriptObject.h: 2011-09-01 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (4/7) https://bugs.webkit.org/show_bug.cgi?id=67174 Reviewed by Oliver Hunt. No new tests. Completed the fourth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::createWindowShell): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): (JSC::Bindings::ObjcFallbackObjectImp::finishCreation): * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): (JSC::RuntimeArray::finishCreation): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): (JSC::Bindings::RuntimeObject::finishCreation): * bridge/runtime_object.h: 2011-08-31 Adrienne Walker <enne@google.com> [chromium] Remove unsafe raw GraphicsContext3D pointer from ProgramBinding https://bugs.webkit.org/show_bug.cgi?id=67003 Reviewed by James Robinson. ProgramBinding now takes an explicit cleanup call to destroy its resources. This will assert if it is not called and will leak no longer potentially dereference a dead pointer. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::borderProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::tilerProgram): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::tilerProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzleAA): (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::ProgramBindingBase::ProgramBindingBase): (WebCore::ProgramBindingBase::~ProgramBindingBase): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::cleanup): (WebCore::ProgramBindingBase::loadShader): (WebCore::ProgramBindingBase::createShaderProgram): * platform/graphics/chromium/ProgramBinding.h: (WebCore::ProgramBinding::ProgramBinding): (WebCore::ProgramBinding::initialize): 2011-09-01 Patrick Gansterer <paroga@webkit.org> Don't include unnecessary headers in V8 bindings https://bugs.webkit.org/show_bug.cgi?id=67435 Reviewed by Darin Adler. When an IDL attribue is Conditonal the corresponding headers need to be surrounded with the correct #if ENABLE(). * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: 2011-09-01 Pratik Solanki <psolanki@apple.com> Rename CFNETWORK_DATA_ARRAY_CALLBACK to NETWORK_CFDATA_ARRAY_CALLBACK https://bugs.webkit.org/show_bug.cgi?id=67348 Reviewed by Alexey Proskuryakov. * loader/ResourceLoader.h: * loader/SubresourceLoader.h: * loader/cf/SubresourceLoaderCF.cpp: * loader/mac/ResourceLoaderMac.mm: * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::clear): (WebCore::SharedBuffer::buffer): * platform/SharedBuffer.h: * platform/cf/SharedBufferCF.cpp: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::createCFURLConnection): * platform/network/mac/ResourceHandleMac.mm: 2011-09-01 Kentaro Hara <haraken@google.com> TypeError should be thrown when a constructor is called as a normal function. https://bugs.webkit.org/show_bug.cgi?id=67381 Reviewed by Darin Adler. The spec is here: http://www.w3.org/TR/WebIDL/#es-interface-call For example, "Image()" or "XMLHttpRequest()" should throw TypeError. Test: fast/dom/call-a-constructor-as-a-function.html * bindings/v8/custom/V8ArrayBufferCustom.cpp: (WebCore::V8ArrayBuffer::constructorCallback): Throws TypeError if args.IsConstructCall() is false. * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): Ditto. * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): Ditto. * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCallback): Ditto. * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: (WebCore::v8HTMLAudioElementConstructorCallback): Ditto. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): Ditto. * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: (WebCore::v8HTMLOptionElementConstructorCallback): Ditto. * bindings/v8/custom/V8MessageChannelConstructor.cpp: (WebCore::V8MessageChannel::constructorCallback): Ditto. * bindings/v8/custom/V8SharedWorkerCustom.cpp: (WebCore::V8SharedWorker::constructorCallback): Ditto. * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: (WebCore::V8WebKitCSSMatrix::constructorCallback): Ditto. * bindings/v8/custom/V8WebKitPointConstructor.cpp: (WebCore::V8WebKitPoint::constructorCallback): Ditto. * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): Ditto. * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::V8Worker::constructorCallback): Ditto. 2011-08-31 Adrienne Walker <enne@google.com> [chromium] TextureManager overestimates the size of non-RGBA texture formats https://bugs.webkit.org/show_bug.cgi?id=66917 Reviewed by James Robinson. Use GraphicsContext3D to determine the size of a given texture format. Also, make TextureManager use more GraphicsContext3D types. * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::memoryUseBytes): * platform/graphics/chromium/TextureManager.h: 2011-09-01 Sam Weinig <sam@webkit.org> Add missing Event constructors to DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=67449 Reviewed by Anders Carlsson. Covered by existing tests. * page/DOMWindow.idl: 2011-09-01 Patrick Gansterer <paroga@webkit.org> Consider Conditional attribute in CodeGenerator for methods https://bugs.webkit.org/show_bug.cgi?id=67409 Reviewed by Darin Adler. This change adds appropriate #if ENABLE() lines for the preprocessor around the generated functions depending on the Conditional attribute in the IDL file. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: 2011-08-29 Nat Duca <nduca@chromium.org> [chromium] Introduce CCSingleThreadProxy in order to move LayerRenderer to CCLayerTreeHostImpl https://bugs.webkit.org/show_bug.cgi?id=66807 Reviewed by James Robinson. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerRendererRecursive): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::close): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::isContextLost): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::capabilities): (WebCore::LayerRendererChromium::rootLayerImpl): (WebCore::LayerRendererChromium::contextSupportsMapSub): (WebCore::LayerRendererChromium::viewportSize): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::reserveTextures): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateAndLayout): (WebCore::CCLayerTreeHost::preCommit): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::createCompositorThread): (WebCore::CCLayerTreeHost::createLayerTreeHostContext3D): (WebCore::CCLayerTreeHost::createLayerTreeHostImpl): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::scheduleComposite): (WebCore::CCLayerTreeHost::context): (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::finishAllRendering): (WebCore::CCLayerTreeHost::layerRendererCapabilities): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::skiaContext): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::loseCompositorContext): (WebCore::CCLayerTreeHost::contentsTextureManager): (WebCore::CCLayerTreeHost::composite): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (WebCore::LayerRendererCapabilities::LayerRendererCapabilities): * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::finishAllRendering): (WebCore::CCLayerTreeHostImpl::isContextLost): (WebCore::CCLayerTreeHostImpl::layerRendererCapabilities): (WebCore::CCLayerTreeHostImpl::present): (WebCore::CCLayerTreeHostImpl::readback): (WebCore::CCLayerTreeHostImpl::setRootLayer): (WebCore::CCLayerTreeHostImpl::setVisible): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::CCLayerTreeHostImpl::updateLayers): (WebCore::CCLayerTreeHostImpl::setViewport): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::layerRenderer): (WebCore::CCLayerTreeHostImpl::rootLayer): (WebCore::CCLayerTreeHostImpl::viewportSize): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Removed. * platform/graphics/chromium/cc/CCMainThreadTask.h: (WebCore::MainThreadTask4::create): (WebCore::MainThreadTask4::MainThreadTask4): (WebCore::MainThreadTask4::performTask): (WebCore::MainThreadTask5::create): (WebCore::MainThreadTask5::MainThreadTask5): (WebCore::MainThreadTask5::performTask): (WebCore::createMainThreadTask): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCProxy.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp. (WebCore::CCProxy::isMainThread): (WebCore::CCProxy::isImplThread): (WebCore::CCProxy::setImplThread): * platform/graphics/chromium/cc/CCProxy.h: Added. (WebCore::CCProxy::~CCProxy): (WebCore::CCProxy::CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: Added. (WebCore::ScopedSetImplThread::ScopedSetImplThread): (WebCore::ScopedSetImplThread::~ScopedSetImplThread): (WebCore::CCSingleThreadProxy::create): (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::start): (WebCore::CCSingleThreadProxy::~CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::context): (WebCore::CCSingleThreadProxy::finishAllRendering): (WebCore::CCSingleThreadProxy::isStarted): (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::layerRendererCapabilities): (WebCore::CCSingleThreadProxy::loseCompositorContext): (WebCore::CCSingleThreadProxy::setNeedsCommitAndRedraw): (WebCore::CCSingleThreadProxy::setNeedsRedraw): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::skiaContext): (WebCore::CCSingleThreadProxy::contentsTextureManager): (WebCore::CCSingleThreadProxy::compositeImmediately): (WebCore::CCSingleThreadProxy::compositeIfNeeded): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h. * platform/graphics/chromium/cc/CCThreadProxy.cpp: Added. (WebCore::CCThreadProxy::create): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::finishAllRendering): (WebCore::CCThreadProxy::isStarted): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::layerRendererCapabilities): (WebCore::CCThreadProxy::loseCompositorContext): (WebCore::CCThreadProxy::setNeedsCommitAndRedraw): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::start): (WebCore::CCThreadProxy::stop): (WebCore::CCThreadProxy::skiaContext): (WebCore::CCThreadProxy::contentsTextureManager): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::drawLayersOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): (WebCore::CCThreadProxy::initializeImplOnCCThread): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h. * platform/graphics/chromium/cc/CCThreadTask.h: (WebCore::CCThreadTask5::create): (WebCore::CCThreadTask5::CCThreadTask5): (WebCore::CCThreadTask5::performTask): (WebCore::createCCThreadTask): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): 2011-09-01 Dan Bernstein <mitz@apple.com> <rdar://problem/9528843> STIX glyphs not rendered on this stackoverflow answer https://bugs.webkit.org/show_bug.cgi?id=67444 Reviewed by Darin Adler. Test: fast/text/fallback-traits-fixup.html After obtaining STIX Regular as a fallback font for some characters, getFontDataForCharacters() proceeded to ask for a font from the same family having the desired traits and weight (because wkGetFontInLanguageForRange() does not preserve traits and weight). The returned font was different and happened to not contain the desired character. * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters): Only ask for a family member with the desired traits and weight if the substitute font does not already have them, and only use the returned member if it actually contains the desired character. 2011-09-01 Kentaro Hara <haraken@google.com> Generate an XSLTProcessor constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67414 Reviewed by Dimitri Glazkov. Test: fast/dom/Window/custom-constructors.html fast/xsl/default-html.html * bindings/v8/custom/V8XSLTProcessorCustom.cpp: Removed constructorCallback(). * xml/XSLTProcessor.idl: Added the 'Constructor' extended attribute. 2011-09-01 Eric Carlson <eric.carlson@apple.com> HTMLMediaElement should use fastHasAttribute instead of hasAttribute https://bugs.webkit.org/show_bug.cgi?id=67421 Reviewed by Simon Fraser. Use fastHasAttribute instead of hasAttribute because it is faster, and HTMLMediaElement doesn't ever need to check style or SVG animated attributes. No new tests required, this is just an optimization. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): hasAttribute -> fastHasAttribute. (WebCore::HTMLMediaElement::loadResource): Ditto. (WebCore::HTMLMediaElement::autoplay): Ditto. (WebCore::HTMLMediaElement::loop): Ditto. (WebCore::HTMLMediaElement::controls): Ditto. (WebCore::HTMLMediaElement::selectNextSourceChild): Ditto. (WebCore::HTMLMediaElement::sourceWasAdded): Ditto. 2011-09-01 Dominic Mazzoni <dmazzoni@google.com> Add API functions to enable starting and stopping speech input, and checking the current speech input state. https://bugs.webkit.org/show_bug.cgi?id=60170 Reviewed by Dimitri Glazkov. Test: fast/speech/input-text-speechstart.html * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::startSpeechInput): (WebCore::InputFieldSpeechButtonElement::stopSpeechInput): * html/shadow/TextControlInnerElements.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::speechButtonElement): * rendering/RenderTextControlSingleLine.h: 2011-09-01 Tim Horton <timothy_horton@apple.com> REGRESSION: Rendering artifacts on a rotated, pattern filled SVG shape https://bugs.webkit.org/show_bug.cgi?id=53055 <rdar://problem/8910917> Reviewed by Simon Fraser. Make use of wkCGPatternCreateWithImageAndTransform when tiling patterns in both directions. This helps to avoid pixel-cracking along pattern tiling boundaries. Ignore 2D rotation when computing the size of a pattern's tile image, as it artificially inflates the size of the tile, which can cause pixel-cracking. Test: svg/custom/pattern-rotate-gaps.svg * platform/graphics/cg/PatternCG.cpp: (WebCore::Pattern::createPlatformPattern): * rendering/svg/RenderSVGResourcePattern.cpp: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::roundedImageBufferSize): * rendering/svg/SVGImageBufferTools.h: 2011-09-01 Patrick Gansterer <paroga@webkit.org> Unreviewed, rolling out r94284. http://trac.webkit.org/changeset/94284 https://bugs.webkit.org/show_bug.cgi?id=65050 Broke building without SVG enabled on Chromium. * page/DOMWindow.idl: 2011-09-01 Alexey Proskuryakov <ap@apple.com> REGRESSION (r93247): 2 http/tests/misc tests failing on SnowLeopard Intel Release (Tests) https://bugs.webkit.org/show_bug.cgi?id=67374 Reviewed by Simon Fraser. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::applyBasicAuthorizationHeader): * platform/network/mac/ResourceHandleMac.mm: (WebCore::applyBasicAuthorizationHeader): Some versions of CFNetwork carry along an Authorization header, some don't. We shouldn't repeat its value twice, this is not one of those headers that allow comma separated lists of values. 2011-09-01 Noel Gordon <noel.gordon@gmail.com> [chromium] Move ImageBuffer::platformLayer() https://bugs.webkit.org/show_bug.cgi?id=67372 Reviewed by Kenneth Russell. No new tests: refactoring only, covered by existting tests. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::platformLayer): Move it away from the toDataURL code. 2011-09-01 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> Focus ring is rendered incorrectly for a block with -webkit-writing-mode https://bugs.webkit.org/show_bug.cgi?id=62915 Reviewed by Simon Fraser. RenderBlock::addFocusRingRects() should consider physical box position and dimension instead of logical values for focus ring rects calculation. Test: fast/css/focus-ring-multiline-writingmode-vertical.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addFocusRingRects): 2011-09-01 Philippe Normand <pnormand@igalia.com> Unreviewed, GTK build fix after r94299. * GNUmakefile.list.am: 2011-09-01 Brian Salomon <bsalomon@google.com> [Chromium/Skia] Use GraphicsContext3D::grContext() to create GrContext for accelerated drawing https://bugs.webkit.org/show_bug.cgi?id=67419 Reviewed by James Robinson. Accelerated drawing is not enabled in layout tests. However, once it is this change will be tested by every test. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::contextSupportsAcceleratedPainting): (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::create): (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: 2011-09-01 Dominik Röttsches <dominik.rottsches@linux.intel.com> Rename GraphicsContext3DInternal to GraphicsContext3DPrivate and add a dummy version of this class for Mac https://bugs.webkit.org/show_bug.cgi?id=67172 Build fix, completing rename for GTK file. Reviewed by Chris Marrin. * platform/graphics/gtk/GraphicsContext3DPrivate.cpp: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DInternal.cpp. (sharedDisplay): (WebCore::activeGraphicsContexts): (WebCore::GraphicsContext3DPrivate::addActiveGraphicsContext): (WebCore::GraphicsContext3DPrivate::removeActiveGraphicsContext): (WebCore::GraphicsContext3DPrivate::cleanupActiveContextsAtExit): (WebCore::GraphicsContext3DPrivate::create): (WebCore::GraphicsContext3DPrivate::createPbufferContext): (WebCore::GraphicsContext3DPrivate::createPixmapContext): (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::makeContextCurrent): 2011-09-01 Simon Fraser <simon.fraser@apple.com> REGRESSION (r94259): Two tests doing hit testing were broken by this change. https://bugs.webkit.org/show_bug.cgi?id=67353 Reviewed by Chris Marrin. Fix a regression from r94259; that change missed a fix in RenderView, which affects coordinate transforms in position:fixed elements. This fixes these tests: fast/events/document-elementFromPoint.html fast/events/offsetX-offsetY.html plugins/mouse-events-fixedpos.html * rendering/RenderView.cpp: (WebCore::RenderView::mapAbsoluteToLocalPoint): 2011-09-01 Tony Gentilcore <tonyg@chromium.org> [chromium] Fonts returned by FontCache::getFontDataForCharacters() are never released https://bugs.webkit.org/show_bug.cgi?id=66673 Reviewed by James Robinson. This was fixed for other ports in http://trac.webkit.org/changeset/88260. However, it was missed in FontCacheLinux likely due to similar param in the nested call to getCachedFontPlatformData(). No new tests because no directly observable change in behavior. * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-08-31 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Perform a more effective JS GC https://bugs.webkit.org/show_bug.cgi?id=67304 Reviewed by Pavel Feldman. * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectGarbage): 2011-09-01 Sam Weinig <sam@webkit.org> WebGLContextEvent should have its own JS wrapper https://bugs.webkit.org/show_bug.cgi?id=67352 Reviewed by Anders Carlsson. The WebGLContextEvent was missing a proper JS wrapper, and thus anyone using one in an EventListener was actually just getting a plain old Event. Rectify this by generating the wrapper and wrapping it on creating. Test: fast/canvas/webgl/WebGLContextEvent.html * CodeGenerators.pri: Add WebGLContextEvent.idl * DerivedSources.make: Add WebGLContextEvent and sort. * WebCore.xcodeproj/project.pbxproj: Add generated JSWebGLContextEvent.h/cpp. * bindings/js/JSEventCustom.cpp: (WebCore::toJS): Wrap WebGLContextEvents as JSWebGLContextEvents. * dom/Event.cpp: (WebCore::Event::isWebGLContextEvent): * dom/Event.h: * html/canvas/WebGLContextEvent.cpp: (WebCore::WebGLContextEvent::isWebGLContextEvent): * html/canvas/WebGLContextEvent.h: Add predicate for WebGLContextEvent. 2011-09-01 Eric Carlson <eric.carlson@apple.com> Add 'muted' content attribute to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=58369 Reviewed by Darin Adler. Test: media/video-defaultmuted.html * html/HTMLAttributeNames.in: Add muted. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): Deal with the 'muted' attribute. * html/HTMLMediaElement.idl: Add defaultMuted. 2011-09-01 Tim Horton <timothy_horton@apple.com> REGRESSION: Rendering artifacts on a rotated, pattern filled shape https://bugs.webkit.org/show_bug.cgi?id=53055 <rdar://problem/8910917> Reviewed by Simon Fraser. Introduce wkCGPatternCreateWithImageAndTransform. * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-08-30 Adrienne Walker <enne@google.com> [chromium] Fix scissor rects on clipped nested iframes https://bugs.webkit.org/show_bug.cgi?id=67221 Reviewed by James Robinson. Layers that mask to bounds (like iframes) weren't being properly clipped if their parent scissor rect was empty. This case happens when a parent iframe is clipped. Fixed by propagating the empty scissor rect to child layers rather than ignoring it. Test: compositing/iframes/nested-composited-iframe.html * platform/graphics/chromium/LayerRendererChromium.cpp: 2011-08-31 Yury Semikhatsky <yurys@chromium.org> Web Inspector: close dedicated worker inspectors when page inspector is closing https://bugs.webkit.org/show_bug.cgi?id=67366 Close all dedicated worker inspector windows when page inspector is closing. Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.WorkerManager.prototype._pageInspectorClosing): (WebInspector.WorkerManager.prototype._workerInspectorClosing): * inspector/front-end/inspector.js: (WebInspector.close): 2011-08-31 Yury Semikhatsky <yurys@chromium.org> [Chromium] Web Inspector: dedicated worker inspection is broken https://bugs.webkit.org/show_bug.cgi?id=67279 Provide transport for inspector messages between Page and DedicatedWorker inspectors in case of in-process workers. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: sendMessageObjectToBackend should accept message object which is ready for sending to backend. This method is overriden in WorkerManager for dedicated workers and we don't want to replicate request id assignment there. * workers/WorkerMessagingProxy.cpp: (WebCore::PostMessageToPageInspectorTask::create): (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): (WebCore::PostMessageToPageInspectorTask::performTask): (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::connectToWorkerContextInspectorTask): (WebCore::WorkerMessagingProxy::connectToInspector): (WebCore::disconnectFromWorkerContextInspectorTask): (WebCore::WorkerMessagingProxy::disconnectFromInspector): (WebCore::dispatchOnInspectorBackendTask): (WebCore::WorkerMessagingProxy::sendMessageToInspector): (WebCore::WorkerMessagingProxy::postMessageToPageInspector): * workers/WorkerMessagingProxy.h: 2011-09-01 Csaba Osztrogonác <ossy@webkit.org> [CSS3 Backgrounds and Borders] Implement border-image-slice https://bugs.webkit.org/show_bug.cgi?id=67321 * WebCore.pro: Unreviewed buildfix after Dave "scattered" Hyatt (r94299). 2011-09-01 Ned Holbrook <nholbrook@apple.com> Typesetting features need not force complex for single-character runs https://bugs.webkit.org/show_bug.cgi?id=66498 Typesetting features have no effect on a solitary character, so they shouldn't enable complex layout unless multiple characters are present. Reviewed by Dan Bernstein. No new tests, this is merely a performance optimization. * platform/graphics/Font.cpp: (WebCore::Font::codePath): typesettingFeatures() only forces Complex for multiple-character runs. 2011-08-31 Jeff Miller <jeffm@apple.com> Defer creating AVPlayer and AVPlayerItem in MediaPlayerPrivateAVFoundation::setPreload() https://bugs.webkit.org/show_bug.cgi?id=66253 Reviewed by Jon Honeycutt. No new tests, should be covered by existing media tests. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Use the same code on Mac and Windows to only create the AVPlayer and AVPlayerItem when needed. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Assign any existing AVPlayerItem to the new AVPlayer. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Allow creation of the AVPlayerItem before the AVPlayer. 2011-08-31 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67321 Implement border-image-slice. This will eventually be a component of the new border-image shorthand property. It holds the cuts that you make into the border image along with a new optional "fill" keyword that indicates whether or not the center should be filled with the middle slice of the image. By default -webkit-border-image has always filled, but this does not match the specification. To preserve backwards compatibility, -webkit-border-image will continue to fill by default, but this does slightly affect computed style results, since the "fill" keyword will now be included in property dumps. Reviewed by Beth Dakin. Added fast/borders/border-image-slices.html. * CMakeLists.txt: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSBorderImageSliceValue.cpp: Added. (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::~CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::cssText): * css/CSSBorderImageSliceValue.h: Added. (WebCore::CSSBorderImageSliceValue::create): (WebCore::CSSBorderImageSliceValue::isBorderImageSliceValue): Add a new CSSBorderImageSliceValue that holds both the four slices (as a CSS rect) and the fill keyword (as a boolean). Note that the cssText() dumping of the slices has been refined to be smarter, and it will no longer dump repeating values. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): CSSBorderImageValue now owns a CSSBorderImageSliceValue instead of just a CSS rect. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImage): Add a new method, valueForNinePieceImageSlice, for getting the slices plus the fill value from the NinePieceImage and putting it into a CSSBorderImageSliceValue. This method is now used by valueForNinePieceImage to get the CSSBorderImageSliceValue that is part of the overall CSSBorderImageValue. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Adding support for the new properties: border-image-slice and -webkit-mask-box-image-slice. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowBreak): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Modify parseBorderImage to no longer parse the slices itself. Instead it farms out the parsing to parseBorderImageSlice. (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): (WebCore::BorderImageSliceParseContext::allowNumber): (WebCore::BorderImageSliceParseContext::allowFill): (WebCore::BorderImageSliceParseContext::allowFinalCommit): (WebCore::BorderImageSliceParseContext::top): (WebCore::BorderImageSliceParseContext::commitNumber): (WebCore::BorderImageSliceParseContext::commitFill): (WebCore::BorderImageSliceParseContext::setAllowFinalCommit): (WebCore::BorderImageSliceParseContext::setTop): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::CSSParser::parseBorderImageSlice): Slice parsing has now been broken out so that it can be parsed as a single property. In addition support for the "fill" keyword has been added to control image filling. * css/CSSParser.h: Modified to add the new parseBorderImageSlice method. * css/CSSPropertyNames.in: Add the new properties: border-image-slice and -webkit-mask-box-image-slice. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): Rework mapNinePieceImage to call mapNinePieceImageSlice so that the mapping can be done just for the slices. (WebCore::CSSStyleSelector::mapNinePieceImageSlice): A new method that handles mapping just the slices into the front-end NinePieceImage. (WebCore::CSSStyleSelector::loadPendingImages): Modified to ensure the fill value is preserved when box-reflect makes a new NinePieceImage. * css/CSSStyleSelector.h: Added the new mapNinePieceImageSlice method. * css/CSSValue.h: (WebCore::CSSValue::isBorderImageSliceValue): Virtual function for identifying border image slice values. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): The painting of the nine piece image has been modified to match the specification. The "fill" keyword controls whether or not the middle is painted. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): The fill keyword has to be checked now for equality. * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::fill): (WebCore::NinePieceImage::setFill): Added the fill keyword to the front end NinePieceImage. (WebCore::NinePieceImage::copySlicesFrom): Added a helper to copy only the slices over from another NinePieceImage. Used when inheriting the border-image-slice property from a parent style. 2011-09-01 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Decode query/form parameters names as well as values. https://bugs.webkit.org/show_bug.cgi?id=67393 Reviewed by Yury Semikhatsky. * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._decodeURIComponent): (WebInspector.ResourceHeadersView.prototype._refreshParms): 2011-08-31 Pavel Podivilov <podivilov@chromium.org> Web Inspector: remove PresentationBreakpoint class. https://bugs.webkit.org/show_bug.cgi?id=67275 Reviewed by Yury Semikhatsky. * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint.didRequestContent): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): 2011-08-31 Steve Block <steveblock@google.com> Clean up all mentions of Android in comments https://bugs.webkit.org/show_bug.cgi?id=67303 Also removes some superfluous guards and methods added for Android. Reviewed by Darin Adler. No new tests, removing dead code only. * WebCorePrefix.h: Chromium uses this file only on Mac, so these Android guards are no longer required. * bindings/v8/NPV8Object.cpp: * bindings/v8/NPV8Object.h: Including npruntime.h for non-Chromium ports was added in http://trac.webkit.org/changeset/53634 for Android. However, this file is included in WebCore.pro, so leaving the guard in place. * bindings/v8/ScriptCachedFrameData.h: This code was added for Android in http://trac.webkit.org/changeset/56716 but is now also used by QT. The comment should have been removed in http://trac.webkit.org/changeset/93573. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::isLayoutTimerActive): (WebCore::Document::minimumLayoutDelay): * dom/Document.h: This method was added for Android in http://trac.webkit.org/changeset/52919 and modified in http://trac.webkit.org/changeset/79775. It is no longer needed. 2011-09-01 Kristóf Kosztyó <kkristof@inf.u-szeged.hu> [Qt] Build dependency problems https://bugs.webkit.org/show_bug.cgi?id=38054 Make clean build after the defines are changed. Reviewed by Csaba Osztrogonác. * features.pri: 2011-09-01 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network error messages in console should link to the respective request in network panel if there is one. https://bugs.webkit.org/show_bug.cgi?id=65550 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype._formatMessage): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype.searchCanceled): (WebInspector.NetworkLogView.prototype.revealAndHighlightResource): (WebInspector.NetworkLogView.prototype._removeAllNodeHighlights): (WebInspector.NetworkLogView.prototype._highlightNode): (WebInspector.NetworkPanel.prototype._resourceByAnchor): (WebInspector.NetworkPanel.prototype.canShowAnchorLocation): (WebInspector.NetworkPanel.prototype.showAnchorLocation): * inspector/front-end/networkLogView.css: (.network-log-grid tr.highlighted-row): (from): (to): 2011-09-01 Patrick Gansterer <paroga@webkit.org> Replace preprocessor statements in DOMWindow.idl with Conditional attribute https://bugs.webkit.org/show_bug.cgi?id=65050 Reviewed by Brent Fulgham. Many attributes use the [Conditional=XXX] syntax already. Unify the declaration of conditional attributes of DOMWindow with the corresponding Conditional attribute. This reduces the need of the preprocessor which is the the source of much pain on native windows. * page/DOMWindow.idl: 2011-09-01 Yuta Kitamura <yutak@chromium.org> WebSocket: Fix bufferedAmount after WebSocket is closed https://bugs.webkit.org/show_bug.cgi?id=67363 Reviewed by Kent Tamura. Test: http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * websockets/WebSocket.cpp: (WebCore::WebSocket::send): (WebCore::WebSocket::getFramingOverhead): * websockets/WebSocket.h: 2011-09-01 Keishi Hattori <keishi@webkit.org> Rename colorSelected to didChooseColor https://bugs.webkit.org/show_bug.cgi?id=67271 Reviewed by Kent Tamura. * WebCore.exp.in: * html/ColorInputType.cpp: (WebCore::ColorInputType::didChooseColor): Renamed colorSelected to didChooseColor so it follows common naming practice. * html/ColorInputType.h: * platform/ColorChooser.cpp: (WebCore::ColorChooser::didChooseColor): Renamed. * platform/ColorChooser.h: 2011-09-01 Adam Barth <abarth@webkit.org> Attempt to fix Windows build. * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: 2011-08-31 Adam Barth <abarth@webkit.org> [Chromium] Rename PlatformBridge to PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=67349 Reviewed by Darin Fisher. This matches the WebKitPlatformSupport embedder API. * WebCore.gypi: * WebCore.pro: * bindings/v8/NPV8Object.cpp: (_NPN_Evaluate): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::createScriptInstanceForWidget): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::reportFatalErrorInV8): * bindings/v8/V8GCController.cpp: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::handleOutOfMemory): (WebCore::V8Proxy::evaluate): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::histogramEnumeration): * page/PageGroup.cpp: (WebCore::PageGroup::isLinkVisited): * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): (WebCore::createBusFromInMemoryAudioFile): * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::types): (WebCore::ChromiumDataObject::getData): (WebCore::ChromiumDataObject::getSequenceNumber): (WebCore::ChromiumDataObject::containsFilenames): * platform/chromium/DataTransferItemChromium.cpp: (WebCore::DataTransferItemChromium::getAsString): (WebCore::DataTransferItemChromium::getAsFile): * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::asURL): * platform/chromium/FileSystemChromium.cpp: (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::revealFolderInOS): (WebCore::directoryName): (WebCore::pathByAppendingComponent): (WebCore::makeAllDirectories): (WebCore::fileExists): (WebCore::openFile): (WebCore::closeFile): (WebCore::seekFile): (WebCore::truncateFile): (WebCore::readFromFile): (WebCore::writeToFile): * platform/chromium/LanguageChromium.cpp: (WebCore::platformDefaultLanguage): * platform/chromium/LinkHashChromium.cpp: (WebCore::visitedLinkHash): * platform/chromium/MIMETypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writePlainText): (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::writeImage): (WebCore::Pasteboard::canSmartReplace): (WebCore::Pasteboard::plainText): (WebCore::Pasteboard::documentFragment): * platform/chromium/PlatformBridge.h: Removed. * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenDepth): (WebCore::screenDepthPerComponent): (WebCore::screenIsMonochrome): (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/chromium/PlatformSupport.h: Copied from Source/WebCore/platform/chromium/PlatformBridge.h. * platform/chromium/SSLKeyGeneratorChromium.cpp: (WebCore::signedPublicKeyAndChallengeString): * platform/chromium/ScrollbarThemeChromium.cpp: * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness): (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece): (WebCore::ScrollbarThemeChromiumLinux::paintButton): (WebCore::ScrollbarThemeChromiumLinux::paintThumb): (WebCore::ScrollbarThemeChromiumLinux::buttonSize): (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness): (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece): (WebCore::ScrollbarThemeChromiumWin::paintButton): (WebCore::ScrollbarThemeChromiumWin::paintThumb): (WebCore::ScrollbarThemeChromiumWin::buttonSize): * platform/chromium/SharedTimerChromium.cpp: (WebCore::setSharedTimerFiredFunction): (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): * platform/chromium/SuddenTerminationChromium.cpp: (WebCore::disableSuddenTermination): (WebCore::enableSuddenTermination): * platform/chromium/TraceEvent.h: (WebCore::internal::ScopeTracer::ScopeTracer): (WebCore::internal::ScopeTracer::~ScopeTracer): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/CrossProcessFontLoading.mm: * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::fontContainsCharacter): (WebCore::FillLogFont): * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::drawGlyphsWin): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::scriptFontProperties): * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::querySystemForRenderStyle): * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp: (WebCore::fillBMPGlyphs): * platform/graphics/chromium/ImageChromium.cpp: (WebCore::Image::loadPlatformResource): * platform/graphics/chromium/ImageChromiumMac.mm: (WebCore::Image::loadPlatformResource): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/graphics/chromium/UniscribeHelperTextRun.cpp: (WebCore::UniscribeHelperTextRun::tryToPreloadFont): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/network/chromium/CookieJarChromium.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): * platform/network/chromium/DNSChromium.cpp: (WebCore::prefetchDNS): * platform/qt/PlatformBridge.h: Removed. * platform/qt/PlatformBridgeQt.cpp: Removed. * platform/qt/PlatformSupport.h: Copied from Source/WebCore/platform/qt/PlatformBridge.h. * platform/qt/PlatformSupportQt.cpp: Copied from Source/WebCore/platform/qt/PlatformBridgeQt.cpp. (WebCore::PlatformSupport::popupsAllowed): (WebCore::PlatformSupport::pluginScriptableObject): * platform/sql/chromium/SQLiteFileSystemChromium.cpp: (WebCore::SQLiteFileSystem::deleteDatabaseFile): (WebCore::SQLiteFileSystem::getDatabaseFileSize): * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: * plugins/chromium/PluginDataChromium.cpp: (WebCore::PluginCache::plugins): * rendering/RenderThemeChromiumLinux.cpp: (WebCore::getWebThemeState): (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize): (WebCore::RenderThemeChromiumLinux::paintCheckbox): (WebCore::RenderThemeChromiumLinux::setCheckboxSize): (WebCore::RenderThemeChromiumLinux::paintRadio): (WebCore::RenderThemeChromiumLinux::setRadioSize): (WebCore::RenderThemeChromiumLinux::paintButton): (WebCore::RenderThemeChromiumLinux::paintTextField): (WebCore::RenderThemeChromiumLinux::paintMenuList): (WebCore::RenderThemeChromiumLinux::paintSliderTrack): (WebCore::RenderThemeChromiumLinux::paintSliderThumb): (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle): (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton): (WebCore::RenderThemeChromiumLinux::paintProgressBar): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::caretBlinkInterval): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor): (WebCore::RenderThemeChromiumWin::systemColor): (WebCore::RenderThemeChromiumWin::paintButton): (WebCore::RenderThemeChromiumWin::paintSliderTrack): (WebCore::menuListButtonWidth): (WebCore::RenderThemeChromiumWin::paintMenuList): (WebCore::RenderThemeChromiumWin::paintTextFieldInternal): (WebCore::RenderThemeChromiumWin::paintInnerSpinButton): (WebCore::RenderThemeChromiumWin::paintProgressBar): * storage/chromium/IDBFactoryBackendInterface.cpp: (WebCore::IDBFactoryBackendInterface::create): * storage/chromium/IDBKeyPathBackendImpl.cpp: (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath): (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue): * storage/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin): 2011-08-31 Ryosuke Niwa <rniwa@webkit.org> Crash when inserting text with a trailing newline into a textarea via JS https://bugs.webkit.org/show_bug.cgi?id=66241 Reviewed by Darin Adler and Kent Tamura. The crash was caused by updateFromElement biting on the editing code. When there is a style rule that applies on text nodes inside the shadow DOM, DOM modifications made by the editing code may trigger style recalculation on input or textarea elements in the midst of editing commands. In response to this style recalculation, HTMLInputElement::updateFromElement and HTMLTextAreaElement::updateFromElement call setInnerTextValue to re-create the text nodes in the shadow DOM. The editing code blows up because setInnerTextValue detaches old text nodes referenced by Positions and VisiblePositions held by the editing commands in progress. Fixed the crash by stop calling setInnerTextValue in updateFromElement. Instead, WebKit now creates the text nodes when attributes, descendent nodes, etc... of input or textarea element changes. Tests: fast/forms/update-from-element-during-editing-crash-1.html fast/forms/update-from-element-during-editing-crash-2.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): Force calling setInnerTextValue when input type changes. (WebCore::HTMLInputElement::updateInnerTextValue): Extracted from RenderTextControlSingleLine's updateElement. (WebCore::HTMLInputElement::parseMappedAttribute): Calls updateInnerTextValue; force calling setInnerTextValue when -webkit-speech attribute changes. In the theory, we should be able to call it less frequently but there are too many cases to consider at the moment. (WebCore::HTMLInputElement::setValue): Calls updateInnerTextValue when the value actually changed. Note we need to call it before we set or restore selection. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): Calls updateInnerTextValue when textarea's descendants nodes are changed by parser or scripts. (WebCore::HTMLTextAreaElement::setValueCommon): Calls updateInnerTextValue when the value changes. * html/HTMLTextFormControlElement.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::willBlur): Calls updateInnerTextValue because input[type=number] forces the value to be valid on blur. * rendering/RenderTextControlMultiLine.cpp: Removed RenderTextControlMultiLine::updateFromElement. * rendering/RenderTextControlMultiLine.h: Ditto. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): 2011-08-31 Tom Zakrajsek <tomz@codeaurora.org> Fix snow-leopard regression caused by r93982 https://bugs.webkit.org/show_bug.cgi?id=67301 Reviewed by Kenneth Russell. Test: canvas/philip/tests/2d.path.stroke.prune.arc.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arc): 2011-08-31 Keishi Hattori <keishi@webkit.org> Rename closeColorChooser to cleanupColorChooser https://bugs.webkit.org/show_bug.cgi?id=67270 Reviewed by Kent Tamura. * html/ColorInputType.cpp: (WebCore::ColorInputType::~ColorInputType): (WebCore::ColorInputType::detach): (WebCore::ColorInputType::cleanupColorChooserIfCurrentClient): NSColorPanel shouldn't be closed but the color chooser listeners need to be taken care of. Therefore closeColorChooser will be renamed to cleanupColorChooser. This will close the color chooser on platforms where appropriate. * html/ColorInputType.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::cleanupColorChooser): Rename. * page/Chrome.cpp: (WebCore::Chrome::cleanupColorChooser): Rename. * page/Chrome.h: * page/ChromeClient.h: 2011-08-31 Kent Tamura <tkent@chromium.org> REGRESSION(r88115): "Choose File" button doesn't respect font-size property for the <input> https://bugs.webkit.org/show_bug.cgi?id=67181 Reviewed by Dimitri Glazkov. r88115 removed the code to make inherited style of the owner input element, and html.css contains "font: -webkit-small-control" for input element. So -webkit-file-upload-button always had -webkit-small-control font. Test: fast/forms/file/file-style-inheritance.html * css/html.css: (input[type="file"]::-webkit-file-upload-button): Specify font-size:inherit explicitly. 2011-08-31 Chris Rogers <crogers@google.com> Do more rigorous bounds checking in AudioBufferSourceNode::renderFromBuffer() https://bugs.webkit.org/show_bug.cgi?id=67351 Reviewed by Dirk Pranke. No new tests since this does not change JavaScript API. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderFromBuffer): 2011-08-31 Keishi Hattori <keishi@webkit.org> Remove closeColorChooser call from FrameLoader::transitionToCommitted https://bugs.webkit.org/show_bug.cgi?id=67267 Reviewed by Darin Adler. * html/ColorInputType.cpp: (WebCore::ColorInputType::closeColorChooserIfCurrentClient): Moved order to match header. * html/ColorInputType.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): Remove ColorInputType::closeColorChooserIfCurrentClient call. It wasn't the right place to directly manipulate the UI. 2011-08-31 Chris Rogers <crogers@google.com> Add defensive bounds checking for AudioNode methods https://bugs.webkit.org/show_bug.cgi?id=67346 Reviewed by Anders Carlsson. No new tests since this does not change JavaScript API. * webaudio/AudioNode.cpp: (WebCore::AudioNode::input): (WebCore::AudioNode::output): 2011-08-31 Simon Fraser <simon.fraser@apple.com> TransformState.move() should be negated in the unapply code path https://bugs.webkit.org/show_bug.cgi?id=66246 Reviewed by Chris Marrin. Code using TransformState was confused about when to negate the arguments to move() in the "UnapplyInverseTransform" direction (used by mapAbsoluteToLocal). Made the move() path equivalent to the applyTransform() path by not requiring the caller to negate, and instead negating inside move(). Fixed the erroneous negation in TransformState::move() when accumulating; that negation will happen later via matrix inversion. No behavior change. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::move): * rendering/RenderBox.cpp: (WebCore::RenderBox::mapAbsoluteToLocalPoint): * rendering/RenderInline.cpp: (WebCore::RenderInline::mapAbsoluteToLocalPoint): 2011-08-31 Pratik Solanki <psolanki@apple.com> Fix compile issues when enabling HAVE(CFNETWORK_DATA_ARRAY_CALLBACK) https://bugs.webkit.org/show_bug.cgi?id=67332 Reviewed by Darin Adler. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray): * platform/network/cf/ResourceHandleCFNet.cpp: 2011-08-31 Dan Bernstein <mitz@apple.com> Refined the heuristic introduced to fix <rdar://problem/10002140> Text gets clipped in multi-column layouts when overflow:auto is used. https://bugs.webkit.org/show_bug.cgi?id=67212 Reviewed by Dave Hyatt. Test: fast/multicol/overflow-across-columns-percent-height.html * rendering/RenderBox.cpp: (WebCore::percentageLogicalHeightIsResolvable): Added. This follows logic similar to the one in computePercentageLogicalHeight() to determine whether percentage values for height properties are resolved or treated as "auto". (WebCore::RenderBox::hasUnsplittableScrollingOverflow): If min-height or max-height are specified as a percentage but actually resolve to "auto", don’t let that prevent splitting. 2011-08-31 Ryosuke Niwa <rniwa@webkit.org> Move text() and textWithHardLineBreaks() from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=67320 Reviewed by Darin Adler. Moved and renamed RenderText::text and RenderText::textWithHardLineBreaks to HTMLTextFormControlElement::innerTextValue and HTMLTextFormControlElement::valueWithHardLineBreaks. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::text): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::appendFormData): Calls valueWithHardLineBreaks. It doesn't have to check the existence of renderer anymore because valueWithHardLineBreaks returns value() when renderer do not exist unlike RenderText::textWithHardLineBreaks returned emptyString() in such cases. This is the only place valueWithHardLineBreaks is ever called; but we can't move valueWithHardLineBreaks because it calls finishText. (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): (WebCore::HTMLTextAreaElement::updateValue): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::selectedText): (WebCore::HTMLTextFormControlElement::setInnerTextValue): (WebCore::finishText): Moved from RenderText.cpp (WebCore::HTMLTextFormControlElement::innerTextValue): Ditto. (WebCore::getNextSoftBreak): Ditto. (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks): Ditto; this function returns value() when there are no renderers or root inline boxes instead of emptyString(). * html/HTMLTextFormControlElement.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::hasUnacceptableValue): * html/SearchInputType.cpp: (WebCore::SearchInputType::startSearchEventTimer): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: 2011-08-31 Jeff Miller <jeffm@apple.com> REGRESSION(92210): AVFoundation media engine is disabled on OS X https://bugs.webkit.org/show_bug.cgi?id=67316 Move the definition of WTF_USE_AVFOUNDATION on the Mac back to JavaScriptCore/wtf/Platform.h, since WebKit2 doesn't have access to WebCore/config.h on this platform. This reverts the changes that were made in r92210. Reviewed by Darin Adler. No new tests, covered by existing media tests. * config.h: Removed definition of WTF_USE_AVFOUNDATION on the Mac, add a comment about fixing this on Windows in the future. 2011-08-31 Sailesh Agrawal <sail@chromium.org> [Chromium] Switching between overlay and opaque scrollbars causes glitches https://bugs.webkit.org/show_bug.cgi?id=62686 Reviewed by Beth Dakin. When switching from opaque scrollbars to overlay scrollbars the page content size wouldn't change leaving a empty region under the overlay scrollbar. The problem was that we were relying on ScrollView::updateScrollbars() to kick off a layout. Unfortunately this doesn't happen because updateScrollbars doesn't distinguish between overlay and opaque scrollbars. To fix this I'm explicitly invalidating the layout when ScrollView::scrollbarStyleChanged() is called. No tests because there are no Mac 10.7 chromium bots yet. Bug 66504 will track the work to add these tests once the bots are in place. * platform/ScrollView.cpp: (WebCore::ScrollView::scrollbarStyleChanged): 2011-08-31 Alexey Proskuryakov <ap@apple.com> http/tests/eventsource/workers/eventsource-simple.html is a flaky crash because of eventsource-status-error-iframe-crash.html https://bugs.webkit.org/show_bug.cgi?id=61523 Reviewed by Nate Chapin. The problem here was that canceling EventSource during frame removal erroneously resulted in event dispatch, and event handler re-entered frame destruction code. * page/EventSource.h: Renamed endRequest() to networkRequestEnded(), because this method doesn't end request. It implements "reestablish the connection" or "fail the connection" algotithms from the spec, depending on current state. Removed m_failSilently, since we can make this decision with existing data, and want to fail silently by default (e.g. when detaching a frame cancels all loads). * page/EventSource.cpp: (WebCore::EventSource::EventSource): Don't initialize m_failSilently. (WebCore::EventSource::~EventSource): Assert taht we are in a correct state. (WebCore::EventSource::connect): Ditto. (WebCore::EventSource::networkRequestEnded): Moved errorevent dispatch elsewhere. (WebCore::EventSource::scheduleReconnect): Error event should always be queued when reconnecting; firing it synchronously after starting m_reconnectTimer implements that. (WebCore::EventSource::reconnectTimerFired): Assert that state is correct (the timer is stopped if EventSource is stopped while waiting on the timer). (WebCore::EventSource::close): Don't set m_state before calling cancel() - it will indirectly call didFail(), which asserts that EventSource is not stopped yet. (WebCore::EventSource::didReceiveResponse): Explicitly dispatch an error event, since it is no longer dispatched when canceling, and canceling is the only way to stop a ThreadableLoader. Removed a special case for 2xx responses, since it's no longer in the spec. (WebCore::EventSource::didReceiveData): Assert that state is correct. (WebCore::EventSource::didFinishLoading): Don't set state to CONNECTING after parsing remaining response bytes - that may well result in dispatching an event whose handler calls close(). (WebCore::EventSource::didFail): It's simple now - we always reconnect unless the request got canceled. (WebCore::EventSource::didFailRedirectCheck): Dispatch error event explicitly, as we are not going to attempt reconnecting. 2011-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94116. http://trac.webkit.org/changeset/94116 https://bugs.webkit.org/show_bug.cgi?id=67323 caused a lot of tests failures (Requested by thorton on #webkit). * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): 2011-08-31 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Tweak rubber banding overhang shadows. Add a drop shadow from the browser's toolbar. https://bugs.webkit.org/show_bug.cgi?id=67289 Chromium bug: http://crbug.com/93228 Reviewed by Dimitri Glazkov. No new tests, since this merely tweaks Chromium overhang area appearance. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paintGivenTickmarks): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-31 Tony Chang <tony@chromium.org> Remove webcore_bindings (including DerivedSources##.cpp) from the critical path https://bugs.webkit.org/show_bug.cgi?id=67168 Reviewed by Adam Barth. webcore_bindings_sources, debugger_script_source, injected_script_source, and inspector_protocol_sources generates various files (e.g., CSSPropertyNames, DerivedSources, HTMLNames, etc). webcore_bindings depends on *_sources and compiles these files. Previously, the other webcore libs (webcore_svg, webcore_html, webcore_remaining, etc) depended on webcore_bindings. This moves the *_sources dependencies from webcore_bindings to the other webcore libs so the build can parallelize the compile of webcore_bindings and the other webcore_* libs. Also copy over the include dirs that we used to get from webcore_bindings' direct_dependent_settings. No new tests, just changing the build dependencies. * WebCore.gyp/WebCore.gyp: 2011-08-31 Tony Gentilcore <tonyg@chromium.org> Minor cleanup: remove inScriptExecution() https://bugs.webkit.org/show_bug.cgi?id=67276 Reviewed by Adam Barth. At one point inScriptExecution() existed as a non-virtual duplicate of isExecutingScript() to avoid virtual method calls from a tight loop. Now we aren't calling it anywhere perf sensitive, so remove the duplication. No new tests because no change in functionality. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::isExecutingScript): (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): (WebCore::HTMLDocumentParser::notifyFinished): * html/parser/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::shouldDelayEnd): 2011-08-31 Tom Sepez <tsepez@chromium.org> Fix XSS filter bypass by multiply decoding both the URL and the body snippet until they are in the most minimal form before comparison. https://bugs.webkit.org/show_bug.cgi?id=66585 Reviewed by Adam Barth. * html/parser/XSSAuditor.cpp: (WebCore::fullyDecodeString): (WebCore::XSSAuditor::init): (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::isContainedInRequest): 2011-08-31 Simon Fraser <simon.fraser@apple.com> Crash with -webkit-radial-gradient(top) gradient https://bugs.webkit.org/show_bug.cgi?id=66686 Reviewed by Darin Adler. Null-check the current value after calling parseFillPosition(), since it may be null for gradients with degenerate arguments. Test: fast/gradients/css3-radial-gradient-crash.html * css/CSSParser.cpp: (WebCore::CSSParser::parseRadialGradient): 2011-08-31 Nico Weber <thakis@chromium.org> Make ScrollAnimator(Chromium)?Mac check scrollAnimatorEnabled() https://bugs.webkit.org/show_bug.cgi?id=67297 Reviewed by Tony Chang. I need this to disable smooth scrolling in chromium tests. I'm making the change to ScrollAnimatorMac to make unforking the file easier. I changed scrollAnimatorEnabled() to default to true so that this change is a no-op for Safari; in chromium the flag is set explicitly to true or false anyway. * page/Settings.cpp: (WebCore::Settings::Settings): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::scroll): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::scroll): 2011-08-31 Nate Chapin <japhet@chromium.org> Don't load resources with empty urls, since this will resolve to the current document. https://bugs.webkit.org/show_bug.cgi?id=30303 Reviewed by Darin Adler. Test: http/tests/loading/empty-urls.html * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): If src="", fail through to the error event case. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): Ensure the url stays empty if we try to resolve an empty href. * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Throw an error instead of loading if the src is empty in all cases, not just local files. 2011-08-28 Robert Hogan <robert@webkit.org> CSS 2.1 failure: margin-applies-to-015 fails, WebKit does not respect top margin for table captions https://bugs.webkit.org/show_bug.cgi?id=34763 Reviewed by Simon Fraser. * rendering/RenderTable.cpp: (WebCore::RenderTable::adjustLogicalHeightForCaption): Added the caption's margin to the position calculation. 2011-08-30 Oliver Hunt <oliver@apple.com> Add support for checked arithmetic https://bugs.webkit.org/show_bug.cgi?id=67095 Reviewed by Sam Weinig. Add a forwarding header for CheckedArithmetic.h * ForwardingHeaders/wtf/CheckedArithmetic.h: Added. 2011-08-31 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67300 Add the new border-image-source property (and its corresponding analogue for masks, mask-box-image-source). Change the border-image parsing code to no longer consider "none" to represent the entire border-image expression, but instead to just mean "none" for the image component of the expression. Change the pending image code for border-image and mask-box-image to use the new *-source properties when loading the image so that they're considered the same. This is the first step towards eliminating the border-image parsing code in favor of just parsing it as a shorthand instead, but for now I'm implementing each property one by one, and once they're all there, we can cut over to border-image as a true shorthand. Reviewed by Beth Dakin. Added fast/borders/border-image-source.html. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseBorderImage): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::loadPendingImages): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::setImage): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::borderImageSource): (WebCore::InheritedFlags::maskBoxImageSource): (WebCore::InheritedFlags::setBorderImageSource): (WebCore::InheritedFlags::setMaskBoxImageSource): (WebCore::InheritedFlags::initialBorderImageSource): (WebCore::InheritedFlags::initialMaskBoxImageSource): 2011-08-31 Stephen White <senorblanco@chromium.org> [chromium] Set the GrContext before SkGpuDevice is destroyed. https://bugs.webkit.org/show_bug.cgi?id=67296 When SkGpuDevice is destroyed, it frees the FBO used for accelerated rendering. If the wrong context is set (e.g., compositor context), a crash may result. Reviewed by Kenneth Russell. No new tests. (Unfortunately, wrong-context bugs are difficult to express in a layout test). * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-08-31 Eric Carlson <eric.carlson@apple.com> Clean up HTMLMediaElement behavior restrictions https://bugs.webkit.org/show_bug.cgi?id=67231 Reviewed by Darin Adler. No new tests, cleanup only. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with enum and function renaming. (WebCore::HTMLMediaElement::load): Call userGestureRequiredForLoad() instead of testing bits directly. (WebCore::HTMLMediaElement::loadInternal): Deal with enum and function renaming. (WebCore::HTMLMediaElement::play): Call userGestureRequiredForRateChange() instead of testing bits directly. (WebCore::HTMLMediaElement::pause): Ditto. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::userGestureRequiredForLoad): Renamed. (WebCore::HTMLMediaElement::userGestureRequiredForRateChange): (WebCore::HTMLMediaElement::userGestureRequiredForFullscreen): (WebCore::HTMLMediaElement::pageConsentRequiredForLoad): (WebCore::HTMLMediaElement::addBehaviorRestriction): (WebCore::HTMLMediaElement::removeBehaviorRestriction): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::webkitEnterFullscreen): requireUserGestureForFullScreen renamed to userGestureRequiredForFullscreen. 2011-08-31 Andrei Popescu <andreip@google.com> Investigate current uses of OS(ANDROID) https://bugs.webkit.org/show_bug.cgi?id=66761 Reviewed by Darin Adler. Remove the last legacy Android code. No new tests needed as the code wasn't tested in the first place. * bridge/jni/JNIUtility.cpp: (JSC::Bindings::getJNIEnv): 2011-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94082. http://trac.webkit.org/changeset/94082 https://bugs.webkit.org/show_bug.cgi?id=67291 Breaks trunk (not canary) Chromium Mac builders upon WebKit roll (Requested by apavlov on #webkit). * WebCore.gyp/WebCore.gyp: 2011-08-31 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Add a convenience function to cast a QTransform to TransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=67246 Reviewed by Andreas Kling. No new functionality so no new tests. * platform/graphics/qt/TransformationMatrixQt.cpp: (WebCore::TransformationMatrix::TransformationMatrix): * platform/graphics/transforms/TransformationMatrix.h: 2011-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94176. http://trac.webkit.org/changeset/94176 https://bugs.webkit.org/show_bug.cgi?id=67290 This does not fix the build failure on Macs (Requested by apavlov on #webkit). * WebCore.gyp/WebCore.gyp: 2011-08-31 Mike Reed <reed@google.com> [skia] antialias images if we're rotated https://bugs.webkit.org/show_bug.cgi?id=67207 Reviewed by Stephen White. * platform/graphics/skia/ImageSkia.cpp: (WebCore::hasNon90rotation): (WebCore::paintSkBitmap): 2011-08-31 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Having the "Metrics" pane open affects the node highlight display https://bugs.webkit.org/show_bug.cgi?id=67278 Reviewed by Yury Semikhatsky. * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._updateMetrics): 2011-08-31 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: console view does a style recalculation per each addMessage call. https://bugs.webkit.org/show_bug.cgi?id=67198 It is bad from the performance point of view. Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._isScrollIntoViewScheduled): (WebInspector.ConsoleView.prototype._appendConsoleMessage): 2011-08-31 Alexander Pavlov <apavlov@chromium.org> [Chromium] Unreviewed build fix. Restore debugger_script_source target dependency broken in http://trac.webkit.org/changeset/94082. * WebCore.gyp/WebCore.gyp: 2011-08-30 Alexander Pavlov <apavlov@chromium.org> Early return in CSSPrimitiveValue::getDoubleValueInternal() omits additional invalid enums https://bugs.webkit.org/show_bug.cgi?id=67139 Reviewed by Darin Adler. * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): Check if a given unit type can be converted to a double. (WebCore::CSSPrimitiveValue::getDoubleValueInternal): Make use of the new method that explicitly lists all unit types. 2011-08-30 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename sourceFile to uiSourceCode and get rid of sourceFileId where possible. https://bugs.webkit.org/show_bug.cgi?id=67136 Reviewed by Yury Semikhatsky. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI): (WebInspector.BreakpointManager.prototype.set reset): (WebInspector.BreakpointManager.prototype.debuggerReset): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.removeBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu): * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine): (WebInspector.CallStackSidebarPane.prototype.update): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled): (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): (WebInspector.PresentationBreakpoint): (WebInspector.PresentationBreakpoint.prototype.get url): (WebInspector.PresentationBreakpoint.prototype.loadSnippet): (WebInspector.PresenationCallFrame): (WebInspector.PresenationCallFrame.prototype.get url): (WebInspector.PresenationCallFrame.prototype.select): (WebInspector.PresenationCallFrame.prototype.sourceLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._consoleMessagesCleared): (WebInspector.ScriptsPanel.prototype._consoleMessageAdded): (WebInspector.ScriptsPanel.prototype._breakpointAdded): (WebInspector.ScriptsPanel.prototype._breakpointRemoved): (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype._resetFilesSelect): (WebInspector.ScriptsPanel.prototype.showAnchorLocation): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._showSourceFrameAndAddToHistory): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._callFrameSelected): (WebInspector.ScriptsPanel.prototype._filesSelectChanged): (WebInspector.ScriptsPanel.prototype._toggleFormatSource): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): 2011-08-31 Yuta Kitamura <yutak@chromium.org> WebSocket: Load Blob in WebSocketChannel https://bugs.webkit.org/show_bug.cgi?id=67013 Reviewed by Kent Tamura. Add WebSocketChannel::enqueueBlobFrame(). It makes WebSocketChannel start loading a Blob and send a WebSocket frame after the Blob is loaded. While a Blob is being loaded, subsequent send() requests cannot be processed and are blocked. Pending requests are stored in m_outgoingFrameQueue. When we have finished loading a Blob, requests in the queue are allowed to get processed. No new tests are added, because nobody uses enqueueBlobFrame() yet. New tests will be added when WebSocket.send(Blob) is implemented, and they will cover this code change. * websockets/WebSocketChannel.cpp: ref() is called when m_blobLoader is allocated, and deref() is called in didFinishLoading() or didFail(). This is necessary because WebSocketChannel must be able to receive callbacks from FileReaderLoader even if the channel is referred from no other objects. (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::didStartLoading): (WebCore::WebSocketChannel::didReceiveData): (WebCore::WebSocketChannel::didFinishLoading): (WebCore::WebSocketChannel::didFail): When we have failed to load a Blob, fail() is called, and eventually didCloseSocketStream() will be called. It will clean up the pending requests in the queue. (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::abortOutgoingFrameQueue): Cancel the Blob loader when the outgoing request queue is about to be aborted. The loader will not invoke didFail() callback once it is canceled, thus we need to call didFail() manually so that we can free up the loader and decrement the reference count. 2011-08-31 Yuta Kitamura <yutak@chromium.org> WebSocket: Receive binary message as ArrayBuffer https://bugs.webkit.org/show_bug.cgi?id=67180 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/receive-arraybuffer.html http/tests/websocket/tests/hybi/workers/receive-arraybuffer.html * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Convert ArrayBuffer to JSValue. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): Convert ArrayBuffer to v8::Value. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): * dom/MessageEvent.h: Added DataTypeArrayBuffer and ArrayBuffer-related functions. (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataAsArrayBuffer): * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData): Construct an ArrayBuffer from binaryData and raise MessageEvent. 2011-08-31 Keishi Hattori <keishi@webkit.org> input color: onchange event is not fired when changing color from color chooser https://bugs.webkit.org/show_bug.cgi?id=66848 Reviewed by Kent Tamura. Test: fast/forms/color/input-color-onchange-event.html * WebCore.exp.in: Added calls used in Internals.cpp. * html/ColorInputType.cpp: (WebCore::ColorInputType::colorSelected): Dispatch change event. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::connectToColorChooser): Added. Called from Internals::connectColorChooserClient. * html/HTMLInputElement.h: * testing/Internals.cpp: (WebCore::Internals::connectColorChooserClient): Added. Connects element as client to color chooser. (WebCore::Internals::selectColorInColorChooser): Added. Simulate color selection in color chooser. * testing/Internals.h: * testing/Internals.idl: 2011-08-31 Kentaro Hara <haraken@google.com> Implement Web IDL Constructor extended attribute in IDLParser.pm and CodeGeneratorV8.pm. https://bugs.webkit.org/show_bug.cgi?id=66536 Reviewed by Adam Barth. The spec is here: http://www.w3.org/TR/WebIDL/#Constructor [1] Introduced Web IDL 'Constructor' extended attribute. [2] Added 'ConstructorWith=ScriptExecutionContext' extended attribute. - The constructor passes ScriptExecutionContext to a XXX::create() method, like XXX::create(..., context, ...). [3] Added 'V8ConstructorSetsActiveDOMWrapper' extended attribute. - The constructor calls V8DOMWrapper::setJSWrapperForActiveDOMObject() instead of V8DOMWrapper::setJSWrapperForDOMObject(). [4] Added 'ConstructorRaisesException' extended attribute. - A placeholder for ExceptionCode is passed to a XXX::create() method, like XXX::create(..., ec). - We can use 'ConstructorRaisesException' and 'ConstructorWith=ScriptExecutionContext' together. Note: - Constructor overloading is not yet implemented. - We cannot yet specify [Optional] without CallWithDefaultValue. Test: Source/WebCore/bindings/scripts/test/TestInterface.idl Source/WebCore/bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): Generates constructorCallback() header, if 'Constructor' is specified. (GenerateFunctionCallback): Uses GenerateArgumentsCountCheck() and GenerateParametersCheck(). (GenerateArgumentsCountCheck): Splits out of GenerateFunctionCallback() for reuse. (GenerateParametersCheck): Ditto. (GenerateConstructorCallback): Generates constructorCallback() definition. (GenerateImplementation): * bindings/scripts/IDLParser.pm: (parseExtendedAttributes): Previously, only a string in the "A=B, C, D, E=F" format can be parsed. This patch enables to parse a string in the "A=B, C, D, E=F, G(in DOMString s, in [H, I, J] DOMString t)" format. (parseParameters): Splits out of ParseInterface() for reuse. (ParseInterface): Uses parseParameters(). * bindings/scripts/IDLStructure.pm: Added domClass{constructor}. Changed the regular expression to extract the list of extended attributes. * bindings/scripts/test/TestInterface.idl: Added all the extended attributes that this patch is going to introduce. * bindings/scripts/test/TestObj.idl: Added 'Constructor'. * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the test result. (WebCore::V8TestInterface::constructorCallback): (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestObj.h: Ditto. 2011-08-30 Philippe Normand <pnormand@igalia.com> [GTK] gstreamer/ files directly related to the MediaPlayer need VIDEO guards https://bugs.webkit.org/show_bug.cgi?id=67196 Reviewed by Martin Robinson. Guard those files with ENABLE(VIDEO) so other features using GStreamer can be built even with VIDEO disabled. * platform/graphics/gstreamer/GStreamerGWorld.cpp: * platform/graphics/gstreamer/GStreamerGWorld.h: * platform/graphics/gstreamer/ImageGStreamer.h: * platform/graphics/gstreamer/ImageGStreamerCG.mm: * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: * platform/graphics/gstreamer/ImageGStreamerQt.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/PlatformVideoWindow.h: * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: * platform/graphics/gstreamer/VideoSinkGStreamer.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: 2011-08-30 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94142, r94144, r94145, and r94148. http://trac.webkit.org/changeset/94142 http://trac.webkit.org/changeset/94144 http://trac.webkit.org/changeset/94145 http://trac.webkit.org/changeset/94148 https://bugs.webkit.org/show_bug.cgi?id=67262 Broke isindex element (Requested by rniwa on #webkit). * WebCore.order: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isPasswordField): (WebCore::AccessibilityRenderObject::isIndeterminate): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): (WebCore::AccessibilityRenderObject::isChecked): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::applyProperty): * dom/CheckedRadioButtons.cpp: (WebCore::CheckedRadioButtons::addButton): (WebCore::CheckedRadioButtons::removeButton): * dom/Node.cpp: (WebCore::Node::toInputElement): * dom/Node.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::isInPasswordField): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::toInputElement): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): (WebCore::RenderSliderThumb::layout): (WebCore::RenderSliderContainer::layout): (WebCore::SliderThumbElement::hostInput): (WebCore::trackLimiterElementOf): * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::repeatingTimerFired): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): * page/DragController.cpp: (WebCore::asFileInput): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): (WebCore::RenderTheme::isIndeterminate): 2011-08-30 David Levin <levin@chromium.org> Quick fix for crashing tests caused by r94142. Tests: editing/execCommand/remove-format-elements.html fast/block/child-not-removed-from-parent-lineboxes-crash.html fast/forms/implicit-submission.html * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Allow for isIndex element which is derived from HTMLInputElement. 2011-08-30 Sam Weinig <sam@webkit.org> Add constructor for CustomEvent https://bugs.webkit.org/show_bug.cgi?id=67248 Reviewed by Dan Bernstein. Test: fast/events/constructors/custom-event-constructor.html * bindings/generic/EventConstructors.h: Add definition for CustomEvent constructor. * bindings/js/JSEventConstructors.cpp: Add CustomEvent #includes. * dom/CustomEvent.cpp: (WebCore::CustomEventInit::CustomEventInit): (WebCore::CustomEvent::CustomEvent): * dom/CustomEvent.h: (WebCore::CustomEvent::create): Add Initializer./ * dom/CustomEvent.idl: Make constructible. * page/DOMWindow.idl: Add CustomEvent attribute. 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> Get rid of toInputElement() https://bugs.webkit.org/show_bug.cgi?id=67175 Reviewed by Darin Adler. Got rid of Node::toInputElement and HTMLInputElement::toInputElement and replaced them by a global toHTMLInputElement. * WebCore.order: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isPasswordField): (WebCore::AccessibilityRenderObject::isIndeterminate): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): (WebCore::AccessibilityRenderObject::isChecked): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::applyProperty): * dom/CheckedRadioButtons.cpp: (WebCore::CheckedRadioButtons::addButton): (WebCore::CheckedRadioButtons::removeButton): * dom/Node.cpp: * dom/Node.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::isInPasswordField): * html/HTMLInputElement.h: (WebCore::toHTMLInputElement): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): (WebCore::RenderSliderThumb::layout): (WebCore::RenderSliderContainer::layout): (WebCore::SliderThumbElement::hostInput): (WebCore::trackLimiterElementOf): * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::repeatingTimerFired): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): * page/DragController.cpp: (WebCore::asFileInput): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): (WebCore::RenderTheme::isIndeterminate): 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> Speculative WinCairo build fix after r94093. * platform/network/ResourceHandle.h: 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r94128. * WebCore.xcodeproj/project.pbxproj: 2011-08-30 Alice Boxhall <aboxhall@chromium.org> Correctly report selected text range for accessibility APIs for role=textbox https://bugs.webkit.org/show_bug.cgi?id=65900 Reviewed by Chris Fleizach. Test: accessibility/textbox-role-reports-selection.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): (WebCore::AccessibilityRenderObject::rootEditableElementForPosition): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): * accessibility/AccessibilityRenderObject.h: 2011-08-30 Rachel Blum <groby@chromium.org> The "port" property of an <a> whose href does not specify a port returns the wrong value https://bugs.webkit.org/show_bug.cgi?id=66081 HTMLAnchorElement now returns "" instead of "0" for unset port Fixed KURLGoogle.cpp to have same behavior as KURL.cpp when setting port 0 Fixed Location.cpp to have same behavior as KURL.cpp when setting port 0 Reviewed by Adam Barth. Tests: fast/dom/HTMLAnchorElement/get-href-attribute-port.html fast/dom/HTMLAnchorElement/set-href-attribute-port.html fast/loader/location-port.html fast/url/segments-from-data-url.html fast/url/segments.html fast/url/trivial-segments.html platform/chromium/fast/dom/HTMLAnchorElement/set-href-attribute-port.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::port): * page/Location.cpp: (WebCore::Location::host): (WebCore::Location::port): (WebCore::Location::setPort): * platform/KURLGoogle.cpp: (WebCore::KURL::setPort): 2011-08-30 Scott Byer <scottbyer@chromium.org> Fix pan scrolling on Windows to be clamped https://bugs.webkit.org/show_bug.cgi?id=66910 With the recent change to support rubberband scrolling on the Mac, pan scrolling of overflow divs became unclamped and would scroll infinitely and along an axis without a scrollbar. Reviewed by Simon Fraser Test: platform/win/fast/events/panScroll-correct-direction.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::panScrollFromPoint): (WebCore::RenderLayer::scrollByRecursively): * rendering/RenderLayer.h: 2011-08-30 Bill Budge <bbudge@chromium.org> This patch makes the XMLHttpRequest method/header validation logic available as static methods so URL loaders can perform the same checks for untrusted HTTP requests coming from plugins. https://bugs.webkit.org/show_bug.cgi?id=66909 Reviewed by David Levin. No new tests. Exposes no new functionality. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * platform/network/HTTPValidation.cpp: Added. (WebCore::isValidHTTPToken): (WebCore::isValidHTTPHeaderValue): * platform/network/HTTPValidation.h: Added. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::isAllowedHTTPMethod): (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): (WebCore::XMLHttpRequest::isAllowedHTTPHeader): (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::setRequestHeader): * xml/XMLHttpRequest.h: 2011-08-30 Chris Rogers <crogers@google.com> Don't allow nodes of one context to be connected to nodes of another context https://bugs.webkit.org/show_bug.cgi?id=67245 Reviewed by Dimitri Glazkov. Tests: updated webaudio/audionode.html * webaudio/AudioNode.cpp: (WebCore::AudioNode::connect): 2011-08-30 Dan Bernstein <mitz@apple.com> WebCore part of <rdar://problem/9281695> Add text search API for getting the DOM range of a text match https://bugs.webkit.org/show_bug.cgi?id=67230 Reviewed by Darin Adler. Test: TestWebKitAPI/Tests/mac/DOMRangeOfString. * WebCore.exp.in: Export Page::rangeOfString(). * dom/Range.h: Added a default ASSERT_NO_EXCEPTION to a few more member functions. * editing/Editor.cpp: (WebCore::Editor::findString): Moved most of the logic into rangeOfString(), which this function now calls, passing in the current selection as the reference range and setting the selection to the returned range. (WebCore::Editor::rangeOfString): Added. Contains the find logic from findString(). * editing/Editor.h: * page/Page.cpp: (WebCore::Page::rangeOfString): Added. This function is similar to findString(), but it takes an optional reference range and returns a Range, rather than using the current selection as the reference range and setting the selection to the next match. * page/Page.h: 2011-08-30 Sam Weinig <sam@webkit.org> Add additional convertValue overloads to JSDictionary https://bugs.webkit.org/show_bug.cgi?id=67244 Reviewed by Darin Adler. Add overloads for convertValue that will be needed for Event constructors. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): * bindings/js/JSDictionary.h: Add overloads. Remove #include of <runtime/Error.h> and just include <interpreter/CallFrame.h> * bindings/js/JSEventConstructors.cpp: Add now necessary #include of <runtime/Error.h>. 2011-08-30 Aaron Colwell <acolwell@chromium.org> Add MediaSource API to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=64731 Reviewed by Eric Carlson. Tests: http/tests/media/media-source/webm/video-media-source-errors.html http/tests/media/media-source/webm/video-media-source-play.html http/tests/media/media-source/webm/video-media-source-seek.html http/tests/media/media-source/webm/video-media-source-state-changes.html * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * dom/EventNames.h: * features.pri: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Added initializers for new member variables. (WebCore::HTMLMediaElement::prepareForLoad): Close the media source before starting a new load. (WebCore::HTMLMediaElement::loadResource): Fail loading if the media source url from another media element is used. (WebCore::HTMLMediaElement::mediaEngineError): Make sure the source is in the closed state before firing an emptied event. (WebCore::HTMLMediaElement::mediaPlayerSourceOpened): New method called by WebCore::MediaPlayer to signal when the source is open. (WebCore::HTMLMediaElement::mediaPlayerSourceURL): New method called by the WebCore::MediaPlayer to determine what the media source URL is for this HTMLMediaElement instance. (WebCore::HTMLMediaElement::seek): Disabled noSeekRequired optimization if a media source is open and resets the source state to SOURCE_OPEN if it was in the SOURCE_ENDED state when seek() was called. (WebCore::HTMLMediaElement::webkitSourceAppend): New method for passing media data from JavaScript to the WebCore::MediaPlayer. (WebCore::HTMLMediaElement::webkitSourceEndOfStream): New method that allows JavaScript to signal the end of the stream. (WebCore::HTMLMediaElement::webkitSourceState): New method allowing JavaScript to read the current source state. (WebCore::HTMLMediaElement::setSourceState): New method for updating the current source state. (WebCore::HTMLMediaElement::userCancelledLoad): Transitions an open source to the closed state before firing an emptied event. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::webkitMediaSourceURL): New method providing the media source URL to JavaScript for this HTMLMediaElement instance. * html/HTMLMediaElement.idl: Added new methods, attributes, and constants for the media source api. * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::sourceAppend): Stub implementation of new WebCore::MediaPlayerPrivateInterface::sourceAppend. (WebCore::NullMediaPlayerPrivate::sourceEndOfStream): Stub implementation of new WebCore::MediaPlayerPrivateInterface::sourceEndOfStream. (WebCore::MediaPlayer::sourceAppend): New method for receiving media data from WebCore::HTMLMediaElement. (WebCore::MediaPlayer::sourceEndOfStream): New method for receiving end of stream from WebCore::HTMLMediaElement. (WebCore::MediaPlayer::sourceOpened): New method called by the MediaPlayerPrivate object to notify the MediaPlayer when the source has opened. (WebCore::MediaPlayer::sourceURL): New method called by the MediaPlayerPrivate implementation to get the media source URL from the MediaPlayer. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerSourceOpened): Interface method used by the MediaPlayer to tell the HTMLMediaElement when the media source has been opened. (WebCore::MediaPlayerClient::mediaPlayerSourceURL): Interface method used by the MediaPlayer to get the media source URL from the HTMLMediaElement. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::sourceAppend): Interface method used by the MediaPlayer to pass media data to the MediaPlayerPrivate object. (WebCore::MediaPlayerPrivateInterface::sourceEndOfStream): Interface method used by the MediaPlayer to pass end of stream information to the MediaPlayerPrivate object. 2011-08-30 Sam Weinig <sam@webkit.org> Refactor JS dictionary code into helper class and covert geolocation code to use it https://bugs.webkit.org/show_bug.cgi?id=67213 Reviewed by Darin Adler. * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Add new files. * bindings/js/JSDictionary.cpp: Added. (WebCore::JSDictionary::convertValue): * bindings/js/JSDictionary.h: Added. (WebCore::JSDictionary::JSDictionary): (WebCore::JSDictionary::tryGetProperty): Encapsulate dictionary initialization code into JSDictionary class. * bindings/js/JSEventConstructors.cpp: (WebCore::constructJSEventWithInitializer): Use JSDictionary. * bindings/js/JSGeolocationCustom.cpp: (WebCore::setEnableHighAccuracy): (WebCore::setTimeout): (WebCore::setMaximumAge): (WebCore::createPositionOptions): Use JSDictionary. 2011-08-30 Scott Byer <scottbyer@chromium.org> Switch chromium to use ScrollAnimatorNone on Windows. https://bugs.webkit.org/show_bug.cgi?id=67000 Reviewed by Adam Barth. Testing covered by Chromium webkit_unit_tests ScrollAnimatorNoneTest.* * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2011-08-30 Tony Chang <tony@chromium.org> refactor and cleanup RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=67165 Reviewed by Ojan Vafai. No new tests, just refactoring code. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmHorizontal): Make childSizes a param so we can pass the results to layoutAndPlaceChildrenHorizontal. (WebCore::hasPackingSpace): Move closer to where it's used. (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal): Pull this code out into its own function because it's not part of running the free space allocation algorithm. * rendering/RenderFlexibleBox.h: 2011-08-30 Tim Horton <timothy_horton@apple.com> getBBox() on a SVGPathElement with curves incorrectly includes control points https://bugs.webkit.org/show_bug.cgi?id=53512 <rdar://problem/9861154> Reviewed by Dirk Schulze. The CoreGraphics implementation of Path::boundingRect() called CGPathGetBoundingBox, which includes the path's control points in its calculations. Snow Leopard added CGPathGetPathBoundingBox, which finds the bounding box of only points within the path, and does not include control points. On Snow Leopard and above, we now use the latter. Test: svg/custom/getBBox-path.svg * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): 2011-08-30 Tim Horton <timothy_horton@apple.com> SVG panning y-axis is flipped in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=65800 <rdar://problem/9908012> Reviewed by Darin Adler. We previously were not transforming the pointer coordinates passed to SVGDocument's panning implementation into the coordinate space of the contents, so on different platforms, the drag direction was different. Test: svg/custom/pan-direction.svg * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): * svg/SVGDocument.cpp: (WebCore::SVGDocument::startPan): (WebCore::SVGDocument::updatePan): 2011-08-30 Adam Barth <abarth@webkit.org> Flaky crash with JavaScript URLs https://bugs.webkit.org/show_bug.cgi?id=66360 Reviewed by Nate Chapin. This patch teaches DocumentWriter::begin to make a copy of the URL before beginning a new document to avoid a crash. Test: fast/loader/javascript-url-iframe-crash.html * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): 2011-08-30 Tony Gentilcore <tonyg@chromium.org> PreloadScanner shouldn't load images inside noscript via doc.write https://bugs.webkit.org/show_bug.cgi?id=67214 Reviewed by Adam Barth. The problem was that the tokenizer state was lost between each call to document.write. This works around that bug by making all document.write()s in the same script block share the same tokenizer state. Test: fast/preloader/document-write-noscript.html * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::~HTMLDocumentParser): (WebCore::HTMLDocumentParser::detach): (WebCore::HTMLDocumentParser::insert): * html/parser/HTMLDocumentParser.h: 2011-08-30 Dmitry Titov <dimich@chromium.org> https://bugs.webkit.org/show_bug.cgi?id=67210 [Chromium] Use after free in ScheduledAction::execute(WebCore::V8Proxy*) Reviewed by David Levin. * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): Removed usage of V8Proxy instance after it could have been deleted. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::V8Proxy): * bindings/v8/V8Proxy.h: Removed unused timerCallback() and setTimerCallback(). 2011-08-30 Abhishek Arya <inferno@chromium.org> Style not updated for table parts in :before, :after content. https://bugs.webkit.org/show_bug.cgi?id=66141 Reviewed by Dave Hyatt. Tests: fast/table/table-before-child-style-update.html fast/table/table-row-before-child-style-update.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-08-30 Tony Chang <tony@chromium.org> refactor box-ordinal-group handling so we don't timeout on large values https://bugs.webkit.org/show_bug.cgi?id=65783 Reviewed by David Hyatt. The old code walked from 1 to the last box-ordinal-group while iterating over each flex item. The new code collects ordinals as we do the first walk and sorts them. Each additional iteration through the flex items gets the next oridnal from the sorted list. This maintains the single pass for the common case of no box-ordinal-groups specified. If there are ordinal groups, the runtime is O(n*m + m lg m) where n is the # of flex items and m is the number of unique box-ordinal-group values. The memory usage is O(2m). Test: fast/flexbox/box-ordinal-group.html * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::FlexBoxIterator::FlexBoxIterator): (WebCore::FlexBoxIterator::reset): (WebCore::FlexBoxIterator::next): (WebCore::FlexBoxIterator::compareFlexOrder): 2011-08-30 Abhishek Arya <inferno@chromium.org> Removed m_owner accessed in custom scrollbars. https://bugs.webkit.org/show_bug.cgi?id=64737 Reviewed by David Hyatt. Problem does not reproduce in DRT, even with Eventhandler tricks and gc(). So, adding a manual test. * manual-tests/custom-scrollbar-renderer-removed-crash.html: Added. * page/FrameView.cpp: (WebCore::FrameView::clearOwningRendererForCustomScrollbars): * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): when this renderbox is getting destroyed, clear the custom scrollbar in this frameview having this renderbox as its owning renderer. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::getScrollbarPseudoStyle): fix the null check. 2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Emit last progress notification before calling dispatchDidFinishLoad https://bugs.webkit.org/show_bug.cgi?id=28851 Reviewed by Adam Barth. Original patch by Xan Lopez. Change FrameLoader to dispatch the notifications in a more natural sequence. Test: http/tests/loading/progress-finished-callback.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): 2011-08-30 Ojan Vafai <ojan@chromium.org> CSS parsing for -webkit-flex-flow https://bugs.webkit.org/show_bug.cgi?id=67224 Reviewed by Tony Chang. Adds support for the first value of -webkit-flex-flow. Later we'll need to add support for the second "wrap" value, but that can wait until we are ready to implement multiline flex and the spec has stabilized a bit. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexFlow): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexFlow): (WebCore::InheritedFlags::setFlexFlow): (WebCore::InheritedFlags::initialFlexFlow): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-30 Dawit Alemayehu <adawit@kde.org> [Qt] Replace QLibrary("libgtk-x11-2.0.so.0") with QLibrary("libgtk-x11-2.0", 0) https://bugs.webkit.org/show_bug.cgi?id=66627 Reviewed by Simon Hausmann. * plugins/qt/PluginPackageQt.cpp: (WebCore::initializeGtk): 2011-08-29 Oliver Hunt <oliver@apple.com> TypedArrays don't ensure that denormalised values are normalised https://bugs.webkit.org/show_bug.cgi?id=67178 Reviewed by Gavin Barraclough. Ensure that we convert singaling nans to silent nans when loading from a typed array. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2011-08-29 Alexey Proskuryakov <ap@apple.com> DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 <rdar://problem/5666907> Reviewed by Darin Adler. Use a clean CFURLStorageSession when this functionality is available. * WebCore.exp.in: Added exports. * WebCore.xcodeproj/project.pbxproj: Made CookieStorageCFNet.h private, as currentCFHTTPCookieStorage is used in WebKit. * platform/mac/CookieJar.mm: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::setCookies): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): Updated to use currentCFHTTPCookieStorage(). * platform/network/CookieStorage.h: Moved CFNetwork specific declarations to CookieStorageCFNet.h. * platform/network/ResourceHandle.cpp: Moved CFNetwork specific code to ResourceHandleCFNet.cpp. * platform/network/ResourceHandle.h: Exposed default session support on Mac, too. Made privateBrowsingStorageSession() private, as callers shouldn't be concerned about where the current sssion came from. * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): Updated to use currentCFHTTPCookieStorage(). * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::cookieStorageOverride): Make it clear that this override is only for a Windows API. (WebCore::overrideCookieStorage): Ditto. (WebCore::currentCFHTTPCookieStorage): We no longer store a cookie storage in a static variable, unless it has been overridden on Windows. We can always get it from a session. (WebCore::setCookieStoragePrivateBrowsingEnabled): There is nothing to do here - we'll just use private session's storage. Note that Mac has a separate code path for OS versions that don't support sessions. (WebCore::startObservingCookieChanges): Updated to use currentCFHTTPCookieStorage(). (WebCore::stopObservingCookieChanges): Ditto. * platform/network/cf/CookieStorageCFNet.h: Changed exposed methods for more clarity. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): Updated for currentCookieStorage->currentCFHTTPCookieStorage change. (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): Moved out of USE(CFNETWORK), as this function is also used with NSURLConnection when sessions are enabled. (WebCore::ResourceHandle::currentStorageSession): Ditto. Removed an #if since default session is now supported on Mac, too. (WebCore::defaultCFURLStorageSession): Moved out of USE(CFNETWORK). (WebCore::ResourceHandle::setDefaultStorageSession): Moved out of USE(CFNETWORK). No longer adopt the session, because nothing in method name says that it will steal a reference from the caller. (WebCore::ResourceHandle::defaultStorageSession): Moved out of USE(CFNETWORK). (WebCore::privateStorageSession): Moved from ResourceHandle.cpp. (WebCore::privateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingEnabled): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSession): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): Moved from ResourceHandle.cpp. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): We no longer store a reference to cookie storage in a static variable, so nothing to do here. On older OS versiosn, we still need to enable legacy private browsing mode. * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): Updated to use the new currentCFHTTPCookieStorage function. (WebCore::ResourceHandle::createNSURLConnection): Updated to use currentStorageSession() instead of privateBrowsingStorageSession(). (WebCore::ResourceHandle::willSendRequest): Ditto. 2011-08-30 David Hyatt <hyatt@apple.com> <rdar://problem/10002140> 9A309: Text gets clipped in book because of overflow:auto https://bugs.webkit.org/show_bug.cgi?id=67212 - Text gets clipped in multi-column layouts when overflow:auto is used. Revise our overflow:auto pagination behavior. If the overflow block doesn't specify any logical height information, then we'll just assume the plan is for it to enclose its contents, and we will be willing to paginate in those circumstances. Reviewed by Dan Bernstein. Added overflow-across-columns.html and overflow-unsplittable.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustForUnsplittableChild): * rendering/RenderBox.cpp: (WebCore::RenderBox::hasUnsplittableScrollingOverflow): * rendering/RenderBox.h: 2011-08-30 Antti Koivisto <antti@apple.com> querySelector/querySelectorAll should use selector checker fast path https://bugs.webkit.org/show_bug.cgi?id=67161 Reviewed by Sam Weinig. Descendant and child selectors can be matches substantially faster using SelectorChecker::fastCheckSelector() path. Currently it is used for style matching only. Add SelectorQuery class that can do both querySelector and querySelectorAll efficiently using fast path. Use inlined loop for DOM traversal. The patch is ~25% speedup in the overall native score of http://www.webkit.org/perf/slickspeed/. Some individual subtests (using child or descendant selectors) execute twice as fast. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::isFastCheckableSelector): (WebCore::RuleData::RuleData): * css/CSSStyleSelector.h: Make fast path checking available outside CSSStyleSelector. * dom/DOMAllInOne.cpp: * dom/Node.cpp: (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): Switch to SelectorQuery. * dom/SelectorNodeList.cpp: Removed. * dom/SelectorNodeList.h: Removed. SelectorQuery makes these obsolete. * dom/SelectorQuery.cpp: Added. (WebCore::SelectorQuery::SelectorQuery): (WebCore::SelectorQuery::queryAll): (WebCore::SelectorQuery::queryFirst): (WebCore::SelectorQuery::canUseIdLookup): (WebCore::SelectorQuery::execute): * dom/SelectorQuery.h: Added. Class for selector matching in tree. 2011-08-30 Dmitry Titov <dimich@chromium.org> REGRESSION (r93913): Failures in fast/replaced/frame-removed-during-resize.html and scrollbars/scrollable-iframe-remove-crash.html https://bugs.webkit.org/show_bug.cgi?id=67074 Reviewed by Darin Adler. Added flag m_isClosed to prevent events that cause Frame to be destroyed from posting more events into EventQueue of a dying Document. The tests mentioned above should now pass. * dom/Document.cpp: (WebCore::Document::detach): * dom/EventQueue.cpp: (WebCore::EventQueue::EventQueue): (WebCore::EventQueue::enqueueEvent): (WebCore::EventQueue::close): Renamed method to reflect better what it does. * dom/EventQueue.h: 2011-08-30 Tony Chang <tony@chromium.org> Fix compile warning on clang: error: 'WebKit::ChromeClientImpl::scrollRectIntoView' hides overloaded virtual function [-Werror,-Woverloaded-virtual] virtual void scrollRectIntoView( ^ ../../WebCore/page/ChromeClient.h:171:22: note: hidden overloaded virtual function 'WebCore::ChromeClient::scrollRectIntoView' declared here virtual void scrollRectIntoView(const IntRect&) { }; // Currently only Mac has a non empty implementation. * page/ChromeClient.h: (WebCore::ChromeClient::scrollRectIntoView): 2011-08-30 David Hyatt <hyatt@apple.com> <rdar://problem/8832814> With large line-height, column break can happen anywhere in the inter-line gap, causing staggered lines. https://bugs.webkit.org/show_bug.cgi?id=67202 Handle positive leading when paginating lines. Technically we should paginate lines based solely off their line top and line bottom with leading included. However there are two issues with always doing so. The first is that overflow can cause lines to overlap, and the second is that negative leading can cause lines to overlap. Since we're incapable of dealing with overlap until we stop clipping column boxes and allow them to have a form of specialized overflow, we still have to at least factor in overflow and ignore negative leading for now. However we can at least honor positive leading when the lines don't overlap. This patch provides basic support for paginating when positive leading is involved. Reviewed by Dan Bernstein. Added fast/multicol/positive-leading.html. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::markLinesDirtyInBlockRange): Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same. (WebCore::RenderBlock::adjustLinePositionForPagination): Grow the top and extent of the line to include our leading when deciding how to paginate the line. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeBlockDirectionPositionsForLine): (WebCore::RenderBlock::layoutRunsAndFloatsInRange): (WebCore::RenderBlock::linkToEndLineIfNeeded): (WebCore::RenderBlock::checkFloatsInCleanLine): (WebCore::RenderBlock::determineStartPosition): (WebCore::RenderBlock::determineEndPosition): (WebCore::RenderBlock::matchedEndLine): Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::RootInlineBox): (WebCore::RootInlineBox::adjustPosition): (WebCore::RootInlineBox::alignBoxesInBlockDirection): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::lineTopWithLeading): (WebCore::RootInlineBox::lineBottomWithLeading): (WebCore::RootInlineBox::setLineTopBottomPositions): Instead of one member variable, blockLogicalHeight(), RootInlineBoxes now know both their top and bottom including leading. These values are obtainable using lineTopWithLeading() and lineBottomWithLeading(). Add these two values to the setLineTopBottomPositions setter and remove setBlockLogicalHeight. * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::layoutRootBox): Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same. 2011-08-29 Chris Marrin <cmarrin@apple.com> Rename GraphicsContext3DInternal to GraphicsContext3DPrivate and add a dummy version of this class for Mac https://bugs.webkit.org/show_bug.cgi?id=67172 Reviewed by Kenneth Russell. * GNUmakefile.list.am: * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/gtk/GraphicsContext3DGtk.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::platformGraphicsContext3D): * platform/graphics/gtk/GraphicsContext3DInternal.h: Removed. * platform/graphics/gtk/GraphicsContext3DPrivate.h: Copied from Source/WebCore/platform/graphics/gtk/GraphicsContext3DInternal.h. * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::getViewportGLWidget): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): (WebCore::GraphicsContext3DPrivate::boundingRect): (WebCore::GraphicsContext3DPrivate::paint): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext): (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::getAttachedShaders): (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::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): 2011-08-30 Tony Chang <tony@chromium.org> Remove webcore_bindings (including DerivedSources##.cpp) from the critical path https://bugs.webkit.org/show_bug.cgi?id=67168 Reviewed by Adam Barth. webcore_bindings_sources generates various files (e.g., CSSPropertyNames, DerivedSources, HTMLNames, etc). webcore_bindings depends on webcore_bindings_sources and compiles these files. Previously, the other webcore libs (webcore_svg, webcore_html, webcore_remaining, etc) depended on webcore_bindings. This changes the dependency on webocre_bindings_sources so the build can parallelize the compile of webcore_bindings and the other webcore_* libs. No new tests, just changing the build dependencies. Manually copy over the include dirs that we used to get from webcore_bindings' direct_dependent_settings. * WebCore.gyp/WebCore.gyp: 2011-08-30 Kaustubh Atrawalkar <kaustubh@motorola.com> The unused ScrollView* argument can and should be removed from scrollRectIntoView. https://bugs.webkit.org/show_bug.cgi?id=67117 Reviewed by Darin Adler. * loader/EmptyClients.h: (WebCore::EmptyChromeClient::scrollRectIntoView): * page/Chrome.cpp: (WebCore::Chrome::scrollRectIntoView): * page/ChromeClient.h: (WebCore::ChromeClient::scrollRectIntoView): 2011-08-30 Ben Wells <benwells@chromium.org> Update registerProtocolHandler scheme whitelist to match spec https://bugs.webkit.org/show_bug.cgi?id=67104 Reviewed by Darin Adler. * page/Navigator.cpp: (WebCore::initProtocolHandlerWhitelist): 2011-08-30 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Inspected page sometimes crashes in InspectorResourceAgent::didFailLoading https://bugs.webkit.org/show_bug.cgi?id=67193 Reviewed by Pavel Feldman. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didFailLoading): 2011-08-30 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> [Qt] Do not unconditionally use pkg-config in .pro files https://bugs.webkit.org/show_bug.cgi?id=67055 Reviewed by Andreas Kling. Original patch from Rohan McGovern <rohan.mcgovern@nokia.com> Using the first pkg-config in PATH is prone to errors when cross compiling inside the Qt repository (using Qt's build-system). This patch protect calls for pkg-config with !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to QT_CONFIG by Qt's 'configure' when cross-compiling on systems without pkg-config. The respective change in Qt's configure has been submited already. No new tests as this is just a build change. * features.pri: protect pkg-config calls 2011-08-30 Andreas Kling <kling@webkit.org> HTMLImageElement: Don't cache "ismap" and "usemap" attributes. https://bugs.webkit.org/show_bug.cgi?id=66784 Reviewed by Darin Adler. * html/HTMLImageElement.h: Remove the "ismap" and "usemap" members, shrinking HTMLImageElement by 16 bytes (on 64-bit.) * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::HTMLImageElement): (WebCore::HTMLImageElement::parseMappedAttribute): Most of the logic for "ismap" and "usemap" moved into isServerMap(). (WebCore::HTMLImageElement::isServerMap): Out-of-lined and implemented using fast*Attribute(). 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> lastChangeWasUserEdit continues to return true when innerText or textContent is modified https://bugs.webkit.org/show_bug.cgi?id=67183 Reviewed by Kent Tamura. Fixed the bug by calling setLastChangeWasNotUserEdit in HTMLTextAreaElement::childrenChanged. Also got rid of HTMLTextFormControlElement::subtreeHasChanged because it was a needless indirection. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): No longer calls HTMLTextFormControlElement::subtreeHasChanged. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): Calls setLastChangeWasNotUserEdit. (WebCore::HTMLTextAreaElement::subtreeHasChanged): No longer calls HTMLTextFormControlElement::subtreeHasChanged. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::defaultEventHandler): Merged subtreeHasChanged. (WebCore::HTMLTextFormControlElement::setInnerTextValue): No longer set m_lastChangeWasUserEdit to false since this is now done when renderers are set dirty. * html/HTMLTextFormControlElement.h: Made subtreeHasChanged a pure virtual function. 2011-08-29 Yury Semikhatsky <yurys@chromium.org> Web Inspector: wrong script display name when there is a slash in its URL query parameters https://bugs.webkit.org/show_bug.cgi?id=67120 Fixed folder name computation in ScriptsPanel. Now search query is ignored when searching for the script folder name. Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL): 2011-08-29 Yury Semikhatsky <yurys@chromium.org> Return value of window.onerror has inverted semantics https://bugs.webkit.org/show_bug.cgi?id=67119 Error is now treated as handled only when window.onerror function returns true. Reviewed by Darin Adler. Test: fast/events/window-onerror13.html * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Touch Internals.cpp in an attempt to fix GTK+ build. * testing/Internals.cpp: 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Move setInnerTextValue from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=67152 Reviewed by Darin Adler. Moved setInnerTextValue from RenderTextControl to HTMLTextFormControlElement. Also moved m_lastChangeWasUserEdit from RenderTextControl to HTMLTextFormControlElement and related inline functions from RenderTextControl to HTMLTextFormControlElement. Because m_lastChangeWasUserEdit is no longer reset when RenderTextControl is recreated, added explicit calls to setLastChangeWasNotUserEdit in setValue functions of HTMLInputElement and HTMLTextAreaElement. This patch also fixes the bug that lastChangeWasUserEdit() incorrectly returns false when input or textarea don't have renderer (e.g. invisible). Unfortunately, there is no way to test this behavioral change from layout tests. * WebCore.exp.in: Exports lastChangeWasUserEdit in HTMLTextFormControlElement instead of that of HTMLInputElement and HTMLTextAreaElement. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Explicitly calls setLastChangeWasNotUserEdit. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValueCommon): Ditto. * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Sets m_lastChangeWasUserEdit true as it used to do via respondToChangeByUser. (WebCore::HTMLTextFormControlElement::lastChangeWasUserEdit): Moved from HTMLInputElement and HTMLTextAreaElement. (WebCore::HTMLTextFormControlElement::setInnerTextValue): Moved from RenderTextControl. * html/HTMLTextFormControlElement.h: (WebCore::HTMLTextFormControlElement::setLastChangeWasNotUserEdit): Added. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): No longer initializes m_lastChangeWasUserEdit. * rendering/RenderTextControl.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): Calls setInnerTextValue. * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::updateFromElement): Ditto. 2011-08-25 Kent Tamura <tkent@chromium.org> REGRESSION(r88115): Disabling a file upload control causes an endless busyloop. https://bugs.webkit.org/show_bug.cgi?id=66659 Reviewed by Darin Adler. Test: fast/forms/file/disabling-file-busy-loop.html * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement): Don't call setDisabled() if the disabled status is not changed. setDisabled() causes styleRecalc(), and HTMLFormControlElement::styleRecalc() causes updateFromElement(). updateFromElement() should not call setDisabled() again. 2011-08-29 Daniel Bates <dbates@webkit.org> Add HAVE(VASPRINTF) macro to test for vasprintf() support https://bugs.webkit.org/show_bug.cgi?id=67156 Reviewed by Darin Adler. * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::error): Modified to use HAVE(VASPRINTF). 2011-08-29 Yuta Kitamura <yutak@chromium.org> WebSocket: Receive binary message as Blob https://bugs.webkit.org/show_bug.cgi?id=67115 Reviewed by Kent Tamura. Make WebSocketChannel be able to receive WebSocket binary messages and deliver them via didReceiveBinaryData() callback of WebSocketChannelClient. Tests: http/tests/websocket/tests/hybi/fragmented-binary-frames.html http/tests/websocket/tests/hybi/receive-blob.html http/tests/websocket/tests/hybi/workers/receive-blob.html * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Convert Blob to JSValue. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): Convert Blob to v8::Value. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): * dom/MessageEvent.h: Added DataTypeBlob and Blob-related functions. (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataAsBlob): * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData): If binaryType attribute is "blob", construct a Blob using BlobData filled with the given binary message. * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): Create continuousFrameData as OwnPtr<> rather than stack-allocated value so we can easily pass it to didReceiveBinaryData() callback. Save the content of a fragmented message even if it is a binary opcode. * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didReceiveBinaryData): * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidReceiveBinaryData): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData): Pass binaryData as PassOwnPtr<Vector<char> > to deliver the value efficiently (without copying the content) across threads. * websockets/WorkerThreadableWebSocketChannel.h: 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Add a test for lastChangeWasUserEdit in HTMLInputElement and HTMLTextAreaElement https://bugs.webkit.org/show_bug.cgi?id=67173 Reviewed by Darin Adler. Exposed HTMLInputElement::lastChangeWasUserEdit and HTMLTextAreaElement::lastChangeWasUserEdit via internals.wasLastChangeUserEdit(Element*, ExceptionCode&). The first argument must be an input element or a textarea element lastChangeWasUserEdit is called upon. Test: fast/forms/textfield-lastchange-was-useredit.html * testing/Internals.cpp: (WebCore::Internals::wasLastChangeUserEdit): * testing/Internals.h: * testing/Internals.idl: 2011-08-29 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyWebkitColumns in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=67106 Reviewed by Darin Adler. Tests: LayoutTests/fast/multicol/inherit-column-values.html LayoutTests/fast/multicol/initial-column-values.html * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize handler for CSSPropertyWebkitColumns. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing implementation for CSSPropertyWebkitColumns. 2011-08-29 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (3/7) https://bugs.webkit.org/show_bug.cgi?id=67064 Reviewed by Darin Adler. No new tests. Completed the third level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::finishCreation): * bindings/js/JSDOMWindowShell.h: 2011-08-29 John Bauman <jbauman@chromium.org> Speed up texImage from BGRA https://bugs.webkit.org/show_bug.cgi?id=66884 Reviewed by Kenneth Russell. BGRA input is common coming from skia, so optimize BGRA->RGBA conversion and also avoid the pointless RGBA to RGBA conversion. * platform/graphics/GraphicsContext3D.cpp: (WebCore::doUnpackingAndPacking): 2011-08-29 Matthew Delaney <mdelaney@apple.com> [CG] ImageBufferCG should handle IOSurface allocation failure gracefully https://bugs.webkit.org/show_bug.cgi?id=67099 Reviewed by Simon Fraser. No new tests. Testing the "fallback to old path" behavior is not easily testable. * platform/graphics/cg/ImageBufferCG.cpp: Rearranged backing store creation to fall back to old path if IOSurface creation path fails. (WebCore::ImageBuffer::ImageBuffer): 2011-08-29 Cary Clark <caryclark@google.com> Only enable font smoothing as requested (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=67143 This adjusts LayoutTest pixel output to more closely match other platforms. Reviewed by Kenneth Russell. No new tests. This platform is not yet enabled. * platform/graphics/skia/FontSkia.cpp: (WebCore::setupPaint): LCD text was always enabled to test the code path. With this change, it is only enabled when instructed by the font state. 2011-08-29 Julien Chaffraix <jchaffraix@webkit.org> Assertion failure in RenderLayer::computeRepaintRects when scrolling https://bugs.webkit.org/show_bug.cgi?id=67140 Reviewed by David Hyatt. Test: fast/repaint/scroll-fixed-layer-with-no-visible-content.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeRepaintRects): Fixed style after r93837. (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Tweaked the code to bail early if our layer has no visible content. This avoids the ASSERT and also makes sense as we shouldn't repaint / update empty layers. 2011-08-29 Anna Cavender <annacc@chromium.org> Implement WebVTT Cue Text Parsing rules and DOM construction https://bugs.webkit.org/show_bug.cgi?id=64132 Reviewed by Adam Barth. Tests in media/track, particularly track-webvtt-tc[022 - 028]*. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * html/TextTrackCue.cpp: * html/TextTrackCue.h: * platform/track/CueParser.cpp: * platform/track/CueParser.h: * platform/track/WebVTTParser.cpp: * platform/track/WebVTTParser.h: * platform/track/WebVTTToken.h: Added. * platform/track/WebVTTTokenizer.cpp: Added. * platform/track/WebVTTTokenizer.h: Added. 2011-08-29 Patrick Gansterer <paroga@webkit.org> Add parsing support for extended attributes on IDL constants https://bugs.webkit.org/show_bug.cgi?id=65046 Reviewed by Brent Fulgham. With support for extended attributes on constants we can replace some preprocessor lines from the IDL files with the corresponding [Conditional=XXX] later. Using the preprocessor causes much pain on native windows. CodeGenerator support will be added in separate patches. * bindings/scripts/IDLParser.pm: * bindings/scripts/IDLStructure.pm: 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Cleanup: notifyFormStateChanged, formControlValueMatchesRenderer, and setFormControlValueMatchesRenderer https://bugs.webkit.org/show_bug.cgi?id=67141 Reviewed by Eric Seidel. No new tests since this is a refactoring. * dom/Element.h: Removed formControlValueMatchesRenderer and setFormControlValueMatchesRenderer. * html/HTMLInputElement.cpp: Removed notifyFormStateChanged. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateValue): Calls notifyFormStateChanged; modifies m_wasModifiedByUser. (WebCore::HTMLTextAreaElement::setValueCommon): Calls notifyFormStateChanged; also renamed value to newValue to avoid the conflict with value(). * html/HTMLTextAreaElement.h: Made m_wasModifiedByUser mutable. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::notifyFormStateChanged): Extracted from notifyFormStateChanged in HTMLInputElement.cpp and HTMLTextAreaElement.cpp. * html/HTMLTextFormControlElement.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): Calls setFormControlValueMatchesRenderer. 2011-08-29 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93987, r93992, r93995, r93998, and r93999. http://trac.webkit.org/changeset/93987 http://trac.webkit.org/changeset/93992 http://trac.webkit.org/changeset/93995 http://trac.webkit.org/changeset/93998 http://trac.webkit.org/changeset/93999 https://bugs.webkit.org/show_bug.cgi?id=67147 Many failing tests (Requested by ap on #webkit). * WebCore.exp.in: * platform/mac/CookieJar.mm: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::setCookies): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): * platform/network/CookieStorage.h: * platform/network/ResourceHandle.cpp: (WebCore::privateStorageSession): (WebCore::privateBrowsingStorageSessionIdentifierBase): (WebCore::ResourceHandle::setPrivateBrowsingEnabled): (WebCore::ResourceHandle::privateBrowsingStorageSession): (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): * platform/network/ResourceHandle.h: * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::privateBrowsingCookieStorage): (WebCore::defaultSessionCookieStorage): (WebCore::defaultCookieStorage): (WebCore::currentCookieStorage): (WebCore::setCurrentCookieStorage): (WebCore::setCookieStoragePrivateBrowsingEnabled): (WebCore::startObservingCookieChanges): (WebCore::stopObservingCookieChanges): * platform/network/cf/CookieStorageCFNet.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): (WebCore::ResourceHandle::currentStorageSession): (WebCore::defaultCFURLStorageSession): (WebCore::ResourceHandle::setDefaultStorageSession): (WebCore::ResourceHandle::defaultStorageSession): * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): 2011-08-29 Nayan Kumar K <nayankk@motorola.com> As per HTML specification, default font style of dfn tag should be italic. https://bugs.webkit.org/show_bug.cgi?id=56670 Reviewed by Adam Barth. Test: fast/css/dfn-default-font-style.html * css/html.css: (i, cite, em, var, address, dfn): 2011-08-29 Patrick Gansterer <paroga@webkit.org> Consider Conditional attribute in CodeGeneratorJS' JSValueToNative and NativeToJSValue function https://bugs.webkit.org/show_bug.cgi?id=65040 Reviewed by Brent Fulgham. JSValueToNative and NativeToJSValue add additional include statements to the implementation and need to handle the Conditional attribute from the IDL file. The Conditional attribute adds appropriate #if ENABLE() lines for the preprocessor around the include statements to remove some unneeded build dependencies. * bindings/scripts/CodeGeneratorJS.pm: 2011-08-29 Nate Chapin <japhet@chromium.org> Plumb ResourceLoaderOptions out to CachedResourceLoader::requestResource(). This will be needed in order for DocumentThreadableLoader to become a CachedResourceClient. https://bugs.webkit.org/show_bug.cgi?id=66018 Reviewed by Antti Koivisto. No new tests, refactor only. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::load): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::load): * loader/cache/CachedResource.h: (WebCore::CachedResource::load): (WebCore::CachedResource::setResourceLoaderOptions): (WebCore::CachedResource::sendResourceLoadCallbacks): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::loadResource): * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::load): * loader/cache/CachedResourceRequest.h: 2011-08-29 Chris Palmer <palmer@google.com> Fix failures when FFT size is changed. https://bugs.webkit.org/show_bug.cgi?id=66916 Reviewed by Kenneth Russell. Test: webaudio/fft-sizing.html * webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::setFftSize): Assert size sanity. (WebCore::RealtimeAnalyser::doFFTAnalysis): Iterate the correct number of times over magnitudeBuffer. * webaudio/RealtimeAnalyser.h: Put member fields in the correct order (Min before Max). 2011-08-29 Abhishek Arya <inferno@chromium.org> Crash in InlineBox::deleteLine due to accessing removed renderer. https://bugs.webkit.org/show_bug.cgi?id=66015 Reviewed by Simon Fraser. Test: fast/block/line-layout/inline-box-wrapper-crash.html * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox): Make sure that the previous inline box wrapper is destroyed properly, before setting a new one. 2011-08-29 Alexey Proskuryakov <ap@apple.com> Lion build fix. * WebCore.exp.in: We have different definitions of CFURLStorageSessionRef on different versions of Mac OS X, and need separate exports. 2011-08-29 Tony Chang <tony@chromium.org> Implement -webkit-flex-pack for horizontal flexboxen https://bugs.webkit.org/show_bug.cgi?id=66898 Reviewed by Ojan Vafai. Test: css3/flexbox/004.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::hasPackingSpace): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmHorizontal): 2011-08-29 Alexey Proskuryakov <ap@apple.com> Windows build fix. * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): Updated for new function name and signature: currentCFHTTPCookieStorage(). 2011-08-29 Alexey Proskuryakov <ap@apple.com> Mac build fix. * platform/network/cf/CookieStorageCFNet.cpp: Move Windows specific includes into PLATFORM(WIN). 2011-08-29 Andreas Kling <kling@webkit.org> Viewing a post on reddit.com wastes a lot of memory on event listeners. https://bugs.webkit.org/show_bug.cgi?id=67133 Reviewed by Darin Adler. Specialize the HashMap used to store registered listeners on an EventTarget to have a minimum size of 32 (rather than the default 64.) It's very rare for pages to register listeners for so many different events and this cuts memory consumption in half for the common case. As an example, for a typical post on the reddit.com front page, this reduces memory used by ~700kB on 64-bit. * dom/EventTarget.h: 2011-08-29 Stephen White <senorblanco@chromium.org> Skia's accelerated canvas 2D implementation should use GrTexture, not DrawingBuffer https://bugs.webkit.org/show_bug.cgi?id=67050 Reviewed by Kenneth Russell. Covered by existing tests. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::create): (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::drawsContent): Construct Canvas2DLayerChromium with a GraphicsContext3D, not a DrawingBuffer. (WebCore::Canvas2DLayerChromium::updateCompositorResources): Flush the GrContext and GraphicsContext3D on compositor update. * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: Put textureId() back on the base class (CanvasLayerChromium) and de-virtualize it. (WebCore::CanvasLayerChromium::textureId): (WebCore::CanvasLayerChromium::setTextureId): Move m_textureId from WebGLLayerChromium, since canvas2D now uses it too. Provide getters and setters. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::~DrawingBuffer): Remove all Canvas2D-related calls from DrawingBuffer. (WebCore::DrawingBuffer::publishToPlatformLayer): Remove GrContext::flush call, since it's now handled by the platform layer. (WebCore::DrawingBuffer::platformLayer): Return NULL for now (WebGL may rescussitate this later). * platform/graphics/chromium/GraphicsLayerChromium.cpp: Remove a useless #include. * platform/graphics/chromium/ImageBufferDataSkia.h: Add ownership of the Canvas2DLayerChromium. * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): * platform/graphics/chromium/WebGLLayerChromium.h: Remove all texture ID stuff (now on base class). * platform/graphics/gpu/DrawingBuffer.h: Remove Canvas2DLayerChromium and all Ganesh datatypes from DrawingBuffer, since it's no longer used by canvas2D. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): On accelerated ImageBuffer creation, create a GrTexture instead of a DrawingBuffer. If all is cool, create and set the SkGpuDevice here, and create a Canvas2DLayerChromium platform layer. (WebCore::ImageBuffer::platformLayer): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: Remove all GrContext creation and DrawingBuffer "scraping" from PlatformContextSkia::setGraphicsContext3D(). This is handled in the ImageBuffer constructor instead. 2011-08-26 Alexey Proskuryakov <ap@apple.com> DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 <rdar://problem/5666907> Reviewed by Darin Adler. Use a clean CFURLStorageSession when this functionality is available. * WebCore.exp.in: Added exports * platform/mac/CookieJar.mm: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::setCookies): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): Updated for privateBrowsingCookieStorage->currentCFHTTPCookieStorage change. * platform/network/CookieStorage.h: Moved CFNetwork specific declarations to CookieStorageCFNet.h. * platform/network/ResourceHandle.cpp: Moved CFNetwork specific code to ResourceHandleCFNet.cpp. This file contains cross platform functionality, and we no longer need to put code in it to share it between Mac and Windows. * platform/network/ResourceHandle.h: Expose methods to manipulate default session on Mac, too. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::cookieStorageOverride): Make it clear that this override is only for a Windows API. (WebCore::overrideCookieStorage): Ditto. (WebCore::currentCFHTTPCookieStorage): We no longer store a cookie storage in a static variable, unless it has been overridden on Windows. We can always get it from a session. (WebCore::setCookieStoragePrivateBrowsingEnabled): There is nothing to do here - we'll just use private session's storage. Note that Mac has a separate code path for OS versions that don't support sessions. * platform/network/cf/CookieStorageCFNet.h: Changed exposed methods for more clarity. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): Updated for currentCookieStorage->currentCFHTTPCookieStorage change. (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): Moved out of USE(CFNETWORK), as this function is also used with NSURLConnection when sessions are enabled. (WebCore::ResourceHandle::currentStorageSession): Ditto. Removed an #if since default session is now supported on Mac, too. (WebCore::defaultCFURLStorageSession): Moved out of USE(CFNETWORK). (WebCore::ResourceHandle::setDefaultStorageSession): Moved out of USE(CFNETWORK). No longer adopt the session, because nothing in method name says that it will steal a reference from the caller. (WebCore::ResourceHandle::defaultStorageSession): Moved out of USE(CFNETWORK). (WebCore::privateStorageSession): Moved from ResourceHandle.cpp. (WebCore::privateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingEnabled): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSession): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): Moved from ResourceHandle.cpp. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): We no longer store a reference to cookie storage in a static variable, so nothing to do here. On older OS versiosn, we still need to enable legacy private browsing mode. * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): Updated to use the new currentCFHTTPCookieStorage function. 2011-08-22 David Levin <levin@chromium.org> postMessage raises INVALID_STATE_ERR instead of DATA_CLONE_ERR in many cases. https://bugs.webkit.org/show_bug.cgi?id=66713 Reviewed by Dmitry Titov. See http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages for postMessage * bindings/js/JSMessagePortCustom.cpp: (WebCore::fillMessagePortArray): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::getMessagePortArray): * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::disentanglePorts): 2011-08-29 Tom Zakrajsek <tomz@codeaurora.org> canvas arc() missing line to start of arc if swing is zero https://bugs.webkit.org/show_bug.cgi?id=55696 Reviewed by Andreas Kling. Test: fast/canvas/canvas-arc-zero-lineto.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arc): 2011-08-23 Chris Marrin <cmarrin@apple.com> [mac] requestAnimationFrame support for mac port https://bugs.webkit.org/show_bug.cgi?id=59146 Reviewed by Simon Fraser. Enable REQUEST_ANIMATION_FRAME logic and add ScriptedAnimationController to build. Added JavaScript support for Mac, too. * CodeGenerators.pri: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Added. (WebCore::JSRequestAnimationFrameCallback::handleEvent): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): * dom/RequestAnimationFrameCallback.idl: 2011-08-29 Alexander Pavlov <apavlov@chromium.org> Web Inspector: <button hidden>..</button> has a different computed "display" value than "none" https://bugs.webkit.org/show_bug.cgi?id=67124 Attribute styles have a higher priority than user agent styles and thus should be rendered above them. Reviewed by Yury Semikhatsky. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules.get continue): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename sourceFile to (raw|ui)SourceCode in DebuggerPresentationModel. https://bugs.webkit.org/show_bug.cgi?id=66769 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.uiSourceCode): (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype._consoleCleared): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceFileId): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled): (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript): (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationBreakpoint): (WebInspector.PresenationCallFrame.prototype.sourceLine.didGetUILocation): (WebInspector.PresenationCallFrame.prototype.sourceLine): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._callFrameSelected): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.UILocation): 2011-08-29 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: cached permanent redirects don't show redirect code and text in Network panel. https://bugs.webkit.org/show_bug.cgi?id=67126 Reviewed by Yury Semikhatsky. * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForResourceResponse): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract FormattedContentProvider from RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=66938 Reviewed by Pavel Feldman. * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._setContentProvider): (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.RawSourceCode.prototype._didRequestContent): (WebInspector.FormattedContentProvider): (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent): (WebInspector.FormattedContentProvider.prototype.requestContent): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: link UISourceCode to RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=66944 Reviewed by Pavel Feldman. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.get rawSourceCode): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: remove RawSourceCode.setFormatted. https://bugs.webkit.org/show_bug.cgi?id=66947 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): 2011-08-26 Pavel Podivilov <podivilov@chromium.org> Web Inspector: Debugger.setBreakpointByUrl should return error when setting breakpoint on the same location twice. https://bugs.webkit.org/show_bug.cgi?id=67030 Reviewed by Pavel Feldman. Test: inspector/debugger/set-breakpoint.html * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): 2011-08-29 Matthew Delaney <mdelaney@apple.com> fast/canvas/shadow-offset-*.html fail on Leopard/Snow Leopard when removing the work around for <rdar://problem/5539388>. https://bugs.webkit.org/show_bug.cgi?id=67107 Reviewed by David Levin. No new tests. Effectively reverting the change from https://bugs.webkit.org/show_bug.cgi?id=67052 for Leopard and SL because it caused test regressions on Leopard and SL, but not Lion. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): 2011-08-29 Zoltan Herczeg <zherczeg@webkit.org> [Qt] Unreviewed minimal-build buildfix after r93937. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintInnerSpinButton): * platform/qt/RenderThemeQt.h: 2011-08-28 Keishi Hattori <keishi@webkit.org> Chromium Win: Setting square-button appearance reaches NOTREACHED https://bugs.webkit.org/show_bug.cgi?id=66918 Reviewed by Kent Tamura. Test: fast/css/square-button-appearance.html * rendering/RenderThemeChromiumWin.cpp: (WebCore::supportsFocus): Add case for SquareButtonPart. (WebCore::RenderThemeChromiumWin::supportsFocusRing): Add case for SquareButtonPart. (WebCore::RenderThemeChromiumWin::getThemeData): Add case for SquareButtonPart. 2011-08-28 Luke Macpherson <macpherson@chromium.org> Fix reference counting of values in CSSSelector. https://bugs.webkit.org/show_bug.cgi?id=66452 Reviewed by Darin Adler. No new tests / no functionality changed. Call deref when reassigning the value. * css/CSSSelector.h: (WebCore::CSSSelector::setValue): 2011-08-28 Sam Weinig <sam@webkit.org> Add support for constructor syntax for Events https://bugs.webkit.org/show_bug.cgi?id=63878 Reviewed by Oliver Hunt. Add basic support for Event constructors, starting with just supporting the constructor for the base Event class and just JSC support. This lays the infrastructure for the other events as well. Test: fast/events/event-constructors.html * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Add files. * bindings/generic/EventConstructors.h: Added. Add binding agnostic header that defines the Event initializers using a macro based DSL. * bindings/js/JSEventConstructors.cpp: Added. (WebCore::convertValue): (WebCore::tryGetProperty): (WebCore::constructJSEventWithInitializer): Add JSC implementation of Event initializer DSL. * dom/Event.cpp: (WebCore::EventInit::EventInit): (WebCore::Event::Event): * dom/Event.h: (WebCore::Event::create): Add Event initializer interface for base Event. * dom/Event.idl: Mark Event as having a custom constructor function. 2011-08-27 Andreas Kling <kling@webkit.org> SQLiteStatement::getColumnText() could construct WTF::String result more efficiently. https://bugs.webkit.org/show_bug.cgi?id=67090 Reviewed by Darin Adler. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::getColumnText): Use sqlite3_column_bytes16() to get the length of the column text without looking for the null terminator. 2011-08-07 Robert Hogan <robert@webkit.org> The child div element with position:absolute will overlap with its parent div when a 'break' element is present in between https://bugs.webkit.org/show_bug.cgi?id=21934 Reviewed by David Hyatt. Test: fast/block/positioning/absolute-appended-to-inline.html Appending a positioned child node to an inline flow should dirty the lines in the flow, just as inserting a positioned child node does. Treating an appended and inserted node differently meant that updating the display type from 'none' to 'block' for the following markup would result in the div getting positioned correctly under the line block: <div><a onMouseOver="mopen()">Hover</a><div style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"><br></div></div> but this would not happen with the following markup (the <br> is before the child div rather than after it): <div><a onMouseOver="mopen()">Hover</a><br><div style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"></div></div> This problem is specific to cases where an object is appended to a line block whose last child is a <br>. When the line is relaid out after appending the positioned object the last line in the line block is always considered dirty unless it broke cleanly (ie. with a <br>, see RenderBlock::determineStartPosition), So in the second case above, the clean break and failing to dirty any lines in the block when appending the object means that the line block doesn't get relaid out to position the new positioned object relative to its containing line block. So the change could special-case appending a node when the previous sibling isBR(), but it seems just as well to behave the same way as insertChildNode(). * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::appendChildNode): Call dirtyLinesFromChangedChild() if the child is positioned, just like insertChildNode(). 2011-08-27 Anders Carlsson <andersca@apple.com> iChat: Receiving a message containing only a single-quote (') causes bubble to fail https://bugs.webkit.org/show_bug.cgi?id=67076 <rdar://problem/10026089> Reviewed by Dan Bernstein. Test: fast/borders/border-fit-2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::borderFitAdjust): Make sure that the resulting rect isn't smaller than the border + padding. (WebCore::RenderBlock::clearTruncation): Fix blatant coding style violations. 2011-08-27 Andreas Kling <kling@webkit.org> Shrink RenderLayer. https://bugs.webkit.org/show_bug.cgi?id=67089 Reviewed by Antonio Gomes. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): * rendering/RenderLayer.h: Make m_inResizeMode a bitfield, shrinking RenderLayer by 8 bytes (on 64-bit.) 2011-08-27 Young Han Lee <joybro@company100.net> Reviewed by Dirk Schulze. SVG animation fill="freeze" doesn't set baseVal to current animVal if animation stops before reaching the end https://bugs.webkit.org/show_bug.cgi?id=63553 calculateAnimationPercentAndRepeat() is returning 1, which means 100%, whenever elapsed >= m_intervalEnd, but this is wrong because m_intervalEnd can be in the middle of the animation duration. (e.g. begin="0s" end="2s" dur="3s") This change makes the function return the animations's true progress instead of 100% when the animation ends. Test: svg/animations/animate-end-attribute.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2011-08-27 Jarred Nicholls <jarred@sencha.com> [Qt] Need spin-button implementation https://bugs.webkit.org/show_bug.cgi?id=65896 Reviewed by Kenneth Rohde Christiansen. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle): (WebCore::RenderThemeQt::paintInnerSpinButton): * platform/qt/RenderThemeQt.h: 2011-08-26 Xiaomei Ji <xji@chromium.org> Regression(91788): Bad cast in WebCore::blockWithNextLineBox https://bugs.webkit.org/show_bug.cgi?id=66090 Reviewed by Ryosuke Niwa. This is more like (but not exactly) a revert of r91788. It does not search for previous or next root inline box in different render object, which completely eliminates the cause of this issue. And it removes createPositionAvoidingIgnoredNode(), changed its caller to use createLegacyEditingPosition(). createPositionAvoidingIgnoredNode is not correct when node is a replaced element whose caretMaxOffset could be greater than 1. Tests: editing/selection/move-by-word-visually-crash-test-1.html editing/selection/move-by-word-visually-crash-test-2.html editing/selection/move-by-word-visually-crash-test-3.html editing/selection/move-by-word-visually-crash-test-4.html * editing/htmlediting.cpp: * editing/htmlediting.h: * editing/visible_units.cpp: (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): (WebCore::leftmostPositionInRTLBoxInLTRBlock): (WebCore::rightmostPositionInLTRBoxInRTLBlock): (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality): (WebCore::appendPositionAtLogicalEndOfLine): (WebCore::leftInlineBox): (WebCore::rightInlineBox): 2011-08-26 James Robinson <jamesr@chromium.org> [Chromium] Possible leak of LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=66981 Reviewed by Kenneth Russell. Fix a number of reference cycle leaks that prevent LayerRendererChromiums from being destroyed when a tab is closed. Not possible to write a layout test where an entire WebView goes away. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearRenderSurfacesOnCCLayerImplRecursive): (WebCore::LayerRendererChromium::clearRootCCLayerImpl): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setRootLayer): 2011-08-26 Nate Chapin <japhet@chromium.org> Move allowCredentials from ThreadableLoaderOptions down to ResourceLoaderOptions. This allows us to remove getShouldUseCredentialStorage() from SubresourceLoaderClient and check allowCredentials in ResourceLoader. https://bugs.webkit.org/show_bug.cgi?id=65330 Reviewed by Alexey Proskuryakov. No new tests, refractor only. * loader/DocumentThreadableLoader.cpp: * loader/DocumentThreadableLoader.h: * loader/MainResourceLoader.cpp: * loader/NetscapePlugInStreamLoader.cpp: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::shouldUseCredentialStorage): Check m_options.allowCredentials instead of calling a client. * loader/ResourceLoaderOptions.h: * loader/SubresourceLoader.cpp: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: * loader/ThreadableLoader.h: * loader/cache/CachedResourceRequest.cpp: 2011-08-26 Ojan Vafai <ojan@chromium.org> change the default preferred width of the flex() function to 0px per the new spec https://bugs.webkit.org/show_bug.cgi?id=67067 Reviewed by Tony Chang. * css/CSSParser.cpp: (WebCore::CSSParser::parseFlex): 2011-08-26 Matthew Delaney <mdelaney@apple.com> Remove offset hack from GraphicsContextCG setShadow code https://bugs.webkit.org/show_bug.cgi?id=67052 Reviewed by Simon Fraser. No new tests - current tests cover it. * platform/graphics/cg/GraphicsContextCG.cpp: Removing the offset hack introduced in http://trac.webkit.org/changeset/28714 for an issue with offsets in an old version of CoreGraphics that's long since been fixed. 2011-08-26 Alexey Proskuryakov <ap@apple.com> Get rid of frame life support timer https://bugs.webkit.org/show_bug.cgi?id=66874 Reviewed by Geoff Garen. V8 fixes courtesy of Dmitry Titov. Test: fast/frames/detached-frame-property.html * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::runScript): (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::newInstance): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::~Frame): (WebCore::Frame::pageDestroyed): * page/Frame.h: * page/Page.cpp: (WebCore::Page::~Page): Removed all code that dealt with the life support timer. Protect Frame inside runScript() and callFunction() for v8 bindings. * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): Replaced ref/deref calls on self with a RefPtr. 2011-08-26 Ned Holbrook <nholbrook@apple.com> RenderText::computePreferredLogicalWidths() should measure words with trailing spaces https://bugs.webkit.org/show_bug.cgi?id=66733 Reviewed by Dan Bernstein. Test: fast/text/complex-preferred-logical-widths.html * rendering/RenderText.cpp: (WebCore::RenderText::computePreferredLogicalWidths): Apply logic from RenderBlock::LineBreaker::nextLineBreak(). 2011-08-26 Tony Chang <tony@chromium.org> Add CSS parsing for -webkit-flex-align https://bugs.webkit.org/show_bug.cgi?id=66726 Reviewed by Ojan Vafai. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexAlign): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexAlign): (WebCore::InheritedFlags::setFlexAlign): (WebCore::InheritedFlags::initialFlexAlign): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-26 Nate Chapin <japhet@chromium.org> Fix http/tests/misc/willCacheResponse-delegate-callback.html after r93886. We're implicitly converting an enum to a bool. Rubber-stamped by David Levin. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::willCacheResponse): 2011-08-26 Chris Rogers <crogers@google.com> Add MediaPlayer::audioSourceProvider() method for audio stream access by the Web Audio API. https://bugs.webkit.org/show_bug.cgi?id=66398 Reviewed by Eric Carlson. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::prepareForLoad): (WebCore::HTMLMediaElement::loadNextSourceChild): (WebCore::HTMLMediaElement::ensureMediaPlayer): (WebCore::HTMLMediaElement::createMediaPlayer): MediaPlayer creation has now been put into createMediaPlayer() instead of it being created separately in these various methods. It has been made thread-safe for use with the Web Audio API in conjunction with an MediaElementAudioSourceNode. (WebCore::HTMLMediaElement::setAudioSourceNode): (WebCore::HTMLMediaElement::audioSourceProvider): * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::audioSourceNode): The HTMLMediaElement now keeps track of an optional MediaElementAudioSourceNode if the audio stream is being processed using the Web Audio API. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::audioSourceProvider): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::audioSourceProvider): MediaPlayer now has an audioSourceProvider() method with a default "empty" implementation. audioSourceProvider() returns an AudioSourceProvider object which the Web Audio API's MediaElementAudioSourceNode uses (indirectly through an HTMLMediaElement method) to get the rendered audio stream. * webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaElementSource): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: AudioContext::createMediaElementSource() is now more careful to check that an HTMLMediaElement doesn't already have a MediaElementAudioSourceNode attached to it. * webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::process): (WebCore::MediaElementAudioSourceNode::lock): (WebCore::MediaElementAudioSourceNode::unlock): * webaudio/MediaElementAudioSourceNode.h: Implement thread-safe processing (replacing the old stub implementation). 2011-08-23 Stephen White <senorblanco@chromium.org> Assertion fires if canvas is resized while save() active https://bugs.webkit.org/show_bug.cgi?id=66710 Reviewed by Simon Fraser. Test: fast/canvas/resize-while-save-active.html * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): Call CanvasRenderingContext2D::reset() before resizing the canvas, so that the GraphicsContext state stack can be unwound. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::unwindStateStack): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): Refactor the state stack unwinding code from the destructor to unwindStateStack() (new). (WebCore::CanvasRenderingContext2D::reset): Unwind the GraphicsContext state stack when the context is reset. * html/canvas/CanvasRenderingContext2D.h: 2011-08-26 Darin Adler <darin@apple.com> [Mac] Use the progress cursor instead of the wristwatch for CSS "wait" cursor https://bugs.webkit.org/show_bug.cgi?id=67049 Reviewed by Beth Dakin. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use BusyButClickable cursor for wait as well as for Progress. 2011-08-26 Nate Chapin <japhet@chromium.org> Fix gtk build after r93886. * platform/track/CueParser.cpp: (WebCore::CueParser::load): 2011-08-26 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Update searchableIndexIntroduction() to match GTK+'s. https://bugs.webkit.org/show_bug.cgi?id=66885 Reviewed by Gustavo Noronha Silva. Using this new string allows us to share the test expectations with other ports, and thus makes fast/replaced/table-percent-height-text-controls.html pass. No new tests, as this is covered by an existing one. * platform/efl/LocalizedStringsEfl.cpp: (WebCore::searchableIndexIntroduction): 2011-08-26 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Do not log an error if a fallback cursor cannot be found. https://bugs.webkit.org/show_bug.cgi?id=67037 Reviewed by Gustavo Noronha Silva. Ecore_X does not necessarily have to be used (DumpRenderTree does not use it, for example), so showing an error message here is bogus. No new tests, as it just removes erroneous error messages from when running DRT with existing tests. * platform/efl/WidgetEfl.cpp: (WebCore::Widget::applyFallbackCursor): 2011-08-26 Nate Chapin <japhet@chromium.org> Change a bunch of nondescript bools to descriptive enums in ResourceLoaderOptions and ThreadableLoaderOptions. https://bugs.webkit.org/show_bug.cgi?id=66984 Reviewed by David Levin. No new tests, no functionality change intended. * WebCore.exp.in: * fileapi/FileReaderLoader.cpp: * html/MediaDocument.cpp: * html/PluginDocument.cpp: * loader/CrossOriginAccessControl.cpp: * loader/CrossOriginAccessControl.h: * loader/CrossOriginPreflightResultCache.cpp: * loader/CrossOriginPreflightResultCache.h: * loader/DocumentThreadableLoader.cpp: * loader/FrameLoader.h: * loader/ImageLoader.cpp: * loader/MainResourceLoader.cpp: * loader/NetscapePlugInStreamLoader.cpp: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.cpp: * loader/ResourceLoader.h: * loader/ResourceLoaderOptions.h: * loader/ThreadableLoader.h: * loader/cache/CachedResource.cpp: * loader/cache/CachedResourceRequest.cpp: * loader/cf/ResourceLoaderCFNet.cpp: * loader/mac/ResourceLoaderMac.mm: * page/EventSource.cpp: * platform/network/ResourceHandle.h: * workers/WorkerScriptLoader.cpp: * xml/XMLHttpRequest.cpp: 2011-08-26 Andreas Kling <kling@webkit.org> HTMLMetaElement: Don't cache "http-equiv" and "content" attributes. https://bugs.webkit.org/show_bug.cgi?id=67040 Reviewed by Darin Adler. * html/HTMLMetaElement.h: Remove m_equiv and m_content members, shrinking HTMLMetaElement by 16 bytes (on 64-bit.) * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::parseMappedAttribute): (WebCore::HTMLMetaElement::process): Implemented using fastGetAttribute(). 2011-08-26 Pavel Feldman <pfeldman@google.com> Web Inspector: [REGRESSION] No way to expand hovered objects while debugging. https://bugs.webkit.org/show_bug.cgi?id=67039 Reviewed by Yury Semikhatsky. * inspector/front-end/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype.show): (WebInspector.PopoverHelper.prototype._mouseDown): (WebInspector.PopoverHelper.prototype._hidePopover): (WebInspector.PopoverHelper.prototype._mouseHover): (WebInspector.PopoverHelper.prototype._killHidePopoverTimer): 2011-08-26 Pavel Podivilov <podivilov@chromium.org> Unreviewed, rolling out r93870. http://trac.webkit.org/changeset/93870 https://bugs.webkit.org/show_bug.cgi?id=65203 Broke i18n chromium tests * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): (WebCore::windowsCanHandleTextDrawingWithoutShadow): * platform/graphics/skia/SkiaFontWin.h: 2011-08-26 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Use a custom pattern image for rubber banding overhang area https://bugs.webkit.org/show_bug.cgi?id=66707 Also roll Chromium revision to 98101, to include dependency: http://codereview.chromium.org/7714036/ Reviewed by Dimitri Glazkov. No new tests since its just changing the Chromium-specific overhang pattern. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-26 Eric Carlson <eric.carlson@apple.com> <video> playlist can not advance when playing in background tab https://bugs.webkit.org/show_bug.cgi?id=66978 Reviewed by Darin Adler. No new tests added because it isn't possible to simulate a background tab in DRT. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequirePageConsentToLoadMedia restriction. (WebCore::HTMLMediaElement::loadInternal): Don't consider page->canStartMedia if it has ever allowed a file to load. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::requirePageConsentToLoadMedia): New. (WebCore::HTMLMediaElement::removeBehaviorRestriction): New. 2011-08-26 Andreas Kling <kling@webkit.org> [Qt] Path::boundingRect() is unnecessarily slow. https://bugs.webkit.org/show_bug.cgi?id=66854 Reviewed by Benjamin Poulain. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): Remove Qt-specific optimization since calling Path::boundingRect() will now do exactly the same thing. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::boundingRect): Return QPainterPath::controlPointRect() since that is much faster than computing the (precise) QPainterPath::boundingRect() and Path::boundingRect() is not expected to be 100% precise anyway. 2011-08-26 Gavin Peters <gavinp@chromium.org> add a state enumeration to track down cause of null CachedScript execution https://bugs.webkit.org/show_bug.cgi?id=66939 Reviewed by Alexey Proskuryakov. Over in http://code.google.com/p/chromium/issues/detail?id=75604 I have a bug I cannot reproduce. I added an earlier crash in https://bugs.webkit.org/show_bug.cgi?id=65563 , and we've since gotten many good stacks, all coming in through a failed request that eventually calls notifyFinished() on a ScriptElement with a NULL m_cachedScript. I'd like to know how this got NULL. This enumeration should let me find that in stack dumps from reproductions. No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-08-26 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: * platform/graphics/skia/SkiaFontWin.h: 2011-08-26 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: in some cases Popover code is failing to calculate popover box position. https://bugs.webkit.org/show_bug.cgi?id=67029 Reviewed by Yury Semikhatsky. * inspector/front-end/Popover.js: (WebInspector.Popover.prototype._positionElement): 2011-08-26 Nikolas Zimmermann <nzimmermann@rim.com> [Qt] http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm fails intermittently https://bugs.webkit.org/show_bug.cgi?id=65969 Reviewed by Zoltan Herczeg. Fix intrinsic size negotiation flakiness, most visible on the Qt port. The http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm testcase triggered an assertion on a Qt debug build indicating that the HashSet updateLayoutAndStyleIfNeededRecursive() operates on is mutated while its iterated, leading to an assertion/crash. Due the new forceLayoutParentViewIfNeeded() logic it's no longer safe to directly use the children() HashSet in that method - we have to make a copy first. The second part of the fix is to stop entering forceLayoutParentViewIfNeeded(), if the origin of that call is forceLayoutParentViewIfNeeded() itself. Set m_inLayoutParentView to true before calling FrameView::layout() on our parent frame view - this is only an optimization to avoid doing layout() twice. The third part of the fix is to call updateWidgetPositions() on the parent FrameView, _before_ calling layout() on the parent view itself, as the SVG document needs to report the correct intrinsic size (which can depend on the host object/embed/iframe) when we're running RenderReplaced::layout() on the host renderer. * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::collectFrameViewChildren): (WebCore::FrameView::forceLayoutParentViewIfNeeded): (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): * page/FrameView.h: 2011-08-26 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Double clicking on numbers in Count & size columns doesn't toggle between values and percents in the Heap Snapshot. https://bugs.webkit.org/show_bug.cgi?id=66988 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._mouseClickInContentsGrid): (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): 2011-08-26 Shinya Kawanaka <shinyak@google.com> REGRESSION(r93390): Empty or invalid maxlength of an input tag should be ignored. https://bugs.webkit.org/show_bug.cgi?id=67015 Reviewed by Kent Tamura. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMaxLengthAttribute): Checks the validity of maxlength attribute when converting it to integer. 2011-08-25 Yuta Kitamura <yutak@chromium.org> WebSocket: Fix indentation of WebSocket header files https://bugs.webkit.org/show_bug.cgi?id=67018 Reviewed by Kent Tamura. No new tests. Style fix only. * websockets/WebSocket.h: (WebCore::WebSocket::create): (WebCore::WebSocket::toWebSocket): (WebCore::WebSocket::refEventTarget): (WebCore::WebSocket::derefEventTarget): * websockets/WebSocketChannel.h: Removed formal parameter name of resumeTimerFired(). (WebCore::WebSocketChannel::create): (WebCore::WebSocketChannel::refThreadableWebSocketChannel): (WebCore::WebSocketChannel::derefThreadableWebSocketChannel): (WebCore::WebSocketChannel::isNonControlOpCode): (WebCore::WebSocketChannel::isControlOpCode): (WebCore::WebSocketChannel::isReservedOpCode): * websockets/WebSocketHandshake.h: Removed formal parameter name of setClientProtocol(). 2011-08-25 Martin Robinson <mrobinson@igalia.com> Touch GtkVersioning.c so that the release bot rebuilds it. This is necessary because of the switch to GTK+ 3.x. * platform/gtk/GtkVersioning.c: Touch this file. 2011-08-25 Ben Wells <benwells@chromium.org> Use PATH_BASED_BORDER_RADIUS_DRAWING for skia https://bugs.webkit.org/show_bug.cgi?id=65583 This change brings in the new border rendering for Skia. To support this without aliasing the skia graphics context has been updated to support anti-aliased clipping around convex polygons and also anti-aliased clipping outside a path. Reviewed by James Robinson. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): * rendering/RenderObject.h: 2011-08-25 Luke Macpherson <macpherson@chromium.org> Implement animation and transition properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=66126 Reviewed by Dean Jackson. No new tests. This is essentially a refactoring of the HANDLE_ANIMATION* and HANDLE_TRANSITION* macros in CSSStyleSelector.cpp. The only functional change is to iterate correctly over the lists instead of setting only the first element. See bug 66118 for details on that. * css/CSSStyleApplyProperty.cpp: Added new class ApplyPropertyAnimation to handle animation and transition properties. (WebCore::ApplyPropertyAnimation::ApplyPropertyAnimation): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyAnimation::setValue): (WebCore::ApplyPropertyAnimation::value): (WebCore::ApplyPropertyAnimation::test): (WebCore::ApplyPropertyAnimation::clear): (WebCore::ApplyPropertyAnimation::initial): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::accessAnimations): (WebCore::ApplyPropertyAnimation::animations): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: Removed animation and transition macros (celebrate!) (WebCore::CSSStyleSelector::applyProperty): Removed old implementations of animation and transition properties. * platform/animation/Animation.h: Changed return types of initial values to match the setters and getters. (WebCore::Animation::initialAnimationDelay): (WebCore::Animation::initialAnimationName): (WebCore::Animation::initialAnimationTimingFunction): 2011-08-25 Julien Chaffraix <jchaffraix@webkit.org> Concentrate RenderLayer repaint rects updates https://bugs.webkit.org/show_bug.cgi?id=64993 Reviewed by David Hyatt. The change moves the update of the repaint rects to 2 methods (computeRepaintRects and clearRepaintRects) to better track those changes. No new test, refactoring covered by the existing test cases. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Reverse the logic and calculate the new bounds upfront. This should have no impact as none of the methods rely on the internal value. (WebCore::RenderLayer::computeRepaintRects): Added the cachedOffset parameter to avoid breaking the performance optimization in updateLayerPositions. Added some ASSERTS. (WebCore::RenderLayer::clearRepaintRects): Added some ASSERTs here. (WebCore::RenderLayer::updateRepaintRectsAfterScroll): Added a FIXME as this method could use the cachedOffset trick too. (WebCore::RenderLayer::setHasVisibleContent): Changed the code to use computeRepaintRects. * rendering/RenderLayer.h: Updated the signature of computeRepaintRects and moved those 2 methods into the private section of the class. 2011-08-25 Van Lam <vanlam@google.com> Remove use of magic number -1 in WebCore/editing/visible_units.cpp https://bugs.webkit.org/show_bug.cgi?id=66980 Reviewed by Ryosuke Niwa. Replaced use of magic number -1 with constant offsetNotFound. * editing/visible_units.cpp: (WebCore::greatestOffsetUnder): (WebCore::smallestOffsetAbove): 2011-08-25 Igor Oliveira <igor.oliveira@openbossa.org> Rollout r93799: Caused bad clipping on the bottom of tall glyphs inside a button label * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderBox.cpp: * rendering/RenderBox.h: (WebCore::RenderBox::hasControlClip): (WebCore::RenderBox::controlClipRect): * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 2011-08-25 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> [Qt] Enable password echo on Symbian builds https://bugs.webkit.org/show_bug.cgi?id=66954 Reviewed by Chang Shu. No tests, as this is just a build change. * config.h: 2011-08-25 Nate Chapin <japhet@chromium.org> Windows build fix after r93811. * loader/cf/ResourceLoaderCFNet.cpp: (WebCore::ResourceLoader::shouldCacheResponse): 2011-08-25 Nate Chapin <japhet@chromium.org> Split some of the variables out of ThreadableLoaderOptions into a superclass, ResourceLoaderOptions. Use ResourceLoaderOptions all the way down to ResourceLoader. https://bugs.webkit.org/show_bug.cgi?id=63301 Reviewed by David Levin. No new tests, refractor only. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/DocumentThreadableLoader.cpp: * loader/MainResourceLoader.cpp: * loader/NetscapePlugInStreamLoader.cpp: * loader/ResourceLoadScheduler.cpp: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.cpp: * loader/ResourceLoader.h: * loader/ResourceLoaderOptions.h: Added. * loader/SubresourceLoader.cpp: * loader/SubresourceLoader.h: * loader/ThreadableLoader.h: * loader/cache/CachedResourceRequest.cpp: * loader/mac/ResourceLoaderMac.mm: 2011-08-25 Adam Klein <adamk@chromium.org> use strict in CodeGeneratorJS and CodeGeneratorV8 https://bugs.webkit.org/show_bug.cgi?id=66915 Reviewed by Darin Adler. Making these files "use strict" makes changing them less time-consuming and error-prone, and helps avoid accidentally adding dead code (added a FIXME for one such case). No expected change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): (GenerateParametersCheckExpression): (GenerateFunctionParametersCheck): (GenerateImplementation): (GenerateImplementationFunctionCall): (NativeToJSValue): (GenerateHashValue): * bindings/scripts/CodeGeneratorV8.pm: (AddIncludesForType): (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateNormalAttrSetter): (GetFunctionTemplateCallbackName): (GenerateNewFunctionTemplate): (GenerateParametersCheckExpression): (GenerateFunctionParametersCheck): (GenerateImplementation): (): 2011-08-25 Dean Jackson <dino@apple.com> https://bugs.webkit.org/show_bug.cgi?id=21586 Apply CSS animations and transitions to SVG properties Reviewed by Simon Fraser. Expose the applicable SVG properties from SVGRenderStyle to RenderStyle and add them to the list of animatable properties. There aren't many SVG properties that are animatable directly. SVGPaint (used in "fill" and "stroke") is supported only when both ends of the animation are a Color. Also updated SVGLength to have some methods for converting to and from user space units. Test: transitions/svg-transitions.html * page/animation/AnimationBase.cpp: (WebCore::blendFunc): Calls the blend method on SVGLength (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): New property wrapper type for SVGPaint (WebCore::PropertyWrapperSVGPaint::equals): (WebCore::PropertyWrapperSVGPaint::blend): (WebCore::AnimationBase::ensurePropertyMap): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::fillPaintType): (WebCore::InheritedFlags::fillPaintColor): (WebCore::InheritedFlags::setFillPaintColor): (WebCore::InheritedFlags::strokePaintType): (WebCore::InheritedFlags::strokePaintColor): (WebCore::InheritedFlags::setStrokePaintColor): (WebCore::InheritedFlags::strokeWidth): (WebCore::InheritedFlags::setStrokeWidth): (WebCore::InheritedFlags::strokeDashOffset): (WebCore::InheritedFlags::setStrokeDashOffset): (WebCore::InheritedFlags::strokeMiterLimit): (WebCore::InheritedFlags::setStrokeMiterLimit): (WebCore::InheritedFlags::stopOpacity): (WebCore::InheritedFlags::setStopOpacity): (WebCore::InheritedFlags::setStopColor): (WebCore::InheritedFlags::setFloodColor): (WebCore::InheritedFlags::setLightingColor): (WebCore::InheritedFlags::baselineShiftValue): (WebCore::InheritedFlags::setBaselineShiftValue): (WebCore::InheritedFlags::kerning): (WebCore::InheritedFlags::setKerning): (WebCore::InheritedFlags::stopColor): (WebCore::InheritedFlags::floodColor): (WebCore::InheritedFlags::lightingColor): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::stopColor): (WebCore::SVGRenderStyle::floodColor): (WebCore::SVGRenderStyle::lightingColor): * svg/SVGLength.cpp: (WebCore::SVGLength::value): (WebCore::SVGLength::setValue): (WebCore::SVGLength::convertValueFromUserUnits): (WebCore::SVGLength::convertValueToUserUnits): New conversion functions used when setting and getting values * svg/SVGLength.h: (WebCore::SVGLength::isZero): (WebCore::SVGLength::blend): Custom blend function that takes into account whether the units of a length can be converted in an animation, where you don't necessarily have an SVGElement for context. 2011-08-25 Kent Tamura <tkent@chromium.org> REGRESSION(r90971): Fix an assertion failure with textarea placeholder. https://bugs.webkit.org/show_bug.cgi?id=66164 Reviewed by Dave Hyatt. Minor patch nits addressed by inferno@chromium.org, on Hyatt's review. Test: fast/forms/textarea-placeholder-relayout-assertion.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::layoutSpecialExcludedChild): Pass 'false' to the 'markParents' argument of setChildNeedsLayout(). We don't need to propagate needsLayout for ancestors because layoutSpecialExcludedChild() is called from layout() of the parent. 2011-08-25 Igor Oliveira <igor.oliveira@openbossa.org> Text-overflow is broken for button elements https://bugs.webkit.org/show_bug.cgi?id=53438 Fix text-overflow for button elements. Make the element inside the button inherit the button controlClip. Reviewed by David Hyatt. Test: fast/css/button-overflow-ellipsis.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderBox.cpp: (WebCore::RenderBox::controlClipRect): * rendering/RenderBox.h: (WebCore::RenderBox::hasControlClip): * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 2011-08-24 Adrienne Walker <enne@google.com> [chromium] Update VideoLayerChromium to not access GC3D on the main thread https://bugs.webkit.org/show_bug.cgi?id=66434 Reviewed by James Robinson. Covered by existing tests. This change allows the main thread VideoLayerChromium to not depend on compositor thread resources (GC3D, LayerRendererChromium). The texture allocation in VideoLayerChromium was changed to use ManagedTexture so that textures can now be evicted when there is texture memory pressure and so that destruction can be automatically deferred until a GC3D is available. * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::size): (WebCore::ManagedTexture::format): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::~VideoLayerChromium): (WebCore::VideoLayerChromium::cleanupResources): (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::pushPropertiesTo): (WebCore::VideoLayerChromium::setLayerTreeHost): (WebCore::VideoLayerChromium::determineTextureFormat): (WebCore::VideoLayerChromium::reserveTextures): (WebCore::VideoLayerChromium::updateTexture): (WebCore::VideoLayerChromium::releaseCurrentFrame): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::setTexture): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-08-25 Abhishek Arya <inferno@chromium.org> Incorrect layout of :before and :after content, with display table, table-row and table-cell. https://bugs.webkit.org/show_bug.cgi?id=66699 Reviewed by David Hyatt. Tests: fast/table/table-after-child-in-table.html fast/table/table-before-child-in-table.html fast/table/table-cell-after-child-in-block.html fast/table/table-cell-after-child-in-table.html fast/table/table-cell-before-child-in-block.html fast/table/table-cell-before-child-in-table.html fast/table/table-row-after-child-in-block.html fast/table/table-row-after-child-in-table.html fast/table/table-row-before-child-in-block.html fast/table/table-row-before-child-in-table.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Fix the looping condition to detect :after child correctly. isAnonymousBlock() does not apply to tables, instead using isAnonymous(). * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): Don't add the new child in the generatedContainer with :before, :after content. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): Don't add the new child in the generatedContainer with :before, :after content. 2011-08-25 Sam Weinig <sam@webkit.org> JSHTMLImageElement (and associated Node) is abandoned when image load is canceled via beforeload <rdar://problem/9925630> https://bugs.webkit.org/show_bug.cgi?id=66906 Reviewed by Darin Adler. * loader/ImageLoader.cpp: (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): Very similar fix to the one in r93717 except this patches the case where the image load was canceled via beforeload. 2011-08-25 John Bates <jbates@google.com> [chromium] Leaking SkBitmaps for background images https://bugs.webkit.org/show_bug.cgi?id=66488 Reviewed by Stephen White. This patch simply changes NativeImageSkia to have a SkBitmap instead of deriving from SkBitmap. All dependent code updated to access the member instead of calling SkBitmap methods on NativeImageSkia objects. This may or may not fix the memory leak, but it's definitely a bug that could cause memory leaks. * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::createDragImageFromImage): * platform/graphics/chromium/PlatformImage.cpp: (WebCore::PlatformImage::updateFromImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha): (WebCore::BitmapImageSingleFrameSkia::size): (WebCore::BitmapImageSingleFrameSkia::notSolidColor): * platform/graphics/skia/GraphicsContext3DSkia.cpp: (WebCore::GraphicsContext3D::getImageData): * platform/graphics/skia/ImageSkia.cpp: (WebCore::paintSkBitmap): (WebCore::Image::drawPattern): (WebCore::BitmapImage::checkForSolidColor): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): (WebCore::NativeImageSkia::decodedSize): (WebCore::NativeImageSkia::resizedBitmap): * platform/graphics/skia/NativeImageSkia.h: (WebCore::NativeImageSkia::bitmap): * platform/graphics/skia/PatternSkia.cpp: (WebCore::Pattern::platformPattern): * platform/image-decoders/ImageDecoder.h: (WebCore::ImageFrame::getAddr): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::operator=): (WebCore::ImageFrame::clearPixelData): (WebCore::ImageFrame::zeroFillPixelData): (WebCore::ImageFrame::copyBitmapData): (WebCore::ImageFrame::setSize): (WebCore::ImageFrame::hasAlpha): (WebCore::ImageFrame::setHasAlpha): (WebCore::ImageFrame::width): (WebCore::ImageFrame::height): 2011-08-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93774. http://trac.webkit.org/changeset/93774 https://bugs.webkit.org/show_bug.cgi?id=66945 It broke 26 tests on the Qt bot (Requested by ossy on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): * platform/graphics/qt/PathQt.cpp: (WebCore::Path::boundingRect): 2011-08-25 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [refactoring] use PopoverHelper to implement popup in the SourceFrame https://bugs.webkit.org/show_bug.cgi?id=66858 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._showStringContentPopover): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.initializeView): (WebInspector.NetworkLogView.prototype.willHide): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype._showPopover): * inspector/front-end/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype.show): (WebInspector.Popover.prototype.dispose): (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseMove.doHide): (WebInspector.PopoverHelper.prototype._mouseMove): (WebInspector.PopoverHelper.prototype.hidePopover): (WebInspector.PopoverHelper.prototype._hidePopover): (WebInspector.PopoverHelper.prototype._mouseHover): (WebInspector.PopoverHelper.prototype._killHidePopupTimer): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._scroll): (WebInspector.SourceFrame.prototype._mouseDown): (WebInspector.SourceFrame.prototype._onHidePopover): (WebInspector.SourceFrame.prototype._shouldShowPopover): (WebInspector.SourceFrame.prototype._getPopoverAnchor): (WebInspector.SourceFrame.prototype._highlightExpression): (WebInspector.SourceFrame.prototype._onShowPopover.showObjectPopover): (WebInspector.SourceFrame.prototype._onShowPopover): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._showPopover): (WebInspector.TimelinePanel.prototype._closeRecordDetails): 2011-08-25 Pavel Feldman <pfeldman@google.com> [Qt] REGRESSION(93769): inspector/console/console-tests.html fails https://bugs.webkit.org/show_bug.cgi?id=66930 Reviewed by Yury Semikhatsky. Test: inspector/console/console-repeat-count.html * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel): (WebInspector.ConsoleModel.prototype.addMessage): (WebInspector.ConsoleModel.prototype.clearMessages): (WebInspector.ConsoleModel.prototype.interruptRepeatCount): (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleDispatcher.prototype.messageRepeatCountUpdated): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleMessageAdded): * inspector/front-end/inspector.js: 2011-08-25 Mikhail Naganov <mnaganov@chromium.org> Chromium: expose MemoryCache::prune and FontCache::purgeInactiveFontData. https://bugs.webkit.org/show_bug.cgi?id=66132 Reviewed by Tony Gentilcore. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::prune): (WebCore::MemoryCache::pruneToPercentage): * loader/cache/MemoryCache.h: Methods moved from .h to .cpp to work around compilation problem with the Win Chromium port. 2011-08-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93771. http://trac.webkit.org/changeset/93771 https://bugs.webkit.org/show_bug.cgi?id=66933 Broke css3/font-feature-settings-rendering.html on chromium mac 10.5 (Requested by podivilov on #webkit). * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): 2011-08-23 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt][WK2] Drive tiling from the WebProcess and reuse TiledBackingStore. https://bugs.webkit.org/show_bug.cgi?id=66771 Reviewed by Tor Arne Vestbø. We need the tiling logic to be moved to the web process to allow invalidated tile rects to be rendered with the same layout. This also allows the web process to render tiles into buffers readable directly by the GPU (on supported platforms). We also take the opportunity to use the TiledBackingStore in WebCore to have only one tiling implementation. Before this patch: - TiledDrawingAreaProxy manages tiles from the UI process. - TiledDrawingArea received rendering requests for a rect and returns the result to the proxy through shared memory. After this patch: - TiledDrawingArea uses a TiledBackingStore to manage tiles from the web process. - TiledBackingStoreRemoteTile forwards tile creations, update and removals to the proxy. - TiledDrawingAreaProxy updates the scene graph directly from requests. It also implements tile buffer swapping correctly in SGTileNode, triggered by the DidRenderFrame message. Render throttling is implemented by waiting in TiledDrawingArea for the UI process to notify us when the last rendered frame is ready to make it to the screen. TiledDrawingAreaTileSets have been replaced by using two instances of TiledBackingStore instead. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::updateTileBuffers): (WebCore::TiledBackingStore::coverageRatio): (WebCore::TiledBackingStore::startTileBufferUpdateTimer): * platform/graphics/TiledBackingStore.h: * platform/graphics/TiledBackingStoreClient.h: (WebCore::TiledBackingStoreClient::tiledBackingStoreIsUpdatingAllowed): 2011-08-23 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> TiledBackingStore: Untie the tile implementation from the platform. https://bugs.webkit.org/show_bug.cgi?id=66760 Reviewed by Kenneth Rohde Christiansen. Make the Tile class polymorphic and introduce TiledBackingStoreBackend as a Tile factory. * platform/graphics/Tile.h: (WebCore::Tile::~Tile): * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::paint): (WebCore::TiledBackingStore::createTiles): * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::client): * platform/graphics/TiledBackingStoreBackend.h: Added. (WebCore::TiledBackingStoreBackend::create): (WebCore::TiledBackingStoreBackend::~TiledBackingStoreBackend): (WebCore::TiledBackingStoreBackend::TiledBackingStoreBackend): * platform/graphics/qt/TileQt.cpp: (WebCore::TileQt::TileQt): (WebCore::TileQt::~TileQt): (WebCore::TileQt::isDirty): (WebCore::TileQt::isReadyToPaint): (WebCore::TileQt::invalidate): (WebCore::TileQt::updateBackBuffer): (WebCore::TileQt::swapBackBufferToFront): (WebCore::TileQt::paint): (WebCore::TiledBackingStoreBackend::paintCheckerPattern): (WebCore::TiledBackingStoreBackend::createTile): * platform/graphics/qt/TileQt.h: Copied from Source/WebCore/platform/graphics/Tile.h. (WebCore::TileQt::create): (WebCore::TileQt::coordinate): (WebCore::TileQt::rect): 2011-08-25 Andreas Kling <kling@webkit.org> [Qt] Path::boundingRect() is unnecessarily slow. https://bugs.webkit.org/show_bug.cgi?id=66854 Reviewed by Benjamin Poulain. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): Remove Qt-specific optimization since calling Path::boundingRect() will now do exactly the same thing. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::boundingRect): Return QPainterPath::controlPointRect() since that is much faster than computing the (precise) QPainterPath::boundingRect() and Path::boundingRect() is not expected to be 100% precise anyway. 2011-08-25 Yuta Kitamura <yutak@chromium.org> WebSocket: Queue messages to be sent https://bugs.webkit.org/show_bug.cgi?id=66298 Reviewed by Kent Tamura. Blobs must be read asynchronously and thus cannot be sent immediately. Therefore, we need to create a queue of messages to be sent in order to handle pending requests. No new tests. Strictly speaking, there is a small change in behavior but it is hard to reproduce in tests. See description of WebSocketChannel::send below. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::send): Now, this function always returns true if hybi-10 protocol is selected. The impact of this change should be minimum, because the current WebSocket API defines the return type of WebSocket.send() is void (see also bug 65850). It's hard to make SocketStreamHandle::send() fail deliberately, therefore it's difficult to write a test to detect this behavior change. (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::startClosingHandshake): (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::abortOutgoingFrameQueue): * websockets/WebSocketChannel.h: 2011-08-24 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Directional arrow on element info box looks terrible https://bugs.webkit.org/show_bug.cgi?id=66819 Beautify the tooltip arrow, give it a better alignment in some edge cases, and fix the tooltip font on Macs. Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-08-25 Jeremy Moskovich <jeremy@chromium.org> Remove ATSFont*() functions in favor of CGFont in FontCustomPlatformData.cpp https://bugs.webkit.org/show_bug.cgi?id=66629 As of r72774 and dropping support for OS X 10.4, we can safely remove the ATS APIs from FontCustomPlatformData.cpp in favor of just the CGFont code. This change is motivated by a bug in ATSFontDeactivite() on 10.7 which affects the Chromium port, due to its compiling once against the 10.5 SDK for all platforms - See crbug.com/93191 or rdar://9976774 . Reviewed by Dan Bernstein. No new tests - covered by existing tests. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): 2011-08-25 Pavel Feldman <pfeldman@google.com> Not reviewed: rollout r93768 for breaking build. * inspector/DOMNodeHighlighter.cpp: 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: split ConsoleView into the View and the Model. https://bugs.webkit.org/show_bug.cgi?id=66861 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/BreakpointManager.js: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype._format): * inspector/front-end/ConsoleModel.js: Added. (WebInspector.ConsoleModel): (WebInspector.ConsoleModel.prototype._setConsoleMessageExpiredCount): (WebInspector.ConsoleModel.prototype.addMessage): (WebInspector.ConsoleModel.prototype._incrementErrorWarningCount): (WebInspector.ConsoleModel.prototype.requestClearMessages): (WebInspector.ConsoleModel.prototype.clearMessages): (WebInspector.ConsoleDispatcher): (WebInspector.ConsoleDispatcher.prototype.messageAdded): (WebInspector.ConsoleDispatcher.prototype.messageRepeatCountUpdated): * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel): (WebInspector.ConsolePanel.prototype.performSearch): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView): (WebInspector.ConsoleView.prototype._consoleMessageAdded): (WebInspector.ConsoleView.prototype._appendConsoleCommand): (WebInspector.ConsoleView.prototype._appendConsoleCommandResult): (WebInspector.ConsoleView.prototype._appendConsoleMessage): (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._registerShortcuts): (WebInspector.ConsoleView.prototype._requestClearMessages): * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener): * inspector/front-end/NetworkLog.js: Copied from Source/WebCore/inspector/front-end/externs.js. (WebInspector.NetworkLog): (WebInspector.NetworkLog.prototype.get resources): (WebInspector.NetworkLog.prototype._frameNavigated): (WebInspector.NetworkLog.prototype._onResourceStarted): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.set finished): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._scriptForRawLocation): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent.appendChunk): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): * inspector/front-end/UISourceCode.js: (WebInspector.ContentProvider): (WebInspector.ContentProvider.prototype.requestContent): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (WebInspector.linkifyURLAsNode): (WebInspector.formatLinkText): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._updateErrorAndWarningCounts): (WebInspector.showConsole): 2011-08-24 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Directional arrow on element info box looks terrible https://bugs.webkit.org/show_bug.cgi?id=66819 Beautify the tooltip arrow, give it a better alignment in some edge cases, and fix the tooltip font on Macs. Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-08-25 Yuta Kitamura <yutak@chromium.org> Let MessageEvent.data hold SerializedScriptValue or String selectively https://bugs.webkit.org/show_bug.cgi?id=66841 Reviewed by Adam Barth. MessageEvent from WebSocket contains a String in its "data" attribute, but it does not have to be serialized. No new tests are added, because this is refactoring and the behavior should not change. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): To call putAnonymousValue(), "this" needs to be converted to non-const using const_cast<>. (WebCore::JSMessageEvent::initMessageEvent): Update the cache value as well. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): ForceSet() is used to cache a value. This is the same as what the code generated by CodeGeneratorV8 does. (WebCore::V8MessageEvent::initMessageEventCallback): * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): (WebCore::MessageEvent::data): This is only used within the Objective-C bindings (JSC and V8 have the custom functions). Since Objective-C code generator does not support [CustomGetter] IDL attribute, there is no good way to return a variant value for Objective-C bindings. * dom/MessageEvent.h: (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataType): (WebCore::MessageEvent::dataAsSerializedScriptValue): (WebCore::MessageEvent::dataAsString): * dom/MessageEvent.idl: * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveMessage): Construct a MessageEvent without serializing the received message. 2011-08-25 MORITA Hajime <morrita@google.com> Unreviewed, rolling out r93762. http://trac.webkit.org/changeset/93762 https://bugs.webkit.org/show_bug.cgi?id=66756 IndexedDb tests crash * WebCore.gypi: * WebCore.pro: * bindings/generic/EventConstructors.h: Removed. * bindings/v8/OptionsObject.cpp: * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Removed. * dom/Event.cpp: * dom/Event.h: (WebCore::Event::create): * dom/Event.idl: 2011-08-24 Kentaro Hara <haraken@google.com> Implement an Event constructor. https://bugs.webkit.org/show_bug.cgi?id=66756 Reviewed by Adam Barth. The spec of the Event constructor is here: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor. This patch added the Event constructor to EventConstructors.h using JavaScript implementation-independent macros. This patch also added the V8 implementation of these macros to V8EventConstructors.cpp. The bug 63878 has been implementing the Event constructors for JSC. Our plan is to first implement all the Event constructors for V8 using EventConstructors.h proposed in the JSC patch, and then merge the JSC patch with these V8 patches. In any case, we are going to split the patches for V8 and those for JSC in order to avoid hard regression. Test: fast/events/event-constructors.html * WebCore.gypi: Added V8EventConstructors.cpp. * WebCore.pro: Added V8EventConstructors.cpp. * bindings/generic/EventConstructors.h: Added. The Event constructor. This is written using JavaScript implementation-independent macros. The V8 implementation of these macros is written in bindings/v8/custom/V8EventConstructors.cpp. * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyDouble): Returns the value of a given key of type double. (WebCore::OptionsObject::getKey): Returns true whenever the given key is found, even if the value is null or undefined. * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns the value of the given key. We need to overload getKeyValue() for all types required to EventConfiguration members. * bindings/v8/custom/V8EventConstructors.cpp: Added. Implemented macros used in EventConstructors.h. (WebCore::constructV8Event): The Event constructor. * dom/Event.cpp: (WebCore::EventConfiguration::EventConfiguration): A constructor of EventConfiguration. (WebCore::Event::Event): A constructor of the Event class. * dom/Event.h: Added EventConfiguration, which manages attributes of the Event class. (WebCore::Event::create): A factory method of the Event class with EventConfiguration. * dom/Event.idl: Added 'CanBeConstructed' and 'V8CustomConstructor'. 2011-08-24 Philippe Normand <pnormand@igalia.com> [GTK] bump GStreamer requirement to 0.10.30 https://bugs.webkit.org/show_bug.cgi?id=66860 Reviewed by Martin Robinson. Use fast element linking by default. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::enterFullscreen): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 2011-08-24 James Robinson <jamesr@chromium.org> Some layerTreeAsText compositing tests are flaky https://bugs.webkit.org/show_bug.cgi?id=66913 Reviewed by Simon Fraser. Remove compositingLayerUpdatePending() and unconditionally update compositing layers when RenderLayerCompositor::layerTreeAsText(). compositingLayerUpdatePending() was only used by test code and is unreliable. Covered by compositing/ layerTreeAsText tests. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerTreeAsText): * rendering/RenderLayerCompositor.h: 2011-08-24 Kentaro Hara <haraken@google.com> Implement a keypath parser strictly following the specification https://bugs.webkit.org/show_bug.cgi?id=62288 Reviewed by Tony Chang. Implemented a keypath parser that accepts either an empty string, a JavaScript identifier, or multiple JavaScript identifiers separated by periods. We fixed createObjectStore() and createIndex() so that they parse and check their |keypath| argument and return an appropriate exception if the |keypath| is not valid. We also added unit tests for the new keypath parser in keypath-basics.html. Tests: storage/indexeddb/keypath-fetch-key.html storage/indexeddb/keypath-basics.html * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromSerializedValueAndKeyPath): Replaced IDBKeyPathElement with String (WebCore::injectIDBKeyIntoSerializedValue): Replaced IDBKeyPathElement with String * bindings/v8/IDBBindingUtilities.h: * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyStringWithUndefinedOrNullCheck): Returns false when a given value is null or undefined (WebCore::OptionsObject::getKey): Removed undefined check * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): Checks if a |keypath| argument is valid, and returns a NON_TRANSIENT_ERR if it is not valid * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): Removed null check of a keypath * storage/IDBKeyPath.cpp: (WebCore::IDBKeyPathLexer::currentElement): Part of the keypath parser (WebCore::IDBKeyPathLexer::lex): Part of the keypath parser (WebCore::IDBKeyPathLexer::lexIdentifier): Part of the keypath parser (WebCore::IDBIsValidKeyPath): Checks if a keypath is valid (WebCore::IDBParseKeyPath): Part of the keypath parser * storage/IDBKeyPath.h: Replaced IDBKeyPathElement with String * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): Checks if a |keypath| argument is valid, and returns a NON_TRANSIENT_ERR if it is not valid * storage/IDBObjectStore.idl: 2011-08-24 Eric Uhrhane <ericu@chromium.org> Reviewed by Adam Barth. [filesystem/Chromium] Filesystem paths need proper URL escaping https://bugs.webkit.org/show_bug.cgi?id=62811 Fix http://code.google.com/p/chromium/issues/detail?id=78860 by making KURLChromium.cpp's escaping code actually work. Make encodeWithURLEscapeSequences call into googleurl to do proper escaping. Tested in WebKit/chromium/tests/KURLTest.cpp. * platform/KURLGoogle.cpp: (WebCore::encodeWithURLEscapeSequences): 2011-08-24 Chris Palmer <palmer@google.com> Resolve potential integer overflow in memory allocation, and ensure that allocation succeeds. Reviewed by Kenneth Russell. * platform/audio/AudioArray.h: (WebCore::AudioArray::allocate): Check for integer overflow. (WebCore::AudioArray::at): Document the safety assertion. (WebCore::AudioArray::zero): Document the safety assertion. (WebCore::AudioArray::zeroRange): Document the safety assertion. (WebCore::AudioArray::copyToRange): Document the safety assertion. 2011-08-24 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Fix build with ENABLE_GEOLOCATION. https://bugs.webkit.org/show_bug.cgi?id=66881 Use adoptPtr() to create a new GeolocationService instance, otherwise the build will fail when creating the PassOwnPtr object. * platform/efl/GeolocationServiceEfl.cpp: (WebCore::GeolocationServiceEfl::create): 2011-08-24 Raphael Kubo da Costa <kubo@profusion.mobi> [CMake] Fix build with ENABLE_BLOB or ENABLE_FILE_SYSTEM. https://bugs.webkit.org/show_bug.cgi?id=66880 Generate and build some additional files required by these options. No new tests, as this is a build fix for some build options. * CMakeLists.txt: 2011-08-24 Iain Merrick <husky@google.com> [chromium] Don't call glDeleteTexture(0) in TextureManager https://bugs.webkit.org/show_bug.cgi?id=66862 Delete(0) is allowed in standard OpenGL, but not in Chrome. See http://code.google.com/p/chromium/issues/detail?id=85268 Reviewed by James Robinson. * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::deleteEvictedTextures): 2011-08-24 Adrienne Walker <enne@google.com> [chromium] Properly initialize CCTiledLayerImpl::m_skipsDraw https://bugs.webkit.org/show_bug.cgi?id=66889 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): 2011-08-24 Tom Sepez <tsepez@chromium.org> chromium WebFrameImpl - don't load javascript URLs against chrome internal pages. Adds a mechanism for registering sensitive schemes which should not be subject to manipulation by javascript urls typed into a location bar or, more importantly, their bookmarklet equivalents. https://bugs.webkit.org/show_bug.cgi?id=66720 Reviewed by Adam Barth. Test: Chromium WebKit API unit test in chromium specific directory. * platform/SchemeRegistry.cpp: (WebCore::notAllowingJavascriptURLsSchemes): (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): * platform/SchemeRegistry.h: 2011-08-24 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] Fix Element::getBoundingClientRect and Element::getClientRects for content flow https://bugs.webkit.org/show_bug.cgi?id=66641 Original author of the patch is Mihnea Ovidenie <mihnea@adobe.com>. Redirected the mapLocalToContainer method to the appropriate RenderRegion. Note: RenderObject::absoluteQuads method needs some refactor to support multiple regions, will do that in a separate bug. Reviewed by David Hyatt. Tests: fast/regions/flowed-content-bounding-client-rect-horizontal-bt.html fast/regions/flowed-content-bounding-client-rect-vertical-rl.html fast/regions/flowed-content-bounding-client-rect-vertical.html fast/regions/flowed-content-bounding-client-rect.html fast/regions/flowed-content-transform-bounding-client-rect.html * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::mapFromFlowToRegion): * rendering/RenderFlowThread.h: 2011-08-24 Alok Priyadarshi <alokp@chromium.org> [chromium] Root layer is not updated when only a portion of tile is updated https://bugs.webkit.org/show_bug.cgi?id=66506 This only happened in the accelerated path which changes stencil state. Incorrect stencil state was used to draw the root layer. Reviewed by James Robinson. Test: compositing/overflow/overflow-scroll.html (existing) * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): 2011-08-24 Nate Chapin <japhet@chromium.org> Fix an intermittent crash in EventSource, when a reconnect timer triggers after a navigation away from the current page begins. https://bugs.webkit.org/show_bug.cgi?id=45202 Reviewed by Alexey Proskuryakov. Test: http/tests/eventsource/eventsource-reconnect-during-navigate-crash.html * page/EventSource.cpp: (WebCore::EventSource::connect): Don't set m_requestInFlight to true if ThreadableLoader::create() failed. 2011-08-24 Mike Reed <reed@google.com> Change clip routine to promote the clipbounds up to (local) floats and then perform the intersection, rather than rounding the srcRect down to integers. https://bugs.webkit.org/show_bug.cgi?id=66810 Reviewed by Kenneth Russell. No new tests. Existing tests that resize images will exercise this code path * platform/graphics/skia/SkiaUtils.cpp: (WebCore::ClipRectToCanvas): 2011-08-24 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderRegion is not used if there's another renderer after it https://bugs.webkit.org/show_bug.cgi?id=66844 There was no call to attachRegion in RenderObjectChildList::insertChildNode, so the region was not added to the RenderFlowThread. Reviewed by David Hyatt. Test: fast/regions/content-flowed-into-regions-dynamically-inserted.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): 2011-08-24 Sam Weinig <sam@webkit.org> JSHTMLImageElement (and associated Node) is abandoned when image load is canceled <rdar://problem/9925630> https://bugs.webkit.org/show_bug.cgi?id=66864 Reviewed by Anders Carlsson. In the JSC bindings, we use HTMLImageElement::hasPendingActivity() (which in turn calls HTMLImageLoader::haveFiredLoadEvent()) to reason about the liveness of JSHTMLImageElements. In the case that an image load is canceled, the haveFiredLoadEvent never true, so the JSHTMLImageElement is kept alive forever (and since it references the global object, it keeps the entire graph alive as well). * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): Set m_firedLoad to true in the case of a canceled load, to reset the state back to its initial values. 2011-08-24 Tommy Widenflycht <tommyw@google.com> MediaStream API: add createObjectURL functionality https://bugs.webkit.org/show_bug.cgi?id=65925 This patch introduces the functionality for generating the url associated with a MediaStream, which can then be assigned to the src attribute of the <video> tag for example. Reviewed by Adam Barth. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::createPublicBlobURL): (WebCore::ScriptExecutionContext::revokePublicBlobURL): * dom/ScriptExecutionContext.h: * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * html/DOMURL.h: * html/DOMURL.idl: * platform/MediaStreamRegistry.cpp: Added. (WebCore::MediaStreamRegistry::registry): (WebCore::MediaStreamRegistry::registerMediaStreamURL): (WebCore::MediaStreamRegistry::unregisterMediaStreamURL): (WebCore::MediaStreamRegistry::mediaStream): * platform/MediaStreamRegistry.h: Copied from Source/WebCore/html/DOMURL.h. Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code. 2011-08-23 David Levin <levin@chromium.org> MessageEvent.ports shouldn't ever be null. https://bugs.webkit.org/show_bug.cgi?id=66789 Reviewed by Darin Adler. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::ports): Never return null. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::portsAccessorGetter): Ditto. 2011-08-24 Alexandru Chiculita <achicu@adobe.com> https://bugs.webkit.org/show_bug.cgi?id=66799 RenderFlowThread creates a list of child elements, so that it can search the insertion point of a new element without searching the whole DOM. The issue is that it used addChild/removeChild, but that wasn't taking care of elements added in anonymous blocks created inside the RenderFlowThread. Reviewed by David Hyatt. Test: fast/regions/flow-anonymous-children.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::nextRendererForNode): (WebCore::RenderFlowThread::previousRendererForNode): (WebCore::RenderFlowThread::addFlowChild): (WebCore::RenderFlowThread::removeFlowChild): * rendering/RenderFlowThread.h: * rendering/RenderObjectChildList.cpp: (WebCore::renderFlowThreadContainer): (WebCore::RenderObjectChildList::removeChildNode): (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: Add 9 more javascript files to the compilation. https://bugs.webkit.org/show_bug.cgi?id=66847 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/BreakpointManager.js: * inspector/front-end/CSSStyleModel.js: * inspector/front-end/Checkbox.js: * inspector/front-end/ConsoleMessage.js: Added. (WebInspector.ConsoleStackFrame): (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleMessage.prototype.get stackTrace): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded): (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated): * inspector/front-end/CookieParser.js: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/InspectorFrontendHostStub.js: (WebInspector.isMac): * inspector/front-end/NetworkManager.js: * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.setPropertyValue): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.Type.Document.0.Stylesheet.1.Image.2.Font.3.Script.4.XHR.5.WebSocket.7.Other.8.isTextType): (WebInspector.Resource.Type.toUIString): (WebInspector.Resource.Type.toString): (WebInspector.Resource.prototype._checkWarnings): (WebInspector.ResourceDomainModelBinding): (WebInspector.ResourceDomainModelBinding.prototype.canSetContent): (WebInspector.ResourceDomainModelBinding.prototype.setContent): * inspector/front-end/ResourceCategory.js: (WebInspector.ResourceCategory): (WebInspector.ResourceCategory.prototype.toString): (WebInspector.ResourceCategory.prototype.get title): * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype._didFormatContent): (WebInspector.FormatterMappingPayload): * inspector/front-end/TimelineManager.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (console.assert): (WebInspector.linkifyURLAsNode): (WebInspector.linkifyStringAsFragment): (WebInspector.UIString): (Element.prototype.scrollIntoViewIfNeeded): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.UIString): * inspector/front-end/treeoutline.js: * inspector/front-end/utilities.js: * inspector/generate-protocol-externs: 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: extract ConsoleMessage into a separate file. https://bugs.webkit.org/show_bug.cgi?id=66853 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleMessage.js: Added. (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._linkifyLocation): (WebInspector.ConsoleMessage.prototype._linkifyCallFrame): (WebInspector.ConsoleMessage.prototype.isErrorOrWarning): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.valueFormatter): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.append): (WebInspector.ConsoleMessage.prototype.clearHighlight): (WebInspector.ConsoleMessage.prototype.highlightSearchResults): (WebInspector.ConsoleMessage.prototype.matchesRegex): (WebInspector.ConsoleMessage.prototype.toMessageElement): (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement): (WebInspector.ConsoleMessage.prototype._updateRepeatCount): (WebInspector.ConsoleMessage.prototype.toString): (WebInspector.ConsoleMessage.prototype.isEqual): (WebInspector.ConsoleMessage.prototype.get stackTrace): * inspector/front-end/ConsoleView.js: * inspector/front-end/WebKit.qrc: 2011-08-24 Tatiana Meshkova <tatiana.meshkova@nokia.com> Paint SliderTrack and SliderThumb independently. https://bugs.webkit.org/show_bug.cgi?id=50453 Also fixes https://bugs.webkit.org/show_bug.cgi?id=65456 crash. Reviewed by Kenneth Rohde Christiansen. RenderSlider works only with <input type=range>. Nowadays RenderTheme supports painting of SliderTrack and SliderThumb without range input. In order to be in sync with other platforms this patch gets rid of upcasting in RenderThemeQt::paintSliderTrack and allows to paint SliderTrack and SliderThumb independently. Test: platform/qt/fast/forms/range/slider-crash.html * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintSliderTrack): Draw SC_SliderGroove. Allow paintSliderThumb() to care about SC_SliderHandle. We don't need to setup value and position anymore, since handle is drawn separately. Draw focus explicitly, since QStyleOptionSlider doesn't allow to focus on CC_Slider without handle subcontrol. (WebCore::RenderThemeQt::paintSliderThumb): Draw SC_SliderHandle. 2011-08-23 Pavel Feldman <pfeldman@google.com> Web Inspector: annotate and prepare for compilation first 14 JavaScript files within 4 modules. https://bugs.webkit.org/show_bug.cgi?id=66776 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ContextMenu.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMAgent.prototype._childNodeRemoved): (WebInspector.DOMAgent.prototype._inspectElementRequested): (WebInspector.DOMDispatcher.prototype.inspectElementRequested): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.Location): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._inspectElementRequested): * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/KeyboardShortcut.js: * inspector/front-end/Object.js: (WebInspector.Object.prototype.addEventListener): (WebInspector.Object.prototype.removeEventListener): (WebInspector.Object.prototype.hasEventListeners): * inspector/front-end/Panel.js: (WebInspector.Panel): * inspector/front-end/Placard.js: * inspector/front-end/Popover.js: (WebInspector.Popover.prototype.show): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): (WebInspector.StorageCategoryTreeElement): * inspector/front-end/Script.js: (WebInspector.Script.prototype.editSource): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/Settings.js: (WebInspector.Settings): (WebInspector.Settings.prototype.createSetting): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype._menuItemMouseUp): (.WebInspector.SoftContextMenu.prototype._triggerAction): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): * inspector/front-end/TabbedPane.js: * inspector/front-end/TextPrompt.js: * inspector/front-end/UserMetrics.js: * inspector/front-end/View.js: * inspector/front-end/externs.js: (JSON.parse): (JSON.stringify): * inspector/front-end/inspector.js: (): * inspector/generate-protocol-externs: 2011-08-24 Andreas Kling <kling@webkit.org> SelectElementData: Reorder members to reduce memory usage. https://bugs.webkit.org/show_bug.cgi?id=66787 Reviewed by Darin Adler. Reduced the size of SelectElementData by 24 bytes on 64-bit by rearranging its data members. Also added missing initialization of m_userDrivenChange. * dom/SelectElement.cpp: (WebCore::SelectElementData::SelectElementData): * dom/SelectElement.h: 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: clearPseudoState should retain Element while clearing its state. https://bugs.webkit.org/show_bug.cgi?id=66790 Reviewed by Yury Semikhatsky. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearPseudoState): 2011-08-23 Mark Hahnenberg <mhahnenberg@apple.com> Add checks to ensure allocation does not take place during initialization of GC-managed objects https://bugs.webkit.org/show_bug.cgi?id=65288 Reviewed by Darin Adler. No new tests. Adding the new validation functionality. In its current state, it will performs checks, but they don't fail unless you do allocation in the arguments to the parent constructor in the initialization list of a class. The allocateCell() method turns on the global flag disallowing any new allocations, and the constructorBody() method in JSCell turns it off. This way, allocation is still allowed in constructor bodies while other refactoring efforts continue. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::operator new): * bindings/js/JSDOMWindowShell.h: 2011-08-23 Scott Byer <scottbyer@chromium.org> ScrollAnimatorNone coasting implementation https://bugs.webkit.org/show_bug.cgi?id=66258 Increase the animation time based on the velocity of the scroll, up to a maximum amount. Fix bugs found by additional unit testing. Reviewed by James Robinson. Additional tests in ScrollAnimatorNoneTest: CurveMathQuartic, CurveMathCoast, ScrollOnceQuartic, ScrollTwiceCubic, ScrollLotsCubic, ScrollLotsCubicSmoothed, ScrollUpToBumperCoast, ScrollDownToBumperCoast, VaryingInputsEquivalency, VaryingInputsEquivalencyCoast, VaryingInputsEquivalencyCoastLarge, VaryingInputsEquivalencyCoastSteep * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::Parameters::Parameters): (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::coastCurve): (WebCore::ScrollAnimatorNone::PerAxisData::curveIntegralAt): (WebCore::ScrollAnimatorNone::PerAxisData::attackArea): (WebCore::ScrollAnimatorNone::PerAxisData::releaseArea): (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData): (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::PerAxisData::updateVisibleLength): (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::scroll): (WebCore::ScrollAnimatorNone::willEndLiveResize): (WebCore::ScrollAnimatorNone::didAddVerticalScrollbar): (WebCore::ScrollAnimatorNone::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorNone::updateVisibleLengths): * platform/ScrollAnimatorNone.h: 2011-08-23 James Robinson <jamesr@chromium.org> [chromium] Need a way to test lost compositor context recovery https://bugs.webkit.org/show_bug.cgi?id=66820 Reviewed by Kenneth Russell. Adds support for recreating a context as if it was lost, and fixes compositeAndReadback() to attempt context recovery. Test: platform/chromium/compositing/lost-compositor-context.html * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::loseCompositorContext): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-08-23 Nat Duca <nduca@chromium.org> [chromium] Implement CCThread in terms of WebThread https://bugs.webkit.org/show_bug.cgi?id=66610 Reviewed by Darin Fisher. * WebCore.gypi: * platform/graphics/chromium/cc/CCCompletionEvent.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::client): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy): * platform/graphics/chromium/cc/CCThread.h: (WebCore::CCThread::~CCThread): 2011-08-23 Iain Merrick <husky@google.com> [chromium] Renderer crashes when about:gpucrash is loaded https://bugs.webkit.org/show_bug.cgi?id=66814 WebViewImpl::didRecreateGraphicsContext() was calling setRootLayer() on the CC layer tree, but the root layer doesn't actually change and the code wasn't defensive against this. This CL adds some asserts to catch tree corruption and removes the unnecessary calls. Reviewed by James Robinson. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setParent): * platform/graphics/GraphicsLayer.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setParent): (WebCore::LayerChromium::hasAncestor): * platform/graphics/chromium/LayerChromium.h: 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93645. http://trac.webkit.org/changeset/93645 https://bugs.webkit.org/show_bug.cgi?id=66828 Broke webkit_unit_tests on chromium mac (Requested by jamesr on #webkit). * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-23 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66244 Cached pages don't fully update when going back after changing the display scale factor -and corresponding- <rdar://problem/9955656> Reviewed by Darin Adler. This patch adds a generalized concept of needing a full style recalc to the BackForwardController. So when the display scale factor is changed, the BackForwardController can be informed that all pages will need a full style recalc when they come out of the cache. This same mechanism is also used to fix a long- standing bug with full-page/text zoom. Iterate through the HistoryItems and mark all CachedPages as needing a full style recalc. * history/BackForwardController.cpp: (WebCore::BackForwardController::markPagesForFullStyleRecalc): * history/BackForwardController.h: ChachedPage has a new bool -- m_needsFullStyleRecalc -- to track whether a full style recalc is needed when the CachedPage is restored. * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): * history/CachedPage.h: (WebCore::CachedPage::markForFullStyleRecalc): HistoryItem actually takes care of calling into CachedPage. * history/HistoryItem.cpp: (WebCore::HistoryItem::markForFullStyleRecalc): * history/HistoryItem.h: Fix style recalc issues for full-page/text zoom by calling our new function on PageCache. * page/Frame.cpp: (WebCore::Frame::setPageAndTextZoomFactors): Fix style recalc issues for display scale factor changes by calling our new function on PageCache. * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): 2011-08-23 Anders Carlsson <andersca@apple.com> Fix build. * inspector/InstrumentingAgents.cpp: 2011-08-23 Chang Shu <cshu@webkit.org> Added support for momentarily revealing last typed character in password input. Code change was partially based on Apple's iOS code and Samuel Nevala's work. https://bugs.webkit.org/show_bug.cgi?id=32509 Reviewed by Alexey Proskuryakov. * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): * rendering/RenderText.cpp: (WebCore::SecureTextTimer::SecureTextTimer): (WebCore::SecureTextTimer::restartWithNewText): (WebCore::SecureTextTimer::invalidate): (WebCore::SecureTextTimer::lastTypedCharacterOffset): (WebCore::SecureTextTimer::fired): (WebCore::RenderText::willBeDestroyed): (WebCore::RenderText::setTextInternal): (WebCore::RenderText::secureText): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderText.h: (WebCore::RenderText::isSecure): * testing/Internals.cpp: (WebCore::Internals::setPasswordEchoEnabled): Fixed some silly coding in Internals. (WebCore::Internals::setPasswordEchoDurationInSeconds): (WebCore::Internals::reset): 2011-08-23 Dmitry Lomov <Dmitry Lomov (dslomov@google.com)> https://bugs.webkit.org/show_bug.cgi?id=66751 [Chromium]WebWorkerClientImpl should always invoke InspectorIntrumentation on main thread. The fix moves calls to InspectorInstrumentation from WebWorkerClientImpl to unedrlying WorkerMessagingProxy. Reviewed by Pavel Feldman. Covered by existing tests. * inspector/InstrumentingAgents.cpp: (WebCore::instrumentationForPage): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): (WebCore::WorkerMessagingProxy::terminateWorkerContext): 2011-08-23 Misha Tyutyunik <michael.tyutyunik@nokia.com> [Qt] Button text is invisible when mobile theme is in use and application palette set to use light text color. https://bugs.webkit.org/show_bug.cgi?id=66635 When mobile theme is in use and application palette is using light color to display text button text becomes invisible. The reason for that is that in RenderThemeQt::systemFont() we are using application pallete while when are painting buttons lightGrayPalette is used. Calling setPaletteFromPageClientIfExists() takes care of the issue. Reviewed by Andreas Kling. Covered by existing tests. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::systemColor): 2011-08-23 Tony Chang <tony@chromium.org> Add handling of mix-width and max-width for flexitems https://bugs.webkit.org/show_bug.cgi?id=66723 Reviewed by David Hyatt. If we flex past a min/max width value, we need to mark the flexitem as a fixed width and re-start the flexing algorithm. We use a HashMap to keep track of fixed width items. This patch also split out the size computation from the actual layout to avoid unnecessary layouts caused by restarting the flexing algorithm. Test: css3/flexbox/003.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm): * rendering/RenderFlexibleBox.h: 2011-08-23 Pratik Solanki <psolanki@apple.com> ResourceRequest::setStorageSession should update NSURLRequest as well https://bugs.webkit.org/show_bug.cgi?id=66811 Reviewed by Darin Adler. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::setStorageSession): Update the m_nsRequest field as well since we have a new CFURLRequestRef. 2011-08-23 James Robinson <jamesr@chromium.org> [chromium] Remove obsolete child context list from LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=66743 Reviewed by Kenneth Russell. Before we had proper semantics for flush() in the command buffer, we used a scheme of latches across contexts to ensure consistent frames were presented for WebGL and canvas. We no longer have latches and flush is a proper synchronization primative, so the child context list no longer does anything. Canvas2DLayerChromium and WebGLLayerChromium's implementations of updateCompositorResources() do flushes on the appropriate context already - canvas layers via DrawingBuffer::publishToPlatformLayer(), and WebGL layers via the call to prepareTexture(). No new tests since the code being removed doesn't do anything. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::setDrawingBuffer): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::~WebGLLayerChromium): (WebCore::WebGLLayerChromium::setContext): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-08-23 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Use a custom pattern image for rubber banding overhang area https://bugs.webkit.org/show_bug.cgi?id=66707 Reviewed by Dimitri Glazkov. No new tests since its just changing the Chromium-specific overhang pattern. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-23 Tatiana Meshkova <tatiana.meshkova@nokia.com> Prepare to paint slider thumb separately. Provide proper size values for vertical SliderThumb. https://bugs.webkit.org/show_bug.cgi?id=66732 Reviewed by Kenneth Rohde Christiansen. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustSliderThumbSize): Swap length and thickness for sliderthumb-vertical. 2011-08-23 Adrienne Walker <enne@google.com> [chromium] Fix potential nullptr deref in TiledLayerChromium::pushPropertiesTo https://bugs.webkit.org/show_bug.cgi?id=66808 Reviewed by James Robinson. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-08-23 Peter Kasting <pkasting@google.com> Unreviewed, rolling out r93452. http://trac.webkit.org/changeset/93452 https://bugs.webkit.org/show_bug.cgi?id=66423 Broke Leopard, Snowleopard, and Chromium bots * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-08-23 Ahmad Sharif <asharif@chromium.org> Fixed warnings produced by gcc-4.6.0. https://bugs.webkit.org/show_bug.cgi?id=62168 Reviewed by Adam Barth. * dom/Element.cpp: (WebCore::Element::recalcStyle): * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt): * thirdparty: Copied from Source/WebCore/thirdparty. 2011-08-23 Alexandru Chiculita <achicu@adobe.com> Text overlaps with the floats https://bugs.webkit.org/show_bug.cgi?id=66671 The problem was that LineWidth::fitBelowFloats is not updating the m_left and m_right fields. Next time LineWidth::shrinkAvailableWidthForNewFloatIfNeeded was called the width was recalculated using the old values, making the line bigger. Reviewed by David Hyatt. Test: fast/block/float/fit_line_below_floats.html * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitBelowFloats): 2011-08-23 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderFlowThread layout should use the attached region sizes https://bugs.webkit.org/show_bug.cgi?id=66143 When RenderFlowThread is doing the layout it also sets the current RenderFlowThread on the RenderView. RenderFlowThread cannot be nested inside a single RenderView, so there's no need to put that on the LayoutState. The right offset used to layout the inlines inside a RenderFlowThread is now adjusted to fit inside the current region. Reviewed by David Hyatt. Tests: fast/regions/webkit-flow-floats-inside-regions-bounds.html fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-rl.html fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical.html fast/regions/webkit-flow-inlines-inside-regions-bounds.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): * rendering/RenderFlowThread.h: (WebCore::RegionFittingDisabler::RegionFittingDisabler): (WebCore::RegionFittingDisabler::~RegionFittingDisabler): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThread): (WebCore::RenderView::currentRenderFlowThread): (WebCore::RenderView::setCurrentRenderFlowThread): (WebCore::RenderView::pushLayoutState): 2011-08-23 Alexandru Chiculita <achicu@adobe.com> Text-indent and floats push the text out of the container box https://bugs.webkit.org/show_bug.cgi?id=66662 Text indent was not propagated when a new float was pushed on the line. It was only calculated when the logicalLeft/RightOffsetForLine was called. Because of that RenderBlock::LineBreaker::nextLineBreak used a bigger width than actually available and made the line render on top of the borders. Reviewed by David Hyatt. Tests: fast/block/float/floats-and-text-indent-rl.html fast/block/float/floats-and-text-indent.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::textIndentOffset): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): 2011-08-23 Al Patrick <apatrick@chromium.org> Add shareResources flag to 3D graphics context attributes https://bugs.webkit.org/show_bug.cgi?id=66516 Reviewed by James Robinson. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::Attributes::Attributes): * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::create): 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93616. http://trac.webkit.org/changeset/93616 https://bugs.webkit.org/show_bug.cgi?id=66796 "causes fast/css/absolute-child-with-percent-height-inside- relative-parent.html to fail" (Requested by mwenge2 on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock): * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): (WebCore::setStaticPositions): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-07-25 Robert Hogan <robert@webkit.org> div align="center" rendering problem https://bugs.webkit.org/show_bug.cgi?id=4860 Reviewed by David Hyatt. Tests: fast/inline/absolute-positioned-block-in-centred-block.html fast/inline/absolute-positioned-inline-in-centred-block.html When an element with absolute position was the sole or first child of a render block with centred alignment, it wasn't obeying its parent's alignment. However it would obey the alignment if it was preceded by some text. The problem was that the element's render object was getting skipped as leading white space, so it was not included in a normal line block in a bidi run. Instead, its position was getting set by RenderBlockLineLayout::setStaticPositions() which does not pay attention to alignment. Preceding the element with some text allowed the object to get included in a Bidi run and so get a linebox which would get properly aligned. The fix is to get RenderBlockLineLayout::setStaticPositions() to obey the alignment specified by the object's container. This allows WebKit to get the same result on the test as Firefox and IE. Opera has the same bug as unpatched WebKit. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock): use startAlignedOffsetForBlock * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine and use startAlignedOffsetForBlock (WebCore::RenderBlock::LineBreaker::nextLineBreak): use startAlignedOffsetForLine (WebCore::RenderBlock::startAlignedOffsetForBlock): New function, find the aligned offset using updateLogicalWidthForAlignment (WebCore::RenderBlock::startAlignedOffsetForLine): ditto * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine. (WebCore::RenderBlock::startAlignedOffsetForLine): New function, find the aligned offset using updateLogicalWidthForAlignment 2011-08-23 Adrienne Walker <enne@google.com> [chromium] Remove LayerRendererChromium references from TiledLayerChromium https://bugs.webkit.org/show_bug.cgi?id=66433 Reviewed by James Robinson. Covered by existing tests. Updated TiledLayerChromium and the texture updater classes to not access LayerRendererChromium or cache GraphicsContext3D. Some settings like max texture size were moved from LayerRendererChromium to CCLayerTreeHost in order to facilitate this refactoring. LayerTextureUpdaterSkPicture has been #ifdef'd to only work when the compositor is not threaded. It will need to be refactored more in order to not own graphics resources from the main thread. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::create): (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater): (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::createTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerRenderer): (WebCore::LayerChromium::setLayerTreeHost): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::LayerTextureUpdater): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas): (WebCore::LayerTextureUpdaterBitmap::create): (WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap): (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::create): (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: (WebCore::LayerTextureUpdaterSkPicture::context): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::prepareToUpdate): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::layerRenderer): (WebCore::CCLayerTreeHost::contextSupportsMapSub): (WebCore::CCLayerTreeHost::maxTextureSize): (WebCore::CCLayerTreeHost::bestTextureFormat): 2011-08-23 Julien Chaffraix <jchaffraix@webkit.org> Reduce the amount of RenderLayer rectangles' update when scrolling https://bugs.webkit.org/show_bug.cgi?id=66618 Reviewed by David Hyatt. This patch avoids recomputing the RenderLayers rectangles if not needed. The current code path for scrolling would update RenderLayers' repaint rectangles twice. However we do need to update only children of a fixed element as they are the only type of layers that move during a scroll. We just change a call to updateLayerPositions for a call to updateLayerPositionsAfterScroll. updateLayerPositions being pessimist about the layer's state - because it is called after layout - it is missing some optimization that can be done during scrolling. Tests: fast/repaint/scroll-absolute-layer-with-reflection.html fast/repaint/scroll-fixed-layer-with-reflection.html fast/repaint/scroll-fixed-layer-with-transformed-parent-layer.html fast/repaint/scroll-fixed-reflected-layer.html fast/repaint/scroll-in-clipped-layer.html fast/repaint/scroll-in-fixed-layer.html fast/repaint/scroll-in-transformed-layer.html fast/repaint/scroll-with-transformed-parent-layer.html * rendering/RenderLayer.h: * page/FrameView.cpp: (WebCore::FrameView::repaintFixedElementsAfterScrolling): Updated those 2 call sites after updateRepaintRectsAfterScroll renaming. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Beefed up the method to take care of also updating the layer's position (that sounded like a bug in the previous code that is covered by the tests above). Note that we don't care if one of our ancestor has a fixed position as we are scrolling *inside* this ancestor. (WebCore::RenderLayer::scrollTo): Call updateLayerPositionsAfterScroll instead of updateLayerPositions. 2011-08-23 Jeffrey Pfau <jpfau@apple.com> New XML parser: pretty XML tree viewer https://bugs.webkit.org/show_bug.cgi?id=66489 Reviewed by Adam Barth. * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::finish): 2011-08-23 Jessie Berlin <jberlin@apple.com> Build fix. * inspector/InspectorDOMAgent.h: HighlightData is a struct, not a class. 2011-08-23 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] provide access to page resources https://bugs.webkit.org/show_bug.cgi?id=66767 Reviewed by Pavel Feldman. Test: inspector/extensions/extensions-resources.html * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype.addListener): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.RequestImpl.prototype.getContent): (WebInspector.injectedExtensionAPI.InspectedWindow.resourceDispatch): (WebInspector.injectedExtensionAPI.InspectedWindow.resourceContentDispatch): (WebInspector.injectedExtensionAPI.InspectedWindow): (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.eval): (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.getResources): (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.getResources.callbackWrapper): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.get url): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.get type): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.getContent): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.setContent): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._notifyResourceAdded): (WebInspector.ExtensionServer.prototype.notifyResourceContentCommitted): (WebInspector.ExtensionServer.prototype._makeResource): (WebInspector.ExtensionServer.prototype._onGetPageResources): (WebInspector.ExtensionServer.prototype._getResourceContent): (WebInspector.ExtensionServer.prototype._onGetRequestContent): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): (WebInspector.ExtensionServer.prototype.initExtensions): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.addRevision): 2011-08-23 Pavel Feldman <pfeldman@google.com> Not reviewed: fixing build. One line drive-by typo fix in the inspector shortcut (Esc -> Backspace). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightFrame): * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyDown): 2011-08-23 Alexander Pavlov <apavlov@chromium.org> Web Inspector: differentiate element highlight colors for margin and padding https://bugs.webkit.org/show_bug.cgi?id=37768 The highlighting WIP API is slightly changed: clients will specify colors for certain elements of the highlighted objects, rather than a generic "highlighting mode". This allows to: - use entirely custom colors for highlighting (and vary them over time); - display any combination of fill/outline for the highlighted area; - highlight any combinations of element parts. Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawHighlight): * inspector/DOMNodeHighlighter.h: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::parseColor): (WebCore::parseConfigColor): (WebCore::InspectorDOMAgent::~InspectorDOMAgent): (WebCore::InspectorDOMAgent::clearFrontend): (WebCore::InspectorDOMAgent::highlightedNode): (WebCore::InspectorDOMAgent::handleMousePress): (WebCore::InspectorDOMAgent::mouseDidMoveOverElement): (WebCore::InspectorDOMAgent::setSearchingForNode): (WebCore::InspectorDOMAgent::setInspectModeEnabled): (WebCore::InspectorDOMAgent::setHighlightDataFromConfig): (WebCore::InspectorDOMAgent::highlight): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightNode): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::hideHighlight): (WebCore::InspectorDOMAgent::drawHighlight): * inspector/InspectorDOMAgent.h: * inspector/front-end/Color.js: (WebInspector.Color.fromRGBA): (WebInspector.Color.prototype.toProtocolRGBA): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.setSearchingForNode): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode.handleMouseOver): (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode.handleMouseOut): (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.set hovered): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._highlightRect): * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: (WebInspector.buildHighlightConfig): (WebInspector.highlightDOMNode): 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93579. http://trac.webkit.org/changeset/93579 https://bugs.webkit.org/show_bug.cgi?id=66774 "ASSERTION FAILED: m_purgePreventCount" (Requested by tonyg-cr on #webkit). * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-08-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Fix build on Lion https://bugs.webkit.org/show_bug.cgi?id=66770 Reviewed by Andreas Kling. We were mistakenly picking up mac/WebCoreSystemInterface.h instead of the Qt one, and building on Lion revealed this when a typedef for IOSurfaceRef was wrapped in PLATFORM(MAC). For now we fix this by including WebCoreSystemInterface using brackets, so that we'll pick up the right file based on the include paths. This also means exposing a few missing enums in our own version of the file, so those were added. Lasty, we need to link against the right system interface library on Lion. * platform/mac/WebVideoFullscreenHUDWindowController.mm: * platform/qt/WebCoreSystemInterface.h: 2011-08-23 Steve Block <steveblock@google.com> Remove last occurrences of PLATFORM(ANDROID) https://bugs.webkit.org/show_bug.cgi?id=66763 Reviewed by Tony Gentilcore. No new tests, removing dead code only. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): 2011-08-23 Steve Block <steveblock@google.com> Remove Android-specific modifications to non-client-based Geolocation https://bugs.webkit.org/show_bug.cgi?id=66759 Reviewed by Tony Gentilcore. No new tests, removing dead code only. * page/Geolocation.cpp: * page/Geolocation.h: * platform/GeolocationService.h: * platform/efl/GeolocationServiceEfl.cpp: * platform/efl/GeolocationServiceEfl.h: * platform/gtk/GeolocationServiceGtk.cpp: * platform/gtk/GeolocationServiceGtk.h: 2011-08-19 Pavel Podivilov <podivilov@chromium.org> Web Inspector: switch to using BreakpointManager. https://bugs.webkit.org/show_bug.cgi?id=66225 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceFileId): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled): (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationBreakpoint.prototype.loadSnippet): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): 2011-08-23 Steve Block <steveblock@google.com> Remove all mention of removed Android files from build scripts https://bugs.webkit.org/show_bug.cgi?id=66755 Reviewed by Tony Gentilcore. No new tests, removing dead code only. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * gyp/WebCore.gyp: 2011-08-23 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Fix handling of aggregate names in profiler. https://bugs.webkit.org/show_bug.cgi?id=66753 Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildAggregates): 2011-08-23 Adam Barth <abarth@webkit.org> Remove WebCore/editing/android and other Android-specific directories https://bugs.webkit.org/show_bug.cgi?id=66739 Reviewed by Steve Block. Now that Android shares more code with Chromium, we don't need these Android-specific files. * editing/android: Removed. * editing/android/EditorAndroid.cpp: Removed. * history/android: Removed. * history/android/AndroidWebHistoryBridge.h: Removed. * history/android/HistoryItemAndroid.cpp: Removed. * page/android: Removed. * page/android/DragControllerAndroid.cpp: Removed. * page/android/EventHandlerAndroid.cpp: Removed. * platform/network/android: Removed. * platform/network/android/AuthenticationChallenge.h: Removed. * platform/network/android/CookieJarAndroid.cpp: Removed. * platform/network/android/ProxyServerAndroid.cpp: Removed. * platform/network/android/ResourceError.h: Removed. * platform/network/android/ResourceHandleAndroid.cpp: Removed. * platform/network/android/ResourceLoaderAndroid.h: Removed. * platform/network/android/ResourceRequest.h: Removed. * platform/network/android/ResourceRequestAndroid.cpp: Removed. * platform/network/android/ResourceResponse.h: Removed. * platform/text/android: Removed. * platform/text/android/HyphenationAndroid.cpp: Removed. * platform/text/android/TextBreakIteratorInternalICU.cpp: Removed. 2011-08-23 Adam Barth <abarth@webkit.org> Remove WebCore/platform/android https://bugs.webkit.org/show_bug.cgi?id=66734 Reviewed by Steve Block. This directory is not needed now that Android shares more code with Chromium. * platform/android: Removed. * platform/android/ClipboardAndroid.cpp: Removed. * platform/android/ClipboardAndroid.h: Removed. * platform/android/CursorAndroid.cpp: Removed. * platform/android/DragDataAndroid.cpp: Removed. * platform/android/EventLoopAndroid.cpp: Removed. * platform/android/FileSystemAndroid.cpp: Removed. * platform/android/GeolocationServiceAndroid.cpp: Removed. * platform/android/GeolocationServiceAndroid.h: Removed. * platform/android/GeolocationServiceBridge.cpp: Removed. * platform/android/GeolocationServiceBridge.h: Removed. * platform/android/KeyEventAndroid.cpp: Removed. * platform/android/LanguageAndroid.cpp: Removed. * platform/android/LocalizedStringsAndroid.cpp: Removed. * platform/android/PlatformBridge.h: Removed. * platform/android/PlatformTouchEventAndroid.cpp: Removed. * platform/android/PlatformTouchPointAndroid.cpp: Removed. * platform/android/PopupMenuAndroid.cpp: Removed. * platform/android/RenderThemeAndroid.cpp: Removed. * platform/android/RenderThemeAndroid.h: Removed. * platform/android/SSLKeyGeneratorAndroid.cpp: Removed. * platform/android/ScreenAndroid.cpp: Removed. * platform/android/ScrollViewAndroid.cpp: Removed. * platform/android/SearchPopupMenuAndroid.cpp: Removed. * platform/android/SharedTimerAndroid.cpp: Removed. * platform/android/SoundAndroid.cpp: Removed. * platform/android/SystemTimeAndroid.cpp: Removed. * platform/android/TemporaryLinkStubs.cpp: Removed. * platform/android/WidgetAndroid.cpp: Removed. 2011-08-23 Pavel Feldman <pfeldman@google.com> Not reviewed. Adding a file that slipped from r93586. * inspector/generate-protocol-externs: Added. 2011-08-22 Pavel Feldman <pfeldman@google.com> Web Inspector: generate protocol externs API for the front-end compilation. https://bugs.webkit.org/show_bug.cgi?id=66677 Reviewed by Tony Gentilcore. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesText): * inspector/InspectorDOMAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): * inspector/InspectorDebuggerAgent.h: * inspector/compile-front-end.sh: Added. * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.setAttribute): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpoint): * inspector/front-end/externs.js: Added. (console.warn): 2011-08-22 Pavel Feldman <pfeldman@google.com> Web Inspector: Prepare utilities.js for compilation. https://bugs.webkit.org/show_bug.cgi?id=66656 Removes "this" usage in functions, does not define getters for offsets. Reviewed by Tony Gentilcore. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.valueFormatter): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.appropriateSelectorFor): (WebInspector.DOMNode.prototype.isAncestor): (WebInspector.DOMNode.prototype.isDescendant): (WebInspector.DOMNode.prototype.isWhitespace): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._resizerDragging): (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.get savedHeight): (WebInspector.Drawer.prototype.onResize): (WebInspector.Drawer.prototype._startStatusBarDragging): (WebInspector.Drawer.prototype._statusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateModifiedNodes): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes.crumbsAreSmallerThanContainer): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.findTreeElement): (WebInspector.ElementsTreeOutline.prototype._treeElementFromEvent): (): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.createTimingTable): * inspector/front-end/ResourcesPanel.js: (WebInspector.BaseStorageTreeElement.prototype.isEventWithinDisclosureTriangle): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._startSidebarResizeDrag): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype.show): * inspector/front-end/Toolbar.js: (WebInspector.ToolbarDropdown.prototype.show): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype._updateHoveredElement): * inspector/front-end/inspector.js: (Number.secondsToString): (Number.bytesToString): * inspector/front-end/treeoutline.js: (TreeElement.prototype.isEventWithinDisclosureTriangle): * inspector/front-end/utilities.js: (setupPrototypeUtilities.Element.prototype.totalOffsetLeft): (setupPrototypeUtilities.Element.prototype.totalOffsetTop): (setupPrototypeUtilities.Element.prototype.offsetRelativeToWindow): (setupPrototypeUtilities): (setupPrototypeUtilities.): (): 2011-08-22 John Bates <jbates@google.com> Implemented skia support for caching resizes of cropped images. https://bugs.webkit.org/show_bug.cgi?id=65587 Reviewed by Darin Fisher. Previously, resizes of cropped images would not be cached. This causes various websites to have janky CSS animations in software compositing mode. * platform/graphics/skia/ImageSkia.cpp: (WebCore::drawResampledBitmap): Changed to use new APIs for subset caching. (WebCore::Image::drawPattern): Added allowCaching parameter. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): (WebCore::NativeImageSkia::CachedImageInfo::CachedImageInfo): (WebCore::NativeImageSkia::CachedImageInfo::isEqual): (WebCore::NativeImageSkia::CachedImageInfo::set): (WebCore::NativeImageSkia::hasResizedBitmap): Changed this method so that it does not modify caching data. Added a second version used for cropped image resizes. (WebCore::NativeImageSkia::resizedBitmap): Added parameter to let caller specify whether caching is allowed. (WebCore::NativeImageSkia::shouldCacheResampling): Added a second version used for cropped image resizes. (WebCore::NativeImageSkia::shouldCacheResamplingInternal): Both shouldCacheResampling methods call down to this for the shared logic. * platform/graphics/skia/NativeImageSkia.h: Added CachedImageInfo to uniquely identify the cached or requested image resize operation. 2011-08-22 Tony Gentilcore <tonyg@chromium.org> [chromium] Fonts returned by FontCache::getFontDataForCharacters() are never released https://bugs.webkit.org/show_bug.cgi?id=66673 Reviewed by James Robinson. This was fixed for other ports in http://trac.webkit.org/changeset/88260. However, it was missed in FontCacheLinux likely due to similar param in the nested call to getCachedFontPlatformData(). No new tests because no directly observable change in behavior. * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-08-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93565. http://trac.webkit.org/changeset/93565 https://bugs.webkit.org/show_bug.cgi?id=66745 Breaks layout tests (Requested by koz2 on #webkit). * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaLabeledByElements): (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::hasTextAlternative): * accessibility/AccessibilityRenderObject.h: 2011-08-22 Alice Boxhall <aboxhall@chromium.org> Range::setEnd(const Position&, ExceptionCode) calls setStart() instead of setEnd() https://bugs.webkit.org/show_bug.cgi?id=66638 Reviewed by Ryosuke Niwa. Relevant layout test coming in a future patch (see https://bugs.webkit.org/show_bug.cgi?id=65900) * dom/Range.cpp: (WebCore::Range::setEnd): 2011-08-22 Adam Barth <abarth@webkit.org> Remove PLATFORM(ANDROID) https://bugs.webkit.org/show_bug.cgi?id=66741 Reviewed by Darin Adler. PLATFORM(CHROMIUM) && OS(ANDROID) is the new hotness. These special cases can be removed now that Android shares more code with Chromium. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::supportsRichSourceInfo): * bindings/v8/ScriptCachedFrameData.cpp: * bindings/v8/ScriptCachedFrameData.h: * bindings/v8/V8GCController.cpp: * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * history/HistoryItem.cpp: (WebCore::HistoryItem::~HistoryItem): (WebCore::HistoryItem::setDocumentState): (WebCore::HistoryItem::clearDocumentState): (WebCore::HistoryItem::setIsTargetItem): (WebCore::HistoryItem::addChildItem): (WebCore::HistoryItem::setFormInfoFromRequest): * history/HistoryItem.h: * loader/cache/CachedFont.cpp: * platform/DragImage.h: * platform/PlatformTouchEvent.h: * platform/PlatformTouchPoint.h: (WebCore::PlatformTouchPoint::PlatformTouchPoint): * platform/Widget.h: * platform/network/NetworkStateNotifier.cpp: * platform/network/NetworkStateNotifier.h: * platform/network/NetworkingContext.h: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/ResourceRequestBase.cpp: 2011-08-22 Adrienne Walker <enne@google.com> [chromium] Remove compositing assertions about creating layers when painting https://bugs.webkit.org/show_bug.cgi?id=66731 Reviewed by James Robinson. The trigger for this assertion would cause a real rendering issue, but it is both intermittent and in the wrong place in the codebase to catch the source of the problem. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::~LayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): * platform/graphics/chromium/LayerRendererChromium.h: 2011-08-22 Alexey Proskuryakov <ap@apple.com> showModalDialog does not correctly return the defined returnValue in case domain relaxing is used https://bugs.webkit.org/show_bug.cgi?id=53191 <rdar://problem/8629478> Reviewed by Geoff Garen. Cannot test domain relaxing, we only have 127.0.0.1 and localhost. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): Added a FIXME about a difference with Firefox. (WebCore::DialogHandler::DialogHandler): (WebCore::DialogHandler::dialogCreated): (WebCore::DialogHandler::returnValue): Changed to fetch returnValue from the global object that's in the frame when the dialog is dismissed. A dialog can navigate itself, and it also creates a new JSDOMWindow on first load if the origin doesn't match opener origin (which the case with domain relaxing). Re-added a security check for returnValue that got lost in r73829, so that we don't send the result across origins. This matches Firefox. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): Added an assertion against a very confusing case that should no longer occur. * page/Frame.cpp: (WebCore::Frame::pageDestroyed): Don't clear the window shell, it doesn't seem necessary, but prevents DialogHandler from fetching the return value. Added a keepAlive call to avoid changing life support timer behavior in this patch. 2011-08-22 Alice Boxhall <aboxhall@chromium.org> Reviewed by Chris Fleizach. aria-labelledby should be used in preference to aria-labeledby https://bugs.webkit.org/show_bug.cgi?id=62351 Test: accessibility/aria-labelledby-overrides-aria-labeledby.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaLabelledByElements): Renamed from ariaLabeledByElements. (WebCore::AccessibilityRenderObject::ariaLabelledByAttribute): Renamed from ariaLabeledByAttribute, and re-ordered to prefer the standard spelling. (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::hasTextAlternative): * accessibility/AccessibilityRenderObject.h: 2011-08-22 Nat Duca <nduca@chromium.org> Make GraphicsContext3D::isResourceSafe a function and, on Chromium, determine its value lazily https://bugs.webkit.org/show_bug.cgi?id=66708 Reviewed by Kenneth Russell. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::texImage2DResourceSafe): * platform/graphics/GraphicsContext3D.h: * platform/graphics/gtk/GraphicsContext3DGtk.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::isResourceSafe): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2011-08-22 Adam Barth <abarth@webkit.org> HTMLSourceTracker crashes when network packets break poorly https://bugs.webkit.org/show_bug.cgi?id=66728 Reviewed by Darin Adler. If there is a network packet boundary in the middle of an attribute that begins with the letters "on", then the HTMLSourceTracker will get confused and try to extract too many characters from future input. If the future input is small enough, that will walk off the end of the input and crash. Test: http/tests/security/xssAuditor/crash-while-loading-tag-with-pause.html * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::sourceForToken): 2011-08-22 Eric Seidel <eric@webkit.org> Attempt to clean up bidiNext usage https://bugs.webkit.org/show_bug.cgi?id=66721 Reviewed by Ryosuke Niwa. bidiNext and bidiFirst are horribly confusing. Even worse is that bidiNext takes a bunch of mutually exclusive options. It appears that there is a "return me every inline, even if its empty" mode which is only used for simplified inline layout in RenderBlock.cpp. To support that mode, there is a endOfInline pointer which keeps track of if we just returned at the end of an inline to so we don't get stuck in and empty inline (unable to distinguish the start from the finish). The actual bidi/line-layout code uses bidiNext/bidiFirst in a "skip empty inlines" mode. (Since empty inlines do not participate in the Unicode Bidi Algorithm.) This change renames bidiNext to bidiNextShared (still a horrible name) and moves all callers to explicitly calling bidiNextSkippingEmptyInlines or bidiNextIncludingEmptyInlines. It becomes obvious which code uses which. In reviewing this code be aware that the previous bidiNext default was to "skip empty inlines" (skipInlines = true). Thus any caller who didn't pass true/false should now be calling bidiNextSkippingEmptyInlines instead. No functional change, thus no tests. * rendering/InlineIterator.h: (WebCore::bidiNextShared): (WebCore::bidiNextSkippingEmptyInlines): (WebCore::bidiNextIncludingEmptyInlines): (WebCore::bidiFirstSkippingEmptyInlines): (WebCore::bidiFirstIncludingEmptyInlines): (WebCore::InlineWalker::InlineWalker): (WebCore::InlineWalker::advance): (WebCore::InlineIterator::increment): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::determineStartPosition): (WebCore::shouldSkipWhitespaceAfterStartObject): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-08-22 David Levin <levin@chromium.org> Fix usage of PassRefPtr in postMessage and structured clone code. https://bugs.webkit.org/show_bug.cgi?id=66725 Reviewed by Darin Adler. No new functionality exposed so no new tests. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::postMessage): Changed PassRefPtr to RefPtr and added release when handed off. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::initMessageEvent): Ditto. * bindings/js/JSMessagePortCustom.h: (WebCore::handlePostMessage): Ditto. * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): Ditto. * workers/SharedWorkerContext.cpp: (WebCore::createConnectEvent): Added release() when a RefPtr is returned. 2011-08-22 Luke Macpherson <macpherson@chromium.org> Implement cast between CSSPrimitiveValue and EBackfaceVisibility, use in CSSStyleSelector::applyProperty. https://bugs.webkit.org/show_bug.cgi?id=66648 Reviewed by Dan Bernstein. No new tests / no functionality changed. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from EBackfaceVisibility. (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility): Support cast from EBackfaceVisibility. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro. 2011-08-22 Peter Kasting <pkasting@google.com> Unreviewed, rolling out r93538. http://trac.webkit.org/changeset/93538 https://bugs.webkit.org/show_bug.cgi?id=66143 Broke Leopard, SnowLeopard, and Chromium Mac bots * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::pushLayoutState): 2011-08-22 Tony Chang <tony@chromium.org> Add CSS parsing of -webkit-flex-pack https://bugs.webkit.org/show_bug.cgi?id=66701 Reviewed by Eric Seidel. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexPack): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexPack): (WebCore::InheritedFlags::setFlexPack): (WebCore::InheritedFlags::initialFlexPack): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-22 Tony Chang <tony@chromium.org> handle child margin values when flexing https://bugs.webkit.org/show_bug.cgi?id=65887 Reviewed by David Hyatt. Test: css3/flexbox/002.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::RenderFlexibleBox::computePreferredSize): If the margin is auto, treat it as flex(1 0 0). * rendering/RenderObject.cpp: (WebCore::RenderObject::isFlexibleBoxIncludingDeprecated): Added. 2011-08-22 Nat Duca <nduca@chromium.org> [chromium] Make compositor context current before querying for extensions https://bugs.webkit.org/show_bug.cgi?id=66696 Reviewed by James Robinson. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): 2011-08-22 Cary Clark <caryclark@google.com> Webkit Mac10.6 Builder-Tester (Skia)(deps)(dbg) has compile failures https://bugs.webkit.org/show_bug.cgi?id=66703 This error was detected by the debug build of the Chromium WebKit Canary. Reviewed by James Robinson. No new tests. This change suppresses a compile-time warning but does not affect the generated code. * platform/graphics/mac/FontCustomPlatformData.h: Replaced struct with class in a forward reference. 2011-08-22 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderFlowThread layout should use the attached region sizes https://bugs.webkit.org/show_bug.cgi?id=66143 When RenderFlowThread is doing the layout it also sets the current RenderFlowThread on the RenderView. RenderFlowThread cannot be nested inside a single RenderView, so there's no need to put that on the LayoutState. The right offset used to layout the inlines inside a RenderFlowThread is now adjusted to fit inside the current region. Reviewed by David Hyatt. Tests: fast/regions/webkit-flow-floats-inside-regions-bounds.html fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html fast/regions/webkit-flow-inlines-inside-regions-bounds.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): * rendering/RenderFlowThread.h: (WebCore::RegionFittingDisabler::RegionFittingDisabler): (WebCore::RegionFittingDisabler::~RegionFittingDisabler): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThread): (WebCore::RenderView::currentRenderFlowThread): (WebCore::RenderView::setCurrentRenderFlowThread): (WebCore::RenderView::pushLayoutState): 2011-08-22 Peter Kasting <pkasting@google.com> Unreviewed, rolling out r93517. http://trac.webkit.org/changeset/93517 https://bugs.webkit.org/show_bug.cgi?id=63553 Breaks GTK Linux and Chromium Win * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2011-08-22 Wyatt Carss <wcarss@chromium.org> FrameSelection::setNonDirectionalSelectionIfNeeded should not have a FrameSelection passed to it https://bugs.webkit.org/show_bug.cgi?id=66636 Reviewed by Darin Adler. setNonDirectionalSelection was moved into FrameSelection in r93134 for bug 60529, and still took a FrameSelection as an argument, which has been removed. * editing/FrameSelection.cpp: (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): 2011-08-22 Tony Chang <tony@chromium.org> Add CSS parsing of -webkit-flex-order https://bugs.webkit.org/show_bug.cgi?id=65384 The property is an int described here: http://dev.w3.org/csswg/css3-flexbox/#flex-order Doesn't do anything yet, just hooking it up. Reviewed by Ojan Vafai. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexOrder): (WebCore::InheritedFlags::setFlexOrder): (WebCore::InheritedFlags::initialFlexOrder): * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-22 Adrienne Walker <enne@google.com> [chromium] Fix nullptr deref when switching composited tabs https://bugs.webkit.org/show_bug.cgi?id=66691 Reviewed by James Robinson. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::protectTileTextures): 2011-08-22 James Robinson <jamesr@chromium.org> [chromium] Content and render surface textures not freed when compositor context destroyed https://bugs.webkit.org/show_bug.cgi?id=66589 Reviewed by Kenneth Russell. Explicitly delete all managed textures when destroying the compositor context. This regressed due to a combination of using share groups (so destroying a context no longer implicitly releases all resources in that context) and switching the TextureManager over to support deferred texture destruction. We sadly don't have a way to construct automated tests for resource leaks currently. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::cleanupSharedObjects): 2011-08-22 Nate Chapin <japhet@chromium.org> Unload events can crash us when they blank out a parent frame. https://bugs.webkit.org/show_bug.cgi?id=64741 Reviewed by Adam Barth. Test: fast/loader/document-destruction-within-unload.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Prevent unload events from going into infinite recursion. (WebCore::FrameLoader::setDocumentLoader): Ensure we don't let set m_documentLoader to a DocumentLoader with a null Frame*. (WebCore::FrameLoader::detachChildren): Save off a vector of children to detach, rather than doing it inline. 2011-08-22 Young Han Lee <joybro@company100.net> Reviewed by Dirk Schulze. SVG animation fill="freeze" doesn't set baseVal to current animVal if animation stops before reaching the end https://bugs.webkit.org/show_bug.cgi?id=63553 calculateAnimationPercentAndRepeat() is returning 1, which means 100%, whenever elapsed >= m_intervalEnd, but this is wrong because m_intervalEnd can be in the middle of the animation duration. (e.g. begin="0s" end="2s" dur="3s") This change makes the function return the animations's true progress instead of 100% when the animation ends. Test: svg/animations/animate-end-attribute.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2011-08-22 Gyuyoung Kim <gyuyoung.kim@samsung.com> Fix build error when inspector is disabled. https://bugs.webkit.org/show_bug.cgi?id=66644 Reviewed by Darin Adler. * inspector/InspectorDatabaseResource.h: Add ENABLE(INSPECTOR) macro. 2011-08-22 Abhishek Arya <inferno@chromium.org> Crash in FocusController::advanceFocusInDocumentOrder https://bugs.webkit.org/show_bug.cgi?id=66678 RefPtr the focusable node to prevent getting deleted by mutation event. Reviewed by Dave Hyatt. Test: fast/frames/focus-controller-crash-change-event.html * page/FocusController.cpp: (WebCore::FocusController::advanceFocusInDocumentOrder): 2011-08-22 Justin Novosad <junov@chromium.org> [Chromium] Crash when allocation of very large canvas fails https://bugs.webkit.org/show_bug.cgi?id=66563 Replacing the crash with a more graceful failure: canvas will not render. Reviewed by Stephen White. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): Invoking TryCreateBitmapCanvas instead of CreateBitmapCanvas This is the non-crashing version of the factory function. It returns NULL if allocation fails. Code for handling NULL pointer was already in place. 2011-08-22 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: bind registerDomainDispatcher to domain names. https://bugs.webkit.org/show_bug.cgi?id=66670 jscompiler can't be used for validating domain events dispatchers because registerDomainDispatcher is too generic. I'd like to introduce named versions per each domain. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: (GenerateInterface): (generateBackendStubJS): * inspector/front-end/ApplicationCacheItemsView.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent): * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher): * inspector/front-end/ProfilesPanel.js: * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): * inspector/front-end/TimelineManager.js: (WebInspector.TimelineDispatcher): * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager): * inspector/front-end/inspector.js: 2011-08-22 Benjamin Poulain <benjamin@webkit.org> Fix generate-inspector-idl for Python3 after r93396 https://bugs.webkit.org/show_bug.cgi?id=66663 Reviewed by Andreas Kling. In Python3, print is a function instead of a language keyword. Using parentheses around the argument ensures the code works for both Python 2 and 3. * inspector/generate-inspector-idl: 2011-08-22 Keishi Hattori <keishi@webkit.org> Chrome::setSelectedColorInColorChooser shouldn't be called when color chooser sets a new color https://bugs.webkit.org/show_bug.cgi?id=66658 Reviewed by Kent Tamura. * html/ColorInputType.cpp: (WebCore::ColorInputType::colorSelected): Call setValueFromRenderer instead of setValue. * html/ColorInputType.h: 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract breakpoint management code to a separate class and add tests. https://bugs.webkit.org/show_bug.cgi?id=66224 Reviewed by Pavel Feldman. Test: inspector/debugger/breakpoint-manager.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: Added. (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI): (WebInspector.BreakpointManager.prototype._moveBreakpointInUI): (WebInspector.BreakpointManager.prototype._breakpoints): (WebInspector.BreakpointManager.prototype._breakpoint): (WebInspector.BreakpointManager.prototype._forEachBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger): (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger): (WebInspector.BreakpointManager.prototype._breakpointResolved): (WebInspector.BreakpointManager.prototype.serializeBreakpoints): (WebInspector.BreakpointManager.prototype.reset): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.serialize): (WebInspector.Breakpoint.deserialize): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.get rawSourceCode): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-21 Martin Robinson <mrobinson@igalia.com> Fix 'make dist' for WebKitGTK+. * GNUmakefile.am: Add a missing file to the EXTRA_DIST list. * GNUmakefile.list.am: Update the sources list to reflect reality. 2011-08-20 Nebojsa Ciric <cira@chromium.org> Point build system and #include headers to v8-i18n library instead of v8 library. We forked a new code.google.com/p/v8-i18n project from v8/extensions/experimental. https://bugs.webkit.org/show_bug.cgi?id=66573 Reviewed by Kent Tamura. Covered by existing tests, and no code was changed. * WebCore.gyp/WebCore.gyp: * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::createNewContext): 2011-08-20 Tom Zakrajsek <tomz@codeaurora.org> instanceof HTMLSourceElement Fails https://bugs.webkit.org/show_bug.cgi?id=65013 Reviewed by Eric Carlson. Add HTMLSourceElement to DOMWindow.idl for consistency. Constructors for all elements should be available on DOMWindow. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled): * bindings/generic/RuntimeEnabledFeatures.h: * page/DOMWindow.idl: 2011-08-20 Darin Adler <darin@apple.com> If Range::insertNode is passed an empty document fragment, it creates a broken DOM tree https://bugs.webkit.org/show_bug.cgi?id=65015 Reviewed by Alexey Proskuryakov. Test: fast/dom/Range/insertNode-empty-fragment-crash.html * dom/Range.cpp: (WebCore::Range::insertNode): Don't adjust the range after insertion if we didn't add anything. Otherwise the code will put a wrong "child before" value into the range end boundary point. 2011-08-20 Ken Buchanan <kenrb@chromium.org> OOB Read in WebCore::SVGAnimationElement https://bugs.webkit.org/show_bug.cgi?id=65858 Reviewed by Nikolas Zimmermann. Potential crash resulting from incorrect keySpline array lengths. This fix validates the length in startedActiveInterval. Test: svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseMappedAttribute): (WebCore::SVGAnimationElement::calculateKeyTimesIndex): 2011-08-19 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93415. http://trac.webkit.org/changeset/93415 https://bugs.webkit.org/show_bug.cgi?id=66623 Introduces failing test (Requested by pfeldman on #webkit). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: Removed. * inspector/front-end/DebuggerModel.js: * inspector/front-end/SourceFile.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-19 Chris Fleizach <cfleizach@apple.com> AX WK2 Regression: WebKit outputs incorrect AX position in frames/iframes https://bugs.webkit.org/show_bug.cgi?id=61289 Update the code to determine the position of accessibility elements on Mac for WK2, so that elements within iframes are positioned correctly. Reviewed by Darin Adler.. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::page): * accessibility/AccessibilityObject.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper position]): 2011-08-19 Jeffrey Pfau <jpfau@apple.com> New XML parser: text nodes outside of root element not created for document fragments https://bugs.webkit.org/show_bug.cgi?id=66604 When intializing a fragment parser, declare that the first element has been seen. Also, flush the text nodes when finishing parsing a document. Reviewed by Darin Adler. * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::finish): * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::XMLTreeBuilder): (WebCore::XMLTreeBuilder::processToken): (WebCore::XMLTreeBuilder::finish): * xml/parser/XMLTreeBuilder.h: 2011-08-19 Jeff Miller <jeffm@apple.com> MediaPlayerPrivateAVFoundationCF should use AVCFURLAssetCopyAudiovisualMIMETypes() to get list of supported MIME types https://bugs.webkit.org/show_bug.cgi?id=66612 Reviewed by Darin Adler. No new tests, should be covered by existing media tests. * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added AVCFURLAssetCopyAudiovisualMIMETypes(). * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::mimeTypeCache): Use AVCFURLAssetCopyAudiovisualMIMETypes() to build the cache of supported MIME types. 2011-08-19 Adrienne Walker <enne@google.com> [chromium] Regression: Fix clang errors from r93424 https://bugs.webkit.org/show_bug.cgi?id=66609 Reviewed by James Robinson. The invalidateRect function does not appear to be used anywhere because the setNeedsDisplay function is used instead. Fix the Clang error by just removing this unused vestigial base class function. * platform/graphics/chromium/LayerChromium.h: 2011-08-19 Anders Carlsson <andersca@apple.com> Add new enums to npapi.h https://bugs.webkit.org/show_bug.cgi?id=66608 Reviewed by Sam Weinig. * bridge/npapi.h: 2011-08-19 Jeffrey Pfau <jpfau@apple.com> libxml2 fragment parser loses prefix namespaces https://bugs.webkit.org/show_bug.cgi?id=66423 This makes the loop over the elements outside of the context actually update the element it's processing. Reviewed by Darin Adler. Test: fast/parser/innerhtml-with-prefixed-elements.xhtml * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-08-19 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66590 Re-name scrollbar painter types Reviewed by Sam Weinig. Names changed to remove references to WebKitSystemInterface since the implementation is now in WebCore. And the type names changed to be more Objective- Cish instead of C++ish WTF_USE_WK_SCROLLBAR_PAINTER -> WTF_USE_SCROLLBAR_PAINTER WKScrollbarPainterRef -> ScrollbarPainter WKScrollbarPainterControllerRef -> ScrollbarPainterController * platform/mac/NSScrollerImpDetails.h: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformSetScrollbarOverlayStyle): * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar): (WebCore::ScrollbarThemeMac::painterForScrollbar): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): 2011-08-19 Van Lam <vanlam@google.com> Rename VisiblePosition::honorEditableBoundary* to VisiblePosition::honorEditingBoundary* https://bugs.webkit.org/show_bug.cgi?id=66499 Reviewed by Ryosuke Niwa. Renamed VisiblePosition::honorEditableBoundary* to honorEditingBoundary. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::next): (WebCore::VisiblePosition::previous): (WebCore::VisiblePosition::left): (WebCore::VisiblePosition::right): (WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore): (WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter): * editing/VisiblePosition.h: * editing/visible_units.cpp: (WebCore::previousWordPosition): (WebCore::nextWordPosition): (WebCore::startOfLine): (WebCore::endOfLine): (WebCore::previousSentencePosition): (WebCore::nextSentencePosition): (WebCore::logicalStartOfLine): (WebCore::logicalEndOfLine): (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-08-19 James Robinson <jamesr@chromium.org> REGRESSION(r91628): 3 canvas tests crash on Chromium Linux and one test fail on Chromium Mac https://bugs.webkit.org/show_bug.cgi?id=65063 Reviewed by Darin Fisher. Fixes crashes due to a bad cast from Image to BitmapImage on skia ports that use BitmapImageSingleFrameSkia. In the skia port Image::isBitmapImage() returning true does not necessarily mean that Image is of type BitmapImage. Covered by fast/canvas/canvas-as-image.html and many other canvas tests. Patch originally by Tom Hudson. * platform/graphics/BitmapImage.h: (WebCore::BitmapImage::currentFrameHasAlpha): (WebCore::BitmapImage::notSolidColor): * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: (WebCore::Image::currentFrameHasAlpha): (WebCore::Image::notSolidColor): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha): (WebCore::BitmapImageSingleFrameSkia::notSolidColor): * rendering/RenderImage.cpp: (WebCore::RenderImage::backgroundIsObscured): 2011-08-19 Emil A Eklund <eae@chromium.org> Switch clipping for svg to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66586 Reviewed by Eric Seidel. No new tests as no new functionality. * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGGradientStop.h: (WebCore::RenderSVGGradientStop::clippedOverflowRectForRepaint): * rendering/svg/RenderSVGHiddenContainer.h: (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::clippedOverflowRectForRepaint): (WebCore::RenderSVGInline::computeRectForRepaint): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGModelObject::computeRectForRepaint): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): (WebCore::RenderSVGText::computeRectForRepaint): * rendering/svg/RenderSVGText.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::localCoordinateSpaceTransform): * svg/SVGSVGElement.h: (WebCore::SVGSVGElement::setContainerSize): (WebCore::SVGSVGElement::containerSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImageChromeClient::invalidateContentsAndWindow): (WebCore::SVGImage::setContainerSize): * svg/graphics/SVGImage.h: 2011-08-19 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93425. http://trac.webkit.org/changeset/93425 https://bugs.webkit.org/show_bug.cgi?id=66591 "The newly-added ASSERT is being triggered on several bots" (Requested by jchaffraix on #webkit). * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::setDisabled): (WebCore::HTMLLinkElement::sheetLoaded): (WebCore::HTMLLinkElement::disabled): * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isEnabledViaScript): 2011-08-18 Adrienne Walker <enne@google.com> [chromium] Refactor updateCompositorResources to take an explicit GraphicsContext3D https://bugs.webkit.org/show_bug.cgi?id=66432 Reviewed by James Robinson. Covered by existing tests. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-08-19 Victoria Kirst <vrk@chromium.org> Tell media player to prepareToPlay() at end of HTMLMediaElement::load() https://bugs.webkit.org/show_bug.cgi?id=66414 Reviewed by Eric Carlson. Test: media/video-load-preload-none.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::load): 2011-08-19 Emil A Eklund <eae@chromium.org> Switch RenderBlock to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66502 Reviewed by Eric Seidel. Convert RenderBlock to new layout abstraction. Leave m_lineHight as a 30 bit int for now to avoid unnecessarily increasing the memory usage. No new tests as no new functionality. * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: 2011-08-19 Emil A Eklund <eae@chromium.org> Switch RenderBoxModelObject to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66534 Reviewed by Eric Seidel. Convert RenderBoxModelObject to new layout abstraction. No new tests as no new functionality. * rendering/RenderBoxModelObject.cpp: (WebCore::ImageQualityController::set): (WebCore::ImageQualityController::shouldPaintAtLowQuality): (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality): (WebCore::backgroundRectAdjustedForBleedAvoidance): (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateFillTileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::RenderBoxModelObject::paintNinePieceImage): (WebCore::borderWillArcInnerEdge): (WebCore::RenderBoxModelObject::paintOneBorderSide): (WebCore::RenderBoxModelObject::paintBorderSides): (WebCore::RenderBoxModelObject::paintBorder): (WebCore::RenderBoxModelObject::drawBoxSideFromPath): (WebCore::RenderBoxModelObject::clipBorderSidePolygon): (WebCore::areaCastingShadowInHole): (WebCore::RenderBoxModelObject::paintBoxShadow): (WebCore::RenderBoxModelObject::containingBlockLogicalWidthForContent): * rendering/RenderBoxModelObject.h: 2011-08-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Speed up RenderFlowThread repaint of regions https://bugs.webkit.org/show_bug.cgi?id=66566 Reviewed by David Hyatt. When in printing or the repaint rectangle is empty, there is no need to iterate the render flow regions in order to repaint. Covered by existing tests. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::shouldRepaint): (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: 2011-08-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Parse -webkit-region-break(after, before, inside) https://bugs.webkit.org/show_bug.cgi?id=66559 Reviewed by David Hyatt. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSMutableStyleDeclaration.cpp: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionBreakBefore): (WebCore::InheritedFlags::regionBreakInside): (WebCore::InheritedFlags::regionBreakAfter): (WebCore::InheritedFlags::setRegionBreakBefore): (WebCore::InheritedFlags::setRegionBreakInside): (WebCore::InheritedFlags::setRegionBreakAfter): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-08-19 Emil A Eklund <eae@chromium.org> Switch RenderLayer to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66507 Reviewed by Eric Seidel. Convert RenderLayer to new layout abstraction. No new tests as no new functionality. * rendering/LayoutTypes.h: (WebCore::flooredLayoutSize): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: * rendering/RenderLayerCompositor.h: 2011-08-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Content displayed in regions should not be scrollable https://bugs.webkit.org/show_bug.cgi?id=66459 Reviewed by Darin Adler. Initially, when creating the style for the RenderFlowThread, overflowX and overflowY were both set to hidden, so that RenderView did not display scrollbars when a RenderFlowThread exists. However, this allowed the possibility of scrolling the content displayed in region. Now, the RenderFlowThread objects are ignored in RenderBlock::insertPositionedObject and the style of the RenderFlowThread can be set to visible, thus preventing scrolling of the content displayed in regions. Test: fast/regions/content-flowed-into-regions-no-scroll.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::createFlowThreadStyle): 2011-08-19 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page https://bugs.webkit.org/show_bug.cgi?id=65140 <rdar://problem/9835905> Reviewed by Antti Koivisto. Tests: fast/css/stylesheet-enable-first-alternate-on-load.html fast/css/stylesheet-enable-first-alternate.html fast/css/stylesheet-enable-second-alternate-on-load.html fast/css/stylesheet-enable-second-alternate.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html The gist of the issue is that we were ignoring calls to HTMLLinkElement::setDisabled that would enable a style sheet when we were loading a stylesheet (m_sheet was 0 and thus ignored the call per the spec). FF goes against the CSS OM spec in this case and always keep an associated sheet as long as 'rel' hints at a stylesheet link and href is present. Instead of siding with FF, I continued to follow the specification and store the enabled via javascript state into m_scriptState (renamed from m_isEnabledViaScript). This information gets merged back into the style sheet disabled state when it is available. While debugging the case at hand, I found some cases that were not properly handled and were fixed as part of this change. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): Updated after m_isEnabledViaScript rename. (WebCore::HTMLLinkElement::setDisabled): Always call setIsEnabledViaScript so that the information is properly stored (either for recalcStyleSelector or just to store the state during loading). (WebCore::HTMLLinkElement::sheetLoaded): Merge back the state from m_scriptState to the sheet's disabled state. (WebCore::HTMLLinkElement::disabled): Account for the temporary state and return the right value. It matches FF and what people would expect. (WebCore::HTMLLinkElement::areDisabledAndScriptStatesConsistent): Debug only method that checks that disabled() and isEnabledViaScript() are consistent with each other (under some circumstances). * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isEnabledViaScript): Updated after m_isEnabledViaScript rename. (WebCore::HTMLLinkElement::setIsEnabledViaScript): Added setter. 2011-08-17 Adrienne Walker <enne@google.com> [chromium] Split tiler into main thread / compositor thread versions https://bugs.webkit.org/show_bug.cgi?id=66065 Reviewed by James Robinson. Covered by existing tests. LayerTilerChromium is renamed to be CCLayerTilingData. Invalidation and paint functionality is pushed into TiledLayerChromium and drawing with GL is pushed into CCTiledLayerImpl. During tree synchronization, the tiler properties and texture IDs are synchronized into CCTiledLayerImpl. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::bestTextureFormat): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tilerProgram): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::tilerProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzleAA): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTilerChromium.cpp: Removed. * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::textureId): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::UpdatableTile): (WebCore::UpdatableTile::texture): (WebCore::UpdatableTile::dirty): (WebCore::UpdatableTile::clearDirty): (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::dumpLayerProperties): (WebCore::TiledLayerChromium::textureManager): (WebCore::TiledLayerChromium::tileAt): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::invalidateTiles): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectVisibleTileTextures): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdate): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: Added. (WebCore::CCLayerTilingData::create): (WebCore::CCLayerTilingData::CCLayerTilingData): (WebCore::CCLayerTilingData::setTileSize): (WebCore::CCLayerTilingData::operator=): (WebCore::CCLayerTilingData::addTile): (WebCore::CCLayerTilingData::takeTile): (WebCore::CCLayerTilingData::tileAt): (WebCore::CCLayerTilingData::reset): (WebCore::CCLayerTilingData::contentRectToTileIndices): (WebCore::CCLayerTilingData::contentRectToLayerRect): (WebCore::CCLayerTilingData::layerRectToContentRect): (WebCore::CCLayerTilingData::tileContentRect): (WebCore::CCLayerTilingData::tileLayerRect): (WebCore::CCLayerTilingData::setLayerPosition): (WebCore::CCLayerTilingData::growLayerToContain): * platform/graphics/chromium/cc/CCLayerTilingData.h: Renamed from Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h. (WebCore::CCLayerTilingData::numTiles): (WebCore::CCLayerTilingData::numTilesX): (WebCore::CCLayerTilingData::numTilesY): (WebCore::CCLayerTilingData::tileBounds): (WebCore::CCLayerTilingData::textureOffset): (WebCore::CCLayerTilingData::tileSize): (WebCore::CCLayerTilingData::hasBorderTexels): (WebCore::CCLayerTilingData::isEmpty): (WebCore::CCLayerTilingData::Tile::Tile): (WebCore::CCLayerTilingData::Tile::i): (WebCore::CCLayerTilingData::Tile::j): (WebCore::CCLayerTilingData::Tile::moveTo): (WebCore::CCLayerTilingData::TileMapKeyTraits::emptyValue): (WebCore::CCLayerTilingData::TileMapKeyTraits::constructDeletedValue): (WebCore::CCLayerTilingData::TileMapKeyTraits::isDeletedValue): (WebCore::CCLayerTilingData::tiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::DrawableTile::DrawableTile): (WebCore::DrawableTile::textureId): (WebCore::DrawableTile::setTextureId): (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::tileAt): (WebCore::CCTiledLayerImpl::createTile): (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::setTilingData): (WebCore::CCTiledLayerImpl::syncTextureId): (WebCore::isCCW): (WebCore::computeEdge): (WebCore::intersect): (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore::CCTiledLayerImpl::setSkipsDraw): (WebCore::CCTiledLayerImpl::setTextureOrientation): (WebCore::CCTiledLayerImpl::setSampledTexelFormat): * platform/graphics/gpu/TilingData.h: 2011-08-19 Dan Bernstein <mitz@apple.com> Better build fix after r93384. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Use WTF::Unicode wrapper instead of ICU. 2011-08-19 Pavel Podivilov <podivilov@chromium.org> Web Inspector: update scope variables upon value changes via console. https://bugs.webkit.org/show_bug.cgi?id=54720 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract breakpoint management code to a separate class and add tests. https://bugs.webkit.org/show_bug.cgi?id=66224 Reviewed by Pavel Feldman. Test: inspector/debugger/breakpoint-manager.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: Added. (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI): (WebInspector.BreakpointManager.prototype._moveBreakpointInUI): (WebInspector.BreakpointManager.prototype._breakpoints): (WebInspector.BreakpointManager.prototype._breakpoint): (WebInspector.BreakpointManager.prototype._forEachBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger): (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger): (WebInspector.BreakpointManager.prototype._breakpointResolved): (WebInspector.BreakpointManager.prototype.serializeBreakpoints): (WebInspector.BreakpointManager.prototype.reset): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.serialize): (WebInspector.Breakpoint.deserialize): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.get rawSourceCode): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-19 Adam Roben <aroben@apple.com> Fix typo * dom/DOMAllInOne.cpp: 2011-08-19 Adam Roben <aroben@apple.com> Windows build fix after r93385 * dom/DOMAllInOne.cpp: Added EventDispatcMediator.cpp. 2011-08-19 Pavel Feldman <pfeldman@google.com> Web Inspector: getAttributes should work on a single node, not array. https://bugs.webkit.org/show_bug.cgi?id=66544 Reviewed by Adam Roben. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._loadNodeAttributes): 2011-08-19 Anton Muhin <antonm@chromium.org> [v8] CSS wrapper objects retention https://bugs.webkit.org/show_bug.cgi?id=66377 Reviewed by Pavel Feldman. Disable object grouping for CSS object wrappers. This logic leads to hard to debug use-after-free problems. * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): 2011-08-19 Pavel Feldman <pfeldman@google.com> Web Inspector: introduce NodeId inherited from integer in the DOM domain description. https://bugs.webkit.org/show_bug.cgi?id=66491 Drive-by rename of couple of DOM domain protocol methods. Reviewed by Adam Roben. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::requestChildNodes): (WebCore::InspectorDOMAgent::getAttributes): (WebCore::InspectorDOMAgent::requestNode): (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): (WebInspector.DOMNode.prototype.getChildNodes): (WebInspector.DOMAgent.prototype.pushNodeToFrontend): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMAgent.prototype._setDocument): (WebInspector.DOMAgent.prototype._setDetachedRoot): * inspector/generate-inspector-idl: 2011-08-19 Jochen Eisinger <jochen@chromium.org> IDBSQLiteBackingStore::deleteObjectStore should maintain referential integrity. https://bugs.webkit.org/show_bug.cgi?id=66470 Reviewed by Tony Gentilcore. * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::deleteObjectStore): 2011-08-19 Takashi Toyoshima <toyoshim@chromium.org> [WebSocket] CloseEvent's code and reason properties support. https://bugs.webkit.org/show_bug.cgi?id=66362 Reviewed by Kent Tamura. Current WebSocket implementation miss code and reason properties in CloseEvent. This change expose incoming closing frame's code and reason to JavaScript API. Tests: http/tests/websocket/tests/hybi/close-code-and-reason.html http/tests/websocket/tests/hybi/workers/close-code-and-reason.html * websockets/CloseEvent.h: (WebCore::CloseEvent::initCloseEvent): (WebCore::CloseEvent::code): (WebCore::CloseEvent::reason): (WebCore::CloseEvent::CloseEvent): * websockets/CloseEvent.idl: Add code and reason properies. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: Add implement to handle code and reason. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::processFrame): * websockets/WebSocketChannel.h: Add closing frame payload parser. * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didClose): * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): * websockets/WorkerThreadableWebSocketChannel.h: Add implement to handle code and reason. 2011-08-19 MORITA Hajime <morrita@google.com> Spell-checking doesn't recognize word boundaries on contests inserted by execCommand('insertHTML') https://bugs.webkit.org/show_bug.cgi?id=65902 Reviewed by Ryosuke Niwa. markMisspellingsAndBadGrammar() was using markSpelling() and markBadGrammar(). But these are low-level API and caller should take care of word boundary. This change replaced these call with overloaded version of markMisspellingsAndBadGrammar(), which handles word boundary correctly. Test: editing/spelling/spelling-insert-html.html * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::markMisspellingsAndBadGrammar): * testing/Internals.cpp: (WebCore::Internals::markerCountOf): Added. (WebCore::Internals::markedRangeAt): Added. * testing/Internals.h: * testing/Internals.idl: 2011-08-19 Nayan Kumar K <nayankk@motorola.com> Run-time error fix in WebKit-GTK with video support disabled. https://bugs.webkit.org/show_bug.cgi?id=66541 Definition of the function extraFullScreenStyleSheet() in webkit-gtk lies outside ENABLE(VIDEO) guard, resulting in runtime error while trying to launch GtkLauncher with video support disabled. Reviewed by Philippe Normand. Run-time error fix. No test cases were added. * platform/gtk/RenderThemeGtk.h: 2011-08-19 Shinya Kawanaka <shinyak@google.com> input[maxlength=0] should ignore text input. https://bugs.webkit.org/show_bug.cgi?id=65497 Reviewed by Kent Tamura. Changed the valid range of maxlength. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMaxLengthAttribute): Changed maxlength check condition. 2011-08-19 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: backend js api: an ability to skip optional arguments in the middle of the argument list is required. https://bugs.webkit.org/show_bug.cgi?id=66482 There are functions in the API with multiple optional arguments. When we call it we have to specify an optional argument as 'undefined' if we want to pass non default value for the next one. This can be solved with passing the arguments as an object. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: * inspector/front-end/RemoteObject.js: 2011-08-19 Zoltan Horvath <zoltan@webkit.org> [Qt] Build fix after r93384. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-08-18 Shawn Singh <shawnsingh@chromium.org> Computing screen-space transform for LayerChromium and CCLayerImpl https://bugs.webkit.org/show_bug.cgi?id=66114 Added a data member to LayerChromium and CCLayerImpl that holds the screen-space transform. The transform is computed in calculateDrawTransformsAndVisibility(), which is used during updating (LayerChromium) and drawing (CCLayerImpl). Also fixed a FIXME in LayerRendererChromium::drawLayer, which was not computing the entire hierarchy of transforms to determine back-face visibility. Now it simply uses the world space transform. Reviewed by James Robinson. Test: compositing/backface-visibility-hierarchical-transform.html * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::screenSpaceTransform): (WebCore::LayerChromium::setScreenSpaceTransform): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::screenSpaceTransform): (WebCore::CCLayerImpl::setScreenSpaceTransform): 2011-08-18 Ben Wells <benwells@chromium.org> [skia] -webkit-transform breaks -webkit-mask https://bugs.webkit.org/show_bug.cgi?id=66442 The problem here is that in RenderBox::paintMaskImages, if we are in a transform with a rotation, scale or skew we set the composite mode to be DestinationIn and then create a transparency layer, then paint the mask with SourceOver and end the transparency layer. (The normal case is just to use DestinationIn to paint the mask.) In skia when we create transparency layers we don't pass on the composite mode, so when we end the transparency layer it is composited back using SourceOver. The fix is to pass on the composite mode when creating transparency layers in skia. Reviewed by Stephen White. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::getXfermodeMode): * platform/graphics/skia/PlatformContextSkia.h: 2011-08-18 Hayato Ito <hayato@chromium.org> Isolate EventDispatchMediator into a separate file. https://bugs.webkit.org/show_bug.cgi?id=66458 Reviewed by Ryosuke Niwa. Extracted EventDispatchMediator.h and EventDispatchMediator.cpp out of Event.h and Event.cpp Also moved FocusEventDispatchMediator and BlurEventDispatchMediator from Event.{h|cpp} to EventDispatchMediator.{h|cpp}. No new tests since this is just refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Event.cpp: * dom/Event.h: * dom/EventDispatchMediator.cpp: Added. (WebCore::EventDispatchMediator::create): (WebCore::EventDispatchMediator::EventDispatchMediator): (WebCore::EventDispatchMediator::dispatchEvent): (WebCore::FocusEventDispatchMediator::create): (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::create): (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): (WebCore::BlurEventDispatchMediator::dispatchEvent): * dom/EventDispatchMediator.h: Added. (WebCore::EventDispatchMediator::~EventDispatchMediator): (WebCore::EventDispatchMediator::event): (WebCore::EventDispatchMediator::EventDispatchMediator): (WebCore::EventDispatchMediator::setEvent): * dom/EventDispatcher.cpp: * dom/KeyboardEvent.h: * dom/MouseEvent.h: * dom/Node.cpp: * dom/ScopedEventQueue.cpp: * dom/UIEvent.h: * dom/WheelEvent.h: 2011-08-18 Dan Bernstein <mitz@apple.com> Mid-word break can occur between a character and a combining mark https://bugs.webkit.org/show_bug.cgi?id=66529 Reviewed by Simon Fraser. No test added because I could not find a combining mark with a non-zero advance in any of the system fonts and tests fonts. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Disallow a mid-word break before a combining mark. 2011-08-18 Kent Tamura <tkent@chromium.org> REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner https://bugs.webkit.org/show_bug.cgi?id=66453 Reviewed by Simon Fraser. Test: fast/forms/placeholder-crash-with-scrollbar-corner.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): Add a NULL check for owner's layer. 2011-08-18 Jeffrey Pfau <jpfau@apple.com> New XML parser: scripting support https://bugs.webkit.org/show_bug.cgi?id=66406 Reviewed by Adam Barth. * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::resumeParsing): (WebCore::NewXMLDocumentParser::processScript): (WebCore::NewXMLDocumentParser::append): Add support for pausing the parsing (WebCore::NewXMLDocumentParser::finish): Add support for pausing the parsing (WebCore::NewXMLDocumentParser::notifyFinished): * xml/parser/NewXMLDocumentParser.h: (WebCore::NewXMLDocumentParser::pauseParsing): * xml/parser/XMLTreeBuilder.cpp: Add a shared function between self-closing and end tags (WebCore::XMLTreeBuilder::closeElement): Registers scripts and pops the stack (WebCore::XMLTreeBuilder::processStartTag): (WebCore::XMLTreeBuilder::processEndTag): * xml/parser/XMLTreeBuilder.h: 2011-08-18 Mark Hahnenberg <mhahnenberg@apple.com> Move allocation in constructors into separate constructorBody() methods https://bugs.webkit.org/show_bug.cgi?id=66265 Reviewed by Oliver Hunt. No new tests. Refactoring to put all allocations that need to be done after the object's initialization list has executed but before the object is ready for use into a separate constructorBody() method. This method is still called by the constructor, so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring. * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.mm: * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): (ObjCRuntimeMethod::ObjCRuntimeMethod): * bridge/runtime_array.cpp: * bridge/runtime_array.h: (JSC::RuntimeArray::create): 2011-08-18 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66495 Lion-specific scroller SPIs can use forward declaration instead of WebKitSystemInterface Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * platform/mac/NSScrollerImpDetails.h: Added. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPartAnimation setCurrentProgress:]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-08-18 Dan Bernstein <mitz@apple.com> <rdar://problem/9973194> Fonts that specify a positive descender value are treated as having descenders ending above the baseline https://bugs.webkit.org/show_bug.cgi?id=66515 Reviewed by Darin Adler. No test because none of the system fonts and test fonts have an incorrectly-specified descender value. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): If the font specifies a positive descender, assume that it meant the same amount, but negative. This is consistent with what Core Text does. 2011-08-18 Ryosuke Niwa <rniwa@webkit.org> positionForPoint returns wrong VisiblePosition at bidi boundaries https://bugs.webkit.org/show_bug.cgi?id=65356 Reviewed by David Hyatt. The bug was caused by RenderText::positionForPoint's assuming that the position will always reside inside the inline box that contains the point, which is not true at the boundaries of bidi-runs. For example, in aDC12BAb where AB12CD is a RTL text, the offset on the right of A is 7 even though the inline box for "BA" only contains offsets 1, 2, and 3. We must traverse the bidi-run "DC12BA" until the end to obtain the offset 7 from the inline box for "DC". Fixed the bug by introducing createVisiblePositionAfterAdjustingOffsetForBiDi which traverses runs on the left or the right of the position to compute the appropriate offset following the NSTextView convention. This patch also fixes a regression from r74971 that caret is placed incorrectly between inline boxes of LTR or RTL text in a RTL or LTR block respectively. Test: editing/selection/caret-at-bidi-boundary.html * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::offsetForPosition): * rendering/RenderText.cpp: (WebCore::lineDirectionPointFitsInBox): Takes ShouldAffinityBeDownstream instead of EAfinity. (WebCore::createVisiblePositionForBox): (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi): (WebCore::RenderText::positionForPoint): 2011-08-18 Xiaomei Ji <xji@chromium.org> --webkit-visual-word renaming right/leftWordPositionAcrossBoundary https://bugs.webkit.org/show_bug.cgi?id=66436 Reviewed by Ryosuke Niwa. Rename them to right/leftWordPositionIgnoringEditingBoundary. * editing/visible_units.cpp: (WebCore::leftWordPositionIgnoringEditingBoundary): (WebCore::rightWordPositionIgnoringEditingBoundary): (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-08-18 Jeff Miller <jeffm@apple.com> Soft link against AVFoundationCF and CoreMedia https://bugs.webkit.org/show_bug.cgi?id=65725 Add new macros to SoftLinking.h to support soft-linking to functions and variables decorated with __declspec(dllimport), and use them to soft-link to AVFoundationCF and CoreMedia. I verified that the WebProcess doesn't load these DLLs until a media element is used. Reviewed by Eric Carlson. No new tests as no change in functionality. * WebCore.vcproj/WebCore.vcproj: Added AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h. * WebCore.vcproj/WebCoreMediaQT.vsprops: Removed DelayLoadDLLs linker option which is no longer needed. * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added. * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Added. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Stop linking against AVFoundationCF.lib and CoreMedia.lib and include AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h. * platform/win/SoftLinking.h: Added SOFT_LINK_DLL_IMPORT() and SOFT_LINK_VARIABLE_DLL_IMPORT() macros. 2011-08-18 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Show scrollbar when doing search https://bugs.webkit.org/show_bug.cgi?id=66209 Reviewed by James Robinson. Updated the Lion scrollbar drawing code to force the scrollbar to be visible when we have tickmarks for search results. No tests because there are no Mac 10.7 chromium bots yet. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): 2011-08-18 James Robinson <jamesr@chromium.org> [chromium] Draw the root/"non-composited content" in compositor side https://bugs.webkit.org/show_bug.cgi?id=58834 Reviewed by Kenneth Russell. Handle the root or non-composited content with a GraphicsLayer rather than special case logic in LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks through the LayerPainterChromium interface out to the WebView. The root layer is special in two ways: *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a draw-time transform. *) The root layer masks the alpha channel and disable blending when drawing because of concerns about subpixel AA trashing the alpha channel. The root layer is always opaque so this is fine. *) The root layer does not have border texels and does have subpixel AA for text. Covered by compositing/ * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::scrollPosition): (WebCore::LayerChromium::setScrollPosition): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::viewportWidth): (WebCore::LayerRendererChromium::viewportHeight): * platform/graphics/chromium/NonCompositedContentHost.cpp: Added. (WebCore::NonCompositedContentHost::NonCompositedContentHost): (WebCore::NonCompositedContentHost::~NonCompositedContentHost): (WebCore::NonCompositedContentHost::invalidateRect): (WebCore::NonCompositedContentHost::invalidateEntireLayer): (WebCore::NonCompositedContentHost::setScrollPosition): (WebCore::NonCompositedContentHost::notifyAnimationStarted): (WebCore::NonCompositedContentHost::notifySyncRequired): (WebCore::NonCompositedContentHost::paintContents): (WebCore::NonCompositedContentHost::showDebugBorders): (WebCore::NonCompositedContentHost::showRepaintCounter): * platform/graphics/chromium/NonCompositedContentHost.h: Added. (WebCore::NonCompositedContentHost::create): (WebCore::NonCompositedContentHost::graphicsLayer): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollPosition): (WebCore::CCLayerImpl::setScrollPosition): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportSize): 2011-08-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93354. http://trac.webkit.org/changeset/93354 https://bugs.webkit.org/show_bug.cgi?id=66503 "consensus was not reached" (Requested by senorblanco on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): 2011-08-18 Sadrul Habib Chowdhury <sadrul@chromium.org> GestureRecognizer: Update how gesture-scroll works. Instead of just sending a series of 'GestureUpdate' events, send a single 'GestureBegin' event, followed by a series of 'GestureUpdate' events, and end with a 'GestureEnd' event. https://bugs.webkit.org/show_bug.cgi?id=66267 Reviewed by Adam Barth. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::appendScrollGestureBegin): (WebCore::InnerGestureRecognizer::appendScrollGestureEnd): (WebCore::InnerGestureRecognizer::appendScrollGestureUpdate): (WebCore::scrollEnd): (WebCore::isClickOrScroll): (WebCore::inScroll): * platform/chromium/GestureRecognizerChromium.h: (WebCore::InnerGestureRecognizer::firstTouchPosition): 2011-08-18 Sailesh Agrawal <sail@chromium.org> Chromium: Update forked ScrollbarThemeChromiumMac.mm https://bugs.webkit.org/show_bug.cgi?id=65555 Reviewed by James Robinson. Merge recent changes to ScrollbarThemeMac.mm to ScrollbarThemeChromiumMac.mm. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterSetEnabled): * platform/chromium/ScrollbarThemeChromiumMac.h: (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeChromiumMac::updateEnabledState): (WebCore::ScrollbarThemeChromiumMac::paint): 2011-08-18 Justin Novosad <junov@chromium.org> Unwarranted DOM Exception when when canvas2D drawImage is called with src rect out of bounds https://bugs.webkit.org/show_bug.cgi?id=65709 Reviewed by Stephen White. Test: fast/canvas/drawImage-clipped-source.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): Removed the unnecessary dom exceptions for out of bounds source rectangles The overloads that receive video and image elements as source images now use the normalized versions of the source rectangle, which GraphicsContext (and its various platform flavors) can handle correctly. The normalized rectangle is the equivalent rectangle with width and height greater than 0. The canvas version of this method, which had better layout test coverage, was already correctly using the normalized rectangle. The newly added layout test verifies correct behavior with negative source rectangle dimensions. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): Fixed algorithm that adjusts the destination rectangle to match the clipping applied to the source rect. The case of scaled filtered images with source rectangles that overlap the edge of the image was not being handled correctly. This use case was previously unsupported and used to trigger a DOM exception. 2011-08-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93329. http://trac.webkit.org/changeset/93329 https://bugs.webkit.org/show_bug.cgi?id=66497 Turned text on chromium win blue (Requested by jamesr_ on #webkit). * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::dumpLayerProperties): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::updateRootLayerContents): (WebCore::LayerRendererChromium::drawRootLayer): (WebCore::LayerRendererChromium::invalidateRootLayerRect): (WebCore::LayerRendererChromium::rootLayerChanged): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): * platform/graphics/chromium/NonCompositedContentHost.cpp: Removed. * platform/graphics/chromium/NonCompositedContentHost.h: Removed. * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::dumpSurface): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::tilingTransform): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::createRootLayerPainter): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportContentRect): (WebCore::CCLayerTreeHost::viewportScrollPosition): (WebCore::CCLayerTreeHost::viewportVisibleRect): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-08-18 Ryosuke Niwa <rniwa@webkit.org> SimplifiedBackwardsTextIterator returns incorrect offset with first-letter rule https://bugs.webkit.org/show_bug.cgi?id=66086 Reviewed by Darin Adler. The bug was caused by SimplifiedBackwardsTextIterator's not taking care of first-letter at all. Fixing the bug by detecting RenderTextFragment in handleTextNode. Also added m_shouldHandleFirstLetter to SimplifiedBackwardsTextIterator to keep track of whether or not the next call to handleTextNode needs to process the first-letter part of the text fragment. Test: editing/text-iterator/backward-textiterator-first-letter-crash.html * editing/TextIterator.cpp: (WebCore::firstRenderTextInFirstLetter): Extracted from handleTextNodeFirstLetter. (WebCore::TextIterator::handleTextNodeFirstLetter): Calls firstRenderTextInFirstLetter. (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Added. * editing/TextIterator.h: 2011-08-18 Iain Merrick <husky@google.com> [chromium] Assert that main thread and compositor thread are used safely https://bugs.webkit.org/show_bug.cgi?id=66145 CCLayerTreeHostImplProxy now has public static methods isMainThread() and isImplThread(), and we ASSERT these in various places. If threaded compositing is disabled, we fake isImplThread() by setting a flag for the duration of compositing, so the assert is still valid. Reviewed by James Robinson. Covered by existing tests. * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::doComposite): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::isMainThread): (WebCore::CCLayerTreeHostImplProxy::isImplThread): (WebCore::CCLayerTreeHostImplProxy::setImplThread): (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread): (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): 2011-08-18 Alexey Proskuryakov <ap@apple.com> Regional indicator symbols that are combined should behave as a single character when editing https://bugs.webkit.org/show_bug.cgi?id=65395 Reviewed by Dan Bernstein. Part two: make cursor movement iterator work. This fixes the problem for strings that don't contain more than two flags in a row, as fixing it completely doesn't seem possible with ICU. Test: editing/selection/regional-indicators.html * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added custom rules for regional indicator symbols. 2011-08-18 Cary Clark <caryclark@google.com> Fix rubber band gutter drawing for Skia on Chromium Mac https://bugs.webkit.org/show_bug.cgi?id=66478 Reviewed by James Robinson. No new tests. The Skia on Chromium Mac platform has not been enabled. This break was detected at compile time; there is no behavior change. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): Convert the CGImage into an SkBitmap if Skia is present. 2011-08-18 Julien Chaffraix <jchaffraix@webkit.org> Implement a faster path for painting tables with overflowing cells https://bugs.webkit.org/show_bug.cgi?id=65491 This change introduces a smarter way of painting if the table is big enough and we have a small amount of overflowing cells in the table. The new path does a binary search of the cells to repaint but adds the overflowing cells to the repainting cells. This saves ~50% when doing programmatic scrolling throught JS on a 500x100 table with some overflowing cells. Also we cap the memory usage to a ratio of the total size of the table to avoid blowing up the memory. Reviewed by David Hyatt. No new tests as the behavior should be the same. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): (WebCore::RenderTableSection::layoutRows): Added some code to accumulate the overflowing cells in an internal HashSet (we don't need to keep them sorted and it makes it easier to use them during painting). If we hit the cap, flip the boolean value and clear the HashSet as the slow path does not care about the cell's information. Make sure that the "has overflowing cells" information is still properly encoded on our 2 values. (WebCore::compareCellPositionsWithOverflowingCells): Added this method as we are doing a more complicated sort: * the old path would sort one (mostly sorted) array by rows only as the stable sort would take care of keeping the column ordering inside a row. * the new path basically has to sort an unsorted array (taken partly from the HashSet). (WebCore::RenderTableSection::paintObject): Tweaked the logic to account for difference between m_forceSlowPaintPathWithOverflowingCell and has some overflowing cells. Also we make sure we don't repaint the same cell twice. (WebCore::RenderTableSection::nodeAtPoint): Changed to hasOverflowingCell(). We don't apply our fast path optimization here. * rendering/RenderTableSection.h: Transformed our original boolean into a HashSet and a boolean. The HashSet holds up the CellStruct that are overflowing until we reach the memory threshold. After this is hit, we just set the boolean to avoid using too much memory. (WebCore::RenderTableSection::hasOverflowingCell): This is the new way to determine if we have any overflowing cell, used only for hit testing. 2011-08-18 Kentaro Hara <haraken@google.com> An EventSource constructor should throw TypeError, when the number of arguments is not enough. https://bugs.webkit.org/show_bug.cgi?id=66454 Reviewed by Adam Barth. The spec is here: http://www.w3.org/TR/WebIDL/#es-operations. Test: fast/eventsource/eventsource-constructor.html * bindings/js/JSEventSourceCustom.cpp: (WebCore::JSEventSourceConstructor::constructJSEventSource): Changed SyntaxError to TypeError. * bindings/v8/custom/V8EventSourceConstructor.cpp: (WebCore::V8EventSource::constructorCallback): Changed SyntaxError to TypeError. 2011-08-18 Kentaro Hara <haraken@google.com> A SharedWorker constructor should throw TypeError, when the number of arguments is not enough. https://bugs.webkit.org/show_bug.cgi?id=66455 Reviewed by Adam Barth. The spec is here: http://www.w3.org/TR/WebIDL/#es-operations. Test: fast/workers/shared-worker-constructor.html * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Changed SyntaxError to TypeError. * bindings/v8/custom/V8SharedWorkerCustom.cpp: (WebCore::V8SharedWorker::constructorCallback): Changed SyntaxError to TypeError. 2011-08-17 Alejandro G. Castro <alex@igalia.com> [GTK] Fix compilation problems with deprecations in gtk+ https://bugs.webkit.org/show_bug.cgi?id=66073 Reviewed by Martin Robinson. * platform/gtk/GtkAuthenticationDialog.cpp: (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added gtk_box_new conditional compilation for gtk+-3. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::adjustRepaintRect): (WebCore::RenderThemeGtk::paintSliderTrack): (WebCore::RenderThemeGtk::paintSliderThumb): (WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have GTK_TYPE_SCALE in gtk+3. 2011-08-18 Kentaro Hara <haraken@google.com> A Worker constructor should throw TypeError, when the number of arguments is not enough https://bugs.webkit.org/show_bug.cgi?id=66456 Reviewed by Adam Barth. Spec is here: http://www.w3.org/TR/WebIDL/#es-operations. Test: fast/workers/worker-constructor.html * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorkerConstructor::constructJSWorker): Changed SyntaxError to TypeError. * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::V8Worker::constructorCallback): Changed SyntaxError to TypeError. 2011-08-18 John Bates <jbates@google.com> Fix logic error causing reverse of desired WebGL rate limiting behavior https://bugs.webkit.org/show_bug.cgi?id=66445 Reviewed by Kenneth Russell. * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::setTextureUpdated): 2011-08-18 Levi Weintraub <leviw@chromium.org> Switch RenderTextControl* to new layout types https://bugs.webkit.org/show_bug.cgi?id=66250 Reviewed by Eric Seidel. Convertikng the RenderTextControl* classes to use the LayoutUnit abstraction. No new tests as no change in behavior. * rendering/LayoutTypes.h: (WebCore::layoutMod): Added a function to perform the modulo operation on LayoutUnits. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::hitInnerTextElement): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::preferredContentWidth): (WebCore::RenderTextControlMultiLine::baselinePosition): * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): * rendering/RenderTextControlSingleLine.h: 2011-08-18 Levi Weintraub <leviw@chromium.org> Switch Inline rendering classes to new layout types https://bugs.webkit.org/show_bug.cgi?id=66239 Reviewed by Eric Seidel. Converting inline rendering classes to use the LayoutUnit abstraction from ints. No new tests as no change in functionality. * rendering/InlineBox.h: (WebCore::InlineBox::logicalFrameRect): (WebCore::InlineBox::baselinePosition): (WebCore::InlineBox::lineHeight): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::logicalOverflowRect): (WebCore::InlineTextBox::setLogicalOverflowRect): (WebCore::InlineTextBox::baselinePosition): (WebCore::InlineTextBox::lineHeight): * rendering/InlineTextBox.h: (WebCore::InlineTextBox::logicalTopVisualOverflow): (WebCore::InlineTextBox::logicalBottomVisualOverflow): (WebCore::InlineTextBox::logicalLeftVisualOverflow): (WebCore::InlineTextBox::logicalRightVisualOverflow): * rendering/RenderInline.cpp: (WebCore::RenderInline::culledInlineAbsoluteRects): (WebCore::computeMargin): (WebCore::RenderInline::culledInlineBoundingBox): (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox): (WebCore::RenderInline::linesVisualOverflowBoundingBox): (WebCore::RenderInline::clippedOverflowRectForRepaint): (WebCore::RenderInline::rectWithOutlineForRepaint): (WebCore::RenderInline::computeRectForRepaint): (WebCore::RenderInline::mapLocalToContainer): (WebCore::RenderInline::lineHeight): (WebCore::RenderInline::baselinePosition): (WebCore::RenderInline::addDashboardRegions): * rendering/RenderInline.h: 2011-08-18 Jeffrey Pfau <jpfau@apple.com> New XML parser: add doctype to DOM tree https://bugs.webkit.org/show_bug.cgi?id=66408 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processDOCTYPE): 2011-08-18 James Robinson <jamesr@chromium.org> [chromium] Draw the root/"non-composited content" in compositor side https://bugs.webkit.org/show_bug.cgi?id=58834 Reviewed by Darin Fisher. Handle the root or non-composited content with a GraphicsLayer rather than special case logic in LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks through the LayerPainterChromium interface out to the WebView. The root layer is special in two ways: *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a draw-time transform. *) The root layer masks the alpha channel when drawing because of concerns about subpixel AA trashing the alpha channel. The root layer is always opaque so this is fine. *) The root layer does not have border texels and does have subpixel AA for text. Covered by compositing/ * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::scrollPosition): (WebCore::LayerChromium::setScrollPosition): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::viewportWidth): (WebCore::LayerRendererChromium::viewportHeight): * platform/graphics/chromium/NonCompositedContentHost.cpp: Added. (WebCore::NonCompositedContentHost::NonCompositedContentHost): (WebCore::NonCompositedContentHost::~NonCompositedContentHost): (WebCore::NonCompositedContentHost::invalidateRect): (WebCore::NonCompositedContentHost::invalidateEntireLayer): (WebCore::NonCompositedContentHost::setScrollPosition): (WebCore::NonCompositedContentHost::notifyAnimationStarted): (WebCore::NonCompositedContentHost::notifySyncRequired): (WebCore::NonCompositedContentHost::paintContents): (WebCore::NonCompositedContentHost::showDebugBorders): (WebCore::NonCompositedContentHost::showRepaintCounter): * platform/graphics/chromium/NonCompositedContentHost.h: Added. (WebCore::NonCompositedContentHost::create): (WebCore::NonCompositedContentHost::graphicsLayer): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollPosition): (WebCore::CCLayerImpl::setScrollPosition): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportSize): 2011-08-18 Nico Weber <thakis@chromium.org> Fix "missing return" gcc warning in ScrollAnimatorNone https://bugs.webkit.org/show_bug.cgi?id=66480 Reviewed by Tony Chang. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt): 2011-08-18 James Simonsen <simonjam@chromium.org> Revalidate expired resources if they're requested after the initial document load https://bugs.webkit.org/show_bug.cgi?id=52153 Reviewed by Antti Koivisto. Test: http/tests/cache/subresource-multiple-instances.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy): 2011-08-18 Anders Carlsson <andersca@apple.com> Fix clang libc++ C++0x build https://bugs.webkit.org/show_bug.cgi?id=66475 Reviewed by Adam Roben. Remove calls to isnan and isfinite with integer arguments. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::viewport): 2011-08-18 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] rename webInspector.resources to webInspector.network https://bugs.webkit.org/show_bug.cgi?id=66460 Reviewed by Pavel Feldman. Tests: http/tests/inspector/extensions-network-redirect.html inspector/extensions/extensions-network.html * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.InspectorExtensionAPI): (WebInspector.injectedExtensionAPI.Network.requestDispatch): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.Network.prototype.getHAR): (WebInspector.injectedExtensionAPI.defineDeprecatedProperty.getter): (WebInspector.injectedExtensionAPI.defineDeprecatedProperty): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._inspectedURLChanged): (WebInspector.ExtensionServer.prototype._notifyRequestFinished): (WebInspector.ExtensionServer.prototype._onGetHAR): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._requestId): (WebInspector.ExtensionServer.prototype._requestById): (WebInspector.ExtensionServer.prototype._onAddAuditCategory): (WebInspector.ExtensionServer.prototype._onAddAuditResult): (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun): (WebInspector.ExtensionServer.prototype.initExtensions): (WebInspector.ExtensionServer.prototype._onmessage): 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract content loading functions from RawSourceCode to ContentProvider implementations. https://bugs.webkit.org/show_bug.cgi?id=66237 Reviewed by Pavel Feldman. Test: inspector/debugger/content-providers.html * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.ScriptContentProvider): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): (WebInspector.ResourceContentProvider): (WebInspector.ResourceContentProvider.prototype.requestContent): 2011-08-18 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderRegion should not reference a parent RenderFlowThread https://bugs.webkit.org/show_bug.cgi?id=66142 Added code that checks the parent RenderFlowThread of a RenderRegion and creates a dependency for its referenced RenderFlowThread (from CSS style). There are two cases: 1. A RenderRegion tries to display the flow thread that laid it out. In this case the region will be ignored and will not participate in the flow threads regions list. 2. A RenderRegion tries to display a flow thread that contains another region that tries to display the first region's flow thread. This one can be generalized with any number of intermediate flow threads. In this case the recursion is detected and only the first added region will actually be selected. The other region will be ignored. However, when the recursion is removed the invalid regions will be recovered. Reviewed by David Hyatt. Tests: fast/regions/flows-dependency-dynamic-remove.html fast/regions/flows-dependency-same-flow.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertPositionedObject): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::dependsOn): (WebCore::RenderFlowThread::addRegionToThread): (WebCore::RenderFlowThread::removeRegionFromThread): (WebCore::RenderFlowThread::checkInvalidRegions): (WebCore::RenderFlowThread::addDependencyOnFlowThread): (WebCore::RenderFlowThread::removeDependencyOnFlowThread): (WebCore::RenderFlowThread::pushDependencies): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::computeLogicalWidth): (WebCore::RenderFlowThread::computeLogicalHeight): (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): (WebCore::RenderObjectChildList::appendChildNode): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::~RenderRegion): (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::nodeAtPoint): (WebCore::RenderRegion::attachRegion): (WebCore::RenderRegion::detachRegion): * rendering/RenderRegion.h: (WebCore::RenderRegion::parentFlowThread): (WebCore::RenderRegion::isValid): (WebCore::RenderRegion::setIsValid): * rendering/RenderTreeAsText.cpp: (WebCore::writeRenderFlowThreads): (WebCore::writeLayers): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): (WebCore::RenderView::layout): (WebCore::RenderView::renderFlowThreadWithName): (WebCore::RenderView::layoutRenderFlowThreads): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThreads): (WebCore::RenderView::isRenderFlowThreadOrderDirty): (WebCore::RenderView::setIsRenderFlowThreadOrderDirty): (WebCore::RenderView::renderFlowThreadList): 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: add UISourceCode class. https://bugs.webkit.org/show_bug.cgi?id=66233 This is a next step towards splitting SourceFile into RawSourceCode and UISourceCode. UISourceCode is a part of SourceFile's interface that is visible to ScriptsPanel. UISourceCode represents a single entry in scripts panel's files select. Reviewed by Pavel Feldman. Test: inspector/debugger/ui-source-code.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/UISourceCode.js: Added. (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.get id): (WebInspector.UISourceCode.prototype.get url): (WebInspector.UISourceCode.prototype.get isContentScript): (WebInspector.UISourceCode.prototype.requestContent): (WebInspector.UISourceCode.prototype._didRequestContent): (WebInspector.ContentProvider): (WebInspector.ContentProvider.prototype.requestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-17 Adam Roben <aroben@apple.com> Make WebCore keep track of the current device scale factor Fixes <http://webkit.org/b/66413> WebCore requires every WebKit port to keep track of the device scale factor Reviewed by Darin Adler. * WebCore.exp.in: Removed Frame::deviceScaleFactorChanged, added Page::setDeviceScaleFactor. * css/MediaQueryEvaluator.cpp: (WebCore::device_pixel_ratioMediaFeatureEval): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): * page/DOMWindow.cpp: (WebCore::DOMWindow::devicePixelRatio): * rendering/RenderInline.cpp: (WebCore::RenderInline::addDashboardRegions): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::deviceScaleFactor): * rendering/RenderObject.cpp: (WebCore::RenderObject::addDashboardRegions): Changed to get the device scale factor from Page. * loader/EmptyClients.h: * page/Chrome.cpp: * page/Chrome.h: * page/ChromeClient.h: Removed Chrome[Client]::deviceScaleFactor. * page/Frame.cpp: * page/Frame.h: Removed deviceScaleFactorChanged. Made deviceOrPageScaleFactorChanged public. * page/Page.cpp: (WebCore::Page::Page): Initialize m_deviceScaleFactor. (WebCore::Page::setDeviceScaleFactor): Added. Code came from Frame::deviceScaleFactorChanged. * page/Page.h: Added m_deviceScaleFactor. (WebCore::Page::deviceScaleFactor): Added simple getter. 2011-08-18 Darin Adler <darin@apple.com> SVG and HTML editing have conflicting inline isWhitespace functions https://bugs.webkit.org/show_bug.cgi?id=65145 Reviewed by Nikolas Zimmermann. Renamed the SVG-specific whitespace functions to call it "SVG space" rather than just "whitespace". An alternative would have been to put the functions into an SVG namespace instead of the top level WebCore namespace. * svg/SVGAnimateMotionElement.cpp: (WebCore::parsePoint): Call skipOptionalSVGSpaces. * svg/SVGAnimationElement.cpp: (WebCore::parseKeySplines): Ditto. * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::parseViewBox): Ditto. * svg/SVGLengthList.cpp: (WebCore::SVGLengthList::parse): Call isSVGSpace and skipOptionalSVGSpacesOrDelimiter. * svg/SVGParserUtilities.cpp: (WebCore::genericParseNumber): Call skipOptionalSVGSpacesOrDelimiter. (WebCore::parseArcFlag): Ditto. (WebCore::parseRect): Call skipOptionalSVGSpaces. (WebCore::pointsListFromSVGData): Ditto. (WebCore::parseGlyphName): Call skipOptionalSVGSpaces, isSVGSpace, and skipOptionalSVGSpacesOrDelimiter. (WebCore::parseDelimitedString): Call skipOptionalSVGSpaces. * svg/SVGParserUtilities.h: (WebCore::isSVGSpace): Renamed from isWhitespace. This better matches the comment which specifically talks about SVG. (WebCore::skipOptionalSVGSpaces): Renamed from skipOptionalSpaces. (WebCore::skipOptionalSVGSpacesOrDelimiter): Renamed from skipOptionalSVGSpacesOrDelimiter. * svg/SVGPathStringSource.cpp: (WebCore::SVGPathStringSource::moveToNextToken): Call skipOptionalSVGSpaces. * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Ditto. * svg/SVGStringList.cpp: (WebCore::SVGStringList::parse): Call isSVGSpace and skipOptionalSVGSpacesOrDelimiter. * svg/SVGTransformable.cpp: (WebCore::parseTransformParamList): Call skipOptionalSVGSpaces and skipOptionalSVGSpacesOrDelimiter. (WebCore::SVGTransformable::parseTransformAttribute): Call skipOptionalSVGSpaces. 2011-08-18 Gavin Peters <gavinp@chromium.org> Prepare frames for history navigation. Before beginning an explicit history navigation in a newly initialized frame, it's important to give a "previous" item to avoid crashes, and give a state to the state machine to avoid extra validating loads. https://bugs.webkit.org/show_bug.cgi?id=66322 Reviewed by Darin Fisher. No new tests, as history navigation is very difficult to test in DumpRenderTree. * loader/FrameLoader.cpp: (WebCore::FrameLoader::prepareForHistoryNavigation): * loader/FrameLoader.h: 2011-08-18 Jing Zhao <jingzhao@chromium.org> When changing the size of a menulist from x (x>1) to 1, the first item should be selected. https://bugs.webkit.org/show_bug.cgi?id=66282 Reviewed by Kent Tamura. No new tests since it only changes the behavior in Android Browser. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): 2011-08-18 Adam Klein <adamk@chromium.org> Handle "form" attribute updates in parseMappedAttribute() instead of attributeChanged() to better match HTMLElement practices https://bugs.webkit.org/show_bug.cgi?id=66321 Reviewed by Darin Adler. This is simply a cleanup change: there's no need that I can see for HTMLFormControlElement and HTMLObjectElement to override Element::attributeChanged since they can properly handle form attribute changes in parseMappedAttribute, which they also override. Though no change in behavior, I've added test coverage of the moved code to an existing test (fast/forms/form-attribute.html) and added a new test. Test: fast/forms/radio-remove-form-attr.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::parseMappedAttribute): * html/HTMLFormControlElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLObjectElement.h: 2011-08-18 Chang Shu <cshu@webkit.org> Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature https://bugs.webkit.org/show_bug.cgi?id=66052 Reviewed by Alexey Proskuryakov. Added runtime settings in WebCore. Added support in window.internals for testing. Tests: editing/input/password-echo-passnode.html editing/input/password-echo-passnode2.html editing/input/password-echo-passnode3.html editing/input/password-echo-textnode.html * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPasswordEchoEnabled): (WebCore::Settings::passwordEchoEnabled): (WebCore::Settings::setPasswordEchoDurationInSeconds): (WebCore::Settings::passwordEchoDurationInSeconds): * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore::Internals::setPasswordEchoEnabled): (WebCore::Internals::setPasswordEchoDurationInSeconds): (WebCore::Internals::reset): * testing/Internals.h: * testing/Internals.idl: 2011-08-18 Wyatt Carss <wcarss@chromium.org> Selecting all and inserting text into a page with a frameset leads to a NULL ptr https://bugs.webkit.org/show_bug.cgi?id=66288 Reviewed by Tony Chang. VisibleSelection returns a NoSelection to InsertTextCommand::doApply as a new endingSelection, which isn't a sane state to be in. The code tries to get a position on a higher node for a better selection, but cannot go above the frameset (which exists in place of the body tag), which lacks a renderer, and therefore cannot have a non-NoSelection VisibleSelection. Because this is a rare corner case, it seemed more reasonable to bail out in this circumstance than to change the way VisibleSelection canonicalization works. The new behavior is to delete the content, but insert nothing. I investigated the possibility of trying to move above or below the frameset in this particular case, but there still isn't a renderer, so it didn't prevent the crash. Test: editing/inserting/insert-text-into-empty-frameset-crash.html * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::doApply): 2011-08-18 Takashi Toyoshima <toyoshim@chromium.org> Remove arguments from CloseEvent::create(). https://bugs.webkit.org/show_bug.cgi?id=66294 Reviewed by Kent Tamura. CloseEvent objects are initialized by initCloseEvent() in all cases. Initialization in create() is redundant. No new tests for no functional difference. * websockets/CloseEvent.h: (WebCore::CloseEvent::create): (WebCore::CloseEvent::CloseEvent): * websockets/WebSocket.cpp: (WebCore::WebSocket::didClose): 2011-08-18 Fady Samuel <fsamuel@chromium.org> iframe and frameset scaling is broken https://bugs.webkit.org/show_bug.cgi?id=57785 Reviewed by Simon Fraser. Fixed two iframe and frameset scaling bugs: #1 iframes and frameset backgrounds and scroll areas are doubly scaled when they are styled with -webkit-transform. #2 frameset does not respect -webkit-transform-origin when scaled Tests: fast/frames/frame-set-scaling-3d.html fast/frames/frame-set-scaling-centered.html fast/frames/frame-set-scaling-rotate.html fast/frames/frame-set-scaling-skew.html fast/frames/frame-set-scaling.html fast/frames/iframe-scaling-with-scroll.html * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): Update the FrameSet's layer transform after we've computed size to correctly account for the transform origin. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::childrenClipRect): The dirty rect should be the document's unscaled size. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::setWidget): (WebCore::RenderWidget::updateWidgetPosition): Don't scale the FrameView rect here. Scaling is done within the FrameView. 2011-08-18 Csaba Osztrogonác <ossy@webkit.org> Unreviewed buildfix after r93268. * dom/Document.cpp: (WebCore::disableRangeMutation): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch RenderBox to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66156 Reviewed by Eric Seidel. Convert RenderBox to new layout abstraction as a part of the ongoing conversion work. No new tests as no new functionality. * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): (WebCore::RenderBox::scrollLeft): (WebCore::RenderBox::scrollTop): (WebCore::RenderBox::setScrollLeft): (WebCore::RenderBox::setScrollTop): (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteContentBox): (WebCore::RenderBox::absoluteContentQuad): (WebCore::RenderBox::outlineBoundsForRepaint): (WebCore::RenderBox::reflectionBox): (WebCore::RenderBox::reflectedRect): (WebCore::RenderBox::verticalScrollbarWidth): (WebCore::RenderBox::horizontalScrollbarHeight): (WebCore::RenderBox::computeContentBoxLogicalWidth): (WebCore::RenderBox::computeContentBoxLogicalHeight): (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::repaintLayerRectsForImage): (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::overflowClipRect): (WebCore::RenderBox::clipRect): (WebCore::RenderBox::containingBlockLogicalWidthForContent): (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight): (WebCore::RenderBox::positionLineBox): (WebCore::RenderBox::clippedOverflowRectForRepaint): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeInlineDirectionMargins): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeBlockDirectionMargins): (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): (WebCore::computeInlineStaticDistance): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::computeLogicalLeftPositionedOffset): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::computeBlockStaticDistance): (WebCore::RenderBox::computePositionedLogicalHeight): (WebCore::computeLogicalTopPositionedOffset): (WebCore::RenderBox::computePositionedLogicalHeightUsing): (WebCore::RenderBox::computePositionedLogicalWidthReplaced): (WebCore::RenderBox::computePositionedLogicalHeightReplaced): (WebCore::RenderBox::localCaretRect): (WebCore::RenderBox::lineHeight): (WebCore::RenderBox::baselinePosition): (WebCore::RenderBox::logicalVisualOverflowRectForPropagation): (WebCore::RenderBox::visualOverflowRectForPropagation): (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation): (WebCore::RenderBox::layoutOverflowRectForPropagation): (WebCore::RenderBox::locationOffsetIncludingFlipping): * rendering/RenderBox.h: (WebCore::RenderBox::borderFitAdjust): (WebCore::RenderBox::intrinsicSize): (WebCore::RenderBox::intrinsicLogicalWidth): (WebCore::RenderBox::intrinsicLogicalHeight): (WebCore::RenderBox::scrollbarLogicalHeight): (WebCore::RenderBox::controlClipRect): (WebCore::RenderBox::firstLineBoxBaseline): (WebCore::RenderBox::lastLineBoxBaseline): 2011-08-17 Annie Sullivan <sullivan@chromium.org> Reduce usages of String::createUninitialized https://bugs.webkit.org/show_bug.cgi?id=66399 Constructs Strings with StringBuilder instead of calling createUninitialized. Reviewed by Adam Barth. No new tests; no functional change. * dom/StyleElement.cpp: (WebCore::StyleElement::process): * dom/Text.cpp: (WebCore::Text::wholeText): * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::sourceForToken): * platform/graphics/Font.cpp: (WebCore::Font::normalizeSpaces): * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::decode): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch FrameView to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66147 Reviewed by Eric Seidel. Convert Frame & FrameView to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): (WebCore::Frame::documentAtPoint): (WebCore::Frame::rangeForPoint): (WebCore::Frame::setPageAndTextZoomFactors): (WebCore::Frame::scalePage): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::create): (WebCore::FrameView::reset): (WebCore::FrameView::init): (WebCore::FrameView::invalidateRect): (WebCore::FrameView::setFrameRect): (WebCore::FrameView::setMarginWidth): (WebCore::FrameView::setMarginHeight): (WebCore::FrameView::setContentsSize): (WebCore::FrameView::adjustViewSize): (WebCore::FrameView::scrollXForFixedPosition): (WebCore::FrameView::scrollYForFixedPosition): (WebCore::FrameView::scrollOffsetForFixedPosition): (WebCore::FrameView::currentMousePosition): (WebCore::FrameView::scrollContentsFastPath): (WebCore::FrameView::scrollContentsSlowPath): (WebCore::FrameView::setScrollPosition): (WebCore::FrameView::repaintContentRectangle): (WebCore::FrameView::scrollToAnchor): (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::windowClipRect): (WebCore::FrameView::windowClipRectForLayer): (WebCore::FrameView::scrollTo): (WebCore::FrameView::invalidateScrollbarRect): (WebCore::FrameView::getTickmarks): (WebCore::FrameView::windowResizerRect): (WebCore::FrameView::setVisibleScrollerThumbRect): (WebCore::FrameView::paintScrollCorner): (WebCore::FrameView::paintContents): (WebCore::FrameView::paintOverhangAreas): (WebCore::FrameView::forceLayoutForPagination): (WebCore::FrameView::convertFromRenderer): (WebCore::FrameView::convertToRenderer): (WebCore::FrameView::convertToContainingView): (WebCore::FrameView::convertFromContainingView): * page/FrameView.h: (WebCore::FrameView::marginWidth): (WebCore::FrameView::marginHeight): * page/mac/FrameMac.mm: (WebCore::Frame::snapshotDragImage): (WebCore::Frame::nodeImage): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch html/* to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66347 Reviewed by Eric Seidel. Convert HTML* and shadow element to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::invalidateCachedRegion): (WebCore::HTMLAreaElement::mapMouseEvent): (WebCore::HTMLAreaElement::computePath): (WebCore::HTMLAreaElement::computeRect): (WebCore::HTMLAreaElement::getRegion): * html/HTMLAreaElement.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * html/HTMLCanvasElement.h: * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::mapMouseEvent): * html/HTMLMapElement.h: * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::finish): (WebCore::ImageDocument::scale): (WebCore::ImageDocument::resizeImageToFit): (WebCore::ImageDocument::imageFitsInWindow): * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::size): (WebCore::CanvasRenderingContext2D::drawImage): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::startDrag): (WebCore::MediaControlPanelElement::continueDrag): (WebCore::MediaControlPanelElement::setPosition): (WebCore::MediaControlPanelElement::defaultEventHandler): * html/shadow/MediaControlElements.h: * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::dragFrom): (WebCore::SliderThumbElement::setPositionFromPoint): * html/shadow/SliderThumbElement.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): 2011-08-17 David Grogan <dgrogan@chromium.org> Change references to leveldb.gyp to leveldatabase.gyp as part of the leveldb refactoring going on in chromium: crbug.com/89378 https://bugs.webkit.org/show_bug.cgi?id=66332 Reviewed by Tony Gentilcore. Tests: new-run-webkit-tests --debug --chromium --no-retry-failures --build-directory=llvm storage/indexeddb * WebCore.gyp/WebCore.gyp: 2011-08-17 Hayato Ito <hayato@chromium.org> Implement proper handling of focus/blur events in regard to shadow DOM boundaries. https://bugs.webkit.org/show_bug.cgi?id=61421 Reviewed by Dimitri Glazkov. Introduces FocusEventDispatchMediator/BlurEventDispatchMediator so that focus/blue events are stopped at the lowest common shadow boundary. * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Event.cpp: (WebCore::FocusEventDispatchMediator::create): (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::create): (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): (WebCore::BlurEventDispatchMediator::dispatchEvent): * dom/Event.h: * dom/Node.cpp: (WebCore::Node::dispatchFocusEvent): (WebCore::Node::dispatchBlurEvent): * dom/Node.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::dispatchBlurEvent): * html/HTMLFormControlElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::dispatchFocusEvent): (WebCore::HTMLSelectElement::dispatchBlurEvent): * html/HTMLSelectElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::dispatchFocusEvent): (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): * html/HTMLTextFormControlElement.h: * page/FocusController.cpp: (WebCore::dispatchEventsOnWindowAndFocusedNode): 2011-08-17 Ben Wells <benwells@chromium.org> Canvas fill and fillRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors https://bugs.webkit.org/show_bug.cgi?id=66036 These modes cannot be passed straight through to the underlying graphics context as the graphics context and the HTML5 canvas spec have different interpretations to them. In the graphics context, the compositing modes are applied just over the area being filled. In the HTML5 spec, the compositing modes are applied over the entire canvas. The SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy modes all need some kind of extra action to just performing the composited fill on the canvas, as they need t he canvas to be cleared outside of the area being filled. Previous to this change the Copy mode did not do this clearing at all. The other modes did but if the transformed path being filled contained anti-aliasing at its edges artifacts were introduced. With this change, Copy now does a complete erase of the canvas before performing a fill as per normal. The other modes use a temporary buffer just big enough for the transformed path (in device coordinates). The fill is first done there in SourceOver mode. Then this is drawn into the canvas context using the appropriate mode, with any areas outside the draw area being cleared. Reviewed by James Robinson. Test: fast/canvas/canvas-composite-transformclip.html * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::fill): (WebCore::CanvasRenderingContext2D::fillRect): (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::transformAreaToDevice): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): * html/canvas/CanvasRenderingContext2D.h: * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch inspector to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66358 Reviewed by Eric Seidel. Convert inspector code to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawNodeHighlight): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willPaintImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willPaint): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willPaint): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createPaintData): * inspector/TimelineRecordFactory.h: 2011-08-17 Levi Weintraub <leviw@chromium.org> Switch Editing code to new layout types https://bugs.webkit.org/show_bug.cgi?id=66355 Reviewed by Eric Seidel. Converting remaining editing code to the LayoutUnit abstraction. No new tests, no change in functionality. * editing/Editor.cpp: (WebCore::Editor::rangeForPoint): (WebCore::Editor::insideVisibleArea): (WebCore::Editor::countMatchesForText): * editing/Editor.h: * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): 2011-08-17 Levi Weintraub <leviw@chromium.org> Switch Accessibility code to new layout types https://bugs.webkit.org/show_bug.cgi?id=66348 Reviewed by Eric Seidel. Converting remaining Accessibility code to the LayoutUnit abstraction. No new tests, no change in functionality * accessibility/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::elementRect): * accessibility/AccessibilityImageMapLink.h: * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::elementAccessibilityHitTest): * accessibility/AccessibilityListBox.h: * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::elementRect): * accessibility/AccessibilityListBoxOption.h: * accessibility/AccessibilityMenuListOption.cpp: (WebCore::AccessibilityMenuListOption::elementRect): * accessibility/AccessibilityMenuListOption.h: (WebCore::AccessibilityMenuListOption::size): * accessibility/AccessibilityMenuListPopup.h: (WebCore::AccessibilityMenuListPopup::elementRect): (WebCore::AccessibilityMenuListPopup::size): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clickPoint): (WebCore::AccessibilityObject::orientation): (WebCore::AccessibilityObject::elementAccessibilityHitTest): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::accessibilityHitTest): (WebCore::AccessibilityObject::boundingBoxRect): (WebCore::AccessibilityObject::size): (WebCore::AccessibilityObject::boundsForVisiblePositionRange): (WebCore::AccessibilityObject::doAXBoundsForRange): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::boundingBoxRect): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::elementRect): (WebCore::AccessibilityRenderObject::size): (WebCore::AccessibilityRenderObject::clickPoint): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): (WebCore::AccessibilityRenderObject::visiblePositionForPoint): (WebCore::AccessibilityRenderObject::doAXBoundsForRange): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::accessibilityHitTest): (WebCore::AccessibilityScrollView::elementRect): * accessibility/AccessibilityScrollView.h: * accessibility/AccessibilityScrollbar.cpp: (WebCore::AccessibilityScrollbar::elementRect): * accessibility/AccessibilityScrollbar.h: * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySliderThumb::elementRect): (WebCore::AccessibilitySliderThumb::size): * accessibility/AccessibilitySlider.h: * accessibility/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::elementRect): (WebCore::AccessibilityTableColumn::size): * accessibility/AccessibilityTableColumn.h: * accessibility/AccessibilityTableHeaderContainer.cpp: (WebCore::AccessibilityTableHeaderContainer::elementRect): (WebCore::AccessibilityTableHeaderContainer::size): * accessibility/AccessibilityTableHeaderContainer.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper position]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): (-[AccessibilityObjectWrapper accessibilityShowContextMenu]): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch focus handling to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66331 Reviewed by Eric Seidel. Convert FocusController and SpatialNavigation to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * page/FocusController.cpp: (WebCore::updateFocusCandidateIfNeeded): (WebCore::FocusController::findFocusCandidateInContainer): (WebCore::FocusController::advanceFocusDirectionallyInContainer): (WebCore::FocusController::advanceFocusDirectionally): * page/FocusController.h: * page/SpatialNavigation.cpp: (WebCore::alignmentForRects): (WebCore::start): (WebCore::middle): (WebCore::end): (WebCore::areRectsFullyAligned): (WebCore::areRectsPartiallyAligned): (WebCore::areRectsMoreThanFullScreenApart): (WebCore::below): (WebCore::rightOf): (WebCore::isRectInDirection): (WebCore::hasOffscreenRect): (WebCore::scrollInDirection): (WebCore::deflateIfOverlapped): (WebCore::canScrollInDirection): (WebCore::rectToAbsoluteCoordinates): (WebCore::nodeRectInAbsoluteCoordinates): (WebCore::frameRectInAbsoluteCoordinates): (WebCore::entryAndExitPointsForDirection): (WebCore::distanceDataForNode): (WebCore::canBeScrolledIntoView): (WebCore::virtualRectForDirection): (WebCore::virtualRectForAreaElementAndDirection): * page/SpatialNavigation.h: 2011-08-17 Levi Weintraub <leviw@chromium.org> Switch Document, DocumentMarker, Clipboard, and Range to new layout types https://bugs.webkit.org/show_bug.cgi?id=66330 Reviewed by Eric Seidel. Converting the remaining DOM classes to use the LayoutUnit abstraction. No new tests, no new behavior. * dom/Clipboard.h: (WebCore::Clipboard::dragLocation): * dom/Document.cpp: (WebCore::Document::nodesFromRect): (WebCore::nodeFromPoint): (WebCore::Document::caretRangeFromPoint): (WebCore::Document::prepareMouseEvent): * dom/Document.h: * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::markerContainingPoint): (WebCore::DocumentMarkerController::renderedRectsForMarkers): (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect): * dom/DocumentMarkerController.h: * dom/Range.cpp: (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): * dom/RenderedDocumentMarker.h: (WebCore::RenderedDocumentMarker::contains): (WebCore::RenderedDocumentMarker::setRenderedRect): (WebCore::RenderedDocumentMarker::renderedRect): (WebCore::RenderedDocumentMarker::invalidMarkerRect): (WebCore::RenderedDocumentMarker::invalidate): 2011-08-17 Dan Bernstein <mitz@apple.com> Removed an unused setting. Reviewed by Anders Carlsson. * WebCore.exp.in: * page/Settings.cpp: (WebCore::Settings::Settings): Removed initializer for m_needsTigerMailQuirks. * page/Settings.h: Removed accessors. 2011-08-17 Oliver Hunt <oliver@apple.com> Move towards supporting user controlled prototypes on CanvasPixelArray https://bugs.webkit.org/show_bug.cgi?id=66429 Reviewed by Gavin Barraclough. Start using a per-global object structure for canvas pixel array. * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): 2011-08-17 Luke Macpherson <macpherson@chromium.org> Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty https://bugs.webkit.org/show_bug.cgi?id=66281 Reviewed by Eric Seidel. No new tests - refactoring only. The return if type!=CSS_NUMBER case becomes an ASSERT because it is unreachable unless there is an error in the parser. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from unsigned to CSSPrimitiveValue (WebCore::CSSPrimitiveValue::operator unsigned): Support cast from CSSPrimitiveValue to unsigned * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for CSSPropertyWebkitBoxFlex, CSSPropertyWebkitBoxFlexGroup and CSSPropertyWebkitBoxOrdinalGroup properties. 2011-08-17 Scott Byer <scottbyer@chromium.org> ScrollAnimatorNone: Remove unused field https://bugs.webkit.org/show_bug.cgi?id=66312 Reviewed by Adam Barth. No functional change; no test needed. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::scroll): * platform/ScrollAnimatorNone.h: 2011-08-17 Jeff Miller <jeffm@apple.com> Work-in-progress on Soft link against AVFoundationCF and CoreMedia https://bugs.webkit.org/show_bug.cgi?id=65725 Don't bother with SOFT_LINK_LIBRARY(libdispatch), we're going to continue to statically link to it since the DLL will have already been loaded by other parts of AAS and is guaranteed to be available if AVFoundation is enabled. Reviewed by Anders Carlsson. No new tests; no functional change. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Removed SOFT_LINK_DEBUG_LIBRARY(libdispatch) and SOFT_LINK_LIBRARY(libdispatch). (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable): Don't check for libdispatch. 2011-08-17 Brady Eidson <beidson@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66354 and <rdar://problem/9965209> Regression: On Lion, redirects lose HTTP authentication headers Reviewed by Alexey Proskuryakov and Darin Adler. This changes makes WebCore try to apply basic credentials after a redirect if the redirect is to the same origin, assuming the redirected URL did not contain credentials directly. Tests: http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request. (WebCore::ResourceHandle::createCFURLConnection): Use the applyBasicAuthorizationHeader helper. (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request. * platform/network/mac/ResourceHandleMac.mm: (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request. (WebCore::ResourceHandle::createNSURLConnection): Use the applyBasicAuthorizationHeader helper. (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request. 2011-08-17 Chris Fleizach <cfleizach@apple.com> Accessibility stack exhaustion using role attribute https://bugs.webkit.org/show_bug.cgi?id=65174 Reviewed by Darin Adler. Forgot to commit review comments. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent): 2011-08-17 Chris Fleizach <cfleizach@apple.com> Accessibility stack exhaustion using role attribute https://bugs.webkit.org/show_bug.cgi?id=65174 Make sure we do not call accessibilityIsIgnored() during the AccessibilityObject creation flow. That can lead to loops. Reviewed by Darin Adler. Tests: accessibility/crash-determining-aria-role-when-label-present.html * accessibility/AccessibilityObject.cpp: (WebCore::createARIARoleMap): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): * accessibility/AccessibilityRenderObject.h: 2011-08-17 James Robinson <jamesr@chromium.org> [chromium] Crash if compositing is disabled during updateLayers() https://bugs.webkit.org/show_bug.cgi?id=66353 Reviewed by Kenneth Russell. If compositing is turned off during LayerRendererChromium::updateLayers(), the rootLayer() will become null. Sicne CCLayerTreeHost::doComposite() calls updateLayers() and then drawLayers() without checking for this case, drawLayers() has to return without doing anything if the root layer is null. Crash fixed based on crash reports. No known reliably repro case, unfortunately. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2011-08-17 Dan Bernstein <mitz@apple.com> <rdar://problem/9971293> Mid-word breaks can occur in the middle of a surrogate pair https://bugs.webkit.org/show_bug.cgi?id=66402 Reviewed by Dave Hyatt. Test: fast/text/midword-break-before-surrogate-pair-2.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Just never allow a mid-word break before a trailing surrogate. 2011-08-16 Chang Shu <cshu@webkit.org> Support reset in WebCore::Internals https://bugs.webkit.org/show_bug.cgi?id=66307 Reviewed by Dimitri Glazkov. New tests will be added when function reset is implemented. Added framework code in WebCoreTestSupport. The real implementation of Internals::reset() depends on the need from the settings that require a reset. * testing/Internals.cpp: (WebCore::Internals::reset): * testing/Internals.h: * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): * testing/js/WebCoreTestSupport.h: * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): * testing/v8/WebCoreTestSupport.h: 2011-08-17 Tony Chang <tony@chromium.org> Fix chromium mac compile. MediaPlayerPrivateAVFoundationObjC.* moved and the WebCore.gypi file wasn't updated. * WebCore.gypi: 2011-08-17 Abhishek Arya <inferno@chromium.org> Crash in Document::recalcStyleSelector https://bugs.webkit.org/show_bug.cgi?id=66335 Reviewed by Simon Fraser. When node is getting destroyed and its removedFromDocument is not called due to entire document structure torn down(using removeAllChildren), make sure to clear out the stylesheet candidate node from document's structures in its destructor. Test: svg/dom/stylesheet-candidate-node-crash-main.html * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::~ProcessingInstruction): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::~HTMLLinkElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::~HTMLStyleElement): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::~SVGStyleElement): 2011-08-17 Sam White <samuel.white@rochester.edu> AccessibilityObject levels are inconsistent https://bugs.webkit.org/show_bug.cgi?id=66180 Updated accessibilityTable to return level values consistent with other accessibilityObjects that return level values. This means a value of 0 is now only returned when tableLevel() is called on a non-table element. Reviewed by Chris Fleizach. Test: platform/mac/accessibility/element-level.html * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::tableLevel): * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-08-17 Ryosuke Niwa <rniwa@webkit.org> An arrow key collapses directionless selection range in the wrong direction in BiDi https://bugs.webkit.org/show_bug.cgi?id=64626 Reviewed by Darin Adler. The bug was caused by willBeModified's always using block direction to determine the direction to which the selection is collapsed. Fixed the bug by calling directionOfSelection in willBeModified, which will return the text direction of the surrounding context when the start and the end have the same direction. When the text directions at the start and at the end of selection do not match, it uses the block's text direction. Test: editing/selection/collapse-selection-in-bidi.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::directionOfSelection): Added. (WebCore::FrameSelection::willBeModified): Calls directionOfSelection. (WebCore::FrameSelection::modifyMovingRight): Ditto. (WebCore::FrameSelection::modifyMovingLeft): Ditto. * editing/FrameSelection.h: 2011-08-17 Jeff Miller <jeffm@apple.com> Some AVFoundation source files should be in platform-specific directories https://bugs.webkit.org/show_bug.cgi?id=66352 Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf, and moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/. While I was at it, added svn:eol-style property to the MediaPlayerPrivateAVFoundationObjC.* files. Also, for some reason, Visual Studio decided to re-sort a couple files in \inspector\front-end\ in WebCore.vcproj, even though I just re-sorted the project in r93215. Reviewed by Eric Carlson. No new tests; no functional change. * WebCore.vcproj/WebCore.vcproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf. * WebCore.vcproj/WebCoreMediaQT.vsprops: Added $(ProjectDir)..\platform\graphics\avfoundation\cf to include paths. * WebCore.xcodeproj/project.pbxproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Removed. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Removed. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Removed. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Removed. * platform/graphics/avfoundation/cf: Added. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h. * platform/graphics/avfoundation/objc: Added. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm. 2011-08-17 Luke Macpherson <macpherson@chromium.org> Only set m_fontDirty if TextSizeAdjust is actually changed. https://bugs.webkit.org/show_bug.cgi?id=66022 Reviewed by Darin Adler. No new tests. Refactoring only. Reduces instances where the font information is dirtied to save recalculation where it is not necessary. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Call new setTextSizeAdjust function. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::setTextSizeAdjust): Add wrapper for RenderStyle::setTextSizeAdjust() that automatically updates m_fontDirty. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::setTextSizeAdjust): Make setTextSizeAdjust return true if the unlderlying value was changed. 2011-08-17 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Crash in HarfbuzzFace::~HarfbuzzFace https://bugs.webkit.org/show_bug.cgi?id=66211 Holds Skia's unique font ID instead of FontPlatformData to avoid accessing freed FontPlatformData. Reviewed by Tony Chang. No new tests; no functional change. * platform/graphics/chromium/HarfbuzzSkia.cpp: (WebCore::releaseCachedHarfbuzzFace): Changed the argument. (WebCore::HarfbuzzFace::HarfbuzzFace): Changed to have Skia's font uniqueID instead of FontPlatformData. (WebCore::HarfbuzzFace::~HarfbuzzFace): Uses m_uniqueID to call releaseCachedHarfbuzzFace. * platform/graphics/chromium/HarfbuzzSkia.h: 2011-08-17 Jeff Miller <jeffm@apple.com> Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML. * WebCore.vcproj/WebCore.vcproj: 2011-08-17 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThumb to match WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=66311 Reviewed by Dimitri Glazkov. Updated wkScrollbarMinimumTotalLengthNeededForThumb() based on the latest disassembly of libWebKitSystemInterfaceLion.a. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarMinimumTotalLengthNeededForThumb): 2011-08-17 Steve Block <steveblock@google.com> Unreviewed, rolling out r93186. http://trac.webkit.org/changeset/93186 https://bugs.webkit.org/show_bug.cgi?id=66114 Breaks LayoutTests on Chromium canary bots * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/cc/CCLayerImpl.h: 2011-08-17 Ryosuke Niwa <rniwa@webkit.org> Get rid of calls to deprecatedNode and deprecatedEditingOffset in AccessibilityRenderObject.cpp and InsertTextCommand.cpp https://bugs.webkit.org/show_bug.cgi?id=66014 Reviewed by Hajime Morita. Removed calls to deprecatedNode and deprecatedEditingOffsets in the following files. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls Position::rootEditableElement and Range::setEnd(const Position&, ExceptionCode) instead of manually pulling deprecatedNode and deprecatedEditingOffset. (WebCore::AccessibilityRenderObject::index): Abstracted the logic to loop through render objects from deprecatedNodes' renderer to m_renderer as renderObjectContainsPosition. * dom/Position.h: (WebCore::Position::rootEditableElement): Added. * dom/Range.cpp: (WebCore::Range::setStart): Added. (WebCore::Range::setEnd): Added. * dom/Range.h: * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::insertTab): * editing/RenderedPosition.cpp: (WebCore::renderObjectContainsPosition): Extracted from AccessibilityRenderObject::index. * editing/RenderedPosition.h: 2011-08-17 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Fix issue where scrollbar wouldn't be drawn until page finished loading https://bugs.webkit.org/show_bug.cgi?id=66238 Reviewed by Dimitri Glazkov. Overlay scrollbars were not visible if the user scrolled a page while the page was loading. The sequence of events necessary to reproduce this bug were: 1. -[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:] is called 2. animation is delayed because shouldSuspendScrollAnimations() is true 3. ScrollAnimatorChromiumMac::scroll() is called before the ScrollAnimatorChromiumMac::m_initialScrollbarPaintTimer is fired. 4. At this point the scrollbar painter assumes the scrollbar is already visible (because of 1.) so the scrollbar's alpha stays at 0. Thus the scrollbar isn't visible until the page finishes loading. It turns out that the root problem was that when the initialScrollbarPainterTimer fired I wasn't flashing the scrollbar correctly. My implementation of wkScrollbarPainterForceFlashScrollers() just called flashScrollers. The Safari implementation of this function also calls hideOverlayScrollers. Calling hideOverlayScrollers causes the alpha to change to 0 which prevents step 4 from happening. Also, now that wkScrollbarPainterForceFlashScrollers is working correctly I don't need the extra logic I added to the initialScrollbarPainterTimer handler. That logic restarted the timer if shouldSuspendScrollAnimations() was true. But this isn't necessary since calling wkScrollbarPainterForceFlashScrollers() causes -[ScrollbarPainterDelegate setUpAnimation:...] to be called which does the exact same thing. Removing the extra logic reverts http://trac.webkit.org/changeset/92316. * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterForceFlashScrollers): 2011-08-16 Andrey Kosyakov <caseq@chromium.org> Web Inspector: maintain visible view hierarchy and dispatch common view events automatically https://bugs.webkit.org/show_bug.cgi?id=66131 Reviewed by Pavel Feldman. Test: inspector/view-events.html - added a notion of an optional parent to a View - maintain a list of View children - dispatch common view events, such as show/hide/resize automatically through the hierarchy of visible views. - promoted Panel's logic of (re)storing scroll positions to view - demoted inheritScrollPositionFromView to a couple of views that need it. * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype.onResize): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.populateStatusBar): (WebInspector.ConsoleView.prototype.elementsToRestoreScrollPositionsFor): * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype.onResize): (WebInspector.SimpleCookiesTable.prototype.onResize): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype.onResize): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype.onResize): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.set visibleView): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype.onResize): (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished): (WebInspector.Drawer.prototype._animateDrawerHeight): (WebInspector.Drawer.prototype._statusBarDragging): (WebInspector.Drawer.prototype._endStatusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.onResize): * inspector/front-end/ExtensionPanel.js: * inspector/front-end/FontView.js: (WebInspector.FontView.prototype.onResize): * inspector/front-end/IFrameView.js: (WebInspector.IFrameView): * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView.prototype._installHighlightSupport): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.NetworkLogView.prototype.onResize): (WebInspector.NetworkLogView.prototype.wasShown): (WebInspector.NetworkLogView.prototype.willHide): (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype.show): (WebInspector.NetworkPanel.prototype._showResource): (WebInspector.NetworkPanel.prototype._closeVisibleResource): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): (WebInspector.Panel.prototype.hide): (WebInspector.Panel.prototype.performSearch.processChunk): (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.updateSidebarWidth): * inspector/front-end/PanelEnablerView.js: (WebInspector.PanelEnablerView.prototype.show): (WebInspector.PanelEnablerView.prototype.onResize): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView.prototype.onResize): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.updateMainViewWidth): * inspector/front-end/ResourceCookiesView.js: (WebInspector.ResourceCookiesView.prototype.onResize): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): * inspector/front-end/ResourceResponseView.js: (WebInspector.ResourceResponseView.prototype.contentLoaded): * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.prototype.show): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.show): (WebInspector.ResourcesPanel.prototype._innerShowView): (WebInspector.ResourcesPanel.prototype.closeVisibleView): (WebInspector.ResourcesPanel.prototype.updateMainViewWidth): (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.show): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype.setSidebarWidth): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.show): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype.clearMessages): (WebInspector.SourceFrame.prototype._setTextViewerDecorations): (WebInspector.SourceFrame.prototype.inheritScrollPositions): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.appendTab): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.TextViewer.prototype.inheritScrollPositions): (WebInspector.TextViewer.prototype.onResize): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.onResize): (WebInspector.TimelinePanel.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.TimelinePanel.prototype.show): * inspector/front-end/View.js: (WebInspector.View): (WebInspector.View.prototype.wasShown): (WebInspector.View.prototype.willHide): (WebInspector.View.prototype._innerShow): (WebInspector.View.prototype.show): (WebInspector.View.prototype._innerHide): (WebInspector.View.prototype.hide): (WebInspector.View.prototype._detach): (WebInspector.View.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.View.prototype.storeScrollPositions): (WebInspector.View.prototype.restoreScrollPositions): (WebInspector.View.prototype.addChildView): (WebInspector.View.prototype.removeChildView): (WebInspector.View.prototype.onResize): (WebInspector.View.prototype.doResize): (WebInspector.View.prototype.dispatchToSelfAndVisibleChildren): (WebInspector.View.prototype.dispatchToVisibleChildren): * inspector/front-end/inspector.js: (WebInspector.windowResize): 2011-08-16 Luke Macpherson <macpherson@chromium.org> Represent RenderStyle::textOverflow property using an enum instead of a bool. https://bugs.webkit.org/show_bug.cgi?id=66356 Reviewed by Dan Bernstein. No new tests - no behavioral changes. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from TextOverflow to CSSPrimitiveValue. (WebCore::CSSPrimitiveValue::operator TextOverflow): Support cast from CSSPrimitiveValue to TextOverflow. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for text overflow. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::textOverflow): Return TextOverflow enum. (WebCore::InheritedFlags::setTextOverflow): Accept TextOverflow enum parameter. (WebCore::InheritedFlags::initialTextOverflow): Return TextOverflowClip. * rendering/style/RenderStyleConstants.h: Define TextOverflow enum. * rendering/style/StyleRareNonInheritedData.h: Change representation of text overflow from bool to one-bit unsigned. 2011-08-16 Jeff Miller <jeffm@apple.com> Apple's Windows production build should fail to compile if AVFoundation is not enabled https://bugs.webkit.org/show_bug.cgi?id=66339 Generate a compile-time error for Production builds if !USE(AVFOUNDATION). Reviewed by Darin Adler. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Generate a compile-time error for Production builds if !USE(AVFOUNDATION). 2011-08-16 David Levin <levin@chromium.org> REGRESSION (r89086): All worker xhr requests trigger preflight requests. https://bugs.webkit.org/show_bug.cgi?id=66340 Reviewed by Adam Barth. Test coming in a more comprehensive patch shortly. This is just a very targetted patch to allow for easier merging. * loader/CrossOriginAccessControl.cpp: (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Add referer to the list of whitelisted headers. It can't be set by xhr so it is ok to whitelist it, but it is set before calling this function. This is similar to what is done for "origin" in here. 2011-08-16 Shawn Singh <shawnsingh@chromium.org> Computing screen-space transform for LayerChromium and CCLayerImpl https://bugs.webkit.org/show_bug.cgi?id=66114 Reviewed by James Robinson. Test: compositing/backface-visibility-hierarchical-transform.html Added a data member to LayerChromium and CCLayerImpl that holds the screen-space transform. The transform is computed in calculateDrawTransformsAndVisibility(), which is used during updating (LayerChromium) and drawing (CCLayerImpl). This transform will also be used for other things, such as HUD drawing, in upcoming patches. Also fixed a FIXME in LayerRendererChromium::drawLayer, which was not computing the entire hierarchy of transforms to determine back-face visibility. Now it simply uses the screen space transform. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::screenSpaceDrawTransform): (WebCore::LayerChromium::setScreenSpaceDrawTransform): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::drawLayer): (WebCore::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::screenSpaceDrawTransform): (WebCore::CCLayerImpl::setScreenSpaceDrawTransform): 2011-08-16 Hayato Ito <hayato@chromium.org> Implement proper handling of events which happen in children of shadow hosts. https://bugs.webkit.org/show_bug.cgi?id=66285 Reviewed by Dimitri Glazkov. Fix the issue where a shadow host stops an event propagation if an event happens at the children of shadow hosts, outside of the shadow root. Test: fast/dom/shadow/shadow-contents-event.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::adjustToShadowBoundaries): 2011-08-16 Per-Erik Brodin <per-erik.brodin@ericsson.com> Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions https://bugs.webkit.org/show_bug.cgi?id=65694 Reviewed by Alexey Proskuryakov. No new tests since there is no change in behavior. * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): * loader/ThreadableLoader.h: (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): * notifications/Notification.cpp: (WebCore::Notification::startLoading): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2011-08-16 Scott Byer <scottbyer@chromium.org> Fix spelling error. https://bugs.webkit.org/show_bug.cgi?id=66261 Reviewed by Adam Barth. No functional change, no tests needed. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::scroll): (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimator::notifyPositionChanged): * platform/ScrollAnimator.h: * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorNone::animationTimerFired): * platform/ScrollAnimatorWin.cpp: (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorWin::animateScroll): * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollToPoint): (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorMac::notifyPositionChanged): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> ASSERT in fast/css/custom-font-xheight.html https://bugs.webkit.org/show_bug.cgi?id=66328 Reviewed by Dan Bernstein. In r93140 the temporary font created for a remote CSS font face was created without being retained. We need to protect the font from being purged while we hold onto it, so add a font cache purge preventer. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. Take 4. Namespace the now public enum as FontCache::ShouldRetain. * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData): 2011-08-15 Stephen White <senorblanco@chromium.org> Canvas resizing can be slow https://bugs.webkit.org/show_bug.cgi?id=66251 Canvas resizing was slow due to re-allocation of the ImageBuffer on each size change (width or height). This was introduced inadvertently by calls to isAccelerated() during canvas reset(). Since we won't know if we have successfully accelerated until ImageBuffer creation, move the compositor invalidation to createImageBuffer() as well. This patch also attempts to unify the Skia and CG accelerated canvas paths. The DrawingBuffer used by the Skia path is now owned by ImageBuffer[Skia], similar to how the IOSurface is owned by ImageBuffer[CG]. Some of the logic for when to accelerate was moved into HTMLCanvasElement and unified with the CG path. Acceleration is also now enabled by the same "Accelerated" ImageBuffer create flag used by the CG path. DrawingBuffer is now re-created even for a same-size change (same as the memory buffer), but we speed it up by calling GraphicsContext3D::texImage2D() with a NULL pixels ptr instead of GraphicsContext3D::teximage2DResourceSafe() (no need to clear it, since it's done with a glClear anyway). Reviewed by Kenneth Russell. Covered by existing tests in fast/canvas and canvas/philip. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): Don't call isAccelerated() from reset(), since we don't want to inadvertently create the ImageBuffer. Also, since we won't know if we have successfully accelerated until createImageBuffer() is called, defer the compositor invalidation to createImageBuffer() as well. (WebCore::HTMLCanvasElement::shouldAccelerate): Unify the CG and Skia ports' logic for when to accelerate (Skia logic moved in from CanvasRenderingContext2D). (WebCore::HTMLCanvasElement::createImageBuffer): Use the unified shouldAccelerate() logic, and pass it as a flag to ImageBuffer. Do compositor invalidation as well. * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::hasCreatedImageBuffer): Expose hasCreatedImageBuffer() publically, so CanvasRenderingContext2D::isAccelerated() doesn't inadvertently create it. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): Remove all acceleration setting and resetting, since it's now done during ImageBuffer creation. (WebCore::CanvasRenderingContext2D::isAccelerated): Check if the image buffer was created, so we don't inadvertently create it here. (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer): Don't call GraphicsContext3D::paintsIntoCanvasBuffer(), since its WebViewImpl may be null. Ask the render tree instead. (WebCore::CanvasRenderingContext2D::reset): Don't reset acceleration here, since we don't own it anymore. (WebCore::CanvasRenderingContext2D::platformLayer): Call into the ImageBuffer to get our PlatformLayer. * html/canvas/CanvasRenderingContext2D.h: Remove m_drawingBuffer, and all acceleration-related calls. * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContext.h: Remove setGraphicsContext3D(), and paintsIntoImageBuffer(). * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::platformLayer): Implement a dummy platformLayer() call for non-skia ports. * platform/graphics/ImageBuffer.h: Declare a platformLayer() call (USE(ACCELERATED_COMPOSITING) only). * platform/graphics/chromium/ImageBufferDataSkia.h: Add a DrawingBuffer data member. * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::reset): Use texImage2D() with a NULL ptr, not texImage2DResourceSafe(). Since we immediately clear the framebuffer via glClear(), this whole resource safe business is overkill. * platform/graphics/skia/GraphicsContextSkia.cpp: Remove setGraphicsContext3D() and paintsIntoImageBuffer(). This functionality is handled by ImageBuffer now. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): Give the ImageBufferData ownership of the DrawingBuffer. (WebCore::ImageBuffer::platformLayer): Implement an accessor for the DrawingBuffer's PlatformLayer. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: Remove isPathSkiaSafe() extern (unused). Remove paintsIntoImageBuffer() (now unused). Remove IntSize param from setGraphicsContext3D() (unused). 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. Take 3. Include the proper includes! * platform/graphics/FontCache.h: 2011-08-16 Mihnea Ovidenie <mihnea@adobe.com> Unmatrix algorithm implementation is wrong https://bugs.webkit.org/show_bug.cgi?id=66080 Reviewed by Dean Jackson. Current version of the algorithm negates only the scaleX while it should negate also scaleY and scaleZ when appropriate. Test: animations/animation-matrix-negative-scale-unmatrix.html * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::decompose): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. This just makes the troublesome enum public. If this fixes the build I will file a follow-up bug to clean-up these build issues and either keep the enum public and cleanup other functions or restore the enum to private. There is no harm in making the enum public right now. * platform/graphics/FontCache.h: 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. * platform/graphics/FontCache.h: 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Windows and Chromium Windows build fix after r93140. * platform/graphics/FontCache.h: * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::FontCache::fontDataFromDescriptionAndLogFont): (WebCore::getLastResortFallbackFontProc): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::fontDataFromDescriptionAndLogFont): (WebCore::FontCache::getLastResortFallbackFont): 2011-08-16 Adam Roben <aroben@apple.com> Make placeholder text remain visible until a character is typed on Windows Fixes <http://webkit.org/b/66319> Placeholder text in text fields disappears when the field is focused on Windows, which doesn't match Lion or Windows native text fields Covered by existing tests (which are currently failing on the bots until this patch lands). Reviewed by Dave Hyatt. * rendering/RenderThemeSafari.h: (WebCore::RenderThemeSafari::shouldShowPlaceholderWhenFocused): * rendering/RenderThemeWin.h: (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused): Added overrides to return true. 2011-08-16 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66254 Make region invalidation and repainting work properly. We do this by making RenderFlowThreads into repaint containers and then issuing new repaints in the regions that contain the invalidated flow thread content. Reviewed by Simon Fraser. Added new tests in fast/repaint. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingRenderFlowThread): (WebCore::RenderObject::containerForRepaint): (WebCore::RenderObject::repaintUsingContainer): * rendering/RenderObject.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): (WebCore::RenderView::renderFlowThreadWithName): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThreads): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Abandoned Memory: Temporary CSS Fonts May Never Be Purged https://bugs.webkit.org/show_bug.cgi?id=66153 Reviewed by Dan Bernstein. While a remote CSS font face is loading we fallback to a temporary font. We don't want to retain the fallback font because noone takes ownership of the temporary font. This patch adds a way to get an uncached fallback font, which plumbs the ShouldRetain enum through the different platform implementations of getLastResortFallbackFont. No new tests, no functional change. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getNonRetainedLastResortFallbackFont): * platform/graphics/FontCache.h: * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::fontDataFromDescriptionAndLogFont): (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData): (WebCore::getLastResortFallbackFontProc): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/haiku/FontCacheHaiku.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/pango/FontCachePango.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/qt/FontCacheQt.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/win/FontCacheWin.cpp: (WebCore::fontDataFromDescriptionAndLogFont): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/wince/FontCacheWinCE.cpp: * platform/graphics/wx/FontCacheWx.cpp: (WebCore::FontCache::getLastResortFallbackFont): 2011-08-16 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Rubber banding gutter drawing https://bugs.webkit.org/show_bug.cgi?id=66226 Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to draw the overhang areas. Move default implementation to ScrollbarThemeComposite::paintOverhangAreas(). Add a different implementation for Chromium Mac. Reviewed by Dimitri Glazkov. No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing. * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::paintOverhangAreas): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paintOverhangAreas): * platform/ScrollbarThemeComposite.h: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-12 Wyatt Carss <wcarss@chromium.org> Programmatically set selection should not have direction on Mac https://bugs.webkit.org/show_bug.cgi?id=60529 Reviewed by Ryosuke Niwa. Modified default value of VisibleSelection->m_isDirectional from 'true' to 'false' by adding a defaulted argument to several VisibleSelection constructors to make programmatic selection be directionless by default on Mac. Also modified several calls to VisibleSelection's constructors to correctly preserve directionality. Near the end of FrameSelection::modify (presently FrameSelection.cpp:869) a call to setExtent triggers an editing delegate that uses the FrameSelection. The direction here should have been preserved from before, but setIsDirectional was not called until after FrameSelection.cpp:869. It has been moved up to make things behave. * WebCore.exp.in: * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::doApply): (WebCore::ApplyBlockElementCommand::formatSelection): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::updateStartEnd): * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphWithClones): (WebCore::CompositeEditCommand::moveParagraphs): (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): * editing/CreateLinkCommand.cpp: (WebCore::CreateLinkCommand::doApply): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete): (WebCore::DeleteSelectionCommand::doApply): * editing/Editor.cpp: (WebCore::Editor::selectionForCommand): * editing/FrameSelection.cpp: (WebCore::shouldAlwaysUseDirectionalSelection): (WebCore::FrameSelection::FrameSelection): (WebCore::FrameSelection::moveTo): (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): (WebCore::FrameSelection::modify): (WebCore::FrameSelection::setBase): (WebCore::FrameSelection::setExtent): * editing/FrameSelection.h: * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): (WebCore::InsertTextCommand::doApply): * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): * editing/TypingCommand.cpp: (WebCore::TypingCommand::makeEditableRootEmpty): (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): * editing/VisibleSelection.h: * page/EventHandler.cpp: (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): (WebCore::EventHandler::updateSelectionForMouseDrag): 2011-08-16 Jeffrey Pfau <jpfau@apple.com> New XML parser: Add document fragment parser https://bugs.webkit.org/show_bug.cgi?id=66317 Reviewed by Adam Barth. * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::parseXML): * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::parseDocumentFragment): * xml/parser/NewXMLDocumentParser.h: (WebCore::NewXMLDocumentParser::create): * xml/parser/XMLTokenizer.h: * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::XMLTreeBuilder): (WebCore::XMLTreeBuilder::pushCurrentNode): * xml/parser/XMLTreeBuilder.h: (WebCore::XMLTreeBuilder::create): (WebCore::XMLTreeBuilder::NodeStackItem::node): 2011-08-16 Jeffrey Pfau <jpfau@apple.com> New XML parser: Replace assertions regarding character data in the prolog with proper checks https://bugs.webkit.org/show_bug.cgi?id=66269 Reviewed by Adam Barth. This patch checks for character data in the prolog (which is illegal in XML) and discards it, instead of failing an assertion. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processProcessingInstruction): (WebCore::XMLTreeBuilder::processXMLDeclaration): (WebCore::XMLTreeBuilder::processDOCTYPE): (WebCore::XMLTreeBuilder::enterText): (WebCore::XMLTreeBuilder::failOnText): * xml/parser/XMLTreeBuilder.h: 2011-08-16 Alexander Pavlov <apavlov@chromium.org> Web Inspector: word wrap long edits https://bugs.webkit.org/show_bug.cgi?id=65512 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: (.styles-section .properties li.child-editing): 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: convert DOM breakpoint types to strings. https://bugs.webkit.org/show_bug.cgi?id=66304 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::domTypeForName): (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint): (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint): * inspector/InspectorDOMDebuggerAgent.h: * inspector/front-end/DOMBreakpointsSidebarPane.js: (WebInspector.DOMBreakpointsSidebarPane): 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: force pseudo element state when checking it in the styles sidebar. https://bugs.webkit.org/show_bug.cgi?id=66292 This reverts http://trac.webkit.org/changeset/89132 and introduces InspectorInstrumentation calls from the CSSStyleSelector for pseudo state processing. These calls are very fast: they are guarded with the inline checks for the front-end count. Reviewed by David Hyatt. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::styleRulesForElement): (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): (WebCore::CSSStyleSelector::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * css/CSSStyleSelector.h: * inspector/InspectorCSSAgent.cpp: (WebCore::computePseudoClassMask): (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::forcePseudoState): (WebCore::InspectorCSSAgent::getStylesForNode): (WebCore::InspectorCSSAgent::didRemoveDocument): (WebCore::InspectorCSSAgent::didRemoveDOMNode): (WebCore::InspectorCSSAgent::clearPseudoState): * inspector/InspectorCSSAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::disconnectFrontend): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::forcePseudoStateImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::forcePseudoState): 2011-08-16 Tony Chang <tony@chromium.org> Unreviewed, rolling out r93114. http://trac.webkit.org/changeset/93114 https://bugs.webkit.org/show_bug.cgi?id=66226 broke the chromium mac compile * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarTheme.h: * platform/ScrollbarThemeComposite.cpp: * platform/ScrollbarThemeComposite.h: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): * platform/mac/ScrollbarThemeMac.h: 2011-08-16 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Rubber banding gutter drawing https://bugs.webkit.org/show_bug.cgi?id=66226 Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to draw the overhang areas. Move default implementation to ScrollbarThemeComposite::paintOverhangAreas(). Add a different implementation for Chromium Mac. Reviewed by Dimitri Glazkov. No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing. * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::paintOverhangAreas): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paintOverhangAreas): * platform/ScrollbarThemeComposite.h: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-16 Luke Macpherson <macpherson@chromium.org> Support cast between CSSPrimitiveValue and ETransformStyle3D and use in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=66273 Reviewed by Simon Fraser. No new tests - no functionality changed - refactoring only. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Define cast from CSSPrimitiveValue to ETransformStyle3D. (WebCore::CSSPrimitiveValue::operator ETransformStyle3D): Define cast from ETransformStyle3D to CSSPrimitiveValue. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use appropriate macro to handle CSSPropertyWebkitTransformStyle. 2011-08-16 Luke Macpherson <macpherson@chromium.org> Use appropriate macro to handle CSSPropertyWebkitContentOrder in CSSStyleSelector::applyProperty() https://bugs.webkit.org/show_bug.cgi?id=66279 Reviewed by Simon Fraser. No new tests - no functionality changed - simple refactoring only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro to handle CSSPropertyWebkitContentOrder. This works because PrimitiveValue now supports cast to int. 2011-08-16 Eric Carlson <eric.carlson@apple.com> [REGRESSION] Media controls should always be enabled when scripting is disabled https://bugs.webkit.org/show_bug.cgi?id=66303 Reviewed by Dimitri Glazkov. Tests: media/video-controls-no-scripting-iframe.html media/video-controls-no-scripting.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): Move the controls enabling/disabling code to configureMediaControls. (WebCore::HTMLMediaElement::prepareForLoad): Call configureMediaControls. (WebCore::HTMLMediaElement::configureMediaControls): New, move code duplicated in attributeChanged and preDispatchEventHandler here. (WebCore::HTMLMediaElement::preDispatchEventHandler): Move the controls enabling/disabling code to configureMediaControls. * html/HTMLMediaElement.h: 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: hide non-conservative methods from the protocol documentation. https://bugs.webkit.org/show_bug.cgi?id=66301 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: 2011-08-16 Andras Becsi <abecsi@webkit.org> Web Inspector: nuke background events collection (dead feature) https://bugs.webkit.org/show_bug.cgi?id=66296 Fix the GTK build after r93095. Unreviewed build fix. No new tests neede. * GNUmakefile.list.am: Remove nonexistent sources. 2011-08-16 Andras Becsi <abecsi@webkit.org> Reviewed by Csaba Osztrogonác. Need AtomicStrings for the various font family names https://bugs.webkit.org/show_bug.cgi?id=28024 Unify the usage of '-webkit' prefixed font family names by using global AtomicStrings. Use a .in file to generate the needed sources through make_names.pl. No new tests needed. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_makenames.py: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::identifierForFamily): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): (WebCore::fontDataForGenericFamily): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/WebKitFontFamilyNames.in: Added. * dom/make_names.pl: * page/Frame.cpp: (WebCore::Frame::Frame): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getFontData): * platform/graphics/FontDescription.h: (WebCore::FontDescription::useFixedDefaultSize): 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: nuke background events collection (dead feature) https://bugs.webkit.org/show_bug.cgi?id=66296 Reviewed by Yury Semikhatsky. * CMakeLists.txt: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/EventsCollector.cpp: Removed. * inspector/EventsCollector.h: Removed. * inspector/Inspector.json: * inspector/InspectorFrontendProxy.cpp: Removed. * inspector/InspectorFrontendProxy.h: Removed. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::setFrontend): (WebCore::InspectorResourceAgent::clearFrontend): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): 2011-08-16 Lindsay Mathieson <lindsay.mathieson@gmail.com> [Qt] Missing spell check support https://bugs.webkit.org/show_bug.cgi?id=44114 Reviewed by Benjamin Poulain. Add drawErrorUnderline() from Cairo to render the line for text checking on the Qt port. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::drawErrorUnderline): (WebCore::GraphicsContext::drawLineForTextChecking): 2011-08-15 MORITA Hajime <morrita@google.com> REGRESSION(r70598): [Chromium] Style changes in textInput event can prevent from updating <textarea> value. https://bugs.webkit.org/show_bug.cgi?id=66216 Reviewed by Ryosuke Niwa. Element::spellcheckAttributeState() uses Element::hasAttribute(), which calls updateStyleAttribute(), which potentially makes style dirty. But that is problematic since Editor calls spellcheckAttributeState() during the spell-checking phase and make the style dirty, which can trigger re-layout, which wipes the shadow tree of a textarea out by pre-committed "value" text. This change removes the hasAttribute() call from spellcheckAttributeState(). Test: editing/input/style-change-during-input.html * dom/Element.cpp: (WebCore::Element::spellcheckAttributeState): 2011-08-15 Gyuyoung Kim <gyuyoung.kim@samsung.com> [CMAKE] Wrap files of websocket and worker in each macro. https://bugs.webkit.org/show_bug.cgi?id=65012 Move files of web socket and workers into each macro block in CMakeList.txt. And, header files related to WORKER and SHARED_WORKER are wrapped by macro in cpp files. Reviewed by Daniel Bates. * CMakeLists.txt: * UseJSC.cmake: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSWorkerContextBase.cpp: * bindings/js/ScriptState.cpp: * bindings/js/WorkerScriptController.cpp: 2011-08-15 Jeffrey Pfau <jpfau@apple.com> New XML parser: add xml namespace to the default map of namespaces https://bugs.webkit.org/show_bug.cgi?id=66266 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::NodeStackItem::NodeStackItem): 2011-08-15 Hayato Ito <hayato@chromium.org> Fix crash when mouse moves from <summary> element to parent <details> element. https://bugs.webkit.org/show_bug.cgi?id=66210 Reviewed by Dimitri Glazkov. This is a regression caused by r92922, which wrongly assumes that a shadow host always has a shadow root as an immediate child in ancestors chain. This assumption does not apply to <details> element. <details> element is implemented as a shadow host, but may have a <summary> element as an immediate child element in ancestors chain. Test: fast/dom/shadow/details-summary-mouseover.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::adjustToShadowBoundaries): 2011-08-15 Jeffrey Pfau <jpfau@apple.com> New XML parser: Use xmlnsAtom instead of redundant xmlnsPrefix https://bugs.webkit.org/show_bug.cgi?id=66264 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processNamespaces): (WebCore::XMLTreeBuilder::processAttributes): 2011-08-15 Emil A Eklund <eae@chromium.org> Switch Element/Node to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66260 Reviewed by Eric Seidel. Convert Element, Node, ElementRareData and ContainerNode to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getLowerRightCorner): (WebCore::ContainerNode::getRect): * dom/ContainerNode.h: * dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::scrollIntoViewIfNeeded): (WebCore::adjustForLocalZoom): (WebCore::Element::boundsInWindowSpace): (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): (WebCore::Element::screenRect): (WebCore::Element::minimumSizeForResizing): (WebCore::Element::setMinimumSizeForResizing): * dom/Element.h: * dom/ElementRareData.h: * dom/Node.cpp: (WebCore::Node::getRect): (WebCore::Node::renderRect): (WebCore::Node::hasNonEmptyBoundingBox): * dom/Node.h: 2011-08-15 Alexey Proskuryakov <ap@apple.com> Regional indicator symbols that are combined should behave as a single character when editing https://bugs.webkit.org/show_bug.cgi?id=65395 Reviewed by Dan Bernstein. Part one: make backspace work. Test: editing/deleting/regional-indicators.html * rendering/RenderText.cpp: (WebCore::isRegionalIndicator): (WebCore::RenderText::previousOffsetForBackwardDeletion): Added a special case for regional indicator symbols. 2011-08-15 Jeffrey Pfau <jpfau@apple.com> New XML parser: Re-entering a character node should not clobber the buffered characters https://bugs.webkit.org/show_bug.cgi?id=66257 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::enterText): 2011-08-15 Dmitry Titov <dimich@chromium.org> FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters https://bugs.webkit.org/show_bug.cgi?id=66165 Reviewed by Darin Fisher. No new tests since no change in behavior. The original issue is only reproducible on Chromium in multi-process mode and is tested there by a browsertest. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::transferLoadingResourcesFromPage): Passing ResourceLoader* into the FrameLoaderClient notification. Also, fixed the bug where the same ResourceRequest was passed for all subresources. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::transferLoadingResourceFromPage): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchTransferLoadingResourceFromPage): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchTransferLoadingResourceFromPage): * loader/ResourceLoadNotifier.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): * loader/ResourceLoader.h: (WebCore::ResourceLoader::originalRequest): Added the originalRequest() accessor that returns the request as it existed before redirects (but after client's will SendRequest). This is to be able to pass the original request for loading subresources into FrameLoaderClient::transferLoadingResourceFromPage, since that one is used to invoke assignIdentifierToInitialRequest, which needs original request. 2011-08-15 Mark Hahnenberg <mhahnenberg@apple.com> Refactor JS objects to allocate in static create methods rather than constructors https://bugs.webkit.org/show_bug.cgi?id=65347 Reviewed by Geoffrey Garen. No new tests. Removed all calls to deprecatedGetDOMObject from initialization lists as part of a larger refactoring to get rid of all allocation during initialization. * bindings/js/JSDOMBinding.h: * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): (JavaRuntimeMethod::JavaRuntimeMethod): * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::create): (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::create): (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): (JSC::Bindings::QtRuntimeConnectionMethod::create): * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_object.cpp: 2011-08-15 Adam Roben <aroben@apple.com> Update pages' style and content scale when the window's backing scale factor changes Unfortunately, I couldn't think of a way to test this in an automated fashion. Fixes <http://webkit.org/b/66229> <rdar://problem/9906269> WebKit doesn't react to device scale factor changes Reviewed by Simon Fraser. * WebCore.exp.in: Export Frame::deviceOrScaleFactorChanged. * page/Frame.cpp: (WebCore::Frame::deviceScaleFactorChanged): * page/Frame.h: Added this new function. We recalc style so that, e.g., device-scale-factor-dependent media queries will be reevaluated, and we tell compositing layers about the new scale factor so they can rerender at the new resolution. 2011-08-15 Cary Clark <caryclark@google.com> Revise Skia on Chrome Mac to return fallback fonts. https://bugs.webkit.org/show_bug.cgi?id=62986 Reviewed by Darin Fisher. Since Skia on Chrome Mac uses CoreText to determine text metrics, CG font architecture is used to return fallback fonts. This improves many existing layout tests, including justify-ideograph-simple and t0905-c414-flt-04-c * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::canReturnFallbackFontsForComplexText): 2011-08-15 Aaron Boodman <aa@chromium.org> Pass additional details to client in didCreateIsolatedContext https://bugs.webkit.org/show_bug.cgi?id=66037 Reviewed by Darin Fisher. * bindings/v8/IsolatedWorld.cpp: (WebCore::IsolatedWorld::IsolatedWorld): * bindings/v8/IsolatedWorld.h: (WebCore::IsolatedWorld::create): (WebCore::IsolatedWorld::id): * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8IsolatedContext.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext): * loader/FrameLoaderClient.h: 2011-08-15 Chris Rogers <crogers@google.com> Add shell implementation for Web Audio API's MediaElementAudioSourceNode https://bugs.webkit.org/show_bug.cgi?id=66175 Reviewed by Kenneth Russell. Test: webaudio/mediaelementaudiosourcenode.html * DerivedSources.make: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.idl: * webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaElementSource): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/AudioNode.h: * webaudio/MediaElementAudioSourceNode.cpp: Added. (WebCore::MediaElementAudioSourceNode::create): (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::process): (WebCore::MediaElementAudioSourceNode::reset): * webaudio/MediaElementAudioSourceNode.h: Added. (WebCore::MediaElementAudioSourceNode::mediaElement): * webaudio/MediaElementAudioSourceNode.idl: Added. 2011-08-15 Emil A Eklund <eae@chromium.org> Switch mouse events to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66179 Reviewed by Eric Seidel. Convert mouse events to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * dom/MouseRelatedEvent.cpp: (WebCore::contentsScrollOffset): (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::MouseRelatedEvent::initCoordinates): (WebCore::MouseRelatedEvent::computePageLocation): (WebCore::MouseRelatedEvent::computeRelativePosition): (WebCore::MouseRelatedEvent::pageLocation): * dom/MouseRelatedEvent.h: (WebCore::MouseRelatedEvent::screenLocation): (WebCore::MouseRelatedEvent::clientLocation): (WebCore::MouseRelatedEvent::absoluteLocation): (WebCore::MouseRelatedEvent::setAbsoluteLocation): * page/EventHandler.cpp: (WebCore::EventHandler::clear): (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::selectionExtentRespectingEditingBoundary): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::currentMousePosition): (WebCore::documentPointForWindowPoint): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::sendContextMenuEventForKey): (WebCore::EventHandler::fakeMouseMoveEventTimerFired): (WebCore::EventHandler::dragHysteresisExceeded): (WebCore::EventHandler::handleDrag): (WebCore::EventHandler::handleTouchEvent): * page/EventHandler.h: * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::PlatformMouseEvent): (WebCore::PlatformMouseEvent::pos): (WebCore::PlatformMouseEvent::x): (WebCore::PlatformMouseEvent::y): (WebCore::PlatformMouseEvent::globalX): (WebCore::PlatformMouseEvent::globalY): * platform/mac/PlatformMouseEventMac.mm: (WebCore::globalPoint): (WebCore::pointForEvent): (WebCore::globalPointForEvent): 2011-08-15 Ryosuke Niwa <rniwa@webkit.org> webkit-indent-blockquote is unnecessary https://bugs.webkit.org/show_bug.cgi?id=66195 Reviewed by Tony Chang. Stop adding class="webkit-indent-blockquote" on blockquotes created by execCommand('Indent') and execCommand('Outdent'). Also removed the code to add the class attribute in ApplyBlockElementCommand since no other class inherited from ApplyBlockElementCommand uses this feature. * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::ApplyBlockElementCommand): (WebCore::ApplyBlockElementCommand::createBlockElement): * editing/ApplyBlockElementCommand.h: * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::IndentOutdentCommand): 2011-08-15 Levi Weintraub <leviw@chromium.org> Switch remaining SVG Rendering methods to LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=66169 Reviewed by Eric Seidel. Changing remaining integer SVG methods to use the LayoutUnits abstraction. No tests as no change in functionality. * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::visualOverflowRect): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::paint): (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGForeignObject::computeRectForRepaint): * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::paint): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::linesBoundingBox): * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::outlineBoundsForRepaint): * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::paint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::localToBorderBoxTransform): (WebCore::RenderSVGRoot::parentOriginToBorderBox): (WebCore::RenderSVGRoot::borderOriginToContentBox): (WebCore::RenderSVGRoot::localToRepaintContainerTransform): (WebCore::RenderSVGRoot::localToParentTransform): (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint): (WebCore::RenderSVGRoot::computeRectForRepaint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::paint): * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::paint): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paint): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint): (WebCore::SVGRenderSupport::computeRectForRepaint): * rendering/svg/SVGRenderSupport.h: * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::paint): (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): (WebCore::SVGRootInlineBox::layoutChildBoxes): (WebCore::SVGRootInlineBox::layoutRootBox): (WebCore::SVGRootInlineBox::closestLeafChildForPosition): * rendering/svg/SVGRootInlineBox.h: 2011-08-12 Jeff Miller <jeffm@apple.com> MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem https://bugs.webkit.org/show_bug.cgi?id=66171 MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem to match the Mac implementation in MediaPlayerPrivateAVFoundationObjC. I also added better logging to notificationCallback(). Reviewed by Jon Honeycutt. No new tests, uses existing media tests. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::playerItemStatus): Return MediaPlayerAVPlayerItemStatusDoesNotExist if no AVPlayerItem. (WebCore::AVFWrapper::notificationCallback): Log the name of the received notification. 2011-08-15 Adam Roben <aroben@apple.com> Rename an instance of pageScaleFactorChanged I missed in r93040 I tried to make a test for this but failed. It would probably have been easier if we dumped layers' content scales in layerTreeAsText output. Followup to <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the device scale factor * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::deviceOrPageScaleFactorChanged): * platform/graphics/ca/GraphicsLayerCA.h: Renamed from pageScaleFactorChanged to match the base class. 2011-08-15 Pavel Feldman <pfeldman@google.com> Web Inspector: [V8] crash upon stepIn while not on pause. https://bugs.webkit.org/show_bug.cgi?id=66221 Reviewed by Yury Semikhatsky. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::resume): (WebCore::InspectorDebuggerAgent::stepOver): (WebCore::InspectorDebuggerAgent::stepInto): (WebCore::InspectorDebuggerAgent::stepOut): (WebCore::InspectorDebuggerAgent::assertPaused): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._stepOverClicked): (WebInspector.ScriptsPanel.prototype._stepIntoClicked): (WebInspector.ScriptsPanel.prototype._stepOutClicked): 2011-08-15 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network panel: display the current search match index in the toolbar. https://bugs.webkit.org/show_bug.cgi?id=66051 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._highlightNthMatchedResource): (WebInspector.NetworkLogView.prototype.performSearch): (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype._onSearchCountUpdated): (WebInspector.NetworkPanel.prototype._onSearchIndexUpdated): 2011-08-10 Adam Roben <aroben@apple.com> Clear up scale factor terminology WebKit by and large deals with two scale factors: one intrinsic to the device on which the software is running, and one that is per-Page and can be controlled via API calls. This patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the code use those names. It should introduce no behavior changes. Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the device scale factor Reviewed by Simon Fraser. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Removed an unused member. This is unrelated to this patch. * css/MediaQueryEvaluator.cpp: * html/HTMLCanvasElement.cpp: * html/HTMLCanvasElement.h: * loader/EmptyClients.h: * page/Chrome.cpp: * page/Chrome.h: * page/ChromeClient.h: * page/DOMWindow.cpp: * page/Frame.cpp: * page/Frame.h: * platform/graphics/GraphicsLayer.cpp: * platform/graphics/GraphicsLayer.h: * platform/graphics/GraphicsLayerClient.h: * platform/graphics/ca/GraphicsLayerCA.cpp: * rendering/RenderInline.cpp: * rendering/RenderLayerBacking.cpp: * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: * rendering/RenderLayerCompositor.h: * rendering/RenderObject.cpp: 2011-08-15 Oliver Varga <Varga.Oliver@stud.u-szeged.hu> Reviewed by Nikolas Zimmermann. Speed up SVGSMILElement::findInstanceTime. https://bugs.webkit.org/show_bug.cgi?id=61025 Replace the linear search to binary search on ordered list because the previous searches from the beginning was not efficient. Out of index error fixed by Renata Hodovan. No new tests this is only a performance tweak. * svg/animation/SVGSMILElement.cpp: (WebCore::extractTimeFromVector): (WebCore::SVGSMILElement::findInstanceTime): 2011-08-15 Hayato Ito <hayato@chromium.org> Implement proper handling of focusin/focusout events in regard to shadow DOM boundaries. https://bugs.webkit.org/show_bug.cgi?id=64249 Reviewed by Dimitri Glazkov. Introduces FocusInEventDispatchMediator/FocusOutEventDispatchMediator so that we can shrink ancestors of event target node considering shadow DOM boundaries before dispatching focusin/focusout events. Test: fast/dom/shadow/shadow-boundary-events.html * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Node.cpp: (WebCore::Node::dispatchFocusInEvent): (WebCore::Node::dispatchFocusOutEvent): (WebCore::Node::dispatchDOMActivateEvent): (WebCore::Node::defaultEventHandler): * dom/Node.h: * dom/UIEvent.cpp: (WebCore::FocusInEventDispatchMediator::create): (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator): (WebCore::FocusInEventDispatchMediator::dispatchEvent): (WebCore::FocusOutEventDispatchMediator::create): (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator): (WebCore::FocusOutEventDispatchMediator::dispatchEvent): * dom/UIEvent.h: 2011-08-15 Pavel Feldman <pfeldman@google.com> Web Inspector: not all of the properties have valid descriptors on all platforms. Includes PropertyDescriptor protocol documentation fixes. https://bugs.webkit.org/show_bug.cgi?id=66215 Activations, LocalStorage and some other properties potentially don't have valid property descriptors. InjectedScript should use conservative getter in order to mitigate this. Reviewed by Yury Semikhatsky. * inspector/InjectedScriptSource.js: * inspector/Inspector.json: 2011-08-15 Pavel Feldman <pfeldman@google.com> Web Inspector: context menu on the link in the console does not have standard link options. https://bugs.webkit.org/show_bug.cgi?id=66214 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/ElementsPanel.js: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.populateContextMenu): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._contextMenu): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired): * inspector/front-end/inspector.js: (WebInspector.openLinkExternallyLabel): (WebInspector.copyLinkAddressLabel): (WebInspector.populateHrefContextMenu): 2011-08-14 Pavel Feldman <pfeldman@chromium.org> Web Inspector: showContextMenu missing in Remote DevTools https://bugs.webkit.org/show_bug.cgi?id=63725 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleView.js: * inspector/front-end/SoftContextMenu.js: Added. (.WebInspector.SoftContextMenu): (.WebInspector.SoftContextMenu.prototype.show): (.WebInspector.SoftContextMenu.prototype._createMenuItem): (.WebInspector.SoftContextMenu.prototype._createSeparator): (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown): (.WebInspector.SoftContextMenu.prototype._menuItemMouseUp): (.WebInspector.SoftContextMenu.prototype._triggerAction): (.WebInspector.SoftContextMenu.prototype._menuItemMouseOver): (.WebInspector.SoftContextMenu.prototype._menuItemMouseOut): (.WebInspector.SoftContextMenu.prototype._highlightMenuItem): (.WebInspector.SoftContextMenu.prototype._highlightPrevious): (.WebInspector.SoftContextMenu.prototype._highlightNext): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): (.WebInspector.SoftContextMenu.prototype._glassPaneMouseUp): (.WebInspector.SoftContextMenu.prototype._discardMenu): (.InspectorFrontendHost.showContextMenu): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.soft-context-menu-glass-pane): (.soft-context-menu): (.soft-context-menu-item): (.soft-context-menu-separator): (.soft-context-menu-item-mouse-over): * inspector/front-end/inspector.html: 2011-08-13 Abhishek Arya <inferno@chromium.org> Crash in HTMLTreeBuilder::processAnyOtherEndTagForInBody https://bugs.webkit.org/show_bug.cgi?id=66187 Reviewed by Adam Barth. RefPtr a few ContainerNodes to prevent premature deletion. Test: fast/html/process-end-tag-for-inbody-crash.html * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-08-14 Kalev Lember <kalevlember@gmail.com> Fix GTK Windows build after r92308. https://bugs.webkit.org/show_bug.cgi?id=66140 Reviewed by Xan Lopez. * config.h: Don't try to include WebCoreHeaderDetection.h for GTK. 2011-08-13 Sam Weinig <sam@webkit.org> Remove forward declaration of -[WebUndefined dealloc] to appease the bot gods. * bindings/objc/WebScriptObject.mm: 2011-08-13 Sam Weinig <sam@webkit.org> Remove assertion from -[WebUndefined dealloc] to try to mollify the bots. * bindings/objc/WebScriptObject.mm: (-[WebUndefined dealloc]): 2011-08-13 Sam Weinig <sam@webkit.org> Remove unused variables from WebVideoFullscreenController.h https://bugs.webkit.org/show_bug.cgi?id=66192 Reviewed by Dan Bernstein. * platform/mac/WebVideoFullscreenController.h: Remove _isWindowLoaded, _savedUIMode and _savedUIOptions which were not used. 2011-08-13 Sam Weinig <sam@webkit.org> Fix incorrect objective-c initialize in WebCore https://bugs.webkit.org/show_bug.cgi?id=66191 Reviewed by David Kilzer. * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper initWithAccessibilityObject:]): * rendering/RenderThemeMac.mm: (-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]): Correctly initialize by assigning to self and nil checking the result. 2011-08-13 Adam Barth <abarth@webkit.org> Fix clang build. * platform/chromium/PopupMenuChromium.h: 2011-08-13 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/66188> WebCore.xcodeproj has duplicate entries again Reviewed by Dan Bernstein. * WebCore.xcodeproj/project.pbxproj: Remove duplicate entries by using uniq. Originally noticed by Xcode 4. 2011-08-12 Dan Bernstein <mitz@apple.com> <rdar://problem/7337717> Add an option to automatically show tooltips (with the full text) over truncated text https://bugs.webkit.org/show_bug.cgi?id=66178 Reviewed by Simon Fraser. * WebCore.exp.in: Export setShowsToolTipOverTruncatedText(). * page/Chrome.cpp: (WebCore::Chrome::setToolTip): If no title is found, and the page is set to show tooltips over truncated text, try to set the tooltip to the full text of the truncated text, if any. * page/Settings.cpp: (WebCore::Settings::Settings): Initialize new member variable. (WebCore::Settings::setShowsToolTipOverTruncatedText): Added this setter. * page/Settings.h: (WebCore::Settings::showsToolTipOverTruncatedText): Added this getter. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::innerTextIfTruncated): Added. If the inner node or its nearest enclosing block has text-overflow: ellipsis and has truncated lines, return the node’s (full) inner text. * rendering/HitTestResult.h: * rendering/RootInlineBox.h: (WebCore::RootInlineBox::hasEllipsisBox): Made this public. 2011-08-12 Stephen White <senorblanco@chromium.org> Ownership of canvas's GraphicsContext3D should be moved to PlatformContextSkia https://bugs.webkit.org/show_bug.cgi?id=66154 Reviewed by Kenneth Russell. Covered by existing tests in fast/canvas and canvas/philip. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::isAccelerated): Plumb this call through GraphicsContext::isAcceleratedContext(). (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer): For the ACCELERATED_2D_CANVAS path, plumb this call through (the new) GraphicsContext::paintsIntoCanvasBuffer(). (WebCore::CanvasRenderingContext2D::clearAcceleration): (WebCore::CanvasRenderingContext2D::resetAcceleration): Remove the use of the m_context3D member; use a temporary instead. * html/canvas/CanvasRenderingContext2D.h: Remove the m_context3D member. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::isAcceleratedContext): (WebCore::GraphicsContext::paintsIntoImageBuffer): Implement stub versions of these functions for other platforms. * platform/graphics/GraphicsContext.h: Expose isAcceleratedContext() to all platforms. Add paintsIntoImageBuffer() member function. * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::create): * platform/graphics/gpu/SharedGraphicsContext3D.h: * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setGraphicsContext3D): (WebCore::GraphicsContext::isAcceleratedContext): (WebCore::GraphicsContext::paintsIntoImageBuffer): Basically gut this class leaving only a static creation function. * platform/graphics/skia/ImageSkia.cpp: (WebCore::paintSkBitmap): (WebCore::Image::drawPattern): Use isAccelerated() in place of useSkiaGpu(). * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): (WebCore::PlatformContextSkia::paintsIntoImageBuffer): * platform/graphics/skia/PlatformContextSkia.h: (WebCore::PlatformContextSkia::isAccelerated): Rename useSkiaGpu() to isAccelerated(). Plumb through paintsIntoImageBuffer() to GraphicsContext3D. 2011-08-12 Sam Weinig <sam@webkit.org> Use __builtin_trap() for CRASH when building with clang https://bugs.webkit.org/show_bug.cgi?id=66152 Reviewed by Anders Carlsson. * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneBase::fail): * bindings/objc/WebScriptObject.mm: * platform/mac/BlockExceptions.h: * platform/text/cf/StringImplCF.cpp: Add NO_RETURN_DUE_TO_ASSERT. * bridge/IdentifierRep.h: Don't define the destructor since it is never called, 2011-08-12 Joseph Pecoraro <joepeck@webkit.org> Abandoned Memory: Temporary CSS Fonts May Never Be Purged https://bugs.webkit.org/show_bug.cgi?id=66153 Reviewed by Dan Bernstein. No new tests, this is not a functional change. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): If the CSS font-face is loading from a URL then immediately fallback to a system font matching the description, since we cannot determine a reasonable family name from the m_string URL. The URL could be a dataURI. 2011-08-12 Fady Samuel <fsamuel@chromium.org> Refactoring of PopupMenuChromium For Readability and Maintainability https://bugs.webkit.org/show_bug.cgi?id=66009 Reviewed by Darin Fisher. Split PopupMenuChromium into three sets of files: PopupMenuChromium.{h|cpp}, PopupContainer.{h|cpp}, and PopupLisBox.{h|cpp} for readability and maintainability. No new tests as there's no change in functionality. * WebCore.gypi: * platform/chromium/PopupContainer.cpp: Added. (WebCore::constructRelativeMouseEvent): (WebCore::constructRelativeWheelEvent): (WebCore::PopupContainer::create): (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::~PopupContainer): (WebCore::PopupContainer::layoutAndCalculateWidgetRect): (WebCore::PopupContainer::showPopup): (WebCore::PopupContainer::hidePopup): (WebCore::PopupContainer::notifyPopupHidden): (WebCore::PopupContainer::layoutAndGetRTLOffset): (WebCore::PopupContainer::handleMouseDownEvent): (WebCore::PopupContainer::handleMouseMoveEvent): (WebCore::PopupContainer::handleMouseReleaseEvent): (WebCore::PopupContainer::handleWheelEvent): (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupContainer::handleKeyEvent): (WebCore::PopupContainer::hide): (WebCore::PopupContainer::paint): (WebCore::PopupContainer::paintBorder): (WebCore::PopupContainer::isInterestedInEventForKey): (WebCore::PopupContainer::chromeClientChromium): (WebCore::PopupContainer::showInRect): (WebCore::PopupContainer::refresh): (WebCore::PopupContainer::isRTL): (WebCore::PopupContainer::selectedIndex): (WebCore::PopupContainer::menuItemHeight): (WebCore::PopupContainer::menuItemFontSize): (WebCore::PopupContainer::menuStyle): (WebCore::popupData): (WebCore::PopupContainer::getSelectedItemToolTip): * platform/chromium/PopupContainer.h: Added. (WebCore::PopupContainer::listBox): (WebCore::PopupContainer::popupType): * platform/chromium/PopupListBox.cpp: Added. (WebCore::PopupListBox::PopupListBox): (WebCore::PopupListBox::handleMouseDownEvent): (WebCore::PopupListBox::handleMouseMoveEvent): (WebCore::PopupListBox::handleMouseReleaseEvent): (WebCore::PopupListBox::handleWheelEvent): (WebCore::PopupListBox::isInterestedInEventForKey): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): (WebCore::isCharacterTypeEvent): (WebCore::PopupListBox::handleKeyEvent): (WebCore::PopupListBox::hostWindow): (WebCore::stripLeadingWhiteSpace): (WebCore::PopupListBox::typeAheadFind): (WebCore::PopupListBox::paint): (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::getRowFont): (WebCore::PopupListBox::abandon): (WebCore::PopupListBox::pointToRowIndex): (WebCore::PopupListBox::acceptIndex): (WebCore::PopupListBox::selectIndex): (WebCore::PopupListBox::setOriginalIndex): (WebCore::PopupListBox::getRowHeight): (WebCore::PopupListBox::getRowBounds): (WebCore::PopupListBox::invalidateRow): (WebCore::PopupListBox::scrollToRevealRow): (WebCore::PopupListBox::isSelectableItem): (WebCore::PopupListBox::clearSelection): (WebCore::PopupListBox::selectNextRow): (WebCore::PopupListBox::selectPreviousRow): (WebCore::PopupListBox::adjustSelectedIndex): (WebCore::PopupListBox::hidePopup): (WebCore::PopupListBox::updateFromElement): (WebCore::PopupListBox::setMaxWidthAndLayout): (WebCore::PopupListBox::layout): (WebCore::PopupListBox::clear): (WebCore::PopupListBox::isPointInBounds): * platform/chromium/PopupListBox.h: Added. (WebCore::PopupItem::PopupItem): (WebCore::PopupListBox::create): (WebCore::PopupListBox::selectedIndex): (WebCore::PopupListBox::numItems): (WebCore::PopupListBox::setBaseWidth): (WebCore::PopupListBox::setMaxHeight): (WebCore::PopupListBox::setMaxWidth): (WebCore::PopupListBox::disconnectClient): (WebCore::PopupListBox::items): (WebCore::PopupListBox::~PopupListBox): (WebCore::PopupListBox::scrollToRevealSelection): * platform/chromium/PopupMenuChromium.cpp: * platform/chromium/PopupMenuChromium.h: 2011-08-12 Mark Rowe <mrowe@apple.com> Be more forward-looking in the choice of compiler. Rubber-stamped by Jon Honeycutt. * Configurations/CompilerVersion.xcconfig: 2011-08-12 Nat Duca <nduca@chromium.org> [chromium] Fix comile warning on CCLayerTreeHost * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): 2011-08-12 Ryosuke Niwa <rniwa@webkit.org> Apple-style-span class seems unnecessary https://bugs.webkit.org/show_bug.cgi?id=12248 Reviewed by Justin Garcia. Stop generating span or font elements with class="Apple-style-span" given WebKit's editing component no longer depends on Apple-style-span since r92823 removed the dependency of copy and paste code on style spans. WebKit continues to recognize Apple style spans to remove them. Also renamed isSpanWithoutAttributesOrUnstyleStyleSpan to isSpanWithoutAttributesOrUnstyle*d*StyleSpan. * editing/ApplyStyleCommand.cpp: (WebCore::isLegacyAppleStyleSpan): Renamed from isStyleSpan. (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan): Renamed from isSpanWithoutAttributesOr*Unstyle*StyleSpan. (WebCore::createFontElement): No longer adds class="Apple-style-span". (WebCore::createStyleSpanElement): Ditto. (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Calls isSpanWithoutAttributesOrUnstyleStyleSpan instead of isUnstyledStyleSpan since there won't be any Apple style spans. (WebCore::dummySpanAncestorForNode): (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans): Ditto. (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Ditto. (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): (WebCore::ApplyStyleCommand::removeCSSStyle): * editing/ApplyStyleCommand.h: * editing/EditingStyle.cpp: (WebCore::EditingStyle::removeStyleFromRulesAndContext): Ditto. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Calls isLegacyAppleStyleSpan instead of isStyleSpan. (WebCore::handleStyleSpansBeforeInsertion): Ditto. (WebCore::ReplaceSelectionCommand::handleStyleSpans): Ditto. (WebCore::ReplaceSelectionCommand::doApply): Ditto. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): No longer adds class="Apple-style-span". 2011-08-12 Nat Duca <nduca@chromium.org> [chromium] Fix compositor breakage due to duplicate context creation AND by context-lost https://bugs.webkit.org/show_bug.cgi?id=66168 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): 2011-08-12 Levi Weintraub <leviw@chromium.org> Switch RenderMenuList, RenderListBox, and RenderFieldSet to new layout units https://bugs.webkit.org/show_bug.cgi?id=66149 Reviewed by Eric Seidel. Changing RenderMenuList, RenderListBox, and RenderFieldSet to the LayoutUnit abstraction from ints. No tests as no change in functionality. * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::layoutSpecialExcludedChild): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::numVisibleItems): (WebCore::RenderListBox::listHeight): (WebCore::RenderListBox::baselinePosition): (WebCore::RenderListBox::itemBoundingBoxRect): (WebCore::itemOffsetForAlignment): (WebCore::RenderListBox::panScroll): (WebCore::RenderListBox::scrollToward): (WebCore::RenderListBox::autoscroll): (WebCore::RenderListBox::scrollSize): (WebCore::RenderListBox::scrollPosition): (WebCore::RenderListBox::setScrollOffset): (WebCore::RenderListBox::itemHeight): (WebCore::RenderListBox::verticalScrollbarWidth): (WebCore::RenderListBox::scrollWidth): (WebCore::RenderListBox::scrollHeight): (WebCore::RenderListBox::scrollLeft): (WebCore::RenderListBox::setScrollLeft): (WebCore::RenderListBox::scrollTop): (WebCore::RenderListBox::setScrollTop): (WebCore::RenderListBox::controlClipRect): (WebCore::RenderListBox::invalidateScrollbarRect): (WebCore::RenderListBox::convertFromScrollbarToContainingView): (WebCore::RenderListBox::convertFromContainingViewToScrollbar): (WebCore::RenderListBox::contentsSize): (WebCore::RenderListBox::currentMousePosition): * rendering/RenderListBox.h: (WebCore::RenderListBox::scrollCornerRect): (WebCore::RenderListBox::invalidateScrollCornerRect): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::controlClipRect): (WebCore::RenderMenuList::showPopup): * rendering/RenderMenuList.h: 2011-08-12 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66133 Make hit testing work on RenderRegions. Pass off the hit testing to the RenderFlowThread layer tree (just as we did with painting). Reviewed by Sam Weinig. Added hit-test-float.html to demonstrate basic hit testing of content flowed into regions. * rendering/HitTestRequest.h: (WebCore::HitTestRequest::type): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::nodeAtPoint): * rendering/RenderRegion.h: 2011-08-12 Levi Weintraub <leviw@chromium.org> Switch RenderTable* to new layout types https://bugs.webkit.org/show_bug.cgi?id=66146 Reviewed by Eric Seidel. Converting RenderTable* classes to new LayoutUnits from ints. No new tests as no new functionality. * rendering/RenderTable.cpp: (WebCore::RenderTable::firstLineBoxBaseline): (WebCore::RenderTable::overflowClipRect): * rendering/RenderTable.h: (WebCore::RenderTable::columnPositions): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::clippedOverflowRectForRepaint): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::clippedOverflowRectForRepaint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::setCellLogicalWidths): (WebCore::RenderTableSection::calcRowLogicalHeight): (WebCore::RenderTableSection::layoutRows): (WebCore::RenderTableSection::calcOuterBorderBefore): (WebCore::RenderTableSection::calcOuterBorderAfter): (WebCore::RenderTableSection::calcOuterBorderStart): (WebCore::RenderTableSection::calcOuterBorderEnd): (WebCore::RenderTableSection::firstLineBoxBaseline): (WebCore::RenderTableSection::paintObject): (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderTableSection.h: (WebCore::RenderTableSection::outerBorderBefore): (WebCore::RenderTableSection::outerBorderAfter): (WebCore::RenderTableSection::outerBorderStart): (WebCore::RenderTableSection::outerBorderEnd): (WebCore::RenderTableSection::getBaseline): 2011-08-12 Adam Bergkvist <adam.bergkvist@ericsson.com> Reviewed by Alexey Proskuryakov. EventSource loader should not buffer data https://bugs.webkit.org/show_bug.cgi?id=61863 Disabled buffering in the EventSource loader. Added a manual test. * manual-tests/eventsource/eventsource-loader-buffering.html: Added. * manual-tests/eventsource/eventsource-loader-buffering.php: Added. * page/EventSource.cpp: (WebCore::EventSource::connect): 2011-08-11 Pratik Solanki <psolanki@apple.com> ResourceLoader::didReceiveDataArray() does not handle m_shouldBufferData correctly https://bugs.webkit.org/show_bug.cgi?id=65926 Reviewed by Alexey Proskuryakov. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray): Make sure we call the client callbacks when m_shouldBufferData is set to false. 2011-08-12 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92976. http://trac.webkit.org/changeset/92976 https://bugs.webkit.org/show_bug.cgi?id=66159 Does not compile on chromium-win (Requested by abarth|gardener on #webkit). * WebCore.gypi: * platform/chromium/PopupContainer.cpp: Removed. * platform/chromium/PopupContainer.h: Removed. * platform/chromium/PopupListBox.cpp: Removed. * platform/chromium/PopupListBox.h: Removed. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::create): (WebCore::PopupListBox::selectedIndex): (WebCore::PopupListBox::numItems): (WebCore::PopupListBox::setBaseWidth): (WebCore::PopupListBox::setMaxHeight): (WebCore::PopupListBox::setMaxWidth): (WebCore::PopupListBox::disconnectClient): (WebCore::PopupListBox::items): (WebCore::PopupListBox::PopupListBox): (WebCore::PopupListBox::~PopupListBox): (WebCore::PopupListBox::scrollToRevealSelection): (WebCore::constructRelativeMouseEvent): (WebCore::constructRelativeWheelEvent): (WebCore::PopupContainer::create): (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::~PopupContainer): (WebCore::PopupContainer::layoutAndCalculateWidgetRect): (WebCore::PopupContainer::showPopup): (WebCore::PopupContainer::hidePopup): (WebCore::PopupContainer::notifyPopupHidden): (WebCore::PopupContainer::layoutAndGetRTLOffset): (WebCore::PopupContainer::handleMouseDownEvent): (WebCore::PopupContainer::handleMouseMoveEvent): (WebCore::PopupContainer::handleMouseReleaseEvent): (WebCore::PopupContainer::handleWheelEvent): (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupContainer::handleKeyEvent): (WebCore::PopupContainer::hide): (WebCore::PopupContainer::paint): (WebCore::PopupContainer::paintBorder): (WebCore::PopupContainer::isInterestedInEventForKey): (WebCore::PopupContainer::chromeClientChromium): (WebCore::PopupContainer::showInRect): (WebCore::PopupContainer::refresh): (WebCore::PopupContainer::isRTL): (WebCore::PopupContainer::selectedIndex): (WebCore::PopupContainer::menuItemHeight): (WebCore::PopupContainer::menuItemFontSize): (WebCore::PopupContainer::menuStyle): (WebCore::popupData): (WebCore::PopupContainer::getSelectedItemToolTip): (WebCore::PopupListBox::handleMouseDownEvent): (WebCore::PopupListBox::handleMouseMoveEvent): (WebCore::PopupListBox::handleMouseReleaseEvent): (WebCore::PopupListBox::handleWheelEvent): (WebCore::PopupListBox::isInterestedInEventForKey): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): (WebCore::isCharacterTypeEvent): (WebCore::PopupListBox::handleKeyEvent): (WebCore::PopupListBox::hostWindow): (WebCore::stripLeadingWhiteSpace): (WebCore::PopupListBox::typeAheadFind): (WebCore::PopupListBox::paint): (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::getRowFont): (WebCore::PopupListBox::abandon): (WebCore::PopupListBox::pointToRowIndex): (WebCore::PopupListBox::acceptIndex): (WebCore::PopupListBox::selectIndex): (WebCore::PopupListBox::setOriginalIndex): (WebCore::PopupListBox::getRowHeight): (WebCore::PopupListBox::getRowBounds): (WebCore::PopupListBox::invalidateRow): (WebCore::PopupListBox::scrollToRevealRow): (WebCore::PopupListBox::isSelectableItem): (WebCore::PopupListBox::clearSelection): (WebCore::PopupListBox::selectNextRow): (WebCore::PopupListBox::selectPreviousRow): (WebCore::PopupListBox::adjustSelectedIndex): (WebCore::PopupListBox::hidePopup): (WebCore::PopupListBox::updateFromElement): (WebCore::PopupListBox::setMaxWidthAndLayout): (WebCore::PopupListBox::layout): (WebCore::PopupListBox::clear): (WebCore::PopupListBox::isPointInBounds): * platform/chromium/PopupMenuChromium.h: (WebCore::PopupItem::PopupItem): (WebCore::PopupContainer::listBox): (WebCore::PopupContainer::popupType): 2011-08-12 Andy Estes <aestes@apple.com> Cancel in onbeforeunload dialog sometime causes a button to stop working. https://bugs.webkit.org/show_bug.cgi?id=26211 Reviewed by Alexey Proskuryakov. Test: fast/loader/form-submission-after-beforeunload-cancel.html If an onbeforeunload handler cancels a navigation that was triggered by a form submission, WebCore's multiple form submission protection prevents the form from being submitted a second time even though no first submission actually took place. Fix this by clearing m_submittedFormURL if the onbeforeunload handler cancels the load. This allows the submission to be retried. * loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldClose): Set m_submittedFormURL to KURL() if shouldClose() will return false. 2011-08-12 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66130 RenderRegions need to paint the entire RenderFlowThread layer tree. Instead of just calling paintBlock, make sure RenderRegions paint the flow thread's layer tree instead with the appropriate offset. Fix RenderRegions to derive from RenderReplaced instead of RenderBox, since it simplifies the code. They no longer have to subclass their own layout method or worry about all of the painting logic for anything other than the content area. Reviewed by Anders Carlsson. Existing tests have a layer tree example, and so those results are updated to show the tree now. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::createFlowThreadStyle): (WebCore::RenderFlowThread::paintIntoRegion): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::collectLayers): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::styleDidChange): * rendering/RenderRegion.h: 2011-08-12 Chris Rogers <crogers@google.com> Fix mac build when web audio is enabled https://bugs.webkit.org/show_bug.cgi?id=66150 Unreviewed build fix. * platform/audio/mac/AudioFileReaderMac.cpp: (WebCore::AudioFileReader::createBus): 2011-08-12 Jeff Miller <jeffm@apple.com> Need to handle kCACFContextNeedsFlushNotification notifications that arrive after the AVFWrapper has been disposed https://bugs.webkit.org/show_bug.cgi?id=65724 Instead of using a pointer to the AVFWrapper object as the context for various callbacks, assign each object an ID and use that instead. Keep track of the mapping between object IDs and AVFWrapper objects in a HashMap, and manage access to this map using a Mutex since it can be accessed from multiple threads. This allows us to actually delete AVFWrapper objects instead of leaking them (which we were doing before to prevent crashes). Reviewed by Eric Carlson. No new tests, uses existing media tests. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::callbackContext): Added. (WebCore::AVFWrapper::AVFWrapper): Initialize m_objectID and add it to the HashMap. (WebCore::AVFWrapper::~AVFWrapper): Log object ID and remove obsolete assert. (WebCore::AVFWrapper::mapLock): Added. (WebCore::AVFWrapper::map): Added. (WebCore::AVFWrapper::addToMap): Added. (WebCore::AVFWrapper::removeFromMap): Added. (WebCore::AVFWrapper::avfWrapperForCallbackContext): Added. (WebCore::AVFWrapper::scheduleDisconnectAndDelete): Remove AVFWrapper from HashMap instead of zeroing m_owner. (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Use callbackContext(), delete the AVFWrapper here. (WebCore::AVFWrapper::createPlayer): Use callbackContext(). (WebCore::AVFWrapper::createPlayerItem): Use callbackContext(). (WebCore::AVFWrapper::periodicTimeObserverCallback): Retrieve AVFWrapper using the HashMap. (WebCore::AVFWrapper::notificationCallback): Retrieve AVFWrapper using the HashMap. (WebCore::AVFWrapper::loadPlayableCompletionCallback): Retrieve AVFWrapper using the HashMap. (WebCore::AVFWrapper::checkPlayability): Use callbackContext(). (WebCore::AVFWrapper::loadMetadataCompletionCallback): Retrieve AVFWrapper using the HashMap. (WebCore::AVFWrapper::beginLoadingMetadata): Use callbackContext(). (WebCore::AVFWrapper::seekCompletedCallback): Retrieve AVFWrapper using the HashMap. (WebCore::AVFWrapper::seekToTime): Use callbackContext(). (WebCore::AVFWrapper::platformLayer): Remove overly noisy LOG(). 2011-08-12 Fady Samuel <fsamuel@chromium.org> Refactoring of PopupMenuChromium https://bugs.webkit.org/show_bug.cgi?id=66009 Reviewed by Darin Fisher. Split PopupMenuChromium into three sets of files: PopupMenuChromium.{h|cpp}, PopupContainer.{h|cpp}, and PopupLisBox.{h|cpp} for readability and maintainability. No new tests as no functionality has changed. * WebCore.gypi: * platform/chromium/PopupContainer.cpp: Added. (WebCore::constructRelativeMouseEvent): (WebCore::constructRelativeWheelEvent): (WebCore::PopupContainer::create): (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::~PopupContainer): (WebCore::PopupContainer::layoutAndCalculateWidgetRect): (WebCore::PopupContainer::showPopup): (WebCore::PopupContainer::hidePopup): (WebCore::PopupContainer::notifyPopupHidden): (WebCore::PopupContainer::layoutAndGetRTLOffset): (WebCore::PopupContainer::handleMouseDownEvent): (WebCore::PopupContainer::handleMouseMoveEvent): (WebCore::PopupContainer::handleMouseReleaseEvent): (WebCore::PopupContainer::handleWheelEvent): (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupContainer::handleKeyEvent): (WebCore::PopupContainer::hide): (WebCore::PopupContainer::paint): (WebCore::PopupContainer::paintBorder): (WebCore::PopupContainer::isInterestedInEventForKey): (WebCore::PopupContainer::chromeClientChromium): (WebCore::PopupContainer::showInRect): (WebCore::PopupContainer::refresh): (WebCore::PopupContainer::isRTL): (WebCore::PopupContainer::selectedIndex): (WebCore::PopupContainer::menuItemHeight): (WebCore::PopupContainer::menuItemFontSize): (WebCore::PopupContainer::menuStyle): (WebCore::popupData): (WebCore::PopupContainer::getSelectedItemToolTip): * platform/chromium/PopupContainer.h: Added. (WebCore::PopupContainer::listBox): (WebCore::PopupContainer::popupType): * platform/chromium/PopupListBox.cpp: Added. (WebCore::PopupListBox::PopupListBox): (WebCore::PopupListBox::handleMouseDownEvent): (WebCore::PopupListBox::handleMouseMoveEvent): (WebCore::PopupListBox::handleMouseReleaseEvent): (WebCore::PopupListBox::handleWheelEvent): (WebCore::PopupListBox::isInterestedInEventForKey): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): (WebCore::isCharacterTypeEvent): (WebCore::PopupListBox::handleKeyEvent): (WebCore::PopupListBox::hostWindow): (WebCore::stripLeadingWhiteSpace): (WebCore::PopupListBox::typeAheadFind): (WebCore::PopupListBox::paint): (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::getRowFont): (WebCore::PopupListBox::abandon): (WebCore::PopupListBox::pointToRowIndex): (WebCore::PopupListBox::acceptIndex): (WebCore::PopupListBox::selectIndex): (WebCore::PopupListBox::setOriginalIndex): (WebCore::PopupListBox::getRowHeight): (WebCore::PopupListBox::getRowBounds): (WebCore::PopupListBox::invalidateRow): (WebCore::PopupListBox::scrollToRevealRow): (WebCore::PopupListBox::isSelectableItem): (WebCore::PopupListBox::clearSelection): (WebCore::PopupListBox::selectNextRow): (WebCore::PopupListBox::selectPreviousRow): (WebCore::PopupListBox::adjustSelectedIndex): (WebCore::PopupListBox::hidePopup): (WebCore::PopupListBox::updateFromElement): (WebCore::PopupListBox::setMaxWidthAndLayout): (WebCore::PopupListBox::layout): (WebCore::PopupListBox::clear): (WebCore::PopupListBox::isPointInBounds): * platform/chromium/PopupListBox.h: Added. (WebCore::PopupItem::PopupItem): (WebCore::PopupListBox::create): (WebCore::PopupListBox::selectedIndex): (WebCore::PopupListBox::numItems): (WebCore::PopupListBox::setBaseWidth): (WebCore::PopupListBox::setMaxHeight): (WebCore::PopupListBox::setMaxWidth): (WebCore::PopupListBox::disconnectClient): (WebCore::PopupListBox::items): (WebCore::PopupListBox::~PopupListBox): (WebCore::PopupListBox::scrollToRevealSelection): * platform/chromium/PopupMenuChromium.cpp: * platform/chromium/PopupMenuChromium.h: 2011-08-12 Sam Weinig <sam@webkit.org> Move compiler specific macros to their own header https://bugs.webkit.org/show_bug.cgi?id=66119 Reviewed by Anders Carlsson. * ForwardingHeaders/wtf/Compiler.h: Added. 2011-08-12 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt][REGRESSION] composited content doesn't render since r92651 https://bugs.webkit.org/show_bug.cgi?id=66108 Reviewed by Benjamin Poulain. Changed the signature for GraphicsLayerTextureMapper::syncCompositingState to match the new signature in GraphicsLayer.h. No new tests. This is a regression that's covered by existing pixel tests. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::syncCompositingState): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: 2011-08-12 Alexandru Chiculita <achicu@adobe.com> Original patch by Mihnea Ovidenie <mihnea@adobe.com>. Also contains some improvements done by Dave Hyatt <hyatt@apple.com>. [CSSRegions]RenderFlowThread should display its content using RenderRegion https://bugs.webkit.org/show_bug.cgi?id=65627 RenderFlowThread collects RenderObjects from a flow. These objects are displayed by means of RenderRegion objects that get the content from the same flow. Reviewed by David Hyatt. Tests: fast/regions/content-flowed-into-regions-dynamically-added.html fast/regions/content-flowed-into-regions-dynamically-removed.html fast/regions/content-flowed-into-regions-with-dyn-index.html fast/regions/content-flowed-into-regions-with-index-dom.html fast/regions/content-flowed-into-regions-with-index.html fast/regions/content-flowed-into-regions.html fast/regions/flow-content-basic-vertical-rl.html fast/regions/flow-content-basic-vertical.html * dom/Node.cpp: (WebCore::Node::diff): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::createFlowThreadStyle): (WebCore::RenderFlowThread::styleDidChange): (WebCore::compareRenderRegions): (WebCore::RenderFlowThread::addRegionToThread): (WebCore::RenderFlowThread::removeRegionFromThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::computeLogicalWidth): (WebCore::RenderFlowThread::computeLogicalHeight): (WebCore::RenderFlowThread::paintIntoRegion): * rendering/RenderFlowThread.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::~RenderRegion): (WebCore::RenderRegion::paint): (WebCore::RenderRegion::styleDidChange): * rendering/RenderRegion.h: (WebCore::RenderRegion::setRegionRect): (WebCore::RenderRegion::regionRect): * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): * rendering/RenderView.cpp: (WebCore::RenderView::styleDidChange): (WebCore::RenderView::renderFlowThreadWithName): * rendering/RenderView.h: 2011-08-12 Abhishek Arya <inferno@chromium.org> Crash in WebCore::editingIgnoresContent https://bugs.webkit.org/show_bug.cgi?id=66125 Reviewed by Ryosuke Niwa. RefPtr a few nodes in case they get blown away in dispatchEvent calls. Test: editing/selection/select-start-remove-root-crash.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::selectAll): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): 2011-08-11 Pavel Podivilov <podivilov@chromium.org> Web Inspector: properly update console message count in source frames and resources panel. https://bugs.webkit.org/show_bug.cgi?id=57009 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.show): (WebInspector.SourceFrame.prototype.addMessageToSource): (WebInspector.SourceFrame.prototype._updateMessageRepeatCount): 2011-08-12 Pavel Feldman <pfeldman@google.com> Not reviewed: follow up to inspector test breakage. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged): 2011-08-12 Yury Semikhatsky <yurys@chromium.org> Web Inspector: expand exception properties when wrapping it as object. https://bugs.webkit.org/show_bug.cgi?id=66035 Use toString() value as a description for value thrown during eval. Reviewed by Pavel Feldman. * inspector/InjectedScriptSource.js: (.): 2011-08-12 Pavel Feldman <pfeldman@google.com> Web Inspector: make folders optional in the Scripts' panel file selector. https://bugs.webkit.org/show_bug.cgi?id=66100 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype._resetFilesSelect): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): 2011-08-12 Pavel Podivilov <podivilov@chromium.org> Web Inspector: add space between error info and error message in source frame message bubble. https://bugs.webkit.org/show_bug.cgi?id=65069 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleMessage.prototype._formatMessage): 2011-08-12 Pavel Feldman <pfeldman@google.com> Web Inspector: console loses focus upon reloading the page from the inspector. https://bugs.webkit.org/show_bug.cgi?id=66068 Reviewed by Yury Semikhatsky. * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel.prototype._auditFinishedCallback): (WebInspector.AuditsPanel.prototype._clearButtonClicked): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype.revealAndSelect): (WebInspector.DataGridNode.prototype.revealAndSelect): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._jumpToSearchResult): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.this.treeOutline.selectedNodeChanged): (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._reset): (WebInspector.ElementsPanel.prototype._setDocument.selectNode): (WebInspector.ElementsPanel.prototype._setDocument.selectLastSelectedNode): (WebInspector.ElementsPanel.prototype._setDocument): (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged): (WebInspector.ElementsPanel.prototype.populateHrefContextMenu): (WebInspector.ElementsPanel.prototype.switchToAndFocus): (WebInspector.ElementsPanel.prototype.selectedDOMNode): (WebInspector.ElementsPanel.prototype.selectDOMNode): (WebInspector.ElementsPanel.prototype.updateModifiedNodes): (WebInspector.ElementsPanel.prototype.updateBreadcrumb.selectCrumbFunction): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): (WebInspector.ElementsPanel.prototype.updateStyles): (WebInspector.ElementsPanel.prototype.updateMetrics): (WebInspector.ElementsPanel.prototype.updateProperties): (WebInspector.ElementsPanel.prototype.updateEventListeners): (WebInspector.ElementsPanel.prototype.handleCopyEvent): (WebInspector.ElementsPanel.prototype.updateFocusedNode): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype.selectedDOMNode): (WebInspector.ElementsTreeOutline.prototype.selectDOMNode): (WebInspector.ElementsTreeOutline.prototype.update): (WebInspector.ElementsTreeOutline.prototype._revealAndSelectNode): (WebInspector.ElementsTreeOutline.prototype._ondrop.callback): (WebInspector.ElementsTreeOutline.prototype._ondrop): (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode): (WebInspector.ElementsTreeElement.prototype._updateChildren): (WebInspector.ElementsTreeElement.prototype.onselect): (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown): (WebInspector.ElementsTreeElement.prototype._startEditingTarget): (WebInspector.ElementsTreeElement.prototype._startEditing): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.reset): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView.prototype._jumpToSearchResult): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._addProfileHeader): (WebInspector.ProfilesPanel.prototype.showProfile): (WebInspector.ProfileSidebarTreeElement.prototype.onselect): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._initDefaultSelection.get if): (WebInspector.ResourcesPanel.prototype._initDefaultSelection): (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype.showResource): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createTopPane): * inspector/front-end/inspector.js: * inspector/front-end/inspectorCommon.css: (body): * inspector/front-end/treeoutline.js: (TreeOutline.prototype.revealAndSelect): (TreeElement.prototype.selectOnMouseDown): (TreeElement.prototype.revealAndSelect): (TreeElement.prototype.select): 2011-08-12 Yury Semikhatsky <yurys@chromium.org> Unreviewed. Inspector clean-up: remove unused method declaration from InspectorAgent.h * inspector/InspectorAgent.h: 2011-08-12 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network resource identifier should have RequestId type and requestId name in protocol. https://bugs.webkit.org/show_bug.cgi?id=66061 Reviewed by Pavel Feldman. * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::ConsoleMessage): (WebCore::ConsoleMessage::addToFrontend): * inspector/ConsoleMessage.h: * inspector/IdentifiersFactory.cpp: (WebCore::IdentifiersFactory::requestId): * inspector/IdentifiersFactory.h: * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::didReceiveResponse): (WebCore::InspectorConsoleAgent::didFailLoading): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::markResourceAsCached): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::didFailLoading): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::setInitialScriptContent): (WebCore::InspectorResourceAgent::didReceiveScriptResponse): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::didReceiveXHRResponse): (WebCore::InspectorResourceAgent::didCreateWebSocket): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::didCloseWebSocket): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::willReceiveResourceData): (WebCore::InspectorTimelineAgent::willReceiveResourceResponse): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::resourceCreated): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::setResourceType): (WebCore::NetworkResourcesData::resourceType): (WebCore::NetworkResourcesData::setResourceContent): (WebCore::NetworkResourcesData::maybeAddResourceData): (WebCore::NetworkResourcesData::maybeDecodeDataToContent): (WebCore::NetworkResourcesData::addCachedResource): (WebCore::NetworkResourcesData::addResourceSharedBuffer): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::ensureNoDataForRequestId): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::requestId): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createResourceSendRequestData): (WebCore::TimelineRecordFactory::createResourceReceiveResponseData): (WebCore::TimelineRecordFactory::createResourceFinishData): (WebCore::TimelineRecordFactory::createReceiveResourceData): * inspector/TimelineRecordFactory.h: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded): * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.Resources.prototype.getHAR): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._notifyResourceFinished): (WebInspector.ExtensionServer.prototype._onGetHAR): (WebInspector.ExtensionServer.prototype._requestId): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached): (WebInspector.NetworkDispatcher.prototype.responseReceived): (WebInspector.NetworkDispatcher.prototype.dataReceived): (WebInspector.NetworkDispatcher.prototype.loadingFinished): (WebInspector.NetworkDispatcher.prototype.loadingFailed): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest): (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived): (WebInspector.NetworkDispatcher.prototype.webSocketClosed): (WebInspector.NetworkDispatcher.prototype._appendRedirect): (WebInspector.NetworkDispatcher.prototype._startResource): (WebInspector.NetworkDispatcher.prototype._finishResource): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._appendResource): (WebInspector.NetworkLogView.prototype._matchResource): (WebInspector.NetworkLogView.prototype._updateSearchMatchedListAfterRequestIdChanged): (WebInspector.NetworkLogView.prototype.performSearch): * inspector/front-end/Resource.js: (WebInspector.Resource): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._addRecordToTimeline): (WebInspector.TimelinePanel.prototype._findParentRecord): (WebInspector.TimelinePanel.FormattedRecord): 2011-08-11 Hans Wennborg <hans@chromium.org> IndexedDB: Object store records don't need to have keys in all indexes https://bugs.webkit.org/show_bug.cgi?id=66049 Reviewed by Tony Chang. Allow inserting records in an object store even though they don't yield keys in some index. The spec has changed in this regard. * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): 2011-08-10 Hans Wennborg <hans@chromium.org> IndexedDB: Overwriting key in unique index should be possible https://bugs.webkit.org/show_bug.cgi?id=65993 Reviewed by Tony Chang. It should be possible to overwrite an object store record even if there is a derived key for that record in an index with the unique flag set. * storage/IDBBackingStore.h: * storage/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::addingKeyAllowed): * storage/IDBIndexBackendImpl.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::keyExistsInIndex): * storage/IDBLevelDBBackingStore.h: * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::keyExistsInIndex): * storage/IDBSQLiteBackingStore.h: 2011-08-11 Yuta Kitamura <yutak@chromium.org> WebSocket: Implement "protocol" attribute https://bugs.webkit.org/show_bug.cgi?id=65248 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/no-subprotocol.html (added) http/tests/websocket/tests/hybi/set-protocol.html (added) http/tests/websocket/tests/hybi/workers/no-subprotocol.html (added) http/tests/websocket/tests/hixie76/undefined-attributes.html (updated) http/tests/websocket/tests/hybi/multiple-subprotocols.html (updated) http/tests/websocket/tests/hybi/workers/multiple-subprotocols.html (updated) * websockets/ThreadableWebSocketChannel.h: Added subprotocol() function. This function is named differently from the counterpart of WebSocket class, because the name "protocol" can be confused with the WebSocket protocol. Added m_useHixie76Protocol and m_subprotocol, because these value may be used after m_channel has been released. Using bool should be fine, because boolean literals do not appear in ambiguous context. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::WebSocket): (WebCore::WebSocket::connect): (WebCore::WebSocket::protocol): The "protocol" attribute is available only when the hybi-10 protocol is chosen. (WebCore::WebSocket::binaryType): (WebCore::WebSocket::setBinaryType): (WebCore::WebSocket::didConnect): * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::subprotocol): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::subprotocol): (WebCore::workerContextDidConnect): Subprotocol value is saved in the client wrapper object after the WebSocket connection is established. (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): * websockets/WorkerThreadableWebSocketChannel.h: 2011-08-11 Hayato Ito <hayato@chromium.org> Implement proper handling of events with a related target in regard to shadow DOM boundaries. https://bugs.webkit.org/show_bug.cgi?id=65899 Reviewed by Dimitri Glazkov. Fixes issues in the following corner cases: 1. When both a target node and a relatedTarget node are immediate children of the same shadow root, an event is not dispatched. 2. If a target node is an ancestor of a relatedTarget node, crossing shadow boundaries, or vice verse, an event is not dispatched or wrongly dispatched. Test: fast/dom/shadow/shadow-boundary-events.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::adjustToShadowBoundaries): 2011-08-11 John Bauman <jbauman@chromium.org> Readback composited webgl results for printing https://bugs.webkit.org/show_bug.cgi?id=65658 Reviewed by James Robinson. The real composited results may be locked inside the compositor context's version of a texture because the drawing buffer was automatically cleared, so read from there to get the actual presented version to draw. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas): 2011-08-11 Andrew Wason <rectalogic@rectalogic.com> REGRESSION: Qt JavaScript bridge signal connection fails https://bugs.webkit.org/show_bug.cgi?id=66097 Reviewed by Gavin Barraclough. Tests in WebKit/qt/tests/qwebframe Call toThisObject() on exec->lexicalGlobalObject() so the correct object is passed to the JS signal handler. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): 2011-08-11 Nico Weber <thakis@chromium.org> Remove incorrect comment about m_wheelEventHandlerCount https://bugs.webkit.org/show_bug.cgi?id=66117 Reviewed by Simon Fraser. From what I can tell, this number is changed only in Frame::notifyChromeClientWheelEventHandlerCountChanged(), and there it just reads the number modified in Document::didAdd/RemoveWheelEventHandler(). So this is just the number of event handlers (and not related to horizontal scrollbars), and the variable name expresses that already. * dom/Document.h: 2011-08-11 James Robinson <jamesr@chromium.org> [chromium] Defer managed texture creation and destruction until updateCompositorResources https://bugs.webkit.org/show_bug.cgi?id=64772 Reviewed by Kenneth Russell. This adds support for deferring GraphicsContext3D calls for texture creation and destruction for managed textures and defers these calls until updateCompositorResources() for contents textures. The primary benefit of this change is that it decouples managing the texture budget for the next frame (which has to happen before painting layer contents) from the actual GL calls that create/destroy textures. That way, in the threaded compositing world we can continue to use textures from the previous frame while software painting contents for the next frame into software buffers or SkPictures. Also renames LayerTexture to ManagedTexture to better reflect what it is. Not all ManagedTextures we create are necessarily associated with layers, but they are all managed by a TextureManager. Covered by compositing/ layout tests. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::getSingleTexture): (WebCore::LayerTilerChromium::createTile): (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/chromium/LayerTilerChromium.h: (WebCore::LayerTilerChromium::Tile::Tile): (WebCore::LayerTilerChromium::Tile::texture): * platform/graphics/chromium/ManagedTexture.cpp: Renamed from Source/WebCore/platform/graphics/chromium/LayerTexture.cpp. (WebCore::ManagedTexture::ManagedTexture): (WebCore::ManagedTexture::~ManagedTexture): (WebCore::ManagedTexture::isValid): (WebCore::ManagedTexture::reserve): (WebCore::ManagedTexture::unreserve): (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: Renamed from Source/WebCore/platform/graphics/chromium/LayerTexture.h. (WebCore::ManagedTexture::create): (WebCore::ManagedTexture::format): (WebCore::ManagedTexture::isReserved): * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::TextureManager): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureManager::create): (WebCore::TextureManager::setAssociatedContextDebugOnly): (WebCore::TextureManager::associatedContextDebugOnly): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore::CCRenderSurface::contentsTexture): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::bindContentsTexture): 2011-08-11 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/66113> [CFNetwork] willCacheResponse() leaks CFCachedURLResponseRef if delegate changes CacheStoragePolicy Reviewed by Joseph Pecoraro. This first appeared in ToT WebKit r23462 (Windows merge). * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse): Only retain cachedResponse if we are returning the same object passed into the method, otherwise we end up double-retaining the new object created. 2011-08-05 Nat Duca <nduca@chromium.org> [chromium] Make WebViewImpl point at CCLayerTreeHost and related separation https://bugs.webkit.org/show_bug.cgi?id=65791 With this patch, LayerRendererChromium becomes increasingly responsible for rendering, while render scheduling and tree hosting moves into the CCLayerTreeHost. Reviewed by James Robinson. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::updateRootLayerContents): (WebCore::LayerRendererChromium::drawRootLayer): (WebCore::LayerRendererChromium::invalidateRootLayerRect): (WebCore::LayerRendererChromium::rootLayerChanged): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::setScissorToRect): (WebCore::LayerRendererChromium::layerTreeAsText): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::settings): (WebCore::LayerRendererChromium::owner): (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::skiaContext): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::setTextureUpdated): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::enabled): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::animateAndLayout): (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter): (WebCore::CCLayerTreeHost::createLayerTreeHostImpl): (WebCore::CCLayerTreeHost::context): (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::createRootLayerPainter): (WebCore::CCLayerTreeHost::finishAllRendering): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHost::setNeedsRedraw): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::doComposite): (WebCore::CCLayerTreeHost::composite): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::animating): (WebCore::CCLayerTreeHost::setAnimating): (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::settings): (WebCore::CCLayerTreeHost::viewportContentRect): (WebCore::CCLayerTreeHost::viewportScrollPosition): (WebCore::CCLayerTreeHost::viewportVisibleRect): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::drawLayersOnMainThread): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread): 2011-08-11 Jeff Miller <jeffm@apple.com> WebCore::AVFWrapper fails to remove observer for kCACFContextNeedsFlushNotification https://bugs.webkit.org/show_bug.cgi?id=66116 We need to pass 0 as the object parameter to CFNotificationCenterRemoveObserver() when removing kCACFContextNeedsFlushNotification to match what we do when we registered for the same notification with CFNotificationCenterAddObserver(). Reviewed by John Sullivan. No new tests, uses existing media tests. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Pass 0 as the object parameter to CFNotificationCenterRemoveObserver(). (WebCore::AVFWrapper::notificationCallback): Remove obsolete FIXME comment. 2011-08-11 Ryosuke Niwa <rniwa@webkit.org> Share code between isStyleSpanOrSpanWithOnlyStyleAttribute, isUnstyledStyleSpan, isSpanWithoutAttributesOrUnstyleStyleSpan and replaceWithSpanOrRemoveIfWithoutAttributes https://bugs.webkit.org/show_bug.cgi?id=66091 Reviewed by Tony Chang. Extracted common code as hasNoAttributeOrOnlyStyleAttribute. The only behavioral difference is that replaceWithSpanOrRemoveIfWithoutAttributes will now remove elements with class="Apple-style-span", for which I'm adding a test. Test: editing/style/remove-styled-element-with-style-span.html * editing/ApplyStyleCommand.cpp: (WebCore::hasNoAttributeOrOnlyStyleAttribute): (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute): (WebCore::isUnstyledStyleSpan): (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan): (WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes): 2011-08-11 Tom Zakrajsek <tomz@codeaurora.org> Add HTMLUnknownElement interface as defined in http://www.w3.org/TR/html5/elements.html#elements-in-the-dom. https://bugs.webkit.org/show_bug.cgi?id=41841 Reviewed by Adam Barth. Test: fast/html/unknown-tag.html * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorV8.pm: (IsDOMNodeType): * dom/make_names.pl: (defaultParametersHash): (buildConstructorMap): (printJSElementIncludes): (printElementIncludes): (printWrapperFunctions): (printWrapperFactoryCppFile): * html/HTMLTagNames.in: * html/HTMLUnknownElement.h: Added. (WebCore::HTMLUnknownElement::create): (WebCore::HTMLUnknownElement::HTMLUnknownElement): * html/HTMLUnknownElement.idl: Added. * mathml/mathtags.in: * page/DOMWindow.idl: * svg/svgtags.in: 2011-08-11 Levi Weintraub <leviw@chromium.org> Remove dead code: borderInnerRect https://bugs.webkit.org/show_bug.cgi?id=66087 Reviewed by Adam Barth. Removing an old and currently unused function: RenderObject::borderInnerRect. No new tests since I'm just pruning dead code. * rendering/RenderObject.cpp: * rendering/RenderObject.h: 2011-08-11 Simon Fraser <simon.fraser@apple.com> Avoid adding the visible wash layer twice https://bugs.webkit.org/show_bug.cgi?id=66098 Reviewed by Chris Marrin. Fix two issues; only create a m_visibleTileWashLayer if we don't have one already, and avoid adding multiple m_visibleTileWashLayers to the sublayers array when flipping between tiled and non-tiled. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): 2011-08-11 Benjamin Poulain <benjamin@webkit.org> The PageSerializer should always use absolute URL https://bugs.webkit.org/show_bug.cgi?id=66006 Reviewed by Adam Barth. Page serializer resolves every URL for storing the resources. The MarkupAccumulator used there should use the same rules in order to create a valid file. No new tests because the test infrastructure for this does not exist with layout tests and the Chromium unit test for the serializer are disabled. * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator): 2011-08-01 Adrienne Walker <enne@google.com> Enable fast path scrolling for composited iframes https://bugs.webkit.org/show_bug.cgi?id=65056 Reviewed by James Robinson. iframes with composited layers for content should be able to do fast path scrolling because they draw into their own backing. To enable this, useSlowRepaints is modified to return true only for the cases that apply to composited layers. The fast path scrolling function is modified to send the invalidation to the backing itself rather than to the window. Renamed a number of "slow repaint" functions to be the more accurate "cannot blit to window" as it will not always force slow path scrolling. * page/FrameView.cpp: (WebCore::FrameView::reset): (WebCore::FrameView::useSlowRepaints): (WebCore::FrameView::useSlowRepaintsIfNotOverlapped): (WebCore::FrameView::contentsInCompositedLayer): (WebCore::FrameView::setCannotBlitToWindow): (WebCore::FrameView::scrollContentsFastPath): (WebCore::FrameView::scrollContentsSlowPath): * page/FrameView.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::cannotBlitToWindow): * rendering/RenderLayer.h: * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2011-08-10 Adrienne Walker <enne@google.com> Support creating compositing layers for scrollable frames and iframes https://bugs.webkit.org/show_bug.cgi?id=55257 Reviewed by James Robinson. When force compositing mode is turned on, iframes with overflow will become composited (in order to enable faster scrolling). This patch was originally by Daniel Sievers <sievers@chromium.org>. Tests: platform/chromium/compositing/force-compositing-mode/no-overflow-iframe-layer.html platform/chromium/compositing/force-compositing-mode/overflow-hidden-iframe-layer.html platform/chromium/compositing/force-compositing-mode/overflow-iframe-enter-compositing.html platform/chromium/compositing/force-compositing-mode/overflow-iframe-layer.html platform/chromium/compositing/force-compositing-mode/overflow-iframe-leave-compositing.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): * rendering/RenderLayerCompositor.h: 2011-08-11 Yong Li <yoli@rim.com> https://bugs.webkit.org/show_bug.cgi?id=65944 Replace QuotesData::operator==() with QuotesData::equal(const QuotesData* , const QuotesData*) because QuotesData::operator==() were using non-standard C++ code that is not supported by all compilers. Reviewed by Alexey Proskuryakov. No new tests because some existing test cases can show the issue, for example, fast/css/content/content-quotes-01.html. * rendering/RenderQuote.cpp: (WebCore::RenderQuote::styleDidChange): * rendering/style/QuotesData.cpp: (WebCore::QuotesData::equal): * rendering/style/QuotesData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setQuotes): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::operator==): 2011-08-11 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66075 Turn on regions and exclusions by default. Fix one stray ifdef that I missed. Reviewed by James Robinson. * css/CSSComputedStyleDeclaration.cpp: (WebCore::contentToCSSValue): 2011-08-11 David Reveman <reveman@chromium.org> [Chromium] Temporarily disable layer anti-aliasing on ChromeOS. https://bugs.webkit.org/show_bug.cgi?id=65922 Reviewed by James Robinson. No new tests. * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::draw): 2011-08-11 Benjamin Poulain <benjamin@webkit.org> [Qt] PageSerializer is specific to MHTML, we should not compile it https://bugs.webkit.org/show_bug.cgi?id=66054 Reviewed by Noam Rosenthal. PageSerializer is specific to MHTML. Do not build PageSerializer unless MHTML is enabled. * WebCore.pro: 2011-08-11 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [refactoring] make tabbed pane a view https://bugs.webkit.org/show_bug.cgi?id=66060 Reviewed by Pavel Feldman. * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): (WebInspector.NetworkItemView.prototype.show): (WebInspector.NetworkItemView.prototype._selectTab.get if): (WebInspector.NetworkItemView.prototype._selectTab): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): * inspector/front-end/inspector.html: 2011-08-11 Andrey Kosyakov <caseq@chromium.org> Web Inspector: source frame popover simetimes pops up after user switches from Scripts panel https://bugs.webkit.org/show_bug.cgi?id=66057 Reviewed by Pavel Feldman. * inspector/front-end/SourceFrame.js: remove popover timer when removing popover. (WebInspector.SourceFrame.prototype._mouseDown): (WebInspector.SourceFrame.prototype._hidePopup): 2011-08-11 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Scripts panel: display the current search match index in the toolbar. https://bugs.webkit.org/show_bug.cgi?id=66048 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult): (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchMatchesCount): (WebInspector.SearchController.prototype.updateCurrentMatchIndex): (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch): (WebInspector.SearchController.prototype.activePanelChanged): (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.get currentSearchResultIndex): 2011-08-11 Xan Lopez <xlopez@igalia.com> [GTK] Add another missing file to GNUmakefile Reviewed by Gustavo Noronha. * GNUmakefile.list.am: 2011-08-11 Xan Lopez <xlopez@igalia.com> [GTK] Add missing files to GNUMakefile Reviewed by Gustavo Noronha. * GNUmakefile.am: * GNUmakefile.list.am: 2011-08-11 Yuta Kitamura <yutak@chromium.org> WebSocket: Use PassRefPtr<> in function arguments in WorkerThreadableWebSocketChannel.cpp https://bugs.webkit.org/show_bug.cgi?id=66047 Reviewed by Kent Tamura. It's safe to use PassRefPtr<> in these functions because: - CrossThreadTask knows how to pass a RefPtr<> across threads, and - Call sites do not pass the pointers to anywhere else. No change in functionality, thus no new tests. * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidSend): (WebCore::workerContextDidGetBufferedAmount): (WebCore::workerContextDidConnect): (WebCore::workerContextDidReceiveMessage): (WebCore::workerContextDidStartClosingHandshake): (WebCore::workerContextDidClose): 2011-08-11 Pavel Feldman <pfeldman@google.com> Web Inspector: [Mac] search as you type does not work with the new indent in the script selector. https://bugs.webkit.org/show_bug.cgi?id=66039 Reviewed by Yury Semikhatsky. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): * inspector/front-end/inspector.css: (select.status-bar-item): 2011-08-11 Alexis Menard <alexis.menard@openbossa.org> Unreviewed build fix for Qt. Make sure we build when Qt is namespaced. * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: 2011-08-11 Pavel Podivilov <podivilov@chromium.org> Web Inspector: use source-file-replaced instead of source-file-changed event. https://bugs.webkit.org/show_bug.cgi?id=65551 Reviewed by Pavel Feldman. Test: inspector/debugger/source-frame-count.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype._sourceFileReplaced): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.reload): * inspector/front-end/inspector.js: (WebInspector._createPanels): 2011-08-11 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [REGRESSION] Resources panel search fails when search result is found in a resource used in several frames. https://bugs.webkit.org/show_bug.cgi?id=66007 Reviewed by Pavel Feldman. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.performSearch.callback): (WebInspector.ResourcesPanel.prototype.performSearch): (WebInspector.FrameTreeElement.prototype.resourceByURL): 2011-08-11 Andras Becsi <abecsi@webkit.org> [GTK] Fix the build after r92792. Rubber-stamped by Csaba Osztrogonác. No new tests needed. * GNUmakefile.list.am: add missing RenderFlowThread.{cpp|h} RenderRegion.{cpp|h} 2011-08-11 Renata Hodovan <reni@webkit.org> [Qt] Fix WebGL on Windows after r92805 https://bugs.webkit.org/show_bug.cgi?id=66042 WEBGL is temporarly disabled, because it broked the bots. * features.pri: 2011-08-11 Pavel Feldman <pfeldman@google.com> Web Inspector: do not evaluate watch expressions on load. https://bugs.webkit.org/show_bug.cgi?id=66002 Reviewed by Yury Semikhatsky. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.show): (WebInspector.ScriptsPanel.prototype.hide): (WebInspector.ScriptsPanel.prototype.reset): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane): (WebInspector.WatchExpressionsSidebarPane.prototype.hide): (WebInspector.WatchExpressionsSidebarPane.prototype.reset): (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions): (WebInspector.WatchExpressionsSidebarPane.prototype._refreshExpressionsIfNeeded): (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked): 2011-08-10 Ryosuke Niwa <rniwa@webkit.org> Copying can result in span around block elements on the clipboard https://bugs.webkit.org/show_bug.cgi?id=34564 Reviewed by Tony Chang. Completely overhauled the way WebKit preserves style in copy and paste. Instead of wrapping the entire serialized contents by a Apple style span, WebKit now adds inline style to the top level elements, wrap top level text nodes by a style span. * editing/EditingStyle.cpp: (WebCore::EditingStyle::collapseTextDecorationProperties): Remove text-decoration property when the value of -webkit-text-decorations-in-effect is none. (WebCore::EditingStyle::removeStyleFromRulesAndContext): Since display: inline and float: none are now added on copy, remove these properties on paste. (WebCore::EditingStyle::removePropertiesInElementDefaultStyle): Takes Element* instead of StyledElement*. (WebCore::EditingStyle::forceInline): Added. (WebCore::getPropertiesNotIn): Remove properties only when the base style has them. * editing/EditingStyle.h: * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::shouldApplyWrappingStyle): Added. (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Takes highestNodeToBeSerialized. (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Calls appendStyleNodeOpenTag and styleNodeCloseTag. (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): Extracted from wrapWithStyleNode. (WebCore::StyledMarkupAccumulator::styleNodeCloseTag): Ditto. (WebCore::StyledMarkupAccumulator::appendText): Wraps text node with a style span if needed. Set display: inline and float: none so that it won't be converted to a block on paste side. (WebCore::StyledMarkupAccumulator::appendElement): Add wrapping style if appropriate; Remove any properties that are overridden by default style and any style that may conflict with the computed style of node to avoid modifying the appearance of the serialized nodes. (WebCore::StyledMarkupAccumulator::serializeNodes): Compute wrapping style; copies of this style are modified as needed when serializing top-level elements or text nodes. We call traverseNodesForSerialization with NodeTraversalMode set to DoNotEmitString first to compute the highest node to be serialized. The second call to the function actually serialize the nodes. (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): Extracted from serializeNodes. Outputs string only if NodeTraversalMode is set to EmitString. (WebCore::createMarkup): No longer adds wrapping spans. 2011-08-10 Adam Barth <abarth@webkit.org> Add tests of optional arguments for Geolocation https://bugs.webkit.org/show_bug.cgi?id=65810 Reviewed by Sam Weinig. Geolocation's treatment of not-enough-arguments almost matches the spec. getCurrentPosition and watchPosition work properly, but, because they are custom, we should use the prettier form of the [Optional] attribute. Before this series of patches, clearWatch argument was optional, but that doesn't match the spec or other browsers. Calling this function with zero arguments is pretty non-sensical, so there shouldn't be much compat risk to tightening up our behavior here. Matching other browsers and the spec seems like the bigger win. If we run into compat problems, we can re-evaluate this decision. Test: fast/dom/Geolocation/not-enough-arguments.html * page/Geolocation.idl: 2011-08-10 Tim Horton <timothy_horton@apple.com> SVGAElement check for internal non-view anchors is inside ENABLE(SVG_ANIMATION) https://bugs.webkit.org/show_bug.cgi?id=66026 Reviewed by Rob Buis. Move only the SMIL-related code inside the ENABLE(SVG_ANIMATION) block. No new tests, as it depends on the enabled features. * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): 2011-08-10 Tim Horton <timothy_horton@apple.com> Crash when clicking an SVG <a> link to the local document https://bugs.webkit.org/show_bug.cgi?id=66019 <rdar://problem/9933311> Reviewed by Rob Buis. Check if the target element of an internal link is valid before making use of it. Test: svg/custom/click-internal-anchor-with-use-crash.xhtml * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): 2011-08-10 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable WebGL by default for QtWebKit https://bugs.webkit.org/show_bug.cgi?id=65998 Reviewed by Benjamin Poulain. Make ENABLE_WEBGL true by default when Qt is configured with OpenGL. No new tests. Build change only. * features.pri: 2011-08-10 Abhishek Arya <inferno@chromium.org> Check that we do not need layout before trying to dirty m_originatingLine for our floats. https://bugs.webkit.org/show_bug.cgi?id=65938 Reviewed by Dave Hyatt. Test: fast/block/float/float-originating-line-deleted-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::clearFloats): 2011-08-10 David Hyatt <hyatt@apple.com> Add missing regions/exclusions-related files to EFL. * CMakeLists.txt: 2011-08-10 David Hyatt <hyatt@apple.com> Add missing regions/exclusions-related files to Chromium. * WebCore.gypi: 2011-08-10 David Hyatt <hyatt@apple.com> Fix Qt build bustage. Add missing regions/exclusions-related files to their project. * WebCore.pro: 2011-08-10 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66004 Remove ifdefs for CSS Exclusions (since the feature doesn't exist any longer and has morphed into positioned floats instead). Go ahead and yank the ifdefs for CSS Regions also and just turn them on. Reviewed by Adam Roben. * Configurations/FeatureDefines.xcconfig: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseWrapShape): (WebCore::CSSParser::parseFromFlowContent): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::init): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getStringValue): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getShapeValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator RegionOverflow): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * css/CSSWrapShapes.cpp: * css/CSSWrapShapes.h: * css/SVGCSSValueKeywords.in: * dom/Node.cpp: (WebCore::Node::diff): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::setStyle): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): (WebCore::NodeRenderingContext::parentRenderer): (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): (WebCore::NodeRendererFactory::createRendererIfNeeded): * dom/NodeRenderingContext.h: * rendering/RenderFlowThread.cpp: * rendering/RenderFlowThread.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::collectLayers): * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderObject.h: (WebCore::RenderObject::isRenderRegion): (WebCore::RenderObject::isRenderFlowThread): * rendering/RenderRegion.cpp: * rendering/RenderRegion.h: * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): * rendering/RenderView.cpp: (WebCore::RenderView::renderFlowThreadWithName): * rendering/RenderView.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionOverflow): (WebCore::InheritedFlags::setRegionOverflow): (WebCore::InheritedFlags::initialWrapShape): (WebCore::InheritedFlags::initialRegionOverflow): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-08-10 Abhishek Arya <inferno@chromium.org> Don't create html renderer for SVG <glyphRef> https://bugs.webkit.org/show_bug.cgi?id=66000 Reviewed by David Hyatt. Test: svg/text/glyphref-renderer-create-crash.html * svg/SVGGlyphRefElement.h: 2011-08-10 Scott Graham <scottmg@google.com> OpenTypeSanitizer in chromium gyp files is linked twice https://bugs.webkit.org/show_bug.cgi?id=65927 Reviewed by Adam Barth. No new tests, should just build and link properly on all platforms. * WebCore.gyp/WebCore.gyp: 2011-08-10 Oliver Hunt <oliver@apple.com> Make GC checks more aggressive in release builds https://bugs.webkit.org/show_bug.cgi?id=66001 Reviewed by Gavin Barraclough. Fix GC bugs found while testing increased validation logic * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): * bindings/js/JSDOMWindowShell.h: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::createWindowShell): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_instance.mm: 2011-08-10 Ben Wells <benwells@chromium.org> [skia] Move calls to makeGrContextCurrent into clipPathAntiAliased from callers https://bugs.webkit.org/show_bug.cgi?id=65733 This protects against callers of clipPathAntiAliased forgetting to call makeGrContextCurrent. Reviewed by James Robinson. No change in functionality, no new tests. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::addInnerRoundedRectClip): (WebCore::GraphicsContext::clip): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): 2011-08-10 Benjamin Poulain <ikipou@gmail.com> MarkupAccumulator: make resolution of URLs implicit to appendQuotedURLAttributeValue() https://bugs.webkit.org/show_bug.cgi?id=65990 Reviewed by Ryosuke Niwa. Instead of resolving the URLs in the call site of appendQuotedURLAttributeValue(), the URL is now resolved if necessary in appendQuotedURLAttributeValue(). * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): (WebCore::MarkupAccumulator::appendAttribute): * editing/MarkupAccumulator.h: 2011-08-10 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Implement text shaping with font-feature-settings on Linux https://bugs.webkit.org/show_bug.cgi?id=65903 - Modifies Font::codePath() to return Complex when there is font feature settings CSS property. - Implements OpenType advanced typography feature using Harfbuzz on Chromium Linux port. Reviewed by Adam Barth. Test: css3/font-feature-settings-rendering.html * platform/graphics/Font.cpp: (WebCore::Font::codePath): Returns Complex when fontFeatureSettings exists. * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::setupFontFeatures): Added. (WebCore::ComplexTextController::setupFontForScriptRun): Calls setupFontFeatures(). 2011-08-10 Tony Gentilcore <tonyg@chromium.org> [chromium] Notify MemoryCache of decoded data access https://bugs.webkit.org/show_bug.cgi?id=65859 Reviewed by James Robinson. This causes us to call CachedImage::didDraw() which calls CachedResource::didAccessDecodedData() which updates the LRU for decoded image data and potentially prunes the cache. This is already done by almost all of the other ports. The decoded bitmaps obviously use quite a bit of memory, so pruning them when necessary is important. In my tests, this saves several MB on many popular web pages. No new tests because no observable difference in functionality. * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): 2011-08-10 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Remove Network.initialContentSet from protocol, store workers content on backend. https://bugs.webkit.org/show_bug.cgi?id=65929 Reviewed by Pavel Feldman. Tests: http/tests/inspector/network/network-shared-worker.html http/tests/inspector/network/network-worker.html * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveScriptResponse): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::setInitialScriptContent): (WebCore::InspectorResourceAgent::didReceiveScriptResponse): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkManager.js: * inspector/front-end/Resource.js: * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerScriptLoader::didReceiveResponse): * workers/Worker.cpp: (WebCore::Worker::didReceiveResponse): * workers/Worker.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didReceiveResponse): * workers/WorkerScriptLoaderClient.h: (WebCore::WorkerScriptLoaderClient::didReceiveResponse): 2011-08-10 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [Network] Filtering by stylesheet does not update the # reqs, filesizes. https://bugs.webkit.org/show_bug.cgi?id=65515 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._updateSummaryBar): (WebInspector.NetworkLogView.prototype._updateFilter): 2011-08-10 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: console messages markers are lost in Resources panel after page reload https://bugs.webkit.org/show_bug.cgi?id=60701 Reviewed by Pavel Feldman. Test: http/tests/inspector/resource-tree/resource-tree-errors-reload.html * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded): (WebInspector.ResourceTreeModel.prototype._addPendingConsoleMessage): (WebInspector.ResourceTreeModel.prototype._addPendingConsoleMessagesToResource): (WebInspector.ResourceTreeModel.prototype._addConsoleMessageToResource): (WebInspector.ResourceTreeModel.prototype._consoleCleared): (WebInspector.ResourceTreeModel.prototype._bindResourceURL): 2011-08-10 Lars Knudsen <lars.knudsen@nokia.com> Add device specific settings to support viewport computing https://bugs.webkit.org/show_bug.cgi?id=65984 Reviewed by Kenneth Rohde Christiansen. Based on patch by Zalan Bujtas. Added settings for device size, dpi and layout fallback width to support viewport computing. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setLayoutFallbackWidth): (WebCore::Settings::layoutFallbackWidth): (WebCore::Settings::setDeviceWidth): (WebCore::Settings::deviceWidth): (WebCore::Settings::setDeviceHeight): (WebCore::Settings::deviceHeight): (WebCore::Settings::setDeviceDPI): (WebCore::Settings::deviceDPI): 2011-08-10 Benjamin Poulain <benjamin@webkit.org> Unify the way we generate HTML for an image in the Clipboard https://bugs.webkit.org/show_bug.cgi?id=58043 Reviewed by Ryosuke Niwa. Unify the way we generate the markup when dragging and image. Previously, the code was using the special function imageToMarkup() that was spread from the Chromium port. That function ignores some edge cases so this patch replace it by the more generic MarkupAccumulator (which is also used by the other pasteboard actions). The MarkupAccumulator was modified because following r61178, the local filepath are treated differently (the enum was changed to make this behavior explicit). Tests: fast/drag-and-drop/drag-and-drop-image-contenteditable.html fast/drag-and-drop/drag-and-drop-inputimage-contenteditable.html fast/drag-and-drop/drag-and-drop-objectimage-contenteditable.html * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::MarkupAccumulator): (WebCore::MarkupAccumulator::resolveURLIfNeeded): (WebCore::MarkupAccumulator::appendAttribute): * editing/MarkupAccumulator.h: * editing/markup.cpp: * editing/markup.h: * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator): * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::declareAndWriteDragImage): (WebCore::ClipboardChromium::writeRange): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeSelection): * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::declareAndWriteDragImage): (WebCore::ClipboardGtk::writeRange): * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::markup): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writeImage): * platform/haiku/PasteboardHaiku.cpp: (WebCore::Pasteboard::writeSelection): * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::declareAndWriteDragImage): (WebCore::ClipboardQt::writeRange): * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeSelection): * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::declareAndWriteDragImage): 2011-08-10 Pavel Feldman <pfeldman@google.com> Web Inspector: auto-completion for string literals doesn't work https://bugs.webkit.org/show_bug.cgi?id=65701 Reviewed by Yury Semikhatsky. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::evaluateOnCallFrame): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): (): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._completions.evaluated.getCompletions): (WebInspector.ConsoleView.prototype._completions.evaluated): (WebInspector.ConsoleView.prototype._completions.receivedPropertyNamesFromEval): (WebInspector.ConsoleView.prototype._completions.receivedPropertyNames): (WebInspector.ConsoleView.prototype._completions): (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.PresenationCallFrame.prototype.evaluate): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): 2011-08-10 Pavel Feldman <pfeldman@google.com> Web Inspector: CSS editing file containing tabs leads to the whole file change in revision history. https://bugs.webkit.org/show_bug.cgi?id=65959 Reviewed by Yury Semikhatsky. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.prototype._innerSetText): 2011-08-10 Pavel Feldman <pfeldman@chromium.org> Web Inspector: there should be a way to tell what properties are non-enumerable when expanding objects. https://bugs.webkit.org/show_bug.cgi?id=65518 Reviewed by Yury Semikhatsky. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::getProperties): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.ondblclick): (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.getOwnProperties): (WebInspector.RemoteObject.prototype.getAllProperties): (WebInspector.RemoteObjectProperty): * inspector/front-end/inspector.css: (.section .properties .dimmed): 2011-08-10 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [REGRESSION] Editor lost after committing a CSS property value for inline style https://bugs.webkit.org/show_bug.cgi?id=65918 Reviewed by Pavel Feldman. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._innerUpdate.stylesCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.event): (WebInspector.StylePropertyTreeElement.prototype.styleText.updateInterface.majorChange.isRevert.parentPane): (WebInspector.StylePropertyTreeElement.prototype.styleText.updateInterface.majorChange.isRevert): 2011-08-10 Yuta Kitamura <yutak@chromium.org> WebSocket: Add binaryType attribute https://bugs.webkit.org/show_bug.cgi?id=65967 Reviewed by Kent Tamura. Add a new attribute "binaryType" to WebSocket. It controls the data type of MessageEvent for WebSocket's binary frames. Tests: http/tests/websocket/tests/hixie76/undefined-attributes.html http/tests/websocket/tests/hybi/binary-type.html * websockets/WebSocket.cpp: (WebCore::WebSocket::WebSocket): (WebCore::WebSocket::binaryType): (WebCore::WebSocket::setBinaryType): * websockets/WebSocket.h: * websockets/WebSocket.idl: 2011-08-10 Yuta Kitamura <yutak@chromium.org> WebSocket: Accept multiple subprotocols https://bugs.webkit.org/show_bug.cgi?id=65247 Reviewed by Kent Tamura. WebSocket constructor should accept an array of subprotocols if hybi-10 protocol is chosen. Tests: http/tests/websocket/tests/hybi/invalid-subprotocol-characters.html http/tests/websocket/tests/hybi/invalid-subprotocols.html http/tests/websocket/tests/hybi/multiple-subprotocols.html http/tests/websocket/tests/hybi/workers/multiple-subprotocols.html * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocketConstructor::constructJSWebSocket): If the second argument of WebSocket constructor is an array, build a Vector<String> and pass it to WebSocket::connect(). * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): Ditto. * websockets/WebSocket.cpp: (WebCore::isValidProtocolCharacter): Added. (WebCore::isValidProtocolString): Added. (WebCore::isValidProtocolStringHixie76): Renamed from isValidProtocolString. (WebCore::joinStrings): (WebCore::WebSocket::connect): If an array is provided as a subprotocol, and if hixie-76 is used for this connection, it must be converted to a string in the same manner as JavaScript's Array.toString() in order to keep compatibility. * websockets/WebSocket.h: Removed m_protocol because it was not used at all. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::disconnect): WebSocketChannel may be released before connect() is called, thus m_handshake may be null. 2011-08-10 Andrey Kosyakov <caseq@chromium.org> Web Inspector: Network panel always displays file:// resources as "(pending)" https://bugs.webkit.org/show_bug.cgi?id=65784 Reviewed by Pavel Feldman. Test: inspector/network-status-non-http.html * English.lproj/localizedStrings.js: * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.isHttpFamily): 2011-08-09 Luke Macpherson <macpherson@chromium.org> Use setFontDescription helper to set m_fontDirty. https://bugs.webkit.org/show_bug.cgi?id=65956 Reviewed by Dan Bernstein. No new tests / trivial cleanup. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-08-09 Dominic Cooney <dominicc@chromium.org> [V8] The prototype property of DOM constructors should be read-only. https://bugs.webkit.org/show_bug.cgi?id=39655 Reviewed by Dimitri Glazkov. Test: fast/dom/prototype-property.html * bindings/scripts/CodeGeneratorV8.pm: Make prototypes read-only. * bindings/scripts/test/V8/V8TestInterface.cpp: Update expectations. (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::ConfigureV8TestMediaQueryListListenerTemplate): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): 2011-08-09 Abhishek Arya <inferno@chromium.org> Style change not propagating for before, after content for table parts. https://bugs.webkit.org/show_bug.cgi?id=51862 Fix by Chris Evans (cevans@chromium.org). In the table case, make sure to return the before / after parent rather then the before / after node itself. Reviewed by Simon Fraser. * rendering/RenderObjectChildList.cpp: (WebCore::findBeforeAfterParent): 2011-08-09 Luke Macpherson <macpherson@chromium.org> Implement string based properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=65662 Reviewed by Darin Adler. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyString::ApplyPropertyString): Added class to handle string based properties. (WebCore::ApplyPropertyString::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Add initializers for CSSPropertyWebkitHighlight and CSSPropertyWebkitHyphenateCharacter. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing implementations for CSSPropertyWebkitHighlight and CSSPropertyWebkitHyphenateCharacter. 2011-08-09 Emil A Eklund <eae@chromium.org> Switch RenderBlock to to new layout types https://bugs.webkit.org/show_bug.cgi?id=65396 Reviewed by Eric Seidel. No new tests, no new functionality. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::addOverflowFromChildren): (WebCore::RenderBlock::computeOverflow): (WebCore::RenderBlock::adjustPositionedBlock): (WebCore::RenderBlock::adjustFloatingBlock): (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::clearFloatsIfNeeded): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::determineLogicalLeftPositionForChild): (WebCore::RenderBlock::setLogicalLeftForChild): (WebCore::RenderBlock::setLogicalTopForChild): (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::flipFloatForWritingMode): (WebCore::RenderBlock::isPointInOverflowControl): (WebCore::RenderBlock::hitTestFloats): * rendering/RenderBlock.h: (WebCore::RenderBlock::logicalTopForFloat): (WebCore::RenderBlock::logicalBottomForFloat): (WebCore::RenderBlock::logicalLeftForFloat): (WebCore::RenderBlock::logicalRightForFloat): (WebCore::RenderBlock::logicalWidthForFloat): (WebCore::RenderBlock::setLogicalTopForFloat): (WebCore::RenderBlock::setLogicalLeftForFloat): (WebCore::RenderBlock::setLogicalHeightForFloat): (WebCore::RenderBlock::setLogicalWidthForFloat): 2011-08-09 Jeffrey Pfau <jpfau@apple.com> Initial pass at a new XML tree builder https://bugs.webkit.org/show_bug.cgi?id=65803 Reviewed by Adam Barth. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::~NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::append): (WebCore::NewXMLDocumentParser::finish): (WebCore::NewXMLDocumentParser::finishWasCalled): * xml/parser/NewXMLDocumentParser.h: * xml/parser/XMLTreeBuilder.cpp: Added. (WebCore::XMLTreeBuilder::XMLTreeBuilder): (WebCore::XMLTreeBuilder::processToken): (WebCore::XMLTreeBuilder::pushCurrentNode): (WebCore::XMLTreeBuilder::popCurrentNode): (WebCore::XMLTreeBuilder::processProcessingInstruction): (WebCore::XMLTreeBuilder::processXMLDeclaration): (WebCore::XMLTreeBuilder::processDOCTYPE): (WebCore::XMLTreeBuilder::processStartTag): (WebCore::XMLTreeBuilder::processEndTag): (WebCore::XMLTreeBuilder::processCharacter): (WebCore::XMLTreeBuilder::processCDATA): (WebCore::XMLTreeBuilder::processComment): (WebCore::XMLTreeBuilder::processEntity): (WebCore::XMLTreeBuilder::processNamespaces): (WebCore::XMLTreeBuilder::processAttributes): (WebCore::XMLTreeBuilder::processXMLEntity): (WebCore::XMLTreeBuilder::processHTMLEntity): (WebCore::XMLTreeBuilder::add): (WebCore::XMLTreeBuilder::appendToText): (WebCore::XMLTreeBuilder::enterText): (WebCore::XMLTreeBuilder::exitText): (WebCore::XMLTreeBuilder::NodeStackItem::NodeStackItem): (WebCore::XMLTreeBuilder::NodeStackItem::hasNamespaceURI): (WebCore::XMLTreeBuilder::NodeStackItem::namespaceURI): (WebCore::XMLTreeBuilder::NodeStackItem::setNamespaceURI): (WebCore::XMLTreeBuilder::NodeStackItem::namespaceForPrefix): * xml/parser/XMLTreeBuilder.h: Added. (WebCore::XMLTreeBuilder::create): (WebCore::XMLTreeBuilder::NodeStackItem::namespaceURI): (WebCore::XMLTreeBuilder::NodeStackItem::setNamespaceURI): (WebCore::XMLTreeBuilder::NodeStackItem::node): (WebCore::XMLTreeBuilder::NodeStackItem::setNode): 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> Add ParentClass typedef in all JSC classes https://bugs.webkit.org/show_bug.cgi?id=65731 Reviewed by Oliver Hunt. No new tests. Just added the Base typedefs in all the classes that are a subclass of JSCell to point at their parent classes. This is a change to support future changes to the way constructors and destructors are implemented in JS objects, among other things. * bindings/js/JSAudioConstructor.h: * bindings/js/JSImageConstructor.h: * bindings/js/JSOptionConstructor.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateConstructorDeclaration): * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: * bridge/c/CRuntimeObject.h: * bridge/c/c_instance.cpp: * bridge/jni/jsc/JavaInstanceJSC.cpp: * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/objc_runtime.h: * bridge/qt/qt_instance.cpp: * bridge/qt/qt_pixmapruntime.cpp: * bridge/qt/qt_runtime.h: * bridge/runtime_array.h: * bridge/runtime_method.h: * bridge/runtime_object.h: * bridge/testqtbindings.cpp: (Global::className): 2011-08-09 Alexei Svitkine <asvitkine@chromium.org> [Chromium] Enable rubber banding when scrolling. https://bugs.webkit.org/show_bug.cgi?id=65707 Reviewed by Dimitri Glazkov. No new tests since this is just syncing changes to chromium platform. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent): 2011-08-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: XHRs end up in the resources panel. https://bugs.webkit.org/show_bug.cgi?id=60321 Reviewed by Pavel Feldman. Test: http/tests/inspector/resource-tree/resource-tree-no-xhrs.html * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onResourceUpdated): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): 2011-08-08 Adrienne Walker <enne@google.com> Add testing for --force-compositing-mode to windows.internal https://bugs.webkit.org/show_bug.cgi?id=65777 Reviewed by Adam Barth. Test: platform/chromium/compositing/force-compositing-mode/force-composite-empty.html Move initial initialization to settings caching function so that RLC picks up changes to the force compositing mode flag. * WebCore.exp.in: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): (WebCore::RenderLayerCompositor::updateCompositingLayers): * testing/Internals.cpp: (WebCore::Internals::setForceCompositingMode): * testing/Internals.h: * testing/Internals.idl: 2011-08-09 Alexandru Chiculita <achicu@adobe.com> Fixing 65868 REGRESSION(r92610) caused by 65668 - Optimize floating elements lookup https://bugs.webkit.org/show_bug.cgi?id=65871 Added an interval tree in the FloatingObjects structure. Also added new mechanisms to make sure the tree is updated correctly when a float is repositioned. Changed the PODIntervalTree to support giving a search adapter that can be implemented by the client. I'm not adding a different bug for that because PODIntervalTree is not used anywhere else and would be hard to test that the change is not breaking anything. Reviewed by Dave Hyatt. No new tests, just a refactor on the floating objects data structure. * WebCore.xcodeproj/project.pbxproj: * platform/PODIntervalTree.h: (WebCore::PODIntervalSearchAdapter::PODIntervalSearchAdapter): (WebCore::PODIntervalSearchAdapter::lowValue): (WebCore::PODIntervalSearchAdapter::highValue): (WebCore::PODIntervalSearchAdapter::collectIfNeeded): (WebCore::PODIntervalTree::PODIntervalTree): (WebCore::PODIntervalTree::allOverlaps): (WebCore::PODIntervalTree::allOverlapsWithAdapter): (WebCore::PODIntervalTree::searchForOverlapsFrom): * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): (WebCore::PODRedBlackTree::clear): (WebCore::PODRedBlackTree::isInitialized): (WebCore::PODRedBlackTree::initIfNeeded): (WebCore::PODRedBlackTree::add): (WebCore::PODRedBlackTree::remove): (WebCore::PODRedBlackTree::contains): (WebCore::PODRedBlackTree::visitInorder): (WebCore::PODRedBlackTree::size): (WebCore::PODRedBlackTree::checkInvariants): (WebCore::PODRedBlackTree::dump): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::removeFloatingObjectsBelow): (WebCore::RenderBlock::positionNewFloats): (WebCore::::collectIfNeeded): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::nextFloatLogicalBottomBelow): (WebCore::RenderBlock::lowestFloatLogicalBottom): (WebCore::RenderBlock::addPositionedFloats): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::hasOverhangingFloat): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::markSiblingsWithFloatsForLayout): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::adjustForBorderFit): (WebCore::RenderBlock::FloatingObjects::clear): (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject): (WebCore::RenderBlock::FloatingObjects::addPlacedObject): (WebCore::RenderBlock::FloatingObjects::removePlacedObject): (WebCore::RenderBlock::FloatingObjects::add): (WebCore::RenderBlock::FloatingObjects::remove): (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree): (WebCore::::string): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObject::FloatingObject): (WebCore::RenderBlock::FloatingObject::setX): (WebCore::RenderBlock::FloatingObject::setY): (WebCore::RenderBlock::FloatingObject::setWidth): (WebCore::RenderBlock::FloatingObject::setHeight): (WebCore::RenderBlock::FloatingObject::setFrameRect): (WebCore::RenderBlock::FloatingObject::isInPlacedTree): (WebCore::RenderBlock::FloatingObject::setIsInPlacedTree): (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter): (WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue): (WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue): (WebCore::RenderBlock::FloatingObjects::FloatingObjects): (WebCore::RenderBlock::FloatingObjects::setHorizontalWritingMode): (WebCore::RenderBlock::FloatingObjects::set): (WebCore::RenderBlock::FloatingObjects::placedFloatsTree): (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTreeIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloatsInRange): (WebCore::RenderBlock::linkToEndLineIfNeeded): (WebCore::RenderBlock::matchedEndLine): (WebCore::RenderBlock::positionNewFloatOnLine): 2011-08-08 Ryosuke Niwa <rniwa@webkit.org> Repeated copy and paste result in nested font elements https://bugs.webkit.org/show_bug.cgi?id=65824 Reviewed by Tony Chang. Modified isInlineNodeWithStyle to match font element. Also made the function match strictly with those nodes that ApplyStyleCommand may add to avoid removing non-styling elements. And fixed a regression from r81887 that ReplaceSelectionCommand may remove non-editing styles such as border in the attempt to avoid nesting styling elements. This patch paves the way to fix the bug 34564. Tests: editing/pasteboard/paste-text-with-style-2.html editing/pasteboard/paste-text-with-style-3.html editing/pasteboard/paste-text-with-style-4.html * editing/EditingStyle.cpp: (WebCore::HTMLElementEquivalent::matches): Takes const Element* instead of Element*. (WebCore::HTMLAttributeEquivalent::matches): Ditto. (WebCore::htmlElementEquivalents): Extracted from conflictsWithImplicitStyleOfElement. (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Calls htmlElementEquivalents. (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent): Added; determines whether an element is style span or a styling element (e.g. b, i, font) possibly with editing style. * editing/EditingStyle.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::isInlineNodeWithStyle): Calls EditingStyle::elementIsStyledSpanOrHTMLEquivalent. (WebCore::ReplaceSelectionCommand::doApply): More aggressively avoid nesting styling elements. * editing/htmlediting.cpp: (WebCore::highestEnclosingNodeOfType): * editing/htmlediting.h: 2011-08-09 Dmitry Lomov <dslomov@google.com> https://bugs.webkit.org/show_bug.cgi?id=65778 [WebWorkers][chromium] Make statics thread-safe and make sure V8 API accesses correct isolates. Reviewed by Dmitry Titov. Covered by existing tests. * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData): * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::lazyEventListenerToStringTemplate): (WebCore::V8BindingPerIsolateData::hiddenPropertyName): (WebCore::V8BindingPerIsolateData::globalHandleMap): (WebCore::AllowAllocation::AllowAllocation):Moving to V8Binding.h from V8Utilities.h to resolve header dependency. (WebCore::AllowAllocation::~AllowAllocation): (WebCore::AllowAllocation::current): (WebCore::SafeAllocation::newInstance): * bindings/v8/V8GCController.cpp: (WebCore::currentGlobalHandleMap): (WebCore::enumerateGlobalHandles): (WebCore::V8GCController::registerGlobalHandle): (WebCore::V8GCController::unregisterGlobalHandle): * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::V8HiddenPropertyName::createString): * bindings/v8/V8HiddenPropertyName.h: (WebCore::V8HiddenPropertyName::V8HiddenPropertyName): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8NPObject.cpp: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::checkNewLegal): * bindings/v8/V8Utilities.h: * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::initIsolate): * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::scheduleExecutionTermination): 2011-08-09 Steve Block <steveblock@google.com> JavaString is not needed by V8 https://bugs.webkit.org/show_bug.cgi?id=65909 Removes the JavaString wrapper class, moves the JSC implementation to JavaStringJSC.h and removes the V8 implementation. Reviewed by Alexey Proskuryakov. No new tests, refactoring only. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bridge/jni/JavaString.h: Removed. * bridge/jni/jni_jsobject.mm: * bridge/jni/jsc/JavaFieldJSC.h: * bridge/jni/jsc/JavaInstanceJSC.cpp: * bridge/jni/jsc/JavaMethodJSC.h: * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaString::JavaString): (JSC::Bindings::JavaString::~JavaString): (JSC::Bindings::JavaString::init): * bridge/jni/v8/JavaStringV8.h: Removed. 2011-08-09 Abhishek Arya <inferno@chromium.org> Regression(83075): Fix updateAlwaysCreateLineBoxes on information about full layout which is needed when dirtying lineboxes. https://bugs.webkit.org/show_bug.cgi?id=65924 Reviewed by Dave Hyatt. Test: fast/inline/update-always-create-line-boxes-full-layout-crash.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderInline.cpp: (WebCore::RenderInline::updateAlwaysCreateLineBoxes): * rendering/RenderInline.h: 2011-08-09 Nate Chapin <japhet@chromium.org> Remove receivedCancellation() from SubresourceLoaderClient. http://bugs.webkit.org/show_bug.cgi?id=65330 Reviewed by Alexey Proskuryakov. No new tests, no change in functionality intended. * loader/DocumentThreadableLoader.cpp: * loader/DocumentThreadableLoader.h: * loader/SubresourceLoader.cpp: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: * loader/ThreadableLoaderClient.h: * loader/WorkerThreadableLoader.cpp: * loader/WorkerThreadableLoader.h: * notifications/Notification.cpp: * notifications/Notification.h: Remove receivedCancellation() since it's identical to didFail(), which is always called immediately after. * workers/WorkerScriptLoader.cpp: * workers/WorkerScriptLoader.h: Remove receivedCancellation() since it's identical to didFail(), which is always called immediately after. * xml/XMLHttpRequest.cpp: * xml/XMLHttpRequest.h: Remove receivedCancellation(). All it does is set m_response, which is cleared in didFail() before it can be used. 2011-08-09 Steve Block <steveblock@google.com> Java Bridge leaks local references https://bugs.webkit.org/show_bug.cgi?id=64320 Reviewed by Alexey Proskuryakov. No new tests as this is just an optimization. * bridge/jni/jsc/JavaFieldJSC.cpp: (JavaField::JavaField): * bridge/jni/jsc/JavaMethodJSC.cpp: (JavaMethod::JavaMethod): 2011-08-09 Pavel Feldman <pfeldman@google.com> Web Inspector: files from different domains are mixed in the file selector in Scripts panel https://bugs.webkit.org/show_bug.cgi?id=65601 Reviewed by Yury Semikhatsky. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL): (WebInspector.ScriptsPanel.prototype.reset): * inspector/front-end/inspector.css: (select.status-bar-item): 2011-08-09 Pavel Feldman <pfeldman@google.com> Web Inspector: provide a way to hide user agent styles https://bugs.webkit.org/show_bug.cgi?id=37766 Reviewed by Yury Semikhatsky. Test: inspector/styles/show-user-agent-styles.html * English.lproj/localizedStrings.js: * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules.get continue): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._createElementStatePane): (WebInspector.StylesSidebarPane.prototype._showUserAgentStylesSettingChanged): 2011-08-09 Steve Block <steveblock@google.com> JavaMethodJobject is no longer needed by V8 https://bugs.webkit.org/show_bug.cgi?id=65910 Reviewed by Tony Gentilcore. Removes the JavaMethod interface and moves the JavaMethodJobject implementation to bridge/jni/jsc/JavaMethodJSC.[cpp|h]. No new tests, refactoring only. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bridge/jni/JavaMethod.h: Removed. * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): * bridge/jni/jsc/JavaFieldJSC.h: * bridge/jni/jsc/JavaInstanceJSC.cpp: * bridge/jni/jsc/JavaMethodJSC.cpp: Renamed from Source/WebCore/bridge/jni/JavaMethodJobject.cpp. (JavaMethod::JavaMethod): (JavaMethod::~JavaMethod): (appendClassName): (JavaMethod::signature): * bridge/jni/jsc/JavaMethodJSC.h: Renamed from Source/WebCore/bridge/jni/JavaMethodJobject.h. (JSC::Bindings::JavaMethod::name): (JSC::Bindings::JavaMethod::returnTypeClassName): (JSC::Bindings::JavaMethod::parameterAt): (JSC::Bindings::JavaMethod::returnType): (JSC::Bindings::JavaMethod::isStatic): (JSC::Bindings::JavaMethod::numParameters): * bridge/jni/v8/JavaNPObjectV8.cpp: 2011-08-09 Andrey Kosyakov <caseq@chromium.org> Web Inspector: assertion failure in InspectorDOMStorageResource::bind when opening inspector https://bugs.webkit.org/show_bug.cgi?id=65912 Reviewed by Pavel Feldman. * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::didUseDOMStorage): 2011-08-09 Yury Semikhatsky <yurys@chromium.org> Web Inspector: get rid of InspectorInstrumentation::inspectorAgents() map https://bugs.webkit.org/show_bug.cgi?id=54678 Added two functions for retrieving InstrumentingAgents from Page and WorkerContext. Reviewed by Pavel Feldman. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): * inspector/InspectorController.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: * inspector/InstrumentingAgents.cpp: Copied from Source/WebCore/inspector/WorkerInspectorController.h. (WebCore::instrumentationForPage): (WebCore::instrumentationForWorkerContext): * inspector/InstrumentingAgents.h: * inspector/WorkerInspectorController.h: 2011-08-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Add "Refresh" to context menu of resources panel cookies view. https://bugs.webkit.org/show_bug.cgi?id=65854 Reviewed by Pavel Feldman. * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView): (WebInspector.CookieItemsView.prototype._updateWithCookies): (WebInspector.CookieItemsView.prototype._refreshButtonClicked): (WebInspector.CookieItemsView.prototype._contextMenu): * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype.get refreshCallback): (WebInspector.DataGrid.prototype.set refreshCallback): (WebInspector.DataGrid.prototype._contextMenuInDataTable): * inspector/front-end/ResourceCookiesView.js: (WebInspector.ResourceCookiesView.prototype._buildCookiesTable): 2011-08-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Resources panel does not show main resource cookies. https://bugs.webkit.org/show_bug.cgi?id=65770 Reviewed by Pavel Feldman. Test: http/tests/inspector/resource-main-cookies.php * inspector/InspectorPageAgent.cpp: (WebCore::allResourcesURLsForFrame): (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::deleteCookie): 2011-08-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92670. http://trac.webkit.org/changeset/92670 https://bugs.webkit.org/show_bug.cgi?id=65905 It broke 3 inspector tests (Requested by Ossy on #webkit). * inspector/InjectedScript.cpp: (WebCore::InjectedScript::getProperties): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.ondblclick): (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.getOwnProperties): (WebInspector.RemoteObject.prototype.getAllProperties): (WebInspector.RemoteObject.prototype._getProperties.remoteObjectBinder): (WebInspector.RemoteObject.prototype._getProperties): (WebInspector.RemoteObjectProperty): * inspector/front-end/inspector.css: (.section .properties .value.dimmed): 2011-08-09 Pavel Feldman <pfeldman@google.com> Web Inspector: there should be a way to tell what properties are non-enumerable when expanding objects. https://bugs.webkit.org/show_bug.cgi?id=65518 Reviewed by Yury Semikhatsky. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::getProperties): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.ondblclick): (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.getOwnProperties): (WebInspector.RemoteObject.prototype.getAllProperties): (WebInspector.RemoteObjectProperty): * inspector/front-end/inspector.css: (.section .properties .dimmed): 2011-08-08 Steve Block <steveblock@google.com> Removes V8's JavaInstanceJobject, JavaClassJobject and JavaFieldJobject. https://bugs.webkit.org/show_bug.cgi?id=57859 Reviewed by Alexey Proskuryakov. This effectively reverts the changes made in Bugs 55383, 57533 and 55766. These classes were only used by Android. In the future, Android will use the Chromium WebKit API to implement the Java bridge. Towards this goal, this patch ... - Simplfies the JavaInstance, JavaClass and JavaField interfaces for V8. These interfaces will be implemented in Chromium's WebKit layer. - Adds a JavaMethod interface for V8 - Removes the jvalue <-> JavaValue conversion functions for V8, which are now superfluous - Removes the calls to JavaInstance::begin()/end() for V8, which are now superfluous Will be covered by existing tests once the Chromium WebKit layer is complete. * WebCore.gypi: * bridge/jni/v8/JNIUtilityPrivate.cpp: * bridge/jni/v8/JNIUtilityPrivate.h: * bridge/jni/v8/JavaClassJobjectV8.cpp: Removed. * bridge/jni/v8/JavaFieldJobjectV8.cpp: Removed. * bridge/jni/v8/JavaFieldJobjectV8.h: Removed. * bridge/jni/v8/JavaFieldV8.h: * bridge/jni/v8/JavaInstanceJobjectV8.cpp: Removed. * bridge/jni/v8/JavaInstanceJobjectV8.h: Removed. * bridge/jni/v8/JavaInstanceV8.h: * bridge/jni/v8/JavaMethodV8.h: (JSC::Bindings::JavaMethod::~JavaMethod): * bridge/jni/v8/JavaNPObjectV8.cpp: (JSC::Bindings::JavaNPObjectHasMethod): (JSC::Bindings::JavaNPObjectInvoke): (JSC::Bindings::JavaNPObjectHasProperty): (JSC::Bindings::JavaNPObjectGetProperty): 2011-08-08 Chris Rogers <crogers@google.com> Fix thread-safety of AudioNode deletion https://bugs.webkit.org/show_bug.cgi?id=65888 Reviewed by Kenneth Russell No new tests - JavaScript API is not affected. * webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::constructCommon): (WebCore::AudioContext::~AudioContext): (WebCore::AudioContext::uninitialize): (WebCore::AudioContext::handlePostRenderTasks): (WebCore::AudioContext::scheduleNodeDeletion): (WebCore::AudioContext::deleteMarkedNodesDispatch): (WebCore::AudioContext::deleteMarkedNodes): * webaudio/AudioContext.h: 2011-08-08 Chris Marrin <cmarrin@apple.com> Fix build breakage caused by http://trac.webkit.org/changeset/92651 Unreviewed. * WebCore.exp.in: 2011-08-08 Chris Marrin <cmarrin@apple.com> Logic to compute visible display rect in GraphicsLayerCA::syncCompositingState https://bugs.webkit.org/show_bug.cgi?id=65708 Add logic to syncCompositingState to compute the visible rect for each layer. This can be used to synchronously render the visible tiles of a TiledLayer and avoid the flashing that often occurs when tiles are rendered asynchronously. A new synchronouslyDisplayTilesInRect is also added to do the actual rendering, but the call is not currently being made. Reviewed by Simon Fraser. * page/FrameView.cpp: (WebCore::FrameView::syncCompositingStateForThisFrame): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::syncCompositingState): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::syncCompositingState): (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::platformCALayerPaintContents): (WebCore::GraphicsLayerCA::updateSublayerList): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::synchronouslyDisplayTilesInRect): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::TransformState): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::flushPendingLayerChanges): 2011-08-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92619. http://trac.webkit.org/changeset/92619 https://bugs.webkit.org/show_bug.cgi?id=65881 This patch breaks chromium canary (Requested by jianli on #webkit). * bindings/v8/V8Binding.h: * bindings/v8/V8GCController.cpp: (WebCore::globalHandleMap): (WebCore::enumerateGlobalHandles): (WebCore::V8GCController::registerGlobalHandle): (WebCore::V8GCController::unregisterGlobalHandle): * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::V8HiddenPropertyName::createString): * bindings/v8/V8HiddenPropertyName.h: * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8NPObject.cpp: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::checkNewLegal): * bindings/v8/V8Utilities.h: (WebCore::AllowAllocation::AllowAllocation): (WebCore::AllowAllocation::~AllowAllocation): (WebCore::SafeAllocation::newInstance): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::initV8): * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::scheduleExecutionTermination): 2011-08-08 Scott Byer <scottbyer@chromium.org> Scroll animator changes to nail the framerate https://bugs.webkit.org/show_bug.cgi?id=65645 Reviewed by James Robinson. Partial test in ScrollAnimatorNoneTest::Enabled. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData): (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::PerAxisData::animateScroll): (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::~ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::scroll): (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorNone::animationTimerFired): (WebCore::ScrollAnimatorNone::stopAnimationTimerIfNeeded): * platform/ScrollAnimatorNone.h: 2011-08-08 Emil A Eklund <eae@chromium.org> Switch legacy flexbox to to new layout types https://bugs.webkit.org/show_bug.cgi?id=65340 Reviewed by Eric Seidel. No new tests, no new functionality. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::calcHorizontalPrefWidths): (WebCore::RenderDeprecatedFlexibleBox::calcVerticalPrefWidths): (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths): (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::placeChild): (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex): * rendering/RenderDeprecatedFlexibleBox.h: 2011-08-08 Emil A Eklund <eae@chromium.org> Switch RenderStyle to to new layout types https://bugs.webkit.org/show_bug.cgi?id=65208 Reviewed by Eric Seidel. No new tests, no new functionality. * rendering/RenderBox.cpp: (WebCore::RenderBox::addShadowOverflow): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::applyTransform): (WebCore::calcRadiiFor): (WebCore::RenderStyle::getRoundedBorderFor): (WebCore::RenderStyle::getRoundedInnerBorderFor): * rendering/style/RenderStyle.h: * rendering/style/ShadowData.cpp: (WebCore::ShadowData::adjustRectForShadow): 2011-08-08 Cris Neckar <cdn@chromium.org> Remove counter nodes from the tree and fix-up children when they are removed from the counter map. https://bugs.webkit.org/show_bug.cgi?id=65346 Reviewed by Adam Barth. Covered by existing CSS counter tests. * rendering/CounterNode.cpp: (WebCore::CounterNode::~CounterNode): 2011-08-08 Tony Chang <tony@chromium.org> implement basic horizontal flexing https://bugs.webkit.org/show_bug.cgi?id=65045 Reviewed by David Hyatt. Test: css3/flexbox/001.html * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::FlexibleBoxIterator::FlexibleBoxIterator): flexitem iterator (WebCore::RenderFlexibleBox::FlexibleBoxIterator::first): (WebCore::RenderFlexibleBox::FlexibleBoxIterator::next): (WebCore::RenderFlexibleBox::FlexibleBoxIterator::reset): (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::preferredFlexItemContentWidth): Returns the intrinsic size of a flex item's content. (WebCore::RenderFlexibleBox::layoutHorizontalBlock): Runs the flex algorithm (WebCore::preferredSizeForMarginsAndPadding): (WebCore::RenderFlexibleBox::computePreferredSize): Calculate the preferred size of the flex items. * rendering/RenderFlexibleBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/style/RenderStyleConstants.h: 2011-08-08 David Grogan <dgrogan@chromium.org> Add detail to ASSERT message in IDBTransaction::enqueueEvent https://bugs.webkit.org/show_bug.cgi?id=65735 I've hit this a few times but haven't been able to pin it down. The extra detail could be helpful. Reviewed by Nate Chapin. No new tests, just an error message. * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::enqueueEvent): 2011-08-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92610. http://trac.webkit.org/changeset/92610 https://bugs.webkit.org/show_bug.cgi?id=65868 Caused assertion failures when running fast/multicol tests (Requested by andersca on #webkit). * WebCore.xcodeproj/project.pbxproj: * platform/PODIntervalTree.h: (WebCore::PODIntervalTree::allOverlaps): (WebCore::PODIntervalTree::searchForOverlapsFrom): * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::add): (WebCore::PODRedBlackTree::remove): (WebCore::PODRedBlackTree::contains): (WebCore::PODRedBlackTree::visitInorder): (WebCore::PODRedBlackTree::size): (WebCore::PODRedBlackTree::checkInvariants): (WebCore::PODRedBlackTree::dump): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::removeFloatingObjectsBelow): (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::nextFloatLogicalBottomBelow): (WebCore::RenderBlock::lowestFloatLogicalBottom): (WebCore::RenderBlock::addPositionedFloats): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::hasOverhangingFloat): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::markSiblingsWithFloatsForLayout): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::adjustForBorderFit): (WebCore::RenderBlock::FloatingObjects::clear): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObject::FloatingObject): (WebCore::RenderBlock::FloatingObject::setX): (WebCore::RenderBlock::FloatingObject::setY): (WebCore::RenderBlock::FloatingObject::setWidth): (WebCore::RenderBlock::FloatingObject::setHeight): (WebCore::RenderBlock::FloatingObject::setFrameRect): (WebCore::RenderBlock::FloatingObjects::FloatingObjects): (WebCore::RenderBlock::FloatingObjects::set): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloatsInRange): (WebCore::RenderBlock::linkToEndLineIfNeeded): (WebCore::RenderBlock::matchedEndLine): (WebCore::RenderBlock::positionNewFloatOnLine): 2011-08-08 Emil A Eklund <eae@chromium.org> Rename absoluteQuadsForRange and InlineTextBox::selectionRect to local* https://bugs.webkit.org/show_bug.cgi?id=65722 Reviewed by Simon Fraser. No new tests, no new functionality. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::localSelectionRect): Rename InlineTextBox::selectionRect to localSelectionRect to reflect that it, unlike RenderObject::selectionRect returns a rect in the local coordinate space. * rendering/InlineTextBox.h: * rendering/RenderText.cpp: (WebCore::localQuadForTextBox): (WebCore::RenderText::absoluteRectsForRange): (WebCore::RenderText::absoluteQuadsForRange): (WebCore::RenderText::selectionRectForRepaint): Rename absoluteQuadForTextBox to localQuadForTextBox to reflect that it returns a quad in the local coordinate space. * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::localCaretRect): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::localSelectionRect): * rendering/svg/SVGInlineTextBox.h: 2011-08-08 Jochen Eisinger <jochen@chromium.org> Use a raw pointer to the security origin in the ctor of FrameLoadRequest https://bugs.webkit.org/show_bug.cgi?id=65852 Reviewed by Alexey Proskuryakov. * loader/FrameLoadRequest.h: (WebCore::FrameLoadRequest::FrameLoadRequest): * loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): * loader/FrameLoader.h: * loader/NavigationScheduler.cpp: (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): (WebCore::ScheduledURLNavigation::fire): (WebCore::ScheduledRedirect::ScheduledRedirect): (WebCore::ScheduledLocationChange::ScheduledLocationChange): (WebCore::ScheduledRefresh::ScheduledRefresh): (WebCore::NavigationScheduler::scheduleLocationChange): * loader/NavigationScheduler.h: 2011-08-08 Ryosuke Niwa <rniwa@webkit.org> Remove redundant inline styles from the pasted contents more aggressively https://bugs.webkit.org/show_bug.cgi?id=65833 Reviewed by Tony Chang. Make removeRedundantStylesAndKeepStyleSpanInline more aggressively remove redundant styles by realizing that when an editing inheritable property in an inline style declaration of an element can be safely removed if it is present either in style rules or in its ancestor and not overridden by style rules or default style of the element. Test: editing/pasteboard/paste-with-redundant-style.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Do not match author style sheets if AuthorCSSRules is not included in the rules to include. This is used in EditingStyle::removePropertiesInElementDefaultStyle. * editing/ApplyStyleCommand.cpp: (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute): Added; returns true if the element is a style span or span possibly with a style attribute. * editing/ApplyStyleCommand.h: * editing/EditingStyle.cpp: (WebCore::styleFromMatchedRulesForElement): Takes rulesToInclude. (WebCore::EditingStyle::mergeStyleFromRules): Calls styleFromMatchedRulesForElement with AuthorCSSRules | CrossOriginCSSRules to keep the original behavior. (WebCore::EditingStyle::removeStyleFromRulesAndContext): Renamed from removeStyleFromRules; removes styles that are present in context and not overridden by matched rules. (WebCore::EditingStyle::removePropertiesInElementDefaultStyle): Added. * editing/EditingStyle.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): See the description above. 2011-08-08 Dmitry Lomov <dslomov@google.com> https://bugs.webkit.org/show_bug.cgi?id=65778 [WebWorkers][chromium] Make statics thread-safe and make sure V8 API accesses correct isolates. Reviewed by David Levin. Covered by existing tests. * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::lazyEventListenerToStringTemplate): (WebCore::V8BindingPerIsolateData::hiddenPropertyName): (WebCore::V8BindingPerIsolateData::globalHandleMap): (WebCore::AllowAllocation::AllowAllocation): Moving to V8Binding.h from V8Utilities.h to resolve header dependency. (WebCore::AllowAllocation::~AllowAllocation): (WebCore::AllowAllocation::current): (WebCore::SafeAllocation::newInstance): * bindings/v8/V8GCController.cpp: (WebCore::currentGlobalHandleMap): (WebCore::enumerateGlobalHandles): (WebCore::V8GCController::registerGlobalHandle): (WebCore::V8GCController::unregisterGlobalHandle): * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::V8HiddenPropertyName::createString): * bindings/v8/V8HiddenPropertyName.h: * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8NPObject.cpp: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::checkNewLegal): * bindings/v8/V8Utilities.h: * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::initIsolate): * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::scheduleExecutionTermination): 2011-08-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92607. http://trac.webkit.org/changeset/92607 https://bugs.webkit.org/show_bug.cgi?id=65865 This patch breaks Chromium Mac Canary (Requested by jianli on #webkit). * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent): 2011-08-08 Andrew Wason <rectalogic@rectalogic.com> [Qt] Implement WebGL antialiasing (part 3) https://bugs.webkit.org/show_bug.cgi?id=64879 Reviewed by Noam Rosenthal. Existing WebGL layout tests cover this. Implement WebGL antialiasing for Qt desktop. Existing code in GraphicsContext3DOpenGL.cpp manages the multisample FBO. GraphicsContext3DQt.cpp creates it and blits it to the regular FBO when painting. Requires adoption of Extensions3DOpenGL to be fully functional. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::paintToTextureMapper): (WebCore::GraphicsContext3DInternal::paint): (WebCore::GraphicsContext3DInternal::multisampleResolve): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): 2011-08-08 Anders Carlsson <andersca@apple.com> Fix build. * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::Counter::visit): 2011-08-08 Alexandru Chiculita <achicu@adobe.com> Optimize floating elements lookup https://bugs.webkit.org/show_bug.cgi?id=65668 Added an interval tree in the FloatingObjects structure. Also added new mechanisms to make sure the tree is updated correctly when a float is repositioned. Changed the PODIntervalTree to support giving a search adapter that can be implemented by the client. I'm not adding a different bug for that because PODIntervalTree is not used anywhere else and would be hard to test that the change is not breaking anything. Reviewed by David Hyatt. No new tests, just a refactor on the floating objects data structure. * WebCore.xcodeproj/project.pbxproj: * platform/PODIntervalTree.h: (WebCore::PODIntervalSearchAdapter::PODIntervalSearchAdapter): (WebCore::PODIntervalSearchAdapter::lowValue): (WebCore::PODIntervalSearchAdapter::highValue): (WebCore::PODIntervalSearchAdapter::collectIfNeeded): (WebCore::PODIntervalTree::PODIntervalTree): (WebCore::PODIntervalTree::allOverlaps): (WebCore::PODIntervalTree::allOverlapsWithAdapter): (WebCore::PODIntervalTree::searchForOverlapsFrom): * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): (WebCore::PODRedBlackTree::clear): (WebCore::PODRedBlackTree::isInitialized): (WebCore::PODRedBlackTree::initIfNeeded): (WebCore::PODRedBlackTree::add): (WebCore::PODRedBlackTree::remove): (WebCore::PODRedBlackTree::contains): (WebCore::PODRedBlackTree::visitInorder): (WebCore::PODRedBlackTree::size): (WebCore::PODRedBlackTree::checkInvariants): (WebCore::PODRedBlackTree::dump): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::removeFloatingObjectsBelow): (WebCore::RenderBlock::positionNewFloats): (WebCore::::collectIfNeeded): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::nextFloatLogicalBottomBelow): (WebCore::RenderBlock::lowestFloatLogicalBottom): (WebCore::RenderBlock::addPositionedFloats): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::hasOverhangingFloat): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::markSiblingsWithFloatsForLayout): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::adjustForBorderFit): (WebCore::RenderBlock::FloatingObjects::clear): (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject): (WebCore::RenderBlock::FloatingObjects::addPlacedObject): (WebCore::RenderBlock::FloatingObjects::removePlacedObject): (WebCore::RenderBlock::FloatingObjects::add): (WebCore::RenderBlock::FloatingObjects::remove): (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree): (WebCore::::string): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObject::FloatingObject): (WebCore::RenderBlock::FloatingObject::setX): (WebCore::RenderBlock::FloatingObject::setY): (WebCore::RenderBlock::FloatingObject::setWidth): (WebCore::RenderBlock::FloatingObject::setHeight): (WebCore::RenderBlock::FloatingObject::setFrameRect): (WebCore::RenderBlock::FloatingObject::isInPlacedTree): (WebCore::RenderBlock::FloatingObject::setIsInPlacedTree): (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter): (WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue): (WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue): (WebCore::RenderBlock::FloatingObjects::FloatingObjects): (WebCore::RenderBlock::FloatingObjects::setHorizontalWritingMode): (WebCore::RenderBlock::FloatingObjects::set): (WebCore::RenderBlock::FloatingObjects::placedFloatsTree): (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTreeIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloatsInRange): (WebCore::RenderBlock::linkToEndLineIfNeeded): (WebCore::RenderBlock::matchedEndLine): (WebCore::RenderBlock::positionNewFloatOnLine): 2011-08-08 Alexei Svitkine <asvitkine@chromium.org> [Chromium] Enable rubber banding when scrolling. https://bugs.webkit.org/show_bug.cgi?id=65707 Reviewed by Dimitri Glazkov. No new tests since this is just syncing changes to chromium platform. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent): 2011-08-08 Dan Bernstein <mitz@apple.com> Build fix. * html/NumberInputType.cpp: (WebCore::NumberInputType::sizeShouldIncludeDecoration): Fixed an obvious typo. 2011-08-08 Andras Becsi <abecsi@webkit.org> [Qt] Clean up project file after r92492. Unreviewed gardening. No new tests needed. * WebCore.pro: remove nonexistent PluginHalterClient.h, PluginHalter.h, HaltablePlugin.h. 2011-08-08 Pavel Podivilov <podivilov@chromium.org> Web Inspector: refactor links creation. https://bugs.webkit.org/show_bug.cgi?id=65612 Reviewed by Pavel Feldman. No new tests - it is refactoring, modified code covered by script-formatter.html test. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._linkifyLocation): (WebInspector.ConsoleMessage.prototype._linkifyCallFrame): (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/Panel.js: * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.linkifyUncopyable): (WebInspector.StylePropertiesSection): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation): (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/inspector.js: (WebInspector._showSettingsScreen): (WebInspector.formatLinkText): (WebInspector.linkifyResourceAsNode): 2011-08-08 Andrew Wason <rectalogic@rectalogic.com> [Qt] Implement WebGL antialiasing (part 3) https://bugs.webkit.org/show_bug.cgi?id=64879 Reviewed by Noam Rosenthal. Existing WebGL layout tests. Adopt Extensions3DOpenGL for Qt desktop as a prerequisite for implementing WebGL antialiasing. Extensions3DQt is still used for ES2. * WebCore.pri: * WebCore.pro: * platform/graphics/GraphicsContext3D.h: * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::createVertexArrayOES): (WebCore::Extensions3DOpenGL::deleteVertexArrayOES): (WebCore::Extensions3DOpenGL::isVertexArrayOES): (WebCore::Extensions3DOpenGL::bindVertexArrayOES): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::layerComposited): 2011-08-08 Benjamin Poulain <benjamin@webkit.org> Build fix after r92589, defaultSize is not used. Reviewed by Andreas Kling. * html/InputType.cpp: (WebCore::InputType::sizeShouldIncludeDecoration): 2011-08-08 Keishi Hattori <keishi@webkit.org> Implement <input type=color> UI behavior WebCore part https://bugs.webkit.org/show_bug.cgi?id=62619 Reviewed by Kent Tamura. * WebCore.exp.in: Added __ZN7WebCore12ColorChooser7chooserEv and __ZNK7WebCore12ColorChooser13colorSelectedERKNS_5ColorE * WebCore.xcodeproj/project.pbxproj: Added ColorChooser.{h,cpp} * html/ColorInputType.cpp: (WebCore::ColorInputType::~ColorInputType): Added. Close color chooser. ex. when type attribute changes. (WebCore::ColorInputType::valueAsColor): Added. (WebCore::ColorInputType::setValueAsColor): Added. (WebCore::ColorInputType::valueChanged): Update selected color in color chooser too. (WebCore::ColorInputType::handleClickEvent): Opens color chooser. (WebCore::ColorInputType::handleDOMActivateEvent): Called when element.click(). Open color chooser only when it was initiated by a user interaction. (WebCore::ColorInputType::detach): Close color chooser. Called when input element or its ancestors have "display:none" or is removed from DOM. (WebCore::ColorInputType::colorSelected): Callback from color chooser. (WebCore::ColorInputType::isColorInputType): Returns true. (WebCore::ColorInputType::closeColorChooserIfCurrentClient): Close color chooser if this input type is the current client of ColorChooser. * html/ColorInputType.h: * html/FileInputType.cpp: * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::detach): Calls InputType::detach * html/InputType.cpp: (WebCore::InputType::chrome): Added. Used in FileInputType and ColorInputType. (WebCore::InputType::detach): ColorInputType overrides this. * html/InputType.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::openColorChooser): (WebCore::EmptyChromeClient::closeColorChooser): (WebCore::EmptyChromeClient::setSelectedColorInColorChooser): * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): Close color chooser when navigating away from the page. We do this here because ColorInputType::detach() is called seconds after the page transition so it is too slow. * page/Chrome.cpp: (WebCore::Chrome::openColorChooser): Added. (WebCore::Chrome::closeColorChooser): Added. (WebCore::Chrome::setSelectedColorInColorChooser): Added. * page/Chrome.h: * page/ChromeClient.h: * platform/ColorChooser.cpp: Added. (WebCore::ColorChooserClient::~ColorChooserClient): Disconnects itself from the ColorChooser. (WebCore::ColorChooser::chooser): Get shared instance of ColorChooser. (WebCore::ColorChooser::connectClient): Connects a ColorChooserClient that receives the colorSelected callbacks. (WebCore::ColorChooser::disconnectClient): Disconnects the connectClient. (WebCore::ColorChooser::colorSelected): Called from color chooser listener. * platform/ColorChooser.h: Added. (WebCore::ColorChooserClient::isColorInputType): Added. (WebCore::ColorChooser::client): Added. Returns the current connected client. (WebCore::ColorChooser::ColorChooser): Added. 2011-08-08 Shinya Kawanaka <shinyak@google.com> The input[type=number] element should be as wide as necessary to show the widest possible value. https://bugs.webkit.org/show_bug.cgi?id=60673 Reviewed by Kent Tamura. The size of input[type=number] is calculated from min/max/step attributes to show the widest possible value. If min or max attribute is absent, the default size is used. Also, if its css width is not auto, the width is used with priority. If min/max/attribute is set dynamically, the size of the input[type=number] will be recalculated. Test: fast/forms/input-number-size.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Added stepAttributeChanged handler. (WebCore::HTMLInputElement::sizeShouldIncludeDecoration): Returns true if a renderer should include decoration (e.g. inner spinbox). Also returns the preferred size of the input. * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::sizeShouldIncludeDecoration): Same as WebCore::HTMLInputElement::sizeShouldIncludeDecoration. (WebCore::InputType::stepAttributeChanged): Will be called When step attribute is changed. Sets a flag to recalculate layout. * html/InputType.h: * html/NumberInputType.cpp: (WebCore::lengthBeforeDecimalPoint): Calculates the width before the decimal point. (WebCore::NumberInputType::sizeShouldIncludeDecoration): Same as WebCore::HTMLInputElement::sizeShouldIncludeDecoration. However, this will calculate the preferred size from min/max/step attribute. (WebCore::NumberInputType::minOrMaxAttributeChanged): Sets a flag to recalculate layout. (WebCore::NumberInputType::stepAttributeChanged): ditto. * html/NumberInputType.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): Uses preferredSize instead of size. Also, adds innerSpinButtonElement size to width if sizeShouldIncludeDecoration returns true. 2011-08-08 Kenichi Ishibashi <bashi@chromium.org> Should not use C-style cast in CSSParser.cpp https://bugs.webkit.org/show_bug.cgi?id=65807 Remove C-style cast. Reviewed by Kent Tamura. No new tests because no behavior change. * css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationTimingFunction): Replaced a cast with clampToInteger(). (WebCore::CSSParser::parseFontFeatureTag): Ditto. (WebCore::CSSParser::createKeyframeRule): Replaced a cast with C++-style cast. 2011-08-05 Pavel Feldman <pfeldman@chromium.org> Web Inspector: implement dock/undock in WebKit2 without getting into WebCore. https://bugs.webkit.org/show_bug.cgi?id=65763 InspectorFrontendClient.h can't have synchronous canAttachWindow() returning value since in the multiprocess environment, you can't immediately get back to it from the host. r92384 introduced an unhealthy WebKit -> WebCore -> WebKit canAttach query where embedder was asking itself a question. This loop was fixed. Reviewed by Yury Semikhatsky. * WebCore.exp.in: * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: * inspector/front-end/inspector.js: (windowLoaded): 2011-07-28 Kent Tamura <tkent@chromium.org> [Chromium] Make form validation bubble fit with Chrome UI style https://bugs.webkit.org/show_bug.cgi?id=65359 Reviewed by Hajime Morita. Change the appearance of validation message bubble for Chromium. Basically it doesn't change for other ports. - Introduce a new element to put an icon, and enclose it and the message text by a flexible box. - Repesent the message text by two elements. One for the heading, another for the remaining. - Introduce themeChromium.css * WebCore.gyp/WebCore.gyp: Add themeChromium.css. * css/html.css: (::-webkit-validation-bubble-message): Make this a flexible box container. (::-webkit-validation-bubble-text-block): Takes flexibility. (::-webkit-validation-bubble-heading): Make the content bold because we removed <b></b>. * css/themeChromium.css: Added. (::-webkit-validation-bubble): (::-webkit-validation-bubble-message): (::-webkit-validation-bubble-arrow): (::-webkit-validation-bubble-arrow-clipper): (::-webkit-validation-bubble-icon): (::-webkit-validation-bubble-heading): (::-webkit-validation-bubble-body): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Sets the text into m_messageHeading and m_messageBody, instead of m_bubbleMessage. Use ASSERT_NO_EXCEPTION. (WebCore::ValidationMessage::buildBubbleTree): Build the new structure, and use ASSERT_NO_EXCEPTION. (WebCore::ValidationMessage::deleteBubbleTree): Clear m_messageHeading and m_messageBody. * html/ValidationMessage.h: * rendering/RenderThemeChromiumMac.h: Add extraDefaultStyleSheet(). * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::extraDefaultStyleSheet): Append themeChromium.css. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet): Append themeChromium.css. 2011-08-07 Keishi Hattori <keishi@webkit.org> Sort WebCore.xcodeproj Accomplished using sort-Xcode-project-file. * WebCore.xcodeproj/project.pbxproj: 2011-08-07 James Kozianski <koz@chromium.org> Make the fullscreen JS API enabled at runtime. https://bugs.webkit.org/show_bug.cgi?id=65501 Reviewed by Adam Barth. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled): (WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled): (WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled): (WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled): (WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled): (WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled): * dom/Document.idl: * dom/Element.idl: 2011-08-07 Martin Robinson <mrobinson@igalia.com> Distribution fix for GTK+. * GNUmakefile.am: Add some files to the distribution list. * GNUmakefile.list.am: Strip removed files from the source list. 2011-08-07 Jochen Eisinger <jochen@chromium.org> Move FrameLoadRequest to loader/ https://bugs.webkit.org/show_bug.cgi?id=65817 Reviewed by Alexey Proskuryakov. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/FrameLoadRequest.h: (WebCore::FrameLoadRequest::FrameLoadRequest): (WebCore::FrameLoadRequest::isEmpty): (WebCore::FrameLoadRequest::requester): (WebCore::FrameLoadRequest::resourceRequest): (WebCore::FrameLoadRequest::frameName): (WebCore::FrameLoadRequest::setFrameName): 2011-08-07 Sam White <samuel.white@rochester.edu> Add the ability to search the AccessibilityObject cache https://bugs.webkit.org/show_bug.cgi?id=64994 New AccessibilityObject cache search functionality and API for the mac platform to expose it. At this point the AccessibilityObject cache can be searched using one of the supported search keys that have been defined in AccessibilityObject.h, or by passing search text. Reviewed by Chris Fleizach. Test: platform/mac/accessibility/search-predicate.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch): (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch): (WebCore::AccessibilityObject::accessibilityObjectContainsText): (WebCore::AccessibilityObject::accessibleObjectsWithAccessibilitySearchPredicate): * accessibility/AccessibilityObject.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (createAccessibilitySearchKeyMap): (accessibilitySearchKeyForString): (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2011-08-06 Mark Rowe <mrowe@apple.com> Fix a memory leak found via code inspection. Rubber-stamped by Dan Bernstein. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeSelection): Adopt the newly-allocated WebHTMLConverter instance so that it does not leak. 2011-08-05 Darin Adler <darin@apple.com> Fix Timer heap implementation to work with more libraries (other versions of STL) https://bugs.webkit.org/show_bug.cgi?id=65782 Reviewed by Anders Carlsson. No behavior change, so no tests needed. Existing tests pass. * platform/Timer.cpp: Added TimerHeapPointer and TimerHeapReference class alongside the TimerHeapIterator class. Also added a swap function. Also added a TimerHeapLessThanFunction class. (WebCore::TimerBase::heapDecreaseKey): Pass pointers in to the TimerHeapIterator since that's how the class works now. Pass a TimerHeapLessThanFunction object instead of letting the library use the < operator directly. (WebCore::TimerBase::heapPopMin): Ditto. * platform/Timer.h: Updated for above changes. 2011-08-06 Aron Rosenberg <arosenberg@logitech.com> Reviewed by Benjamin Poulain. [Qt] Fix build with Intel compiler on Windows https://bugs.webkit.org/show_bug.cgi?id=65088 Intel compiler needs .lib suffixes instead of .a * WebCore.pri: 2011-08-06 Dan Bernstein <mitz@apple.com> Move the shared LineBreakIteratorPool from ThreadGlobalData into its own ThreadSpecific https://bugs.webkit.org/show_bug.cgi?id=65809 Reviewed by Darin Adler and Sam Weinig. * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::destroy): Removed code to clear the m_lineBreakIteratorPool member variable, which was removed. * platform/ThreadGlobalData.h: Removed lineBreakIteratorPool() and associated member variable. * platform/text/LineBreakIteratorPoolICU.h: (WebCore::LineBreakIteratorPool::sharedPool): Changed to return a thread-specific pool. 2011-08-06 Joseph Pecoraro <joepeck@webkit.org> Potential Leaks - RetainPtr<> over retaining Create'd objects https://bugs.webkit.org/show_bug.cgi?id=65806 Reviewed by Darin Adler. Fix a possible leak by adopting an allocation instead of retaining it. * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::NetworkStateNotifier): * plugins/mac/PluginPackageMac.cpp: (WebCore::stringListFromResourceId): (WebCore::PluginPackage::fetchInfo): 2011-08-06 Rafael Brandao <rafael.lobo@openbossa.org> REGRESSION (r91540): Favicons are not loaded https://bugs.webkit.org/show_bug.cgi?id=65692 Reviewed by Darin Adler. The policy that evaluates whether a page can have icon or not should not need to be reimplemented each time a new IconDatabaseBase is derived, so it was moved to WebCore's scope. * loader/icon/IconController.cpp: (WebCore::IconController::startLoader): * loader/icon/IconDatabase.cpp: * loader/icon/IconDatabase.h: * loader/icon/IconDatabaseBase.cpp: (WebCore::documentCanHaveIcon): * loader/icon/IconDatabaseBase.h: 2011-08-06 Kenichi Ishibashi <bashi@chromium.org> Should use C++-style cast in CSSParser.cpp https://bugs.webkit.org/show_bug.cgi?id=65807 Replaces C-style cast with C++style cast. Reviewed by Shinichiro Hamaji. No new tests because no behavior change. * css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationTimingFunction): (WebCore::CSSParser::parseFont): (WebCore::CSSParser::parseColorFromValue): (WebCore::CSSParser::parseFontFeatureTag): 2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Fix host <-> embedded document size negotiation race. The currently implemented solution relied on a specific order of paint/layout calls, which is broken. Consider rendering a document containing an object/iframe/embed referencing an external SVG file. When FrameView::layout() is called (associated with the outermost RenderView of the host document), it lays out the whole document, and afterwards performPostLayoutTasks() is called. This method then asks the Frames contentRenderer to update its widget positions. This triggers a call of the embedded documents FrameView::layout() method, which now lays out the embedded SVG documents tree through RenderSVGRoot::layout. And here's the bug: The size of the object/iframe replaced element, which hosts the embedded document may depend on the intrinsic size of the SVG. We tried to mark the embedded documents _ownerRenderer_ (the RenderPart) as "needs layout and pref width recalc" right from RenderSVGRoot::layout() and hoped that this would cause the whole document to be laid out again, now that the size of the embedded SVG document is known. As soon as the SVG document is laid out, the host document will be painted (flush deferred repaints) and an assertion ASSERTS(!needsLayout()) will be fired, as we modified the setNeedsLayout() state after the host document layout finished, right before painting. A proper fix is to only keep track in RenderSVGRoot whether it needs to negotiate the size with the host document, but not modify the layout state of the host document in any way. Let FrameView handle the size negotiation right in FrameView::layout(). Consider following document: <body><iframe src="some.svg"></body> After initial loading & parsing of the document, a FrameView exists for the main frame, and a sub-FrameView for the <iframe>. The external SVG document, may not be loaded yet at this point. That means when RenderIFrame::layout() tries to figure out its size (computeLogicalWidth/Height) - the RenderSVGRoot renderer of the external document hasn't been created yet (as the external document hasn't received data yet) - so it falls back to eg. 300x150 CSS default size (in the simplest case, where width/height are both auto). Suppose the external document now finished loading, the RenderSVGRoot is created and a global relayout is triggered starting from the main FrameView. As we already laid out the document once, needsLayout() is false for the main FrameView, so _only_ the child frame view that contains the RenderSVGRoot is now laid out, for the first time. After layout is done, the SVG document is fully laid out, though the RenderPart which embedded the SVG does NOT notice the SVG has been laid out, so it still carries the default 300x150 size (and needsLayout=false!). The fix is to retrigger layout of the parent frame view by marking the owner renderer of the frame view as "needs layout and pref widths recalc" and immediatiely performing a synchronous update of the layout. It's important to do it sync, as scripts depend on the result of the size negotiation (covered extensively with the new tests in svg/as-object). Reenable svg/zoom/page/zoom-svg-through-object* tests to see whether the flakiness is gone. Tests: svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/embedded-svg-immediate-offsetWidth-query.html svg/as-object/embedded-svg-size-changes-no-layout-triggers.html svg/as-object/embedded-svg-size-changes.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/nested-embedded-svg-size-changes.html svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml svg/zoom/page/zoom-svg-through-object-with-auto-size.html svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml svg/zoom/page/zoom-svg-through-object-with-override-size.html svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml * page/FrameView.cpp: (WebCore::FrameView::layout): Call forceLayoutParentViewIfNeeded() after layout finished. (WebCore::FrameView::forceLayoutParentViewIfNeeded): Added helper method. (WebCore::FrameView::embeddedContentBox): Moved from RenderPart to a more central place. * page/FrameView.h: * rendering/RenderPart.cpp: (WebCore::RenderPart::embeddedContentBox): Moved to FrameView. * rendering/svg/RenderSVGRoot.cpp: Rename m_didNegotiateSize to m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::RenderSVGRoot): (WebCore::RenderSVGRoot::layout): Only figure out if we need neggotiation, don't actually do anything, let FrameView handle this. * rendering/svg/RenderSVGRoot.h: Remove incorrect negotiateSizeWithHostDocumentIfNeeded() logic. (WebCore::RenderSVGRoot::needsSizeNegotiationWithHostDocument): Added getter for m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::scheduledSizeNegotiationWithHostDocument): Added safe way to clear m_needsSizeNegotiationWithHostDocument (asserts if it was false before). 2011-08-05 Noel Gordon <noel.gordon@gmail.com> [Chromium] Remove HaltablePlugin references from gyp project files https://bugs.webkit.org/show_bug.cgi?id=65808 HaltablePlugin and related classes were removed in r92492. Remove any reference to the deleted files from the gyp project files. Reviewed by Adam Barth. * WebCore.gypi: remove HaltablePlugin.h reference. 2011-08-05 Mark Rowe <mrowe@apple.com> Attempt to fix the build after r92538. Like all of the recent "track"-related work the new files in r92538 appear to have been added to completely random places in the Xcode project. However, this time the file paths were marked as being relative to their containing group resulting in Xcode being unable to find the files on disk. I've attempted to clean up all of the "track"-related mess in the Xcode project. The location of the files in the project now reflect their locations on disk, and are all correctly marked as being relative to their containing group as is our convention. * WebCore.xcodeproj/project.pbxproj: 2011-08-05 Tom Hudson <tomhudson@google.com> https://bugs.webkit.org/show_bug.cgi?id=64613 Use supported framebuffer renderbuffer mode; chromium command buffer allows DEPTH and STENCIL but not DEPTH_STENCIL. Reviewed by James Robinson. No new tests because was caught by extant tests, albeit only when accelerated drawing and forced compositing were both turned on. * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): 2011-08-05 Anna Cavender <annacc@chromium.org> Adding a WebVTTParser for <track>. https://bugs.webkit.org/show_bug.cgi?id=62882 Reviewed by Eric Carlson. Feature is hidden behind VIDEO_TRACK feature define, which is turned off, but new tests have been added in media/track/ (and are skipped). * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * html/TextTrackCue.cpp: * html/TextTrackCue.h: * platform/track/CueParser.cpp: * platform/track/CueParser.h: * platform/track/CueParserPrivate.h: * platform/track/WebVTTParser.cpp: Added. * platform/track/WebVTTParser.h: Added. 2011-08-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92330. http://trac.webkit.org/changeset/92330 https://bugs.webkit.org/show_bug.cgi?id=65804 caused various regressions in paste (Requested by rniwa on #webkit). * editing/ReplaceSelectionCommand.cpp: (WebCore::isInlineNodeWithStyle): (WebCore::ReplaceSelectionCommand::doApply): * editing/markup.cpp: (WebCore::ancestorToRetainStructureAndAppearance): * editing/markup.h: 2011-08-05 Kent Tamura <tkent@chromium.org> Unreviewed, rolling out r92477. http://trac.webkit.org/changeset/92477 https://bugs.webkit.org/show_bug.cgi?id=62619 Layering violation. We should not use WebCore/dom/ in WebCore/platform/. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * html/ColorInputType.cpp: (WebCore::ColorInputType::valueChanged): * html/ColorInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::chrome): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::detach): * html/InputType.cpp: * html/InputType.h: * loader/EmptyClients.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): * page/Chrome.cpp: * page/Chrome.h: * page/ChromeClient.h: * platform/ColorChooser.cpp: Removed. * platform/ColorChooser.h: Removed. 2011-08-05 Darin Adler <darin@apple.com> Try to fix Qt Mac build. * plugins/mac/PluginViewMac.mm: Removed PluginHalter functions. 2011-08-05 Joseph Pecoraro <joepeck@webkit.org> Leak in CFNetwork Loader RetainPtr<> should Adopt a Copy allocation https://bugs.webkit.org/show_bug.cgi?id=65789 Reviewed by David Kilzer. Fix a leak by adopting an allocation instead of retaining it. * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::httpBodyFromRequest): 2011-08-05 Ben Wells <benwells@chromium.org> Introduced fast path for border rendering when all visible sides are solid, same rgba color but not all visible https://bugs.webkit.org/show_bug.cgi?id=65762 Reviewed by Simon Fraser. No intended change in behaviour, no new tests. * rendering/RenderBoxModelObject.cpp: (WebCore::calculateSideRect): (WebCore::RenderBoxModelObject::paintBorderSides): (WebCore::RenderBoxModelObject::paintBorder): 2011-08-05 Kenichi Ishibashi <bashi@chromium.org> Unreviewed build fix on 32-bit Mac. * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFeatureTag): Added a cast to int. 2011-08-05 Ryosuke Niwa <rniwa@webkit.org> Upwards cursor movement incorrect when previous block ends with <br> https://bugs.webkit.org/show_bug.cgi?id=33247 Reviewed by Tony Chang. The bug was caused by previousLinePosition's trying to obtain the root line box at the position after the previous line's br. This obviously fails because the the position after br is considered as a part of the next line. Fixed the bug by obtaining root inline boxes using position at the minimum caret offset as supposed to maximum caret offset. The code was initially introduced by r32508 to fix arrow key movement in RTL text but the test added by the revision continues to pass after this change. Furthermore, this change makes new code consistent with nextLinePosition. Also reverted the change added by r55613 because it is no longer needed. Tests: editing/execCommand/move-selection-back-line-rtl.html editing/execCommand/move-selection-back-line-strict.html * editing/visible_units.cpp: (WebCore::previousLinePosition): 2011-08-05 James Robinson <jamesr@chromium.org> [chromium] Accelerated canvas breaks when moving canvases or resources between Pages https://bugs.webkit.org/show_bug.cgi?id=65402 Reviewed by Stephen White. Use one shared GraphicsContext3D for the whole process instead of one per Page as canvases can move between pages and directly draw into contexts in different pages. Also switches DrawingBufferChromium over to use a directly shared the color attachment instead of copying it to a separate texture and removes the now-unnecessary DrawingBuffer::didReset() call and WillPublishCallback mechanism. * page/Page.cpp: (WebCore::Page::sharedGraphicsContext3D): * page/Page.h: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::textureId): (WebCore::Canvas2DLayerChromium::setDrawingBuffer): * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::publishToPlatformLayer): * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-08-05 Anders Carlsson <andersca@apple.com> Fix Chromium build. * WebCore.gypi: 2011-08-05 Anders Carlsson <andersca@apple.com> Remove PluginHalter https://bugs.webkit.org/show_bug.cgi?id=65729 Reviewed by Darin Adler. Remove plug-in halter and associated classes. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.h: * page/HaltablePlugin.h: Removed. * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: * page/PluginHalter.cpp: Removed. * page/PluginHalter.h: Removed. * page/PluginHalterClient.h: Removed. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: * plugins/PluginView.cpp: (WebCore::PluginView::start): (WebCore::PluginView::stop): (WebCore::PluginView::PluginView): * plugins/PluginView.h: * plugins/PluginViewNone.cpp: * plugins/gtk/PluginViewGtk.cpp: * plugins/qt/PluginViewQt.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/RenderWidget.h: 2011-08-05 Jochen Eisinger <jochen@chromium.org> Introduce a new ResourceRequest::TargetType for XHRs https://bugs.webkit.org/show_bug.cgi?id=65544 Reviewed by Darin Fisher. * platform/network/chromium/ResourceRequest.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2011-08-05 Yael Aharon <yael.aharon@nokia.com> dir=auto needs to work on value of input and textarea elements https://bugs.webkit.org/show_bug.cgi?id=65428 Reviewed by Darin Adler. Changed the directionality algorithm to evaluate the value of input elements and textarea elements when they have the attribute dir-auto Set. Also skip these elements when evaluating the directionality of their ancestors. HTMLTextAreaElement::childrenChanged is not called when a user types into the textarea, so call calculateAndAdjustDirectionality() explicitly from HTMLTextAreaElement::subtreeHasChanged(). HTMLInputElement::childrenChanged is not called when a user types into the textarea, so call calculateAndAdjustDirectionality() explicitly from HTMLTextAreaElement::subtreeHasChanged(). Tests: fast/dom/HTMLElement/attr-dir-auto-changed-text-form-control.html fast/dom/HTMLElement/attr-dir-auto-text-form-control-child.html fast/dom/HTMLElement/attr-dir-auto-text-form-control.html * html/HTMLElement.cpp: (WebCore::HTMLElement::directionality): * html/HTMLElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::subtreeHasChanged): 2011-08-05 Keishi Hattori <keishi@webkit.org> Implement <input type=color> UI behavior WebCore part https://bugs.webkit.org/show_bug.cgi?id=62619 Reviewed by Kent Tamura. * WebCore.exp.in: Added __ZN7WebCore12ColorChooser7chooserEv and __ZNK7WebCore12ColorChooser13colorSelectedERKNS_5ColorE * WebCore.xcodeproj/project.pbxproj: Added ColorChooser.{h,cpp} * html/ColorInputType.cpp: (WebCore::ColorInputType::~ColorInputType): Added. Close color chooser. ex. when type attribute changes. (WebCore::ColorInputType::valueAsColor): Added. (WebCore::ColorInputType::setValueAsColor): Added. (WebCore::ColorInputType::valueChanged): Update selected color in color chooser too. (WebCore::ColorInputType::handleClickEvent): Opens color chooser. (WebCore::ColorInputType::handleDOMActivateEvent): Called when element.click(). Open color chooser only when it was initiated by a user interaction. (WebCore::ColorInputType::detach): Close color chooser. Called when input element or its ancestors have "display:none" or is removed from DOM. (WebCore::ColorInputType::colorSelected): Callback from color chooser. (WebCore::ColorInputType::closeColorChooserIfClientIsInDocument): Close color chooser if element is in document. Called when the page navigates away. (WebCore::ColorInputType::closeColorChooserIfCurrentClient): Close color chooser if this input type is the current client of ColorChooser. * html/ColorInputType.h: * html/FileInputType.cpp: * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::detach): Calls InputType::detach * html/InputType.cpp: (WebCore::InputType::chrome): Added. Used in FileInputType and ColorInputType. (WebCore::InputType::detach): ColorInputType overrides this. * html/InputType.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::openColorChooser): Added. (WebCore::EmptyChromeClient::closeColorChooser): Added. (WebCore::EmptyChromeClient::setSelectedColorInColorChooser): Added. * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): Close color chooser when navigating away from the page. * page/Chrome.cpp: (WebCore::Chrome::openColorChooser): Added. Opens the color chooser. (WebCore::Chrome::closeColorChooser): Added. Tries to close the color chooser. Might not close if the listener of the color chooser is another part of the browser or another render process. (WebCore::Chrome::setSelectedColorInColorChooser): Added. Sets the selected color in the color chooser. Again, might not be executed if the listener of the color chooser is another part of the browser or another render process. * page/Chrome.h: * page/ChromeClient.h: * platform/ColorChooser.cpp: Added. (WebCore::ColorChooserClient::~ColorChooserClient): Disconnects itself from the ColorChooser. (WebCore::ColorChooser::chooser): Get shared instance of ColorChooser. (WebCore::ColorChooser::chooser): Get shared instance of ColorChooser. (WebCore::ColorChooser::connectClient): Connects a ColorChooserClient that receives the colorSelected callbacks. (WebCore::ColorChooser::disconnectClient): Disconnects the connectClient. (WebCore::ColorChooser::closeColorChooserIfClientIsInDocument): Close the color chooser if the client is inside the document. (WebCore::ColorChooser::colorSelected): Called from color chooser listener. * platform/ColorChooser.h: Added. (WebCore::ColorChooser::client): Added. Returns the current connected client. (WebCore::ColorChooser::ColorChooser): Added. 2011-08-05 Yury Semikhatsky <yurys@chromium.org> Web Inspector: check that detaching frame has been attached before removing it from the console selector https://bugs.webkit.org/show_bug.cgi?id=65686 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptContextManager.js: (WebInspector.JavaScriptContextManager.prototype._frameDetached): 2011-08-05 Keishi Hattori <keishi@webkit.org> Sort WebCore.xcodeproj Accomplished using sort-Xcode-project-file. * WebCore.xcodeproj/project.pbxproj: 2011-08-05 Yury Semikhatsky <yurys@chromium.org> Web Inspector: constrain maximum depth for returnByValue objects https://bugs.webkit.org/show_bug.cgi?id=65761 Set maximum depth to 20 for objects returned by value as a result of evaluations. Reviewed by Pavel Feldman. * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): (WebCore::ScriptValue::toInspectorValue): * bindings/v8/ScriptValue.cpp: (WebCore::v8ToInspectorValue): (WebCore::ScriptValue::toInspectorValue): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::makeCall): * inspector/InspectorValues.h: 2011-08-05 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from appcache IDL files https://bugs.webkit.org/show_bug.cgi?id=65752 Reviewed by Adam Barth. No new tests, all existing tests pass. * loader/appcache/DOMApplicationCache.idl: 2011-08-04 Hans Wennborg <hans@chromium.org> IndexedDB: Stop using free-lists for database/object store/index ids. https://bugs.webkit.org/show_bug.cgi?id=65678 Reviewed by Tony Chang. Don't use free-lists for database/object store/index ids, just assign increasing numbers. It turns out that deleting an object store and creating a new one with the same id would cause the delete markers from the old object store to slow down lookups into the new one. Therefore we should generate a new id every time. Running out of ids (64 bits for databases and object stores, 32 bits for indices) is not realistic. Also make functions that generate new ids report errors, and make the callers of those functions check the return values. We must still delete free-lists when deleting an object store, and we must keep the code for encoding/decoding/comparison of free-list keys since users might have them in their databases. This is just a performance optimization, so no new tests. * storage/IDBLevelDBBackingStore.cpp: (WebCore::getNewDatabaseId): (WebCore::IDBLevelDBBackingStore::setIDBDatabaseMetaData): (WebCore::getNewObjectStoreId): (WebCore::IDBLevelDBBackingStore::createObjectStore): (WebCore::IDBLevelDBBackingStore::deleteObjectStore): (WebCore::getNewIndexId): (WebCore::IDBLevelDBBackingStore::createIndex): (WebCore::IDBLevelDBBackingStore::deleteIndex): 2011-08-05 Roland Steiner <rolandsteiner@chromium.org> Unreviewed: change an instance of isImportRule() that was overlooked in commit 92448. No new tests. (No functional change) * xml/XSLImportRule.h: (WebCore::XSLImportRule::isImportRule): 2011-08-05 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from remaining SVG IDL files https://bugs.webkit.org/show_bug.cgi?id=65751 Reviewed by Adam Barth. No new tests, all existing tests pass. * svg/SVGElementInstance.idl: 2011-08-05 Pavel Feldman <pfeldman@google.com> Web Inspector: do not delay scroll event handling - scroll is already async. https://bugs.webkit.org/show_bug.cgi?id=65693 Reviewed by Yury Semikhatsky. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._syncScroll): 2011-08-05 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from web audio API https://bugs.webkit.org/show_bug.cgi?id=65750 Reviewed by Adam Barth. No new tests, all existing tests pass. * webaudio/AudioBufferSourceNode.idl: 2011-08-05 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from Web Workers https://bugs.webkit.org/show_bug.cgi?id=65746 Reviewed by Adam Barth. No new tests, all existing tests pass. * workers/AbstractWorker.idl: * workers/DedicatedWorkerContext.idl: * workers/Worker.idl: * workers/WorkerContext.idl: 2011-08-05 Kenichi Ishibashi <bashi@chromium.org> Parsing CSS3 font-feature-settings property https://bugs.webkit.org/show_bug.cgi?id=63618 Introduces CSS3 font-feature-settings property as -webkit-font-feature-settings. This change only contains parsing part. Parsed information are stored in FontDescription class. Reviewed by Shinichiro Hamaji. Test: css3/font-feature-settings-parsing.html * CMakeLists.txt: Added FontFeatureValue.{h,cpp} and FontFeatureSettings.{h,cpp}. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added CSSPropertyWebkitFontFeatureSettings. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Added parsing code for -webkit-font-feature-settings. (WebCore::CSSParser::parseFontFeatureTag): Added. (WebCore::CSSParser::parseFontFeatureSettings): Added. * css/CSSParser.h: Added parseFontFeatureSettings(). * css/CSSPropertyNames.in: Added -webkit-font-feature-settings. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyDeclarations): Modified a compile assert to follow adding -webkit-font-feature-settings. (WebCore::CSSStyleSelector::applyProperty): Added a case clause for CSSPropertyWebkitFontFeatureSettings. * css/CSSValue.h: (WebCore::CSSValue::isFontFeatureValue): Added. * css/CSSValueKeywords.in: Added 'on' and 'off' keywords. * css/FontFeatureValue.cpp: Added. (WebCore::FontFeatureValue::FontFeatureValue): (WebCore::FontFeatureValue::value): (WebCore::FontFeatureValue::cssText): * css/FontFeatureValue.h: Added. (WebCore::FontFeatureValue::create): (WebCore::FontFeatureValue::tag): (WebCore::FontFeatureValue::isFontFeatureValue): * platform/graphics/FontDescription.cpp: (WebCore::FontDescription::makeNormalFeatureSettings): Added. * platform/graphics/FontDescription.h: (WebCore::FontDescription::FontDescription): Added m_featureSettings member variable. (WebCore::FontDescription::featureSettings): Added. (WebCore::FontDescription::setFeatureSettings): Added. (WebCore::FontDescription::operator==): Modified to take into account m_featureSettings * platform/graphics/FontFeatureSettings.cpp: Added. (WebCore::FontFeature::FontFeature): (WebCore::FontFeature::operator=): (WebCore::FontFeature::operator==): (WebCore::FontFeatureSettings::FontFeatureSettings): * platform/graphics/FontFeatureSettings.h: Added. (WebCore::FontFeature::tag): (WebCore::FontFeature::value): (WebCore::FontFeatureSettings::create): (WebCore::FontFeatureSettings::append): (WebCore::FontFeatureSettings::size): (WebCore::FontFeatureSettings::operator[]): (WebCore::FontFeatureSettings::at): 2011-08-05 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from websockets https://bugs.webkit.org/show_bug.cgi?id=65749 Reviewed by Adam Barth. No new tests, all existing tests pass. * websockets/WebSocket.idl: 2011-08-05 Adam Barth <abarth@webkit.org> Attempt to heal media/video-can-play-type.html and media/video-src-change.html. * html/HTMLMediaElement.idl: 2011-08-05 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from notifications IDL files https://bugs.webkit.org/show_bug.cgi?id=65747 Reviewed by Adam Barth. No new tests, all existing tests pass. * notifications/Notification.idl: * notifications/NotificationCenter.idl: 2011-08-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92439. http://trac.webkit.org/changeset/92439 https://bugs.webkit.org/show_bug.cgi?id=65753 Caused 9 tests to fail on Qt (Requested by abarth on #webkit). * dom/Document.cpp: (WebCore::Document::implicitOpen): * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): (WebCore::FrameLoader::detachChildren): 2011-08-04 Ryosuke Niwa <rniwa@webkit.org> Use RenderedPosition instead of getInlineBoxAndOffset in Editor and AccessibilityObject https://bugs.webkit.org/show_bug.cgi?id=65647 Reviewed by Hajime Morita. Encapsulated the use of getInlineBoxAndOffset in Editor.cpp and AccessibilityObject.cpp by RenderedPosition. Also added rendererFromPosition that returns the renderer of deprecatedNode but using a proper Position interface. * accessibility/AccessibilityObject.cpp: (WebCore::updateAXLineStartForVisiblePosition): * editing/Editor.cpp: (WebCore::Editor::firstRectForRange): * editing/RenderedPosition.cpp: (WebCore::rendererFromPosition): (WebCore::RenderedPosition::RenderedPosition): (WebCore::RenderedPosition::absoluteRect): * editing/RenderedPosition.h: (WebCore::RenderedPosition::absoluteRect): 2011-08-04 Hayato Ito <hayato@chromium.org> Make ScopedEventQueue enqueue an EventDispatchMediator, instead of an Event. https://bugs.webkit.org/show_bug.cgi?id=65613 Reviewed by Dimitri Glazkov. No changes to functionality so no new tests. * dom/Event.h: * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchScopedEvent): * dom/EventDispatcher.h: * dom/Node.cpp: (WebCore::Node::dispatchScopedEvent): (WebCore::Node::dispatchScopedEventDispatchMediator): * dom/Node.h: * dom/ScopedEventQueue.cpp: (WebCore::ScopedEventQueue::~ScopedEventQueue): (WebCore::ScopedEventQueue::enqueueEventDispatchMediator): (WebCore::ScopedEventQueue::dispatchAllEvents): (WebCore::ScopedEventQueue::dispatchEvent): * dom/ScopedEventQueue.h: 2011-08-04 James Robinson <jamesr@chromium.org> Unreviewed build fix. gcc 4.5 can't figure out that the 'data' variables are always initialized in these functions. * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::jsArrayToFloatArray): (WebCore::jsArrayToIntArray): 2011-08-05 Roland Steiner <rolandsteiner@chromium.org> Improve const-correctness in CSS code: type information methods https://bugs.webkit.org/show_bug.cgi?id=65506 Reviewed by Simon Fraser. Make "is...()" functions (e.g., "isStyleRule()") const. Also, change CSSRule's type() function to return CSSRuleType. No new tests. (no change in semantics) * css/CSSCharsetRule.h: (WebCore::CSSCharsetRule::isCharsetRule): (WebCore::CSSCharsetRule::type): * css/CSSFontFaceRule.h: (WebCore::CSSFontFaceRule::isFontFaceRule): (WebCore::CSSFontFaceRule::type): * css/CSSImportRule.h: (WebCore::CSSImportRule::isImportRule): (WebCore::CSSImportRule::type): * css/CSSMediaRule.h: (WebCore::CSSMediaRule::isMediaRule): (WebCore::CSSMediaRule::type): * css/CSSPageRule.h: (WebCore::CSSPageRule::isPageRule): (WebCore::CSSPageRule::type): * css/CSSRule.h: (WebCore::CSSRule::isRule): * css/CSSStyleRule.h: (WebCore::CSSStyleRule::isStyleRule): (WebCore::CSSStyleRule::type): * css/CSSUnknownRule.h: (WebCore::CSSUnknownRule::type): * css/StyleBase.h: (WebCore::StyleBase::isCharsetRule): (WebCore::StyleBase::isFontFaceRule): (WebCore::StyleBase::isImportRule): (WebCore::StyleBase::isKeyframeRule): (WebCore::StyleBase::isKeyframesRule): (WebCore::StyleBase::isMediaRule): (WebCore::StyleBase::isPageRule): (WebCore::StyleBase::isRule): (WebCore::StyleBase::isStyleRule): * css/WebKitCSSKeyframeRule.h: (WebCore::WebKitCSSKeyframeRule::isKeyframeRule): (WebCore::WebKitCSSKeyframeRule::type): * css/WebKitCSSKeyframesRule.h: (WebCore::WebKitCSSKeyframesRule::isKeyframesRule): (WebCore::WebKitCSSKeyframesRule::type): 2011-08-04 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from plugin IDL files https://bugs.webkit.org/show_bug.cgi?id=65745 Reviewed by Adam Barth. No new tests, all existing tests pass. * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: 2011-08-04 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from XML/XSL IDL files https://bugs.webkit.org/show_bug.cgi?id=65740 Reviewed by Adam Barth. No new tests, all existing tests pass. * xml/DOMParser.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathExpression.idl: * xml/XPathNSResolver.idl: * xml/XPathResult.idl: * xml/XSLTProcessor.idl: 2011-08-04 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from canvas IDL files https://bugs.webkit.org/show_bug.cgi?id=65737 Reviewed by Adam Barth. No new tests, all existing tests pass. * html/canvas/CanvasGradient.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: 2011-08-04 MORITA Hajime <morrita@google.com> Reviewed by Ryosuke Niwa. DocumentMarker: Type specific details should be separately held by other object. https://bugs.webkit.org/show_bug.cgi?id=59855 - Introduced DocumentMarkerDetails abstract class and two its subclasses DocumentMarkerDescription and DocumentMarkerActiveMatch, - Replacing DocumentMarker::m_description and DocumentMarker::m_activeMatch with these new details classes. No new tests. No behavior change. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/DocumentMarker.cpp: Added. (WebCore::emptyDescription): (WebCore::DocumentMarkerDetails::DocumentMarkerDetails): (WebCore::DocumentMarkerDetails::~DocumentMarkerDetails): (WebCore::DocumentMarkerDescription::description): (WebCore::DocumentMarkerDescription::isDescription): (WebCore::DocumentMarkerDescription::DocumentMarkerDescription): (WebCore::DocumentMarkerDescription::createUnlessEmpty): (WebCore::DocumentMarkerDescription::compatibleTypes): (WebCore::DocumentMarkerTextMatch::activeMatch): (WebCore::DocumentMarkerTextMatch::isTextMatch): (WebCore::DocumentMarkerTextMatch::DocumentMarkerTextMatch): (WebCore::DocumentMarkerTextMatch::instanceFor): (WebCore::DocumentMarkerTextMatch::compatibleTypes): (WebCore::DocumentMarker::DocumentMarker): (WebCore::DocumentMarker::shiftOffsets): (WebCore::DocumentMarker::setActiveMatch): (WebCore::DocumentMarker::description): (WebCore::DocumentMarker::activeMatch): * dom/DocumentMarker.h: (WebCore::DocumentMarker::details): (WebCore::DocumentMarker::clearDetails): (WebCore::DocumentMarkerDetails::isDescription): (WebCore::DocumentMarkerDetails::isTextMatch): (WebCore::DocumentMarkerDetails::isAllowedFor): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers): 2011-08-04 Scott Graham <scottmg@chromium.org> Bad interaction between document destruction and unload events https://bugs.webkit.org/show_bug.cgi?id=64741 Reviewed by Adam Barth. Three different errors triggered by this test case. The case to consider is a subdocument with an onunload on an element, that destroys the parent document during the onunload. One fix was a lifetime issue fixed by a protecting RefPtr, and another was an additional cancel of event triggers. The main fix was that during the transition to commited state, the documentLoader is being replaced by the provisionalDocumentLoader. But, because during firing events in the subdocument the parent is destroyed, that subevent caused the provisionalDocumentLoader to be detached from its frame. By marking the page as being in committed state before the parent documentLoader is set, this is avoided. Test: loader/document-destruction-within-unload.html * dom/Document.cpp: (WebCore::Document::implicitOpen): * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): (WebCore::FrameLoader::detachChildren): 2011-08-04 Simon Fraser <simon.fraser@apple.com> Add code to determine whether a Range in inside fixed position content https://bugs.webkit.org/show_bug.cgi?id=65720 Reviewed by Sam Weinig. Propagate the 'wasFixed' flag out from various methods that are used when computing the collection of rects or quads for a range. Use the flag in Range to computer whether the Range is entirely within, partially within, or outside of fixed-position content. * WebCore.exp.in: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): * dom/Range.cpp: (WebCore::Range::textRects): (WebCore::Range::textQuads): * dom/Range.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteQuads): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteQuads): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteQuads): * rendering/RenderInline.h: * rendering/RenderObject.h: (WebCore::RenderObject::absoluteQuads): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRectsForRange): (WebCore::RenderText::absoluteQuads): (WebCore::RenderText::absoluteQuadsForRange): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::absoluteQuads): * rendering/RenderView.h: * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::absoluteQuads): * rendering/svg/RenderSVGHiddenContainer.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::absoluteQuads): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteQuads): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::absoluteQuads): * rendering/svg/RenderSVGText.h: 2011-08-04 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from Document.idl https://bugs.webkit.org/show_bug.cgi?id=65717 Reviewed by Adam Barth. No new tests, all existing tests pass. * dom/Document.idl: 2011-08-04 Simon Fraser <simon.fraser@apple.com> Fix release build failure with last commit. * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): 2011-08-04 Simon Fraser <simon.fraser@apple.com> Add code to determine whether a Range in inside fixed position content https://bugs.webkit.org/show_bug.cgi?id=65720 Reviewed by Dan Bernstein. Add an out param for various coordinate mapping functions that tells us whether the point or rectangle being mapped is inside fixed-position content. This brings back some of the changes from r89754. No behavior changes, so no tests. * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): (WebCore::RenderObject::localToContainerQuad): * rendering/RenderObject.h: (WebCore::RenderObject::localToAbsoluteQuad): * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): * rendering/RenderView.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): * rendering/svg/RenderSVGText.h: * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): * rendering/svg/SVGRenderSupport.h: 2011-08-04 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from DOM-related files except Document.idl https://bugs.webkit.org/show_bug.cgi?id=65715 Reviewed by Adam Barth. No new tests, all existing tests pass. * dom/CharacterData.idl: * dom/ClientRectList.idl: * dom/Clipboard.idl: * dom/DOMImplementation.idl: * dom/DOMStringList.idl: * dom/DataTransferItem.idl: * dom/DataTransferItems.idl: * dom/DocumentFragment.idl: * dom/Element.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/MediaStream.idl: * dom/MediaStreamList.idl: * dom/MediaStreamTrackList.idl: * dom/MessagePort.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeList.idl: * dom/Range.idl: * dom/RequestAnimationFrameCallback.idl: * dom/StringCallback.idl: * dom/Text.idl: * dom/TouchList.idl: 2011-08-04 Mark Rowe <mrowe@apple.com> Future-proof Xcode configuration settings. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebCore.xcconfig: 2011-08-04 Van Lam <vanlam@google.com> A few purely stylistic modifications to visible_units.cpp https://bugs.webkit.org/show_bug.cgi?id=65723 Reviewed by Ryosuke Niwa. Renamed greatestValueUnder to greatestOffsetUnder, positionIsInsideBox to positionIsInBoxButNotOnBoundary (to avoid confusion with positionIsInBox, which is just a getInlineBoxAndOffset check). Removed use of invalidOffset as an error value in greatestOffsetUnder and smallestOffsetAbove since semantically it should only be used to check if it makes sense to compare offsets in a single box. * editing/visible_units.cpp: (WebCore::greatestOffsetUnder): (WebCore::smallestOffsetAbove): (WebCore::positionIsInBoxButNotOnBoundary): (WebCore::leftWordPositionAcrossBoundary): (WebCore::rightWordPositionAcrossBoundary): 2011-08-04 James Robinson <jamesr@chromium.org> [chromium] Implement a global resource limit for DrawingBuffer to limit the amount of GPU memory used by 2d canvas backing stores https://bugs.webkit.org/show_bug.cgi?id=65655 Reviewed by Kenneth Russell. * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::setResourceLimit): (WebCore::DrawingBuffer::clear): (WebCore::DrawingBuffer::reset): * platform/graphics/gpu/DrawingBuffer.h: 2011-08-04 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Reduce memory consumption of HarfbuzzFace https://bugs.webkit.org/show_bug.cgi?id=65688 Adds a cache for HB_FaceRec to eliminate multiple allocation for the same font. Reviewed by Tony Chang. No new tests since there is no behavior change. * platform/graphics/chromium/HarfbuzzSkia.cpp: (WebCore::getCachedHarfbuzzFace): Added. (WebCore::releaseCachedHarfbuzzFace): Ditto. (WebCore::HarfbuzzFace::HarfbuzzFace): Calls getCachedHarfbuzzFace() instead of allocating HB_FaceRec. (WebCore::HarfbuzzFace::~HarfbuzzFace): Calls releaseCachedHarfbuzzFace() to release the onership of the cache. * platform/graphics/chromium/HarfbuzzSkia.h: 2011-08-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92415. http://trac.webkit.org/changeset/92415 https://bugs.webkit.org/show_bug.cgi?id=65728 Causes many DEBUG crashes (Requested by abarth on #webkit). * platform/network/chromium/ResourceRequest.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2011-08-04 Tim Horton <timothy_horton@apple.com> Reviewed by Nikolas Zimmerman. Errors encountered within SVG documents should be reported to the console https://bugs.webkit.org/show_bug.cgi?id=62599 <rdar://problem/9727074> Make use of SVGLength::construct when parsing Length attributes; we will now propagate errors which occur while parsing SVGLength attributes to the Web Inspector console. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::parseMappedAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::parseMappedAttribute): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::parseMappedAttribute): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::parseMappedAttribute): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::parseMappedAttribute): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::parseMappedAttribute): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseMappedAttribute): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::parseMappedAttribute): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::parseMappedAttribute): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::parseMappedAttribute): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::parseMappedAttribute): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::parseMappedAttribute): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::parseMappedAttribute): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::parseMappedAttribute): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseMappedAttribute): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::parseMappedAttribute): 2011-08-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92419. http://trac.webkit.org/changeset/92419 https://bugs.webkit.org/show_bug.cgi?id=65726 "committed partially to branch" (Requested by thorton on #webkit). * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::parseMappedAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::parseMappedAttribute): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::parseMappedAttribute): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::parseMappedAttribute): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::parseMappedAttribute): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::parseMappedAttribute): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseMappedAttribute): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::parseMappedAttribute): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::parseMappedAttribute): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::parseMappedAttribute): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::parseMappedAttribute): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::parseMappedAttribute): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::parseMappedAttribute): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::parseMappedAttribute): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseMappedAttribute): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::parseMappedAttribute): 2011-08-04 Fady Samuel <fsamuel@chromium.org> Background Does Not Scale Correctly with Page https://bugs.webkit.org/show_bug.cgi?id=65690 Reviewed by Simon Fraser. Test: fast/repaint/background-scaling.html * rendering/RenderBox.cpp: (WebCore::RenderBox::paintRootBoxFillLayers): * rendering/RenderView.cpp: (WebCore::RenderView::unscaledDocumentRect): (WebCore::RenderView::documentRect): * rendering/RenderView.h: 2011-08-04 Jochen Eisinger <jochen@chromium.org> Introduce a new ResourceRequest::TargetType for XHRs https://bugs.webkit.org/show_bug.cgi?id=65544 Reviewed by Darin Fisher. * platform/network/chromium/ResourceRequest.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2011-08-04 Sergey Glazunov <serg.glazunov@gmail.com> Fix integer overflow in custom bindings for WebGLRenderingContext https://bugs.webkit.org/show_bug.cgi?id=65646 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/uniform-array-length-overflow.html * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toVector): Don't crash if allocation fails. * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::jsArrayToFloatArray): (WebCore::jsArrayToIntArray): 2011-08-04 Pratik Solanki <psolanki@apple.com> Implement CERTIFICATE_CREDENTIALS_SUPPORTED for CFNetwork https://bugs.webkit.org/show_bug.cgi?id=65704 <rdar://problem/9877734> Reviewed by Oliver Hunt. Implement support for client side certificate authentication in the CFNetwork based loader. * platform/network/cf/AuthenticationCF.cpp: (WebCore::createCF): (WebCore::core): Also fix leak of password string. 2011-08-04 Chris Rogers <crogers@google.com> Make sure that AudioArray is 16-byte aligned https://bugs.webkit.org/show_bug.cgi?id=65651 Reviewed by Kenneth Russell. No new tests - this does not change JavaScript API. * platform/audio/AudioArray.h: (WebCore::AudioArray::AudioArray): (WebCore::AudioArray::~AudioArray): (WebCore::AudioArray::allocate): (WebCore::AudioArray::data): (WebCore::AudioArray::size): (WebCore::AudioArray::at): (WebCore::AudioArray::operator[]): (WebCore::AudioArray::alignedAddress): * platform/audio/Biquad.cpp: (WebCore::Biquad::Biquad): * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): * webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::DelayDSPKernel): * webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::setFftSize): 2011-08-04 Brady Eidson <beidson@apple.com> <rdar://problem/9882581>, <rdar://problem/9868015>, and https://bugs.webkit.org/show_bug.cgi?id=65712 REGRESSION (91931) - Two LocalStorage threads started, thread unsafe operations can cause crash or other problems later. Reviewed by Darin Adler. * storage/StorageTracker.cpp: (WebCore::StorageTracker::internalInitialize): Set the "needs initialization" flag before doing a whole bunch of stuff that might need to check it. 2011-08-04 Jeff Miller <jeffm@apple.com> Adopt AVCF media back end on Windows https://bugs.webkit.org/show_bug.cgi?id=65400 <rdar://problem/9894105> First cut at implementation in MediaPlayerPrivateAVFoundationCF.cpp/.h, based on work by Eric Carlson. Note that use of AVFoundation is determined at runtime, and defaults to off. Reviewed by Darin Adler. No new tests, uses existing media tests. * config.h: Turn on WTF_USE_AVFOUNDATION on Windows if AVFoundationCF is available. * platform/graphics/MediaPlayer.cpp: (WebCore::installedMediaEngines): Register MediaPlayerPrivateAVFoundationCF on Windows. * platform/graphics/MediaPlayer.h: Add support for an AVCFPlayer. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Workaround an AVCF limitation that prevents an AVCFPlayer from being created without an AVCFItem. (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Added support for ContentsNeedsDisplay notification. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::contentsNeedsDisplay): Added support for ContentsNeedsDisplay notification. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Added implementation. (WebCore::AVFWrapper::caVideoLayer): (WebCore::AVFWrapper::videoLayerWrapper): (WebCore::AVFWrapper::videoLayer): (WebCore::AVFWrapper::avPlayer): (WebCore::AVFWrapper::avAsset): (WebCore::AVFWrapper::avPlayerItem): (WebCore::AVFWrapper::timeObserver): (WebCore::AVFWrapper::imageGenerator): (WebCore::AVFWrapper::dispatchQueue): (WebCore::LayerClient::LayerClient): (WebCore::LayerClient::~LayerClient): (WebCore::LayerClient::platformCALayerRespondsToLayoutChanges): (WebCore::LayerClient::platformCALayerAnimationStarted): (WebCore::LayerClient::platformCALayerContentsOrientation): (WebCore::LayerClient::platformCALayerPaintContents): (WebCore::LayerClient::platformCALayerShowDebugBorders): (WebCore::LayerClient::platformCALayerShowRepaintCounter): (WebCore::LayerClient::platformCALayerIncrementRepaintCount): (WebCore::LayerClient::platformCALayerContentsOpaque): (WebCore::LayerClient::platformCALayerDrawsContent): (WebCore::LayerClient::platformCALayerLayerDidDisplay): (WebCore::boolString): (WebCore::metadataKeyNames): (WebCore::CMTimeRangeStartKey): (WebCore::CMTimeRangeDurationKey): (WebCore::CACFContextNeedsFlushNotification): (WebCore::videoLayer): (WebCore::avPlayer): (WebCore::avAsset): (WebCore::avPlayerItem): (WebCore::imageGenerator): (WebCore::MediaPlayerPrivateAVFoundationCF::create): (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationCF::MediaPlayerPrivateAVFoundationCF): (WebCore::MediaPlayerPrivateAVFoundationCF::~MediaPlayerPrivateAVFoundationCF): (WebCore::MediaPlayerPrivateAVFoundationCF::cancelLoad): (WebCore::MediaPlayerPrivateAVFoundationCF::hasLayerRenderer): (WebCore::MediaPlayerPrivateAVFoundationCF::hasContextRenderer): (WebCore::MediaPlayerPrivateAVFoundationCF::createContextVideoRenderer): (WebCore::MediaPlayerPrivateAVFoundationCF::destroyContextVideoRenderer): (WebCore::MediaPlayerPrivateAVFoundationCF::createVideoLayer): (WebCore::MediaPlayerPrivateAVFoundationCF::destroyVideoLayer): (WebCore::MediaPlayerPrivateAVFoundationCF::hasAvailableVideoFrame): (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayerItem): (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): (WebCore::MediaPlayerPrivateAVFoundationCF::checkPlayability): (WebCore::MediaPlayerPrivateAVFoundationCF::beginLoadingMetadata): (WebCore::MediaPlayerPrivateAVFoundationCF::playerItemStatus): (WebCore::MediaPlayerPrivateAVFoundationCF::platformMedia): (WebCore::MediaPlayerPrivateAVFoundationCF::platformLayer): (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible): (WebCore::MediaPlayerPrivateAVFoundationCF::platformPlay): (WebCore::MediaPlayerPrivateAVFoundationCF::platformPause): (WebCore::MediaPlayerPrivateAVFoundationCF::updateRate): (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime): (WebCore::MediaPlayerPrivateAVFoundationCF::setVolume): (WebCore::MediaPlayerPrivateAVFoundationCF::setClosedCaptionsVisible): (WebCore::MediaPlayerPrivateAVFoundationCF::rate): (WebCore::timeRangeIsValidAndNotEmpty): (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges): (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable): (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded): (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes): (WebCore::MediaPlayerPrivateAVFoundationCF::assetStatus): (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext): (WebCore::MediaPlayerPrivateAVFoundationCF::paint): (WebCore::mimeTypeCache): (WebCore::MediaPlayerPrivateAVFoundationCF::getSupportedTypes): (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable): (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): (WebCore::MediaPlayerPrivateAVFoundationCF::contentsNeedsDisplay): (WebCore::AVFWrapper::AVFWrapper): (WebCore::AVFWrapper::~AVFWrapper): (WebCore::AVFWrapper::scheduleDisconnectAndDelete): (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): (WebCore::AVFWrapper::deleteAVFWrapper): (WebCore::AVFWrapper::createAssetForURL): (WebCore::AVFWrapper::createPlayer): (WebCore::AVFWrapper::createPlayerItem): (WebCore::AVFWrapper::periodicTimeObserverCallback): (WebCore::AVFWrapper::notificationCallback): (WebCore::AVFWrapper::loadPlayableCompletionCallback): (WebCore::AVFWrapper::checkPlayability): (WebCore::AVFWrapper::loadMetadataCompletionCallback): (WebCore::AVFWrapper::beginLoadingMetadata): (WebCore::AVFWrapper::seekCompletedCallback): (WebCore::AVFWrapper::seekToTime): (WebCore::AVFWrapper::setAsset): (WebCore::AVFWrapper::platformLayer): (WebCore::AVFWrapper::createAVCFVideoLayer): (WebCore::AVFWrapper::destroyVideoLayer): (WebCore::AVFWrapper::setVideoLayerNeedsCommit): (WebCore::AVFWrapper::setVideoLayerHidden): (WebCore::AVFWrapper::createImageGenerator): (WebCore::AVFWrapper::destroyImageGenerator): (WebCore::AVFWrapper::createImageForTimeInRect): (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Added implementation. 2011-08-04 Jochen Eisinger <jochen@chromium.org> Get rid of ResourceRequestBase::m_targetType. Move it to chromium's ResourceRequest. https://bugs.webkit.org/show_bug.cgi?id=48483 Reviewed by Alexey Proskuryakov. * loader/PingLoader.cpp: (WebCore::PingLoader::loadImage): (WebCore::PingLoader::sendPing): (WebCore::PingLoader::reportContentSecurityPolicyViolation): * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::load): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcStart): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::adopt): (WebCore::ResourceRequestBase::copyData): * platform/network/ResourceRequestBase.h: (WebCore::ResourceRequestBase::ResourceRequestBase): * platform/network/chromium/ResourceRequest.cpp: (WebCore::ResourceRequest::doPlatformCopyData): (WebCore::ResourceRequest::doPlatformAdopt): * platform/network/chromium/ResourceRequest.h: (WebCore::ResourceRequest::ResourceRequest): (WebCore::ResourceRequest::targetType): (WebCore::ResourceRequest::setTargetType): * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerScriptLoader::load): * workers/Worker.cpp: (WebCore::Worker::create): * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts): * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::WorkerScriptLoader): (WebCore::WorkerScriptLoader::createResourceRequest): * workers/WorkerScriptLoader.h: (WebCore::WorkerScriptLoader::create): (WebCore::WorkerScriptLoader::setTargetType): 2011-08-04 Jeff Miller <jeffm@apple.com> Fix WinCE build after r92308. * config.h: Don't try to include WebCoreHeaderDetection.h for WinCE. 2011-08-04 Darin Fisher <darin@chromium.org> webkitRequestAnimationFrame's element argument needs to be marked optional https://bugs.webkit.org/show_bug.cgi?id=65698 Reviewed by James Robinson. * page/DOMWindow.idl: 2011-08-04 Adam Roben <aroben@apple.com> Delete some unused code from platform/graphics/win MediaPlayerPrivateQuickTimeWin has been unused since r72117, and the GraphicsLayer-related classes have been unused since r75262. Fixes <http://webkit.org/b/65689> platform/graphics/win has a bunch of unused code Reviewed by Eric Carlson. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: Removed now-deleted files. * platform/graphics/win/GraphicsLayerCACF.cpp: Removed. * platform/graphics/win/GraphicsLayerCACF.h: Removed. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Removed. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Removed. * platform/graphics/win/WebLayer.cpp: Removed. * platform/graphics/win/WebLayer.h: Removed. * platform/graphics/win/WebTiledLayer.cpp: Removed. * platform/graphics/win/WebTiledLayer.h: Removed. 2011-08-03 Adam Roben <aroben@apple.com> Detect and handle overflow in PlatformCALayerWinInternal::constrainedSize Google Maps sometimes requests very large (i.e., 2^50 pixels or greater) layers when zooming. PlatformCALayerWinInternal has code to limit tiled layers to 2^27 pixels, but it was not correctly handling overflow. In some cases, this would lead to creating a tiled layer with 0 tiles, which was the cause of this crash. Fixes <http://webkit.org/b/65637> <rdar://problem/9784849> Crash beneath PlatformCALayerWinInternal::updateTiles when zooming on Google Maps Reviewed by Sam Weinig. Test: compositing/tiling/crash-huge-layer.html * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::constrainedSize): Check for overflow before seeing if the number of required tiles is larger than the maximum number of allowed tiles. (PlatformCALayerWinInternal::updateTiles): Added an assertion to catch cases where we have a non-empty tiled layer that contains 0 tiles, which would cause the crash in this bug report. 2011-08-04 Stephen White <senorblanco@chromium.org> Set graphics context current before canvas.toDataURL(). https://bugs.webkit.org/show_bug.cgi?id=65700 Reviewed by James Robinson. No new tests, unfortunately. The test infrastucture doesn't seem to be conducive to writing multiple-context tests. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::toDataURL): 2011-08-01 Brian Weinstein <bweinstein@apple.com> WebKit2: Web Inspector always starts in undocked mode https://bugs.webkit.org/show_bug.cgi?id=65493 <rdar://problem/9353114> Reviewed by Adam Roben. Expose some methods on InspectorFrontendClient through the InspectorController so WebKit2 can request the inspector be docked, or ask whether or not it can be docked. * WebCore.exp.in: Export needed methods. * inspector/InspectorController.cpp: (WebCore::InspectorController::requestAttachWindow): Call through to InspectorFrontendClient. (WebCore::InspectorController::canAttachWindow): Ditto. * inspector/InspectorController.h: * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: 2011-08-04 Luke Macpherson <macpherson@chromium.org> Support cast between CSSPrimitiveValue and EborderFit, use in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=65665 Reviewed by Simon Fraser. No new tests / refactoring only. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from EBorderFit. (WebCore::CSSPrimitiveValue::operator EBorderFit): Support cast to EBorderFit. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use new cast to allow use of appropriate macro. 2011-08-04 Pavel Feldman <pfeldman@google.com> Web Inspector: rename sendResultByValue to returnByValue in Runtime agent. https://bugs.webkit.org/show_bug.cgi?id=65687 Reviewed by Yury Semikhatsky. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::evaluate): (WebCore::InjectedScript::callFunctionOn): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): * inspector/InspectorRuntimeAgent.h: 2011-08-04 Matt Falkenhagen <falken@chromium.org> Use -webkit-locale for font selection. https://bugs.webkit.org/show_bug.cgi?id=10874 Reviewed by Dan Bernstein. Infer a script from -webkit-locale to use to choose a font for generic font families and the default unstyled font. The font is retrieved from per-script font settings (see bug 20797). Since these settings have not changed there should be no visible effect yet. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSFontSelector.cpp: Use script when getting font from Settings (WebCore::fontDataForGenericFamily): (WebCore::CSSFontSelector::getFontData): * css/CSSPropertyNames.in: Increase priority of -webkit-locale since it affects font * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::applyProperty): Set script in font based on -webkit-locale * page/Settings.cpp: (WebCore::getGenericFontFamilyForScript): Fallback to USCRIPT_COMMON * platform/graphics/FontDescription.h: Add m_script (WebCore::FontDescription::FontDescription): (WebCore::FontDescription::script): (WebCore::FontDescription::setScript): (WebCore::FontDescription::operator==): * platform/text/LocaleToScriptMapping.h: Added. * platform/text/LocaleToScriptMappingDefault.cpp: Added. (WebCore::localeToScriptCodeForFontSelection): (WebCore::LocaleScript::if): (WebCore::LocaleScript::while): * platform/text/LocaleToScriptMappingICU.cpp: Added. (WebCore::scriptCodeForFontSelection): (WebCore::localeToScriptCodeForFontSelection): 2011-08-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Pretty print JSONP in network panel preview tab. https://bugs.webkit.org/show_bug.cgi?id=65559 Reviewed by Pavel Feldman. Test: http/tests/inspector/network/network-preview-json.html * inspector/front-end/ResourceJSONView.js: (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.parseJSONP): (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype._initialize): (WebInspector.ResourceJSONView.parseJSON.WebInspector.ParsedJSON): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype._createPreviewView): 2011-08-04 Pavel Feldman <pfeldman@google.com> Web Inspector: replace isRegex with urlRegex in setBreakpointByUrl https://bugs.webkit.org/show_bug.cgi?id=65684 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpoint): 2011-08-03 Philippe Normand <pnormand@igalia.com> [GTK] fullscreen/video-controls-override.html fails https://bugs.webkit.org/show_bug.cgi?id=65618 Reviewed by Martin Robinson. Implement extraFullScreenStyleSheet() and provide the QuickTime stylesheet for now, later we might want our own stylesheet. * GNUmakefile.am: * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::extraFullScreenStyleSheet): * platform/gtk/RenderThemeGtk.h: 2011-08-04 Pavel Feldman <pfeldman@google.com> Web Inspector: Rename sourceId -> scriptId in the protocol and the source code. https://bugs.webkit.org/show_bug.cgi?id=65682 Reviewed by Yury Semikhatsky. * inspector/InjectedScriptSource.js: (): * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::addMessageToConsole): * inspector/InspectorConsoleAgent.h: * inspector/InspectorConsoleInstrumentation.h: (WebCore::InspectorInstrumentation::addMessageToConsole): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/InspectorDebuggerAgent.cpp: (WebCore::parseLocation): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getScriptSource): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::addMessageToConsoleImpl): * inspector/InspectorInstrumentation.h: * inspector/ScriptDebugListener.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.scriptForSourceID): (WebInspector.DebuggerModel.prototype.queryScripts): (WebInspector.DebuggerModel.prototype.setScriptSource): (WebInspector.DebuggerModel.prototype._didEditScriptSource): (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): (WebInspector.DebuggerDispatcher.prototype.breakpointResolved): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.registerAnchor): (WebInspector.DebuggerPresentationModel.prototype._updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didReceiveSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didGetScriptLocation): (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype.set _debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript): (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId): (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId): (WebInspector.PresenationCallFrame): (WebInspector.PresenationCallFrame.prototype.sourceLine): * inspector/front-end/EventListenersSidebarPane.js: (.): (): * inspector/front-end/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.requestSource): (WebInspector.Script.prototype.editSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._concatenateScriptsContent): 2011-08-04 Tommy Widenflycht <tommyw@google.com> MediaStream API: Rename StreamEvent to MediaStreamEvent https://bugs.webkit.org/show_bug.cgi?id=65669 Reviewed by Tony Gentilcore. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * dom/DOMAllInOne.cpp: * dom/Event.cpp: (WebCore::Event::isMediaStreamEvent): * dom/Event.h: * p2p/MediaStreamEvent.cpp: Renamed from Source/WebCore/dom/StreamEvent.cpp. (WebCore::MediaStreamEvent::create): (WebCore::MediaStreamEvent::MediaStreamEvent): (WebCore::MediaStreamEvent::~MediaStreamEvent): (WebCore::MediaStreamEvent::initMediaStreamEvent): (WebCore::MediaStreamEvent::stream): * p2p/MediaStreamEvent.h: Renamed from Source/WebCore/dom/StreamEvent.h. (WebCore::MediaStreamEvent::isMediaStreamEvent): * p2p/MediaStreamEvent.idl: Renamed from Source/WebCore/dom/StreamEvent.idl. * p2p/PeerConnection.cpp: (WebCore::PeerConnection::dispatchStreamEvent): 2011-08-02 Hans Wennborg <hans@chromium.org> IndexedDB: Fix index data invalidation bugs. https://bugs.webkit.org/show_bug.cgi?id=65547 Reviewed by Tony Chang. The function that checks whether a key exists in an index failed to check whether that key was still valid or not. Deleting a record from an object store must also delete its exists entry, thus invalidating index keys pointing to that record. Test: storage/indexeddb/index-unique.html * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord): (WebCore::findKeyInIndex): (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex): (WebCore::IDBLevelDBBackingStore::keyExistsInIndex): (WebCore::CursorOptions::IndexKeyCursorImpl::loadCurrentRow): 2011-08-04 Alexandru Chiculita <achicu@adobe.com> Move PODIntervalTree to Source/WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=65667 It seems the files were not part of any project, so no project files were modified. Reviewed by Adam Barth. No new tests, just moving files from one folder to the other. * platform/PODArena.h: Renamed from Source/WebCore/platform/graphics/gpu/PODArena.h. (WebCore::PODArena::Allocator::~Allocator): (WebCore::PODArena::FastMallocAllocator::create): (WebCore::PODArena::FastMallocAllocator::allocate): (WebCore::PODArena::FastMallocAllocator::free): (WebCore::PODArena::FastMallocAllocator::FastMallocAllocator): (WebCore::PODArena::create): (WebCore::PODArena::allocateObject): (WebCore::PODArena::~PODArena): (WebCore::PODArena::PODArena): (WebCore::PODArena::minAlignment): (WebCore::PODArena::allocateBase): (WebCore::PODArena::roundUp): (WebCore::PODArena::Chunk::Chunk): (WebCore::PODArena::Chunk::~Chunk): (WebCore::PODArena::Chunk::allocate): * platform/PODInterval.h: Renamed from Source/WebCore/platform/graphics/gpu/PODInterval.h. (WebCore::PODInterval::PODInterval): (WebCore::PODInterval::low): (WebCore::PODInterval::high): (WebCore::PODInterval::data): (WebCore::PODInterval::overlaps): (WebCore::PODInterval::operator<): (WebCore::PODInterval::operator==): (WebCore::PODInterval::maxHigh): (WebCore::PODInterval::setMaxHigh): (WebCore::PODInterval::toString): * platform/PODIntervalTree.h: Renamed from Source/WebCore/platform/graphics/gpu/PODIntervalTree.h. (WebCore::PODIntervalTree::PODIntervalTree): (WebCore::PODIntervalTree::allOverlaps): (WebCore::PODIntervalTree::createInterval): (WebCore::PODIntervalTree::checkInvariants): (WebCore::PODIntervalTree::init): (WebCore::PODIntervalTree::searchForOverlapsFrom): (WebCore::PODIntervalTree::updateNode): (WebCore::PODIntervalTree::checkInvariantsFromNode): * platform/PODRedBlackTree.h: Renamed from Source/WebCore/platform/graphics/gpu/PODRedBlackTree.h. (WebCore::PODRedBlackTree::Visitor::~Visitor): (WebCore::PODRedBlackTree::PODRedBlackTree): (WebCore::PODRedBlackTree::~PODRedBlackTree): (WebCore::PODRedBlackTree::add): (WebCore::PODRedBlackTree::remove): (WebCore::PODRedBlackTree::contains): (WebCore::PODRedBlackTree::visitInorder): (WebCore::PODRedBlackTree::size): (WebCore::PODRedBlackTree::setNeedsFullOrderingComparisons): (WebCore::PODRedBlackTree::checkInvariants): (WebCore::PODRedBlackTree::dump): (WebCore::PODRedBlackTree::setVerboseDebugging): (WebCore::PODRedBlackTree::Node::Node): (WebCore::PODRedBlackTree::Node::~Node): (WebCore::PODRedBlackTree::Node::color): (WebCore::PODRedBlackTree::Node::setColor): (WebCore::PODRedBlackTree::Node::data): (WebCore::PODRedBlackTree::Node::copyFrom): (WebCore::PODRedBlackTree::Node::left): (WebCore::PODRedBlackTree::Node::setLeft): (WebCore::PODRedBlackTree::Node::right): (WebCore::PODRedBlackTree::Node::setRight): (WebCore::PODRedBlackTree::Node::parent): (WebCore::PODRedBlackTree::Node::setParent): (WebCore::PODRedBlackTree::root): (WebCore::PODRedBlackTree::updateNode): (WebCore::PODRedBlackTree::treeSearch): (WebCore::PODRedBlackTree::treeSearchNormal): (WebCore::PODRedBlackTree::treeSearchFullComparisons): (WebCore::PODRedBlackTree::treeInsert): (WebCore::PODRedBlackTree::treeSuccessor): (WebCore::PODRedBlackTree::treeMinimum): (WebCore::PODRedBlackTree::propagateUpdates): (WebCore::PODRedBlackTree::leftRotate): (WebCore::PODRedBlackTree::rightRotate): (WebCore::PODRedBlackTree::insertNode): (WebCore::PODRedBlackTree::deleteFixup): (WebCore::PODRedBlackTree::deleteNode): (WebCore::PODRedBlackTree::visitInorderImpl): (WebCore::PODRedBlackTree::Counter::Counter): (WebCore::PODRedBlackTree::Counter::visit): (WebCore::PODRedBlackTree::Counter::count): (WebCore::PODRedBlackTree::checkInvariantsFromNode): (WebCore::PODRedBlackTree::logIfVerbose): (WebCore::PODRedBlackTree::dumpFromNode): 2011-08-03 Alice Boxhall <aboxhall@chromium.org> An element with role=textbox should have settable AXValue unless read-only https://bugs.webkit.org/show_bug.cgi?id=65664 Reviewed by Chris Fleizach. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::canSetValueAttribute): Return true for non-native text field with aria-readonly not set. 2011-08-03 Luke Macpherson <macpherson@chromium.org> Clean up value clamping in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=65588 Reviewed by Darin Adler. No new tests / trivial code cleanup only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Replace (unsigned int)primitiveValue->getDoubleValue() with primtiveValue->getValue<unsigned>() for correct clamping. Replace clampToInteger(primitiveValue->getDoubleValue()) with primitiveValue->getIntValue(). 2011-08-03 Kent Tamura <tkent@chromium.org> Fix incorrect checks for HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=65590 Reviewed by Dimitri Glazkov. <video> and <audio> can be an HTMLElement instance instead of HTMLMediaElement if MediaPlayer::isAvailable() returns false or the media feature is disabled at runtime. * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::insertedIntoTree): (WebCore::HTMLSourceElement::willRemove): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::insertedIntoTree): (WebCore::HTMLTrackElement::willRemove): * html/shadow/MediaControlElements.cpp: (WebCore::toParentMediaElement): * page/FrameView.cpp: (WebCore::FrameView::updateWidget): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintMediaMuteButton): * platform/gtk/RenderThemeGtk.cpp: (WebCore::getMediaElementFromRenderObject): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMediaSliderTrack): * rendering/RenderThemeWinCE.cpp: (WebCore::mediaElementParent): 2011-08-03 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Make ScrollbarOverlayUtilitiesChromiumMac.h c++ compatible https://bugs.webkit.org/show_bug.cgi?id=65659 Reviewed by James Robinson. ScrollbarOverlayUtilitiesChromiumMac.h couldn't be included from pure c++ code because it used NSInteger. I fixed this by checking for __OBJC__ before using NSInteger. Currently no pure c++ files are including ScrollbarOverlayUtilitiesChromiumMac.h but this will change in future patches from jam@chromium.org. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterControllerStyle): (wkSetScrollbarPainterControllerStyle): 2011-08-03 Luke Macpherson <macpherson@chromium.org> Support cast between CSSPrimitiveValue and EBoxSizing, use in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=65657 Reviewed by Simon Fraser. No new tests / refactoring only. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Implement cast from EBoxSizing. (WebCore::CSSPrimitiveValue::operator EBoxSizing): Implement cast to EBoxSizing. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use appropriate macro to simplify code using cast. 2011-08-03 Ian Henderson <ianh@apple.com> Draw rectangular box shadow for elements with border-radius if no corners are visible https://bugs.webkit.org/show_bug.cgi?id=65006 Reviewed by Simon Fraser. Change "unroundClippedCorners" to "allCornersClippedOut" and use it to determine when the corners' influence affects the blurred shadow in the current drawing region. Test: fast/box-shadow/box-shadow-clipped-slices.html * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxShadow): Pass PaintInfo through to RenderBoxModelObject::paintBoxShadow. (WebCore::InlineFlowBox::paintBoxDecorations): Ditto. * rendering/InlineFlowBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Ditto. * rendering/RenderBoxModelObject.cpp: (WebCore::allCornersClippedOut): Determines whether the bounding rects for any of the given rounded rect's corners intersects the clip rect. (WebCore::RenderBoxModelObject::paintBorder): Instead of "unrounding" any corner outside the clip rect, unround all corners at once, and only if they are all outside the clip rect. (WebCore::RenderBoxModelObject::paintBoxShadow): Determine whether any corner will influence shadow drawing using allCornersClippedOut on the influenceRect, whose corners extend past the fillRect's corners by the blur radius and inside the fillRect's corners by the blur radius. * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): Pass PaintInfo into RenderBoxModelObject::paintBoxShadow. * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): Ditto. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBoxDecorations): Ditto. 2011-08-03 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt][Texmap][REGRESSION] http://webkit.org/blog-files/transform-style.html doesn't show composited content https://bugs.webkit.org/show_bug.cgi?id=65629 Reviewed by Benjamin Poulain. Some non-ES2 initialization was wrongfully #ifdefed in CPU(X86) and thus compiled-out. When put it in the correct #ifdef, composited layers which require an intermediate buffer work again. No new tests. Existing opacity tests in LayoutTests/compositing test this. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::bind): 2011-08-03 Mark Rowe <mrowe@apple.com> Bring some order to FeatureDefines.xcconfig to make it easier to follow. Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2011-08-03 Mark Rowe <mrowe@apple.com> Clean up FeatureDefines.xcconfig to remove some unnecessary conditional settings Reviewed by Dave Kilzer. * Configurations/FeatureDefines.xcconfig: 2011-08-02 Adrienne Walker <enne@google.com> [chromium] Fix issue where switching composited tabs evicts root textures https://bugs.webkit.org/show_bug.cgi?id=65562 Reviewed by James Robinson. LayerTilerChromium::protectTileTextures was hard-coding texture sizes and texture formats. Because this didn't always match textures' actual sizes and formats, they weren't getting protected during eviction. * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::protectTileTextures): 2011-08-03 Ryosuke Niwa <rniwa@webkit.org> select-all, copy, paste of specialAncestorElements (e.g. pre, h1, etc) nests the element inside itself https://bugs.webkit.org/show_bug.cgi?id=26483 Reviewed by Enrica Casucci. The bug was caused by WebKit serializing pre, h1, etc... to retain structure and appearance when copying rich content and pasting did not remove such nodes wrapping the copied contents. Fixed the bug by extending r81887 and r83322 to remove those elements from where WebKit pastes into. Test: editing/pasteboard/copy-paste-text-in-h1.html * editing/ReplaceSelectionCommand.cpp: (WebCore::nodeHasAttributesToPreserve): Extracted from isInlineNodeWithStyle. (WebCore::isInlineNodeWithStyle): Calls nodeHasAttributesToPreserve. (WebCore::ReplaceSelectionCommand::doApply): Calls ancestorToRetainStructureAndAppearance. Remove nodes copied by ancestorToRetainStructureAndAppearance at insertionPos before pasting the fragment. * editing/markup.cpp: (WebCore::ancestorToRetainStructureAndAppearance): Takes ShouldIncludeParagraphSeparators. * editing/markup.h: 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from Console.idl https://bugs.webkit.org/show_bug.cgi?id=65569 Reviewed by Adam Barth. No new tests, all existing tests pass. * page/Console.idl: 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from HTML DOM IDL files https://bugs.webkit.org/show_bug.cgi?id=65338 Reviewed by Adam Barth. * html/DOMFormData.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLAllCollection.idl: * html/HTMLAnchorElement.idl: * html/HTMLAudioElement.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDivElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOutputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/TimeRanges.idl: 2011-08-03 Jeffrey Pfau <jpfau@apple.com> Make atomic XML token https://bugs.webkit.org/show_bug.cgi?id=65639 Reviewed by Adam Barth. Create a shared AtomicMarkupTokenBase that is shared by AtomicHTMLToken and the new AtomicXMLToken * html/parser/HTMLToken.h: (WebCore::HTMLToken::setForceQuirks): (WebCore::AtomicHTMLToken::AtomicHTMLToken): (WebCore::AtomicHTMLToken::forceQuirks): * html/parser/HTMLTokenizer.cpp: (WebCore::::nameForAttribute): (WebCore::::usesName): (WebCore::::usesAttributes): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): (WebCore::AtomicMarkupTokenBase::type): (WebCore::AtomicMarkupTokenBase::name): (WebCore::AtomicMarkupTokenBase::setName): (WebCore::AtomicMarkupTokenBase::selfClosing): (WebCore::AtomicMarkupTokenBase::getAttributeItem): (WebCore::AtomicMarkupTokenBase::attributes): (WebCore::AtomicMarkupTokenBase::takeAtributes): (WebCore::AtomicMarkupTokenBase::characters): (WebCore::AtomicMarkupTokenBase::comment): (WebCore::AtomicMarkupTokenBase::publicIdentifier): (WebCore::AtomicMarkupTokenBase::systemIdentifier): (WebCore::::initializeAttributes): * xml/parser/XMLToken.h: (WebCore::AtomicXMLToken::AtomicXMLToken): (WebCore::AtomicXMLToken::prefix): (WebCore::AtomicXMLToken::target): (WebCore::AtomicXMLToken::data): (WebCore::AtomicXMLToken::xmlVersion): (WebCore::AtomicXMLToken::xmlStandalone): * xml/parser/XMLTokenizer.cpp: (WebCore::::nameForAttribute): (WebCore::::usesName): (WebCore::::usesAttributes): 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from geolocation IDL files https://bugs.webkit.org/show_bug.cgi?id=65355 Reviewed by Adam Barth. No new tests, all existing tests pass. * page/Geolocation.idl: * page/PositionCallback.idl: * page/PositionErrorCallback.idl: 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from DOMSelection.idl https://bugs.webkit.org/show_bug.cgi?id=65566 Reviewed by Adam Barth. No new tests, all existing tests pass. * page/DOMSelection.idl: 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from Location.idl https://bugs.webkit.org/show_bug.cgi?id=65565 Reviewed by Darin Adler. No new tests, all existing tests pass. * page/Location.idl: 2011-08-03 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Fix position of search tickmarks https://bugs.webkit.org/show_bug.cgi?id=65575 This change adjusts the position of search tickmarks so that they are correctly centered. Also, insetting the tickmark rect by 5 pixels caused tickmarks on the overlay scrollbar to look very small. I changed this to inset by 4 pixels instead. The tickmark is the same width as the overlay scrollbar which looks much better. Reviewed by James Robinson. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): 2011-08-03 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Make sure scrollbars flash when web page loads https://bugs.webkit.org/show_bug.cgi?id=65586 On slow web pages scrollbars wouldn't flash when the page was done loading. The problem was that we were flashing the scrollbar 0.1 second after the load operation had started. If the page was slow to load then we might not have scrollbars to flash. To work around this I added an extra check to make sure that we had indeed finished loading the page before flashing the scrollbars. Reviewed by James Robinson. * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired): 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from navigator IDL files https://bugs.webkit.org/show_bug.cgi?id=65370 Reviewed by Adam Barth. * page/Navigator.idl: * page/NavigatorUserMediaErrorCallback.idl: * page/NavigatorUserMediaSuccessCallback.idl: 2011-08-03 Anders Carlsson <andersca@apple.com> webarchive/loading/missing-data.html is failing on Mac https://bugs.webkit.org/show_bug.cgi?id=63507 Reviewed by Adam Barth. When loading a main resource from a web archive, make sure that the working URL is actually the URL of the resource, and not the URL of the web archive itself. * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): 2011-08-03 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=65353 Reviewed by Adam Barth. No new tests, all existing tests pass. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): * page/DOMWindow.idl: 2011-08-03 Jeff Miller <jeffm@apple.com> Fix Chromimum and Qt builds after r92308. * config.h: Don't try to include WebCoreHeaderDetection.h for Chromimum and Qt. 2011-08-03 Jeff Miller <jeffm@apple.com> Generate WebCoreHeaderDetection.h on Windows to define HAVE_AVCF https://bugs.webkit.org/show_bug.cgi?id=65634 AVFoundation support on Windows will (eventually) be predicated on the availability of AVFoundationCF headers and libraries in the WebKit Support Libraries, so we test for the existence of one of the header files (AVCFBase.h) to determine whether to AVCF is available. For now, even if AVFoundationCF is available, leave WTF_USE_AVFOUNDATION off, since it's not ready to be turned on yet (which is covered by http://webkit.org/b/65400). Ideally, we would generate WebCoreHeaderDetection.h on all platforms so we could include it unconditionally in WebCore's config.h, but unfortunately the Mac-only file ExportFileGenerator.cpp depends on WTF_USE_AVFOUNDATION being set correctly, and since this .cpp file is also generated it doesn't have access to WebCoreHeaderDetection.h. Reviewed by Adam Roben. No change in functionality, so new tests. * DerivedSources.make: Add rule to generate WebCoreHeaderDetection.h to set HAVE_AVCF on Windows. * config.h: Include WebCoreHeaderDetection.h on Windows, check for HAVE(AVCF) but always leave WTF_USE_AVFOUNDATION off on Windows for now. 2011-08-03 Tommy Widenflycht <tommyw@google.com> MediaStream API: Implement PeerConnection and SignalingCallback https://bugs.webkit.org/show_bug.cgi?id=65101 Reviewed by Adam Barth. LayoutTests will be provided by a follow-up CL, see <https://bugs.webkit.org/show_bug.cgi?id=56587>. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled): * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSPeerConnectionCustom.cpp: Copied from Source/WebCore/page/MediaStreamClient.h. (WebCore::JSPeerConnectionConstructor::constructJSPeerConnection): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * bindings/v8/custom/V8PeerConnectionCustom.cpp: Added. (WebCore::V8PeerConnection::constructorCallback): * dom/DispatchTask.h: Added. (WebCore::SimpleDispatchTask::create): (WebCore::SimpleDispatchTask::performTask): (WebCore::SimpleDispatchTask::SimpleDispatchTask): (WebCore::DispatchTask::create): (WebCore::DispatchTask::performTask): (WebCore::DispatchTask::DispatchTask): * dom/EventNames.h: * dom/EventTarget.cpp: (WebCore::EventTarget::toPeerConnection): * dom/EventTarget.h: * p2p/PeerConnection.cpp: Added. (WebCore::PeerConnection::create): (WebCore::PeerConnection::PeerConnection): (WebCore::PeerConnection::init): (WebCore::PeerConnection::~PeerConnection): (WebCore::PeerConnection::localStreams): (WebCore::PeerConnection::remoteStreams): (WebCore::PeerConnection::processSignalingMessage): (WebCore::PeerConnection::send): (WebCore::PeerConnection::addStream): (WebCore::PeerConnection::removeStream): (WebCore::PeerConnection::close): (WebCore::PeerConnection::onNegotiationStarted): (WebCore::PeerConnection::onNegotiationDone): (WebCore::PeerConnection::streamAdded): (WebCore::PeerConnection::streamRemoved): (WebCore::PeerConnection::onMessage): (WebCore::PeerConnection::onSignalingMessage): (WebCore::PeerConnection::toPeerConnection): (WebCore::PeerConnection::scriptExecutionContext): (WebCore::PeerConnection::eventTargetData): (WebCore::PeerConnection::ensureEventTargetData): (WebCore::PeerConnection::postMessageEvent): (WebCore::PeerConnection::postSignalingEvent): (WebCore::PeerConnection::postStreamAddedEvent): (WebCore::PeerConnection::postStreamRemovedEvent): (WebCore::PeerConnection::postSimpleEvent): (WebCore::PeerConnection::postStartNegotiationTask): (WebCore::PeerConnection::dispatchMessageEvent): (WebCore::PeerConnection::dispatchSignalingEvent): (WebCore::PeerConnection::dispatchStreamEvent): (WebCore::PeerConnection::dispatchSimpleEvent): (WebCore::PeerConnection::dispatchStartNegotiationTask): * p2p/PeerConnection.h: Added. (WebCore::PeerConnection::readyState): (WebCore::PeerConnection::refEventTarget): (WebCore::PeerConnection::derefEventTarget): * p2p/PeerConnection.idl: Added. * p2p/SignalingCallback.h: Copied from Source/WebCore/page/MediaStreamClient.h. (WebCore::SignalingCallback::~SignalingCallback): * p2p/SignalingCallback.idl: Added. * page/DOMWindow.idl: * page/MediaStreamClient.h: * page/MediaStreamController.cpp: (WebCore::MediaStreamController::MediaStreamController): (WebCore::MediaStreamController::unregisterFrameController): (WebCore::MediaStreamController::onSignalingMessage): (WebCore::MediaStreamController::frameToPagePeerConnectionId): (WebCore::MediaStreamController::processSignalingMessage): (WebCore::MediaStreamController::message): (WebCore::MediaStreamController::onMessage): (WebCore::MediaStreamController::addStream): (WebCore::MediaStreamController::onAddStream): (WebCore::MediaStreamController::removeStream): (WebCore::MediaStreamController::onRemoveStream): (WebCore::MediaStreamController::newPeerConnection): (WebCore::MediaStreamController::closePeerConnection): (WebCore::MediaStreamController::startNegotiation): (WebCore::MediaStreamController::onNegotiationStarted): (WebCore::MediaStreamController::onNegotiationDone): * page/MediaStreamController.h: * page/MediaStreamFrameController.cpp: (WebCore::MediaStreamFrameController::Request::isSignalingRequest): (WebCore::MediaStreamFrameController::createPeerConnection): (WebCore::MediaStreamFrameController::newPeerConnection): (WebCore::MediaStreamFrameController::closePeerConnection): (WebCore::MediaStreamFrameController::startNegotiation): (WebCore::MediaStreamFrameController::processSignalingMessage): (WebCore::MediaStreamFrameController::message): (WebCore::MediaStreamFrameController::addStream): (WebCore::MediaStreamFrameController::removeStream): (WebCore::MediaStreamFrameController::onMessage): (WebCore::MediaStreamFrameController::onAddStream): (WebCore::MediaStreamFrameController::onRemoveStream): (WebCore::MediaStreamFrameController::onSignalingMessage): (WebCore::MediaStreamFrameController::onNegotiationStarted): (WebCore::MediaStreamFrameController::onNegotiationDone): * page/MediaStreamFrameController.h: (WebCore::MediaStreamFrameController::ClientBase::isPeerConnection): (WebCore::MediaStreamFrameController::PeerConnectionClient::PeerConnectionClient): (WebCore::MediaStreamFrameController::PeerConnectionClient::~PeerConnectionClient): (WebCore::MediaStreamFrameController::PeerConnectionClient::isPeerConnection): 2011-08-03 Joseph Pecoraro <joepeck@webkit.org> Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting https://bugs.webkit.org/show_bug.cgi?id=65582 Reviewed by Pavel Feldman. Remove stale code. WebInspector.settings uses localStorage and handles the "debuggerEnabled" state. So remove the only remaining usage of load/saveSessionSetting. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendHost.cpp: * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._debuggerWasDisabled): 2011-08-03 Adam Barth <abarth@webkit.org> Crash in DocumentWriter::endIfNotLoadingMainResource https://bugs.webkit.org/show_bug.cgi?id=65581 Reviewed by Nate Chapin. This function is poorly designed because isLoadingMainResource is a poor proxy for determing whether to flush/finish the parser. Really, we should change how loads complete to match the model in HTML5, but that's pretty tricky. In the meantime, this null check fixes the crash. I'm sure there's another bug on file about this crash, but we've never been able to reproduce it. Thanks to Berend-Jan Wever for the test case! Test: fast/loader/reload-zero-byte-plugin.html * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::endIfNotLoadingMainResource): 2011-08-03 Anders Carlsson <andersca@apple.com> WebCore images backing CG patterns should be released on the main thread https://bugs.webkit.org/show_bug.cgi?id=65630 Reviewed by Sam Weinig. * platform/graphics/cg/PatternCG.cpp: (WebCore::patternReleaseOnMainThreadCallback): Deref the image. (WebCore::patternReleaseCallback): Call callOnMainThread. 2011-08-03 Luke Macpherson <macpherson@chromium.org> Use appropriate macro for CSSPropertyImageRendering. https://bugs.webkit.org/show_bug.cgi?id=65594 Reviewed by Simon Fraser. No new tests / trivial code cleanup only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro. 2011-08-03 Dan Bernstein <mitz@apple.com> FontCache::getFontData() does not set the familyIndex to cAllFamiliesScanned if the last font is a custom font https://bugs.webkit.org/show_bug.cgi?id=65597 Reviewed by Simon Fraser. No test added because behavior is unchanged, but this saves a call to getFontData(). * platform/graphics/FontCache.cpp: (WebCore::FontCache::getFontData): Eliminated early return inside the loop, allowing execution to continue and familyIndex to be set. 2011-08-03 Ryosuke Niwa <rniwa@webkit.org> Add RenderedPosition https://bugs.webkit.org/show_bug.cgi?id=65221 Reviewed by Hajime Morita. Add the skeleton for RenderedPosition and use it in rootBoxForLine. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/EditingAllInOne.cpp: * editing/RenderedPosition.cpp: Added. (WebCore::RenderedPosition::RenderedPosition): * editing/RenderedPosition.h: Added. (WebCore::RenderedPosition::isNull): (WebCore::RenderedPosition::rootBox): (WebCore::RenderedPosition::RenderedPosition): * editing/visible_units.cpp: (WebCore::startPositionForLine): (WebCore::endPositionForLine): (WebCore::logicalStartPositionForLine): (WebCore::logicalEndPositionForLine): 2011-08-03 Roland Steiner <rolandsteiner@chromium.org> [V8] V8CSSRuleCustom.cpp: not all enum values are listed in switch statement https://bugs.webkit.org/show_bug.cgi?id=65598 Reviewed by Dimitri Glazkov. Added UNKNOWN_RULE to the switch statement. No new tests. (No semantic change) * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): 2011-08-03 Pavel Feldman <pfeldman@google.com> Web Inspector: [Timeline] Hover on paint events and see rect outline around that area. https://bugs.webkit.org/show_bug.cgi?id=65510 Reviewed by Yury Semikhatsky. * WebCore.exp.in: * WebCore.order: * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawRectHighlight): * inspector/DOMNodeHighlighter.h: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::drawHighlight): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::hideHighlight): (WebCore::InspectorDOMAgent::drawHighlight): * inspector/InspectorDOMAgent.h: * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.onselect): (WebInspector.FrameTreeElement.prototype.set hovered): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._mouseOut): (WebInspector.TimelinePanel.prototype._mouseMove): (WebInspector.TimelinePanel.prototype._highlightRect): (WebInspector.TimelinePanel.prototype._hideRectHighlight): * inspector/front-end/inspector.js: (WebInspector.highlightDOMNode): 2011-08-03 Pavel Feldman <pfeldman@google.com> Web Inspector: make text in popover selectable + make popover re-appear faster. https://bugs.webkit.org/show_bug.cgi?id=65603 Reviewed by Yury Semikhatsky. * inspector/front-end/Popover.js: (WebInspector.PopoverHelper.prototype.setTimeout): (WebInspector.PopoverHelper.prototype._mouseMove): (WebInspector.PopoverHelper.prototype._handleMouseAction): * inspector/front-end/popover.css: (.popover .content): 2011-08-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Console scroll position should be saved when switching panels. https://bugs.webkit.org/show_bug.cgi?id=65607 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._formatAsArrayEntry): (WebInspector.ConsoleView.prototype.get scrollLeft): (WebInspector.ConsoleView.prototype.set scrollLeft): (WebInspector.ConsoleView.prototype.get scrollTop): (WebInspector.ConsoleView.prototype.set scrollTop): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype._endStatusBarDragging): (WebInspector.Drawer.prototype.get scrollLeft): (WebInspector.Drawer.prototype.set scrollLeft): (WebInspector.Drawer.prototype.get scrollTop): (WebInspector.Drawer.prototype.set scrollTop): 2011-08-03 Philippe Normand <pnormand@igalia.com> libsoup-CRITICAL **: soup_message_io_pause: assertion `io != NULL' failed https://bugs.webkit.org/show_bug.cgi?id=64263 Reviewed by Martin Robinson. Avoid any operation on not yet started messages and completed messages. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::finishedCallback): (WebCore::startHTTPRequest): (WebCore::ResourceHandle::platformSetDefersLoading): 2011-08-03 Jeremy Moskovich <jeremy@chromium.org> [Chromium] Fix OOP font loading to work on 10.6.6 and above. https://bugs.webkit.org/show_bug.cgi?id=65543 In 10.6.6 the function used to get the unique ID for an NSFont in the renderer was changed so it fails in the sandbox (it now tries to access the on-disk font file). In order to work around this, we get the font ID from the browser process. To speed things up, we introduce 2 levels of caching in WebKit. A font name cache where we can perform a quick lookup without the need for the font id and a font id cache which we can only lookup in after getting the unique ID from the browser process. Reviewed by Kenneth Russell. No new tests since this is not readily testable. * platform/chromium/PlatformBridge.h: * platform/graphics/chromium/CrossProcessFontLoading.h: * platform/graphics/chromium/CrossProcessFontLoading.mm: (WebCore::MemoryActivatedFont::create): (WebCore::MemoryActivatedFont::MemoryActivatedFont): (WebCore::MemoryActivatedFont::~MemoryActivatedFont): 2011-08-03 Hayato Ito <hayato@chromium.org> Make EventDispatchMediator RefCounted. https://bugs.webkit.org/show_bug.cgi?id=65529 Reviewed by Hajime Morita. Make EventDispatchMediator RefCounted so that it can be enqueued into a ScopedEventQueue and called later. A necessary change for ScopedEventQueue should be addressed in another patch. This is a minor update of r92256, which failed on chromium win builds. No changes to functionality so no new tests. * dom/Event.cpp: (WebCore::EventDispatchMediator::create): * dom/Event.h: * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): * dom/EventDispatcher.h: * dom/KeyboardEvent.cpp: (WebCore::KeyboardEventDispatchMediator::create): * dom/KeyboardEvent.h: * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::create): * dom/MouseEvent.h: * dom/Node.cpp: (WebCore::Node::dispatchEvent): (WebCore::Node::dispatchKeyEvent): (WebCore::Node::dispatchMouseEvent): (WebCore::Node::dispatchWheelEvent): * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::create): * dom/WheelEvent.h: 2011-08-03 Pavel Feldman <pfeldman@chromium.org> Web Inspector: remove Node parameter from the InspectorClient::highlight https://bugs.webkit.org/show_bug.cgi?id=65549 Reviewed by Yury Semikhatsky. * inspector/InspectorClient.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlight): * loader/EmptyClients.h: (WebCore::EmptyInspectorClient::highlight): 2011-08-03 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=65599 Image loads should trigger didFirstVisuallyNonEmptyLayout more easily Reviewed by Dan Bernstein. Tweak the heuristic pixel count so logo-sized images trigger didFirstVisuallyNonEmptyLayout. * page/FrameView.h: (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount): 2011-08-03 Takashi Toyoshima <toyoshim@chromium.org> WebSocket: Could not handle zero length text frame. https://bugs.webkit.org/show_bug.cgi?id=65592 Reviewed by Kent Tamura. Test: http/tests/websocket/tests/hybi/zero-length-text.html * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): 2011-08-02 Pratik Solanki <psolanki@apple.com> Crash in ResourceResponse::platformCompare() with USE(CFNETWORK) https://bugs.webkit.org/show_bug.cgi?id=65584 Reviewed by David Kilzer. * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformCompare): Don't call CFEqual with 0 as an argument. 2011-08-02 Takashi Toyoshima <toyoshim@chromium.org> WebSocket: Should be closed by receiving invalid continuation frame. https://bugs.webkit.org/show_bug.cgi?id=65527 Reviewed by Kent Tamura. Test: http/tests/websocket/tests/hybi/invalid-continuation.html * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): 2011-08-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92256. http://trac.webkit.org/changeset/92256 https://bugs.webkit.org/show_bug.cgi?id=65593 Causing tons of crashes on the chromium win bots (Requested by jamesr on #webkit). * dom/Event.cpp: * dom/Event.h: * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): * dom/EventDispatcher.h: * dom/KeyboardEvent.cpp: * dom/KeyboardEvent.h: * dom/MouseEvent.cpp: * dom/MouseEvent.h: * dom/Node.cpp: (WebCore::Node::dispatchEvent): (WebCore::Node::dispatchKeyEvent): (WebCore::Node::dispatchMouseEvent): (WebCore::Node::dispatchWheelEvent): * dom/WheelEvent.cpp: * dom/WheelEvent.h: 2011-08-02 Hayato Ito <hayato@chromium.org> Make EventDispatchMediator RefCounted. https://bugs.webkit.org/show_bug.cgi?id=65529 Reviewed by Dimitri Glazkov. Make EventDispatchMediator RefCounted so that it can be enqueued into a ScopedEventQueue and called later. A necessary change for ScopedEventQueue should be addressed in another patch. No changes to functionality so no new tests. * dom/Event.cpp: (WebCore::EventDispatchMediator::create): * dom/Event.h: * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): * dom/EventDispatcher.h: * dom/KeyboardEvent.cpp: (WebCore::KeyboardEventDispatchMediator::create): * dom/KeyboardEvent.h: * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::create): * dom/MouseEvent.h: * dom/Node.cpp: (WebCore::Node::dispatchEvent): (WebCore::Node::dispatchKeyEvent): (WebCore::Node::dispatchMouseEvent): (WebCore::Node::dispatchWheelEvent): * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::create): * dom/WheelEvent.h: 2011-08-02 David Reveman <reveman@chromium.org> [Chromium] Use edge-distance method for layer anti-aliasing. https://bugs.webkit.org/show_bug.cgi?id=64942 Reviewed by James Robinson. Use an edge distance based method instead of the current linear filtering method for producing anti-aliased edges on 3D transformed layers. This removes the outer border handling from TilingData as it's no longer needed for anti-aliasing. Tests: platform/chromium/compositing/tiny-layer-rotated.html (existing) platform/chromium/compositing/huge-layer-rotated.html (existing) compositing/images/content-image-change.html (existing) TilingDataTest in webkit_unit_tests * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::screenMatrix): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::setDrawViewportRect): (WebCore::LayerRendererChromium::tilerProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzleAA): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::windowMatrix): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::setTileSize): (WebCore::LayerTilerChromium::tileLayerRect): (WebCore::LayerTilerChromium::invalidateRect): (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): (WebCore::LayerTilerChromium::growLayerToContain): (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderTile::VertexShaderTile): (WebCore::VertexShaderTile::init): (WebCore::VertexShaderTile::getShaderString): (WebCore::FragmentTexAlphaAABinding::FragmentTexAlphaAABinding): (WebCore::FragmentTexAlphaAABinding::init): (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexSwizzleAlphaAA::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::VertexShaderTile::vertexTexTransformLocation): (WebCore::FragmentTexAlphaAABinding::alphaLocation): (WebCore::FragmentTexAlphaAABinding::samplerLocation): (WebCore::FragmentTexAlphaAABinding::fragmentTexTransformLocation): (WebCore::FragmentTexAlphaAABinding::edgeLocation): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::setIsMask): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/gpu/TilingData.cpp: (WebCore::computeNumTiles): (WebCore::TilingData::tileXIndexFromSrcCoord): (WebCore::TilingData::tileYIndexFromSrcCoord): (WebCore::TilingData::tileSizeX): (WebCore::TilingData::tileSizeY): (WebCore::TilingData::intersectDrawQuad): (WebCore::TilingData::textureOffset): * platform/graphics/gpu/TilingData.h: 2011-08-01 David Levin <levin@chromium.org> Add asserts to RefCounted to make sure ref/deref happens on the right thread. https://bugs.webkit.org/show_bug.cgi?id=31639 Reviewed by Dmitry Titov. No new functionality exposed so no new tests. (The change is basically adding more testing.) * ForwardingHeaders/wtf/ThreadRestrictionVerifier.h: Added. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::defaultIcon): Set the mutex which does the guarding of the variable. (WebCore::IconDatabase::setIconDataForIconURL): Ditto. (WebCore::IconDatabase::getOrCreateIconRecord): Ditto. (WebCore::IconDatabase::readFromDatabase): Ditto. 2011-08-02 Luke Macpherson <macpherson@chromium.org> Clean up value clampling in CSSStyleSelector and CSSPrimitiveValue. https://bugs.webkit.org/show_bug.cgi?id=65441 Reviewed by Simon Fraser. No new tests / refactoring only. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getFloatValue): Implement in terms of the new templated getValue(). (WebCore::CSSPrimitiveValue::getIntValue): Implement in terms of the new templated getValue(). (WebCore::CSSPrimitiveValue::getValue): Templated getValue that works for all numeric types. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use getValue<short> instead of rolling-your-own clamp to short. 2011-08-02 Julien Chaffraix <jchaffraix@webkit.org> RenderObject::computeRectForRepaint and clippedOverflowRectForRepaint should be const https://bugs.webkit.org/show_bug.cgi?id=65494 Reviewed by Darin Adler. No new tests, const-ness change only. * rendering/RenderObject.h: (WebCore::RenderObject::absoluteClippedOverflowRect): (WebCore::RenderObject::computeAbsoluteRepaintRect): Made those 2 const as they call a const method now. * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): Use a const RenderObject* for iterating as this is const. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::rectWithOutlineForRepaint): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::clippedOverflowRectForRepaint): (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): (WebCore::RenderInline::rectWithOutlineForRepaint): (WebCore::RenderInline::computeRectForRepaint): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::rectWithOutlineForRepaint): (WebCore::RenderObject::clippedOverflowRectForRepaint): (WebCore::RenderObject::computeRectForRepaint): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::clippedOverflowRectForRepaint): * rendering/RenderReplaced.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::clippedOverflowRectForRepaint): (WebCore::RenderTableCell::computeRectForRepaint): * rendering/RenderTableCell.h: * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::clippedOverflowRectForRepaint): * rendering/RenderTableCol.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::clippedOverflowRectForRepaint): * rendering/RenderTableRow.h: * rendering/RenderText.cpp: (WebCore::RenderText::clippedOverflowRectForRepaint): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::computeRectForRepaint): * rendering/RenderView.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGForeignObject::computeRectForRepaint): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGGradientStop.h: (WebCore::RenderSVGGradientStop::clippedOverflowRectForRepaint): * rendering/svg/RenderSVGHiddenContainer.h: (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::clippedOverflowRectForRepaint): (WebCore::RenderSVGInline::computeRectForRepaint): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGModelObject::computeRectForRepaint): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint): (WebCore::RenderSVGRoot::computeRectForRepaint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): (WebCore::RenderSVGText::computeRectForRepaint): * rendering/svg/RenderSVGText.h: * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint): (WebCore::SVGRenderSupport::computeRectForRepaint): * rendering/svg/SVGRenderSupport.h: Updated the following method's signature to use a const object. 2011-08-02 Jeffrey Pfau <jpfau@apple.com> Add namespace prefix support in XML tokenizer https://bugs.webkit.org/show_bug.cgi?id=65578 Reviewed by Adam Barth. This also changes markup debug printing to print to stderr instead of stdout * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::printString): * xml/parser/XMLToken.h: (WebCore::XMLToken::XMLDeclarationData::XMLDeclarationData): (WebCore::XMLToken::clear): (WebCore::XMLToken::appendToName): (WebCore::XMLToken::name): (WebCore::XMLToken::target): (WebCore::XMLToken::data): (WebCore::XMLToken::prefix): (WebCore::XMLToken::xmlDeclarationData): (WebCore::XMLToken::endPrefix): (WebCore::XMLToken::hasPrefix): (WebCore::XMLToken::endAttributePrefix): (WebCore::XMLToken::attributeHasPrefix): (WebCore::XMLToken::printAttrs): (WebCore::XMLToken::print): * xml/parser/XMLTokenizer.cpp: (WebCore::XMLTokenizer::nextToken): 2011-08-02 Zhenyao Mo <zmo@google.com> Unreviewed, rolling out r92238. http://trac.webkit.org/changeset/92238 https://bugs.webkit.org/show_bug.cgi?id=65555 fail fast/events/scrollbar-double-click.html on Mac * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::paint): 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from History.idl https://bugs.webkit.org/show_bug.cgi?id=65572 Reviewed by Adam Barth. No new tests, all existing tests pass. * page/History.idl: 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from WebKitAnimationList.idl https://bugs.webkit.org/show_bug.cgi?id=65571 Reviewed by Adam Barth. No new tests, all existing tests pass. * page/WebKitAnimationList.idl: 2011-08-02 James Robinson <jamesr@chromium.org> [chromium] Decouple layer visibility calculations from render surfaces / computed draw transforms https://bugs.webkit.org/show_bug.cgi?id=58840 Reviewed by Kenneth Russell. This decouples the layer visibility related calculations from the LayerChromium and CCLayerImpl trees. This is done by making LayerRendererChromium's "calculate the world" function (renamed calculateDrawTransformsAndVisibility()) a templated, free function that can operate on either LayerChromium + RenderSurfaceChromium pairs or on CCLayerImpl + CCRenderSurface pairs and invoking it twice, once before painting and once before drawing. Before painting, these calculations are used to determine which layers are potentially visible and should be painted, which depends on the calculated opacity, render surface bounds, and draw transforms. Before drawing, these calculations are used to figure out everything needed to draw. RenderSurfaceChromium is now used just for visibility calculations when painting. CCRenderSurfaceChromium is responsible for actually drawing the render surfaces. This does mean that in the current implementation the second calculations are redundant, but in the future this won't be the case since the pre-draw time calculations might be influenced by animations or gestures. I've added some traces to try to monitor if this math is a significant amount of the per-frame computation. Note that layer sorting only happens on the CCLayerImpl tree and the layer sort algorithm is the most expensive part of the calculations currently. This removes all of the weak back/forward pointers between LayerChromium and CCLayerImpls, the trees are now truly decoupled. Covered by compositing/ tests. * WebCore.gypi: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::createCCLayerImpl): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::~LayerChromium): (WebCore::LayerChromium::createCCLayerImpl): (WebCore::LayerChromium::createRenderSurface): (WebCore::LayerChromium::descendantsDrawsContent): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setUsesLayerScissor): (WebCore::LayerChromium::usesLayerScissor): (WebCore::LayerChromium::clearRenderSurface): (WebCore::LayerChromium::renderSurface): (WebCore::LayerChromium::drawOpacity): (WebCore::LayerChromium::setDrawOpacity): (WebCore::LayerChromium::scissorRect): (WebCore::LayerChromium::setScissorRect): (WebCore::LayerChromium::targetRenderSurface): (WebCore::LayerChromium::setTargetRenderSurface): (WebCore::LayerChromium::drawTransform): (WebCore::LayerChromium::setDrawTransform): (WebCore::LayerChromium::drawableContentRect): (WebCore::LayerChromium::setDrawableContentRect): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::updateCompositorResources): (WebCore::LayerRendererChromium::setCompositeOffscreen): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::drawLayer): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::createCCLayerImpl): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::RenderSurfaceChromium): (WebCore::RenderSurfaceChromium::~RenderSurfaceChromium): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::clearLayerList): (WebCore::RenderSurfaceChromium::layerList): (WebCore::RenderSurfaceChromium::setMaskLayer): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::createCCLayerImpl): (WebCore::TiledLayerChromium::tilingTransform): * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::synchronizeTreeRecursive): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::createCCLayerImpl): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: (WebCore::CCCanvasLayerImpl::create): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::~CCLayerImpl): (WebCore::CCLayerImpl::createRenderSurface): (WebCore::CCLayerImpl::bindContentsTexture): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::create): (WebCore::CCLayerImpl::renderSurface): (WebCore::CCLayerImpl::targetRenderSurface): (WebCore::CCLayerImpl::setTargetRenderSurface): * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::createGraphNodes): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::CCPluginLayerImpl): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: (WebCore::CCPluginLayerImpl::create): * platform/graphics/chromium/cc/CCRenderSurface.cpp: Copied from Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp. (WebCore::CCRenderSurface::CCRenderSurface): (WebCore::CCRenderSurface::~CCRenderSurface): (WebCore::CCRenderSurface::cleanupResources): (WebCore::CCRenderSurface::layerRenderer): (WebCore::CCRenderSurface::drawableContentRect): (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::releaseContentsTexture): (WebCore::CCRenderSurface::drawSurface): (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::name): (WebCore::writeIndent): (WebCore::CCRenderSurface::dumpSurface): (WebCore::CCRenderSurface::owningLayerId): * platform/graphics/chromium/cc/CCRenderSurface.h: Copied from Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h. (WebCore::CCRenderSurface::contentRectCenter): (WebCore::CCRenderSurface::drawOpacity): (WebCore::CCRenderSurface::setDrawOpacity): (WebCore::CCRenderSurface::setDrawTransform): (WebCore::CCRenderSurface::drawTransform): (WebCore::CCRenderSurface::setReplicaDrawTransform): (WebCore::CCRenderSurface::replicaDrawTransform): (WebCore::CCRenderSurface::setOriginTransform): (WebCore::CCRenderSurface::originTransform): (WebCore::CCRenderSurface::setScissorRect): (WebCore::CCRenderSurface::scissorRect): (WebCore::CCRenderSurface::setContentRect): (WebCore::CCRenderSurface::contentRect): (WebCore::CCRenderSurface::setSkipsDraw): (WebCore::CCRenderSurface::skipsDraw): (WebCore::CCRenderSurface::clearLayerList): (WebCore::CCRenderSurface::layerList): (WebCore::CCRenderSurface::setMaskLayer): (WebCore::CCRenderSurface::contentsTexture): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore::CCTiledLayerImpl::create): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (WebCore::CCVideoLayerImpl::create): 2011-08-02 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyWebkitTextCombine, CSSPropertyWebkitTextEmphasisPosition and CSSPropertyWebkitTextEmphasisStyle in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=65517 Reviewed by Dimitri Glazkov. No new tests. Just refactoring and moving code around. * css/CSSStyleApplyProperty.cpp: Added class ApplyPropertyTextEmphasisStyle to handle the special TextEmphasisStyle logic. (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Added initializations for CSSPropertyWebkitTextCombine, CSSPropertyWebkitTextEmphasisPosition, CSSPropertyWebkitTextEmphasisStyle. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing implementations. 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from SpeechInputResultList.idl https://bugs.webkit.org/show_bug.cgi?id=65570 Reviewed by Adam Barth. No new tests, all existing tests pass * page/SpeechInputResultList.idl: 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from EventSource.idl https://bugs.webkit.org/show_bug.cgi?id=65568 Reviewed by Adam Barth. No new tests, all existing tests pass. * page/EventSource.idl: 2011-08-02 Gavin Peters <gavinp@chromium.org> fail earlier to track down null CachedScript execution https://bugs.webkit.org/show_bug.cgi?id=65563 Over in http://code.google.com/p/chromium/issues/detail?id=75604 I can't reproduce the problem. Careful reading of the code hasn't led me to an obvious cause either. This patch should cause failure earlier, and lead to better stacks. I'll watch Chrome Canary's crash uploads carefully, and remove this CRASH() (and fix the underlying problem) once I understand it. Reviewed by Alexey Proskuryakov. No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce. * dom/ScriptRunner.cpp: (WebCore::ScriptRunner::queueScriptForExecution): 2011-08-02 Sailesh Agrawal <sail@chromium.org> Chromium: Update forked ScrollbarThemeChromiumMac.mm https://bugs.webkit.org/show_bug.cgi?id=65555 Merge recent changes to ScrollbarThemeMac.mm to ScrollbarThemeChromiumMac.mm. Reviewed by James Robinson. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterSetEnabled): * platform/chromium/ScrollbarThemeChromiumMac.h: (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeChromiumMac::updateEnabledState): (WebCore::ScrollbarThemeChromiumMac::paint): 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from SVG IDL files https://bugs.webkit.org/show_bug.cgi?id=65337 Reviewed by Nikolas Zimmermann. No new tests, all existing tests pass. * svg/ElementTimeControl.idl: * svg/SVGAnimationElement.idl: * svg/SVGDocument.idl: * svg/SVGElementInstance.idl: * svg/SVGElementInstanceList.idl: * svg/SVGException.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFilterElement.idl: * svg/SVGLocatable.idl: * svg/SVGMarkerElement.idl: * svg/SVGPathElement.idl: * svg/SVGSVGElement.idl: * svg/SVGStylable.idl: * svg/SVGStyleElement.idl: * svg/SVGTests.idl: * svg/SVGTextContentElement.idl: 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from CSS IDL files https://bugs.webkit.org/show_bug.cgi?id=65341 Reviewed by Adam Barth. No new tests. All existing tests pass. * css/CSSMediaRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSValueList.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/MediaQueryListListener.idl: * css/StyleMedia.idl: * css/StyleSheetList.idl: * css/WebKitCSSKeyframesRule.idl: * css/WebKitCSSMatrix.idl: 2011-08-02 Robert Kroeger <rjkroege@chromium.org> [chromium] Layering violations in gesture recognizer https://bugs.webkit.org/show_bug.cgi?id=65044 Reviewed by Adam Barth. Divided the gesture recognizer up to correct a layering violation by moving gesture implementation from it to EventHandler::handleGestureEvent so that the gesture recognizer could simply be an engine for generating gesture events from touch events. * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): * dom/WheelEvent.h: Added symbolic contstant for tick multiplier. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Removed construction of gesture recognizer. (WebCore::EventHandler::handleGestureEvent): Extended for new gesture events added in this patch. (WebCore::EventHandler::handleTouchEvent): Removed call into gesture recognizer. * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): Removed code to reset gesture recognizer. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (WebCore::PlatformGestureEvent::deltaX): (WebCore::PlatformGestureEvent::deltaY): (WebCore::PlatformGestureEvent::shiftKey): (WebCore::PlatformGestureEvent::ctrlKey): (WebCore::PlatformGestureEvent::altKey): (WebCore::PlatformGestureEvent::metaKey): Added additional gesture types and parameters. * platform/PlatformGestureRecognizer.h: * platform/chromium/FramelessScrollView.h: Added support for displatching gesture and touch events. * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::constructClickGestureEvent): (WebCore::InnerGestureRecognizer::processTouchEventForGestures): Removed all depedencies on EventHandler. Instead, create gesture events from touch event stream. (WebCore::InnerGestureRecognizer::constructScrollGesture): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): (WebCore::GestureRecognizerChromium::processTouchEventForGestures): (WebCore::GestureRecognizerChromium::reset): * platform/chromium/GestureRecognizerChromium.h: * platform/chromium/PopupMenuChromium.cpp: Added support to handle touch events and gesture events. (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): * platform/chromium/PopupMenuChromium.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleGestureEvent): Ignores the newly added gesture event types. 2011-08-01 Michael Saboff <msaboff@apple.com> Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors https://bugs.webkit.org/show_bug.cgi?id=65502 Reviewed by Anders Carlsson. Change the vm_copy in PurgeableBuffer::create to be a memcpy. The vm_copy causes the process to have additional references to the same memory region. These additional reference caused madvise(MADV_FREE_REUSABLE) to fail when it encountered such pages. No tests added this is a resource defect and not a functional issue. * platform/mac/PurgeableBufferMac.cpp: (WebCore::PurgeableBuffer::create): 2011-08-02 Stephen White <senorblanco@chromium.org> [Chromium] Remove an unnecessary readback during accelerated canvas-to-canvas draws. https://bugs.webkit.org/show_bug.cgi?id=65560 Reviewed by James Robinson. No new tests. (Printing has few tests, sadly.) * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::draw): Revert most of the changes to this file from http://trac.webkit.org/changeset/91870, except for the call which makes the source context current, so that the readPixels() still works. 2011-08-02 Filip Pizlo <fpizlo@apple.com> JSC GC is far too conservative about growing the heap size, particularly on desktop platforms https://bugs.webkit.org/show_bug.cgi?id=65438 Reviewed by Oliver Hunt. No change in behavior, thus no new tests. Pass the LargeHeap hint to JSGlobalData when creating the JSC runtime instance corresponding to non-worker JS code. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): 2011-08-02 Van Lam <vanlam@google.com> --webkit-visual-word: ctrl-arrow is not able to reach the boundary of line https://bugs.webkit.org/show_bug.cgi?id=61346 Reviewed by Ryosuke Niwa. When collecintg word boundaries in a box, explicitly check if the box is at the end of line (so it should contain the end-of-line position) and collect the end-of-line position. * editing/visible_units.cpp: (WebCore::isBoxVisuallyLastInLine): (WebCore::appendPositionAtLogicalEndOfLine): (WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality): (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality): 2011-08-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Should save scroll positions for network panel Response and Preview tabs. https://bugs.webkit.org/show_bug.cgi?id=65557 Reviewed by Pavel Feldman. * inspector/front-end/NetworkItemView.js: (WebInspector.ResourceContentView.prototype.get innerView): (WebInspector.ResourceContentView.prototype.set innerView): (WebInspector.ResourceContentView.prototype.hide): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): * inspector/front-end/ResourceResponseView.js: (WebInspector.ResourceResponseView.prototype.contentLoaded): 2011-08-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Remove initator column for JSC, fix network resource initiator tests. https://bugs.webkit.org/show_bug.cgi?id=65534 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype.switchToDetailedView): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype._toggleGridMode): (WebInspector.NetworkLogView.prototype._toggleViewingResourceMode): (WebInspector.NetworkDataGridNode.prototype.createCells): (WebInspector.NetworkDataGridNode.prototype.refreshResource): * inspector/front-end/Settings.js: 2011-08-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: SourceFrame should store saved scroll positions in View. https://bugs.webkit.org/show_bug.cgi?id=65472 Reviewed by Pavel Feldman. * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._sourceFileChanged): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.show): (WebInspector.SourceFrame.prototype.hide): (WebInspector.SourceFrame.prototype.get scrollLeft): (WebInspector.SourceFrame.prototype.set scrollLeft): (WebInspector.SourceFrame.prototype.get scrollTop): (WebInspector.SourceFrame.prototype.set scrollTop): * inspector/front-end/View.js: (WebInspector.View.prototype._innerShow): (WebInspector.View.prototype._innerHide): (WebInspector.View.prototype.detach): (WebInspector.View.prototype.storeScrollPositions): (WebInspector.View.prototype.inheritScrollPositionsFromView): (WebInspector.View.prototype.restoreScrollPositions): 2011-08-02 Jeff Miller <jeffm@apple.com> Move WTF_USE_AVFOUNDATION from JavaScriptCore/wtf/platform.h to WebCore/config.h https://bugs.webkit.org/show_bug.cgi?id=65552 Since this is a WebCore feature, there's no need to define it in JavaScriptCore/wtf/platform.h. Reviewed by Adam Roben. No change in functionality, so new tests. * config.h: Added WTF_USE_AVFOUNDATION. 2011-08-02 Alexandru Chiculita <achicu@adobe.com> Split RenderBlock::layoutRunsAndFloats into multiple methods https://bugs.webkit.org/show_bug.cgi?id=65376 Extracted layoutRunsAndFloatsInRange, linkToEndLineIfNeeded and repaintDirtyFloats methods and moved most of the locals to LineLayoutState. Reviewed by David Hyatt. No new tests needed because it is just refactoring existing code. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineLayoutState::LineLayoutState): (WebCore::LineLayoutState::endLineMatched): (WebCore::LineLayoutState::setEndLineMatched): (WebCore::LineLayoutState::checkForFloatsFromLastLine): (WebCore::LineLayoutState::setCheckForFloatsFromLastLine): (WebCore::LineLayoutState::lineInfo): (WebCore::LineLayoutState::endLineLogicalTop): (WebCore::LineLayoutState::setEndLineLogicalTop): (WebCore::LineLayoutState::endLine): (WebCore::LineLayoutState::setEndLine): (WebCore::LineLayoutState::lastFloat): (WebCore::LineLayoutState::setLastFloat): (WebCore::LineLayoutState::floats): (WebCore::LineLayoutState::floatIndex): (WebCore::LineLayoutState::setFloatIndex): (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::layoutRunsAndFloatsInRange): (WebCore::RenderBlock::linkToEndLineIfNeeded): (WebCore::RenderBlock::repaintDirtyFloats): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::determineStartPosition): (WebCore::RenderBlock::determineEndPosition): (WebCore::RenderBlock::matchedEndLine): 2011-08-02 Nat Duca <nduca@chromium.org> [chromium] Remove resizeOnscreenContent from LRC. It can be derived. https://bugs.webkit.org/show_bug.cgi?id=65519 Reviewed by James Robinson. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::setViewport): * platform/graphics/chromium/LayerRendererChromium.h: 2011-08-02 Nico Weber <thakis@chromium.org> [chromium] Fix unresolved symbols error when linking to libwebkit.dylib https://bugs.webkit.org/show_bug.cgi?id=65498 Reviewed by Dimitri Glazkov. * WebCore.gyp/mac/adjust_visibility.sh: 2011-08-02 Mihnea Ovidenie <mihnea@adobe.com> hover then un-hover makes state change https://bugs.webkit.org/show_bug.cgi?id=56401 Reviewed by David Hyatt. When a 'before' pseudo-element is re-added, we should check whether the insertion point is an anonymous block with inline children. If it is, then we should change the insertion point to the first child of the anonymous block, otherwise the 'before' pseudo-element ends up in a different block. We choose the insertion point to be the first child only if the anonymous block has children, otherwise the before element ends up in a wrong block. Tests: fast/dynamic/hover-before-position-after-style-change.html fast/dynamic/hover-before-position-after-style-change2.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-08-02 Andreas Kling <kling@webkit.org> [Qt] Simplify Path::translate() implementation. https://bugs.webkit.org/show_bug.cgi?id=65540 Reviewed by Benjamin Poulain. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::translate): 2011-07-30 Pavel Podivilov <podivilov@chromium.org> Web Inspector: merge FormattedSourceFile into SourceFile. https://bugs.webkit.org/show_bug.cgi?id=65411 Reviewed by Pavel Feldman. Prepare for splitting SourceFile into RawSourceCode and UISourceCode: * merge FormattedSourceFile into SourceFile * rename SourceFile to RawSourceCode * hide formatter worker lazy creation in ScriptFormatter * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter): (WebInspector.ScriptFormatter.prototype._didFormatContent): (WebInspector.ScriptFormatter.prototype.get _worker): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.didRequestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype._didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._didRequestContent): (WebInspector.RawSourceCode.prototype._invokeRequestContentCallbacks): 2011-08-02 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Fix build after changeset 92106 https://bugs.webkit.org/show_bug.cgi?id=65539 Reviewed by Adam Roben. No new tests since it is just a build fix. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-08-01 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [REGRESSION] Console evaluations leading to resource loading cause errors. https://bugs.webkit.org/show_bug.cgi?id=65466 Reviewed by Pavel Feldman. Test: http/tests/inspector/network/network-initiator-from-console.html * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): 2011-08-02 Alexander Pavlov <apavlov@chromium.org> Web Inspector: img[width=90] or align attributes shouldnt be shown above element.style block (as they have lower specificity) https://bugs.webkit.org/show_bug.cgi?id=65514 Reviewed by Pavel Feldman. * inspector/front-end/StylesSidebarPane.js: 2011-08-02 Gyuyoung Kim <gyuyoung.kim@samsung.com> [EFL] Add fullscreen button to media control UI. https://bugs.webkit.org/show_bug.cgi?id=64428 Implement paintMediaFullscreenButton and emit fullscreen signal. Reviewed by Antonio Gomes. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::edjeGroupFromFormType): (WebCore::RenderThemeEfl::emitMediaButtonSignal): (WebCore::RenderThemeEfl::paintMediaFullscreenButton): * platform/efl/RenderThemeEfl.h: 2011-08-01 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] webInspector.inspectedPage.reload() is broken https://bugs.webkit.org/show_bug.cgi?id=65476 - fixed webInspector.inspectedWindow.reload(), brought tests back. - removed redundant setting of user agent in FrameLoader::loadResourceSynchronously() Reviewed by Yury Semikhatsky. Test: http/tests/inspector/extensions-useragent.html * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onReload): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): 2011-08-02 Pavel Feldman <pfeldman@chromium.org> Not reviewed: fixing inspector tests. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): 2011-08-02 Pavel Feldman <pfeldman@google.com> Not reviewed: one line inspector style change. * inspector/front-end/networkLogView.css: (.network-error-row, .network-error-row .network-cell-subtitle): 2011-08-02 Amruth Raj <amruthraj@motorola.com> Custom cursors cause the WebProcess to crash https://bugs.webkit.org/show_bug.cgi?id=64802 Reviewed by Martin Robinson. * WebCore.exp.in: 2011-08-02 Pavel Feldman <pfeldman@google.com> Web Inspector: _normalizeEventTypes (via console's monitorEvents) doesnt handle all events like 'search' and other atypical ones. https://bugs.webkit.org/show_bug.cgi?id=65468 Reviewed by Yury Semikhatsky. * inspector/InjectedScriptSource.js: 2011-08-02 Pavel Feldman <pfeldman@google.com> Web Inspector: 404/errors should get a RED visual treatment so easier to identify. https://bugs.webkit.org/show_bug.cgi?id=65471 Reviewed by Yury Semikhatsky. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): * inspector/front-end/networkLogView.css: (.network-error-cell): 2011-08-02 Pavel Feldman <pfeldman@google.com> Web Inspector: arrow is a pain to click in console. Drive-by selection reset fix. https://bugs.webkit.org/show_bug.cgi?id=65467 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._messagesClicked): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement): * inspector/front-end/inspector.css: (.properties-tree li): (.properties-tree li.parent::before): * inspector/front-end/treeoutline.js: (TreeElement.treeElementToggled): 2011-08-01 Pavel Feldman <pfeldman@google.com> Web Inspector: button + "New style rule" https://bugs.webkit.org/show_bug.cgi?id=65409 Reviewed by Yury Semikhatsky. Test: inspector/styles/styles-add-new-rule.html * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): 2011-08-01 Luke Macpherson <macpherson@chromium.org> Don't set m_fontDirty when setting zoom unless zoom has actually changed https://bugs.webkit.org/show_bug.cgi?id=65092 Reviewed by Darin Adler. No new tests as no functionality changed - this is an optimization that should be logically equivalent to the current code. The intent here is to avoid setting m_fontDirty unless the fornt information is actually dirty. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): (WebCore::CSSStyleSelector::applyProperty): Use setZoom and setEffectiveZoom wrapper functions. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::setZoom): Wrapper for m_style->setZoom() that automatically updates m_fontDirty. (WebCore::CSSStyleSelector::setEffectiveZoom): Wrapper for m_style->setEffectiveZoom that automatically updates m_fontDirty. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::ensurePropertyMap): Use * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setZoom): Return true only if underlying values change. (WebCore::InheritedFlags::setZoomWithoutReturnValue): Return void to match function pointer type where required. (WebCore::InheritedFlags::setEffectiveZoom): Return true only if underlying values change. 2011-08-01 Jean-luc Brouillet <jeanluc@chromium.org> Removing old source files in gyp files that slow build https://bugs.webkit.org/show_bug.cgi?id=65503 Reviewed by Adam Barth. A number of stale files are listed in the gyp files. These slow the build on Visual Studio 2010. Removing them. * WebCore.gypi: 2011-08-01 Bradley Nelson <bradnelson@chromium.org> Shard webcore_remaining for msvs official builds https://bugs.webkit.org/show_bug.cgi?id=65475 Reviewed by Darin Fisher. webcore_remaining has consistently exceeded Visual Studio 2008's capacity to link when link time code generation is turned on (full release builds). This has been dealt with the past by carving off larger and larger pieces of webcore_remaining (ie webcore_html, webcore_renderer etc). A new option has been added to gyp to automate this sharding: 'msvs_shard': SHARD_COUNT, Targets marked in this way will be built in several pieces (target_0, target_1...). Since the resulting project is less comprehensible in the IDE (and since the linking limitation only afflicts official builds), this option is only needed for those builds. This patch shards webcore_remaining into 10 parts for official builds. * WebCore.gyp/WebCore.gyp: 2011-08-01 Alice Boxhall <aboxhall@chromium.org> WAI-ARIA textbox role should be AXTextArea for aria-multiline=true, AXTextField for aria-multiline=false https://bugs.webkit.org/show_bug.cgi?id=65451 Reviewed by Chris Fleizach. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): 2011-08-01 srikumar bonda <srikumar.b@gmail.com> Use threadsafeCopy() API when using Database Directory path variable https://bugs.webkit.org/show_bug.cgi?id=65436 Reviewed by David Levin. Use threadsafeCopy() API while using m_databaseDirectoryPath string variable when the databaseGuard lock hasn't been taken in DatabaseTracker class. This is just a safety fix. No changes to functionality so no new tests. * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::trackerDatabasePath): (WebCore::DatabaseTracker::deleteOrigin): 2011-08-01 Michael Nordman <michaeln@google.com> [Chromium] WebSQLDatabase version handling is broken in multi-process browsers. https://bugs.webkit.org/show_bug.cgi?id=65486 The WebCore::AbstractDatabase class maintains a global in-memory map of the version numbers associated with open database files, but that map is not reliable in a multi-process system like Chrome. So instead of relying on the cached values in that map, we read the value from the database (and update the cached value) where possible. There are two edge cases where that's not possible because the scriptable interface requires synchronous access to the version: the .version attribute getter and the .openDatabase() method. In those cases, we have no choice but to use the potentially stale cached value. Reviewed by Darin Fisher. No new tests. Existing layout tests cover the version handling functionality. * storage/AbstractDatabase.cpp: (WebCore::AbstractDatabase::version): (WebCore::AbstractDatabase::performOpenAndVerify): (WebCore::AbstractDatabase::getVersionFromDatabase): (WebCore::AbstractDatabase::setVersionInDatabase): (WebCore::AbstractDatabase::setExpectedVersion): (WebCore::AbstractDatabase::getCachedVersion): (WebCore::AbstractDatabase::setCachedVersion): (WebCore::AbstractDatabase::getActualVersionForTransaction): * storage/AbstractDatabase.h: (WebCore::AbstractDatabase::expectedVersion): * storage/ChangeVersionWrapper.cpp: (WebCore::ChangeVersionWrapper::handleCommitFailedAfterPostflight): * storage/ChangeVersionWrapper.h: * storage/Database.cpp: (WebCore::Database::openDatabase): * storage/DatabaseSync.cpp: (WebCore::DatabaseSync::openDatabaseSync): (WebCore::DatabaseSync::changeVersion): * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::SQLTransaction): (WebCore::SQLTransaction::executeSQL): (WebCore::SQLTransaction::openTransactionAndPreflight): (WebCore::SQLTransaction::runCurrentStatement): (WebCore::SQLTransaction::postflightAndCommit): * storage/SQLTransaction.h: * storage/SQLTransactionSync.cpp: (WebCore::SQLTransactionSync::SQLTransactionSync): (WebCore::SQLTransactionSync::executeSQL): (WebCore::SQLTransactionSync::begin): * storage/SQLTransactionSync.h: 2011-08-01 Tim Horton <timothy_horton@apple.com> Severe shadow repaint issues with SVGText elements https://bugs.webkit.org/show_bug.cgi?id=63648 <rdar://problem/7632269> Reviewed by Darin Adler. Make SVG elements which inherit from RenderSVGBlock take text-shadow overflow into account when determining whether or not they should draw Test: svg/custom/repaint-shadow.svg * rendering/RenderBox.h: (WebCore::RenderBox::visualOverflowRect): * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::visualOverflowRect): * rendering/svg/RenderSVGBlock.h: 2011-08-01 Zhenyao Mo <zmo@google.com> Unreviewed, rolling out r92022. http://trac.webkit.org/changeset/92022 https://bugs.webkit.org/show_bug.cgi?id=65203 try to see if this is causing a bunch of browser tests failues on win bots - will recommit if not * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): (WebCore::windowsCanHandleTextDrawingWithoutShadow): * platform/graphics/skia/SkiaFontWin.h: 2011-08-01 Scott Graham <scottmg@chromium.org> REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Reviewed by Antti Koivisto. Upon completing a load start a Timer to iterate through CachedResourceLoader's m_documentResources map to check for any items that have only one reference (thus being the reference in the map itself). The map should really be weak, but because the CachedResourceHandle achieves bookkeeping work in addition to reference counting, this is a simpler and more localized way to free the used memory while maintaining the other behaviour (when CachedResource is used as proxy). With this patch the testcase at https://bugs.webkit.org/attachment.cgi?id=93850 should no longer consume 400MB of ram on load. Test added for crash discovered in previous revision, but no tests for memory usage. Test: http/tests/inspector/network/disabled-cache-crash.html * WebCore.exp.in: * loader/cache/CachedResource.h: (WebCore::CachedResource::hasOneHandle): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::loadDone): (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): * loader/cache/CachedResourceLoader.h: * testing/Internals.cpp: (WebCore::Internals::disableMemoryCache): * testing/Internals.h: * testing/Internals.idl: 2011-08-01 Jochen Eisinger <jochen@chromium.org> Never override the policy URL on form submissions. https://bugs.webkit.org/show_bug.cgi?id=61809 Reviewed by Adam Barth. Tests: http/tests/security/cookies/third-party-cookie-blocking-main-frame.html http/tests/security/cookies/third-party-cookie-blocking-user-action.html http/tests/security/cookies/third-party-cookie-blocking.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::addExtraFieldsToSubresourceRequest): (WebCore::FrameLoader::addExtraFieldsToMainResourceRequest): (WebCore::FrameLoader::addExtraFieldsToRequest): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::loadDifferentDocumentItem): * loader/FrameLoader.h: 2011-08-01 Ryosuke Niwa <rniwa@webkit.org> Update comment added in r92139 per Darin's suggestion. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): 2011-08-01 Ryosuke Niwa <rniwa@webkit.org> Search field in designMode causes a crash https://bugs.webkit.org/show_bug.cgi?id=65362 Reviewed by Dimitri Glazkov. The crashed was caused by editing code inadvertently deleting search and cancel buttons in the design mode. Fixed the bug by avoid inheriting user-modify property from the shadow host. Test: editing/input/search-field-crash-in-designmode.html * css/CSSStyleSelector.cpp: (WebCore::isAtShadowBoundary): Moved. (WebCore::CSSStyleSelector::styleForElement): Overrides -webkit-user-modify by the initial value after m_style inherited the values from m_parentStyle but before applying matched rules. * dom/Node.cpp: (WebCore::Node::rendererIsEditable): Ignore page's editability inside a shadow DOM. 2011-08-01 Marco Peereboom <marco@peereboom.us> [Soup] Set default max-conns to a more sane default value and fix comment https://bugs.webkit.org/show_bug.cgi?id=65335 Reviewed by Martin Robinson. Rigged the xxxterm web browser and validated that the default values were set properly. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::defaultSession): 2011-07-28 Abhishek Arya <inferno@chromium.org> Regression(82144): Crash in TrailingObjects::updateMidpointsForTrailingBoxes https://bugs.webkit.org/show_bug.cgi?id=65137 Fix the looping condition to prevent trailingSpaceMidpoint from becoming negative. Reviewed by Dave Hyatt. Test: fast/block/update-midpoints-for-trailing-boxes-crash.html * rendering/RenderBlockLineLayout.cpp: (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): 2011-08-01 Benjamin Poulain <benjamin@webkit.org> [Qt] OpenGLShims does not build on ARM https://bugs.webkit.org/show_bug.cgi?id=65465 Reviewed by Noam Rosenthal. Fix the build with OpenGL ES 2: -lookupOpenGLFunctionAddress() was defined but not used for OpenGL ES. -glBlitFramebuffer() and glRenderbufferStorageMultisample() are not part of the specification. When those are available as platform extension, the extension has been added. -GLchar is not defined on some platform. The patch adds the same typedef as the official definition to avoid conflicts. * platform/graphics/cairo/OpenGLShims.cpp: (lookupOpenGLFunctionAddress): (WebCore::initializeOpenGLShims): * platform/graphics/cairo/OpenGLShims.h: 2011-08-01 Yury Semikhatsky <yurys@chromium.org> Unreviewed. Trivial fix for inspector/debugger/debugger-completions-on-call-frame.html after r92122. * inspector/front-end/ConsoleView.js: 2011-08-01 Hayato Ito <hayato@chromium.org> Add support for getting an element in shadow root by its id into a window.internals object. https://bugs.webkit.org/show_bug.cgi?id=64587 Reviewed by Hajime Morita. Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::getElementByIdInShadowRoot): * testing/Internals.h: * testing/Internals.idl: 2011-07-15 Hayato Ito <hayato@chromium.org> Add support for retrieving an element in TreeScope by id to window.internals object. https://bugs.webkit.org/show_bug.cgi?id=64587 Reviewed by Hajime Morita. Test: fast/dom/shadow/get-element-by-id-in-shadow.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::getElementByIdInTreeScope): * testing/Internals.h: * testing/Internals.idl: 2011-08-01 Yury Semikhatsky <yurys@chromium.org> Web Inspector: typing an expression in an iframe leads to multiple "Unsafe JavaScript attempt to access frame..." errors https://bugs.webkit.org/show_bug.cgi?id=65457 Console completions are now done using evaluation which returns a JSON object with all property names rather than a remote object. Also Runtime.evaluate and Runtime.callFunctionOn commands were extended with an optional parameter that allows to get result as JSON value. Reviewed by Pavel Feldman. Test: http/tests/inspector/console-cd-completions.html * inspector/InjectedScript.cpp: (WebCore::InjectedScript::evaluate): (WebCore::InjectedScript::callFunctionOn): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): (): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::asBool): (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): * inspector/InspectorRuntimeAgent.h: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._completions.evaluated.getCompletions): (WebInspector.ConsoleView.prototype._completions.evaluated): (WebInspector.ConsoleView.prototype._completions.receivedPropertySet): (WebInspector.ConsoleView.prototype._completions): (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.RemoteObject.prototype.callFunctionJSON): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): 2011-08-01 Mihnea Ovidenie <mihnea@adobe.com> BORDER attribute with the object tag, using percentage values not working. https://bugs.webkit.org/show_bug.cgi?id=65176 Reviewed by Hajime Morita. When border presentational attribute for object element has % in it, it should be parsed using HTML parser rules. Test: fast/borders/border-width-percent.html * html/HTMLElement.cpp: (WebCore::HTMLElement::parseBorderWidthAttribute): * html/HTMLElement.h: * html/HTMLImageElement.cpp: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): 2011-08-01 Yuta Kitamura <yutak@chromium.org> WebSocket: Receive URL and subprotocol in WebSocketChannel::connect() https://bugs.webkit.org/show_bug.cgi?id=65367 Reviewed by Kent Tamura. To implement multiple subprotocols support (bug 65247), WebSocket::connect() will need to validate the value of subprotocols after constructing WebSocketChannel, because the result depends on which WebSocket protocol is used, which is obtained from WebSocketChannel::useHixie76Protocol(). This means the subprotocol value will not be available at the time of WebSocketChannel construction. This change moves URL and subprotocol arguments in WebSocketChannel constructor to WebSocketChannel::connect(), which allows WebSocket::connect() function to check the subprotocol value before the actual connection is established. Relocating URL argument is technically not necessary, but seemed legitimate in terms of functional correspondence between WebSocket and WebSocketChannel (constructor versus connect()). No change in behavior, thus no new tests. * websockets/ThreadableWebSocketChannel.cpp: Remove "url" and "protocol" arguments from constructor and add them in connect(). (WebCore::ThreadableWebSocketChannel::create): * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::connect): * websockets/WebSocketChannel.cpp: Same as ThreadableWebSocketChannel. (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::connect): InspectorInstrumentation::didCreateWebSocket() call was moved to connect() because it needs URL. This does not change behavior, because connect() is guaranteed to be called immediately after WebSocketChannel is constructed. * websockets/WebSocketChannel.h: (WebCore::WebSocketChannel::create): * websockets/WorkerThreadableWebSocketChannel.cpp: Same as ThreadableWebSocketChannel. (WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::connect): (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer): (WebCore::WorkerThreadableWebSocketChannel::Peer::connect): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge): (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): * websockets/WorkerThreadableWebSocketChannel.h: (WebCore::WorkerThreadableWebSocketChannel::create): (WebCore::WorkerThreadableWebSocketChannel::Peer::create): (WebCore::WorkerThreadableWebSocketChannel::Bridge::create): 2011-08-01 Luke Macpherson <macpherson@chromium.org> Add iterator to CSSValueList https://bugs.webkit.org/show_bug.cgi?id=65297 Reviewed by Darin Adler. No new tests / refactoring only. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isLength): Add shorthand to determine if this primitive value is a length. * css/CSSStyleSelector.cpp: Use CSSValueListIterator throughout. (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::applyPageSizeProperty): (WebCore::CSSStyleSelector::createTransformOperations): * css/CSSValueList.cpp: (WebCore::CSSValueList::copy): Use itemWithoutBoundsCheck() instead of item(). * css/CSSValueList.h: Add CSSValueListIterator and CSSValueListInspector class definitions. (WebCore::CSSValueList::item) Provide inline definition of item. (WebCore::CSSValueListIterator::CSSValueListIterator): (WebCore::CSSValueListIterator::hasMore): Return true if there are more values to consume, including the current value. (WebCore::CSSValueListIterator::value): Return the value at the current position. (WebCore::CSSValueListIterator::next): Move the iterator forward to the next item. (WebCore::CSSValueListIterator::index): Return the current position in the list. (WebCore::CSSValueListInspector::item): Return the item at a given index. (WebCore::CSSValueListInspector::first): Return the first item in the list. (WebCore::CSSValueListInspector::second): Return the second item in the list. (WebCore::CSSValueListInspector::length): Return the size of the underlying list. 2011-08-01 Pavel Feldman <pfeldman@google.com> Web Inspector: group scripts by folder in the scripts selector. https://bugs.webkit.org/show_bug.cgi?id=65321 Reviewed by Yury Semikhatsky. Test: inspector/debugger/scripts-sorting.html * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._sourceFileAdded.get if): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): 2011-07-28 Pavel Feldman <pfeldman@google.com> Web Inspector: [protocol] methods where all parameters are optional should not require empty params object. https://bugs.webkit.org/show_bug.cgi?id=65331 Reviewed by Yury Semikhatsky. * inspector/CodeGeneratorInspector.pm: (generateBackendFunction): (generateArgumentGetters): 2011-08-01 Adam Barth <abarth@webkit.org> application/json MIME type shouldn't cause warnings in <script> tags https://bugs.webkit.org/show_bug.cgi?id=65448 Reviewed by Pavel Feldman. This patch stops the web inspector from logging a ton of spam warnings when a web page uses a JSONP service (which points script tags at application/json resources). * inspector/front-end/inspector.js: (WebInspector.reset): 2011-08-01 Yuta Kitamura <yutak@chromium.org> WebSocket: Rename SocketStreamHandleClient member functions https://bugs.webkit.org/show_bug.cgi?id=65374 Reviewed by Kent Tamura. Rename SocketStreamHandleClient member functions to avoid conflict of the names of FileReaderLoaderClient functions. No change in behavior, thus no new tests are added. * platform/network/SocketStreamHandleClient.h: (WebCore::SocketStreamHandleClient::didOpenSocketStream): (WebCore::SocketStreamHandleClient::didCloseSocketStream): (WebCore::SocketStreamHandleClient::didReceiveSocketStreamData): (WebCore::SocketStreamHandleClient::didFailSocketStream): * platform/network/brew/SocketStreamHandleBrew.cpp: (WebCore::SocketStreamHandlePrivate::socketConnected): (WebCore::SocketStreamHandlePrivate::socketReadyRead): (WebCore::SocketStreamHandlePrivate::socketClosed): (WebCore::SocketStreamHandlePrivate::socketError): * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::addCONNECTCredentials): (WebCore::SocketStreamHandle::readStreamCallback): (WebCore::SocketStreamHandle::writeStreamCallback): (WebCore::SocketStreamHandle::reportErrorToClient): (WebCore::SocketStreamHandle::platformClose): * platform/network/qt/SocketStreamHandleQt.cpp: (WebCore::SocketStreamHandlePrivate::socketConnected): (WebCore::SocketStreamHandlePrivate::socketReadyRead): (WebCore::SocketStreamHandlePrivate::socketClosedCallback): (WebCore::SocketStreamHandlePrivate::socketErrorCallback): * platform/network/soup/SocketStreamHandleSoup.cpp: (WebCore::SocketStreamHandle::connected): (WebCore::SocketStreamHandle::readBytes): (WebCore::SocketStreamHandle::platformSend): (WebCore::SocketStreamHandle::platformClose): * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::didOpenSocketStream): (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::didReceiveSocketStreamData): (WebCore::WebSocketChannel::didFailSocketStream): (WebCore::WebSocketChannel::resumeTimerFired): * websockets/WebSocketChannel.h: 2011-07-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r92094. http://trac.webkit.org/changeset/92094 https://bugs.webkit.org/show_bug.cgi?id=65443 Triggered many asserts (Requested by abarth on #webkit). * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): 2011-07-31 Dominic Cooney <dominicc@chromium.org> Event target set to null post event dispatch https://bugs.webkit.org/show_bug.cgi?id=63934 Reviewed by Dimitri Glazkov. Test: fast/events/event-target-reset.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): Reset target to outermost shadow host. 2011-07-31 Sam Weinig <sam@webkit.org> REGRESSION: getBoundingClientRect() method of Range incorrectly returns null for collapsed Range https://bugs.webkit.org/show_bug.cgi?id=65324 Reviewed by Ryosuke Niwa. Update to more closely match the spec. * dom/Range.cpp: (WebCore::Range::getClientRects): Return an empty ClientRectList instead of null when the range is empty. (WebCore::Range::getBoundingClientRect): Always return a ClientRect, even for an empty bounding rect. 2011-07-29 Ryosuke Niwa <rniwa@webkit.org> [HTML5] Implement the selectionDirection property on input and textarea https://bugs.webkit.org/show_bug.cgi?id=60403 Reviewed by Darin Adler. Implements selectionDirection property as specified in HTML5 section 4.10.20: http://www.whatwg.org/specs/web-apps/current-work/#textFieldSelection selectionDirection is a property on input and textarea elements, which, on getting returns either "none", "forward", or "backward" corresponding to the current selection direction, and on setting, modifies the direction of the current selection. When selection doesn't exist or direction is unknown, "none" is returned on getting. Setting the property value to neither of above values will result in setting "none". This patch also adds the optional third argument, direction, to setSelectionRange. Test: fast/forms/selection-direction.html fast/forms/selection-wrongtype.html * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::selectionDirection): Added. (WebCore::JSHTMLInputElement::setSelectionDirection): Added. (WebCore::JSHTMLInputElement::setSelectionRange): Processes the third argument. * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter): Added. (WebCore::V8HTMLInputElement::selectionDirectionAccessorSetter): Added. (WebCore::V8HTMLInputElement::setSelectionRangeCallback): Processes the third argument. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateFocusAppearance): Calls hasCachedSelection. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance): Ditto. (WebCore::HTMLInputElement::setValue): Calls cacheSelection with SelectionHasNoDirection. * html/HTMLTextAreaElement.idl: Added selectionDirection and the third argument to setSelectionRange. * html/HTMLInputElement.idl: Ditto. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): Initializes m_cachedSelectionDirection. (WebCore::HTMLTextFormControlElement::setSelectionStart): Calls setSelectionRange. (WebCore::HTMLTextFormControlElement::setSelectionEnd): Ditto. (WebCore::HTMLTextFormControlElement::setSelectionDirection): Added. (WebCore::HTMLTextFormControlElement::select): Calls setSelectionRange with SelectionHasNoDirection. (WebCore::HTMLTextFormControlElement::setSelectionRange): Added the version that takes direction string as the third argument, which calls the version that takes two ints and TextFieldSelectionDirection. (WebCore::HTMLTextFormControlElement::selectionStart): Calls hasCachedSelection. (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto. (WebCore::directionString): Added. (WebCore::HTMLTextFormControlElement::selectionDirection): Added. (WebCore::HTMLTextFormControlElement::computeSelectionDirection): Added. (WebCore::HTMLTextFormControlElement::selection): Calls hasCachedSelection. (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Calls setSelectionRange. (WebCore::HTMLTextFormControlElement::selectionChanged): Calls cacheSelection. * html/HTMLTextFormControlElement.h: (WebCore::HTMLTextFormControlElement::cacheSelection): Takes TextFieldSelectionDirection. (WebCore::HTMLTextFormControlElement::hasCachedSelection): Extracted from hasCachedSelectionStart; cacheSelection is the only function that modifies m_cacheSelectionStart and m_cacheSelectionEnd and none of its callers ever set one of them be -1 so they are always both -1 or both non-negative. Thus, having two separate functions for m_cacheSelectionStart and m_cacheSelectionEnd was redundant. 2011-07-31 Daniel Bates <dbates@webkit.org> [GTK] Remove unused variable coreChild in WebCore::getChildForTable() https://bugs.webkit.org/show_bug.cgi?id=65427 This variable was unused when it was initially added in <http://trac.webkit.org/changeset/89660> (bug #62718) and it is unused today. We should remove it. This will also resolve a compiler warning. Reviewed by Xan Lopez. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (getChildForTable): 2011-07-30 Daniel Bates <dbates@webkit.org> Fix the WinCairo Debug build after <http://trac.webkit.org/changeset/91914> (https://bugs.webkit.org/show_bug.cgi?id=64744) * WebCore.vcproj/WebCore.vcproj: Remove ContextShadowCairo.cpp from the build since this file was deleted in <http://trac.webkit.org/changeset/91914>. 2011-07-30 Daniel Bates <dbates@webkit.org> Fix the Chromium Linux Release Flexbot build after <http://trac.webkit.org/changeset/92004> (https://bugs.webkit.org/show_bug.cgi?id=65342) * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Update the definition of RenderFlexibleBox::layoutBlock() to be consistent with its declaration in RenderFlexibleBox.h; Add argument layoutPass of type BlockLayoutPass. 2011-07-30 Adam Barth <abarth@webkit.org> Update run-bindings-tests results after http://trac.webkit.org/changeset/92068 * bindings/scripts/test/JS/JSTestCallback.cpp: 2011-07-30 Patrick Gansterer <paroga@webkit.org> Remove inclusion of MainThread.h from Threading.h https://bugs.webkit.org/show_bug.cgi?id=65081 Reviewed by Darin Adler. Add missing include statements for MainThread. * bindings/js/DOMWrapperWorld.cpp: * bindings/js/JSDOMWindowBase.cpp: * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): * bindings/v8/DOMDataStore.cpp: * bindings/v8/DOMWrapperWorld.cpp: * bindings/v8/V8Binding.cpp: * bindings/v8/V8DOMMap.cpp: * bindings/v8/V8DOMWrapper.h: * dom/EventTarget.cpp: * fileapi/LocalFileSystem.cpp: * loader/CrossOriginPreflightResultCache.cpp: * loader/ResourceLoadScheduler.cpp: * loader/WorkerThreadableLoader.cpp: * loader/appcache/ApplicationCacheGroup.cpp: * page/DOMWindow.cpp: * page/History.cpp: * page/SecurityOrigin.cpp: * page/mac/EventHandlerMac.mm: * platform/MIMETypeRegistry.cpp: * platform/ThreadGlobalData.cpp: * platform/ThreadTimers.cpp: * platform/TreeShared.h: * platform/audio/HRTFDatabaseLoader.cpp: * platform/graphics/Font.cpp: * platform/graphics/FontFallbackList.h: * platform/graphics/FontFastPath.cpp: * platform/graphics/Image.cpp: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: * platform/graphics/cg/ImageBufferCG.cpp: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: * platform/mac/LocalizedStringsMac.mm: * platform/mac/SharedBufferMac.mm: * platform/network/BlobResourceHandle.cpp: * platform/network/cf/DNSCFNet.cpp: * platform/network/cf/LoaderRunLoopCF.cpp: * platform/text/LocalizedNumberICU.cpp: * platform/text/TextEncodingRegistry.cpp: * platform/text/mac/LocalizedNumberMac.mm: * platform/win/LocalizedStringsWin.cpp: * storage/LocalStorageThread.cpp: * storage/StorageAreaImpl.cpp: * storage/StorageAreaSync.cpp: * storage/StorageNamespaceImpl.cpp: * storage/StorageSyncManager.cpp: * webaudio/AsyncAudioDecoder.cpp: * webaudio/AudioBufferSourceNode.cpp: * webaudio/AudioContext.h * webaudio/AudioContext.cpp: * webaudio/AudioNode.cpp: * webaudio/ConvolverNode.cpp: * webaudio/OfflineAudioDestinationNode.cpp: * webaudio/RealtimeAnalyser.cpp: * webaudio/WaveShaperNode.cpp: * websockets/WorkerThreadableWebSocketChannel.cpp: * workers/WorkerMessagingProxy.cpp: 2011-07-30 Enrica Casucci <enrica@apple.com> REGRESSION: culledInlineAbsoluteRects needs to translate a 0,0 point to absolute coordinates so that the top left position is accurate. https://bugs.webkit.org/show_bug.cgi?id=65419 <rdar://problem/9408862> This patch fixes a regression introduced in r83075. Make sure that culledInlineAbsoluteRects still does a translation of a 0,0 point to absolute coordinates so that the top left position is accurate. This code path could not be tested via JavaScript. The patch extends the Internals object to be able to test this case. Reviewed by Dan Bernstein. Test: fast/inline/skipped-whitespace-boundingBox.html * WebCore.exp.in: Added some exports. * rendering/RenderInline.cpp: (WebCore::RenderInline::culledInlineAbsoluteRects): * testing/Internals.cpp: (WebCore::Internals::boundingBox): * testing/Internals.h: * testing/Internals.idl: 2011-07-26 Pavel Podivilov <podivilov@chromium.org> Web Inspector: move location conversion functions to SourceFile. https://bugs.webkit.org/show_bug.cgi?id=65185 Reviewed by Pavel Feldman. Test: inspector/debugger/source-file.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation): * inspector/front-end/SourceFile.js: (WebInspector.SourceFile.prototype.rawLocationToUILocation): (WebInspector.SourceFile.prototype.uiLocationToRawLocation): (WebInspector.SourceFile.prototype._scriptForRawLocation): (WebInspector.SourceFile.prototype.createSourceMappingIfNeeded): (WebInspector.FormattedSourceFile.prototype.createSourceMappingIfNeeded): (WebInspector.FormattedSourceFile.prototype._didRequestContent): 2011-07-29 Rob Buis <rbuis@rim.com> URL references are completely broken in SVG https://bugs.webkit.org/show_bug.cgi?id=63283 Reviewed by Nikolas Zimmermann. Change SVGURIElement::getTarget to be more strict about iri resolving and make it serve as a central place to resolve a iri to a SVGElement. The iri can be same-document or external, for now we only handle the former, the latter will be handled in bug 65344. Accept as same-document if the iri combined with the base uri equals the document url (ignoring the fragment identifier). For convenience a method is added to lookup the element, if found. Tests: svg/custom/external-paintserver-reference.svg svg/custom/linking-base-external-reference.xhtml svg/custom/uri-reference-handling.svg * css/CSSCursorImageValue.cpp: (WebCore::resourceReferencedByCursorElement): (WebCore::CSSCursorImageValue::~CSSCursorImageValue): (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * css/CSSFontSelector.h: (WebCore::CSSFontSelector::document): * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::layoutPath): * rendering/svg/SVGResources.cpp: (WebCore::targetReferenceFromResource): (WebCore::paintingResourceFromSVGPaint): * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElements): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::requestImageResource): (WebCore::SVGFEImageElement::build): * svg/SVGGlyphRefElement.cpp: (WebCore::SVGGlyphRefElement::hasValidGlyphElement): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::pathElement): * svg/SVGPaint.cpp: (WebCore::SVGPaint::matchesTargetURI): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::updateReferencedText): (WebCore::SVGTRefElement::svgAttributeChanged): (WebCore::SVGTRefElement::buildPendingResource): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedIntoDocument): * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::fragmentIdentifierFromIRIString): (WebCore::SVGURIReference::targetElementFromIRIString): * svg/SVGURIReference.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::hasCycleUseReferencing): (WebCore::SVGUseElement::expandUseElementsInShadowTree): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::targetElement): 2011-07-29 James Simonsen <simonjam@chromium.org> Remove zipcar.com site specific hack added in r87361 https://bugs.webkit.org/show_bug.cgi?id=65405 Reviewed by Adam Barth. * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::insertedIntoDocument): 2011-07-29 James Robinson <jamesr@chromium.org> [chromium] Reorder functions in LayerRendererChromium.cpp to make bug 58840 easier to review https://bugs.webkit.org/show_bug.cgi?id=65354 Reviewed by Kenneth Russell. This moves a few function definitions in LayerRendererChromium around to make the patch on bug 58840 easier to review. In that patch, updatePropertiesAndRenderSurfaces() becomes a templated free function instead of a member function, so it has to be near the top of the .cpp. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces): (WebCore::LayerRendererChromium::updateLayers): 2011-07-29 Jeff Miller <jeffm@apple.com> Work-in-progress on Adopt AVCF media back end on Windows https://bugs.webkit.org/show_bug.cgi?id=65400 <rdar://problem/9083559> Prepare WebCore.vcproj to support AVCF media back end on Windows. Reviewed by Darin Adler. No changes to functionality so no new tests. * WebCore.vcproj/WebCore.vcproj: Added MediaPlayerPrivateAVFoundation and MediaPlayerPrivateAVFoundationCF sources. * WebCore.vcproj/WebCoreMediaQT.vsprops: Added additional include directories and dleay load DLLs for AVCF. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Added, just a stub for now. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Added, just a stub for now. 2011-07-29 Jeff Miller <jeffm@apple.com> Work-in-progress on Adopt AVCF media back end on Windows https://bugs.webkit.org/show_bug.cgi?id=65400 <rdar://problem/9083559> Make MediaPlayerPrivateAVFoundation::setDelayCallbacks() const and make the ivars it references mutable so other const member functions can call it. Reviewed by Darin Adler. No changes to functionality so no new tests. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 2011-07-29 Zhenyao Mo <zmo@google.com> Unreviewed, rolling out r92011. http://trac.webkit.org/changeset/92011 https://bugs.webkit.org/show_bug.cgi?id=65044 break chromium win build * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): * dom/WheelEvent.h: * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::handleTouchEvent): (WebCore::EventHandler::resetGestureRecognizer): * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): * platform/PlatformGestureEvent.h: * platform/PlatformGestureRecognizer.h: * platform/ScrollAnimatorWin.cpp: * platform/chromium/FramelessScrollView.h: * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::dispatchSyntheticClick): (WebCore::InnerGestureRecognizer::processTouchEventForGesture): (WebCore::InnerGestureRecognizer::scrollViaTouchMotion): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): * platform/chromium/GestureRecognizerChromium.h: (WebCore::GestureRecognizerChromium::reset): (WebCore::GestureRecognizerChromium::processTouchEventForGesture): * platform/chromium/PopupMenuChromium.cpp: * platform/chromium/PopupMenuChromium.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleGestureEvent): 2011-07-29 Adrienne Walker <enne@google.com> [chromium] Only force slow scrolling for iframes under --force-compositing-mode https://bugs.webkit.org/show_bug.cgi?id=65394 Reviewed by James Robinson. The previous code introduced by r91591 made composited frames as well as non-composited subframes go down the slow scrolling path. Adjust the check to use ownerElement to test for subframe and use hasCompositedContent() which is a more correct test for compositing than isEnclosedInCompositingLayer. * page/FrameView.cpp: (WebCore::FrameView::useSlowRepaints): 2011-07-29 Emil A Eklund <eae@chromium.org> -webkit-marquee with anonymous node causes segmentation fault in Node::document https://bugs.webkit.org/show_bug.cgi?id=64693 Reviewed by Simon Fraser. Test: fast/css/webkit-marquee-anonymous-node-crash.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): Add null check as renderer()->node() is null for anonymous nodes. 2011-07-29 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: * platform/graphics/skia/SkiaFontWin.h: 2011-07-29 Sam Weinig <sam@webkit.org> Move Region code from WebKit2 to WebCore https://bugs.webkit.org/show_bug.cgi?id=65392 Reviewed by David Hyatt. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Update project files. * WebCore.exp.in: Update exports. * platform/graphics/Region.cpp: Copied from Source/WebKit2/Platform/Region.cpp. * platform/graphics/Region.h: Copied from Source/WebKit2/Platform/Region.h. Add files. 2011-07-29 Robert Kroeger <rjkroege@chromium.org> [chromium] Layering violations in gesture recognizer https://bugs.webkit.org/show_bug.cgi?id=65044 Reviewed by Adam Barth. Divided the gesture recognizer up to correct a layering violation by moving gesture implementation from it to EventHandler::handleGestureEvent so that the gesture recognizer could simply be an engine for generating gesture events from touch events. * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): * dom/WheelEvent.h: Added symbolic contstant for tick multiplier. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Removed construction of gesture recognizer. (WebCore::EventHandler::handleGestureEvent): Extended for new gesture events added in this patch. (WebCore::EventHandler::handleTouchEvent): Removed call into gesture recognizer. * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): Removed code to reset gesture recognizer. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (WebCore::PlatformGestureEvent::deltaX): (WebCore::PlatformGestureEvent::deltaY): (WebCore::PlatformGestureEvent::shiftKey): (WebCore::PlatformGestureEvent::ctrlKey): (WebCore::PlatformGestureEvent::altKey): (WebCore::PlatformGestureEvent::metaKey): Added additional gesture types and parameters. * platform/PlatformGestureRecognizer.h: * platform/ScrollAnimatorWin.cpp: (WebCore::ScrollAnimatorWin::handleGestureEvent): Added missing method needed to fix the build on windows. * platform/chromium/FramelessScrollView.h: Added support for displatching gesture and touch events. * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::constructClickGestureEvent): (WebCore::InnerGestureRecognizer::processTouchEventForGestures): Removed all depedencies on EventHandler. Instead, create gesture events from touch event stream. (WebCore::InnerGestureRecognizer::constructScrollGesture): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): (WebCore::GestureRecognizerChromium::processTouchEventForGestures): (WebCore::GestureRecognizerChromium::reset): * platform/chromium/GestureRecognizerChromium.h: * platform/chromium/PopupMenuChromium.cpp: Added support to handle touch events and gesture events. (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): * platform/chromium/PopupMenuChromium.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleGestureEvent): Ignores the newly added gesture event types. 2011-07-29 Eric Carlson <eric.carlson@apple.com> Load delegate not consulted before loading some poster images https://bugs.webkit.org/show_bug.cgi?id=65270 Reviewed by Joseph Pecoraro. * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::setDisplayMode): Don't ask a load delegate if it is OK to load an empty poster url. 2011-07-29 Jeff Miller <jeffm@apple.com> Re-sort one more file in the WebCore project with Visual Studio. * WebCore.vcproj/WebCore.vcproj: 2011-07-29 Jeff Miller <jeffm@apple.com> Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML. * WebCore.vcproj/WebCore.vcproj: 2011-07-29 Dan Bernstein <mitz@apple.com> Added the regional indicator symbols to the set of codepoints that force use of the complex text code path. Fixes <rdar://problem/9864578> Regional indicator symbols do not combine into national flags https://bugs.webkit.org/show_bug.cgi?id=65380 Reviewed by Anders Carlsson. Test: fast/text/regional-indicator-symobls.html * platform/graphics/Font.cpp: (WebCore::Font::codePath): Added handling of surrogate pairs, which returns Complex for characters in the range U+1F1E6..U+1F1FF. 2011-07-28 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=65342 Add support for positioned floats being placed into a RenderBlock's FloatingObject list and for correct propagation of those floating objects into descendants. Reviewed by Sam Weinig. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): The positioned float layout algorithm is 2-pass. You lay out without the positioned objects, and then once they have been placed, you lay out again and use that placement to determine the float positions. layoutBlock now has an extra parameter to indicate which layout pass you are in. (WebCore::RenderBlock::addOverflowFromFloats): Don't add overflow from positioned floats ever, since the positioning overflow function takes care of that already. (WebCore::RenderBlock::layoutBlockChild): Include positioned floats in the lowestFloatLogicalBottom we look at so that overhang is computed properly. (WebCore::RenderBlock::simplifiedLayout): If layoutPositionedObjects indicates that a positioned float moved, then we can't do simplified layout. Bail instead and do a full layout. (WebCore::RenderBlock::positionedFloatsNeedRelayout): Helper for layoutBlock in order to bypass the 2-pass model if we can detect that none of the positioned objects will actually need to lay out again. This allows incremental layout to not always fault back to 2-pass as normal flow content streams in. (WebCore::RenderBlock::layoutPositionedObjects): Modified to return a boolean indicating whether a positioned float got a layout. If so, we will lay out again once our positioned objects are placed. (WebCore::RenderBlock::insertFloatingObject): insertFloatingObject can now handle positioned objects being inserted. (WebCore::RenderBlock::positionNewFloats): positionNewFloats doesn't attempt to position this new type of float. It only handles left/right floats. (WebCore::RenderBlock::addPositionedFloats): Helper to add in the floating objects for positioned floats. This is used instead of positionNewFloats and just walks the positioned objects instead. (WebCore::RenderBlock::clearFloats): clearFloats now handles adding in positioned floats if the layout pass says they should be included. (WebCore::RenderBlock::marginLogicalLeftForChild): (WebCore::RenderBlock::marginLogicalRightForChild): New helpers used by addPositionedFloats. (WebCore::RenderBlock::FloatingObjects::clear): (WebCore::RenderBlock::FloatingObjects::increaseObjectsCount): (WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount): Make sure the object count tracking handles positioned floats as well as left/right floats. * rendering/RenderBlock.h: (WebCore::RenderBlock::logicalLeftForChild): New helper used by addPositionedFloats. (WebCore::RenderBlock::FloatingObject::FloatingObject): Change the constructor to take the RenderStyle enum. This makes the construction simpler. (WebCore::RenderBlock::hasPositionedFloats): A bit tracks whether or not a block has positioned floats in its positioned objects list. (WebCore::RenderBlock::hasOverhangingFloats): Modified to include positioned floats. (WebCore::RenderBlock::lowestFloatLogicalBottom): This function excludes positioned floats by default, so that places that - for example - expand to encompass their lowestFloatLogicalBottom won't accidentally expand to encompass positioned objects. (WebCore::RenderBlock::lowestFloatLogicalBottomIncludingPositionedFloats): A new function that includes positioned floats for callers that care. (WebCore::RenderBlock::FloatingObjects::FloatingObjects): (WebCore::RenderBlock::FloatingObjects::hasPositionedObjects): The object count tracking for positioned floats within a block's FloatingObjects list. * rendering/RenderBox.cpp: (WebCore::RenderBox::updateBoxModelInfoFromStyle): Make sure isFloating is set even if isPositioned is also set for the positioned float case. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): Modified to do the extra layout pass if needed. 2011-07-29 Scott Byer <scottbyer@chromium.org> Scroll animation refinements. https://bugs.webkit.org/show_bug.cgi?id=65154 Reviewed by Adam Barth. Fix scroll animation bugs when scrolling to the ends of a document. Smooth over slow event repeat rates better. Fix tests to allow for unit testing of scrolling up and not just down. Additional unit tests added to ScrollAnimatorNoneTest: ScrollQuadraticSmoothed, ScrollLotsQuadraticSmoothed, ScrollDownToBumper, ScrollUpToBumper * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::Parameters::Parameters): (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::scroll): * platform/ScrollAnimatorNone.h: 2011-07-29 Samuel White <samuel_white@apple.com> Add the ability to search the AccessibilityObject cache https://bugs.webkit.org/show_bug.cgi?id=64994 To support searching the AccessibilityObject cache, we first need to implement a minimal set of functions that will allow AccessibilityObjects to be identified when searching using common search criteria. The additional functions below complement the existing identification functionality already available and together provide a basic working set to build search on top of. Additionally, the blockquoteLevel function has been moved into the AccessibilityObject class to make it available to all platforms. Reviewed by Chris Fleizach. New tests will be included in the following patch that will also implement basic search functionality. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isBlockquote): (WebCore::AccessibilityObject::isLandmark): (WebCore::AccessibilityObject::hasMisspelling): (WebCore::AccessibilityObject::blockquoteLevel): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isUnvisited): (WebCore::AccessibilityObject::hasBoldFont): (WebCore::AccessibilityObject::hasItalicFont): (WebCore::AccessibilityObject::hasPlainText): (WebCore::AccessibilityObject::hasSameFont): (WebCore::AccessibilityObject::hasSameFontColor): (WebCore::AccessibilityObject::hasSameStyle): (WebCore::AccessibilityObject::hasStaticText): (WebCore::AccessibilityObject::hasUnderline): (WebCore::AccessibilityObject::tableLevel): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isUnvisited): (WebCore::AccessibilityRenderObject::hasBoldFont): (WebCore::AccessibilityRenderObject::hasItalicFont): (WebCore::AccessibilityRenderObject::hasPlainText): (WebCore::AccessibilityRenderObject::hasSameFont): (WebCore::AccessibilityRenderObject::hasSameFontColor): (WebCore::AccessibilityRenderObject::hasSameStyle): (WebCore::AccessibilityRenderObject::hasUnderline): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::tableLevel): * accessibility/AccessibilityTable.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (AXAttributeStringSetBlockquoteLevel): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-07-29 Zeng Huiqing <huiqing.zeng@intel.com> Avoid calling animation timer updates while the page is loading https://bugs.webkit.org/show_bug.cgi?id=64851 Reviewed by Simon Fraser. There is no need to update the animation timer for a RenderObject that has not yet been inserted into the render tree, or that doesn't have animations. Our tests show that this improves page loading by up to 3x on pages with a large number of transitionable objects. * page/animation/AnimationController.cpp: (WebCore::AnimationController::updateAnimations): 2011-07-29 Anders Carlsson <andersca@apple.com> Pass the HTTP referrer header for URLs loaded by plug-ins https://bugs.webkit.org/show_bug.cgi?id=65379 <rdar://problem/9822116> Reviewed by Sam Weinig. Export a symbol needed by WebKit2. * WebCore.exp.in: 2011-07-28 Leandro Gracia Gil <leandrogracia@chromium.org> Fix speech input icon rect on RTL directions. https://bugs.webkit.org/show_bug.cgi?id=65333 Reviewed by Tony Gentilcore. No new tests. This is used by platforms, not WebCore, and the base functionality is not changed but only the failing cases. * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): 2011-07-29 Kent Tamura <tkent@chromium.org> Make the ExceptionCode argument of Element::setShadowPseudoId() ASSERT_NO_EXCEPTION by default https://bugs.webkit.org/show_bug.cgi?id=65363 Reviewed by Hajime Morita. No new tests. Cleanup-only. * dom/Element.h: Make the ExceptionCode argument ASSERT_NO_EXCEPTION by default. * html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): Remove the ExceptionCode argument and ASSERT(!ec). * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updatePlaceholderText): ditto. * html/RangeInputType.cpp: (WebCore::RangeInputType::createShadowSubtree): ditto. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): ditto. (WebCore::TextFieldInputType::updatePlaceholderText): ditto. * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): ditto. 2011-07-28 Luke Macpherson <macpherson@chromium.org> Remove remaining uses of CSSPrimitiveValue::computeLengthIntForLength() https://bugs.webkit.org/show_bug.cgi?id=64919 Reviewed by Darin Adler. No new tests / cleanup only. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): Remove implementation of computeLengthIntForLength() * css/CSSPrimitiveValue.h: Remove definition of computeLengthIntForLength() * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLength::applyValue): Remove use of computeLengthIntForLength() * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove use of computeLengthIntForLength() * platform/Length.h: (WebCore::Length::setQuirk): Adds the ability to set the m_quirk member variable after construction. 2011-07-28 Anders Carlsson <andersca@apple.com> Unreviewed, rolling out r88601. (Requested by Sam Weinig). http://trac.webkit.org/changeset/88601 https://bugs.webkit.org/show_bug.cgi?id=62230 Caused a regression, see https://bugs.webkit.org/show_bug.cgi?id=64378 * dom/StyledElement.cpp: * dom/StyledElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): (WebCore::HTMLBodyElement::insertedIntoDocument): (WebCore::HTMLBodyElement::didMoveToNewOwnerDocument): * html/HTMLBodyElement.h: 2011-07-28 Justin Schuh <jschuh@chromium.org> Simplify createCanonicalUUIDString implementation. https://bugs.webkit.org/show_bug.cgi?id=65157 All ports support OS_RANDOMNESS, so better to have one implementation. Reviewed by Adam Barth. Change covered by existing tests. * platform/UUID.cpp: (WebCore::createCanonicalUUIDString): 2011-07-28 Devdatta Deshpande <pwjd73@motorola.com> Fixed gif animation dependency on system time https://bugs.webkit.org/show_bug.cgi?id=64996 Reviewed by James Robinson. Test: Load WebCore/manual-tests/animated-gif-looping.html Change system time to a time in past * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): Bitmap animation is now based on monotonicallyIncreasingTime instead of currentTime 2011-07-28 Luke Zarko <lukezarko@gmail.com> V8 should correctly serialize Boolean, Number and String objects. https://bugs.webkit.org/show_bug.cgi?id=65286 Reviewed by David Levin. New APIs were exposed to allow V8 to correctly serialize Boolean, Number and String objects, as well as detect certain native errors as required by the HTML5 Structured Clone algorithm (http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data). SerializedScriptValue should make use of these APIs. - Checks for and serializes Boolean, Number and String objects. - Checks for native errors and aborts should a script attempt to serialize them. - Small name change to clear up the code: m_objectReferenceStack => m_openCompositeReferenceStack Tests: fast/dom/Window/window-postmessage-clone.html fast/loader/stateobjects/pushstate-object-types.html * bindings/v8/SerializedScriptValue.cpp: (WebCore::V8ObjectMap::Writer::writeBooleanObject): (WebCore::V8ObjectMap::Writer::writeStringObject): (WebCore::V8ObjectMap::Writer::writeNumberObject): (WebCore::V8ObjectMap::Serializer::writeStringObject): (WebCore::V8ObjectMap::Serializer::writeNumberObject): (WebCore::V8ObjectMap::Serializer::writeBooleanObject): (WebCore::V8ObjectMap::Serializer::doSerialize): (WebCore::V8ObjectMap::Reader::read): (WebCore::V8ObjectMap::Reader::readStringObject): (WebCore::V8ObjectMap::Reader::readNumberObject): (WebCore::V8ObjectMap::Deserializer::deserialize): (WebCore::V8ObjectMap::Deserializer::openComposite): (WebCore::V8ObjectMap::Deserializer::closeComposite): 2011-07-28 Adam Barth <abarth@webkit.org> Old code about empty security origins could use a bath https://bugs.webkit.org/show_bug.cgi?id=64735 Reviewed by Dimitri Glazkov. This patch cleans up some old code related to empty security origins. It also removes some dodgy code that seems wrong. Test: http/tests/security/inactive-document-with-empty-security-origin.html * bindings/generic/BindingSecurityBase.cpp: (WebCore::BindingSecurityBase::canAccess): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::isEmpty): (WebCore::SecurityOrigin::isSecureTransitionTo): (WebCore::SecurityOrigin::toString): 2011-07-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [REGRESSION] Inspected tab crashes if navigated with inspector open and there are watch expressions added. https://bugs.webkit.org/show_bug.cgi?id=65322 Reviewed by Pavel Feldman. * inspector/InspectorController.cpp: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): * inspector/InspectorRuntimeAgent.h: * inspector/WorkerInspectorController.cpp: 2011-07-28 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Add basic RenderRegion support https://bugs.webkit.org/show_bug.cgi?id=64689 Reviewed by David Hyatt. This patch introduces the RenderRegion object. A RenderObject that takes its content from a "named" flow will become a RenderRegion, an element that is used to display the content from a RenderFlowThread. A RenderRegion that is marked to take its content from a non existing flow, will have its content disconnected from the normal flow. Tests: fast/regions/region-element-display-restriction.html fast/regions/region-element-dynamic-attach-flow.html fast/regions/region-element-dynamic-detach-flow.html fast/regions/render-region-renderer.html * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Node.cpp: (WebCore::Node::diff): * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderObject.h: (WebCore::RenderObject::isRenderRegion): * rendering/RenderRegion.cpp: Added. (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::~RenderRegion): (WebCore::RenderRegion::layout): (WebCore::RenderRegion::paint): * rendering/RenderRegion.h: Added. (WebCore::RenderRegion::isRenderRegion): (WebCore::RenderRegion::renderName): (WebCore::toRenderRegion): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): 2011-07-28 Marco Peereboom <marco@peereboom.us> [Soup] Cannot override default max-conns and max-conns-per-host Soup Session settings https://bugs.webkit.org/show_bug.cgi?id=64355 Default max-conns and max-conns-per-host are set at "first contact" with a site instead of at creation time. This results in values being overwritten if they are set prior to said "first contact"; which is the most likely (or only) scenario. Reviewed by Martin Robinson. No new tests. Rigged libsoup and xxxterm web browser to diagnose the issue and validate the patch. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ensureSessionIsInitialized): No longer ininitalize connection limits. (WebCore::ResourceHandle::defaultSession): Initialize connection limits here instead. 2011-07-28 Brady Eidson <beidson@apple.com> https://bugs.webkit.org/show_bug.cgi?id=65323 r91931 causes NOTREACHED to be hit via StorageTracker Change the meaning of the "has been initialized" flag to "needs initialization", and only set it to true if the ::initializeTracker() method has been called. Reviewed by Sam Weinig. * storage/StorageTracker.cpp: (WebCore::StorageTracker::initializeTracker): Set m_needsInitialization to true since the calling WebKit port expects full initialization instead of a dummy tracker. (WebCore::StorageTracker::internalInitialize): (WebCore::StorageTracker::tracker): Only initialize the tracker if it was created in the above initializeTracker(). (WebCore::StorageTracker::StorageTracker): * storage/StorageTracker.h: 2011-07-28 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/65289> Remove GeolocationPositionCache Reviewed by Adam Barth. * CMakeLists.txt: Remove references to GeolocationPositionCache. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.order: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * page/Geolocation.cpp: Switch from using m_positionCache to m_cachedPosition. (WebCore::Geolocation::makeCachedPositionCallbacks): (WebCore::Geolocation::haveSuitableCachedPosition): (WebCore::Geolocation::positionChangedInternal): * page/Geolocation.h: Remove PositionCacheWrapper and replace with RefPtr<Geoposition>. * page/GeolocationPositionCache.cpp: Removed. * page/GeolocationPositionCache.h: Removed. 2011-07-28 Dan Bernstein <mitz@apple.com> <rdar://problem/9589433> Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds Reviewed by Darin Adler. * WebCore.exp.in: Exported wkGetVerticalGlyphsForCharacters. * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill): Use wkGetVerticalGlyphsForCharacters. If it returns false, proceed with the existing, slower method of getting vertical glyphs. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-07-28 Brady Eidson <beidson@apple.com> <rdar://problem/9714337> and https://bugs.webkit.org/show_bug.cgi?id=65306 WebKitInitializeStorageIfNecessary() can take awhile performing i/o, isn't necessary for every WebView Move the heavy lifting done in StorageTracker::initializeTracker() until when the global tracker is actually accessed, therefore deferring it until a web page actually uses LocalStorage or the app uses the API. Reviewed by Maciej Stachowiak. No new tests. (Not possible to test this API implementation detail) * WebCore.exp.in: * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::StorageAreaImpl): Access the global StorageTracker to indicate that a web page is actually using the storage APIs. * storage/StorageTracker.cpp: (WebCore::StorageTracker::initializeTracker): Moved the potentially hefty work from here... (WebCore::StorageTracker::internalInitialize): ...to here. (WebCore::StorageTracker::tracker): If the global tracker hasn't had internalInitialize() called, do so. (WebCore::StorageTracker::StorageTracker): * storage/StorageTracker.h: 2011-07-28 Carlos Garcia Campos <cgarcia@igalia.com> [GTK] Copy and paste is broken in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=65252 Reviewed by Martin Robinson. Use gtk_clipboard_get_for_display() instead of gtk_widget_get_clipboard(), using the the default display when there's no page client widget, which is the case of WebKit2. * platform/gtk/PasteboardHelper.cpp: (WebCore::displayFromFrame): Return the display of the current frame widget or the default display if there's no widget. (WebCore::PasteboardHelper::getClipboard): (WebCore::PasteboardHelper::getPrimarySelectionClipboard): 2011-07-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Add resource initiator column to network panel. https://bugs.webkit.org/show_bug.cgi?id=65105 Reviewed by Pavel Feldman. Test: http/tests/inspector/network/network-initiator.html * English.lproj/localizedStrings.js: * dom/Document.cpp: (WebCore::Document::scheduleStyleRecalc): * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willRecalculateStyleImpl): (WebCore::InspectorInstrumentation::didRecalculateStyleImpl): (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::willRecalculateStyle): (WebCore::InspectorResourceAgent::didRecalculateStyle): (WebCore::InspectorResourceAgent::didScheduleStyleRecalculation): (WebCore::InspectorResourceAgent::buildInitiatorObject): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype._appendRedirect): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype._createSortingFunctions): (WebInspector.NetworkLogView.prototype.switchToDetailedView): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype._toggleGridMode): (WebInspector.NetworkLogView.prototype._toggleViewingResourceMode): (WebInspector.NetworkDataGridNode.prototype.createCells): (WebInspector.NetworkDataGridNode.prototype.refreshResource): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): (WebInspector.NetworkDataGridNode.InitiatorComparator): * inspector/front-end/networkLogView.css: (.initiator-column a): 2011-07-28 Rob Buis <rbuis@rim.com> Use styling test from ietestcenter fails https://bugs.webkit.org/show_bug.cgi?id=62147 Reviewed by Nikolas Zimmermann. Make sure CSS selectors are applied to the DOM tree referenced by <use>, not the internal shadow tree. In order to quickly find the corresponding DOM tree element store this info in SVGElementRareData. Test: svg/W3C-SVG-1.1-SE/struct-use-11-f.svg * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::styleForRenderer): * rendering/svg/SVGShadowTreeElements.h: * svg/SVGElement.cpp: (WebCore::SVGElement::correspondingElement): (WebCore::SVGElement::setCorrespondingElement): (WebCore::SVGElement::styleForRenderer): * svg/SVGElement.h: * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): * svg/SVGElementRareData.h: (WebCore::SVGElementRareData::SVGElementRareData): (WebCore::SVGElementRareData::correspondingElement): (WebCore::SVGElementRareData::setCorrespondingElement): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::removedFromDocument): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/SVGUseElement.h: 2011-07-28 Denis Oliver Kropp <dok@directfb.org> This fixes build without video enabled. https://bugs.webkit.org/show_bug.cgi?id=65084 Reviewed by Philippe Normand. Test with --disable-video. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::determineDispatchBehavior): 2011-07-28 Yuta Kitamura <yutak@chromium.org> WebSocket: Pass the value of useHixie76Protocol flag to WebSocket object https://bugs.webkit.org/show_bug.cgi?id=65250 Reviewed by Alexey Proskuryakov. Add useHixie76Protocol() method to WebSocketChannel and its family. To implement hybi-specific attributes in WebSocket object, WebSocket class needs to be able to get the value of useHixie76Protocol flag of WebSocketChannel. If the WebSocket object is created in a worker thread, the flag value must be obtained from WebSocketChannel which resides in the loader thread (through WorkerThreadableWebSocketChannel). Since the value does not change after creation of WebSocketChannel, it can be cached in the worker thread. There is no change in behavior, thus no new tests. * websockets/ThreadableWebSocketChannel.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::useHixie76Protocol): (WebCore::ThreadableWebSocketChannelClientWrapper::setUseHixie76Protocol): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::useHixie76Protocol): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::useHixie76Protocol): (WebCore::WorkerThreadableWebSocketChannel::Peer::useHixie76Protocol): (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel): * websockets/WorkerThreadableWebSocketChannel.h: 2011-07-28 Rob Buis <rbuis@rim.com> REGRESSION (r91125): Google Drawings is broken https://bugs.webkit.org/show_bug.cgi?id=65257 Reviewed by Darin Adler. Only consider zero-length path rendering code path when a stroke is defined. Test: svg/custom/zero-path-square-cap-rendering2.svg * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath): 2011-07-22 Martin Robinson <mrobinson@igalia.com> [Cairo] Switch from ContextShadow to ShadowBlur https://bugs.webkit.org/show_bug.cgi?id=64744 Use ShadowBlur in the Cairo backend instead of ContextShadow. This allows us to share shadowing code with Qt and Mac ports and to correct some broken shadow rendering. Reviewed by Dirk Schulze. * CMakeLists.txt: Remove ContextShadow from the build. * CMakeListsEfl.txt: Ditto. * GNUmakefile.list.am: Add ShadowBlur source files and remove ContextShadow source files. * platform/graphics/GraphicsContext.cpp:Add #ifdefs to support ShadowBlur for Cairo. * platform/graphics/GraphicsContext.h: Remove Cairo ContextShadow code. * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawInsetShadowWithTiling): Since the ShadowBlur is a property of the GraphicsContext, we cannot clear the GraphicsContext shadow until we have finished using properties like m_offset. If we clear the GrahpicsContext shadow before using these properties, they will be zero when we try to use them. (WebCore::ShadowBlur::drawRectShadowWithTiling):Ditto. (WebCore::ShadowBlur::drawLayerPieces): Ditto. (WebCore::ShadowBlur::beginShadowLayer):Cairo is the first port to keep ShadowBlur as a persistent property of GraphicsContext and use drawRectShadow and drawInsetShadow. Thus, we must manually clear the cached tiling values so that ShadowBlur does not try to reuse the scratch buffer for rectangular shadows after using beginShadowLayer and endShadowLayer. (WebCore::ShadowBlur::mustUseShadowBlur): Moved this method from the Qt port to this cross-platform location. * platform/graphics/ShadowBlur.h: Added new method declaration. * platform/graphics/cairo/ContextShadowCairo.cpp: Removed. * platform/graphics/cairo/FontCairo.cpp: Switched to using ShadowBlur. (WebCore::drawGlyphsShadow):Ditto. * platform/graphics/cairo/GraphicsContextCairo.cpp: Switch to using ShadowBlur. (WebCore::drawPathShadow): ShadowBlur has slightly different semantics than ContextShadow. When filling the shadow layer, we do not need to use the fill alpha. We also need to restore the Cairo path to the target context after endShadowLayer as it destroys the current path. * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Switch to using ShadowBlur. * platform/graphics/cairo/ImageCairo.cpp: Ditto. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::drawSurfaceToContext):Ditto. (WebCore::PlatformContextCairo::prepareForStroking): Add a mode ignoring alpha. * platform/graphics/cairo/PlatformContextCairo.h: Ditto. (WebCore::PlatformContextCairo::shadowBlur):Added. * platform/graphics/gtk/FontGtk.cpp: Update to use ShadowBlur. * platform/graphics/qt/GraphicsContextQt.cpp: Switch to using the new version of mustUseShadowBlur. 2011-07-27 Gyuyoung Kim <gyuyoung.kim@samsung.com> [EFL] Add dummy NotificationPresenterClientEfl https://bugs.webkit.org/show_bug.cgi?id=64064 Add two files to CMakeLists.txt for HTML5 Notification. Reviewed by Antonio Gomes. * CMakeLists.txt: 2011-07-27 Ryosuke Niwa <rniwa@webkit.org> Calling window.find immediately after mutating the document crashes WebKit. https://bugs.webkit.org/show_bug.cgi?id=65296 Reviewed by Darin Adler. Don't forget to layout first. Test: editing/text-iterator/find-after-mutation.html * editing/TextIterator.cpp: (WebCore::findPlainText): 2011-07-27 Ben Wells <benwells@chromium.org> Remove skia special case for outline rendering code https://bugs.webkit.org/show_bug.cgi?id=65295 Reviewed by James Robinson. The fix for bug 58999 (outlines with alpha channels showed artifacts in the corners) was excluded from skia builds until bug 61369 (skia drawConvexPoly didn't pay attention to shouldAntialias) was fixed. That bug is fixed so now the #if's can be removed. * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline): * rendering/RenderObject.cpp: (WebCore::RenderObject::paintOutline): 2011-07-27 Adam Barth <abarth@webkit.org> Crypto.idl doesn't need legacy optional arguments https://bugs.webkit.org/show_bug.cgi?id=65298 Reviewed by Darin Adler. This API is relatively new and useless to call without its only argument. * page/Crypto.idl: 2011-07-27 Mark Hahnenberg <mhahnenberg@apple.com> Remove operator new from JSCell https://bugs.webkit.org/show_bug.cgi?id=64999 Reviewed by Oliver Hunt. No new tests. Removed the implementation of operator new in JSCell, so any further uses will not successfully link. Also removed any remaining uses of operator new. * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::newRuntimeObject): (JSC::Bindings::CRuntimeMethod::create): (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): (JSC::Bindings::CInstance::getMethod): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::newRuntimeObject): (JavaRuntimeMethod::create): (JavaRuntimeMethod::JavaRuntimeMethod): (JavaInstance::getMethod): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::fallbackObject): * bridge/objc/objc_instance.mm: (ObjcInstance::newRuntimeObject): (ObjCRuntimeMethod::create): (ObjCRuntimeMethod::ObjCRuntimeMethod): (ObjcInstance::getMethod): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): 2011-07-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network panel sidebar should have width saved in preferences when resource is selected. https://bugs.webkit.org/show_bug.cgi?id=65256 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._toggleViewingResourceMode): (WebInspector.NetworkPanel.prototype.restoreSidebarWidth): (WebInspector.NetworkPanel.prototype._showResource): (WebInspector.NetworkPanel.prototype._closeVisibleResource): (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): (WebInspector.Panel.prototype.preferredSidebarWidth): (WebInspector.Panel.prototype.get restoreSidebarWidth): 2011-07-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [REGRESSION] [Chromium] Opening link in new tab does not work properly. https://bugs.webkit.org/show_bug.cgi?id=65279 Reviewed by Pavel Feldman. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::open): 2011-07-27 Adam Klein <adamk@chromium.org> [V8] Remove unused m_isWeak member of V8AbstractEventListener https://bugs.webkit.org/show_bug.cgi?id=65273 Reviewed by Adam Barth. m_isWeak is set to true in the constructor and never changed, so the one if statement that tests it always executes; the code has been updated to make this clear. No behavior change, thus no tests. * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::V8AbstractEventListener): (WebCore::V8AbstractEventListener::setListenerObject): * bindings/v8/V8AbstractEventListener.h: 2011-07-27 Fady Samuel <fsamuel@chromium.org> Popups on Chromium now check the minimum row height set through the Chromium WebKit API when computing the height of a row in a popup listbox. https://bugs.webkit.org/show_bug.cgi?id=64897 Reviewed by Darin Fisher. No new tests. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::getRowHeight): * platform/chromium/PopupMenuChromium.h: (WebCore::PopupMenuChromium::minimumRowHeight): (WebCore::PopupMenuChromium::setMinimumRowHeight): 2011-07-27 MORITA Hajime <morrita@google.com> Inconsistent state of TreeScope reference. https://bugs.webkit.org/show_bug.cgi?id=65235 The tree scope pointers on shadow tree nodes didn't cleared. even when the tree scope (shadow root) is destroyed. This change clear these poitners before detaching the shadow root. Reviewed by Dimitri Glazkov. Test: fast/dom/shadow/tree-scope-crash.html * dom/Element.cpp: (WebCore::Element::removeShadowRoot): 2011-07-27 Rachel Blum <groby@chromium.org> Implement sizes attribute for link tag from HTML5 https://bugs.webkit.org/show_bug.cgi?id=37674 Reviewed by Dimitri Glazkov. Test: fast/dom/icon-size-property.html * WebCore.gypi: * WebCore.pro: * bindings/js/JSHTMLLinkElementCustom.cpp: (WebCore::JSHTMLLinkElement::sizes): (WebCore::JSHTMLLinkElement::setSizes): * bindings/v8/custom/V8HTMLLinkElementCustom.cpp: Added. (WebCore::V8HTMLLinkElement::sizesAccessorGetter): (WebCore::V8HTMLLinkElement::sizesAccessorSetter): * html/HTMLAttributeNames.in: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::sizes): (WebCore::HTMLLinkElement::setSizes): * html/HTMLLinkElement.h: * html/HTMLLinkElement.idl: 2011-07-27 Pratik Solanki <psolanki@apple.com> Incorrect arguments passed to LOG statement https://bugs.webkit.org/show_bug.cgi?id=65293 Reviewed by Oliver Hunt. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]): 2011-07-27 Levi Weintraub <leviw@chromium.org> Switch transform operations to FloatSize https://bugs.webkit.org/show_bug.cgi?id=64301 Reviewed by Simon Fraser. Changing TransformOperation and its progeny to operate on FloatSizes instead of IntSizes. * platform/graphics/transforms/IdentityTransformOperation.h: (WebCore::IdentityTransformOperation::apply): * platform/graphics/transforms/Matrix3DTransformOperation.cpp: (WebCore::Matrix3DTransformOperation::blend): * platform/graphics/transforms/Matrix3DTransformOperation.h: (WebCore::Matrix3DTransformOperation::apply): * platform/graphics/transforms/MatrixTransformOperation.cpp: (WebCore::MatrixTransformOperation::blend): * platform/graphics/transforms/MatrixTransformOperation.h: (WebCore::MatrixTransformOperation::apply): * platform/graphics/transforms/PerspectiveTransformOperation.h: (WebCore::PerspectiveTransformOperation::apply): * platform/graphics/transforms/RotateTransformOperation.h: (WebCore::RotateTransformOperation::apply): * platform/graphics/transforms/ScaleTransformOperation.h: (WebCore::ScaleTransformOperation::apply): * platform/graphics/transforms/SkewTransformOperation.h: (WebCore::SkewTransformOperation::apply): * platform/graphics/transforms/TransformOperation.h: * platform/graphics/transforms/TransformOperations.h: (WebCore::TransformOperations::apply): * platform/graphics/transforms/TranslateTransformOperation.h: (WebCore::TranslateTransformOperation::x): (WebCore::TranslateTransformOperation::y): (WebCore::TranslateTransformOperation::z): (WebCore::TranslateTransformOperation::apply): 2011-07-27 Levi Weintraub <leviw@chromium.org> unicode-bidi:-webkit-plaintext does not work on <textarea> https://bugs.webkit.org/show_bug.cgi?id=65074 Reviewed by Ryosuke Niwa. Fixing unicode-bidi style propagation into text control shadow trees. Test: fast/text/international/unicode-bidi-plaintext-in-textarea.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::adjustInnerTextStyle): 2011-07-27 Eric Carlson <eric.carlson@apple.com> Load delegate not consulted before loading some poster images https://bugs.webkit.org/show_bug.cgi?id=65270 Reviewed by Darin Adler. Test: media/video-poster-blocked-by-willsendrequest.html * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::setDisplayMode): Don't ask media engine to set poster if willLoadMediaElementURL returns false. 2011-07-27 Stephen White <senorblanco@chromium.org> Fix for printing with accelerated <canvas> https://bugs.webkit.org/show_bug.cgi?id=62406 Reviewed by James Robinson. The platform-independent side of this should be covered by existing tests. Printing itself in Chrome has few tests, sadly. :( * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::draw): 2011-07-25 Mihai Parparita <mihaip@chromium.org> [Chromium] Add better WebKit API for chrome.tabs.insertCSS extension API https://bugs.webkit.org/show_bug.cgi?id=65158 Reviewed by David Hyatt. Add per-Document instance user stylesheets (as opposed to the page group user styles and the global page stylesheet). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): * css/CSSStyleSelector.h: * dom/Document.cpp: (WebCore::Document::~Document): (WebCore::Document::createStyleSelector): (WebCore::Document::addUserSheet): * dom/Document.h: 2011-07-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Disable cache option should only clear memory cache, not disable it. https://bugs.webkit.org/show_bug.cgi?id=65184 Reviewed by Pavel Feldman. * inspector/InspectorClient.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::enable): (WebCore::InspectorResourceAgent::disable): (WebCore::InspectorResourceAgent::setCacheDisabled): (WebCore::InspectorResourceAgent::mainFrameNavigated): 2011-07-27 Rob Buis <rbuis@rim.com> Implement getIntersectionList(), getEnclosureList(), checkIntersection() and checkEnclosure() in SVGSVGElement https://bugs.webkit.org/show_bug.cgi?id=11274 Reviewed by Nikolas Zimmermann. Implement checkIntersection/checkEnclosure and use it to implement getIntersectionList and getEnclosureList as well. The referenceElement is used to provide a DOM subtree to find matches in. Also we do not allow elements that specify pointer-events=none in the list. Tests: svg/W3C-SVG-1.1-SE/struct-dom-11-f.svg svg/custom/intersection-list-clipping.svg svg/custom/intersection-list-nested-svg.svg * rendering/svg/RenderSVGModelObject.cpp: (WebCore::getElementCTM): (WebCore::intersectsAllowingEmpty): (WebCore::isGraphicsElement): (WebCore::RenderSVGModelObject::checkIntersection): (WebCore::RenderSVGModelObject::checkEnclosure): * rendering/svg/RenderSVGModelObject.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::checkIntersection): (WebCore::SVGSVGElement::checkEnclosure): 2011-07-27 Becsi Andras <abecsi@webkit.org> [Qt][V8] Fix the build. Unreviewed build fix. No new tests needed. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Add missing CString.h include. 2011-07-27 Alexis Menard <alexis.menard@openbossa.org> [Qt] Unreviewed build fix for mac. QtKit is now our default media player, the define is WTF_USE_QTKIT and it's not part of the options passed to build-webkit, therefore DerivedSources should now generate the includes when it's mac. * DerivedSources.pro: * WebCore.pro: 2011-07-27 Yury Semikhatsky <yurys@chromium.org> Inspector should support cd(window) in the command line https://bugs.webkit.org/show_bug.cgi?id=19872 Added dropdown list with all iframes to allow selecting current evaluation context for console expressions. Reviewed by Pavel Feldman. Test: http/tests/inspector/console-cd.html * WebCore.gypi: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent): (WebCore::InspectorRuntimeAgent::evaluate): * inspector/InspectorRuntimeAgent.h: * inspector/WorkerInspectorController.cpp: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.addContext): (WebInspector.ConsoleView.prototype.removeContext): (WebInspector.ConsoleView.prototype._contextUpdated): (WebInspector.ConsoleView.prototype.get _currentEvaluationContextId): (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/ContextManager.js: Added. (WebInspector.ContextManager): (WebInspector.ContextManager.prototype._frameAdded): (WebInspector.ContextManager.prototype._frameNavigated): (WebInspector.ContextManager.prototype._frameDetached): (WebInspector.FrameEvaluationContext): (WebInspector.FrameEvaluationContext.prototype._frameNavigated): (WebInspector.FrameEvaluationContext.prototype.get id): (WebInspector.FrameEvaluationContext.prototype.get url): (WebInspector.FrameEvaluationContext.prototype.get displayName): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-07-27 Shinya Kawanaka <shinyak@google.com> Uses isHTMLSpace to normalize white spaces. https://bugs.webkit.org/show_bug.cgi?id=57746 Reviewed by Kent Tamura. Test: fast/forms/option-strip-unicode-spaces.html * dom/OptionElement.cpp: (WebCore::OptionElement::normalizeText): Uses isHTMLSpace to trim and replace white spaces. 2011-05-15 Holger Hans Peter Freyther <holger@moiji-mobile.com> [chromium] Remove include of skia/ext/platform_canvas.h https://bugs.webkit.org/show_bug.cgi?id=60852 Reviewed by Hajime Morita. In https://bugs.webkit.org/show_bug.cgi?id=57563 the usage of the skia::PlatformCanvas was eliminated in favor of directly using SkCanvas directly. The include of platform_canvas.h was not removed leaving the dependency on Chromium in the header files. Remove that dependency now. * platform/graphics/skia/PlatformContextSkia.h: Remove platform_canvas.h 2011-07-27 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] REGRESSION: Uncaught TypeError: Cannot read property 'isTracingToWindowObjects' of undefined https://bugs.webkit.org/show_bug.cgi?id=65213 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotRetainingPathsList.prototype.refresh): 2011-07-27 Shinya Kawanaka <shinyak@google.com> Knob of a disabled or readonly range control should not be draggable. https://bugs.webkit.org/show_bug.cgi?id=54820 Reviewed by Kent Tamura. Made disabled or readonly range control undraggable. Test: fast/forms/range-drag.html * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): Added check that the element is readonly or disabled. * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::defaultEventHandler): ditto. 2011-07-27 Yuta Kitamura <yutak@chromium.org> WebSocket: CloseEvent attribute is not available on WebWorkers in JSC https://bugs.webkit.org/show_bug.cgi?id=65232 Reviewed by Kent Tamura. Add [NoStaticTables] attribute to CloseEvent interface definition. This attribute makes the code generator obtain the attributes table used for building ClassInfo through JSGlobalData, instead of directly using a statically-allocated table. Generally speaking, NoStaticTables needs to be specified in interfaces which may be accessed from workers. Tests: http/tests/websocket/tests/hybi/workers/shared-worker-simple.html (updated) http/tests/websocket/tests/hybi/workers/worker-simple.html (updated) * websockets/CloseEvent.idl: Fixed the formatting, too. 2011-07-26 James Robinson <jamesr@chromium.org> [chromium] REGRESSION(90963): Content layers are not redrawn after losing the compositor context https://bugs.webkit.org/show_bug.cgi?id=65224 Reviewed by Kenneth Russell. There's no automated way to test lost compositor contexts (yet), but to test manually open up the poster circle page and kill the GPU process. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::cleanupResources): * platform/graphics/chromium/ContentLayerChromium.h: 2011-07-26 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91805. http://trac.webkit.org/changeset/91805 https://bugs.webkit.org/show_bug.cgi?id=65226 Breaks @ symbols and changes other font rendering on Windows (Requested by enne on #webkit). * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): (WebCore::windowsCanHandleTextDrawingWithoutShadow): * platform/graphics/skia/SkiaFontWin.h: 2011-07-26 Adrienne Walker <enne@google.com> Unreviewed, rolling out r91812. http://trac.webkit.org/changeset/91812 https://bugs.webkit.org/show_bug.cgi?id=65210 Breaks OSX GPU tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2011-07-26 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91809. http://trac.webkit.org/changeset/91809 https://bugs.webkit.org/show_bug.cgi?id=65225 Does not build on Chromium Windows (Requested by abarth on #webkit). * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): * dom/WheelEvent.h: * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::handleTouchEvent): (WebCore::EventHandler::resetGestureRecognizer): * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): * platform/PlatformGestureEvent.h: * platform/PlatformGestureRecognizer.h: * platform/chromium/FramelessScrollView.h: * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::dispatchSyntheticClick): (WebCore::InnerGestureRecognizer::processTouchEventForGesture): (WebCore::InnerGestureRecognizer::scrollViaTouchMotion): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): * platform/chromium/GestureRecognizerChromium.h: (WebCore::GestureRecognizerChromium::reset): (WebCore::GestureRecognizerChromium::processTouchEventForGesture): * platform/chromium/PopupMenuChromium.cpp: * platform/chromium/PopupMenuChromium.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleGestureEvent): 2011-07-26 Dmitry Lomov <dslomov@google.com> [V8][Chromium] Run workers in a separate v8::Isolate https://bugs.webkit.org/show_bug.cgi?id=65004 This patch allocates a new v8::Isolate for every worker and enters it on worker thread. Reviewed by David Levin. Covered by existing chromium tests. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::DOMDataStore): (WebCore::DOMDataStore::~DOMDataStore): * bindings/v8/StaticDOMDataStore.cpp: (WebCore::StaticDOMDataStore::StaticDOMDataStore): (WebCore::StaticDOMDataStore::~StaticDOMDataStore): * bindings/v8/StaticDOMDataStore.h: * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::registerDOMDataStore): (WebCore::V8BindingPerIsolateData::unregisterDOMDataStore): * bindings/v8/V8DOMMap.cpp: (WebCore::DOMDataStoreHandle::DOMDataStoreHandle): (WebCore::DOMDataStoreHandle::~DOMDataStoreHandle): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::initV8): * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::WorkerScriptController): (WebCore::WorkerScriptController::~WorkerScriptController): * bindings/v8/WorkerScriptController.h: 2011-07-26 James Robinson <jamesr@chromium.org> [chromium] Avoid clearing the framebuffer when compositing in release builds https://bugs.webkit.org/show_bug.cgi?id=65210 Reviewed by Kenneth Russell. We clear the default framebuffer to blue when compositing so it's easier to spot regions we miss. This is useful for debugging, but eats bandwidth unnecessarily in release builds. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2011-07-26 Jeffrey Pfau <jpfau@apple.com> New XML tokenizer https://bugs.webkit.org/show_bug.cgi?id=64566 Reviewed by Adam Barth. Add tokenizer for XML and tests in NewXMLDocumentParser for printing results of tokenization. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::append): * xml/parser/NewXMLDocumentParser.h: * xml/parser/XMLToken.h: * xml/parser/XMLTokenizer.cpp: Added. (WebCore::XMLTokenizer::XMLTokenizer): (WebCore::::shouldSkipNullCharacters): (WebCore::XMLTokenizer::nextToken): (WebCore::XMLTokenizer::bufferCharacter): (WebCore::XMLTokenizer::parseError): * xml/parser/XMLTokenizer.h: Added. (WebCore::XMLTokenizer::create): (WebCore::XMLTokenizer::gotError): (WebCore::XMLTokenizer::shouldSkipNullCharacters): 2011-07-26 Robert Kroeger <rjkroege@chromium.org> [chromium] Layering violations in gesture recognizer https://bugs.webkit.org/show_bug.cgi?id=65044 Reviewed by Adam Barth. Divided the gesture recognizer up to correct a layering violation by moving gesture implementation from it to EventHandler::handleGestureEvent so that the gesture recognizer could simply be an engine for generating gesture events from touch events. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Removed construction of gesture recognizer. (WebCore::EventHandler::handleGestureEvent): Extended for new gesture events added in this patch. (WebCore::EventHandler::handleTouchEvent): Removed call into gesture recognizer. * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): Removed code to reset gesture recognizer. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (WebCore::PlatformGestureEvent::deltaX): (WebCore::PlatformGestureEvent::deltaY): (WebCore::PlatformGestureEvent::shiftKey): (WebCore::PlatformGestureEvent::ctrlKey): (WebCore::PlatformGestureEvent::altKey): (WebCore::PlatformGestureEvent::metaKey): Added additional gesture types and parameters. * platform/PlatformGestureRecognizer.h: * platform/chromium/FramelessScrollView.h: Added support for displatching gesture and touch events. * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::constructClickGestureEvent): (WebCore::InnerGestureRecognizer::processTouchEventForGestures): Removed all depedencies on EventHandler. Instead, create gesture events from touch event stream. (WebCore::InnerGestureRecognizer::constructScrollGesture): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): (WebCore::GestureRecognizerChromium::processTouchEventForGestures): (WebCore::GestureRecognizerChromium::reset): * platform/chromium/GestureRecognizerChromium.h: * platform/chromium/PopupMenuChromium.cpp: Added support to handle touch events and gesture events. (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): * platform/chromium/PopupMenuChromium.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleGestureEvent): Ignores the newly added gesture event types. 2011-07-26 Joseph Pecoraro <joepeck@webkit.org> Restore Composited Layers Faster from PageCache https://bugs.webkit.org/show_bug.cgi?id=65216 Reviewed by Simon Fraser. Restore the layer tree hierarchy a little sooner, when restoring from the page cache. This more closely matches original restore behavior. Existing test showed no change. * page/FrameView.cpp: (WebCore::FrameView::restoreBackingStores): 2011-07-26 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. No new tests. existing tests apply to the new drawing path * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): (WebCore::windowsCanHandleTextDrawingWithoutShadow): 2011-07-26 Kenneth Russell <kbr@google.com> Float32Array(ArrayBuffer, index, length) constructor working incorrectly. https://bugs.webkit.org/show_bug.cgi?id=57042 Reviewed by James Robinson. * bindings/js/JSArrayBufferViewHelper.h: (WebCore::constructArrayBufferViewWithArrayBufferArgument): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): 2011-07-26 Chris Rogers <crogers@google.com> V8 custom bindings for AudioNode must do proper object checking and throw exception in case of error https://bugs.webkit.org/show_bug.cgi?id=65222 Reviewed by James Robinson. No new tests - this fixes upcoming audionode.html layout test * bindings/v8/custom/V8AudioNodeCustom.cpp: (WebCore::V8AudioNode::connectCallback): 2011-07-26 Chris Rogers <crogers@google.com> AudioContext is not correctly accounting for hardware resources https://bugs.webkit.org/show_bug.cgi?id=65217 Reviewed by Kenneth Russell. No new tests since audio API is not yet implemented. * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::lazyInitialize): 2011-07-26 Luke Macpherson <macpherson@chromium.org> Handle CSS Properties that can be either auto or a primitive value in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=65164 Reviewed by Dimitri Glazkov. No new tests / refactoring only. * css/CSSPrimitiveValueMappings.h: Add casts to/from various numeric types. (WebCore::CSSPrimitiveValue::operator short): (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator unsigned short): (WebCore::CSSPrimitiveValue::operator int): (WebCore::CSSPrimitiveValue::operator float): * css/CSSStyleApplyProperty.cpp: Add class to handle properties that set an "auto" boolean on RenderStyle. (WebCore::ApplyPropertyAuto::ApplyPropertyAuto): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyAuto::hasAuto): (WebCore::ApplyPropertyAuto::setAuto): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: Remove existing implementations. (WebCore::CSSStyleSelector::applyProperty): 2011-07-26 Pratik Solanki <psolanki@apple.com> Add protection space authentication callback code to CFNetwork loader on Mac https://bugs.webkit.org/show_bug.cgi?id=65190 <rdar://problem/9842424> Reviewed by Oliver Hunt. Port over protection space authentication callback code from ResourceHandleMac.mm to ResourceHandleCFNet.cpp. * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::canRespondToProtectionSpace): (WebCore::ResourceHandle::createCFURLConnection): (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): (WebCore::WebCoreSynchronousLoaderClient::canAuthenticateAgainstProtectionSpace): * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]): Add logging. 2011-07-26 Sadrul Habib Chowdhury <sadrul@chromium.org> Add support for download='filename' attribute in anchors. https://bugs.webkit.org/show_bug.cgi?id=64580 Reviewed by Adam Barth. The download attribute allows the author of the hyperlink to cause the browser to download the linked URL. The author can also supply a suggested file name in the attribute value. This feature is a recent addition to HTML to better support offline applications that use blob URLs. Traditionally, web sites use the HTTP Content-Disposition header to trigger downloads, but that option isn't available when working offline. There is some question about whether we should initiate a download when we receive a DOM-created click event. This patch does initiate the download, but we might revise that decision in the future as part of a larger change in how WebKit treats the interaction between default event handlers and DOM-created events. Tests: fast/dom/HTMLAnchorElement/anchor-download.html fast/dom/HTMLAnchorElement/anchor-nodownload.html fast/dom/HTMLAnchorElement/anchor-download-unset.html fast/dom/HTMLAnchorElement/anchor-nodownload-set.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): (WebCore::HTMLAnchorElement::handleClick): * html/HTMLAnchorElement.h: * html/HTMLAnchorElement.idl: * html/HTMLAttributeNames.in: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::startDownload): * loader/FrameLoaderClient.h: 2011-07-26 Mark Hahnenberg <mhahnenberg@apple.com> Refactor automatically generated JS DOM bindings to replace operator new with static create methods https://bugs.webkit.org/show_bug.cgi?id=64732 Reviewed by Oliver Hunt. No new tests. Replacing the public constructors in the automatically generated JS DOM bindings in CodeGeneratorJS.pm with static create methods. This is part of a larger refactoring effort to use static create methods in the headers of the generated files (so as to be inline-able) in favor of public constructors throughout JSC. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::create): * bindings/js/JSDOMBinding.h: (WebCore::createWrapper): * bindings/js/JSDOMGlobalObject.h: (WebCore::getDOMConstructor): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::history): (WebCore::JSDOMWindow::location): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::create): * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::create): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForTypeInImpl): (AddIncludesForTypeInHeader): (AddIncludesForType): (GenerateHeader): (GenerateImplementation): (GenerateCallbackImplementation): (GenerateConstructorDeclaration): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::create): (WebCore::JSTestInterface::createPrototype): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::create): (WebCore::JSTestInterfacePrototype::create): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::create): (WebCore::JSTestMediaQueryListListener::createPrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): (WebCore::JSTestMediaQueryListListenerPrototype::create): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::create): (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): (WebCore::JSTestObjPrototype::create): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): (WebCore::JSTestSerializedScriptValueInterface::createPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): * bridge/jni/jsc/JavaArrayJSC.cpp: (JavaArray::convertJObjectToArray): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::newRuntimeObject): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertObjcValueToValue): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-07-26 Xiaomei Ji <xji@chromium.org> --webkit-visual-word does not work in multi-line https://bugs.webkit.org/show_bug.cgi?id=61344 Reviewed by Ryosuke Niwa. Replace Position(node, offset, PositionIsOffsetInAnchor) with createPositionAvoidingIgnoredNode(node, offset) which takes care of creating position before/after <br/> etc. editingIgnoresContent node. When iterate InlineBox, replace prevLeafChild and nextLeafChild (which only returns InlineBox within the same line) with leftInlineBox and rightInlineBox (which returns InlineBox across multiple lines). * editing/htmlediting.cpp: (WebCore::createPositionAvoidingIgnoredNode): * editing/htmlediting.h: * editing/visible_units.cpp: (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): Replace Position() with createPositionAvoidingIgnoredNode(). (WebCore::leftmostPositionInRTLBoxInLTRBlock): Ditto. (WebCore::rightmostPositionInLTRBoxInRTLBlock): Ditto. (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality): Ditto. (WebCore::blockWithPreviousLineBox): Added. (WebCore::previousRootInlineBox): Added. (WebCore::blockWithNextLineBox): Added. (WebCore::nextRootInlineBox): Added. (WebCore::leftInlineBox): Added. (WebCore::rightInlineBox): Added. (WebCore::leftWordBoundary): Replace prevLeafChild/nextLeafChild with leftInlineBox() and rightInlineBox(). (WebCore::rightWordBoundary): Ditto. (WebCore::leftWordPositionAcrossBoundary): Ditto. (WebCore::rightWordPositionAcrossBoundary): Ditto. 2011-07-26 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=60778 Use after free because of line box culling optimization regression. In the case of a child with no line box being removed (typically a <br> in quirks mode), if there is no previous sibling with a line box, then we have a potential problem with the culling optimization. The culled inline may still have other leaf line box children, but they may follow the removed <br>. In this case we can't rely on them, since we need a line box that comes before the <br>. The fix is to simply recur up to the parent if we are a culled inline and could not find a previous line box. Reviewed by Dan Bernstein. Added editing/execCommand/crash-line-break-after-outdent.html * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): 2011-07-26 Dan Bernstein <mitz@apple.com> <rdar://problem/9842889> Add a generic pictograph font family https://bugs.webkit.org/show_bug.cgi?id=65197 Reviewed by Anders Carlsson. Test: fast/css/font-family-pictograph.html * WebCore.exp.in: Export Settings::setPictographFontFamily(). * css/CSSComputedStyleDeclaration.cpp: (WebCore::identifierForFamily): Added -webkit-pictograph. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Ditto. (WebCore::fontDataForGenericFamily): Ditto. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Ditto. * css/CSSValueKeywords.in: * inspector/front-end/CSSKeywordCompletions.js: Ditto. * inspector/front-end/SourceCSSTokenizer.js: Ditto. (WebInspector.SourceCSSTokenizer): * inspector/front-end/SourceCSSTokenizer.re2js: Ditto. * page/Settings.cpp: (WebCore::Settings::pictographFontFamily): Added this getter. (WebCore::Settings::setPictographFontFamily): Added this setter. * page/Settings.h: * platform/graphics/FontDescription.h: Added PictographFamily to the GenericFamilyType enum. 2011-07-26 Viet-Trung Luu <viettrungluu@chromium.org> Improve (i.e., speed up) .gyp(i) files for Chromium https://bugs.webkit.org/show_bug.cgi?id=65032 Reviewed by Adam Barth. This re-applies r91595 with the source exclusion fixed. Test by building (in all supported configurations). * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2011-07-26 Alexis Menard <alexis.menard@openbossa.org> [Qt] Disable video support on linux if the dependencies are not found. If we can't find the necessary dependencies to build the GStreamer media player we disable the video support. This is related to http://trac.webkit.org/changeset/91752. Reviewed by Holger Freyther. No new tests, it's a build fix. * features.pri: 2011-07-26 Evan Martin <evan@chromium.org> regression: generating CSSValueKeywords should not print by default https://bugs.webkit.org/show_bug.cgi?id=65195 Reviewed by Tony Chang. Some refactoring made some callers no longer pass the final 'beQuiet' parameter to applyPreprocessor. This flag was only used to print the input filename anyway, so remove the flag and just make the caller print the filename if it wants this. * bindings/scripts/IDLParser.pm: (Parse): print before calling applyPreprocessor, if necessary. * bindings/scripts/preprocessor.pm: (applyPreprocessor): remove the beQuiet flag; just always be quiet. 2011-07-26 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Do not crash on the isSlider() assert. https://bugs.webkit.org/show_bug.cgi?id=65191 Reviewed by Antonio Gomes. RenderThemeEfl's paintSliderThumb() just forwarded the call to paintSliderTrack(), which, on its turn, called code that assumed that object->isSlider() was true. That does not seem to be the case for slidethumbs, so any page with an <input type="range"> tag would crash WebKit. We now do what RenderThemeQt does, and assume everything was properly done in the call to paintSliderTrack(). No new tests, as this has been uncovered by an existing test. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintSliderThumb): 2011-07-26 Brian Salomon <bsalomon@google.com> [SKIA] Make the skia GL context current when drawing text to gpu backed platform context. https://bugs.webkit.org/show_bug.cgi?id=65182 Reviewed by Stephen White. No new tests. Not sure how to test wrong-ctx bugs in layout tests. * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::paintSkiaText): 2011-07-26 Emil A Eklund <eae@chromium.org> RenderText::absoluteRectsForRange() and absoluteQuadsForRange() have nearly duplicate code https://bugs.webkit.org/show_bug.cgi?id=62478 Reviewed by Simon Fraser. Test: fast/dom/Range/getClientRects.html * platform/graphics/FloatRect.h: (WebCore::FloatRect::isZero): Add izZero method, unlike isEmpty this checks if both the width and the height are zero. * rendering/RenderText.cpp: (WebCore::absoluteQuadForTextBox): (WebCore::RenderText::absoluteRectsForRange): (WebCore::RenderText::absoluteQuadsForRange): Break duplicate code out of absoluteRectsForRange and absoluteQuadsForRange into shared static function. Fix what I presume to be a bug in the absoluteQuadsForRange where the logicalHeight was always used to set the size in absoluteQuadForTextBox as oppsued to the absoluteRectsForRange implementation that uses the logicalWidth or the logicalHeight depending on whether it's horizontal or vertical. 2011-07-26 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] Collect flowed elements in different render element https://bugs.webkit.org/show_bug.cgi?id=64516 All the RenderObjects that have a specified "flow" name are moved out of the normal flow. A RenderFlowThread will collect all such RenderObjects. There is a RenderFlowThread for each flow name. The new RenderFlowThread is an anonymous RenderBlock that is positioned absolute and will not render directly. In a different bug/patch we will add RenderRegion that will take care of rendering the RenderFlowThread on screen. Reviewed by Simon Fraser. Tests: fast/regions/webkit-flow-renderer-layer.html fast/regions/webkit-flow-renderer-nested.html fast/regions/webkit-flow-renderer.html * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Node.cpp: (WebCore::Node::diff): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::setStyle): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): (WebCore::NodeRenderingContext::parentRenderer): (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): (WebCore::NodeRendererFactory::createRendererIfNeeded): * dom/NodeRenderingContext.h: (WebCore::NodeRenderingContext::hasFlowThreadParent): (WebCore::NodeRenderingContext::parentFlowRenderer): * rendering/RenderFlowThread.cpp: Added. (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::createFlowThreadStyle): (WebCore::RenderFlowThread::nextRendererForNode): (WebCore::RenderFlowThread::previousRendererForNode): (WebCore::RenderFlowThread::addChild): (WebCore::RenderFlowThread::removeChild): * rendering/RenderFlowThread.h: Added. (WebCore::toRenderFlowThread): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::collectLayers): * rendering/RenderObject.h: (WebCore::RenderObject::isRenderFlowThread): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): (WebCore::writeLayers): * rendering/RenderView.cpp: (WebCore::RenderView::renderFlowThreadWithName): * rendering/RenderView.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): 2011-07-26 Patrick Dubroy <dubroy@chromium.org> Filename text in file upload controls is not aligned with button text on chromium-linux, chromium-win, and gtk. https://bugs.webkit.org/show_bug.cgi?id=64692 The fix is to not include the margin, border, and padding in the calculation, because those are already accounted for by RenderBlock::baselinePosition(). Reviewed by Dimitri Glazkov. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): 2011-07-26 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91746. http://trac.webkit.org/changeset/91746 https://bugs.webkit.org/show_bug.cgi?id=65180 It broke SL build (Requested by Ossy on #webkit). * dom/OptionElement.cpp: (WebCore::OptionElement::normalizeText): 2011-07-26 Pavel Feldman <pfeldman@google.com> Web Inspector: Better represent custom getters in the properties pane https://bugs.webkit.org/show_bug.cgi?id=16734 Reviewed by Yury Semikhatsky. Test: inspector/runtime/runtime-getProperties.html * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): 2011-07-26 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Andreas Kling. [Qt] Change default backend to use GStreamer on Linux and QuickTime on Mac. https://bugs.webkit.org/show_bug.cgi?id=63472 Enable the GStreamer backend and the QuickTime backend as default media players for the Qt port on Mac and Linux. QtMultimedia is now a fallback option that you can enable by passing DEFINES+=USE_QT_MULTIMEDIA=1 to enforce its usage. No new tests. The media layout tests are disabled on the Qt port but hopefully with this switch we can enable them again. * WebCore.pri: * WebCore.pro: * features.pri: 2011-07-26 Pavel Feldman <pfeldman@google.com> Web Inspector: Implement setPropertyValue using evaluate and callFunctionOn https://bugs.webkit.org/show_bug.cgi?id=65112 Reviewed by Yury Semikhatsky. Test: inspector/runtime/runtime-setPropertyValue.html * inspector/InjectedScript.cpp: * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: * inspector/InspectorRuntimeAgent.h: * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.setPropertyValue.evaluatedCallback.setPropertyValue): (WebInspector.RemoteObject.prototype.setPropertyValue.evaluatedCallback): (WebInspector.RemoteObject.prototype.setPropertyValue.propertySetCallback): (WebInspector.RemoteObject.prototype.setPropertyValue): 2011-07-26 Pavel Feldman <pfeldman@google.com> Re-applying r91665 and r91668 with JSC issues fixed. Web Inspector: use dedicated type for object id in the protocol. Web Inspector: refactor remote object structure to contain value for primitive values. https://bugs.webkit.org/show_bug.cgi?id=65103 https://bugs.webkit.org/show_bug.cgi?id=65110 Reviewed by Yury Semikhatsky. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::callFunctionOn): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::callFunctionOn): * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._format): (WebInspector.ConsoleView.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._format): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.nodePrototypesReady): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.prototype.get subtype): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.LocalJSONObject.prototype.get description): (WebInspector.LocalJSONObject.prototype.get type): (WebInspector.LocalJSONObject.prototype.get subtype): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): (WebInspector.SourceFrame.prototype._showPopup): * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): (WebInspector.inspect): 2011-07-26 Nikolas Zimmermann <nzimmermann@rim.com> Prepare animVal support - phase 2 https://bugs.webkit.org/show_bug.cgi?id=65167 Reviewed by Dirk Schulze. Next patch preparing animVal support. Modify the SVGAnimatedProperty* classes & macros to assure that calling someElement->someProperty() will return the animVal, when the property is being animated. Not yet hooked into SVGAnimateElement, this is just a preparation. Doesn't affect any tests, yet. * svg/SVGPathElement.cpp: Adapt to SVGAnimatedProperty::lookupWrapper changes (new template parameters have been added). (WebCore::SVGPathElement::svgAttributeChanged): * svg/SVGPathSegWithContext.h: Ditto. (WebCore::SVGPathSegWithContext::animatedProperty): * svg/SVGPolyElement.cpp: Ditto. (WebCore::SVGPolyElement::parseMappedAttribute): * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Implement currentAnimatedValue, an abstract way to retrieve the underlying animated value for any animated type. (WebCore::SVGAnimatedEnumerationPropertyTearOff::currentAnimatedValue): Forward call to SVGAnimatedStaticPropertyTearOff<int>, our base. * svg/properties/SVGAnimatedListPropertyTearOff.h: (WebCore::SVGAnimatedListPropertyTearOff::isAnimating): Returns whether this property is being animated or not. (WebCore::SVGAnimatedListPropertyTearOff::currentAnimatedValue): * svg/properties/SVGAnimatedProperty.h: (WebCore::SVGAnimatedProperty::updateAnimVal): Will be used from SVGAnim*Element to update the current animVal, exposed to JS. (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper): Share more code with lookupWrapper. (WebCore::SVGAnimatedProperty::lookupWrapper): Cleanup code, avoid doing any work for non-SVGElement derived objects, like SVGViewSpec. * svg/properties/SVGAnimatedPropertyMacros.h: Make all lowerProperty() calls (eg. myRectElement->x()) return the animVal, if the property is being animated. * svg/properties/SVGAnimatedPropertyTearOff.h: Main logic for the new animVal stuff. (WebCore::SVGAnimatedPropertyTearOff::isAnimating): (WebCore::SVGAnimatedPropertyTearOff::currentAnimatedValue): (WebCore::SVGAnimatedPropertyTearOff::updateAnimVal): (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff): * svg/properties/SVGAnimatedStaticPropertyTearOff.h: (WebCore::SVGAnimatedStaticPropertyTearOff::isAnimating): (WebCore::SVGAnimatedStaticPropertyTearOff::currentAnimatedValue): * svg/properties/SVGPropertyTearOff.h: (WebCore::SVGPropertyTearOff::updateAnimVal): 2011-07-26 Shinya Kawanaka <shinyak@google.com> Uses isHTMLSpace to normalize white spaces. https://bugs.webkit.org/show_bug.cgi?id=57746 Reviewed by Kent Tamura. Test: fast/forms/option-strip-unicode-spaces.html * dom/OptionElement.cpp: (WebCore::OptionElement::normalizeText): Uses isHTMLSpace to trim and replace white spaces. 2011-07-25 Ryuan Choi <ryuan.choi@samsung.com> [CMAKE] Split JSC related files from WebCore/CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=61350 Reviewed by Daniel Bates. No new tests, just moving jsc related files from CMakeLists.txt to UseJSC.cmake. * CMakeLists.txt: * UseJSC.cmake: 2011-07-25 Dan Bernstein <mitz@apple.com> Fix the build by committing a rename in this file that I neglected to include in the previous commit. * css/CSSFontFaceSource.h: 2011-07-25 Dan Bernstein <mitz@apple.com> <rdar://problem/9835028> Font loading during layout can cause layout code to be re-entered via resource load delegate https://bugs.webkit.org/show_bug.cgi?id=65123 Reviewed by Anders Carlsson and Darin Adler. Since CSSFontFaceSource::getFontData() can get called during layout, avoid calling out to loader code from under it, and instead defer that work using a zero-delay timer. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): (WebCore::CSSFontFaceSource::getFontData): Rather than starting the font load here, schedule a zero-delay timer to do it. (WebCore::CSSFontFaceSource::startLoadingTimerFired): Added. Starts loading the font if needed. * css/CSSFontFaceSource.h: 2011-07-25 Al Patrick <apatrick@chromium.org> Removed support for the GL_latch_CHROMIUM extension which Chromium no longer supports. Replaced calls to SetLatch with calls to Flush since Flush now has barrier semantics in Chromium. https://bugs.webkit.org/show_bug.cgi?id=65043 Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::publishToPlatformLayer): * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::addChildContext): (WebCore::LayerRendererChromium::removeChildContext): * platform/graphics/chromium/LayerRendererChromium.h: 2011-07-25 Sam Weinig <sam@webkit.org> Refactor ScrollableArea pinned predicates to be more generally useful <rdar://problem/9740379> Reviewed by Dan Bernstein. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::isPinnedInBothDirections): (WebCore::ScrollableArea::isPinnedHorizontallyInDirection): (WebCore::ScrollableArea::isPinnedVerticallyInDirection): * platform/ScrollableArea.h: 2011-07-25 Nico Weber <thakis@chromium.org> [chromium] components/mac: Make webcore not depend on CoreAnimation https://bugs.webkit.org/show_bug.cgi?id=65143 Reviewed by James Robinson. * platform/chromium/ScrollAnimatorChromiumMac.mm: 2011-07-25 Ian Henderson <ianh@apple.com> WebFrame should have a method to determine its visual emptiness https://bugs.webkit.org/show_bug.cgi?id=64223 Reviewed by Dan Bernstein. * page/FrameView.h: (WebCore::FrameView::isVisuallyNonEmpty): Add an accessor to FrameView so we can tell whether it's visually non-empty. 2011-07-25 Scott Graham <scottmg@chromium.org> REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Reviewed by Nate Chapin. Rollback previous patch. Occasional crashes seen caused by CachedResource being deleted twice. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::loadDone): * loader/cache/CachedResourceLoader.h: 2011-07-25 Chris Rogers <crogers@google.com> Deprecate AudioBufferSourceNode .looping attribute and implement .loop https://bugs.webkit.org/show_bug.cgi?id=65133 Reviewed by Kenneth Russell. No new tests since audio API is not yet implemented. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderFromBuffer): (WebCore::AudioBufferSourceNode::totalPitchRate): (WebCore::AudioBufferSourceNode::looping): (WebCore::AudioBufferSourceNode::setLooping): * webaudio/AudioBufferSourceNode.h: (WebCore::AudioBufferSourceNode::loop): (WebCore::AudioBufferSourceNode::setLoop): * webaudio/AudioBufferSourceNode.idl: 2011-07-25 James Robinson <jamesr@chromium.org> [chromium] HUD texture must be unreserved after drawing https://bugs.webkit.org/show_bug.cgi?id=65122 Unreserve the HUD texture after drawing. To test, start chrome in debug with --show-fps-counter. Since this is a debugging option, no tests. * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): 2011-07-25 David Grogan <dgrogan@chromium.org> Fix leveldb crash when compacting during destruction https://bugs.webkit.org/show_bug.cgi?id=64494 Reviewed by Nate Chapin. Only tested manually so far by following the repro instructions at crbug.com/88944 * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::~LevelDBDatabase): * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::~IDBLevelDBBackingStore): 2011-07-25 David Reveman <reveman@chromium.org> [Chromium] Use correct vertex shader when rendering video layer. https://bugs.webkit.org/show_bug.cgi?id=65131 Reviewed by James Robinson. Add new VertexShaderQuad program that is used by LayerTilerChromium. Change VertexShaderPosTexTransform so it works with CCVideoLayerImpl. * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTexTransform::VertexShaderPosTexTransform): (WebCore::VertexShaderPosTexTransform::init): (WebCore::VertexShaderPosTexTransform::getShaderString): (WebCore::VertexShaderQuad::VertexShaderQuad): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderQuad::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::VertexShaderQuad::matrixLocation): (WebCore::VertexShaderQuad::texTransformLocation): 2011-07-25 Patrick Gansterer <paroga@webkit.org> Fix AtomicString vs. String usage in accessibility code https://bugs.webkit.org/show_bug.cgi?id=65086 Reviewed by Darin Adler. Use AtomicString instead of String where appropriate to avoid implicit type conversations. Also fix a invalid reference to a temporary String. * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setAccessibleName): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::elementsFromAttribute): (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): (WebCore::AccessibilityRenderObject::setAccessibleName): * accessibility/AccessibilityRenderObject.h: 2011-07-25 Dan Bernstein <mitz@apple.com> Reverted r91699 due to <http://webkit.org/b/65134> REGRESSION: r91699 broke some font tests (image+text) Many tests relied on font loading occurring synchronously in the cached and local cases. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): (WebCore::CSSFontFaceSource::getFontData): * css/CSSFontFaceSource.h: 2011-06-07 Martin Robinson <mrobinson@igalia.com> Reviewed by Gustavo Noronha Silva. [GTK] Use WebCore scrollbars for the DRT instead of GtkScrolledWindow https://bugs.webkit.org/show_bug.cgi?id=62252 Properly handle the situation where the GtkWidget wants WebCore to draw its own main frame scrollbars. * platform/gtk/ScrollViewGtk.cpp: (WebCore::shouldCreateMainFrameScrollbar): Abstract this logic into a helper function. (WebCore::ScrollView::createScrollbar): Use the new helper. (WebCore::ScrollView::visibleContentRect): Use the new helper. 2011-07-25 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=65125 (1) Add the new CSS3 positioned value for floats. (2) Rename FLEFT, FRIGHT and FNONE to our more modern convention: NoFloat, LeftFloat, RightFloat. (3) Replace uses of == FNONE and != FNONE with isFloating and !isFloating. Reviewed by Dan Bernstein. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFloat): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): * css/CSSValueKeywords.in: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::isFloating): (WebCore::InheritedFlags::initialFloating): * rendering/style/RenderStyleConstants.h: 2011-07-25 Dan Bernstein <mitz@apple.com> <rdar://problem/9835028> Font loading during layout can cause layout code to be re-entered via resource load delegate https://bugs.webkit.org/show_bug.cgi?id=65123 Reviewed by Anders Carlsson. Since CSSFontFaceSource::getFontData() can get called during layout, avoid calling out to loader code from under it, and instead defer that work using a zero-delay timer. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): (WebCore::CSSFontFaceSource::getFontData): Rather than starting the font load here, schedule a zero-delay timer to do it. (WebCore::CSSFontFaceSource::startLoadingTimerFired): Added. Starts loading the font if needed. * css/CSSFontFaceSource.h: 2011-07-25 Andrew Wason <rectalogic@rectalogic.com> [Qt] Adopt GraphicsContext3DOpenGL.cpp and ANGLE (part 2) https://bugs.webkit.org/show_bug.cgi?id=64878 Reviewed by Noam Rosenthal. Existing WebGL layout tests should test this. Adopt GraphicsContext3DOpenGL.cpp and ANGLE compiler for Qt. * WebCore.pro: Build ANGLE compiler and GraphicsContext3DOpenGL.cpp. * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext3D.h: Expose exising ANGLEWebKitBridge compiler member for Qt. * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): Initialize ANGLE resources. 2011-07-25 Daniel Bates <dbates@rim.com> REGRESSION (r85964): Improper relayout of some nested positioned elements https://bugs.webkit.org/show_bug.cgi?id=64286 Reviewed by David Hyatt. Fixes an issue when traversing up the containing block hierarchy after skipping relatively positioned inlines. When processing a positioned element we skip any intermediate inlines to get to to enclosing block B, but don't use the containing block for B (call this P_B) to properly continue traversing up the containing block hierarchy. So, B may be considered again instead of looking at P_B. Hence, we don't set the correct dirty bits for P_B and may not schedule a relayout with respect to the correct layout node. Test: fast/block/positioning/relayout-nested-positioned-elements-crash.html * rendering/RenderObject.h: (WebCore::RenderObject::markContainingBlocksForLayout): 2011-07-25 Arno Renevier <arno@renevier.net> removes last ENABLE(DRAG_SUPPORT) gtk check https://bugs.webkit.org/show_bug.cgi?id=64518 Reviewed by Martin Robinson. * platform/gtk/ClipboardGtk.h: 2011-07-25 Alexandru Chiculita <achicu@adobe.com> [CSS Exclusions] Use HANDLE_INHERIT_AND_INITIAL when parsing -webkit-wrap-shape https://bugs.webkit.org/show_bug.cgi?id=65096 Also the 'inherit' keyword is now treated correctly. It will copy the value from the parent style. Reviewed by Tony Chang. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-07-25 Andrew Wason <rectalogic@rectalogic.com> glActiveTexture(0) is invalid https://bugs.webkit.org/show_bug.cgi?id=65115 Reviewed by Kenneth Russell. Existing WebGL layout tests. Fix invalid glActiveTexture(0) call. * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::prepareTexture): 2011-07-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91665. http://trac.webkit.org/changeset/91665 https://bugs.webkit.org/show_bug.cgi?id=65118 Breaks inspector tests on JSC (Requested by pfeldman on #webkit). * inspector/InjectedScriptSource.js: (.): (): * inspector/Inspector.json: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._format): (WebInspector.ConsoleView.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._format): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.nodePrototypesReady): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.LocalJSONObject.prototype.get type): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): (WebInspector.SourceFrame.prototype._showPopup): * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): (WebInspector.inspect): 2011-07-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91668. http://trac.webkit.org/changeset/91668 https://bugs.webkit.org/show_bug.cgi?id=65117 Breaks inspector tests on JSC (Requested by pfeldman on #webkit). * inspector/InjectedScript.cpp: (WebCore::InjectedScript::callFunctionOn): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::callFunctionOn): 2011-07-25 Pavel Feldman <pfeldman@google.com> Web Inspector: use dedicated type for object id in the protocol. https://bugs.webkit.org/show_bug.cgi?id=65110 Reviewed by Yury Semikhatsky. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::callFunctionOn): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::callFunctionOn): 2011-07-25 Yury Semikhatsky <yurys@chromium.org> [Chromium] Web Inspector: live edit error should be revealed in Console https://bugs.webkit.org/show_bug.cgi?id=65109 Reviewed by Pavel Feldman. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.commitEditing.didEditContent): (WebInspector.SourceFrame.prototype.commitEditing): 2011-07-25 Pavel Feldman <pfeldman@google.com> Web Inspector: refactor remote object structure to contain value for primitive values. https://bugs.webkit.org/show_bug.cgi?id=65103 Reviewed by Yury Semikhatsky. * inspector/InjectedScriptSource.js: * inspector/Inspector.json: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._format): (WebInspector.ConsoleView.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._format): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.nodePrototypesReady): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.prototype.get subtype): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.LocalJSONObject.prototype.get type): (WebInspector.LocalJSONObject.prototype.get subtype): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): (WebInspector.SourceFrame.prototype._showPopup): * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): (WebInspector.inspect): 2011-07-25 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Fix mixing of retaining path in heap profiler. https://bugs.webkit.org/show_bug.cgi?id=65028 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotPathFinderState): Added (WebInspector.HeapSnapshotRetainingPathsList): Extracted State-specific code 2011-07-25 Yury Semikhatsky <yurys@chromium.org> Web Inspector: worker inspector should show Scripts panel by default https://bugs.webkit.org/show_bug.cgi?id=65099 Reviewed by Pavel Feldman. * inspector/front-end/inspector.js: (WebInspector._defaultPanelName): (WebInspector.showPanel): 2011-07-24 Luke Macpherson <macpherson@chromium.org> Small cleanup of m_fontDirty tracking in CSSStyleSelector https://bugs.webkit.org/show_bug.cgi?id=65090 Reviewed by Darin Adler. 1) Use existing setFontDescription helper where appropriate. 2) Move always used m_fontDirty check into updateFont() No new tests / cleanup only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::styleForKeyframe): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::CSSStyleSelector::styleForPage): (WebCore::CSSStyleSelector::updateFontIfDirty): (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: 2011-07-24 Kent Tamura <tkent@chromium.org> Validation message bubble position is incorrect if the containing block has paddings. https://bugs.webkit.org/show_bug.cgi?id=65091 Reviewed by Hajime Morita. * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): We don't need to subtract paddings because the origin of position:aboslute is inside borders and outside of the padding. 2011-07-24 Rob Buis <rbuis@rim.com> Crash in SVGUseElement::updateContainerOffsets on <use> with no parent https://bugs.webkit.org/show_bug.cgi?id=63646 Reviewed by Darin Adler. Prevent using invalid targetElementInstance->shadowTreeElement after shadow render tree recreation. This situation can only occur when there was a valid shadowTreeElement before setting xlink:href to empty/invalid. Test: svg/custom/use-shadow-root-parent-removal.svg * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): 2011-07-24 Patrick Gansterer <paroga@webkit.org> Fix AtomicString vs. String usage in JSC binding https://bugs.webkit.org/show_bug.cgi?id=65085 Reviewed by Darin Adler. Use ustringToAtomicString instead of ustringToString where appropriate. * bindings/js/JSHTMLAllCollectionCustom.cpp: * bindings/js/JSHTMLCollectionCustom.cpp: 2011-07-24 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyOutlineOffset in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=64773 Reviewed by Dimitri Glazkov. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-07-24 Rob Buis <rbuis@rim.com> SVG <use> element is not repositioned when moved to x=0 y=0 through script https://bugs.webkit.org/show_bug.cgi?id=53767 Reviewed by Nikolas Zimmermann. Only bail out on zero offset if it is not explicitly set. Test: svg/custom/use-move-to-offset.svg * rendering/svg/RenderSVGTransformableContainer.cpp: (WebCore::RenderSVGTransformableContainer::calculateLocalTransform): * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::SVGShadowTreeContainerElement): (WebCore::SVGShadowTreeContainerElement::setContainerOffset): * rendering/svg/SVGShadowTreeElements.h: (WebCore::SVGShadowTreeContainerElement::containerOffsetChanged): (WebCore::SVGShadowTreeContainerElement::setContainerOffsetChanged): 2011-07-24 Jeffrey Pfau <jpfau@apple.com> Refactor HTML tokenizer code in preparation for a new XML tokenizer https://bugs.webkit.org/show_bug.cgi?id=65000 Reviewed by Adam Barth. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLNames::tokenizerStateForContextElement): (WebCore::HTMLDocumentParser::pumpTokenizer): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLNames::isEndTagBufferingState): (WebCore::HTMLTokenizer::HTMLTokenizer): (WebCore::::shouldSkipNullCharacters): (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::flushEmitAndResumeIn): (WebCore::HTMLTokenizer::nextToken): (WebCore::HTMLTokenizer::updateStateFor): * html/parser/HTMLTokenizer.h: (WebCore::HTMLTokenizer::emitAndResumeIn): (WebCore::HTMLTokenizer::emitAndReconsumeIn): (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): (WebCore::HTMLTreeBuilder::processScriptStartTag): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::TextDocumentParser): * html/parser/TextViewSourceParser.cpp: (WebCore::TextViewSourceParser::TextViewSourceParser): * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::type): * xml/parser/MarkupTokenizerBase.h: Added. (WebCore::MarkupTokenizerBase::~MarkupTokenizerBase): (WebCore::MarkupTokenizerBase::lineNumber): (WebCore::MarkupTokenizerBase::columnNumber): (WebCore::MarkupTokenizerBase::state): (WebCore::MarkupTokenizerBase::setState): (WebCore::MarkupTokenizerBase::forceNullCharacterReplacement): (WebCore::MarkupTokenizerBase::setForceNullCharacterReplacement): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::InputStreamPreprocessor): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker): (WebCore::MarkupTokenizerBase::MarkupTokenizerBase): (WebCore::MarkupTokenizerBase::bufferCharacter): (WebCore::MarkupTokenizerBase::emitAndResumeIn): (WebCore::MarkupTokenizerBase::emitAndReconsumeIn): (WebCore::MarkupTokenizerBase::emitEndOfFile): (WebCore::MarkupTokenizerBase::reset): (WebCore::MarkupTokenizerBase::haveBufferedCharacterToken): * xml/parser/MarkupTokenizerInlineMethods.h: Added. (WebCore::isTokenizerWhitespace): (WebCore::advanceStringAndASSERTIgnoringCase): (WebCore::advanceStringAndASSERT): 2011-07-23 Patrick Gansterer <paroga@webkit.org> Remove WTF namespace from isMainThread() calls https://bugs.webkit.org/show_bug.cgi?id=65068 Reviewed by Sam Weinig. Because of the using WTF::isMainThread in the header there is no reason to include the namespace name when calling this function. * bindings/js/JSMainThreadExecState.h: * bindings/v8/DOMDataStore.cpp: * bindings/v8/V8Binding.cpp: * bindings/v8/V8DOMMap.cpp: * bindings/v8/V8DOMWrapper.h: * page/DOMWindow.cpp: * page/History.cpp: 2011-07-23 Alok Priyadarshi <alokp@chromium.org> Switching off acceleration for small canvas broke gpu tests https://bugs.webkit.org/show_bug.cgi?id=65053 Reviewed by Stephen White. No new tests. These are supposed to fix existing canvas tests on gpu. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::shouldAccelerateCanvas): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setLegacyAccelerated2dCanvasEnabled): (WebCore::Settings::setMinimumAccelerated2dCanvasSize): * page/Settings.h: (WebCore::Settings::minimumAccelerated2dCanvasSize): 2011-07-23 Rob Buis <rbuis@rim.com> Freed SVGTRefElement used in SVGStyledElement::buildPendingResourcesIfNeeded https://bugs.webkit.org/show_bug.cgi?id=64758 Reviewed by Nikolas Zimmermann. Fix the crash by storing referenced content inside a shadow tree. This way removing child nodes of the <tref> does not remove the referenced content. * dom/Text.cpp: (WebCore::Text::recalcStyle): * dom/Text.h: * svg/SVGTRefElement.cpp: (WebCore::SVGShadowText::create): (WebCore::SVGShadowText::SVGShadowText): (WebCore::SVGShadowText::createRenderer): (WebCore::SVGShadowText::recalcStyle): (WebCore::SVGTRefElement::updateReferencedText): (WebCore::SVGTRefElement::childShouldCreateRenderer): 2011-07-23 Shinya Kawanaka <shinyak@google.com> Display number field without using a thousand separator. https://bugs.webkit.org/show_bug.cgi?id=65064 Reviewed by Kent Tamura. Separated formatters for parsing and displaying. Removed a test for thousand separator. * manual-tests/input-number-localization.html: Removed a test for thousand separator. Made the test description more specific. * platform/text/LocalizedNumberICU.cpp: (WebCore::createFormatterForCurrentLocaleToDisplay): Added to introduce a formatter for display. (WebCore::numberFormatterForParsing): Changed the name to be clear. (WebCore::numberFormatterForDisplay): Added. (WebCore::parseLocalizedNumber): Used numberFormatterForParsing. (WebCore::formatLocalizedNumber): Used numberFormatterForDisplay. * platform/text/mac/LocalizedNumberMac.mm: (WebCore::createFormatterForCurrentLocaleForDisplay): Added to introduce a formatter for display. (WebCore::numberFormatterForParsing): Changed the name to be clear. (WebCore::numberFormatterForDisplay): Added. (WebCore::parseLocalizedNumber): Used numberFormatterForParsing. (WebCore::formatLocalizedNumber): Used numberFormatterForDisplay. 2011-07-22 James Robinson <jamesr@chromium.org> [chromium] Seperate texture management for contents textures vs render surface textures https://bugs.webkit.org/show_bug.cgi?id=64771 Reviewed by Kenneth Russell. Splits the chromium texture management across two TextureManagers, one for contents textures and one for render surfaces. The lifetimes and relative evicition costs for these types of textures are significantly different. Content textures need to be managed from paint time through draw time and evicting them is generally expensive, since replacing the texture requires doing a software repaint into a buffer, creating a new texture, and uploading the contents into the texture. Render surface textures are only used while drawing and never contain useful contents between frames. The only reason to preserve a render surface texture between frames is to avoid having to create the texture on the next frame, they never contain useful contents across frames. The contents texture limits remain the same. Render surfaces are allocated the difference between the high memory bound and the contents texture memory use during a frame and the difference between the low memory bound and the contents texture memory use between frames. Covered by existing compositing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::contentsTextureManager): (WebCore::LayerRendererChromium::renderSurfaceTextureManager): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::createTile): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::prepareContentsTexture): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::TextureManager): (WebCore::TextureManager::setMemoryLimitBytes): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureManager::create): (WebCore::TextureManager::currentMemoryUseBytes): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): 2011-07-22 Simon Fraser <simon.fraser@apple.com> Avoiding painting backgrounds if they are fully obscures by an object's foreground https://bugs.webkit.org/show_bug.cgi?id=65030 Reviewed by Dan Bernstein. Some pages use animated loading GIFs as the background of <img>, but WebKit keeps animating these after the <img> has loaded. Thwart this by avoiding the painting of such backgrounds, if we can determine that they are completely obscured by the border and content of the element. * platform/graphics/BitmapImage.h: (WebCore::BitmapImage::currentFrameHasAlpha): Utility method, since currentFrame() is protected. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Call paintBackground(). (WebCore::RenderBox::paintBackground): New wrapper for the paintFillLayers() which paints the background layers, plus some code we call in a couple of places. This checks the new backgroundIsObscured() method before doing any painting. * rendering/RenderBox.h: (WebCore::RenderBox::backgroundIsObscured): New virtual method that determines whether any of the background is visible. * rendering/RenderBoxModelObject.h: * rendering/RenderBoxModelObject.cpp: (WebCore::BorderEdge::obscuresBackground): Returns true if this edge will entirely hide the background under it. (WebCore::RenderBoxModelObject::borderObscuresBackground): Determine whether the border hides the background. * rendering/RenderImage.cpp: (WebCore::RenderImage::backgroundIsObscured): Override the RenderBox method and return true if the image is a loaded, opaque bitmap image, and the background won't show in the border or padding areas. * rendering/RenderImage.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): Use paintBackground(). 2011-07-22 Kenneth Russell <kbr@google.com> HTMLImageElement::crossOrigin is hard to use because of caching https://bugs.webkit.org/show_bug.cgi?id=64813 Reviewed by Adam Barth. Reload the resource if the allowCredentials flag doesn't match that in the request. Test: http/tests/security/canvas-remote-read-remote-image-blocked-then-allowed.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::determineRevalidationPolicy): * loader/cache/CachedResourceLoader.h: 2011-07-22 Simon Fraser <simon.fraser@apple.com> Need to update the acceleratesDrawing status on a layer when switching to/from tiled layers https://bugs.webkit.org/show_bug.cgi?id=65057 Reviewed by Joseph Pecoraro. When switching to or from tiled layers, we need to update the new layer's acceleratesDrawing status. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): 2011-07-22 Mark Pilgrim <pilgrim@chromium.org> Add [Optional=CallWithDefaultValues] flag and use it in initXXXEvent declarations https://bugs.webkit.org/show_bug.cgi?id=64973 Reviewed by Adam Barth. We are doing away with the interface-level LegacyDefaultOptionalArguments flag. To handle some cases of the old behavior, we need to define a new (argument-level) flag so that functions can define optional arguments but not have to declare every single combination of arguments in C++. The old code generator handled this by calling a single C++ function with all arguments, but with default values for the "optional" arguments. Thus, this patch invents a new argument-level flag called [Optional=CallWithDefaultValue] that emulates the old behavior. This patch also fixes all the initXXXEvent declarations to remove the LegacyDefaultOptionalArguments flag and use the new [Optional=CallWithDefaultValue] flag only on the specific arguments that require it for backward compatibility. No new tests, all existing tests pass. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): * dom/BeforeLoadEvent.idl: * dom/BeforeProcessEvent.idl: * dom/CompositionEvent.idl: * dom/CustomEvent.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/ErrorEvent.idl: * dom/Event.idl: * dom/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/OverflowEvent.idl: * dom/PageTransitionEvent.idl: * dom/PopStateEvent.idl: * dom/ProgressEvent.idl: * dom/StreamEvent.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WebKitAnimationEvent.idl: * dom/WebKitTransitionEvent.idl: * dom/WheelEvent.idl: * html/canvas/WebGLContextEvent.idl: * storage/StorageEvent.idl: * websockets/CloseEvent.idl: 2011-07-22 Jessie Berlin <jberlin@apple.com> [WebKit2] Changing the cookie accept policy in Private Browsing doesn’t work https://bugs.webkit.org/show_bug.cgi?id=64997 Reviewed by Ada Chan. * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-07-22 Sergey Glazunov <serg.glazunov@gmail.com> Perform the JavaScript navigation check on a complete URL https://bugs.webkit.org/show_bug.cgi?id=65038 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-document-baseURI-javascript.html * page/DOMWindow.cpp: (WebCore::DOMWindow::setLocation): (WebCore::DOMWindow::createWindow): (WebCore::DOMWindow::open): 2011-07-22 Ryosuke Niwa <rniwa@webkit.org> Revert r91595 for it broke Chromium Windows build. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2011-07-22 Mihnea Ovidenie <mihnea@adobe.com> BORDER attribute with the IMG tag, using percentage values not working. https://bugs.webkit.org/show_bug.cgi?id=20226 Reviewed by Simon Fraser. When border presentational attribute of image element has % in it, it should be parsed using HTML parser rules. In this case, the algorithm is the one used described in: http://www.whatwg.org/specs/web-apps/current-work/#rules-for-parsing-non-negative-integers * html/HTMLImageElement.cpp: (WebCore::parseBorderWidthAttribute): (WebCore::HTMLImageElement::parseMappedAttribute): * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTMLNonNegativeInteger): * html/parser/HTMLParserIdioms.h: 2011-07-22 Scott Graham <scottmg@chromium.org> DocumentLoader keeps a reference to all URL strings ever loaded in m_resourcesClientKnowsAbout leading to lots of memory waste https://bugs.webkit.org/show_bug.cgi?id=61894 Reviewed by James Robinson. DocumentLoader::m_resourcesClientKnowsAbout is a set of all the URLs that have passed through FrameLoader::dispatchWillSendRequest() and is used by FrameLoader::loadedResourceFromMemoryCached to decide whether to inform the FrameLoader's m_client about this load. Unfortunately, this set holds a reference to the URL string for every resource loaded, so on pages that use data URLs to "load" large amounts of data this leaks lots of memory. The cache improves performance going through FrameLoader::loadResourceFromMemoryCache, so rather than removing it, simply exclude 'data:' urls from the cache to save the majority of memory that is held for too long. * loader/DocumentLoader.h: (WebCore::DocumentLoader::didTellClientAboutLoad): 2011-07-22 Alok Priyadarshi <alokp@chromium.org> Use software rendering for small canvas https://bugs.webkit.org/show_bug.cgi?id=64958 Reviewed by Stephen White. No new tests. Does not affect rendering output, just canvas backing. If there is a regression, they should be caught by existing canvas tests. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::shouldAccelerateCanvas): (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::reset): (WebCore::CanvasRenderingContext2D::platformLayer): (WebCore::CanvasRenderingContext2D::clearAcceleration): (WebCore::CanvasRenderingContext2D::resetAcceleration): * html/canvas/CanvasRenderingContext2D.h: 2011-07-21 Adrienne Walker <enne@google.com> Fix repainting of composited fixed position elements in iframes https://bugs.webkit.org/show_bug.cgi?id=64010 Reviewed by Simon Fraser. In cases where an iframe's contents have their own graphics layer, the invalidation during scrolling was being sent to the wrong render layer. Fixed by checking if such a layer exists and routing scrolling invalidations there first. * page/FrameView.cpp: (WebCore::FrameView::scrollContentsSlowPath): 2011-07-22 Viet-Trung Luu <viettrungluu@chromium.org> Improve (i.e., speed up) .gyp(i) files for Chromium https://bugs.webkit.org/show_bug.cgi?id=65032 Reviewed by Adam Barth. Begin splitting off webcore_(privateheader_)files into separate lists (dom/html/svg in this patch), to avoid the very slow pattern of excluding all files and then filtering to include selected files. Test by building (in all supported configurations). * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2011-07-22 Tony Chang <tony@chromium.org> add placeholder RenderFlexibleBox.cpp files https://bugs.webkit.org/show_bug.cgi?id=64982 Reviewed by Ojan Vafai. No new tests, just adding new files and making sure it compiles. Also adding the isFlexibleBox identifier to RenderObject. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderFlexibleBox.cpp: Added. (WebCore::RenderFlexibleBox::RenderFlexibleBox): Inherit from RenderBlock like the old flexbox. (WebCore::RenderFlexibleBox::~RenderFlexibleBox): (WebCore::RenderFlexibleBox::renderName): (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderFlexibleBox.h: Added. (WebCore::RenderFlexibleBox::isFlexibleBox): * rendering/RenderObject.h: (WebCore::RenderObject::isFlexibleBox): 2011-07-22 James Robinson <jamesr@chromium.org> [chromium] Force slow scrolling path for non-composited frames in a composited page https://bugs.webkit.org/show_bug.cgi?id=64991 Reviewed by Darin Fisher. The chromium compositor does not properly handle fast path scrolls for non-composited iframe in a composited page. * page/FrameView.cpp: (WebCore::FrameView::useSlowRepaints): 2011-07-22 Andrew Scherkus <scherkus@chromium.org> Remove surfaceType() and texture() methods from Chromium video frame classes. https://bugs.webkit.org/show_bug.cgi?id=64818 Reviewed by Kenneth Russell. No tests as code was never being executed. * platform/graphics/chromium/VideoFrameChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/VideoLayerChromium.h: 2011-07-22 Nate Chapin <japhet@chromium.org> Don't treat child frame loads as back-forward navigations after the load event fires. This can lead to loading the wrong url in the child frame. https://bugs.webkit.org/show_bug.cgi?id=64895 Reviewed by Mihai Parparita. Test: fast/loader/child-frame-add-after-back-forward.html * dom/Document.h: Drive-by FIXME. * loader/DocumentLoader.h: Drive-by FIXME. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame): 2011-07-22 Kent Tamura <tkent@google.com> REGRESSION(r88757): The thumb of a vertical range slider is offset to the right on non-Mac. https://bugs.webkit.org/show_bug.cgi?id=65011 Reviewed by Dimitri Glazkov. We need to update the apeearance of thumbs before the layout of RenderSlider. * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::updateAppearance): Added. This function adjsuts the apparance of a thumb for the appearance of an <input>. (WebCore::RenderSliderThumb::isSliderThumb): Added. Returns true. (WebCore::RenderSliderThumb::layout): Remove the appearance adjustment code. It is unnecessary because it is done in RenderSlider::layout(). (WebCore::trackLimiterElementOf): Added. * html/shadow/SliderThumbElement.h: Move RenderSliderThumb from SliderThumbElement.cpp. * rendering/RenderObject.h: (WebCore::RenderObject::isSliderThumb): Added. Returns false. * rendering/RenderSlider.cpp: (WebCore::RenderSlider::layout): If the renderers for the thumb element and the limiter element is RenderSliderThumb, updates its appearance. 2011-07-22 Kent Tamura <tkent@chromium.org> Validation message bubble is incorrectly positioned in a relative body. https://bugs.webkit.org/show_bug.cgi?id=65018 Reviewed by Dimitri Glazkov. We use position:aboslute for validation message bubbles, and the origin of the absolute position can be not only the page, but also an ancestor block with non-static position. Test: fast/forms/validation-message-in-relative-body.html * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): Subtract the containing block position from the host position. (WebCore::ValidationMessage::buildBubbleTree): Change the order of appendChild() and adjustBubblePosition() in order to use RenderObject::containingBlock() in adjustbubbleposition(). 2011-07-22 David Grogan <dgrogan@chromium.org> Fix crash in IDBRequest::abort https://bugs.webkit.org/show_bug.cgi?id=64740 Reviewed by Nate Chapin. Tested manually with the testcase in the bug. * storage/IDBRequest.cpp: (WebCore::IDBRequest::~IDBRequest): (WebCore::IDBRequest::abort): 2011-07-22 Patrick Gansterer <paroga@webkit.org> Replace preprocessor statements in IDL files with Conditional attribute https://bugs.webkit.org/show_bug.cgi?id=64961 Reviewed by Darin Adler. Replaced ENABLE_DATALIST, ENABLE_DIRECTORY_UPLOAD, ENABLE_INPUT_SPEECH, ENABLE_MEDIA_STATISTICS and ENABLE_ORIENTATION_EVENTS with the corresponding Conditional attribute. * html/HTMLBodyElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLVideoElement.idl: 2011-07-22 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] add webInspector.resources.onContentEdited https://bugs.webkit.org/show_bug.cgi?id=65024 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype.notifyResourceContentEdited): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.addRevision): 2011-07-22 Pavel Podivilov <podivilov@chromium.org> Web Inspector: fix exception when paused in internal script. https://bugs.webkit.org/show_bug.cgi?id=64995 Reviewed by Yury Semikhatsky. Test: inspector/debugger/pause-in-internal-script.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.PresenationCallFrame.prototype.sourceLine): 2011-07-22 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: sometimes ReceiveResponse event is attached to wrong parent. https://bugs.webkit.org/show_bug.cgi?id=65016 Reviewed by Yury Semikhatsky. Test: inspector/timeline/timeline-receive-response-event.html * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didInstallTimer): (WebCore::InspectorTimelineAgent::didRemoveTimer): (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): (WebCore::InspectorTimelineAgent::didTimeStamp): (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): (WebCore::InspectorTimelineAgent::didMarkLoadEvent): (WebCore::InspectorTimelineAgent::appendRecord): * inspector/InspectorTimelineAgent.h: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): 2011-07-22 Kentaro Hara <haraken@google.com> REGRESSION(r89535): Form reset does not repaint a file upload control. https://bugs.webkit.org/show_bug.cgi?id=65008 Reviewed by Kent Tamura. This patch fixes the code so that the file upload control is repainted in updateFromElement() if no files are selected. Tests: fast/forms/file-input-reset.html * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement): Calls repaint() if no files are selected. 2011-07-22 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: the max depth of the Timeline events' stack trace should be customizable. https://bugs.webkit.org/show_bug.cgi?id=65023 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::startTimelineProfiler): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::pushGCEventRecords): (WebCore::InspectorTimelineAgent::restore): (WebCore::InspectorTimelineAgent::start): (WebCore::InspectorTimelineAgent::didInstallTimer): (WebCore::InspectorTimelineAgent::didRemoveTimer): (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): (WebCore::InspectorTimelineAgent::didTimeStamp): (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): (WebCore::InspectorTimelineAgent::didMarkLoadEvent): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::pushCurrentRecord): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createGenericRecord): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineManager.js: (WebInspector.TimelineManager.prototype.start): 2011-07-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91024. http://trac.webkit.org/changeset/91024 https://bugs.webkit.org/show_bug.cgi?id=65017 number of problems happened with invisible elements which grab pointer events. (Requested by loislo on #webkit). * inspector/front-end/inspector.css: (.panel): (.panel.visible): 2011-07-22 Jia Pu <jpu@apple.com> Reviewed by Darin Adler. [Mac] Need to make sure autocorrection panel is dismissed in Document::setFocusNode(). https://bugs.webkit.org/show_bug.cgi?id=64824 <rdar://problem/9624232> * editing/Editor.cpp: (WebCore::Editor::textFieldDidEndEditing): Dismiss autocorrection panel when current node losing focus. 2011-07-21 Kent Tamura <tkent@chromium.org> A trivial fix for r91550. https://bugs.webkit.org/show_bug.cgi?id=65001 Need to update placeholder visibility when the owner elemnent style is changed. * html/HTMLTextFormControlElement.h: Make updatePlaceholderVisibility() public. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::styleDidChange): Call updatePlaceholderVisibility(). 2011-07-21 Pratik Solanki <psolanki@apple.com> https://bugs.webkit.org/show_bug.cgi?id=65002 Get authentication to work with USE(CFNETWORK) on Mac Reviewed by David Kilzer. Instead of creating a new CFURLAuthChallengeRef, we save and reuse the same object as the one given to us by CFNetwork. * platform/network/mac/AuthenticationMac.mm: (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]): Accessor methods for the new CFURLAuthChallengeRef ivar. (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]): (WebCore::core): Create AuthenticationChallenge using the saved CFURLAuthChallengeRef. (WebCore::mac): Use the CFURLAuthChallengeRef object in AuthenticationChallenge instead of creating a new one. 2011-07-21 Kent Tamura <tkent@chromium.org> REGRESSION(r90971): Placeholder and search cancel button are visible even in elements with visibility:hidden. https://bugs.webkit.org/show_bug.cgi?id=65001 Reviewed by Dimitri Glazkov. Tests: fast/forms/placeholder-in-invisible-elements.html fast/forms/search-cancel-in-invisible-elements.html * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible): Don't show the placeholder if the 'visibility' property of the owner element is 'hidden.' * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): ditto. 2011-07-21 Shinya Kawanaka <shinyak@google.com> The input[type="number"] with step="any" should not suffer from step mismatch. https://bugs.webkit.org/show_bug.cgi?id=64858 Reviewed by Kent Tamura. Added check step="any" not to suffer from step mismatch. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::applyStep): Added check step="any". (WebCore::HTMLInputElement::alignValueForStep): Added. 2011-07-21 MORITA Hajime <morrita@google.com> [Refactoring] ShadowContentSelector should be ShadowInclusionSelector https://bugs.webkit.org/show_bug.cgi?id=64850 Reviewed by Dimitri Glazkov. Renamed: - ShadowContentSelector -> ShadowInclusionSelector - ShadowContentSelector::findInclusionFor -> ShadowInclusionSelector::findFor - ShadowContentSelector::selectInclusion -> ShadowInclusionSelector::select - ShadowContentSelector::unselectInclusion -> ShadowInclusionSelector::unselect - ShadowContentSelector::didSelectInclusion -> ShadowInclusionSelector::didSelect - ShadowContentSelector::willSelectInclusionOver -> ShadowInclusionSelector::willSelectOver - ShadowContentSelector::hasChildren -> ShadowInclusionSelector::hasCandidates No new tests. Just a textual change. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/NodeRenderingContext.cpp: * dom/ShadowContentElement.cpp: (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowInclusionSelector.cpp: Renamed from Source/WebCore/dom/ShadowContentSelector.cpp. (WebCore::ShadowInclusion::append): (WebCore::ShadowInclusion::unlink): (WebCore::ShadowInclusionList::ShadowInclusionList): (WebCore::ShadowInclusionList::~ShadowInclusionList): (WebCore::ShadowInclusionList::find): (WebCore::ShadowInclusionList::clear): (WebCore::ShadowInclusionList::append): (WebCore::ShadowInclusionSelector::ShadowInclusionSelector): (WebCore::ShadowInclusionSelector::~ShadowInclusionSelector): (WebCore::ShadowInclusionSelector::select): (WebCore::ShadowInclusionSelector::unselect): (WebCore::ShadowInclusionSelector::findFor): (WebCore::ShadowInclusionSelector::didSelect): (WebCore::ShadowInclusionSelector::willSelectOver): * dom/ShadowInclusionSelector.h: Renamed from Source/WebCore/dom/ShadowContentSelector.h. (WebCore::ShadowInclusion::includer): (WebCore::ShadowInclusion::content): (WebCore::ShadowInclusion::next): (WebCore::ShadowInclusion::previous): (WebCore::ShadowInclusion::ShadowInclusion): (WebCore::ShadowInclusion::create): (WebCore::ShadowInclusionList::first): (WebCore::ShadowInclusionList::last): (WebCore::ShadowInclusionList::isEmpty): (WebCore::ShadowInclusionSet::add): (WebCore::ShadowInclusionSet::remove): (WebCore::ShadowInclusionSet::isEmpty): (WebCore::ShadowInclusionSet::Translator::hash): (WebCore::ShadowInclusionSet::Translator::equal): (WebCore::ShadowInclusionSet::Hash::hash): (WebCore::ShadowInclusionSet::Hash::equal): (WebCore::ShadowInclusionSet::find): (WebCore::ShadowInclusionSelector::hasCandidates): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::includerFor): (WebCore::ShadowRoot::attach): (WebCore::ShadowRoot::inclusions): (WebCore::ShadowRoot::ensureInclusions): * dom/ShadowRoot.h: 2011-07-21 Robin Qiu <robin.qiu.dev@gmail.com> https://bugs.webkit.org/show_bug.cgi?id=60737 ThumbPosition() in ScrollbarTheme should be ceiled before returned. Otherwise, some topest/leftest content can not be shown by dragging scrollbar thumb. Reviewed by Antonio Gomes. Test: scrollbars/scrollbar-drag-thumb-with-large-content.html * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::thumbPosition): * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::thumbPosition): 2011-07-21 Simon Fraser <simon.fraser@apple.com> GraphicsLayers in subframes can get sync'd multiple times https://bugs.webkit.org/show_bug.cgi?id=52489 Reviewed by James Robinson. Avoid doing a 'syncCompositingState' pass on the GraphicsLayers for subframes, when those GraphicsLayers are rooted in the parent document. * page/FrameView.cpp: (WebCore::FrameView::syncCompositingStateForThisFrame): Add a parameter that contains the rootmost frame on which sync was called. This is used to indicate to the compositor whether it's the root of the sync. (WebCore::FrameView::syncCompositingStateIncludingSubframes): Pass the current Frame in. (WebCore::FrameView::paintContents): The sync is for this frame, so pass m_frame. * page/FrameView.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::flushPendingLayerChanges): New parameter to specify whether this compositor is in the rootmost Frame being flushed. We can avoid doing work if we know that flushing some ancestor frame would have also traversed our GraphicsLayers. * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::isFlushingLayers): Make this private, since callers are probably most intersted in enclosingCompositorFlushingLayers(). 2011-07-21 Rafael Brandao <rafael.lobo@openbossa.org> Local files cannot load icons. https://bugs.webkit.org/show_bug.cgi?id=62459 Previous policy only allowed favicons for pages whose protocol was part of HTTP family. Changed that to allow to any url that's not empty and whose protocol is not "about". Also added this check where it attempts to start loading the favicon, so it can avoid wasting time downloading a resource that won't be stored and won't be used. Reviewed by Adam Barth. Test: manual-tests/resources/favicon-loads-for-local-files.html * loader/icon/IconController.cpp: (WebCore::IconController::startLoader): Added check to avoid to request a favicon when there's no way to store it. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::documentCanHaveIcon): Renamed function "pageCanHaveIcon" to reflect better which url we're handling. (WebCore::IconDatabase::synchronousIconForPageURL): Ditto. (WebCore::IconDatabase::synchronousIconURLForPageURL): Ditto. (WebCore::IconDatabase::retainIconForPageURL): Ditto. (WebCore::IconDatabase::releaseIconForPageURL): Ditto. (WebCore::IconDatabase::setIconURLForPageURL): Ditto. (WebCore::IconDatabase::getOrCreatePageURLRecord): Ditto. (WebCore::IconDatabase::importIconURLForPageURL): Ditto. (WebCore::IconDatabase::performURLImport): Ditto. * loader/icon/IconDatabase.h: * loader/icon/IconDatabaseBase.h: (WebCore::IconDatabaseBase::documentCanHaveIcon): Added it as virtual to replace its default behavior of not allowing favicons when we have IconDatabase enabled. * manual-tests/resources/favicon-loads-for-local-files.html: Added. * manual-tests/resources/favicon.png: Added. 2011-07-21 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> Fix for bug 64046 - Wrong image height in absolutely positioned div in relatively positioned parent with bottom padding. https://bugs.webkit.org/show_bug.cgi?id=64046 Reviewed by David Hyatt. Test: fast/css/absolute-child-with-percent-height-inside-relative-parent.html * rendering/RenderBox.cpp: (WebCore::RenderBox::availableLogicalHeightUsing): 2011-07-21 Gavin Peters <gavinp@chromium.org> Extend the protector of a CSS style sheet. Because checkLoaded() can recursively delete parent style elements, the protector should be extended to include the parent call. https://bugs.webkit.org/show_bug.cgi?id=64736 Reviewed by Simon Fraser. Test: fast/css/css-imports-2.html * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::checkLoaded): 2011-07-21 Kenneth Russell <kbr@google.com> Update webglcontextlost / webglcontextrestored delivery to match spec changes https://bugs.webkit.org/show_bug.cgi?id=58621 Reviewed by James Robinson. Updated conditions under which webglcontextrestored event is delivered to be spec compliant. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::loseContext): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: 2011-07-21 Dave Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=64975 Elements that have columns (e.g., column-width or column-count non-auto) and elements that have column-spans establish block formatting contexts, and therefore they should not be allowing child margins to collapse with their own margins. Reviewed by Beth Dakin. Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): 2011-07-21 Matthew Delaney <mdelaney@apple.com> Add fast path for ImageBuffer::draw, Take 2. https://bugs.webkit.org/show_bug.cgi?id=64535 Reviewed by Simon Fraser. No new tests. This patch doesn't change behavior; current tests are sufficient. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): Moved the main method version next to wrapper versions. * platform/graphics/ImageBuffer.h: 1) Added BackingStoreCopy enum for choosing to copy backing store or not in copyImage(). 2) Added copyNativeImage() behind USE(CG) - same as copyImage() but gives NativeImagePtr. * platform/graphics/cg/ImageBufferCG.cpp: Added new methods described above. * platform/graphics/GraphicsContext.h: Adding drawNativeImage() for fast draw path. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): Added. Draws a nativeImagePtr into context. * platform/graphics/Image.h: Added imageWithColorSpace behind CG platform ifdef * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): Refactored out actual image drawing code into GraphicsContext, so that it can be used by more than just BitmapImage without having to copy code. (WebCore::Image::imageWithColorSpace): Made into an Image class function. Updated copyImage() to use BackingStoreCopy: * platform/graphics/qt/ImageBufferQt.cpp * platform/graphics/filters/FETile.cpp * platform/graphics/cairo/ImageBufferCairo.cpp * platform/graphics/skia/ImageBufferSkia.cpp * platform/graphics/wx/ImageBufferWx.cpp * platform/graphics/wince/ImageBufferWinCE.cpp * svg/SVGFEImageElement.cpp * svg/graphics/SVGImage.cpp * html/HTMLCanvasElement.cpp * html/canvas/WebGLRenderingContext.cpp * rendering/svg/RenderSVGResourcePattern.cpp 2011-07-21 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/64972> Clean up generated HTMLEntityTable.cpp output Reviewed by Eric Seidel. * html/parser/create-html-entity-table: - Fix duplicate "EntityName" suffix on local variables (changes fooSemicolonEntityNameEntityName to fooSemicolonEntityName) for all 2138 symbols. - Add newlines to make source file human-readable (as originally intended). - Add static (const) keywords to local variables that are never referenced externally. 2011-07-21 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from FileAPI https://bugs.webkit.org/show_bug.cgi?id=64539 Reviewed by Adam Barth. No new tests, all existing tests pass. * fileapi/Blob.idl: * fileapi/DirectoryEntry.idl: * fileapi/DirectoryEntrySync.idl: * fileapi/DirectoryReader.idl: * fileapi/EntriesCallback.idl: * fileapi/Entry.idl: * fileapi/EntryArray.idl: * fileapi/EntryArraySync.idl: * fileapi/EntryCallback.idl: * fileapi/EntrySync.idl: * fileapi/ErrorCallback.idl: * fileapi/FileCallback.idl: * fileapi/FileEntry.idl: * fileapi/FileList.idl: * fileapi/FileReader.idl: * fileapi/FileReaderSync.idl: * fileapi/FileSystemCallback.idl: * fileapi/FileWriter.idl: * fileapi/FileWriterCallback.idl: * fileapi/FileWriterSync.idl: * fileapi/MetadataCallback.idl: * fileapi/WebKitBlobBuilder.idl: 2011-07-21 Tony Chang <tony@chromium.org> sort WebCore.xcodeproj https://bugs.webkit.org/show_bug.cgi?id=64901 Unreviewed, just using sort-Xcode-project-file. * WebCore.xcodeproj/project.pbxproj: 2011-07-21 Enrica Casucci <enrica@apple.com> Cannot click to position the caret to the right of an image with display:block style. https://bugs.webkit.org/show_bug.cgi?id=64962 <rdar://problem/9446343> Reviewed by David Hyatt. Test: editing/selection/click-on-block-image.html The current implementation of positionForPoint always returns the visible position to the left of the image, if the image has a block style. This patch changes the behavior for block styled images to match the behavior for inline images. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::positionForPoint): Modified to avoid relying entirely on InlineBox to calculate the position. 2011-07-21 Pavel Feldman <pfeldman@google.com> Not reviewed: one liner typo fix in Inspector.json. * inspector/Inspector.json: 2011-07-21 Sam Weinig <sam@webkit.org> CSS top margin collapses when paginating https://bugs.webkit.org/show_bug.cgi?id=64906 Reviewed by David Hyatt. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::estimateLogicalTopPosition): Update to only go down paginated path when we actually have a page height (so not in the case that we are just gathering breaks) and to call the version of of nextPageLogicalTop that actually returns the next page, even if we are at the boundary point. (WebCore::RenderBlock::nextPageLogicalTopExcludingBoundaryPoint): (WebCore::RenderBlock::nextPageLogicalTopIncludingBoundaryPoint): Split into two functions which differ in how they deal with the boundary condition. (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): Switch to call nextPageLogicalTopIncludingBoundaryPoint. * rendering/RenderBlock.h: Add new functions declarations and comment them. 2011-07-21 Pavel Feldman <pfeldman@google.com> Web Inspector: RuntimeAgent.evaluateOn should not require "return X;" syntax. https://bugs.webkit.org/show_bug.cgi?id=64691 Reviewed by Yury Semikhatsky. I'm introducing callFunctionOn that receives function declaration in order to make call site syntax clear. Test: inspector/runtime/runtime-callFunctionOn.html * inspector/InjectedScript.cpp: (WebCore::InjectedScript::callFunctionOn): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::callFunctionOn): * inspector/InspectorRuntimeAgent.h: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions): (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode): (WebInspector.ElementsTreeElement.prototype._createTooltipForNode): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.nodeResolved.protoList): (WebInspector.PropertiesSidebarPane.prototype.update.nodeResolved): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.callFunction): 2011-07-21 Andrew Wason <rectalogic@rectalogic.com> [Qt] Adopt existing GraphicsContext3D members (part 1) https://bugs.webkit.org/show_bug.cgi?id=64877 Reviewed by Noam Rosenthal. Existing WebGL layout tests should test this. Remove GraphicsContext3DInternal members and use the existing corresponding members from GraphicsContext3D instead. Move most of the GraphicsContext3DInternal constructor, destructor and the reshape() method into GraphicsContext3D. The GraphicsContext3D members will be needed when we adopt GraphicsContext3DOpenGL.cpp. * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::paintToTextureMapper): (WebCore::GraphicsContext3DInternal::boundingRect): (WebCore::GraphicsContext3DInternal::paint): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformTexture): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::getContextAttributes): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::synthesizeGLError): (WebCore::GraphicsContext3D::markLayerComposited): (WebCore::GraphicsContext3D::markContextChanged): (WebCore::GraphicsContext3D::layerComposited): (WebCore::GraphicsContext3D::getExtensions): 2011-07-21 Pavel Feldman <pfeldman@google.com> Web Inspector: [protocol] extend setBreakpointByUrl request to accept incomplete URL (predicates) https://bugs.webkit.org/show_bug.cgi?id=60762 Reviewed by Yury Semikhatsky. Test: inspector/debugger/debugger-set-breakpoint-regex.html * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::matches): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: 2011-07-21 Kent Tamura <tkent@chromium.org> REGRESSION(r88757): input[type=range] renders incorrectly in RTL context. https://bugs.webkit.org/show_bug.cgi?id=64904 Reviewed by Ryosuke Niwa. Tests: fast/forms/input-appearance-range-rtl.html * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::layout): The thumb should be positioned based on 'right' CSS property instead of 'left.' (WebCore::SliderThumbElement::setPositionFromPoint): The fraction should be flipped in RTL. 2011-07-18 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Remove networkDataRemoved field from resource. https://bugs.webkit.org/show_bug.cgi?id=64749 Reviewed by Pavel Feldman. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._frameNavigated): 2011-07-21 Tommy Widenflycht <tommyw@google.com> MediaStream API: Merging MediaStreamContainer and MediaStreamList https://bugs.webkit.org/show_bug.cgi?id=64794 Reviewed by Tony Gentilcore. * GNUmakefile.list.am: * dom/MediaStreamContainer.h: Removed. * dom/MediaStreamList.cpp: (WebCore::MediaStreamList::create): (WebCore::MediaStreamList::MediaStreamList): (WebCore::MediaStreamList::length): (WebCore::MediaStreamList::item): (WebCore::MediaStreamList::add): (WebCore::MediaStreamList::remove): (WebCore::MediaStreamList::contains): (WebCore::MediaStreamList::get): * dom/MediaStreamList.h: 2011-07-20 Yury Semikhatsky <yurys@chromium.org> Web Inspector: always open dedicated worker inspector in a new window not a new tab https://bugs.webkit.org/show_bug.cgi?id=64872 Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype.openWorkerInspector): 2011-07-21 MORITA Hajime <morrita@google.com> [Refactoring] Shadow inclusion cache should be managed by ShadowContentSelector https://bugs.webkit.org/show_bug.cgi?id=64849 Reviewed by Dimitri Glazkov. This change is a reorg around Shadow inclusion mechanism. - Moved definition of ShadowInclusion, ShadowInclusionSet and ShadowInclusionList from ShadowContentElement.h to ShadowContentSelector.h, which is included from smaller number of places. - Moved ShadowInclusionSet from ShadowRoot to ShadowContentSelector - Made ShadowContentSelector's lifetime managed by ShadowRoot because ShadowInclusionSet is held by the selector. - Thus, there is no longer "active" selector (ShadowContentSelector::s_currentInstance) Because the selector is associated for each ShadowRoot object. No new tests. No behavior change. * dom/NodeRenderingContext.cpp: * dom/ShadowContentElement.cpp: (WebCore::ShadowContentElement::ShadowContentElement): (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowContentElement.h: (WebCore::ShadowContentElement::inclusions): * dom/ShadowContentSelector.cpp: (WebCore::ShadowInclusion::append): (WebCore::ShadowInclusion::unlink): (WebCore::ShadowInclusionList::ShadowInclusionList): (WebCore::ShadowInclusionList::~ShadowInclusionList): (WebCore::ShadowInclusionList::find): (WebCore::ShadowInclusionList::clear): (WebCore::ShadowInclusionList::append): (WebCore::ShadowContentSelector::ShadowContentSelector): (WebCore::ShadowContentSelector::~ShadowContentSelector): (WebCore::ShadowContentSelector::selectInclusion): (WebCore::ShadowContentSelector::unselectInclusion): (WebCore::ShadowContentSelector::findInclusionFor): (WebCore::ShadowContentSelector::didSelectInclusion): (WebCore::ShadowContentSelector::willSelectInclusionOver): * dom/ShadowContentSelector.h: (WebCore::ShadowInclusion::includer): (WebCore::ShadowInclusion::content): (WebCore::ShadowInclusion::next): (WebCore::ShadowInclusion::previous): (WebCore::ShadowInclusion::ShadowInclusion): (WebCore::ShadowInclusion::create): (WebCore::ShadowInclusionList::first): (WebCore::ShadowInclusionList::last): (WebCore::ShadowInclusionList::isEmpty): (WebCore::ShadowInclusionSet::add): (WebCore::ShadowInclusionSet::remove): (WebCore::ShadowInclusionSet::isEmpty): (WebCore::ShadowInclusionSet::Translator::hash): (WebCore::ShadowInclusionSet::Translator::equal): (WebCore::ShadowInclusionSet::Hash::hash): (WebCore::ShadowInclusionSet::Hash::equal): (WebCore::ShadowInclusionSet::find): (WebCore::ShadowContentSelector::hasChildren): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::includerFor): (WebCore::ShadowRoot::attach): (WebCore::ShadowRoot::inclusions): (WebCore::ShadowRoot::ensureInclusions): * dom/ShadowRoot.h: 2011-07-21 Rohan McGovern <rohan@mcgovern.id.au> Reviewed by Noam Rosenthal. [Qt] Qt5 Build Fix: remove useless use of qRound(int) https://bugs.webkit.org/show_bug.cgi?id=64907 Rounding an integer doesn't make sense. Since 2dcd3939a8bd5ff743e4c87f87b2d81b1a101467 in qtbase, this is not permitted to compile. No new tests needed. * platform/graphics/qt/FontPlatformDataQt.cpp: (WebCore::FontPlatformData::FontPlatformData): Eliminate qRound(int). * platform/qt/PlatformScreenQt.cpp: (WebCore::screenDepthPerComponent): Ditto. 2011-07-20 Ryosuke Niwa <rniwa@webkit.org> Fix a Valgrind failure caused by r91435. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::ScrollableArea): 2011-07-20 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91332. http://trac.webkit.org/changeset/91332 https://bugs.webkit.org/show_bug.cgi?id=64925 Crashes css3/images/optimize-contrast-canvas.html on safari- mac,chromium-mac (Requested by mikelawther on #webkit). * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::makePresentationCopy): (WebCore::HTMLCanvasElement::copiedImage): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::videoFrameToImage): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): * platform/graphics/GraphicsContext.h: * platform/graphics/Image.h: * platform/graphics/ImageBuffer.h: * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::copyImage): * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::cgImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::clip): (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageCG.cpp: (WebCore::imageWithColorSpace): (WebCore::BitmapImage::draw): (WebCore::Image::drawPattern): * platform/graphics/filters/FETile.cpp: (WebCore::FETile::apply): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::copyImage): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): 2011-07-20 Ryosuke Niwa <rniwa@webkit.org> Chromium build fix after r91440. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): 2011-07-20 Ryosuke Niwa <rniwa@webkit.org> Build fix after r91435. * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformSetScrollbarOverlayStyle): 2011-07-20 Tim Horton <timothy_horton@apple.com> Reviewed by Darin Adler. Errors encountered within SVG documents should be reported to the console https://bugs.webkit.org/show_bug.cgi?id=62599 <rdar://problem/9727074> Add SVGLength::construct, which can be used to construct an SVGLength as normal, but returns an SVGParsingError via a reference argument. The function also takes another argument, which is whether or not the SVGLength value is allowed to be negative. If not, an error is thrown. It defaults to allowing negatives if not specified. * GNUmakefile.list.am: * svg/SVGLength.cpp: (WebCore::SVGLength::construct): (WebCore::SVGLength::rawValue): * svg/SVGLength.h: * svg/SVGElement.h: * svg/SVGParsingError.h: Added. * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2011-07-20 Levi Weintraub <leviw@chromium.org> Switch getTransformFromContainer and its uses to new layout types https://bugs.webkit.org/show_bug.cgi?id=64908 Reviewed by Simon Fraser. Switching getTransformFromContainer and its uses to use the new Layout Types from strictly integer ones. No new tests, no new functionality. * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createLocalTransformState): * rendering/RenderObject.cpp: (WebCore::RenderObject::getTransformFromContainer): * rendering/RenderObject.h: * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): (WebCore::RenderView::mapAbsoluteToLocalPoint): 2011-07-20 Tim Horton <timothy_horton@apple.com> Scrollbar color heuristic needs to be hooked up in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=64220 <rdar://problem/9589140> Reviewed by Darin Adler. Store the scroller style on ScrollableArea, and recompute it whenever the document or body element background color changes or the base background color of the scrollview changes. Also, make sure to repaint the scrollbars whenever the style changes. No new tests, since this code is only enabled on future versions of Mac OS X. * WebCore.exp.in: * page/Frame.cpp: (WebCore::Frame::getDocumentBackgroundColor): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::recalculateScrollbarOverlayStyle): (WebCore::FrameView::setBaseBackgroundColor): (WebCore::FrameView::documentBackgroundColor): Renamed. * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::setScrollbarOverlayStyle): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setScrollbarOverlayStyle): * platform/ScrollableArea.h: (WebCore::ScrollableArea::scrollbarOverlayStyle): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle): * platform/mac/ScrollViewMac.mm: (WebCore::toNSScrollerKnobStyle): (WebCore::ScrollView::platformSetScrollbarOverlayStyle): * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::paint): * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): 2011-07-20 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyWebkitTransformOriginZ and Origin in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=64785 Note that this changes a cast from computed length double -> 28 bit int -> float to computed length double -> float I couldn't see any reason in the code that this was strictly necessary, however it may have been so that X,Y,Z all have the same behavior, even though Z itself is not stored in a Length. Reviewed by Simon Fraser. No new tests / refactoring. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-07-20 Tony Chang <tony@chromium.org> Remove stray reference to StyleFlexibleBoxData.h that was accidentally added in r91402. * WebCore.xcodeproj/project.pbxproj: 2011-07-20 Levi Weintraub <leviw@chromium.org> Bring Int/Float graphics classes closer to parity https://bugs.webkit.org/show_bug.cgi?id=64833 Reviewed by James Robinson. In preparation of switching to Floating point data structures, bringing the functionality and method names of the Int/Float graphics classes close together. Also fixing some compiler errors when using Floats for layout units along the way. No new tests, no functionality change. * page/FrameView.cpp: (WebCore::FrameView::convertFromRenderer): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: (WebCore::ScrollView::convertChildToSelf): (WebCore::ScrollView::convertSelfToChild): * platform/graphics/FloatPoint.h: (WebCore::operator-): Adding a single-parameter version. * platform/graphics/FloatSize.cpp: (WebCore::FloatSize::isZero): Adding isZero that uses epsilon for floats. * platform/graphics/FloatSize.h: * platform/graphics/IntPoint.h: (WebCore::IntPoint::moveBy): Renaming IntPoint version to moveBy to mirror FloatPoint. * platform/graphics/RoundedRect.cpp: (WebCore::RoundedRect::Radii::expand): Switching to specific templatized max. * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::requestedRegionOfInputImageData): * rendering/RenderBlock.cpp: Moving outstanding Int* functions to Layout units. (WebCore::RenderBlock::paintContinuationOutlines): (WebCore::RenderBlock::logicalRectToPhysicalRect): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint): * rendering/RenderTable.cpp: (WebCore::RenderTable::subtractCaptionRect): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): (WebCore::RenderTableCell::setOverrideSizeFromRowHeight): (WebCore::RenderTableCell::paintCollapsedBorder): (WebCore::RenderTableCell::paintBackgroundsBehindCell): * rendering/RenderTableCell.h: * rendering/RenderView.h: (WebCore::RenderView::pushLayoutState): (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): (WebCore::LayoutStateMaintainer::push): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::paddedLayoutOverflowRect): (WebCore::setAscentAndDescent): * rendering/RootInlineBox.h: 2011-07-20 Scott Graham <scottmg@chromium.org> mouseover reporting incorrect mouse button, when the button isn't down. https://bugs.webkit.org/show_bug.cgi?id=64882 Reviewed by Eric Seidel. Don't increment the button returned in 'which' unless the button is actually down. Test: fast/events/mouseover-button.html * dom/MouseEvent.cpp: (WebCore::MouseEvent::which): 2011-07-20 Kenneth Russell <kbr@google.com> Add restoreContext() to WEBKIT_lose_context https://bugs.webkit.org/show_bug.cgi?id=58626 Reviewed by James Robinson. Added the restoreContext() entry point to the WEBKIT_lose_context extension. Refactored and simplified the logic associated with context loss and restoration. A subsequent patch will make the delivery of the webglcontextrestored event spec compliant. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired): (WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback): (WebCore::WebGLRenderingContextLostCallback::onContextLost): (WebCore::WebGLRenderingContext::isContextLost): (WebCore::WebGLRenderingContext::forceLostContext): (WebCore::WebGLRenderingContext::forceRestoreContext): (WebCore::WebGLRenderingContext::loseContext): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::WebGLRenderingContextRestoreTimer): * html/canvas/WebKitLoseContext.cpp: (WebCore::WebKitLoseContext::loseContext): (WebCore::WebKitLoseContext::restoreContext): * html/canvas/WebKitLoseContext.h: * html/canvas/WebKitLoseContext.idl: 2011-07-20 Tony Chang <tony@chromium.org> Pass -webkit-flex() values on to RenderStyle https://bugs.webkit.org/show_bug.cgi?id=64038 Reviewed by Eric Seidel. No new tests, this just copies data to RenderStyle, which we can then access when doing layout. Tests will come with the layout changes. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLength::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 2011-07-20 Daniel Bates <dbates@rim.com> Attempt to fix the GTK build after changeset 91396 <http://trac.webkit.org/changeset/91396> (https://bugs.webkit.org/show_bug.cgi?id=64764). * xml/parser/MarkupTokenBase.h: #include <stdio.h> in debug build for printf(3), which is used in MarkupTokenBase::printString() and MarkupTokenBase::printAttrs(). 2011-07-19 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Add support for disabling cache in web inspector. https://bugs.webkit.org/show_bug.cgi?id=64097 Reviewed by Pavel Feldman. Tests: http/tests/inspector/network/network-disable-cache-memory.html http/tests/inspector/network/network-disable-cache-xhrs.html * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorClient.h: (WebCore::InspectorClient::setCacheDisabled): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::enable): (WebCore::InspectorResourceAgent::disable): (WebCore::InspectorResourceAgent::setCacheDisabled): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.inflightResourceForURL): (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): 2011-07-20 Peter Kasting <pkasting@google.com> Remove "const" from obviously-non-const accessors https://bugs.webkit.org/show_bug.cgi?id=62302 Reviewed by Darin Adler. No functional change, so no new tests. * WebCore.exp.in: Adjust function names to reflect non-constness. * dom/Element.cpp: (WebCore::Element::cloneElementWithoutAttributesAndChildren): Not const, calls non-const function Document::createElement(). (WebCore::Element::scrollLeft): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::scrollTop): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::scrollWidth): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::scrollHeight): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::boundsInWindowSpace): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::getClientRects): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::getBoundingClientRect): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::innerText): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Element::outerText): Not const, calls newly non-const function Element::innerText(). * dom/Element.h: * dom/Node.cpp: (WebCore::Node::isContentEditable): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::Node::shouldUseInputMethod): Not const, calls newly non-const function Node::isContentEditable(). * dom/Node.h: * dom/OptionElement.h: Virtual function OptionElement::selected() not const because HTMLOptionElement implementation is non-const. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::text): Not const, calls newly non-const function Element::innerText(). * html/HTMLAnchorElement.h: * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::renderWidgetForJSBindings): Not const, calls non-const function RenderApplet::createWidgetIfNecessary(). * html/HTMLAppletElement.h: * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::imageElement): Not const, calls newly non-const function HTMLMapElement::imageElement(). * html/HTMLAreaElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::scrollLeft): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::HTMLBodyElement::scrollTop): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::HTMLBodyElement::scrollHeight): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::HTMLBodyElement::scrollWidth): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). * html/HTMLBodyElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): Not const, calls non-const function Document::createElement(). * html/HTMLEmbedElement.h: * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::width): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::HTMLFrameElementBase::height): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). * html/HTMLFrameElementBase.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::width): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::HTMLImageElement::height): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldUseInputMethod): Virtual function not const because Node implementation is non-const. * html/HTMLInputElement.h: * html/HTMLKeygenElement.cpp: (WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Virtual function not const because Element implementation is non-const. * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): Not const, calls non-const function Document::images(). * html/HTMLMapElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::renderWidgetForJSBindings): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). * html/HTMLObjectElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::selected): Not const, calls non-const function HTMLSelectElement::recalcListItemsIfNeeded(). * html/HTMLOptionElement.h: * html/HTMLPlugInElement.cpp: Virtual function HTMLPlugInElement::renderWidgetForJSBindings() not const because various subclass implementations are non-const. (WebCore::HTMLPlugInElement::getInstance): Not const, calls newly non-const function HTMLPlugInElement::pluginWidget(). (WebCore::HTMLPlugInElement::pluginWidget): Not const, calls newly non-const function HTMLPlugInElement::renderWidgetForJSBindings(). * html/HTMLPlugInElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::cloneElementWithoutAttributesAndChildren): Virtual function not const because Element implementation is non-const. * html/HTMLScriptElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::shouldUseInputMethod): Virtual function not const because Node implementation is non-const. * html/HTMLTextAreaElement.h: * html/shadow/SliderThumbElement.h: (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Virtual function not const because Element implementation is non-const. * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::cloneElementWithoutAttributesAndChildren): Virtual function not const because Element implementation is non-const. * rendering/svg/SVGShadowTreeElements.h: * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::hasValidAttributeType): Not const, calls newly non-const function SVGSMILElement::targetElement(). * svg/SVGAnimateElement.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::hasValidAttributeType): Not const, calls newly non-const function SVGSMILElement::targetElement(). * svg/SVGAnimateMotionElement.h: * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::hasValidAttributeType): Not const, calls newly non-const function SVGSMILElement::targetElement(). * svg/SVGAnimateTransformElement.h: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): Not const, calls newly non-const function SVGSMILElement::targetElement(). * svg/SVGAnimationElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::accessDocumentSVGExtensions): Not const, calls non-const function Document::accessSVGExtensions(). (WebCore::SVGElement::boundingBox): Not const, calls newly non-const function SVGStyledLocatableElement::getBBox(). * svg/SVGElement.h: * svg/SVGLocatable.cpp: (WebCore::SVGLocatable::getBBox): Argument not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets() on argument. (WebCore::SVGLocatable::computeCTM): Argument not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets() on argument. (WebCore::SVGLocatable::getTransformToElement): Not const, calls newly non-const function SVGLocatable::getCTM(). * svg/SVGLocatable.h: Virtual functions SVGLocatable::getBBox(), SVGLocatable::getCTM(), and SVGLocatable::getScreenCTM() not const because various subclass implementations are non-const. * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::cloneElementWithoutAttributesAndChildren): Virtual function not const because Element implementation is non-const. * svg/SVGScriptElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded): Not const, calls non-const function Document::accessSVGExtensions(). * svg/SVGStyledElement.h: * svg/SVGStyledLocatableElement.cpp: (WebCore::SVGStyledLocatableElement::getBBox): Not const, calls newly non-const static function SVGLocatable::getBBox(). (WebCore::SVGStyledLocatableElement::getCTM): Not const, calls newly non-const static function SVGLocatable::computeCTM(). (WebCore::SVGStyledLocatableElement::getScreenCTM): Not const, calls newly non-const static function SVGLocatable::computeCTM(). * svg/SVGStyledLocatableElement.h: * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::getCTM): Not const, calls newly non-const static function SVGLocatable::computeCTM(). (WebCore::SVGStyledTransformableElement::getScreenCTM): Not const, calls newly non-const static function SVGLocatable::computeCTM(). (WebCore::SVGStyledTransformableElement::getBBox): Not const, calls newly non-const static function SVGLocatable::getBBox(). (WebCore::SVGStyledTransformableElement::toClipPath): Virtual function not const because SVGUseElement implementation is non-const. * svg/SVGStyledTransformableElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::getNumberOfChars): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getComputedTextLength): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getSubStringLength): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getStartPositionOfChar): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getEndPositionOfChar): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getExtentOfChar): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getRotationOfChar): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::getCharNumAtPosition): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::SVGTextContentElement::selectSubString): Not const, calls newly non-const static function SVGTextContentElement::getNumberOfChars(). * svg/SVGTextContentElement.h: * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::getBBox): Not const, calls newly non-const static function SVGLocatable::getBBox(). (WebCore::SVGTextElement::getCTM): Not const, calls newly non-const static function SVGLocatable::computeCTM(). (WebCore::SVGTextElement::getScreenCTM): Not const, calls newly non-const static function SVGLocatable::computeCTM(). * svg/SVGTextElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::instanceRoot): Not const, calls non-const function Document::updateLayoutIgnorePendingStylesheets(). (WebCore::isDirectReference): (WebCore::SVGUseElement::toClipPath): Not const, calls non-const function Document::accessSVGExtensions(). * svg/SVGUseElement.h: * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::eventBaseFor): Not const, calls newly non-const function SVGSMILElement::targetElement(). (WebCore::SVGSMILElement::targetElement): Not const, calls non-const function Document::accessSVGExtensions(). * svg/animation/SVGSMILElement.h: Virtual function SVGSMILElement::hasValidAttributeType() not const because various subclass implementations are non-const. 2011-07-20 Andy Estes <aestes@apple.com> Fix the Mac build after r91392. * WebCore.xcodeproj/project.pbxproj: StyleFlexibleBoxData.h should be a private forwarding header of WebCore. 2011-07-20 Jeffrey Pfau <jpfau@apple.com> New Token class for XML https://bugs.webkit.org/show_bug.cgi?id=64764 Reviewed by Adam Barth. Refactor HTMLToken into MarkupTokenBase and add new XMLToken * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addSource): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertDoctype): (WebCore::HTMLConstructionSite::insertComment): (WebCore::HTMLConstructionSite::insertCommentOnDocument): (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLMetaCharsetParser.cpp: (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): * html/parser/HTMLPreloadScanner.cpp: (WebCore::HTMLPreloadScanner::processToken): * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::start): (WebCore::HTMLSourceTracker::sourceForToken): * html/parser/HTMLToken.h: (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData): (WebCore::HTMLToken::appendToName): (WebCore::HTMLToken::name): (WebCore::HTMLToken::forceQuirks): (WebCore::HTMLToken::setForceQuirks): (WebCore::AtomicHTMLToken::AtomicHTMLToken): (WebCore::AtomicHTMLToken::type): (WebCore::AtomicHTMLToken::selfClosing): (WebCore::AtomicHTMLToken::characters): (WebCore::AtomicHTMLToken::comment): (WebCore::AtomicHTMLToken::publicIdentifier): (WebCore::AtomicHTMLToken::systemIdentifier): (WebCore::AtomicHTMLToken::forceQuirks): (WebCore::AtomicHTMLToken::usesName): (WebCore::AtomicHTMLToken::usesAttributes): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): (WebCore::HTMLTokenizer::flushBufferedEndTag): (WebCore::HTMLTokenizer::nextToken): (WebCore::HTMLTokenizer::haveBufferedCharacterToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::constructTreeFromToken): (WebCore::HTMLTreeBuilder::processToken): (WebCore::HTMLTreeBuilder::processDoctypeToken): (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::processFakeEndTag): (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processStartTagForInTable): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): (WebCore::HTMLTreeBuilder::processEndTagForInTableBody): (WebCore::HTMLTreeBuilder::processEndTagForInRow): (WebCore::HTMLTreeBuilder::processEndTagForInCell): (WebCore::HTMLTreeBuilder::processEndTagForInBody): (WebCore::HTMLTreeBuilder::processEndTagForInTable): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processComment): (WebCore::HTMLTreeBuilder::processCharacter): (WebCore::HTMLTreeBuilder::processEndOfFile): (WebCore::HTMLTreeBuilder::defaultForBeforeHTML): (WebCore::HTMLTreeBuilder::defaultForBeforeHead): (WebCore::HTMLTreeBuilder::defaultForInHead): (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript): (WebCore::HTMLTreeBuilder::defaultForAfterHead): (WebCore::HTMLTreeBuilder::processStartTagForInHead): (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): (WebCore::HTMLTreeBuilder::processScriptStartTag): * html/parser/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::updateTokenizerState): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterTokenInitial): (WebCore::XSSAuditor::filterTokenAfterScriptStartTag): (WebCore::XSSAuditor::filterScriptToken): (WebCore::XSSAuditor::filterObjectToken): (WebCore::XSSAuditor::filterParamToken): (WebCore::XSSAuditor::filterEmbedToken): (WebCore::XSSAuditor::filterAppletToken): (WebCore::XSSAuditor::filterIframeToken): (WebCore::XSSAuditor::filterMetaToken): (WebCore::XSSAuditor::filterBaseToken): (WebCore::XSSAuditor::filterFormToken): * xml/parser/MarkupTokenBase.h: Added. (WebCore::DoctypeDataBase::DoctypeDataBase): (WebCore::MarkupTokenBase::MarkupTokenBase): (WebCore::MarkupTokenBase::~MarkupTokenBase): (WebCore::MarkupTokenBase::clear): (WebCore::MarkupTokenBase::isUninitialized): (WebCore::MarkupTokenBase::startIndex): (WebCore::MarkupTokenBase::endIndex): (WebCore::MarkupTokenBase::setBaseOffset): (WebCore::MarkupTokenBase::end): (WebCore::MarkupTokenBase::makeEndOfFile): (WebCore::MarkupTokenBase::beginStartTag): (WebCore::MarkupTokenBase::beginEndTag): (WebCore::MarkupTokenBase::ensureIsCharacterToken): (WebCore::MarkupTokenBase::beginComment): (WebCore::MarkupTokenBase::beginDOCTYPE): (WebCore::MarkupTokenBase::appendToCharacter): (WebCore::MarkupTokenBase::appendToComment): (WebCore::MarkupTokenBase::addNewAttribute): (WebCore::MarkupTokenBase::beginAttributeName): (WebCore::MarkupTokenBase::endAttributeName): (WebCore::MarkupTokenBase::beginAttributeValue): (WebCore::MarkupTokenBase::endAttributeValue): (WebCore::MarkupTokenBase::appendToAttributeName): (WebCore::MarkupTokenBase::appendToAttributeValue): (WebCore::MarkupTokenBase::type): (WebCore::MarkupTokenBase::selfClosing): (WebCore::MarkupTokenBase::setSelfClosing): (WebCore::MarkupTokenBase::attributes): (WebCore::MarkupTokenBase::eraseCharacters): (WebCore::MarkupTokenBase::eraseValueOfAttribute): (WebCore::MarkupTokenBase::characters): (WebCore::MarkupTokenBase::comment): (WebCore::MarkupTokenBase::publicIdentifier): (WebCore::MarkupTokenBase::systemIdentifier): (WebCore::MarkupTokenBase::setPublicIdentifierToEmptyString): (WebCore::MarkupTokenBase::setSystemIdentifierToEmptyString): (WebCore::MarkupTokenBase::appendToPublicIdentifier): (WebCore::MarkupTokenBase::appendToSystemIdentifier): (WebCore::MarkupTokenBase::printString): (WebCore::MarkupTokenBase::printAttrs): (WebCore::MarkupTokenBase::appendToName): (WebCore::MarkupTokenBase::name): * xml/parser/XMLToken.h: Added. (WebCore::XMLToken::XMLToken): (WebCore::XMLToken::clear): (WebCore::XMLToken::appendToName): (WebCore::XMLToken::name): (WebCore::XMLToken::beginDOCTYPE): (WebCore::XMLToken::beginXMLDeclaration): (WebCore::XMLToken::appendToXMLVersion): (WebCore::XMLToken::beginXMLEncoding): (WebCore::XMLToken::appendToXMLEncoding): (WebCore::XMLToken::setXMLStandalone): (WebCore::XMLToken::beginProcessingInstruction): (WebCore::XMLToken::appendToProcessingInstructionTarget): (WebCore::XMLToken::appendToProcessingInstructionData): (WebCore::XMLToken::beginCDATA): (WebCore::XMLToken::appendToCDATA): (WebCore::XMLToken::beginEntity): (WebCore::XMLToken::print): (WebCore::XMLToken::XMLDeclarationData::XMLDeclarationData): 2011-07-20 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> WebKit crashes on selection when documentElement is removed. https://bugs.webkit.org/show_bug.cgi?id=63908 This patch adds NULL pointer validation for documentElement in WebCore::startOfDocument Reviewed by Eric Seidel. Test: editing/selection/selection-empty-documentElement.html * editing/visible_units.cpp: (WebCore::startOfDocument): 2011-07-20 Mike Reed <reed@google.com> [skia] use nocheck version of pixel packer when caller already has premultiplied data https://bugs.webkit.org/show_bug.cgi?id=64881 Reviewed by Kenneth Russell. No new tests. existing canvas and svg test exercise this * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::putImageData): 2011-07-20 Tony Chang <tony@chromium.org> add new flexbox data to StyleRareNonInheritedData https://bugs.webkit.org/show_bug.cgi?id=64765 Reviewed by David Hyatt. Add placeholders for the positive and negative flex values for the width and the height. When we get to the other properties (flex-pack, flex-align, etc), we'll add more to the StyleFlexibleBoxData class No new tests, these values aren't hooked up to anything yet. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexboxWidthPositiveFlex): (WebCore::InheritedFlags::flexboxWidthNegativeFlex): (WebCore::InheritedFlags::flexboxHeightPositiveFlex): (WebCore::InheritedFlags::flexboxHeightNegativeFlex): (WebCore::InheritedFlags::setFlexboxWidthPositiveFlex): (WebCore::InheritedFlags::setFlexboxWidthNegativeFlex): (WebCore::InheritedFlags::setFlexboxHeightPositiveFlex): (WebCore::InheritedFlags::setFlexboxHeightNegativeFlex): (WebCore::InheritedFlags::initialFlexboxWidthPositiveFlex): (WebCore::InheritedFlags::initialFlexboxWidthNegativeFlex): (WebCore::InheritedFlags::initialFlexboxHeightPositiveFlex): (WebCore::InheritedFlags::initialFlexboxHeightNegativeFlex): * rendering/style/StyleAllInOne.cpp: * rendering/style/StyleFlexibleBoxData.cpp: Added. (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: Added. (WebCore::StyleFlexibleBoxData::create): (WebCore::StyleFlexibleBoxData::copy): (WebCore::StyleFlexibleBoxData::operator!=): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-07-20 Cary Clark <caryclark@google.com> update FontSkia to match platform context convention https://bugs.webkit.org/show_bug.cgi?id=64795 Reviewed by James Robinson. No new tests. This platform variant is not built at this time. * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): Call makeGrContextCurrent instead of the obsolete prepareForSoftwareDraw. 2011-07-20 Brian Weinstein <bweinstein@apple.com> Build fix after r91384. Add an ASSERT_UNSED for the timer. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): 2011-07-20 Tony Chang <tony@chromium.org> Stale pointer due to floats not removed (flexible box display) https://bugs.webkit.org/show_bug.cgi?id=64603 Reviewed by David Hyatt. Flexbox items should avoid floats. Test: fast/flexbox/horizontal-box-float-crash.html * rendering/RenderBox.cpp: (WebCore::RenderBox::avoidsFloats): * rendering/RenderBox.h: (WebCore::RenderBox::isDeprecatedFlexItem): 2011-07-20 Scott Graham <scottmg@chromium.org> Reviewed by Antti Koivisto. REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Upon completing a load start a Timer to iterate through CachedResourceLoader's m_documentResources map to check for any items that have only one reference (thus being the reference in the map itself). The map should really be weak, but because the CachedResourceHandle achieves bookkeeping work in addition to reference counting, this is a simpler and more localized way to free the used memory while maintaining the other behaviour (when CachedResource is used as proxy). No new layout tests, but with this patch the testcase at https://bugs.webkit.org/attachment.cgi?id=93850 should no longer consume 400MB of ram on load. * loader/cache/CachedResource.h: (WebCore::CachedResource::getHandleCount): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::loadDone): (WebCore::CachedResourceLoader::garbageCollectDocumentResources): * loader/cache/CachedResourceLoader.h: 2011-07-20 James Robinson <jamesr@chromium.org> Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock https://bugs.webkit.org/show_bug.cgi?id=64841 Reviewed by Mark Rowe. http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the monotonic clock instead of WTF::currentTime(). This broke many plugin tests on WebKit2 for reasons that are unclear. This reverts everything except for WebCore::ThreadTimers back to the previous behavior. * workers/WorkerRunLoop.cpp: (WebCore::WorkerSharedTimer::setFireInterval): 2011-07-20 James Simonsen <simonjam@chromium.org> Refuse to run scripts inside the SVG shadow DOM https://bugs.webkit.org/show_bug.cgi?id=64776 This is a rollback of r90970. The hack that was removed there was also protecting us from two further bugs that have been discovered. So, the hack is going back in. Reviewed by Tony Gentilcore. * dom/ScriptElement.cpp: (WebCore::ScriptElement::prepareScript): 2011-07-20 David Levin <levin@chromium.org> gtk shouldn't have global variables for timers. https://bugs.webkit.org/show_bug.cgi?id=64871 Reviewed by Martin Robinson. No new functionality exposed so no new tests. * platform/graphics/cairo/ContextShadowCairo.cpp: (WebCore::scheduleScratchBufferPurge): Changed global variable to DEFINE_STATIC_LOCAL. * platform/gtk/WidgetRenderingContext.cpp: (WebCore::scheduleScratchBufferPurge): Ditto. 2011-07-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> [GTK] REGRESSION(r86436): does not add newlines when return is pressed with some modifiers held https://bugs.webkit.org/show_bug.cgi?id=64867 Reviewed by Martin Robinson. * platform/gtk/KeyBindingTranslator.cpp: (WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent): special-case enter keys so that their commands are returned whatever the modifiers state. 2011-07-20 Mike Reed <reed@google.com> [skia] disable lcd text when drawing on a transparent layer or canvas https://bugs.webkit.org/show_bug.cgi?id=64873 Reviewed by Stephen White. No new tests. canvas sites illustrate the bug. DRT disables LCD so existing layouttests are not affected by this change. * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::isCanvasMultiLayered): (WebCore::disableTextLCD): (WebCore::setupPaintForFont): (WebCore::paintSkiaText): 2011-07-20 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: add keyboard shortcuts to load/save operations in Timeline panel. https://bugs.webkit.org/show_bug.cgi?id=64864 Export/import were renamed to save/load. Ctrl|Meta-S/Ctrl|Meta-O shortcuts were added for Save and Load operations. Ctrl|Meta-E shortcut toggles Record button; Ctrl|Meta-Shift-F shortcut toggles short records filter button; All the shortcuts were added to the shortcuts help screen. There was a problem with saving empty data. Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._registerShortcuts): (WebInspector.TimelinePanel.prototype._createFileSelector): (WebInspector.TimelinePanel.prototype._contextMenu): (WebInspector.TimelinePanel.prototype._saveToFile): (WebInspector.TimelinePanel.prototype._loadFromFile): (WebInspector.TimelineModel.prototype._loadNextChunk): (WebInspector.TimelineModel.prototype._loadFromFile): (WebInspector.TimelineModel.prototype._loadFromFile.onError): (WebInspector.TimelineModel.prototype._saveToFile): 2011-07-20 Ryosuke Niwa <rniwa@webkit.org> Speculative build fix after r91355. * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): 2011-07-20 Tommy Widenflycht <tommyw@google.com> MediaStream API: Update the tracklists to the latest spec https://bugs.webkit.org/show_bug.cgi?id=64791 Reviewed by Tony Gentilcore. The test harness will be forthcoming very soon now, introducing tests for this. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventTarget.cpp: (WebCore::toJS): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * dom/DOMAllInOne.cpp: * dom/EventTarget.cpp: * dom/EventTarget.h: * dom/ExclusiveTrackList.cpp: Removed. * dom/LocalMediaStream.cpp: (WebCore::LocalMediaStream::create): (WebCore::LocalMediaStream::LocalMediaStream): (WebCore::LocalMediaStream::streamEnded): (WebCore::LocalMediaStream::stop): * dom/LocalMediaStream.h: (WebCore::LocalMediaStream::isLocalMediaStream): * dom/LocalMediaStream.idl: * dom/MediaStream.cpp: (WebCore::MediaStream::create): (WebCore::MediaStream::MediaStream): * dom/MediaStream.h: (WebCore::MediaStream::tracks): * dom/MediaStream.idl: * dom/MediaStreamTrack.cpp: Copied from Source/WebCore/dom/ExclusiveTrackList.h. (WebCore::MediaStreamTrack::create): (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::kind): (WebCore::MediaStreamTrack::label): (WebCore::MediaStreamTrack::enabled): (WebCore::MediaStreamTrack::setEnabled): * dom/MediaStreamTrack.h: Renamed from Source/WebCore/dom/MultipleTrackList.h. * dom/MediaStreamTrack.idl: Renamed from Source/WebCore/dom/ExclusiveTrackList.idl. * dom/MediaStreamTrackList.cpp: Renamed from Source/WebCore/dom/ExclusiveTrackList.h. (WebCore::MediaStreamTrackList::create): (WebCore::MediaStreamTrackList::MediaStreamTrackList): (WebCore::MediaStreamTrackList::~MediaStreamTrackList): (WebCore::MediaStreamTrackList::length): (WebCore::MediaStreamTrackList::item): * dom/MediaStreamTrackList.h: Renamed from Source/WebCore/dom/TrackList.idl. (WebCore::MediaStreamTrackList::associateStream): * dom/MediaStreamTrackList.idl: Renamed from Source/WebCore/dom/MultipleTrackList.idl. * dom/MultipleTrackList.cpp: Removed. * dom/TrackList.cpp: Removed. * dom/TrackList.h: Removed. * page/MediaStreamClient.h: * page/MediaStreamController.cpp: (WebCore::MediaStreamController::setMediaStreamTrackEnabled): (WebCore::MediaStreamController::streamGenerated): * page/MediaStreamController.h: * page/MediaStreamFrameController.cpp: (WebCore::MediaStreamFrameController::setMediaStreamTrackEnabled): (WebCore::MediaStreamFrameController::streamGenerated): * page/MediaStreamFrameController.h: 2011-07-20 Andrew Wason <rectalogic@rectalogic.com> [Qt] Make OpenGL symbol resolver transparent https://bugs.webkit.org/show_bug.cgi?id=57154 Reviewed by Noam Rosenthal. Adopting new resolver should be transparent, existing tests should apply. Adopt OpenGLShims symbol resolver from cairo for Qt. Update TextureMapperGL and Qt GraphicsContext3D to use the resolver. * WebCore.pro: * platform/graphics/cairo/OpenGLShims.cpp: (WebCore::getProcAddress): * platform/graphics/cairo/OpenGLShims.h: * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::beginPainting): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::reshape): (WebCore::GraphicsContext3DInternal::paintToTextureMapper): (WebCore::GraphicsContext3DInternal::paint): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::getAttachedShaders): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::blendColor): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::blendEquationSeparate): (WebCore::GraphicsContext3D::blendFuncSeparate): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::checkFramebufferStatus): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::disableVertexAttribArray): (WebCore::GraphicsContext3D::enableVertexAttribArray): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::generateMipmap): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::sampleCoverage): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::stencilFuncSeparate): (WebCore::GraphicsContext3D::stencilMaskSeparate): (WebCore::GraphicsContext3D::stencilOpSeparate): (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::getBufferParameteriv): (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getRenderbufferParameteriv): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::createBuffer): (WebCore::GraphicsContext3D::createFramebuffer): (WebCore::GraphicsContext3D::createProgram): (WebCore::GraphicsContext3D::createRenderbuffer): (WebCore::GraphicsContext3D::createShader): (WebCore::GraphicsContext3D::deleteBuffer): (WebCore::GraphicsContext3D::deleteFramebuffer): (WebCore::GraphicsContext3D::deleteProgram): (WebCore::GraphicsContext3D::deleteRenderbuffer): (WebCore::GraphicsContext3D::deleteShader): 2011-07-20 Steve Block <steveblock@google.com> [V8] JavaMethodJobject::signature() incorrectly encodes arguments of type JavaTypeString https://bugs.webkit.org/show_bug.cgi?id=62389 Reviewed by Tony Gentilcore. Covered by existing tests. * bridge/jni/JavaMethodJobject.cpp: (JavaMethodJobject::signature): 2011-07-20 Yury Semikhatsky <yurys@chromium.org> Web Inspector: sidebar width sometimes is not restored https://bugs.webkit.org/show_bug.cgi?id=64869 Make sure sidebar width is restored even if window initial size has not been set yet. Reviewed by Pavel Feldman. * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): (WebInspector.Panel.prototype.updateSidebarWidth): 2011-07-20 Andrey Kosyakov <caseq@chromium.org> Web Inspector: remove dead code (WebInspector.drawLoadingPieChart) https://bugs.webkit.org/show_bug.cgi?id=64868 Reviewed by Yury Semikhatsky. * inspector/front-end/inspector.js: 2011-07-20 Andrey Kosyakov <caseq@chromium.org> Web Inspector: move Network log view to an iframe https://bugs.webkit.org/show_bug.cgi?id=62006 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onWindowMessage): * inspector/front-end/IFrameView.js: Added. (WebInspector.IFrameView): (WebInspector.IFrameView.prototype._innerShow): (WebInspector.IFrameView.prototype._innerHide): (WebInspector.IFrameView.prototype.attach): (WebInspector.IFrameView.prototype._attachIFrameAndInitialize): (WebInspector.IFrameView.prototype.addStylesheets): (WebInspector.IFrameView.prototype._setDocumentType): (WebInspector.IFrameView.prototype._propagateBodyStyle): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype.initializeView): (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype._updateDividersIfNeeded): (WebInspector.NetworkLogView.prototype.show): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkLogView.prototype.switchToDetailedView): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype.get _setLargerResources): (WebInspector.NetworkLogView.prototype._updateHighlightIfMatched): (WebInspector.NetworkLogView.prototype.performSearch): (WebInspector.NetworkLogView.prototype.searchCanceled): (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype._onSearchCountUpdated): (WebInspector.NetworkDataGridNode.prototype.select): * inspector/front-end/Popover.js: (WebInspector.Popover.prototype._positionElement): * inspector/front-end/View.js: (WebInspector.View.prototype._innerShow): (WebInspector.View.prototype.show): (WebInspector.View.prototype._innerHide): (WebInspector.View.prototype.hide): * inspector/front-end/WebKit.qrc: * inspector/front-end/dataGrid.css: Added. * inspector/front-end/inspectorCommon.css: Added. * inspector/front-end/networkLogView.css: Copied from Source/WebCore/inspector/front-end/networkPanel.css. 2011-07-20 Steve Block <steveblock@google.com> JobjectWrapper should inherit from RefCounted rather than implementing its own ref counting https://bugs.webkit.org/show_bug.cgi?id=55786 Also adds static create() method and cleans up use of data members. Reviewed by Tony Gentilcore. No new tests, refactoring only. * bridge/jni/JobjectWrapper.cpp: (JobjectWrapper::JobjectWrapper): * bridge/jni/JobjectWrapper.h: (JSC::Bindings::JobjectWrapper::create): * bridge/jni/jsc/JavaArrayJSC.cpp: (JavaArray::JavaArray): * bridge/jni/jsc/JavaArrayJSC.h: (JSC::Bindings::JavaArray::javaArray): * bridge/jni/jsc/JavaFieldJSC.cpp: (JavaField::JavaField): (JavaField::dispatchValueFromInstance): (JavaField::dispatchSetValueToInstance): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::JavaInstance): (JavaInstance::getClass): (JavaInstance::stringValue): (JavaInstance::numberValue): (JavaInstance::booleanValue): (JavaInstance::invokeMethod): * bridge/jni/jsc/JavaInstanceJSC.h: (JSC::Bindings::JavaInstance::javaInstance): * bridge/jni/v8/JavaFieldJobjectV8.cpp: (JavaFieldJobject::JavaFieldJobject): * bridge/jni/v8/JavaInstanceJobjectV8.cpp: (JavaInstanceJobject::JavaInstanceJobject): * bridge/jni/v8/JavaInstanceJobjectV8.h: (JSC::Bindings::JavaInstanceJobject::javaInstance): 2011-07-20 Kentaro Hara <haraken@google.com> The value of a number input form continues to increase/decrease even if we disable the input form. https://bugs.webkit.org/show_bug.cgi?id=64786 Reviewed by Kent Tamura. The value of the number input form continues to increase/decrease in the following scenario: (1) Click the spin button of the input form. (2) Hook the 'mouseup' event and disable the input form. (3) Enable the input form after some delay (e.g. 50ms). What is happening above is as follows: (1) When the 'mousedown' event happens, the repeating timer of the spin button starts. (2) If the input form is not disabled, the repeating timer stops at the 'mouseup' event. However, if the input form is disabled, the 'mouseup' event is ignored, failing to stop the repeating timer. (3) The value continues to increase/decrease, since the repeating timer is still working. This patch stops the repeating timer when the input form gets disabled or readonly. Test: fast/forms/spin-button-gets-disabled-or-readonly.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Calls disabledAttributeChanged() when 'disabled' attribute gets changed. Calls readonlyAttributeChanged() when 'readonly' attribute gets changed. * html/InputType.cpp: (WebCore::InputType::disabledAttributeChanged): Stops the repeating timer and releases mouse capturing. (WebCore::InputType::readonlyAttributeChanged): Ditto. * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::disabledAttributeChanged): Ditto. (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto. * html/TextFieldInputType.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::detach): Replased the code with releaseCapture(). (WebCore::SpinButtonElement::defaultEventHandler): Ditto. (WebCore::SpinButtonElement::releaseCapture): Stops the repeating timer and releases mouse capturing. * html/shadow/TextControlInnerElements.h: 2011-07-20 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91285. http://trac.webkit.org/changeset/91285 https://bugs.webkit.org/show_bug.cgi?id=64854 "Assertion hit in svg/custom/crash-textPath-attributes.html" (Requested by mihnea on #webkit). * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-07-20 Yury Semikhatsky <yurys@chromium.org> Web Inspector: don't send Console.enable messages in case of workers https://bugs.webkit.org/show_bug.cgi?id=64853 Reviewed by Pavel Feldman. * inspector/front-end/inspector.js: 2011-07-20 Boris Smus <smus@chromium.org> Add a resourceLink audit formatter to make it possible for devtools extensions to link to specific lines in HTML/JS/CSS resources from the audit results panel. https://bugs.webkit.org/show_bug.cgi?id=64315 Reviewed by Yury Semikhatsky. * inspector/front-end/AuditFormatters.js: resourceLink implementation * inspector/front-end/ExtensionAPI.js: registering resourceLink FormattedValue 2011-07-20 Kent Tamura <tkent@chromium.org> input type=number doesn't render correctly in rtl. https://bugs.webkit.org/show_bug.cgi?id=59703 Reviewed by Ryosuke Niwa. Test: fast/forms/input-appearance-number-rtl.html * css/html.css: (input[type="search"]::-webkit-textfield-decoration-container): Set "direction: ltr;" only for type=search because we'd like to respect text direction except type=search. (input[x-webkit-speech][di=rtl]::-webkit-input-speech-button): Remove a workaround. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): Support for RTL in the spin button location adjustment. 2011-07-19 Steve Lacey <sjl@chromium.org> [chromium] Media player controls do not fade out. https://bugs.webkit.org/show_bug.cgi?id=64837 Media controls were not fading out when the mouse leaves the video due to underlying changes in webkit media controls. Fix was to copy missing code from MediaControlRootElement to MediaControlRootElementChromium. Reviewed by Dimitri Glazkov. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): (WebCore::MediaControlRootElementChromium::playbackProgressed): (WebCore::MediaControlRootElementChromium::containsRelatedTarget): (WebCore::MediaControlRootElementChromium::defaultEventHandler): * html/shadow/MediaControlRootElementChromium.h: 2011-07-19 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyCounterIncrement and CounterReset in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=64846 Reviewed by Dimitri Glazkov. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyCounter Added class to handle counter properties. (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize counter property handlers. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove old handlers. 2011-07-19 Kent Tamura <tkent@chromium.org> REGRESSION(r89004): Video pauses and never resumes playing if scrubbed during playback. https://bugs.webkit.org/show_bug.cgi?id=64314 Reviewed by Sam Weinig. No new tests because it's hard to make a non-flaky test for this behavior. * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): Don't call SliderThumbElement::dragFrom() for events on the thumb. * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::defaultEventHandler): Do not call setDefaultHandled() for mouse events in order to propagate them to ancestor elements. 2011-07-19 Matthew Delaney <mdelaney@apple.com> Add fast path for ImageBuffer::draw https://bugs.webkit.org/show_bug.cgi?id=64535 Reviewed by Simon Fraser. No new tests. This patch doesn't change behavior; current tests are sufficient. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): Moved the main method version next to wrapper versions. * platform/graphics/ImageBuffer.h: 1) Added BackingStoreCopy enum for choosing to copy backing store or not in copyImage(). 2) Added copyNativeImage() behind USE(CG) - same as copyImage() but gives NativeImagePtr. * platform/graphics/cg/ImageBufferCG.cpp: Added new methods described above. * platform/graphics/GraphicsContext.h: Adding drawNativeImage() for fast draw path. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): Added. Draws a nativeImagePtr into context. * platform/graphics/Image.h: Added imageWithColorSpace behind CG platform ifdef * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): Refactored out actual image drawing code into GraphicsContext, so that it can be used by more than just BitmapImage without having to copy code. (WebCore::Image::imageWithColorSpace): Made into an Image class function. Updated copyImage() to for BackingStoreCopy: * platform/graphics/qt/ImageBufferQt.cpp * platform/graphics/filters/FETile.cpp * platform/graphics/cairo/ImageBufferCairo.cpp * platform/graphics/skia/ImageBufferSkia.cpp * platform/graphics/wx/ImageBufferWx.cpp * platform/graphics/wince/ImageBufferWinCE.cpp * svg/SVGFEImageElement.cpp * svg/graphics/SVGImage.cpp * html/HTMLCanvasElement.cpp * html/canvas/WebGLRenderingContext.cpp * rendering/svg/RenderSVGResourcePattern.cpp 2011-07-19 Leo Yang <leoyang.webkit@gmail.com> SVG: Missing implementation of <altGlyphDef>, <altGlyphItem> and <glyphRef> https://bugs.webkit.org/show_bug.cgi?id=60850 Reviewed by Nikolas Zimmermann. SVG spec: http://www.w3.org/TR/SVG/text.html#AlternateGlyphDefinitions. This patch is to implement SVG <altGlyphDef>, <altGlyphItem> and <glyphRef> elements for alternative glyph features. NOTE: x, y, dx, dy, format and glyphRef attributes on <glyphRef> are not honored yet, so neither are the reaction of dynamic change of them. They will be honored in separated patches. Test: svg/W3C-SVG-1.1/text-altglyph-01-b.svg With this patch this test works as expected. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOM.mm: (WebCore::createElementClassMap): * bindings/objc/DOMSVG.h: * page/DOMWindow.idl: * svg/SVGAllInOne.cpp: * svg/SVGAltGlyphDefElement.cpp: Added. (WebCore::SVGAltGlyphDefElement::SVGAltGlyphDefElement): (WebCore::SVGAltGlyphDefElement::create): (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements): * svg/SVGAltGlyphDefElement.h: Added. * svg/SVGAltGlyphDefElement.idl: Added. * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElements): * svg/SVGAltGlyphElement.h: * svg/SVGAltGlyphItemElement.cpp: Added. (WebCore::SVGAltGlyphItemElement::SVGAltGlyphItemElement): (WebCore::SVGAltGlyphItemElement::create): (WebCore::SVGAltGlyphItemElement::hasValidGlyphElements): * svg/SVGAltGlyphItemElement.h: Added. * svg/SVGAltGlyphItemElement.idl: Added. * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): * svg/SVGGlyphRefElement.cpp: Added. (WebCore::SVGGlyphRefElement::SVGGlyphRefElement): (WebCore::SVGGlyphRefElement::create): (WebCore::SVGGlyphRefElement::hasValidGlyphElement): (WebCore::SVGGlyphRefElement::parseMappedAttribute): (WebCore::SVGGlyphRefElement::glyphRef): (WebCore::SVGGlyphRefElement::setGlyphRef): (WebCore::SVGGlyphRefElement::setX): (WebCore::SVGGlyphRefElement::setY): (WebCore::SVGGlyphRefElement::setDx): (WebCore::SVGGlyphRefElement::setDy): * svg/SVGGlyphRefElement.h: Added. * svg/SVGGlyphRefElement.idl: Added. * svg/svgtags.in: 2011-07-19 Adam Roben <aroben@apple.com> Remove some unused code in FormDataStreamCFNet Rubber-stamped by Steve Falkenburg. * platform/network/cf/FormDataStreamCFNet.cpp: 2011-07-19 Simon Fraser <simon.fraser@apple.com> REGRESSION (r91136-r91146): 40 tests failing on Windows 7 Release (Tests) https://bugs.webkit.org/show_bug.cgi?id=64808 Reviewed by Adam Roben. Initializing m_uncommittedChanges to a non-zero value caused the first call to noteLayerPropertyChanged() to not call m_client->notifySyncRequired(). This resulted in animations never getting committed on Windows, which broke a lot of tests. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): 2011-07-19 James Robinson <jamesr@chromium.org> [chromium] LayerRendererChromium shouldn't be a friend of RenderSurfaceChromium https://bugs.webkit.org/show_bug.cgi?id=64834 Reviewed by Kenneth Russell. Uses setters and getters to access RenderSurfaceChromium's private member variables instead of directly accessing them via a friend declaration. This cleans up a minor code smell and will be helpful for future refactoring. Refactor only, no change in behavior. Tested by compositing/ tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces): (WebCore::LayerRendererChromium::updateCompositorResources): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::drawLayer): (WebCore::LayerRendererChromium::setScissorToRect): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::clearLayerList): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::layerList): (WebCore::RenderSurfaceChromium::contentRect): (WebCore::RenderSurfaceChromium::setContentRect): (WebCore::RenderSurfaceChromium::drawOpacity): (WebCore::RenderSurfaceChromium::setDrawOpacity): (WebCore::RenderSurfaceChromium::drawTransform): (WebCore::RenderSurfaceChromium::setDrawTransform): (WebCore::RenderSurfaceChromium::maskLayer): (WebCore::RenderSurfaceChromium::setMaskLayer): (WebCore::RenderSurfaceChromium::originTransform): (WebCore::RenderSurfaceChromium::setOriginTransform): (WebCore::RenderSurfaceChromium::replicaDrawTransform): (WebCore::RenderSurfaceChromium::setReplicaDrawTransform): (WebCore::RenderSurfaceChromium::scissorRect): (WebCore::RenderSurfaceChromium::setScissorRect): (WebCore::RenderSurfaceChromium::skipsDraw): (WebCore::RenderSurfaceChromium::setSkipsDraw): (WebCore::RenderSurfaceChromium::contentsTexture): 2011-07-19 Jessie Berlin <jberlin@apple.com> GTK + QT build fix. Rubber-stamped by Daniel Bates and Alexey Proskuryakov. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): (WebCore::ResourceLoader::didSendData): (WebCore::ResourceLoader::didReceiveResponse): (WebCore::ResourceLoader::didReceiveData): (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFail): (WebCore::ResourceLoader::wasBlocked): (WebCore::ResourceLoader::cannotShowURL): (WebCore::ResourceLoader::shouldUseCredentialStorage): (WebCore::ResourceLoader::willCacheResponse): 2011-07-19 Chris Rogers <crogers@google.com> Fix web audio compile on mac port https://bugs.webkit.org/show_bug.cgi?id=64836 Unreviewed build fix. * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): (WebCore::JSAudioContext::createBuffer): 2011-07-19 Jessie Berlin <jberlin@apple.com> Work towards determining the cause of frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache. https://bugs.webkit.org/show_bug.cgi?id=62764 Reviewed by Alexey Proskuryakov. Make these unexpected cases crash in the WebKit nightlies so we can gather more information and potentially find a repro case. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): (WebCore::ResourceLoader::didSendData): (WebCore::ResourceLoader::didReceiveResponse): (WebCore::ResourceLoader::didReceiveData): (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFail): (WebCore::ResourceLoader::wasBlocked): (WebCore::ResourceLoader::cannotShowURL): (WebCore::ResourceLoader::shouldUseCredentialStorage): (WebCore::ResourceLoader::willCacheResponse): 2011-07-19 Dan Bernstein <mitz@apple.com> Nothing printed when specifying a very large maximum layout width https://bugs.webkit.org/show_bug.cgi?id=64831 Reviewed by Beth Dakin. I am not adding a test because the DumpRenderTree printing test machinery is based on PrintContext, which does not exercise the code path on which this bug lies. * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): Fixed an integer overflow. 2011-07-19 Nate Chapin <japhet@chromium.org> [V8] Wait until no v8 context is on the stack before cancelling pending indexed db transactions. https://bugs.webkit.org/show_bug.cgi?id=64552 Reviewed by Adam Barth. Test: storage/indexeddb/transaction-abort-with-js-recursion.html * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::didLeaveScriptContext): 2011-07-19 MORITA Hajime <morrita@google.com> Crash in CompositeEditCommand::replaceTextInNodePreservingMarkers. https://bugs.webkit.org/show_bug.cgi?id=64738 Reviewed by Ryosuke Niwa. Test: editing/undo/replace-text-in-node-preserving-markers-crash.html * editing/CompositeEditCommand.cpp: (WebCore::copyMarkers): (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers): 2011-07-19 Mike West <mkwst@chromium.org> Sending a `Ping-From` header for cross-origin pings from non-HTTPS documents. https://bugs.webkit.org/show_bug.cgi?id=64789 Also a drive-by cleanup of whitespace. Reviewed by Nate Chapin. * loader/PingLoader.cpp: (WebCore::PingLoader::loadImage): (WebCore::PingLoader::sendPing): 2011-07-15 Luke Zarko <lukezarko@gmail.com> Bring V8's SerializedScriptValue implementation up to date. https://bugs.webkit.org/show_bug.cgi?id=63481 Reviewed by David Levin. The HTML5 Structured Clone algorithm (http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data) has been updated since the V8 version of SerializedScriptValue was first implemented. This patch aims to bring this implementation up to date. It: - Introduces the new HTML5 DOM error codes for TIMEOUT_ERR, INVALID_NODE_TYPE_ERR, DATA_CLONE_ERR - Handles cyclic structures and equality of reference preservation for cloned values - Allows DataViews to be constructed on the native side using the existing wrapper techniques - Amends tests and introduces new ones to check for correctness (the bulk of the patch) - Tolerates the old version of the serialized object format The patch permits the cloning of JavaScript typed arrays. This functionality is in active use already and was supported (somewhat inefficiently) by the existing code through an artifact of implementation. Tests: fast/dom/Window/window-postmessage-clone-deep-array.html fast/dom/Window/window-postmessage-clone-really-deep-array.html fast/dom/Window/window-postmessage-clone.html fast/canvas/webgl/array-message-passing.html * bindings/v8/SerializedScriptValue.cpp: (WebCore::V8ObjectMap::Writer::writeVersion): (WebCore::V8ObjectMap::Writer::writeArrayBuffer): (WebCore::V8ObjectMap::Writer::writeArrayBufferView): (WebCore::V8ObjectMap::Writer::writeObjectReference): (WebCore::V8ObjectMap::Writer::writeReferenceCount): (WebCore::V8ObjectMap::Writer::writeGenerateFreshObject): (WebCore::V8ObjectMap::Writer::writeGenerateFreshArray): (WebCore::V8ObjectMap::Writer::doWriteArrayBuffer): (WebCore::V8ObjectMap::Serializer::Serializer): (WebCore::V8ObjectMap::Serializer::serialize): (WebCore::V8ObjectMap::Serializer::StateBase::execDepth): (WebCore::V8ObjectMap::Serializer::AbstractObjectState::AbstractObjectState): (WebCore::V8ObjectMap::Serializer::AbstractObjectState::advance): (WebCore::V8ObjectMap::Serializer::AbstractObjectState::execDepth): (WebCore::V8ObjectMap::Serializer::execDepth): (WebCore::V8ObjectMap::Serializer::push): (WebCore::V8ObjectMap::Serializer::pop): (WebCore::V8ObjectMap::Serializer::handleError): (WebCore::V8ObjectMap::Serializer::writeAndGreyArrayBufferView): (WebCore::V8ObjectMap::Serializer::writeArrayBuffer): (WebCore::V8ObjectMap::Serializer::greyObject): (WebCore::V8ObjectMap::Serializer::doSerialize): (WebCore::V8ObjectMap::Reader::Reader): (WebCore::V8ObjectMap::Reader::read): (WebCore::V8ObjectMap::Reader::readVersion): (WebCore::V8ObjectMap::Reader::setVersion): (WebCore::V8ObjectMap::Reader::undoReadTag): (WebCore::V8ObjectMap::Reader::readArrayBufferViewSubTag): (WebCore::V8ObjectMap::Reader::doReadArrayBuffer): (WebCore::V8ObjectMap::Reader::readArrayBuffer): (WebCore::V8ObjectMap::Reader::readArrayBufferView): (WebCore::V8ObjectMap::Deserializer::Deserializer): (WebCore::V8ObjectMap::Deserializer::deserialize): (WebCore::V8ObjectMap::Deserializer::newArray): (WebCore::V8ObjectMap::Deserializer::consumeTopOfStack): (WebCore::V8ObjectMap::Deserializer::completeArray): (WebCore::V8ObjectMap::Deserializer::newObject): (WebCore::V8ObjectMap::Deserializer::completeObject): (WebCore::V8ObjectMap::Deserializer::completeSparseArray): (WebCore::V8ObjectMap::Deserializer::pushObjectReference): (WebCore::V8ObjectMap::Deserializer::tryGetObjectFromObjectReference): (WebCore::V8ObjectMap::Deserializer::objectReferenceCount): (WebCore::V8ObjectMap::Deserializer::openComposite): (WebCore::V8ObjectMap::Deserializer::closeComposite): (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/v8/V8Binding.cpp: (WebCore::isHostObject): * bindings/v8/V8Binding.h: * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCallback): * dom/DOMCoreException.idl: * dom/ExceptionCode.cpp: * dom/ExceptionCode.h: * html/canvas/ArrayBuffer.cpp: (WebCore::ArrayBuffer::create): * html/canvas/ArrayBuffer.h: * html/canvas/DataView.cpp: (WebCore::DataView::create): * html/canvas/DataView.h: 2011-07-19 Simon Fraser <simon.fraser@apple.com> Possible recursion in GraphicsLayerCA::updateGeometry() https://bugs.webkit.org/show_bug.cgi?id=64815 Reviewed by Sam Weinig. It was possible to recurse via updateGeometry/swapFromOrToTiledLayer/ updateContentsScale because updateGeometry() and updateContentsScale() used different sizes; updateGeometry() used the scaled size, while updateContentsScale() used the unscaled size. Always use the unscaled size; the scaled size will be at most a couple of pixels bigger, and our threshold is not close to the max texture size limit, so using the slightly smaller size is OK. Test: compositing/scaling/tiled-layer-recursion.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateGeometry): (WebCore::GraphicsLayerCA::updateLayerDrawsContent): (WebCore::GraphicsLayerCA::updateContentsScale): (WebCore::GraphicsLayerCA::requiresTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: 2011-07-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Parse -webkit-region-overflow property https://bugs.webkit.org/show_bug.cgi?id=64444 Reviewed by David Hyatt. Test: fast/regions/webkit-region-overflow-parsing.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator RegionOverflow): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionOverflow): (WebCore::InheritedFlags::setRegionOverflow): (WebCore::InheritedFlags::initialRegionOverflow): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-07-19 Mihnea Ovidenie <mihnea@adobe.com> hover then un-hover makes state change https://bugs.webkit.org/show_bug.cgi?id=56401 When a 'before' pseudo-element is re-added, we should check whether the insertion point is an anonymous block with inline children. If it is, then we should change the insertion point to the first child of the anonymous block, otherwise the 'before' pseudo-element ends up in a different block. Reviewed by David Hyatt. Test: fast/dynamic/hover-before-position-after-style-change.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-07-19 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyWebkitPerspectiveOrigin in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=64784 Reviewed by Simon Fraser. No new tests / refactoring. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-07-19 Chris Rogers <crogers@google.com> Implement WaveShaperNode for Web Audio API https://bugs.webkit.org/show_bug.cgi?id=64644 Reviewed by Kenneth Russell. No new tests since audio API is not yet implemented. * DerivedSources.make: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSWaveShaperNodeCustom.cpp: Added. (WebCore::JSWaveShaperNode::setCurve): * webaudio/AudioContext.cpp: (WebCore::AudioContext::createWaveShaper): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/AudioNode.h: * webaudio/WaveShaperDSPKernel.cpp: Added. (WebCore::WaveShaperDSPKernel::process): * webaudio/WaveShaperDSPKernel.h: Added. (WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel): (WebCore::WaveShaperDSPKernel::reset): (WebCore::WaveShaperDSPKernel::waveShaperProcessor): * webaudio/WaveShaperNode.cpp: Added. (WebCore::WaveShaperNode::WaveShaperNode): (WebCore::WaveShaperNode::setCurve): (WebCore::WaveShaperNode::curve): * webaudio/WaveShaperNode.h: Added. (WebCore::WaveShaperNode::create): (WebCore::WaveShaperNode::waveShaperProcessor): * webaudio/WaveShaperNode.idl: Added. * webaudio/WaveShaperProcessor.cpp: Added. (WebCore::WaveShaperProcessor::WaveShaperProcessor): (WebCore::WaveShaperProcessor::~WaveShaperProcessor): (WebCore::WaveShaperProcessor::createKernel): (WebCore::WaveShaperProcessor::setCurve): (WebCore::WaveShaperProcessor::process): * webaudio/WaveShaperProcessor.h: Added. (WebCore::WaveShaperProcessor::curve): 2011-07-19 Robert Hogan <robert@webkit.org> REGRESSION: Incorrect layout at recline-online.com https://bugs.webkit.org/show_bug.cgi?id=64030 Reviewed by David Hyatt. http://trac.webkit.org/changeset/68362 dropped the check for cases where the render box is floating or inline. When the box is left or right aligned it is considered to be floating and needs to its margins set appropriately. Test: fast/table/align-right-within-left-aligned-div.html created by Dominic Cooney <dominicc@chromium.org> * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): 2011-07-19 Abhishek Arya <inferno@chromium.org> Crash when removing unrenderered nodes in replacement fragment. https://bugs.webkit.org/show_bug.cgi?id=64801 Reviewed by Ryosuke Niwa. Test: editing/pasteboard/replacement-fragment-remove-unrendered-node-crash.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::removeUnrenderedNodes): 2011-07-19 Rob Buis <rbuis@rim.com> https://bugs.webkit.org/show_bug.cgi?id=64673 REGRESSION (Safari 5.0.5 - ToT): crash in SVG test http://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObjectApproved/styling-pres-02-f.html Reviewed by Nikolas Zimmermann. Prevent calling back to the owning SVGTRefElement upon handling DOMSubtreeModified events. Test: svg/W3C-SVG-1.1-SE/styling-pres-02-f.svg * svg/SVGTRefElement.cpp: (WebCore::SubtreeModificationEventListener::handleEvent): 2011-07-19 Tony Chang <tony@chromium.org> use more specific types in CSSFlexValue https://bugs.webkit.org/show_bug.cgi?id=64763 Reviewed by Ojan Vafai. No new tests because no change in functionality. * css/CSSFlexValue.h: (WebCore::CSSFlexValue::create): (WebCore::CSSFlexValue::isFlexValue): Make it possible to tell if we're a flex value or not. Will be needed when we're copying values to RenderStyle. (WebCore::CSSFlexValue::positiveFlex): Use floats for positive and negative flex because in the render code, we use floats. (WebCore::CSSFlexValue::negativeFlex): Add accessors for these since we'll need it when reading the flex values. (WebCore::CSSFlexValue::preferredSize): (WebCore::CSSFlexValue::CSSFlexValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValidPrimitive): Make the type more specific. (WebCore::CSSParser::parseFlex): * css/CSSParser.h: * css/CSSValue.h: (WebCore::CSSValue::isFlexValue): 2011-07-19 Chris Fleizach <cfleizach@apple.com> If the control associated with a <label> is hidden, the label is also hidden (incorrectly) https://bugs.webkit.org/show_bug.cgi?id=64752 Reviewed by Darin Adler. Test: platform/mac/accessibility/label-element-with-hidden-control.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::exposesTitleUIElement): 2011-07-19 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Backend should provide network resource identifiers that are unique across navigation. https://bugs.webkit.org/show_bug.cgi?id=64746 Reviewed by Pavel Feldman. * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::ConsoleMessage): (WebCore::ConsoleMessage::addToFrontend): * inspector/ConsoleMessage.h: * inspector/IdentifiersFactory.cpp: (WebCore::IdentifiersFactory::createIdentifier): (WebCore::IdentifiersFactory::resourceId): (WebCore::IdentifiersFactory::addProcessIdPrefixTo): * inspector/IdentifiersFactory.h: * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::didReceiveResponse): (WebCore::InspectorConsoleAgent::didFailLoading): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::markResourceAsCached): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::didFailLoading): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::setInitialScriptContent): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::didReceiveXHRResponse): (WebCore::InspectorResourceAgent::didCreateWebSocket): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::didCloseWebSocket): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::willReceiveResourceData): (WebCore::InspectorTimelineAgent::willReceiveResourceResponse): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::resourceCreated): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::setResourceType): (WebCore::NetworkResourcesData::resourceType): (WebCore::NetworkResourcesData::setResourceContent): (WebCore::NetworkResourcesData::maybeAddResourceData): (WebCore::NetworkResourcesData::maybeDecodeDataToContent): (WebCore::NetworkResourcesData::addCachedResource): (WebCore::NetworkResourcesData::addResourceSharedBuffer): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::ensureNoDataForResourceId): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::resourceId): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createResourceSendRequestData): (WebCore::TimelineRecordFactory::createResourceReceiveResponseData): (WebCore::TimelineRecordFactory::createResourceFinishData): (WebCore::TimelineRecordFactory::createReceiveResourceData): * inspector/TimelineRecordFactory.h: 2011-07-19 Jessie Berlin <jberlin@apple.com> Fix assertion failure seen in plugins/return-npobject.html on Windows XP Debug bots. Rubber-stamped by Adam Roben. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveData): It is possible for a subclass to cancel the load from within didReceiveData, which would set m_documentLoader to 0. Remove the assertion I added that the DocumentLoader's frame is non-null. 2011-07-19 Steve Block <steveblock@google.com> REGRESSION (r82194): jvalueToJavaValue() does not correctly set length of String property https://bugs.webkit.org/show_bug.cgi?id=64730 Reviewed by Alexey Proskuryakov. Covered by existing tests. * bridge/jni/v8/JNIUtilityPrivate.cpp: (JSC::Bindings::jvalueToJavaValue): 2011-07-19 Vitaly Repeshko <vitalyr@chromium.org> [V8] Don't put CSSRuleLists in object groups. https://bugs.webkit.org/show_bug.cgi?id=64798 Reviewed by Pavel Feldman. Retention of CSSRuleLists should be implemented using hidden references from holder objects. By putting lists in groups we artificially extend their lifetimes much more than necessary. * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): 2011-07-19 Gyuyoung Kim <gyuyoung.kim@samsung.com> [EFL] Add ewk_network.cpp|h files. https://bugs.webkit.org/show_bug.cgi?id=63315 Enable setOnLine(bool) on EFL port as well as Android and Chromium. Reviewed by Antonio Gomes. * platform/network/NetworkStateNotifier.cpp: * platform/network/NetworkStateNotifier.h: 2011-07-19 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: implement import/export for timeline data. https://bugs.webkit.org/show_bug.cgi?id=64601 Reviewed by Yury Semikhatsky. Test: inspector/timeline/timeline-load.html * English.lproj/localizedStrings.js: * inspector/InspectorFrontendHost.cpp: (WebCore::FrontendMenuProvider::contextMenuItemSelected): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._createFileSelector): (WebInspector.TimelinePanel.prototype._contextMenu): (WebInspector.TimelinePanel.prototype._exportToFile): (WebInspector.TimelinePanel.prototype._importFromFile): (WebInspector.TimelinePanel.prototype._addRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelineModel): (WebInspector.TimelineModel.prototype._addRecord): (WebInspector.TimelineModel.prototype._importNextChunk): (WebInspector.TimelineModel.prototype._importFromFile): (WebInspector.TimelineModel.prototype._importFromFile.onError): (WebInspector.TimelineModel.prototype._exportToFile): (WebInspector.TimelineModel.prototype._reset): * inspector/front-end/utilities.js: (): 2011-07-19 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Rename agentIdentifierPrefix to processId, move out from page agent and make static. https://bugs.webkit.org/show_bug.cgi?id=64729 Reviewed by Pavel Feldman. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/IdentifiersFactory.cpp: Added. (WebCore::IdentifiersFactory::createIdentifier): * inspector/IdentifiersFactory.h: Added. (WebCore::IdentifiersFactory::setProcessId): * inspector/InspectorController.cpp: (WebCore::InspectorController::setProcessId): * inspector/InspectorController.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameId): (WebCore::InspectorPageAgent::loaderId): * inspector/InspectorPageAgent.h: 2011-07-19 Jeremy Moskovich <jeremy@chromium.org> Fix microphone icon placement in speech input control for dir=rtl. https://bugs.webkit.org/show_bug.cgi?id=64668 Reviewed by Dimitri Glazkov. Modify default stylesheet to propagate dir=rtl from the outer input control to the shadow DOM container. This makes the microphone icon appear on the left for dir=rtl, which is the desired behavior. Test: fast/speech/speech-bidi-rendering.html * css/html.css: (input[x-webkit-speech][dir=rtl]::-webkit-textfield-decoration-container): 2011-07-19 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Account for the invalid pointer case in WebCore::screenRect() https://bugs.webkit.org/show_bug.cgi?id=64543 Reviewed by Antonio Gomes. Fix a regression introduced in r88245: it assumes the pointer passed to screenRect() is always valid. fast/frames/crash-removed-iframe.html proves this is not always true, so we need to do some sanity check on the pointer before using it. No new tests as this has been caught by the current test suite. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): 2011-07-19 Robin Qiu <robin.qiu@torchmobile.com.cn> Reviewed by Antonio Gomes. ScrollBar should initialize current position in constructor. https://bugs.webkit.org/show_bug.cgi?id=39284 When ScrollBar is created, m_currentPos should be initialized to m_scrollableArea's current scrollPosition. Because scrollbars may be created after the content of m_scrollableArea has been scrolled. Test: scrollbars/scrollbar-initial-position.html * platform/Scrollbar.cpp: (WebCore::Scrollbar::Scrollbar): 2011-07-19 Yuta Kitamura <yutak@chromium.org> WebSocket: Implement hybi framing https://bugs.webkit.org/show_bug.cgi?id=64522 Reviewed by Kent Tamura. Implement WebSocket framing protocol which is mainly described in <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-4> and <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-6>. Hybi protocol introduces a new frame format which is drastically different from the old one. Notable differences are: - Binary data support. - Fragmentation support: a single message can be fragmented to multiple frames. - Ping-pong support. - Masking: frame content of a client must be masked to prevent cross-protocol attacks. This patch covers the following features: - Send a pong frame when a ping frame is received. - Receive fragmented frames. - Receive masked frames. (Servers do not have to mask frames, but they may if they wish.) The following features are NOT implemented yet: - Send or receive binary messages. - Send a ping message. - Send fragmented frames. (It is unclear whether this is necessary.) - Rewrite the frame content by WebSocket protocol extensions (like frame compression). New tests: http/tests/websocket/tests/hybi/broken-utf8.html http/tests/websocket/tests/hybi/fragmented-control-frame.html http/tests/websocket/tests/hybi/fragmented-frames.html http/tests/websocket/tests/hybi/interleaved-fragments.html http/tests/websocket/tests/hybi/long-control-frame.html http/tests/websocket/tests/hybi/masked-frames.html http/tests/websocket/tests/hybi/pong.html http/tests/websocket/tests/hybi/reserved-bits.html http/tests/websocket/tests/hybi/reserved-opcodes.html http/tests/websocket/tests/hybi/too-long-payload.html * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::send): The original content of send() was moved to a private method sendFrameHixie76(). (WebCore::WebSocketChannel::fail): Stop handling incoming data after the WebSocket connection is failed. It was unclear to me whether we should do the same thing for hixie-76 connection; for now, I kept the original behavior. (WebCore::WebSocketChannel::processBuffer): (WebCore::WebSocketChannel::resumeTimerFired): (WebCore::WebSocketChannel::startClosingHandshake): (WebCore::WebSocketChannel::closingTimerFired): (WebCore::WebSocketChannel::parseFrame): (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::processFrameHixie76): (WebCore::WebSocketChannel::sendFrame): (WebCore::WebSocketChannel::sendFrameHixie76): * websockets/WebSocketChannel.h: (WebCore::WebSocketChannel::isNonControlOpCode): (WebCore::WebSocketChannel::isControlOpCode): (WebCore::WebSocketChannel::isReservedOpCode): 2011-07-19 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION (r88913): Preview in Safari's snippet editor has a fixed height instead of filling the entire pane https://bugs.webkit.org/show_bug.cgi?id=64059 REGRESSION (r88913): <object> has wrong computed height https://bugs.webkit.org/show_bug.cgi?id=62769 Reviewed by Rob Buis. Fix misinterpretation of CSS 2.1 - "10.5 Content height: the 'height' property". It says "If the height of the containing block is not specified explicitelz (i.e. it depends on the content height), and this element is not absolutely positioned, the value computes to 'auto'". Checking whether the containing block height depends on the content height is not equal to checking whether the height property is set on the containing block, there are other ways to implicitly specify the height by setting top & bottom. Fix that by checking whether the containing block has a height property or top & bottom set. While I was at it, make computeReplacedLogicalWidth/Height a bit more explicit to make it easier to compare the code with the spec quoatations - this doesn't change the functionality only the readability. Test: fast/css/replaced-element-implicit-size.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): Cleanup comment, make code more explicit. (WebCore::RenderReplaced::logicalHeightIsAuto): Add helper method used by computeReplacedLogicalHeight. (WebCore::RenderReplaced::computeReplacedLogicalHeight): Fix height=auto detection. * rendering/RenderReplaced.h: 2011-07-18 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard https://bugs.webkit.org/show_bug.cgi?id=64767 Add a runtime check for font cascading optimization. It's a constant value in Mac port so hopefully gcc will constant-propagate the value and eliminate the function altogether. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::canSetCascadeListForCustomFont): Added. (WebCore::FontPlatformData::ctFont): 2011-07-18 MORITA Hajime <morrita@google.com> [ShadowContentElement] forwarded node should be able to access its hosting content element. https://bugs.webkit.org/show_bug.cgi?id=64251 Reviewed by Dimitri Glazkov. - Introduced ShadowInclusionSet to manage included nodes to its includer content element. ShadowInclusionSet instance is owned by ShadowRoot. - Updated the set on inclusion list changes. - Used the set to retrieve the content element of NodeRenderingContext. There are also related refactoring and cleanup: - Renamed NodeRenderingContext::m_contentElement to m_includer - ShadowContentSelector::m_activeElement is no longer used, thus removed. Test: fast/dom/shadow/content-element-includer.html * WebCore.exp.in: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: (WebCore::NodeRenderingContext::includer): * dom/ShadowContentElement.cpp: (WebCore::removeFromSet): (WebCore::addToSet): (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowContentElement.h: (WebCore::ShadowInclusionSet::add): (WebCore::ShadowInclusionSet::remove): (WebCore::ShadowInclusionSet::isEmpty): (WebCore::ShadowInclusionSet::Translator::hash): (WebCore::ShadowInclusionSet::Translator::equal): (WebCore::ShadowInclusionSet::Hash::hash): (WebCore::ShadowInclusionSet::Hash::equal): (WebCore::ShadowInclusionSet::find): * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::ShadowContentSelector): (WebCore::ShadowContentSelector::selectInclusion): * dom/ShadowContentSelector.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::includerFor): (WebCore::ShadowRoot::inclusions): (WebCore::ShadowRoot::ensureInclusions): * dom/ShadowRoot.h: (WebCore::toShadowRoot): * testing/Internals.cpp: (WebCore::Internals::includerFor): * testing/Internals.h: * testing/Internals.idl: 2011-07-18 Dean Jackson <dino@apple.com> https://bugs.webkit.org/show_bug.cgi?id=64742 Expose WebPreferences for media playback requiring user gestures and inline playback Reviewed by Simon Fraser. Media playback already tested if it should require user gestures, but no setting was ever exposed to clients. Also, some ports only allow media playback to be fullscreen, so exposing a new setting for them. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Examine the new Setting for user gestures. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: Two new settings. (WebCore::Settings::setMediaPlaybackRequiresUserGesture): (WebCore::Settings::mediaPlaybackRequiresUserGesture): (WebCore::Settings::setMediaPlaybackAllowsInline): (WebCore::Settings::mediaPlaybackAllowsInline): 2011-07-18 Ryosuke Niwa <rniwa@webkit.org> Leopard build fix after r91229. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): 2011-07-18 Dan Bernstein <mitz@apple.com> REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard https://bugs.webkit.org/show_bug.cgi?id=64767 Reviewed by Sam Weinig. * platform/graphics/Font.h: * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): Undo the cascade list optimization on Leopard for custom fonts, because adding a cascade list apparently breaks the font. 2011-07-18 Matthew Delaney <mdelaney@apple.com> Remove drawsUsingCopy now that all ports handle the copying https://bugs.webkit.org/show_bug.cgi?id=64768 Introduced in https://bugs.webkit.org/show_bug.cgi?id=43507, ImageBuffer::drawsUsingCopy was used to know whether or not an ImageBuffer should be explicitly copied before being painted into a context (as was used in HTMLCanvasElement::paint). All platforms now handle the logic of copying or not in their ImageBuffer::draw() implementations, so drawsUsingCopy() is no longer needed. This patch removes it. Reviewed by Dan Bernstein. No new tests; does not affect behavior. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::isAccelerated): * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/ImageBufferCG.cpp: * platform/graphics/qt/ImageBufferQt.cpp: * platform/graphics/skia/ImageBufferSkia.cpp: * platform/graphics/wince/ImageBufferWinCE.cpp: * platform/graphics/wx/ImageBufferWx.cpp: 2011-07-18 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [REGRESSION] Resource preserving fails when frameNavigated event is dispatched on NetworkPanel. https://bugs.webkit.org/show_bug.cgi?id=64748 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._frameNavigated): 2011-07-18 Brian Weinstein <bweinstein@apple.com> Prep work for: Crash under WebPage::platformDragEnded when dragging on Mac https://bugs.webkit.org/show_bug.cgi?id=64766 <rdar://problem/9548174> Reviewed by Darin Adler. Add a DragClient function that is called when a drag is ended, and call it from DragController::dragEnded. This isn't used yet, but will be used by WebKit2 on Mac. This patch also cleans up style in DragClient.h. No change in behavior, no tests needed. * page/DragClient.h: (WebCore::DragClient::dragEnded): Stub virtual implementation for now, this will be used by WebKit2 on Mac. * page/DragController.cpp: (WebCore::DragController::dragEnded): Call DragClient::dragEnded. 2011-07-18 Jon Honeycutt <jhoneycutt@apple.com> Focus and selection events are not fired when a <select>'s selection changes https://bugs.webkit.org/show_bug.cgi?id=64504 <rdar://problem/9319881> Reviewed by Alice Liu. Test: platform/win/accessibility/option-element-selection-and-focus-events.html * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): Add new notification type to the section of unhandled notifications. * accessibility/AXObjectCache.h: Declare a new notification, AXMenuListItemSelected. * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::didUpdateActiveOption): Tell our child popup that the active option changed, and post a notification that our value changed. * accessibility/AccessibilityMenuList.h: Declare didUpdateActiveOption(). * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption): Get the child <option> element that is selected, and fire focus and selection events for it. * accessibility/AccessibilityMenuListPopup.h: Declare didUpdateActiveOption(). * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::postPlatformNotification): Map AXMenuListItemSelected -> EVENT_OBJECT_SELECTION. * dom/SelectElement.cpp: (WebCore::SelectElement::setSelectedIndex): Pass the newly-selected index. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::RenderMenuList): Update the initialization list for the renamed m_lastActiveIndex. (WebCore::RenderMenuList::setTextFromOption): A new selection has been made in the popup; call didUpdateActiveOption(). (WebCore::RenderMenuList::didSetSelectedIndex): Call didUpdateActiveOption(), passing the index of the newly-selected <option>. (WebCore::RenderMenuList::didUpdateActiveOption): If accessibility is disabled, or if the active option has not changed, return early. Check whether the option index is in the range of list items, and assert that the item at that index is an <option> element. Tell the AccessibilityMenuList for this element that we updated the active option. * rendering/RenderMenuList.h: Updated the declaration of didSetSelectedIndex() to take the selected index. Declared didUpdateActiveOption(). Renamed m_lastSelectedIndex to m_lastActiveIndex. 2011-07-18 Dan Bernstein <mitz@apple.com> Specify a cascade list consisting of the last resort font for Core Text https://bugs.webkit.org/show_bug.cgi?id=64747 Reviewed by Sam Weinig. No new tests, because this does not affect behavior. This prevents Core Text from taking its default, longer fallback list when the primary font does not include a character. This is OK to do because WebKit never uses the results of Core Text fallback anyway. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::cascadeToLastResortFontDescriptor): Added. Returns a CTFontDescriptor with a cascade list consisting of the last resort font. (WebCore::FontPlatformData::ctFont): Changed to include the cascadeToLastResortFontDescriptor in the returned font. 2011-07-18 James Robinson <jamesr@chromium.org> Timer scheduling should be based off the monotonic clock https://bugs.webkit.org/show_bug.cgi?id=64544 Reviewed by Darin Adler. Changes the Timer scheduling logic from using absolute values in terms of currentTime() to using relative intervals in terms of monotonicallyIncreasingTime(). This provides better standards compliance, compatibility, and predictability when the system clock is adjusted. No automated tests since there is no way to modify the system clock from DRT. * platform/SharedTimer.h: (WebCore::MainThreadSharedTimer::setFireInterval): * platform/ThreadTimers.cpp: (WebCore::ThreadTimers::updateSharedTimer): (WebCore::ThreadTimers::sharedTimerFiredInternal): * platform/Timer.cpp: (WebCore::TimerBase::start): (WebCore::TimerBase::nextFireInterval): * platform/android/SharedTimerAndroid.cpp: (WebCore::setSharedTimerFireInterval): * platform/brew/SharedTimerBrew.cpp: (WebCore::setSharedTimerFireInterval): * platform/chromium/PlatformBridge.h: * platform/chromium/SharedTimerChromium.cpp: (WebCore::setSharedTimerFireInterval): * platform/efl/SharedTimerEfl.cpp: (WebCore::addNewTimer): (WebCore::setSharedTimerFireInterval): * platform/gtk/SharedTimerGtk.cpp: (WebCore::setSharedTimerFireInterval): * platform/haiku/SharedTimerHaiku.cpp: (WebCore::SharedTimerHaiku::start): (WebCore::setSharedTimerFireInterval): * platform/mac/SharedTimerMac.mm: (WebCore::setSharedTimerFireInterval): * platform/qt/SharedTimerQt.cpp: (WebCore::SharedTimerQt::start): (WebCore::setSharedTimerFireInterval): * platform/win/SharedTimerWin.cpp: (WebCore::setSharedTimerFireInterval): * platform/wince/SharedTimerWinCE.cpp: (WebCore::setSharedTimerFireInterval): * platform/wx/SharedTimerWx.cpp: (WebCore::setSharedTimerFireInterval): * workers/WorkerRunLoop.cpp: (WebCore::WorkerSharedTimer::setFireInterval): 2011-07-18 Pratik Solanki <psolanki@apple.com> Unreviewed. Fix Windows build. Move static function defaultSessionCookieStorage() to before its use in defaultCookieStorage(). * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::defaultSessionCookieStorage): 2011-07-18 Pratik Solanki <psolanki@apple.com> Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. Get coookie storage code to work with USE(CFNETWORK) enabled on Mac. No new tests because no change in functionality. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::defaultCookieStorage): (WebCore::defaultSessionCookieStorage): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): * platform/network/mac/CookieStorageMac.mm: 2011-07-18 Pratik Solanki <psolanki@apple.com> Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. * WebCore.exp.in: 2011-07-18 Gavin Barraclough <barraclough@apple.com> Speculative fix for Leopard assertions caused by 91095. Rubber stamped by Sam Weinig. * bridge/NP_jsobject.cpp: (_NPN_Invoke): - ensure we pass the window shell, not the global object. 2011-07-18 Mark Hahnenberg <mhahnenberg@apple.com> Refactor JSC to replace JSCell::operator new with static create method https://bugs.webkit.org/show_bug.cgi?id=64466 Reviewed by Oliver Hunt (oliver@apple.com) and Darin Adler (darin@apple.com). First step in a longer refactoring process to remove the use of operator new overloading in order to allocate GC objects and to replace this method with static create methods for each individual type of heap-allocated JS object. This particular patch only deals with replacing uses of operator new within JSC proper. Future patches will remove it from the parts that interface with the DOM. Due to the DOM's continued dependence on it, operator new has not actually been removed from JSCell. * bindings/js/JSDOMBinding.cpp: (WebCore::jsDateOrNull): (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readTerminal): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): 2011-07-18 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> [Texmap] [Qt] [WK2] Unsync in TextureMapperNode between parent and child lists cause crashes on WK2. https://bugs.webkit.org/show_bug.cgi?id=62587 Reviewed by Noam Rosenthal. Fix unsync between m_parent and m_children list in child and parent texture mapper nodes in syncCompositingStateSelf. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): 2011-07-18 Rob Buis <rbuis@rim.com> Stroking of zero-length paths in SVG should change according to erratum https://bugs.webkit.org/show_bug.cgi?id=18356 Reviewed by Nikolas Zimmermann. Do not rely on toolkits to correctly render zero-length path with stroke-linecap=round, render it ourselves just like for stroke-linecap=square. * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath): (WebCore::RenderSVGPath::setupSquareCapPath): 2011-07-18 Mihnea Ovidenie <mihnea@adobe.com> [REGRESSION] Value 'none' breaks multiple background-image display https://bugs.webkit.org/show_bug.cgi?id=59274 Reviewed by Simon Fraser. When taking fast path for simple color background, we should draw the background only if it is the last in the list of backgrounds. Otherwise, it will obscure the previously drawn backgrounds. Test: fast/backgrounds/background-fast-path-simple-color.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): 2011-07-18 Yi Shen <yi.4.shen@nokia.com> [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash https://bugs.webkit.org/show_bug.cgi?id=62808 The assertion in ResourceHandle::setDefersLoading assumes asynchronous content delivery -- To resume a page, first, its main resource loader calls setDefersLoading to resume loading the main content; then all the sub-resource loaders calls setDefersLoading to resume sub-contents. However, since QNetworkReplyHandler delivers content synchronously, some new sub-resource loaders get created as soon as the main resource loader resumed, and all these new sub-resource loaders set their defersLoading flag to false. Then, the assertion fails for these new sub-resource loaders when calling setDefersLoading on them. As a fix, this path makes QNetworkReplyHandler deliver content asynchronously when its load type is set to SynchronousLoad. Reviewed by Benjamin Poulain. Test: loader/load-defer-resume-crash.html * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals): * platform/network/qt/QNetworkReplyHandler.h: (WebCore::QNetworkReplyHandler::setLoadingDeferred): 2011-07-18 Young Han Lee <joybro@company100.net> AnimationBase asserts if a test tries to pause during the delay phase https://bugs.webkit.org/show_bug.cgi?id=59475 Reviewed by Simon Fraser. There is no more assertion failure after r90765, but the testcase still fails due to the miscalculation of the pauseTime. This patch pauses the animation at its startTime if a test tries to pause it during the delay phase. Test: transitions/transition-in-delay-phase.html * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::freezeAtTime): 2011-07-18 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Web Inspector: provide unique identifiers for loaders https://bugs.webkit.org/show_bug.cgi?id=64599 Reviewed by Pavel Feldman. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameDestroyed): (WebCore::InspectorInstrumentation::loaderDetachedFromFrame): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::loaderId): (WebCore::InspectorPageAgent::loaderDetachedFromFrame): * inspector/InspectorPageAgent.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): 2011-07-18 Pavel Feldman <pfeldman@google.com> Web Inspector: "Reveal in Elements Panel" is broken. https://bugs.webkit.org/show_bug.cgi?id=64688 Reviewed by Yury Semikhatsky. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired): (WebInspector.ElementsTreeOutline.prototype.populateContextMenu): 2011-07-18 Julien Chaffraix <jchaffraix@webkit.org> Remove RenderObject::addLayers second argument https://bugs.webkit.org/show_bug.cgi?id=64649 Reviewed by Benjamin Poulain. No change in behavior. The code was always passing |this| as the second argument. Thus just removed the argument for clarity. * rendering/RenderObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::addLayers): Removed the argument, replaced by |this|. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): Removed the second argument at those 2 call sites. 2011-07-18 Pavel Feldman <pfeldman@google.com> Web Inspector: do not pause on caught exceptions while typing in the console. https://bugs.webkit.org/show_bug.cgi?id=64379 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent): (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::setScriptDebugServer): * inspector/InspectorRuntimeAgent.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): 2011-07-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r91132 and r91135. http://trac.webkit.org/changeset/91132 http://trac.webkit.org/changeset/91135 https://bugs.webkit.org/show_bug.cgi?id=64681 Broke GTK and Chromium debug bots (Requested by rniwa on #webkit). * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: * accessibility/AccessibilityMenuListPopup.h: * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::postPlatformNotification): * dom/SelectElement.cpp: (WebCore::SelectElement::setSelectedIndex): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::RenderMenuList): (WebCore::RenderMenuList::setTextFromOption): (WebCore::RenderMenuList::didSetSelectedIndex): * rendering/RenderMenuList.h: 2011-07-17 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyCursor in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=64432 Reviewed by Dimitri Glazkov. No new tests / refectoring only. * css/CSSStyleApplyProperty.cpp: Add handler for CSSPropertyCursor. * css/CSSStyleSelector.cpp: Remove current handler of CSSPropertyCursor. * css/CSSStyleSelector.h: Make styleImage and cachedOrPendingFromValue public. 2011-07-16 Simon Fraser <simon.fraser@apple.com> Add code to attempt to align compositing layers to pixel boundaries when page scale changes https://bugs.webkit.org/show_bug.cgi?id=64658 Reviewed by Dan Bernstein. Implemented a new behavior on GraphicsLayerCA which attempts to keep layers pixel aligned as page scale changes. This requires denoting which layer has the page scale on it (it is assumed to be already aligned), via setAppliesPageScale(). We also now pass a scale and offset down through the GraphicsLayer commits, which are used to map layer bounds to display coordinates for rounding. * platform/graphics/GraphicsLayer.h: New flags and getters/setters for pixel alignment, and the layer that is the applier of the scale. (WebCore::GraphicsLayer::setMaintainsPixelAlignment): (WebCore::GraphicsLayer::maintainsPixelAlignment): (WebCore::GraphicsLayer::setAppliesPageScale): (WebCore::GraphicsLayer::appliesPageScale): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): Initialize the new flags. (WebCore::GraphicsLayer::backingScaleFactor): Utility method that calls the client if there is one. (WebCore::GraphicsLayer::pageScaleFactor): Ditto. * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::backingScaleFactor): Provide default implementation. (WebCore::GraphicsLayerClient::pageScaleFactor): Ditto. * platform/graphics/ca/GraphicsLayerCA.h: Pass scale and base-relative offset around to methods that need to update geometry during commit. Some new methods related to pixel alignment. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::computePositionRelativeToBase): For single-layer commits, we have to compute the base-relative offset, and whether we're under the layer applying the scale by walking up the tree. (WebCore::GraphicsLayerCA::syncCompositingStateForThisLayerOnly): Call computePositionRelativeToBase() to get scaling parameters for the target layer. (WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass flags related to scaling. positionRelativeToBase is an offset relative to the ancestor layer known to be pixel aligned. affectedByPageScale is true for layers which are descendants of the layer which applies the scale. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Pass scale and offset. (WebCore::GraphicsLayerCA::updateGeometry): Call computePixelAlignment() to get pixel-aligned geometry. This only needs to be applied to layers which render content, so re-organize the code to use the unchanged layer geometry for the structural layer, but to apply the adjusted geometry to the m_layer. (WebCore::GraphicsLayerCA::updateStructuralLayer): Pass scale and offset. (WebCore::GraphicsLayerCA::ensureStructuralLayer): Ditto. (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Ditto. (WebCore::GraphicsLayerCA::updateContentsScale): Ditto. (WebCore::GraphicsLayerCA::requiresTiledLayer): Ditto. (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ditto. (WebCore::GraphicsLayerCA::setKeepPixelAligned): When set, dirties flags for properties that need to be recomputed. (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties): (WebCore::isIntegral): (WebCore::GraphicsLayerCA::computePixelAlignment): Map our bounds to screen scale, round out to an integral rect, then map it back, adding a fudge factor so that CA backing stores don't end up being smaller than we expect because of integer truncation. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createGraphicsLayer): Turn on pixel alignment if the compositor says so. (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Set the RenderView's layer as the one applying the scale, for the main frame. * rendering/RenderLayerCompositor.h: New method. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::keepLayersPixelAligned): Master switch for pixel alignment. Default to on. (WebCore::RenderLayerCompositor::ensureRootLayer): Give the two root-ish layers a client so they can ask for page scale if necessary. 2011-07-16 Enrica Casucci <enrica@apple.com> REGRESSION: Pressing return in a particular document sends the cursor to the end of the document. https://bugs.webkit.org/show_bug.cgi?id=64140 <rdar://problem/9737491> Inserting a paragraph separator at a break element, inside an inline, generates redundant markup and moves the selection at the end of the inserted block. The fix consists in detecting that the insertion point is a break element and simply inserting another break element. This solves the problem of the wrong final selection and also produces less redundant markup. Reviewed by Simon Fraser. Test: editing/inserting/insert-paragraph-separator-at-break.html * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Modified logic for insertion at a break element. 2011-07-16 Pratik Solanki <psolanki@apple.com> SubresourceLoader::didReceiveDataArray can crash when calling m_client->didReceiveData() https://bugs.webkit.org/show_bug.cgi?id=64656 <rdar://problem/9754425> Reviewed by Alexey Proskuryakov. * loader/cf/SubresourceLoaderCF.cpp: (WebCore::SubresourceLoader::didReceiveDataArray): Check for m_client before calling m_client->didReceiveData(). 2011-07-16 Dinu Jacob <dinu.jacob@nokia.com> [Qt] Compilation fails on disabling TextureMapper https://bugs.webkit.org/show_bug.cgi?id=64408 Fix compilation error due to API name change in GraphicsLayer Reviewed by Noam Rosenthal. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQt::setContentsToBackgroundColor): * platform/graphics/qt/GraphicsLayerQt.h: 2011-07-15 Pratik Solanki <psolanki@apple.com> Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. New WebKitSystemInterface functions for CFNetwork-based loader. * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-07-16 Jessie Berlin <jberlin@apple.com> Work towards determining the cause of frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache. https://bugs.webkit.org/show_bug.cgi?id=62764 Reviewed by Darin Adler. No loads should be going on for a DocumentLoader that has been detached from its frame, but that appears to be what is happening in this bug. Add assertions with the hope that someone will run into this while debugging and thereby find a reproducible case. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): (WebCore::ResourceLoader::didSendData): (WebCore::ResourceLoader::didReceiveResponse): (WebCore::ResourceLoader::didReceiveData): (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFail): (WebCore::ResourceLoader::wasBlocked): (WebCore::ResourceLoader::cannotShowURL): (WebCore::ResourceLoader::shouldUseCredentialStorage): (WebCore::ResourceLoader::willCacheResponse): 2011-07-16 Sergey Glazunov <serg.glazunov@gmail.com> DOMWindow::open performs a security check on a wrong window https://bugs.webkit.org/show_bug.cgi?id=64651 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-window-open-parent.html * page/DOMWindow.cpp: (WebCore::DOMWindow::open): 2011-07-16 Sam Weinig <sam@webkit.org> Attribute selectors don't handle glob namespaces (e.g. *|E) https://bugs.webkit.org/show_bug.cgi?id=64567 Reviewed by Anders Carlsson. Change checking of attribute selectors to match CSS 3 Selectors in the presence of namespaces. This entails changing the algorithm to check each attribute on an element as a match for the attribute selector and taking into account a prefix of *. * css/CSSStyleSelector.cpp: (WebCore::attributeQualifiedNameMatches): Checks if the a particular attributes qualified name matches the attribute selector, taking into account a prefix of *. (WebCore::attributeValueMatches): Checks if a particular attribute on an element, matches the attribute selector. (WebCore::anyAttributeMatches): Top level attribute check. Checks if any of an elements attributes match the attribute selector. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Factor out attribute checking code into the above functions. 2011-07-16 Jon Honeycutt <jhoneycutt@apple.com> WinCE build fix. Unreviewed. * dom/SelectElement.cpp: 2011-07-16 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> Reviewed by Nikolas Zimmermann. SVG animation API crashes on SVGAnimateTransform https://bugs.webkit.org/show_bug.cgi?id=64104 This patch ensures the update in AnimatedTransform list in SVGAnimateTransformElement.cpp is in sync with its wrapper list. Test: svg/animations/svgtransform-animation-discrete.html * svg/SVGAnimateTransformElement.cpp: (WebCore::animatedTransformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): 2011-07-15 Simon Fraser <simon.fraser@apple.com> Fix the build. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::updateEnabledState): 2011-07-15 Simon Fraser <simon.fraser@apple.com> Another Windows build fix; make this method non-pure virtual. * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::didCommitChangesForLayer): 2011-07-15 Simon Fraser <simon.fraser@apple.com> Fix build error in 32-bit builds. * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::zeroLengthSubpathRect): 2011-07-15 Simon Fraser <simon.fraser@apple.com> Fix Windows build. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: (WebCore::MediaPlayerPrivate::backingScaleFactor): (WebCore::MediaPlayerPrivate::pageScaleFactor): 2011-07-15 Simon Fraser <simon.fraser@apple.com> Have GraphicsLayer pull their contentsScale, rather than pushing it onto them https://bugs.webkit.org/show_bug.cgi?id=64643 Reviewed by Darin Adler. RenderLayerBacking would set the contentsScale on GraphicsLayers on creation, and update it when the pageScaleFactor changed. However, RenderLayerBacking doesn't really know what contentsScale is best for a layer, so instead, have GraphicsLayers call back through the GraphicsLayerClient to get the two relevant scale factors, and do their own computation of contentsScale. No testable behavior changes. * page/Frame.cpp: (WebCore::Frame::pageScaleFactorChanged): No need to pass the scale. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::notePageScaleFactorChangedIncludingDescendants): Recurse through the GraphicsLayer tree, calling pageScaleFactorChanged() on each layer. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::pageScaleFactorChanged): Remove contentsScale/setContentsScale * platform/graphics/GraphicsLayerClient.h: Add methods to fetch the backingScaleFactor() and pageScaleFactor(). * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): m_uncommittedChanges defaults to ContentsScaleChanged so we update contentsScale on the first flush. (WebCore::GraphicsLayerCA::setContentsToBackgroundColor): This was the wrong time to call updateContentsRect() and setupContentsLayer(); those should be done at commit time, so moved to updateLayerBackgroundColor(). (WebCore::GraphicsLayerCA::recursiveCommitChanges): Note whether we have any changes, and call didCommitChangesForLayer() on the client. (WebCore::GraphicsLayerCA::updateLayerBackgroundColor): Code moved to here. (WebCore::clampedContentsScaleForScale): No longer has any hysteresis on the scale, and now just clamps. (WebCore::GraphicsLayerCA::updateContentsScale): Fetch the scales from the client, and multiply them, then clamp. (WebCore::GraphicsLayerCA::requiresTiledLayer): This now takes contentsScale into account when deciding to use tiled layer, so that zooming in will cause layers to start tiling. (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Don't call setContentsScale(), but rather updateContentsScale(). (WebCore::GraphicsLayerCA::pageScaleFactorChanged): Set the bits for properties that depend on the scale. (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties): Note that contentsScale needs to be updated. At some point we might also need to dirty other properties. * platform/graphics/ca/GraphicsLayerCA.h: Moved the m_allowTiledLayer bool for better packing. No need for a m_contentsScale member now. * rendering/RenderLayer.cpp: Removed pageScaleFactorChanged(). * rendering/RenderLayer.h: Ditto. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): No need to push the contents scale. (WebCore::RenderLayerBacking::updateForegroundLayer): Ditto. (WebCore::RenderLayerBacking::updateMaskLayer): Ditto. (WebCore::RenderLayerBacking::pageScaleFactor): GraphicsLayerClient method. (WebCore::RenderLayerBacking::backingScaleFactor): GraphicsLayerClient method. (WebCore::RenderLayerBacking::didCommitChangesForLayer): Send through to the compositor. * rendering/RenderLayerBacking.h: GraphicsLayerClient methods. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::didFlushChangesForLayer): We'll use this later. (WebCore::RenderLayerCompositor::backingScaleFactor): GraphicsLayerClient method. (WebCore::RenderLayerCompositor::pageScaleFactor): Ditto. (WebCore::RenderLayerCompositor::didCommitChangesForLayer): Ditto. (WebCore::RenderLayerCompositor::ensureRootLayer): No need to push the contents scale. (WebCore::RenderLayerCompositor::pageScaleFactorChanged): Just call notePageScaleFactorChangedIncludingDescendants() on the root GraphicsLayer. * rendering/RenderLayerCompositor.h: Added GraphicsLayerClient methods. 2011-07-15 Jon Honeycutt <jhoneycutt@apple.com> Build fix. Unreviewed. * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption): Cast size_t to int for comparison. 2011-07-15 Andy Estes <aestes@apple.com> Rename applicationIsSolarWalk() to applicationIsSolarWalkMac(). https://bugs.webkit.org/show_bug.cgi?id=64641 Reviewed by Brian Weinstein. * WebCore.exp.in: Update to new symbol. * platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsSolarWalkMac): Renamed from applicationIsSolarWalk. * platform/RuntimeApplicationChecks.h: Ditto. 2011-07-15 Mark Rowe <mrowe@apple.com> Fix the build. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContextStateSaver::context): Remove a bogus type qualifier. 2011-07-13 Jon Honeycutt <jhoneycutt@apple.com> Focus and selection events are not fired when a <select>'s selection changes https://bugs.webkit.org/show_bug.cgi?id=64504 <rdar://problem/9319881> Reviewed by Alice Liu. Test: platform/win/accessibility/option-element-selection-and-focus-events.html * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): Add new notification type to the section of unhandled notifications. * accessibility/AXObjectCache.h: Declare a new notification, AXMenuListItemSelected. * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::didUpdateActiveOption): Tell our child popup that the active option changed, and post a notification that our value changed. * accessibility/AccessibilityMenuList.h: Declare didUpdateActiveOption(). * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption): Get the child <option> element that is selected, and fire focus and selection events for it. * accessibility/AccessibilityMenuListPopup.h: Declare didUpdateActiveOption(). * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::postPlatformNotification): Map AXMenuListItemSelected -> EVENT_OBJECT_SELECTION. * dom/SelectElement.cpp: (WebCore::SelectElement::setSelectedIndex): Pass the newly-selected index. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::RenderMenuList): Update the initialization list for the renamed m_lastActiveIndex. (WebCore::RenderMenuList::setTextFromOption): A new selection has been made in the popup; call didUpdateActiveOption(). (WebCore::RenderMenuList::didSetSelectedIndex): Call didUpdateActiveOption(), passing the index of the newly-selected <option>. (WebCore::RenderMenuList::didUpdateActiveOption): If accessibility is disabled, or if the active option has not changed, return early. Check whether the option index is in the range of list items, and assert that the item at that index is an <option> element. Tell the AccessibilityMenuList for this element that we updated the active option. * rendering/RenderMenuList.h: Updated the declaration of didSetSelectedIndex() to take the selected index. Declared didUpdateActiveOption(). Renamed m_lastSelectedIndex to m_lastActiveIndex. 2011-07-13 Jon Honeycutt <jhoneycutt@apple.com> ALT + DOWN arrow key does not open select https://bugs.webkit.org/show_bug.cgi?id=14407 <rdar://problem/5319507> Reviewed by Alexey Proskuryakov. No test, because eventSender sends events to the WebView, rather than the popup menu, so the popup isn't closed. * WebCore.vcproj/WebCore.vcproj: Add SelectElementWin.cpp to project. * dom/SelectElement.cpp: (WebCore::SelectElement::platformHandleKeydownEvent): Moved ARROW_KEYS_POP_MENU code here. Updated to return whether the function has handled the key, or whether the caller needs to process it further. (WebCore::SelectElement::menuListDefaultEventHandler): Allow the platform the first chance at handling the keyboard event. * dom/SelectElement.h: Declare platformHandleKeydownEvent(). * dom/SelectElementWin.cpp: Added. (WebCore::SelectElement::platformHandleKeyboardEvent): Allow (Shift) F4 and (Ctrl/Shift) Alt/AltGr + Up/Down arrow to show the popup. After the popup is dismissed, call setSelectedIndex(), and report that we handled the event. * platform/win/PopupMenuWin.cpp: Declare HIGH_BIT_MASK_SHORT. (WebCore::PopupMenuWin::show): Forward WM_SYSKEYDOWN to the popup's HWND. (WebCore::PopupMenuWin::wndProc): Allow the same shortcuts that show the menu to hide it, matching Firefox. 2011-07-12 Jon Honeycutt <jhoneycutt@apple.com> Ensure that a single select element's child option elements are reported correctly to accessibility clients if the children are changed. https://bugs.webkit.org/show_bug.cgi?id=64500 <rdar://problem/9773066> Reviewed by Beth Dakin. Test: platform/win/accessibility/single-select-children-changed.html * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::addChildren): Remove a comment about WML, which we no longer support. (WebCore::AccessibilityMenuListPopup::childrenChanged): Don't just remove children that were detached - this will miss childen that were dynamically added. Clear the children and re-add them. 2011-07-15 Rob Buis <rbuis@rim.com> Stroking of zero-length paths in SVG should change according to erratum https://bugs.webkit.org/show_bug.cgi?id=18356 Reviewed by Nikolas Zimmermann. Ensure rendering of zero-length paths with stroke-linecap=square works by creating the square rectangle manually. Tests: svg/W3C-SVG-1.1-SE/painting-control-04-f.svg svg/custom/zero-path-square-cap-rendering.svg * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContextStateSaver::context): * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::strokeContains): (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath): (WebCore::RenderSVGPath::zeroLengthSubpathRect): (WebCore::RenderSVGPath::setupSquareCapPath): (WebCore::RenderSVGPath::setupNonScalingStrokePath): (WebCore::RenderSVGPath::fillAndStrokePath): (WebCore::RenderSVGPath::updateCachedBoundaries): * rendering/svg/RenderSVGPath.h: 2011-06-27 Adrienne Walker <enne@google.com> Reviewed by Simon Fraser. Overlap map for compositing needs to consider clipping https://bugs.webkit.org/show_bug.cgi?id=63493 Test: compositing/layer-creation/overlap-clipping.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): * rendering/RenderLayerCompositor.h: 2011-07-15 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90592. http://trac.webkit.org/changeset/90592 https://bugs.webkit.org/show_bug.cgi?id=64627 Causes crashes with the web audio async decoding API (Requested by jamesr on #webkit). * html/canvas/ArrayBuffer.cpp: (WebCore::ArrayBuffer::~ArrayBuffer): (WebCore::ArrayBuffer::tryAllocate): * manual-tests/array-buffer-memory.html: Removed. 2011-07-15 Kenneth Russell <kbr@google.com> Don't restore WebGL context if it was guilty of a graphics reset https://bugs.webkit.org/show_bug.cgi?id=64497 Reviewed by Stephen White. Use getGraphicsResetStatusARB already defined in Extensions3D to determine why the context was lost, and respond to guilty context notifications by forbidding restoration of the context. It isn't currently possible to write an automated test for this. We might consider extending the WEBKIT_lose_context extension to allow a reason to be provided why the context was lost. It was tested manually in Chromium on Windows and Linux with some test cases that provoke actual graphics card resets. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired): (WebCore::WebGLRenderingContext::forceLostContext): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: 2011-07-15 Chris Marrin <cmarrin@apple.com> Move TransformState to platform/graphics and give it the option to transform just a FloatQuad https://bugs.webkit.org/show_bug.cgi?id=64542 Reviewed by Simon Fraser. This is to make it possible to use TransformState in some GraphicsLayer work. HitTestingTransformState was split out and left in rendering since it's not needed in the platform code. Also added a FIXME because HitTestingTransformState should eventually be replaced by TransformState. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/transforms/TransformState.cpp: Copied from Source/WebCore/rendering/TransformState.cpp. (WebCore::TransformState::move): (WebCore::TransformState::flattenWithTransform): * platform/graphics/transforms/TransformState.h: Copied from Source/WebCore/rendering/TransformState.h. (WebCore::TransformState::TransformState): (WebCore::TransformState::setQuad): * rendering/HitTestingTransformState.cpp: Copied from Source/WebCore/rendering/TransformState.cpp. * rendering/HitTestingTransformState.h: Copied from Source/WebCore/rendering/TransformState.h. * rendering/RenderLayer.cpp: * rendering/RenderObject.cpp: (WebCore::RenderObject::localToContainerQuad): * rendering/RenderingAllInOne.cpp: * rendering/TransformState.cpp: Removed. * rendering/TransformState.h: Removed. 2011-07-15 Pratik Solanki <psolanki@apple.com> Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. Minor changes needed to keep the compiler happy. No new tests because no change in functionality. * platform/network/cf/FormDataStreamCFNet.cpp: * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformCopy): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::toTimeT): 2011-07-15 Dan Bernstein <mitz@apple.com> REGRESSION: Mouse cursor doesn’t hide when full screen video HUD hides https://bugs.webkit.org/show_bug.cgi?id=64615 Reviewed by Anders Carlsson. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::enteredFullscreen): Hide the mouse cursor immediately when entering full screen. (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide the mouse cursor when hiding the HUD. * loader/EmptyClients.h: (WebCore::EmptyChromeClient::setCursorHiddenUntilMouseMoves): Added empty implementation. * page/Chrome.cpp: (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Added. Calls through to the client. * page/Chrome.h: * page/ChromeClient.h: * platform/HostWindow.h: 2011-07-14 Gavin Barraclough <barraclough@apple.com> https://bugs.webkit.org/show_bug.cgi?id=64250 Global strict mode function leaking global object as "this". Reviewed by Oliver Hunt. * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::call): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): - Change call to pass DOM Window shell, instead of the global varaible object. 2011-07-15 Brian Salomon <bsalomon@google.com> [SKIA] Must make skia's GL context current before drawing in GraphicsContext::clearRect https://bugs.webkit.org/show_bug.cgi?id=64612 Reviewed by Stephen White. Tested by compositing/shadows/shadow-drawing.html * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clearRect): 2011-07-15 Ian Henderson <ianh@apple.com> Avoid rounded rect corner-drawing overhead if no corners are visible https://bugs.webkit.org/show_bug.cgi?id=64584 Reviewed by Simon Fraser. No new tests, rendering is visually identical. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): Pass PaintInfo into paintBorder. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Ditto. * rendering/RenderBoxModelObject.cpp: (WebCore::unroundClippedCorners): (WebCore::RenderBoxModelObject::paintBorder): Any invisible corner may be replaced with a corner of radius zero, as long as the stroke style is solid. Change the GraphicsContext parameter into a PaintInfo parameter so we can get the rect to be drawn. * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): Pass PaintInfo into paintBorder. * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): Ditto. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBoxDecorations): Ditto. 2011-07-15 Jeff Miller <jeffm@apple.com> Add UserAgentStyleSheetsData.cpp to WebCore.vcproj https://bugs.webkit.org/show_bug.cgi?id=64609 Add UserAgentStyleSheetsData.cpp to WebCore.vcproj for convenient access, but don't compile it. This matches what we do with other generated DerivedSources. Reviewed by Brian Weinstein. No new tests, just adding a file. * WebCore.vcproj/WebCore.vcproj: Add UserAgentStyleSheetsData.cpp. 2011-07-15 Pratik Solanki <psolanki@apple.com> Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. No new tests because no change in functionality and option is not enabled on Mac. * platform/network/cf/AuthenticationCF.h: Just use AuthenticationMac.h instead of having Mac-specific declarations here. * platform/network/cf/CredentialStorageCFNet.cpp: * platform/network/mac/AuthenticationMac.h: 2011-07-15 Pratik Solanki <psolanki@apple.com> Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. Get LoaderRunLoop to work on Mac when USE(CFNETWORK) is enabled. Although we could use the main run loop, it's better to have a separate thread handling the loads so that it can work in parallel to the main thread. This is similar to what NSURLConnection does for us internally when we use the NS APIs. No new tests because no change in functionality and option is not enabled on Mac. * platform/network/cf/LoaderRunLoopCF.cpp: (WebCore::runLoaderThread): Create an autorelease pool for objc code that might be called in the run loop. (WebCore::loaderRunLoop): * platform/network/cf/LoaderRunLoopCF.h: 2011-07-15 Xiaomei Ji <xji@chromium.org> --webkit-visual-word crash on mixed editability https://bugs.webkit.org/show_bug.cgi?id=61978 --webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset could return null box) https://bugs.webkit.org/show_bug.cgi?id=62814 Reviewed by Ryosuke Niwa. Replace previousWordPosition/nextWordPosition with previousBoundary/nextBoundary which do not honor editable bounary. Honor editable boundary as the last stage of leftWordPosition and rightWordPosition. Check previousBoundary/nextBoundary against NULL. Have a static function to encapsulate the usage of getInlineBoxAndOffset and check the visible position is not NULL before passing to getInlineBoxAndOffset. Check the box returned from getInlineBoxAndOffset is not NULL before accessing. Test: editing/selection/move-by-word-visually-null-box.html * editing/visible_units.cpp: (WebCore::positionIsInBox): (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): (WebCore::lastWordBreakInBox): (WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality): (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality): (WebCore::positionIsInsideBox): (WebCore::leftWordPositionAcrossBoundary): (WebCore::rightWordPositionAcrossBoundary): (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-07-15 Pratik Solanki <psolanki@apple.com> Remove unncessary creation of connectionProperties dictionary https://bugs.webkit.org/show_bug.cgi?id=63958 Reviewed by Alexey Proskuryakov. No new tests because no change in functionality. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): 2011-07-15 Pavel Feldman <pfeldman@google.com> Web Inspector: Focusing on another node while editing CSS property does not update styles https://bugs.webkit.org/show_bug.cgi?id=64283 Reviewed by Yury Semikhatsky. Test: inspector/styles/styles-change-node-while-editing.html * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSProperty.prototype.setText): (WebInspector.CSSProperty.prototype.setText.callback): * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._inlineStyleInvalidated): (WebInspector.DOMDispatcher.prototype.inlineStyleInvalidated): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._attributesUpdated): (WebInspector.ElementsPanel.prototype.updateStyles): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane): (WebInspector.MetricsSidebarPane.prototype.update): (WebInspector.MetricsSidebarPane.prototype._innerUpdate.callback): (WebInspector.MetricsSidebarPane.prototype._innerUpdate.inlineStyleCallback): (WebInspector.MetricsSidebarPane.prototype._innerUpdate): (WebInspector.MetricsSidebarPane.prototype._styleSheetChanged): (WebInspector.MetricsSidebarPane.prototype._attributesUpdated): (WebInspector.MetricsSidebarPane.prototype.startEditing): (WebInspector.MetricsSidebarPane.prototype.editingEnded): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._innerUpdate.stylesCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate): (WebInspector.StylesSidebarPane.prototype._styleSheetChanged): (WebInspector.StylesSidebarPane.prototype._attributesUpdated): (WebInspector.StylesSidebarPane.prototype._refreshUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._nodeStylesUpdatedForTest): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.event): (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection): (WebInspector.StylePropertyTreeElement.prototype.styleText.updateInterface.majorChange.isRevert): 2011-07-15 Mike Reed <reed@google.com> [skia] remove legacy draw-text-as-paths code, as skia now draws all text as text https://bugs.webkit.org/show_bug.cgi?id=64368 Reviewed by James Robinson. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::skiaDrawText): (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: 2011-07-15 Piroska András <Piroska.Andras@stud.u-szeged.hu> Pixel difference in FEMorphology effect https://bugs.webkit.org/show_bug.cgi?id=63930 Reviewed by Zoltan Herczeg. Using short-circuit evaluation in the setFilterEffectAttribute function was wrong. We should call both setRadius functions and evaluate the changes separately. * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute): 2011-07-15 Jeff Miller <jeffm@apple.com> Fullscreen content doesn't use fullscreen controller on Windows https://bugs.webkit.org/show_bug.cgi?id=64540 <rdar://problem/9510455> Reviewed by Darin Adler. RenderThemeWin needs to override extraFullScreenStyleSheet() to return the fullscreenQuickTime stylesheet. Test added to fullscreen/video-controls-override.html. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::extraFullScreenStyleSheet): Added. * rendering/RenderThemeWin.h: Override extraFullScreenStyleSheet(). 2011-07-15 Nikolas Zimmermann <nzimmermann@rim.com> Not reviewed. Fix build failure introduced in r91061. * page/Console.cpp: (WebCore::Console::markTimeline): Remove argument name from unused parameter. 2011-07-15 Kenneth Rohde Christiansen <kenneth@webkit.org> Upstream QtWebKit/N9 changes related to visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=64589 Reviewed by Simon Hausmann. Rename setActualVisibleContentRect to setFixedVisibleContentRect as that makes it more obvious that it is an override. It is also consistent with the setFixedLayout which is often used in conjunction with it. Make visibleContentRect return the fixed value if set, and remove all calls to actualVisibleContentRect. Also updated the documentation. This is similar to what we have on our QtWebKit/N9 branch and is pretty well tested. * platform/ScrollView.cpp: (WebCore::ScrollView::visibleContentRect): If a fixed visibleContentRect is set, return that. Remove the code returning the contents size when in paintsEntireContents mode as that is wrong and already ifdeffed out for EFL. (WebCore::ScrollView::setScrollPosition): Do not try to be smart and update the fixed visibleContentsRect automatically, as the embedder might ignore the scroll request for various reasons. * platform/ScrollView.h: (WebCore::ScrollView::setFixedVisibleContentRect): (WebCore::ScrollView::fixedVisibleContentRect): 2011-07-15 Mike West <mkwst@chromium.org> Web Inspector: Rename console.markTimeline() to console.timeStamp() for Firebug compatibility. https://bugs.webkit.org/show_bug.cgi?id=63317 Reviewed by Pavel Feldman. Test: inspector/timeline/timeline-time-stamp.html * inspector/InspectorConsoleInstrumentation.h: (WebCore::InspectorInstrumentation::consoleTimeStamp): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::consoleTimeStampImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didTimeStamp): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createTimeStampData): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype.update.markPercentagesForRecord): (WebInspector.TimelineOverviewPane.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._updateEventDividers): (WebInspector.TimelinePanel.prototype._createEventDivider): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): * page/Console.cpp: (WebCore::Console::markTimeline): (WebCore::Console::timeStamp): * page/Console.h: * page/Console.idl: 2011-07-15 Jonathan Dong <jonathan.dong@torchmobile.com.cn> LocalStorage: Changed the value type of ItemTable from TEXT to BLOB to avoid string truncation. This patch will also convert the exsisting ItemTable and perform the DATA MIGRATION job. https://bugs.webkit.org/show_bug.cgi?id=58762 Reviewed by Jeremy Orlow. Tests: manual-tests/localstorage-value-truncation.html * manual-tests/localstorage-value-truncation.html: Added. Demostrate the testcase shown in bug 58762. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::isColumnDeclearedAsBlob): Test if the pre-defined type of column is BLOB. * platform/sql/SQLiteStatement.h: * storage/StorageAreaSync.cpp: Change the localStorage value type from Text to BLOB to avoid the value string truncation at \x00. (WebCore::StorageAreaSync::openDatabase): Change the database structure, use BLOB to replace the TEXT type of value segment in ItemTable. (WebCore::StorageAreaSync::migrateItemTableIfNeeded): Migrate the ItemTable if the pre-defined type of value is TEXT. (WebCore::StorageAreaSync::performImport): Use getColumnBlobAsString() to import the BLOB value. (WebCore::StorageAreaSync::sync): Use bindBlob() to bind value string to the SQLiteStatement for the database execution. * storage/StorageAreaSync.h: 2011-07-15 Kentaro Hara <haraken@google.com> Clear the content of a search input form when 'Escape' is pressed. https://bugs.webkit.org/show_bug.cgi?id=51897 This change added handleKeydownEvent() to a search input form, which clears the form and triggers a 'search' event when 'Escape' is pressed. Reviewed by Kent Tamura. Test: fast/forms/input-search-press-escape-key.html * html/SearchInputType.cpp: (WebCore::SearchInputType::handleKeydownEvent): * html/SearchInputType.h: 2011-07-15 Alexandru Chiculita <achicu@adobe.com> Move useRepaintBounds from RenderBlock::layoutRunsAndFloats to LineLayoutState https://bugs.webkit.org/show_bug.cgi?id=64360 Reviewed by Hajime Morita. No new tests needed because the patch is just a refactor. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineLayoutState::LineLayoutState): (WebCore::LineLayoutState::usesRepaintBounds): (WebCore::LineLayoutState::setRepaintRange): (WebCore::LineLayoutState::updateRepaintRangeFromBox): (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::determineStartPosition): 2011-07-14 MORITA Hajime <morrita@google.com> ExceptionCodePlaceholder should have its own ExceptionCodePlaceholder.cpp file https://bugs.webkit.org/show_bug.cgi?id=64503 Reviewed by Darin Adler. No new tests. Just a file reorg. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/ExceptionCodePlaceholder.cpp: Added. (WebCore::NoExceptionAssertionChecker::NoExceptionAssertionChecker): (WebCore::NoExceptionAssertionChecker::~NoExceptionAssertionChecker): * dom/ExceptionCodePlaceholder.h: Removed NoExceptionAssertionChecker::m_function, which is loonger used. 2011-07-14 Mark Pilgrim <pilgrim@chromium.org> Remove LegacyDefaultOptionalArguments flag from WebGL https://bugs.webkit.org/show_bug.cgi?id=64549 Reviewed by Kenneth Russell. * html/canvas/WebGLRenderingContext.idl: 2011-07-14 Yuta Kitamura <yutak@chromium.org> WebSocket: Introduce pywebsocket-0.6b2 https://bugs.webkit.org/show_bug.cgi?id=64534 Reviewed by Kent Tamura. pywebsocket now accepts "Sec-WebSocket-Version: 8" as required in hybi-10 specification. No new functionality is added, thus no new tests. Existing WebSocket tests should keep passing. * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): 2011-07-14 SravanKumar S <sravan.ken@gmail.com> Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls. https://bugs.webkit.org/show_bug.cgi?id=54476 Reviewed by Darin Adler. No new tests, since existing fast/dom/HTMLInputElement/checked-pseudo-selector.html verifies the patch. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isChecked): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/CheckedRadioButtons.cpp: (WebCore::CheckedRadioButtons::removeButton): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldAppearChecked): * html/HTMLInputElement.h: Removed virtual declaration from shouldAppearChecked(). * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): 2011-07-14 Kenichi Ishibashi <bashi@chromium.org> <input form="x"> should not associate the input with any forms when there is no form with id="x" https://bugs.webkit.org/show_bug.cgi?id=64509 Don't set form owner when a form associated element has the form attribute but there is no such form element. Reviewed by Kent Tamura. Test: fast/forms/form-attribute-nonexistence-form-id.html * dom/Document.cpp: (WebCore::Document::resetFormElementsOwner): Removed the argument which is no longer needed. * dom/Document.h: Ditto. * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::insertedIntoTree): Resets m_form whenever the element has the form attribute. (WebCore::FormAssociatedElement::resetFormOwner): Don't set m_form when there is no form element which has the given id. (WebCore::FormAssociatedElement::formAttributeChanged): Removed the argument of resetFormOwner(). * html/FormAssociatedElement.h: Ditto. * html/HTMLFormElement.cpp: Ditto. (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): 2011-07-14 Kent Tamura <tkent@chromium.org> REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus https://bugs.webkit.org/show_bug.cgi?id=64537 Reviewed by Darin Adler. We stopped to call updateCheckedRadioButtons() for checkboxes since r90809, but we need to call RenderTheme::stateChanged(), which was in updateCheckedRadioButtons(), for checkboxes. Tests: fast/forms/checkbox-appearance-change-by-checked-expected.html fast/forms/checkbox-appearance-change-by-checked.html * html/HTMLInputElement.cpp: Move the RenderTheme::stateChanged() call from updateCheckedRadioButtons() to setChecked(). (WebCore::HTMLInputElement::updateCheckedRadioButtons): (WebCore::HTMLInputElement::setChecked): 2011-07-14 Adam Barth <abarth@webkit.org> The beforeload event allows tracking URI changes in a frame https://bugs.webkit.org/show_bug.cgi?id=64482 Reviewed by Nate Chapin. Tests: http/tests/security/beforeload-iframe-client-redirect.html http/tests/security/beforeload-iframe-server-redirect.html Only dispatch the beforeload event for a frame if we haven't yet committed our first real load. The URL that we send to our parent will be the same URL the parent seens in the src attribute. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadWithDocumentLoader): 2011-07-14 Dan Bernstein <mitz@apple.com> LLVM Compiler build fix. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyComputeLength::applyValue): 2011-07-14 Darin Adler <darin@apple.com> [Mac] Use [NSCursor operationNotAllowedCursor] for CSS no-drop as well as CSS not-allowed https://bugs.webkit.org/show_bug.cgi?id=64570 Reviewed by Alexey Proskuryakov. Mac OS X documentation and usage makes it clear that this cursor is usually used for no-drop, and that it's also reasonable to use it for not-allowed. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use [NSCursor operationNotAllowedCursor] for Cursor::NoDrop. 2011-07-14 Luke Macpherson <macpherson@chromium.org> Reviewed by Dimitri Glazkov. Introduce templated compute length class in CSSStyleApplyProperty, and use to handle several CSS properties. https://bugs.webkit.org/show_bug.cgi?id=62957 No new tests / refactoring only. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): Add computeLength function that returns unsigned short. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyComputeLength::ApplyPropertyComputeLength): Added class to handle computeLength based properties. (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize ApplyPropertyComputeLength for appropriate properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::useSVGZoomRules): Make this a public member function instead of a private static function. (WebCore::CSSStyleSelector::applyProperty): Removed code now implemented in CSSStyleApplyProperty. (WebCore::CSSStyleSelector::setFontSize): Use new useSVGZoomRules function. * css/CSSStyleSelector.h: Add interface for useSVGZoomRules. 2011-07-14 Antti Koivisto <antti@apple.com> REGRESSION: Should not dispatch didFirstVisuallyNonEmptyLayout for the initial empty document https://bugs.webkit.org/show_bug.cgi?id=64557 Reviewed by Kenneth Rohde Christiansen. Avoid sending didFirstVisuallyNonEmptyLayout for the initial empty document of the frame. The clients may not expect it and it doesn't make much sense in any case. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): 2011-07-14 Jeffrey Pfau <jpfau@apple.com> Character reference parser for new XML parser https://bugs.webkit.org/show_bug.cgi?id=64398 Reviewed by Adam Barth. Refactored out the HTML entity parser and added a common template for parsing character references. * WebCore.xcodeproj/project.pbxproj: * html/parser/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * xml/parser/CharacterReferenceParserInlineMethods.h: Copied from Source/WebCore/html/parser/HTMLEntityParser.cpp. (WebCore::isHexDigit): (WebCore::unconsumeCharacters): (WebCore::consumeCharacterReference): * xml/parser/XMLCharacterReferenceParser.cpp: Added. (WebCore::consumeXMLCharacterReference): * xml/parser/XMLCharacterReferenceParser.h: Added. 2011-07-14 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Pavel Feldman. Web Inspector: panel switching is too slow. https://bugs.webkit.org/show_bug.cgi?id=60959 * inspector/front-end/inspector.css: (.panel): (.panel.visible): 2011-07-14 Andrey Kosyakov <caseq@chromium.org> Web Inspector: remove more unused CSS from inspector.css https://bugs.webkit.org/show_bug.cgi?id=64529 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: 2011-07-14 Ryosuke Niwa <rniwa@webkit.org> Move subtreeHasChanged from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64476 Reviewed by Kent Tamura. Moved subtreeHasChanged from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement. Also moved m_searchEventTimer and related functions from RenderTextSingleLine to SearchInputType. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): Moved from RenderTextControlSingleLine. (WebCore::HTMLInputElement::onSearch): Calls stopSearchEventTimer. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::subtreeHasChanged): Moved from RenderTextMultiLine. * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::defaultEventHandler): Calls subtreeHasChanged. (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Added; calls respondToChangeByUser. * html/HTMLTextFormControlElement.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): Initializes m_searchEventTimer. (WebCore::SearchInputType::startSearchEventTimer): Moved from RenderTextControlSingleLine. (WebCore::SearchInputType::stopSearchEventTimer): Ditto. (WebCore::SearchInputType::searchEventTimerFired): Ditto. * html/SearchInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Updated comment. * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: (WebCore::RenderTextControl::respondToChangeByUser): Renamed from subtreeHasChanged. * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): No longer initializes m_searchEventTimer. * rendering/RenderTextControlSingleLine.h: 2011-07-14 Vsevolod Vlasov <vsevik@chromium.org> Move XML errors handling out from XMLDocumentParser (refactoring). https://bugs.webkit.org/show_bug.cgi?id=64305 XML errors handling logic is moved out from XMLDocumentParser to allow using it for XSLT error handling as well. Reviewed by Adam Barth. No tests needed as there is no new functionality added. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * xml/XMLErrors.cpp: Added. (WebCore::XMLErrors::XMLErrors): (WebCore::XMLErrors::handleError): (WebCore::XMLErrors::appendErrorMessage): (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): * xml/XMLErrors.h: Added. * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::pushCurrentNode): (WebCore::XMLDocumentParser::handleError): (WebCore::XMLDocumentParser::insertErrorMessageBlock): * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::error): (WebCore::warningHandler): (WebCore::fatalErrorHandler): (WebCore::normalErrorHandler): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseDtd): 2011-07-14 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache. https://bugs.webkit.org/show_bug.cgi?id=64356 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._frameNavigated): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/FrameLoader.h: 2011-07-14 Tim Horton <timothy_horton@apple.com> Clear SVGElementInstance's children immediately upon detachment https://bugs.webkit.org/show_bug.cgi?id=63739 <rdar://problem/9705708> Reviewed by Nikolas Zimmermann. In addition to clearing the instance's children in the destructor, clear them when the instance is detached from its <use>. This way, we won't attempt to use them after we're detached but before the destructor has been called. Test: svg/custom/use-crash-using-children-before-destroy.svg * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::~SVGElementInstance): (WebCore::SVGElementInstance::clearChildren): * svg/SVGElementInstance.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::detachInstance): 2011-07-14 Nate Chapin <japhet@chromium.org> Don't skip custom cursors if an Image* is null, since this can lead to a non-custom Cursor flickering back in when the custom cursor hasn't finished loading yet. https://bugs.webkit.org/show_bug.cgi?id=64321 Reviewed by Darin Fisher. Manual test, since we're testing visual flickering. * manual-tests/canvas-cursor.html: Added. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): * platform/Cursor.cpp: (WebCore::determineHotSpot): 2011-07-14 Young Han Lee <joybro@company100.net> Reviewed by Dirk Schulze. REGRESSION (r89774): svg/W3C-SVG-1.1/animate-elem-82-t.svg hits assertion failure. https://bugs.webkit.org/show_bug.cgi?id=63911 Some functions assumed calculateKeyTimesIndex() does not return the last index of the keyTimes, but it would be right behavior for calculateKeyTimesIndex() when it accepts 1 as the percent argument. To avoid the assumption, and for more efficiency, this patch allows the functions using calculateKeyTimesIndex() to return early when it accepts 1 as the percent argument. These functions have always returned the last element of the corresponding vector in that situation. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints): (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): 2011-07-14 Andrey Kosyakov <caseq@chromium.org> Web Inspector: remove more dead code https://bugs.webkit.org/show_bug.cgi?id=64524 Reviewed by Yury Semikhatsky. * WebCore.gypi: * inspector/front-end/SummaryBar.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: * inspector/front-end/inspector.html: 2011-07-14 Peter Varga <pvarga@webkit.org> [Qt][V8] Build fix after r90830. Reviewed by Csaba Osztrogonác. The histogramEnumeration() function isn't available from the Qt port's PlatformBridge.h because this function is Chromium specific. Since the http://trac.webkit.org/changeset/90830 change we need to guard the usage of the histogramEnumeration() function. No new tests needed. * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::recordActionTakenCallback): (WebCore::V8InspectorFrontendHost::recordPanelShownCallback): (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback): 2011-07-14 Yury Semikhatsky <yurys@chromium.org> Web Inspector: show only Console and Scripts panels in shared worker inspector front-end https://bugs.webkit.org/show_bug.cgi?id=64519 Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager): (WebInspector.WorkerManager.isWorkerFrontend): (WebInspector.WorkerManager.isSharedWorkerFrontend): (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.DedicatedWorkerMessageForwarder): 2011-07-14 MORITA Hajime <morrita@google.com> Unreviewed, rolling out r90976, r90981, and r90985. http://trac.webkit.org/changeset/90976 http://trac.webkit.org/changeset/90981 http://trac.webkit.org/changeset/90985 https://bugs.webkit.org/show_bug.cgi?id=64251 build break * WebCore.exp.in: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: * dom/ShadowContentElement.cpp: (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowContentElement.h: * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::ShadowContentSelector): (WebCore::ShadowContentSelector::selectInclusion): (WebCore::ShadowContentSelector::willAttachContentFor): (WebCore::ShadowContentSelector::didAttachContent): (WebCore::ShadowContentSelector::activeElement): * dom/ShadowContentSelector.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::activeContentElement): * dom/ShadowRoot.h: * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: 2011-07-13 Ryosuke Niwa <rniwa@webkit.org> Move forwardEvent from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64475 Reviewed by Kent Tamura. Moved forwardEvent from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement. This removes the last dependency on Event.h and EventNames.h in the cpp files for the above render objects classes. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::defaultEventHandler): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::forwardEvent): * html/HTMLTextFormControlElement.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::forwardEvent): * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: * rendering/RenderTextControlSingleLine.h: 2011-07-13 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: if you rename an element into the INPUT element the browser will crash. https://bugs.webkit.org/show_bug.cgi?id=64292 Reviewed by Joseph Pecoraro. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setNodeName): Unnecessary function call copyNonAttributeProperties was removed. 2011-07-13 Yuta Kitamura <yutak@chromium.org> WebSocket: Implement hybi handshake https://bugs.webkit.org/show_bug.cgi?id=64344 Reviewed by Kent Tamura. Implement WebSocket handshake which is described at <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-5.1>. Notable differences from hixie-76 protocol are: - Challenge-response scheme has been changed dramatically. - Servers do not send Sec-WebSocket-Location and Sec-WebSocket-Origin anymore. - The value of "Upgrade" header has been changed to "websocket" (lower-case only). - "Origin" header in client's request is renamed to "Sec-WebSocket-Origin". New tests: http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header.html http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header.html http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header.html Note: Tests under hybi/ directory (including the new ones) are skipped and cannot be enabled yet, because pywebsocket does not accept requests from half-baked client implementation (i.e. hybi handshake + hixie-76 framing). They will be unskipped when hybi framing is landed in WebCore. * websockets/WebSocketHandshake.cpp: Functions and members only used for hixie-76 handshake are renamed so that they are not confused with hybi-10's ones. (WebCore::generateHixie76SecWebSocketKey): (WebCore::generateHixie76Key3): (WebCore::generateHixie76ExpectedChallengeResponse): (WebCore::generateSecWebSocketKey): Generates a value for Sec-WebSocket-Key as stated in hybi-10. (WebCore::getExpectedWebSocketAccept): Calculates the expected value of Sec-WebSocket-Accept. (WebCore::WebSocketHandshake::WebSocketHandshake): (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): (WebCore::WebSocketHandshake::readServerHandshake): (WebCore::WebSocketHandshake::serverWebSocketAccept): (WebCore::WebSocketHandshake::serverWebSocketExtensions): (WebCore::WebSocketHandshake::checkResponseHeaders): * websockets/WebSocketHandshake.h: 2011-07-13 MORITA Hajime <morrita@google.com> [ShadowContentElement] forwarded node should be able to access its hosting content element. https://bugs.webkit.org/show_bug.cgi?id=64251 Reviewed by Dimitri Glazkov. - Introduced ShadowInclusionSet to manage included nodes to its includer content element. ShadowInclusionSet instance is owned by ShadowRoot. - Updated the set on inclusion list changes. - Used the set to retrieve the content element of NodeRenderingContext. There are also related refactoring and cleanup: - Renamed NodeRenderingContext::m_contentElement to m_includer - ShadowContentSelector::m_activeElement is no longer used, thus removed. Test: fast/dom/shadow/content-element-includer.html * WebCore.exp.in: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: (WebCore::NodeRenderingContext::includer): * dom/ShadowContentElement.cpp: (WebCore::removeFromSet): Added (WebCore::addToSet): Added (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowContentElement.h: (WebCore::ShadowInclusionSet::add): (WebCore::ShadowInclusionSet::remove): (WebCore::ShadowInclusionSet::isEmpty): (WebCore::ShadowInclusionSet::Translator::hash): (WebCore::ShadowInclusionSet::Translator::equal): (WebCore::ShadowInclusionSet::Hash::hash): (WebCore::ShadowInclusionSet::Hash::equal): (WebCore::ShadowInclusionSet::find): * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::ShadowContentSelector): (WebCore::ShadowContentSelector::selectInclusion): * dom/ShadowContentSelector.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::includerFor): Replaced activeElement() (WebCore::ShadowRoot::inclusions): Added (WebCore::ShadowRoot::ensureInclusions): Added * dom/ShadowRoot.h: (WebCore::toShadowRoot): * testing/Internals.cpp: (WebCore::Internals::includerFor): * testing/Internals.h: * testing/Internals.idl: 2011-07-12 Dominic Cooney <dominicc@chromium.org> Raise if dispatchEvent dispatches an event that is being dispatched https://bugs.webkit.org/show_bug.cgi?id=64150 Reviewed by Dimitri Glazkov. Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-EventTarget-dispatchEvent Test: fast/events/dispatch-event-being-dispatched.html * dom/Event.h: (WebCore::Event::isBeingDispatched): Added. * dom/EventException.h: * dom/EventException.idl: Add DISPATCH_REQUEST_ERR. * dom/EventTarget.cpp: (WebCore::EventTarget::dispatchEvent): Raise if being dispatched. * dom/ExceptionCode.cpp: Add gunk for DISPATCH_REQUEST_ERR. 2011-07-13 Kent Tamura <tkent@chromium.org> Implement text field placeholders using shadow DOM https://bugs.webkit.org/show_bug.cgi?id=64253 Reviewed by Dimitri Glazkov. Represents a placeholder text as a shadow element, and its visibility is controlled by 'visibility' CSS property. This patch removes all of existing code about placeholder from RenderTextControl*. RenderTextControl* have only small code about placeholder layout. Also, this patch removes INPUT_PLACEHOLDER legacy pseudo ID, and the placeholder style uses Element::shadowPseudoId(). This fixes the following regressions: - https://bugs.webkit.org/show_bug.cgi?id=51290 - https://bugs.webkit.org/show_bug.cgi?id=54797 - https://bugs.webkit.org/show_bug.cgi?id=54814 - https://bugs.webkit.org/show_bug.cgi?id=63367 Test: fast/forms/textarea-placeholder-wrapping.html * css/CSSSelector.cpp: Remove INPUT_PLACEHOLDER legacy pseudo ID. (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: ditto. * css/html.css: (::-webkit-input-placeholder): Added. This contains properties common in <input> and <textarea>. Some properties have !important so that a stylesheet specified by a page author won't break WebKit's assumption. (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder): Added the default style for <input> placeholders. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::placeholderElement): Delegate to an InputType. (WebCore::HTMLInputElement::updatePlaceholderText): ditto. * html/HTMLInputElement.h: Declare placeholderElement() and updatePlaceholderText(). * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createRenderer): Remove the 'placeholderVisible' argument. (WebCore::HTMLTextAreaElement::placeholderElement): Added. (WebCore::HTMLTextAreaElement::updatePlaceholderText): Added. This creates, deletes, or updates the placeholder element. * html/HTMLTextAreaElement.h: - Declare placeholderElement() and updatePlaceholderText(). - Add m_placeholder. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility): Update the placeholder element and 'visibility' CSS property, instead of delegating the job to a renderer. * html/HTMLTextFormControlElement.h: Declare two pure virtual functions: placeholderElement() and updatePlaceholderText(). * html/InputType.cpp: (WebCore::InputType::placeholderElement): Add an empty implementation. (WebCore::InputType::updatePlaceholderText): Add an empty implementation. * html/InputType.h: Declare placeholderElement() and updatePlaceholderText(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createRenderer): Remove the 'placeholderVisible' argument. (WebCore::TextFieldInputType::placeholderElement): Added. (WebCore::TextFieldInputType::destroyShadowSubtree): Deletes m_placeholder. (WebCore::TextFieldInputType::updatePlaceholderText): Added. This creates, deletes, or updates the placeholder element. * html/TextFieldInputType.h: - Declare placeholderElement() and updatePlaceholderText(). - Add m_placeholder. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): Remove the 'placeholderVisible' argument. (WebCore::RenderTextControl::layoutSpecialExcludedChild): Excludes the placeholder renderer in order to avoid to secure a box for the placeholder. * rendering/RenderTextControl.h: - Remove declarations of removed functions. - Update the RenderTextControl signature. - Add layoutSpecialExcludedChild(). * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine): Remove the 'placeholderVisible' argument. (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild): Laying out the placeholder box so that it has correct width and location. * rendering/RenderTextControlMultiLine.h: - Remove declarations of removed functions. - Update the RenderTextControlMultiLine signature. - Add layoutSpecialExcludedChild(). * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Remove the 'placeholderVisible' argument. (WebCore::RenderTextControlSingleLine::layout): Laying out the placeholder box so that it has correct width and location. * rendering/RenderTextControlSingleLine.h: - Remove declarations of removed functions. - Update the RenderTextControlSingleLine signature. * rendering/style/RenderStyleConstants.h: Remove INPUT_PLACEHOLDER. 2011-07-13 James Simonsen <simonjam@chromium.org> Remove hack that forcefully prevents scripts from running in shadow SVG https://bugs.webkit.org/show_bug.cgi?id=64419 This hack was put in to prevent scripts from running in shadow SVG. This should never have happened, but did because we didn't parse <script> tags in SVG properly. This was fixed in r88584, so the hack is no longer needed. No new tests since there is no change in functionality. Reviewed by Tony Gentilcore. * dom/ScriptElement.cpp: (WebCore::ScriptElement::prepareScript): 2011-07-13 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions] Parse -webkit-content-order property https://bugs.webkit.org/show_bug.cgi?id=63897 Reviewed by David Hyatt. Test: fast/regions/webkit-content-order-parsing.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionIndex): (WebCore::InheritedFlags::setRegionIndex): (WebCore::InheritedFlags::initialRegionIndex): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-07-13 James Robinson <jamesr@chromium.org> Reviewed by Kenneth Russell. [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass https://bugs.webkit.org/show_bug.cgi?id=58833 Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle the drawing responsibilities for tiled layers. TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler, tiling transform and layer properties and draws the layer. Longer term it'd be better of the CCTiledLayerImpl owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the way tile eviction works. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore::ContentLayerChromium::textureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::ImageLayerChromium): (WebCore::ImageLayerChromium::cleanupResources): (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::textureUpdater): (WebCore::ImageLayerChromium::contentBounds): (WebCore::ImageLayerChromium::drawsContent): (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::ccLayerImpl): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRootLayer): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: Added. (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::~TiledLayerChromium): (WebCore::TiledLayerChromium::createCCLayerImpl): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::setLayerRenderer): (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::setTilingOption): (WebCore::TiledLayerChromium::setIsMask): (WebCore::TiledLayerChromium::tilingTransform): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::writeIndent): (WebCore::TiledLayerChromium::dumpLayerProperties): * platform/graphics/chromium/TiledLayerChromium.h: Added. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setDrawsContent): (WebCore::CCLayerImpl::drawsContent): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added. (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added. (WebCore::CCTiledLayerImpl::create): (WebCore::CCTiledLayerImpl::setTilingTransform): (WebCore::CCTiledLayerImpl::setTiler): 2011-07-13 Julien Chaffraix <jchaffraix@webkit.org> Remove an unused bit in RenderObject https://bugs.webkit.org/show_bug.cgi?id=64485 Reviewed by Darin Adler. No change in behavior so no new test. * rendering/RenderObject.h: Removed a bit that was duplicated from RenderTableCell. However it was not used in RenderObject and RenderTableCell already packed this bit. We were lying in the number of used bits in RenderObject which was 33. This change brings us back to what was advertised. 2011-07-13 Simon Fraser <simon.fraser@apple.com> Fix non-debug builds. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createGraphicsLayer): 2011-07-13 Vitaly Repeshko <vitalyr@chromium.org> [chromium] Fix mac build after r90949. * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::V8HiddenPropertyName::hiddenReferenceName): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): 2011-07-13 Emil A Eklund <eae@chromium.org> Switch table rendering to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64478 Reviewed by Eric Seidel. No new tests, no new functionality. * rendering/AutoTableLayout.cpp: * rendering/AutoTableLayout.h: * rendering/HitTestResult.cpp: * rendering/HitTestResult.h: * rendering/LayoutTypes.h: * rendering/RenderBlock.h: * rendering/RenderBoxModelObject.cpp: * rendering/RenderBoxModelObject.h: * rendering/RenderObject.h: * rendering/RenderTable.cpp: * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: * rendering/RenderTableCell.h: 2011-07-13 Simon Fraser <simon.fraser@apple.com> Factor some GraphicsLayer creation code in RenderLayerBacking https://bugs.webkit.org/show_bug.cgi?id=64487 Reviewed by Sam Weinig. Move the GraphicsLayer::create() calls into once place so that we don't have lots of #ifndef NDEBUG in various places, and can share more code in future. No behavior change, so no new tests. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::~RenderLayerBacking): (WebCore::RenderLayerBacking::createGraphicsLayer): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateLayerTransform): (WebCore::RenderLayerBacking::updateClippingLayers): (WebCore::RenderLayerBacking::updateOverflowControlsLayers): (WebCore::RenderLayerBacking::updateForegroundLayer): (WebCore::RenderLayerBacking::updateMaskLayer): * rendering/RenderLayerBacking.h: 2011-07-13 Xan Lopez <xlopez@igalia.com> [GTK] Fix distcheck. Reviewed by Martin Robinson. * GNUmakefile.list.am: add missing files. 2011-07-13 James Robinson <jamesr@chromium.org> [chromium] No implementation defined for WTF::monotonicallyIncreasingTime https://bugs.webkit.org/show_bug.cgi?id=64420 Reviewed by Tony Gentilcore. Removes some redundant time related code. * platform/chromium/PlatformBridge.h: * platform/chromium/SystemTimeChromium.cpp: (WebCore::userIdleTime): 2011-07-13 Vitaly Repeshko <vitalyr@chromium.org> [V8] Avoid memory leaks with hidden references. https://bugs.webkit.org/show_bug.cgi?id=64467 Reviewed by Adam Barth. We used to have growing arrays of hidden references associated with objects. The entries in this array had no keys and were never removed. This patch changes the interface to require a reference name. This way it's harder to leak an unbounded number of objects. Also it makes our wrapper objects one machine word smaller. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): Started using new interface. Interface changes: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setNamedHiddenReference): (WebCore::V8DOMWrapper::setNamedHiddenWindowReference): * bindings/v8/V8DOMWrapper.h: Added a helper to compute hidden reference names as V8 strings: * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::V8HiddenPropertyName::hiddenReferenceName): * bindings/v8/V8HiddenPropertyName.h: * bindings/v8/WrapperTypeInfo.h: Removed the hidden reference array internal field. Update usages of hidden references: * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8MessageChannelConstructor.cpp: (WebCore::V8MessageChannel::constructorCallback): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter): Updated. 2011-07-13 Joseph Pecoraro <joepeck@webkit.org> Improve names of some ApplicationCacheStorage accessor methods https://bugs.webkit.org/show_bug.cgi?id=64433 Reviewed by Alexey Proskuryakov. Some methods returned a bool for success/failure and actually returned a value as an out parameter so their name was confusing. Rename these methods to make them more clear. (WebCore::ApplicationCache::diskUsageForOrigin): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin): (WebCore::ApplicationCacheStorage::calculateUsageForOrigin): (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache): (WebCore::ApplicationCacheStorage::checkOriginQuota): * loader/appcache/ApplicationCacheStorage.h: * loader/appcache/ApplicationCache.cpp: Rename the methods. * WebCore.exp.in: Replaced old versions. Also, calculateRemaining wasn't needed outside WebCore, so no longer export it. 2011-07-13 Joseph Pecoraro <joepeck@webkit.org> Some ApplicationCache Origin Cleanup https://bugs.webkit.org/show_bug.cgi?id=64431 Reviewed by Alexey Proskuryakov. - m_loadedSize is inaccurate. This just replaces it with calls to ApplicationCache::estimatedSizeInStorage. - m_availableSpaceInQuota can get out of date, so we just recalculate it at the start of appcache downloads. * loader/appcache/ApplicationCacheGroup.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): (WebCore::ApplicationCacheGroup::didReceiveData): Remove references to m_loadedSize. (WebCore::ApplicationCacheGroup::didFinishLoading): Replace m_loadedSize with estimatedSizeInStorage after we add the new cached resource to the cache. The calculation already happened so this check is fast. (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): When we start the Downloading phase, recalculate the quota so that we have an up to date quota value so that we can break early if needed. 2011-07-12 Brent Fulgham <bfulgham@webkit.org> Standardize WinCairo conditionalized code under PLATFORM macro. https://bugs.webkit.org/show_bug.cgi?id=64377 Reviewed by Maciej Stachowiak. Update compile-time conditions that had previously used #ifdef of WIN_CAIRO to consistently use PLATFORM(WIN_CAIRO). * WebCore.vcproj/WebCoreCairo.vsprops: Remove redundant declaration of WIN_CAIRO. * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Update to use the existing WinCairo.vsprops file. * WebCorePrefix.h: Update for new WTF_PLATFORM_WIN_CAIRO define. * config.h: Update to use PLATFORM(WIN_CAIRO). 2011-07-13 Alexandru Chiculita <achicu@adobe.com> [CSS Exclusions] Fix for comment #23 on wrap-shape parsing bug 61726 https://bugs.webkit.org/show_bug.cgi?id=64464 Reviewed by Tony Chang. No new tests needed. * css/CSSParser.cpp: (WebCore::CSSParser::parseWrapShapeRect): Removed the "valid" local. (WebCore::CSSParser::parseWrapShapeCircle): Removed the "valid" local. (WebCore::CSSParser::parseWrapShapeEllipse): Removed the "valid" local. * css/CSSPrimitiveValue.cpp: * css/CSSWrapShapes.h: (WebCore::CSSWrapShapePolygon::getXAt): Replaced bit shift with multiplication. (WebCore::CSSWrapShapePolygon::getYAt): Replaced bit shift with multiplication. * rendering/style/RenderStyle.cpp: * rendering/style/StyleRareNonInheritedData.h: 2011-07-13 Abhishek Arya <inferno@chromium.org> Reviewed by Adam Barth. Issue with Frame lifetime due to deletion in beforeload event. https://bugs.webkit.org/show_bug.cgi?id=64457 Copy the Frame protector higher in the stack from loadWithDocumentLoader to loadFrameRequest since any of loadPostRequest or loadURL can call loadWithDocumentLoader, thereby dispatching the beforeload event and blowing away the frame. This deleted frame will be later accessed in the loadFrameRequest function causing a crash. Test: fast/events/form-iframe-target-before-load-crash2.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadFrameRequest): (WebCore::FrameLoader::loadWithDocumentLoader): 2011-07-13 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]content:-webkit-from-flow not applied correctly https://bugs.webkit.org/show_bug.cgi?id=64438 Reviewed by Tony Chang. Forgot to modify getStringValue(), i was modifying only getStringValue(ExceptionCode&). Test: fast/regions/content-webkit-from-flow-parsing.html (existing). * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::getStringValue): 2011-07-12 Ryosuke Niwa <rniwa@webkit.org> Don't reuse the last InsertTextCommand https://bugs.webkit.org/show_bug.cgi?id=64416 Reviewed by Justin Garcia. This patch makes the interface of InsertTextCommand less foreign. It now takes arguments in its constructor and executes the command in doApply like other edit commands. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::applyCommandToComposite): Added. * editing/CompositeEditCommand.h: * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::InsertTextCommand): Takes arguments input used to take. (WebCore::InsertTextCommand::doApply): Renamed from input. * editing/InsertTextCommand.h: (WebCore::InsertTextCommand::create): Takes arguments input used to take. * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertTextRunWithoutNewlines): Creates InsertTextCommand. 2011-07-12 Dmitry Lomov <dslomov@google.com> https://bugs.webkit.org/show_bug.cgi?id=63041 [Chromium][V8] Make DOMDataStore per-isolate This patch: - makes DOMData class an utility class with static members only - adds an isolate-specific DOMDataStore in V8BindingPerIsolateData. Dromaeo benchmarks are not affected. Reviewed by Adam Barth. * bindings/v8/DOMData.cpp: (WebCore::getDefaultStore): (WebCore::DOMData::getCurrentStore): * bindings/v8/DOMData.h: * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::DOMDataStore): (WebCore::DOMDataStore::allStores): * bindings/v8/DOMDataStore.h: * bindings/v8/ScopedDOMDataStore.cpp: (WebCore::ScopedDOMDataStore::ScopedDOMDataStore): * bindings/v8/ScopedDOMDataStore.h: * bindings/v8/StaticDOMDataStore.cpp: (WebCore::StaticDOMDataStore::StaticDOMDataStore): * bindings/v8/StaticDOMDataStore.h: * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::allStores): (WebCore::V8BindingPerIsolateData::getDOMDataStore): (WebCore::V8BindingPerIsolateData::setDOMDataStore): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData): * bindings/v8/V8DOMMap.cpp: (WebCore::DOMDataStoreHandle::DOMDataStoreHandle): (WebCore::getDOMDataStore): (WebCore::enableFasterDOMStoreAccess): 2011-07-12 Simon Fraser <simon.fraser@apple.com> Rename compositing-related updateContentsScale() methods https://bugs.webkit.org/show_bug.cgi?id=64430 Reviewed by Joseph Pecoraro. Rename updateContentsScale() to something less presumptuous; layers may choose to do something other than update their contents scale when the page scale factor changes. pageScaleFactorChanged() is a better name. * page/Frame.cpp: (WebCore::Frame::pageScaleFactorChanged): (WebCore::Frame::scalePage): * page/Frame.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::pageScaleFactorChanged): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::pageScaleFactorChanged): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::pageScaleFactorChanged): * rendering/RenderLayerCompositor.h: 2011-07-13 Pierre Rossi <pierre.rossi@gmail.com> Fix compile for QRawFont. https://bugs.webkit.org/show_bug.cgi?id=64453 Reviewed by Andreas Kling. * platform/graphics/GraphicsContext.h: * platform/graphics/qt/FontQt.cpp: (WebCore::Font::drawGlyphs): 2011-07-13 John Knottenbelt <jknotten@chromium.org> Reference Geolocation object from GeoNotifier and Geolocation::setIsAllowed. https://bugs.webkit.org/show_bug.cgi?id=64363 Reviewed by Tony Gentilcore. Test: fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html * page/Geolocation.cpp: (WebCore::Geolocation::setIsAllowed): * page/Geolocation.h: 2011-07-13 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network panel search needs each resource to have unique identifier. https://bugs.webkit.org/show_bug.cgi?id=64287 Reviewed by Pavel Feldman. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._appendResource): (WebInspector.NetworkPanel.prototype._frameNavigated): (WebInspector.NetworkPanel.prototype._updateSearchMatchedListAfterResourceIdentifierChanged): 2011-07-13 Alexandru Chiculita <achicu@adobe.com> Bridge RenderBoxModelObject::calculateBackgroundImageGeometry parameters into a class https://bugs.webkit.org/show_bug.cgi?id=63987 Reviewed by Hajime Morita. Change doesn't add new functionality. No test needed. * rendering/RenderBox.cpp: (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::repaintLayerRectsForImage): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY): 2011-07-13 MORITA Hajime <morrita@google.com> Refactoring: Ignored ExceptionCode value should be less annoying. https://bugs.webkit.org/show_bug.cgi?id=63688 - Introduced ExceptionCodePlaceholder class for the default parameter of ExceptionCode. - Introduced ASSERT_NO_EXCEPTION to check ExceptionCode not set to non-zero after the call. - Adopted ASSERT_NO_EXCEPTION in Range.cpp No new tests. No behaviour change. Reviewed by Darin Adler. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/ExceptionCodePlaceholder.h: Added. (WebCore::ExceptionCodePlaceholder::ExceptionCodePlaceholder): (WebCore::ExceptionCodePlaceholder::operator ExceptionCode& ): (WebCore::IgnorableExceptionCode::IgnorableExceptionCode): (WebCore::CheckedExceptionCode::CheckedExceptionCode): (WebCore::CheckedExceptionCode::~CheckedExceptionCode): * dom/Range.cpp: (WebCore::Range::Range): (WebCore::Range::editingStartPosition): * dom/Range.h: 2011-07-13 Nikolas Zimmermann <nzimmermann@rim.com> Regression: OOB read in svg text run https://bugs.webkit.org/show_bug.cgi?id=63627 Not reviewed. Fixed last minute typo leading to assertions. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintSelection): 2011-07-12 Andrey Kosyakov <caseq@chromium.org> Web Inspector: factor NetworkLogView out of Network panel https://bugs.webkit.org/show_bug.cgi?id=64366 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype.get useLargeRows): (WebInspector.NetworkLogView.prototype.set allowPopover): (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.NetworkLogView.prototype.resize): (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype.show): (WebInspector.NetworkLogView.prototype.hide): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkLogView.prototype.switchToDetailedView): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype.get _setLargerResources): (WebInspector.NetworkLogView.prototype._getPopoverAnchor): (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype.get toolbarItemLabel): (WebInspector.NetworkPanel.prototype.get statusBarItems): (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.NetworkPanel.prototype.resize): (WebInspector.NetworkPanel.prototype._reset): (WebInspector.NetworkPanel.prototype.updateSidebarWidth): (WebInspector.NetworkPanel.prototype.updateMainViewWidth): (WebInspector.NetworkPanel.prototype.handleShortcut): (WebInspector.NetworkPanel.prototype.show): (WebInspector.NetworkPanel.prototype.hide): (WebInspector.NetworkPanel.prototype.get resources): (WebInspector.NetworkPanel.prototype.resourceById): (WebInspector.NetworkPanel.prototype.canShowAnchorLocation): (WebInspector.NetworkPanel.prototype.showAnchorLocation): (WebInspector.NetworkPanel.prototype._onViewCleared): (WebInspector.NetworkPanel.prototype._onRowSizeChanged): (WebInspector.NetworkPanel.prototype._onResourceSelected): (WebInspector.NetworkPanel.prototype._showResource): (WebInspector.NetworkPanel.prototype._closeVisibleResource): (WebInspector.NetworkPanel.prototype._toggleGridMode): (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode): (WebInspector.NetworkPanel.prototype.performSearch): (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult): (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult): (WebInspector.NetworkPanel.prototype.searchCanceled): (WebInspector.NetworkDataGridNode): (WebInspector.NetworkDataGridNode.prototype.isFilteredOut): (WebInspector.NetworkDataGridNode.prototype.select): (WebInspector.NetworkDataGridNode.prototype.get selectable): 2011-07-13 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90634. http://trac.webkit.org/changeset/90634 https://bugs.webkit.org/show_bug.cgi?id=64448 Qt HTTP Pipelining is not robust enough to be used in that generic way. (Requested by benjaminp on #webkit). * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): 2011-07-13 Nikolas Zimmermann <nzimmermann@rim.com> Regression: OOB read in svg text run https://bugs.webkit.org/show_bug.cgi?id=63627 Reviewed by Zoltan Herczeg. A TextRun is constructed for a portion of a string [a,b] whose original length is c (0 < a < b < c). The TextRun charactersLength variable stores the length of the remaining text from (b..c) in order to support ligatures in SVG Fonts. Example: <text>ffl</text>. When measuring the advance from char 0 to char 1 the whole 'ffl' text must be passed to the SVG glyph selection code, as the SVG Font may define a single glyph for the characters 'ffl' thus leading to a single character long text pointing to the ffl ligature, not three individual 'f' / 'f' / 'l' characters anymore. constructTextRun(..const UChar*, int length, ..) did not correctly calculate the maximum length (b..c). The passed in UChar buffer starts at eg. textRenderer->characters() + start(), and following condition holds true for 'length': start() + length <= textRenderer->textLength() (which denotes the maximum length of the textRenderer->characters() buffer). We have to keep track of the start() offset, so that we can calculate the charactersLength for the TextRun correctly: textRenderer->textLength() - start(). There are also other cases like RenderCombinedText and/or the presence of hyphens that were incorrectly tracked. Only InlineTextBox had to be fixed, the other callsites in eg. RenderBlockLineLayout already computed the maximum length correctly - I assured this by valgrind runs on all SVG Font tests. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintSelection): (WebCore::InlineTextBox::constructTextRun): Add maximumLength parameter to constructTextRun. * rendering/InlineTextBox.h: Ditto. 2011-07-12 Antti Koivisto <antti@apple.com> didFirstVisuallyNonEmptyLayout dispatched too early https://bugs.webkit.org/show_bug.cgi?id=64412 Reviewed by Darin Adler and Sam Weinig. Improve the mechanism that dispatches didFirstVisuallyNonEmptyLayout - Wait until a threshold of characters and pixels has been exceeded before dispatching. - Wait until stylesheets are loaded (painting is disabled in this case). * page/FrameView.cpp: (WebCore::FrameView::reset): (WebCore::FrameView::performPostLayoutTasks): * page/FrameView.h: (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount): (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): (WebCore::RenderImage::imageChanged): * rendering/RenderImage.h: * rendering/RenderText.cpp: (WebCore::RenderText::RenderText): 2011-07-12 MORITA Hajime <morrita@google.com> [Refactoring][ShadowContentElement] Forwarded node list should be a linked-list. https://bugs.webkit.org/show_bug.cgi?id=64252 Reviewed by Dimitri Glazkov. Introduced ShadowInclusionList and ShadowInclusion for maintaining forwarded content children. ShadowInclusion is doubly-linked list. ShadowContentElement::m_inclusions is replaced by ShadowInclusionList. This change is a prepration for bug 64251, which will introduce forwarded-children to content-element table. No new tests. No behavioral change. * dom/NodeRenderingContext.cpp: (WebCore::nextRendererOf): (WebCore::previousRendererOf): (WebCore::firstRendererOf): (WebCore::lastRendererOf): * dom/ShadowContentElement.cpp: (WebCore::ShadowInclusion::append): (WebCore::ShadowInclusion::unlink): (WebCore::ShadowInclusionList::ShadowInclusionList): (WebCore::ShadowInclusionList::~ShadowInclusionList): (WebCore::ShadowInclusionList::find): (WebCore::ShadowInclusionList::clear): (WebCore::ShadowInclusionList::append): (WebCore::ShadowContentElement::attach): * dom/ShadowContentElement.h: (WebCore::ShadowInclusion::includer): (WebCore::ShadowInclusion::content): (WebCore::ShadowInclusion::next): (WebCore::ShadowInclusion::previous): (WebCore::ShadowInclusion::ShadowInclusion): (WebCore::ShadowInclusion::create): (WebCore::ShadowInclusionList::first): (WebCore::ShadowInclusionList::last): (WebCore::ShadowInclusionList::isEmpty): (WebCore::ShadowInclusionList::append): (WebCore::ShadowContentElement::inclusions): * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::selectInclusion): * dom/ShadowContentSelector.h: 2011-07-12 David Reveman <reveman@chromium.org> [Chromium] Use nearest filter method with pixel aligned transforms. https://bugs.webkit.org/show_bug.cgi?id=64338 Reviewed by James Robinson. Check for integer translation and use nearest texture filter when possible to avoid filter precisions problems at the layer edges. Test: compositing/iframes/nested-iframe-scrolling.html (existing) * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::isIntegerTranslation): * platform/graphics/transforms/TransformationMatrix.h: 2011-07-12 David Reveman <reveman@chromium.org> Removed unnecessary function parameters from TilingData::textureOffset. https://bugs.webkit.org/show_bug.cgi?id=64245 Reviewed by Brent Fulgham. No new tests, no functionality changes. * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/gpu/TilingData.cpp: (WebCore::TilingData::textureOffset): * platform/graphics/gpu/TilingData.h: 2011-07-12 Ryosuke Niwa <rniwa@webkit.org> Move RenderTextControl::indexForVisiblePosition to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64403 Reviewed by Hajime Morita. Moved indexForVisiblePosition from RenderTextControl to HTMLTextFormControlElement. Also replaced the call to RenderTextControl::isSelectableElement by a call to enclosingTextFormControl (moved from htmlediting to HTMLTextFormControlElement) because we are only interested in checking whether the given position is inside the current text form control or not. In addition, modernized the code in indexForVisiblePosition by calling parentAnchoredEquivalent on the given position and replacing calls to deprecateNode and deprecatedEditingOffset by calls to containerNode and offsetInContainer. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls indexForVisiblePosition. * editing/htmlediting.cpp: Removed enclosingTextFromControl. * editing/htmlediting.h: Removed enclosingTextFromControl. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Moved from RenderTextControl. (WebCore::HTMLTextFormControlElement::computeSelectionStart): Calls indexForVisiblePosition. (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Calls indexForVisiblePosition. (WebCore::enclosingTextFormControl): Moved from htmlediting.cpp * html/HTMLTextFormControlElement.h: * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: 2011-07-12 Julien Chaffraix <jchaffraix@webkit.org> Make RenderObject::containingBlock virtual for better speed and clarity https://bugs.webkit.org/show_bug.cgi?id=64318 Reviewed by Darin Adler. No new tests, performance refactoring. On some of my test cases, this method takes between 3 and 5% of the time spend. The method makes 2 calls to virtual methods which could be moved to their overriden version of containingBlock if we made it virtual. That's what this patch does. It saves between 1 and 2% on some synthetic test cases as well as made the current method shorter. * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Removed code for RenderView and RenderTableCell, replaced by ASSERTs. * rendering/RenderObject.h: Made containingBlock virtual. * rendering/RenderTableCell.h: (WebCore::RenderTableCell::containingBlock): * rendering/RenderView.h: (WebCore::RenderView::containingBlock): The code moved from RenderObject is inlined in those 2 methods. 2011-07-12 James Robinson <jamesr@chromium.org> [chromium] Chromium win build fix. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::drawGlyphsWin): 2011-07-12 Pratik Solanki <psolanki@apple.com> Get webkit to compile with USE(CFNETWORK) enabled on Mac https://bugs.webkit.org/show_bug.cgi?id=63674 Reviewed by David Kilzer. Changes to ResourceHandle class to get it to compile with USE(CFNETWORK). No new tests because no change in functionality and option is not enabled on Mac. * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::didReceiveResponse): (WebCore::ResourceHandleInternal::~ResourceHandleInternal): (WebCore::ResourceHandle::start): (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): Call adjustMIMETypeIfNecessary on Mac. Also port over fix for <rdar://problem/6901522> added in r43993 which forces the MIME type to text/html if the request is annotated with a "ForceHTMLMIMEType" property. 2011-07-12 James Robinson <jamesr@chromium.org> [chromium] Delete the unused legacy accelerated canvas 2d code https://bugs.webkit.org/show_bug.cgi?id=64214 Reviewed by Stephen White. This removes the legacy accelerated canvas 2d path and support logic since we (chromium) are no longer using this codepath and it seems clear that no other port is interested. Refactoring and removing unused code, so no new tests. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): (WebCore::CanvasRenderingContext2D::didDraw): * html/canvas/CanvasRenderingContext2D.h: * loader/EmptyClients.h: * page/ChromeClient.h: * page/Page.cpp: (WebCore::Page::sharedGraphicsContext3D): * page/Page.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setSharedGraphicsContext3D): (WebCore::GraphicsContext::syncSoftwareCanvas): * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::setGrContext): * platform/graphics/chromium/FontLinux.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::pointInTriangle): * platform/graphics/gpu/BicubicShader.cpp: Removed. * platform/graphics/gpu/BicubicShader.h: Removed. * platform/graphics/gpu/ConvolutionShader.cpp: Removed. * platform/graphics/gpu/ConvolutionShader.h: Removed. * platform/graphics/gpu/GraphicsContextGPU.cpp: Removed. * platform/graphics/gpu/GraphicsContextGPU.h: Removed. * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed. * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed. * platform/graphics/gpu/SolidFillShader.cpp: Removed. * platform/graphics/gpu/SolidFillShader.h: Removed. * platform/graphics/gpu/TexShader.cpp: Removed. * platform/graphics/gpu/TexShader.h: Removed. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::savePlatformState): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::addInnerRoundedRectClip): (WebCore::GraphicsContext::clearRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::concatCTM): (WebCore::GraphicsContext::setCTM): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::drawFocusRing): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawLineForTextChecking): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::scale): (WebCore::GraphicsContext::setAlpha): (WebCore::GraphicsContext::setPlatformCompositeOperation): (WebCore::GraphicsContext::setPlatformFillColor): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::strokeRect): (WebCore::GraphicsContext::rotate): (WebCore::GraphicsContext::translate): (WebCore::GraphicsContext::setSharedGraphicsContext3D): (WebCore::GraphicsContext::syncSoftwareCanvas): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::~NativeImageSkia): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::PlatformContextSkia): (WebCore::PlatformContextSkia::~PlatformContextSkia): (WebCore::PlatformContextSkia::setSharedGraphicsContext3D): (WebCore::PlatformContextSkia::makeGrContextCurrent): * platform/graphics/skia/PlatformContextSkia.h: 2011-07-12 Emil A Eklund <eae@chromium.org> Switch InlineFlowBox to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64399 Reviewed by Eric Seidel. First step in moving floats over to the new layout abstraction. No new tests, no new functionality. * rendering/InlineBox.cpp: (WebCore::InlineBox::logicalHeight): * rendering/InlineBox.h: (WebCore::InlineBox::logicalTop): (WebCore::InlineBox::logicalBottom): (WebCore::InlineBox::setLogicalTop): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::addBoxShadowVisualOverflow): (WebCore::InlineFlowBox::addTextBoxVisualOverflow): (WebCore::InlineFlowBox::addReplacedChildOverflow): (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): * rendering/InlineFlowBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalRightSelectionGap): * rendering/RenderBlock.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::alignBoxesInBlockDirection): (WebCore::RootInlineBox::lineSelectionGap): (WebCore::RootInlineBox::ascentAndDescentForBox): (WebCore::RootInlineBox::verticalPositionForBox): * rendering/RootInlineBox.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getShadowExtent): (WebCore::RenderStyle::getShadowHorizontalExtent): (WebCore::RenderStyle::getShadowVerticalExtent): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::getTextShadowExtent): (WebCore::InheritedFlags::getTextShadowHorizontalExtent): (WebCore::InheritedFlags::getTextShadowVerticalExtent): (WebCore::InheritedFlags::getTextShadowInlineDirectionExtent): (WebCore::InheritedFlags::getTextShadowBlockDirectionExtent): (WebCore::InheritedFlags::getBoxShadowExtent): (WebCore::InheritedFlags::getBoxShadowHorizontalExtent): (WebCore::InheritedFlags::getBoxShadowVerticalExtent): (WebCore::InheritedFlags::getBoxShadowInlineDirectionExtent): (WebCore::InheritedFlags::getBoxShadowBlockDirectionExtent): (WebCore::InheritedFlags::getShadowInlineDirectionExtent): (WebCore::InheritedFlags::getShadowBlockDirectionExtent): * rendering/style/ShadowData.cpp: (WebCore::calculateShadowExtent): (WebCore::ShadowData::adjustRectForShadow): * rendering/style/ShadowData.h: (WebCore::ShadowData::ShadowData): (WebCore::ShadowData::x): (WebCore::ShadowData::y): 2011-07-12 Kenichi Ishibashi <bashi@chromium.org> [Chromium] SVG text is not rendered sometimes with geometricPrecision https://bugs.webkit.org/show_bug.cgi?id=64341 Changing the type of x and y offsets of ComplexTextControllerLinux to make it possible to treat negative offsets. Reviewed by Tony Chang. Test: platform/chromium-linux/svg/text/text-with-geometric-precision.svg * platform/graphics/chromium/ComplexTextControllerLinux.cpp: Changed the type of m_offsetX and m_startingY from unsigned to int. (WebCore::ComplexTextController::ComplexTextController): Changed the type of the argument. (WebCore::ComplexTextController::reset): Ditto. * platform/graphics/chromium/ComplexTextControllerLinux.h: 2011-07-12 Alexandru Chiculita <achicu@adobe.com> Reviewed by David Hyatt. [CSS Exclusions] Parse wrap-shape property https://bugs.webkit.org/show_bug.cgi?id=61726 Parsing wrap-shape: rect, circle, ellipse and polygon. Moved WindRule from Path.h to it's own file. Test: fast/exclusions/parsing-wrap-shape.html * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseWrapShapeRect): (WebCore::CSSParser::parseWrapShapeCircle): (WebCore::CSSParser::parseWrapShapeEllipse): (WebCore::CSSParser::parseWrapShapePolygon): (WebCore::CSSParser::parseWrapShape): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::init): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getShapeValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * css/CSSWrapShapes.cpp: Added. (WebCore::CSSWrapShapeRect::cssText): (WebCore::CSSWrapShapeCircle::cssText): (WebCore::CSSWrapShapeEllipse::cssText): (WebCore::CSSWrapShapePolygon::cssText): * css/CSSWrapShapes.h: Added. (WebCore::CSSWrapShape::~CSSWrapShape): (WebCore::CSSWrapShape::CSSWrapShape): (WebCore::CSSWrapShapeRect::create): (WebCore::CSSWrapShapeRect::left): (WebCore::CSSWrapShapeRect::top): (WebCore::CSSWrapShapeRect::width): (WebCore::CSSWrapShapeRect::height): (WebCore::CSSWrapShapeRect::radiusX): (WebCore::CSSWrapShapeRect::radiusY): (WebCore::CSSWrapShapeRect::setLeft): (WebCore::CSSWrapShapeRect::setTop): (WebCore::CSSWrapShapeRect::setWidth): (WebCore::CSSWrapShapeRect::setHeight): (WebCore::CSSWrapShapeRect::setRadiusX): (WebCore::CSSWrapShapeRect::setRadiusY): (WebCore::CSSWrapShapeRect::type): (WebCore::CSSWrapShapeRect::CSSWrapShapeRect): (WebCore::CSSWrapShapeCircle::create): (WebCore::CSSWrapShapeCircle::left): (WebCore::CSSWrapShapeCircle::top): (WebCore::CSSWrapShapeCircle::radius): (WebCore::CSSWrapShapeCircle::setLeft): (WebCore::CSSWrapShapeCircle::setTop): (WebCore::CSSWrapShapeCircle::setRadius): (WebCore::CSSWrapShapeCircle::type): (WebCore::CSSWrapShapeCircle::CSSWrapShapeCircle): (WebCore::CSSWrapShapeEllipse::create): (WebCore::CSSWrapShapeEllipse::left): (WebCore::CSSWrapShapeEllipse::top): (WebCore::CSSWrapShapeEllipse::radiusX): (WebCore::CSSWrapShapeEllipse::radiusY): (WebCore::CSSWrapShapeEllipse::setLeft): (WebCore::CSSWrapShapeEllipse::setTop): (WebCore::CSSWrapShapeEllipse::setRadiusX): (WebCore::CSSWrapShapeEllipse::setRadiusY): (WebCore::CSSWrapShapeEllipse::type): (WebCore::CSSWrapShapeEllipse::CSSWrapShapeEllipse): (WebCore::CSSWrapShapePolygon::create): (WebCore::CSSWrapShapePolygon::appendPoint): (WebCore::CSSWrapShapePolygon::getXAt): (WebCore::CSSWrapShapePolygon::getYAt): (WebCore::CSSWrapShapePolygon::setWindRule): (WebCore::CSSWrapShapePolygon::windRule): (WebCore::CSSWrapShapePolygon::type): (WebCore::CSSWrapShapePolygon::CSSWrapShapePolygon): * css/SVGCSSValueKeywords.in: * platform/graphics/Path.h: * platform/graphics/WindRule.h: Added. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setWrapShape): (WebCore::InheritedFlags::wrapShape): (WebCore::InheritedFlags::initialWrapShape): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-07-12 Simon Fraser <simon.fraser@apple.com> Clean up some RenderLayerCompositor code relating to scroll and root layers https://bugs.webkit.org/show_bug.cgi?id=64400 Reviewed by James Robinson. There was no need for FrameView::syncCompositingStateForThisFrame() to call syncCompositingStateForThisLayerOnly() on the various scrollbar-related layers, because the subsequent call to compositor()->flushPendingLayerChanges() starts to flush at m_overflowControlsHostLayer if one exists, and it's an ancestor of the scrollbar layers. Also clean up terminology in RenderLayerCompositor. m_rootPlatformLayer -> m_rootContentLayer rootPlatformLayer() -> rootGraphicsLayer() No behavior change, so no new tests. * page/FrameView.cpp: (WebCore::FrameView::syncCompositingStateForThisFrame): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::enableCompositingMode): (WebCore::RenderLayerCompositor::flushPendingLayerChanges): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::layerTreeAsText): (WebCore::RenderLayerCompositor::parentFrameContentLayers): (WebCore::RenderLayerCompositor::rootGraphicsLayer): (WebCore::RenderLayerCompositor::didMoveOnscreen): (WebCore::RenderLayerCompositor::willMoveOffscreen): (WebCore::RenderLayerCompositor::updateRootLayerPosition): (WebCore::RenderLayerCompositor::ensureRootLayer): (WebCore::RenderLayerCompositor::destroyRootLayer): (WebCore::RenderLayerCompositor::attachRootLayer): (WebCore::RenderLayerCompositor::detachRootLayer): (WebCore::RenderLayerCompositor::updateRootLayerAttachment): * rendering/RenderLayerCompositor.h: 2011-07-12 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90842. http://trac.webkit.org/changeset/90842 https://bugs.webkit.org/show_bug.cgi?id=64401 Causes crash in debug on compositing/overflow/content-gains- scrollbars.html (Requested by jamesr on #webkit). * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::cleanupResources): (WebCore::ContentLayerChromium::setLayerRenderer): (WebCore::ContentLayerChromium::tilingTransform): (WebCore::ContentLayerChromium::contentBounds): (WebCore::ContentLayerChromium::updateLayerSize): (WebCore::ContentLayerChromium::draw): (WebCore::ContentLayerChromium::drawsContent): (WebCore::ContentLayerChromium::createTilerIfNeeded): (WebCore::ContentLayerChromium::updateCompositorResources): (WebCore::ContentLayerChromium::setTilingOption): (WebCore::ContentLayerChromium::bindContentsTexture): (WebCore::ContentLayerChromium::setIsMask): (WebCore::writeIndent): (WebCore::ContentLayerChromium::dumpLayerProperties): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::ImageLayerChromium): (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::updateCompositorResources): (WebCore::ImageLayerChromium::contentBounds): * platform/graphics/chromium/ImageLayerChromium.h: (WebCore::ImageLayerChromium::drawsContent): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::ccLayerImpl): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::draw): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRootLayer): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: Removed. * platform/graphics/chromium/TiledLayerChromium.h: Removed. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::drawsContent): (WebCore::CCLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed. * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed. 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> ApplicationCache update should not immediately fail when reaching per-origin quota https://bugs.webkit.org/show_bug.cgi?id=64177 Reviewed by Alexey Proskuryakov. New behavior of handling ApplicationCache per-origin quotas. Previously, if the quota was reached while downloading we would fail the download and then prompt the user for a storage increase. This required a refresh, a redownload of resources, and the total storage was not known so the process could be repeated multiple times before an acceptable quota was found or the user disallowed an increase. The new behavior is to complete the download of the entire appcache. When the cache completes downloading and it is greater than the origin quota, prompt the user to allow a quota increase with the known space needed. If the quota is increased, the cache will succeed, otherwise it will fail with the normal failure steps. An alternative behavior is prompting while downloading immediately when the origin quota is reached, however at that point the entire space needed is unknown and so quota increases might not be enough and could result in multiple prompts to the user. Tests: http/tests/appcache/origin-quota-continued-download-multiple-manifests.html http/tests/appcache/origin-quota-continued-download.html * loader/appcache/ApplicationCacheGroup.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): Rename instance variable to be more clear on its intent. (WebCore::ApplicationCacheGroup::didFinishLoading): Check the quota limit while downloading so we can fail early if the user already denied a quota increase. (WebCore::ApplicationCacheGroup::didReachOriginQuota): Pass the space needed information to the chrome client. (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota): Removed. Instead convert the callers to update state and console log when the per-origin quota is reached. This allows us to follow the normal failure steps if the quota is reached at the end of a download, and the alternative short path when we fail during downloading. (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota): Extract to a helper function. (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Allow for a quota increase at the end of the download now that we know the space needed. Then proceed to fail or succeed as we normally would. * loader/appcache/ApplicationCacheStorage.h: * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::checkOriginQuota): (WebCore::ApplicationCacheStorage::storeNewestCache): Extract checking the origin quota for when an ApplicationCacheGroup will be replacing an ApplicationCacheGroup into a helper function. The helper also provides an out parameter for the space needed to properly fit the new cache group if it wouldn't fit. * page/ChromeClient.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::reachedApplicationCacheOriginQuota): Add a space needed parameter when reaching the per-origin quota. 2011-07-12 Chris Rogers <crogers@google.com> AudioDevice::Stop can close NULL handle. https://bugs.webkit.org/show_bug.cgi?id=64157 Reviewed by Kenneth Russell. No new tests since audio API is not yet implemented. * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): (WebCore::AudioContext::uninitialize): * webaudio/AudioContext.h: 2011-07-12 John Bates <jbates@google.com> Move call to syncCompositingLayers so that we do not trigger redundant draws. https://bugs.webkit.org/show_bug.cgi?id=64224 doComposite was triggering two composites every time a canvas was dirtied. By moving syncCompositingLayers call to layout, the client code can draw without triggering a redundant frame. Also renamed WebViewImpl::updateLayers to syncCompositingLayers, because it was confusing. CCLayerTreeHostImplProxy::updateLayers was no longer needed, because animateAndLayout calls WebViewImpl::layout. Reviewed by James Robinson. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::syncCompositingLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit): 2011-07-12 Ryosuke Niwa <rniwa@webkit.org> Isolate HTMLTextFormControlElement into a separate file https://bugs.webkit.org/show_bug.cgi?id=64381 Reviewed by Dimitri Glazkov. Extracted HTMLTextFormControlElement.h and HTMLTextFormControlElement.cpp out of HTMLFormControlElement.h and HTMLFormControlElement.cpp. Also moved defaultEventHandler from HTMLFormControlElementWithState to HTMLTextFormControlElement because it was specific to HTMLTextFormControlElement, and replaced all references to HTMLFormControlElementWithState in HTMLInputElement and HTMLTextAreaElement by ones to HTMLTextFormControlElement. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/TextIterator.cpp: * editing/htmlediting.cpp: * html/HTMLElementsAllInOne.cpp: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::isFocusable): * html/HTMLFormControlElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isKeyboardFocusable): (WebCore::HTMLInputElement::isMouseFocusable): (WebCore::HTMLInputElement::updateFocusAppearance): (WebCore::HTMLInputElement::canStartSelection): (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::finishParsingChildren): (WebCore::HTMLInputElement::rendererIsNeeded): (WebCore::HTMLInputElement::attach): (WebCore::HTMLInputElement::detach): (WebCore::HTMLInputElement::copyNonAttributeProperties): (WebCore::HTMLInputElement::defaultEventHandler): (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): (WebCore::HTMLInputElement::addSubresourceAttributeURLs): (WebCore::HTMLInputElement::recalcWillValidate): * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::defaultEventHandler): * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.cpp: Copied from Source/WebCore/html/HTMLFormControlElement.cpp. (WebCore::HTMLTextFormControlElement::defaultEventHandler): * html/HTMLTextFormControlElement.h: Copied from Source/WebCore/html/HTMLFormControlElement.h. 2011-07-12 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90831. http://trac.webkit.org/changeset/90831 https://bugs.webkit.org/show_bug.cgi?id=64389 Likely caused fast/canvas/DrawImageSinglePixelStretch.html to start timing out on the chromium GPU bots (Requested by ojan on #webkit). * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::getImageData): (WebCore::putImageData): 2011-07-12 James Robinson <jamesr@chromium.org> Reviewed by Kenneth Russell. [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass https://bugs.webkit.org/show_bug.cgi?id=58833 Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle the drawing responsibilities for tiled layers. TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler, tiling transform and layer properties and draws the layer. Longer term it'd be better of the CCTiledLayerImpl owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the way tile eviction works. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore::ContentLayerChromium::textureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::ImageLayerChromium): (WebCore::ImageLayerChromium::cleanupResources): (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::textureUpdater): (WebCore::ImageLayerChromium::contentBounds): (WebCore::ImageLayerChromium::drawsContent): (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::ccLayerImpl): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::contentBounds): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRootLayer): (WebCore::visibleLayerRect): (WebCore::paintLayerContentsIfDirty): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: Added. (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::~TiledLayerChromium): (WebCore::TiledLayerChromium::createCCLayerImpl): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::setLayerRenderer): (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::setTilingOption): (WebCore::TiledLayerChromium::setIsMask): (WebCore::TiledLayerChromium::tilingTransform): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::writeIndent): (WebCore::TiledLayerChromium::dumpLayerProperties): * platform/graphics/chromium/TiledLayerChromium.h: Copied from Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setDrawsContent): (WebCore::CCLayerImpl::drawsContent): (WebCore::CCLayerImpl::contentBounds): (WebCore::CCLayerImpl::setContentBounds): (WebCore::CCLayerImpl::doubleSided): (WebCore::CCLayerImpl::setDoubleSided): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added. (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added. (WebCore::CCTiledLayerImpl::create): (WebCore::CCTiledLayerImpl::setTilingTransform): (WebCore::CCTiledLayerImpl::setTiler): 2011-07-12 Arno Renevier <arno@renevier.net> [GTK] DOM bindings do not have gir annotations https://bugs.webkit.org/show_bug.cgi?id=45395 Reviewed by Xan Lopez. * bindings/scripts/CodeGeneratorGObject.pm: generate introspection annotations. * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: update for new output. * bindings/scripts/test/GObject/WebKitDOMTestObj.h: ditto. * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: ditto. 2011-07-12 Chris Rogers <crogers@google.com> webkitAudioContext does not do proper sanity checking on its arguments. https://bugs.webkit.org/show_bug.cgi?id=64076 Reviewed by Kenneth Russell. No new tests since audio API is not yet implemented. * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): (WebCore::JSAudioContext::createBuffer): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): (WebCore::V8AudioContext::createBufferCallback): * platform/audio/HRTFDatabaseLoader.h: (WebCore::HRTFDatabaseLoader::databaseSampleRate): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): (WebCore::AudioContext::createOfflineContext): (WebCore::AudioContext::createBuffer): * webaudio/AudioContext.h: 2011-07-12 Pratik Solanki <psolanki@apple.com> Implement didReceiveDataArray callback for CFNetwork based loader https://bugs.webkit.org/show_bug.cgi?id=64130 Reviewed by David Kilzer. Factor out the didReceiveDataArray code from ResourceHandleMac.mm into a new method ResourceHandle::handleDataArray(). Implement the callback in the CFNetwork loader code and call handleDataArray() to process incoming data. No new tests because the flag is not enabled for any bots. * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::didReceiveDataArray): (WebCore::ResourceHandle::createCFURLConnection): (WebCore::ResourceHandle::handleDataArray): * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): 2011-07-12 Emil A Eklund <eae@chromium.org> Switch preferred width/height and columns to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64329 Reviewed by Eric Seidel. No new tests, no new functionality. * rendering/LayoutTypes.h: (WebCore::ceiledLayoutUnit): Add ceiledLayoutUnit to go with the floored version. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): (WebCore::RenderBlock::flipForWritingModeIncludingColumns): (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns): Rename rect version of flipForWritingModeIncludingColumns to adjustStartEdgeForWritingModeIncludingColumns as it adjust the start edge and does not flip the rect. (WebCore::RenderBlock::adjustForColumns): (WebCore::updatePreferredWidth): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::minPreferredLogicalWidth): (WebCore::RenderBox::maxPreferredLogicalWidth): (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::flipForWritingMode): (WebCore::RenderBox::flipForWritingModeIncludingColumns): * rendering/RenderBox.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::itemBoundingBoxRect): * rendering/RenderListBox.h: * rendering/RenderObject.h: (WebCore::RenderObject::minPreferredLogicalWidth): (WebCore::RenderObject::maxPreferredLogicalWidth): (WebCore::RenderObject::adjustForColumns): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/TableLayout.h: 2011-07-12 Levi Weintraub <leviw@chromium.org> Change roundedIntRect to roundedRect https://bugs.webkit.org/show_bug.cgi?id=64326 Reviewed by Eric Seidel. Renaming RoundedIntRect to RoundedRect and moving the underlying type to Layout units from integer-based versions. No new tests, no new functionality * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::addRoundedRectClip): (WebCore::GraphicsContext::clipOutRoundedRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::fillRectWithRoundedHole): * platform/graphics/GraphicsContext.h: * platform/graphics/Path.cpp: (WebCore::Path::addRoundedRect): * platform/graphics/Path.h: * platform/graphics/RoundedIntRect.cpp: Removed. * platform/graphics/RoundedIntRect.h: Removed. * platform/graphics/RoundedRect.cpp: Copied from Source/WebCore/platform/graphics/RoundedIntRect.cpp. (WebCore::RoundedRect::Radii::isZero): (WebCore::RoundedRect::Radii::scale): (WebCore::RoundedRect::Radii::expand): (WebCore::RoundedRect::inflateWithRadii): (WebCore::RoundedRect::Radii::includeLogicalEdges): (WebCore::RoundedRect::Radii::excludeLogicalEdges): (WebCore::RoundedRect::RoundedRect): (WebCore::RoundedRect::includeLogicalEdges): (WebCore::RoundedRect::excludeLogicalEdges): (WebCore::RoundedRect::isRenderable): * platform/graphics/RoundedRect.h: Copied from Source/WebCore/platform/graphics/RoundedIntRect.h. (WebCore::RoundedRect::Radii::Radii): (WebCore::RoundedRect::Radii::setTopLeft): (WebCore::RoundedRect::Radii::setTopRight): (WebCore::RoundedRect::Radii::setBottomLeft): (WebCore::RoundedRect::Radii::setBottomRight): (WebCore::RoundedRect::Radii::topLeft): (WebCore::RoundedRect::Radii::topRight): (WebCore::RoundedRect::Radii::bottomLeft): (WebCore::RoundedRect::Radii::bottomRight): (WebCore::RoundedRect::Radii::expand): (WebCore::RoundedRect::Radii::shrink): (WebCore::RoundedRect::rect): (WebCore::RoundedRect::setRect): (WebCore::RoundedRect::move): (WebCore::RoundedRect::inflate): (WebCore::RoundedRect::expandRadii): (WebCore::RoundedRect::shrinkRadii): (WebCore::operator==): * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::setLastShadowValues): (WebCore::ScratchBuffer::setLastInsetShadowValues): (WebCore::ScratchBuffer::matchesLastShadow): (WebCore::ScratchBuffer::matchesLastInsetShadow): (WebCore::computeSliceSizesFromRadii): (WebCore::ShadowBlur::templateSize): (WebCore::ShadowBlur::drawRectShadow): (WebCore::ShadowBlur::drawInsetShadow): (WebCore::ShadowBlur::drawRectShadowWithoutTiling): (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawLayerPieces): * platform/graphics/ShadowBlur.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::fillRectWithRoundedHole): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::paintOneBorderSide): (WebCore::RenderBoxModelObject::paintBorderSides): (WebCore::RenderBoxModelObject::paintTranslucentBorderSides): (WebCore::RenderBoxModelObject::paintBorder): (WebCore::RenderBoxModelObject::drawBoxSideFromPath): (WebCore::RenderBoxModelObject::clipBorderSidePolygon): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderBoxModelObject.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMenuListButtonGradients): (WebCore::RenderThemeMac::paintSliderTrack): * rendering/style/RenderStyle.cpp: (WebCore::calcRadiiFor): (WebCore::calcConstraintScaleFor): (WebCore::RenderStyle::getRoundedBorderFor): (WebCore::RenderStyle::getRoundedInnerBorderFor): * rendering/style/RenderStyle.h: 2011-07-12 Mike Reed <reed@google.com> [skia] optimize getImageData to avoid a copy when not needed. lockPixels() now does the right thing. https://bugs.webkit.org/show_bug.cgi?id=64302 Reviewed by Stephen White. No new tests. Just an optimization for getImageData(), existing <canvas> tests apply * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::getImageData): (WebCore::putImageData): 2011-07-12 Pavel Feldman <pfeldman@google.com> Web Inspector: introduce UserMetrics for collecting stats in Chromium port. https://bugs.webkit.org/show_bug.cgi?id=64350 Reviewed by Yury Semikhatsky. Test: inspector/user-metrics.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::recordActionTaken): (WebCore::JSInspectorFrontendHost::recordPanelShown): (WebCore::JSInspectorFrontendHost::recordSettingChanged): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::histogramEnumeration): (WebCore::V8InspectorFrontendHost::recordActionTakenCallback): (WebCore::V8InspectorFrontendHost::recordPanelShownCallback): (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback): * inspector/InspectorFrontendHost.idl: * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel.prototype.initiateAudit): * inspector/front-end/ConsoleView.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpoint): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting): (.WebInspector.InspectorFrontendHostStub.prototype.recordActionTaken): (.WebInspector.InspectorFrontendHostStub.prototype.recordPanelShown): (.WebInspector.InspectorFrontendHostStub.prototype.recordSettingChanged): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked): * inspector/front-end/UserMetrics.js: Added. (WebInspector.UserMetrics.settingChanged): (WebInspector.UserMetrics): (WebInspector.UserMetrics.prototype.panelShown): (WebInspector.UserMetrics._Recorder): (WebInspector.UserMetrics._Recorder.prototype.record): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._toggleAttach): 2011-07-12 Pratik Solanki <psolanki@apple.com> Reviewed by David Kilzer. Add NSURLResponse wrapper in ResourceResponse when USE(CFNETWORK) is enabled https://bugs.webkit.org/show_bug.cgi?id=63286 When USE(CFNETWORK) is enabled on Mac, keep an NSURLResponse object along with the CFURLResponseRef so that WebKit can continue using the NSURLResponse. No new tests because no change in functionality and option is not enabled on Mac. * platform/network/cf/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::initNSURLResponse): (WebCore::ResourceResponse::nsURLResponse): (WebCore::ResourceResponse::ResourceResponse): 2011-07-12 Pavel Podivilov <podivilov@chromium.org> Web Inspector: Cancelling an empty edit fails. https://bugs.webkit.org/show_bug.cgi?id=64351 Reviewed by Pavel Feldman. * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing): 2011-07-12 Pavel Podivilov <podivilov@chromium.org> Web Inspector: make TextViewerDelegate methods implementations public in SourceFrame. https://bugs.webkit.org/show_bug.cgi?id=64353 Reviewed by Pavel Feldman. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.beforeTextChanged): (WebInspector.SourceFrame.prototype.afterTextChanged): (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.SourceFrame.prototype.suggestedFileName): (WebInspector.SourceFrame.prototype.doubleClick): (WebInspector.SourceFrame.prototype.cancelEditing): (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick): (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing): (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing): (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName): 2011-07-12 Andrey Kosyakov <caseq@chromium.org> Web Inspector: remove more dead code from the Network panel https://bugs.webkit.org/show_bug.cgi?id=64291 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._toggleGridMode): (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode): * inspector/front-end/networkPanel.css: 2011-07-12 Adam Roben <aroben@apple.com> Unreviewed, rolling out r90811. http://trac.webkit.org/changeset/90811 https://bugs.webkit.org/show_bug.cgi?id=61025 Several svg tests failing assertions beneath SVGSMILElement::findInstanceTime * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::findInstanceTime): 2011-07-12 Oliver Varga <Varga.Oliver@stud.u-szeged.hu> Reviewed by Nikolas Zimmermann. Speed up SVGSMILElement::findInstanceTime. https://bugs.webkit.org/show_bug.cgi?id=61025 Replace the linear search to binary search on ordered list because the previous searches from the beginning was not efficient. Out of index error fixed by Renata Hodovan. No new tests this is only a performance tweak. * svg/animation/SVGSMILElement.cpp: (WebCore::extractTimeFromVector): (WebCore::SVGSMILElement::findInstanceTime): 2011-07-11 Zeng Huiqing <huiqing.zeng@intel.com> Optimize HTMLInputElement::updateCheckedRadioButtons https://bugs.webkit.org/show_bug.cgi?id=62840 Reviewed by Kent Tamura. No new tests. * dom/Document.h: (WebCore::Document::getFormElements): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateCheckedRadioButtons): (WebCore::HTMLInputElement::setChecked): 2011-07-11 Pratik Solanki <psolanki@apple.com> Reviewed by David Kilzer. Add NSURLRequest wrapper in ResourceRequest when USE(CFNETWORK) is enabled https://bugs.webkit.org/show_bug.cgi?id=63276 When USE(CFNETWORK) is enabled on Mac, keep an NSURLRequest object along with the CFURLRequestRef so that WebKit can continue using the NSURLRequest. No new tests because no change in functionality and option is not enabled on Mac. * platform/network/cf/ResourceRequest.h: (WebCore::ResourceRequest::updateNSURLRequest): (WebCore::ResourceRequest::ResourceRequest): * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction): (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction): (WebCore::ResourceRequest::doUpdatePlatformRequest): (WebCore::ResourceRequest::applyWebArchiveHackForMail): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::nsURLRequest): (WebCore::ResourceRequest::ResourceRequest): (WebCore::ResourceRequest::updateNSURLRequest): 2011-07-11 Ryosuke Niwa <rniwa@webkit.org> positionForPoint is broken when a block is positioned relatively inside the parent https://bugs.webkit.org/show_bug.cgi?id=64298 Reviewed by Simon Fraser. The bug was caused by positionForPointRespectingEditingBoundaries's not taking relativePositionOffset into account when computing the point in child coordinates. Fixed the bug by adding the offset to childLocation as needed. Test: fast/block/positioning/hittest-on-relative-positioned-children.html * rendering/RenderBlock.cpp: (WebCore::positionForPointRespectingEditingBoundaries): Fixed the bug; also replaced all instances of IntPoint by LayoutPoint. 2011-07-11 Dan Bernstein <mitz@apple.com> Excessive expansion of justified text when rounding hacks are enabled https://bugs.webkit.org/show_bug.cgi?id=64331 Reviewed by Anders Carlsson. Test: platform/mac/fast/text/rounding-hacks-expansion.html When rounding hacks are enabled, the expansion at each expansion opportunity should be by an integer. Restored more of the logic that was removed in r78846 in order to ensure this. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): 2011-07-11 Jer Noble <jer.noble@apple.com> HTML5 video controller in fullscreen is partly off-screen (at least on youtube) using ClickToFlash https://bugs.webkit.org/show_bug.cgi?id=64327 Reviewed by Darin Adler. No new tests; no change in functionality, so covered by existing tests. Make the rules from fullscreenQuickTime.css !important so they are not overridden by page authors. * css/fullscreenQuickTime.css: (video:-webkit-full-screen::-webkit-media-controls-panel): 2011-07-11 Levi Weintraub <leviw@chromium.org> Switch lineTop and lineBottom to new layout types https://bugs.webkit.org/show_bug.cgi?id=64317 Reviewed by Eric Seidel. Changing lineTop and lineBottom to LayoutUnits and preparing all uses of them for the upcoming conversion. No new tests, no new functionality. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/EllipsisBox.h: * rendering/GapRects.h: (WebCore::GapRects::left): (WebCore::GapRects::center): (WebCore::GapRects::right): (WebCore::GapRects::uniteLeft): (WebCore::GapRects::uniteCenter): (WebCore::GapRects::uniteRight): (WebCore::GapRects::operator LayoutRect): * rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::flipLinesInBlockDirection): (WebCore::InlineFlowBox::computeOverflow): (WebCore::InlineFlowBox::setLayoutOverflow): (WebCore::InlineFlowBox::setVisualOverflow): (WebCore::InlineFlowBox::setOverflowFromLogicalRects): (WebCore::InlineFlowBox::nodeAtPoint): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::layoutOverflowRect): (WebCore::InlineFlowBox::visualOverflowRect): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::anyLineIntersectsRect): * rendering/RenderLineBoxList.h: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): * rendering/RenderTextControlSingleLine.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::lineTop): (WebCore::RootInlineBox::lineBottom): (WebCore::RootInlineBox::setLineTopBottomPositions): (WebCore::RootInlineBox::logicalTopVisualOverflow): (WebCore::RootInlineBox::logicalBottomVisualOverflow): (WebCore::RootInlineBox::logicalTopLayoutOverflow): (WebCore::RootInlineBox::logicalBottomLayoutOverflow): * rendering/svg/SVGInlineFlowBox.h: * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint): * rendering/svg/SVGInlineTextBox.h: * rendering/svg/SVGRootInlineBox.h: 2011-07-11 Martin Robinson <mrobinson@igalia.com> Reviewed by Daniel Bates. [GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering https://bugs.webkit.org/show_bug.cgi?id=62752 Instead of offsetting the cursor blit by the hotspot, just pass the hotspot arguments to the GdkCursor constructor. No new tests. This is covered by manual-tests/cursor.html. * platform/gtk/CursorGtk.cpp: (WebCore::createNamedCursor): 2011-07-11 Yi Shen <yi.4.shen@nokia.com> [Qt] Unreviewed rollout 90779 which may fail the layout-test. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals): * platform/network/qt/QNetworkReplyHandler.h: 2011-07-11 Bradley Nelson <bradnelson@chromium.org> Reviewed by Darin Fisher. Split webcore_dom off webcore_remaining to reduce its size for whole program optimization builds. https://bugs.webkit.org/show_bug.cgi?id=64299 * WebCore.gyp/WebCore.gyp: 2011-07-11 Yi Shen <yi.4.shen@nokia.com> [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash https://bugs.webkit.org/show_bug.cgi?id=62808 Reviewed by Benjamin Poulain. The assertion in ResourceHandle::setDefersLoading assumes asynchronous content delivery -- To resume a page, first, its main resource loader calls setDefersLoading to resume loading the main content; then all the sub-resource loaders calls setDefersLoading to resume sub-contents. However, since QNetworkReplyHandler delivers content synchronously, some new sub-resource loaders get created as soon as the main resource loader resumed, and all these new sub-resource loaders set their defersLoading flag to false. Then, the assertion fails for these new sub-resource loaders when calling setDefersLoading on them. As a fix, this path makes QNetworkReplyHandler deliver content asynchronously. Test: loader/load-defer-resume-crash.html * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals): * platform/network/qt/QNetworkReplyHandler.h: 2011-07-08 Ryosuke Niwa <rniwa@webkit.org> Move innerTextElement() from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64134 Reviewed by Kent Tamura. Moved innerTextElement from RenderTextControl to HTMLTextFormControlElement. It is implemented by HTMLInputElement and HTMLTextAreaElement instead of RenderTextControlSingleLine and RenderTextControlMultiLine. This refactoring removes the indirection through RenderTextControl and makes the ownership of shadow DOM for input and textarea elements clear. Accessing the shadow DOM of input and textarea elements are now less error prone because it no longer depends on the lifetime of the render tree. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Access innerTextElement via HTMLTextFormControlElement. * dom/Node.cpp: (WebCore::traverseTreeAndMark): No longer calls innerTextElement because this was a work-around needed before making input and textarea elements use the new shadow DOM model. * editing/TextIterator.cpp: (WebCore::TextIterator::handleReplacedElement): Access innerTextElement via HTMLTextFormControlElement. * html/HTMLFormControlElement.cpp: (WebCore::hasVisibleTextArea): Takes innerTextElement. (WebCore::HTMLTextFormControlElement::setSelectionRange): Calls innerTextElement(). (WebCore::HTMLTextFormControlElement::selection): Ditto. (WebCore::HTMLTextFormControlElement::selectionStart): Ditto; no longer uses a temporary local variable for innerTextElement because innerTextElement() no longer depends on the lifetime of the render tree. (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto. * html/HTMLFormControlElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::innerTextElement): Added. * html/HTMLTextAreaElement.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textFormControlElement): Made this function a const member. (WebCore::RenderTextControl::innerTextElement): Added. * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: * rendering/RenderTextControlSingleLine.h: 2011-07-11 Tony Chang <tony@chromium.org> rename RenderObject::isFlexibleBox to isDeprecatedFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=64217 Reviewed by Ojan Vafai. This is to make way for the new flexbox needing a similar method. RenderObject also has isFlexingChildren() and isStretchingChildren(), but we may be able to use those for the new flexbox as well so I didn't rename them. No new tests, just refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::expandsToEncloseOverhangingFloats): (WebCore::shouldCheckLines): * rendering/RenderBox.cpp: (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): (WebCore::RenderBox::computeLogicalHeight): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): * rendering/RenderDeprecatedFlexibleBox.h: (WebCore::RenderDeprecatedFlexibleBox::isDeprecatedFlexibleBox): * rendering/RenderObject.h: (WebCore::RenderObject::isDeprecatedFlexibleBox): 2011-07-11 Nate Chapin <japhet@chromium.org> [Chromium] Ensure we don't crash when an HTMLSelectElement mouse release event removes the element from the DOM. https://bugs.webkit.org/show_bug.cgi?id=64295 Reviewed by Dimitri Glazkov. Manual test only because the crash requires a real popup menu, which DRT doesn't provide. * manual-tests/chromium/popup-menu-crash.html: Added. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::handleMouseReleaseEvent): 2011-07-11 Mike Reed <reed@google.com> [skia] remove platform helpers for gradients and patterns https://bugs.webkit.org/show_bug.cgi?id=64281 Reviewed by Stephen White. No new tests. fixes canvas/philip/tests/2d.gradient.object.update.html Remove (now empty) platform helpers for fill/stroke gradients/patterns. We now pickup the platformGradient and platformPattern fresh when they're needed, so we can see any edits that have occurred to them 2d.gradient.object.update.html sets the fillgradient, and then edits the gradient object. This CL allows us to see that edit. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setStrokePattern): (WebCore::GraphicsContext::setFillPattern): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillGradient): * platform/graphics/GraphicsContext.h: * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::platformInit): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::State::State): (WebCore::PlatformContextSkia::State::~State): (WebCore::PlatformContextSkia::PlatformContextSkia): (WebCore::PlatformContextSkia::drawRect): (WebCore::PlatformContextSkia::setupShader): (WebCore::PlatformContextSkia::setupPaintForFilling): (WebCore::PlatformContextSkia::setupPaintForStroking): (WebCore::PlatformContextSkia::setFillColor): (WebCore::PlatformContextSkia::setStrokeColor): (WebCore::PlatformContextSkia::canAccelerate): * platform/graphics/skia/PlatformContextSkia.h: (WebCore::PlatformContextSkia::setGraphicsContext): 2011-07-11 Young Han Lee <joybro@company100.net> Reviewed by Simon Fraser. Transition LayoutTest using pause API shows wrong result if it tries to pause a transition after its delay time. https://bugs.webkit.org/show_bug.cgi?id=63859 The existing code to set the m_startTime haven't worked because the animation is not the right state to accept the start event. This patch just sets the values directly instead of using event. Test: transitions/delay.html * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::freezeAtTime): 2011-07-11 Ryosuke Niwa <rniwa@webkit.org> Move selection related code from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64133 Reviewed by Dimitri Glazkov. Moved selectionStart, selectionEnd, hasVisibleTextArea, setSelectionRange, setContainerAndOffsetForRange and selection from RenderTextControl.cpp to HTMLFormControlElement.cpp. This refactoring removes RenderTextControl's dependency on FrameSelection. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::selectedText): Calls HTMLTextFromControl::selectedText. (WebCore::AccessibilityRenderObject::selectedTextRange): Calls selectionStart and selectionEnd. (WebCore::AccessibilityRenderObject::setSelectedTextRange): Ditto. * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::selectedText): Extracted from AccessibilityRenderObject::selectedText. (WebCore::hasVisibleTextArea): Added. (WebCore::HTMLTextFormControlElement::setSelectionRange): Merged with the function of the same name in RenderTextControl. (WebCore::HTMLTextFormControlElement::selectionStart): Calls computeSelectionStart instead of RenderTextControl::selectionStart. (WebCore::HTMLTextFormControlElement::computeSelectionStart): Moved from RenderTextControl::selectionStart. (WebCore::HTMLTextFormControlElement::selectionEnd): Calls computeSelectionEnd instead of RenderText::selectionEnd. (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Moved from RenderTextControl::selectionStart. (WebCore::setContainerAndOffsetForRange): Moved from RenderTextControl.cpp. (WebCore::HTMLTextFormControlElement::selection): Merged with the function of the same name in RenderTextControl. (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Calls computeSelectionStart and computeSelectionEnd instead of RenderTextControl::selectionStart and RenderTextControl::selectionEnd. (WebCore::HTMLTextFormControlElement::selectionChanged): Calls selectionStart and selectionEnd. * html/HTMLFormControlElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Calls setSelectionRange. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textFormControlElement): Added. * rendering/RenderTextControl.h: 2011-07-11 Andreas Kling <kling@webkit.org> Reviewed by Oliver Hunt. Canvas: Use fast, approximate dirty rects for stroke() https://bugs.webkit.org/show_bug.cgi?id=59764 No new tests, this is an optimization. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): Instead of using Path::strokeBoundingRect() to calculate the exact bounding rect for a path stroke, get the Path::boundingRect() and inflate it by miterLimit + lineWidth to get a slightly oversized dirty rect in a fraction of the time. 2011-07-11 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. Web Inspector: [refactoring] Remove dependencies of components requiring network resource list from network panel https://bugs.webkit.org/show_bug.cgi?id=62477 * inspector/front-end/AuditsPanel.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._inspectedURLChanged): (WebInspector.ExtensionServer.prototype._onGetHAR): (WebInspector.ExtensionServer.prototype.initExtensions): * inspector/front-end/HAREntry.js: (WebInspector.HARLog): (WebInspector.HARLog.prototype.build): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkLog): (WebInspector.NetworkLog.prototype.get resources): (WebInspector.NetworkLog.prototype._onInspectedURLChanged): (WebInspector.NetworkLog.prototype._onResourceStarted): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._reset): (WebInspector.NetworkPanel.prototype._copyAll): (WebInspector.NetworkPanel.prototype._exportAll): * inspector/front-end/inspector.js: (WebInspector.reset): 2011-07-11 Pavel Podivilov <podivilov@chromium.org> Web Inspector: make SourceFrame a View. https://bugs.webkit.org/show_bug.cgi?id=64274 Reviewed by Pavel Feldman. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.createSearchRegex): (WebInspector.SourceFrame.prototype.show): (WebInspector.SourceFrame.prototype.hide): (WebInspector.SourceFrame.prototype._beforeTextChanged): (WebInspector.SourceFrame.prototype._afterTextChanged): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu): (WebInspector.SourceFrame.prototype._suggestedFileName): (WebInspector.SourceFrame.prototype._doubleClick): (WebInspector.SourceFrame.prototype._cancelEditing): (WebInspector.TextViewerDelegateForSourceFrame): (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick): (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing): (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing): (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName): * inspector/front-end/TextViewer.js: (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu): 2011-07-11 Noel Gordon <noel.gordon@gmail.com> Reviewed by Adam Roben. Forward focus events to windowless plugins on the windows port. https://bugs.webkit.org/show_bug.cgi?id=62375 * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::setFocus): Forward focus events if the plugin is windowless. 2011-07-11 Shinya Kawanaka <shinyak@google.com> Added accessibility notification when value is changed. https://bugs.webkit.org/show_bug.cgi?id=64256 Notifies the value change of range input when accessibility is enabled. Reviewed by Kent Tamura. Covered by existing tests. * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): Added accessibility notification when value is changed. 2011-07-08 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: Fix resizing of sidebar pane in Timeline and Profile panels. https://bugs.webkit.org/show_bug.cgi?id=64161 Reviewed by Pavel Feldman. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.updateMainViewWidth): * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth): 2011-07-11 Pavel Feldman <pfeldman@google.com> Web Inspector: [REGRESSION r89753-89754] highlight does not respect scroller location. https://bugs.webkit.org/show_bug.cgi?id=63982 Rolling out 89760, 89756, 89754, 89753 for breaking inspector highlight. Reviewed by Yury Semikhatsky. * WebCore.exp.in: * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawNodeHighlight): * page/FrameView.cpp: * page/FrameView.h: * platform/ScrollView.h: * platform/Widget.cpp: * platform/Widget.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): (WebCore::RenderObject::localToContainerQuad): * rendering/RenderObject.h: (WebCore::RenderObject::localToAbsoluteQuad): * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): * rendering/RenderView.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): * rendering/svg/RenderSVGText.h: * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): * rendering/svg/SVGRenderSupport.h: 2011-07-11 Mustafizur Rahaman <mustaf.here@gmail.com> Reviewed by James Robinson. Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.destination-atop.html https://bugs.webkit.org/show_bug.cgi?id=48292 and Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.destination-atop.html https://bugs.webkit.org/show_bug.cgi?id=48302 * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyElsewhere): Added CompositeDestinationAtop to draw transparency elsewhere for destination-atop 2011-07-08 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Get rid of flickering "Please wait" message in Heap profiler. https://bugs.webkit.org/show_bug.cgi?id=61175 The message has been replaced with spinner icons appearing instead of profile's icon. As each profile owns a worker, they run independently, and there can be multiple spinners at the same time. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted): (WebInspector.HeapSnapshotGridNode.prototype._populate): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext): (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled): (WebInspector.DetailedHeapshotView.profileCallback): (WebInspector.DetailedHeapshotView): (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded): (WebInspector.DetailedHeapshotView.prototype._changeBase): (WebInspector.DetailedHeapshotView.prototype.processLoadedSnapshot): (WebInspector.DetailedHeapshotView.prototype._changeView): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): (WebInspector.HeapSnapshotWorker.prototype.dispose): (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls): (WebInspector.HeapSnapshotWorker.prototype._checkLongRunningCalls): (WebInspector.HeapSnapshotProxyObject.prototype.callMethod): (WebInspector.HeapSnapshotProxyObject.prototype.get worker): * inspector/front-end/Images/spinnerActive.gif: Added. Generated using ajaxload.info. * inspector/front-end/Images/spinnerActiveSelected.gif: Added. Generated using ajaxload.info. * inspector/front-end/Images/spinnerInactive.gif: Added. Generated using ajaxload.info. * inspector/front-end/Images/spinnerInactiveSelected.gif: Added. Generated using ajaxload.info. * inspector/front-end/PleaseWaitMessage.js: Removed. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._addProfileHeader): (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot.setProfileWait): (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot): (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.parsed): (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): * inspector/front-end/SidebarTreeElement.js: (WebInspector.SidebarTreeElement.prototype.set wait): * inspector/front-end/WebKit.qrc: * inspector/front-end/heapProfiler.css: (.heap-snapshot-sidebar-tree-item.wait .icon): (.heap-snapshot-sidebar-tree-item.wait.selected .icon): (body.inactive .heap-snapshot-sidebar-tree-item.wait .icon): (body.inactive .heap-snapshot-sidebar-tree-item.wait.selected .icon): * inspector/front-end/inspector.html: 2011-07-10 Patrick Gansterer <paroga@webkit.org> Generate conditional include statements in CodeGeneratorJS https://bugs.webkit.org/show_bug.cgi?id=64231 Reviewed by Brent Fulgham. Suround headers with a correspondig #if ENABLE() line. This allows us to generate bindings only of required IDL files. Changing the current preprocessor statements to the Conditional attribute in a next step helps in getting rid of calls to the preprocessor, which causes so much pain on a natvie Windows environment. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): (WriteData): 2011-07-10 Patrick Gansterer <paroga@webkit.org> Remove array size from generated JSC binding tables https://bugs.webkit.org/show_bug.cgi?id=64229 Reviewed by Brent Fulgham. Because many items in the array are surrounded with #if(ENABLE_XXX) lines, the array size isn't fix and correct in all cases. So let the compiler calculate the correct size itself. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHashTable): * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 2011-07-10 Kenichi Ishibashi <bashi@chromium.org> Let plugins participate in form submission https://bugs.webkit.org/show_bug.cgi?id=13061 Implements HTMLObjectElement::appendFormData() so that object elements respond as form associated elements. Reviewed by Anders Carlsson. Test: plugins/form-value.html * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::appendFormData): Implemented. * plugins/PluginViewBase.h: (WebCore::PluginViewBase::getFormValue): Added. 2011-07-10 Anders Carlsson <andersca@apple.com> WebKit2 is leaking NSCursors created by leakNamedCursor https://bugs.webkit.org/show_bug.cgi?id=64241 <rdar://problem/9507151> Reviewed by Oliver Hunt. * platform/mac/CursorMac.mm: (WebCore::createNamedCursor): Rename this from leakNamedCursor to createNamedCursor and make it return a RetainPtr<NSCursor> instead of a raw pointer. (WebCore::Cursor::ensurePlatformCursor): Don't leak cursors here. We still won't deallocate cursors during shutdown (which leakNamedCursor was said to prevent) because the cursor singletons are all allocated from the heap and are never destroyed anyway. 2011-07-10 Yuta Kitamura <yutak@chromium.org> WebSocket: Add useHixie76Protocol flag to WebSocketChannel and WebSocketHandshake https://bugs.webkit.org/show_bug.cgi?id=64244 Reviewed by Kent Tamura. Get the value of Settings::useHixie76WebSocketProtocol() and save it in WebSocketChannel and WebSocketHandshake instances. Obtained flag value is not used for now. No behavior change, thus no new tests. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): WebSocketChannel is always created in context of Document (see ThreadableWebSocketChannel::create()). Because m_useHixie76Protocol must be passed to WebSocketHandshake constructor, WebSocketHandshake instance is allocated dynamically and stored in OwnPtr. (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::disconnect): (WebCore::WebSocketChannel::didOpen): (WebCore::WebSocketChannel::didFail): (WebCore::WebSocketChannel::processBuffer): * websockets/WebSocketChannel.h: * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::WebSocketHandshake): * websockets/WebSocketHandshake.h: 2011-07-10 Tom Hudson <tomhudson@google.com> Reviewed by James Robinson. GraphicsContextSkia::drawConvexPolygon doesn't pay attention to shouldAntialias https://bugs.webkit.org/show_bug.cgi?id=61369 * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawConvexPolygon): Pass the shouldAntialias parameter on to Skia. 2011-07-10 Yuzo Fujishima <yuzo@google.com> Fix for Bug 63968 - Add comment to explain Vector usage in FontCache::purgeInactiveFontData https://bugs.webkit.org/show_bug.cgi?id=63968 Reviewed by Dan Bernstein. No new tests because this changes comments only. * platform/graphics/FontCache.cpp: (WebCore::FontCache::purgeInactiveFontData): Add explanation why SimpleFontData is not deleted in the iteration loop. 2011-07-10 Emil A Eklund <eae@chromium.org> Switch updateHitTestResult to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64209 Reviewed by Eric Seidel. No new tests, no functionality changes. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::updateHitTestResult): * rendering/RenderBlock.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::updateHitTestResult): * rendering/RenderInline.h: * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::hitTest): * rendering/RenderObject.cpp: (WebCore::RenderObject::updateHitTestResult): * rendering/RenderObject.h: * rendering/RenderView.cpp: (WebCore::RenderView::updateHitTestResult): * rendering/RenderView.h: * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::nodeAtFloatPoint): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::nodeAtFloatPoint): * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::nodeAtFloatPoint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): 2011-07-10 Patrick Gansterer <paroga@webkit.org> Reviewed by Adam Barth. Fix member variable order of ContextMenuItem https://bugs.webkit.org/show_bug.cgi?id=59905 Use the same order at decleration and assignment to silence compiler warning. * platform/ContextMenuItem.h: 2011-07-10 Dan Bernstein <mitz@apple.com> <rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages https://bugs.webkit.org/show_bug.cgi?id=64236 Reviewed by Maciej Stachowiak. Test: fast/css/empty-display-none.html When an :empty selector caused an element to not have a renderer, the check for empty style change when finishing parsing the elemenet did nothing, because it could not check if the element’s current style was affected by :empty. The fix is to record the fact that the style was affected by :empty in ElementRareData in the no-renderer case. * dom/Element.cpp: (WebCore::Element::recalcStyle): Clear the m_styleAffectedByEmpty flag. (WebCore::checkForEmptyStyleChange): If the style is null (meaning there is no renderer), check Element::styleAffectedByEmpty(). (WebCore::Element::setStyleAffectedByEmpty): Added. Sets the flag in rare data. (WebCore::Element::styleAffectedByEmpty): Added. Checks for the flag in rare data. * dom/Element.h: * dom/ElementRareData.h: (WebCore::ElementRareData::ElementRareData): Added m_styleAffectedByEmpty and initialized it to false. * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): If an element doesn’t need a renderer and its style is affected by :empty, record this fact in the element by calling setStyleAffectedByEmpty(). 2011-07-10 Mark Rowe <mrowe@apple.com> Fix the build. * svg/properties/SVGAttributeToPropertyMap.h: Forward-declare SVGPropertyInfo as a struct since that's what it is. 2011-07-09 Patrick Gansterer <paroga@webkit.org> Unreviewed WinCE build fix for r90680. Repeat the change done in r90681 for all other SVGAnimated*PropertyTearOff.h files. * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Make create public and remove friendship with SVGAnimatedProperty. * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto. * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto. * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto. 2011-07-09 Nikolas Zimmermann <nzimmermann@rim.com> Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute https://bugs.webkit.org/show_bug.cgi?id=63797 Fix WinCE build. Funny none other platform complained. * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Make create public, SVGAnimatedProperty needs it - remove friendship with it. 2011-07-09 Nikolas Zimmermann <nzimmermann@rim.com> Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute https://bugs.webkit.org/show_bug.cgi?id=63797 Reviewed by Dirk Schulze. In order to prepare animVal support we need a way to map a given SVG DOM attribute to a SVGAnimatedProperty. eg. SVGNames::xAttr -> SVGRectElement::xAnimated(), etc. This will be needed to update the animVal of the SVGAnimatedProperty, if an animation is running. It would required adding a new method to all SVG* classes that define animated properties. Unfortunately we already have lots of repeated code in methods like synchronizeProperty / fillAttributeToPropertyTypeMap. Look at SVGRectElement for example: void SVGRectElement::synchronizeProperty(const QualifiedName& attrName) { if (attrName == anyQName()) { synchronizeX(); synchronizeY(); ... } if (attrName == SVGNames::xAttr) { synchronizeX(); return; } if (attrName == SVGNames::yAttr) { synchronizeY(); return; } ... } or void SVGRectElement::fillAttributeToPropertyTypeMap() { AttributeToPropertyTypeMap& attributeToPropertyTypeMap = this->attributeToPropertyTypeMap(); SVGStyledTransformableElement::fillPassedAttributeToPropertyTypeMap(attributeToPropertyTypeMap); attributeToPropertyTypeMap.set(SVGNames::xAttr, AnimatedLength); attributeToPropertyTypeMap.set(SVGNames::yAttr, AnimatedLength); ... } These lookups are all performed dynamically. Each synchronizeProperty() call does a lot of comparisons. fillAttributeToPropertyTypeMap() isn't that bad as the result is cached in a static HashMap per-SVGRectElement. There's no reason to do these things dynamically! Inspired by JSC, I'm adding a "static const SVGPropertyInfo s_fooPropertyInfo" object for each animated SVG property. For example, for SVGRectElements SVGAnimatedLength x property we're storing: - "AnimatedPropertyType type" (AnimatedLength -- note the enum was named AnimatedAttributeType, I renamed it to AnimatedPropertyType for clarity) - "const QualifiedName& attributeName" (SVGNames::xAttr) - "const AtomicString& propertyIdentifier" (SVGNames::xAttr.localName() -- only different if N-wrappers map to a single XML DOM attribute, eg. orientAttr) - "SynchronizeProperty synchronizeProperty" (callback to SVGRectElement::synchronizeX) - "LookupOrCreateWrapperForAnimatedProperty lookupOrCreateWrapperForAnimatedProperty" (callback to SVGRectElement::xAnimated) Using this information, we can replace all the various synchronizeProperty/fillAttributeToPropertyMap implementations, with a single one in SVGElement. All these are auto-generated, using the standard macros used to define/declare SVG animated properties. This required several changes to the macros. Here's a summary: #1) In all headers, wrap DECLARE_ANIMATED_* calls, in BEGIN_DECLARE_ANIMATED_PROPERTIES(ClassName) / END_DECLARE_ANIMATED_PROPERTIES blocks. Sample change for SVGRectElement: - DECLARE_ANIMATED_LENGTH(X, x) - DECLARE_ANIMATED_LENGTH(Y, y) - ... + BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGRectElement) + DECLARE_ANIMATED_LENGTH(X, x) + DECLARE_ANIMATED_LENGTH(Y, y) + ... + END_DECLARE_ANIMATED_PROPERTIES #2) In all cpp files, add a new section wrapped in BEGIN_REGISTER_ANIMATED_PROPERTIES(ClassName / END_REGISTER_ANIMATED_PROPERTIES blocks: Sample change for SVGRectElement: +BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGRectElement) + REGISTER_LOCAL_ANIMATED_PROPERTY(x) + REGISTER_LOCAL_ANIMATED_PROPERTY(y) + ... + REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledTransformableElement) + REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) +END_REGISTER_ANIMATED_PROPERTIES This is the main piece of the logic that replaces the manual synchronizeProperty/fillAttributeToPropertyMap implementation. It expands to following: SVGAttributeToPropertyMap& SVGRectElement::attributeToPropertyMap() { DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, s_attributeToPropertyMap, ()); } static void registerAnimatedPropertiesForSVGRectElement() { SVGAttributeToPropertyMap& map = SVGRectElement::attributeToPropertyMap(); if (!map.isEmpty()) return; map.addProperty(SVGRectElement::xPropertyInfo()); map.addProperty(SVGRectElement::yPropertyInfo()); ... map.addProperties(SVGStyledTransformableElement::attributeToPropertyMap()); map.addProperties(SVGTests::attributeToPropertyMap()); } A single-instance of SVGAttributeToPropertyMap is created for each SVG*Element. The constructor of SVGRectElement is supposed to call registerAnimatedPropertiesForSVGRectElement(), which collects all properties of SVGRectElement and all its parent classes and stores them in a Vector<const SVGPropertyInfo*>. This Vector is stored in a HashMap<QualifiedName, Vector<const SVGPropertyInfo*> > where the key is the attribute name (eg. SVGNames::xAttr -> SVGRectElement::xPropertyInfo). This is only done _once_ per SVGRectElement. SVGElement contains a "virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap()" method, and SVGRectElement overrides it and returns SVGRectElement::attributeToPropertyMap() (which is static!) -- this is hidden again in the macros, no need to write any code. SVGAttributeToPropertyMap provides following API: - bool synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName) - void synchronizeProperties(SVGElement* contextElement) A generic way to synchronize a SVGAnimatedProperty with its XML DOM attribute. Any SVG DOM change to eg. <rect>s x property will now trigger contextElement->localAttributeToPropertyMap().synchronizeProperty(this, SVGNames::xAttr) The SVGAttributeToPropertyMap will ask its HashMap for the Vector containing the properties for SVGNames::xAttr (in that case, just one xAnimated()). - void animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>& propertyTypes) This method replaces the fillAttributeToPropertyMap implementations everywhere. - void animatedPropertiesForAttribute(SVGElement* contextElement, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty> >& properties); This method is not used yet, but allows us to collect all SVGAnimatedProperties for a QualifiedName -- the initial goal for this patch. #3) In all cpp files, add a call to "registerAnimatedPropertiesForClassName()" in the constructor. Forgetting this will result in a compile error. Doesn't affect any tests. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorJS.pm: (NativeToJSValue): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): * svg/SVGAElement.cpp: (WebCore::SVGAElement::SVGAElement): * svg/SVGAElement.h: (WebCore::SVGAElement::synchronizeRequiredFeatures): (WebCore::SVGAElement::synchronizeRequiredExtensions): (WebCore::SVGAElement::synchronizeSystemLanguage): * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::SVGAltGlyphElement): * svg/SVGAltGlyphElement.h: * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::SVGAnimateElement::hasValidAttributeType): (WebCore::SVGAnimateElement::determineAnimatedPropertyType): (WebCore::SVGAnimateElement::determinePropertyValueTypes): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): (WebCore::SVGAnimateElement::ensureAnimator): * svg/SVGAnimateElement.h: * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::hasValidAttributeType): (WebCore::SVGAnimateTransformElement::determineAnimatedPropertyType): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimateTransformElement.h: * svg/SVGAnimatedAngle.h: * svg/SVGAnimatedBoolean.h: * svg/SVGAnimatedEnumeration.h: * svg/SVGAnimatedInteger.h: * svg/SVGAnimatedLength.h: * svg/SVGAnimatedLengthList.h: * svg/SVGAnimatedNumber.h: * svg/SVGAnimatedNumberList.h: * svg/SVGAnimatedPreserveAspectRatio.h: * svg/SVGAnimatedRect.h: * svg/SVGAnimatedString.h: * svg/SVGAnimatedTransformList.h: * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::SVGAnimatedType): * svg/SVGAnimatedType.h: (WebCore::SVGAnimatedType::type): * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::SVGAnimationElement): (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::synchronizeRequiredFeatures): (WebCore::SVGAnimationElement::synchronizeRequiredExtensions): (WebCore::SVGAnimationElement::synchronizeSystemLanguage): * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::SVGCircleElement): * svg/SVGCircleElement.h: (WebCore::SVGCircleElement::synchronizeRequiredFeatures): (WebCore::SVGCircleElement::synchronizeRequiredExtensions): (WebCore::SVGCircleElement::synchronizeSystemLanguage): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::SVGClipPathElement): * svg/SVGClipPathElement.h: (WebCore::SVGClipPathElement::synchronizeRequiredFeatures): (WebCore::SVGClipPathElement::synchronizeRequiredExtensions): (WebCore::SVGClipPathElement::synchronizeSystemLanguage): * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): * svg/SVGComponentTransferFunctionElement.h: * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::SVGCursorElement): * svg/SVGCursorElement.h: (WebCore::SVGCursorElement::synchronizeRequiredFeatures): (WebCore::SVGCursorElement::synchronizeRequiredExtensions): (WebCore::SVGCursorElement::synchronizeSystemLanguage): * svg/SVGDefsElement.cpp: (WebCore::SVGDefsElement::SVGDefsElement): * svg/SVGDefsElement.h: (WebCore::SVGDefsElement::synchronizeRequiredFeatures): (WebCore::SVGDefsElement::synchronizeRequiredExtensions): (WebCore::SVGDefsElement::synchronizeSystemLanguage): * svg/SVGElement.cpp: (WebCore::SVGElement::animatedPropertyTypeForAttribute): (WebCore::SVGElement::updateAnimatedSVGAttribute): (WebCore::SVGElement::localAttributeToPropertyMap): (WebCore::SVGElement::synchronizeRequiredFeatures): (WebCore::SVGElement::synchronizeRequiredExtensions): (WebCore::SVGElement::synchronizeSystemLanguage): * svg/SVGElement.h: (WebCore::SVGElement::svgAttributeChanged): (WebCore::SVGElement::synchronizeRequiredFeatures): (WebCore::SVGElement::synchronizeRequiredExtensions): (WebCore::SVGElement::synchronizeSystemLanguage): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::SVGEllipseElement): * svg/SVGEllipseElement.h: (WebCore::SVGEllipseElement::synchronizeRequiredFeatures): (WebCore::SVGEllipseElement::synchronizeRequiredExtensions): (WebCore::SVGEllipseElement::synchronizeSystemLanguage): * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::SVGFEBlendElement): * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement): * svg/SVGFEColorMatrixElement.h: * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement): * svg/SVGFEComponentTransferElement.h: * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::SVGFECompositeElement): * svg/SVGFECompositeElement.h: * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement): * svg/SVGFEConvolveMatrixElement.h: * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement): * svg/SVGFEDiffuseLightingElement.h: * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement): * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement): * svg/SVGFEDropShadowElement.h: * svg/SVGFEFloodElement.cpp: * svg/SVGFEFloodElement.h: * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement): * svg/SVGFEGaussianBlurElement.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::SVGFEImageElement): * svg/SVGFEImageElement.h: * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::SVGFELightElement): * svg/SVGFELightElement.h: * svg/SVGFEMergeElement.cpp: * svg/SVGFEMergeElement.h: * svg/SVGFEMergeNodeElement.cpp: (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement): * svg/SVGFEMergeNodeElement.h: * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement): * svg/SVGFEMorphologyElement.h: * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::SVGFEOffsetElement): * svg/SVGFEOffsetElement.h: * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement): * svg/SVGFESpecularLightingElement.h: * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::SVGFETileElement): * svg/SVGFETileElement.h: * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement): * svg/SVGFETurbulenceElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::SVGFilterElement): * svg/SVGFilterElement.h: * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes): * svg/SVGFilterPrimitiveStandardAttributes.h: * svg/SVGFitToViewBox.cpp: * svg/SVGFitToViewBox.h: * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::SVGFontElement): * svg/SVGFontElement.h: (WebCore::SVGFontElement::rendererIsNeeded): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::SVGForeignObjectElement): * svg/SVGForeignObjectElement.h: (WebCore::SVGForeignObjectElement::synchronizeRequiredFeatures): (WebCore::SVGForeignObjectElement::synchronizeRequiredExtensions): (WebCore::SVGForeignObjectElement::synchronizeSystemLanguage): * svg/SVGGElement.cpp: (WebCore::SVGGElement::SVGGElement): * svg/SVGGElement.h: (WebCore::SVGGElement::synchronizeRequiredFeatures): (WebCore::SVGGElement::synchronizeRequiredExtensions): (WebCore::SVGGElement::synchronizeSystemLanguage): * svg/SVGGlyphElement.cpp: * svg/SVGGlyphElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::svgAttributeChanged): * svg/SVGGradientElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::SVGImageElement): * svg/SVGImageElement.h: (WebCore::SVGImageElement::synchronizeRequiredFeatures): (WebCore::SVGImageElement::synchronizeRequiredExtensions): (WebCore::SVGImageElement::synchronizeSystemLanguage): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::SVGLineElement): * svg/SVGLineElement.h: (WebCore::SVGLineElement::synchronizeRequiredFeatures): (WebCore::SVGLineElement::synchronizeRequiredExtensions): (WebCore::SVGLineElement::synchronizeSystemLanguage): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::SVGLinearGradientElement): * svg/SVGLinearGradientElement.h: * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::SVGMPathElement): * svg/SVGMPathElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::orientTypePropertyInfo): (WebCore::SVGMarkerElement::SVGMarkerElement): (WebCore::SVGMarkerElement::setOrientToAuto): (WebCore::SVGMarkerElement::setOrientToAngle): (WebCore::SVGMarkerElement::synchronizeOrientType): (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper): (WebCore::SVGMarkerElement::orientTypeAnimated): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::SVGMaskElement): * svg/SVGMaskElement.h: (WebCore::SVGMaskElement::synchronizeRequiredFeatures): (WebCore::SVGMaskElement::synchronizeRequiredExtensions): (WebCore::SVGMaskElement::synchronizeSystemLanguage): * svg/SVGMissingGlyphElement.cpp: * svg/SVGMissingGlyphElement.h: * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::dPropertyInfo): (WebCore::SVGPathElement::SVGPathElement): (WebCore::SVGPathElement::svgAttributeChanged): (WebCore::SVGPathElement::lookupOrCreateDWrapper): (WebCore::SVGPathElement::synchronizeD): (WebCore::SVGPathElement::pathSegList): (WebCore::SVGPathElement::animatedPathSegList): * svg/SVGPathElement.h: (WebCore::SVGPathElement::pathByteStream): (WebCore::SVGPathElement::synchronizeRequiredFeatures): (WebCore::SVGPathElement::synchronizeRequiredExtensions): (WebCore::SVGPathElement::synchronizeSystemLanguage): * svg/SVGPathSegWithContext.h: (WebCore::SVGPathSegWithContext::animatedProperty): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): * svg/SVGPatternElement.h: (WebCore::SVGPatternElement::synchronizeRequiredFeatures): (WebCore::SVGPatternElement::synchronizeRequiredExtensions): (WebCore::SVGPatternElement::synchronizeSystemLanguage): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::pointsPropertyInfo): (WebCore::SVGPolyElement::SVGPolyElement): (WebCore::SVGPolyElement::parseMappedAttribute): (WebCore::SVGPolyElement::synchronizePoints): (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): (WebCore::SVGPolyElement::points): (WebCore::SVGPolyElement::animatedPoints): * svg/SVGPolyElement.h: (WebCore::SVGPolyElement::synchronizeRequiredFeatures): (WebCore::SVGPolyElement::synchronizeRequiredExtensions): (WebCore::SVGPolyElement::synchronizeSystemLanguage): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::SVGRadialGradientElement): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::SVGRectElement): * svg/SVGRectElement.h: (WebCore::SVGRectElement::synchronizeRequiredFeatures): (WebCore::SVGRectElement::synchronizeRequiredExtensions): (WebCore::SVGRectElement::synchronizeSystemLanguage): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): * svg/SVGSVGElement.h: (WebCore::SVGSVGElement::synchronizeRequiredFeatures): (WebCore::SVGSVGElement::synchronizeRequiredExtensions): (WebCore::SVGSVGElement::synchronizeSystemLanguage): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::SVGScriptElement): * svg/SVGScriptElement.h: * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::SVGStopElement): * svg/SVGStopElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::SVGStyledElement): (WebCore::cssPropertyToTypeMap): (WebCore::SVGStyledElement::animatedPropertyTypeForAttribute): * svg/SVGStyledElement.h: * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): * svg/SVGStyledTransformableElement.h: * svg/SVGSwitchElement.cpp: (WebCore::SVGSwitchElement::SVGSwitchElement): * svg/SVGSwitchElement.h: (WebCore::SVGSwitchElement::synchronizeRequiredFeatures): (WebCore::SVGSwitchElement::synchronizeRequiredExtensions): (WebCore::SVGSwitchElement::synchronizeSystemLanguage): * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::SVGSymbolElement): * svg/SVGSymbolElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): * svg/SVGTRefElement.h: * svg/SVGTSpanElement.cpp: * svg/SVGTSpanElement.h: * svg/SVGTests.cpp: (WebCore::SVGTests::requiredFeaturesPropertyInfo): (WebCore::SVGTests::requiredExtensionsPropertyInfo): (WebCore::SVGTests::systemLanguagePropertyInfo): (WebCore::SVGTests::attributeToPropertyMap): (WebCore::SVGTests::synchronizeRequiredFeatures): (WebCore::SVGTests::synchronizeRequiredExtensions): (WebCore::SVGTests::synchronizeSystemLanguage): * svg/SVGTests.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::textLengthPropertyInfo): (WebCore::SVGTextContentElement::SVGTextContentElement): (WebCore::SVGTextContentElement::synchronizeTextLength): (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper): (WebCore::SVGTextContentElement::textLengthAnimated): * svg/SVGTextContentElement.h: (WebCore::SVGTextContentElement::synchronizeRequiredFeatures): (WebCore::SVGTextContentElement::synchronizeRequiredExtensions): (WebCore::SVGTextContentElement::synchronizeSystemLanguage): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::SVGTextElement): * svg/SVGTextElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::SVGTextPathElement): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::SVGTextPositioningElement): * svg/SVGTextPositioningElement.h: * svg/SVGTitleElement.cpp: * svg/SVGTitleElement.h: (WebCore::SVGTitleElement::rendererIsNeeded): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): * svg/SVGUseElement.h: (WebCore::SVGUseElement::synchronizeRequiredFeatures): (WebCore::SVGUseElement::synchronizeRequiredExtensions): (WebCore::SVGUseElement::synchronizeSystemLanguage): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::SVGViewElement): * svg/SVGViewElement.h: * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::SVGViewSpec): * svg/SVGViewSpec.h: * svg/properties/SVGAnimatedProperty.h: (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper): (WebCore::SVGAnimatedProperty::lookupWrapper): * svg/properties/SVGAnimatedPropertyMacros.h: * svg/properties/SVGAnimatedPropertySynchronizer.h: * svg/properties/SVGAttributeToPropertyMap.cpp: Added. (WebCore::SVGAttributeToPropertyMap::addProperties): (WebCore::SVGAttributeToPropertyMap::addProperty): (WebCore::SVGAttributeToPropertyMap::animatedPropertiesForAttribute): (WebCore::SVGAttributeToPropertyMap::animatedPropertyTypeForAttribute): (WebCore::SVGAttributeToPropertyMap::synchronizeProperties): (WebCore::SVGAttributeToPropertyMap::synchronizeProperty): (WebCore::SVGAttributeToPropertyMap::animatedProperty): * svg/properties/SVGAttributeToPropertyMap.h: Added. (WebCore::SVGAttributeToPropertyMap::SVGAttributeToPropertyMap): (WebCore::SVGAttributeToPropertyMap::~SVGAttributeToPropertyMap): (WebCore::SVGAttributeToPropertyMap::isEmpty): * svg/properties/SVGPropertyInfo.h: Added. (WebCore::SVGPropertyInfo::SVGPropertyInfo): 2011-07-09 Patrick Gansterer <paroga@webkit.org> Unreviewed build fix after r90676. * platform/graphics/ImageBuffer.cpp: 2011-07-08 Dirk Schulze <krit@webkit.org> Refactoring luminance code in RenderSVGResourceMasker https://bugs.webkit.org/show_bug.cgi?id=64146 Reviewed by Simon Fraser. Moved luminance calculcation code to ImageBuffer. The code is doing pixel manipulations and can now get replaced by platform specific algorithms in the ImmageBuffer*.cpp files. No change of functionality. No new tests. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::transformColorSpace): (WebCore::ImageBuffer::genericConvertToLuminanceMask): (WebCore::ImageBuffer::convertToLuminanceMask): * platform/graphics/ImageBuffer.h: * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): 2011-07-08 Simon Fraser <simon.fraser@apple.com> Clean up RenderWidget::destroy() to share more code https://bugs.webkit.org/show_bug.cgi?id=64138 Reviewed by James Robinson. RenderWidget::destroy() copied code from various other destroy() methods, which made code maintenance in this area very risky. Fix by adding a virtual willBeDestroyed() method, which replaces most instances of destroy(). Now, only RenderWidget and RenderObject implement destroy(), and each just calls willBeDestroyed(). Code duplication is averted. No behavior change, so no tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::willBeDestroyed): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::willBeDestroyed): * rendering/RenderBoxModelObject.h: * rendering/RenderFullScreen.cpp: (RenderFullScreenPlaceholder::willBeDestroyed): (RenderFullScreen::willBeDestroyed): * rendering/RenderFullScreen.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::willBeDestroyed): * rendering/RenderInline.h: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::willBeDestroyed): * rendering/RenderListItem.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): (WebCore::RenderObject::destroy): * rendering/RenderObject.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::willBeDestroyed): * rendering/RenderReplaced.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::willBeDestroyed): * rendering/RenderTableCell.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::willBeDestroyed): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::willBeDestroyed): * rendering/RenderTableSection.h: * rendering/RenderText.cpp: (WebCore::RenderText::willBeDestroyed): * rendering/RenderText.h: * rendering/RenderTextFragment.cpp: (WebCore::RenderTextFragment::willBeDestroyed): * rendering/RenderTextFragment.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::willBeDestroyed): (WebCore::RenderWidget::destroy): * rendering/RenderWidget.h: * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::willBeDestroyed): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::willBeDestroyed): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::willBeDestroyed): * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::willBeDestroyed): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::willBeDestroyed): * rendering/svg/RenderSVGResourceContainer.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::willBeDestroyed): * rendering/svg/RenderSVGRoot.h: * rendering/svg/SVGResourcesCache.h: 2011-07-08 Adam Barth <abarth@webkit.org> Unreviewed, rolling out r90662. http://trac.webkit.org/changeset/90662 https://bugs.webkit.org/show_bug.cgi?id=64210 Introduced regressions in Chromium browser tests (Requested by rniwa on #webkit). * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::selectedText): (WebCore::AccessibilityRenderObject::selectedTextRange): (WebCore::AccessibilityRenderObject::setSelectedTextRange): * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setSelectionRange): (WebCore::HTMLTextFormControlElement::selectionStart): (WebCore::HTMLTextFormControlElement::selectionEnd): (WebCore::HTMLTextFormControlElement::selection): (WebCore::HTMLTextFormControlElement::restoreCachedSelection): (WebCore::HTMLTextFormControlElement::selectionChanged): * html/HTMLFormControlElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::selectionStart): (WebCore::RenderTextControl::selectionEnd): (WebCore::RenderTextControl::hasVisibleTextArea): (WebCore::setSelectionRange): (WebCore::setContainerAndOffsetForRange): (WebCore::RenderTextControl::selection): * rendering/RenderTextControl.h: 2011-07-08 Brian Salomon <bsalomon@google.com> Make GL context current before updating layer texture using skia-gpu https://bugs.webkit.org/show_bug.cgi?id=64206 Reviewed by James Robinson. Covered by existing tests (when accelerated drawing and compositing are on). * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): 2011-07-08 Tony Chang <tony@chromium.org> Refactor override size to be a size rather than just an int https://bugs.webkit.org/show_bug.cgi?id=64195 Reviewed by David Hyatt. Also convert to LayoutSize and LayoutUnit. Covered by existing tests. * rendering/RenderBox.cpp: (WebCore::RenderBox::overrideSize): Pass in a LayoutSize. (WebCore::RenderBox::setOverrideSize): (WebCore::RenderBox::clearOverrideSize): New method for clearing the override size (previous we would pass in -1) (WebCore::RenderBox::overrideWidth): (WebCore::RenderBox::overrideHeight): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::availableLogicalHeightUsing): * rendering/RenderBox.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::gatherFlexChildrenInfo): (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::setOverrideSizeFromRowHeight): * rendering/RenderTableCell.h: Remove setOverrideSize since it was only called in one place to clear the override size. Inline this logic instead. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): 2011-07-08 Emil A Eklund <eae@chromium.org> Switch pointInContainer and accumulatedOffset to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64112 Reviewed by Eric Seidel. Convert remaining IntPoint versions of the pointInContainer and accumulatedOffset arguments to the new layout abstraction. No new tests, no functionality changes. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::addNodeToRectBasedTestResult): * rendering/HitTestResult.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInOverflowControl): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::popContentsClip): * rendering/RenderBox.h: * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): * rendering/RenderEmbeddedObject.h: * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::hitTest): * rendering/RenderLineBoxList.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::isPointInOverflowControl): * rendering/RenderListBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::hitTest): * rendering/RenderObject.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::hitInnerTextElement): * rendering/RenderTextControl.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::nodeAtPoint): 2011-07-07 Ryosuke Niwa <rniwa@webkit.org> Move selection related code from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64133 Reviewed by Dimitri Glazkov. Moved selectionStart, selectionEnd, hasVisibleTextArea, setSelectionRange, setContainerAndOffsetForRange and selection from RenderTextControl.cpp to HTMLFormControlElement.cpp. This refactoring removes RenderTextControl's dependency on FrameSelection. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::selectedText): Calls HTMLTextFromControl::selectedText. (WebCore::AccessibilityRenderObject::selectedTextRange): Calls selectionStart and selectionEnd. (WebCore::AccessibilityRenderObject::setSelectedTextRange): Ditto. * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::selectedText): Extracted from AccessibilityRenderObject::selectedText. (WebCore::hasVisibleTextArea): (WebCore::HTMLTextFormControlElement::setSelectionRange): Merged with the function of the same name in RenderTextControl. (WebCore::HTMLTextFormControlElement::selectionStart): Ditto. (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto. (WebCore::setContainerAndOffsetForRange): Moved from RenderTextControl.cpp (WebCore::HTMLTextFormControlElement::selection): Merged with the function of the same name in RenderTextControl. (WebCore::HTMLTextFormControlElement::selectionChanged): Calls selectionStart and selectionEnd. * html/HTMLFormControlElement.h: (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Moved from HTMLFormControlElement.cpp now that all functions are self-contained in HTMLTextFormControlElement. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Calls setSelectionRange. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textFormControlElement): Added. * rendering/RenderTextControl.h: 2011-07-08 Mike Reed <reed@google.com> remove (empty) indirection between GraphicsContextPlatformPrivate and PlatformContextSkia https://bugs.webkit.org/show_bug.cgi?id=64178 Reviewed by Stephen White. No new tests. no functionality change, other than removing an indirection that is not needed * platform/graphics/GraphicsContext.h: * platform/graphics/skia/GraphicsContextPlatformPrivate.h: Removed. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::platformInit): (WebCore::GraphicsContext::platformDestroy): (WebCore::GraphicsContext::platformContext): 2011-07-08 Jeffrey Pfau <jpfau@apple.com> Add framework for a new/dummy XMLDocumentParser https://bugs.webkit.org/show_bug.cgi?id=63955 Reviewed by Adam Barth. Added a dummy framework NewXMLDocumentParser * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::createParser): * xml/parser/NewXMLDocumentParser.cpp: Added. (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::textPosition): (WebCore::NewXMLDocumentParser::lineNumber): (WebCore::NewXMLDocumentParser::insert): (WebCore::NewXMLDocumentParser::append): (WebCore::NewXMLDocumentParser::finish): (WebCore::NewXMLDocumentParser::detach): (WebCore::NewXMLDocumentParser::hasInsertionPoint): (WebCore::NewXMLDocumentParser::finishWasCalled): (WebCore::NewXMLDocumentParser::processingData): (WebCore::NewXMLDocumentParser::prepareToStopParsing): (WebCore::NewXMLDocumentParser::stopParsing): (WebCore::NewXMLDocumentParser::isWaitingForScripts): (WebCore::NewXMLDocumentParser::isExecutingScript): (WebCore::NewXMLDocumentParser::executeScriptsWaitingForStylesheets): * xml/parser/NewXMLDocumentParser.h: Added. (WebCore::NewXMLDocumentParser::create): 2011-07-08 David Reveman <reveman@chromium.org> Remove unused function parameters. Reviewed by Ryosuke Niwa. * platform/graphics/gpu/TilingData.cpp: (WebCore::TilingData::textureOffset): 2011-07-08 David Reveman <reveman@chromium.org> Reviewed by Stephen White. [Chromium] Edge anti-aliasing for composited layers. https://bugs.webkit.org/show_bug.cgi?id=61388 Add transparent outer border to tiled layers and adjust vertex coordinates so that use of a bilinear filter creates a smooth layer edge. Tests: platform/chromium/compositing/tiny-layer-rotated.html platform/chromium/compositing/huge-layer-rotated.html (existing) TilingDataTest in webkit_unit_tests * platform/graphics/chromium/ContentLayerChromium.cpp: Change maxUntiledSize to 510 to ensure that tiles are not greater than 512 with outer borders. (WebCore::ContentLayerChromium::updateLayerSize): We can't use the layer size as tile size when we want to avoid tiling as this will not be enough space to include possible outer borders. We instead use an empty size, which allows the tiler to automatically adjust the tile size to be large enough for the layer to fit in one tile. (WebCore::ContentLayerChromium::createTilerIfNeeded): (WebCore::ContentLayerChromium::setIsMask): Don't use border texels for layer used as mask. * platform/graphics/chromium/ContentLayerChromium.h: (WebCore::ContentLayerChromium::m_borderTexels) Added. * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::tileTexRect): Added. (WebCore::LayerTilerChromium::tileLayerRect): m_tileSize is no longer the correct layer size. Size of bounds with border should be the correct layer size. (WebCore::LayerTilerChromium::growLayerToContain): Adjust texture size to include outer borders and handle empty m_tileSize. (WebCore::LayerTilerChromium::invalidateRect): Use size of rectangle returned by tileTexRect instead of m_tileSize for texture size. (WebCore::LayerTilerChromium::prepareToUpdate): Ditto. (WebCore::LayerTilerChromium::draw): Compute and intersect tile edges instead of using tile coordinates directly. Edges are adjusted to include outer borders and make sure all partially covered pixels are processed. (WebCore::LayerTilerChromium::drawTexturedQuad): Pass quad to shader using point uniform. (WebCore::LayerTilerChromium::invalidateRect): Invalidate old layer area to clear any contents left from previous layer size. * platform/graphics/chromium/LayerTilerChromium.h: (WebCore::LayerTilerChromium::tileTexRect) Added. (WebCore::LayerTilerChromium::drawTexturedQuad): Add quad parameter. * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTexTransform::getShaderString) Get X/Y vertex components from point uniform. (WebCore::VertexShaderPosTexTransform::VertexShaderPosTexTransform) Added point uniform. (WebCore::VertexShaderPosTexTransform::init) Ditto. (WebCore::VertexShaderPosTexTransform::pointLocation) Added. * platform/graphics/chromium/ShaderChromium.h: (WebCore::VertexShaderPosTexTransform::pointLocation) Added. * platform/graphics/gpu/TilingData.cpp: (WebCore::TilingData::tileBoundsWithOuterBorder): Added. (WebCore::TilingData::computeNumTiles): Adjust for outer border. (WebCore::TilingData::tileXIndexFromSrcCoord): Ditto. (WebCore::TilingData::tileYIndexFromSrcCoord): Ditto. (WebCore::TilingData::tileSizeX): Ditto. (WebCore::TilingData::tileSizeY): Ditto. (WebCore::TilingData::intersectDrawQuad): Ditto. (WebCore::TilingData::textureOffset): Ditto. * platform/graphics/gpu/TilingData.h: (WebCore::TilingData::tileBoundsWithOuterBorder): Added. 2011-07-08 Mike Reed <reed@google.com> [skia] don't rely on lockPixels failure to detect gpu-backed device (in prep for skia roll) https://bugs.webkit.org/show_bug.cgi?id=64162 Reviewed by Stephen White. No new tests. preparing for skia roll, where lockPixels always succeeds (but slowly for gpu-backed) * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::putImageData): 2011-07-08 Chang Shu <cshu@webkit.org> Update calling sites after function renamed. https://bugs.webkit.org/show_bug.cgi?id=59114 Reviewed by Alexey Proskuryakov. No new tests, just refactoring. * editing/visible_units.cpp: (WebCore::previousBoundary): (WebCore::nextBoundary): * rendering/RenderText.cpp: (WebCore::RenderText::setTextInternal): 2011-07-08 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Parse content: -webkit-from-flow https://bugs.webkit.org/show_bug.cgi?id=63133 Reviewed by David Hyatt. Test: fast/regions/content-webkit-from-flow-parsing.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::contentToCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseFromFlowContent): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getStringValue): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionThread): (WebCore::InheritedFlags::setRegionThread): (WebCore::InheritedFlags::initialRegionThread): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-07-08 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: NetworkPanel search failed if the matched sting is in the query part of url https://bugs.webkit.org/show_bug.cgi?id=64167 Reviewed by Yury Semikhatsky. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._matchResource): (WebInspector.NetworkPanel.prototype._highlightNthMatchedResource): (WebInspector.NetworkDataGridNode.prototype._refreshNameCell): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get folder): 2011-07-08 Benjamin Poulain <benjamin@webkit.org> [Qt] Enable HTTP Pipelining by default https://bugs.webkit.org/show_bug.cgi?id=64169 Reviewed by Andreas Kling. QNetworkAccessManager disables HTTP pipelining by default. We enable it by setting an attribute on the request. * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): 2011-07-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: CSS inspector gets confused about specificity of !important properties https://bugs.webkit.org/show_bug.cgi?id=64074 Reviewed by Yury Semikhatsky. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._markUsedProperties): 2011-07-08 Alexander Pavlov <apavlov@chromium.org> [Chromium] Unreviewed, clang build fix. * inspector/InspectorStyleTextEditor.h: 2011-07-08 Pavel Feldman <pfeldman@google.com> Web Inspector: add support for drag'n'drop of non-elements (comments, text, etc.) https://bugs.webkit.org/show_bug.cgi?id=64163 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::moveTo): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype._isValidDragSourceOrTarget): 2011-07-08 Andrey Kosyakov <caseq@chromium.org> Web Inspector: secure access to extensions API https://bugs.webkit.org/show_bug.cgi?id=64080 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.Panels.prototype.create): (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype._onSetSidebarPage): (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler): (WebInspector.ExtensionServer.prototype._expandResourcePath): (WebInspector.ExtensionServer.prototype._normalizePath): 2011-07-08 Adam Barth <abarth@webkit.org> Unreviewed, rolling out r90615. http://trac.webkit.org/changeset/90615 https://bugs.webkit.org/show_bug.cgi?id=64158 broke inspector/extensions/extensions.html (Requested by caseq on #webkit). * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.Panels.prototype.create): (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage): (WebInspector.injectedExtensionAPI.expandURL): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype._onSetSidebarPage): (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler): 2011-07-07 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Adding CSS properties results in messy style rules https://bugs.webkit.org/show_bug.cgi?id=63622 Reviewed by Pavel Feldman. Test: inspector/styles/styles-formatting.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSPropertySourceData.cpp: (WebCore::SourceRange::length): * css/CSSPropertySourceData.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::InspectorStyle): (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::toggleProperty): (WebCore::InspectorStyle::applyStyleText): (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): * inspector/InspectorStyleSheet.h: * inspector/InspectorStyleTextEditor.cpp: Added. (WebCore::InspectorStyleTextEditor::InspectorStyleTextEditor): (WebCore::InspectorStyleTextEditor::insertProperty): (WebCore::InspectorStyleTextEditor::replaceProperty): (WebCore::InspectorStyleTextEditor::removeProperty): (WebCore::InspectorStyleTextEditor::enableProperty): (WebCore::InspectorStyleTextEditor::disableProperty): (WebCore::InspectorStyleTextEditor::disabledIndexByOrdinal): (WebCore::InspectorStyleTextEditor::shiftDisabledProperties): (WebCore::InspectorStyleTextEditor::internalReplaceProperty): * inspector/InspectorStyleTextEditor.h: Added. (WebCore::InspectorStyleTextEditor::styleText): 2011-07-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Quotes are rendered as " in the DOM tree https://bugs.webkit.org/show_bug.cgi?id=64154 Reviewed by Yury Semikhatsky. Since we currently rely on setting textContent rather than innerHTML for the DOM tree elements, escapeHTML() calls unnecessarily HTML-escape certain characters in the DOM tree contents. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM): (): 2011-07-08 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Remove unused code from InspectorAgent.h. https://bugs.webkit.org/show_bug.cgi?id=64120 Reviewed by Joseph Pecoraro. * inspector/InspectorAgent.h: 2011-07-08 Andrey Kosyakov <caseq@chromium.org> Web Inspector: secure access to extensions API https://bugs.webkit.org/show_bug.cgi?id=64080 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.Panels.prototype.create): (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype._onSetSidebarPage): (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler): (WebInspector.ExtensionServer.prototype._expandResourcePath): (WebInspector.ExtensionServer.prototype._normalizePath): 2011-07-08 Yury Semikhatsky <yurys@chromium.org> Web Inspector: typing undefined = 1 in console crashes browser https://bugs.webkit.org/show_bug.cgi?id=64155 Do not access undefined value directly when producing JSON objects as undefined may be overriden by the inspected page. Reviewed by Pavel Feldman. Test: inspector/console/console-eval-undefined-override.html * inspector/InjectedScriptSource.js: (.): (): 2011-07-07 Emil A Eklund <eae@chromium.org> Switch HitTestResult to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64131 Reviewed by Eric Seidel. No new tests, no functionality changes. * page/MouseEventWithHitTestResults.cpp: (WebCore::MouseEventWithHitTestResults::localPoint): * page/MouseEventWithHitTestResults.h: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::addNodeToRectBasedTestResult): (WebCore::HitTestResult::rectForPoint): * rendering/HitTestResult.h: (WebCore::HitTestResult::point): (WebCore::HitTestResult::localPoint): (WebCore::HitTestResult::setPoint): (WebCore::HitTestResult::setLocalPoint): (WebCore::HitTestResult::rectForPoint): 2011-07-07 Levi Weintraub <leviw@chromium.org> Switch remaining paint functions to new layout types https://bugs.webkit.org/show_bug.cgi?id=64116 Reviewed by Eric Seidel. Switching all functions with IntPoint paintOffsets to the new Layout types. No new tests, no functionality changes. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): (WebCore::EllipsisBox::paintSelection): * rendering/EllipsisBox.h: * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintCustomHighlight): * rendering/InlineTextBox.h: * rendering/LayoutTypes.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::paintContents): (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::paintCaret): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::paintEllipsisBoxes): (WebCore::RenderBlock::paintContinuationOutlines): (WebCore::RenderBlock::paintSelection): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintCustomHighlight): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline): (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderInline.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): * rendering/RenderLayer.h: * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintScrollbar): (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): * rendering/RenderListBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::paintFocusRing): (WebCore::RenderObject::paintOutline): * rendering/RenderObject.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::shouldPaint): * rendering/RenderReplaced.h: * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): * rendering/RenderScrollbarPart.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBackgroundsBehindCell): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): * rendering/RenderTableSection.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::paintEllipsisBox): (WebCore::RootInlineBox::paintCustomHighlight): (WebCore::RootInlineBox::paint): * rendering/RootInlineBox.h: * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::paint): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::paint): * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::paint): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::paint): 2011-07-07 Steve VanDeBogart <vandebo@chromium.org> Work around Skia PDF's lack of inverted path support. https://bugs.webkit.org/show_bug.cgi?id=64032 Reviewed by James Robinson. The trick used in http://neugierig.org/software/chromium/notes/2010/07/clipping.html to support antialiased clips doesn't work when printing to Skia's PDF backend because the backend does not support inverted paths. This manifests as rounded buttons not being drawn when printing, tracked as Chrome bug 79519. However, when the output is a vector device, like PDF, we don't need antialiased clips. It's up to the PDF rendering engine to do that. So we can simply disable the antialiased clip code if the output is a vector device. I think the fix isn't testable because it requires examining the printed output. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): 2011-07-07 Emil A Eklund <eae@chromium.org> Switch rendering tree selection code to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63762 Reviewed by Eric Seidel. Switch selection getters and selection gap calculation methods over to new layout abstraction. No new tests, no functionality changes. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionTop): (WebCore::InlineTextBox::selectionBottom): (WebCore::InlineTextBox::selectionHeight): (WebCore::InlineTextBox::isSelected): * rendering/InlineTextBox.h: * rendering/RenderBR.h: (WebCore::RenderBR::selectionRectForRepaint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::selectionGapRectsForRepaint): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::inlineSelectionGaps): (WebCore::RenderBlock::blockSelectionGaps): (WebCore::RenderBlock::blockSelectionGap): (WebCore::RenderBlock::logicalLeftSelectionGap): (WebCore::RenderBlock::logicalRightSelectionGap): (WebCore::RenderBlock::logicalLeftSelectionOffset): (WebCore::RenderBlock::logicalRightSelectionOffset): (WebCore::RenderBlock::positionForPointWithInlineChildren): (WebCore::RenderBlock::desiredColumnWidth): * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRectForRepaint): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRectForRepaint): * rendering/RenderListMarker.h: * rendering/RenderObject.h: (WebCore::RenderObject::selectionRect): (WebCore::RenderObject::selectionRectForRepaint): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRectForRepaint): * rendering/RenderReplaced.h: * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfo::RenderSelectionInfo): * rendering/RenderText.cpp: (WebCore::RenderText::selectionRectForRepaint): * rendering/RenderText.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::selectionTop): (WebCore::RootInlineBox::selectionBottom): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::selectionHeight): 2011-07-07 Gavin Peters <gavinp@chromium.org> Reviewed by Alexey Proskuryakov. fast/dom/HTMLLinkElement/link-and-subresource-test.html is flaky on chromium debug bots https://bugs.webkit.org/show_bug.cgi?id=60097 The culprit was that CachedResource:stopLoading() was using *this after a call to checkNotify(), which isn't kosher. This patch uses a CachedResourceHandle to keep the CachedResource alive. The test is a very close copy of the eponymous link-and-subresource-test.html, only substituting invalid resources for the valid ones in that test. The reproduction is timing related, and happens much more consistantly with an invalid resource for whatever reason. Test: fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html * loader/cache/CachedResource.cpp: (WebCore::CachedResource::stopLoading): 2011-07-07 James Robinson <jamesr@chromium.org> Reviewed by Kenneth Russell. Use v8::AdjustAmountOfExternalAllocatedMemory for ArrayBuffers https://bugs.webkit.org/show_bug.cgi?id=42912 This calls v8's AdjustAmountOfExternalAllocatedMemory when ArrayBuffers are allocated/deallocated so that V8's garbage collection heuristics can account for the memory held by these objects. On the new test page, this reduces the peak memory use from 5BG+ (or a crash in 32-bit systems) to <300MB. Test: WebCore/manual-tests/array-buffer-memory.html * html/canvas/ArrayBuffer.cpp: (WebCore::ArrayBuffer::~ArrayBuffer): (WebCore::ArrayBuffer::tryAllocate): 2011-07-07 Ryosuke Niwa <rniwa@webkit.org> Move all code related to cachedSelection to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64118 Reviewed by Alexey Proskuryakov. Moved m_cachedSelectionStart and m_cachedSelectionEnd from HTMLInputElement and HTMLTextAreaElement to HTMLTextFormControlElement Also removed cached selection related functions from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine because they were merely providing wrapper functions to enable polymorphism between input and textarea elements and their WML equivalents. * editing/FrameSelection.cpp: (WebCore::FrameSelection::notifyRendererOfSelectionChange): Calls HTMLTextFormControlElement's selectionChanged instead of RenderTextControl's. * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): Initialize m_cachedSelectionStart and m_cachedSelectionEnd. (WebCore::HTMLTextFormControlElement::selectionStart): (WebCore::HTMLTextFormControlElement::selectionEnd): (WebCore::HTMLTextFormControlElement::selection): (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Added. (WebCore::HTMLTextFormControlElement::selectionChanged): Extracted from RenderTextControl::selectionChanged. * html/HTMLFormControlElement.h: (WebCore::HTMLTextFormControlElement::cacheSelection): Extracted from HTMLInputElement and HTMLTextAreaElement. (WebCore::HTMLTextFormControlElement::hasCachedSelectionStart): Added. (WebCore::HTMLTextFormControlElement::hasCachedSelectionEnd): Added. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::updateFocusAppearance): * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): (WebCore::HTMLTextAreaElement::updateFocusAppearance): * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::isEmptyValue): * rendering/RenderTextControl.cpp: (WebCore::setSelectionRange): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: * rendering/RenderTextControlSingleLine.h: 2011-07-07 Emil A Eklund <eae@chromium.org> Switch addFocusRingRects to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64114 Reviewed by Eric Seidel. No new tests, no functionality changes. * rendering/LayoutTypes.h: (WebCore::flooredLayoutPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addFocusRingRects): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::addFocusRingRects): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::addFocusRingRects): * rendering/RenderInline.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::addFocusRingRects): * rendering/RenderListBox.h: * rendering/RenderObject.h: (WebCore::RenderObject::addFocusRingRects): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::addFocusRingRects): * rendering/RenderTextControl.h: * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::addFocusRingRects): * rendering/svg/RenderSVGContainer.h: * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::addFocusRingRects): * rendering/svg/RenderSVGImage.h: * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::addFocusRingRects): * rendering/svg/RenderSVGPath.h: 2011-07-06 Adrienne Walker <enne@google.com> [chromium] Reduce compositor texture memory by skipping layers and clipping surfaces https://bugs.webkit.org/show_bug.cgi?id=64052 Reviewed by James Robinson. Layers and surfaces that are entirely transparent are now skipped. Parent scissor rects are now applied to the content rect of surfaces so that offscreen surfaces can be skipped. Landing this for vangelis@chromium.org. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::calculateVisibleRect): (WebCore::calculateVisibleLayerRect): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces): (WebCore::LayerRendererChromium::updateCompositorResources): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::RenderSurfaceChromium): 2011-07-07 Adam Barth <abarth@webkit.org> Unreviewed, rolling out r90581. http://trac.webkit.org/changeset/90581 https://bugs.webkit.org/show_bug.cgi?id=64124 Broke a bunch of inspector tests (Requested by ojan on #webkit). * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.Panels.prototype.create): (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage): (WebInspector.injectedExtensionAPI.expandURL): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype._onSetSidebarPage): (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler): 2011-07-07 Adrienne Walker <enne@google.com> [chromium] Fix crash when compositing gets disabled mid-paint https://bugs.webkit.org/show_bug.cgi?id=64119 Reviewed by James Robinson. WebKit paint can disable compositing and call setRootLayer(0). Adding a check for this in drawLayers prevents a null pointer deref. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2011-07-07 Dirk Schulze <krit@webkit.org> SVGAnimateTransform does not support calcMode=discrete https://bugs.webkit.org/show_bug.cgi?id=63914 Reviewed by Rob Buis. CalcMode discrete specifies that the animation function will jump from one value to the next without any interpolation. Implemented calcMode discrete by checking current progress of animation. If we are in the first half of the animation, we use the start value of the aniamtion, end value for the second half of the animation. The key time at 50% is used on all other animations as well as on other SVG viewers. Added a manual test. DRT crashes on an automated test with the SVG animation API. Opened a new bug report: 64104. * manual-tests/svg-animateTransform-calcMode-discrete.svg: Added. * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): 2011-07-07 Dirk Schulze <krit@webkit.org> Reviewed by Rob Buis. SVGAnimatedPath needs fallback for 'by' animation https://bugs.webkit.org/show_bug.cgi?id=63865 Added fallback to 'to' animation for 'by' animated SVGAnimatedPathAnimator. Clenup of SVGAnimateElement. Removed all switches since we support all AnimatedTypes with the exception of AnimatedEnumeration. AnimatedEnumeration gets animated as AnimatedString at the moment. Test: svg/animations/svgpath-animation-1.html * svg/SVGAnimateElement.cpp: (WebCore::getPropertyValue): (WebCore::inheritsFromProperty): (WebCore::attributeValueIsCurrentColor): (WebCore::SVGAnimateElement::adjustForCurrentColor): (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::calculateFromAndByValues): 2011-07-07 Andrey Kosyakov <caseq@chromium.org> Web Inspector: secure access to extensions API https://bugs.webkit.org/show_bug.cgi?id=64080 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.Panels.prototype.create): (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype._onSetSidebarPage): (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler): (WebInspector.ExtensionServer.prototype._expandResourcePath): 2011-07-07 Kyusun Kim <maniagoon@company100.net> The return value of SharedBuffer::createWithContentsOfFile must have valid m_size. https://bugs.webkit.org/show_bug.cgi?id=63313 Reviewed by Eric Seidel. * platform/posix/SharedBufferPOSIX.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): 2011-07-07 Dan Bernstein <mitz@apple.com> <rdar://problem/9737435> Re-enable -webkit-column-break-inside: avoid https://bugs.webkit.org/show_bug.cgi?id=64102 Reviewed by Simon Fraser. -webkit-column-break-inside: avoid was disabled in r62632 along with page-break-inside: avoid. The latter remains disabled. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustForUnsplittableChild): Treat the child as unsplittable if '-webkit-column-break-inside: avoid' was specified. 2011-07-07 Andrey Kosyakov <caseq@chromium.org> Web Inspector: visual regressions in network panel https://bugs.webkit.org/show_bug.cgi?id=64089 Reviewed by Pavel Feldman. * inspector/front-end/networkPanel.css: (.data-grid.network-log-grid tr.filler td): (.network.panel .sidebar): 2011-07-07 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by David Hyatt. Partial layout when a flex-box has visibility: collapse https://bugs.webkit.org/show_bug.cgi?id=63776 Tests: fast/flexbox/crash-button-input-autofocus.html fast/flexbox/crash-button-keygen.html fast/flexbox/crash-button-relayout.html The issue is that FlexBoxIterator would skip any child if it has visibility: collapsed. However if one of the child is anonymous, it may wrap some other child that would be skipped. Now FlexBoxIterator is called during the layout phase and thus some nodes would not relayouted as expected. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::FlexBoxIterator::next): When iterating, don't skip anonymous content as there may be real content hiding below. 2011-07-07 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: URL links in styles open new tab instead of showing resources panel. https://bugs.webkit.org/show_bug.cgi?id=64090 Reviewed by Pavel Feldman. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): 2011-07-07 Andrey Kosyakov <caseq@chromium.org> Web Inspector: active panel does not receive resize event when drawer is resized https://bugs.webkit.org/show_bug.cgi?id=64094 Reviewed by Pavel Feldman. * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype._statusBarDragging): 2011-07-07 Pavel Feldman <pfeldman@chromium.org> Web Inspector: prevent default action during drag'n'drop in the Elements panel. https://bugs.webkit.org/show_bug.cgi?id=64081 Reviewed by Yury Semikhatsky. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._ondragstart): (WebInspector.ElementsTreeOutline.prototype._ondragover): (WebInspector.ElementsTreeOutline.prototype._ondragend): * inspector/front-end/treeoutline.js: (TreeOutline.prototype.treeElementFromPoint): 2011-07-07 Nikolas Zimmermann <nzimmermann@rim.com> Move remaining enums out of SVG*Element classes https://bugs.webkit.org/show_bug.cgi?id=64075 Reviewed by Dirk Schulze. Move remaining enums out of SVG*Element classes. This is a preparation patch for bug 63797. Also move the SVGPropertyTraits template specializations for enum types before the class definition in the header, otherwhise we can't use SVGPropertyTraits<FooType>::fromString/toString in the DECLARE_ANIMATED* macros, which is needed soon. No new tests, just refactoring. * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceGradient.h: * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::angle): (WebCore::RenderSVGResourceMarker::markerTransformation): * rendering/svg/RenderSVGResourceMarker.h: (WebCore::RenderSVGResourceMarker::markerUnits): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::RenderSVGTextPath): (WebCore::RenderSVGTextPath::exactAlignment): (WebCore::RenderSVGTextPath::stretchMethod): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::operator<<): (WebCore::writeCommonGradientProperties): * rendering/svg/SVGTextChunkBuilder.cpp: (WebCore::SVGTextChunkBuilder::addTextChunk): * rendering/svg/SVGTextLayoutEngine.cpp: (WebCore::SVGTextLayoutEngine::parentDefinesTextLength): (WebCore::SVGTextLayoutEngine::beginTextPathLayout): * svg/GradientAttributes.h: (WebCore::GradientAttributes::GradientAttributes): (WebCore::GradientAttributes::spreadMethod): (WebCore::GradientAttributes::setSpreadMethod): * svg/SVGComponentTransferFunctionElement.h: * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.h: * svg/SVGFECompositeElement.h: * svg/SVGFEConvolveMatrixElement.h: * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEMorphologyElement.h: * svg/SVGFETurbulenceElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::SVGGradientElement): * svg/SVGGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::SVGMarkerElement): (WebCore::SVGMarkerElement::parseMappedAttribute): (WebCore::SVGMarkerElement::setOrientToAuto): (WebCore::SVGMarkerElement::setOrientToAngle): (WebCore::SVGMarkerElement::synchronizeOrientType): (WebCore::SVGMarkerElement::orientTypeAnimated): * svg/SVGMarkerElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::SVGTextContentElement): * svg/SVGTextContentElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::SVGTextPathElement): * svg/SVGTextPathElement.h: 2011-07-07 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: Protocol: pointers to optional "in" parameters passing to the backend methods should be NULL if they are not specified in the message. https://bugs.webkit.org/show_bug.cgi?id=64083 Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: (generateBackendFunction): (generateArgumentGetters): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getStylesForNode): 2011-07-07 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: Searching on the Network panel doesn't do anything? https://bugs.webkit.org/show_bug.cgi?id=55489 This is initial implementation of search in Network panel. It is pretty simple search only for names and paths. Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype.refresh): (WebInspector.NetworkPanel.prototype._reset): (WebInspector.NetworkPanel.prototype._updateOffscreenRows): (WebInspector.NetworkPanel.prototype._matchResource): (WebInspector.NetworkPanel.prototype._clearSearchMatchedList): (WebInspector.NetworkPanel.prototype._highlightNthMatchedResource): (WebInspector.NetworkPanel.prototype.performSearch): (WebInspector.NetworkDataGridNode.prototype.createCells): * inspector/front-end/utilities.js: (String.prototype.escapeHTML): (): 2011-07-07 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Resources panel shows only one resource when multiple resources have the same url. https://bugs.webkit.org/show_bug.cgi?id=63936 Reviewed by Pavel Feldman. Test: http/tests/inspector/resource-tree/resource-tree-non-unique-url.html * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.appendResource): 2011-07-07 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Add support for clearing cache and cookies from network panel. https://bugs.webkit.org/show_bug.cgi?id=63999 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorClient.h: (WebCore::InspectorClient::clearBrowserCache): (WebCore::InspectorClient::clearBrowserCookies): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::clearBrowserCache): (WebCore::InspectorResourceAgent::clearBrowserCookies): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: (WebCore::InspectorResourceAgent::create): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._contextMenu): (WebInspector.NetworkPanel.prototype._clearBrowserCache): (WebInspector.NetworkPanel.prototype._clearBrowserCookies): * inspector/front-end/Settings.js: 2011-07-07 Shinya Kawanaka <shinyak@google.com> Added more key bindings for input[type=range]. https://bugs.webkit.org/show_bug.cgi?id=52262 Added PageUp/PageDown/Home/End key bindings for input[type=range]. PageUp/PageDown change value by about 10%. Home/End change value to minimum/maximum. Reviewed by Kent Tamura. * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): Added key bindings. 2011-07-07 Oleg Romashin <romaxa@gmail.com> Fix InspectorInstrumentation compilation. https://bugs.webkit.org/show_bug.cgi?id=64033 Reviewed by Yury Semikhatsky. No new tests. just compile fix. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl): 2011-07-06 Mihnea Ovidenie <mihnea@adobe.com> Reviewed by David Hyatt. [CSSRegions] Parse flow property https://bugs.webkit.org/show_bug.cgi?id=61730 Test: fast/regions/webkit-flow-parsing.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFlowThread): * css/CSSParser.h: * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flowThread): (WebCore::InheritedFlags::setFlowThread): (WebCore::InheritedFlags::initialFlowThread): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-07-06 MORITA Hajime <morrita@google.com> [ShadowContentElement] Redundant RenderText objects are created on the content boundaries. https://bugs.webkit.org/show_bug.cgi?id=63977 Reviewed by Dimitri Glazkov. NodeRenderingContext::nextRenderer() and previousRenderer() didn't work well when it crosses content elements: - It doesn't step into forwarded children of ShadowContentElement. - It doesn't step out from traversing forwarded children to neighbors of the content element of that forwarded chidren. This change makes it to step into and out from content element. Test: fast/dom/shadow/content-element-renderers.html * dom/NodeRenderingContext.cpp: (WebCore::firstRendererOf): Added (WebCore::lastRendererOf): Added (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): 2011-07-06 Gyuyoung Kim <gyuyoung.kim@samsung.com> [EFL] Add Fullscreen API feature https://bugs.webkit.org/show_bug.cgi?id=63975 Add needed files for enabling ENABLE_FULLSCREEN_API feature. Reviewed by Adam Barth. * CMakeLists.txt: Add RenderFullScreen.cpp, fullscreen.css 2011-07-06 Emil A Eklund <eae@chromium.org> Switch absoluteRects to to new layout types https://bugs.webkit.org/show_bug.cgi?id=64035 Reviewed by Eric Seidel. Move absoluteRects over to new layout unit abstraction. Add flooredLayoutPoint, mapped to flooredIntPoint. No new tests, no functionality changes. * rendering/LayoutTypes.h: (WebCore::flooredLayoutPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRect): * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): * rendering/RenderView.h: * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::absoluteRects): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteRects): * rendering/svg/RenderSVGModelObject.h: 2011-07-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch offsetFromContainer and related to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63659 Switch offsetFromContainer and related mapping methods to new layout unit abstraction. No new tests, no functionality changes. * rendering/LayoutTypes.h: (WebCore::enclosingLayoutRect): (WebCore::roundedLayoutPoint): (WebCore::roundedLayoutUnit): Add LayoutUnit versions of enclosingIntRect, roundedIntPoint and lroundf. For now these map to their int counterpart but once we switch to float or fixed point they'll be no-ops and eventually will be removed. * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): (WebCore::RenderBox::mapAbsoluteToLocalPoint): (WebCore::RenderBox::offsetFromContainer): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::linesBoundingBox): (WebCore::RenderInline::offsetFromContainer): (WebCore::RenderInline::mapLocalToContainer): (WebCore::RenderInline::mapAbsoluteToLocalPoint): (WebCore::RenderInline::relativePositionedInlineOffset): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::offsetFromContainer): (WebCore::RenderObject::offsetFromAncestorContainer): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::offsetFromContainer): * rendering/RenderTableCell.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::convertToPaintingRect): 2011-07-06 Levi Weintraub <leviw@chromium.org> Switch FrameSelection to new Layout Types https://bugs.webkit.org/show_bug.cgi?id=64043 Reviewed by Eric Seidel. Switching the selection classes to the new layout types. Changing NoXPosForVerticalArrowNavigation to a static inline since as it stood it violated our global initializer rule when converted to numeric_limits from INT_MIN. No new tests, no functionality changes. * editing/FrameSelection.cpp: (WebCore::FrameSelection::modify): (WebCore::absoluteCaretY): (WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation): (WebCore::CaretBase::clearCaretRect): (WebCore::CaretBase::updateCaretRect): (WebCore::FrameSelection::localCaretRect): (WebCore::CaretBase::absoluteBoundsForLocalRect): (WebCore::FrameSelection::absoluteCaretBounds): (WebCore::repaintRectForCaret): (WebCore::CaretBase::caretRepaintRect): (WebCore::FrameSelection::recomputeCaretRect): (WebCore::FrameSelection::paintCaret): (WebCore::CaretBase::paintCaret): (WebCore::FrameSelection::contains): (WebCore::DragCaretController::paintDragCaret): (WebCore::FrameSelection::bounds): (WebCore::FrameSelection::revealSelection): * editing/FrameSelection.h: (WebCore::CaretBase::localCaretRectWithoutUpdate): 2011-07-06 Levi Weintraub <leviw@chromium.org> Switch Overflow and FrameRect methods in InlineBox to Layout Units https://bugs.webkit.org/show_bug.cgi?id=64034 Reviewed by Eric Seidel. Switching Overflow and FrameRect methods on InlineBox to new Layout Unit abstraction and cleaning up some compilation errors that crop up when building with floating point layout units. No new tests, no functionality changes. * css/CSSComputedStyleDeclaration.cpp: (WebCore::sizingBox): * dom/Document.h: * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawNodeHighlight): * page/animation/AnimationBase.cpp: (WebCore::blendFunc): * platform/ScrollView.h: (WebCore::ScrollView::visibleWidth): (WebCore::ScrollView::visibleHeight): * platform/ScrollableArea.h: (WebCore::ScrollableArea::visibleHeight): (WebCore::ScrollableArea::visibleWidth): * platform/graphics/FloatPoint.h: Adding FloatPoint and FloatSize move[By] functions (WebCore::FloatPoint::move): (WebCore::FloatPoint::moveBy): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::computePreferredLogicalWidths): (WebCore::AutoTableLayout::layout): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::layoutOverflowRect): (WebCore::InlineFlowBox::logicalLeftLayoutOverflow): (WebCore::InlineFlowBox::logicalRightLayoutOverflow): (WebCore::InlineFlowBox::logicalTopLayoutOverflow): (WebCore::InlineFlowBox::logicalBottomLayoutOverflow): (WebCore::InlineFlowBox::logicalLayoutOverflowRect): (WebCore::InlineFlowBox::visualOverflowRect): (WebCore::InlineFlowBox::logicalLeftVisualOverflow): (WebCore::InlineFlowBox::logicalRightVisualOverflow): (WebCore::InlineFlowBox::logicalTopVisualOverflow): (WebCore::InlineFlowBox::logicalBottomVisualOverflow): (WebCore::InlineFlowBox::logicalVisualOverflowRect): (WebCore::InlineFlowBox::frameRectIncludingLineHeight): (WebCore::InlineFlowBox::logicalFrameRectIncludingLineHeight): * rendering/RenderBlock.h: (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault): (WebCore::RenderBlock::RenderBlockRareData::negativeMarginBeforeDefault): (WebCore::RenderBlock::RenderBlockRareData::positiveMarginAfterDefault): (WebCore::RenderBlock::RenderBlockRareData::negativeMarginAfterDefault): 2011-07-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch nodeAtPoint to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63663 No new tests, no functionality changes. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/EllipsisBox.h: * rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): * rendering/InlineTextBox.h: * rendering/LayoutTypes.h: (WebCore::toLayoutSize): (WebCore::toLayoutPoint): (WebCore::roundedLayoutPoint): (WebCore::roundedLayoutUnit): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): * rendering/RenderBox.h: * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint): * rendering/RenderFrameSet.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::nodeAtPoint): * rendering/RenderInline.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::nodeAtPoint): * rendering/RenderListBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::nodeAtPoint): * rendering/RenderObject.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTable.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderTableSection.h: * rendering/RenderText.h: (WebCore::RenderText::nodeAtPoint): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::nodeAtPoint): * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::nodeAtPoint): * rendering/RenderTextControlSingleLine.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::nodeAtPoint): * rendering/RenderWidget.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint): * rendering/RootInlineBox.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): (WebCore::RenderSVGForeignObject::nodeAtPoint): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::nodeAtPoint): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtPoint): * rendering/svg/RenderSVGText.h: * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint): * rendering/svg/SVGInlineTextBox.h: 2011-07-06 Adrienne Walker <enne@google.com> [chromium] Add compositor texture manager soft limits and lost focus reclaiming https://bugs.webkit.org/show_bug.cgi?id=64009 Reviewed by James Robinson. Add a soft limit for texture memory. Unprotected textures will get reclaimed when above this limit. Increase the hard limit for maximum texture memory as well, now that there is a better heuristic and textures are reclaimed from tabs without focus. Landing this for vangelis@chromium.org. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::protectTileTextures): * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::TextureManager): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureManager::create): 2011-07-06 Pavel Feldman <pfeldman@chromium.org> Not reviewed: Web Inspector: fixing typo introduced in the r90397. * inspector/front-end/StylesSidebarPane.js: 2011-07-06 Mike Reed <reed@google.com> [skia] don't include deprecated header https://bugs.webkit.org/show_bug.cgi?id=64025 Reviewed by James Robinson. No new tests. Just removing #include of an unused header that will be gone soon * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: * platform/graphics/skia/PlatformContextSkia.cpp: 2011-06-30 Cris Neckar <cdn@chromium.org> Reviewed by Darin Fisher. Add versioning to Chromium clipboard and prevent polling from inside events. https://bugs.webkit.org/show_bug.cgi?id=63738 * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::getSequenceNumber): * platform/chromium/ChromiumDataObject.h: * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::ClipboardChromium): (WebCore::ClipboardChromium::getData): (WebCore::ClipboardChromium::platformClipboardChanged): * platform/chromium/ClipboardChromium.h: * platform/chromium/DataTransferItemChromium.cpp: (WebCore::DataTransferItemChromium::getAsString): (WebCore::DataTransferItemChromium::getAsFile): * platform/chromium/PlatformBridge.h: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): 2011-07-01 James Robinson <jamesr@chromium.org> Reviewed by Stephen White. [chromium] Externalize layer visibility calculation https://bugs.webkit.org/show_bug.cgi?id=63847 This moves the layer visibility calculation from the layer itself out to LayerRendererChromium, like the other calculated properties. Previously, we were doing this calculating at paint time and again at draw time and relying on the fact that this produced the same value. This avoids the redundant calculation. Covered by existing compositing/ layout tests. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::tilingTransform): (WebCore::ContentLayerChromium::contentBounds): (WebCore::ContentLayerChromium::updateLayerSize): (WebCore::ContentLayerChromium::draw): (WebCore::ContentLayerChromium::setTilingOption): (WebCore::ContentLayerChromium::setIsMask): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::contentBounds): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::contentBounds): (WebCore::LayerChromium::visibleLayerRect): (WebCore::LayerChromium::setVisibleLayerRect): (WebCore::LayerChromium::draw): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::calculateVisibleLayerRect): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::draw): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::contentBounds): (WebCore::CCLayerImpl::setContentBounds): (WebCore::CCLayerImpl::visibleLayerRect): (WebCore::CCLayerImpl::setVisibleLayerRect): (WebCore::CCLayerImpl::doubleSided): (WebCore::CCLayerImpl::setDoubleSided): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-07-06 John Sullivan <sullivan@apple.com> IconDatabase::synchronousIconForPageURL() has inconsistent API when no custom icon is available <https://bugs.webkit.org/show_bug.cgi?id=64015> <rdar://problem/9706277> For some URLs it would return a particular size of default icon; for other URLs it would return 0. Reviewed by Ada Chan. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::synchronousIconForPageURL): Return 0 in all cases where there is no custom icon. 2011-07-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch RenderLayer::hitTest* to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63640 Switch hit testing and supporting methods for RenderLayer over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/LayoutTypes.h: (WebCore::roundedLayoutPoint): Add roundedLayoutPoint abstraction, calls roundedIntPoint now but will be a no-op (and eventually go away) once we switch to float or fixed point. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createLocalTransformState): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::hitTestList): (WebCore::RenderLayer::hitTestPaginatedChildLayer): (WebCore::RenderLayer::hitTestChildLayerColumns): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayer.h: 2011-07-06 Simon Fraser <simon.fraser@apple.com> Have RenderLayerCompositor take care of clearing backing store when entering the page cache https://bugs.webkit.org/show_bug.cgi?id=64018 Reviewed by Joseph Pecoraro. Move responsibility for tearing down all RenderLayer backing stores from RenderLayer itself to RenderLayerCompositor, since RenderLayerCompositor manages backing store creation and destruction in general. * page/FrameView.cpp: (WebCore::FrameView::clearBackingStores): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants): (WebCore::RenderLayerCompositor::clearBackingForAllLayers): * rendering/RenderLayerCompositor.h: 2011-07-06 Ryuan Choi <ryuan.choi@samsung.com> [Performance] Only call sendContentResizeNotification when the scrollbar actually did change https://bugs.webkit.org/show_bug.cgi?id=47320 Reviewed by Eric Seidel. Move avoidScrollbarCreation checking code from setHasHorizontalScrollbar and setHasVerticalScrollbar to their caller in order to keep sendContentResizedNotification false in case scrollbar is not really changed. As a result, it will remove unnecessary relayout in the above case. No new tests as this is very hard to write tests for. The bug only occured when scrolling the sites which contain frame in browser with frameFlattening. This should not change functionality in other case. * platform/ScrollView.cpp: (WebCore::ScrollView::setHasHorizontalScrollbar): (WebCore::ScrollView::setHasVerticalScrollbar): (WebCore::ScrollView::updateScrollbars): 2011-07-06 Nate Chapin <japhet@chromium.org> Don't let all subresources keep isLoadingInAPISense() from returning false, only requests that affect CachedResourceRequest::requestCount(). https://bugs.webkit.org/show_bug.cgi?id=62066 Reviewed by Adam Barth. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::dispatchWindowLoadEvent): * dom/Document.h: (WebCore::Document::loadEventFinished): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): 2011-07-06 Pavel Feldman <pfeldman@google.com> Web Inspector: implement drag'n'drop in the elements panel for reordering nodes. https://bugs.webkit.org/show_bug.cgi?id=63990 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::moveTo): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype._removeChild): (WebInspector.DOMNode.prototype.ownerDocumentElement): (WebInspector.DOMNode.prototype.moveTo): (WebInspector.DOMAgent.prototype._childNodeRemoved): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._ondragstart): (WebInspector.ElementsTreeOutline.prototype._ondragover): (WebInspector.ElementsTreeOutline.prototype._ondragleave): (WebInspector.ElementsTreeOutline.prototype._isValidDragSourceOrTarget): (WebInspector.ElementsTreeOutline.prototype._ondragend.callback): (WebInspector.ElementsTreeOutline.prototype._ondragend): (WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker): (WebInspector.ElementsTreeOutline.prototype.populateContextMenu.focusElement): (WebInspector.ElementsTreeOutline.prototype.populateContextMenu): (WebInspector.ElementsTreeElement.prototype.onattach): * inspector/front-end/inspector.css: (.outline-disclosure li.elements-drag-over .selection): * inspector/front-end/treeoutline.js: (TreeOutline.prototype.treeElementFromEvent): 2011-07-06 Andras Becsi <abecsi@webkit.org> Fix "warning: a `;' might be needed at the end of action code" Unreviewed gardening. No new tests needed. * css/CSSGrammar.y: Future versions of Bison will not add the ';' so add it. 2011-07-06 Andras Becsi <abecsi@webkit.org> [Qt] Revome unused but set shadowBlur variable after r90406. Unreviewed build fix. No new tests needed. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillPath): Use the GraphicsContext brush. 2011-07-06 Andras Becsi <abecsi@webkit.org> [Qt] Remove duplicate entries of ShadowBlur sources from project file. Rubber-stamped by Csaba Osztrogonác. No new tests needed. * WebCore.pro: These files were already added in r84410. 2011-07-05 Kentaro Hara <haraken@google.com> Trigger a 'change' event whenever selected files are changed https://bugs.webkit.org/show_bug.cgi?id=63929 Reviewed by Kent Tamura. Record previously selected files and then compare them with newly selected files. If the previously selected files and their order are not equal to those of the newly selected files, we trigger the 'change' event. Test: fast/forms/file-input-change-event.html * html/FileInputType.cpp: (WebCore::FileInputType::filesChosen): Calls dispathChangeEvent() only when the previously selected files are different from the newly selected files 2011-06-29 Kent Tamura <tkent@chromium.org> Reviewed by Alexey Proskuryakov. [Mac] REGRESSION (r88415): Range slider doesn't have focus appearance. https://bugs.webkit.org/show_bug.cgi?id=63573 * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderThumb): Need to pass the RenderObject of the owner <input> because updateFocusedState() checks the outline style of the specified renderer, and we'd like to make a slider thumb reflect the owner focus style. 2011-07-05 Hans Wennborg <hans@chromium.org> [V8][Chromium] Remove use of OwnHandle from V8LocalContext https://bugs.webkit.org/show_bug.cgi?id=63925 Reviewed by Adam Barth. Replace the OwnHandle<> member in V8LocalContext with v8::Persistent<v8::Context>. The code that used OwnHandle<> would not correctly Dispose of the Context, which would cause the memory to fill up when creating and destructing many V8LocalContext objects, such as in the case of IndexedDB. * bindings/v8/V8Utilities.cpp: (WebCore::V8LocalContext::V8LocalContext): (WebCore::V8LocalContext::~V8LocalContext): * bindings/v8/V8Utilities.h: 2011-07-05 Igor Oliveira <igor.oliveira@openbossa.org> [Qt] Add ShadowBlur support https://bugs.webkit.org/show_bug.cgi?id=62997 Use ShadowBlur instead of ContextShadow to handle canvas and css shadows. ShadowBlur is a newer and platform independent shadow implementation. Qt QPainter does not have support for shadows so is necessary to create a layer support to draw complex shapes and fonts. The beginShadowLayer creates a temporary shadow buffer where the canvas can draw onto and endShadowLayer applies the blur filter, colors the shadow buffer and draw the final shadow to the graphics context. Reviewed by Andreas Kling. * WebCore.pro: * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContext.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::ShadowBlur): (WebCore::ShadowBlur::setShadowValues): (WebCore::ShadowBlur::updateShadowBlurValues): (WebCore::ShadowBlur::clear): (WebCore::ShadowBlur::blurAndColorShadowBuffer): (WebCore::ShadowBlur::beginShadowLayer): (WebCore::ShadowBlur::endShadowLayer): * platform/graphics/ShadowBlur.h: (WebCore::ShadowBlur::type): * platform/graphics/qt/ContextShadowQt.cpp: Removed. * platform/graphics/qt/FontQt.cpp: (WebCore::drawTextCommon): (WebCore::Font::drawGlyphs): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::mustUseShadowBlur): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::savePlatformState): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::shadowBlur): (WebCore::GraphicsContext::clipBounds): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::clearPlatformShadow): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw): * platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::draw): 2011-07-05 Sam Weinig <sam@webkit.org> Null deref accessing CustomEvent.detail <rdar://problem/9724577> https://bugs.webkit.org/show_bug.cgi?id=63885 Reviewed by Anders Carlsson. Test: fast/events/custom-event-uninitialized.html * bindings/scripts/CodeGeneratorJS.pm: Guard against uninitialized script value. 2011-07-05 Pratik Solanki <psolanki@apple.com> Reviewed by Dan Bernstein. Coalesce data array into one NSData before calling didReceiveData https://bugs.webkit.org/show_bug.cgi?id=63916 <rdar://problem/9715181> Instead of calling didReceiveData multiple times with smaller chunks of data, we merge the data buffers into one and call it once. No new tests because the flag isn't enabled yet. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): 2011-07-05 Tamas Czene <Czene.Tamas@stud.u-szeged.hu> Reviewed by Simon Fraser. Remove virtual functions from StyleImage. https://bugs.webkit.org/show_bug.cgi?id=63909 We can remove the virtual "isChachedImage, isPendingImage, isGeneratedImage" functions to speed up the StyleImage. Some profile data shows this part is significant, especially in small CSS-based sites. Removing the virtual functions - removing the calls - makes a small performance progression on this part. * rendering/style/StyleCachedImage.h: (WebCore::StyleCachedImage::StyleCachedImage): * rendering/style/StyleGeneratedImage.h: (WebCore::StyleGeneratedImage::StyleGeneratedImage): * rendering/style/StyleImage.h: (WebCore::StyleImage::isCachedImage): (WebCore::StyleImage::isPendingImage): (WebCore::StyleImage::isGeneratedImage): (WebCore::StyleImage::StyleImage): * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::StylePendingImage): 2011-07-05 Pavel Feldman <pfeldman@google.com> Web Inspector: add "element state" setting to the styles section title. https://bugs.webkit.org/show_bug.cgi?id=63932 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * WebCore.gypi: * inspector/front-end/Images/paneElementStateButtons.png: Added. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.muteEventListener): (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.StylesSidebarPane.prototype.addBlankSection): (WebInspector.StylesSidebarPane.prototype.registerShortcuts): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener): (WebInspector.StylesSidebarPane.prototype._createElementStatePane.createCheckbox): (WebInspector.StylesSidebarPane.prototype._createElementStatePane): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.pane > .title > .pane-title-button:active, .pane > .title > .pane-title-button.toggled): (.pane > .title > .pane-title-button.element-state): (.styles-element-state-pane): (.styles-element-state-pane.expanded): (.styles-element-state-pane > table): (.styles-element-state-pane input): 2011-06-22 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: extract duplicated code that deals with source mappings. https://bugs.webkit.org/show_bug.cgi?id=63139 * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleMessage.prototype.isEqual): (WebInspector.ConsoleMessage.prototype.get stackTrace): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation): (WebInspector.DebuggerPresentationModel.prototype._updateAnchor): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didGetScriptLocation): (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.updateSourceFileBreakpointsAndDispatchEvent): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript): (WebInspector.PresenationCallFrame): (WebInspector.PresenationCallFrame.prototype.sourceLine): 2011-07-05 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: WebInspector frontend reports a protocol error in remote debugging mode. https://bugs.webkit.org/show_bug.cgi?id=63935 it was error generated for obsolete message "loaded" which was sent from frontend to backend. Reviewed by Yury Semikhatsky. * inspector/CodeGeneratorInspector.pm: * inspector/front-end/inspector.js: (WebInspector.loaded.WebInspector.socket.onopen): (WebInspector.loaded): 2011-07-05 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [refactoring] remove network-sidebar style, add network-log-grid https://bugs.webkit.org/show_bug.cgi?id=63913 Reviewed by Yury Semikhatsky. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype._createTable): * inspector/front-end/networkPanel.css: (.network-log-grid): (.network-log-grid table.data): (.network-log-grid.small table.data): (.network-log-grid td): (.network-log-grid.small td): (.network-log-grid th): (.network-log-grid.small th): (.network-log-grid th, .network.panel .data-grid th.sort-descending, .network.panel .data-grid th.sort-ascending): (.network-log-grid .data-container): (.network-log-grid.small .data-container): (.network-log-grid select): (.network-log-grid.small tr.offscreen): (.network-log-grid tr.offscreen): (.network-log-grid tr.offscreen td): (.network-log-grid tr.filler): (.network-log-grid tr:not(.filler) td.name-column): (.network.panel:not(.viewing-resource) .network-log-grid td.name-column:hover): (.network-log-grid td.time-column): (.network-log-grid.small .network-graph-side): (.network-log-grid th.sortable:active): (.network-log-grid tr.selected .network-cell-subtitle): (.network-log-grid .icon): (.network-log-grid.small .icon): (.network-log-grid .network-category-scripts .icon): (.network-log-grid.small .network-category-scripts .icon): (.network-log-grid .network-category-documents .icon): (.network-log-grid.small .network-category-documents .icon): (.network-log-grid .network-category-stylesheets .icon): (.network-log-grid.small .network-category-stylesheets .icon): (.network-log-grid .network-category-images .icon): (.network-log-grid.small .network-category-images .icon): (.network-log-grid .image-network-icon-preview): (.network-log-grid.small .image-network-icon-preview): (.network-timeline-grid.small .network-event-divider): (.network-log-grid .resources-dividers): (.network-log-grid .resources-dividers-label-bar): (.network-timeline-grid.small .resources-dividers-label-bar): (.network-timeline-grid .resources-divider-label): (.network-timeline-grid .resources-dividers-label-bar .resources-divider): (.network-timeline-grid.small .resources-dividers-label-bar .resources-divider): (.network-timeline-grid .resources-divider.first .resources-divider-label): (.network-timeline-grid .resources-dividers-label-bar .resources-divider.first): (.network-timeline-grid tr.filler td): (.network-summary-bar td): (.network.panel.viewing-resource .network-log-grid th): (.network-log-grid.full-grid-mode .viewer-column): (.network-log-grid.brief-grid-mode .time-column): (.network-log-grid.viewing-resource-mode .timeline-column): (.network.panel .sidebar): (.network.panel.viewing-resource .network-log-grid .data-grid-resizer): 2011-07-05 Alexandru Chiculita <achicu@adobe.com> Reviewed by Simon Hausmann. [Qt] "cat" is not available when building. https://bugs.webkit.org/show_bug.cgi?id=63924 Changed 'cat' to 'perl -ne \"print $1\"' because 'cat' is not available on Windows with MSVC toolchain. It passed the Qt buildbots, because they run with cygwin. Project file change. No tests needed. * CodeGenerators.pri: 2011-07-05 Vsevolod Vlasov <vsevik@chromium.org> Unreviewed; Qt Linux Release minimal compile fix. * testing/Internals.h: (WebCore::Internals::setInspectorResourcesDataSizeLimits): * testing/Internals.idl: 2011-07-05 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Show content for plugin requests in network panel. https://bugs.webkit.org/show_bug.cgi?id=30080 Now the data from didReceiveData callback is passed to inspector. It is then saved in NetworkResourcesData structure for plugin requests. Added window.internals.setInspectorResourcesDataSizeLimits() method for testing replacement logic. Reviewed by Pavel Feldman. Tests: http/tests/inspector/network/network-content-replacement-embed.html http/tests/inspector/network/network-content-replacement-xhr.html http/tests/inspector/network/network-embed.html * WebCore.exp.in: * inspector/InspectorController.cpp: (WebCore::InspectorController::setResourcesDataSizeLimitsFromInternals): * inspector/InspectorController.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveDataImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveData): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::setContent): (WebCore::NetworkResourcesData::ResourceData::purgeContent): (WebCore::NetworkResourcesData::ResourceData::createDecoder): (WebCore::NetworkResourcesData::ResourceData::dataLength): (WebCore::NetworkResourcesData::ResourceData::appendData): (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): (WebCore::NetworkResourcesData::NetworkResourcesData): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::setResourceContent): (WebCore::NetworkResourcesData::maybeAddResourceData): (WebCore::NetworkResourcesData::maybeDecodeDataToContent): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::setResourcesDataSizeLimits): (WebCore::NetworkResourcesData::ensureNoDataForIdentifier): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::hasContent): (WebCore::NetworkResourcesData::ResourceData::content): (WebCore::NetworkResourcesData::ResourceData::decoder): (WebCore::NetworkResourcesData::ResourceData::buffer): (WebCore::NetworkResourcesData::ResourceData::setBuffer): (WebCore::NetworkResourcesData::ResourceData::hasData): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get contentEncoded): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): (WebInspector.ResourcePreviewView.prototype._createEmptyView): (WebInspector.ResourcePreviewView.prototype._createPreviewView): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.hasTextContent): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveData): * loader/FrameLoader.cpp: (WebCore::FrameLoader::willLoadMediaElementURL): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::loadResourceSynchronously): (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::didReceiveData): (WebCore::ResourceLoadNotifier::dispatchDidReceiveData): (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): * loader/ResourceLoadNotifier.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveData): * testing/Internals.cpp: (WebCore::Internals::setInspectorResourcesDataSizeLimits): * testing/Internals.h: * testing/Internals.idl: 2011-07-05 Kent Tamura <tkent@chromium.org> Add an assertion that percent height box is unregistered correctly. https://bugs.webkit.org/show_bug.cgi?id=62792 Reviewed by Hajime Morita. No new tests. This won't change behavior. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::hasPercentHeightDescendant): Added. * rendering/RenderBlock.h: Declare hasPercentHeightDescendant(). * rendering/RenderBox.cpp: (WebCore::RenderBox::destroy): Assert !hasPercentHeightDescendant(). 2011-07-04 Pavel Feldman <pfeldman@google.com> Web Inspector: Enable settings screen with settings for console and elements panels. https://bugs.webkit.org/show_bug.cgi?id=62853 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/HelpScreen.js: (WebInspector.HelpScreen.prototype.hide): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype._createRadioSetting.clickListener): (WebInspector.SettingsScreen.prototype._createRadioSetting.get for): * inspector/front-end/ShortcutsScreen.js: (WebInspector.ShortcutsScreen.prototype.hide): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._colorFormatSettingChanged): (WebInspector.StylesSidebarPane.prototype._updateColorFormatFilter.get var): (WebInspector.StylesSidebarPane.prototype._updateColorFormatFilter): (WebInspector.StylesSidebarPane.prototype._changeSetting): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): * inspector/front-end/inspector.css: (#counters): * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._toggleSettings): (WebInspector._showShortcutsScreen): (WebInspector._hideShortcutsScreen): (WebInspector._showSettingsScreen.onhide): (WebInspector._showSettingsScreen): (WebInspector._hideSettingsScreen): (WebInspector.documentKeyDown): 2011-07-05 Shinya Kawanaka <shinyak@google.com> Reviewed by Kent Tamura. The default step is used when attribute step of input[type='number'] is "any". https://bugs.webkit.org/show_bug.cgi?id=57723 When step is "any", 0 was chosen as step, but this is not intuitive. So changed to use the default step. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::getAllowedValueStep): Calls getAllowedValueStepWithDecimalPlaces with RejectAny. (WebCore::HTMLInputElement::getAllowedValueStepWithDecimalPlaces): Takes a new arugument AnyStepHandling. If it is AnyIsDefaultStep, this method allows "step" attribute to take a value "any" to use the default step as step value. Otherwise, INVALID_STATE_ERR will be returned if "step" is "any". (WebCore::HTMLInputElement::applyStep): ditto. (WebCore::HTMLInputElement::stepUp): Calls applyStep with RejectAny. (WebCore::HTMLInputElement::stepDown): ditto. (WebCore::HTMLInputElement::stepUpFromRenderer): Removes a check that step is "any". It is checked in getAllowedValueStepWithDecimalPlaces. * html/HTMLInputElement.h: 2011-07-04 Dominic Cooney <dominicc@chromium.org> Simplify <progress> element's isDeterminate logic. https://bugs.webkit.org/show_bug.cgi?id=63889 Reviewed by Hajime Morita. Covered by existing tests fast/dom/HTMLProgressElement/indeterminate-progress-*.html * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::position): don't duplicate isDeterminate (WebCore::HTMLProgressElement::isDeterminate): remove redundant tests (WebCore::HTMLProgressElement::didElementStateChange): fix formatting * html/HTMLProgressElement.h: 2011-07-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kent Tamura. [EFL] Add hasOwnDisabledStateHandlingFor() to RenderThemeEfl https://bugs.webkit.org/show_bug.cgi?id=63884 As MediaControlRootElement decides whether it will display timeline according to the return value of RenderTheme's hasOwnDisabledStateHandlingFor(), RenderThemeEfl has to implement this function. Existing tests cover the visibility of the controls. * platform/efl/RenderThemeEfl.h: (WebCore::RenderThemeEfl::hasOwnDisabledStateHandlingFor): 2011-07-04 Kent Tamura <tkent@chromium.org> REGRESSION (r87067): Text overflows from short height text field. https://bugs.webkit.org/show_bug.cgi?id=61768 Reviewed by Dimitri Glazkov. Since r87067, the RenderStyle for the inner text element is reset by the value update, but the renderer for the inner text element keeps to have metrics calculated by the previous style. So RenderTextControlSingleLine::layout() didn't set a desired height to the renderer for the inner text element. This patch changes the style creation code so that it has the desired height initially. Test: fast/forms/textfield-overflow-by-value-update.html * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Initialize m_desiredInnerTextHeight. (WebCore::RenderTextControlSingleLine::layout): Update m_desiredInnerTextHeight. (WebCore::RenderTextControlSingleLine::styleDidChange): Reset m_desiredInnerTextHeight. (WebCore::RenderTextControlSingleLine::createInnerTextStyle): Sets the height if m_desiredInnerTextHeight has a concrete value. * rendering/RenderTextControlSingleLine.h: Declare m_desiredInnerTextHeight. 2011-07-04 MORITA Hajime <morrita@google.com> Accessing ShadowRoot.nodeList causes an assertion failure. http://webkit.org/b/63798 The TreeScope destructor did clear the reference to TreeScope, then the Node destructor accessing treeScope(), which results an inconsistent state during the NodeList cache cleanup. This change clears NodeList cache during the TreeScope destructor. The Node destructor no longer does problematic NodeList cache manipulation. Test: fast/dom/shadow/shadow-root-node-list.html Reviewed by Dimitri Glazkov. * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::clearRareData): * dom/Node.h: * dom/TreeScope.cpp: (WebCore::TreeScope::~TreeScope): 2011-07-04 Vsevolod Vlasov <vsevik@chromium.org> ResourceLoadNotifier::dispatchWillSendRequest should not compare StringImpl directly https://bugs.webkit.org/show_bug.cgi?id=63873 Reviewed by Alexey Proskuryakov. * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): 2011-07-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90373. http://trac.webkit.org/changeset/90373 https://bugs.webkit.org/show_bug.cgi?id=63917 Breaks Qt Linux Release minimal (Requested by vsevik on #webkit). * WebCore.exp.in: * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveContentLengthImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveContentLength): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveContentLength): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::content): (WebCore::NetworkResourcesData::ResourceData::appendContent): (WebCore::NetworkResourcesData::ResourceData::purgeContent): (WebCore::NetworkResourcesData::NetworkResourcesData): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::addResourceContent): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::ensureNoDataForIdentifier): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::hasContent): (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged): (WebCore::NetworkResourcesData::ResourceData::textEncodingName): (WebCore::NetworkResourcesData::ResourceData::setTextEncodingName): * inspector/front-end/Resource.js: * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): (WebInspector.ResourcePreviewView.prototype._createInnerView): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.hasTextContent): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveData): * loader/FrameLoader.cpp: (WebCore::FrameLoader::willLoadMediaElementURL): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::loadResourceSynchronously): (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::didReceiveData): (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength): (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): * loader/ResourceLoadNotifier.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveData): * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: 2011-07-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Show content for plugin requests in network panel. https://bugs.webkit.org/show_bug.cgi?id=30080 Reviewed by Pavel Feldman. Tests: http/tests/inspector/network/network-content-replacement-embed.html http/tests/inspector/network/network-content-replacement-xhr.html http/tests/inspector/network/network-embed.html * WebCore.exp.in: * inspector/InspectorController.cpp: (WebCore::InspectorController::setResourcesDataSizeLimitsFromInternals): * inspector/InspectorController.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveDataImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveData): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::setContent): (WebCore::NetworkResourcesData::ResourceData::purgeContent): (WebCore::NetworkResourcesData::ResourceData::createDecoder): (WebCore::NetworkResourcesData::ResourceData::dataLength): (WebCore::NetworkResourcesData::ResourceData::appendData): (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): (WebCore::NetworkResourcesData::NetworkResourcesData): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::setResourceContent): (WebCore::NetworkResourcesData::maybeAddResourceData): (WebCore::NetworkResourcesData::maybeDecodeDataToContent): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::setResourcesDataSizeLimits): (WebCore::NetworkResourcesData::ensureNoDataForIdentifier): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::hasContent): (WebCore::NetworkResourcesData::ResourceData::content): (WebCore::NetworkResourcesData::ResourceData::decoder): (WebCore::NetworkResourcesData::ResourceData::buffer): (WebCore::NetworkResourcesData::ResourceData::setBuffer): (WebCore::NetworkResourcesData::ResourceData::hasData): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get contentEncoded): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): (WebInspector.ResourcePreviewView.prototype._createEmptyView): (WebInspector.ResourcePreviewView.prototype._createPreviewView): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.hasTextContent): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveData): * loader/FrameLoader.cpp: (WebCore::FrameLoader::willLoadMediaElementURL): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::loadResourceSynchronously): (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::didReceiveData): (WebCore::ResourceLoadNotifier::dispatchDidReceiveData): (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): * loader/ResourceLoadNotifier.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveData): * testing/Internals.cpp: (WebCore::Internals::setInspectorResourcesDataSizeLimits): * testing/Internals.h: * testing/Internals.idl: 2011-07-04 Jeff Timanus <twiz@chromium.org> Reviewed by Stephen White. Prevent calls to GrapicsContext3D::deleteTexture with id 0 in DrawingBuffer::clear(). https://bugs.webkit.org/show_bug.cgi?id=63756 * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::clear): 2011-07-04 Martin Robinson <mrobinson@igalia.com> Reviewed by Andreas Kling. [GTK] r90148 did not apply to X11 platforms in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=63862 Correct the guard for an X11 specific piece of code. TARGET(X11) not defined for the GTK+ port. No new tests. This is covered by an existing test. * plugins/npapi.cpp: Correct the X11 guard. (NPN_InvalidateRect): 2011-07-04 Pavel Feldman <pfeldman@google.com> Web Inspector: implement settings panel. https://bugs.webkit.org/show_bug.cgi?id=63907 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.XHRBreakpointsSidebarPane.prototype._saveBreakpoints): (WebInspector.EventListenerBreakpointsSidebarPane.prototype._saveBreakpoints): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView): (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction): (WebInspector.ConsoleView.prototype._handleContextMenuEvent.get preserveLogItemAction): (WebInspector.ConsoleView.prototype._monitoringXHREnabledSettingChanged): (WebInspector.ConsoleView.prototype._registerShortcuts): * inspector/front-end/DOMBreakpointsSidebarPane.js: (WebInspector.DOMBreakpointsSidebarPane.prototype._saveBreakpoints): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._contextMenuEventFired): (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged): (WebInspector.ElementsPanel.prototype._registerShortcuts): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype): (): * inspector/front-end/HelpScreen.js: (WebInspector.HelpScreen): (WebInspector.HelpScreen.prototype.show): (WebInspector.HelpScreen.prototype.hide): (WebInspector.HelpScreen.prototype._onKeyDown): * inspector/front-end/NetworkItemView.js: * inspector/front-end/NetworkPanel.js: * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.saveSidebarWidth): * inspector/front-end/ProfilesPanel.js: * inspector/front-end/ResourcesPanel.js: (WebInspector.BaseStorageTreeElement.prototype.onselect): (WebInspector.StorageCategoryTreeElement.prototype.onexpand): (WebInspector.StorageCategoryTreeElement.prototype.set oncollapse): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._sourceFileAdded.get if): (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions.callback): (WebInspector.ScriptsPanel.prototype._createSidebarButtonAndRegisterShortcuts): * inspector/front-end/Settings.js: (WebInspector.Settings): (WebInspector.Settings.prototype.installApplicationSetting): (WebInspector.Setting): (WebInspector.Setting.prototype.addChangeListener): (WebInspector.Setting.prototype.removeChangeListener): (WebInspector.Setting.prototype.get var): (WebInspector.Setting.prototype): (WebInspector.Setting.prototype.set if): * inspector/front-end/SettingsScreen.js: Added. (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype._appendSection): (WebInspector.SettingsScreen.prototype._columnElement): (WebInspector.SettingsScreen.prototype._createCheckboxSetting.get listener): (WebInspector.SettingsScreen.prototype._createRadioSetting): * inspector/front-end/ShortcutsScreen.js: Renamed from Source/WebCore/inspector/front-end/ShortcutsHelp.js. (WebInspector.ShortcutsScreen): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.registerShortcuts): * inspector/front-end/WatchExpressionsSidebarPane.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/helpScreen.css: (.help-window-main): (body.attached .help-window-main): (.help-window-caption): (body.attached .help-window-caption): (.help-content): (.help-close-button): (body.attached .help-close-button): (body.attached .help-content): (.help-table): (body.platform-mac .help-key): (.help-combine-keys): (.help-content p): (.help-content fieldset): (.help-content fieldset p): (.help-content p.help-section): (.help-section-title): (.help-content input[type=checkbox]): * inspector/front-end/inspector.css: (button.settings-status-bar-item): (.settings-status-bar-item .glyph): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._toggleAttach): (WebInspector._toggleSettings): (WebInspector._registerShortcuts): (WebInspector.documentKeyDown): 2011-07-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Resources loaded to Resources Panel from InspectorPageAgent do not have mime type set. https://bugs.webkit.org/show_bug.cgi?id=63701 Pass cachedResource/documentLoader mimeType from InspectorPageAgent to frontend. Reviewed by Yury Semikhatsky. Test: http/tests/inspector/resource-tree/resource-tree-mimetype.html * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): (WebInspector.ResourceTreeModel.prototype._createResource): 2011-07-04 Yury Semikhatsky <yurys@chromium.org> Web Inspector: repeated message counter should be aligned with other message icons https://bugs.webkit.org/show_bug.cgi?id=63901 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: (.console-message .bubble): 2011-07-04 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Adding new CSS rules should be more discoverable in the UI https://bugs.webkit.org/show_bug.cgi?id=63803 * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._createNewRule): 2011-07-04 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> [Qt] Fixing build with --media-stream flag enabled https://bugs.webkit.org/show_bug.cgi?id=63831 Reviewed by Benjamin Poulain. * features.pri: Adding support to ENABLE_MEDIA_STREAM flag. 2011-07-04 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: Update network resource url from response data. https://bugs.webkit.org/show_bug.cgi?id=63736 * inspector/Inspector.json: * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForResourceResponse): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): 2011-07-04 Andrey Kosyakov <caseq@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [Extensions API] audit formatter names should begin with create https://bugs.webkit.org/show_bug.cgi?id=63802 * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.AuditResultImpl): 2011-07-03 Dominic Cooney <dominicc@chromium.org> The value property of an indeterminate progress element should be zero https://bugs.webkit.org/show_bug.cgi?id=63861 Reviewed by Kent Tamura. Test: fast/dom/HTMLProgressElement/set-progress-properties.html * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::value): 2011-07-03 Robert Hogan <robert@webkit.org> Restore scroll position on page reloads scheduled by <meta http-equiv="refresh" content="XX"/> https://bugs.webkit.org/show_bug.cgi?id=62482 If a <meta http-equiv="refresh"> directive schedules a page reload rather than a redirect restore the scroll position after the reload. Do the same on location.reload(). Reviewed by Adam Barth. Tests: http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier-2.html http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier.html http/tests/navigation/scrollstate-after-http-equiv-refresh.html http/tests/navigation/scrollstate-after-location-reload.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): Only make the load FrameLoadTypeSame if it has not already been set as FrameLoadTypeReload*. FrameLoadTypeReload* loads are set through http-equiv refreshes, manual reloads, or location.reload() and honour the user's scroll position in the frame. A FrameLoadTypeSame is for when the frame is loading the same page again, e.g. by clicking a link. * loader/NavigationScheduler.cpp: (WebCore::ScheduledRedirect::fire): Tell FrameLoader::changeLocation() if this is a reload. 2011-07-03 Dirk Schulze <krit@webkit.org> SVGAnimateTransform accumulate=sum restarts on every repeat https://bugs.webkit.org/show_bug.cgi?id=63876 Reviewed by Nikolas Zimmermann. We applied transforms from previous animation repeats to a transform list. The problem is, that we calculated the current transform based on the percentage of the current repeat count. This causes an animation starting from scale level 0 on every repeat. Now I add the repeat count to the current percentage, so that the distance calculation starts from 100% on the first repeat, from 200% on the second and so on. Test: svg/animations/svgtransform-animation-1.html * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): 2011-07-03 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90342. http://trac.webkit.org/changeset/90342 https://bugs.webkit.org/show_bug.cgi?id=63875 Newly added tests fail on Mac, GTK, and Win7 (Requested by abarth on #webkit). * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): * loader/NavigationScheduler.cpp: 2011-07-03 Robert Hogan <robert@webkit.org> Restore scroll position on page reloads scheduled by <meta http-equiv="refresh" content="XX"/> https://bugs.webkit.org/show_bug.cgi?id=62482 If a <meta http-equiv="refresh"> directive schedules a page reload rather than a redirect restore the scroll position after the reload. Do the same on location.reload(). Reviewed by Adam Barth. Tests: http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier-2.html http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier.html http/tests/navigation/scrollstate-after-http-equiv-refresh.html http/tests/navigation/scrollstate-after-location-reload.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): Only make the load FrameLoadTypeSame if it has not already been set as FrameLoadTypeReload*. FrameLoadTypeReload* loads are set through http-equiv refreshes, manual reloads, or location.reload() and honour the user's scroll position in the frame. A FrameLoadTypeSame is for when the frame is loading the same page again, e.g. by clicking a link. * loader/NavigationScheduler.cpp: (WebCore::ScheduledRedirect::fire): Tell FrameLoader::changeLocation() if this is a reload. 2011-04-02 Robert Hogan <robert@webkit.org> Reviewed by Benjamin Poulain. [Qt] Support third-party cookie policy for Qt clients https://bugs.webkit.org/show_bug.cgi?id=45455 Identifying third-party cookies is facilitated by API new to QUrl from Qt 4.8: QUrl::topLevelDomain(). This API uses the Mozilla public suffix list to determine the top-level registry-controlled domain of the Url. See also: http://gitorious.org/qt/qt/merge_requests/1205 (commit 154402f56dcf8303a6ce601a52215226af8d31ba) http://bugreports.qt.nokia.com/browse/QTBUG-13601 Test: http/tests/cookies/strict-third-party-cookie-blocking.html * WebCore.pro: * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): * platform/qt/CookieJarQt.cpp: (WebCore::setCookies): (WebCore::cookies): * platform/qt/ThirdPartyCookiesQt.cpp: Added. (WebCore::cookieJar): (WebCore::isFirstPartyCookie): (WebCore::cookieAllowed): (WebCore::allowThirdPartyCookies): * platform/qt/ThirdPartyCookiesQt.h: Added. 2011-07-03 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Alexey Proskuryakov. Web Inspector: Preflight OPTIONS requests are not shown on network panel for asynchronous XHRs. https://bugs.webkit.org/show_bug.cgi?id=63712 Added InspectorInstrumentation calls to preflight OPTIONS requests callbacks in DocumentThreadableLoader. * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::didReceiveData): (WebCore::DocumentThreadableLoader::didFinishLoading): (WebCore::DocumentThreadableLoader::didFail): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: 2011-06-23 Robert Hogan <robert@webkit.org> Reviewed by Simon Hausmann. [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin https://bugs.webkit.org/show_bug.cgi?id=30355 Test: plugins/mouse-click-plugin-clears-selection.html PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin in order to clear the FrameSelection in the currently focused node. In its platform-specific code Chromium already does this (WebPluginContainerImpl.cpp). * WebCore.exp.in: Add symbol for FocusController::setFocusedNode * plugins/PluginView.cpp: (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes the call to FocusController:setFocusedFrame() and Document::setFocusedNode() redundant, since it calls both. 2011-07-01 Michael Nordman <michaeln@google.com> Reviewed by Darin Fisher. [Chromium] FileSystem API can be used to learn about installed software on the user's computer. Added a new MIMETypeRegistry method to return a type based on a well known set of mappings without consulting the OS/registry. https://bugs.webkit.org/show_bug.cgi?id=63220 No new tests, existing layout tests that invoke file.type apply. * fileapi/File.cpp: Refactored the factory methods. (WebCore::createBlobDataForFileWithType): (WebCore::createBlobDataForFile): (WebCore::createBlobDataForFileSystemFile): (WebCore::File::File): * platform/MIMETypeRegistry.cpp: Added getWellKnownMIMETypeForExtension() method. (WebCore::mediaMIMETypeMap): (WebCore::findMimeType): (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): * platform/MIMETypeRegistry.h: * platform/chromium/MIMETypeRegistryChromium.cpp: Added getWellKnownMIMETypeForExtension() method. (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): (WebCore::findMimeType): * platform/chromium/PlatformBridge.h: 2011-07-01 Tim Horton <timothy_horton@apple.com> Reviewed by Darin Adler. SVG data:image/svg+xml;base64 URLs inside CSS throw mime type warning https://bugs.webkit.org/show_bug.cgi?id=54325 Add image/svg+xml to the list of acceptable MIME types for the Image type. * inspector/front-end/inspector.js: (WebInspector): 2011-07-01 Tim Horton <timothy_horton@apple.com> Reviewed by Darin Adler. Errors encountered within SVG documents should be reported to the console https://bugs.webkit.org/show_bug.cgi?id=62599 Add SVGElement::reportAttributeParsingError, which will write a Web Inspector console message if passed an SVGParsingError and the attribute which was being applied, only in the case where there is actually an error. Include the SVG document's URI when writing to the Web Inspector console, so that the UI displays both the filename and the line number. * svg/SVGDocumentExtensions.cpp: (WebCore::reportMessage): * svg/SVGElement.cpp: (WebCore::SVGElement::reportAttributeParsingError): * svg/SVGElement.h: 2011-07-01 Scott Byer <scottbyer@chromium.org> Reviewed by Adam Barth. Smooth scrolling fixes https://bugs.webkit.org/show_bug.cgi?id=63770 Tests: Chromium webkit_unit_tests ScrollAnimatorNoneTest.ScrollWheelTrace and .LinuxTrackPadTrace Fix issues found in manual testing; distill the traces into unit tests. Fix the issues the tests exposed in the scroll animation code. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::scroll): 2011-07-01 Levi Weintraub <leviw@chromium.org> Switch primary virtual layout functions to new layout types https://bugs.webkit.org/show_bug.cgi?id=63852 Reviewed by Eric Seidel. Switching the primary overloaded layout functions over to the new layout unit abstraction. No new tests, no functionality changes. * html/shadow/MediaControlElements.cpp: (WebCore::RenderMediaVolumeSliderContainer::layout): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::layout): * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::layout): * rendering/RenderBox.cpp: (WebCore::RenderBox::layout): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::layout): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layout): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::layout): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::layout): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::layout): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layout): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): * rendering/RenderView.cpp: (WebCore::RenderView::layout): * rendering/RenderView.h: (WebCore::RenderView::layoutDelta): (WebCore::RenderView::addLayoutDelta): * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::layout): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::layout): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::layout): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::layout): * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::layout): 2011-07-01 Sam Weinig <sam@webkit.org> Reduce parser nesting cap to 512 https://bugs.webkit.org/show_bug.cgi?id=63856 Reviewed by Dan Bernstein. Given Firefox's cap of 200, our cap of 2048 seemed a little excessive. Lower the nesting cap to 512 to cover more cases where rending recursion was biting us. * page/Settings.h: Reduce the nesting cap to 512. 2011-07-01 Darin Adler <darin@apple.com> Add change accidentally left out of last commit. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateContentsScale): Multiply in the backing scale. 2011-07-01 Darin Adler <darin@apple.com> Consider backing scale when setting up graphics layers https://bugs.webkit.org/show_bug.cgi?id=63848 Reviewed by Simon Fraser. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::clampedContentsScaleForScale): Increased the maximum scale since scale factor can now include both page contents scale and backing scale. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createGraphicsLayer): Multiply in the backing scale as well as the page contents scale. (WebCore::RenderLayerBacking::updateForegroundLayer): Ditto. (WebCore::RenderLayerBacking::updateMaskLayer): Ditto. (WebCore::RenderLayerBacking::pageContentsScale): Added. (WebCore::RenderLayerBacking::backingScale): Added. * rendering/RenderLayerBacking.h: Added new private functions. 2011-07-01 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. WebCore part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851 <rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body No new tests. I tried to make a test in DumpRenderTree with an editable WebView, but was unsuccessful in getting the crash to happen in that instance. * editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): Add a nil check that exits early, in addition to the ASSERT. 2011-07-01 Levi Weintraub <leviw@chromium.org> Switch overflow and collapsedMargins to new layout types https://bugs.webkit.org/show_bug.cgi?id=63840 Reviewed by Eric Seidel. Switching overflow and collapsedMargins over to the new layout unit abstraction. Also removing an unused function: blockDirectionOverflow No new tests, no functionality changes. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapsedMarginBeforeForChild): (WebCore::RenderBlock::collapsedMarginAfterForChild): * rendering/RenderBlock.h: (WebCore::RenderBlock::collapsedMarginBefore): (WebCore::RenderBlock::collapsedMarginAfter): * rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild): (WebCore::RenderBox::addLayoutOverflow): (WebCore::RenderBox::addVisualOverflow): * rendering/RenderBox.h: (WebCore::RenderBox::layoutOverflowRect): (WebCore::RenderBox::minYLayoutOverflow): (WebCore::RenderBox::maxYLayoutOverflow): (WebCore::RenderBox::minXLayoutOverflow): (WebCore::RenderBox::maxXLayoutOverflow): (WebCore::RenderBox::maxLayoutOverflow): (WebCore::RenderBox::logicalLeftLayoutOverflow): (WebCore::RenderBox::logicalRightLayoutOverflow): (WebCore::RenderBox::visualOverflowRect): (WebCore::RenderBox::minYVisualOverflow): (WebCore::RenderBox::maxYVisualOverflow): (WebCore::RenderBox::minXVisualOverflow): (WebCore::RenderBox::maxXVisualOverflow): (WebCore::RenderBox::logicalLeftVisualOverflow): (WebCore::RenderBox::logicalRightVisualOverflow): (WebCore::RenderBox::addOverflowFromChild): (WebCore::RenderBox::collapsedMarginBefore): (WebCore::RenderBox::collapsedMarginAfter): * rendering/RenderOverflow.h: (WebCore::RenderOverflow::RenderOverflow): (WebCore::RenderOverflow::minYLayoutOverflow): (WebCore::RenderOverflow::maxYLayoutOverflow): (WebCore::RenderOverflow::minXLayoutOverflow): (WebCore::RenderOverflow::maxXLayoutOverflow): (WebCore::RenderOverflow::minYVisualOverflow): (WebCore::RenderOverflow::maxYVisualOverflow): (WebCore::RenderOverflow::minXVisualOverflow): (WebCore::RenderOverflow::maxXVisualOverflow): (WebCore::RenderOverflow::setMinYLayoutOverflow): (WebCore::RenderOverflow::setMaxYLayoutOverflow): (WebCore::RenderOverflow::setMinXLayoutOverflow): (WebCore::RenderOverflow::setMaxXLayoutOverflow): (WebCore::RenderOverflow::setMinYVisualOverflow): (WebCore::RenderOverflow::setMaxYVisualOverflow): (WebCore::RenderOverflow::setMinXVisualOverflow): (WebCore::RenderOverflow::setMaxXVisualOverflow): (WebCore::RenderOverflow::layoutOverflowRect): (WebCore::RenderOverflow::visualOverflowRect): (WebCore::RenderOverflow::move): (WebCore::RenderOverflow::addLayoutOverflow): (WebCore::RenderOverflow::addVisualOverflow): (WebCore::RenderOverflow::setLayoutOverflow): (WebCore::RenderOverflow::setVisualOverflow): (WebCore::RenderOverflow::resetLayoutOverflow): 2011-07-01 Nate Chapin <japhet@chromium.org> Ensure WorkerScriptLoader::notifyFinished() doesn't re-enter. https://bugs.webkit.org/show_bug.cgi?id=63835 Reviewed by Dmitry Titov. Test: fast/workers/worker-finish-crash.html * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::WorkerScriptLoader): (WebCore::WorkerScriptLoader::notifyFinished): * workers/WorkerScriptLoader.h: 2011-07-01 Adrienne Walker <enne@google.com> [chromium] Upload root layer textures first so that it is less likely to be skipped https://bugs.webkit.org/show_bug.cgi?id=63850 Reviewed by James Robinson. This is a tiny follow-on patch to bug 63760. If the root layer is not uploaded first, then it may not have enough space to fit into texture memory and might be skipped, leaving a blue background. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): 2011-07-01 Mihai Parparita <mihaip@chromium.org> Reviewed by Darin Fisher. location.replace with a hash change does not update the history entry https://bugs.webkit.org/show_bug.cgi?id=63777 location.replace('#foo') would not update the HistoryItem with the new URL, thus navigating back to the page would use the previous URL, even though it had been replaced. Make HistoryController::updateForSameDocumentNavigation mirror HistoryController::replaceState. Test: fast/history/location-replace-hash.html * loader/HistoryController.cpp: (WebCore::HistoryController::updateForSameDocumentNavigation): 2011-07-01 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Ojan Vafai. Move m_isDirectional from FrameSelection to VisibleSelection https://bugs.webkit.org/show_bug.cgi?id=63473 Move m_isDirectional from FrameSelection to VisibleSelection. Also fixed a bug that WebKit does not preserve non-directional selection after undo. Test: editing/selection/directionality-after-undo-replace.html * WebCore.exp.in: Updated the signature of setSelection. * editing/FrameSelection.cpp: (WebCore::FrameSelection::FrameSelection): Removed the call to setIsDirectional. (WebCore::shouldAlwaysUseDirectionalSelection): Added. (WebCore::FrameSelection::setSelection): No longer takes DirectionalityPolicy. Calls setIsDirectional(true) when the platform doesn't support non-directional selection. Passes align and granularity to setSelection of the base end point as expected. No longer updates granularity when updating the selection of a different frame. (WebCore::FrameSelection::willBeModified): Calls VisibleSelection::isDirectional(). (WebCore::FrameSelection::modify): No longer calls trialFrameSelection.setIsDirectional because the directionality is passed from m_selection automatically. Also calls shouldAlwaysUseDirectionalSelection. * editing/FrameSelection.h: Remove m_isDirectional. Make all boolean bit fields. (WebCore::FrameSelection::setSelection): No longer takes DirectionalityPolicy. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): Initializes m_isDirectional to true. This should be changed to false to fix the bug 60529. * editing/VisibleSelection.h: (WebCore::VisibleSelection::isDirectional): Added. (WebCore::VisibleSelection::setIsDirectional): Added. * page/EventHandler.cpp: (WebCore::setNonDirectionalSelectionIfNeeded): Creates a non-directional selection instead of calling setSelection with MakeNonDirectionalSelection. (WebCore::EventHandler::handleMousePressEventSingleClick): Remove the call to setIsDirectional because it already calls setNonDirectionalSelectionIfNeeded. 2011-07-01 Tony Chang <tony@chromium.org> cleanup of flexbox and marquee data naming in StyleRareNonInheritedData https://bugs.webkit.org/show_bug.cgi?id=63827 Reviewed by Ojan Vafai. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::boxAlign): (WebCore::InheritedFlags::boxFlex): (WebCore::InheritedFlags::boxFlexGroup): (WebCore::InheritedFlags::boxLines): (WebCore::InheritedFlags::boxOrdinalGroup): (WebCore::InheritedFlags::boxOrient): (WebCore::InheritedFlags::boxPack): (WebCore::InheritedFlags::marqueeIncrement): (WebCore::InheritedFlags::marqueeSpeed): (WebCore::InheritedFlags::marqueeLoopCount): (WebCore::InheritedFlags::marqueeBehavior): (WebCore::InheritedFlags::marqueeDirection): (WebCore::InheritedFlags::setBoxAlign): (WebCore::InheritedFlags::setBoxFlex): (WebCore::InheritedFlags::setBoxFlexGroup): (WebCore::InheritedFlags::setBoxLines): (WebCore::InheritedFlags::setBoxOrdinalGroup): (WebCore::InheritedFlags::setBoxOrient): (WebCore::InheritedFlags::setBoxPack): (WebCore::InheritedFlags::setMarqueeIncrement): (WebCore::InheritedFlags::setMarqueeSpeed): (WebCore::InheritedFlags::setMarqueeDirection): (WebCore::InheritedFlags::setMarqueeBehavior): (WebCore::InheritedFlags::setMarqueeLoopCount): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: flexibleBox -> m_deprecatedFlexibleBox and marquee to m_marquee 2011-07-01 Mike Reed <reed@google.com> Stop using deprecated SkDeviceFactory API https://bugs.webkit.org/show_bug.cgi?id=63488 Reviewed by James Robinson. No new tests. Check-point for removing Factory API from Skia * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setSharedGraphicsContext3D): 2011-07-01 Jeffrey Pfau <jpfau@apple.com> Reviewed by Adam Barth. Move XMLDocumentParser to new folder xml/parser/ https://bugs.webkit.org/show_bug.cgi?id=63666 * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * WebCore.xcodeproj/project.pbxproj: * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::pushCurrentNode): (WebCore::XMLDocumentParser::popCurrentNode): (WebCore::XMLDocumentParser::clearCurrentNodeStack): (WebCore::XMLDocumentParser::insert): (WebCore::XMLDocumentParser::append): (WebCore::XMLDocumentParser::handleError): (WebCore::XMLDocumentParser::enterText): (WebCore::toString): (WebCore::XMLDocumentParser::exitText): (WebCore::XMLDocumentParser::detach): (WebCore::XMLDocumentParser::end): (WebCore::XMLDocumentParser::finish): (WebCore::XMLDocumentParser::finishWasCalled): (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLDocumentParser::insertErrorMessageBlock): (WebCore::XMLDocumentParser::notifyFinished): (WebCore::XMLDocumentParser::isWaitingForScripts): (WebCore::XMLDocumentParser::pauseParsing): (WebCore::XMLDocumentParser::parseDocumentFragment): * xml/parser/XMLDocumentParser.h: (WebCore::XMLParserContext::context): (WebCore::XMLParserContext::XMLParserContext): (WebCore::XMLDocumentParser::create): (WebCore::XMLDocumentParser::setIsXHTMLDocument): (WebCore::XMLDocumentParser::isXHTMLDocument): (WebCore::XMLDocumentParser::setIsXHTMLMPDocument): (WebCore::XMLDocumentParser::isXHTMLMPDocument): (WebCore::XMLDocumentParser::wellFormed): (WebCore::XMLDocumentParser::context): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::~PendingCallbacks): (WebCore::PendingCallbacks::create): (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendEndElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::PendingCallbacks::callAndRemoveFirstCallback): (WebCore::PendingCallbacks::isEmpty): (WebCore::PendingCallbacks::PendingCallbacks): (WebCore::PendingCallbacks::PendingCallback::~PendingCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::call): (WebCore::PendingCallbacks::PendingEndElementNSCallback::call): (WebCore::PendingCallbacks::PendingCharactersCallback::~PendingCharactersCallback): (WebCore::PendingCallbacks::PendingCharactersCallback::call): (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::~PendingProcessingInstructionCallback): (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call): (WebCore::PendingCallbacks::PendingCDATABlockCallback::~PendingCDATABlockCallback): (WebCore::PendingCallbacks::PendingCDATABlockCallback::call): (WebCore::PendingCallbacks::PendingCommentCallback::~PendingCommentCallback): (WebCore::PendingCallbacks::PendingCommentCallback::call): (WebCore::PendingCallbacks::PendingInternalSubsetCallback::~PendingInternalSubsetCallback): (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call): (WebCore::matchFunc): (WebCore::OffsetBuffer::OffsetBuffer): (WebCore::OffsetBuffer::readOutBytes): (WebCore::switchToUTF16): (WebCore::shouldAllowExternalLoad): (WebCore::openFunc): (WebCore::readFunc): (WebCore::writeFunc): (WebCore::closeFunc): (WebCore::errorFunc): (WebCore::XMLParserContext::createStringParser): (WebCore::XMLParserContext::createMemoryParser): (WebCore::XMLDocumentParser::supportsXMLVersion): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLParserContext::~XMLParserContext): (WebCore::XMLDocumentParser::~XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::toString): (WebCore::toAtomicString): (WebCore::handleElementNamespaces): (WebCore::handleElementAttributes): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::endElementNs): (WebCore::XMLDocumentParser::characters): (WebCore::XMLDocumentParser::error): (WebCore::XMLDocumentParser::processingInstruction): (WebCore::XMLDocumentParser::cdataBlock): (WebCore::XMLDocumentParser::comment): (WebCore::XMLDocumentParser::startDocument): (WebCore::XMLDocumentParser::endDocument): (WebCore::XMLDocumentParser::internalSubset): (WebCore::getParser): (WebCore::hackAroundLibXMLEntityBug): (WebCore::startElementNsHandler): (WebCore::endElementNsHandler): (WebCore::charactersHandler): (WebCore::processingInstructionHandler): (WebCore::cdataBlockHandler): (WebCore::commentHandler): (WebCore::warningHandler): (WebCore::fatalErrorHandler): (WebCore::normalErrorHandler): (WebCore::sharedXHTMLEntity): (WebCore::getXHTMLEntity): (WebCore::getEntityHandler): (WebCore::startDocumentHandler): (WebCore::endDocumentHandler): (WebCore::internalSubsetHandler): (WebCore::externalSubsetHandler): (WebCore::ignorableWhitespaceHandler): (WebCore::XMLDocumentParser::initializeParserContext): (WebCore::XMLDocumentParser::doEnd): (WebCore::xmlDocPtrForString): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): (WebCore::XMLDocumentParser::textPositionOneBased): (WebCore::XMLDocumentParser::stopParsing): (WebCore::XMLDocumentParser::resumeParsing): (WebCore::XMLDocumentParser::appendFragmentSource): (WebCore::attributesStartElementNsHandler): (WebCore::parseAttributes): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::EntityResolver::resolveUndeclaredEntity): (WebCore::XMLDocumentParser::supportsXMLVersion): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::~XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::initializeParserContext): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): (WebCore::XMLDocumentParser::textPositionOneBased): (WebCore::XMLDocumentParser::stopParsing): (WebCore::XMLDocumentParser::resumeParsing): (WebCore::XMLDocumentParser::appendFragmentSource): (WebCore::attributesStartElementNsHandler): (WebCore::parseAttributes): (WebCore::prefixFromQName): (WebCore::handleElementNamespaces): (WebCore::handleElementAttributes): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::startDocument): (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseEndElement): (WebCore::XMLDocumentParser::parseCharacters): (WebCore::XMLDocumentParser::parseProcessingInstruction): (WebCore::XMLDocumentParser::parseCdata): (WebCore::XMLDocumentParser::parseComment): (WebCore::XMLDocumentParser::endDocument): (WebCore::XMLDocumentParser::hasError): (WebCore::XMLDocumentParser::parseDtd): * xml/parser/XMLDocumentParserScope.cpp: (WebCore::XMLDocumentParserScope::XMLDocumentParserScope): (WebCore::XMLDocumentParserScope::~XMLDocumentParserScope): 2011-07-01 Vangelis Kokkevis <vangelis@chromium.org> Reviewed by James Robinson. [chromium] Reserve all tile textures at layer update time to guarantee that they will be available at draw time. https://bugs.webkit.org/show_bug.cgi?id=63760 In addition, this patch unreserves textures used by RenderSurface's right after the RenderSurface has been used to free up memory for subsequent RenderSurfaces. This patch also "fixes" the pages that display a blue background when running out of texture memory as the root layer tiles get reserved first and are guaranteed to get textures. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::visibleLayerRect): (WebCore::ContentLayerChromium::setIsMask): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayer): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerTexture.cpp: (WebCore::LayerTexture::unreserve): * platform/graphics/chromium/LayerTexture.h: * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::drawTiles): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::releaseContentsTexture): * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::unprotectTexture): * platform/graphics/chromium/TextureManager.h: 2011-07-01 Jungshik Shin <jshin@chromium.org> Reviewed by Alexey Proskuryakov. Allow generic font family settings per script code. https://bugs.webkit.org/show_bug.cgi?id=20797 Make generic font family getters/setters accept an additional argument (script code). It has a default value so that if an embedder does not have/want a per-script font family setting, call-sites don't have to be changed. This is to prepare for fixing bug 10874 (font selection is not language-dependent) and bug 18085. uscript.h has been updated to that of ICU 3.6 (the version of ICU on Mac OS 10.5) There should be no change in layout and no new layout test is added. * WebCore.exp.in: * icu/unicode/uscript.h: updated to ICU 4.6 * page/Settings.cpp: (WebCore::setGenericFontFamilyMap): helper to set generic family per script (WebCore::getGenericFontFamilyForScript): helper function used by getters for fooFontFamily. (WebCore::Settings::standardFontFamily): (WebCore::Settings::setStandardFontFamily): (WebCore::Settings::fixedFontFamily): (WebCore::Settings::setFixedFontFamily): (WebCore::Settings::serifFontFamily): (WebCore::Settings::setSerifFontFamily): (WebCore::Settings::sansSerifFontFamily): (WebCore::Settings::setSansSerifFontFamily): (WebCore::Settings::cursiveFontFamily): (WebCore::Settings::setCursiveFontFamily): (WebCore::Settings::fantasyFontFamily): (WebCore::Settings::setFantasyFontFamily): * page/Settings.h: setter and getter for FooFontFamily have a new optional argument, scriptCode. 2011-07-01 Tony Chang <tony@chromium.org> Reviewed by Ojan Vafai. rename StyleFlexibleBoxData to StyleDeprecatedFlexibleBoxData https://bugs.webkit.org/show_bug.cgi?id=63773 We will have a similar struct to hold CSS3 flexible box data, so this makes way for the new class. I will rename the member variable in RenderStyle.h in a follow up change. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.order: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/style/RenderStyle.h: * rendering/style/StyleAllInOne.cpp: * rendering/style/StyleDeprecatedFlexibleBoxData.cpp: (WebCore::StyleDeprecatedFlexibleBoxData::StyleDeprecatedFlexibleBoxData): (WebCore::StyleDeprecatedFlexibleBoxData::operator==): * rendering/style/StyleDeprecatedFlexibleBoxData.h: (WebCore::StyleDeprecatedFlexibleBoxData::create): (WebCore::StyleDeprecatedFlexibleBoxData::copy): (WebCore::StyleDeprecatedFlexibleBoxData::operator!=): * rendering/style/StyleRareNonInheritedData.h: 2011-07-01 Hans Wennborg <hans@chromium.org> Reviewed by Tony Chang. IndexedDB: Fix constants for webkitIDBTransaction.READ_WRITE/READ_ONLY https://bugs.webkit.org/show_bug.cgi?id=63754 Fix values for the webkitIDBTransaction.READ_WRITE/READ_ONLY constants. Douglas Stockwell pointed out that these were reverse of what the spec says. * storage/IDBTransaction.h: * storage/IDBTransaction.idl: 2011-07-01 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch positionForPoint to new layout types https://bugs.webkit.org/show_bug.cgi?id=63774 Switching positionForPoint functions to new layout unit abstraction. No new tests, no functionality changes. * rendering/RenderBR.cpp: (WebCore::RenderBR::positionForPoint): * rendering/RenderBR.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForPoint): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint): * rendering/RenderBox.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::positionForPoint): * rendering/RenderFileUploadControl.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::positionForPoint): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::positionForPoint): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::positionForPoint): * rendering/RenderReplaced.h: * rendering/RenderText.cpp: (WebCore::RenderText::positionForPoint): * rendering/RenderText.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlInnerBlock::positionForPoint): * rendering/RenderTextControlSingleLine.h: * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::positionForPoint): * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::positionForPoint): * rendering/svg/RenderSVGText.h: 2011-07-01 Andrew Scherkus <scherkus@chromium.org> Reviewed by Darin Fisher. Re-enable WTF_USE_WEBAUDIO_FFMPEG for Chromium https://bugs.webkit.org/show_bug.cgi?id=63783 * WebCore.gyp/WebCore.gyp: 2011-07-01 Patrick Gansterer <paroga@webkit.org> Reviewed by Daniel Bates. [CMake] Don't compile unused bindings https://bugs.webkit.org/show_bug.cgi?id=63741 * UseJSC.cmake: Added IF (ENABLE_XXX) around files. 2011-07-01 Joone Hur <joone.hur@collabora.co.uk> Reviewed by Martin Robinson. [GTK] Add DeviceOrientation feature https://bugs.webkit.org/show_bug.cgi?id=63720 Add DeviceMotionClientGtk.cpp and DeviceOrientationClientGtk.cpp to WebKitGtk+ build. * GNUmakefile.am: Add DeviceMotionClientGtk.cpp, DeviceOrientationClientGtk.cpp. 2011-07-01 Kentaro Hara <haraken@google.com> Reviewed by Kent Tamura. Disallow clicking an [X] button in 'search' input forms when 'disabled' attribute or 'readonly' attribute is set. https://bugs.webkit.org/show_bug.cgi?id=63709 Ignore a cancel button event on a 'search' input form if 'disabled' attribute or 'readonly' attribute is set to the input form. Test: fast/forms/search-disabled-readonly.html * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): 2011-06-30 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [Chromium] Fix heap snapshots in a remote debugging session from Safari. https://bugs.webkit.org/show_bug.cgi?id=63703 * inspector/front-end/HeapSnapshotWorker.js: (.Function.prototype.bind.return.bound): (.Function.prototype.bind): 2011-07-01 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedLengthListAnimator does not take additive="sum" into accout https://bugs.webkit.org/show_bug.cgi?id=63705 Added support for additive animations to SVGAnimatedLengthListAnimator. Don't clear the animatedList if not necessary. SVGLength unit gets animated as well now. We used to take the unit of 'from' all the time. Tests: svg/animations/svglength-animation-unitType.html svg/animations/svglengthlist-animation-5.html * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): Code clean-up and support for unit animation. * svg/SVGAnimatedLengthList.cpp: Add support for additive animations. (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): * svg/SVGLength.cpp: (WebCore::SVGLength::SVGLength): (WebCore::SVGLength::setValue): New setValue that gets the LengthType and UnitType as argument for supporting animations of units as well. * svg/SVGLength.h: 2011-07-01 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedType should support SVGAnimatedInteger animation https://bugs.webkit.org/show_bug.cgi?id=63789 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedInteger. SVGAnimatedInteger is used for some attributes of SVG filter effects. The animation of those attributes work after this patch. Test: svg/animations/svginteger-animation-1.html * CMakeLists.txt: Added file to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Make use of AnimatedInteger. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedInteger.cpp: Added. The new animator for SVGAnimatedInteger. (WebCore::SVGAnimatedIntegerAnimator::SVGAnimatedIntegerAnimator): (WebCore::SVGAnimatedIntegerAnimator::constructFromString): (WebCore::SVGAnimatedIntegerAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedIntegerAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedIntegerAnimator::calculateDistance): * svg/SVGAnimatedInteger.h: (WebCore::SVGAnimatedIntegerAnimator::~SVGAnimatedIntegerAnimator): * svg/SVGAnimatedType.cpp: Added handler for AnimatedInteger. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createInteger): (WebCore::SVGAnimatedType::integer): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): 2011-06-30 Eugene Klyuchnikov <eustas.bug@gmail.com> Reviewed by Pavel Feldman. WebInspector: Performance / memory allocation issue in WebInspector.TextEditorModel.prototype._replaceTabsIfNeeded https://bugs.webkit.org/show_bug.cgi?id=40447 Test: inspector/editor/text-editor-model-replace-tabs.html * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.prototype._replaceTabsIfNeeded): avoid looped production of tail substrings 2011-06-30 Kent Tamura <tkent@chromium.org> Reviewed by Tony Chang. [Chromium] Input type="range" slider thumb is rendered upside down on Mac OS X. https://bugs.webkit.org/show_bug.cgi?id=63697 http://trac.webkit.org/changeset/86261 added a thumb flipping code for Mac-WebKit2. Chromium also needs it. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderThumb): Always flip vertically on Chromium. 2011-06-30 Kenichi Ishibashi <bashi@chromium.org> Reviewed by Simon Fraser. [Chromium] -webkit-text-stroke doesn't affect with non-zero width border property https://bugs.webkit.org/show_bug.cgi?id=63698 Restore the stroke style when it is modified in RenderObject::drawLineForBoxSide() to show text stroke correctly. Test: platform/chromium/fast/text/text-stroke-with-border.html * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): Save/restore the stroke style. 2011-06-30 Gwang Yoon Hwang <ryumiel@company100.net> Reviewed by Nate Chapin. [V8] Add ENABLE(INSPECTOR) guards around v8 custom bindings. https://bugs.webkit.org/show_bug.cgi?id=63442 No new tests needed. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: 2011-06-30 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Remove positionForCoordinates https://bugs.webkit.org/show_bug.cgi?id=63765 Removing positionForCoordinate. We should always use positionForPoint. Also cleaning up RenderBox's implementation of positionForPoint. No new tests, there should be no functionality changes. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::stringValue): Removing dead, or at least untested, code and adding an ASSERT_NOT_REACHED. (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine): * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint): cleaning up some ugly code. * rendering/RenderInline.cpp: (WebCore::RenderInline::positionForPoint): * rendering/RenderObject.cpp: * rendering/RenderObject.h: 2011-06-30 Zhenyao Mo <zmo@google.com> Reviewed by Kenneth Russell. Improve WebGL object lifetime management in WebGLRenderingContext https://bugs.webkit.org/show_bug.cgi?id=63635 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getAttachedShaders): Use cached objects instead of querying the underlying GL. (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Ditto. (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects): Multiple loop because objects might be removed from the table within an iteration. * html/canvas/WebGLRenderingContext.h: 2011-06-30 Rafael Brandao <rafael.lobo@openbossa.org> Reviewed by Andreas Kling. [Qt] build-webkit warning: cannot find file ElementShadowPseudoId.h https://bugs.webkit.org/show_bug.cgi?id=63747 Removed reference to ElementShadowPseudoId.h that no longer exists. * WebCore.pro: 2011-06-30 Anders Carlsson <andersca@apple.com> Fix clang build. Remove the complete Widget constructor from the .exp.in file; since Widget is an abstract class, its complete constructor can never be called and clang has stopped emitting it altogether. * WebCore.exp.in: 2011-06-30 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintingRootRect and RenderObject repaint methods to new layout types https://bugs.webkit.org/show_bug.cgi?id=63746 Switching paintingRootRect and RenderObject repaint functions over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/RenderBox.cpp: (WebCore::RenderBox::repaintDuringLayoutIfMoved): * rendering/RenderBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::paintingRootRect): (WebCore::RenderObject::paint): (WebCore::RenderObject::repaintUsingContainer): (WebCore::RenderObject::repaintRectangle): (WebCore::RenderObject::repaintAfterLayoutIfNeeded): (WebCore::RenderObject::repaintDuringLayoutIfMoved): * rendering/RenderObject.h: 2011-06-30 Cary Clark <caryclark@google.com> Reviewed by James Robinson. Use Skia if Skia on Mac Chrome is enabled https://bugs.webkit.org/show_bug.cgi?id=62999 No new tests. This does not affect existing functionality. * WebCore.gyp/WebCore.gyp: Include Skia and related files and exclude CG and related files when building Chromium for Skia on the Mac. * loader/cache/CachedFont.cpp: Rename CHROME to CHROMIUM. * platform/chromium/DragImageRef.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.h: * platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::hash): * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/SimpleFontData.h: * platform/graphics/cg/FloatPointCG.cpp: * platform/graphics/cg/FloatRectCG.cpp: * platform/graphics/cg/FloatSizeCG.cpp: * platform/graphics/cg/IntPointCG.cpp: * platform/graphics/cg/IntRectCG.cpp: * platform/graphics/cg/IntSizeCG.cpp: * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto. 2011-06-30 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Nikolas Zimmermann. Update SVG position values on SVG DOM updates https://bugs.webkit.org/show_bug.cgi?id=62439 Test: svg/custom/crash-textPath-attributes.html * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::destroy): Notify our containing RenderSVGText that it needs to update its positioning information. * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::calculateBoundaries): Check the type of the InlineBox like the rest of the code (fixes an ASSERT_NOT_REACHED in InlineBox::calculateBoudaries). * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree): Clear our cached layout attributes every time we invalidate them. This avoids keeping stale attribute that have a backpointer to a RenderObject. 2011-06-30 Sreeram Ramachandran <sreeram@chromium.org> Reviewed by Adam Barth. Suppress modal JavaScript/HTML dialogs during unload events https://bugs.webkit.org/show_bug.cgi?id=56397 Allows clients to specify whether to show alerts during unload handlers. When checking for whether a page dismissal event is being dispatched, it's important to check all frames on the page (otherwise it becomes a loophole easily exploited). Test: fast/loader/page-dismissal-modal-dialogs.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::fireBeforeUnloadEvent): * loader/FrameLoader.h: (WebCore::FrameLoader::pageDismissalEventBeingDispatched): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestImage): * page/Chrome.cpp: (WebCore::canRunModalIfDuringPageDismissal): (WebCore::Chrome::canRunModalNow): (WebCore::Chrome::runJavaScriptAlert): (WebCore::Chrome::runJavaScriptConfirm): (WebCore::Chrome::runJavaScriptPrompt): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::shouldRunModalDialogDuringPageDismissal): * page/DOMWindow.cpp: (WebCore::DOMWindow::showModalDialog): 2011-06-30 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Nikolas Zimmermann. Assertion failure in RenderSVGInlineText::characterStartsNewTextChunk https://bugs.webkit.org/show_bug.cgi?id=63076 Tests: svg/custom/crash-text-in-textpath.svg svg/custom/text-node-in-text-invalidated.svg The problem was that we did not call setNeedsPositionUpdate on RenderSVGText. When doing our layout, we would not update the attributes on our SVGRenderInlineText as we would not lay it out. This was caused by childrenChanged being overridden on SVGTextPositioningElement but not on SVGTextPathElement. As both classes shared the same mother class, it made sense to move the logic here. There should be no other side effects as SVGTextPathElement and SVGTextPositioningElement are the only classes deriving from SVGTextContentElement. * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::childrenChanged): Moved this method from SVGTextPositioningElement. * svg/SVGTextContentElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): Updated after updatePositioningValuesInRenderer removal, replaced by RenderSVGText::locateRenderSVGTextAncestor. * svg/SVGTextPositioningElement.h: 2011-06-30 Patrick Gansterer <paroga@webkit.org> Unreviewed build fix for !ENABLE(DATABASE) after r84789. * bindings/js/JSDOMBinding.cpp: 2011-06-30 Anders Carlsson <andersca@apple.com> Reviewed by Dan Bernstein. More ScrollableArea scaffolding https://bugs.webkit.org/show_bug.cgi?id=63678 Add a way to get the enclosing scrollable area for a given scrollable area. Also, add ScrollableArea::isPinnedInDirectionOfScrollDelta. * page/FrameView.cpp: (WebCore::FrameView::enclosingScrollableArea): Return 0 for now. * page/FrameView.h: Add FrameView::enclosingScrollableArea. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::isPinnedInDirectionOfScrollDelta): Return whether the area is pinned in the direction of the scroll delta. * platform/ScrollableArea.h: Add new member functions. * platform/chromium/FramelessScrollView.cpp: (WebCore::FramelessScrollView::enclosingScrollableArea): * platform/chromium/FramelessScrollView.h: Add stub. * platform/win/PopupMenuWin.h: (WebCore::PopupMenuWin::enclosingScrollableArea): Always return 0. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::enclosingScrollableLayer): Add helper function. (WebCore::RenderLayer::scrollByRecursively): Use the new enclosingScrollableLayer helper function. (WebCore::RenderLayer::enclosingScrollableArea): Return the enclosing scrollable area. * rendering/RenderLayer.h: Add new member function. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::enclosingScrollableArea): Return 0 for now. * rendering/RenderListBox.h: Add new member function. 2011-06-30 Martin Robinson <mrobinson@igalia.com> Reviewed by Anders Carlsson. [GTK] Crash observed with nspluginwrapper and flash https://bugs.webkit.org/show_bug.cgi?id=62249 Test: plugins/invalidate-rect-with-null-npp-argument.html * plugins/npapi.cpp: (NPN_InvalidateRect): Guard against null instances here. 2011-06-30 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch availableWidth/Height, logicalLeft/RightOffsetForLine to new layout types https://bugs.webkit.org/show_bug.cgi?id=63671 Switch availableWidth/Height, logicalLeft/RightOffsetForLine functions over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::availableLogicalWidthForLine): (WebCore::RenderBlock::availableLogicalWidth): * rendering/RenderBlock.h: (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::startOffsetForLine): * rendering/RenderBox.cpp: (WebCore::RenderBox::availableLogicalHeight): (WebCore::RenderBox::availableLogicalHeightUsing): * rendering/RenderBox.h: (WebCore::RenderBox::availableLogicalWidth): (WebCore::RenderBox::availableWidth): (WebCore::RenderBox::availableHeight): 2011-06-30 Adam Barth <abarth@webkit.org> Remove useless ASSERT that breaks the build. * dom/StyledElement.cpp: (WebCore::parseColorStringWithCrazyLegacyRules): 2011-06-30 Tab Atkins <jackalmage@gmail.com> Reviewed by Adam Barth. Fix legacy color attribute parsing to match HTML spec https://bugs.webkit.org/show_bug.cgi?id=63029 Relevant spec link: http://www.whatwg.org/specs/web-apps/current-work/complete/common-microsyntaxes.html#rules-for-parsing-a-legacy-color-value Fix legacy color attribute parsing (<body bgcolor>, <font color>, etc.) to match the HTML spec and more closely match other browsers. Test: fast/dom/attribute-legacy-colors.html * dom/StyledElement.cpp: (WebCore::StyledElement::addCSSColor): 2011-06-28 Hans Wennborg <hans@chromium.org> Reviewed by Tony Chang. IndexedDB: Prepare for running layout tests with LevelDB https://bugs.webkit.org/show_bug.cgi?id=63593 Migration of data from SQLite to LevelDB must be done before the m_backingStore map is checked for an open LevelDB, because if a previous layout test has used LevelDB, it will be in the m_backingStore map. Covered by existing layout tests. * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): 2011-06-30 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: introduce "filter" icons for timeline panel and elements sidebar. https://bugs.webkit.org/show_bug.cgi?id=63731 * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/Images/paneFilterButtons.png: Added. * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/StylesSidebarPane.js: * inspector/front-end/inspector.css: (.pane > .title > select): (.pane > .title > select.select-settings): (.pane > .title > select.select-filter): (.timeline-filter-status-bar-item .glyph): 2011-06-28 Hans Wennborg <hans@chromium.org> Reviewed by Tony Chang. IndexedDB: Support for deleteIndex with LevelDB backing store https://bugs.webkit.org/show_bug.cgi?id=63539 Covered by storage/indexeddb/mozilla/remove-index.html. * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::deleteIndex): 2011-06-30 Abhishek Arya <inferno@chromium.org> Reviewed by Ryosuke Niwa. Crash when calling DOMSubtreeModified event when extracting range contents. https://bugs.webkit.org/show_bug.cgi?id=63650 Convert a few nodes to RefPtrs and add commonRoot verification checks for Range::processContents. Tests: fast/dom/Range/range-extract-contents-event-fire-crash.html fast/dom/Range/range-extract-contents-event-fire-crash2.html * dom/Range.cpp: (WebCore::childOfCommonRootBeforeOffset): (WebCore::Range::processContents): (WebCore::Range::processContentsBetweenOffsets): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-06-30 Dan Bernstein <mitz@apple.com> Reviewed by Adele Peterson. Add +[WebView _allowsRoundingHacks] https://bugs.webkit.org/show_bug.cgi?id=63734 * WebCore.exp.in: Export TextRun::allowsRoundingHacks(). * platform/graphics/TextRun.cpp: (WebCore::TextRun::allowsRoundingHacks): Added this accessor. * platform/graphics/TextRun.h: 2011-06-30 Patrick Gansterer <paroga@webkit.org> Reviewed by Adam Roben. [WIN] Don't redefine the keyboard codes https://bugs.webkit.org/show_bug.cgi?id=63726 Only define the codes when undefined. r64957 fixed this problem for COMPILER(MINGW) but not for OS(WINCE). * platform/WindowsKeyboardCodes.h: 2011-06-30 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: hide "Enabled background events collection" option in context menu until the setting is persisted https://bugs.webkit.org/show_bug.cgi?id=63708 The option has no much sense if it is not preserved between browser restarts. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._contextMenu): 2011-06-30 Patrick Gansterer <paroga@webkit.org> Reviewed by Darin Adler. Remove dependnecy on IDL generation for disabled features in JSC bindings https://bugs.webkit.org/show_bug.cgi?id=63718 Move the #if ENABLE() line directly after #include "config.h". This enables us to compile all files even when we don't generate the IDL output. * bindings/js/IDBBindingUtilities.cpp: * bindings/js/JSConsoleCustom.cpp: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSDOMApplicationCacheCustom.cpp: * bindings/js/JSDeviceMotionEventCustom.cpp: * bindings/js/JSDeviceOrientationEventCustom.cpp: * bindings/js/JSInjectedScriptHostCustom.cpp: * bindings/js/JSInjectedScriptManager.cpp: * bindings/js/JSInspectorFrontendHostCustom.cpp: * bindings/js/JSJavaScriptCallFrameCustom.cpp: * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSSQLTransactionSyncCustom.cpp: * bindings/js/JSSVGElementInstanceCustom.cpp: * bindings/js/JSStorageCustom.cpp: * bindings/js/JSTouchCustom.cpp: * bindings/js/JSTouchListCustom.cpp: * bindings/js/JSXPathResultCustom.cpp: * bindings/js/JavaScriptCallFrame.cpp: * bindings/js/PageScriptDebugServer.cpp: * bindings/js/ScriptDebugServer.cpp: * bindings/js/ScriptGCEvent.cpp: * bindings/js/ScriptProfile.cpp: * bindings/js/WorkerScriptDebugServer.cpp: 2011-06-30 Alexander Pavlov <apavlov@chromium.org> Reviewed by Kent Tamura. [Chromium] Autofill suggestions appear in upper left corner after input change https://bugs.webkit.org/show_bug.cgi?id=63702 This change fixes a few popup layout issues, some of which have existed for quite a while: - the absence of the ChromeClientImpl::screenToWindow() implementation (the method used to always return (0, 0)); - the confusion of window and screen coordinates passed into the autofill popup client's setWindowRect() method; - the use of the current frameRect() width as the target element's width (which was wrong when refreshing a popup resized during the initial layout (e.g. made wider than the target element)). No new tests, as this is a change to platform-specific widget code. The test case is provided in the bug description. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::layoutAndGetRTLOffset): Use original target element width, not frameRect().width(), since the latter gets updated if the popup is not the same width as the target element. (WebCore::PopupContainer::refresh): Restore only the popup bounds rather than its original rectangle, since it sometimes breaks the invalidation region and layout. 2011-06-30 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r90102. http://trac.webkit.org/changeset/90102 https://bugs.webkit.org/show_bug.cgi?id=63714 Lots of tests asserting beneath SVGSMILElement::findInstanceTime (Requested by aroben on #webkit). * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::findInstanceTime): 2011-06-30 Andrey Kosyakov <caseq@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: remove ExtensionAPISchema.json https://bugs.webkit.org/show_bug.cgi?id=63687 * inspector/front-end/ExtensionAPISchema.json: Removed. 2011-06-30 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed build fix for chromium. * inspector/CodeGeneratorInspector.pm: 2011-06-30 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed build fix for mac. * inspector/CodeGeneratorInspector.pm: 2011-06-30 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Protocol: error object needs some improvement. https://bugs.webkit.org/show_bug.cgi?id=63707 Current implementation is not useful in the code. We need to have toString implementation with nice formatting I'd like to use error.message property as the main place for the error's text. * inspector/CodeGeneratorInspector.pm: 2011-06-30 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [Chromium] Support annotations for arrays in heap profiler. https://bugs.webkit.org/show_bug.cgi?id=63690 * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): 2011-06-30 Patrick Gansterer <paroga@webkit.org> Unreviewed build fix for !ENABLE(SVG_ANIMATION) after r88663, r89187, r89220, r89431 and r89661. * svg/SVGAnimatedAngle.h: * svg/SVGAnimatedLength.h: * svg/SVGAnimatedNumber.h: * svg/SVGAnimatedRect.h: * svg/SVGAnimatedString.h: 2011-06-30 Gabor Loki <loki@webkit.org> Reviewed by Csaba Osztrogonác. Fixed several style and typo issues after r90091. https://bugs.webkit.org/show_bug.cgi?id=63692 Rename yStart to extremaStartY during computing extremas * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplyGeneric): * platform/graphics/filters/FEMorphology.h: 2011-06-30 Oliver Varga <Varga.Oliver@stud.u-szeged.hu> Reviewed by Nikolas Zimmermann. Speed up SVGSMILElement::findInstanceTime. https://bugs.webkit.org/show_bug.cgi?id=61025 Replace the linear search to binary search on ordered list because the previous searches from the beginning was not efficient. No new tests this is only a performance tweak. * svg/animation/SVGSMILElement.cpp: (WebCore::extractTimeFromVector): (WebCore::SVGSMILElement::findInstanceTime): 2011-06-30 Kentaro Hara <haraken@google.com> Reviewed by Kent Tamura. Change the label of an HTML5 file chooser button to "Choose Files" https://bugs.webkit.org/show_bug.cgi?id=49245 We should notify capability of multiple files to users. Test: fast/forms/input-file-label.html * English.lproj/Localizable.strings: * html/FileInputType.cpp: (WebCore::UploadButtonElement::createForMultiple): Constructs a multiple file chooser button. (WebCore::FileInputType::createShadowSubtree): Constructs a single/multiple file chooser button depending on 'multiple' attribute. (WebCore::FileInputType::multipleAttributeChanged): Updates the label of the file chooser button. * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Updates the shadow tree of the file chooser button when 'multiple' attribute is set or unset. * html/InputType.cpp: (WebCore::InputType::multipleAttributeChanged): Virtual method to be overridden by FileInputType. * html/InputType.h: * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::fileButtonChooseFileLabel): Updated the description for "Choose File". (WebCore::DefaultLocalizationStrategy::fileButtonChooseMultipleFilesLabel): Returns a string "Choose Files". * platform/DefaultLocalizationStrategy.h: * platform/LocalizationStrategy.h: * platform/LocalizedStrings.cpp: (WebCore::fileButtonChooseMultipleFilesLabel): Wrapper method for getting the "Choose Files" label. * platform/LocalizedStrings.h: * platform/brew/LocalizedStringsBrew.cpp: (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label. * platform/efl/LocalizedStringsEfl.cpp: (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label. * platform/haiku/LocalizedStringsHaiku.cpp: (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label. * platform/wx/LocalizedStringsWx.cpp: (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label. 2011-06-30 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Kent Tamura. Replace isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&) https://bugs.webkit.org/show_bug.cgi?id=63672 Replaced isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&). Also added a safe toTextFormControl to HTMLFormControlElement.h. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::doApply): Calls enclosingTextFormControl instead of manually checking the tag name of shadowAncestorNode. * editing/Editor.cpp: (WebCore::Editor::selectionForCommand): Rewritten using enclosingTextFormControl and toTextFormControl. (WebCore::Editor::cut): Calls enclosingTextFormControl instead of isNodeInTextFormControl. (WebCore::Editor::copy): Ditto. (WebCore::Editor::setBaseWritingDirection): Calls toTextFormControl instead of manually checking tag name. * editing/FrameSelection.cpp: (WebCore::FrameSelection::isInPasswordField): Calls enclosingTextFormControl. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Ditto. * editing/htmlediting.cpp: (WebCore::enclosingTextFormControl): Added. * editing/htmlediting.h: * html/HTMLFormControlElement.h: (WebCore::toTextFormControl): Added. * page/DragController.cpp: (WebCore::DragController::startDrag): Calls enclosingTextFormControl instead of isNodeInTextFormControl. 2011-06-27 Pavel Podivilov <podivilov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: source code is not highlighted after drawer height animations. https://bugs.webkit.org/show_bug.cgi?id=62860 * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished): (WebInspector.Drawer.prototype._animateDrawerHeight): 2011-06-30 MORITA Hajime <morrita@google.com> Reviewed by Dimitri Glazkov. Crash if ShadowRoot has a text node. https://bugs.webkit.org/show_bug.cgi?id=63607 Node::styleForRenderer() for Text node wasn't shadow-aware. This change allow styleForRenderer() to know its visual parent by passing NodeRenderingContext. Changes other than NodeRenderingContext and Element is just a follow up for change above. * dom/Element.cpp: use NodeRenderingContext to resolve parent node. (WebCore::Element::recalcStyle): * dom/Node.cpp: (WebCore::Node::styleForRenderer): Added NodeRenderingContext as a parameter. * dom/Node.h: * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::textWithDirection): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::styleForRenderer): (WebCore::TextControlInnerTextElement::styleForRenderer): * html/shadow/TextControlInnerElements.h: Test: fast/dom/shadow/shadow-root-text-child.html 2011-06-30 Piroska András <Piroska.Andras@stud.u-szeged.hu> Reviewed by Dirk Schulze. Apply the ParallelJobs support to FEMorphology https://bugs.webkit.org/show_bug.cgi?id=63064 The FEMorphology filter of SVG can consume lots of resources if it is applied to a large area. The computation can be distributed to multiple cores if the architecture supports. The average performance progression is 20-25% on dual-core machines. * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplyGeneric): Apply the filter between yStart and yEnd interval (WebCore::FEMorphology::platformApplyWorker): Call the generic apply from a parallel worker (WebCore::FEMorphology::platformApply): (WebCore::FEMorphology::apply): Move the functionality into platformApply (WebCore::FEMorphology::externalRepresentation): Remove whitespaces * platform/graphics/filters/FEMorphology.h: 2011-06-29 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. Avoid custom layout code of RenderTextControlSingleLine https://bugs.webkit.org/show_bug.cgi?id=61415 If a text field has a search results button, a search cancel button, a speech button, or a spin button, the editable inner text element and the buttons are wrapped by a flexible box container, and the editable inner text element has flexibility. As the result of applying the flexible box, we don't need any horizontal layout code in RenderTextControlSingleLine except the inner spin button. Also, we remove custom hit-testing code in nodeAtPoint(). If a user clicks on a position left of the inner editable text but not on the search results button, the search results button doesn't work though it worked. * css/html.css: (input::-webkit-textfield-decoration-container): New style definition for the "container" element. (input[type="search"]::-webkit-search-cancel-button): It should be a block element because it's a child of the flexible box. Also, this doesn't have flexibility. (input[type="search"]::-webkit-search-decoration): ditto. (input[type="search"]::-webkit-search-results-decoration): ditto. (input[type="search"]::-webkit-search-results-button): ditto. (input::-webkit-inner-spin-button): ditto. (input::-webkit-input-speech-button): ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::containerElement): Add an accessor of the flexible box container. It just calls InputType::containerElement(). * html/HTMLInputElement.h: Declare it. * html/InputType.h: (WebCore::InputType::containerElement): New accessor for a shadow element. * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): m_innerBlock is moved to TextFieldInputType. (WebCore::SearchInputType::needsContainer): A search field always needs the flexible box container because of the results button and the cancel button. (WebCore::SearchInputType::createShadowSubtree): Use TextFieldInputType::createShadowSubtree(), then modify the tree. (WebCore::SearchInputType::destroyShadowSubtree): m_innerBlock is moved to TextFieldInputType. * html/SearchInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::TextFieldInputType): Initialize the new members. (WebCore::TextFieldInputType::needsContainer): Returns true if x-webkit-speech. We check a spin button separately. (WebCore::TextFieldInputType::createShadowSubtree): Wrap everything with the flexible box container if needsContainer() or we need a spin button. (WebCore::TextFieldInputType::containerElement): Added an accessor. (WebCore::TextFieldInputType::innerBlockElement): ditto. (WebCore::TextFieldInputType::innerTextElement): ditto. (WebCore::TextFieldInputType::innerSpinButtonElement): ditto. (WebCore::TextFieldInputType::speechButtonElement): ditto. (WebCore::TextFieldInputType::destroyShadowSubtree): Clear references to new shadow nodes. * html/TextFieldInputType.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::containerElement): Added an accessor. (WebCore::RenderTextControlSingleLine::innerTextElement): (WebCore::RenderTextControlSingleLine::layout): - Correct heights check Comparing with height(), not contentHeigth(), was incorrect. - Adjust the container height like the editable inner text. - Remove width adjustment - Remove the speech button layout code The flexible box layout is enough. (WebCore::RenderTextControlSingleLine::nodeAtPoint): Remove custom code for results/cancel/speech buttons, and Simplify comments. (WebCore::RenderTextControlSingleLine::forwardEvent): Remove custom forwarding code for results/cancel buttons. (WebCore::RenderTextControlSingleLine::styleDidChange): Clear the style of the container because we update it in layout(). (WebCore::RenderTextControlSingleLine::hasControlClip): Decoration buttons should be clipped by the container. (WebCore::RenderTextControlSingleLine::controlClipRect): ditto. (WebCore::RenderTextControlSingleLine::createInnerTextStyle): We don't need to use display:inline-block any more. (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): The text wrapper element should have flexibility. (WebCore::RenderTextControlSingleLine::textBlockInsetTop): Updated for the tree structure change. * rendering/RenderTextControlSingleLine.h: 2011-06-29 Kent Tamura <tkent@chromium.org> [Mac] Attempt to fix Leopard build. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): 2011-06-29 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. [Mac] Use system cursors instead of custom bitmaps where possible https://bugs.webkit.org/show_bug.cgi?id=63679 * Resources/crossHairCursor.png: Removed. * Resources/notAllowedCursor.png: Removed. * WebCore.exp.in: Added wkCursor. * WebCore/WebCore.gyp/WebCore.gyp: Removed the two now-unused PNG files. * WebCore.xcodeproj/project.pbxproj: Ditto. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use NSCursor API for Cross, Hand, VerticalText, ContextMenu, Copy, and NotAllowed. Use wkCursor for Move, Alias, Progress, and the resize and panning cursors. * platform/mac/WebCoreSystemInterface.h: Added wkCursor. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2011-06-29 Keishi Hattori <keishi@webkit.org> Reviewed by Adam Barth. Remove extra space at EOL in view source mode https://bugs.webkit.org/show_bug.cgi?id=63620 Test: fast/frames/viewsource-linebreak.html * css/view-source.css: (tbody:last-child .webkit-line-content:empty:before): If we don't do this the last line will be empty and the height will be shorter than the rest. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addSource): If source file is empty, add an empty line. (WebCore::HTMLViewSourceDocument::finishLine): Call when you are done with the current line. Adds a BR element if the line is empty and sets current to tbody. (WebCore::HTMLViewSourceDocument::addText): * html/HTMLViewSourceDocument.h: 2011-06-29 Brent Fulgham <bfulgham@webkit.org> [WinCE] Correct logical state of WINCE test. * platform/win/ScrollbarThemeWin.cpp: The #if OS(WINCE) should have been #if !OS(WINCE) (WebCore::ScrollbarThemeWin::paintTrackPiece): (WebCore::ScrollbarThemeWin::paintButton): (WebCore::ScrollbarThemeWin::paintThumb): * rendering/RenderThemeWin.cpp: ditto. (WebCore::drawControl): 2011-06-29 Justin Garcia <justin.garcia@apple.com> Reviewed by Enrica Casucci. I forgot to include these (reviewed) style fix-ups in my previous check-in. * editing/htmlediting.cpp: (WebCore::indexForVisiblePosition): (WebCore::visiblePositionForIndex): 2011-06-29 Justin Garcia <justin.garcia@apple.com> Reviewed by Enrica Casucci. https://bugs.webkit.org/show_bug.cgi?id=62922 indexForVisiblePosition(const VisiblePosition& visiblePosition) does not consider shadow content VisiblePositions can be inside web form text regions, which use shadow trees. Made indexForVisiblePosition aware of this, and added a new parameter to obtain the scope for a VisiblePosition, in addition to its index. Added visiblePositionForIndex to go in the opposite direction, taking into account the scope used to compute the index. These two functions use TextIterators to convert between VisiblePositions and indices. But TextIterator iteration using TextIteratorEmitsCharactersBetweenAllVisiblePositions does not exactly match VisiblePosition iteration, so using them to preserve a selection during an editing operation is unreliable. This can be seen in the expected results for: editing/execCommand/indent-pre-list.html editing/execCommand/crash-indenting-list-item.html TextIterator's TextIteratorEmitsCharactersBetweenAllVisiblePositions mode needs to be fixed, or these functions need to be changed to iterate using actual VisiblePositions. See: https://bugs.webkit.org/show_bug.cgi?id=63590 TextIterators in TextIteratorEmitsCharactersBetweenAllVisiblePositions do not exactly match VisiblePositions Also: https://bugs.webkit.org/show_bug.cgi?id=63592 Use visiblePositionForIndex and indexForVisiblePosition everywhere that TextIterators are used to convert between VisiblePositions and indices No new tests added because indexForVisiblePosition is currently only used for editing operations that cannot be performed inside web form fields. * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::doApply): * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): * editing/htmlediting.cpp: (WebCore::indexForVisiblePosition): (WebCore::visiblePositionForIndex): * editing/htmlediting.h: 2011-06-29 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Remove ElementWithPseudoId, since now an Element can store it all by itself. https://bugs.webkit.org/show_bug.cgi?id=63657 Refactoring, covered by existing tests. * CMakeLists.txt: Removed ElementWithPseudoId from build. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.order: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): Changed to use plain-old HTMLDivElement. * html/RangeInputType.cpp: (WebCore::RangeInputType::createShadowSubtree): Ditto. * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): Ditto. * html/shadow/ElementWithPseudoId.cpp: Removed. * html/shadow/ElementWithPseudoId.h: Removed. 2011-06-29 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch computeWidth and computeHeight functions to new layout types https://bugs.webkit.org/show_bug.cgi?id=63655 Switch computeWidth and computeHeight functions over to the new layout unit abstraction. Making a point to mark rounding that should eventually be removed by linking to a new tracking bug: 63645. No new tests, no functionality changes. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::computePreferredLogicalWidths): * rendering/AutoTableLayout.h: * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::computePreferredLogicalWidths): * rendering/FixedTableLayout.h: * rendering/LayoutTypes.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computePreferredLogicalWidths): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthUsing): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalWidth): (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::computeLogicalWidth): * rendering/RenderImage.cpp: (WebCore::RenderImage::computeReplacedLogicalWidth): (WebCore::RenderImage::computeReplacedLogicalHeight): * rendering/RenderImage.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::computePreferredLogicalWidths): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::computePreferredLogicalWidths): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::computePreferredLogicalWidths): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): (WebCore::RenderReplaced::computePreferredLogicalWidths): * rendering/RenderReplaced.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::computePreferredLogicalWidths): * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::computePreferredLogicalWidths): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::computeReplacedLogicalWidth): (WebCore::RenderVideo::computeReplacedLogicalHeight): * rendering/RenderVideo.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::computeLogicalWidth): (WebCore::RenderSVGForeignObject::computeLogicalHeight): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computePreferredLogicalWidths): (WebCore::RenderSVGRoot::computeIntrinsicWidth): (WebCore::RenderSVGRoot::computeIntrinsicHeight): (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): (WebCore::RenderSVGRoot::layout): * rendering/svg/RenderSVGRoot.h: 2011-06-23 Abhishek Arya <inferno@chromium.org> Reviewed by James Robinson. In RenderBlock, RenderWidget and RenderReplaced destroy functions, call dirtyLinesFromChangedChild to tell our parent that we are going away. https://bugs.webkit.org/show_bug.cgi?id=60307 Test: fast/block/child-not-removed-from-parent-lineboxes-crash.html fast/block/block-not-removed-from-parent-lineboxes-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::destroy): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::destroy): * rendering/RenderReplaced.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): 2011-06-29 Brent Fulgham <bfulgham@webkit.org> Speculative WinCE build correction. * rendering/RenderThemeWin.cpp: (WebCore::drawControl): Don't call setRGBABitmapAlpha for WinCE case. 2011-06-29 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. REGRESSION(r89952): r89952 added a wrong assertion in visible_units.cpp https://bugs.webkit.org/show_bug.cgi?id=63668 We need to assert the offset to be zero only when the position is NOT offset in node. * editing/visible_units.cpp: (WebCore::startOfParagraph): 2011-06-29 Brent Fulgham <bfulgham@webkit.org> Speculative WinCE build correction after r90057. * CMakeListsWinCE.txt: Roll back r90061, since GetWorldTransform is not available in WinCE. * platform/win/ScrollbarThemeWin.cpp: Conditionally exclude calls to DIBPixelData::setRGBABitmapAlpha for WinCE. (WebCore::ScrollbarThemeWin::paintTrackPiece): (WebCore::ScrollbarThemeWin::paintButton): (WebCore::ScrollbarThemeWin::paintThumb): 2011-06-29 Brent Fulgham <bfulgham@webkit.org> Speculative WinCE build correction after r90057. * CMakeListsWinCE.txt: Add missing DIBPixelData.cpp to WinCE build to support setting bitmap image alpha value. 2011-06-29 Simon Fraser <simon.fraser@apple.com> Reviewed by Beth Dakin. Lay some groundwork for rubber-banding in overflow:scroll divs https://bugs.webkit.org/show_bug.cgi?id=63654 Make it possible for scrollTop and scrollLeft on a RenderLayer to be set to negative values, which we will do during rubber-banding in future. Continue to clamp programmatic scrolls, and scroll positions set by layout between 0 and the max value. Test: fast/layers/negative-scroll-positions.html * rendering/RenderBox.cpp: (WebCore::RenderBox::setScrollLeft): (WebCore::RenderBox::setScrollTop): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): (WebCore::RenderLayer::scrollTo): * rendering/RenderLayer.h: (WebCore::RenderLayer::scrollToXOffset): (WebCore::RenderLayer::scrollToYOffset): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::forwardEvent): 2011-06-29 Anders Carlsson <andersca@apple.com> Reviewed by Simon Fraser. RenderLayer::maximumScrollPosition() is wrong https://bugs.webkit.org/show_bug.cgi?id=62667 * platform/ScrollableArea.h: (WebCore::ScrollableArea::isVerticalScrollerPinnedToMinimumPosition): (WebCore::ScrollableArea::isVerticalScrollerPinnedToMaximumPosition): Add these for good measure; they will be needed in an upcoming patch. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::maximumScrollPosition): Subtract the visible content rect, including the scroll bars. 2011-06-29 Brent Fulgham <bfulgham@webkit.org> Speculative WinCE build correction after r90053. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::inTransparencyLayer): Provide stub implementation for 'inTransparencyLayer'. 2011-06-29 Xu Fan <qifuren1985@gmail.com> Reviewed by Brent Fulgham. Fix Scrollbars Transparent in Windows XP if WebKit is using Layered Window https://bugs.webkit.org/show_bug.cgi?id=61136 * platform/graphics/win/DIBPixelData.h: add a static method setRGBABitmapAlpha * platform/graphics/win/DIBPixelData.cpp: add implementation * platform/win/ScrollbarThemeWin.cpp: fix scroolbar transparent * rendering/RenderThemeWin.cpp: fix textbox and button transparent 2011-06-29 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch RenderBoxModelObject::margin* and setMargin* to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63652 Switch margin methods for render tree over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/InlineFlowBox.h: * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: * rendering/RenderBox.cpp: * rendering/RenderBox.h: * rendering/RenderBoxModelObject.h: * rendering/RenderInline.cpp: * rendering/RenderInline.h: * rendering/RenderText.h: 2011-06-29 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paint to new layout types https://bugs.webkit.org/show_bug.cgi?id=63645 Switch vanilla paint function over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paint): * rendering/RenderBox.h: * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint): * rendering/RenderDetailsMarker.h: * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paint): * rendering/RenderEmbeddedObject.h: * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paint): * rendering/RenderFrameSet.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::paint): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::paint): * rendering/RenderInline.h: * rendering/RenderLineBoxList.h: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::paint): * rendering/RenderListItem.h: * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/RenderListMarker.h: * rendering/RenderObject.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderReplaced.h: * rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint): * rendering/RenderReplica.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paint): * rendering/RenderTableCell.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::paint): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paint): * rendering/RenderTableSection.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::paint): * rendering/RenderTextControlSingleLine.h: * rendering/RenderTheme.h: * rendering/RenderView.cpp: (WebCore::RenderView::paint): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/RenderWidget.h: * rendering/mathml/RenderMathMLBlock.h: * rendering/mathml/RenderMathMLFraction.h: * rendering/mathml/RenderMathMLRoot.h: * rendering/mathml/RenderMathMLSquareRoot.h: * rendering/svg/RenderSVGContainer.h: * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGHiddenContainer.h: * rendering/svg/RenderSVGImage.h: * rendering/svg/RenderSVGPath.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.h: 2011-06-29 Jian Li <jianli@chromium.org> Reviewed by Kenneth Russell. WebGL test failing on SL bots: fast/canvas/webgl/data-view-test.html https://bugs.webkit.org/show_bug.cgi?id=63151 The fix is to change to throw TypeError in custom JS/V8 bindings. * bindings/js/JSDataViewCustom.cpp: (WebCore::getDataViewMember): (WebCore::setDataViewMember): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCallback): (WebCore::V8DataView::getInt8Callback): 2011-06-29 Luke Macpherson <macpherson@chromium.org> Reviewed by Darin Adler. Convert uses of computeLengthIntForLength() to computeLength<Length>() https://bugs.webkit.org/show_bug.cgi?id=63641 No new tests / refactoring only. * css/CSSStyleSelector.cpp: (WebCore::convertToLength): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::applyPageSizeProperty): (WebCore::CSSStyleSelector::mmLength): (WebCore::CSSStyleSelector::inchLength): (WebCore::CSSStyleSelector::mapFillSize): (WebCore::CSSStyleSelector::mapFillXPosition): (WebCore::CSSStyleSelector::mapFillYPosition): 2011-06-29 Chris Rogers <crogers@google.com> Reviewed by Kenneth Russell. Simplify AudioBufferSourceNode rendering https://bugs.webkit.org/show_bug.cgi?id=63586 No new tests since this doesn't change API. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): (WebCore::AudioBufferSourceNode::process): (WebCore::AudioBufferSourceNode::renderFromBuffer): (WebCore::AudioBufferSourceNode::reset): (WebCore::AudioBufferSourceNode::setBuffer): (WebCore::AudioBufferSourceNode::noteOn): (WebCore::AudioBufferSourceNode::noteGrainOn): (WebCore::AudioBufferSourceNode::totalPitchRate): * webaudio/AudioBufferSourceNode.h: 2011-06-29 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. [Freetype] Many tests report ERROR: Failed to get glyph page zero. https://bugs.webkit.org/show_bug.cgi?id=63498 Instead of conditionally instantiating the m_scaledFont member of FontPlatformData, always instantiate it. For times when the size is 0 and the instantiation would lead to a Cairo error, we use size 1 and just make operations which would fail conditional on the m_size > 0. No new tests. This change is covered by existing tests. We should observe no errors on the bots after landing. * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): Instead of looking at whether or not there is a scaled font to determine whether to draw, just look at the size. * platform/graphics/freetype/FontPlatformData.h: Remove the m_font member. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Always instantiate a scaled font member and remove references to m_font. If we are instantiating a scaled font for a 0 size font, instantiate a size 1 font, so that we can still use Cairo to query font properties. * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp: (WebCore::GlyphPage::fill): We can assume there is always a scaled font now. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformInit): Ditto. (WebCore::SimpleFontData::createScaledFontData): Ditto. (WebCore::SimpleFontData::containsCharacters): Ditto. (WebCore::SimpleFontData::platformWidthForGlyph): Ditto. 2011-06-29 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. Media element loads blocked by a resource load delegate do not generate an error event https://bugs.webkit.org/show_bug.cgi?id=63558 Tests: media/media-blocked-by-beforeload.html media/media-blocked-by-willsendrequest.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): Call mediaLoadingFailed instead of noneSupported so all failures follow the same code path. (WebCore::HTMLMediaElement::loadResource): Call mediaLoadingFailed when there is no frame, when the loader delegate rejects the url, or when MediaPlayer doesn't find a media engine that supports the type. (WebCore::HTMLMediaElement::selectNextSourceChild): Fix incorrect logging. (WebCore::HTMLMediaElement::mediaLoadingFailed): Change name of parameter from "state" to "error" to make its purpose obvious. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): Return a bool indicating whether or not the url was given to a media engine. (WebCore::MediaPlayer::loadWithNextMediaEngine): Add some logging. * platform/graphics/MediaPlayer.h: 2011-06-29 Darin Adler <darin@apple.com> Reviewed by Anders Carlsson. [WebKit2] Crash loading page that adds/removes frame in DOMContentLoaded/loaded https://bugs.webkit.org/show_bug.cgi?id=63483 Test: fast/loader/create-frame-in-DOMContentLoaded.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): Added an assertion. (WebCore::FrameLoader::finishedLoadingDocument): Removed a non-helpful #if statement. The rule that we do not call the client when creating the initial empty document was nominally specific to Windows and Chromium but is needed for all platforms. 2011-06-29 Emil A Eklund <eae@chromium.org> Reviewed by Darin Adler. Switch hitTestColumns/Contents/Floats to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63589 Switch location and size methods for RenderBox over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/ColumnInfo.h: (WebCore::ColumnInfo::desiredColumnWidth): (WebCore::ColumnInfo::setDesiredColumnWidth): (WebCore::ColumnInfo::columnHeight): (WebCore::ColumnInfo::setColumnCountAndHeight): (WebCore::ColumnInfo::setColumnHeight): (WebCore::ColumnInfo::updateMinimumColumnHeight): (WebCore::ColumnInfo::minimumColumnHeight): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addOverflowFromChildren): (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestColumns): (WebCore::RenderBlock::hitTestContents): (WebCore::RenderBlock::columnRectAt): * rendering/RenderBlock.h: (WebCore::RenderBlock::xPositionForFloatIncludingMargin): (WebCore::RenderBlock::yPositionForFloatIncludingMargin): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestContents): * rendering/RenderLayer.h: 2011-06-29 Adrienne Walker <enne@google.com> Reviewed by James Robinson. [chromium] Divide by zero in TilingData https://bugs.webkit.org/show_bug.cgi?id=63305 Add safety checks for empty layers. * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::reset): (WebCore::LayerTilerChromium::updateRect): 2011-06-29 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Adam Barth. Extract setShadowRoot function, harden it in preparation to be exposed to script. https://bugs.webkit.org/show_bug.cgi?id=63596 Refactoring, covered by existing tests. * dom/Element.cpp: (WebCore::validateShadowRoot): Added. (WebCore::Element::setShadowRoot): Extracted from ensureShadowRoot. (WebCore::Element::ensureShadowRoot): Changed to use setShadowRoot. * dom/Element.h: Added decl. 2011-06-29 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: REGRESSION Resource revision fails to request content if it was not yet loaded for resource. https://bugs.webkit.org/show_bug.cgi?id=63631 Test: http/tests/inspector/network/network-request-revision-content.html * inspector/front-end/Resource.js: (WebInspector.ResourceRevision.prototype.requestContent): 2011-06-29 Igor Oliveira <igor.oliveira@openbossa.org> Reviewed by Andreas Kling. [Qt] GraphicsContext::clipToImageBuffer does not support scale transformation https://bugs.webkit.org/show_bug.cgi?id=63555 Scale alphaMask if GraphicsContext is scaled * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::pushTransparencyLayerInternal): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::clip): 2011-06-29 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. Web Inspector: backend needs to provide system-unique object ids, so these remain unique across navigation https://bugs.webkit.org/show_bug.cgi?id=62894 * inspector/InspectorController.cpp: (WebCore::InspectorController::setAgentProcessIdentifier): * inspector/InspectorController.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::setAgentIdentifier): (WebCore::InspectorPageAgent::createIdentifier): (WebCore::InspectorPageAgent::frameForId): (WebCore::InspectorPageAgent::frameId): (WebCore::InspectorPageAgent::frameDestroyed): * inspector/InspectorPageAgent.h: 2011-06-29 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: create status bar buttons programmatically. Add "Inspect" button to all panels. https://bugs.webkit.org/show_bug.cgi?id=63450 Buttons should be created in code, not in HTML. Also making Inspect Element action available on all panels (as an experiment). * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.show): (WebInspector.ConsoleView.prototype.hide): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.get statusBarItems): (WebInspector.ElementsPanel.prototype.updateFocusedNode): (WebInspector.ElementsPanel.prototype._setSearchingForNode): (WebInspector.ElementsPanel.prototype.toggleSearchingForNode): * inspector/front-end/inspector.css: (button.dock-status-bar-item.status-bar-item .glyph): (button.dock-status-bar-item.status-bar-item.toggled-on .glyph): (.console-status-bar-item .glyph): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector.set attached): 2011-06-29 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: tab crash after deleting trailing quote when editing attribute https://bugs.webkit.org/show_bug.cgi?id=63544 * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesText): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): 2011-06-29 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: REGRESSION Inspector failing to load resource content after navigation. Safari. https://bugs.webkit.org/show_bug.cgi?id=63480 * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): 2011-06-29 Mike West <mkwst@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Missing fields in HAR https://bugs.webkit.org/show_bug.cgi?id=58127 Specifically, this patch adds: - entry.request.httpVersion - entry.request.headersSize - entry.request.bodySize - entry.response.httpVersion - entry.response.headersSize - entry.response.bodySize - entry.response.content.compression Tests: http/tests/inspector/resource-har-conversion.html http/tests/inspector/resource-har-headers.html http/tests/inspector/resource-parameters.html http/tests/inspector/network/network-size.html * inspector/front-end/HAREntry.js: (WebInspector.HAREntry.prototype.build): (WebInspector.HAREntry.prototype._buildRequest): (WebInspector.HAREntry.prototype._buildResponse): (WebInspector.HAREntry.prototype._buildContent): (WebInspector.HAREntry.prototype._buildCookie): (WebInspector.HAREntry.prototype._interval): (WebInspector.HAREntry.prototype.get requestBodySize): (WebInspector.HAREntry.prototype.get responseBodySize): (WebInspector.HAREntry.prototype.get responseCompression): (WebInspector.HARLog.prototype.build): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.set requestHeaders): (WebInspector.Resource.prototype.get requestHeadersText): (WebInspector.Resource.prototype.set requestHeadersText): (WebInspector.Resource.prototype.get requestHeadersSize): (WebInspector.Resource.prototype.get requestHttpVersion): (WebInspector.Resource.prototype.set responseHeaders): (WebInspector.Resource.prototype.get responseHeadersText): (WebInspector.Resource.prototype.set responseHeadersText): (WebInspector.Resource.prototype.get responseHeadersSize): (WebInspector.Resource.prototype.get responseHttpVersion): 2011-06-29 Hayato Ito <hayato@chromium.org> Reviewed by Hajime Morita. Make a shadow host transfer a focus to the first focusable element in the shadow root when its focus() is called. https://bugs.webkit.org/show_bug.cgi?id=62358. This patch doesn't take an effect on the following elements to keep a compatibility. - <input>, <textarea>, <video> and <audio> elements We'll address these elements separately after re-targeting focus events (bug 61421) is implemented. A shadow root's <content> is not considered in this patch. That should be addressed in another patch. See bug 63522. Test: fast/dom/shadow/shadow-host-transfer-focus.html * dom/Element.cpp: (WebCore::Element::focus): * page/FocusController.cpp: (WebCore::shadowRoot): (WebCore::isTreeScopeOwner): (WebCore::FocusController::transferFocusToElementInShadowRoot): (WebCore::hasCustomFocusLogic): (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot): (WebCore::FocusController::advanceFocusInDocumentOrder): (WebCore::ownerOfTreeScope): (WebCore::FocusController::findFocusableNodeAcrossTreeScope): * page/FocusController.h: 2011-06-29 Ryan Sleevi <rsleevi@chromium.org> Reviewed by Dirk Schulze. SVGRadialGradientElement::selfHasRelativeLengths() doesn't consider if cx() is relative https://bugs.webkit.org/show_bug.cgi?id=61600 Correct the logic for checking for relative lengths in a SVGRadialGradientElement to consider cx() in addition to cy() No new tests, as there is no way to currently test this. With the bug present, a side-effect is causing the expected/correct image to be rendered. This is because the cached SVG resource is getting invalided through a different path, forcing a repaint. The repaint takes into consideration the proper dimensions, hiding the bug. * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::selfHasRelativeLengths): 2011-06-28 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedType should support SVGBoolean animation https://bugs.webkit.org/show_bug.cgi?id=63529 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGBoolean. The new animator does not affect any behavior, since it was animated with SVGAnimatedString before. The new animator is still needed to support animVal and baseVal later. Test: svg/animations/svgboolean-animation-1.html * CMakeLists.txt: Add new file to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Make use of AnimatedBoolean. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedBoolean.cpp: Added. New animator for SVGBoolean. (WebCore::SVGAnimatedBooleanAnimator::SVGAnimatedBooleanAnimator): (WebCore::SVGAnimatedBooleanAnimator::constructFromString): (WebCore::SVGAnimatedBooleanAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedBooleanAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedBooleanAnimator::calculateDistance): * svg/SVGAnimatedBoolean.h: (WebCore::SVGAnimatedBooleanAnimator::~SVGAnimatedBooleanAnimator): * svg/SVGAnimatedType.cpp: Use bool for SVGBoolean. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createBoolean): (WebCore::SVGAnimatedType::boolean): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: New crate function for SVGAnimatedSVGBooleanAnimator. (WebCore::SVGAnimatorFactory::create): 2011-06-28 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Adam Barth. Make applyAuthorSheets settable on ShadowRoot. https://bugs.webkit.org/show_bug.cgi?id=63599 Refactoring and adding not-yet used function, tests to follow when API lands. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): Added initializer. (WebCore::ShadowRoot::applyAuthorSheets): Made to use member variable. (WebCore::ShadowRoot::setApplyAuthorSheets): Added. * dom/ShadowRoot.h: Tweaked, added decls. 2011-06-28 Ilya Sherman <isherman@chromium.org> Reviewed by Adam Barth. form.autocomplete="off" does not work Rename the autoComplete() method for HTMLFormElement, HTMLFormControlElementWithState, and HTMLInputElement to shouldAutocomplete() Add the autocomplete attribute to HTMLFormElement.idl and HTMLInputElement.idl https://bugs.webkit.org/show_bug.cgi?id=35823 Test: fast/forms/autocomplete.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElementWithState::shouldAutocomplete): Renamed from ::autoComplete() (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState): Update callsite. * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::~HTMLFormElement): Update callsite. (WebCore::HTMLFormElement::parseMappedAttribute): Update callsite. (WebCore::HTMLFormElement::documentDidBecomeActive): Update callsite. (WebCore::HTMLFormElement::willMoveToNewOwnerDocument): Update callsite. (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Update callsite. (WebCore::HTMLFormElement::shouldAutocomplete): Renamed from ::autoComplete() * html/HTMLFormElement.h: * html/HTMLFormElement.idl: Bind the autocomplete attribute to a JavaScript property. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldAutocomplete): Renamed from ::autoComplete() * html/HTMLInputElement.h: * html/HTMLInputElement.idl: Bind the autocomplete attribute to a JavaScript property. * WebCore.exp.in: Updated autoComplete() -> shouldAutocomplete() 2011-06-28 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Store shadowPseudoId in ElementRareData. https://bugs.webkit.org/show_bug.cgi?id=63604 No new tests, because the code isn't yet used. * css/CSSSelector.cpp: (WebCore::CSSSelector::isUnknownPseudoType): Added convenience helper. * css/CSSSelector.h: Added decl. * dom/Element.cpp: (WebCore::Element::shadowPseudoId): Changed to use ElementRareData. (WebCore::Element::setShadowPseudoId): Ditto. * dom/Element.h: Added decls. * dom/ElementRareData.h: Added a member to keep shadowPseudoId. 2011-06-28 Kenichi Ishibashi <bashi@chromium.org> Reviewed by Tony Chang. [Chromium] Remove dependencies on harfbuzz from FontPlatformDataLinux and FontLinux https://bugs.webkit.org/show_bug.cgi?id=62530 - Moved codes of FontLinux which depend on harfbuzz APIs to ComplexTextController. Removed Some methods of ComplexTextController(advances() and logClusters()) since they are no longer needed. - Moved RefCountedHarfbuzzFace from FontPlatformDataLinux to HarfbuzzSkia and renamed it to HarfbuzzFace. No new tests because there is no behavior change (The existing tests should cover the changes). * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::ComplexTextController::ComplexTextController): Added arguments so eliminating setter invocations. (WebCore::ComplexTextController::setupForRTL): Added. (WebCore::ComplexTextController::setupFontForScriptRun): Adopt the change of HarfbuzzFace class. (WebCore::ComplexTextController::setGlyphPositions): Use m_item.log_clusters instead of removed method. (WebCore::ComplexTextController::glyphIndexForXPositionInScriptRun): Added. (WebCore::ComplexTextController::offsetForPosition): Ditto. (WebCore::ComplexTextController::selectionRect): Ditto. * platform/graphics/chromium/ComplexTextControllerLinux.h: (WebCore::ComplexTextController::width): * platform/graphics/chromium/FontLinux.cpp: Removed truncateFixedPointToInteger(). (WebCore::Font::drawComplexText): Removed setter invocations of ComplexTextController. (WebCore::Font::floatWidthForComplexText): Ditto. (WebCore::Font::offsetForPositionForComplexText): Moved harfbuzz dependent code to ComplexTextController. (WebCore::Font::selectionRectForComplexText): Ditto. * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::harfbuzzFace): Wrapped up HB_FaceRec in HarfbuzzFace class. * platform/graphics/chromium/FontPlatformDataLinux.h: Moved RefCountedHarfbuzzFace class and renamed to HarfbuzzFace. * platform/graphics/chromium/HarfbuzzSkia.cpp: (WebCore::allocHarfbuzzFont): Moved from ComplexTextControllerLinux.cpp. (WebCore::HarfbuzzFace::HarfbuzzFace): Added. (WebCore::HarfbuzzFace::~HarfbuzzFace): Added. * platform/graphics/chromium/HarfbuzzSkia.h: (WebCore::HarfbuzzFace::create): Added. (WebCore::HarfbuzzFace::face): Added. * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: (WebCore::substituteWithVerticalGlyphs): Adopt the change of HarfbuzzFace class. 2011-06-28 Roland Steiner <rolandsteiner@chromium.org> Reviewed by Eric Seidel. Bug 55930 - (CVE-2011-1440) Incorrect handling of 'display:' property within nested <ruby> tags https://bugs.webkit.org/show_bug.cgi?id=55930 Don't set style type BEFORE/AFTER on anonymous wrapper block. Rather, check style type on generated wrapped child. Tests: fast/ruby/generated-after-counter-doesnt-crash.html fast/ruby/generated-before-and-after-counter-doesnt-crash.html fast/ruby/generated-before-counter-doesnt-crash.html * rendering/RenderRuby.cpp: (WebCore::isAnonymousRubyInlineBlock): (WebCore::isRubyBeforeBlock): (WebCore::isRubyAfterBlock): (WebCore::rubyBeforeBlock): (WebCore::rubyAfterBlock): (WebCore::createAnonymousRubyInlineBlock): (WebCore::RenderRubyAsInline::addChild): (WebCore::RenderRubyAsBlock::addChild): 2011-06-28 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch RenderLayer position/size to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63578 Switch location and size methods for RenderLayer over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): (WebCore::RenderLayer::visibleHeight): (WebCore::RenderLayer::visibleWidth): (WebCore::RenderLayer::offsetFromResizeCorner): * rendering/RenderLayer.h: (WebCore::RenderLayer::location): (WebCore::RenderLayer::setLocation): (WebCore::RenderLayer::size): (WebCore::RenderLayer::setSize): (WebCore::RenderLayer::rect): (WebCore::RenderLayer::renderBoxLocation): (WebCore::RenderLayer::renderBoxX): (WebCore::RenderLayer::renderBoxY): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::visibleHeight): (WebCore::RenderListBox::visibleWidth): * rendering/RenderListBox.h: 2011-06-28 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintObject and paintReplaced to new layout types https://bugs.webkit.org/show_bug.cgi?id=63585 Switching paintObject and paintReplaced to layout type abstractions from more integral types. No new tests as this is just moving to an abstraction. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): * rendering/RenderBlock.h: * rendering/RenderBox.h: (WebCore::RenderBox::paintObject): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintReplaced): * rendering/RenderEmbeddedObject.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): * rendering/RenderFileUploadControl.h: * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * rendering/RenderHTMLCanvas.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderImage.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject): * rendering/RenderListBox.h: * rendering/RenderReplaced.h: (WebCore::RenderReplaced::paintReplaced): * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): * rendering/RenderTable.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintObject): * rendering/RenderTableSection.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintObject): * rendering/RenderTextControl.h: * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): * rendering/RenderVideo.h: 2011-06-28 Adam Langley <agl@chromium.org> Reviewed by Adam Barth. Skip cache validation on back with HTTPS. https://bugs.webkit.org/show_bug.cgi?id=63537 For back navigations over HTTP, WebKit sets a flag to use cached data irrespective of whether it has expired. However, this isn't currently done for HTTPS. The logic in question was added in https://bugs.webkit.org/show_bug.cgi?id=33993 and appears to have been precautionary. However, both Firefox and IE will use this back navigation trick for HTTPS as well and so we should probably behave likewise. Test: http/tests/cache/history-only-cached-subresource-loads-max-age-https.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): 2011-06-28 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Adam Barth. Remove errant isShadowBoundary on ShadowRoot. https://bugs.webkit.org/show_bug.cgi?id=63588 Removing dead code, no tests for that. * dom/ShadowRoot.h: Removed a function that's no longer used. 2011-06-28 Zeng Huiqing <huiqing.zeng@intel.com> Reviewed by Kenneth Russell. [chromium]Optimize GraphicsLayerChromium::setChildren() https://bugs.webkit.org/show_bug.cgi?id=62837 No new tests. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): (WebCore::GraphicsLayerChromium::setChildren): (WebCore::GraphicsLayerChromium::addChild): * platform/graphics/chromium/GraphicsLayerChromium.h: 2011-06-28 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintBoxShadow and paintBoxDecorations to new layout types https://bugs.webkit.org/show_bug.cgi?id=63577 Switching paintBoxShadow and paintBoxDecorations to layout type abstraction from more integral types. No new tests as this is just moving to an abstraction. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxShadow): (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/InlineFlowBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderFieldset.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBoxDecorations): * rendering/RenderTableCell.h: * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): * rendering/RenderView.h: 2011-06-28 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch RenderBox position/size to to new layout types https://bugs.webkit.org/show_bug.cgi?id=63571 Switch location and size methods for RenderBox over to the new layout unit abstraction. No new tests, no functionality changes. * rendering/RenderBox.cpp: * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: * rendering/RenderBoxModelObject.h: * rendering/RenderInline.cpp: * rendering/RenderInline.h: * rendering/RenderVideo.cpp: * rendering/RenderVideo.h: 2011-06-28 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89968. http://trac.webkit.org/changeset/89968 https://bugs.webkit.org/show_bug.cgi?id=63581 Broke chromium windows compile (Requested by jamesr on #webkit). * WebCore.gyp/WebCore.gyp: * loader/cache/CachedFont.cpp: * platform/chromium/DragImageRef.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.h: * platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::hash): * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/SimpleFontData.h: * platform/graphics/cg/FloatPointCG.cpp: * platform/graphics/cg/FloatRectCG.cpp: * platform/graphics/cg/FloatSizeCG.cpp: * platform/graphics/cg/IntPointCG.cpp: * platform/graphics/cg/IntRectCG.cpp: * platform/graphics/cg/IntSizeCG.cpp: * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): 2011-06-28 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch PaintMask* to new layout types https://bugs.webkit.org/show_bug.cgi?id=63576 Switching paintMask* to layout type abstraction from more integral types. No new tests as this is just moving to an abstraction. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMask): (WebCore::RenderBox::paintMaskImages): * rendering/RenderBox.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintMask): * rendering/RenderFieldset.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paintMask): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintMask): * rendering/RenderTableCell.h: 2011-06-28 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintFillLayer* to new layout types https://bugs.webkit.org/show_bug.cgi?id=63570 Switching painFillLayer* to layout type abstraction from more integral types. No new tests as this is just moving to an abstraction. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintFillLayers): (WebCore::InlineFlowBox::paintFillLayer): * rendering/InlineFlowBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintFillLayers): (WebCore::RenderBox::paintFillLayer): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderBoxModelObject.h: * rendering/RenderObject.h: 2011-06-28 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Use appropriate macro for CSSPropertyWebkitAppearance in CSSStyleSelector::applyProperty() https://bugs.webkit.org/show_bug.cgi?id=63197 No new tests / no functionality changed. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro and delete duplicate code. 2011-06-28 Cary Clark <caryclark@google.com> Reviewed by James Robinson. Use Skia if Skia on Mac Chrome is enabled https://bugs.webkit.org/show_bug.cgi?id=62999 No new tests. This does not affect existing functionality. * WebCore.gyp/WebCore.gyp: Include Skia and related files and exclude CG and related files when building Chromium for Skia on the Mac. * loader/cache/CachedFont.cpp: Rename CHROME to CHROMIUM. * platform/chromium/DragImageRef.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.h: * platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::hash): * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/SimpleFontData.h: * platform/graphics/cg/FloatPointCG.cpp: * platform/graphics/cg/FloatRectCG.cpp: * platform/graphics/cg/FloatSizeCG.cpp: * platform/graphics/cg/IntPointCG.cpp: * platform/graphics/cg/IntRectCG.cpp: * platform/graphics/cg/IntSizeCG.cpp: * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto. 2011-06-28 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. Stop instantiating Position with PositionIsOffsetInAnchor in various files https://bugs.webkit.org/show_bug.cgi?id=63384 Refactoring. Removed many if conditions that compared the anchor type to Position::PositionIsOffsetInAnchor because there were also checking that containerNode is a text node. Also added Position::containerText() to avoid manually casting containerNode(). * dom/Position.cpp: (WebCore::Position::Position): Added an assertion to ensure BeforeChildren/AfterChildren anchor type won't be used for a node whose contents is ignored by editing. (WebCore::Position::containerText): Added. * dom/Position.h: * editing/ApplyBlockElementCommand.cpp: (WebCore::isNewLineAtPosition): Removed a redundant comparison of anchor type. (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): Since containerNode is always a text node when renderStyleOfEnclosingTextNode returns a render style, use new Position constructor that takes Text* and offset. (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Removed redundant comparison of anchor type and use new Position constructor that takes Text* and offset. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::splitTextAtStart): Replaced an assertion that compared anchor type by an assertion that the container node is a text node; use new constructor. (WebCore::ApplyStyleCommand::splitTextAtEnd): Ditto; also added early exits in the case script modified DOM. (WebCore::ApplyStyleCommand::splitTextElementAtStart): Ditto. (WebCore::ApplyStyleCommand::splitTextElementAtEnd): Ditto. (WebCore::ApplyStyleCommand::joinChildTextNodes): Use new constructor. * editing/CompositeEditCommand.cpp: (WebCore::Editor::replaceSelectedTextInNode): Calls containerText instead of manually casting containerNode. * editing/Editor.cpp: (WebCore::Editor::canDeleteRange): Call Range::startPosition instead of manually instantiating Position by calling startContainer and startOffset. * editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelectedRange): Ditto. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Calls containerText instead of manually casting containerNode. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Calls containerText instead of manually casting containerNode. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): Removed a redundant anchor type comparison. (WebCore::startVisiblePosition): Call Range::startPosition instead of startContainer and startOffset. (WebCore::endVisiblePosition): Call Range::endPosition instead of endContainer and endOffset. * editing/htmlediting.cpp: (WebCore::firstInSpecialElement): Call containerNode() to address <rdar://problem/5027702>. (WebCore::lastInSpecialElement): Ditto; use new constructor. * editing/visible_units.cpp: (WebCore::endPositionForLine): Use new constructor. (WebCore::startOfParagraph): Ditto. (WebCore::endOfParagraph): Ditto. 2011-06-28 Rob Buis <rbuis@rim.com> Reviewed by Nikolas Zimmermann. SVG1.1SE test text-tref-03-b.svg fails https://bugs.webkit.org/show_bug.cgi?id=63390 Support tref on forward referenced content by listening to DOMSubtreeModified events. This also allows updating after modifications in the referenced content subtree. Tests: svg/W3C-SVG-1.1-SE/text-tref-03-b.svg svg/custom/text-tref-03-b-change-href-dom.svg svg/custom/text-tref-03-b-change-href.svg svg/custom/text-tref-03-b-dynamic.svg svg/custom/text-tref-03-b-dynamic2.svg svg/custom/text-tref-03-b-referenced-element-removal.svg svg/custom/text-tref-03-b-tref-removal.svg * svg/SVGTRefElement.cpp: (WebCore::SubtreeModificationEventListener::create): (WebCore::SubtreeModificationEventListener::cast): (WebCore::SubtreeModificationEventListener::removeFromTarget): (WebCore::SubtreeModificationEventListener::SubtreeModificationEventListener): (WebCore::SubtreeModificationEventListener::operator==): (WebCore::SubtreeModificationEventListener::handleEvent): (WebCore::SVGTRefElement::updateReferencedText): (WebCore::SVGTRefElement::parseMappedAttribute): (WebCore::SVGTRefElement::svgAttributeChanged): (WebCore::SVGTRefElement::buildPendingResource): (WebCore::SVGTRefElement::removedFromDocument): * svg/SVGTRefElement.h: 2011-06-28 Abhishek Arya <inferno@chromium.org> Reviewed by Anders Carlsson. Split the string creation into a local (while creating text runs) so that it is not destroyed prematurely. https://bugs.webkit.org/show_bug.cgi?id=63543 Run fast/forms/text-control-intrinsic-widths.html under valgrind/ASAN. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): this one is just done for caution, in case, we don't do the same mistake when adding legacy rounding hacks option. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::getAvgCharWidth): 2011-06-28 Greg Simon <gregsimon@chromium.org> Reviewed by Dimitri Glazkov. Migrate SQLite backing store to LevelDB backing store for Indexeddb. https://bugs.webkit.org/show_bug.cgi?id=62780 * storage/IDBFactoryBackendImpl.cpp: (WebCore::computeFileIdentifier): (WebCore::computeUniqueIdentifier): (WebCore::IDBFactoryBackendImpl::open): (WebCore::migrateObjectStores): (WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB): * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::backingStoreExists): * storage/IDBLevelDBBackingStore.h: * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::populateIndex): * storage/IDBObjectStoreBackendImpl.h: * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::backingStoreExists): * storage/IDBSQLiteBackingStore.h: 2011-06-28 Levi Weintraub <leviw@chromium.org> Reviewed by Darin Adler. Create intermediate classes as a path towards getting off of pixel offsets https://bugs.webkit.org/show_bug.cgi?id=61896 Creating three intermediate typedefs to aid in moving layout and hit testing from integers to floats. We'll transition the render tree over to these intermediate types and add infrastructure to support the new types behind USE(FLOAT_LAYOUT_OFFSETS). This allows the ultimate changeover to be easier. Switching LayoutState over to this abstraction to verify it works correctly. No new tests since this is creating a new abstraction, not changing current behavior. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): (WebCore::LayoutState::pageLogicalOffset): (WebCore::LayoutState::addForcedColumnBreak): * rendering/LayoutState.h: * rendering/LayoutTypes.h: Added. 2011-06-28 Jeff Miller <jeffm@apple.com> Add fullscreen.css and fullscreenQuickTime.css to the WebCore Visual Studio project for convenience. Looks like Visual Studio also re-sorted one more file since my last checkin. * WebCore.vcproj/WebCore.vcproj: 2011-06-28 Jeff Miller <jeffm@apple.com> Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML. * WebCore.vcproj/WebCore.vcproj: 2011-06-28 Joone Hur <joone.hur@collabora.co.uk> Reviewed by Martin Robinson. [GTK] Rename 3D transforms to 3D rendering https://bugs.webkit.org/show_bug.cgi?id=63508 This patch allows to include ENABLE_3D_RENDERING to build WebKitGtk+. * GNUmakefile.am: Add ENABLE_3D_RENDERING 2011-06-22 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: use column numbers when linking to script location in timeline and console. https://bugs.webkit.org/show_bug.cgi?id=63126 * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): 2011-06-28 Joone Hur <joone.hur@collabora.co.uk> Reviewed by Martin Robinson. [GTK] Allow to build WebKitGtk+ with accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=63404 WebKitGtk+ needs to implement accelerated compositing for running CSS3 3D transforms and animation through GPU acceleration. We could implement GraphicsLayer using Clutter. * GNUmakefile.list.am: * platform/graphics/clutter/GraphicsLayerClutter.cpp: Added. (WebCore::GraphicsLayer::create): Not implemented yet. (WebCore::GraphicsLayerClutter::GraphicsLayerClutter): (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter): (WebCore::GraphicsLayerClutter::setNeedsDisplay): Ditto. (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect): Ditto. * platform/graphics/clutter/GraphicsLayerClutter.h: Added. 2011-06-28 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. REGRESSION (r89733): fast/text/zero-font-size.html is failing on Leopard https://bugs.webkit.org/show_bug.cgi?id=63512 * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformWidthForGlyph): Initialize the advance local variable, because on Leopard wkGetGlyphTransformedAdvances can return successfully yet not update the variable when the font size is 0. Presumably, r89733 exposed this by changing the values put on the stack just before this function is called. 2011-06-27 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Change the inspector model API and backend to allow CSS pseudoclass inspection https://bugs.webkit.org/show_bug.cgi?id=63446 * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::computePseudoClassMask): (WebCore::InspectorCSSAgent::getStylesForNode): * inspector/InspectorCSSAgent.h: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getStylesAsync): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): 2011-06-28 Kent Tamura <tkent@chromium.org> Fix a build error on Mac by r89907. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::endListChanged): 2011-06-27 Alexander Pavlov <apavlov@chromium.org> Reviewed by Kent Tamura. [Chromium] SELECT or autofill popup is trimmed by screen edge on Windows https://bugs.webkit.org/show_bug.cgi?id=63438 If the popup is calculated to be trimmed by a screen edge, an attempt is made to alter its vertical edge alignment (set to the right edge for LTR or to the left edge for RTL) to see if the trimmed portion becomes smaller than that with the original layout. The change involves remembering the original frameRect for the popup and restoring it in refresh(). This is due to the fact that the frameRect originally set in showInRect() is overwritten by layoutAndGetRTLOffset(), which breaks the originally requested popup container layout metrics. The max width is reset on every layoutAndCalculateWidgetRect(), as it can be constrained by the screen edge, and thus should be re-checked every time the popup is displayed, in case the browser window has been moved. Tests: manual-tests/popup-width-restriction-within-screen.html partly covers the fix (should not regress). Other than that, there is no way to unit-test the platform-specific native code. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::setMaxWidth): Added. Avoid duplicate popup content layouts (in contrast with setMaxWidthAndLayout()). (WebCore::PopupListBox::PopupListBox): (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Attempt a left-right popup alignment inversion to minimize the trimmed content. Also restore a default max popup width. (WebCore::PopupContainer::layoutAndGetRTLOffset): Always return the popup listbox offset for the RTL (right alignment) case. The method rename is due to the return value semantics change. (WebCore::PopupContainer::showInRect): Store the originally requested frameRect for the popup. (WebCore::PopupContainer::refresh): Restore the original popup frameRect to avoid layout artifacts on refresh. (WebCore::PopupContainer::isRTL): This check should be made by the layoutAndGetRTLOffset() clients. * platform/chromium/PopupMenuChromium.h: 2011-06-28 Kentaro Hara <haraken@google.com> Reviewed by Kent Tamura. Allow spaces between e-mail addresses in 'email' input type. https://bugs.webkit.org/show_bug.cgi?id=55987 Allowed spaces between e-mail addresses in 'email' input type, e.g. ' a@p.com , b@p.com ' is a valid value. Implemented the value sanitization algorithm for an e-mail value. Added more unit tests that check the e-mail value parser. Test: fast/forms/ValidityState-typeMismatch-email.html * html/EmailInputType.cpp: (WebCore::EmailInputType::typeMismatchFor): (WebCore::EmailInputType::sanitizeValue): * html/EmailInputType.h: * html/parser/HTMLParserIdioms.cpp: (WebCore::stripHTMLLineBreaks): * html/parser/HTMLParserIdioms.h: (WebCore::isHTMLLineBreak): 2011-06-28 Kent Tamura <tkent@chromium.org> Reviewed by Hajime Morita. Refactor RenderTextControl::text(). https://bugs.webkit.org/show_bug.cgi?id=63519 No new tests because this is just a refactoring. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): Resuce the number of text() calls. (WebCore::finishText): - Use StringBuilder. - Make this a static function. This function doesn't access anything of RenderTextControl. (WebCore::RenderTextControl::text): Use emptyString() and StringBuilder. (WebCore::RenderTextControl::textWithHardLineBreaks): ditto. * rendering/RenderTextControl.h: Remove finishText(). 2011-06-28 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: console.group messages should never be coalesced https://bugs.webkit.org/show_bug.cgi?id=63521 * inspector/InspectorConsoleAgent.cpp: (WebCore::isGroupMessage): (WebCore::InspectorConsoleAgent::addConsoleMessage): 2011-06-28 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: console group boundaries should be more distinct in UI https://bugs.webkit.org/show_bug.cgi?id=63455 Show grey bracket to on the left side of a console group message to highlight the group extent. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleGroup): * inspector/front-end/inspector.css: (#console-prompt): (.console-message, .console-user-command): (.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title::before): (.console-group-title::before): (.console-group): (.console-group-bracket): (.console-group.collapsed > .console-group-bracket): 2011-06-28 Kent Tamura <tkent@chromium.org> Reviewed by Hajime Morita. Use RefPtr for the HTMLElement data members of TextFieldInptType and SearchInputType. https://bugs.webkit.org/show_bug.cgi?id=63511 No new tests because of no behavior change. * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): No need to initialize the element members explicitly because RefPtr constructor works well. (WebCore::SearchInputType::createShadowSubtree): Substitute an element to a data member, and don't call RefPtr<>::release(). (WebCore::SearchInputType::innerBlockElement): Moved from the header file, and adjustment for RefPtr<>. (WebCore::SearchInputType::resultsButtonElement): ditto. (WebCore::SearchInputType::cancelButtonElement): ditto. (WebCore::SearchInputType::destroyShadowSubtree): Adjustment for RefPtr<>. * html/SearchInputType.h: - Move accessor functions to the cpp file because they are virtual. - Change element data member types: HTMLElement* -> RefPtr<HTMLElement>. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::TextFieldInputType): No need to initialize the element members explicitly because RefPtr constructor works well. (WebCore::TextFieldInputType::~TextFieldInputType): Explicityly defines the destructor in the cpp file to avoid to make it implicitly in the header file. If the destructor was made in the header file, we would need to include HTMLElement.h in the header file. (WebCore::TextFieldInputType::createShadowSubtree): - Don't call RenderTheme::themeForPage(). - Substitute an element to a data member, and don't call RefPtr<>::release(). (WebCore::TextFieldInputType::setInnerTextElement): Moved from the header file to avoid to include HTMLElement.h. (WebCore::TextFieldInputType::setSpeechButtonElement): ditto. (WebCore::TextFieldInputType::innerTextElement): Moved from the header file, and adjustment for RefPtr<>. (WebCore::TextFieldInputType::innerSpinButtonElement): ditto. (WebCore::TextFieldInputType::speechButtonElement): ditto. (WebCore::TextFieldInputType::destroyShadowSubtree): Adjustment for RefPtr<>. * html/TextFieldInputType.h: - Move accessor functions to the cpp file because they are virtual. - Change element data member types: HTMLElement* -> RefPtr<HTMLElement>. 2011-06-28 Felician Marton <marton.felician.zoltan@stud.u-szeged.hu> Reviewed by Nikolas Zimmermann. SVG animation flickers when restarting https://bugs.webkit.org/show_bug.cgi?id=18450 Add new parameter to the following methods. The new parameter is the time of adding a "begin" or "end" time to the SVG animation. - WebCore::SVGSMILElement::addBeginTime - WebCore::SVGSMILElement::beginListChanged - WebCore::SVGSMILElement::addEndTime - WebCore::SVGSMILElement::endListChanged In case of beginTime and beginListChanged it's necessary, because the delay between the event of adding a new begin time (in WebCore::SVGAnimationElement::beginElementAt) and the actual processing (in WebCore::SVGSMILElement::endListChanged) is significant. In lack of event time we can't decide that we should consider the new time or not. If the new begin time is smaller than the event time, we musn't begin the animation, else we shoud do further calculations. The following methods just modified for consistency: - WebCore::SVGSMILElement::addEndTime - WebCore::SVGSMILElement::endListChanged No new tests, because currently there is no way to test SVG flickering at zero time. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::beginElementAt): (WebCore::SVGAnimationElement::endElementAt): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::attributeChanged): (WebCore::SVGSMILElement::addBeginTime): (WebCore::SVGSMILElement::addEndTime): (WebCore::SVGSMILElement::beginListChanged): (WebCore::SVGSMILElement::endListChanged): The body changed: - Use new parameter, the time of adding the new begin time. - Cancel some incorrect optimalization. We should also do further calculations when elapsed >= m_intervalBegin. (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase): (WebCore::SVGSMILElement::handleConditionEvent): (WebCore::SVGSMILElement::beginByLinkActivation): * svg/animation/SVGSMILElement.h: 2011-06-28 Csaba Osztrogonác <ossy@webkit.org> Reviewed by Andreas Kling. Adding MHTML reading support. https://bugs.webkit.org/show_bug.cgi?id=7168 * features.pri: Disable MHTML on Qt by default in a proper way. 2011-06-28 Csaba Osztrogonác <ossy@webkit.org> Reviewed by Andreas Kling. [Qt] Remove ENABLE_XBL, because there aren't ENABLE(XBL) macros anymore. * features.pri: 2011-06-27 Gyuyoung Kim <gyuyoung.kim@samsung.com> Unreviewed. Fix style error related to wrong include order. * platform/graphics/efl/ImageEfl.cpp: 2011-06-27 Brian Weinstein <bweinstein@apple.com> Fix the WebCore vcproj file after r89851. * WebCore.vcproj/WebCore.vcproj: 2011-06-27 Joe Wild <joseph.wild@nokia.com> Reviewed by Simon Fraser. Crash on www.crave.cnet.com in FrameView::windowClipRect() https://bugs.webkit.org/show_bug.cgi?id=56393 Check for a null renderer to fix a crash. This situation can arise when external content/plugins is referenced from html elements with style="display:none". Test: plugins/hidden-iframe-with-swf-plugin.html * page/FrameView.cpp: (WebCore::FrameView::windowClipRect): 2011-06-27 Raymes Khoury <raymes@chromium.org> Reviewed by Tony Chang. WebCore fails to compile in thumb mode when neon instructions are enabled. There are two files (FELightingNEON.cpp and FEGaussianBlur.cpp) which fail to build when -mthumb is passed to gcc. These contain inline assembly for neon instructions on arm. This patch forces the -marm flag to be passed when compiling these files to work around this. https://bugs.webkit.org/show_bug.cgi?id=62916 Built WebKit in Chromium and checked that -marm is passed only when building these files. https://bugs.webkit.org/show_bug.cgi?id=62916 * WebCore.gyp/WebCore.gyp: 2011-06-27 Jay Civelli <jcivelli@chromium.org> Reviewed by Darin Fisher. Adding binary part support to MHTML. https://bugs.webkit.org/show_bug.cgi?id=63310 * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::generateMHTMLData): (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding): * loader/archive/mhtml/MHTMLArchive.h: * loader/archive/mhtml/MHTMLParser.cpp: (WebCore::MHTMLParser::parseNextPart): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::append): * platform/SharedBuffer.h: * platform/network/MIMEHeader.cpp: (WebCore::MIMEHeader::parseContentTransferEncoding): * platform/network/MIMEHeader.h: 2011-06-27 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Add support for unicode-bidi:plaintext CSS property https://bugs.webkit.org/show_bug.cgi?id=50949 Adding support for unicode-bidi: plaintext. This involves invoking P2 and P3 of the Unicode BiDi algorithm on each paragraph of a block with that style. This is similar to dir=auto but done per-paragraph instead of per element. Test: fast/text/international/unicode-bidi-plaintext.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Added plaintext. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto. (WebCore::CSSPrimitiveValue::operator EUnicodeBidi): Ditto. * css/CSSValueKeywords.in: Ditto. * html/HTMLElement.cpp: (WebCore::unicodeBidiAttributeForDirAuto): Helper to map elements with dir=auto to their proper unicode-bidi attribute. (WebCore::HTMLElement::parseMappedAttribute): Assign plaintext to pre and textarea when dir=auto. * platform/text/UnicodeBidi.h: Added plaintext. * rendering/RenderBlockLineLayout.cpp: (WebCore::determineParagraphDirection): Determines the direction of a paragraph based on the first strong character. Stops at first paragraph separator. (WebCore::RenderBlock::layoutInlineChildren): Uses determineParagraphDirection when in unicode-bidi: plaintext mode (and operating at the block's BidiContext) to set each paragraph to the proper base BidiContext. (WebCore::RenderBlock::determineStartPosition): Ditto. * rendering/style/RenderStyle.h: Gave _unicodebidi another bit to accomodate for plaintext. 2011-06-27 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Darin Adler. Use specific headers includes rather than full system headers. https://bugs.webkit.org/show_bug.cgi?id=63475 Use only needed headers rather than system headers. No new tests, it's just a little cosmetic change. * platform/mac/WebVideoFullscreenController.h: * platform/mac/WebVideoFullscreenHUDWindowController.h: 2011-06-27 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Darin Adler. Allow non-main thread text drawing in ICU ports https://bugs.webkit.org/show_bug.cgi?id=63482 Some ports allow multiple threads to draw strings. LineBreakIteratorPool is not thread safe and the existing ASSERT caught cases where multiple threads were trying to access the shared pool. This makes the pool a lazily created per-thread pool to allow for thread safe pool use. * platform/ThreadGlobalData.h: * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): start with null. (WebCore::ThreadGlobalData::lineBreakIteratorPool): lazily create. (WebCore::ThreadGlobalData::destroy): delete. Manage the lifetime of the per-thread pool instance. * platform/text/LineBreakIteratorPoolICU.h: (WebCore::LineBreakIteratorPool::sharedPool): Use the per-thread pool instance and remove the ASSERT that this needs to be on the main thread. (WebCore::LineBreakIteratorPool::create): Create a PassOwnPtr so we can use OwnPtr on pools. (WebCore::LineBreakIteratorPool::LineBreakIteratorPool): Private now that there is a public create function. 2011-06-27 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Darin Adler. Extract LineBreakIteratorPool class into its own file https://bugs.webkit.org/show_bug.cgi?id=63471 * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Add the new file to builds that used TextBreakIteratorPoolICU.h. * platform/text/LineBreakIteratorPoolICU.h: Added. (WebCore::LineBreakIteratorPool::sharedPool): (WebCore::LineBreakIteratorPool::LineBreakIteratorPool): Expose the constructor so it can be used by others. * platform/text/TextBreakIteratorICU.cpp: Remove the old LineBreakIteratorPool implementation. 2011-06-27 Justin Garcia <justin.garcia@apple.com> Reviewed by Ryosuke Niwa. CompositeEditCommand::inputText(const String& text, bool selectedInsertText) is unused https://bugs.webkit.org/show_bug.cgi?id=62921 * editing/CompositeEditCommand.cpp: * editing/CompositeEditCommand.h: * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): 2011-05-17 Nat Duca <nduca@chromium.org> Reviewed by James Robinson. [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor https://bugs.webkit.org/show_bug.cgi?id=58408 Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main thread and compositor thread halves of a composited view. Communication between the two is based on the design used in FileStreamProxy. * WebCore.gypi: * platform/chromium/TraceEvent.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::setViewport): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromiumImpl::create): (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent): (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl): (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread): (WebCore::LayerRendererChromiumImplProxy::create): (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl): (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy): (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::setShowFPSCounter): (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::currentFrameNumber): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::init): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::beginCommit): (WebCore::CCLayerTreeHost::commitComplete): (WebCore::CCLayerTreeHost::animateAndLayout): (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter): (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHost::setNeedsRedraw): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHost::frameNumber): * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostCommitter::create): (WebCore::CCLayerTreeHostCommitter::commit): * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added. (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::beginCommit): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHostImpl::setNeedsRedraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::frameNumber): (WebCore::CCLayerTreeHostImpl::sourceFrameNumber): (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added. (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy): (WebCore::CCLayerTreeHostImplProxy::start): (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy): (WebCore::CCLayerTreeHostImplProxy::isStarted): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw): (WebCore::CCLayerTreeHostImplProxy::stop): (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::isMainThread): (WebCore::CCLayerTreeHostImplProxy::isCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit): (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread): (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added. (WebCore::CCLayerTreeHostImplProxy::host): * platform/graphics/chromium/cc/CCMainThreadTask.h: * platform/graphics/chromium/cc/CCThread.cpp: (WebCore::CCThread::runLoop): * platform/graphics/chromium/cc/CCThreadTask.h: 2011-06-27 Abhishek Arya <inferno@chromium.org> Reviewed by Simon Fraser. Fix removal of overhanging floats on style changes to absolute/fixed position. https://bugs.webkit.org/show_bug.cgi?id=63355 1. If we are not currently positioned. 2. And we are not floating. (If we are floating, then this will be automatically done in RenderBox::styleWillChange as part of removeFloatingOrPositionedChildFromBlockLists) 3. And we have overhanging floats from previous sibling blocks. 4. And our new new style tells that we will have absolute or fixed position. Then, we mark all our descendants with floats for layout. This will make sure that overhanging floats are removed. Also, it is important to do that since if that previous sibling block goes away, it is not able to tell us that to remove those floats thinking that being a positioned block, we should have removed them already. Tests: fast/block/float/intruding-float-add-in-sibling-block-on-static-position.html fast/block/float/intruding-float-add-in-sibling-block-on-static-position2.html fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position.html fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2.html fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position.html fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2.html fast/block/float/overhanging-float-add-in-static-position-block.html fast/block/float/overhanging-float-add-in-static-position-block2.html fast/block/float/overhanging-float-remove-from-absolute-position-block.html fast/block/float/overhanging-float-remove-from-absolute-position-block2.html fast/block/float/overhanging-float-remove-from-fixed-position-block.html fast/block/float/overhanging-float-remove-from-fixed-position-block2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleWillChange): 2011-06-27 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedType should support SVGPreserveAspectRatio animation https://bugs.webkit.org/show_bug.cgi?id=63456 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedPreserveAspectRatio. The new animator does not affect any behavior, since it was animated with SVGAnimatedString before. The new animator is still needed to support animVal and baseVal later. Test: svg/animations/svgPreserveAspectRatio-animation-1.html * CMakeLists.txt: Added new file. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Handle AnimatedPreserveAspectRatio. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedPreserveAspectRatio.cpp: Added. New animator for SVGAnimatedPreserveAspectRatio. (WebCore::SVGAnimatedPreserveAspectRatioAnimator::SVGAnimatedPreserveAspectRatioAnimator): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateDistance): * svg/SVGAnimatedPreserveAspectRatio.h: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::~SVGAnimatedPreserveAspectRatioAnimator): * svg/SVGAnimatedType.cpp: Support for SVGPreserveAspectRatio. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createPreserveAspectRatio): (WebCore::SVGAnimatedType::preserveAspectRatio): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): (WebCore::SVGAnimatedType::setPreserveAspectRatioBaseValue): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): 2011-06-27 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Kenneth Rohde Christiansen. [Qt] Remove Phonon MediaPlayer from the tree. https://bugs.webkit.org/show_bug.cgi?id=63448 Remove Phonon mediaplayer as it is unused, not finished and unmaintained. * WebCore.gypi: * WebCore.pri: * WebCore.pro: * features.pri: * platform/graphics/MediaPlayer.cpp: * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Removed. * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Removed. 2011-06-27 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Kent Tamura. Crash in TextIterator https://bugs.webkit.org/show_bug.cgi?id=63334 Fix a crash in TextIterator. Keep m_sortedTextBoxes and renderer consistent and check !m_offset when handling first letter. Also add more assertions to help detecting similar bugs. Test: editing/text-iterator/first-letter-rtl-crash.html * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): (WebCore::TextIterator::emitText): 2011-06-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed by Andreas Kling. [Qt] tst_QWebFrame::overloadedSlots() fails https://bugs.webkit.org/show_bug.cgi?id=37319 This patch is based on Noam Rosenthal original patch in the same bug. When hinted with QWebElement metatype, we qualify the conversion from JSElement as a "perfect match". The test was failing because the wrong slot was called, since the QWebElement match was taken as equal to the others and not chosen when the metacall happened. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): Identify the conversion between JSElement to QWebElement as a "perfect match" (dist = 0). Add comments to explain the reason why we have the implicit conversion. 2011-06-27 ChangSeok Oh <shivamidow@gmail.com> Reviewed by Martin Robinson. [GTK] Fix build break to support webgl https://bugs.webkit.org/show_bug.cgi?id=63425 Some missing files in ANGLE are just added to fix build-break. No test reqired * GNUmakefile.list.am: 2011-06-27 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Martin Robinson. [EFL] Add some PLATFORM(EFL) ifdefs to GraphicsContext3D.h https://bugs.webkit.org/show_bug.cgi?id=62959 Add PLATFORM(EFL) ifdefs to use GraphicsContextInternal. * platform/graphics/GraphicsContext3D.h: 2011-06-27 Alexandru Chiculita <achicu@adobe.com> Reviewed by Ojan Vafai. css combinator "+" in combination with NAV tag is buggy https://bugs.webkit.org/show_bug.cgi?id=47971 Added a new state in css/tokenizer.flex for the "nth" rule. The state begins at nth-*( functions and ends at the first ")". It avoids parsing selectors like "#div+nav" as: "#div" "+n" "av". Test: fast/css/div_plus_nav_bug47971.html * css/maketokenizer: * css/tokenizer.flex: 2011-06-27 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89822. http://trac.webkit.org/changeset/89822 https://bugs.webkit.org/show_bug.cgi?id=63461 Broken builds (Requested by apavlov on #webkit). * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getStylesForNode): * inspector/InspectorCSSAgent.h: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getStylesAsync): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): 2011-06-27 Noel Gordon <noel.gordon@gmail.com> Reviewed by Adam Roben. Send keypress events to windowless plugins on the windows port. https://bugs.webkit.org/show_bug.cgi?id=63144 No new tests. Covered by existing windowless plugin tests plugins/mouse-events.html and plugins/keyboard-events.html. Both are not yet working as desired because focus events are not being fowarded to windowed plugins on the win port (bug 62375). Test plugin logging on the win port was added in bug 61721. New failing expectations for plugins/keyboard-events.html were subsequently added in bug 33973 so there's no need to update test expectations in this patch. * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::handleKeyboardEvent): Add an ASSERT(m_plugin && !m_isWindowed) to indicate that the routine is for windowless plugins. Remove trailing whitespace. Add handling for keyPress events (map to WM_CHAR). (WebCore::PluginView::handleMouseEvent): Add the ASSERT to indicate that the routine is for windowless plugins. Add FIXME note. Remove trailing whitespace. 2011-06-27 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Change the inspector model API and backend to allow CSS pseudoclass inspection https://bugs.webkit.org/show_bug.cgi?id=63446 * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::computePseudoClassMask): (WebCore::InspectorCSSAgent::getStylesForNode): * inspector/InspectorCSSAgent.h: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getStylesAsync): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): 2011-06-27 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: [REGRESSION r84481] updateLayout called from DrawNodeHighlight https://bugs.webkit.org/show_bug.cgi?id=63405 We should not call layout from paint. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawNodeHighlight): * inspector/DOMNodeHighlighter.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::drawNodeHighlight): 2011-06-27 Gyuyoung Kim <gyuyoung.kim@samsung.com> Unreviewed. Fix style error in EFL port. * platform/efl/PlatformKeyboardEventEfl.cpp: * platform/efl/PlatformScreenEfl.cpp: * platform/efl/SharedBufferEfl.cpp: 2011-06-27 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: node selection is slow in the Elements panel. https://bugs.webkit.org/show_bug.cgi?id=60813 * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.stylesCallback): (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype.update): 2011-06-26 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: roll out r88337 for making tests flaky. https://bugs.webkit.org/show_bug.cgi?id=63422 * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.updateStyles): (WebInspector.ElementsPanel.prototype._stylesUpdated): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.stylesCallback): (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype.update): 2011-06-27 Huang Dongsung <luxtella@company100.net> Reviewed by Kenneth Rohde Christiansen. TiledBackingStore endlessly creates and destroys tiles due to an off-by-one error. https://bugs.webkit.org/show_bug.cgi?id=62422 REGRESSION(r77286): Remove bottomRight(). REGRESSION(r77312): Change the logic to get the bottom right point. REGRESSION(r77928): Cause off-by-one error in TiledBackingStore. REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy. REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy. If the viewport width equals the contents width, especially in the mobile device, TiledBackingStore endlessly creates and deletes the rightmost column and bottom row of tiles. In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles() deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates tiles infinitely. Modified TiledDrawingAreaProxy also. * platform/graphics/TiledBackingStore.cpp: (WebCore::innerBottomRight): (WebCore::TiledBackingStore::invalidate): (WebCore::TiledBackingStore::paint): (WebCore::TiledBackingStore::createTiles): 2011-06-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove LegacyDefaultOptionalArguments from WebAudio IDL files https://bugs.webkit.org/show_bug.cgi?id=63416 WebAudio isn't that widely used, so it's seems somewhat safe to remove legacy code generation hacks. I'm not an expert on WebAudio, but the API doesn't appear to need many optional arguments. There are a bunch of APIs that have custom bindings that look like they could be autogenerated. I've added FIXME comments where appropriate. * webaudio/AudioBuffer.idl: * webaudio/AudioContext.idl: * webaudio/AudioListener.idl: * webaudio/AudioNode.idl: * webaudio/AudioPannerNode.idl: * webaudio/AudioParam.idl: * webaudio/RealtimeAnalyserNode.idl: 2011-06-26 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: REGRESSION Scripts panel sidebar pane context menu has no "Remove breakpoint" item https://bugs.webkit.org/show_bug.cgi?id=63421 Show generic sidebar menu only if no pane-specific menu has been shown. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): 2011-06-26 Adam Barth <abarth@webkit.org> Build fix for clang. Apparently clang doesn't want us to use the std namespace in headers, which makes sense. * svg/SVGAnimatedType.h: 2011-06-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove LegacyDefaultOptionalArguments from XMLHttpRequest.idl and XMLHttpRequestUpload.idl https://bugs.webkit.org/show_bug.cgi?id=63418 The XMLHttpRequest.idl interface used to implement the new behavior manually using the RequiresAllArguments attribute. Now that we have that behavior by default, we can simply remove the LegacyDefaultOptionalArguments attribute. * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestUpload.idl: 2011-06-26 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedType should support SVGLengthList animation https://bugs.webkit.org/show_bug.cgi?id=63399 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedLengthList. Interpolated animations of glyph positions are possible now. Tests: svg/animations/svglengthlist-animation-1.html svg/animations/svglengthlist-animation-2.html svg/animations/svglengthlist-animation-3.html svg/animations/svglengthlist-animation-4.html * CMakeLists.txt: Add new file to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Make use of AnimatedLengthList. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedLengthList.cpp: Added. New animator for SVGLengthList. (WebCore::SVGAnimatedLengthListAnimator::SVGAnimatedLengthListAnimator): (WebCore::SVGAnimatedLengthListAnimator::constructFromString): (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedLengthListAnimator::calculateDistance): * svg/SVGAnimatedLengthList.h: (WebCore::SVGAnimatedLengthListAnimator::~SVGAnimatedLengthListAnimator): * svg/SVGAnimatedType.cpp: Add SVGLengthList. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createLengthList): (WebCore::SVGAnimatedType::lengthList): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGLength.cpp: Add new constructor with LengthType, LengthMode and value. (WebCore::SVGLength::SVGLength): * svg/SVGLength.h: 2011-06-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. window.location should use the holder's prototype chain https://bugs.webkit.org/show_bug.cgi?id=63411 This patch corrects the prototype chain for Location, but we really should do a complete cleanup of the prototype chain generation, like we did for JavaScriptCore. Test: http/tests/security/location-prototype.html * bindings/scripts/CodeGeneratorV8.pm: 2011-06-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Add [Optional] attributes where appropriate for addEventListener and removeEventListener https://bugs.webkit.org/show_bug.cgi?id=63417 This patch doesn't actually change behavior because these interfaces have the LegacyDefaultOptionalArguments attribute. This patch paves the way to removing LegacyDefaultOptionalArguments from some of these interfaces as well as making the project safer for copy-and-pasting these methods into new IDL files that don't have the LegacyDefaultOptionalArguments attribute. * bindings/scripts/test/TestObj.idl: * dom/EventTarget.idl: * dom/MediaStream.idl: * dom/MessagePort.idl: * dom/Node.idl: * loader/appcache/DOMApplicationCache.idl: * notifications/Notification.idl: * page/DOMWindow.idl: * page/EventSource.idl: * storage/IDBRequest.idl: * storage/IDBTransaction.idl: * svg/SVGElementInstance.idl: * websockets/WebSocket.idl: * workers/AbstractWorker.idl: * workers/WorkerContext.idl: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestUpload.idl: 2011-06-26 Adam Barth <abarth@webkit.org> Reviewed by Kent Tamura. m_formElementsWithFormAttribute doesn't ref the objects it holds https://bugs.webkit.org/show_bug.cgi?id=62956 Test: fast/forms/form-associated-element-crash3.html * dom/Document.h: 2011-06-26 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Adam Barth. FileList::filenames should be FileList::paths, because it's more accurate. https://bugs.webkit.org/show_bug.cgi?id=63414 Refactoring, no change in behavior. * fileapi/FileList.cpp: (WebCore::FileList::paths): Renamed from filenames. * fileapi/FileList.h: * html/FileInputType.cpp: (WebCore::FileInputType::handleDOMActivateEvent): Changed to use filenames, also fixed a reach-unto-thyself whoopsie. (WebCore::FileInputType::requestIcon): Ditto. (WebCore::FileInputType::filesChosen): Ditto. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::fileTextValue): Ditto. 2011-06-26 Young Han Lee <joybro@company100.net> Reviewed by Dirk Schulze. SVGAnimation - keyTime value 1 never get animated https://bugs.webkit.org/show_bug.cgi?id=63230 According to the SMIL 3.0 specification, the index of the keyTimes should be determined under the end-point-exclusive rule (e.g. Given keyTimes(0;0.5;1) and t=0.5, the current index of the keyTimes have to be 1 not 0). http://www.w3.org/TR/SMIL3/smil-animation.html#animationNS-InterpolationExamplesAdvanced Test: svg/animations/animate-number-calcMode-discrete-keyTimes.html * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::calculateKeyTimesIndex): 2011-06-26 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. With word-break: break-all, words do not break correctly before a surrogate pair https://bugs.webkit.org/show_bug.cgi?id=63401 The code to check for mid-word breaks accumulates width one character at a time. It was actually measuring the two parts of the surrogate pair individually, so they appeared to have zero width. Fixed by checking for surrogate pairs and measuring the pair as one unit. Test: fast/text/midword-break-before-surrogate-pair.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-06-26 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedType should support SVGNumberOptionalNumber animation https://bugs.webkit.org/show_bug.cgi?id=63397 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedNumberOptionalNumber. Animations of attributes with type SVGAnimatedNumberOptionalNumber can be interpolated now. This can be used for smooth growing shadows with feGaussianBlur, feDropShadow or other filter effects. Tests: svg/animations/svgnumberoptionalnumber-animation-1.html svg/animations/svgnumberoptionalnumber-animation-2.html svg/animations/svgnumberoptionalnumber-animation-3.html svg/animations/svgnumberoptionalnumber-animation-4.html * CMakeLists.txt: Added new files to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberOptionalNumber. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedNumberOptionalNumber.cpp: Added. New animator for SVGAnimatedNumberOptionalNumber. (WebCore::SVGAnimatedNumberOptionalNumberAnimator::SVGAnimatedNumberOptionalNumberAnimator): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateDistance): * svg/SVGAnimatedNumberOptionalNumber.h: Added. (WebCore::SVGAnimatedNumberOptionalNumberAnimator::~SVGAnimatedNumberOptionalNumberAnimator): * svg/SVGAnimatedType.cpp: Added new type: pair<float, float>. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createNumberOptionalNumber): (WebCore::SVGAnimatedType::numberOptionalNumber): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: Add new animator to factory. (WebCore::SVGAnimatorFactory::create): 2011-06-25 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Adam Barth. Crash in frameless document with media element. https://bugs.webkit.org/show_bug.cgi?id=63393 Since MediaControls::create can return 0 (and does for frameless documents), we must anticipate it in the calling code. Test: fast/dom/shadow/frameless-media-element-crash.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): Changed to bail out if controls weren't successfully created. (WebCore::HTMLMediaElement::createMediaControls): Renamed to better reflect the purpose, changed to handle failure of creation. (WebCore::HTMLMediaElement::preDispatchEventHandler): Changed to bail out if controls weren't successfully created. * html/HTMLMediaElement.h: Adjusted def. 2011-06-25 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Darin Adler. Fix some minor style issues https://bugs.webkit.org/show_bug.cgi?id=63391 * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::DrawNodeHighlight): The explicit WebCore namespace usage can be dropped. * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): Use ASSERT_UNUSED for a parameter that we want to ASSERT on for a debug build, but is UNUSED in a release build. 2011-06-25 Joseph Pecoraro <joepeck@webkit.org> Unreviewed build fix. Use UNUSED_PARAM on the correct param! * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): 2011-06-25 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Simon Fraser. Inspector highlight rect is wrong for contents of transformed iframes https://bugs.webkit.org/show_bug.cgi?id=53627 Part 2: Only adjust for the FrameView's scroll position when the localToAbsolute mapping did not end with fixed content. Content that is inside of a fixed position container is already adjusted for the FrameView's scrollPosition when RenderView maps local to container. This patch uses a "wasFixed" out parameter to determine if the localToAbsolute transformation ended inside a fixed block, and if so does not apply the scroll position. * page/FrameView.cpp: (WebCore::FrameView::convertFromRenderer): Respect wasFixed as described above. * rendering/RenderBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): This is the only time that "fixed" ever changed. So when fixed changes, update the optional wasFixed out parameter. * rendering/RenderObject.cpp: (WebCore::RenderObject::localToAbsolute): (WebCore::RenderObject::mapLocalToContainer): (WebCore::RenderObject::localToContainerQuad): * rendering/RenderObject.h: (WebCore::RenderObject::localToAbsoluteQuad): Ignore wasFixed by default, but pipe it though where needed. * rendering/RenderView.h: * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): This is the final recursive call, so wasFixed goes no further. We sanity check its value in debug builds. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::selectionGapRectsForRepaint): * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): * rendering/RenderInline.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): * rendering/svg/RenderSVGText.h: * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): * rendering/svg/SVGRenderSupport.h: Pipe wasFixed through where needed. 2011-06-25 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Simon Fraser. Inspector highlight rect is wrong for contents of transformed iframes https://bugs.webkit.org/show_bug.cgi?id=53627 Part 1: Provide FloatQuad versions of convertFromRenderer, convertToContainingView, and convertChildToSelf, so that we can get the fully transformed quad of a renderer all the way up to the root widget. * page/FrameView.cpp: (WebCore::FrameView::convertFromRenderer): (WebCore::FrameView::convertToContainingView): * page/FrameView.h: * platform/ScrollView.h: (WebCore::ScrollView::convertChildToSelf): * platform/Widget.h: * platform/Widget.cpp: (WebCore::Widget::convertToContainingView): Provide FloatQuad versions of these already existing functions. (WebCore::Widget::convertToRootContainingView): Provide a helper conversion function to recursively convert a given FloatQuad up to the root widget. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::DrawNodeHighlight): Use the new methods to convert the FloatQuad for the highlighted node to the root container, without losing transformation information. Add a FIXME for SVG, which is still broken. * WebCore.exp.in: Export the new Widget functions so WebKit can link properly. 2011-06-25 Dirk Schulze <krit@webkit.org> Unreviewed build fix. SVGAnimatedType should support SVGNumberList animation https://bugs.webkit.org/show_bug.cgi?id=63387 * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue): 2011-06-25 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatedType should support SVGNumberList animation https://bugs.webkit.org/show_bug.cgi?id=63387 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGNumberList. Animations of attributes with type SVGNumberList can be interpolated now. Tests: svg/animations/svgnumberlist-animation-1.html svg/animations/svgnumberlist-animation-2.html * CMakeLists.txt: Added new file to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberList. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedNumber): Made method static for reuse in SVGAnimatedNumberList (and SVGAnimatedNumberOptionalNumber later). (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): Use new static function. * svg/SVGAnimatedNumber.h: * svg/SVGAnimatedNumberList.cpp: Added. New animator for SVGNumberList. (WebCore::SVGAnimatedNumberListAnimator::SVGAnimatedNumberListAnimator): (WebCore::SVGAnimatedNumberListAnimator::constructFromString): (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedNumberListAnimator::calculateDistance): * svg/SVGAnimatedNumberList.h: (WebCore::SVGAnimatedNumberListAnimator::~SVGAnimatedNumberListAnimator): * svg/SVGAnimatedType.cpp: Use new Animator. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createNumberList): (WebCore::SVGAnimatedType::numberList): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): 2011-06-25 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGPath to SVGAnimatorFactory concept https://bugs.webkit.org/show_bug.cgi?id=63336 Convert <animate attributeName="d"> parsing to the new SVGAnimatorFactory concept, removing the last special data types from SVGAnimateElement: SVGPathByteStream m_fromPath/m_toPath/m_animatedPath. All existing non-string primitives have been converted to the new concept. Doesn't change any functionality. * CMakeLists.txt: Added SVGAnimatedPath.*. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): * svg/SVGAnimateElement.h: * svg/SVGAnimatedPath.cpp: Added. (WebCore::SVGAnimatedPathAnimator::SVGAnimatedPathAnimator): (WebCore::SVGAnimatedPathAnimator::constructFromString): (WebCore::SVGAnimatedPathAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedPathAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedPathAnimator::calculateDistance): * svg/SVGAnimatedPath.h: Added. (WebCore::SVGAnimatedPathAnimator::~SVGAnimatedPathAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createPath): (WebCore::SVGAnimatedType::path): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::initializeFrom): * svg/SVGPathParserFactory.cpp: (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromSVGPathSegList): (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromString): (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream): 2011-06-25 Jer Noble <jer.noble@apple.com> Reviewed by Maciej Stachowiak. SOFT_LINK_POINTER_OPTIONAL isn't optional. https://bugs.webkit.org/show_bug.cgi?id=63378 Continuation of r89718. SOFT_LINK_POINTER_OPTIONAL should check the value returned by dlsym before dereferencing it. * platform/mac/SoftLinking.h: 2011-06-25 Rob Buis <rbuis@rim.com> Reviewed by Nikolas Zimmermann. SVG1.1SE test linking-uri-01-b.svg fails https://bugs.webkit.org/show_bug.cgi?id=63322 Allow navigating to internal <view> targets. When choosing Back ensure the <svg> current view is initialized correctly. Tests: svg/W3C-SVG-1.1-SE/linking-uri-01-b.svg svg/custom/linking-uri-01-b.svg * page/FrameView.cpp: Delegate to setupInitialView. (WebCore::FrameView::scrollToAnchor): * svg/SVGAElement.cpp: Allow navigating to internal <view> targets. (WebCore::SVGAElement::defaultEventHandler): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setupInitialView): Initialize current view depending on fragment identifier. (WebCore::SVGSVGElement::inheritViewAttributes): * svg/SVGSVGElement.h: 2011-06-24 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Adler. REGRESSION (r77740): Shadow DOM pseudo elements aren't matching when combined with descendant selectors https://bugs.webkit.org/show_bug.cgi?id=63373 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::pushParentStackFrame): Changed to use parentOrHostElement. (WebCore::CSSStyleSelector::pushParent): Ditto. * dom/Node.cpp: (WebCore::Node::parentOrHostElement): Added. * dom/Node.h: 2011-06-24 Dan Bernstein <mitz@apple.com> Reviewed by Anders Carlsson. Add an option to enable legacy rounding hacks https://bugs.webkit.org/show_bug.cgi?id=63363 Restored most of text rounding hacks which were removed in r78846, with a global flag to control whether rounding hacks are allowed, which defaults to false. Test: platform/mac/fast/text/rounding-hacks.html * CMakeLists.txt: Added TextRun.cpp. * GNUmakefile.list.am: Ditto. * WebCore.exp.in: Export new TextRun function and global and updated StringTruncator functions. * WebCore.gypi: Added TextRun.cpp. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawTextInternal): Disable rounding hacks in the one place they used to be disabled. * platform/graphics/Font.cpp: Re-added the rounding character table. * platform/graphics/Font.h: (WebCore::Font::isRoundingHackCharacter): Re-added. * platform/graphics/FontFastPath.cpp: (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Account for final rounding width. * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth. * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::adjustedSpaceWidth): Re-added. * platform/graphics/StringTruncator.cpp: (WebCore::stringWidth): Re-added disableRoundingHacks parameter. (WebCore::truncateString): Ditto. (WebCore::StringTruncator::centerTruncate): Added EnableRoundingHacksOrNot parameter. (WebCore::StringTruncator::rightTruncate): Ditto. (WebCore::StringTruncator::width): Ditto. * platform/graphics/StringTruncator.h: * platform/graphics/TextRun.cpp: Added. (WebCore::TextRun::setAllowsRoundingHacks): Added. * platform/graphics/TextRun.h: (WebCore::TextRun::TextRun): Added RoundingHacks parameter to the constructors, used to initialize the m_applyRunRounding and m_applyWordRounding member variables, subject to rounding hacks being allowed. (WebCore::TextRun::applyRunRounding): Re-added this accessor. (WebCore::TextRun::applyWordRounding): Ditto. (WebCore::TextRun::disableRoundingHacks): Re-added. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::WidthIterator): Re-added code to apply rounding hacks. (WebCore::WidthIterator::advance): Ditto. * platform/graphics/WidthIterator.h: * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ceilCGFloat): Re-added. (WebCore::ComplexTextController::ComplexTextController): Re-added code to apply rounding hacks. (WebCore::ComplexTextController::advance): Ditto. (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto. * platform/graphics/mac/ComplexTextController.h: (WebCore::ComplexTextController::finalRoundingWidth): Re-added this accessor. * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore::Font::getGlyphsAndAdvancesForComplexText): Accound for final rounding width. * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::fileListNameForWidth): Enabled rounding hacks in the string truncator. * platform/mac/DragImageMac.mm: (WebCore::widthWithFont): Disable rounding hacks when measuring. (WebCore::drawAtPoint): Disable rounding hacks when drawing. * platform/win/DragImageWin.cpp: (WebCore::createDragImageForLink): Enable rounding hacks in the string truncator. * platform/win/WebCoreTextRenderer.cpp: (WebCore::WebCoreTextFloatWidth): Ditto. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): Disable rounding hacks. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): Ditto. (WebCore::RenderListBox::paintItemForeground): Ditto. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::getAvgCharWidth): Ditto. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::fileListNameForWidth): Enabled rounding hacks in the string truncator. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::fileListNameForWidth): Ditto. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::constructTextRun): Disabled rounding hacks. * rendering/svg/SVGTextMetrics.cpp: (WebCore::constructTextRun): Ditto. 2011-06-24 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Rob Buis. Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts https://bugs.webkit.org/show_bug.cgi?id=59085 font substitution doesn't work for HTML text using SVG fonts https://bugs.webkit.org/show_bug.cgi?id=17608 Selection rects are wrong for text with SVG fonts https://bugs.webkit.org/show_bug.cgi?id=25460 With @font-face, SVG fonts only work as primary, non-segmented https://bugs.webkit.org/show_bug.cgi?id=32227 When using SVG fonts with @font-face word-spacing and text-align: justify are not being honored https://bugs.webkit.org/show_bug.cgi?id=34236 SVG @font-face breaks text-overflow: ellipsis https://bugs.webkit.org/show_bug.cgi?id=36840 REGRESSION: SVG Font selection problems https://bugs.webkit.org/show_bug.cgi?id=41934 Tests: svg/custom/svg-fonts-fallback.xhtml (for bug 17608, extended the original test from Mark Ambachtsheer) svg/custom/svg-fonts-segmented.xhtml (for bug 32227) svg/custom/svg-fonts-word-spacing.html (for bug 34236, from Michael Lewis) svg/text/select-text-svgfont.html (for bug 25460/41934, from Emil Schutte) svg/text/text-overflow-ellipsis-svgfont.html (for 36840, from Emil Schutte) Rewrite the SVG Fonts support to fully integrate within the GlyphPage concept and the "simple" code path used to render platform fonts. That means the special logic for measuring text using SVG Fonts, calculating offset for positions, computing selection rects etc. is all gone now. There's no difference anymore between using a native font or a SVG Font, in terms of these operations. This makes text selection using SVG Fonts possible again. * features.pri: Temporarily turn of SVG Fonts for Qt, as long as QRawFont support is not available and the fast path is disabled. * page/DOMWindow.idl: Touched file to force Qt regenerating the bindings. * platform/graphics/Font.cpp: Remove SVG Font special cases, the simple code path now handles SVG Fonts as well. (WebCore::Font::drawText): (WebCore::Font::drawEmphasisMarks): (WebCore::Font::width): (WebCore::Font::selectionRectForText): (WebCore::Font::offsetForPosition): (WebCore::Font::codePath): * platform/graphics/Font.h: Pass TextRun to drawGlyphBuffer/drawEmphasisMarks. Add new glyphDataAndPageForCharacter() method which returns a pair std::pair<GlyphData, GlyphPage*>, so we know the associated GlyphPage for a certain GlyphData object, which is needed to properly handle font fallback glyph matching for SVG Fonts.. (WebCore::Font::fontList): Add FontFallbackList accessor. * platform/graphics/FontFallbackList.h: Add getters/setters for glyphPageZero -- SVG Fonts support needs access to these objects from SVGTextRunRenderingContext. (WebCore::FontFallbackList::glyphPageZero): (WebCore::FontFallbackList::glyphPages): (WebCore::FontFallbackList::setGlyphPageZero): (WebCore::FontFallbackList::setGlyphPages): * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): Move implementation to glyphDataAndPageForCharacter(), and use that method from here. (WebCore::Font::glyphDataAndPageForCharacter): Does the same as before, just returns an additional GlyphPage* pointer. (WebCore::Font::getEmphasisMarkGlyphData): Remove SVG Fonts special case. (WebCore::Font::drawGlyphBuffer): Ditto. * platform/graphics/FontMetrics.h: (WebCore::scaleEmToUnits): Refactored scaleEmToUnits free function from SimpleFontDataMac/CGWin to share with SVGFontData/SVGTextRunRenderingContext. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::fill): Stop skipping SVG Fonts, they now also fill the GlyphPage using the glyphs defined in the SVG Font. * platform/graphics/SVGGlyph.h: s/isValid/isPartOfLigature/. Its usage has been changed. (WebCore::SVGGlyph::SVGGlyph): (WebCore::SVGGlyph::operator==): * platform/graphics/SimpleFontData.cpp: Change font size to be a float, not an int. (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: Add new pure virtual methods to the AdditionalFontData interface, to be implemented in SVGFontData. (WebCore::SimpleFontData::widthForGlyph): Call widthForSVGGlyph, if we encounter a SVG glyph. * platform/graphics/TextRun.h: * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::glyphDataForCharacter): (WebCore::WidthIterator::advance): * platform/graphics/WidthIterator.h: Store several new members needed for SVG Fonts support (last processed glyph name used for kerning pair lookup) and a map mapping each character of a text to its arabic-form (if needed, to perform SVG glyph selection for Arabic text). (WebCore::WidthIterator::run): (WebCore::WidthIterator::runWidthSoFar): (WebCore::WidthIterator::lastGlyphName): (WebCore::WidthIterator::setLastGlyphName): (WebCore::WidthIterator::arabicForms): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Use new scaleEmToUnits free function from FontMetrics.h. * platform/graphics/mac/SimpleFontDataMac.mm: Ditto. * platform/graphics/win/SimpleFontDataCGWin.cpp: Ditto. * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes): Handle UTF-16 surrogate pairs correctly, fixes the previous Acid3 regression. * rendering/svg/SVGTextMetrics.cpp: (WebCore::SVGTextMetrics::SVGTextMetrics): (WebCore::constructTextRun): (WebCore::SVGTextMetrics::measureCharacterRange): * rendering/svg/SVGTextMetrics.h: * rendering/svg/SVGTextRunRenderingContext.cpp: Remove drawTextUsingSVGFont/floatWidthUsingSVGFont/selectionRectForTextUsingSVGFont/offsetForPositionForTextUsingSVGFont. (WebCore::firstParentRendererForNonTextNode): Don't assert node() exists, doesn't hold true for generated render objects. (WebCore::renderObjectFromRun): Renamed from referencingRenderObjectFromRun. (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Remove extra "extraCharsAvailable" parameter, now solves via TextRun::charactersLength(). (WebCore::calculateEmUnitToPixelScaleFactor): Add helper method. (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Main drawing method, this actually creates/renders Paths. (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Part 1/2 of SVG Glyph selection code. * rendering/svg/SVGTextRunRenderingContext.h: * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElement): * svg/SVGAltGlyphElement.h: * svg/SVGFontData.cpp: (WebCore::SVGFontData::initializeFontData): Changed font size from int to float. (WebCore::SVGFontData::widthForSVGGlyph): Lookup a SVGGlyph from a Glyph using the glyph table in SVGFontElement and calculate its width. (WebCore::SVGFontData::applySVGGlyphSelection): Part 2/2 of SVG Glyph selection code. (WebCore::SVGFontData::fillSVGGlyphPage): Fill GlyphPage using glyphs defined in the SVG Font. (WebCore::SVGFontData::fillBMPGlyphs): Moved from the previous fillSVGGlyphPage implementation. (WebCore::SVGFontData::fillNonBMPGlyphs): Add non-bmp glyph handling, fixing the Acid3 regression (support using SVGGlyphs for UTF-16 surrogate pairs). * svg/SVGFontData.h: * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Enable ligature registration for the use within GlyphPage. (WebCore::SVGFontElement::ensureGlyphCache): * svg/SVGGlyphMap.h: Switch to use SurrogatePairTextIterator, and switch glyph table from UChar to UChar32, just like GlyphPage, to handle glyphs from non-BMP correctly. (WebCore::SVGGlyphMap::addGlyph): Remove setting isValid, it's not needed anymore and gone. (WebCore::SVGGlyphMap::collectGlyphsForString): * svg/svgtags.in: Surround vkern in ENABLE_SVG_FONTS block. 2011-06-24 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Antonio Gomes. [CMAKE] Replace ";" with space in FEATURE_DEFINES macro https://bugs.webkit.org/show_bug.cgi?id=62211 html.css file doesn't recognize ENABLE_XXX macro because FEATURE_DEFINES macro has ";" as separator. So, let the html.css to use new feature macro with space separator. * CMakeLists.txt: 2011-06-24 Gavin Peters <gavinp@chromium.org> Reviewed by Darin Adler. fix possible race in LinkLoader https://bugs.webkit.org/show_bug.cgi?id=63360 In chromium bug 80729 http://code.google.com/p/chromium/issues/detail?id=80729 I am seeing some kind of double triggering of the timer; I am concerned that it is possible that a Link element errors out or succeeds, sets a timer, and shortly before the timer is triggered it is editted, launches another request. After that, the first timer triggers, zeroing out m_cachedResource. Then, the second load finishes, and *crash*. If this is the case, this fix should stop it. No new tests; I haven't reproduced this. I hope chrome's crash telemetry will give good feedback; this crash is occuring many times a day so the difference should be obvious. * loader/LinkLoader.cpp: (WebCore::LinkLoader::LinkLoader): (WebCore::LinkLoader::linkLoadTimerFired): (WebCore::LinkLoader::linkLoadingErrorTimerFired): (WebCore::LinkLoader::notifyFinished): * loader/LinkLoader.h: 2011-06-24 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Safari will quit unexpectedly when launching Safari in the first time (crash in initQTSecurityPolicyNoLocalToRemoteSiteAttribute) https://bugs.webkit.org/show_bug.cgi?id=63332 <rdar://problem/9661650> No new tests; Only affects machines with QTKit < 7.6.3 installed. Check to see if QTSecurityPolicyNoRemoteToLocalSiteAttribute is non-NULL before passing it into -[QTMovie initWithAttributes:], as it is only defined in QTKit >= 7.6.3. If it is NULL, pass QTSecurityPolicyNoCrossSiteAttribute=YES instead, which has the same effect in earlier versions of QTKit as the NoLocalToRemote and NoRemoteToLocal keys. To avoid ASSERTs when running debug builds with earlier versions of QTKit, add a SOFT_LINK_POINTER_OPTIONAL macro to SoftLinking.h and make these keys optional. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): * platform/mac/SoftLinking.h: Add SOFT_LINK_POINTER_OPTIONAL macro. 2011-06-24 Darin Adler <darin@apple.com> Try to fix Windows build failure. * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::setFileDescriptorData): Copy string into a local so we can call charactersWithNullTermination on it. 2011-06-23 Darin Adler <darin@apple.com> Reviewed by Adam Barth. Remove some unneeded functions from FrameLoader https://bugs.webkit.org/show_bug.cgi?id=63295 Removing 7 of the functions in FrameLoader.h is probably a step in the right direction. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::handledOnloadEvents): Moved the call to stopDeferringEvents in here from FrameLoader. * loader/DocumentLoader.h: Ditto. * loader/DocumentWriter.h: Fixed a typo. * loader/FrameLoader.cpp: (WebCore::FrameLoader::setFirstPartyForCookies): Changed this to use a non-recursive tree walk instead of recursion. (WebCore::FrameLoader::stopAllLoaders): Moved the code from stopLoadingSubframes inline, since it's only two lines of code. (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Moved the code from markLoadComplete inline, since it's only one line. (WebCore::FrameLoader::checkLoadComplete): Changed this to use a non-recursive tree walk instead of recursion, eliminating the recursiveCheckLoadComplete function completely. (WebCore::FrameLoader::handledOnloadEvents): Moved the call to stopDeferringEvents into DocumentLoader. * loader/FrameLoader.h: Removed unneeded forward declarations, and now-unneeded functions setupForReplaceByMIMEType, isStopping, isLoadingFromCachedPage, stopLoadingSubframes, markLoadComplete, mainReceivedError, and recursiveCheckLoadComplete. Also made allChildrenAreComplete private. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): Call DocumentLoader::isStopping so we can remove the function from FrameLoader that just calls through. Other call sites were using DocumentLoader::isStopping directly. (WebCore::MainResourceLoader::didReceiveResponse): Call DocumentLoader::setupForReplaceByMIMEType so we can remove the function from FrameLoader that just calls through. This was the only call site. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): Call the ResourceLoader::cancelledError function instead of calling directly to FrameLoader. * loader/ResourceLoader.h: Made response an inline function. 2011-06-24 Alexey Proskuryakov <ap@apple.com> Rubber-stamped by Maciej Stachowiak. REGRESSION (r88984): Infinite recursion in DocumentLoader::detachFromFrame/stopLoading No new tests, as there is no known way to reproduce this (but we'll keep investigating, as the rollout will re-introduce the older less frequent crash). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): Rollout the fix for bug 62764. 2011-06-24 Tony Chang <tony@chromium.org> Reviewed by Ojan Vafai. add flexbox and inline-flexbox as possible CSS display values https://bugs.webkit.org/show_bug.cgi?id=63361 Test: css3/flexbox/display-property.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSValueKeywords.in: 2011-06-24 Anna Cavender <annacc@chromium.org> Reviewed by Eric Carlson. Loading out-of-band text track files from <track>. https://bugs.webkit.org/show_bug.cgi?id=62881 Uses the src attribute of <track> urls to load out-of-band text track files using ThreadableLoader. Also removes TextTrackPrivateInterface (as well as LoadableTextTrackImpl and MutableTextTrackImpl) classes. No new tests because feature is hidden behind VIDEO_TRACK feature define, which is turned off. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: * html/HTMLTrackElement.cpp: * html/HTMLTrackElement.h: * html/LoadableTextTrack.cpp: * html/LoadableTextTrack.h: * html/LoadableTextTrackImpl.cpp: Removed. * html/LoadableTextTrackImpl.h: Removed. * html/MutableTextTrack.cpp: * html/MutableTextTrack.h: * html/MutableTextTrackImpl.cpp: Removed. * html/MutableTextTrackImpl.h: Removed. * html/TextTrack.cpp: * html/TextTrack.h: * html/TextTrackPrivate.h: Removed. * platform/track/CueParser.cpp: * platform/track/CueParser.h: 2011-06-24 Rob Buis <rbuis@rim.com> Rubber-stamped by Nikolas Zimmermann. All pointer-events fail if text has visibility="hidden" https://bugs.webkit.org/show_bug.cgi?id=62209 Do not use writing mode aware code for SVG Text. No new tests needed. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint): 2011-06-24 Lukasz Slachciak <l.slachciak@samsung.com> Reviewed by Darin Adler. Change NDEBUG to !LOG_DISABLED macro in databases for logging. https://bugs.webkit.org/show_bug.cgi?id=63346 Changed NDEBUG to !LOG_DISABLED in databases code which involves logging. This change resolves also build break in Release build when logging enabled. No new tests because there is no new behavior or feature exposed. * loader/icon/IconDatabase.cpp: Macro fixes. (WebCore::IconDatabase::iconDatabaseSyncThread): (WebCore::IconDatabase::syncThreadMainLoop): (WebCore::IconDatabase::readFromDatabase): (WebCore::IconDatabase::writeToDatabase): (WebCore::IconDatabase::cleanupSyncThread): * storage/AbstractDatabase.h: Macro fixes. * storage/DatabaseTask.cpp: Macro fixes. * storage/DatabaseTask.h: Macro fixes. * storage/SQLTransaction.cpp: Macro fixes. * storage/SQLTransaction.h: Macro fixes. 2011-06-24 Tony Chang <tony@chromium.org> Reviewed by Adam Barth. Pass Strings by const reference to functions https://bugs.webkit.org/show_bug.cgi?id=63341 Note that since Strings hold a RefPtr to StringImpl, passing Strings by value isn't horrible, but it does cause ref count churn and using const references is more consistent with the rest of the code base. * loader/FrameLoader.cpp: (WebCore::FrameLoader::addHTTPOriginIfNeeded): Rework the code to not change the value of the passed in String. * loader/FrameLoader.h: * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::setFileDescriptorData): * platform/win/ClipboardUtilitiesWin.h: * storage/DatabaseTracker.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore): * storage/IDBLevelDBBackingStore.h: * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::IDBSQLiteBackingStore): * storage/IDBSQLiteBackingStore.h: * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::getOpenDatabases): * svg/SVGPaint.cpp: (WebCore::SVGPaint::SVGPaint): * svg/SVGPaint.h: * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SMILTimeContainer.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-06-24 Abhishek Arya <inferno@chromium.org> Reviewed by Darin Adler. Add clamping for CSSPrimitiveValues and SVGInlineText font size. https://bugs.webkit.org/show_bug.cgi?id=53449 Test: svg/text/svg-zoom-large-value.xhtml * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): add asserts to detect if the number created is valid. * css/CSSPrimitiveValue.h: add clamping checks to prevent overflows. (WebCore::CSSPrimitiveValue::getFloatValue): (WebCore::CSSPrimitiveValue::getIntValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): split into two static functions, one specific to CSSStyleSelector and other generic to help in clamping font size for other callers like svg text, etc. * css/CSSStyleSelector.h: * platform/graphics/FontDescription.h: add asserts to detect if the new font size is valid. (WebCore::FontDescription::setComputedSize): (WebCore::FontDescription::setSpecifiedSize): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): use the new helper from CSSStyleSelector to help in clamping new scaled font size. do not use "smart minimum" since svg allows really small unreadable fonts (tested by existing layout tests). Document's minimum font size clamp (0 in my case) and harmless epsilon check in CSSStyleSelector function should still hold for svg. 2011-06-24 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Darin Adler. Remove unsafe static_cast inside the InlineBox hierarchy https://bugs.webkit.org/show_bug.cgi?id=63077 Refactoring only, no new test. * rendering/InlineFlowBox.h: (WebCore::toInlineFlowBox): * rendering/InlineTextBox.h: (WebCore::toInlineTextBox): Added the proper cast methods to those 2 classes from an InlineBox. * rendering/InlineBox.cpp: (WebCore::InlineBox::nextLeafChild): (WebCore::InlineBox::prevLeafChild): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth): (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): (WebCore::InlineFlowBox::placeBoxesInInlineDirection): (WebCore::InlineFlowBox::requiresIdeographicBaseline): (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::flipLinesInBlockDirection): (WebCore::InlineFlowBox::computeOverflow): (WebCore::InlineFlowBox::firstLeafChild): (WebCore::InlineFlowBox::lastLeafChild): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForBox): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::constructLine): (WebCore::setLogicalWidthForTextRun): (WebCore::computeExpansionForJustifiedText): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): * rendering/RenderText.cpp: (WebCore::RenderText::localCaretRect): (WebCore::RenderText::positionLineBox): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::ascentAndDescentForBox): (WebCore::RootInlineBox::includeFontForBox): (WebCore::RootInlineBox::includeGlyphsForBox): Replaced the static_cast in those previous call sites with the new cast methods. 2011-06-24 Alexis Menard <alexis.menard@openbossa.org> Unreviewed build fix. Build fix on Linux when using the GStreamer backend. No new tests, just a build fix. * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp: (FullScreenVideoWindow::keyPressEvent): 2011-06-24 Nat Duca <nduca@chromium.org> Unreviewed, rolling out r89694. http://trac.webkit.org/changeset/89694 https://bugs.webkit.org/show_bug.cgi?id=58408 Test shell still not ready for animate changes. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::setViewport): (WebCore::LayerRendererChromium::updateAndDrawLayers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::setShowFPSCounter): (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed. * platform/graphics/chromium/cc/CCLayerTreeHost.h: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Removed. * platform/graphics/chromium/cc/CCMainThreadTask.h: * platform/graphics/chromium/cc/CCThread.cpp: (WebCore::CCThread::runLoop): * platform/graphics/chromium/cc/CCThreadTask.h: 2011-06-24 Chris Rogers <crogers@google.com> Unreviewed build fix. Fix Chromium Linux Build https://bugs.webkit.org/show_bug.cgi?id=63349 * WebCore.gyp/WebCore.gyp: 2011-06-24 Henry Song <hsong@sisa.samsung.com> Reviewed by Martin Robinson. Correct _sharedTimer value in SharedTimerEfl.cpp https://bugs.webkit.org/show_bug.cgi?id=62380 SharedTimerEfl.cpp set _sharedTimer = 0 is incorrect in timerEvent(), we have observed addNewTimer() can be triggered by either inside timerFunction() or others that are not within timerFunction(). We have observed the following case: 1. add a new Timer within timerFunction() 2. timerFunction returns, set _sharedTimer = 0 3. addNewTimer() is triggered again within webkit, don't know it triggers this. 4. because at this moment, _sharedTimer == 0, the previous registered timer (in step 1) did not get removed. 5. Now in ecore_timer, there are two timers with same callbacks 6. From now on, timerFunction() will be called twice back-to-back in each ecore_timer loop. To correct this, we should set _sharedTimer = 0 before timerFunction() so that when addNewTimer() triggered within, we have a valid timer object. * platform/efl/SharedTimerEfl.cpp: (WebCore::timerEvent): 2011-05-17 Nat Duca <nduca@chromium.org> Reviewed by James Robinson. [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor https://bugs.webkit.org/show_bug.cgi?id=58408 Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main thread and compositor thread halves of a composited view. Communication between the two is based on the design used in FileStreamProxy. * WebCore.gypi: * platform/chromium/TraceEvent.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::setViewport): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromiumImpl::create): (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent): (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl): (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread): (WebCore::LayerRendererChromiumImplProxy::create): (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl): (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy): (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::setShowFPSCounter): (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::currentFrameNumber): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::init): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::beginCommit): (WebCore::CCLayerTreeHost::commitComplete): (WebCore::CCLayerTreeHost::animateAndLayout): (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter): (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHost::setNeedsRedraw): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHost::frameNumber): * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostCommitter::create): (WebCore::CCLayerTreeHostCommitter::commit): * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added. (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::beginCommit): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHostImpl::setNeedsRedraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp. (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::frameNumber): (WebCore::CCLayerTreeHostImpl::sourceFrameNumber): (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added. (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy): (WebCore::CCLayerTreeHostImplProxy::start): (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy): (WebCore::CCLayerTreeHostImplProxy::isStarted): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw): (WebCore::CCLayerTreeHostImplProxy::stop): (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::isMainThread): (WebCore::CCLayerTreeHostImplProxy::isCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit): (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread): (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added. (WebCore::CCLayerTreeHostImplProxy::host): * platform/graphics/chromium/cc/CCMainThreadTask.h: * platform/graphics/chromium/cc/CCThread.cpp: (WebCore::CCThread::runLoop): * platform/graphics/chromium/cc/CCThreadTask.h: 2011-06-24 Adrienne Walker <enne@google.com> Unreviewed, remove assertion about root layers in RenderLayerBacking. https://bugs.webkit.org/show_bug.cgi?id=60741 This was added in r89687, but somehow is not true on Safari Leopard. However, as the tests that were added with that revision are passing correctly, the assertion is most likely not correct. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2011-06-24 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Refactor text iterator code respecting surrogate pairs from WidthIterator https://bugs.webkit.org/show_bug.cgi?id=63319 WidthIterator contains a surrogate pair aware text iterator that is needed in other parts of WebCore. Refactor the code into its own SurrogatePairAwareTextIterator class. It can be used like this: UChar32 character = 0; unsigned clusterLength = 0; SurrogatePairAwareTextIterator textIterator(myString.characters(), 0, myString.length(), myString.length()); while (textIterator.consume(character, clusterLength)) { // Either clusterLength is 1 and UChar32 fits into a single UChar. // Or clusterLength is 2 and the UChar32 has been computed by combining the high & low surrogate pairs ... textIterator.advance(clusterLength); } SVGGlyphMap is the next candidate that wants to make use of SurrogatePairAwareTextIterator. Doesn't affect any tests, just refactoring. * CMakeLists.txt: Add SurrogatePairAwareTextIterator.* to build. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * platform/graphics/SurrogatePairAwareTextIterator.cpp: Copied from platform/graphics/WidthIterator.cpp. * platform/graphics/SurrogatePairAwareTextIterator.h: Added. (WebCore::SurrogatePairAwareTextIterator::currentCharacter): * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): * platform/graphics/WidthIterator.h: 2011-06-24 Adrienne Walker <enne@google.com> Reviewed by Simon Fraser. Incorrect RenderLayer transforms on overflow RTL pages https://bugs.webkit.org/show_bug.cgi?id=60741 Fix positioning of the root graphics layer for RTL pages. The fact that the left side of the page is negative for pages with overflow is not taken into account when calculating the position. This negative value ends up being double-counted for the root graphics layer (once in the position and once in the offset) and it shifts child layers into the wrong place. Tests: compositing/rtl/rtl-absolute-overflow-scrolled.html compositing/rtl/rtl-absolute-overflow.html compositing/rtl/rtl-absolute.html compositing/rtl/rtl-fixed-overflow-scrolled.html compositing/rtl/rtl-fixed-overflow.html compositing/rtl/rtl-fixed.html compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html compositing/rtl/rtl-iframe-absolute-overflow.html compositing/rtl/rtl-iframe-absolute.html compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html compositing/rtl/rtl-iframe-fixed-overflow.html compositing/rtl/rtl-iframe-fixed.html compositing/rtl/rtl-iframe-relative.html compositing/rtl/rtl-relative.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2011-06-24 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Enrica Casucci. Add BeforeChildren and AfterChildren to the Position's anchor types https://bugs.webkit.org/show_bug.cgi?id=63100 Added PositionIsBeforeChildren and PositionIsAfterChildren to Position::AnchorType and deployed them in firstPositionInNode and lastPositionInNode. These new types of positions will let us express the first and the last positions in a non-text node in O(1). No new tests because there is no new behavior or feature exposed. * dom/Position.cpp: (WebCore::Position::Position): Assert that the anchor type is not BeforeChildren and AfterChildren for text nodes. (WebCore::Position::containerNode): For BeforeChildren and AfterChildren, the anchor node is the container node. (WebCore::Position::computeOffsetInContainerNode): The offset in the container node is 0 for BeforeChildren and the offset in the anchor node for AfterChildren. (WebCore::Position::offsetForPositionAfterAnchor): Called by deprecatedNode; the anchor type could be AfterChildren. (WebCore::Position::parentAnchoredEquivalent): If the anchor node is before or after children, then do the trick for table and ignored contents like before or after anchor. (WebCore::Position::computeNodeBeforePosition): Returns null for BeforeChildren and returns the last child of the anchor node for AfterChildren. (WebCore::Position::computeNodeAfterPosition): Returns the first child of the anchor node for BeforeChildren (WebCore::Position::atFirstEditingPositionForNode): A position is at the last editing position if the anchor type is BeforeChildren, or the anchor type is AfterChildren or AfterAnchor and the anchor doesn't have any children. (WebCore::Position::atLastEditingPositionForNode): A position is at the last editing position if the anchor type is AfterChildren. (WebCore::Position::showAnchorTypeAndOffset): Supports BeforeChildren and AfterChildren. * dom/Position.h: (WebCore::Position::deprecatedEditingOffset): Returns m_offset if the anchor type is BeforeChildren. (WebCore::firstPositionInNode): Returns a position in offset for a text node. Otherwise returns BeforeChildren. (WebCore::lastPositionInNode): Returns a position in offset for a text node. Otherwise returns AfterChildren. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::positionOutsideTabSpan): Since the anchor node was a text node, the anchor type shouldn't be BeforeChildren or AfterChildren. * editing/DeleteSelectionCommand.cpp: (WebCore::updatePositionForNodeRemoval): Supports BeforeChildren and AfterChildren. (WebCore::DeleteSelectionCommand::handleGeneralDelete): Calls updatePositionForNodeRemoval on m_downstremEnd when its anchor node is removed instead of manually updating the offset; also avoid calling moveToOffset on BeforeChildren or AfterChildren position. * editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::formatRange): Since lastParagraphInBlockNode is used to insert a placeholder after paragraphs below the block is moved into, it needs to be the position after the current last child in the block instead of after children in the block; otherwise the position will move to the end of block. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): Since the container node is never a text for position before/after children or before/after anchor, just return null for these anchor types. 2011-06-24 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. Convert shadow DOM-related tests to use window.internals https://bugs.webkit.org/show_bug.cgi?id=61671 * WebCore.exp.in: Exports for symbols used by WebCoreTestSupport. * testing/Internals.cpp: The new home of shadowRoot and friends. (WebCore::Internals::ensureShadowRoot): (WebCore::Internals::shadowRoot): (WebCore::Internals::removeShadowRoot): (WebCore::Internals::shadowPseudoId): * testing/Internals.h: * testing/Internals.idl: 2011-06-24 Tony Chang <tony@chromium.org> Reviewed by Darin Adler. Refactor creation of primitive values in CSSParser https://bugs.webkit.org/show_bug.cgi?id=63270 Covered by existing tests. * css/CSSParser.cpp: (WebCore::CSSParser::createPrimitiveNumericValue): Helper method for creating numeric values to keep the cast in one place. (WebCore::CSSParser::createPrimitiveStringValue): Helper method for creating string values. (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseWCSSInputProperty): (WebCore::CSSParser::parsePage): (WebCore::CSSParser::parseSizeParameter): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseFillPositionX): (WebCore::CSSParser::parseFillPositionY): (WebCore::CSSParser::parseFillPositionComponent): (WebCore::CSSParser::parseFillSize): (WebCore::CSSParser::parseAnimationDelay): (WebCore::CSSParser::parseAnimationDuration): (WebCore::CSSParser::parseAnimationIterationCount): (WebCore::CSSParser::parseAnimationName): (WebCore::CSSParser::parseTransformOriginShorthand): (WebCore::CSSParser::parseDashboardRegions): (WebCore::CSSParser::parseCounterContent): (WebCore::CSSParser::parseShape): (WebCore::CSSParser::parseFont): (WebCore::CSSParser::parseReflect): (WebCore::CSSParser::parseBorderRadius): (WebCore::CSSParser::parseCounter): (WebCore::CSSParser::parseDeprecatedGradient): (WebCore::CSSParser::parseLinearGradient): (WebCore::CSSParser::parseRadialGradient): (WebCore::CSSParser::parseGradientColorStops): (WebCore::CSSParser::parseTransform): (WebCore::CSSParser::parseTransformOrigin): (WebCore::CSSParser::parseTextEmphasisStyle): * css/CSSParser.h: * css/CSSPrimitiveValueCache.h: (WebCore::CSSPrimitiveValueCache::createValue): pass String by const reference 2011-06-24 Carlos Garcia Campos <cgarcia@igalia.com> Reviewed by Martin Robinson. [GTK] Fix runtime critical warnings in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=63256 Check whether there's a view widget before trying to use it in PlatformScreenGtk. If there isn't a view widget, which is the case in WebKit2, try to use the default GdkScreen and monitor. * platform/gtk/PlatformScreenGtk.cpp: (WebCore::getToplevel): Helper function to get the toplevel widget. (WebCore::getVisual): Use getToplevel(). (WebCore::getScreen): Helper funtion to get the screen of a widget. (WebCore::screenRect): Use getToplevel() and getScreen(). 2011-06-24 Yuta Kitamura <yutak@chromium.org> Reviewed by Adam Barth. WebSocket: Add run-time flag for new HyBi protocol https://bugs.webkit.org/show_bug.cgi?id=60348 Add a flag in Setting so that WebSocket protocols can be switched dynamically. The protocol we have implemented so far is based on older Hixie-76 specification. A new protocol is being discussed in IETF HyBi working group, and I'm planning to implement the new protocol behind this Settings flag. I will add a method to LayoutTestController which flips this flag in a later patch. In this way, we can put tests for both protocols in the same place and test implementation for both protocols at the same time. This patch only adds a flag. The flag is not used yet, thus there is no change in functionality. Therefore, no tests were added. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setUseHixie76WebSocketProtocol): (WebCore::Settings::useHixie76WebSocketProtocol): 2011-06-23 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: [Chromium] Shorten DOMWindow URLs in heap profiles. https://bugs.webkit.org/show_bug.cgi?id=63238 * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.hoverMessage): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.hoverMessage): (WebInspector.HeapSnapshotGenericObjectNode.prototype._updateHasChildren): (WebInspector.HeapSnapshotGenericObjectNode.prototype.isDOMWindow): (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext.pathFound): (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor): (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup.displayString): (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup): * inspector/front-end/utilities.js: (): 2011-06-24 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: HTML preview should delete old iframe on show(). https://bugs.webkit.org/show_bug.cgi?id=63170 * inspector/front-end/ResourceHTMLView.js: (WebInspector.ResourceHTMLView.prototype._createIFrame): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): 2011-06-24 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. Convert AnimatedString to SVGAnimatorFactory concept https://bugs.webkit.org/show_bug.cgi?id=63296 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGString. No new tests added. No change of functionality. * CMakeLists.txt: Added new file to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimateElement.h: * svg/SVGAnimatedString.cpp: Added. Animator for SVGString. (WebCore::SVGAnimatedStringAnimator::SVGAnimatedStringAnimator): (WebCore::SVGAnimatedStringAnimator::constructFromString): (WebCore::SVGAnimatedStringAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedStringAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedStringAnimator::calculateDistance): * svg/SVGAnimatedString.h: (WebCore::SVGAnimatedStringAnimator::~SVGAnimatedStringAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createString): (WebCore::SVGAnimatedType::string): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): 2011-06-24 Mario Sanchez Prada <msanchez@igalia.com> Reviewed by Chris Fleizach. [GTK] Consider rows being ignored when adding children to tables https://bugs.webkit.org/show_bug.cgi?id=62718 Hide row objects in tables in GTK's accessibility wrapper. This is a different approach in the way WebCore's accessible rows are exposed to assistive technologies in the GTK port, since from now on those objects are kept in WebCore (they do not declare to ignore accessibility) and just bypassed in the mapping to ATK, allowing to hide them in the ATK hierarchy while, at the same time, keeping them internally to be able to provide enough information to determine tables related information, such as rows counting or finding an cell for specific coordinates. * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Do not ignore accessibility for table rows here. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_parent): Bypass rows when needed. (getNChildrenForTable): New, find the number of children for a table, which will be the addition of all cells for its rows. (webkit_accessible_get_n_children): Call to getNChildrenForTable for accessibility tables if needed. (getChildForTable): New, bypass rows when needed, retrieving cells as if they were direct children for tables. (webkit_accessible_ref_child): Call to refChildForTable if needed. (getIndexInParentForCellInRow): New, get the index for a given cell in its parent table, considering other rows' cells. (webkit_accessible_get_index_in_parent): Call to getIndexInParentForCellInRow if needed. 2011-06-24 Andrey Kosyakov <caseq@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: extension panel iframes do not span entire panel client area https://bugs.webkit.org/show_bug.cgi?id=63165 * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype.createClientIframe): * inspector/front-end/inspector.css: (iframe.extension): (iframe.panel.extension): 2011-06-24 David Grogan <dgrogan@chromium.org> Reviewed by Pavel Feldman. Web Inspector: [REGRESSION r86838] line numbers do not scroll when script paused https://bugs.webkit.org/show_bug.cgi?id=61653 roll out r86838 No new tests - refactoring. * dom/Document.h: * dom/EventQueue.cpp: (WebCore::EventQueueTimer::EventQueueTimer): (WebCore::EventQueueTimer::fired): (WebCore::EventQueue::create): (WebCore::EventQueue::EventQueue): (WebCore::EventQueue::~EventQueue): (WebCore::EventQueue::enqueueEvent): (WebCore::EventQueue::cancelEvent): (WebCore::EventQueue::cancelQueuedEvents): (WebCore::EventQueue::pendingEventTimerFired): (WebCore::EventQueue::dispatchEvent): * dom/EventQueue.h: 2011-06-24 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89594. http://trac.webkit.org/changeset/89594 https://bugs.webkit.org/show_bug.cgi?id=63316 It broke 5 tests on the Qt bot (Requested by Ossy_DC on #webkit). * WebCore.exp.in: * icu/unicode/uscript.h: * page/Settings.cpp: (WebCore::Settings::setStandardFontFamily): (WebCore::Settings::setFixedFontFamily): (WebCore::Settings::setSerifFontFamily): (WebCore::Settings::setSansSerifFontFamily): (WebCore::Settings::setCursiveFontFamily): (WebCore::Settings::setFantasyFontFamily): * page/Settings.h: (WebCore::Settings::standardFontFamily): (WebCore::Settings::fixedFontFamily): (WebCore::Settings::serifFontFamily): (WebCore::Settings::sansSerifFontFamily): (WebCore::Settings::cursiveFontFamily): (WebCore::Settings::fantasyFontFamily): 2011-06-23 Tony Chang <tony@chromium.org> Reviewed by Kent Tamura. Pass Strings by const reference in bindings code https://bugs.webkit.org/show_bug.cgi?id=63302 Note that since Strings hold a RefPtr to StringImpl, passing Strings by value isn't horrible, but it does cause ref count churn and using const references is more consistent with the rest of the code base. * bindings/generic/BindingSecurity.h: (WebCore::::allowSettingFrameSrcToJavascriptUrl): (WebCore::::allowSettingSrcToJavascriptURL): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serialize): (WebCore::SerializedScriptValue::create): * bindings/js/SerializedScriptValue.h: * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::createFromWire): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: * bindings/v8/V8Binding.h: (WebCore::V8ParameterBase::setString): 2011-06-23 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. [Chromium] Web Inspector: provide context menu item for enabling native worker inspection https://bugs.webkit.org/show_bug.cgi?id=63258 Added context menu checkbox item that allows to enable inspection of native workers. The value will be persisted as other inspector settings and will be restored after frontend/breowser reopening. * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::restoreInspectorStateFromCookie): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didStartWorkerContext): * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::setFrontend): (WebCore::InspectorWorkerAgent::restore): (WebCore::InspectorWorkerAgent::setWorkerInspectionEnabled): * inspector/InspectorWorkerAgent.h: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype._toggleFormatSourceFiles): (WebInspector.ScriptsPanel.prototype._contextMenu.enableWorkerInspection): (WebInspector.ScriptsPanel.prototype._contextMenu): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/inspector.js: (WebInspector.didCreateWorker): (WebInspector.didDestroyWorker): * workers/Worker.cpp: (WebCore::Worker::notifyFinished): 2011-06-23 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Need to turn off default animations for anchorPointZ in PlatformCALayer https://bugs.webkit.org/show_bug.cgi?id=63159 When the z-component of transform-origin changed, we ran an implicit animation of anchorPointZ on the CALayer. Turn this off. Test: transforms/3d/general/transform-origin-z-change.html * platform/graphics/ca/mac/PlatformCALayerMac.mm: (nullActionsDictionary): 2011-06-23 Zhenyao Mo <zmo@google.com> Reviewed by Kenneth Russell. Limit WebGL internal drawingBuffer size to 4k x 4k https://bugs.webkit.org/show_bug.cgi?id=63304 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::reshape): Limit drawing buffer size to 4k x 4k. 2011-06-20 MORITA Hajime <morrita@google.com> Reviewed by Dimitri Glazkov. [ShadowContentElement] should layout child whitespace between span. https://bugs.webkit.org/show_bug.cgi?id=62202 NodeRenderingContext::nextRenderer() and previousRenderer() ignored forwarded content tree hierarchies and used render-object hierarchies instead, that caused some wrong Text node rendering. This change uses ShadowContentElement::m_inclusions for the lookup. In this way, these methods can reflect hierarchies of forward light tree. * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::nextRendererOf): Added. This traverses content element's children for searching neighboring renderer. (WebCore::previousRendererOf): Added. This traverses content element's children for searching neighboring renderer. (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: * dom/ShadowContentElement.h: (ShadowContentElement::inclusionIndexOf): Added. * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::activeElement): * dom/ShadowContentSelector.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::activeContentElement): * dom/ShadowRoot.h: * rendering/RenderTreeAsText.cpp: (WebCore::externalRepresentation): Fixed an apparent bug introduced at r89230. 2011-05-25 James Robinson <jamesr@chromium.org> Reviewed by Kenneth Russell. [chromium] Fix ownership of PlatformImage for ImageLayerChromiums https://bugs.webkit.org/show_bug.cgi?id=61099 For a composited image, both the ImageLayerChromium and its associated LayerTilerChromium need access to a PlatformImage - the ImageLayerChromium has to update the PlatformImage's contents and the LayerTilerChromium has to upload pixels from it. This patch makes the ImageLayerTextureUpdater have exclusive ownership of the PlatformImage and moves ownership of the LayerTextureUpdater from the LayerTilerChromium to the owner of the tiler. The updater is passed in as a parameter to the relevant tiler calls. Patch also fixes a number of minor style issues (missing explicit keyword on constructor, etc). Refactor only, no new tests. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): (WebCore::ContentLayerChromium::draw): (WebCore::ContentLayerChromium::createTilerIfNeeded): (WebCore::ContentLayerChromium::updateCompositorResources): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::create): (WebCore::ImageLayerTextureUpdater::updateFromImage): (WebCore::ImageLayerTextureUpdater::imageSize): (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater): (WebCore::ImageLayerChromium::~ImageLayerChromium): (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::updateCompositorResources): (WebCore::ImageLayerChromium::setLayerRenderer): (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded): (WebCore::ImageLayerChromium::layerBounds): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::updateRootLayerContents): (WebCore::LayerRendererChromium::drawRootLayer): (WebCore::LayerRendererChromium::updateLayers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::LayerTextureUpdater): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::create): (WebCore::LayerTextureUpdaterSkPicture::create): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::create): (WebCore::LayerTilerChromium::LayerTilerChromium): (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): * platform/graphics/chromium/LayerTilerChromium.h: 2011-06-23 Adrienne Walker <enne@google.com> Unreviewed, rolling out r89632 and r89640. http://trac.webkit.org/changeset/89632 http://trac.webkit.org/changeset/89640 https://bugs.webkit.org/show_bug.cgi?id=60741 Breaks ancestor-overflow-change unexpectedly * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2011-06-23 John Bates <jbates@google.com> Reviewed by James Robinson. Fix latch deadlock when GPU process crashes or context is lost. https://bugs.webkit.org/show_bug.cgi?id=63189 The main bug fix is to only set/wait latches if the child context has no errors. Additionally, the LayerChromium classes needed to be modified to not continue drawing when their corresponding contexts have errors. Otherwise, they would draw with invalid texture ids. Test: open particles WebGL demo in chrome, kill GPU process from Task Manager; observe no deadlock. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::updateAndDrawLayers): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::isCompositorContextLost): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::drawsContent): (WebCore::WebGLLayerChromium::updateCompositorResources): (WebCore::WebGLLayerChromium::setContext): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-06-23 Alok Priyadarshi <alokp@chromium.org> Reviewed by James Robinson. [chromium] Red and Blue channels are swapped in images with accelerated drawing https://bugs.webkit.org/show_bug.cgi?id=61442 We were uploading BGRA pixels into RGBA textures and swapping the components in the pixel shader. This strategy does not work with accelerated drawing because we are directly rendering to the texture, not uploading pixels. This patch uses BGRA textures if available. If not it falls back to the original scheme of swapping the components in the pixel shader. Tests: compositing/color-matching/image-color-matching.html (existing) * WebCore.gypi: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::sampledTexelFormat): (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::skiaContext): (WebCore::LayerRendererChromium::tilerProgram): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTexture.h: (WebCore::LayerTexture::format): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::upload): (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/LayerTextureSubImage.h: * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::sampledTexelFormat): (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::sampledTexelFormat): (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::LayerTilerChromium): (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): (WebCore::LayerTilerChromium::growLayerToContain): (WebCore::LayerTilerChromium::drawTiles): (WebCore::LayerTilerChromium::drawTexturedQuad): * platform/graphics/chromium/LayerTilerChromium.h: * platform/graphics/chromium/PlatformColor.h: Added. (WebCore::PlatformColor::format): (WebCore::PlatformColor::bestTextureFormat): (WebCore::PlatformColor::sameComponentOrder): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::FragmentShaderRGBATexSwizzleAlpha::getShaderString): * platform/graphics/chromium/ShaderChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: 2011-06-23 Adrienne Walker <enne@google.com> Reviewed by Simon Fraser. Incorrect RenderLayer transforms on overflow RTL pages https://bugs.webkit.org/show_bug.cgi?id=60741 Fix positioning of the root graphics layer for RTL pages. The fact that the left side of the page is negative for pages with overflow is not taken into account when calculating the position. This negative value ends up being double-counted for the root graphics layer (once in the position and once in the offset) and it shifts child layers into the wrong place. Tests: compositing/rtl/rtl-absolute-overflow-scrolled.html compositing/rtl/rtl-absolute-overflow.html compositing/rtl/rtl-absolute.html compositing/rtl/rtl-fixed-overflow-scrolled.html compositing/rtl/rtl-fixed-overflow.html compositing/rtl/rtl-fixed.html compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html compositing/rtl/rtl-iframe-absolute-overflow.html compositing/rtl/rtl-iframe-absolute.html compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html compositing/rtl/rtl-iframe-fixed-overflow.html compositing/rtl/rtl-iframe-fixed.html compositing/rtl/rtl-iframe-relative.html compositing/rtl/rtl-relative.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2011-06-23 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. FloatRect should implement the same methods as IntRect https://bugs.webkit.org/show_bug.cgi?id=63273 Add missing methods from IntRect to FloatRect in preparation for moving the rendering tree over to floats. * platform/graphics/FloatPoint.h: (WebCore::FloatPoint::expandedTo): (WebCore::FloatPoint::transposedPoint): * platform/graphics/FloatRect.h: (WebCore::FloatRect::move): (WebCore::FloatRect::expand): (WebCore::FloatRect::contract): (WebCore::FloatRect::shiftXEdgeTo): (WebCore::FloatRect::shiftMaxXEdgeTo): (WebCore::FloatRect::shiftYEdgeTo): (WebCore::FloatRect::shiftMaxYEdgeTo): (WebCore::FloatRect::minXMinYCorner): (WebCore::FloatRect::maxXMinYCorner): (WebCore::FloatRect::minXMaxYCorner): (WebCore::FloatRect::maxXMaxYCorner): (WebCore::FloatRect::transposedRect): * platform/graphics/FloatSize.h: (WebCore::FloatSize::expand): (WebCore::FloatSize::transposedSize): 2011-06-23 Emil A Eklund <eae@chromium.org> Reviewed by Darin Adler. input/textarea onchange doesn't fire if value is set in key listener https://bugs.webkit.org/show_bug.cgi?id=63092 Change setValue implementation of HTMLInputElement and HTMLTextAreaElement to not call setTextAsOfLastFormControlChangeEvent unless the value truly changed. Thus element.value = element.value will no longer reset the state m_textAsOfLastFormControlChangeEvent field and suppress the change event. Test: fast/events/onchange-setvalue.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValue): (WebCore::HTMLTextAreaElement::setNonDirtyValue): (WebCore::HTMLTextAreaElement::setValueCommon): 2011-06-23 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Eric Carlson. [Qt] Implement fullscreen support on Mac with the QuickTime backend. https://bugs.webkit.org/show_bug.cgi?id=61728 Implement fullscreen support for Qt when using the QuickTime backend. We mostly use what is already done for the Mac port. * DerivedSources.pro: We use the mac files and they have <WebCore/x> type of includes. We need to generate those headers. * WebCore.pro: * platform/mac/WebVideoFullscreenController.h: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.h: * platform/mac/WebVideoFullscreenHUDWindowController.mm: * platform/qt/WebCoreSystemInterface.h: * platform/qt/WebCoreSystemInterface.mm: 2011-06-23 Darin Adler <darin@apple.com> Reviewed by Ryosuke Niwa. RefPtr misused as argument type in a few classes https://bugs.webkit.org/show_bug.cgi?id=62955 * dom/DataTransferItem.cpp: (WebCore::DataTransferItem::DataTransferItem): * dom/DataTransferItem.h: * dom/DataTransferItems.cpp: (WebCore::DataTransferItems::DataTransferItems): * dom/DataTransferItems.h: * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): * editing/CompositeEditCommand.h: * page/WebKitAnimationList.cpp: (WebCore::WebKitAnimationList::append): (WebCore::WebKitAnimationList::insertAnimation): * page/WebKitAnimationList.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::FEImage): (WebCore::FEImage::create): * svg/graphics/filters/SVGFEImage.h: * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): (WebCore::SVGFilterBuilder::add): (WebCore::SVGFilterBuilder::appendEffectToEffectReferences): * svg/graphics/filters/SVGFilterBuilder.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer): (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel): * websockets/WorkerThreadableWebSocketChannel.h: Use PassRefPtr or raw pointer as appropriate for RefPtr arguments. 2011-06-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89591 and r89593. http://trac.webkit.org/changeset/89591 http://trac.webkit.org/changeset/89593 https://bugs.webkit.org/show_bug.cgi?id=63279 Caused test crashes in SL and Chromium (Requested by dimich_ on #webkit). * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::childrenChanged): * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::childrenChanged): * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: 2011-06-23 Andreas Kling <kling@webkit.org> Reviewed by Benjamin Poulain. [Qt] Unbreak simple font fast-path after QRawFont API changes. https://bugs.webkit.org/show_bug.cgi?id=63272 In the Qt 4.8 branch, the QGlyphs class has been renamed to QGlyphRun, and some other small things have been tweaked. * WebCore.pro: * platform/graphics/qt/FontCacheQt.cpp: (WebCore::rawFontForCharacters): * platform/graphics/qt/FontQt.cpp: (WebCore::Font::drawGlyphs): 2011-06-23 Tony Chang <tony@chromium.org> Reviewed by Andreas Kling. Pass Strings as const references in NetworkResourcesData.h https://bugs.webkit.org/show_bug.cgi?id=63271 * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::setFrameId): (WebCore::NetworkResourcesData::ResourceData::setUrl): (WebCore::NetworkResourcesData::ResourceData::setTextEncodingName): 2011-06-23 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Fixing the SharedBufferChunkReader API so it works correctly with binary data (non printable characters). Also adding a method to peek at the data (this is needed for MHTML with binary parts). https://bugs.webkit.org/show_bug.cgi?id=63231 * loader/archive/mhtml/MHTMLParser.cpp: (WebCore::skipLinesUntilBoundaryFound): (WebCore::MHTMLParser::parseNextPart): * loader/archive/mhtml/MHTMLParser.h: * platform/SharedBufferChunkReader.cpp: (WebCore::SharedBufferChunkReader::SharedBufferChunkReader): (WebCore::SharedBufferChunkReader::setSeparator): (WebCore::SharedBufferChunkReader::nextChunk): (WebCore::SharedBufferChunkReader::nextChunkAsUTF8StringWithLatin1Fallback): (WebCore::SharedBufferChunkReader::peek): * platform/SharedBufferChunkReader.h: * platform/network/MIMEHeader.cpp: (WebCore::retrieveKeyValuePairs): 2011-06-23 Nate Chapin <japhet@chromium.org> Unreviewed. Revert production code part of r89503, since it's causing crashes on WebKit2/mac and failures on qt. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::dispatchWindowLoadEvent): * dom/Document.h: (WebCore::Document::processingLoadEvent): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): 2011-06-23 Young Han Lee <joybro@company100.net> Reviewed by Simon Fraser. runAnimationTest always fails if the pause API is enabled and the test target animation has "infinite" iteration count. https://bugs.webkit.org/show_bug.cgi?id=63152 The pausing conditions are modified. Now it accepts the infinite-iteration-count, but rejects the zero-iteration-count. There is no reason to consider the zero-count meaning no animation. Test: animations/keyframes-infinite-iterations.html * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::pauseAnimationAtTime): 2011-06-23 Abhishek Arya <inferno@chromium.org> Reviewed by Adam Barth. RefPtr m_style in MediaQueryEvaluator in case of callers like MediaQueryMatcher::prepareEvaluator that do not retain its reference. https://bugs.webkit.org/show_bug.cgi?id=63264 Test: fast/css/media-query-evaluator-crash.html * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): * css/MediaQueryEvaluator.h: 2011-06-23 Jungshik Shin <jshin@chromium.org> Reviewed by Alexey Proskuryakov. Allow generic font family settings per script code. https://bugs.webkit.org/show_bug.cgi?id=20797 Make generic font family getters/setters accept an additional argument (script code). It has a default value so that if an embedder does not have/want a per-script font family setting, call-sites don't have to be changed. This is to prepare for fixing bug 10874 (font selection is not language-dependent) and bug 18085. uscript.h has been updated to that of ICU 3.6 (the version of ICU on Mac OS 10.5) There should be no change in layout and no new layout test is added. * WebCore.exp.in: * icu/unicode/uscript.h: updated to ICU 4.6 * page/Settings.cpp: (WebCore::setGenericFontFamilyMap): helper to set generic family per script (WebCore::getGenericFontFamilyForScript): helper function used by getters for fooFontFamily. (WebCore::Settings::standardFontFamily): (WebCore::Settings::setStandardFontFamily): (WebCore::Settings::fixedFontFamily): (WebCore::Settings::setFixedFontFamily): (WebCore::Settings::serifFontFamily): (WebCore::Settings::setSerifFontFamily): (WebCore::Settings::sansSerifFontFamily): (WebCore::Settings::setSansSerifFontFamily): (WebCore::Settings::cursiveFontFamily): (WebCore::Settings::setCursiveFontFamily): (WebCore::Settings::fantasyFontFamily): (WebCore::Settings::setFantasyFontFamily): * page/Settings.h: setter and getter for FooFontFamily have a new optional argument, scriptCode. 2011-06-23 Dan Bernstein <mitz@apple.com> Reviewed by Alexey Proskuryakov. Make line breaking obey the -webkit-locale property https://bugs.webkit.org/show_bug.cgi?id=63209 Test: platform/mac/fast/text/line-break-locale.html * platform/text/TextBreakIterator.h: (WebCore::LazyLineBreakIterator::LazyLineBreakIterator): Take an optional locale identifier and initialize the m_locale member. (WebCore::LazyLineBreakIterator::get): Pass the locale to acquireLineBreakIterator(). (WebCore::LazyLineBreakIterator::reset): Pass the locale to releaseLineBreakIterator() and update the m_locale member. * platform/text/TextBreakIteratorICU.cpp: (WebCore::LineBreakIteratorPool::sharedPool): Return a shared instance. (WebCore::LineBreakIteratorPool::take): Returns a text iterator for the given locale, either a newly- created one, or an existing one from the pool. (WebCore::LineBreakIteratorPool::put): Puts an iterator back into the pool, removing the least-recently used one if needed. (WebCore::LineBreakIteratorPool::LineBreakIteratorPool): (WebCore::acquireLineBreakIterator): Changed to take an optional local identifier, and to use the pool. (WebCore::releaseLineBreakIterator): Changed to use the pool. * platform/text/brew/TextBreakIteratorBrew.cpp: (WebCore::acquireLineBreakIterator): Updated for new parameter. * platform/text/gtk/TextBreakIteratorGtk.cpp: (WebCore::acquireLineBreakIterator): Ditto. * platform/text/qt/TextBreakIteratorQt.cpp: (WebCore::acquireLineBreakIterator): Ditto. * platform/text/wince/TextBreakIteratorWinCE.cpp: (WebCore::acquireLineBreakIterator): Ditto. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Use the locale from the style for the line break iterator. * rendering/RenderText.cpp: (WebCore::RenderText::computePreferredLogicalWidths): Ditto. 2011-06-23 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. ARIA live regions don't trigger notifications for elements that aren't in the AX tree https://bugs.webkit.org/show_bug.cgi?id=62289 If an ARIA Live region udpates an element that is not in the AX object cache, then the Live region notification is not sent. To fix this, I think the childrenChanged() method needs to actually create the appropriate objects, but since that method gets called during a render tree update, we've learned that it's generally not safe to create objects. Instead a one shot timer can be fired that will update and create the necessary objects so that the correct notification can be sent. Test: platform/mac/accessibility/aria-liveregion-without-element-access.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenUpdateTimerFired): (WebCore::AXObjectCache::childrenChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::childrenChanged): * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::childrenChanged): * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): This changed exposed a case where an object was inlineElementContinuation, but not renderInlined, which led to an assert. (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: 2011-06-23 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. Convert SVGColor to SVGAnimatorFactory concept https://bugs.webkit.org/show_bug.cgi?id=63246 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGColor. Changed constructors of animators to take the animation element SVGAnimationsElement as new argument. Removed attribute name argument instead. This information is already exposed by the animation element. The animators store the pointer of the animation element, so that it is not necessary to pass it as argument to the functions calculateDistance, calculateAnimatedValue. Replace all SVGSMILElement references by SVGAnimationsElement - the common base class of all animation elements. Added a new method in SVGAnimateElement to determine the property value type of CSS properties (regular value type, inherit or currentColor). The other two new methods fromPropertyValueType() and toPropertyValueType() avoid passing boolean arguments in calculateAnimatedValue(). No new tests added. Current tests cover the changes. * CMakeLists.txt: Added new files to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Use Animator for SVGColor. (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::SVGAnimateElement::determineAnimatedAttributeType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::determinePropertyValueTypes): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): (WebCore::SVGAnimateElement::ensureAnimator): Pass the animation element as pointer to animator. * svg/SVGAnimateElement.h: Removed unnecessary includes. Some cleanup. (WebCore::SVGAnimateElement::fromPropertyValueType): Get property value type of 'from' property. (WebCore::SVGAnimateElement::toPropertyValueType): Get property value type of 'to' property. * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::SVGAnimatedAngleAnimator): Added SVGSMILElement as new argument, removed attributeName. (WebCore::SVGAnimatedAngleAnimator::calculateFromAndToValues): Determine property value type. (WebCore::SVGAnimatedAngleAnimator::calculateFromAndByValues): Ditto. (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): Use new functions of SVGAnimateElement for handling of 'inherit'. And removed unnecessary arguments. (WebCore::SVGAnimatedAngleAnimator::calculateDistance): Removed animation element argument. * svg/SVGAnimatedAngle.h: * svg/SVGAnimatedColor.cpp: Added. (WebCore::SVGAnimatedColorAnimator::SVGAnimatedColorAnimator): Ditto. (WebCore::SVGAnimatedColorAnimator::constructFromString): (WebCore::SVGAnimatedColorAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedColorAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedColorAnimator::calculateDistance): * svg/SVGAnimatedColor.h: Added. (WebCore::SVGAnimatedColorAnimator::~SVGAnimatedColorAnimator): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator): Ditto. (WebCore::SVGAnimatedLengthAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedLengthAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedLengthAnimator::calculateDistance): * svg/SVGAnimatedLength.h: * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::SVGAnimatedNumberAnimator): Ditto. (WebCore::SVGAnimatedNumberAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedNumberAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedNumberAnimator::calculateDistance): * svg/SVGAnimatedNumber.h: * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::SVGAnimatedPointListAnimator): Ditto. (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedPointListAnimator::calculateDistance): * svg/SVGAnimatedPointList.h: * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::SVGAnimatedRectAnimator): Ditto. (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedRectAnimator::calculateDistance): * svg/SVGAnimatedRect.h: * svg/SVGAnimatedType.cpp: Added handling of Color values. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createColor): (WebCore::SVGAnimatedType::color): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator): * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): 2011-06-23 Yael Aharon <yael.aharon@nokia.com> Reviewed by Andreas Kling. [Qt] [WK2] Add drag and drop support https://bugs.webkit.org/show_bug.cgi?id=62838 Add convenience methods to allow encoding/decoding of DragData. Move the call to dragEnded() to DragClient, to make WebKit1 and WebKit2 consistent. * page/qt/DragControllerQt.cpp: (WebCore::DragController::cleanupAfterSystemDrag): * platform/DragData.h: (WebCore::DragData::flags): (WebCore::DragData::DragData): (WebCore::DragData::operator =): 2011-06-23 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: Show "no content" message in network panel when resource does not have content available. https://bugs.webkit.org/show_bug.cgi?id=63007 * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView): (WebInspector.ApplicationCacheItemsView.prototype._updateCallback): * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView): (WebInspector.CookieItemsView.prototype._updateWithCookies): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._queryFinished): * inspector/front-end/EmptyView.js: Added. (WebInspector.EmptyView): (WebInspector.EmptyView.prototype.show): (WebInspector.EmptyView.prototype.set text): * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): (WebInspector.ResourceContentView): (WebInspector.ResourceContentView.prototype.hasContent): (WebInspector.ResourceContentView.prototype.get sourceView): (WebInspector.ResourceContentView.prototype.show): (WebInspector.ResourceContentView.prototype._ensureInnerViewShown.callback): (WebInspector.ResourceContentView.prototype._ensureInnerViewShown): (WebInspector.ResourceContentView.prototype.contentLoaded): * inspector/front-end/ResourceCookiesView.js: (WebInspector.ResourceCookiesView.prototype.show): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView): (WebInspector.ResourcePreviewView.prototype.contentLoaded): (WebInspector.ResourcePreviewView.prototype._createInnerView): * inspector/front-end/ResourceResponseView.js: Added. (WebInspector.ResourceResponseView): (WebInspector.ResourceResponseView.prototype.get sourceView): (WebInspector.ResourceResponseView.prototype.contentLoaded): * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.prototype.show): * inspector/front-end/ResourcesPanel.js: (WebInspector.StorageCategoryView): (WebInspector.StorageCategoryView.prototype.setText): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-06-23 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. PluginView::dispatchNPEvent is deceptive https://bugs.webkit.org/show_bug.cgi?id=63243 Straighten the inverted logic of dispatchNPEvent and it's callers. No change in behaviour so no new tests. Existing plugin tests cover this. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): 2011-06-23 Tommy Widenflycht <tommyw@google.com> Reviewed by Tony Gentilcore. MediaStream API: Rename Stream, GeneratedStream and StreamRecorder to the latest spec https://bugs.webkit.org/show_bug.cgi?id=63122 Fixing broken makefile. * GNUmakefile.list.am: 2011-06-23 Tommy Widenflycht <tommyw@google.com> Reviewed by Tony Gentilcore. MediaStream API: Rename Stream, GeneratedStream and StreamRecorder to the latest spec https://bugs.webkit.org/show_bug.cgi?id=63122 No new tests since no code has actually changed. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventTarget.cpp: (WebCore::toJS): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * dom/DOMAllInOne.cpp: * dom/EventTarget.cpp: (WebCore::EventTarget::toMediaStream): (WebCore::EventTarget::toLocalMediaStream): * dom/EventTarget.h: * dom/LocalMediaStream.cpp: Renamed from Source/WebCore/dom/GeneratedStream.cpp. (WebCore::LocalMediaStream::DispatchUpdateTask::create): (WebCore::LocalMediaStream::DispatchUpdateTask::performTask): (WebCore::LocalMediaStream::DispatchUpdateTask::DispatchUpdateTask): (WebCore::LocalMediaStream::create): (WebCore::LocalMediaStream::LocalMediaStream): (WebCore::LocalMediaStream::~LocalMediaStream): (WebCore::LocalMediaStream::toLocalMediaStream): (WebCore::LocalMediaStream::detachEmbedder): (WebCore::LocalMediaStream::streamEnded): (WebCore::LocalMediaStream::audioTracks): (WebCore::LocalMediaStream::videoTracks): (WebCore::LocalMediaStream::stop): (WebCore::LocalMediaStream::onStop): * dom/LocalMediaStream.h: Renamed from Source/WebCore/dom/GeneratedStream.h. * dom/LocalMediaStream.idl: Renamed from Source/WebCore/dom/GeneratedStream.idl. * dom/MediaStream.cpp: Renamed from Source/WebCore/dom/Stream.cpp. (WebCore::MediaStream::create): (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::toMediaStream): (WebCore::MediaStream::streamEnded): (WebCore::MediaStream::scriptExecutionContext): (WebCore::MediaStream::eventTargetData): (WebCore::MediaStream::ensureEventTargetData): * dom/MediaStream.h: Renamed from Source/WebCore/dom/Stream.h. (WebCore::MediaStream::readyState): (WebCore::MediaStream::label): (WebCore::MediaStream::refEventTarget): (WebCore::MediaStream::derefEventTarget): * dom/MediaStream.idl: Renamed from Source/WebCore/dom/Stream.idl. * dom/MediaStreamContainer.h: Renamed from Source/WebCore/dom/StreamContainer.h. (WebCore::MediaStreamContainer::create): (WebCore::MediaStreamContainer::~MediaStreamContainer): (WebCore::MediaStreamContainer::length): (WebCore::MediaStreamContainer::item): (WebCore::MediaStreamContainer::add): (WebCore::MediaStreamContainer::remove): (WebCore::MediaStreamContainer::contains): (WebCore::MediaStreamContainer::get): (WebCore::MediaStreamContainer::MediaStreamContainer): * dom/MediaStreamList.cpp: Renamed from Source/WebCore/dom/StreamList.cpp. (WebCore::MediaStreamList::create): (WebCore::MediaStreamList::MediaStreamList): (WebCore::MediaStreamList::~MediaStreamList): (WebCore::MediaStreamList::length): (WebCore::MediaStreamList::item): * dom/MediaStreamList.h: Renamed from Source/WebCore/dom/StreamList.h. * dom/MediaStreamList.idl: Renamed from Source/WebCore/dom/StreamList.idl. * dom/StreamEvent.cpp: (WebCore::StreamEvent::create): (WebCore::StreamEvent::StreamEvent): (WebCore::StreamEvent::initStreamEvent): (WebCore::StreamEvent::stream): * dom/StreamEvent.h: (WebCore::StreamEvent::isMediaStreamEvent): * dom/StreamEvent.idl: * page/MediaStreamFrameController.cpp: (WebCore::MediaStreamFrameController::unregister): (WebCore::MediaStreamFrameController::getStreamFromLabel): (WebCore::MediaStreamFrameController::stopGeneratedStream): (WebCore::MediaStreamFrameController::streamGenerated): (WebCore::MediaStreamFrameController::audioTrackFailed): (WebCore::MediaStreamFrameController::videoTrackFailed): * page/MediaStreamFrameController.h: (WebCore::MediaStreamFrameController::ClientBase::isMediaStream): (WebCore::MediaStreamFrameController::ClientBase::isLocalMediaStream): (WebCore::MediaStreamFrameController::MediaStreamClient::MediaStreamClient): (WebCore::MediaStreamFrameController::MediaStreamClient::~MediaStreamClient): (WebCore::MediaStreamFrameController::MediaStreamClient::isMediaStream): (WebCore::MediaStreamFrameController::MediaStreamClient::isLocalMediaStream): * page/NavigatorUserMediaSuccessCallback.h: * page/NavigatorUserMediaSuccessCallback.idl: 2011-06-23 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [Chromium] Fix showing dominator leaf nodes after r89457 https://bugs.webkit.org/show_bug.cgi?id=63250 * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get isEmpty): 2011-06-23 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: HTML preview in network panel should take 100% of resource view height. https://bugs.webkit.org/show_bug.cgi?id=63167 * inspector/front-end/inspector.css: (.resource-view.html iframe): 2011-06-23 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> Reviewed by Pavel Feldman. Inspector may close at the start of the next inspector test in DRT https://bugs.webkit.org/show_bug.cgi?id=60881 Add a new function to the inspector, which tests whether the dispatch queue is empty. * inspector/front-end/inspector.js: (WebInspector.dispatchQueueIsEmpty): 2011-06-23 Jeffrey Pfau <jpfau@apple.com> Reviewed by Nikolas Zimmermann. Incorrectly placed SVG gradients can cause crashes when referenced https://bugs.webkit.org/show_bug.cgi?id=62914 Added a check for gradient rendering contexts. If the contexts can't be found, the gradient must be in an invalid location, so we use the fallback color instead. Tests: svg/custom/invalid-gradient-with-xlink.svg svg/custom/xlink-to-invalid-gradient.svg * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceGradient.h: * rendering/svg/RenderSVGResourceLinearGradient.cpp: (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes): * rendering/svg/RenderSVGResourceLinearGradient.h: * rendering/svg/RenderSVGResourceRadialGradient.cpp: (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes): * rendering/svg/RenderSVGResourceRadialGradient.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGLinearGradientElement.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGRadialGradientElement.h: 2011-06-23 Dmitriy Vyukov <dvyukov@google.com> Reviewed by David Levin. Fix incorrect usage of a condition variable. https://bugs.webkit.org/show_bug.cgi?id=63127 No new tests. This does not affect existing functionality. * storage/DatabaseTask.cpp: (WebCore::DatabaseTaskSynchronizer::waitForTaskCompletion): 2011-06-23 David Grogan <dgrogan@chromium.org> Reviewed by Eric Seidel. IndexedDB: add detail to an ASSERT error message https://bugs.webkit.org/show_bug.cgi?id=60407 No new tests, this is just a debug ASSERT. * storage/IDBRequest.cpp: (WebCore::IDBRequest::dispatchEvent): 2011-06-22 Dirk Schulze <krit@webkit.org> Reviewed by Rob Buis. Convert SVGPointList to SVGAnimatorFactory concept https://bugs.webkit.org/show_bug.cgi?id=63171 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGPointList. Added support for from-by animations of SVGPointLists. Tests: svg/animations/svgpointlist-animation-1.html svg/animations/svgpointlist-animation-2.html * CMakeLists.txt: Added new files to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Added SVGAnimatedPointList.cpp * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimateElement.h: * svg/SVGAnimatedPointList.cpp: Added. (WebCore::SVGAnimatedPointListAnimator::SVGAnimatedPointListAnimator): (WebCore::SVGAnimatedPointListAnimator::constructFromString): (WebCore::SVGAnimatedPointListAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedPointListAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedPointListAnimator::calculateDistance): * svg/SVGAnimatedPointList.h: Added. (WebCore::SVGAnimatedPointListAnimator::~SVGAnimatedPointListAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createPointList): (WebCore::SVGAnimatedType::pointList): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): 2011-06-22 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Move file-choosing and icon-loading management to FileInputType https://bugs.webkit.org/show_bug.cgi?id=62069 1) Moved the duties of FileChooserClient and FileIconLoaderClient from RenderFileUploadControl to FileInputType, along with all of the supporting functions. 2) Moved Icon ownership to FileInputType and exposed accessor on HTMInputElement to allow RenderFileUploadControl to query current icon. As a result, RenderFileUploadControl is now completely stateless, which is neat and clean. Refactoring, covered by existing tests. * html/FileInputType.cpp: (WebCore::FileInputType::handleDOMActivateEvent): Moved logic here from RenderFileUploadControl. (WebCore::FileInputType::requestIcon): Ditto. (WebCore::FileInputType::filesChosen): Ditto. (WebCore::FileInputType::receiveDropForDirectoryUpload): Ditto. (WebCore::FileInputType::updateRendering): Ditto. (WebCore::FileInputType::chrome): Ditto. (WebCore::FileInputType::receiveDroppedFiles): Ditto. (WebCore::FileInputType::icon): Added. * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValueFromRenderer): Updated comment. (WebCore::HTMLInputElement::receiveDroppedFiles): Added to replace setFileListFromRenderer. (WebCore::HTMLInputElement::icon): Added. * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::receiveDroppedFiles): Added. (WebCore::InputType::icon): Added. * html/InputType.h: * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): Changed to use HTMLInputElement. Ahh, nice and clean! * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::RenderFileUploadControl): Removed code that is no longer necessary. (WebCore::RenderFileUploadControl::updateFromElement): Ditto. (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use HTMLInputElement icon accessor. (WebCore::RenderFileUploadControl::paintObject): Ditto. * rendering/RenderFileUploadControl.h: 2011-06-22 Pratik Solanki <psolanki@apple.com> Reviewed by Darin Adler. Add NSError wrapper functions in ResourceError when USE(CFNETWORK) is enabled https://bugs.webkit.org/show_bug.cgi?id=63155 Add wrapper functions to ResourceError when building with USE(CFNETWORK). We need to create a new NSError in ResourceError::nsError() since Safari has category methods on NSError and passing a CFErrorRef back does not work even though CFErrorRef/NSErrror are toll-free bridged. No tests because no change in functionality. * WebCore.exp.in: * platform/network/cf/ResourceError.h: * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::ResourceError): (WebCore::ResourceError::nsError): (WebCore::ResourceError::operator NSError *): 2011-06-22 Dominic Cooney <dominicc@chromium.org> Reviewed by Mark Rowe. Add window.internals to WebKit2's WebKitTestRunner. https://bugs.webkit.org/show_bug.cgi?id=61073 * Configurations/WebCoreTestSupport.xcconfig: * WebCore.xcodeproj/project.pbxproj: 2011-06-22 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Convert FileIconLoaderClient to "smart client" pattern, just like FileChooserClient. https://bugs.webkit.org/show_bug.cgi?id=63224 Refactoring, covered by existing tests. * platform/FileIconLoader.cpp: (WebCore::FileIconLoaderClient::~FileIconLoaderClient): Changed to discard loader. (WebCore::FileIconLoaderClient::newFileIconLoader): Added. (WebCore::FileIconLoaderClient::discardLoader): Added. * platform/FileIconLoader.h: Updated defs. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::RenderFileUploadControl): Removed initialization of icon loader. (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Remove discarding of loader. (WebCore::RenderFileUploadControl::requestIcon): Changed to use newFileIconLoader. * rendering/RenderFileUploadControl.h: Updated defs. 2011-06-22 Yael Aharon <yael.aharon@nokia.com> Another unreviewed build fix after r89472. No new tests, just a build fix. * rendering/svg/SVGResources.cpp: 2011-06-22 Yael Aharon <yael.aharon@nokia.com> Unreviewed build fix after r89472. No new tests, just a build fix. * rendering/InlineBox.cpp: * rendering/RenderCounter.cpp: 2011-06-22 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Add a helper function to FileList to retrieve a list of filenames. https://bugs.webkit.org/show_bug.cgi?id=63222 Refactoring, covered by existing tests. * fileapi/FileList.cpp: (WebCore::FileList::filenames): Added. * fileapi/FileList.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::RenderFileUploadControl): Changed to use newly added helper. (WebCore::RenderFileUploadControl::click): Ditto. (WebCore::RenderFileUploadControl::fileTextValue): Ditto. 2011-06-22 Sam Weinig <sam@webkit.org> Reviewed by Adam Barth. Lower HTML parser DOM depth limit to 2048 https://bugs.webkit.org/show_bug.cgi?id=63219 Lower the default depth limit from 4096 to 2048. There isn't a good reason to have such pathologically nested content, and by-and-large, the rendering code is not setup to support it that well. Adding this aggressive limit now will allow us to see if anything breaks in the nightlies. * page/Settings.h: 2011-06-22 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Dimitri Glazkov. Tighten type usage in the Shadow tree code https://bugs.webkit.org/show_bug.cgi?id=63210 Refactoring only, no new test required. * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): * dom/Document.h: Changed the argument of buildAccessKeyMap to TreeScope. * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::removeShadowRoot): * html/ColorInputType.cpp: (WebCore::ColorInputType::shadowColorSwatch): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::shadowSelect): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): Use ShadowRoot for the previous call sites as this is what is returned by shadowRoot(). * dom/Node.cpp: (WebCore::traverseTreeAndMark): Renamed the parameter here as it is not expected to be a shadow object. Just the rootNode of our traversal. * dom/ShadowRoot.h: Made attach() public as it is public in ContainerNode and we would do some casting to avoid the private attribute in ShadowRoot. 2011-06-22 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Darin Adler. Remove comment about pages with frames not being page-cachable https://bugs.webkit.org/show_bug.cgi?id=63207 This comment was out of date. Caching pages with Frames in the PageCache has worked since 2009: <http://webkit.org/b/13631> Page Cache should support pages with frames * history/PageCache.cpp: (WebCore::PageCache::canCache): 2011-06-22 Yael Aharon <yael.aharon@nokia.com> Reviewed by Andreas Kling. [Qt] Add a build flag for building with libxml2 and libxslt. https://bugs.webkit.org/show_bug.cgi?id=63113 No new tests. If this new flag was set by default, we could unskip existing xmlviewer tests. * CodeGenerators.pri: * WebCore.pri: * WebCore.pro: * features.pri: 2011-06-22 Ryosuke Niwa <rniwa@webkit.org> Yet another build fix after r89472. * html/parser/HTMLFormattingElementList.cpp: 2011-06-22 Ryosuke Niwa <rniwa@webkit.org> Another build fix after r89472. * dom/DocumentMarkerController.cpp: 2011-06-22 Ryosuke Niwa <rniwa@webkit.org> Build fix after r89472. * css/CSSStyleDeclaration.cpp: 2011-06-22 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IndexedDB open (database) should NOT throw if name is null https://bugs.webkit.org/show_bug.cgi?id=63110 * storage/IDBFactory.idl: remove ConvertNullToNullString flag on name argument, let IDL code generator stringify null value to "null" 2011-06-22 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. Add a Position constructor that takes (Text*, unsigned offset) https://bugs.webkit.org/show_bug.cgi?id=63181 Added Position::Position(PassRefPtr<Text*>, unsigned offset) and deployed in a couple of places by replacing the calls to the old constructor. * dom/Position.cpp: (WebCore::Position::Position): Added. * dom/Position.h: * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::replaceSelectedTextInNode): Calls new constructor; extracted from InsertTextCommand::performTrivialReplace and ReplaceSelectionCommand::performTrivialReplace. (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Calls new constructor * editing/CompositeEditCommand.h: * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): Calls replaceSelectedTextInNode. (WebCore::InsertTextCommand::input): Calls new constructor. (WebCore::InsertTextCommand::insertTab): Use RefPtr instead of a raw pointer. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::performTrivialReplace): Calls replaceSelectedTextInNode. * editing/visible_units.cpp: (WebCore::startPositionForLine): Calls new constructor. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::visiblePositionForIndex): Calls new constructor; calls endPosition on Range instead of avoid manually constructing a VisiblePosition out of endContainer and endOffset. 2011-06-22 Adam Barth <abarth@webkit.org> Reviewed by Darin Fisher. [Chromium] Add WebDocument APIs for the functions moving from WebFrame https://bugs.webkit.org/show_bug.cgi?id=62831 * dom/Document.cpp: (WebCore::Document::openSearchDescriptionURL): - This function exists to service a Chromium WebKit API, but it's generally purpose and might be useful to other ports. The algorithm has some strange early exits, which I've marked with FIXME comments. * dom/Document.h: 2011-06-22 Nate Chapin <japhet@chromium.org> Reviewed by Adam Barth. Don't let all subresources keep isLoadingInAPISense() from returning false, only requests that affect CachedResourceRequest::requestCount(). Also, add a callback to Internals to determine whether a resource has been preloaded. https://bugs.webkit.org/show_bug.cgi?id=62066 * WebCore.exp.in: * dom/Document.cpp: Add m_loadEventFinished. * dom/Document.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::isPreloaded): * loader/cache/CachedResourceLoader.h: * testing/Internals.cpp: (WebCore::Internals::isPreloaded): * testing/Internals.h: * testing/Internals.idl: 2011-06-22 Chris Rogers <crogers@google.com> Reviewed by David Levin. Use create() method for AsyncAudioDecoder::DecodingTask https://bugs.webkit.org/show_bug.cgi?id=63198 No new tests. This doesn't change any JS API. * webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): (WebCore::AsyncAudioDecoder::DecodingTask::create): * webaudio/AsyncAudioDecoder.h: 2011-06-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89489. http://trac.webkit.org/changeset/89489 https://bugs.webkit.org/show_bug.cgi?id=63203 Broke chromium mac build on build.webkit.org (Requested by abarth on #webkit). * WebCore.gyp/WebCore.gyp: * loader/cache/CachedFont.cpp: * platform/chromium/DragImageRef.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.h: * platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::hash): * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/SimpleFontData.h: * platform/graphics/cg/FloatPointCG.cpp: * platform/graphics/cg/FloatRectCG.cpp: * platform/graphics/cg/FloatSizeCG.cpp: * platform/graphics/cg/IntPointCG.cpp: * platform/graphics/cg/IntRectCG.cpp: * platform/graphics/cg/IntSizeCG.cpp: * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): 2011-06-22 Luke Macpherson <macpherson@chromium.org> Reviewed by James Robinson. Remove comment that snuck in via copy & paste. https://bugs.webkit.org/show_bug.cgi?id=63177 No new tests / no code changes. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator short): Removed incorrect comment. 2011-06-22 Annie Sullivan <sullivan@chromium.org> Reviewed by Ryosuke Niwa. REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span https://bugs.webkit.org/show_bug.cgi?id=61594 When the tree is split at the cursor in InsertParagraphSeparatorCommand, it is possible for the position split at to be at the end of a text node. The code assumes the position is at the start of the node, so pass the correct node into splitTreeToNode() in that case. Tests: editing/inserting/return-key-before-br-in-span.html editing/inserting/return-key-middle-of-span.html * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2011-06-22 Rob Buis <rbuis@rim.com> Reviewed by Nikolas Zimmermann. SVG1.1SE test with pointer-events and invalid gradient fill fails https://bugs.webkit.org/show_bug.cgi?id=63109 Properly detect fill/stroke properties of type SVG_PAINTTYPE_URI_NONE, store it in SVGPaint and don't apply the paint if the uri lookup fails. Tests: svg/W3C-SVG-1.1-SE/interact-pointer-03-t.svg svg/custom/pointer-events-invalid-fill.svg * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * rendering/svg/RenderSVGResource.cpp: (WebCore::requestPaintingResource): * svg/SVGPaint.h: (WebCore::SVGPaint::createURIAndNone): 2011-06-22 Cary Clark <caryclark@google.com> Reviewed by Darin Fisher. Use Skia if Skia on Mac Chrome is enabled https://bugs.webkit.org/show_bug.cgi?id=62999 No new tests. This does not affect existing functionality. * WebCore.gyp/WebCore.gyp: Include Skia and related files and exclude CG and related files when building Chromium for Skia on the Mac. * loader/cache/CachedFont.cpp: Rename CHROME to CHROMIUM. * platform/chromium/DragImageRef.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.h: * platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::hash): * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/SimpleFontData.h: * platform/graphics/cg/FloatPointCG.cpp: * platform/graphics/cg/FloatRectCG.cpp: * platform/graphics/cg/FloatSizeCG.cpp: * platform/graphics/cg/IntPointCG.cpp: * platform/graphics/cg/IntRectCG.cpp: * platform/graphics/cg/IntSizeCG.cpp: * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto. 2011-06-22 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IndexedDB createIndex should NOT throw if name arg is null https://bugs.webkit.org/show_bug.cgi?id=63114 * storage/IDBObjectStore.idl: remove ConvertNullToNullString flag so null values will be stringified as "null", as per WebIDL spec. 2011-06-22 Chris Rogers <crogers@google.com> Reviewed by Kenneth Russell. AudioContext needs non-blocking call to create AudioBuffer from audio file data https://bugs.webkit.org/show_bug.cgi?id=61947 No new tests since audio API is not yet implemented. * DerivedSources.make: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * webaudio/AsyncAudioDecoder.cpp: Added. (WebCore::AsyncAudioDecoder::AsyncAudioDecoder): (WebCore::AsyncAudioDecoder::~AsyncAudioDecoder): (WebCore::AsyncAudioDecoder::decodeAsync): (WebCore::AsyncAudioDecoder::threadEntry): (WebCore::AsyncAudioDecoder::runLoop): (WebCore::AsyncAudioDecoder::DecodingTask::DecodingTask): (WebCore::AsyncAudioDecoder::DecodingTask::decode): (WebCore::AsyncAudioDecoder::DecodingTask::notifyCompleteDispatch): (WebCore::AsyncAudioDecoder::DecodingTask::notifyComplete): * webaudio/AsyncAudioDecoder.h: Added. (WebCore::AsyncAudioDecoder::DecodingTask::audioData): (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate): (WebCore::AsyncAudioDecoder::DecodingTask::successCallback): (WebCore::AsyncAudioDecoder::DecodingTask::errorCallback): (WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer): * webaudio/AudioBufferCallback.h: Added. (WebCore::AudioBufferCallback::~AudioBufferCallback): * webaudio/AudioBufferCallback.idl: Added. * webaudio/AudioContext.cpp: (WebCore::AudioContext::decodeAudioData): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: 2011-06-22 Beth Dakin <bdakin@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=63174 Don't draw the borders as one path unless there really are 4 borders -and corresponding- <rdar://problem/9457997> If any of the border edges have no width, then allEdgesVisible should be set to false since borders without width will not be visible. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): 2011-06-22 Matthew Delaney <mdelaney@apple.com> Reviewed by Oliver Hunt. Canvas in layer obscures overlapping span https://bugs.webkit.org/show_bug.cgi?id=63161 Test: compositing/layer-creation/spanOverlapsCanvas.html * rendering/RenderLayer.cpp: Added checks for canvas to be layered properly. (WebCore::RenderLayer::shouldBeNormalFlowOnly): (WebCore::RenderLayer::isSelfPaintingLayer): 2011-06-22 Chris Rogers <crogers@google.com> Reviewed by Kenneth Russell. AudioContext noteGrainOn() method should not apply explicit windowing https://bugs.webkit.org/show_bug.cgi?id=63005 No new tests since audio API is not yet implemented. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::readFromBuffer): * webaudio/AudioBufferSourceNode.h: 2011-06-22 Kentaro Hara <haraken@google.com> Reviewed by Tony Chang. Check |keypath| argument of createObjectStore(). Remove storage/indexeddb/keypath-as-array.html. https://bugs.webkit.org/show_bug.cgi?id=63054 At the head of createObjectStore(), we parse |keypath| argument and throw an exception if the |keypath| is invalid. With this parsing, we remove keypath-as-array.html because the current keypath parser does not support an array of keypath and (more importantly) the current implementation of ObjectStore does not support multiple keypaths. We added keypath-basics.html that demonstrates that we do not support an array of keypaths. Tests: storage/indexeddb/keypath-basics.html * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): * storage/IDBKeyPath.cpp: (WebCore::IDBIsValidKeyPath): * storage/IDBKeyPath.h: 2011-06-22 Young Han Lee <joybro@company100.net> Reviewed by Simon Fraser. animation-timing-function property with a list uses first item for all animations https://bugs.webkit.org/show_bug.cgi?id=60303 When an element has multiple animations that have different timingFunctions, the progress of each animation should be calculated using its respective timingFunction. But at this point, the timingFunction of the first animation is only used for the calculation, regardless of how many animations the element has. The code for getting a timingFunction is changed by this patch so that the timingFunction of the correct animation searched by its name will be used. Test: animations/multiple-animations-timing-function.html * page/animation/KeyframeAnimation.cpp: (WebCore::getAnimationFromStyleByName): (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): 2011-06-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89407, r89409, r89410, and r89411. http://trac.webkit.org/changeset/89407 http://trac.webkit.org/changeset/89409 http://trac.webkit.org/changeset/89410 http://trac.webkit.org/changeset/89411 https://bugs.webkit.org/show_bug.cgi?id=63168 Broke Chromium tests for Forms and Autofill (Requested by dimich on #webkit). * css/html.css: (input[type="search"]::-webkit-search-cancel-button): (input[type="search"]::-webkit-search-decoration): (input[type="search"]::-webkit-search-results-decoration): (input[type="search"]::-webkit-search-results-button): (input::-webkit-inner-spin-button): (input::-webkit-input-speech-button): * html/HTMLInputElement.cpp: * html/HTMLInputElement.h: * html/InputType.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): (WebCore::SearchInputType::createShadowSubtree): (WebCore::SearchInputType::destroyShadowSubtree): * html/SearchInputType.h: (WebCore::SearchInputType::innerBlockElement): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::TextFieldInputType): (WebCore::TextFieldInputType::createShadowSubtree): (WebCore::TextFieldInputType::destroyShadowSubtree): * html/TextFieldInputType.h: (WebCore::TextFieldInputType::innerTextElement): (WebCore::TextFieldInputType::innerSpinButtonElement): (WebCore::TextFieldInputType::speechButtonElement): (WebCore::TextFieldInputType::setInnerTextElement): (WebCore::TextFieldInputType::setSpeechButtonElement): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::innerTextElement): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::nodeAtPoint): (WebCore::RenderTextControlSingleLine::forwardEvent): (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::hasControlClip): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::textBlockWidth): (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): (WebCore::RenderTextControlSingleLine::textBlockInsetTop): * rendering/RenderTextControlSingleLine.h: 2011-06-20 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: [Chromium] Improve speed of heap profiles dominators view. https://bugs.webkit.org/show_bug.cgi?id=62979 * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotArraySlice.prototype.item): (WebInspector.HeapSnapshotArraySlice.prototype.slice): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode): (WebInspector.HeapSnapshot.prototype._buildReverseIndex.var): (WebInspector.HeapSnapshot.prototype._buildReverseIndex): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype._buildNodeIndex): (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): (WebInspector.HeapSnapshot.prototype._getDominatedIndex): (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass): (WebInspector.HeapSnapshot.prototype.createNodesProviderForDominator): (WebInspector.HeapSnapshotFilteredOrderedIterator): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype._createIterationOrder): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get length): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems): (WebInspector.HeapSnapshotNodesProvider): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator): 2011-06-22 Sreeram Ramachandran <sreeram@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Restore console messages when restoring inspector state https://bugs.webkit.org/show_bug.cgi?id=63146 No new tests (no change in functionality, only in display). * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::restore): * inspector/InspectorConsoleAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::restoreInspectorStateFromCookie): 2011-06-22 Adam Barth <abarth@webkit.org> Attempt to fix the GTK build after my incomplete rollout of 88332. * GNUmakefile.list.am: 2011-06-22 Sam Weinig <sam@webkit.org> Reviewed by Adam Barth. HTML parser should limit element depth of produced tree https://bugs.webkit.org/show_bug.cgi?id=63082 Test by: fast/parser/block-nesting-cap.html fast/parser/element-nesting-cap.html * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): (WebCore::HTMLConstructionSite::HTMLConstructionSite): * html/parser/HTMLConstructionSite.h: Limit the DOM tree depth by turning attempts to add a child passed a certain threshold (configurable by Settings::maximumDOMTreeDepth) into a sibling. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::maximumDOMTreeDepth): * html/parser/HTMLDocumentParser.h: Pass the maximumDOMTreeDepth to the TreeBuilder. * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::HTMLElementStack): (WebCore::HTMLElementStack::popAll): (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): (WebCore::HTMLElementStack::popCommon): (WebCore::HTMLElementStack::removeNonTopCommon): * html/parser/HTMLElementStack.h: (WebCore::HTMLElementStack::size): Keep track of the size of the element stack. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::create): Pass the maximumDOMTreeDepth to the construction site. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setMaximumHTMLParserDOMTreeDepth): (WebCore::Settings::maximumHTMLParserDOMTreeDepth): Add a setting to control the maximum DOM tree depth that the parser will produce. 2011-06-22 Adam Barth <abarth@webkit.org> Rollout 88332. As discussed on webkit-dev, we'd like to iterate on both the API and it's implementation a bit. * WebCore.gypi: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: * dom/DocumentMarker.h: (WebCore::DocumentMarker::activeMatch): * dom/DocumentMarkerController.cpp: * dom/DocumentMarkerController.h: * html/HTMLDivElement.cpp: * html/HTMLDivElement.h: * html/HTMLDivElement.idl: * html/HTMLInputElement.cpp: * html/HTMLInputElement.h: * html/HTMLInputElement.idl: * html/HTMLTextAreaElement.cpp: * html/HTMLTextAreaElement.h: * html/HTMLTextAreaElement.idl: * html/SpellcheckRange.cpp: Removed. * html/SpellcheckRange.h: Removed. * html/SpellcheckRange.idl: Removed. * html/SpellcheckRangeList.cpp: Removed. * html/SpellcheckRangeList.h: Removed. * html/SpellcheckRangeList.idl: Removed. * rendering/InlineTextBox.cpp: (WebCore::textCheckingLineStyleForMarkerType): (WebCore::InlineTextBox::paintDocumentMarkers): 2011-06-22 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IndexedDB: fix multiple issues in IDBDatabase.idl https://bugs.webkit.org/show_bug.cgi?id=63140 Tests: storage/indexeddb/createObjectStore-name-argument-required.html storage/indexeddb/createObjectStore-null-name.html storage/indexeddb/deleteObjectStore-name-argument-required.html storage/indexeddb/deleteObjectStore-null-name.html storage/indexeddb/setVersion-null.html storage/indexeddb/transaction-storeNames-required.html * storage/IDBDatabase.idl: remove LegacyDefaultOptionalArguments so all functions will throw TypeError when called with too few arguments, as per WebIDL spec. Also remove ConvertNullToNullString flags so null values are stringified as "null" (also as per WebIDL spec). 2011-06-22 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Move logic for deciding whether resource content should be base64 encoded on backend. https://bugs.webkit.org/show_bug.cgi?id=63069 * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): (WebCore::InspectorPageAgent::resourceContent): (WebCore::InspectorPageAgent::getResourceContent): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::resourceStyleSheetText): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._innerRequestContent.onResourceContent): (WebInspector.Resource.prototype._innerRequestContent): 2011-06-22 Luke Macpherson <macpherson@chromium.org> Reviewed by Dimitri Glazkov. Support cast from CSSPrimitiveValue to short and use for CSSPropertyWidows and CSSPropertyOrphans. https://bugs.webkit.org/show_bug.cgi?id=62964 No new tests / refactoring only. * css/CSSPrimitiveValueMappings.h: Support cast to/from short. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use cast to short to allow CSSPropertWidows and CSSPropertyOrphans to use existing macro. 2011-06-22 Eunmi Lee <eunmi15.lee@samsung.com> Reviewed by Martin Robinson. Change GtkWidgetBackingStore.h to WidgetBackingStore.h in order to use in the EFL port. https://bugs.webkit.org/show_bug.cgi?id=62848 This patch will make GtkWidgetBackingStore shareable with EFL port. It is a preparation to integrate WebKit2's BackingStoreGtk.cpp and BackingStoreEfl.cpp as a BackingStoreCairo.cpp. * GNUmakefile.am: * GNUmakefile.list.am: * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::copyRectFromOneSurfaceToAnother): * platform/graphics/cairo/CairoUtilities.h: * platform/cairo/WidgetBackingStore.h: Added. * platform/gtk/GtkWidgetBackingStore.h: Removed. * platform/gtk/GtkWidgetBackingStoreCairo.cpp: (WebCore::createSurfaceForBackingStore): (WebCore::WidgetBackingStorePrivate::create): (WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate): (WebCore::WidgetBackingStore::create): (WebCore::WidgetBackingStore::WidgetBackingStore): (WebCore::WidgetBackingStore::~WidgetBackingStore): (WebCore::WidgetBackingStore::cairoSurface): (WebCore::WidgetBackingStore::scroll): * platform/gtk/GtkWidgetBackingStoreX11.cpp: (WebCore::WidgetBackingStorePrivate::create): (WebCore::WidgetBackingStorePrivate::~WidgetBackingStorePrivate): (WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate): (WebCore::WidgetBackingStore::create): (WebCore::WidgetBackingStore::WidgetBackingStore): (WebCore::WidgetBackingStore::~WidgetBackingStore): (WebCore::WidgetBackingStore::cairoSurface): (WebCore::WidgetBackingStore::scroll): 2011-06-22 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Update position, bounds and anchor point in GraphicsLayerCA all at once https://bugs.webkit.org/show_bug.cgi?id=63148 Since position, bounds and anchor point are inter-dependent, avoid redundant work by simply updating them all at the same time. No behavior changes, so no new tests. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setPosition): (WebCore::GraphicsLayerCA::setAnchorPoint): (WebCore::GraphicsLayerCA::setSize): (WebCore::GraphicsLayerCA::setBoundsOrigin): (WebCore::GraphicsLayerCA::setAllowTiledLayer): (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateGeometry): (WebCore::GraphicsLayerCA::ensureStructuralLayer): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: 2011-06-22 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. Make instantiation of legacy editing position more explicit https://bugs.webkit.org/show_bug.cgi?id=63037 Replaced the constructor of Position class that used to instantiate a legacy editing position by a function called createLegacyEditingPosition. * WebCore.exp.in: Removed the constructor from the list. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::visiblePositionForTextMarkerData): Calls createLegacyEditingPosition. * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::nodeTextChangePlatformNotification): No longer uses Positions to instantiate a range. * dom/Position.cpp: (WebCore::Position::Position): New constructor takes LegacyEditingOffset, which can only be instantiated by createLegacyEditingPosition. (WebCore::Position::previous): Calls createLegacyEditingPosition. (WebCore::Position::next): Ditto. (WebCore::Position::upstream): Ditto. (WebCore::Position::downstream): Ditto. * dom/Position.h: Added new Position::LegacyEditingOffset class to hide the legacy constructor from the world. (WebCore::Position::LegacyEditingOffset::value): Added. (WebCore::Position::LegacyEditingOffset::LegacyEditingOffset): Added. (WebCore::createLegacyEditingPosition): Added. * dom/PositionIterator.cpp: (WebCore::PositionIterator::operator Position): Calls createLegacyEditingPosition. * dom/RangeBoundaryPoint.h: (WebCore::RangeBoundaryPoint::toPosition): Ditto. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): Instantiates new Position instead of old one; this is always safe since the anchor node is always a text node. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): Calls createLegacyEditingPosition. (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): Ditto. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::renderedText): Ditto. * editing/visible_units.cpp: (WebCore::previousBoundary): Ditto. (WebCore::previousLinePosition): Ditto. (WebCore::nextLinePosition): Ditto. * page/DOMSelection.cpp: (WebCore::DOMSelection::collapse): Ditto. (WebCore::DOMSelection::setBaseAndExtent): Ditto. (WebCore::DOMSelection::setPosition): Ditto. (WebCore::DOMSelection::extend): Ditto. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForBox): Ditto. * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint): Calls Position() instead of Position(0, 0). * rendering/RenderObject.cpp: (WebCore::RenderObject::createVisiblePosition): Calls createLegacyEditingPosition.s 2011-06-22 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: split setAttributes and setAttributeValue. https://bugs.webkit.org/show_bug.cgi?id=63138 * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributeValue): (WebCore::InspectorDOMAgent::setAttributesText): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.setAttribute): (WebInspector.DOMNode.prototype.setAttributeValue): 2011-06-22 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. Animate viewBox attribute in SVG https://bugs.webkit.org/show_bug.cgi?id=20057 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGRect. With the new animator we support interpolation between SVGRects. A feature that can be used to get smooth zooming animations for SVGs. Added parseRect() to SVGParserUtilities for parsing Strings to FloatRects. Tests: svg/animations/svgrect-animation-1.html svg/animations/svgrect-animation-2.html * CMakeLists.txt: Added new file SVGAnimatedRect.cpp to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * platform/graphics/FloatRect.h: Added new operators + and +=. (WebCore::operator+=): (WebCore::operator+): * svg/SVGAllInOne.cpp: Added SVGAnimatedRect.cpp for Win build. * svg/SVGAnimateElement.cpp: Handle AnimatedRect explicitly. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): Ditto. (WebCore::SVGAnimateElement::calculateAnimatedValue): Ditto. (WebCore::SVGAnimateElement::calculateFromAndToValues): Ditto. (WebCore::SVGAnimateElement::calculateFromAndByValues): Ditto. (WebCore::SVGAnimateElement::resetToBaseValue): Ditto. (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto. (WebCore::SVGAnimateElement::calculateDistance): Ditto. * svg/SVGAnimatedRect.cpp: Added. The new Animator for SVGRect. (WebCore::SVGAnimatedRectAnimator::SVGAnimatedRectAnimator): (WebCore::SVGAnimatedRectAnimator::constructFromString): (WebCore::SVGAnimatedRectAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedRectAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedRectAnimator::calculateDistance): * svg/SVGAnimatedRect.h: (WebCore::SVGAnimatedRectAnimator::~SVGAnimatedRectAnimator): * svg/SVGAnimatedType.cpp: Support for FloatRect. (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createRect): (WebCore::SVGAnimatedType::rect): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGParserUtilities.cpp: Parse String as FloatRect. (WebCore::parseRect): * svg/SVGParserUtilities.h: 2011-06-20 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. FileChooser should be only created when we need to choose files. https://bugs.webkit.org/show_bug.cgi?id=63039 1) Introduce FileChooserSettings to decouple setting querying from FileChooser. It's a simple copyable settings object, which allows us to capture the settings atomically and treat them as discardable data. 2) Encapsulate lifetime management of FileChooser entirely in FileChooserClient. It's now a "smart" client, and allows us to completely remove FileChooser management concerns from a FileChooserClient implementor. 3) Change creation of FileChooser to be on-demand, only when we actually need to choose file. 4) Rearrange calling of dispatchFormControlChangeEvent to be at the end of a function and remove "am-I-dead" checks that are now unnecessary. 5) Clean up directory upload code a bit, and make use of FileChooserSettings to pass directory name. Refactoring, covered by existing tests. * WebCore.exp.in: Removed unneeded export. * loader/EmptyClients.h: Removed now-unneded param. (WebCore::EmptyChromeClient::enumerateChosenDirectory): Ditto. * page/Chrome.cpp: (WebCore::Chrome::enumerateChosenDirectory): Ditto. * page/Chrome.h: Ditto. * page/ChromeClient.h: Ditto. * platform/FileChooser.cpp: (WebCore::FileChooserClient::~FileChooserClient): Added discarding of chooser. (WebCore::FileChooserClient::newFileChooser): Added. (WebCore::FileChooserClient::discardChooser): Added. (WebCore::FileChooser::FileChooser): Changed to use FileChooserSettings. (WebCore::FileChooser::create): Ditto. (WebCore::FileChooser::~FileChooser): Removed unneeded code. (WebCore::FileChooser::chooseFiles): Changed to pass results to the client. * platform/FileChooser.h: (WebCore::FileChooser::settings): Added. * rendering/RenderFileUploadControl.cpp: (WebCore::filenamesFromFileList): Added a helper. (WebCore::RenderFileUploadControl::RenderFileUploadControl): Changed to use the helper, removed chooser initialization code. (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed disconnection code, now handled in FileChooserClient. (WebCore::RenderFileUploadControl::filesChosen): Renamed from valueChanged, rearranged to fire dispatchFormControlChangeEvent last. (WebCore::RenderFileUploadControl::receiveDropForDirectoryUpload): Changed to use settings. (WebCore::RenderFileUploadControl::click): Ditto. (WebCore::RenderFileUploadControl::updateFromElement): Removed now-unneeded check. (WebCore::RenderFileUploadControl::receiveDroppedFiles): Changed to avoid using the chooser, since it is not necessary. (WebCore::RenderFileUploadControl::fileTextValue): Changed to use input data, not chooser data. * rendering/RenderFileUploadControl.h: Updated decls. 2011-06-22 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: DOMAgent.resolveNode should receive objectGroup. https://bugs.webkit.org/show_bug.cgi?id=63137 * inspector/InjectedScript.cpp: (WebCore::InjectedScript::wrapNode): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::resume): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (.): (): * inspector/front-end/PropertiesSidebarPane.js: * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.resolveNode): (WebInspector.RemoteObjectProperty.fromPrimitiveValue): 2011-06-22 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: fix exceptions in scripts panel. https://bugs.webkit.org/show_bug.cgi?id=62865 Resource.requestContent callback may be fired after navigation when scripts panel is already reset. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript.contentChanged): (WebInspector.DebuggerPresentationModel.prototype._addScript): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._showSourceFrameAndAddToHistory): (WebInspector.ScriptsPanel.prototype._filesSelectChanged): * inspector/front-end/SourceFile.js: (WebInspector.SourceFile.prototype.reload): 2011-06-21 Michael Saboff <msaboff@apple.com> Reviewed by Adam Roben. REGRESSION (r88260): Assertion failure in FontCache::getCachedFontData when typing in Safari's address field https://bugs.webkit.org/show_bug.cgi?id=63078 Added FontCachePurgePreventer in WebCore::WebCoreTextFloatWidth to handle assertion failure when typing in address field on windows. Investigated other possible code paths that need purge prevention. Added FontCachePurgeProtection to WebCore::createDragImageForLink and WebCore::doDrawTextAtPoint. No change to functionality, therefore no new tests. * platform/win/DragImageWin.cpp: (WebCore::createDragImageForLink): * platform/win/WebCoreTextRenderer.cpp: (WebCore::doDrawTextAtPoint): (WebCore::WebCoreTextFloatWidth): 2011-06-22 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. A couple setTextAsOfLastFormControlChangeEvent tweaks https://bugs.webkit.org/show_bug.cgi?id=63108 * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::insertedIntoDocument): Use emptyString() instead of String("") because it is better style and faster. * html/HTMLFormControlElement.h: Make setTextAsOfLastFormControlChangeEvent non-virtual so it actually gets inlined, since there are no overrides of it. Also make it take a const String& to avoid unnecessary reference count churn. 2011-06-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89402. http://trac.webkit.org/changeset/89402 https://bugs.webkit.org/show_bug.cgi?id=63129 It made 6 tests crash (Requested by Ossy on #webkit). * dom/DataTransferItem.cpp: (WebCore::DataTransferItem::DataTransferItem): * dom/DataTransferItem.h: * dom/DataTransferItems.cpp: (WebCore::DataTransferItems::DataTransferItems): * dom/DataTransferItems.h: * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): * editing/CompositeEditCommand.h: * page/WebKitAnimationList.cpp: (WebCore::WebKitAnimationList::append): (WebCore::WebKitAnimationList::insertAnimation): * page/WebKitAnimationList.h: (WebCore::WebKitAnimationList::create): * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::FEImage): (WebCore::FEImage::create): * svg/graphics/filters/SVGFEImage.h: * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): (WebCore::SVGFilterBuilder::add): (WebCore::SVGFilterBuilder::appendEffectToEffectReferences): * svg/graphics/filters/SVGFilterBuilder.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer): (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel): * websockets/WorkerThreadableWebSocketChannel.h: (WebCore::WorkerThreadableWebSocketChannel::Peer::create): 2011-06-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89368. http://trac.webkit.org/changeset/89368 https://bugs.webkit.org/show_bug.cgi?id=63128 It made http/tests/inspector/extensions-resources- redirect.html crash (Requested by Ossy on #webkit). * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): (WebCore::InspectorPageAgent::resourceContent): (WebCore::InspectorPageAgent::getResourceContent): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::resourceStyleSheetText): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._innerRequestContent.onResourceContent): (WebInspector.Resource.prototype._innerRequestContent): 2011-06-17 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: use stack trace to create anchors for console messages. https://bugs.webkit.org/show_bug.cgi?id=62856 * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._completions.reportCompletions): (WebInspector.ConsoleView.prototype._completions): (WebInspector.ConsoleMessage.prototype._formatMessage): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._updateAnchor): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.createAnchor): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.createAnchor): (WebInspector.ScriptsPanel.prototype.showAnchorLocation): (WebInspector.ScriptsPanel.prototype._updateAnchor): * inspector/front-end/inspector.js: (WebInspector.linkifyResourceAsNode): (WebInspector.linkifyCallFrameAsNode): 2011-06-21 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. Avoid custom layout code of RenderTextControlSingleLine https://bugs.webkit.org/show_bug.cgi?id=61415 If a text field has a search results button, a search cancel button, a speech button, or a spin button, the editable inner text element and they are wrapped by a flexible box container, and the editable inner text element has flexibility. As the result of applying the flexible box, we don't need any horizontal layout code in RenderTextControlSingleLine except the inner spin button. Also, we remove custom hit-testing code in nodeAtPoint(). If a user clicks on a position left of the inner editable text but not on the search results button, the search results button doesn't work though it worked. * css/html.css: (input::-webkit-textfield-decoration-container): New style definition for the "container" element. (input[type="search"]::-webkit-search-cancel-button): It should be a block element because it's a child of the flexible box. Also, this doesn't have flexibility. (input[type="search"]::-webkit-search-decoration): ditto. (input[type="search"]::-webkit-search-results-decoration): ditto. (input[type="search"]::-webkit-search-results-button): ditto. (input::-webkit-inner-spin-button): ditto. (input::-webkit-input-speech-button): ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::containerElement): Add an accessor of the flexible box container. It just calls InputType::containerElement(). * html/HTMLInputElement.h: Declare it. * html/InputType.h: (WebCore::InputType::containerElement): New accessor for a shadow element. * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): m_innerBlock is moved to TextFieldInputType. (WebCore::SearchInputType::needsContainer): A search field always needs the flexible box container because of the results button and the cancel button. (WebCore::SearchInputType::createShadowSubtree): Use TextFieldInputType::createShadowSubtree(), then modify the tree. (WebCore::SearchInputType::destroyShadowSubtree): m_innerBlock is moved to TextFieldInputType. * html/SearchInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::TextFieldInputType): Initialize the new members. (WebCore::TextFieldInputType::needsContainer): Returns true if x-webkit-speech. We check a spin button separately. (WebCore::TextFieldInputType::createShadowSubtree): Wrap everything with the flexible box container if needsContainer() or we need a spin button. (WebCore::TextFieldInputType::containerElement): Added an accessor. (WebCore::TextFieldInputType::innerBlockElement): ditto. (WebCore::TextFieldInputType::innerTextElement): ditto. (WebCore::TextFieldInputType::innerSpinButtonElement): ditto. (WebCore::TextFieldInputType::speechButtonElement): ditto. (WebCore::TextFieldInputType::destroyShadowSubtree): Clear references to new shadow nodes. * html/TextFieldInputType.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::containerElement): Added an accessor. (WebCore::RenderTextControlSingleLine::innerTextElement): (WebCore::RenderTextControlSingleLine::layout): - Correct heights check Comparing with height(), not contentHeigth(), was incorrect. - Adjust the container height like the editable inner text. - Remove width adjustment - Remove the speech button layout code The flexible box layout is enough. (WebCore::RenderTextControlSingleLine::nodeAtPoint): Remove custom code for results/cancel/speech buttons, and Simplify comments. (WebCore::RenderTextControlSingleLine::forwardEvent): Remove custom forwarding code for results/cancel buttons. (WebCore::RenderTextControlSingleLine::styleDidChange): Clear the style of the container because we update it in layout(). (WebCore::RenderTextControlSingleLine::hasControlClip): Decoration buttons should be clipped by the container. (WebCore::RenderTextControlSingleLine::controlClipRect): ditto. (WebCore::RenderTextControlSingleLine::createInnerTextStyle): We don't need to use display:inline-block any more. (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): The text wrapper element should have flexibility. (WebCore::RenderTextControlSingleLine::textBlockInsetTop): Updated for the tree structure change. * rendering/RenderTextControlSingleLine.h: 2011-06-21 MORITA Hajime <morrita@google.com> Unreviewed, rolling out r89401 and r89403. http://trac.webkit.org/changeset/89401 http://trac.webkit.org/changeset/89403 https://bugs.webkit.org/show_bug.cgi?id=62970 Breaks mac build and mistakenly enables the spellcheck API * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * features.pri: 2011-06-21 Kent Tamura <tkent@chromium.org> [Mac] Sort Xcode project files. * WebCore.xcodeproj/project.pbxproj: 2011-06-21 Darin Adler <darin@apple.com> Reviewed by Ryosuke Niwa. RefPtr misused as argument type in a few classes https://bugs.webkit.org/show_bug.cgi?id=62955 * dom/DataTransferItem.cpp: (WebCore::DataTransferItem::DataTransferItem): * dom/DataTransferItem.h: * dom/DataTransferItems.cpp: (WebCore::DataTransferItems::DataTransferItems): * dom/DataTransferItems.h: * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): * editing/CompositeEditCommand.h: * page/WebKitAnimationList.cpp: (WebCore::WebKitAnimationList::append): (WebCore::WebKitAnimationList::insertAnimation): * page/WebKitAnimationList.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::FEImage): (WebCore::FEImage::create): * svg/graphics/filters/SVGFEImage.h: * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): (WebCore::SVGFilterBuilder::add): (WebCore::SVGFilterBuilder::appendEffectToEffectReferences): * svg/graphics/filters/SVGFilterBuilder.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer): (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel): * websockets/WorkerThreadableWebSocketChannel.h: Use PassRefPtr or raw pointer as appropriate for RefPtr arguments. 2011-06-20 MORITA Hajime <morrita@google.com> Reviewed by Kent Tamura. Spellcheck API should be build-able. https://bugs.webkit.org/show_bug.cgi?id=62970 No new tests, changing only build related files * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * features.pri: 2011-06-21 Matthew Delaney <mdelaney@apple.com> Reviewed by Simon Fraser. beginTransparencyLayer leaves context color out of sync, bleeds color into text https://bugs.webkit.org/show_bug.cgi?id=63093 Test: fast/css/color-leakage.html * platform/graphics/cg/GraphicsContextCG.cpp: Swap out CGContextSave/Restore with GraphicsContext::save/restore to keep the context in sync with its CG context (WebCore::GraphicsContext::beginTransparencyLayer): Added save(), removed redundant calls. (WebCore::GraphicsContext::endTransparencyLayer): Added restore(), removed redundant calls. 2011-06-21 Tony Chang <tony@chromium.org> Reviewed by Eric Seidel. add css parsing of flex() https://bugs.webkit.org/show_bug.cgi?id=62050 Test: css3/flexbox/flex-parsing.html * CMakeLists.txt: Add CSSFlexValue.* * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * css/CSSFlexValue.cpp: Added. (WebCore::CSSFlexValue::~CSSFlexValue): (WebCore::CSSFlexValue::cssText): * css/CSSFlexValue.h: Added. (WebCore::CSSFlexValue::create): Hold positive flex, negative flex and sizing. (WebCore::CSSFlexValue::CSSFlexValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValidPrimitive): Pull out code from parseValue. (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFlex): Parse the different version of flex(). * css/CSSParser.h: 2011-06-21 Adrienne Walker <enne@google.com> Reviewed by Simon Fraser. Add child layers to the overlap map if their parent belatedly becomes composited https://bugs.webkit.org/show_bug.cgi?id=62181 * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: 2011-06-21 Zhenyao Mo <zmo@google.com> Reviewed by Kenneth Russell. Implement drawingBufferWidth/drawingBufferHeight in WebGL https://bugs.webkit.org/show_bug.cgi?id=58497 * html/canvas/WebGLRenderingContext.cpp: Add drawingBufferWidth/Height method and call getInternalFramebufferSize(). (WebCore::WebGLRenderingContext::drawingBufferWidth): (WebCore::WebGLRenderingContext::drawingBufferHeight): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContext.idl: Add readonly attributes drawingBufferWidth/Height. * platform/graphics/GraphicsContext3D.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Make getInternalFramebufferSize const. (WebCore::GraphicsContext3D::getInternalFramebufferSize): * platform/graphics/qt/GraphicsContext3DQt.cpp: Ditto. (WebCore::GraphicsContext3D::getInternalFramebufferSize): 2011-06-21 Dmitry Lomov <dslomov@google.com> Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=62653 [V8][Chromium] Make StringCache in V8 bindings per-isolate This moves StringCache into V8BindingPerIsolateData. * bindings/v8/V8Binding.cpp: (WebCore::cachedStringCallback): (WebCore::StringCache::remove): (WebCore::StringCache::v8ExternalStringSlow): * bindings/v8/V8Binding.h: (WebCore::StringCache::StringCache): (WebCore::StringCache::v8ExternalString): (WebCore::StringCache::clearOnGC): (WebCore::V8BindingPerIsolateData::stringCache): (WebCore::v8ExternalString): * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initV8IfNeeded): 2011-06-21 Alexey Proskuryakov <ap@apple.com> Clang build fix. * platform/mac/WebCoreSystemInterface.h: Give the enum a name. 2011-06-21 Alexey Proskuryakov <ap@apple.com> Fix Mac build in some configurations. * platform/mac/WebCoreSystemInterface.h: Added an enum matching WKSI one, since we cannot use WKSI in WebCore. * platform/mac/WebVideoFullscreenHUDWindowController.mm: Removed an include of WebKitSystemInterface.h. It's not meant to be used from WebCore, and if included, a wrong copy may be used. (createControlWithMediaUIControlType): Added a FIXME about problems with Leopard build. (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Ditto. Switched enum values to WCSI style (lower level "wk"). 2011-06-21 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89354. http://trac.webkit.org/changeset/89354 https://bugs.webkit.org/show_bug.cgi?id=63099 Broke tests on Mac (Requested by rniwa on #webkit). * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): (WebCore::InspectorFrontendClientLocal::frontendLoaded): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorFrontendClientLocal.h: * inspector/front-end/InspectorFrontendAPI.js: Removed. * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._enableProfiling): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._enableDebugging): (WebInspector.ScriptsPanel.prototype._toggleDebugging): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._memoryOverviewItemSelected): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-06-21 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IndexedDB: IDBObjectStore methods should throw TypeError if required arguments are missing https://bugs.webkit.org/show_bug.cgi?id=63087 Test: storage/indexeddb/objectStore-required-arguments.html * storage/IDBObjectStore.idl: Remove LegacyDefaultOptionalArguments flag so missing required arguments will throw TypeError, as per WebIDL spec. 2011-06-21 Rob Buis <rbuis@rim.com> Reviewed by Dirk Schulze. All pointer-events fail if text has visibility="hidden" https://bugs.webkit.org/show_bug.cgi?id=62209 Use PointerEventsHitRules to make hit-testing for SVG text inline boxes work. No new tests; covered by existing test pointer-events-text.svg. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint): * rendering/svg/SVGInlineTextBox.h: 2011-06-21 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IndexedDB: keyrange methods should throw TypeError if required arguments are missing https://bugs.webkit.org/show_bug.cgi?id=63085 Test: storage/indexeddb/keyrange-required-arguments.html * storage/IDBKeyRange.idl: remove LegacyDefaultOptionalArguments flag so missing required arguments throw TypeError, as per WebIDL spec. 2011-06-21 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: should throw TypeError when indexedDB.open() name argument is missing https://bugs.webkit.org/show_bug.cgi?id=63065 * storage/IDBFactory.idl: remove LegacyDefaultOptionalArguments flag and fix function argument flags 2011-06-21 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: should throw TypeError when index .get() key argument is missing https://bugs.webkit.org/show_bug.cgi?id=63079 Test: storage/indexeddb/index-get-key-argument-required.html * storage/IDBIndex.idl: remove LegacyDefaultOptionalArguments flag so missing required arguments throw a TypeError as per WebIDL spec. 2011-06-21 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: cursor update() value argument is required https://bugs.webkit.org/show_bug.cgi?id=63032 Test: storage/indexeddb/cursor-update-value-argument-required.html * storage/IDBCursor.idl: remove LegacyDefaultOptionalArguments flag so calling functions with missing required arguments will raise a TypeError 2011-06-21 Martin Robinson <mrobinson@igalia.com> Reviewed by Dirk Schulze. [GTK] r89314 caused several shadow tests to start failing https://bugs.webkit.org/show_bug.cgi?id=63045 Use prepareForFilling and prepareForStroking when rendering the shadowed image of a path. This ensures that the shadowed image has the proper alpha. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::drawPathShadow): Properly prepare the shadow image. 2011-06-21 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: [Chromium] Remove old (aggregating) heap profiler. https://bugs.webkit.org/show_bug.cgi?id=63049 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::takeHeapSnapshot): * inspector/Inspector.json: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::takeHeapSnapshot): * inspector/InspectorProfilerAgent.h: * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype.get profile): (WebInspector.DetailedHeapshotView.prototype.get baseProfile): (WebInspector.DetailedHeapshotView.prototype._profiles): (WebInspector.DetailedHeapshotProfileType): (WebInspector.DetailedHeapshotProfileType.prototype.buttonClicked): * inspector/front-end/HeapSnapshotView.js: Removed. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot): (WebInspector.ProfilesPanel.prototype._addHeapSnapshotChunk): (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.parsed): (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilesPanel.prototype._enableDetailedHeapProfiles): * inspector/front-end/WebKit.qrc: * inspector/front-end/heapProfiler.css: * inspector/front-end/inspector.html: 2011-06-21 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Move logic for deciding whether resource content should be base64 encoded on backend. https://bugs.webkit.org/show_bug.cgi?id=63069 * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): (WebCore::InspectorPageAgent::resourceContent): (WebCore::InspectorPageAgent::getResourceContent): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::resourceStyleSheetText): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._innerRequestContent.onResourceContent): (WebInspector.Resource.prototype._innerRequestContent): 2011-06-21 Dirk Schulze <krit@webkit.org> Reviewed by Rob Buis. SVG no fallback to discrete animation on attribute 'values' for SVGString https://bugs.webkit.org/show_bug.cgi?id=57085 Check for AnimatedString, AnimatedBoolean and AnimatedEnumeration on 'values' calculation. If the property type matches one of the above values, fallback to discrete animation. The patch also changes behavior for String animation. The animation code doesn't handle inheritance for strings anymore. This is done by the CSS parser itself now, we just need to handle inheritance on animations that interpolate between two values like for calcMode="linear". Test: svg/animations/svgstring-animation-fallback-to-discrete.html * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateAnimatedValue): * svg/SVGAnimateElement.h: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): 2011-06-21 Cary Clark <caryclark@google.com> Reviewed by Eric Seidel. Update GraphicsContextSkia when the Chromium platform is Mac https://bugs.webkit.org/show_bug.cgi?id=62867 No new tests. This does not modify existing code; there is no change in functionality. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::drawOuterPath): (WebCore::drawInnerPath): (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): The OS X framework draws a fatter focus ring than the Chromium port. Increase the diameter, and add an inner stroke with more transparency, to match the look of Chromium on Mac when Skia is the rendering engine. (WebCore::deviceRGBColorSpaceRef): Add deviceRGBColorSpaceRef, a static cache of CGColorSpaceCreateDeviceRGB(). This is called by the Mac-specific UI when Skia is the rendering engine. 2011-06-21 Tony Chang <tony@chromium.org> Try to fix WinCE build. Replace cat with perl -ne "print". * CMakeLists.txt: 2011-06-21 Alexandru Chiculita <achicu@adobe.com> Reviewed by Tony Chang. "WebCore/css/makeprop.pl" and "WebCore/css/makevalues.pl" should take ENABLE_ flags into account https://bugs.webkit.org/show_bug.cgi?id=62114 Changed the line commenting style in WebCore/css/*.in files from "#" prefixed to "//" prefixed. That's needed because we now pre-process the files with the C++ pre-processor. Also, there's no need to manually strip the comments anymore. Moved the duplication checks from project files to makeprop.pl and makevalues.pl. In addition makevalues.pl will also lower case the values. This is a build script refactoring, so no tests are provided. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_csspropertynames.py: * WebCore.gyp/scripts/action_cssvaluekeywords.py: * css/CSSPropertyNames.in: comment style only * css/CSSValueKeywords.in: comment style only * css/SVGCSSPropertyNames.in: comment style only * css/SVGCSSValueKeywords.in: comment style only * css/WCSSValueKeywords.in: comment style only * css/makeprop.pl: * css/makevalues.pl: 2011-06-21 Peter Varga <pvarga@webkit.org> Reviewed by Andreas Kling. [Qt][V8] Enable ScriptController::disableEval functionality in QtWebkit-V8 build https://bugs.webkit.org/show_bug.cgi?id=61187 No new tests needed. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::disableEval): 2011-06-21 Peter Varga <pvarga@webkit.org> Reviewed by Andreas Kling. [Qt][V8] Enable marking objects with complex GC rules https://bugs.webkit.org/show_bug.cgi?id=61291 No new tests needed. * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): 2011-06-20 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: introduce InspectorFrontendAPI for actions initiated from the application menu. https://bugs.webkit.org/show_bug.cgi?id=62985 Both: inspector protocol and WebCore/InspectorController have a number of unnecessary methods for plumbing the menu action handlers through the WebKit and WebCore. I intend to remove this menu support from the protocol and WebCore/InspectorController API. I am starting with exposing the new front-end API in the WebCore and using it in the WebKit/mac port. WebKit/win and WebKit2 to follow. * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): (WebCore::InspectorFrontendClientLocal::frontendLoaded): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): (WebCore::InspectorFrontendClientLocal::isDebuggingEnabled): (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled): (WebCore::InspectorFrontendClientLocal::isJavaScriptProfilingEnabled): (WebCore::InspectorFrontendClientLocal::setJavaScriptProfilingEnabled): (WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled): (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled): (WebCore::InspectorFrontendClientLocal::isProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean): (WebCore::InspectorFrontendClientLocal::evaluateOnLoad): * inspector/InspectorFrontendClientLocal.h: * inspector/front-end/InspectorFrontendAPI.js: Added. (InspectorFrontendAPI.isDebuggingEnabled): (InspectorFrontendAPI.setDebuggingEnabled): (InspectorFrontendAPI.isJavaScriptProfilingEnabled): (InspectorFrontendAPI.setJavaScriptProfilingEnabled): (InspectorFrontendAPI.isTimelineProfilingEnabled): (InspectorFrontendAPI.setTimelineProfilingEnabled): (InspectorFrontendAPI.isProfilingJavaScript): (InspectorFrontendAPI.startProfilingJavaScript): (InspectorFrontendAPI.stopProfilingJavaScript): (InspectorFrontendAPI.setAttachedWindow): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType): (WebInspector.CPUProfileType.prototype.isRecordingProfile): (WebInspector.CPUProfileType.prototype.startRecordingProfile): (WebInspector.CPUProfileType.prototype.stopRecordingProfile): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.get profilerEnabled): (WebInspector.ProfilesPanel.prototype.enableProfiler): (WebInspector.ProfilesPanel.prototype.disableProfiler): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.get debuggingEnabled): (WebInspector.ScriptsPanel.prototype.enableDebugging): (WebInspector.ScriptsPanel.prototype.disableDebugging): (WebInspector.ScriptsPanel.prototype.toggleDebugging): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._memoryOverviewItemSelected): (WebInspector.TimelinePanel.prototype.setTimelineProfilingEnabled): (WebInspector.TimelinePanel.prototype.get timelineProfilingEnabled): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-06-21 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89185. http://trac.webkit.org/changeset/89185 https://bugs.webkit.org/show_bug.cgi?id=63068 For breaking navigation with inspector opened. (Requested by pfeldman on #webkit). * bindings/v8/V8Binding.cpp: (WebCore::enableStringImplCache): (WebCore::getStringCache): (WebCore::cachedStringCallback): (WebCore::v8ExternalStringSlow): * bindings/v8/V8Binding.h: (WebCore::v8ExternalString): * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): 2011-06-21 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: rename editScriptSource to setScriptSource. https://bugs.webkit.org/show_bug.cgi?id=63059 * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setScriptSource): * bindings/js/ScriptDebugServer.h: * bindings/v8/DebuggerScript.js: (): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setScriptSource): * bindings/v8/ScriptDebugServer.h: * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setScriptSource): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didReceiveSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.editSource): * inspector/front-end/ScriptsPanel.js: (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.editContent): (WebInspector.SourceFrameDelegate.prototype.setScriptSource): 2011-06-21 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Show content in network panel correctly when two resources were loaded from the same url with different content. https://bugs.webkit.org/show_bug.cgi?id=62992 Test: http/tests/inspector/network/network-cachedresources-with-same-urls.html * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::addCachedResource): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::cachedResource): (WebCore::NetworkResourcesData::ResourceData::setCachedResource): 2011-06-21 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Attached state changes do not affect the drawer height https://bugs.webkit.org/show_bug.cgi?id=63061 * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.enterPanelMode): (WebInspector.Drawer.prototype.exitPanelMode): (WebInspector.Drawer.prototype.updateHeight): * inspector/front-end/inspector.js: (WebInspector.set attached): 2011-06-17 Pavel Podivilov <podivilov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: can't set breakpoint on the last script line. https://bugs.webkit.org/show_bug.cgi?id=62861 * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::resolveBreakpoint): 2011-06-20 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: console messages shouldn't prevent garbage collection of iframes https://bugs.webkit.org/show_bug.cgi?id=62996 When DOMWindow is detached from its frame run through all console messages and clear their arguments and ScriptState references. The message text in this case will be the first argument serialized to string. Test: http/tests/inspector-enabled/console-clear-arguments-on-frame-remove.html * bindings/js/ScriptState.cpp: (WebCore::domWindowFromScriptState): * bindings/js/ScriptState.h: * bindings/v8/ScriptState.cpp: (WebCore::ScriptState::domWindow): (WebCore::domWindowFromScriptState): * bindings/v8/ScriptState.h: * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::windowCleared): * inspector/ConsoleMessage.h: * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::discardInjectedScriptsFor): * inspector/InjectedScriptManager.h: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::domWindowCleared): * inspector/InspectorConsoleAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::pageDestroyedImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::pageDestroyed): * page/DOMWindow.cpp: (WebCore::DOMWindow::pageDestroyed): 2011-06-21 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [Chromium] Fix path finding to window objects. https://bugs.webkit.org/show_bug.cgi?id=63051 * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotRetainingPathsList.prototype._setRootChildrenForFinder): 2011-06-21 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: hovering over linkified nodes in the UI does not highlight elements on the page. https://bugs.webkit.org/show_bug.cgi?id=60630 * inspector/front-end/inspector.js: (WebInspector.wireElementWithDOMNode): 2011-06-20 Yuzo Fujishima <yuzo@google.com> Reviewed by Kent Tamura. Fix for Bug 62975 - Refactor local variable usage in CSSFontFaceSource::getFontData https://bugs.webkit.org/show_bug.cgi?id=62975 No new tests because no behavioral changes. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Remove one of fontData variable. 2011-06-20 Andy Estes <aestes@apple.com> Reviewed by Darin Adler. KURL::protocolIs(const char* protocol) asserts in Debug builds with valid protocols https://bugs.webkit.org/show_bug.cgi?id=61572 No new tests. No code currently calls protocolIs() with a protocol that contains a non-letter character. * platform/KURL.cpp: (WebCore::isSchemeCharacterMatchIgnoringCase): A helper function that compares two characters ignoring case. It assumes (and asserts) that both characters are valid scheme characters, and that if the second argument is a letter that it is lowercase. (WebCore::KURL::protocolIs): Call isSchemeCharacterMatchIgnoringCase() instead of isLetterMatchIgnoringCase(). 2011-06-20 Dai Mikurube <dmikurube@chromium.org> Reviewed by Kent Tamura. Webkit allows disabled option as value of "required" select https://bugs.webkit.org/show_bug.cgi?id=62668 * html/HTMLSelectElement.cpp: Removed "disabled" checking due to spec change. (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): 2011-06-20 Zhenyao Mo <zmo@google.com> Reviewed by Kenneth Russell. Update ANGLE to r696. https://bugs.webkit.org/show_bug.cgi?id=56396 * platform/graphics/ANGLEWebKitBridge.cpp: (WebCore::ANGLEWebKitBridge::validateShaderSource): Specify backend. 2011-06-20 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. Group load-initiating and stopping functions in FrameLoader.h https://bugs.webkit.org/show_bug.cgi?id=63030 No function change, thus no tests. * loader/FrameLoader.h: 2011-06-20 Sailesh Agrawal <sail@chromium.org> Reviewed by Mihai Parparita. [Chromium] Draw search tickmarks on overlay scrollbars https://bugs.webkit.org/show_bug.cgi?id=62783 This change adds search tickmark support for overlay scrollbars. Tickmarks are only drawn when the scroll track is visible. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:Split the scrollbar drawing code into a track and knob version. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterPaint): (wkScrollbarPainterPaintTrack): (wkScrollbarPainterPaintKnob): * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm:Factor out the paint tickmark code and call it from the overlay scrollbar drawing code. (WebCore::ScrollbarThemeChromiumMac::paint): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): 2011-06-20 Adam Barth <abarth@webkit.org> Mac build fix. In addition to adding the files to the project, we need to add them to the WebCore target. * WebCore.xcodeproj/project.pbxproj: 2011-06-20 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. Remove numRequests https://bugs.webkit.org/show_bug.cgi?id=63028 numRequests exists just to cargo-cult null-check m_frame->document(), which is always non-null. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkCompleted): (WebCore::FrameLoader::numPendingOrLoadingRequests): 2011-06-20 Alexey Proskuryakov <ap@apple.com> Reviewed by Darin Adler. startWordBoundary() in visible_units.cpp assumes that all characters are 16 bit https://bugs.webkit.org/show_bug.cgi?id=63027 No new tests, because I don't see this affect any webkit.org ports. * editing/visible_units.cpp: (WebCore::startWordBoundary): Previous offset is not just minus one - we need to use a proper macro to iterate. 2011-06-20 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Making SharedBufferCRLFLineReader more generic, so it can be used to read MHTML file with binary parts. https://bugs.webkit.org/show_bug.cgi?id=62966 * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/archive/mhtml/MHTMLParser.cpp: (WebCore::skipLinesUntilBoundaryFound): (WebCore::MHTMLParser::MHTMLParser): (WebCore::MHTMLParser::parseNextPart): * loader/archive/mhtml/MHTMLParser.h: * platform/SharedBufferChunkReader.cpp: Renamed from Source/WebCore/platform/SharedBufferCRLFLineReader.cpp. (WebCore::SharedBufferChunkReader::SharedBufferChunkReader): (WebCore::SharedBufferChunkReader::setSeparator): (WebCore::SharedBufferChunkReader::nextChunk): * platform/SharedBufferChunkReader.h: Renamed from Source/WebCore/platform/SharedBufferCRLFLineReader.h. * platform/network/MIMEHeader.cpp: (WebCore::retrieveKeyValuePairs): (WebCore::MIMEHeader::parseHeader): * platform/network/MIMEHeader.h: 2011-06-20 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. [GTK] Windowless plugins sometimes crash with a BadMatch error https://bugs.webkit.org/show_bug.cgi?id=63020 Do not try to create an XPixmap with any of the dimensions as zero. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::updatePluginWidget): Guard against and empty window rect before trying to create a windowless plugin pixmap. 2011-06-20 Antonio Gomes <agomes@rim.com> Reviewed by Ryosuke Niwa. Stop adding empty rects in FrameSelection::getClippedVisibleTextRectangles https://bugs.webkit.org/show_bug.cgi?id=63018 No new tests needed, since it causes no behavioral change. * editing/FrameSelection.cpp: (WebCore::FrameSelection::getClippedVisibleTextRectangles): 2011-06-20 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Pavel Feldman. Web Inspector: CRASH if Expanding Event Listener on document https://bugs.webkit.org/show_bug.cgi?id=61834 Node::ownerDocument returns null for a document node. So, in the case of a document node in resolveNode, use Node::document which returns the node, as a document. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::resolveNode): 2011-06-20 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Simon Fraser. Minimize memory due to layer backing stores for pages in the Page Cache https://bugs.webkit.org/show_bug.cgi?id=62675 When a page enters the page cache there is now an option on the PageCache singleton to clear the backing stores and layers of the cached page. This can be useful to minimize the amount of memory the stored page consumes. This only affects memory usage and is disabled by default, so no test. * history/CachedFrame.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::CachedFrameBase): Save whether or not the page had composited content or not in a new instance variable, m_isComposited. (WebCore::CachedFrameBase::restore): When restoring, rebuild the compositing tree if it may have been destroyed. (WebCore::CachedFrame::CachedFrame): When saving, clear the backing stores if the page is in compositing mode, and the PageCache setting is enabled. * history/PageCache.cpp: (WebCore::PageCache::PageCache): * history/PageCache.h: (WebCore::PageCache::shouldClearBackingStores): (WebCore::PageCache::setShouldClearBackingStores): A setting to opt-in to the new behavior of clearing the backing stores. * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::clearBackingStores): (WebCore::FrameView::restoreBackingStores): To clear all backing stores we disable compositing for the frame, to detach the root platform layer, and recursively clear backing stores from the root layer of the FrameView. * rendering/RenderLayer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::clearBackingIncludingDescendants): Recursively call clearBacking. 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): 2011-05-03 Martin Robinson <mrobinson@igalia.com> Reviewed by Dirk Schulze. REGRESSION: [CAIRO] wrong drawing of Gradients and Patterns on texts https://bugs.webkit.org/show_bug.cgi?id=31507 When painting text, be sure to set the pattern fill or gradient before modifying the Cairo context CTM. This ensures that gradients and patterns are scaled and positioned properly in the coordinate system of the page. Abstract out the fill preparation to avoid repeating this logic and perform a bit of cleanup. * platform/graphics/cairo/FontCairo.cpp: (WebCore::prepareContextForGlyphDrawing): Now set the x and y position of the text using the glyph offsets. This avoids having to set a transformation matrix when there is no synthetic oblique. (WebCore::drawGlyphsToContext): Add a newline as part of cleanup. Call prepareContextForGlyphDrawing from here and restor the original CTM when exiting. (WebCore::drawGlyphsShadow): Use drawGlyphsToContext here to ensure that all glyph drawing goes through the same path. (WebCore::Font::drawGlyphs): Fix a C-style cast and use the glyph offsets to position the glyphs instead of adjusting the transformation matrix. Use GC::prepareForFilling and GC::prepareForStroking instead of setting up the fill and stroke manually. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::fillRectWithColor): Renamed fillRectSourceOver to fillRectWithColor to make it clearer why this is different than the slower fill method. Moved the no transparency early return here. (WebCore::drawPathShadow): Instead of calling setPlatformFill, just perform a cheap fill and stroke with red color. Since the shadow is used as a mask, the actual fill shouldn't matter. (WebCore::reduceSourceByAlpha): Added this helper. (WebCore::GraphicsContext::prepareForFilling): Added this method adapted from setPlatformFill, which correctly handles the transformation matrix. (WebCore::GraphicsContext::prepareForStroking): Ditto for stroking. (WebCore::shadowAndFillCurrentCairoPath): Adapted from fillCurrentCairoPath, but renamed to clarify what it does and no uses prepareForFilling. (WebCore::shadowAndStrokeCurrentCairoPath): Ditto for stroking. (WebCore::GraphicsContext::drawRect): Update for new method names. (WebCore::GraphicsContext::drawLine): Ditto. (WebCore::GraphicsContext::fillPath): Ditto. (WebCore::GraphicsContext::strokePath): Ditto. (WebCore::GraphicsContext::fillRect): Ditto. Remove the unnecessary save/restore pair here. (WebCore::GraphicsContext::strokeRect): Update to reflect new method names. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::reduceSourceByAlpha): Added this helper. (WebCore::GraphicsContext::prepareForFilling): Added this method adapted from setPlatformFill, which correctly handles the transformation matrix. (WebCore::GraphicsContext::prepareForStroking): Ditto for stroking. (WebCore::reduceSourceByAlpha): * platform/graphics/cairo/PlatformContextCairo.h: Added new method declarations. 2011-06-20 Tim Horton <timothy_horton@apple.com> Reviewed by Darin Adler. Incorrect clamping on SVG masks when root element is not located at (0,0) https://bugs.webkit.org/show_bug.cgi?id=63019 We should be using frameRect(), not contentBoxRect() for the rect to clamp to when creating an SVG mask image. Test: svg/custom/absolute-root-position-masking.xhtml * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer): 2011-06-20 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove FrameLoader::m_workingURL https://bugs.webkit.org/show_bug.cgi?id=63021 FrameLoader shouldn't keep the working URL in separate state. It's just a function of other state. m_workingURL exists only to create bugs and confusion. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::documentURL): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::didOpenURL): (WebCore::FrameLoader::receivedFirstData): (WebCore::FrameLoader::willSetEncoding): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::open): (WebCore::FrameLoader::finishedLoadingDocument): * loader/FrameLoader.h: 2011-06-20 Kenneth Russell <kbr@google.com> Unreviewed. Rolled out r89233 and r89235 because of crashes in http/tests/misc/acid3.html on Snow Leopard and other platforms https://bugs.webkit.org/show_bug.cgi?id=63022 * features.pri: * page/DOMWindow.idl: * platform/graphics/Font.cpp: (WebCore::Font::drawText): (WebCore::Font::drawEmphasisMarks): (WebCore::Font::width): (WebCore::Font::selectionRectForText): (WebCore::Font::offsetForPosition): (WebCore::Font::codePath): * platform/graphics/Font.h: * platform/graphics/FontFallbackList.h: * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): (WebCore::Font::getEmphasisMarkGlyphData): (WebCore::Font::drawGlyphBuffer): * platform/graphics/FontMetrics.h: * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::fill): * platform/graphics/SVGGlyph.h: (WebCore::SVGGlyph::SVGGlyph): (WebCore::SVGGlyph::operator==): * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::widthForGlyph): * platform/graphics/TextRun.h: * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): * platform/graphics/WidthIterator.h: * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::scaleEmToUnits): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::scaleEmToUnits): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::scaleEmToUnits): * rendering/svg/SVGTextMetrics.cpp: (WebCore::SVGTextMetrics::SVGTextMetrics): (WebCore::constructTextRun): (WebCore::SVGTextMetrics::measureCharacterRange): * rendering/svg/SVGTextMetrics.h: * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::convertEmUnitToPixel): (WebCore::isVerticalWritingMode): (WebCore::firstParentRendererForNonTextNode): (WebCore::referencingRenderObjectFromRun): (WebCore::SVGTextRunWalker::SVGTextRunWalker): (WebCore::SVGTextRunWalker::walk): (WebCore::floatWidthUsingSVGFontCallback): (WebCore::floatWidthMissingGlyphCallback): (WebCore::floatWidthOfSubStringUsingSVGFont): (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): (WebCore::drawTextUsingSVGFontCallback): (WebCore::drawTextMissingGlyphCallback): (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont): (WebCore::SVGTextRunRenderingContext::selectionRectForTextUsingSVGFont): (WebCore::SVGTextRunRenderingContext::offsetForPositionForTextUsingSVGFont): * rendering/svg/SVGTextRunRenderingContext.h: * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::glyphElement): * svg/SVGAltGlyphElement.h: * svg/SVGFontData.cpp: (WebCore::SVGFontData::initializeFontData): * svg/SVGFontData.h: * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::registerLigaturesInGlyphCache): (WebCore::SVGFontElement::ensureGlyphCache): * svg/SVGGlyphMap.h: (WebCore::SVGGlyphMap::addGlyphByUnicodeString): * svg/svgtags.in: 2011-06-20 Scott Byer <scottbyer@chromium.org> Reviewed by Adam Barth. Smooth scrolling for Chromium, initial patch. https://bugs.webkit.org/show_bug.cgi?id=61878 Add in a default scrolling animator in the platform directory, with a run time enable switch, to provide animated / smooth scrolling on platforms and for input devices where it's not provided by the platform, and to be easily configurable to what situatuations the animations are provided for. The smooth scrolling code is compiled out by default. Unit tests in chromium/ScrollAnimatorNoneTest.cpp * WebCore.gypi: * page/FrameView.cpp: (WebCore::FrameView::scrollAnimatorEnabled): * page/FrameView.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setEnableScrollAnimator): (WebCore::Settings::scrollAnimatorEnabled): * platform/ScrollAnimatorNone.cpp: Added. (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorNone::Parameters::Parameters): (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::attackCurve): (WebCore::ScrollAnimatorNone::PerAxisData::releaseCurve): (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt): (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData): (WebCore::ScrollAnimatorNone::PerAxisData::reset): (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::PerAxisData::animateScroll): (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::~ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::scroll): (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorNone::animationTimerFired): (WebCore::ScrollAnimatorNone::stopAnimationTimerIfNeeded): * platform/ScrollAnimatorNone.h: Added. * platform/ScrollableArea.h: (WebCore::ScrollableArea::scrollAnimatorEnabled): 2011-06-20 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Darin Adler. Remove some unsafe static_cast in rendering/ https://bugs.webkit.org/show_bug.cgi?id=63014 Mechanical refactoring, no test needed. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::getEmphasisMarkPosition): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::destroyScrollbar): * rendering/RenderRuby.cpp: (WebCore::rubyBeforeBlock): (WebCore::rubyAfterBlock): (WebCore::lastRubyRun): (WebCore::findRubyRunParent): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::rubyRun): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::removeChild): Use the proper conversion methods at the previous call-sites. 2011-06-20 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. Web archive resource loads are scheduled together with network loads https://bugs.webkit.org/show_bug.cgi?id=63024 <rdar://problem/9508564> If the resource being loaded is loaded from a web archive we don't need to schedule the load since it won't touch the network. * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::scheduleLoad): 2011-06-20 Pratik Solanki <psolanki@apple.com> Reviewed by David Kilzer. HTTP pipelining functions on mac should match windows https://bugs.webkit.org/show_bug.cgi?id=63012 Use a CFURLRequestRef instead of NSURLRequest for the HTTP pipelining functions. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): 2011-06-20 Ryosuke Niwa <rniwa@webkit.org> Fix bit flag collision. * editing/FrameSelection.h: 2011-06-20 Jer Noble <jer.noble@apple.com> Unreviewed build fix; Fix Leopard WebCore build. * platform/mac/WebVideoFullscreenHUDWindowController.mm: On Leopard, NSWindowDelegate is a category, not a protocol. 2011-06-20 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. Various editing functions take boolean userTriggered but should be replaced by an enum https://bugs.webkit.org/show_bug.cgi?id=62933 Replaced boolean userTriggered in many functions by new EUserTriggered enum. * WebCore.exp.in: FrameSelection::modify's signature changed. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange): Calls FrameSelection::moveTo. * editing/EditorCommand.cpp: (WebCore::executeMoveBackward): Calls FrameSelection::modify. (WebCore::executeMoveBackwardAndModifySelection): Ditto. (WebCore::executeMoveDown): Ditto. (WebCore::executeMoveDownAndModifySelection): Ditto. (WebCore::executeMoveForward): Ditto. (WebCore::executeMoveForwardAndModifySelection): Ditto. (WebCore::executeMoveLeft): Ditto. (WebCore::executeMoveLeftAndModifySelection): Ditto. (WebCore::executeMovePageDown): Ditto. (WebCore::executeMovePageDownAndModifySelection): Ditto. (WebCore::executeMovePageUp): Ditto. (WebCore::executeMovePageUpAndModifySelection): Ditto. (WebCore::executeMoveRight): Ditto. (WebCore::executeMoveRightAndModifySelection): Ditto. (WebCore::executeMoveToBeginningOfDocument): Ditto. (WebCore::executeMoveToBeginningOfDocumentAndModifySelection): Ditto. (WebCore::executeMoveToBeginningOfLine): Ditto. (WebCore::executeMoveToBeginningOfLineAndModifySelection): Ditto. (WebCore::executeMoveToBeginningOfParagraph): Ditto. (WebCore::executeMoveToBeginningOfParagraphAndModifySelection): Ditto. (WebCore::executeMoveToBeginningOfSentence): Ditto. (WebCore::executeMoveToBeginningOfSentenceAndModifySelection): Ditto. (WebCore::executeMoveToEndOfDocument): Ditto. (WebCore::executeMoveToEndOfDocumentAndModifySelection): Ditto. (WebCore::executeMoveToEndOfSentence): Ditto. (WebCore::executeMoveToEndOfSentenceAndModifySelection): Ditto. (WebCore::executeMoveToEndOfLine): Ditto. (WebCore::executeMoveToEndOfLineAndModifySelection): Ditto. (WebCore::executeMoveToEndOfParagraph): Ditto. (WebCore::executeMoveToEndOfParagraphAndModifySelection): Ditto. (WebCore::executeMoveParagraphBackwardAndModifySelection): Ditto. (WebCore::executeMoveParagraphForwardAndModifySelection): Ditto. (WebCore::executeMoveUp): Ditto. (WebCore::executeMoveUpAndModifySelection): Ditto. (WebCore::executeMoveWordBackward): Ditto. (WebCore::executeMoveWordBackwardAndModifySelection): Ditto. (WebCore::executeMoveWordForward): Ditto. (WebCore::executeMoveWordForwardAndModifySelection): Ditto. (WebCore::executeMoveWordLeft): Ditto. (WebCore::executeMoveWordLeftAndModifySelection): Ditto. (WebCore::executeMoveWordRight): Ditto. (WebCore::executeMoveWordRightAndModifySelection): Ditto. (WebCore::executeMoveToLeftEndOfLine): Ditto. (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Ditto. (WebCore::executeMoveToRightEndOfLine): Ditto. (WebCore::executeMoveToRightEndOfLineAndModifySelection): Ditto. * editing/FrameSelection.cpp: (WebCore::FrameSelection::moveTo): Takes EUserTriggered instead of a boolean. (WebCore::FrameSelection::setSelection): Ditto. (WebCore::FrameSelection::modify): Ditto. (WebCore::FrameSelection::setStart): Ditto. (WebCore::FrameSelection::setEnd): Ditto. (WebCore::FrameSelection::setBase): Ditto. (WebCore::FrameSelection::setExtent): Ditto. (WebCore::FrameSelection::selectAll): Ditto. (WebCore::FrameSelection::notifyRendererOfSelectionChange): Ditto. * editing/FrameSelection.h: Extracted EUserTriggered out of SetSelectionOption; SetSelectionOptions now takes the union of values of SetSelectionOption and EUserTriggered. (WebCore::FrameSelection::selectionOptionsToUserTriggered): Converts SetSelectionOptions to EUserTriggered. * page/DOMSelection.cpp: (WebCore::DOMSelection::modify): Calls FrameSelection::modify. * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): Ditto. (WebCore::handleKeyboardSelectionMovement): Ditto. 2011-06-20 Jer Noble <jer.noble@apple.com> Unreviewed build fix; Fix 32-bit build. Code recently moved from WebKit -> WebCore does not pass WebCore's more strict compiler warnings. Use CGFloat, and float constants wherever possible, and use narrowPrecisionToFloat() where not. * WebCore.xcodeproj/project.pbxproj: Add '-Wno-undef' flag for WebVideoFullScreenController.mm * platform/mac/WebVideoFullscreenController.mm: (constrainFrameToRatioOfFrame): Use CGFloat instead of Double. (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]): Use float constant. * platform/mac/WebVideoFullscreenHUDWindowController.mm: (-[WebVideoFullscreenHUDWindowController updateVolume]): Use float for volume. (-[WebVideoFullscreenHUDWindowController maxVolume]): Ditto. (-[WebVideoFullscreenHUDWindowController volumeChanged:]): Ditto. (-[WebVideoFullscreenHUDWindowController decrementVolume]): Ditto. (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto. (-[WebVideoFullscreenHUDWindowController volume]): Ditto. (-[WebVideoFullscreenHUDWindowController setVolume:]): Ditto. (timeToString): Narrow precision to float when converting to seconds. * platform/mac/WebWindowAnimation.mm: (scaledRect): Use CGFloat. (-[WebWindowScaleAnimation init]): Use float constant. (-[WebWindowScaleAnimation currentValue]): Ditto. (-[WebWindowScaleAnimation additionalDurationNeededToReachFinalFrame]): Ditto. (-[WebWindowFadeAnimation currentAlpha]): Ditto. 2011-06-20 Anders Carlsson <andersca@apple.com> Reviewed by Darin Adler. Disallow assigning into PassOwnArrayPtr, PassOwnPtr and PassRefPtr https://bugs.webkit.org/show_bug.cgi?id=62940 Make sure that we never assign into any already existing PassRefPtr. * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::create): Remove local PassRefPtr variable. * dom/Document.cpp: (WebCore::Document::setBody): Rename the PassRefPtr parameter and create a RefPtr variable. (WebCore::Document::setFocusedNode): Ditto. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyle): There's no reason to use a PassRefPtr here. Use a RefPtr, and don't initialize it since it's implicitly initialized. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::prune): Rename the PassRefPtr parameter and create a RefPtr variable. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::insertAsListItems): Ditto. * editing/htmlediting.cpp: (WebCore::createTabSpanElement): Ditto. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setStrokeStyle): (WebCore::CanvasRenderingContext2D::setFillStyle): Ditto. * platform/network/mac/FormDataStreamMac.mm: (WebCore::formFinalize): Ditto. (WebCore::setHTTPBody): Use an OwnPtr instead of explicitly deleting the form variable. 2011-06-20 Alex Milowski <alex@milowski.com> Reviewed by Darin Adler. This patch addresses handling wrapping of child properly to maintain the layout regardless of whether this is the initial build of the render tree or the result of DOM manipulation. https://bugs.webkit.org/show_bug.cgi?id=62098 Tests: mathml/presentation/msub-base-changed.xhtml mathml/presentation/msub-sub-changed.xhtml mathml/presentation/msubsup-base-changed.xhtml mathml/presentation/msubsup-sub-changed.xhtml mathml/presentation/msubsup-sup-changed.xhtml mathml/presentation/msup-base-changed.xhtml mathml/presentation/msup-sup-changed.xhtml * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::addChild): (WebCore::RenderMathMLSubSup::stretchToHeight): (WebCore::RenderMathMLSubSup::baselinePosition): 2011-06-01 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Move Full Screen Controllers into WebCore. Remove dependency on QTKit from wekitExitFullscreen() https://bugs.webkit.org/show_bug.cgi?id=61843 No new tests; the existing media full screen tests are sufficient. * WebCore.exp.in: Add new exports. * WebCore.xcodeproj/project.pbxproj: Add references to moved files. * platform/mac/WebCoreSystemInterface.h: Add new WCSI interfaces to WKSI functions. * platform/mac/WebCoreSystemInterface.mm: * platform/mac/WebVideoFullscreenController.h: Renamed from Source/WebKit/mac/WebView/WebVideoFullscreenController.h. * platform/mac/WebVideoFullscreenController.mm: Renamed from Source/WebKit/mac/WebView/WebVideoFullscreenController.mm. The following functions have had UNUSED_PARAM added: (-[WebVideoFullscreenController applicationDidResignActive:]): (-[WebVideoFullscreenController applicationDidChangeScreenParameters:]): (-[WebVideoFullscreenWindow mouseMoved:]): Source/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h. * platform/mac/WebVideoFullscreenHUDWindowController.mm: Renamed from Source/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm. The following functions have had UNUSED_PARAM added: (-[WebVideoFullscreenHUDWindow cancelOperation:]): (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]): (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): (-[WebVideoFullscreenHUDWindowController togglePlaying:]): (-[WebVideoFullscreenHUDWindowController mouseEntered:]): (-[WebVideoFullscreenHUDWindowController mouseExited:]): (-[WebVideoFullscreenHUDWindowController rewind:]): (-[WebVideoFullscreenHUDWindowController fastForward:]): (-[WebVideoFullscreenHUDWindowController windowDidExpose:]): (-[WebVideoFullscreenHUDWindowController windowDidClose:]): The following functions have had WKSI calls converted to WCSI ones: (createControlWithMediaUIControlType): (createTimeTextField): * platform/mac/WebWindowAnimation.h: Renamed from Source/WebKit/mac/WebView/WebWindowAnimation.h. * platform/mac/WebWindowAnimation.mm: Renamed from Source/WebKit/mac/WebView/WebWindowAnimation.m. (WebWindowAnimationDurationFromDuration): The following functions have had WKSI calls converted to WCSI ones: (-[WebWindowScaleAnimation setCurrentProgress:]): (-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]): 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. Remove LegacyDefaultOptionalArguments flag from IDL files where it would not change behavior https://bugs.webkit.org/show_bug.cgi?id=62904 After bug 62750, there are many IDL files that contain the new LegacyDefaultOptionalArguments flag that don't actually need it. Some examples: - the IDL file contains no functions - the IDL file contains only functions with no arguments - the IDL file contains functions, *all* of which use the [RequiresAllArguments=raise] extended attribute This patch simplifies such IDL files by removing the LegacyDefaultOptionalArguments flag and (if needed) removing the [RequiresAllArguments=raise] extended attribute from each function declaration. This patch does not make any required arguments optional or any optional arguments required. It changes no behavior at all. No new tests needed, all existing tests pass. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * css/CSSCharsetRule.idl: * css/CSSFontFaceRule.idl: * css/CSSImportRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleRule.idl: * css/CSSUnknownRule.idl: * css/CSSValue.idl: * css/Counter.idl: * css/RGBColor.idl: * css/Rect.idl: * css/StyleSheet.idl: * css/WebKitCSSKeyframeRule.idl: * css/WebKitCSSTransformValue.idl: * dom/Attr.idl: * dom/CDATASection.idl: * dom/ClientRect.idl: * dom/Comment.idl: * dom/DOMCoreException.idl: * dom/DOMStringMap.idl: * dom/DocumentType.idl: * dom/Entity.idl: * dom/EntityReference.idl: * dom/EventException.idl: * dom/GeneratedStream.idl: * dom/MessageChannel.idl: * dom/NodeIterator.idl: * dom/Notation.idl: * dom/ProcessingInstruction.idl: * dom/RangeException.idl: * dom/Touch.idl: * dom/TreeWalker.idl: * fileapi/DOMFileSystem.idl: * fileapi/DOMFileSystemSync.idl: * fileapi/DirectoryReaderSync.idl: * fileapi/File.idl: * fileapi/FileEntrySync.idl: * fileapi/FileError.idl: * fileapi/FileException.idl: * fileapi/Metadata.idl: * fileapi/OperationNotAllowedException.idl: * fileapi/WebKitFlags.idl: * html/DOMSettableTokenList.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBRElement.idl: * html/HTMLBaseElement.idl: * html/HTMLBaseFontElement.idl: * html/HTMLBlockquoteElement.idl: * html/HTMLBodyElement.idl: * html/HTMLDListElement.idl: * html/HTMLDataListElement.idl: * html/HTMLDetailsElement.idl: * html/HTMLDirectoryElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFontElement.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLHRElement.idl: * html/HTMLHeadElement.idl: * html/HTMLHeadingElement.idl: * html/HTMLHtmlElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLIsIndexElement.idl: * html/HTMLLIElement.idl: * html/HTMLLabelElement.idl: * html/HTMLLegendElement.idl: * html/HTMLLinkElement.idl: * html/HTMLMapElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMenuElement.idl: * html/HTMLMetaElement.idl: * html/HTMLMeterElement.idl: * html/HTMLModElement.idl: * html/HTMLOListElement.idl: * html/HTMLOptGroupElement.idl: * html/HTMLOptionElement.idl: * html/HTMLParagraphElement.idl: * html/HTMLParamElement.idl: * html/HTMLPreElement.idl: * html/HTMLProgressElement.idl: * html/HTMLQuoteElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSourceElement.idl: * html/HTMLStyleElement.idl: * html/HTMLTableCaptionElement.idl: * html/HTMLTableCellElement.idl: * html/HTMLTableColElement.idl: * html/HTMLTitleElement.idl: * html/HTMLTrackElement.idl: * html/HTMLUListElement.idl: * html/ImageData.idl: * html/MediaError.idl: * html/SpellcheckRange.idl: * html/TextMetrics.idl: * html/ValidityState.idl: * html/VoidCallback.idl: * html/canvas/ArrayBuffer.idl: * html/canvas/ArrayBufferView.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasPixelArray.idl: * html/canvas/CanvasRenderingContext.idl: * html/canvas/DataView.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESTextureFloat.idl: * html/canvas/WebGLActiveInfo.idl: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextAttributes.idl: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLShader.idl: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLUniformLocation.idl: * html/canvas/WebGLVertexArrayObjectOES.idl: * html/canvas/WebKitLoseContext.idl: * inspector/ScriptProfile.idl: * inspector/ScriptProfileNode.idl: * page/AbstractView.idl: * page/BarInfo.idl: * page/Coordinates.idl: * page/Geoposition.idl: * page/MemoryInfo.idl: * page/NavigatorUserMediaError.idl: * page/Performance.idl: * page/PerformanceNavigation.idl: * page/PerformanceTiming.idl: * page/PositionError.idl: * page/Screen.idl: * page/SpeechInputEvent.idl: * page/SpeechInputResult.idl: * page/WebKitAnimation.idl: * page/WebKitPoint.idl: * page/WorkerNavigator.idl: * plugins/DOMMimeType.idl: * storage/Database.idl: * storage/DatabaseSync.idl: * storage/IDBAny.idl: * storage/IDBCursorWithValue.idl: * storage/IDBDatabaseError.idl: * storage/IDBDatabaseException.idl: * storage/IDBKey.idl: * storage/IDBVersionChangeEvent.idl: * storage/IDBVersionChangeRequest.idl: * storage/SQLError.idl: * storage/SQLException.idl: * storage/SQLResultSet.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAngle.idl: * svg/SVGAnimateColorElement.idl: * svg/SVGAnimateElement.idl: * svg/SVGAnimateMotionElement.idl: * svg/SVGAnimateTransformElement.idl: * svg/SVGAnimatedAngle.idl: * svg/SVGAnimatedBoolean.idl: * svg/SVGAnimatedEnumeration.idl: * svg/SVGAnimatedInteger.idl: * svg/SVGAnimatedLength.idl: * svg/SVGAnimatedLengthList.idl: * svg/SVGAnimatedNumber.idl: * svg/SVGAnimatedNumberList.idl: * svg/SVGAnimatedPreserveAspectRatio.idl: * svg/SVGAnimatedRect.idl: * svg/SVGAnimatedString.idl: * svg/SVGAnimatedTransformList.idl: * svg/SVGCircleElement.idl: * svg/SVGClipPathElement.idl: * svg/SVGColor.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGCursorElement.idl: * svg/SVGDefsElement.idl: * svg/SVGDescElement.idl: * svg/SVGElement.idl: * svg/SVGEllipseElement.idl: * svg/SVGExternalResourcesRequired.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDistantLightElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEFuncAElement.idl: * svg/SVGFEFuncBElement.idl: * svg/SVGFEFuncGElement.idl: * svg/SVGFEFuncRElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMergeNodeElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFEPointLightElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFESpotLightElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGFontElement.idl: * svg/SVGFontFaceElement.idl: * svg/SVGFontFaceFormatElement.idl: * svg/SVGFontFaceNameElement.idl: * svg/SVGFontFaceSrcElement.idl: * svg/SVGFontFaceUriElement.idl: * svg/SVGForeignObjectElement.idl: * svg/SVGGElement.idl: * svg/SVGGlyphElement.idl: * svg/SVGGradientElement.idl: * svg/SVGHKernElement.idl: * svg/SVGImageElement.idl: * svg/SVGLangSpace.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGLineElement.idl: * svg/SVGLinearGradientElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMaskElement.idl: * svg/SVGMatrix.idl: * svg/SVGMetadataElement.idl: * svg/SVGMissingGlyphElement.idl: * svg/SVGNumber.idl: * svg/SVGNumberList.idl: * svg/SVGPaint.idl: * svg/SVGPathSeg.idl: * svg/SVGPathSegArcAbs.idl: * svg/SVGPathSegArcRel.idl: * svg/SVGPathSegClosePath.idl: * svg/SVGPathSegCurvetoCubicAbs.idl: * svg/SVGPathSegCurvetoCubicRel.idl: * svg/SVGPathSegCurvetoCubicSmoothAbs.idl: * svg/SVGPathSegCurvetoCubicSmoothRel.idl: * svg/SVGPathSegCurvetoQuadraticAbs.idl: * svg/SVGPathSegCurvetoQuadraticRel.idl: * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl: * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl: * svg/SVGPathSegLinetoAbs.idl: * svg/SVGPathSegLinetoHorizontalAbs.idl: * svg/SVGPathSegLinetoHorizontalRel.idl: * svg/SVGPathSegLinetoRel.idl: * svg/SVGPathSegLinetoVerticalAbs.idl: * svg/SVGPathSegLinetoVerticalRel.idl: * svg/SVGPathSegList.idl: * svg/SVGPathSegMovetoAbs.idl: * svg/SVGPathSegMovetoRel.idl: * svg/SVGPatternElement.idl: * svg/SVGPoint.idl: * svg/SVGPointList.idl: * svg/SVGPolygonElement.idl: * svg/SVGPolylineElement.idl: * svg/SVGPreserveAspectRatio.idl: * svg/SVGRadialGradientElement.idl: * svg/SVGRect.idl: * svg/SVGRectElement.idl: * svg/SVGRenderingIntent.idl: * svg/SVGScriptElement.idl: * svg/SVGSetElement.idl: * svg/SVGStopElement.idl: * svg/SVGStringList.idl: * svg/SVGSwitchElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTSpanElement.idl: * svg/SVGTextElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGTextPositioningElement.idl: * svg/SVGTitleElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * svg/SVGTransformable.idl: * svg/SVGURIReference.idl: * svg/SVGUnitTypes.idl: * svg/SVGUseElement.idl: * svg/SVGVKernElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * svg/SVGZoomAndPan.idl: * svg/SVGZoomEvent.idl: * testing/Internals.idl: * webaudio/AudioChannelMerger.idl: * webaudio/AudioChannelSplitter.idl: * webaudio/AudioDestinationNode.idl: * webaudio/AudioGain.idl: * webaudio/AudioGainNode.idl: * webaudio/AudioProcessingEvent.idl: * webaudio/AudioSourceNode.idl: * webaudio/BiquadFilterNode.idl: * webaudio/ConvolverNode.idl: * webaudio/DelayNode.idl: * webaudio/DynamicsCompressorNode.idl: * webaudio/HighPass2FilterNode.idl: * webaudio/JavaScriptAudioNode.idl: * webaudio/LowPass2FilterNode.idl: * webaudio/OfflineAudioCompletionEvent.idl: * workers/SharedWorker.idl: * workers/SharedWorkerContext.idl: * workers/WorkerLocation.idl: * xml/XMLHttpRequestException.idl: * xml/XMLHttpRequestProgressEvent.idl: * xml/XPathException.idl: 2011-06-20 Alex Milowski <alex@milowski.com> Reviewed by Darin Adler. A change to mark wrapping blocks created by the renderer as anonymous to fix the crash for: https://bugs.webkit.org/show_bug.cgi?id=57901 * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::addChild): (WebCore::RenderMathMLUnderOver::nonOperatorHeight): 2011-06-20 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. buildbots should run run-bindings-tests https://bugs.webkit.org/show_bug.cgi?id=63001 The test results were out of date, so I'm updating them. (This is exactly the problem that making the buildbots run them will solve.) * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithStringList): * bindings/scripts/test/V8/V8TestCallback.h: * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::GetRawTemplate): (WebCore::V8TestInterface::GetTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::GetRawTemplate): (WebCore::V8TestMediaQueryListListener::GetTemplate): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback): (WebCore::V8TestObj::GetRawTemplate): (WebCore::V8TestObj::GetTemplate): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate): (WebCore::V8TestSerializedScriptValueInterface::GetTemplate): 2011-06-20 Cary Clark <caryclark@google.com> Reviewed by Eric Seidel. Add Font interface to support Skia on Mac Chrome port https://bugs.webkit.org/show_bug.cgi?id=62889 No new tests. This combination (using Skia as the WebCore renderer on Chrome for Mac) is not yet enabled, so adding this file has no functional change. The corresponding changes to the gyp files exclude FontSkia for all current builds. * WebCore.gyp/WebCore.gyp: Exclude FontSkia for all non-mac builds. An existing rule excludes *Skia for mac builds. * WebCore.gypi: Add FontSkia to the list of files. * platform/graphics/skia/FontSkia.cpp: Added. (WebCore::Font::canReturnFallbackFontsForComplexText): (WebCore::Font::canExpandAroundIdeographsInComplexText): (WebCore::isCanvasMultiLayered): (WebCore::adjustTextRenderMode): (WebCore::setupPaint): (WebCore::Font::drawGlyphs): These functions are similar to their counterparts in platform/graphics/chromium/FontLinux.cpp. The differences are: The setupPaint uses CTFont instead of FreeType. The width/height font metrics have different accessors. Harfbuzz is not needed in the Mac port. 2011-06-20 Andras Becsi <abecsi@webkit.org> Reviewed by Csaba Osztrogonác. make-hash-tools.pl: Perl 5.14 compatibility https://bugs.webkit.org/show_bug.cgi?id=61890 No new tests needed. * make-hash-tools.pl: Use if/elsif instead of switch/case. 2011-06-20 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix, fix the codepaths run under each CPU type. * platform/image-decoders/wx/ImageDecoderWx.cpp: (WebCore::ImageFrame::asNewNativeImage): 2011-06-20 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Ojan Vafai. FrameSelection::modify should take verticalDisplacement instead of verticalDistance https://bugs.webkit.org/show_bug.cgi?id=62932 Added new VerticalDirection enum to the argument list of FrameSelection::modify that takes verticalDistance. Also changed the type of verticalDistance from int to unsigned int to accidentally pass a negative distance in the future. * editing/EditorCommand.cpp: (WebCore::verticalScrollDistance): Returns unsigned int instead of int. (WebCore::executeMovePageDown): Calls FrameSelection::modify. (WebCore::executeMovePageDownAndModifySelection): Ditto. (WebCore::executeMovePageUp): Ditto. (WebCore::executeMovePageUpAndModifySelection): Ditto. * editing/FrameSelection.cpp: (WebCore::FrameSelection::modify): Takes VerticalDirection as an argument. * editing/FrameSelection.h: 2011-06-20 Anders Carlsson <andersca@apple.com> Reviewed by Adam Barth. Don't use PassRefPtr variables in the V8 bindings generator https://bugs.webkit.org/show_bug.cgi?id=62947 * bindings/scripts/CodeGeneratorV8.pm: 2011-06-20 Adam Barth <abarth@webkit.org> Reviewed by Alexey Proskuryakov. ASSERT in WebCore::HTMLToken::appendToAttributeName when visiting www.nba.com https://bugs.webkit.org/show_bug.cgi?id=61774 This ASSERT triggers for the same underlying issue that causes Bug 62971: When we tokenize a </script> tag, we don't realize that we've already consumed the "</script>" from the input stream when we extracted the previous token. That causes the source tracker to be out-of-sync, triggering the incorrect view-source highlighting and this ASSERT. For now, let's just silence the assert while we work on Bug 62971. Test: fast/parser/attributes-on-close-script.html * html/parser/HTMLToken.h: (WebCore::HTMLToken::appendToAttributeName): (WebCore::AtomicHTMLToken::initializeAttributes): 2011-06-20 Andras Becsi <abecsi@webkit.org> Unreviewed build fix. [Qt][V8] Include missing UnusedParam.h. No new tests needed. * rendering/svg/SVGTextLayoutEngineSpacing.cpp: 2011-06-20 Andras Becsi <abecsi@webkit.org> Rubber-stamped by Csaba Osztrogonác. [Qt][V8] Remove non-existing headers from project file. No new tests needed. * WebCore.pro: Remove ChildThreadDOMData.h and MainThreadDOMData.h, since they have been already removed earlier from tree. 2011-06-20 Carlos Garcia Campos <cgarcia@igalia.com> Reviewed by Xan Lopez. [GTK] Split libWebCore into two libWebCore and libWebCoreGtk https://bugs.webkit.org/show_bug.cgi?id=60539 libWebCore contains all the webcore files except the ones actually using gtk while libWebCoreGtk contains only the files using gtk. It allows us to build a common WebCore lib and two different gtk WebCore libs depending on the gtk version. In WeKit2 gtk2 is not supported, but the plugin process needs to be built using gtk2 because plugins like flash still use gtk2. For WebKit2, we build the common libWebCore and two libWebCoreGtk, one using gtk3 and the other one using gtk2. * GNUmakefile.am: * GNUmakefile.list.am: 2011-06-20 Mike Reed <reed@google.com> Reviewed by Stephen White. [Skia] remove repeated calls to setColor, which ignored global-alpha (previous setupPaintFor... already set the color+alpha) https://bugs.webkit.org/show_bug.cgi?id=62988 No new tests. removing redundant calls * platform/graphics/chromium/FontLinux.cpp: (WebCore::Font::drawGlyphs): 2011-06-19 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. [GTK] ASSERTION FAILED: it != gFontDataCache->end() in FontCache.cpp:318 https://bugs.webkit.org/show_bug.cgi?id=62942 Fix the == operator overload of the FreeType FontPlatformData to properly make the distinction between the hash table deleted value and the hash table empty value. No new tests. This is covered by existing tests, which should no longer hit assertions. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::operator==): Reorder the logic for determining if two FontPlatformData instances are equal. Do a pointer comparison on the Fontconfig patterns, instead of using FcPatternEqual. If the two Fontconfig patterns have different pointers they were created at different times and the overload should return false. 2011-06-20 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: It would be useful to be able to pause on element's style change. https://bugs.webkit.org/show_bug.cgi?id=62982 Current workaround is to use mutation events but it's awkward and doesn't compare _usability-wise_ to what could be implemented as native support in web inspector. In complex applications, being able to see which code causes element to change its style is indispensable. * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl): 2011-06-19 Mads Ager <ager@chromium.org> Reviewed by Adam Barth. [V8] Fix WebGL bindings for subarrays https://bugs.webkit.org/show_bug.cgi?id=62864 Mark WebGL subarrays as independent of other DOM objects in the V8 bindings. This allows us to clean them up independently which greatly improves performance. * bindings/v8/V8Proxy.h: (WebCore::toV8Independent): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::constructWebGLArray): 2011-06-20 Yuta Kitamura <yutak@chromium.org> Unreviewed build fix for Chromium Clang builders. * platform/graphics/FontFallbackList.h: Declare SVGTextRunRenderingContext as class, not struct. 2011-06-20 MORITA Hajime <morrita@google.com> Unreviewed GTK build fix. This change touched the file to make the build happen. * dom/EventTarget.cpp: 2011-06-20 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Rob Buis. Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts https://bugs.webkit.org/show_bug.cgi?id=59085 font substitution doesn't work for HTML text using SVG fonts https://bugs.webkit.org/show_bug.cgi?id=17608 Selection rects are wrong for text with SVG fonts https://bugs.webkit.org/show_bug.cgi?id=25460 With @font-face, SVG fonts only work as primary, non-segmented https://bugs.webkit.org/show_bug.cgi?id=32227 When using SVG fonts with @font-face word-spacing and text-align: justify are not being honored https://bugs.webkit.org/show_bug.cgi?id=34236 SVG @font-face breaks text-overflow: ellipsis https://bugs.webkit.org/show_bug.cgi?id=36840 REGRESSION: SVG Font selection problems https://bugs.webkit.org/show_bug.cgi?id=41934 Tests: svg/custom/svg-fonts-fallback.xhtml (for bug 17608, extended the original test from Mark Ambachtsheer) svg/custom/svg-fonts-segmented.xhtml (for bug 32227) svg/custom/svg-fonts-word-spacing.html (for bug 34236, from Michael Lewis) svg/text/select-text-svgfont.html (for bug 25460/41934, from Emil Schutte) svg/text/text-overflow-ellipsis-svgfont.html (for 36840, from Emil Schutte) Rewrite the SVG Fonts support to fully integrate within the GlyphPage concept and the "simple" code path used to render platform fonts. That means the special logic for measuring text using SVG Fonts, calculating offset for positions, computing selection rects etc. is all gone now. There's no difference anymore between using a native font or a SVG Font, in terms of these operations. This makes text selection using SVG Fonts possible again. * features.pri: Temporarily turn of SVG Fonts for Qt, as long as QRawFont support is not available and the fast path is disabled. * page/DOMWindow.idl: Touched file to force Qt regenerating the bindings. * platform/graphics/Font.cpp: Remove SVG Font special cases, the simple code path now handles SVG Fonts as well. (WebCore::Font::drawText): (WebCore::Font::drawEmphasisMarks): (WebCore::Font::width): (WebCore::Font::selectionRectForText): (WebCore::Font::offsetForPosition): (WebCore::Font::codePath): * platform/graphics/Font.h: Pass TextRun to drawGlyphBuffer/drawEmphasisMarks. Add new glyphDataAndPageForCharacter() method which returns a pair std::pair<GlyphData, GlyphPage*>, so we know the associated GlyphPage for a certain GlyphData object, which is needed to properly handle font fallback glyph matching for SVG Fonts.. (WebCore::Font::fontList): Add FontFallbackList accessor. * platform/graphics/FontFallbackList.h: Add getters/setters for glyphPageZero -- SVG Fonts support needs access to these objects from SVGTextRunRenderingContext. (WebCore::FontFallbackList::glyphPageZero): (WebCore::FontFallbackList::glyphPages): (WebCore::FontFallbackList::setGlyphPageZero): (WebCore::FontFallbackList::setGlyphPages): * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): Move implementation to glyphDataAndPageForCharacter(), and use that method from here. (WebCore::Font::glyphDataAndPageForCharacter): Does the same as before, just returns an additional GlyphPage* pointer. (WebCore::Font::getEmphasisMarkGlyphData): Remove SVG Fonts special case. (WebCore::Font::drawGlyphBuffer): Ditto. * platform/graphics/FontMetrics.h: (WebCore::scaleEmToUnits): Refactored scaleEmToUnits free function from SimpleFontDataMac/CGWin to share with SVGFontData/SVGTextRunRenderingContext. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::fill): Stop skipping SVG Fonts, they now also fill the GlyphPage using the glyphs defined in the SVG Font. * platform/graphics/SVGGlyph.h: s/isValid/isPartOfLigature/. Its usage has been changed. (WebCore::SVGGlyph::SVGGlyph): (WebCore::SVGGlyph::operator==): * platform/graphics/SimpleFontData.cpp: Change font size to be a float, not an int. (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: Add new pure virtual methods to the AdditionalFontData interface, to be implemented in SVGFontData. (WebCore::SimpleFontData::widthForGlyph): Call widthForSVGGlyph, if we encounter a SVG glyph. * platform/graphics/TextRun.h: * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::glyphDataForCharacter): (WebCore::WidthIterator::advance): * platform/graphics/WidthIterator.h: Store several new members needed for SVG Fonts support (last processed glyph name used for kerning pair lookup) and a map mapping each character of a text to its arabic-form (if needed, to perform SVG glyph selection for Arabic text). (WebCore::WidthIterator::run): (WebCore::WidthIterator::runWidthSoFar): (WebCore::WidthIterator::lastGlyphName): (WebCore::WidthIterator::setLastGlyphName): (WebCore::WidthIterator::arabicForms): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Use new scaleEmToUnits free function from FontMetrics.h. * platform/graphics/mac/SimpleFontDataMac.mm: Ditto. * platform/graphics/win/SimpleFontDataCGWin.cpp: Ditto. * rendering/svg/SVGTextMetrics.cpp: (WebCore::SVGTextMetrics::SVGTextMetrics): (WebCore::constructTextRun): (WebCore::SVGTextMetrics::measureCharacterRange): * rendering/svg/SVGTextMetrics.h: * rendering/svg/SVGTextRunRenderingContext.cpp: Remove drawTextUsingSVGFont/floatWidthUsingSVGFont/selectionRectForTextUsingSVGFont/offsetForPositionForTextUsingSVGFont. (WebCore::firstParentRendererForNonTextNode): Don't assert node() exists, doesn't hold true for generated render objects. (WebCore::renderObjectFromRun): Renamed from referencingRenderObjectFromRun. (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Remove extra "extraCharsAvailable" parameter, now solves via TextRun::charactersLength(). (WebCore::calculateEmUnitToPixelScaleFactor): Add helper method. (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Main drawing method, this actually creates/renders Paths. (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Part 1/2 of SVG Glyph selection code. * rendering/svg/SVGTextRunRenderingContext.h: * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElement): * svg/SVGAltGlyphElement.h: * svg/SVGFontData.cpp: (WebCore::calculateEmUnitToPixelScaleFactor): Add helper method. (WebCore::SVGFontData::initializeFontData): Changed font size from int to float. (WebCore::SVGFontData::widthForSVGGlyph): Lookup a SVGGlyph from a Glyph using the glyph table in SVGFontElement and calculate its width. (WebCore::SVGFontData::applySVGGlyphSelection): Part 2/2 of SVG Glyph selection code. (WebCore::SVGFontData::fillSVGGlyphPage): Fill GlyphPage using glyphs defined in the SVG Font. * svg/SVGFontData.h: * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Enable ligature registration for the use within GlyphPage. (WebCore::SVGFontElement::ensureGlyphCache): * svg/SVGGlyphMap.h: (WebCore::SVGGlyphMap::addGlyphByUnicodeString): Remove setting isValid, it's not needed anymore and gone. * svg/svgtags.in: Surround vkern in ENABLE_SVG_FONTS block. 2011-06-19 MORITA Hajime <morrita@google.com> Reviewed by Dimitri Glazkov. The internals object should have createShadowContentElement() https://bugs.webkit.org/show_bug.cgi?id=62432 This change: - added Internals::createShadowContentElement(), which creates, ShadowContentElement instance which includes all host children, - added Internals::elementRenderTreeAsText() to help content layout testing, and - Unabstracted ShadowContentElement by giving a default shouldInclude() implementation. Test: fast/dom/shadow/create-content-element.html * WebCore.exp.in: * dom/ShadowContentElement.cpp: (WebCore::ShadowContentElement::create): Added. (WebCore::ShadowContentElement::ShadowContentElement): (WebCore::ShadowContentElement::~ShadowContentElement): (WebCore::ShadowContentElement::shouldInclude): Gave a default implementation which always returns true. * dom/ShadowContentElement.h: * html/HTMLSummaryElement.cpp: (WebCore::SummaryContentElement::SummaryContentElement): * rendering/RenderTreeAsText.cpp: (WebCore::externalRepresentation): Factored out for supportin per-element render tree dump. * rendering/RenderTreeAsText.h: * testing/Internals.cpp: (WebCore::Internals::createShadowContentElement): Added. (WebCore::Internals::elementRenderTreeAsText): dded. * testing/Internals.h: * testing/Internals.idl: 2011-06-19 Keishi Hattori <keishi@webkit.org> Reviewed by Kent Tamura. Clicking indeterminate checkbox should flip checkedness state https://bugs.webkit.org/show_bug.cgi?id=62262 Test: fast/forms/checkbox-click-indeterminate.html * html/CheckboxInputType.cpp: (WebCore::CheckboxInputType::willDispatchClick): Changed to flip checked flag when indeterminate. 2011-06-19 Adam Bergkvist <adam.bergkvist@ericsson.com> Reviewed by Martin Robinson. [GTK] Enable Media Stream feature and make it default on https://bugs.webkit.org/show_bug.cgi?id=60394 * GNUmakefile.am: 2011-06-19 Una Sabovic <una.sabovic@palm.com> Reviewed by Darin Adler. Optimization: avoid call to clearRect() when bgColor is valid when painting the root background in RenderBoxModelObject::paintFillLayerExtended https://bugs.webkit.org/show_bug.cgi?id=62908 When root layers base color is fully transparent backgroundRect was cleared before bgColor is applied. Instead of clearing the rect we apply CompositeCopy operation when painting the background color. No new tests. This is an optimization, it doesn't change any existing functionality. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::fillRect): * platform/graphics/GraphicsContext.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): 2011-06-19 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimatorFactory does not support SVGNumber https://bugs.webkit.org/show_bug.cgi?id=62938 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGNumber. With the new animator for the With the new animator for SVGNumber we also support the scientific notation, and everything else that's supported by the SVGNumber parsing, removing the SVGAnimate* specific number parsing functionality. Moving the content of SVGAnimatedType header into its own cpp. Changed behavior of parseNumberFromString(). It checks if the String simply consits of a number now. parseNumberFromString() is using genericParseNumber() for parsing numbers. But this method just stops at the first char that does not belong to a number and returns true. I added a check if the current char pointer is at the last char of the String and return false if not. Tests: svg/animations/svgnumber-animation-1.html svg/animations/svgnumber-animation-2.html svg/animations/svgnumber-animation-3.html * CMakeLists.txt: Added new files to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Use SVGAnimatedNumberAnimator for animations of SVGNumbers. (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimateElement.h: Remove floats for value storage. This is done by SVGAnimatedTypes now. * svg/SVGAnimatedNumber.cpp: Added. Animator for SVGNumbers. (WebCore::SVGAnimatedNumberAnimator::SVGAnimatedNumberAnimator): (WebCore::SVGAnimatedNumberAnimator::constructFromString): (WebCore::SVGAnimatedNumberAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedNumberAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedNumberAnimator::calculateDistance): * svg/SVGAnimatedNumber.h: (WebCore::SVGAnimatedNumberAnimator::~SVGAnimatedNumberAnimator): * svg/SVGAnimatedType.cpp: Added. Moved content from header to cpp. (WebCore::SVGAnimatedType::SVGAnimatedType): (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createAngle): (WebCore::SVGAnimatedType::createLength): (WebCore::SVGAnimatedType::createNumber): (WebCore::SVGAnimatedType::angle): (WebCore::SVGAnimatedType::length): (WebCore::SVGAnimatedType::number): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): * svg/SVGAnimatedType.h: Removed method create(). Allways call type specific create funtcions. * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGParserUtilities.cpp: (WebCore::parseNumberFromString): Check if String simply consits of a number. Return false otherwise. 2011-06-18 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Adler. Separate concerns of loading file icons and choosing files. https://bugs.webkit.org/show_bug.cgi?id=62931 Loading an icon and choosing files have similar async nature, but completely different lifetimes: FileChooser should only exist when we are actually attempting to choose a file, not anytime we need to render an input with a proper icon. This patch introduces FileIconLoader, a separate abstraction for loading an icon, and removes any notion of an icon from the FileChooser. Also, the loaded icon is now stored on the RenderFileUploadControl, which better matches its purpose. Refactoring, covered by existing tests. * CMakeLists.txt: Added FileIconLoader to build system. * GNUmakefile.list.am: Ditto. * WebCore.exp.in: Updated. * WebCore.gypi: Added FileIconLoader to build system. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * loader/EmptyClients.h: Updated. (WebCore::EmptyChromeClient::loadIconForFiles): Renamed function to better reflect what it does. * page/Chrome.cpp: (WebCore::Chrome::loadIconForFiles): Ditto. * page/Chrome.h: Ditto. * page/ChromeClient.h: Ditto. * platform/FileChooser.cpp: (WebCore::FileChooser::FileChooser): Removed now-unnecessary bool. (WebCore::FileChooser::create): Removed the tangled web. (WebCore::FileChooser::clear): Removed icon-related code. (WebCore::FileChooser::chooseFiles): Ditto. * platform/FileChooser.h: * platform/FileIconLoader.cpp: Copied from Source/WebCore/platform/FileChooser.cpp. (WebCore::FileIconLoaderClient::~FileIconLoaderClient): Added. (WebCore::FileIconLoader::create): Added. (WebCore::FileIconLoader::disconnectClient): Added. (WebCore::FileIconLoader::notifyFinished): Added. (WebCore::FileIconLoader::FileIconLoader): Added. * platform/FileIconLoader.h: Copied from Source/WebCore/platform/FileChooser.cpp. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::RenderFileUploadControl): Added new member initializations. (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Added FileIconLoader disconnect.s (WebCore::RenderFileUploadControl::requestIcon): Added a helper. (WebCore::RenderFileUploadControl::valueChanged): Changed to request an icon load. (WebCore::RenderFileUploadControl::updateRendering): Added implementation of FileIconLoaderClient func. (WebCore::RenderFileUploadControl::updateFromElement): Added clearing of icon. (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use new member directly. (WebCore::RenderFileUploadControl::paintObject): Ditto. (WebCore::RenderFileUploadControl::fileTextValue): Ditto. * rendering/RenderFileUploadControl.h: Updated decls. 2011-06-19 Michael Saboff <msaboff@apple.com> Reviewed by Darin Adler. Add notify handler to trigger MemoryPressureHandler in all builds https://bugs.webkit.org/show_bug.cgi?id=62679 Removed SIGUSR2 trigger and added a notify trigger for the MemoryPressureHandler. The notify trigger is enabled for all builds. No test added as only added new memory pressure trigger. * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::install): 2011-06-19 Robert Hogan <robert@webkit.org> Reviewed by Alexey Proskuryakov. [Qt] Qt Counterpart for http://trac.webkit.org/changeset/42078 https://bugs.webkit.org/show_bug.cgi?id=62514 * platform/network/qt/ResourceHandleQt.cpp: (WebCore::WebCoreSynchronousLoader::willSendRequest): 2011-06-18 Yufeng Shen <miletus@chromium.org> Reviewed by Darin Fisher. Adding "force" filed to Touch Event https://bugs.webkit.org/show_bug.cgi?id=62766 * dom/Document.cpp: (WebCore::Document::createTouch): * dom/Document.h: * dom/Document.idl: * dom/Touch.cpp: (WebCore::Touch::Touch): * dom/Touch.h: (WebCore::Touch::create): (WebCore::Touch::webkitForce): * dom/Touch.idl: * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): * platform/PlatformTouchPoint.h: (WebCore::PlatformTouchPoint::force): 2011-06-18 Jer Noble <jer.noble@apple.com> Reviewed by Darin Adler. Rename Document::setContainsFullScreenElementRecursively https://bugs.webkit.org/show_bug.cgi?id=62528 No new tests; no net change in functionality, so this is covered by existing tests. The name of setContainsFullScreenElementRecursively is confusing, since it doesn't actually use recursion, and it walks the ancestor tree instead of the descendent tree (as recursive might otherwise imply). Move the function into Element, turn it into a member function, and change the behavior so that the function operates on the called object's parents (as opposed to the object itself). * dom/Element.h: * dom/Element.cpp: (WebCore::parentCrossingFrameBoundaries): Added. (WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries): Renamed and moved from Document. (WebCore::Element::willRemove): Use the newly renamed function. (WebCore::Element::insertedIntoTree): Ditto. * dom/Document.h: * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): Ditto. (WebCore::Document::webkitWillExitFullScreenForElement): Ditto. (WebCore::Document::fullScreenElementRemoved): Ditto. 2011-06-18 Alice Boxhall <aboxhall@chromium.org> Reviewed by Chris Fleizach. Accessibility description for an element should make use of aria-labelledby. https://bugs.webkit.org/show_bug.cgi?id=61995 Tests: accessibility/aria-labelledby-overrides-aria-label.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): Don't return value from aria-labelledby. (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): Return value from aria-labelledby in preference to value from aria-label. 2011-06-18 Christoph Mende <mende.christoph@gmail.com> Reviewed by Darin Adler. compilation fails with libpng-1.5 https://bugs.webkit.org/show_bug.cgi?id=61738 * platform/image-encoders/skia/PNGImageEncoder.cpp: (WebCore::writeOutput): Use getter function instead of direct access 2011-06-18 Jeremy Moskovich <jeremy@chromium.org> Reviewed by Eric Seidel. Set text-align:-webkit-match-parent for li elements in the default style sheet. https://bugs.webkit.org/show_bug.cgi?id=57232 Test: fast/css/list-item-text-align.html * css/html.css: (li): Specify text-align:-webkit-match-parent . 2011-06-18 Holger Hans Peter Freyther <holger@moiji-mobile.com> Reviewed by Brent Fulgham. [misc] JSC/wtf/text/*.h should not be included via #include "" https://bugs.webkit.org/show_bug.cgi?id=60836 Adam Barth pointed out that one should not include files from JavaScriptCore/wtf/text using #include "File.h". This change is addressing it. * CMakeListsEfl.txt: Remove JavaScriptCore/wtf/text. * CMakeListsWinCE.txt: Remove JavaScriptCore/wtf/text. * platform/graphics/freetype/FontCacheFreeType.cpp: Change CString.h include. * platform/graphics/pango/FontCachePango.cpp: Change CString.h include. * platform/graphics/wx/FontPlatformData.h: Change StringImpl.h include. * platform/network/soup/ResourceHandleSoup.cpp: Change CString.h include. * platform/network/soup/SocketStreamHandleSoup.cpp: Change CString.h include. 2011-06-18 Sam Weinig <sam@webkit.org> Reviewed by Darin Adler. REGRESSION (r63854-63958): placeholder not shown for number inputs https://bugs.webkit.org/show_bug.cgi?id=61095 Refactor HTMLInputElement supportsPlaceholder support to delegate to the InputType. Make BaseTextInputType and NumberInputType return true, matching the current HTML5 spec. * html/BaseTextInputType.cpp: (WebCore::BaseTextInputType::supportsPlaceholder): * html/BaseTextInputType.h: Add override implementation of supportsPlaceholder that returns true. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::supportsPlaceholder): Delegate to the InputType. * html/InputType.cpp: (WebCore::InputType::supportsPlaceholder): * html/InputType.h: Add base implementation of supportsPlaceholder that returns false. * html/NumberInputType.cpp: (WebCore::NumberInputType::supportsPlaceholder): * html/NumberInputType.h: Add override implementation of supportsPlaceholder that returns true. 2011-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89154. http://trac.webkit.org/changeset/89154 https://bugs.webkit.org/show_bug.cgi?id=62926 It broke debug build on Qt (Requested by Ossy_weekend on #webkit). * platform/network/qt/ResourceHandleQt.cpp: 2011-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89189. http://trac.webkit.org/changeset/89189 https://bugs.webkit.org/show_bug.cgi?id=62925 It broke Qt build (Requested by Ossy_weekend on #webkit). * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * css/CSSCharsetRule.idl: * css/CSSFontFaceRule.idl: * css/CSSImportRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleRule.idl: * css/CSSUnknownRule.idl: * css/CSSValue.idl: * css/Counter.idl: * css/RGBColor.idl: * css/Rect.idl: * css/StyleSheet.idl: * css/WebKitCSSKeyframeRule.idl: * css/WebKitCSSTransformValue.idl: * dom/Attr.idl: * dom/CDATASection.idl: * dom/ClientRect.idl: * dom/Comment.idl: * dom/DOMCoreException.idl: * dom/DOMStringMap.idl: * dom/DocumentType.idl: * dom/Entity.idl: * dom/EntityReference.idl: * dom/EventException.idl: * dom/GeneratedStream.idl: * dom/MessageChannel.idl: * dom/NodeIterator.idl: * dom/Notation.idl: * dom/ProcessingInstruction.idl: * dom/RangeException.idl: * dom/Touch.idl: * dom/TreeWalker.idl: * fileapi/DOMFileSystem.idl: * fileapi/DOMFileSystemSync.idl: * fileapi/DirectoryReaderSync.idl: * fileapi/File.idl: * fileapi/FileEntrySync.idl: * fileapi/FileError.idl: * fileapi/FileException.idl: * fileapi/Metadata.idl: * fileapi/OperationNotAllowedException.idl: * fileapi/WebKitFlags.idl: * html/DOMSettableTokenList.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBRElement.idl: * html/HTMLBaseElement.idl: * html/HTMLBaseFontElement.idl: * html/HTMLBlockquoteElement.idl: * html/HTMLBodyElement.idl: * html/HTMLDListElement.idl: * html/HTMLDataListElement.idl: * html/HTMLDetailsElement.idl: * html/HTMLDirectoryElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFontElement.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLHRElement.idl: * html/HTMLHeadElement.idl: * html/HTMLHeadingElement.idl: * html/HTMLHtmlElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLIsIndexElement.idl: * html/HTMLLIElement.idl: * html/HTMLLabelElement.idl: * html/HTMLLegendElement.idl: * html/HTMLLinkElement.idl: * html/HTMLMapElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMenuElement.idl: * html/HTMLMetaElement.idl: * html/HTMLMeterElement.idl: * html/HTMLModElement.idl: * html/HTMLOListElement.idl: * html/HTMLOptGroupElement.idl: * html/HTMLOptionElement.idl: * html/HTMLParagraphElement.idl: * html/HTMLParamElement.idl: * html/HTMLPreElement.idl: * html/HTMLProgressElement.idl: * html/HTMLQuoteElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSourceElement.idl: * html/HTMLStyleElement.idl: * html/HTMLTableCaptionElement.idl: * html/HTMLTableCellElement.idl: * html/HTMLTableColElement.idl: * html/HTMLTitleElement.idl: * html/HTMLTrackElement.idl: * html/HTMLUListElement.idl: * html/ImageData.idl: * html/MediaError.idl: * html/SpellcheckRange.idl: * html/TextMetrics.idl: * html/ValidityState.idl: * html/VoidCallback.idl: * html/canvas/ArrayBuffer.idl: * html/canvas/ArrayBufferView.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasPixelArray.idl: * html/canvas/CanvasRenderingContext.idl: * html/canvas/DataView.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESTextureFloat.idl: * html/canvas/WebGLActiveInfo.idl: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextAttributes.idl: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLShader.idl: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLUniformLocation.idl: * html/canvas/WebGLVertexArrayObjectOES.idl: * html/canvas/WebKitLoseContext.idl: * inspector/ScriptProfile.idl: * inspector/ScriptProfileNode.idl: * page/AbstractView.idl: * page/BarInfo.idl: * page/Coordinates.idl: * page/Geoposition.idl: * page/MemoryInfo.idl: * page/NavigatorUserMediaError.idl: * page/Performance.idl: * page/PerformanceNavigation.idl: * page/PerformanceTiming.idl: * page/PositionError.idl: * page/Screen.idl: * page/SpeechInputEvent.idl: * page/SpeechInputResult.idl: * page/WebKitAnimation.idl: * page/WebKitPoint.idl: * page/WorkerNavigator.idl: * plugins/DOMMimeType.idl: * storage/Database.idl: * storage/DatabaseSync.idl: * storage/IDBAny.idl: * storage/IDBCursorWithValue.idl: * storage/IDBDatabaseError.idl: * storage/IDBDatabaseException.idl: * storage/IDBKey.idl: * storage/IDBVersionChangeEvent.idl: * storage/IDBVersionChangeRequest.idl: * storage/SQLError.idl: * storage/SQLException.idl: * storage/SQLResultSet.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAngle.idl: * svg/SVGAnimateColorElement.idl: * svg/SVGAnimateElement.idl: * svg/SVGAnimateMotionElement.idl: * svg/SVGAnimateTransformElement.idl: * svg/SVGAnimatedAngle.idl: * svg/SVGAnimatedBoolean.idl: * svg/SVGAnimatedEnumeration.idl: * svg/SVGAnimatedInteger.idl: * svg/SVGAnimatedLength.idl: * svg/SVGAnimatedLengthList.idl: * svg/SVGAnimatedNumber.idl: * svg/SVGAnimatedNumberList.idl: * svg/SVGAnimatedPreserveAspectRatio.idl: * svg/SVGAnimatedRect.idl: * svg/SVGAnimatedString.idl: * svg/SVGAnimatedTransformList.idl: * svg/SVGCircleElement.idl: * svg/SVGClipPathElement.idl: * svg/SVGColor.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGCursorElement.idl: * svg/SVGDefsElement.idl: * svg/SVGDescElement.idl: * svg/SVGElement.idl: * svg/SVGEllipseElement.idl: * svg/SVGExternalResourcesRequired.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDistantLightElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEFuncAElement.idl: * svg/SVGFEFuncBElement.idl: * svg/SVGFEFuncGElement.idl: * svg/SVGFEFuncRElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMergeNodeElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFEPointLightElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFESpotLightElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGFontElement.idl: * svg/SVGFontFaceElement.idl: * svg/SVGFontFaceFormatElement.idl: * svg/SVGFontFaceNameElement.idl: * svg/SVGFontFaceSrcElement.idl: * svg/SVGFontFaceUriElement.idl: * svg/SVGForeignObjectElement.idl: * svg/SVGGElement.idl: * svg/SVGGlyphElement.idl: * svg/SVGGradientElement.idl: * svg/SVGHKernElement.idl: * svg/SVGImageElement.idl: * svg/SVGLangSpace.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGLineElement.idl: * svg/SVGLinearGradientElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMaskElement.idl: * svg/SVGMatrix.idl: * svg/SVGMetadataElement.idl: * svg/SVGMissingGlyphElement.idl: * svg/SVGNumber.idl: * svg/SVGNumberList.idl: * svg/SVGPaint.idl: * svg/SVGPathSeg.idl: * svg/SVGPathSegArcAbs.idl: * svg/SVGPathSegArcRel.idl: * svg/SVGPathSegClosePath.idl: * svg/SVGPathSegCurvetoCubicAbs.idl: * svg/SVGPathSegCurvetoCubicRel.idl: * svg/SVGPathSegCurvetoCubicSmoothAbs.idl: * svg/SVGPathSegCurvetoCubicSmoothRel.idl: * svg/SVGPathSegCurvetoQuadraticAbs.idl: * svg/SVGPathSegCurvetoQuadraticRel.idl: * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl: * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl: * svg/SVGPathSegLinetoAbs.idl: * svg/SVGPathSegLinetoHorizontalAbs.idl: * svg/SVGPathSegLinetoHorizontalRel.idl: * svg/SVGPathSegLinetoRel.idl: * svg/SVGPathSegLinetoVerticalAbs.idl: * svg/SVGPathSegLinetoVerticalRel.idl: * svg/SVGPathSegList.idl: * svg/SVGPathSegMovetoAbs.idl: * svg/SVGPathSegMovetoRel.idl: * svg/SVGPatternElement.idl: * svg/SVGPoint.idl: * svg/SVGPointList.idl: * svg/SVGPolygonElement.idl: * svg/SVGPolylineElement.idl: * svg/SVGPreserveAspectRatio.idl: * svg/SVGRadialGradientElement.idl: * svg/SVGRect.idl: * svg/SVGRectElement.idl: * svg/SVGRenderingIntent.idl: * svg/SVGScriptElement.idl: * svg/SVGSetElement.idl: * svg/SVGStopElement.idl: * svg/SVGStringList.idl: * svg/SVGSwitchElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTSpanElement.idl: * svg/SVGTextElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGTextPositioningElement.idl: * svg/SVGTitleElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * svg/SVGTransformable.idl: * svg/SVGURIReference.idl: * svg/SVGUnitTypes.idl: * svg/SVGUseElement.idl: * svg/SVGVKernElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * svg/SVGZoomAndPan.idl: * svg/SVGZoomEvent.idl: * testing/Internals.idl: * webaudio/AudioChannelMerger.idl: * webaudio/AudioChannelSplitter.idl: * webaudio/AudioDestinationNode.idl: * webaudio/AudioGain.idl: * webaudio/AudioGainNode.idl: * webaudio/AudioProcessingEvent.idl: * webaudio/AudioSourceNode.idl: * webaudio/BiquadFilterNode.idl: * webaudio/ConvolverNode.idl: * webaudio/DelayNode.idl: * webaudio/DynamicsCompressorNode.idl: * webaudio/HighPass2FilterNode.idl: * webaudio/JavaScriptAudioNode.idl: * webaudio/LowPass2FilterNode.idl: * webaudio/OfflineAudioCompletionEvent.idl: * workers/SharedWorker.idl: * workers/SharedWorkerContext.idl: * workers/WorkerLocation.idl: * xml/XMLHttpRequestException.idl: * xml/XMLHttpRequestProgressEvent.idl: * xml/XPathException.idl: 2011-06-17 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Darin Adler. Remove LegacyDefaultOptionalArguments flag from IDL files where it would not change behavior https://bugs.webkit.org/show_bug.cgi?id=62904 After bug 62750, there are many IDL files that contain the new LegacyDefaultOptionalArguments flag that don't actually need it. Some examples: - the IDL file contains no functions - the IDL file contains only functions with no arguments - the IDL file contains functions, *all* of which use the [RequiresAllArguments=raise] extended attribute This patch simplifies such IDL files by removing the LegacyDefaultOptionalArguments flag and (if needed) removing the [RequiresAllArguments=raise] extended attribute from each function declaration. This patch does not make any required arguments optional or any optional arguments required. It changes no behavior at all. No new tests needed, all existing tests pass. * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * css/CSSCharsetRule.idl: * css/CSSFontFaceRule.idl: * css/CSSImportRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleRule.idl: * css/CSSUnknownRule.idl: * css/CSSValue.idl: * css/Counter.idl: * css/RGBColor.idl: * css/Rect.idl: * css/StyleSheet.idl: * css/WebKitCSSKeyframeRule.idl: * css/WebKitCSSTransformValue.idl: * dom/Attr.idl: * dom/CDATASection.idl: * dom/ClientRect.idl: * dom/Comment.idl: * dom/DOMCoreException.idl: * dom/DOMStringMap.idl: * dom/DocumentType.idl: * dom/Entity.idl: * dom/EntityReference.idl: * dom/EventException.idl: * dom/GeneratedStream.idl: * dom/MessageChannel.idl: * dom/NodeIterator.idl: * dom/Notation.idl: * dom/ProcessingInstruction.idl: * dom/RangeException.idl: * dom/Touch.idl: * dom/TreeWalker.idl: * fileapi/DOMFileSystem.idl: * fileapi/DOMFileSystemSync.idl: * fileapi/DirectoryReaderSync.idl: * fileapi/File.idl: * fileapi/FileEntrySync.idl: * fileapi/FileError.idl: * fileapi/FileException.idl: * fileapi/Metadata.idl: * fileapi/OperationNotAllowedException.idl: * fileapi/WebKitFlags.idl: * html/DOMSettableTokenList.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBRElement.idl: * html/HTMLBaseElement.idl: * html/HTMLBaseFontElement.idl: * html/HTMLBlockquoteElement.idl: * html/HTMLBodyElement.idl: * html/HTMLDListElement.idl: * html/HTMLDataListElement.idl: * html/HTMLDetailsElement.idl: * html/HTMLDirectoryElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFontElement.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLHRElement.idl: * html/HTMLHeadElement.idl: * html/HTMLHeadingElement.idl: * html/HTMLHtmlElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLIsIndexElement.idl: * html/HTMLLIElement.idl: * html/HTMLLabelElement.idl: * html/HTMLLegendElement.idl: * html/HTMLLinkElement.idl: * html/HTMLMapElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMenuElement.idl: * html/HTMLMetaElement.idl: * html/HTMLMeterElement.idl: * html/HTMLModElement.idl: * html/HTMLOListElement.idl: * html/HTMLOptGroupElement.idl: * html/HTMLOptionElement.idl: * html/HTMLParagraphElement.idl: * html/HTMLParamElement.idl: * html/HTMLPreElement.idl: * html/HTMLProgressElement.idl: * html/HTMLQuoteElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSourceElement.idl: * html/HTMLStyleElement.idl: * html/HTMLTableCaptionElement.idl: * html/HTMLTableCellElement.idl: * html/HTMLTableColElement.idl: * html/HTMLTitleElement.idl: * html/HTMLTrackElement.idl: * html/HTMLUListElement.idl: * html/ImageData.idl: * html/MediaError.idl: * html/SpellcheckRange.idl: * html/TextMetrics.idl: * html/ValidityState.idl: * html/VoidCallback.idl: * html/canvas/ArrayBuffer.idl: * html/canvas/ArrayBufferView.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasPixelArray.idl: * html/canvas/CanvasRenderingContext.idl: * html/canvas/DataView.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESTextureFloat.idl: * html/canvas/WebGLActiveInfo.idl: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextAttributes.idl: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLShader.idl: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLUniformLocation.idl: * html/canvas/WebGLVertexArrayObjectOES.idl: * html/canvas/WebKitLoseContext.idl: * inspector/ScriptProfile.idl: * inspector/ScriptProfileNode.idl: * page/AbstractView.idl: * page/BarInfo.idl: * page/Coordinates.idl: * page/Geoposition.idl: * page/MemoryInfo.idl: * page/NavigatorUserMediaError.idl: * page/Performance.idl: * page/PerformanceNavigation.idl: * page/PerformanceTiming.idl: * page/PositionError.idl: * page/Screen.idl: * page/SpeechInputEvent.idl: * page/SpeechInputResult.idl: * page/WebKitAnimation.idl: * page/WebKitPoint.idl: * page/WorkerNavigator.idl: * plugins/DOMMimeType.idl: * storage/Database.idl: * storage/DatabaseSync.idl: * storage/IDBAny.idl: * storage/IDBCursorWithValue.idl: * storage/IDBDatabaseError.idl: * storage/IDBDatabaseException.idl: * storage/IDBKey.idl: * storage/IDBVersionChangeEvent.idl: * storage/IDBVersionChangeRequest.idl: * storage/SQLError.idl: * storage/SQLException.idl: * storage/SQLResultSet.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAngle.idl: * svg/SVGAnimateColorElement.idl: * svg/SVGAnimateElement.idl: * svg/SVGAnimateMotionElement.idl: * svg/SVGAnimateTransformElement.idl: * svg/SVGAnimatedAngle.idl: * svg/SVGAnimatedBoolean.idl: * svg/SVGAnimatedEnumeration.idl: * svg/SVGAnimatedInteger.idl: * svg/SVGAnimatedLength.idl: * svg/SVGAnimatedLengthList.idl: * svg/SVGAnimatedNumber.idl: * svg/SVGAnimatedNumberList.idl: * svg/SVGAnimatedPreserveAspectRatio.idl: * svg/SVGAnimatedRect.idl: * svg/SVGAnimatedString.idl: * svg/SVGAnimatedTransformList.idl: * svg/SVGCircleElement.idl: * svg/SVGClipPathElement.idl: * svg/SVGColor.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGCursorElement.idl: * svg/SVGDefsElement.idl: * svg/SVGDescElement.idl: * svg/SVGElement.idl: * svg/SVGEllipseElement.idl: * svg/SVGExternalResourcesRequired.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDistantLightElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEFuncAElement.idl: * svg/SVGFEFuncBElement.idl: * svg/SVGFEFuncGElement.idl: * svg/SVGFEFuncRElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMergeNodeElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFEPointLightElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFESpotLightElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGFontElement.idl: * svg/SVGFontFaceElement.idl: * svg/SVGFontFaceFormatElement.idl: * svg/SVGFontFaceNameElement.idl: * svg/SVGFontFaceSrcElement.idl: * svg/SVGFontFaceUriElement.idl: * svg/SVGForeignObjectElement.idl: * svg/SVGGElement.idl: * svg/SVGGlyphElement.idl: * svg/SVGGradientElement.idl: * svg/SVGHKernElement.idl: * svg/SVGImageElement.idl: * svg/SVGLangSpace.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGLineElement.idl: * svg/SVGLinearGradientElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMaskElement.idl: * svg/SVGMatrix.idl: * svg/SVGMetadataElement.idl: * svg/SVGMissingGlyphElement.idl: * svg/SVGNumber.idl: * svg/SVGNumberList.idl: * svg/SVGPaint.idl: * svg/SVGPathSeg.idl: * svg/SVGPathSegArcAbs.idl: * svg/SVGPathSegArcRel.idl: * svg/SVGPathSegClosePath.idl: * svg/SVGPathSegCurvetoCubicAbs.idl: * svg/SVGPathSegCurvetoCubicRel.idl: * svg/SVGPathSegCurvetoCubicSmoothAbs.idl: * svg/SVGPathSegCurvetoCubicSmoothRel.idl: * svg/SVGPathSegCurvetoQuadraticAbs.idl: * svg/SVGPathSegCurvetoQuadraticRel.idl: * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl: * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl: * svg/SVGPathSegLinetoAbs.idl: * svg/SVGPathSegLinetoHorizontalAbs.idl: * svg/SVGPathSegLinetoHorizontalRel.idl: * svg/SVGPathSegLinetoRel.idl: * svg/SVGPathSegLinetoVerticalAbs.idl: * svg/SVGPathSegLinetoVerticalRel.idl: * svg/SVGPathSegList.idl: * svg/SVGPathSegMovetoAbs.idl: * svg/SVGPathSegMovetoRel.idl: * svg/SVGPatternElement.idl: * svg/SVGPoint.idl: * svg/SVGPointList.idl: * svg/SVGPolygonElement.idl: * svg/SVGPolylineElement.idl: * svg/SVGPreserveAspectRatio.idl: * svg/SVGRadialGradientElement.idl: * svg/SVGRect.idl: * svg/SVGRectElement.idl: * svg/SVGRenderingIntent.idl: * svg/SVGScriptElement.idl: * svg/SVGSetElement.idl: * svg/SVGStopElement.idl: * svg/SVGStringList.idl: * svg/SVGSwitchElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTSpanElement.idl: * svg/SVGTextElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGTextPositioningElement.idl: * svg/SVGTitleElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * svg/SVGTransformable.idl: * svg/SVGURIReference.idl: * svg/SVGUnitTypes.idl: * svg/SVGUseElement.idl: * svg/SVGVKernElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * svg/SVGZoomAndPan.idl: * svg/SVGZoomEvent.idl: * testing/Internals.idl: * webaudio/AudioChannelMerger.idl: * webaudio/AudioChannelSplitter.idl: * webaudio/AudioDestinationNode.idl: * webaudio/AudioGain.idl: * webaudio/AudioGainNode.idl: * webaudio/AudioProcessingEvent.idl: * webaudio/AudioSourceNode.idl: * webaudio/BiquadFilterNode.idl: * webaudio/ConvolverNode.idl: * webaudio/DelayNode.idl: * webaudio/DynamicsCompressorNode.idl: * webaudio/HighPass2FilterNode.idl: * webaudio/JavaScriptAudioNode.idl: * webaudio/LowPass2FilterNode.idl: * webaudio/OfflineAudioCompletionEvent.idl: * workers/SharedWorker.idl: * workers/SharedWorkerContext.idl: * workers/WorkerLocation.idl: * xml/XMLHttpRequestException.idl: * xml/XMLHttpRequestProgressEvent.idl: * xml/XPathException.idl: 2011-06-17 Dirk Schulze <krit@webkit.org> Reviewed by Rob Buis. SVGAnimation should use direct unit animation for SVGAngle https://bugs.webkit.org/show_bug.cgi?id=62807 Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368 This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAngle. We can animate the SVG primitive datatype SVGAngle with different unit types now. Removed number and unit parser from SVGAnimateElement. This is not needed anymore. Tests: svg/animations/svgangle-animation-deg-to-grad.html svg/animations/svgangle-animation-deg-to-rad.html svg/animations/svgangle-animation-grad-to-deg.html svg/animations/svgangle-animation-grad-to-rad.html svg/animations/svgangle-animation-rad-to-deg.html svg/animations/svgangle-animation-rad-to-grad.html * CMakeLists.txt: Added SVGAnimatedAngle.cpp. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Ditto. * svg/SVGAnimateElement.cpp: Make use of SVGAnimator for AnimatedAngle. (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::SVGAnimateElement::determineAnimatedAttributeType): Ditto. (WebCore::SVGAnimateElement::calculateAnimatedValue): Ditto. (WebCore::SVGAnimateElement::calculateFromAndToValues): Ditto. (WebCore::SVGAnimateElement::calculateFromAndByValues): Ditto. (WebCore::SVGAnimateElement::resetToBaseValue): Ditto. (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto. (WebCore::SVGAnimateElement::calculateDistance): Ditto. * svg/SVGAnimateElement.h: * svg/SVGAnimatedAngle.cpp: Added. Added SVGAnimatedAngleAnimator for animation of SVGAngles. (WebCore::SVGAnimatedAngleAnimator::SVGAnimatedAngleAnimator): (WebCore::sharedSVGAngle): (WebCore::SVGAnimatedAngleAnimator::constructFromString): (WebCore::SVGAnimatedAngleAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedAngleAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedAngleAnimator::calculateDistance): * svg/SVGAnimatedAngle.h: (WebCore::SVGAnimatedAngleAnimator::~SVGAnimatedAngleAnimator): * svg/SVGAnimatedLength.cpp: (WebCore::sharedSVGLength): Use an ExceptionCode for SVGLength::setValueAsString. * svg/SVGAnimatedType.h: (WebCore::SVGAnimatedType::create): (WebCore::SVGAnimatedType::createAngle): (WebCore::SVGAnimatedType::createLength): (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::angle): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): (WebCore::SVGAnimatedType::SVGAnimatedType): * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGLength.cpp: (WebCore::SVGLength::setValueAsString): Added an ExceptionCode for consistency reasons and as preparation for future error handling. * svg/SVGLength.h: * svg/SVGParserUtilities.cpp: (WebCore::parseNumberFromString): Added number parser for String objects. * svg/SVGParserUtilities.h: 2011-06-17 Anna Cavender <annacc@chromium.org> Reviewed by Eric Carlson. Adding initial interfaces and stubs for track https://bugs.webkit.org/show_bug.cgi?id=60379 This marks the first patch of a series to implement out-of-band <track> support in WebKit. This patch adds some of the core header files and their corresponding stub .cpp files. No new tests because feature is hidden behind VIDEO_TRACK feature define, which is turned off. * CMakeLists.txt: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * html/CueIndex.cpp: Added. * html/CueIndex.h: Added. * html/LoadableTextTrack.cpp: Added. * html/LoadableTextTrack.h: Added. * html/LoadableTextTrackImpl.cpp: Added. * html/LoadableTextTrackImpl.h: Added. * html/MutableTextTrack.cpp: Added. * html/MutableTextTrack.h: Added. * html/MutableTextTrackImpl.cpp: Added. * html/MutableTextTrackImpl.h: Added. * html/TextTrack.cpp: Added. * html/TextTrack.h: Added. * html/TextTrackCue.cpp: Added. * html/TextTrackCue.h: Added. * html/TextTrackCueList.cpp: Added. * html/TextTrackCueList.h: Added. * html/TextTrackPrivate.h: Added. * loader/CueLoader.cpp: Added. * loader/CueLoader.h: Added. * platform/track/CueParser.cpp: Added. * platform/track/CueParser.h: Added. * platform/track/CueParserPrivate.h: Added. 2011-06-17 Dmitry Lomov <dslomov@google.com> Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=62653 [V8][Chromium] Make StringCache in V8 bindings per-isolate This moves StringCache into V8BindingPerIsolateData. * bindings/v8/V8Binding.cpp: (WebCore::cachedStringCallback): (WebCore::StringCache::remove): (WebCore::StringCache::v8ExternalStringSlow): * bindings/v8/V8Binding.h: (WebCore::StringCache::StringCache): (WebCore::StringCache::v8ExternalString): (WebCore::StringCache::clearOnGC): (WebCore::V8BindingPerIsolateData::stringCache): (WebCore::v8ExternalString): * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): 2011-06-17 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Darin Adler. Assertion failure in SVGTextLayoutEngine constructor (!m_layoutAttributes.isEmpty()) https://bugs.webkit.org/show_bug.cgi?id=62884 Test: svg/custom/assert-empty-layout-attributes.svg * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Added a early return here. It is not needed to do the text layout algorithm if you don't have any layout information as your size is (0, 0) anyway. 2011-06-17 Alexey Proskuryakov <ap@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=62913 Use ICU search collator when available <rdar://problem/8830218> Search on a webpage in Safari conflates some Czech characters <rdar://problem/8468873> Safari search doesn't strip Hamza This changes behaviors that depend on system language, and isn't practically testable. * editing/TextIterator.cpp: (WebCore::createSearcher): Ask ICU for search collator, if available. 2011-06-17 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89143. http://trac.webkit.org/changeset/89143 https://bugs.webkit.org/show_bug.cgi?id=62912 Possible Chromeos test breakage (Requested by senorblanco on #webkit). * platform/KURLGoogle.cpp: (WebCore::encodeWithURLEscapeSequences): 2011-06-17 Jer Noble <jer.noble@apple.com> Reviewed by Ada Chan. Playing video from the manifest crashes on Windows https://bugs.webkit.org/show_bug.cgi?id=62901 No new tests. This will be covered by existing App Cache tests. Two related fixes. 1) Null-check the CFStringRef and CFURLRef created in QTMovie::load() before passing them to CFRelease(). 2) Use CFURL to create an appropriate file-URL on windows in createFileURLForApplicationCacheResource. * html/HTMLMediaElement.cpp: (WebCore::createFileURLForApplicationCacheResource): * platform/graphics/win/QTMovie.cpp: (QTMovie::load): 2011-06-17 Abhishek Arya <inferno@chromium.org> Reviewed by Dave Hyatt. When we lose ability to propagate floats, need to find topmost parent with that overhanging float, and then iterate over its sibling blocks to remove the float. https://bugs.webkit.org/show_bug.cgi?id=62875 Test: fast/block/float/float-not-removed-from-next-sibling5.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::hasOverhangingFloat): * rendering/RenderBlock.h: 2011-06-17 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Network panel does not show main resource content for iframes deleted from the document https://bugs.webkit.org/show_bug.cgi?id=62810 Test: http/tests/inspector/network/network-iframe-load-and-delete.html * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didFinishLoadingImpl): (WebCore::InspectorInstrumentation::didFailLoadingImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didFinishLoading): (WebCore::InspectorInstrumentation::didFailLoading): * inspector/InspectorPageAgent.cpp: (WebCore::cachedResourceContent): (WebCore::mainResourceContent): (WebCore::InspectorPageAgent::sharedBufferContent): (WebCore::InspectorPageAgent::resourceContent): (WebCore::InspectorPageAgent::getResourceContent): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::didFailLoading): (WebCore::InspectorResourceAgent::didReceiveXHRResponse): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::resourceStyleSheetText): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::setResourceType): (WebCore::NetworkResourcesData::resourceType): (WebCore::NetworkResourcesData::addResourceSharedBuffer): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::type): (WebCore::NetworkResourcesData::ResourceData::setType): (WebCore::NetworkResourcesData::ResourceData::buffer): (WebCore::NetworkResourcesData::ResourceData::setBuffer): (WebCore::NetworkResourcesData::ResourceData::textEncodingName): (WebCore::NetworkResourcesData::ResourceData::setTextEncodingName): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::didFailToLoad): (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didFinishLoading): (WebCore::ApplicationCacheGroup::didFail): 2011-06-17 Darin Adler <darin@apple.com> Fix clang build. * loader/LinkLoader.h: Use struct, not class, to forward-declare struct. 2011-06-17 Chris Evans <cevans@chromium.org> Reviewed by Adam Barth. Detect mixed-scripting involving https -> http redirects https://bugs.webkit.org/show_bug.cgi?id=62846 Test: http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::checkInsecureContent): (WebCore::CachedResourceLoader::canRequest): break out insecure content logic. * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::willSendRequest): check the redirect target for possible insecure content issues. 2011-06-12 Robert Hogan <robert@webkit.org> Reviewed by Alexey Proskuryakov. [Qt] Qt Counterpart for http://trac.webkit.org/changeset/42078 https://bugs.webkit.org/show_bug.cgi?id=62514 * platform/network/qt/ResourceHandleQt.cpp: (WebCore::WebCoreSynchronousLoader::willSendRequest): 2011-06-17 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. Change IDL code generator to require all arguments by default https://bugs.webkit.org/show_bug.cgi?id=62750 As per discussion on public-webapps, WebIDL is changing the default behavior to require all function arguments by default and raise an exception when an argument is missing. (This behavior is currently opt-in in WebKit's IDL system, on a function-by-function basis, with the "RequiresAllArguments=Raise" flag.) To order to match WebIDL as closely as possible, this patch adds an interface-level "LegacyDefaultOptionalArguments" flag and sets it on all existing IDL files (500+), then changes the code generator Perl scripts to behave the old way in the presence of the flag. No new tests required, all existing tests still pass. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestMediaQueryListListener.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * css/CSSCharsetRule.idl: * css/CSSFontFaceRule.idl: * css/CSSImportRule.idl: * css/CSSMediaRule.idl: * css/CSSPageRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRule.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSStyleSheet.idl: * css/CSSUnknownRule.idl: * css/CSSValue.idl: * css/CSSValueList.idl: * css/Counter.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/MediaQueryListListener.idl: * css/RGBColor.idl: * css/Rect.idl: * css/StyleMedia.idl: * css/StyleSheet.idl: * css/StyleSheetList.idl: * css/WebKitCSSKeyframeRule.idl: * css/WebKitCSSKeyframesRule.idl: * css/WebKitCSSMatrix.idl: * css/WebKitCSSTransformValue.idl: * dom/Attr.idl: * dom/BeforeLoadEvent.idl: * dom/BeforeProcessEvent.idl: * dom/CDATASection.idl: * dom/CharacterData.idl: * dom/ClientRect.idl: * dom/ClientRectList.idl: * dom/Clipboard.idl: * dom/Comment.idl: * dom/CompositionEvent.idl: * dom/CustomEvent.idl: * dom/DOMCoreException.idl: * dom/DOMImplementation.idl: * dom/DOMStringList.idl: * dom/DOMStringMap.idl: * dom/DataTransferItem.idl: * dom/DataTransferItems.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFragment.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/Entity.idl: * dom/EntityReference.idl: * dom/ErrorEvent.idl: * dom/Event.idl: * dom/EventException.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/ExclusiveTrackList.idl: * dom/GeneratedStream.idl: * dom/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MessageChannel.idl: * dom/MessageEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/MultipleTrackList.idl: * dom/MutationEvent.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeIterator.idl: * dom/NodeList.idl: * dom/Notation.idl: * dom/OverflowEvent.idl: * dom/PageTransitionEvent.idl: * dom/PopStateEvent.idl: * dom/ProcessingInstruction.idl: * dom/ProgressEvent.idl: * dom/Range.idl: * dom/RangeException.idl: * dom/RequestAnimationFrameCallback.idl: * dom/Stream.idl: * dom/StreamEvent.idl: * dom/StreamList.idl: * dom/StringCallback.idl: * dom/Text.idl: * dom/TextEvent.idl: * dom/Touch.idl: * dom/TouchEvent.idl: * dom/TouchList.idl: * dom/TrackList.idl: * dom/TreeWalker.idl: * dom/UIEvent.idl: * dom/WebKitAnimationEvent.idl: * dom/WebKitTransitionEvent.idl: * dom/WheelEvent.idl: * fileapi/Blob.idl: * fileapi/DOMFileSystem.idl: * fileapi/DOMFileSystemSync.idl: * fileapi/DirectoryEntry.idl: * fileapi/DirectoryEntrySync.idl: * fileapi/DirectoryReader.idl: * fileapi/DirectoryReaderSync.idl: * fileapi/EntriesCallback.idl: * fileapi/Entry.idl: * fileapi/EntryArray.idl: * fileapi/EntryArraySync.idl: * fileapi/EntryCallback.idl: * fileapi/EntrySync.idl: * fileapi/ErrorCallback.idl: * fileapi/File.idl: * fileapi/FileCallback.idl: * fileapi/FileEntry.idl: * fileapi/FileEntrySync.idl: * fileapi/FileError.idl: * fileapi/FileException.idl: * fileapi/FileList.idl: * fileapi/FileReader.idl: * fileapi/FileReaderSync.idl: * fileapi/FileSystemCallback.idl: * fileapi/FileWriter.idl: * fileapi/FileWriterCallback.idl: * fileapi/FileWriterSync.idl: * fileapi/Metadata.idl: * fileapi/MetadataCallback.idl: * fileapi/OperationNotAllowedException.idl: * fileapi/WebKitBlobBuilder.idl: * fileapi/WebKitFlags.idl: * html/DOMFormData.idl: * html/DOMSettableTokenList.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLAllCollection.idl: * html/HTMLAnchorElement.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLAudioElement.idl: * html/HTMLBRElement.idl: * html/HTMLBaseElement.idl: * html/HTMLBaseFontElement.idl: * html/HTMLBlockquoteElement.idl: * html/HTMLBodyElement.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDListElement.idl: * html/HTMLDataListElement.idl: * html/HTMLDetailsElement.idl: * html/HTMLDirectoryElement.idl: * html/HTMLDivElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFontElement.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLHRElement.idl: * html/HTMLHeadElement.idl: * html/HTMLHeadingElement.idl: * html/HTMLHtmlElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLIsIndexElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLLIElement.idl: * html/HTMLLabelElement.idl: * html/HTMLLegendElement.idl: * html/HTMLLinkElement.idl: * html/HTMLMapElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMediaElement.idl: * html/HTMLMenuElement.idl: * html/HTMLMetaElement.idl: * html/HTMLMeterElement.idl: * html/HTMLModElement.idl: * html/HTMLOListElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptGroupElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOutputElement.idl: * html/HTMLParagraphElement.idl: * html/HTMLParamElement.idl: * html/HTMLPreElement.idl: * html/HTMLProgressElement.idl: * html/HTMLQuoteElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSelectElement.idl: * html/HTMLSourceElement.idl: * html/HTMLStyleElement.idl: * html/HTMLTableCaptionElement.idl: * html/HTMLTableCellElement.idl: * html/HTMLTableColElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLTitleElement.idl: * html/HTMLTrackElement.idl: * html/HTMLUListElement.idl: * html/HTMLVideoElement.idl: * html/ImageData.idl: * html/MediaError.idl: * html/SpellcheckRange.idl: * html/SpellcheckRangeList.idl: * html/TextMetrics.idl: * html/TimeRanges.idl: * html/ValidityState.idl: * html/VoidCallback.idl: * html/canvas/ArrayBuffer.idl: * html/canvas/ArrayBufferView.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasPixelArray.idl: * html/canvas/CanvasRenderingContext.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/DataView.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESTextureFloat.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/WebGLActiveInfo.idl: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextAttributes.idl: * html/canvas/WebGLContextEvent.idl: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLRenderingContext.idl: * html/canvas/WebGLShader.idl: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLUniformLocation.idl: * html/canvas/WebGLVertexArrayObjectOES.idl: * html/canvas/WebKitLoseContext.idl: * inspector/InjectedScriptHost.idl: * inspector/InspectorFrontendHost.idl: * inspector/JavaScriptCallFrame.idl: * inspector/ScriptProfile.idl: * inspector/ScriptProfileNode.idl: * loader/appcache/DOMApplicationCache.idl: * notifications/Notification.idl: * notifications/NotificationCenter.idl: * page/AbstractView.idl: * page/BarInfo.idl: * page/Console.idl: * page/Coordinates.idl: * page/Crypto.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/EventSource.idl: * page/Geolocation.idl: * page/Geoposition.idl: * page/History.idl: * page/Location.idl: * page/MemoryInfo.idl: * page/Navigator.idl: * page/NavigatorUserMediaError.idl: * page/NavigatorUserMediaErrorCallback.idl: * page/NavigatorUserMediaSuccessCallback.idl: * page/Performance.idl: * page/PerformanceNavigation.idl: * page/PerformanceTiming.idl: * page/PositionCallback.idl: * page/PositionError.idl: * page/PositionErrorCallback.idl: * page/Screen.idl: * page/SpeechInputEvent.idl: * page/SpeechInputResult.idl: * page/SpeechInputResultList.idl: * page/WebKitAnimation.idl: * page/WebKitAnimationList.idl: * page/WebKitPoint.idl: * page/WorkerNavigator.idl: * plugins/DOMMimeType.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/Database.idl: * storage/DatabaseCallback.idl: * storage/DatabaseSync.idl: * storage/IDBAny.idl: * storage/IDBCursor.idl: * storage/IDBCursorWithValue.idl: * storage/IDBDatabase.idl: * storage/IDBDatabaseError.idl: * storage/IDBDatabaseException.idl: * storage/IDBFactory.idl: * storage/IDBIndex.idl: * storage/IDBKey.idl: * storage/IDBKeyRange.idl: * storage/IDBObjectStore.idl: * storage/IDBRequest.idl: * storage/IDBTransaction.idl: * storage/IDBVersionChangeEvent.idl: * storage/IDBVersionChangeRequest.idl: * storage/SQLError.idl: * storage/SQLException.idl: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.idl: * storage/SQLStatementCallback.idl: * storage/SQLStatementErrorCallback.idl: * storage/SQLTransaction.idl: * storage/SQLTransactionCallback.idl: * storage/SQLTransactionErrorCallback.idl: * storage/SQLTransactionSync.idl: * storage/SQLTransactionSyncCallback.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * storage/StorageInfo.idl: * storage/StorageInfoErrorCallback.idl: * storage/StorageInfoQuotaCallback.idl: * storage/StorageInfoUsageCallback.idl: * svg/ElementTimeControl.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAngle.idl: * svg/SVGAnimateColorElement.idl: * svg/SVGAnimateElement.idl: * svg/SVGAnimateMotionElement.idl: * svg/SVGAnimateTransformElement.idl: * svg/SVGAnimatedAngle.idl: * svg/SVGAnimatedBoolean.idl: * svg/SVGAnimatedEnumeration.idl: * svg/SVGAnimatedInteger.idl: * svg/SVGAnimatedLength.idl: * svg/SVGAnimatedLengthList.idl: * svg/SVGAnimatedNumber.idl: * svg/SVGAnimatedNumberList.idl: * svg/SVGAnimatedPreserveAspectRatio.idl: * svg/SVGAnimatedRect.idl: * svg/SVGAnimatedString.idl: * svg/SVGAnimatedTransformList.idl: * svg/SVGAnimationElement.idl: * svg/SVGCircleElement.idl: * svg/SVGClipPathElement.idl: * svg/SVGColor.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGCursorElement.idl: * svg/SVGDefsElement.idl: * svg/SVGDescElement.idl: * svg/SVGDocument.idl: * svg/SVGElement.idl: * svg/SVGElementInstance.idl: * svg/SVGElementInstanceList.idl: * svg/SVGEllipseElement.idl: * svg/SVGException.idl: * svg/SVGExternalResourcesRequired.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDistantLightElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEFuncAElement.idl: * svg/SVGFEFuncBElement.idl: * svg/SVGFEFuncGElement.idl: * svg/SVGFEFuncRElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMergeNodeElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFEPointLightElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFESpotLightElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterElement.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGFontElement.idl: * svg/SVGFontFaceElement.idl: * svg/SVGFontFaceFormatElement.idl: * svg/SVGFontFaceNameElement.idl: * svg/SVGFontFaceSrcElement.idl: * svg/SVGFontFaceUriElement.idl: * svg/SVGForeignObjectElement.idl: * svg/SVGGElement.idl: * svg/SVGGlyphElement.idl: * svg/SVGGradientElement.idl: * svg/SVGHKernElement.idl: * svg/SVGImageElement.idl: * svg/SVGLangSpace.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGLineElement.idl: * svg/SVGLinearGradientElement.idl: * svg/SVGLocatable.idl: * svg/SVGMPathElement.idl: * svg/SVGMarkerElement.idl: * svg/SVGMaskElement.idl: * svg/SVGMatrix.idl: * svg/SVGMetadataElement.idl: * svg/SVGMissingGlyphElement.idl: * svg/SVGNumber.idl: * svg/SVGNumberList.idl: * svg/SVGPaint.idl: * svg/SVGPathElement.idl: * svg/SVGPathSeg.idl: * svg/SVGPathSegArcAbs.idl: * svg/SVGPathSegArcRel.idl: * svg/SVGPathSegClosePath.idl: * svg/SVGPathSegCurvetoCubicAbs.idl: * svg/SVGPathSegCurvetoCubicRel.idl: * svg/SVGPathSegCurvetoCubicSmoothAbs.idl: * svg/SVGPathSegCurvetoCubicSmoothRel.idl: * svg/SVGPathSegCurvetoQuadraticAbs.idl: * svg/SVGPathSegCurvetoQuadraticRel.idl: * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl: * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl: * svg/SVGPathSegLinetoAbs.idl: * svg/SVGPathSegLinetoHorizontalAbs.idl: * svg/SVGPathSegLinetoHorizontalRel.idl: * svg/SVGPathSegLinetoRel.idl: * svg/SVGPathSegLinetoVerticalAbs.idl: * svg/SVGPathSegLinetoVerticalRel.idl: * svg/SVGPathSegList.idl: * svg/SVGPathSegMovetoAbs.idl: * svg/SVGPathSegMovetoRel.idl: * svg/SVGPatternElement.idl: * svg/SVGPoint.idl: * svg/SVGPointList.idl: * svg/SVGPolygonElement.idl: * svg/SVGPolylineElement.idl: * svg/SVGPreserveAspectRatio.idl: * svg/SVGRadialGradientElement.idl: * svg/SVGRect.idl: * svg/SVGRectElement.idl: * svg/SVGRenderingIntent.idl: * svg/SVGSVGElement.idl: * svg/SVGScriptElement.idl: * svg/SVGSetElement.idl: * svg/SVGStopElement.idl: * svg/SVGStringList.idl: * svg/SVGStylable.idl: * svg/SVGStyleElement.idl: * svg/SVGSwitchElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTSpanElement.idl: * svg/SVGTests.idl: * svg/SVGTextContentElement.idl: * svg/SVGTextElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGTextPositioningElement.idl: * svg/SVGTitleElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * svg/SVGTransformable.idl: * svg/SVGURIReference.idl: * svg/SVGUnitTypes.idl: * svg/SVGUseElement.idl: * svg/SVGVKernElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * svg/SVGZoomAndPan.idl: * svg/SVGZoomEvent.idl: * testing/Internals.idl: * webaudio/AudioBuffer.idl: * webaudio/AudioBufferSourceNode.idl: * webaudio/AudioChannelMerger.idl: * webaudio/AudioChannelSplitter.idl: * webaudio/AudioContext.idl: * webaudio/AudioDestinationNode.idl: * webaudio/AudioGain.idl: * webaudio/AudioGainNode.idl: * webaudio/AudioListener.idl: * webaudio/AudioNode.idl: * webaudio/AudioPannerNode.idl: * webaudio/AudioParam.idl: * webaudio/AudioProcessingEvent.idl: * webaudio/AudioSourceNode.idl: * webaudio/BiquadFilterNode.idl: * webaudio/ConvolverNode.idl: * webaudio/DelayNode.idl: * webaudio/DynamicsCompressorNode.idl: * webaudio/HighPass2FilterNode.idl: * webaudio/JavaScriptAudioNode.idl: * webaudio/LowPass2FilterNode.idl: * webaudio/OfflineAudioCompletionEvent.idl: * webaudio/RealtimeAnalyserNode.idl: * websockets/CloseEvent.idl: * websockets/WebSocket.idl: * workers/AbstractWorker.idl: * workers/DedicatedWorkerContext.idl: * workers/SharedWorker.idl: * workers/SharedWorkerContext.idl: * workers/Worker.idl: * workers/WorkerContext.idl: * workers/WorkerLocation.idl: * xml/DOMParser.idl: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestException.idl: * xml/XMLHttpRequestProgressEvent.idl: * xml/XMLHttpRequestUpload.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathException.idl: * xml/XPathExpression.idl: * xml/XPathNSResolver.idl: * xml/XPathResult.idl: * xml/XSLTProcessor.idl: 2011-06-17 Cary Clark <caryclark@google.com> Reviewed by Mihai Parparita. Exclude isCALayerContext check if building Chrome to use Skia on Mac. https://bugs.webkit.org/show_bug.cgi?id=62859 No new tests. This change does not affect existing functionality. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): Add a conditional to always set drawing into layer to false if Skia is the WebKit rendering engine. Once USE(SKIA) is enabled, this condition can be removed. 2011-06-17 Gavin Peters <gavinp@chromium.org> Reviewed by Adam Barth. refactor HTMLLinkElement to allow Link header implementation https://bugs.webkit.org/show_bug.cgi?id=51941 This change moves the LinkRelAttribute helper struct into its own file in html/, since the LinkRelAttribute is used by the LinkLoader, and leaving it in HTMLLinkElement would have been too circular for my tastes. The new LinkLoader class contains the loader code for icons, dns prefetching and prefetch/prerender/subresource into a common LinkLoader. This is a step in getting the Link header working in WebKit, as discussed in webkit-dev For more information, see thread "beforeload & link (esp rel prefetch)". No new tests, since this is a refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::~HTMLLinkElement): (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::shouldLoadLink): (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::linkLoaded): (WebCore::HTMLLinkElement::linkLoadingErrored): * html/HTMLLinkElement.h: * html/LinkRelAttribute.cpp: Added. (WebCore::LinkRelAttribute::LinkRelAttribute): * html/LinkRelAttribute.h: Added. * html/parser/HTMLPreloadScanner.cpp: (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet): * loader/LinkLoader.cpp: Added. (WebCore::LinkLoader::LinkLoader): (WebCore::LinkLoader::~LinkLoader): (WebCore::LinkLoader::linkLoadedTimerFired): (WebCore::LinkLoader::notifyFinished): (WebCore::LinkLoader::loadLink): * loader/LinkLoader.h: Added. * loader/LinkLoaderClient.h: Added. (WebCore::LinkLoaderClient::~LinkLoaderClient): 2011-06-17 Annie Sullivan <sullivan@chromium.org> Reviewed by Ryosuke Niwa. div can be a child of span on InsertParagraph https://bugs.webkit.org/show_bug.cgi?id=62687 Handle the special case where the insertion point is the first position in the enclosing block node. The div for the new paragraph should be inserted as a child of the enclosing block node, otherwise it could be inserted as a child of a span or other inline element. * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2011-06-17 Eric Uhrhane <ericu@chromium.org> Reviewed by Adam Barth. [filesystem/Chromium] Filesystem paths need proper URL escaping https://bugs.webkit.org/show_bug.cgi?id=62811 Fix http://code.google.com/p/chromium/issues/detail?id=78860 by making KURLChromium.cpp's escaping code actually work. Make encodeWithURLEscapeSequences call into googleurl to do proper escaping. Tested in WebKit/chromium/tests/KURLTest.cpp. * platform/KURLGoogle.cpp: (WebCore::encodeWithURLEscapeSequences): 2011-06-17 Julien Chaffraix <jchaffraix@google.com> Reviewed by Darin Adler. Avoid extra work in RenderStyle::visitedDependentColor https://bugs.webkit.org/show_bug.cgi?id=62868 Refactoring only, no new test required. The code used to cache the result of borderStyleForColorProperty. However the value was either overwritten inside colorIncludingFallback or there was not border. Thus I removed borderStyleForColorProperty and inlined the logic in colorIncludingFallback. This shows some nice performance improvements on the bug page (table of 22k rows with a link for each row). Using pprof, the time spend in RenderStyle::visitedDependentColor is reduced by ~10%, mostly due to removing the call to borderStyleForColorProperty. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::colorIncludingFallback): We now calculate the borderStyle inside this function (which was already the case I just made it explicit). Also simplified the final 'if' as the border will be set only for the right CSS border properties. (WebCore::RenderStyle::visitedDependentColor): Removed the |borderStyle| variable as it was never read. * rendering/style/RenderStyle.h: Removed the parameter. 2011-06-16 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: breakpointsWithoutSourceFile values should be a maps, not arrays. https://bugs.webkit.org/show_bug.cgi?id=62714 * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings): (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._reset): * inspector/front-end/Settings.js: (WebInspector.Settings): (WebInspector.Settings.prototype._set): 2011-06-17 Joone Hur <joone.hur@collabora.co.uk> Reviewed by Martin Robinson. [GTK] Replace GdkRectangle by cairo_rectangle_int_t https://bugs.webkit.org/show_bug.cgi?id=60687 Replace GdkRectangle by cairo_rectangle_int_t. * GNUmakefile.list.am: Added IntRectCairo.cpp instead of IntRectGtk.cpp * platform/graphics/IntRect.h: IntRect class can be instantiated through the given cairo_rectangle_int_t instead of GdkRectangle. * platform/graphics/cairo/IntRectCairo.cpp: Add the constructor and operator for handling cairo_rectangle_int_t. (WebCore::IntRect::IntRect): (WebCore::IntRect::operator cairo_rectangle_int_t): * platform/graphics/gtk/IntRectGtk.cpp: Include this file only for Gtk+2. * platform/gtk/GtkPluginWidget.cpp: Replace GdkRectangle by cairo_rectangle_int_t. (WebCore::GtkPluginWidget::invalidateRect): 2011-06-17 Alexander Pavlov <apavlov@chromium.org> Reviewed by David Hyatt. Web Inspector: support for emulating element's pseudo class state in styleRulesForElement() https://bugs.webkit.org/show_bug.cgi?id=61070 This patch is a slight rework of a solution by Alexander Udalov. It is supposed to help implement a feature in Web Inspector to examine style rules matched for different states of a given element. Web Inspector is supposed to pass a mask of ForcePseudoClassFlags to styleRulesForElement(), so that it will filter only the rules whose state (a set of pseudo classes in their selectors) matches a given mask, ignoring the state of the element itself. DoNotForcePseudoClassMask is the default behaviour; it always examines the state of a given element to make a match. Tests will be provided in a subsequent Web Inspector change employing this functionality. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::styleRulesForElement): (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): (WebCore::CSSStyleSelector::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * css/CSSStyleSelector.h: 2011-06-17 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: support preview mode for live edit changes https://bugs.webkit.org/show_bug.cgi?id=62851 Debugger.editScriptSource command now supports preview flag. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::editScriptSource): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::editScriptSource): * bindings/v8/ScriptDebugServer.h: * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::editScriptSource): * inspector/InspectorDebuggerAgent.h: 2011-06-09 Hans Wennborg <hans@chromium.org> Reviewed by Tony Gentilcore. IndexedDB: backingStoreMap is per backing store, not per database https://bugs.webkit.org/show_bug.cgi?id=62382 IDBFactoryBackendImpl::m_backingStoreMap should contain an entry per backing store, not per database. Otherwise, we might accidentally open the same backing store more than once, which is dangerous. Also tweak the code that chooses backing store type. It should be simple: we default to SQLite; if LevelDB is specifically requested, we use that. If LevelDB is requested and there is a SQLite database, we migrate. No new tests, just cleaning up the code. * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::addIDBBackingStore): (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore): (WebCore::IDBFactoryBackendImpl::open): (WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB): * storage/IDBFactoryBackendImpl.h: 2011-06-17 Andrey Adaikin <aandrey@google.com> Reviewed by Pavel Feldman. Web Inspector: Source code which includes non-Latin character does not correspond to line number field on Inspector https://bugs.webkit.org/show_bug.cgi?id=62845 * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._syncLineHeight): (WebInspector.TextEditorGutterPanel): (WebInspector.TextEditorGutterChunk.prototype.set expanded): 2011-06-16 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: return description of the changes applied in response to editScriptSource command https://bugs.webkit.org/show_bug.cgi?id=62801 Return description of the changes made in response to Debugger.editScriptSource command. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::editScriptSource): * bindings/js/ScriptDebugServer.h: * bindings/v8/DebuggerScript.js: (): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::editScriptSource): * bindings/v8/ScriptDebugServer.h: * inspector/Inspector.json: 2011-06-16 Gabor Loki <loki@webkit.org> [Qt] Unreviewed, build fix after r89118. * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::initializeParserContext): 2011-06-16 Yuta Kitamura <yutak@chromium.org> Unreviewed, rolling out r89073. http://trac.webkit.org/changeset/89073 https://bugs.webkit.org/show_bug.cgi?id=62783 Broke Chromium Clang build. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterPaint): * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): 2011-06-16 Jeffrey Pfau <jpfau@apple.com> Reviewed by Alexey Proskuryakov. Using null bytes when setting innerHTML in XTHML results in assertion and a crash due to null-pointer dereference https://bugs.webkit.org/show_bug.cgi?id=61053 XML parsing in-memory XML chunks now passes around a string object instead of a C string, ensuring null characters are properly handled. Tests: fast/parser/xhtml-innerhtml-null-byte-first.xhtml fast/parser/xhtml-innerhtml-null-byte.xhtml * dom/XMLDocumentParser.h: * dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLParserContext::createMemoryParser): (WebCore::XMLDocumentParser::initializeParserContext): (WebCore::XMLDocumentParser::appendFragmentSource): 2011-06-16 Robin Dunn <robin@alldunn.com> Reviewed by Kevin Ollivier. [wx] Account for differing byte order when decoding images in the PPC build. https://bugs.webkit.org/show_bug.cgi?id=62830 * platform/image-decoders/wx/ImageDecoderWx.cpp: (WebCore::ImageFrame::asNewNativeImage): 2011-06-16 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. REGRESSION (r89035): HTMLTableRowsCollection constructor crashes; depends on compiler order of evaluation https://bugs.webkit.org/show_bug.cgi?id=62836 Covered by existing tests on platforms where it occurs. * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Add a call to get() to prevent the passing behavior of PassRefPtr from kicking in and changing the table pointer to 0, possibly before it is dereferenced. 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89055. http://trac.webkit.org/changeset/89055 https://bugs.webkit.org/show_bug.cgi?id=62835 Caused failures on all ports except GTK (Requested by mrobinson on #webkit). * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::statusWillBeHandledBySoup): (WebCore::soupErrorShouldCauseLoadFailure): (WebCore::convertSoupErrorToResourceError): (WebCore::sendRequestCallback): 2011-06-16 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. Support logical line movement in vertical writing mode https://bugs.webkit.org/show_bug.cgi?id=62743 Fixed the bug by making xOffsetForVerticalNavigation (now called lineDirectionPointForVerticalNavigation) aware of writing modes. Also extracted absoluteLineDirectionPointToLocalPointInBlock from previousLinePosition and nextLinePosition to convert a line direction point to a physical point relative to a root inline box. Tests: editing/selection/vertical-lr-ltr-extend-line-backward-br.html editing/selection/vertical-lr-ltr-extend-line-forward-br.html editing/selection/vertical-rl-ltr-extend-line-backward-br.html editing/selection/vertical-rl-ltr-extend-line-backward-p.html editing/selection/vertical-rl-ltr-extend-line-backward-wrap.html editing/selection/vertical-rl-ltr-extend-line-forward-br.html editing/selection/vertical-rl-ltr-extend-line-forward-p.html editing/selection/vertical-rl-ltr-extend-line-forward-wrap.html editing/selection/vertical-rl-rtl-extend-line-backward-br.html editing/selection/vertical-rl-rtl-extend-line-backward-p.html editing/selection/vertical-rl-rtl-extend-line-forward-br.html editing/selection/vertical-rl-rtl-extend-line-forward-p.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::modifyExtendingForward): Calls lineDirectionPointForBlockDirectionNavigation. (WebCore::FrameSelection::modifyMovingForward): Ditto. (WebCore::FrameSelection::modifyExtendingBackward): Ditto. (WebCore::FrameSelection::modifyMovingBackward): Ditto. (WebCore::FrameSelection::modify): Ditto. (WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation): Renamed from xPosForVerticalArrowNavigation; calls VisiblePosition::lineDirectionPointForVerticalNavigation. * editing/FrameSelection.h: * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::lineDirectionPointForBlockDirectionNavigation): Renamed from xOffsetForVerticalNavigation. Returns line direction point instead of visual x coordinate. * editing/VisiblePosition.h: * editing/visible_units.cpp: (WebCore::absoluteLineDirectionPointToLocalPointInBlock): Extracted from previousLinePosition and nextLinePosition. Takes care or writing modes. (WebCore::previousLinePosition): Calls absoluteLineDirectionPointToLocalPointInBlock. (WebCore::nextLinePosition): Ditto. * editing/visible_units.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::closestLeafChildForPoint): Added; takes a physical point and calls closestLeafChildForLogicalLeftPosition with logical x. * rendering/RootInlineBox.h: 2011-06-16 Nate Chapin <japhet@chromium.org> Reviewed by Alexey Proskuryakov. Set the referrer on a ResourceRequest from a WorkerThreadableLoader as soon as the request reaches the main thread and remove the optionalOutgoingReferrer parameter from some functions. https://bugs.webkit.org/show_bug.cgi?id=62806 * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadResourceSynchronously): (WebCore::DocumentThreadableLoader::create): (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): * loader/ResourceLoadScheduler.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): * loader/SubresourceLoader.h: * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): 2011-06-16 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. FrameLoader doesn't need completeURL or baseURL https://bugs.webkit.org/show_bug.cgi?id=62818 No functional change, thus no tests. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::isImageType): (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::open): * loader/FrameLoader.cpp: * loader/FrameLoader.h: * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::scheduleLocationChange): * page/History.cpp: (WebCore::History::urlForState): 2011-06-16 Dawit Alemayehu <adawit@kde.org> Reviewed by Antonio Gomes. Support for gnash flash player plugin in QtWebKit [Qt] Support for the gnash flash player plugin https://bugs.webkit.org/show_bug.cgi?id=62283 No new tests needed. Existing nsplugin tests are sufficient. * plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::load): 2011-06-16 Sailesh Agrawal <sail@chromium.org> Reviewed by Mihai Parparita. [Chromium] Draw search tickmarks on overlay scrollbars https://bugs.webkit.org/show_bug.cgi?id=62783 This change adds search tickmark support for overlay scrollbars. Tickmarks are only drawn when the scroll track is visible. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:Split the scrollbar drawing code into a track and knob version. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterPaint): (wkScrollbarPainterPaintTrack): (wkScrollbarPainterPaintKnob): * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm:Factor out the paint tickmark code and call it from the overlay scrollbar drawing code. (WebCore::ScrollbarThemeChromiumMac::paint): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): 2011-06-16 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. Introduced SlotVisitor into the project https://bugs.webkit.org/show_bug.cgi?id=62820 This resolves a class vs typedef forward declaration issue, and gives all exported symbols the correct names. * dom/EventListener.h: * dom/Node.h: * dom/NodeFilterCondition.h: 2011-06-16 Abhishek Arya <inferno@chromium.org> Reviewed by Adam Barth. RefPtr frame since it can get removed in FrameLoader::finishedParsing. https://bugs.webkit.org/show_bug.cgi?id=62812 Tests: already tested by fast/parser/document-write-into-initial-document.html. * dom/Document.cpp: (WebCore::Document::finishedParsing): 2011-06-16 Sailesh Agrawal <sail@chromium.org> Reviewed by Mihai Parparita. [Chromium] Update forked ScrollAnimatorChromiumMac.mm/h https://bugs.webkit.org/show_bug.cgi?id=62779 Updated ScrollAnimatorChromiumMac.mm/h with the latest code in WebCore/platform/mac/ScrollAnimatorMac.mm/h * platform/chromium/ScrollAnimatorChromiumMac.h: (WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate): (WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate): * platform/chromium/ScrollAnimatorChromiumMac.mm: (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::scroll): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation): (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::snapRubberBand): (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorChromiumMac::setIsActive): (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterControllerStyle): 2011-06-16 Sailesh Agrawal <sail@chromium.org> Reviewed by Mihai Parparita. [Chromium] Overlay scrollbars leave glitches on web content https://bugs.webkit.org/show_bug.cgi?id=62383 Enable overlay scrollbars on Chromium Mac. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (preferredScrollerStyle): 2011-06-16 una sabovic <una.sabovic@palm.com> Reviewed by Simon Fraser. Optimization: do a single fillRect when painting the root background in RenderBoxModelObject::paintFillLayerExtended https://bugs.webkit.org/show_bug.cgi?id=62593 When painting the root background, instead of doing two fillRects blend the base with background color and do a single fillRect. No new tests. This is an optimization and it doesn't change any existing functionality. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): 2011-06-16 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Eric Seidel. Consider padding and border when looking for the next/previous line position https://bugs.webkit.org/show_bug.cgi?id=55481 The bug was caused by previousLinePosition and nextLinePosition passing y coordinate above the line in some cases. Fixed the bug by passing the larger of selectionTop and logicalTop. This patch is based on a patch originally written by Mario Sanchez Prada <msanchez@igalia.com>. Test: editing/selection/move-vertically-with-paddings-borders.html * editing/visible_units.cpp: (WebCore::previousLinePosition): (WebCore::nextLinePosition): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::blockDirectionPointInLine): 2011-06-16 Keunsoon Lee <keunsoon.lee@samsung.com> Reviewed by Martin Robinson. [SOUP] Abnormal operation if server sends 5xx status code without HTTP body https://bugs.webkit.org/show_bug.cgi?id=60875 Handle status code 4xx and 5xx after receiving HTTP body Webkit soup port premises that server always sends error page in case server sends error code, 4xx and 5xx. But, sometimes there is no HTTP body for error page. In that case, Webkit does nothing or tries to download the HTTP response according to received MIME Type even if there is no HTTP body. (abnormal operation) With this modification, Browser will show received error page if server sends error page. Or it will show its own error page from each port if server sends nothing. Modified algorithm 1) libsoup sends status code 4xx or 5xx (client error or server error) 2) Webkit soup port orders to accumulate HTTP body chunks to libsoup. 3) Webkit soup port ignores gotHeadersCallback, contentSniffedCallback and gotChunkCallback. 4) Webkit soup port checks there is HTTP body or not on sendRequestCallback and; 4-1) if there is HTTP body, calls didReceiveResponse() 4-2) if there is no HTTP body, calls didFail() - prevent the abnormal operation Test: http/tests/loading/status-code-error-without-response-body.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::statusWillBeHandledBySoup): Add a new condition, SOUP_STATUS_IS_CLIENT_ERROR() and SOUP_STATUS_IS_SERVER_ERROR() (WebCore::soupErrorAndHaveNotReceivedBody): Add a new helper function, it checks received body is exist if soup sends error code (WebCore::soupErrorShouldCauseLoadFailure): Add a new condition, soupErrorAndHaveNotReceivedBody() (WebCore::convertSoupErrorToResourceError): Add a new condition, soupErrorAndHaveNotReceivedBody() (WebCore::sendRequestCallback): Check handle->client() again, because didReceiveResponse() can make it zero 2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Network panel shows incorrect query parameters when url has fragment. https://bugs.webkit.org/show_bug.cgi?id=62723 * English.lproj/localizedStrings.js: * inspector/front-end/HAREntry.js: (WebInspector.HAREntry.prototype._buildRequest): (WebInspector.HAREntry.prototype._buildRequestURL): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get queryParameters): * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView): (WebInspector.ResourceHeadersView.prototype._refreshUrlFragment): 2011-06-16 Dimitri Glazkov <dglazkov@chromium.org> Clang fix after r89039. * rendering/RenderThemeMac.h: Removed spurious constipation. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::fileListNameForWidth): Ditto. 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89026. http://trac.webkit.org/changeset/89026 https://bugs.webkit.org/show_bug.cgi?id=62804 These patches were likely correct. I'll investigate the browser_test failures. (Requested by abarth on #webkit). * WebCore.exp.in: * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): * bindings/js/ScriptController.h: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): * bindings/v8/ScriptController.h: * dom/Event.cpp: * dom/Event.h: * dom/UserGestureIndicator.cpp: (WebCore::isDefinite): (WebCore::UserGestureIndicator::UserGestureIndicator): (WebCore::UserGestureIndicator::~UserGestureIndicator): * dom/UserGestureIndicator.h: (WebCore::UserGestureIndicator::processingUserGesture): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removedFromDocument): (WebCore::HTMLMediaElement::load): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): (WebCore::HTMLMediaElement::beginScrubbing): (WebCore::HTMLMediaElement::resume): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::webkitEnterFullscreen): * html/HTMLVideoElement.h: (WebCore::HTMLVideoElement::webkitEnterFullScreen): * html/HTMLVideoElement.idl: * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): 2011-06-16 Dimitri Glazkov <dglazkov@chromium.org> [Qt] Build fix after r89039. * WebCore.pro: Added StringTruncator to build system. * platform/qt/RenderThemeQt.cpp: Reverted previous change. 2011-06-16 Dimitri Glazkov <dglazkov@chromium.org> [Qt] Build fix after r89039. * platform/qt/RenderThemeQt.cpp: Added StringTruncator include. 2011-06-16 Dimitri Glazkov <dglazkov@chromium.org> [Qt] Build fix after r89039. * platform/qt/RenderThemeQt.h: Renamed local variable f to font. 2011-06-16 Dimitri Glazkov <dglazkov@chromium.org> [Qt] Build fix after r89039. * platform/qt/RenderThemeQt.h: Move decl out of ENABLE(VIDEO) ifdef. 2011-06-15 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Move FileChooser::basenameForWidth to RenderTheme::fileListNameForWidth, eliminate gnarly FileChooserFoo proliferation. https://bugs.webkit.org/show_bug.cgi?id=62748 Refactoring, covered by existing tests. * CMakeListsEfl.txt: Removed FileChooserFoo from build system. * CMakeListsWinCE.txt: Ditto. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.order: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * platform/FileChooser.h: Removed baseNameForWidth decl. * platform/FileSystem.h: Removed now-unnecessary Chromium-specific cruft. * platform/android/FileChooserAndroid.cpp: Removed. * platform/brew/FileChooserBrew.cpp: Removed. * platform/chromium/FileChooserChromium.cpp: Removed. * platform/chromium/FileSystemChromiumLinux.cpp: Removed now-unnecessary code. * platform/chromium/FileSystemChromiumMac.mm: Ditto. * platform/chromium/FileSystemChromiumWin.cpp: Ditto. * platform/efl/FileChooserEfl.cpp: Removed. * platform/gtk/FileChooserGtk.cpp: Removed. * platform/gtk/RenderThemeGtk.cpp: (WebCore::stringByAdoptingFileSystemRepresentation): Moved from FileChooserGtk. (WebCore::RenderThemeGtk::fileListNameForWidth): Ditto. * platform/gtk/RenderThemeGtk.h: Added decl. * platform/haiku/FileChooserHaiku.cpp: Removed. * platform/mac/FileChooserMac.mm: Removed. * platform/qt/FileChooserQt.cpp: Removed. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::RenderThemeQt): Moved from FileChooserQt. (WebCore::RenderThemeQt::fileListNameForWidth): Ditto. * platform/qt/RenderThemeQt.h: Adde decl. * platform/win/FileChooserWin.cpp: Removed. * platform/wx/FileChooserWx.cpp: Removed. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::fileTextValue): Changed to use RenderTheme. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::fileListNameForWidth): Added default impl. * rendering/RenderTheme.h: Added decl. * rendering/RenderThemeMac.h: Ditto. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::fileListNameForWidth): Added default Mac impl. 2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs. https://bugs.webkit.org/show_bug.cgi?id=61205 Added inspector backend cache for XHR content. Tests: http/tests/inspector/network/network-xhr-async.html http/tests/inspector/network/network-xhr-sync.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::didReceiveResponse): * fileapi/FileReaderLoader.h: * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl): (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl): (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl): (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveXHRResponse): (WebCore::InspectorInstrumentation::willLoadXHRSynchronously): (WebCore::InspectorInstrumentation::didLoadXHRSynchronously): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::didReceiveXHRResponse): (WebCore::InspectorResourceAgent::willLoadXHRSynchronously): (WebCore::InspectorResourceAgent::didLoadXHRSynchronously): (WebCore::InspectorResourceAgent::getResourceContent): (WebCore::InspectorResourceAgent::mainFrameNavigated): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: Added. (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::content): (WebCore::NetworkResourcesData::ResourceData::appendContent): (WebCore::NetworkResourcesData::ResourceData::purgeContent): (WebCore::NetworkResourcesData::NetworkResourcesData): (WebCore::NetworkResourcesData::~NetworkResourcesData): (WebCore::NetworkResourcesData::resourceCreated): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::didReceiveXHRResponse): (WebCore::NetworkResourcesData::addResourceContent): (WebCore::NetworkResourcesData::isXHR): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::ensureNoDataForIdentifier): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: Added. (WebCore::NetworkResourcesData::ResourceData::identifier): (WebCore::NetworkResourcesData::ResourceData::loaderId): (WebCore::NetworkResourcesData::ResourceData::frameId): (WebCore::NetworkResourcesData::ResourceData::setFrameId): (WebCore::NetworkResourcesData::ResourceData::url): (WebCore::NetworkResourcesData::ResourceData::setUrl): (WebCore::NetworkResourcesData::ResourceData::isXHR): (WebCore::NetworkResourcesData::ResourceData::setIsXHR): (WebCore::NetworkResourcesData::ResourceData::hasContent): (WebCore::NetworkResourcesData::ResourceData::isContentPurged): (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._appendResource): (WebInspector.NetworkPanel.prototype._frameNavigated): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::receivedCancellation): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didReceiveResponse): (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse): (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.cpp: (WebCore::workerContextDidReceiveResponse): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): (WebCore::workerContextDidReceiveAuthenticationCancellation): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.h: * notifications/Notification.cpp: (WebCore::Notification::didReceiveResponse): (WebCore::Notification::didReceiveAuthenticationCancellation): * notifications/Notification.h: * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): * page/EventSource.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didReceiveResponse): (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation): * workers/WorkerScriptLoader.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::didReceiveResponse): (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation): * xml/XMLHttpRequest.h: 2011-06-16 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Darin Adler. HTMLTable should cache its 'rows' collection results https://bugs.webkit.org/show_bug.cgi?id=62800 Test: perf/table-rows-length-caching.html Currently all our HTMLCollection's are recreated on call. This means that we don't cache the information about the collection between calls to, for example, table.rows. This change adds a CollectionCache to HTMLTableElement. It is similar to what is done for HTMLFormElement. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::collectionCache): This method does lazy initialization of the table's collectionCache. * html/HTMLTableElement.h: Added a new member and the previous method. * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Pass the HTMLTableElement's CollectionCache so that we reuse the cached results. 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89025. http://trac.webkit.org/changeset/89025 https://bugs.webkit.org/show_bug.cgi?id=62799 "Some layout tests fail" (Requested by yurys on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::didReceiveResponse): * fileapi/FileReaderLoader.h: * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: Removed. * inspector/NetworkResourcesData.h: Removed. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._appendResource): (WebInspector.NetworkPanel.prototype._frameNavigated): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::receivedCancellation): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didReceiveResponse): (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse): (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.cpp: (WebCore::workerContextDidReceiveResponse): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): (WebCore::workerContextDidReceiveAuthenticationCancellation): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.h: * notifications/Notification.cpp: (WebCore::Notification::didReceiveResponse): (WebCore::Notification::didReceiveAuthenticationCancellation): * notifications/Notification.h: * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): * page/EventSource.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didReceiveResponse): (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation): * workers/WorkerScriptLoader.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::didReceiveResponse): (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation): * xml/XMLHttpRequest.h: 2011-06-16 Vitaly Repeshko <vitalyr@chromium.org> Unreviewed. Revert Adam's user gesture patch series r89002, r89005, r89007, r89018 https://bugs.webkit.org/show_bug.cgi?id=62796 The patches broke chromium browser tests. * WebCore.exp.in: * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): (WebCore::ScriptController::isJavaScriptAnchorNavigation): * bindings/js/ScriptController.h: (WebCore::ScriptController::setProcessingTimerCallback): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): * bindings/v8/ScriptController.h: (WebCore::ScriptController::setProcessingTimerCallback): * dom/Event.cpp: (WebCore::Event::fromUserGesture): * dom/Event.h: * dom/UserGestureIndicator.cpp: (WebCore::UserGestureIndicator::UserGestureIndicator): (WebCore::UserGestureIndicator::~UserGestureIndicator): * dom/UserGestureIndicator.h: (WebCore::UserGestureIndicator::processingUserGesture): (WebCore::UserGestureIndicator::getUserGestureState): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removedFromDocument): (WebCore::HTMLMediaElement::load): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): (WebCore::HTMLMediaElement::beginScrubbing): (WebCore::HTMLMediaElement::resume): (WebCore::HTMLMediaElement::processingUserGesture): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::webkitEnterFullscreen): * html/HTMLVideoElement.h: (WebCore::HTMLVideoElement::webkitEnterFullScreen): * html/HTMLVideoElement.idl: * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): 2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs. https://bugs.webkit.org/show_bug.cgi?id=61205 Added inspector backend cache for XHR content. Tests: http/tests/inspector/network/network-xhr-async.html http/tests/inspector/network/network-xhr-sync.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::didReceiveResponse): * fileapi/FileReaderLoader.h: * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl): (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl): (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl): (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveXHRResponse): (WebCore::InspectorInstrumentation::willLoadXHRSynchronously): (WebCore::InspectorInstrumentation::didLoadXHRSynchronously): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::didReceiveXHRResponse): (WebCore::InspectorResourceAgent::willLoadXHRSynchronously): (WebCore::InspectorResourceAgent::didLoadXHRSynchronously): (WebCore::InspectorResourceAgent::getResourceContent): (WebCore::InspectorResourceAgent::mainFrameNavigated): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: Added. (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::content): (WebCore::NetworkResourcesData::ResourceData::appendContent): (WebCore::NetworkResourcesData::ResourceData::purgeContent): (WebCore::NetworkResourcesData::NetworkResourcesData): (WebCore::NetworkResourcesData::~NetworkResourcesData): (WebCore::NetworkResourcesData::resourceCreated): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::didReceiveXHRResponse): (WebCore::NetworkResourcesData::addResourceContent): (WebCore::NetworkResourcesData::isXHR): (WebCore::NetworkResourcesData::data): (WebCore::NetworkResourcesData::clear): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: Added. (WebCore::NetworkResourcesData::ResourceData::identifier): (WebCore::NetworkResourcesData::ResourceData::loaderId): (WebCore::NetworkResourcesData::ResourceData::frameId): (WebCore::NetworkResourcesData::ResourceData::setFrameId): (WebCore::NetworkResourcesData::ResourceData::url): (WebCore::NetworkResourcesData::ResourceData::setUrl): (WebCore::NetworkResourcesData::ResourceData::isXHR): (WebCore::NetworkResourcesData::ResourceData::setIsXHR): (WebCore::NetworkResourcesData::ResourceData::hasContent): (WebCore::NetworkResourcesData::ResourceData::isContentPurged): (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._appendResource): (WebInspector.NetworkPanel.prototype._frameNavigated): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::receivedCancellation): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didReceiveResponse): (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse): (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.cpp: (WebCore::workerContextDidReceiveResponse): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): (WebCore::workerContextDidReceiveAuthenticationCancellation): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.h: * notifications/Notification.cpp: (WebCore::Notification::didReceiveResponse): (WebCore::Notification::didReceiveAuthenticationCancellation): * notifications/Notification.h: * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): * page/EventSource.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didReceiveResponse): (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation): * workers/WorkerScriptLoader.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::didReceiveResponse): (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation): * xml/XMLHttpRequest.h: 2011-06-16 Hayato Ito <hayato@chromium.org> Reviewed by Hajime Morita. Show child elements of a shadow host in Node::showTreeForThisAcrossFrame. https://bugs.webkit.org/show_bug.cgi?id=62782 To make an implementation simple, get rid of traverseNextNodeAcrossFrame and traverse each Node recursively. No new tests since the function is only available in debug builds. * dom/Node.cpp: (WebCore::showSubTreeAcrossFrame): (WebCore::Node::showTreeForThisAcrossFrame): 2011-06-16 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kent Tamura. [EFL] Move Initialization of defaultFontSize to top of file. https://bugs.webkit.org/show_bug.cgi?id=62787 * platform/efl/RenderThemeEfl.cpp: Move Initialize code of defaultFontSize to top. 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88796. http://trac.webkit.org/changeset/88796 https://bugs.webkit.org/show_bug.cgi?id=62790 It made fast/dom/nodesFromRect-basic.html time out on Qt, 64-bit, debug mode (Requested by Ossy on #webkit). * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): 2011-06-16 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove HTMLVideoElement::processingUserGesture https://bugs.webkit.org/show_bug.cgi?id=62784 HTMLMediaElement shouldn't have its own notion of the user gesture state. It should just use the normal user gesture state. Also, there's no point in having the bindings send the user gesture state in a boolean parameter. * WebCore.exp.in: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removedFromDocument): (WebCore::HTMLMediaElement::load): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): (WebCore::HTMLMediaElement::beginScrubbing): (WebCore::HTMLMediaElement::resume): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::webkitEnterFullscreen): * html/HTMLVideoElement.h: (WebCore::HTMLVideoElement::webkitEnterFullScreen): * html/HTMLVideoElement.idl: * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler): 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r89011. http://trac.webkit.org/changeset/89011 https://bugs.webkit.org/show_bug.cgi?id=62789 Broke mac build (Requested by vitalyr_ on #webkit). * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::scroll): (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::snapRubberBand): (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: 2011-06-16 Sailesh Agrawal <sail@chromium.org> Reviewed by James Robinson. [Chromium] Update forked ScrollAnimatorChromiumMac.mm/h https://bugs.webkit.org/show_bug.cgi?id=62779 Updated ScrollAnimatorChromiumMac.mm/h with the latest code in WebCore/platform/mac/ScrollAnimatorMac.mm/h * platform/chromium/ScrollAnimatorChromiumMac.h: (WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate): (WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate): * platform/chromium/ScrollAnimatorChromiumMac.mm: (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::scroll): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation): (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::snapRubberBand): (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorChromiumMac::setIsActive): (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterControllerStyle): 2011-06-15 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Pavel Feldman. WebInspector [Chromium]: Make heap snapshots UI more responsive. https://bugs.webkit.org/show_bug.cgi?id=62360 Two changes have been made: - when we request elements, sort array only partially; - when populating children, do it in batches; * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotFilteredOrderedIterator): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort): (WebInspector.HeapSnapshotNodesProvider.prototype.sort): * inspector/front-end/HeapSnapshotWorker.js: * inspector/front-end/PartialQuickSort.js: Added. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-06-15 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove Event::fromUserGesture https://bugs.webkit.org/show_bug.cgi?id=62778 This function is a remnant from the old user-gesture design. The list of events here is redundant with our selection of call sites for setting the user gesture indicator. As part of this patch, I've also cleaned up the implementation of UserGestureIndicator itself to always be definite about whether we're processing a user gesture. We now start out in a definite state (no user gesture) and inductively state in a definite state. * WebCore.exp.in: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): * dom/Event.cpp: * dom/Event.h: * dom/UserGestureIndicator.cpp: (WebCore::isDefinite): (WebCore::UserGestureIndicator::UserGestureIndicator): (WebCore::UserGestureIndicator::~UserGestureIndicator): * dom/UserGestureIndicator.h: (WebCore::UserGestureIndicator::processingUserGesture): * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): 2011-06-08 Keishi Hattori <keishi@webkit.org> Reviewed by Kent Tamura. Fix range element not updating when value attribute is set with JS https://bugs.webkit.org/show_bug.cgi?id=61857 Test: fast/forms/range-set-attribute.html * html/RangeInputType.cpp: (WebCore::RangeInputType::minOrMaxAttributeChanged): Changed to only sanitize the value when the dirty value flag is true. 2011-06-15 Adam Barth <abarth@webkit.org> Unreviewed. (Technically I should get this reviewed, but I accidentally committed part of this patch in my previous commit, causing a build break.) Remove ScriptController::m_processingTimerCallback https://bugs.webkit.org/show_bug.cgi?id=62776 This variable is unused. (It used to be used in a user gesture detection hack.) * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): * bindings/js/ScriptController.h: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): * bindings/v8/ScriptController.h: 2011-06-15 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. [Chromium][Qt] Some slider clicking tests fail. https://bugs.webkit.org/show_bug.cgi?id=62683 When we pressed a mouse button on a slider thumb, SliderThumbElement::startDragging() were called twice. - From SliderThumbElement::defaultEventHandler(), and - from RangeInputType::handleMouseDownEvent() The latter is not needed. We should call setDefaultHandled() correctly. * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): Calls setDefaultHandled() * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): Remove FIXME comments. (WebCore::SliderThumbElement::defaultEventHandler): Calls setDefaultHandled() 2011-06-15 Adam Barth <abarth@webkit.org> Reviewed by Anders Carlsson. Remove ScriptController::isJavaScriptAnchorNavigation https://bugs.webkit.org/show_bug.cgi?id=62775 This function no longer plays a role in the user gesture code now that we're not encoding the user gesture state into the ScriptSourceCode URL. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): * bindings/js/ScriptController.h: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): 2011-06-15 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove ScriptController::setAllowPopupsFromPlugin https://bugs.webkit.org/show_bug.cgi?id=62706 This API is just a poor man's UserGestureIndicator. We should use the real deal. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): * bindings/js/ScriptController.h: * bindings/v8/NPV8Object.cpp: (_NPN_EvaluateHelper): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): * bindings/v8/ScriptController.h: 2011-06-15 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove forceUserGesture bool in favor of UserGestureIndicator https://bugs.webkit.org/show_bug.cgi?id=62702 This patch is an intermediate step towards removing the forceUserGesture bool. In this patch, we use the user gesture indicator to store the gesture state instead of encoding it in the URL of the script source code. In a future patch, we'll push the indicator higher up the stack, closer to the reason for setting it. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): (WebCore::ScriptController::executeIfJavaScriptURL): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::executeScriptInWorld): 2011-06-15 Rob Buis <rbuis@rim.com> Reviewed by Darin Adler. Try to use fastGetAttribute where possible https://bugs.webkit.org/show_bug.cgi?id=62747 Use the fast versions of get/hasAttribute where we can. No new tests since this is a simple cleanup. * svg/SVGAElement.cpp: (WebCore::SVGAElement::title): (WebCore::SVGAElement::defaultEventHandler): * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::glyphRef): (WebCore::SVGAltGlyphElement::format): (WebCore::SVGAltGlyphElement::glyphElement): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::rotateMode): (WebCore::SVGAnimateMotionElement::animationPath): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::animationMode): (WebCore::SVGAnimationElement::calcMode): (WebCore::SVGAnimationElement::attributeType): (WebCore::SVGAnimationElement::toValue): (WebCore::SVGAnimationElement::byValue): (WebCore::SVGAnimationElement::fromValue): (WebCore::SVGAnimationElement::isAdditive): (WebCore::SVGAnimationElement::isAccumulated): (WebCore::SVGAnimationElement::startedActiveInterval): * svg/SVGElement.cpp: (WebCore::SVGElement::xmlbase): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::ensureGlyphCache): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::unitsPerEm): (WebCore::SVGFontFaceElement::xHeight): (WebCore::SVGFontFaceElement::horizontalOriginX): (WebCore::SVGFontFaceElement::horizontalOriginY): (WebCore::SVGFontFaceElement::horizontalAdvanceX): (WebCore::SVGFontFaceElement::verticalOriginX): (WebCore::SVGFontFaceElement::verticalOriginY): (WebCore::SVGFontFaceElement::verticalAdvanceY): (WebCore::SVGFontFaceElement::ascent): (WebCore::SVGFontFaceElement::descent): * svg/SVGFontFaceNameElement.cpp: (WebCore::SVGFontFaceNameElement::srcValue): * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::srcValue): (WebCore::SVGFontFaceUriElement::loadFont): * svg/SVGGlyphElement.cpp: (WebCore::parseSVGGlyphAttribute): (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier): (WebCore::SVGGlyphElement::buildGlyphIdentifier): * svg/SVGHKernElement.cpp: (WebCore::SVGHKernElement::buildHorizontalKerningPair): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::contentScriptType): (WebCore::SVGSVGElement::contentStyleType): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::type): (WebCore::SVGStyleElement::media): (WebCore::SVGStyleElement::title): * svg/SVGVKernElement.cpp: (WebCore::SVGVKernElement::buildVerticalKerningPair): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::insertedIntoDocument): (WebCore::SVGSMILElement::parseMappedAttribute): (WebCore::SVGSMILElement::restart): (WebCore::SVGSMILElement::fill): (WebCore::SVGSMILElement::xlinkHref): (WebCore::SVGSMILElement::dur): (WebCore::SVGSMILElement::repeatDur): (WebCore::SVGSMILElement::repeatCount): (WebCore::SVGSMILElement::maxValue): (WebCore::SVGSMILElement::minValue): 2011-06-15 Abhishek Arya <inferno@chromium.org> Reviewed by Antti Koivisto. Revert speculative fix in r84151. It caused some issues with stylesheet lifetimes. https://bugs.webkit.org/show_bug.cgi?id=62586 Tests: fast/dom/body-clone-link-decl-parent-crash.html fast/dom/styled-clone-inline-style-decl-parent-crash.html fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html * dom/Document.cpp: (WebCore::Document::removedLastRef): 2011-06-15 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kent Tamura. [EFL] Implement animationXXX functions for Progress Tag https://bugs.webkit.org/show_bug.cgi?id=62713 Progress tag need to implement acnimationXXX functions in order to show animation of progress tag. Because, RenderProgress decides to show update progress bar's animation according to the functions. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar): (WebCore::RenderThemeEfl::animationDurationForProgressBar): * platform/efl/RenderThemeEfl.h: 2011-06-15 Sam Weinig <sam@webkit.org> Reviewed by Alexey Proskuryakov. Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache https://bugs.webkit.org/show_bug.cgi?id=62764 This is an non-reproducible high volume crash, so no test :(. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): Be conservative and stop loading when we detach a document loader from a frame. 2011-06-15 Beth Dakin <bdakin@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=62746 Crash possible when switching scrollbar appearance preference on Mac -and corresponding- <rdar://problem/9323983> This crash happens because the current mechanism that is intended to flag ScrollAnimators as being in the page cache or not does not work correctly. Long-term the fix for this is to move the ScrollableArea HashSet to a more appropriate place. In the meantime, this patch addresses the crash by getting rid of the m_isActive bool on ScrollAnimator that was intended to represent whether or not the ScrollableArea is in the page cache. Instead, ScrollableArea implementations now have their own functions to compute whether they are in active pages. ScrollAnimator::setIsActive() needs to be kept around even though there is no bool to flip anymore because scrollbars may need to be properly updated if the appearance was switched while the document was in the page cache. No longer call FrameView::setAnimatorsAreActive() from Document::setIsInPageCache(), instead call it in Document::documentDidBecomeActive() * dom/Document.cpp: (WebCore::Document::setInPageCache): (WebCore::Document::documentDidBecomeActive): ScrollableAreas can now assess whether or not they are on active pages (ie, not in the page cache). * platform/ScrollableArea.h: (WebCore::ScrollableArea::isOnActivePage): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::isOnActivePage): * rendering/RenderLayer.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::isOnActivePage): * rendering/RenderListBox.h: A FrameView cannot access its Document when it's in the page cache, so it usually determines whether it's in the page cache by checking if its frame points to a FrameView other than itself. * page/FrameView.cpp: (WebCore::FrameView::isOnActivePage): Make sure ScrollableAreas are on active pages before setting them as active. This will not be necessary when the HashSet become a per-web page HashSet. (WebCore::FrameView::setAnimatorsAreActive): * page/FrameView.h: ScrollAnimator no longer tracks the m_isActive bool. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::ScrollAnimator): * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::setIsActive): setIsActive() now exclusively calls updateScrollStyle() if there is a pending need to do so. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::setIsActive): Return early if the ScrollableArea is in the page cache. (WebCore::ScrollAnimatorMac::updateScrollerStyle): 2011-06-15 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Have Document keep track of whether scroll listeners are registered https://bugs.webkit.org/show_bug.cgi?id=62757 To avoid extra work dispatching scroll events when there are no listeners, have Document keep track of whether any scroll listeners are registered, just like it does for some other event types. * dom/Document.cpp: (WebCore::Document::addListenerTypeIfNeeded): * dom/Document.h: * dom/EventQueue.cpp: (WebCore::EventQueue::enqueueOrDispatchScrollEvent): 2011-06-15 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Adam Barth. Clarify FileChooser creation code. https://bugs.webkit.org/show_bug.cgi?id=62756 initialize() method is only used once and that is not obvious, so just fold it into the create method. Refactoring, no change in behavior. * platform/FileChooser.cpp: (WebCore::FileChooser::create): Folded initialize() code there. * platform/FileChooser.h: Removed decl. 2011-06-15 Eric Carlson <eric.carlson@apple.com> Reviewed by Alexey Proskuryakov. MediaPlayerPrivate should not know about application cache https://bugs.webkit.org/show_bug.cgi?id=62648 Test: http/tests/appcache/video.html * html/HTMLMediaElement.cpp: (WebCore::createFileURLForApplicationCacheResource): Create a url for a file in the application cache folder. (WebCore::HTMLMediaElement::loadResource): Change url to point to file in the application cache if necessary. (WebCore::HTMLMediaElement::mediaLoadingFailed): Split failure logic out of setNetworkState so it can be called when asked to load a file that is not in the application cache. (WebCore::HTMLMediaElement::setNetworkState): Move failure logic out to mediaLoadingFailed. * html/HTMLMediaElement.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Remove app cache logic. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Ditto. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::loadInternal): Ditto. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal): Ditto. 2011-06-15 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: indexedDB.open() name argument is required https://bugs.webkit.org/show_bug.cgi?id=62398 Test: storage/indexeddb/database-name-undefined.html * storage/IDBFactory.idl: use appropriate IDL magic to force undefined values to null, so we handle missing arguments as well as null arguments 2011-06-15 Tony Chang <tony@chromium.org> Reviewed by Ojan Vafai. Rename RenderFlexibleBox to RenderDeprecatedFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=62670 * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.order: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/shadow/MediaControlElements.cpp: (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay): (WebCore::RenderMediaControlTimeDisplay::layout): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderContainer::RenderSliderContainer): (WebCore::RenderSliderContainer::layout): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::createAnonymousBlock): * rendering/RenderBox.cpp: * rendering/RenderButton.cpp: (WebCore::RenderButton::RenderButton): (WebCore::RenderButton::addChild): (WebCore::RenderButton::removeChild): * rendering/RenderButton.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::FlexBoxIterator::FlexBoxIterator): (WebCore::FlexBoxIterator::reset): (WebCore::FlexBoxIterator::first): (WebCore::FlexBoxIterator::next): (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox): (WebCore::RenderDeprecatedFlexibleBox::~RenderDeprecatedFlexibleBox): (WebCore::marginWidthForChild): (WebCore::RenderDeprecatedFlexibleBox::calcHorizontalPrefWidths): (WebCore::RenderDeprecatedFlexibleBox::calcVerticalPrefWidths): (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths): (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): (WebCore::gatherFlexChildrenInfo): (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): (WebCore::RenderDeprecatedFlexibleBox::placeChild): (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex): (WebCore::RenderDeprecatedFlexibleBox::renderName): * rendering/RenderDeprecatedFlexibleBox.h: (WebCore::RenderDeprecatedFlexibleBox::avoidsFloats): (WebCore::RenderDeprecatedFlexibleBox::isFlexibleBox): (WebCore::RenderDeprecatedFlexibleBox::isFlexingChildren): (WebCore::RenderDeprecatedFlexibleBox::isStretchingChildren): (WebCore::RenderDeprecatedFlexibleBox::hasMultipleLines): (WebCore::RenderDeprecatedFlexibleBox::isVertical): (WebCore::RenderDeprecatedFlexibleBox::isHorizontal): * rendering/RenderDetails.h: Removed the header since it wasn't actually needed. Looks like a copy/paste error from RenderButton.h. * rendering/RenderFullScreen.cpp: (RenderFullScreen::RenderFullScreen): (RenderFullScreen::destroy): * rendering/RenderFullScreen.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::RenderMenuList): (WebCore::RenderMenuList::createInnerBlock): (WebCore::RenderMenuList::removeChild): * rendering/RenderMenuList.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderingAllInOne.cpp: 2011-06-15 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Serious performance regression during continuous focused element style updates https://bugs.webkit.org/show_bug.cgi?id=61038 Inline style invalidation events are coalesced in the backend and sent over the wire on timer. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::RevalidateStyleAttributeTask::onTimer): (WebCore::InspectorDOMAgent::getAttributes): (WebCore::InspectorDOMAgent::didModifyDOMAttr): (WebCore::InspectorDOMAgent::styleAttributeInvalidated): * inspector/InspectorDOMAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheetForInlineStyle::didModifyElementAttribute): (WebCore::InspectorStyleSheetForInlineStyle::text): (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): (WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): * inspector/InspectorStyleSheet.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent): (WebInspector.DOMAgent.prototype._attributesUpdated): (WebInspector.DOMAgent.prototype._loadNodeAttributesSoon): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMDispatcher.prototype.attributesUpdated): (WebInspector.DOMDispatcher.prototype.inlineStyleInvalidated): 2011-06-15 Jer Noble <jer.noble@apple.com> Reviewed by Timothy Hatcher. Full-screen live streams have status text in wrong location https://bugs.webkit.org/show_bug.cgi?id=62733 Fix a misspelling in the user-agent stylesheet for full-screen mode. * css/fullscreenQuickTime.css: (video:-webkit-full-screen::-webkit-media-controls-status-display): 2011-06-14 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. (AVFoundation) Apple event video appears as live stream and is not seekable https://bugs.webkit.org/show_bug.cgi?id=62694 No new tests; There are no media-player port specific tests yet. Work around a bug in apple.com live stream javascript controller library. When an AVAsset returns an indefinite time for its duration, return 0 if the asset has no tracks, and infinity otherwise. This keeps the apple.com controller from identifying the stored stream as a live stream. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): 2011-06-15 Andrey Kosyakov <caseq@chromium.org> Unreviewed, rolled out r88937 (broke build on mac) * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::didReceiveResponse): * fileapi/FileReaderLoader.h: * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::setInitialXHRContent): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: Removed. * inspector/NetworkResourcesData.h: Removed. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._appendResource): (WebInspector.NetworkPanel.prototype._frameNavigated): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::receivedCancellation): (WebCore::DocumentThreadableLoader::loadRequest): * loader/DocumentThreadableLoader.h: * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse): (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.cpp: (WebCore::workerContextDidReceiveResponse): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): (WebCore::workerContextDidReceiveAuthenticationCancellation): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.h: * notifications/Notification.cpp: (WebCore::Notification::didReceiveResponse): (WebCore::Notification::didReceiveAuthenticationCancellation): * notifications/Notification.h: * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): * page/EventSource.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::didReceiveResponse): (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation): * xml/XMLHttpRequest.h: 2011-06-15 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: introduce context menu on ImageView with Copy and Open in new tab actions. https://bugs.webkit.org/show_bug.cgi?id=62727 * English.lproj/localizedStrings.js: * inspector/front-end/ImageView.js: (WebInspector.ImageView.prototype._base64ToSize): (WebInspector.ImageView.prototype._contextMenu): (WebInspector.ImageView.prototype._copyImageURL): (WebInspector.ImageView.prototype._openInNewTab): 2011-06-15 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. Web Inspector: provide unique identifiers for frames https://bugs.webkit.org/show_bug.cgi?id=62721 * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDestroyedImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameDestroyed): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameForId): (WebCore::InspectorPageAgent::frameId): (WebCore::InspectorPageAgent::frameDestroyed): * inspector/InspectorPageAgent.h: * page/Frame.cpp: (WebCore::Frame::~Frame): 2011-06-15 Andrey Kosyakov <caseq@chromium.org> Unreviewed build fix: comment unused parameter names. * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didReceiveResponse): (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation): 2011-06-15 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: script select can be too wide. https://bugs.webkit.org/show_bug.cgi?id=62701 * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._displayNameForScriptURL): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/SourceFile.js: 2011-06-15 Noel Gordon <noel.gordon@gmail.com> Reviewed by Eric Seidel. Draw CSS outline style for render widgets: iframe, embed, object, applet. https://bugs.webkit.org/show_bug.cgi?id=57439 Draw CSS outlines for render widgets: iframe, embed, object, applet. These elements can be focused (via clicks or tabIndex) but should not have a visible focus ring by default. Tests: fast/replaced/no-focus-ring-embed.html fast/replaced/no-focus-ring-iframe.html fast/replaced/no-focus-ring-object.html fast/replaced/outline-replaced-elements.html * css/html.css: (applet:focus, embed:focus, iframe:focus, object:focus): Default to no focus ring. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): Paint the render widget CSS outline style. 2011-06-15 Steve Block <steveblock@google.com> Reviewed by Tony Gentilcore. V8PerformanceCustom.cpp lacks WEB_TIMING guards https://bugs.webkit.org/show_bug.cgi?id=62689 No new tests, build fix only. * bindings/v8/custom/V8PerformanceCustom.cpp: 2011-06-15 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88916. http://trac.webkit.org/changeset/88916 https://bugs.webkit.org/show_bug.cgi?id=62728 Broke a bunch of layout tests on chromium (Requested by podivilov on #webkit). * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/SourceFile.js: (WebInspector.SourceFile.prototype.get displayName): 2011-06-15 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: script links are displayed with original line number in pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=62282 * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.registerAnchor): (WebInspector.DebuggerPresentationModel.prototype._updateAnchor.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype.showAnchorLocation): (WebInspector.NetworkPanel.prototype._showResource): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.createAnchor): (WebInspector.Panel.prototype.formatAnchorText): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.createAnchor.): (WebInspector.ScriptsPanel.prototype.createAnchor): (WebInspector.ScriptsPanel.prototype.showAnchorLocation.didGetUILocation): (WebInspector.ScriptsPanel.prototype.showAnchorLocation): * inspector/front-end/inspector.js: (WebInspector._showAnchorLocation): (WebInspector.linkifyResourceAsNode): 2011-06-14 Hans Wennborg <hans@chromium.org> Reviewed by Tony Gentilcore. IndexedDB: Use fileExists() first when checking if SQLite db exists https://bugs.webkit.org/show_bug.cgi?id=62638 In IDBSQLiteBackingStore::backingStoreExists(), which is used to check if a SQLite database exists and should be considered for migration, check if the file exists first. Trying to open a SQLite database for a non-existing file prints a noisy error message in debug builds. No new functionality, no new tests. * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::backingStoreExists): 2011-06-14 Alexander Pavlov <apavlov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: "data" URLs not detected in CSS url(...) values properly https://bugs.webkit.org/show_bug.cgi?id=62643 * inspector/front-end/inspector.js: (WebInspector.completeURL): 2011-06-15 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: [REGRESSION] errors in watches and in console are not rendered in red. https://bugs.webkit.org/show_bug.cgi?id=62708 Test: inspector/debugger/error-in-watch-expressions.html * inspector/front-end/RemoteObject.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update.appendResult): (WebInspector.WatchExpressionsSection.prototype.update): (WebInspector.WatchExpressionTreeElement.prototype.update): * inspector/front-end/inspector.css: (.console-error-level .console-message-text, .console-error-level .section .header .title): (.console-formatted-object, .console-formatted-node): 2011-06-15 Carlos Garcia Campos <cgarcia@igalia.com> Unreviewed. Remove unneeded constructor declaration added by mistake in r88800. * platform/gtk/GtkAuthenticationDialog.h: 2011-06-15 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: script select can be too wide. https://bugs.webkit.org/show_bug.cgi?id=62701 * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._displayNameForScriptURL): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/SourceFile.js: 2011-06-15 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by David Hyatt. CSS 2.1: Support replaced elements with relative intrinsic sizes https://bugs.webkit.org/show_bug.cgi?id=15849 CSS 2.1 failure: html4/replaced-intrinsic-ratio-001 https://bugs.webkit.org/show_bug.cgi?id=53099 Generalize the recently added SVG specific host <-> embedded document size-negotiation used to support embedding SVGs with intrinsic ratio/size via <iframe>/<object>/<embed> from RenderPart right into RenderReplaced. It will be used to share the size-negotiation logic with RenderImage, which still has its own way to negotiate with the embedded SVG to figure out its size (and it's broken in several ways). This fully implements intrinsic size/ratio support for replaced elements, as specified in: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height RenderImage has not yet been converted to use the new size negotiation logic, this is just the ground work. As soon as this is done all ways of embedding SVG is unified in a single way: the same size negotiation logic used for object/embed/iframe/img for SVG documents. To use it for non-SVG target documents, it's just a matter of implementing "RenderBox* embeddedContentBox()" which needs to return the root renderer of the embedded document. For SVG it's the embedded document RenderSVGRoot renderer, associated with the outermost <svg> element. It's easy to implement this for embedded MathML documents or PDF documents now, if needed. Imported all CSS 2.1 tests named *replaced* and *intrinsic* tests, except the still failing background-intrinsic-* which embed SVGs through background-image or <img>, which still use the old size-negotiation logic. Tests: css2.1/20110323/* (203 tests + support files) svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm (same as replaced-intrinsic-ratio-001.htm, but zooms in a few times, to see whether all boxes react properly) http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm (same as replaced-intrinsic-ratio-001.htm, but with delayed loading of the SVG to test late-size-negotiation) This fixes: css2.1/20110323/replaced-intrinsic-ratio-001.htm css2.1/20110323/replaced-intrinsic-003.htm css2.1/20110323/block-replaced-height-007.htm css2.1/20110323/float-replaced-height-007.htm css2.1/20110323/inline-block-replaced-height-007.htm css2.1/20110323/inline-replaced-height-007.htm We're now the first to properly handle replaced-intrinsic-ratio-001.htm out of Opera/FF/IE9 :-) This is an important piece of embedding SVGs though, so glad that we finally have it. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): Use new helper needsPreferredWidthsRecalculation() to figure out whether pref widths need to be calculated. (WebCore::RenderBlock::layoutPositionedObjects): Ditto. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): Ditto. * rendering/RenderBox.cpp: (WebCore::RenderBox::needsPreferredWidthsRecalculation): Refactored and extended from RenderBlock*. We have to recalculate pref widths upon layout if we embed a document with an intrinsic ratio/size, extensively covered by svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm * rendering/RenderBox.h: (WebCore::RenderBox::computeIntrinsicRatioInformation): New virtual function, only implemented in RenderPart so far. This generalizes the existing method from RenderPart. * rendering/RenderPart.cpp: (WebCore::RenderPart::needsPreferredWidthsRecalculation): Always recompute pref widths of we have an embeddedContentBox() - it may depend on our size. (WebCore::RenderPart::embeddedContentBox): Return the RenderSVGRoot box of the embedded SVG document, if we're embedded through object/embed/iframe (soon img as well). * rendering/RenderPart.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeIntrinsicLogicalWidth): New helper function, that either returns a fixed intrinsic size (set by a class inheriting from us) or the embedded target document size. (WebCore::RenderReplaced::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderReplaced::computeReplacedLogicalWidth): Full implementation of: 10.3.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width. (WebCore::RenderReplaced::computeReplacedLogicalHeight): Full implementation of: 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height * rendering/RenderReplaced.h: (WebCore::RenderReplaced::embeddedContentBox): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Fix problem when zooming replaced-intrinsic-ratio-001.htm: if ownerWidth is auto, don't apply style()->effectiveZoom() twice. (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto for ownerHeight auto. * rendering/svg/RenderSVGRoot.h: Mark 'computeIntrinsicRatioInformation' virtual. 2011-06-09 MORITA Hajime <morrita@google.com> Reviewed by Dimitri Glazkov. ShadowContentElement should detach its inclusions before attaching them. https://bugs.webkit.org/show_bug.cgi?id=62428 - On ShadowContentElement::attach(), changed inclusion attach scheme from per-node reattach() to detach()-all-and-attach()-them. This eliminates attach() order problems which ShadowContentElement possibly has. - Changed ShadowContentElement to have m_inclusions as a member variable, which will be used by upcoming changes. - Moved attach() code from ShadowContentSelector to ShadowContentElement because the element now owns the inclusion list. No new tests. No visible behavioral change yet. * dom/ShadowContentElement.cpp: (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): Added. * dom/ShadowContentElement.h: (WebCore::ShadowContentElement::inclusionAt): Added. (WebCore::ShadowContentElement::inclusionCount): Added. (WebCore::toShadowContentElement): * dom/ShadowContentSelector.cpp: Removed attachChildrenFor() (WebCore::ShadowContentSelector::selectInclusion): Extracted from attachChildrenFor() (WebCore::ShadowContentSelector::willAttachContentFor): Extracted from attachChildrenFor() (WebCore::ShadowContentSelector::didAttachContent): Extracted from attachChildrenFor() (WebCore::ShadowContentSelector::activeElement): * dom/ShadowContentSelector.h: 2011-06-14 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/62677> Part 2/2: Remove duplicate header entries in WebCore project file Reviewed by Darin Adler. Most of the DOMSVG*.h headers were added in late 2006, and then duplicated by late 2007. They've been in the tree a long time. * WebCore.xcodeproj/project.pbxproj: Let Xcode 4 remove duplicate header entries. 2011-06-14 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/62677> Part 1/2: Remove duplicate header entries in WebCore project file Reviewed by Darin Adler. These headers were added as duplicates in r83256: DefaultAudioDestinationNode.h JSOfflineAudioCompletionEvent.h OfflineAudioCompletionEvent.h OfflineAudioDestinationNode.h The following duplicates were introduced in r84053 (after having been originally added in r83729): StorageInfo.h StorageInfoErrorCallback.h StorageInfoQuotaCallback.h StorageInfoUsageCallback.h * WebCore.xcodeproj/project.pbxproj: Remove duplicates using 'uniq' since sort-Xcode-project-file did most of the work. 2011-06-14 Kent Tamura <tkent@chromium.org> Reviewed by Hajime Morita. REGRESSION(r88757): [Chromium] Vertical position of media slider thumb is wrong. https://bugs.webkit.org/show_bug.cgi?id=62685 No new tests. Covered by existing tests. * rendering/RenderSlider.cpp: (WebCore::RenderSlider::layout): Center the thumb position. * rendering/RenderSlider.h: 2011-06-14 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kent Tamura. [EFL] Change color initialization with clear color constant https://bugs.webkit.org/show_bug.cgi?id=62691 Some color values are initialized by rbg value. Color constant value is more clear than rgb value. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::RenderThemeEfl): 2011-06-14 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by James Robinson. Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.destination-in.html https://bugs.webkit.org/show_bug.cgi?id=48293 And Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.destination-in.html https://bugs.webkit.org/show_bug.cgi?id=48303 * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyElsewhere): Added CompositeDestinationIn as this is the only one that needs a specific treatment. 2011-06-14 Naoki Takano <takano.naoki@gmail.com> Reviewed by Kent Tamura. [Chromium] Forward modifiers + up/down key events to text field when autofill popup window is shown. https://bugs.webkit.org/show_bug.cgi?id=62350 http://code.google.com/p/chromium/issues/detail?id=61349 Manual test: autofill-popup-shiftupdown.html * manual-tests/chromium/autofill-popup-shiftupdown.hml: Added to check modifier + up/down key is working correctly for text area in autofill popup is shown. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::handleKeyEvent): Check modifier key and menu style to decide if the event should be forwarded or not. 2011-06-14 Annie Sullivan <sullivan@chromium.org> Reviewed by Ryosuke Niwa. Span ID duplicated when pressing enter at beginning of span https://bugs.webkit.org/show_bug.cgi?id=62621 Strip id from cloned span, so that it is not duplicated. Test: editing/inserting/return-key-span-start.html * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): 2011-06-13 Ryosuke Niwa <rniwa@webkit.org> Reviewed by David Hyatt. Trailing tabs in a textarea become unselectable under certain conditions https://bugs.webkit.org/show_bug.cgi?id=54598 The bug was caused by WebKit's erroneously collapsing leading whitespace when white-space is set to pre-wrap. Per CSS 2.1 spec section 16.1.1, leading whitespace should not be removed in this case. See also: http://www.w3.org/TR/CSS2/text.html#white-space-model Fixed the bug by adding an extra argument to shouldCollapseWhiteSpace, indicating whether whitespace is leading or trailing. It defaults to leading because 16.1.1 does not allow allow collapsing of whitespace anywhere but at the end of each line. Test: fast/text/pre-wrap-trailing-tab.html * rendering/RenderBlockLineLayout.cpp: (WebCore::shouldCollapseWhiteSpace): Added WhitespacePosition as an argument. Returns false when whitespacePosition is not TrailingWhitespace even if white-space is pre-wrap. (WebCore::requiresLineBox): Takes WhitespacePosition as an argument and passes it to shouldCollapseWhiteSpace. (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Calls requiresLineBox. (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace): Ditto. (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): Ditto. 2011-06-14 Beth Dakin <bdakin@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=62678 When the window is small enough, the scrollbars are misplaced with painting artifacts, after changing the scrollbar appearance -and corresponding- <rdar://problem/9414015> Get rid of the FrameView implementation of scrollbarStyleChanged(). Its approach is just not good. * page/FrameView.cpp: * page/FrameView.h: Implement scrollbarStyleChanged() on ScrollView instead. And just call updatedScrollbars(). * platform/ScrollView.cpp: (WebCore::ScrollView::scrollbarStyleChanged): * platform/ScrollView.h: Invalidate the old scrollbar before changing it to the new scrollbar. This way when the scrollbar gets smaller, the older, larger pieces still repaint properly. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::updateScrollerStyle): 2011-06-14 Michael Saboff <msaboff@apple.com> Reviewed by Joseph Pecoraro. Incorrect #if[n]def for building without DISPATCH_VM_PRESSURE https://bugs.webkit.org/show_bug.cgi?id=62649 Take 2. The #ifdef DISPATCH_VM_PRESSURE doesn't work. Combined the code inside this #ifdef with the prior #ifndef DISPATCH_SOURCE_TYPE_VM. No functional changes, fixing build issue therefore no tests. * platform/mac/MemoryPressureHandlerMac.mm: 2011-06-14 Jeffrey Pfau <jpfau@apple.com> Reviewed by David Hyatt. Null dereference in WebCore::RenderBlock::splitFlow regarding use of multicol, inline-block, and spanning elements https://bugs.webkit.org/show_bug.cgi?id=60028 Ensure that the parent block of a spanning element, if it is not itself a multicol element, is not inline. Test: fast/multicol/span/span-as-nested-inline-block-child.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::columnsBlockForSpanningElement): 2011-06-14 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. REGRESSION: Drawing video into canvas gets about one frame every 5 seconds (AVFoundation) https://bugs.webkit.org/show_bug.cgi?id=62655 No new tests; we don't have any media-engine specific tests. AVAssetImageGenerator will, by default, return the nearest keyframe. To get the generator to return the image from the current time instead of the nearest keyframe, set the requested time tolerance to zero (which defaults to infinity). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer): 2011-06-14 Eric Uhrhane <ericu@chromium.org> Reviewed by Darin Fisher. Clean up filesystem base path code. https://bugs.webkit.org/show_bug.cgi?id=60218 Change a bunch of url-held-in-a-string parameters into real KURLS and WebURLs. No new tests--no change in functionality. * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::createWriter): (WebCore::DOMFileSystem::createFile): * fileapi/DOMFileSystemBase.cpp: (WebCore::DOMFileSystemBase::getMetadata): (WebCore::DOMFileSystemBase::move): (WebCore::DOMFileSystemBase::copy): (WebCore::DOMFileSystemBase::remove): (WebCore::DOMFileSystemBase::removeRecursively): (WebCore::DOMFileSystemBase::getParent): (WebCore::DOMFileSystemBase::getFile): (WebCore::DOMFileSystemBase::getDirectory): (WebCore::DOMFileSystemBase::readDirectory): * fileapi/DOMFileSystemSync.cpp: (WebCore::DOMFileSystemSync::createFile): (WebCore::DOMFileSystemSync::createWriter): * platform/AsyncFileSystem.cpp: (WebCore::AsyncFileSystem::openFileSystem): * platform/AsyncFileSystem.h: (WebCore::AsyncFileSystem::AsyncFileSystem): 2011-06-14 James Robinson <jamesr@chromium.org> Reviewed by Stephen White. [chromium] Compositor shader initialization is inefficient https://bugs.webkit.org/show_bug.cgi?id=62618 This fixes several issues causing slowdowns in compositor shader initialization, mostly due to lack of parallelism: - Avoid initializing all programs eagerly. We only use two programs on every page, the other programs depend on content and are constructed on demand. - Defer querying uniform locations until draw time. For the eagerly constructed programs (render surface + tiler) this means that the GPU process has a chance to compile the shader while the renderer is busy painting+uploading instead of blocking on shader compilation in order to get uniform locations. - Calls to query COMPILE_STATUS/LINK_STATUS moved behind #ifndef NDEBUG guards since these should never fail in release builds and force synchronous compilation/linking. This also adds a number of TRACE_EVENT()s to make analysing the performance of this bit of code easier. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::borderProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::tilerProgram): (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::loadShader): (WebCore::ProgramBindingBase::createShaderProgram): * platform/graphics/chromium/ProgramBinding.h: (WebCore::ProgramBinding::ProgramBinding): (WebCore::ProgramBinding::initialize): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTex::init): (WebCore::VertexShaderPosTexYUVStretch::init): (WebCore::VertexShaderPos::init): (WebCore::VertexShaderPosTexTransform::init): (WebCore::FragmentTexAlphaBinding::init): (WebCore::FragmentShaderRGBATexAlphaMask::init): (WebCore::FragmentShaderYUVVideo::init): (WebCore::FragmentShaderColor::init): * platform/graphics/chromium/ShaderChromium.h: 2011-06-14 Stephanie Lewis <slewis@apple.com> Rubber stamped by Oliver Hunt. <rdar://problem/9511169> Update order files. Build system change, no change in functionality so no new tests. * WebCore.order: 2011-06-14 Chris Fleizach <cfleizach@apple.com> Reviewed by David Kilzer. VoiceOver cannot navigate the iTunes album view table https://bugs.webkit.org/show_bug.cgi?id=62335 This is a regression from https://bugs.webkit.org/show_bug.cgi?id=57463. Part of that patch made a change so that an ARIA table will only look at it's children and grandchildren for possible rows. That however, doesn't allow arbitrary hierarchies to work with ARIA, like in iTunes album view. Test: platform/mac/accessibility/aria-grid-with-strange-hierarchy.html * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::addChild): (WebCore::AccessibilityARIAGrid::addChildren): * accessibility/AccessibilityARIAGrid.h: 2011-06-14 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88823. http://trac.webkit.org/changeset/88823 https://bugs.webkit.org/show_bug.cgi?id=62652 Broke the Lion build (Requested by estes on #webkit). * platform/mac/MemoryPressureHandlerMac.mm: 2011-06-14 Michael Saboff <msaboff@apple.com> Reviewed by Joseph Pecoraro. Incorrect #if[n]def for building without DISPATCH_VM_PRESSURE https://bugs.webkit.org/show_bug.cgi?id=62649 The #ifdef DISPATCH_VM_PRESSURE actually needs to be #ifndef to handle when DISPATCH_VM_PRESSURE is NOT defined in the system header files. No functional changes, fixing build issue therefore no tests. * platform/mac/MemoryPressureHandlerMac.mm: 2011-06-13 Adrienne Walker <enne@google.com> Reviewed by James Robinson. [chromium] Disable drawing for huge mask layers https://bugs.webkit.org/show_bug.cgi?id=62607 Because masks have a different layer size than the layer they are masking, they are untiled. If they are too large to be contained within a single texture, then they should just be disabled. Test: platform/chromium/compositing/huge-mask-layer.html * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::drawsContent): (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerTilerChromium.h: (WebCore::LayerTilerChromium::getSingleTexture): (WebCore::LayerTilerChromium::numTiles): 2011-06-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> Reviewed by Laszlo Gombos. [Qt] [Symbian] GraphicsLayer: support plugins on symbian https://bugs.webkit.org/show_bug.cgi?id=57418 Implement graphics layer for plugins on Symbian. * plugins/PluginView.h: * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::shouldUseAcceleratedCompositing): (WebCore::PluginView::platformStart): * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginGraphicsLayerQt::PluginGraphicsLayerQt): (WebCore::PluginGraphicsLayerQt::~PluginGraphicsLayerQt): (WebCore::PluginGraphicsLayerQt::paint): (WebCore::PluginView::shouldUseAcceleratedCompositing): (WebCore::PluginView::paint): (WebCore::PluginView::invalidateRect): (WebCore::PluginView::platformStart): (WebCore::PluginView::platformLayer): 2011-06-14 Sreeram Ramachandran <sreeram@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Allow the console to persist on page refresh or navigation https://bugs.webkit.org/show_bug.cgi?id=53359 Adds a context menu checkbox to preserve the console log across navigations. However, the underlying messages and objects are actually deleted from the backend, so they are not expandable; their continued display in the console frontend is merely cosmetic. Test: inspector/console/console-preserve-log.html * English.lproj/localizedStrings.js: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared): (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher): (WebInspector.ConsoleView.prototype.requestClearMessages): (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction): (WebInspector.ConsoleView.prototype._handleContextMenuEvent.preserveLogItemAction): (WebInspector.ConsoleView.prototype._handleContextMenuEvent): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/inspector.js: (WebInspector.reset): 2011-06-14 Pavel Podivilov <podivilov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: add tooltip to file select options in scripts panel. https://bugs.webkit.org/show_bug.cgi?id=62537 * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._sourceFileAdded): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.compare): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._callFrameSelected): 2011-06-14 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Implement CSS border radius properies in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=62265 No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: Implement new class to culculate border radius, initialize for appropriate properties. (WebCore::ApplyPropertyBorderRadius::ApplyPropertyBorderRadius): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: Remove old implementations. (WebCore::CSSStyleSelector::applyProperty): * page/animation/AnimationBase.cpp: Pass LengthSize by value. (WebCore::AnimationBase::ensurePropertyMap): * rendering/style/RenderStyle.h: Pass LengthSize by value consistently. 2011-06-14 Carlos Garcia Campos <cgarcia@igalia.com> Reviewed by Martin Robinson. [GTK] Rename convertWidgetRectToScreenRect() to convertWidgetPointToScreenPoint() https://bugs.webkit.org/show_bug.cgi?id=62626 The method actually converts coordinates, the rectangle size is not affected, so it can be modified to return a point instead. Fix also a bug in the implementation, it was translating the coordinates twice returning the wrong position when the given rectangle was not at 0,0. * platform/gtk/GtkUtilities.cpp: (WebCore::convertWidgetPointToScreenPoint): * platform/gtk/GtkUtilities.h: * platform/gtk/PopupMenuGtk.cpp: (WebCore::PopupMenuGtk::show): Use convertWidgetPointToScreenPoint(). 2011-06-14 Carlos Garcia Campos <cgarcia@igalia.com> Reviewed by Martin Robinson. [GTK] Support authentication dialogs in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=62366 Add a new class to show an authentication dialog that is used by both WebKit1 and WebKit2. * GNUmakefile.list.am: Add new files to compilation. * platform/gtk/GtkAuthenticationDialog.cpp: Added. (WebCore::addEntryToTable): (WebCore::sessionCanSavePasswords): (WebCore::GtkAuthenticationDialog::~GtkAuthenticationDialog): (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): (WebCore::getSavedLogin): (WebCore::GtkAuthenticationDialog::show): (WebCore::GtkAuthenticationDialog::destroy): (WebCore::GtkAuthenticationDialog::savePasswordCallback): (WebCore::GtkAuthenticationDialog::savePassword): (WebCore::GtkAuthenticationDialog::authenticate): (WebCore::GtkAuthenticationDialog::authenticationDialogResponseCallback): * platform/gtk/GtkAuthenticationDialog.h: Added. 2011-06-14 Tommy Widenflycht <tommyw@google.com> Reviewed by Tony Gentilcore. Media Stream PeerConnection API: adding the StreamList and supporting classes. https://bugs.webkit.org/show_bug.cgi?id=61539 * dom/StreamContainer.h: Added. (WebCore::StreamContainer::create): (WebCore::StreamContainer::~StreamContainer): (WebCore::StreamContainer::length): (WebCore::StreamContainer::item): (WebCore::StreamContainer::add): (WebCore::StreamContainer::remove): (WebCore::StreamContainer::contains): (WebCore::StreamContainer::get): (WebCore::StreamContainer::StreamContainer): * dom/StreamList.cpp: Added. (WebCore::StreamList::create): (WebCore::StreamList::StreamList): (WebCore::StreamList::~StreamList): (WebCore::StreamList::length): (WebCore::StreamList::item): * dom/StreamList.h: Added. * dom/StreamList.idl: Added. 2011-06-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed by Andreas Kling. [Qt] tst_QWebFrame::overloadedSlots() fails https://bugs.webkit.org/show_bug.cgi?id=37319 Increase the likeness that JSElements are converted to QWebElements. When hinted with QWebElement metatype, we qualify the conversion from JSElement as a "perfect match". The test was failing because the wrong slot was called, since the QWebElement match was taken as equal to the others and not chosen when the metacall happened. We also remove the implicit conversion between JSDocument (which is not an element) to QWebElement. The conversion only worked for calling slots, while without hint it returned a QVariantMap (as can be seen in domCycles test). It was added for supporting DRT, but since this change we can use it as QVariantMap and get the value for "documentElement". This patch is based on Noam Rosenthal original patch in the same bug. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::hintForRealType): Extracted function to choose the metatype hint based on the JSValue type. Add QWebElement metatype as a hint for JSElement objects, this way if no hint is provided, JSElement objects will always be converted to QWebElements. (JSC::Bindings::convertValueToQVariant): Use previous function. Identify the conversion between JSElement to QWebElement as a "perfect match" (dist = 0). And remove the implicit conversion when the hint is QWebElement metatype and we have a JSDocument. Changed from JSHTMLElement to JSElement to cover the 'documentElement'. 2011-06-14 Andreas Kling <kling@webkit.org> Reviewed by Benjamin Poulain. Remove some unnecessary includes. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: 2011-06-14 Yael Aharon <yael.aharon@nokia.com> Reviewed by Kent Tamura. <progress> should support :indeterminate pseudo-class https://bugs.webkit.org/show_bug.cgi?id=62430 Add support for :indeterminate pseudo class for progress element. Tests: fast/dom/HTMLProgressElement/indeterminate-progress-001.html fast/dom/HTMLProgressElement/indeterminate-progress-002.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::isDeterminate): (WebCore::HTMLProgressElement::didElementStateChange): * html/HTMLProgressElement.h: 2011-06-14 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: use ew-resize instead of col-resize for non-columns. https://bugs.webkit.org/show_bug.cgi?id=62640 * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.rightSidebarResizerDragStart): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype._startSidebarDragging): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._startSidebarResizeDrag): * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype._resizeWindow): (WebInspector.TimelineOverviewPane.prototype._dragWindow): * inspector/front-end/inspector.css: (body.attached #toolbar): (body.drawer-visible #main-status-bar): (#scripts-sidebar-resizer-widget): (.sidebar-resizer-vertical): (.timeline-window-resizer): 2011-06-14 Pavel Feldman <pfeldman@google.com> Reviewed by Yury Semikhatsky. Web Inspector: reload from within inspector window does not work while debugger is paused. https://bugs.webkit.org/show_bug.cgi?id=62631 Test: inspector/debugger/debugger-reload-on-pause.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): 2011-06-14 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kent Tamura. [EFL] Support for painting thumb of media slider https://bugs.webkit.org/show_bug.cgi?id=62174 Replace RenderObject parameter with RenderStyle's in adjustSliderThumbSize. Because, parameter of the function was changed. And, add constant variable to paintMediaSliderThumb(). * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::RenderThemeEfl): (WebCore::RenderThemeEfl::adjustSliderThumbSize): (WebCore::RenderThemeEfl::paintMediaSliderThumb): * platform/efl/RenderThemeEfl.h: 2011-06-14 Kent Tamura <tkent@chromium.org> [Qt] Attempt to fix a build break by r88757. https://bugs.webkit.org/show_bug.cgi?id=52920 * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintSliderTrack): 2011-06-13 Kent Tamura <tkent@chromium.org> [EFL] The second try to fix a build break. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): 2011-06-13 Kent Tamura <tkent@chromium.org> [EFL] Fix a typo. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): 2011-06-13 Kent Tamura <tkent@chromium.org> [EFL] Try to fix a build break by r88757. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): 2011-06-10 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. Use CSS machinery to position slider thumb. https://bugs.webkit.org/show_bug.cgi?id=52920 Remove RenderSlider::layout(). In order to remove it, we introduce new three shadow nodes: - A flex box container occupying the whole box - A flex box item representing a movable area of the thumb - A flex box item limiting the movable area of the thumb The thumb position is specified by percentage position in the second element. This change also fixes Bug 60353. Tests: fast/forms/input-appearance-range.html fast/forms/validation-message-on-range.html * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySliderThumb::elementRect): Use Node::getRect() for the thumb element. * css/html.css: Add new style definitions for the new node layout. (input[type="range"]::-webkit-slider-container): (input[type="range"]::-webkit-slider-runnable-track): (input[type="range"]::-webkit-slider-thumb): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): Accepts events on shadow nodes, use sliderThumbElementOf(). (WebCore::RangeInputType::createShadowSubtree): Creates new nodes layout. (WebCore::RangeInputType::valueChanged): Use sliderThumbElementOf(). * html/RangeInputType.h: Remove shadowSliderThumb(). * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): Moved from RenderSlider.cpp. (WebCore::hasVerticalAppearance): New utility function. (WebCore::sliderThumbElementOf): New utility function. (WebCore::RenderSliderThumb::layout): Sets CSS top/left values. (WebCore::RenderSliderContainer::RenderSliderContainer): (WebCore::RenderSliderContainer::layout): Add some adjustment code. - Setting box-orient - Adjust heights of some nodes. It is required to pass existing tests. (WebCore::SliderThumbElement::setPositionFromValue): Update comments. (WebCore::SliderThumbElement::setPositionFromPoint): Calculate the current position from absolute positions. (WebCore::SliderThumbElement::hostInput): Removed unnecessary variable. (WebCore::TrackLimiterElement::TrackLimiterElement): (WebCore::TrackLimiterElement::create): Adjust style. (WebCore::TrackLimiterElement::createRenderer): This node uses RenderSliderThumb. (WebCore::TrackLimiterElement::shadowPseudoId): This node also uses -webkit-slider-thumb. (WebCore::SliderContainerElement::SliderContainerElement): (WebCore::SliderContainerElement::create): (WebCore::SliderContainerElement::createRenderer): Uses RenderSliderContainer. (WebCore::SliderContainerElement::shadowPseudoId): * html/shadow/SliderThumbElement.h: Make hostInput() public, add declarations of TrackLimiterElement and SliderContainerElement. * rendering/RenderSlider.cpp: (WebCore::RenderSlider::RenderSlider): Added an assertion. (WebCore::RenderSlider::inDragMode): Uses sliderThumbElementOf(). * rendering/RenderSlider.h: Remove declarations of removed functions. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustSliderThumbStyle): Calls adjustSliderThumbSize(). 2011-06-13 Joone Hur <joone.hur@collabora.co.uk> Reviewed by Martin Robinson. [GTK] Add configure option to enable/disable register protocol handler https://bugs.webkit.org/show_bug.cgi?id=62534 * GNUmakefile.am: Add ENABLE_REGISTER_PROTOCOL_HANDLER. 2011-06-13 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kent Tamura. [EFL] Support for painting thumb of media slider https://bugs.webkit.org/show_bug.cgi?id=62174 Implement paintMediaSliderThumb() function to show thumb of media slider. adjustSliderThumbSize() should be implemented in order to call paintMediaSliderThumb(). * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::RenderThemeEfl): (WebCore::RenderThemeEfl::adjustSliderThumbSize): (WebCore::RenderThemeEfl::paintMediaSliderTrack): (WebCore::RenderThemeEfl::paintMediaSliderThumb): (WebCore::RenderThemeEfl::paintMediaCurrentTime): * platform/efl/RenderThemeEfl.h: 2011-06-13 Keishi Hattori <keishi@webkit.org> Sort WebCore.xcodeproj Accomplished using sort-Xcode-project-file. * WebCore.xcodeproj/project.pbxproj: 2011-06-13 James Simonsen <simonjam@chromium.org> Reviewed by James Robinson. [Chromium] Implement monotonicallyIncreasingClock() https://bugs.webkit.org/show_bug.cgi?id=62162 * platform/chromium/PlatformBridge.h: * platform/chromium/SystemTimeChromium.cpp: (WebCore::monotonicallyIncreasingTime): Use Chrome's implementation. 2011-06-13 Steve Block <steveblock@google.com> Reviewed by Darin Adler. Remove Android defines from WebCore/config.h https://bugs.webkit.org/show_bug.cgi?id=62602 No new tests, build cleanup only. * config.h: 2011-06-13 Adam Barth <abarth@webkit.org> Reviewed by David Levin. Remove redundant "true" parameter to scheduleLocationChange https://bugs.webkit.org/show_bug.cgi?id=62612 This parameter defaults to true anyway. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache): 2011-06-13 Kentaro Hara <haraken@google.com> Reviewed by Alexey Proskuryakov. Add resizePageRectsKeepingRatio(), which expands/shrinks a page, keeping the ratio of the original page https://bugs.webkit.org/show_bug.cgi?id=61256 In order to prevent rounding error caused by expanding/shrinking a page using different calculation here and there, I added a common calculation method, resizePageRectsKeepingRatio(), which expands/shrinks a page, keeping the ratio of width and height of the original page. PrintContext::computePageRects() and PrintContext::begin() use resizePageRectsKeepingRatio() to expand/shrink a page. Test: printing/page-count-with-one-word.html * WebCore.exp.in: * page/Frame.cpp: (WebCore::Frame::resizePageRectsKeepingRatio): * page/Frame.h: * page/PrintContext.cpp: (WebCore::PrintContext::computePageRects): (WebCore::PrintContext::begin): 2011-06-13 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. anyPageIsProcessingUserGesture is not longer needed because user gesture state is static https://bugs.webkit.org/show_bug.cgi?id=62601 Previously, our user-gesture state was per-frame. Code needed to check the "global" user gesture state called anyPageIsProcessingUserGesture() to iterate through all the frames and look for one that was processing a user gesture. Since we changed the user gesture state to be static, iterating over every frame in existence isn't needed. This patch also cleans up a couple other user-gesture callsites I saw while I was in this code. Code should just call ScriptController::processingUserGesture directly instead of trampolining through other functions. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): * bindings/generic/BindingSecurity.h: (WebCore::::allowPopUp): * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): * bindings/js/ScriptController.cpp: * bindings/js/ScriptController.h: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: * bindings/v8/ScriptController.h: (WebCore::ScriptController::setProcessingTimerCallback): * bindings/v8/V8Utilities.cpp: * bindings/v8/V8Utilities.h: * bindings/v8/specialization/V8BindingState.cpp: * bindings/v8/specialization/V8BindingState.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submitFromJavaScript): (WebCore::HTMLFormElement::submit): * page/DOMWindow.cpp: (WebCore::DOMWindow::setLocation): (WebCore::DOMWindow::createWindow): (WebCore::DOMWindow::open): 2011-06-13 Jeffrey Pfau <jpfau@apple.com> Reviewed by Darin Adler. Crash in WebCore::RenderMathMLUnderOver::layout() https://bugs.webkit.org/show_bug.cgi?id=57900 Add more null checks so that removing children in MathML elements does not cause crashes. Note that this only half fixes the third repro in the Bugzilla bug, as another bug will still crash that repro. Test: mathml/munderover-remove-children.html * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::stretchToHeight): * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::layout): (WebCore::RenderMathMLUnderOver::nonOperatorHeight): 2011-06-13 Dmitry Lomov <dslomov@google.com> Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=62345 Use per-isolate embedder data instead of statics for caches in bindings. This is a prerequisite for more than one v8 isolate per process. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromSerializedValueAndKeyPath): (WebCore::injectIDBKeyIntoSerializedValue): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData): (WebCore::V8BindingPerIsolateData::~V8BindingPerIsolateData): (WebCore::V8BindingPerIsolateData::create): (WebCore::V8BindingPerIsolateData::ensureInitialized): (WebCore::V8BindingPerIsolateData::dispose): (WebCore::getToStringName): (WebCore::getToStringTemplate): * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::get): (WebCore::V8BindingPerIsolateData::current): (WebCore::V8BindingPerIsolateData::rawTemplateMap): (WebCore::V8BindingPerIsolateData::templateMap): (WebCore::V8BindingPerIsolateData::toStringName): (WebCore::V8BindingPerIsolateData::toStringTemplate): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): * bindings/v8/V8Utilities.cpp: (WebCore::V8LocalContext::V8LocalContext): (WebCore::V8LocalContext::~V8LocalContext): * bindings/v8/V8Utilities.h: * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initV8IfNeeded): 2011-06-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed by Adam Barth. Simplify logic in ProgressTracker::progressCompleted() https://bugs.webkit.org/show_bug.cgi?id=62598 Testing for "m_numProgressTrackedFrames != 0" is unnecessary because it is always true, otherwise we would entered in the first part of the conditional. * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::progressCompleted): 2011-06-13 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, rolling out r88704. http://trac.webkit.org/changeset/88704 https://bugs.webkit.org/show_bug.cgi?id=62466 Caused layout test failures on Chromium Mac. * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::declareAndWriteDragImage): 2011-06-13 Morgan Winer <mwiner@apple.com> Reviewed by Enrica Casucci. Frame::visiblePositionForPoint returns null position if the point is over an imagemap. https://bugs.webkit.org/show_bug.cgi?id=62562 <rdar://problem/9313885> The innerNode() of an imageMap is an area, and doesn't have a renderer and therefore can't report a position. Every result's innerNonSharedNode() should be the same as the innerNode(), except for imageMaps, which will have the actual image as its innerNonSharedNode(), and will therefore have a renderer and can report a position. There are no layout tests for this, since it can be tested only at API level. * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): Changing innerNode() to innerNonSharedNode(). 2011-06-13 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Eric Seidel. [CMAKE] Conditionally generate DerivedSources https://bugs.webkit.org/show_bug.cgi?id=62277 Speedup build by not generating DerivedSources of features that are disabled. This was already been done for some features like ENABLE_SVG and now it's extended the following features: ENABLE_DATABASE, ENABLE_INDEXED_DATABASE, ENABLE_DOM_STORAGE, ENABLE_XPATH, ENABLE_OFFLINE_WEB_APPLICATIONS, ENABLE_WEB_SOCKETS, ENABLE_DATA_TRANSFER_ITEMS. No change in functionality so no new tests. * CMakeLists.txt: move .idl files to be conditionally generated. 2011-06-13 Leandro Pereira <leandro@profusion.mobi> Reviewed by Eric Seidel. [CMake] Allow building with ENABLE_NETSCAPE_PLUGIN_API on platforms without plugin support https://bugs.webkit.org/show_bug.cgi?id=62394 No behaviour changes, so no new tests. * CMakeLists.txt: Remove references to Plugin{Package,View}.cpp and Plugin{Package,View}None.cpp and move them to CMakeListWinCE and CMakeListsEfl, respectively. * CMakeListsEfl.txt: * CMakeListsWinCE.txt: 2011-06-13 Andrey Kosyakov <caseq@chromium.org> Reviewed by Eric Seidel. Web Inspector: [refactoring] remove dead code from NetworkPanel https://bugs.webkit.org/show_bug.cgi?id=62481 * inspector/front-end/NetworkPanel.js: 2011-06-13 Daniel Cheng <dcheng@chromium.org> Reviewed by Eric Seidel. [chromium] Dragging images to Mail.app results in broken attachments https://bugs.webkit.org/show_bug.cgi?id=62466 No new tests. * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::declareAndWriteDragImage): 2011-06-13 Adrienne Walker <enne@google.com> Reviewed by Simon Fraser. Overlap test needs to consider children of composited layers https://bugs.webkit.org/show_bug.cgi?id=62465 Any child layer with a compositing ancestor will be put into a composited layer even though they themselves don't need compositing. As layer bounds aren't hierarchical, these layer bounds themselves need to be put into the overlap map because the composited layer itself is not sufficient. Test: compositing/layer-creation/overlap-animated-layer.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): 2011-06-13 Xan Lopez <xlopez@igalia.com> Unreviewed build fix. Touch this to try to fix the build... * platform/gtk/WidgetGtk.cpp: (WebCore::Widget::~Widget): 2011-06-13 Xan Lopez <xlopez@igalia.com> Try to fix GTK+ build. * GNUmakefile.list.am: remove CredentialStorage.cpp 2011-06-13 Stephen White <senorblanco@chromium.org> Reviewed by James Robinson. Improve GPU canvas startup time on the SkiaGPU path. https://bugs.webkit.org/show_bug.cgi?id=62594 Fixed by skipping creation of shaders used only by the legacy path. Covered by existing canvas tests. * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::create): 2011-06-13 Michael Saboff <msaboff@apple.com> Reviewed by Oliver Hunt. Additional FontCache::FontCachePurgePreventer instances needed https://bugs.webkit.org/show_bug.cgi?id=62498 Added some needed and speculative FontCachePurgePreventer objects. Built and ran Safari with debug version of webkit that purges all purgeable fonts in FontCache::purgeInactiveFontDataIfNeeded in order to find system fallback fonts access via code paths that aren't protected with FontCachePurgePreventer objects. Also examined platform specific code that calls either Font::drawText() or Canvas::drawText(). For those methods that may be called from currently unprotected paths, added FontCachePurgePreventer objects. No new functionality so no new tests. * inspector/DOMNodeHighlighter.cpp: * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::drawHudContents): * platform/mac/DragImageMac.mm: (WebCore::widthWithFont): (WebCore::drawAtPoint): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): 2011-06-13 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Dan Bernstein. REGRESSION (r81518): Crash in makeRange() when invoking the dictionary panel over a file input https://bugs.webkit.org/show_bug.cgi?id=62544 Fixed the crash by adding null pointer checks. No new tests since there's no way to open dictionary panel. * dom/Position.cpp: (WebCore::Position::parentAnchoredEquivalent): * editing/VisiblePosition.cpp: (WebCore::makeRange): * page/Frame.cpp: (WebCore::Frame::rangeForPoint): 2011-06-13 Adam Barth <abarth@webkit.org> Reviewed by Nate Chapin. Factor IconController out of FrameLoader https://bugs.webkit.org/show_bug.cgi?id=62509 This new class contains all the icon-related logic from FrameLoader. The icon-related logic and state has almost zero interaction with the rest of FrameLoader and is better handled as a separate concern. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::implicitClose): (WebCore::Document::setIconURL): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::iconLoadDecisionAvailable): (WebCore::DocumentLoader::continueIconLoadWithDecision): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::stop): * loader/FrameLoader.h: (WebCore::FrameLoader::icon): * loader/icon/IconLoader.cpp: (WebCore::IconLoader::startLoading): (WebCore::IconLoader::finishLoading): * loader/icon/IconLoader.h: 2011-06-13 Nate Chapin <japhet@chromium.org> Reviewed by Darin Fisher. [V8] Cache V8NPObjects so that we don't create multiple NPObjects for the same v8::Object. https://bugs.webkit.org/show_bug.cgi?id=61482 Test: plugins/npruntime/embed-property-equality.html * bindings/v8/NPV8Object.cpp: (WebCore::freeV8NPObject): (WebCore::npCreateV8ScriptObject): 2011-06-13 Xan Lopez <xlopez@igalia.com> Reviewed by Martin Robinson. Distcheck fixes. * GNUmakefile.am: * GNUmakefile.list.am: 2011-06-13 Dirk Schulze <krit@webkit.org> Reviewed build fix of mac. SVGAnimation should use direct unit animation for SVGLength https://bugs.webkit.org/show_bug.cgi?id=61368 Forgot to add SVGAnimatedLength.cpp. * WebCore.xcodeproj/project.pbxproj: 2011-06-13 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVGAnimation should use direct unit animation for SVGLength https://bugs.webkit.org/show_bug.cgi?id=61368 When running SMIL animations within SVG, we unnecessarily transform the underlying SVG primitive datatype to strings, number+units, and back. As first step the target element gets asked for its current value. This value gets transformed to a string. In SVGAnimateElement we try to parse this string again and split it into a number and its unit. In the further steps we just animate the number. This number gets transformed back to a string together with the parsed unit. The string gets passed back to the target element, which is responsible for parsing the passed string back to a value as a SVG primitive datatype (like SVGLength, SVGNumber, SVGAngle, SVGColor, ...), relayout and rerendering. In short: SVG primitive datatype -> string -> number + unit animation -> string -> SVG primitive datatype. This patch does not attempt to change the string transformations, but addresses the parsing of the string back to a number and unit in the SVG animation code. There's no need to write a new parser in SVGAnimateElement to parse SVG primitive datatypes, we can instead reuse the existing ones. Also the current parser of SVGAnimateElement does not handle most unit types, nor is it possible to animate lists like SVGLengthList with the parsed content. An animation of values with different unit types is not possible: <rect width="20" height="20"> <animate animateAttribute="width" from="20px" to="10%" dur="4s"/> </rect> For the example above we would animate the rect width from 20px to 10px in 4 seconds and jump to the 10% of the viewport at the end of the animation. With using the parsers of SVG primitive datatypes we will also use the SVG primitive datatypes in the animation code itself. And that makes it possible to do such animations. In short: SVG primitive datatype -> string -> SVG primitive datatype animation -> string -> SVG primitive datatype. It will be easier to avoid the string transformation once all SVG primitive datatypes are supported. To hide the complexity of the animation code, the actual calculations of SVG animation specific values was moved to the corresponding SVGAnimated* files (SVGAnimatedLength.cpp for SVGLength). SVGAnimateElement itself just works with the new added generic datatype SVGAnimationType. SVGAnimatorFactory creates the SVG primitive datatype specific animators. This makes the main animation code a lot more readable and maintainable. With this patch I add the SVGAnimatorFactory and convert SVGLength animation to the new concept. Tests: svg/animations/svglength-animation-LengthModeHeight.html svg/animations/svglength-animation-LengthModeOther.html svg/animations/svglength-animation-LengthModeWidth.html svg/animations/svglength-animation-invalid-value-1.html svg/animations/svglength-animation-invalid-value-2.html svg/animations/svglength-animation-invalid-value-3.html svg/animations/svglength-animation-number-to-number.html svg/animations/svglength-animation-px-to-cm.html svg/animations/svglength-animation-px-to-ems.html svg/animations/svglength-animation-px-to-exs.html svg/animations/svglength-animation-px-to-in.html svg/animations/svglength-animation-px-to-number.html svg/animations/svglength-animation-px-to-pc.html svg/animations/svglength-animation-px-to-percentage.html svg/animations/svglength-animation-px-to-pt.html svg/animations/svglength-animation-px-to-px.html svg/animations/svglength-animation-values.html * CMakeLists.txt: Added new files to build system. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * svg/SVGAllInOne.cpp: Added SVGAnimatedLength.cpp for Win and other build systems. * svg/SVGAnimateElement.cpp: (WebCore::parseNumberValueAndUnit): Remove parsing code for SVGLength. Use SVGLength parser directly. (WebCore::SVGAnimateElement::adjustForCurrentColor): Made adjustForCurrentColor public as preperation for SVGAnimatedColor. (WebCore::getPropertyValue): Inline function to get computedStyle of CSS property. (WebCore::SVGAnimateElement::adjustForInheritance): Made adjustForInheritance as preperation for SVGAnimated* files. (WebCore::SVGAnimateElement::determineAnimatedAttributeType): SVGLength need special handling via SVGAnimator now. (WebCore::SVGAnimateElement::calculateAnimatedValue): Cleanup. Make use of SVGAnimator for SVGLength. (WebCore::SVGAnimateElement::calculateFromAndToValues): Ditto. (WebCore::SVGAnimateElement::calculateFromAndByValues): Ditto. (WebCore::SVGAnimateElement::resetToBaseValue): Ditto. (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto. (WebCore::SVGAnimateElement::calculateDistance): Ditto. * svg/SVGAnimateElement.h: * svg/SVGAnimatedLength.cpp: Added. (WebCore::SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator): (WebCore::sharedSVGLength): (WebCore::SVGAnimatedLengthAnimator::constructFromString): (WebCore::SVGAnimatedLengthAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedLengthAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedLengthAnimator::calculateDistance): * svg/SVGAnimatedLength.h: Added new class SVGAnimatedLengthAnimator which is responsible for the actual animation. (WebCore::SVGAnimatedLengthAnimator::~SVGAnimatedLengthAnimator): * svg/SVGAnimatedType.h: Added. Generic SVG unit type for animations in SVGAnimateElement. (WebCore::SVGAnimatedType::createLength): (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::type): (WebCore::SVGAnimatedType::length): (WebCore::SVGAnimatedType::SVGAnimatedType): * svg/SVGAnimatedTypeAnimator.h: Added. Base class for SVGAnimatedLengthAnimator and future SVG unit animators. (WebCore::SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator): (WebCore::SVGAnimatedTypeAnimator::setContextElement): (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseMappedAttribute): We do not use parseNumberValueAndUnit for SVGLength now. Have to strip white spaces here. Whitespaces shouldn't be stripped on the following attributes: 'from', 'to' and 'by'. This is not the case for SVGLength anymore. Added new tests to check this behavior. (WebCore::SVGAnimationElement::animationMode): Enum is accessible in WebCore namespace now. (WebCore::SVGAnimationElement::calcMode): Ditto. * svg/SVGAnimationElement.h: * svg/SVGAnimatorFactory.h: Added. (WebCore::SVGAnimatorFactory::create): * svg/SVGLength.cpp: (WebCore::SVGLength::setValueAsString): New setter with string and SVGLengthMode. (WebCore::SVGLength::lengthModeForAnimatedLengthAttribute): Get LengthMode for SVGLength depending on the attribute name. * svg/SVGLength.h: 2011-06-13 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. r87539 broke HTMLMediaElement url logging https://bugs.webkit.org/show_bug.cgi?id=62551 Returning pointers to temporaries is bad times! * html/HTMLMediaElement.cpp: (WebCore::urlForLogging): (WebCore::HTMLMediaElement::loadResource): (WebCore::HTMLMediaElement::isSafeToLoadURL): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWillBeRemoved): 2011-06-13 Tony Chang <tony@chromium.org> Reviewed by Dimitri Glazkov. rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX https://bugs.webkit.org/show_bug.cgi?id=62578 * Configurations/FeatureDefines.xcconfig: 2011-06-13 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: setVersion() version argument is required https://bugs.webkit.org/show_bug.cgi?id=62401 Test: storage/indexeddb/setVersion-undefined.html * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::setVersion): check for null version * storage/IDBDatabase.idl: add IDL magic to force undefined to null so we can handle both missing and null arguments 2011-06-13 Simon Fraser <simon.fraser@apple.com> Reviewed by Adele Peterson. Print out bounds origin in layer dump https://bugs.webkit.org/show_bug.cgi?id=62583 Include m_boundsOrigin in the layer dump, which is used by layerTreeAsText(). * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::dumpProperties): 2011-06-13 Simon Fraser <simon.fraser@apple.com> Reviewed by Adele Peterson. Add utility method to report whether a RenderLayer has any scrollbars https://bugs.webkit.org/show_bug.cgi?id=62579 New method that returns true with either scrollbar is present. * rendering/RenderLayer.h: (WebCore::RenderLayer::hasScrollbars): 2011-06-11 Jer Noble <jer.noble@apple.com> Reviewed by Anders Carlsson. Avoid flashing when exiting full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=62338 No new tests; covered by the existing full-screen tests. Now that we are forcing a repaint inside of setRootFullScreenLayer() instead of during the next run loop, make sure that we have disabled animation before calling setRootFullScreenLayer() so that the RenderFullScreen renderer and its contents are painted. * dom/Document.cpp: (WebCore::Document::webkitDidEnterFullScreenForElement): 2011-06-10 Jer Noble <jer.noble@apple.com> Reviewed by Darin Adler. Flash of white on left and right edges of screen when showing fullscreen controller when movie doesn't fill the entire screen https://bugs.webkit.org/show_bug.cgi?id=62491 <rdar://problem/9584427> No new tests; should be covered by existing fullscreen pixel tests. On certain displays, when a RenderFullScreen renderer is created, it is large enough to trigger the creation of a tiled CALayer (instead of a normal CALayer). Painting in these layers necessarily happens asynchronously, so the flash is occurring because of the async painting of the RenderFullScreen renderer's background color. Since we know the RenderFullScreen does not otherwise paint its contents, we can add a special case in the RenderLayerBacking to set the GraphicsLayer contents to be the renderer's background color. Fill in support for creating a contentLayer to contain the background color inside GraphicsLayerCA. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::setContentsToBackgroundColor): Renamed from setContentsBackgroundColor to match the other setContentsTo... functions. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setContentsToBackgroundColor): Added. Creates a contentsLayer to host the background color. (WebCore::GraphicsLayerCA::updateLayerBackgroundColor): Removed a comment only. * platform/graphics/ca/GraphicsLayerCA.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Special case the RenderFullScreen renderer to call updateBackgroundColor. (WebCore::RenderLayerBacking::updateBackgroundColor): Added. (WebCore::RenderLayerBacking::containsPaintedContent): Tell the backing that the RenderFullScreen renderer does not paint its contents. * rendering/RenderLayerBacking.h: 2011-06-13 Tim Horton <timothy_horton@apple.com> Reviewed by Simon Fraser. REGRESSION(87152): Crash on page with svg fonts https://bugs.webkit.org/show_bug.cgi?id=61556 We can't assume that the parent of a SVG-font-styled text node won't be an anonymous block. Test: svg/text/text-font-anonymous-parent.xhtml * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::firstParentRendererForNonTextNode): (WebCore::SVGTextRunWalker::walk): (WebCore::floatWidthOfSubStringUsingSVGFont): (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont): 2011-06-13 Tony Chang <tony@chromium.org> Reviewed by Adam Barth. rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX https://bugs.webkit.org/show_bug.cgi?id=62545 * Configurations/FeatureDefines.xcconfig: 2011-06-13 Xan Lopez <xlopez@igalia.com> Reviewed by Martin Robinson. Some distcheck fixes. Still broken, but this is moves us closer to the target. * GNUmakefile.am: fix vpath syntax and add missing files to EXTRA_DIST. * GNUmakefile.list.am: add missing files and remove dead files. * bindings/gobject/GNUmakefile.am: fix comment. 2011-06-13 Noam Rosenthal <noam.rosenthal@nokia.com> Reviewed by Kenneth Rohde Christiansen. Add layer factory to GraphicsLayer for creating non-default layer type. https://bugs.webkit.org/show_bug.cgi?id=61925 Use the new factory function in TextureMapper. No new functionality so no new tests. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayer::create): 2011-06-13 Young Han Lee <joybro@company100.net> Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Accelerated animation is repeating as if its direction property is always 'alternate'. https://bugs.webkit.org/show_bug.cgi?id=62281 syncAnimations() has miscalculated a normalized progress value as if the animation always has alternate direction property. Test: animations/animation-direction-normal.html * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncAnimations): 2011-06-13 Dirk Schulze <krit@webkit.org> Reviewed by Rob Buis. SVG patternTransform not animatable https://bugs.webkit.org/show_bug.cgi?id=62538 SVG animation did not take attribute 'patternTransform' into account. Added support for combination of SVGPatternElement and attribute 'patternTransform' to SVGAnimateTransformElement. Tests: svg/animations/animateTransform-pattern-transform.html svg/animations/animateTransform-transformable-transform.html * svg/SVGAnimateTransformElement.cpp: (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): 2011-06-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed by Andreas Kling. [Qt] JSC Bridge: convert QtConnectionObject to use JSC API https://bugs.webkit.org/show_bug.cgi?id=62330 This patch is based on the draft patch by Noam Rosenthal in bug 60842. Qt API autotests cover the bridge behavior and pass after this patch. * bridge/qt/qt_runtime.h: Change QtConnectionObject to use JSC API types. In particular, we got rid of Strong<JSObject> members. Renamed some members and arguments to follow existing naming in QObject::connect(). * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): Use a new helper function to create a connection, passing the ExecState* that will be used when the connection is activated (signal emitted). Use JSC API types when looking up the matching signal to disconnect. (JSC::Bindings::QtConnectionObject::QtConnectionObject): Use JSC API to protect the receiver and receiverFunction from being garbage collected. Removed the ASSERT() since we don't hold ProtectedPtrs (in current code were Strong<>) anymore. (JSC::Bindings::QtConnectionObject::~QtConnectionObject): Explain why is safe to use m_originalSender here. Unprotect values that we protected in constructor. (JSC::Bindings::isJavaScriptFunction): Helper function to identify whether a JSObjectRef is a JS function (in contrast to a native function exposed to JS). (JSC::Bindings::QtConnectionObject::execute): (JSC::Bindings::QtConnectionObject::match): Both updated to use JSC API when appliable. Note that convertQVariantToValue still returns JSC internal types, will be handled in a different patch. (JSC::Bindings::QtConnectionObject::createWithInternalJSC): Convenince for the existing caller until it is converted to JSC as well. 2011-06-13 Carlos Garcia Campos <cgarcia@igalia.com> Reviewed by Martin Robinson. [GTK] Add context menu support for Webkit2 https://bugs.webkit.org/show_bug.cgi?id=54827 * platform/ContextMenuItem.h: Add gtkAction(). * platform/gtk/ContextMenuGtk.cpp: (WebCore::ContextMenu::ContextMenu): Implement constructor that receives a platform menu. (WebCore::ContextMenu::setPlatformDescription): Make sure we don't destroy the menu if the new context menu is the current one. (WebCore::contextMenuItemVector): Implement this method to return the list of menu items in the given context menu, required by WebKit2. (WebCore::platformMenuDescription): Implement this method to return a platform menu for the given menu items. * platform/gtk/ContextMenuItemGtk.cpp: (WebCore::createPlatformMenuItemDescription): Helper function to create a platform context menu item. (WebCore::ContextMenuItem::ContextMenuItem): Use createPlatformMenuItemDescription(). (WebCore::ContextMenuItem::title): Convert the title from UTF-8. (WebCore::ContextMenuItem::setTitle): Use gtkAction(). (WebCore::ContextMenuItem::setSubMenu): Implement setSubMenu() that receives a list of items. (WebCore::ContextMenuItem::setChecked): Use gtkAction(). (WebCore::ContextMenuItem::checked): Implement this, required by WebKit2. (WebCore::ContextMenuItem::enabled): Ditto. (WebCore::ContextMenuItem::setEnabled): Use gtkAction(). (WebCore::ContextMenuItem::gtkAction): Return the GtkAction associated to the context menu item. 2011-06-13 Keishi Hattori <keishi@webkit.org> Sort WebCore.xcodeproj Accomplished using sort-Xcode-project-file. * WebCore.xcodeproj/project.pbxproj: 2011-06-12 Jer Noble <jer.noble@apple.com> Reviewed by Darin Adler. REGRESSION (full screen video): Watch Again button is obscured after full screen playback ends at Apple trailers page https://bugs.webkit.org/show_bug.cgi?id=62507 No new tests; DRT would have to be modified to delay between receiving exitFullScreenForElement() and calling webkitWillExitFullScreenForElement() to be able to test this. If the full-screen element is removed, and webkitWillExitFullScreenForElement() is not called before fullScreenElementRemoved() returns, then ancestors of the full-screen element will not have their containsFullScreenElement property removed. To protect against this, reset the property by calling setContainsFullScreenElementRecursively() from within fullScreenElementRemoved(). * dom/Document.cpp: (WebCore::Document::fullScreenElementRemoved): Added call to setContainsFullScreenElementRecursively. 2011-06-12 Adam Barth <abarth@webkit.org> Reviewed by Alexey Proskuryakov. Rename FrameLoaderClient::interruptForPolicyChangeError to use the past tense https://bugs.webkit.org/show_bug.cgi?id=62516 As requested by Alexey in https://bugs.webkit.org/show_bug.cgi?id=62510. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::interruptedForPolicyChangeError): * loader/FrameLoaderClient.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::interruptedForPolicyChangeError): (WebCore::MainResourceLoader::stopLoadingForPolicyChange): (WebCore::MainResourceLoader::continueAfterContentPolicy): * loader/MainResourceLoader.h: 2011-06-12 Hironori Bono <hbono@chromium.org> Reviewed by Hajime Morita. Add null checks to HTMLTextAreaElement::removeSpellcheckRange(). https://bugs.webkit.org/show_bug.cgi?id=62526 This change adds null checks to the following function to prevent crashes when calling removeSpellcheckRange() with null: HTMLTextAreaElement::removeSpellcheckRange(), HTMLInputElement::removeSpellcheckRange(), and HTMLDivElement::removeSpellcheckRange(). Test: editing/spelling/spellcheck-api-crash.html * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::removeSpellcheckRange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::removeSpellcheckRange): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::removeSpellcheckRange): 2011-06-12 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. DocumentParser::appendBytes should use size_t for length instead of int https://bugs.webkit.org/show_bug.cgi?id=62508 size_t is the proper type for distances in memory, especially on 64 bit machines. * dom/DecodedDataDocumentParser.cpp: (WebCore::DecodedDataDocumentParser::appendBytes): * dom/DecodedDataDocumentParser.h: * dom/DocumentParser.h: * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::appendBytes): * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::appendBytes): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::appendBytes): * loader/SinkDocument.cpp: (WebCore::SinkDocumentParser::appendBytes): 2011-06-12 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove FrameLoader::isProcessingUserGesture https://bugs.webkit.org/show_bug.cgi?id=62519 This function is a remnant of the old user gesture design, which involved per-frame state stored on FrameLoader. Now that we're using static state, we don't need this function anymore. This function used to check whether JavaScript was enabled for the top-level frame, but that check doesn't make any sense (like much of the old user gesture code). * WebCore.exp.in: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::processingUserGesture): * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): * loader/FrameLoader.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::click): 2011-06-12 Adam Barth <abarth@webkit.org> Fix fullscreen/full-screen-iframe-legacy.html. * html/HTMLVideoElement.idl: 2011-06-12 Adam Barth <abarth@webkit.org> Reviewed by Alexey Proskuryakov. Remove trival "forward-to-client" member functions from FrameLoader https://bugs.webkit.org/show_bug.cgi?id=62510 Originally, FrameLoader was supposed to abstract FrameLoaderClient, but we lost that battle log ago. Nowadays, it's easier if folks just call into FrameLoaderClient directly. Many of these functions have direct callers already anyway. * WebCore.exp.in: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createRenderer): (WebCore::HTMLMediaElement::attach): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setRequest): (WebCore::DocumentLoader::setMainDocumentError): (WebCore::DocumentLoader::setupForReplaceByMIMEType): * loader/FrameLoader.cpp: (WebCore::FrameLoader::didFirstLayout): * loader/FrameLoader.h: - cancelledError is slightly more delicate, so I'm going to move it in a separate patch. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::interruptForPolicyChangeError): (WebCore::MainResourceLoader::stopLoadingForPolicyChange): (WebCore::MainResourceLoader::continueAfterContentPolicy): (WebCore::MainResourceLoader::handleEmptyLoad): (WebCore::MainResourceLoader::loadNow): * loader/MainResourceLoader.h: * loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): * loader/PingLoader.cpp: (WebCore::PingLoader::PingLoader): * loader/PolicyChecker.cpp: (WebCore::PolicyChecker::continueAfterNavigationPolicy): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::blockedError): (WebCore::ResourceLoader::cannotShowURLError): (WebCore::ResourceLoader::shouldUseCredentialStorage): (WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpace): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): 2011-06-12 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. <rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to display:none transition has complexity N^2 where N is the number of child Text nodes https://bugs.webkit.org/show_bug.cgi?id=61557 Replaced the fix for bug 58500 with a refined version. * rendering/RenderText.cpp: (WebCore::RenderText::clippedOverflowRectForRepaint): Use the containing block unless it is across a layer boundary. 2011-06-12 Adam Barth <abarth@webkit.org> Reviewed by Andreas Kling. Minor user-gesture related cleanup https://bugs.webkit.org/show_bug.cgi?id=62511 In reading the user gesture code, I noticed that these lines of code should be deleted because they don't do anything. * bindings/v8/NPV8Object.cpp: * html/HTMLAnchorElement.cpp: * html/HTMLVideoElement.idl: 2011-06-11 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Add TextRun charactersLength member https://bugs.webkit.org/show_bug.cgi?id=62501 Preparation patch 2: Propagate the maximum length of the characters buffer the TextRun operates on, even when we're only measuring a substring. For example: In RenderText when we're measuring 'len' characters starting from "text()->characters() + start", there's a portion of "textLength() - start" characters that we're not processing. In order to support ligatures when integrating SVG Fonts within the GlyphPage concept, we need this extra information, to lookup ligatures even when single chars are measured. If a font defines an eg "ffl" ligature, and we're measuring the "f" of "ffl", it shall looukp the "ffl" glyph from the font, and skip the next two characters (this will be done in WidthIterator). This doesn't yet affect any test, the new SVG Fonts code is not merged yet, this is the preparaion patch 2. * platform/graphics/Font.h: Add yet-unused "const TextRun&" parameter to drawGlyphBuffer/drawEmphasisMarks. * platform/graphics/FontFastPath.cpp: Ditto. This parameter will be used to looukp the TextRunRenderingContext in a follow-up patch. (WebCore::Font::drawSimpleText): (WebCore::Font::drawEmphasisMarksForSimpleText): (WebCore::Font::drawGlyphBuffer): (WebCore::Font::drawEmphasisMarks): * platform/graphics/TextRun.h: Add "int m_charactersLength", similar to "int m_len". It denotes the maximum length of the characters buffer that we're holding. It defaults to the passed "len" value, but is overriden by explicit setCharactersLength calls. (WebCore::TextRun::TextRun): (WebCore::TextRun::charactersLength): (WebCore::TextRun::setCharactersLength): * platform/graphics/mac/FontComplexTextMac.cpp: Pass TextRun do drawGlyphBuffer/drawEmphasisMarks. (WebCore::Font::drawComplexText): (WebCore::Font::drawEmphasisMarksForComplexText): * platform/graphics/win/FontWin.cpp: Ditto. (WebCore::Font::drawComplexText): (WebCore::Font::drawEmphasisMarksForComplexText): * platform/graphics/wx/FontWx.cpp: Ditto. (WebCore::Font::drawComplexText): (WebCore::Font::drawEmphasisMarksForComplexText): * rendering/InlineTextBox.cpp: Call setCharactersLength on the processed TextRun. (WebCore::InlineTextBox::constructTextRun): * rendering/RenderBlockLineLayout.cpp: Ditto. (WebCore::textWidth): (WebCore::tryHyphenating): * rendering/RenderText.cpp: Ditto. (WebCore::RenderText::widthFromCache): (WebCore::RenderText::computePreferredLogicalWidths): (WebCore::RenderText::width): * rendering/svg/SVGInlineTextBox.cpp: Ditto. (WebCore::SVGInlineTextBox::constructTextRun): 2011-06-12 Robert Hogan <robert@webkit.org> Reviewed by Andreas Kling. [Qt] Fix methods.html and methods-lower-case.html https://bugs.webkit.org/show_bug.cgi?id=62221 * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::clearContentsHeaders): Refactor code from sendNetworkRequest (WebCore::QNetworkReplyHandler::getIODevice): ditto (WebCore::QNetworkReplyHandler::sendNetworkRequest): - Remove ContentType and ContentLength headers from GET, DELETE and HEAD requests since we do not send data with any of these requests. - If a custom HTTP operation contains data, send it. * platform/network/qt/QNetworkReplyHandler.h: 2011-06-11 Michael Saboff <msaboff@apple.com> Reviewed by James Robinson. REGRESSION(88260): 10-50% performance regression across many page cyclers https://bugs.webkit.org/show_bug.cgi?id=62349 Made CHROMIUM platform specific values for cMaxInactiveFontData and cTargetInactiveFontData to mitigate the current performance issue on Chromium page cycler tests. Made the chromium value for cMaxInactiveFontData 250 based on recommendation from James Robinson. Changed cTargetInactiveFontData to 200 so that 50 inactive fonts will be cleaned up at a time. Change made to address existing Chromium performance test regression. * platform/graphics/FontCache.cpp: 2011-06-11 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. Remove unnecessary strlen from DocumentWriter https://bugs.webkit.org/show_bug.cgi?id=62505 This ugly piece of code appears not to be needed. Rejoice. * WebCore.exp.in: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): * loader/DocumentLoader.h: * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::addData): * loader/DocumentWriter.h: 2011-06-11 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. DocumentParser::appendBytes shouldn't have a "flush" boolean parameter https://bugs.webkit.org/show_bug.cgi?id=62499 This patch removes the "flush" Boolean parameter from DocumentParser::appendBytes in favor of a new flush method. This makes some code in DocumentWriter look less ridiculous. There's still lots of on contorting to do here, but it's a start. * dom/DecodedDataDocumentParser.cpp: (WebCore::DecodedDataDocumentParser::appendBytes): (WebCore::DecodedDataDocumentParser::flush): * dom/DecodedDataDocumentParser.h: * dom/DocumentParser.h: * dom/RawDataDocumentParser.h: (WebCore::RawDataDocumentParser::flush): * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::appendBytes): * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::appendBytes): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::appendBytes): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::reportDataReceived): (WebCore::DocumentWriter::addData): (WebCore::DocumentWriter::endIfNotLoadingMainResource): * loader/DocumentWriter.h: * loader/SinkDocument.cpp: (WebCore::SinkDocumentParser::appendBytes): 2011-06-11 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, rolling out r88569. http://trac.webkit.org/changeset/88569 https://bugs.webkit.org/show_bug.cgi?id=62398 Broke Chromium browser test: IndexedDBBrowserTestWithGCExposed.DatabaseCallbacksTest * storage/IDBFactory.idl: 2011-06-11 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, rolling out r88565. http://trac.webkit.org/changeset/88565 https://bugs.webkit.org/show_bug.cgi?id=62401 Broke Chromium browser test: IndexedDBBrowserTestWithGCExposed.DatabaseCallbacksTest * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::setVersion): * storage/IDBDatabase.idl: 2011-06-10 Abhishek Arya <inferno@chromium.org> Reviewed by Simon Fraser. Null parent element sheet pointers in CSSMutableStyleDeclaration consumers when removed from document, set them when reinserted into document. https://bugs.webkit.org/show_bug.cgi?id=62230 When a HTMLBodyElement, StyledElement are removed from document, we didn't clear out the parent pointers from their link, style declarations. These parent pointers pointed to the document's element sheet which will get removed when document is getting destroyed. It does make sense to clear out parent pointers when we are getting removed from document and readd them when we get inserted again. Tests: fast/dom/body-link-decl-parent-crash.html fast/dom/styled-inline-style-decl-parent-crash.html * dom/StyledElement.cpp: (WebCore::StyledElement::insertedIntoDocument): (WebCore::StyledElement::removedFromDocument): * dom/StyledElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): (WebCore::HTMLBodyElement::insertedIntoDocument): (WebCore::HTMLBodyElement::removedFromDocument): (WebCore::HTMLBodyElement::didMoveToNewOwnerDocument): * html/HTMLBodyElement.h: 2011-06-10 Adam Barth <abarth@webkit.org> Remove bogus ASSERTs. These ASSERTs used to be correct before I changed DocumentWriter to put the onus for ignoring empty writes onto the parser. This patch should stop these test from triggering ASSERTs: plugins/plugin-document-back-forward.html plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html userscripts/user-script-plugin-document.html * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::appendBytes): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::appendBytes): 2011-06-09 Jer Noble <jer.noble@apple.com> Reviewed by Darin Adler. REGRESSION: End of apple.com video in full-screen mode leads to unusable page. https://bugs.webkit.org/show_bug.cgi?id=62411 Test: fullscreen/full-screen-remove-ancestor-after.html The placeholder for RenderFullScreen was being created as a non-anonymous object, which led to the document's renderer being set to 0 when the placeholder was removed due to its parent being removed. Setting the placeholder to be anonymous, however, means that it will be coalesced with sibling anonymous blocks, so added the RenderFullScreenPlaceholder to the list of anonymous objects that are not considered anonymous blocks, to avoid the placeholder being so coalesced. To do so, made the placeholder object a true subclass, and add and override its destroy() function to notify the RenderFullScreen object that it has been destroyed. * rendering/RenderFullScreen.cpp: (RenderFullScreenPlaceholder::RenderFullScreenPlaceholder): Added. (RenderFullScreenPlaceholder::~RenderFullScreenPlaceholder): Added. (RenderFullScreenPlaceholder::isRenderFullScreenPlaceholder): Added. (RenderFullScreenPlaceholder::destroy): Notify the owner renderer that its placeholder has been destroyed. (RenderFullScreen::destroy): Assert that the m_placeholder ivar is 0 after destroying it. (RenderFullScreen::setPlaceholder): Added. (RenderFullScreen::createPlaceholder): Do not make the placeholder anonymous. * rendering/RenderFullScreen.h: * rendering/RenderObject.h: (WebCore::RenderObject::isRenderFullScreenPlaceholder): Added. (WebCore::RenderObject::isAnonymousBlock): Added the placeholder class to the list of objects which are not anonymous blocks. 2011-06-10 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=16777 Eliminate JSC::NaN and JSC::Inf There's no good reason for -K-J-S- JSC to have its own NAN and infinity constants. The ones in std::numeric_limits are perfectly good. Remove JSC::Inf, JSC::NaN, switch some cases of (isnan || isinf) to !isfinite. * bindings/js/JSDataViewCustom.cpp: (WebCore::getDataViewMember): 2011-06-10 James Simonsen <simonjam@chromium.org> Reviewed by Eric Seidel. <script> inside <svg> should be executed https://bugs.webkit.org/show_bug.cgi?id=62412 Tests: svg/in-html/script-external.html svg/in-html/script-nested.html svg/in-html/script-write.html svg/in-html/script.html * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTag): 2011-06-10 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. Script-created parsers should ignore data from the network https://bugs.webkit.org/show_bug.cgi?id=62336 If the network packet boundaries line up just right, we can end up feeding network data to a parser created by document.write (or document.open). That's incorrect. This patch causes DocumentWriter to grab hold of the original parser and direct all input to that parser. Test: fast/parser/document-write-ignores-later-network-bytes.html * dom/Document.cpp: (WebCore::Document::explicitClose): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): (WebCore::DocumentWriter::addData): (WebCore::DocumentWriter::endIfNotLoadingMainResource): (WebCore::DocumentWriter::setDocumentWasLoadedAsPartOfNavigation): * loader/DocumentWriter.h: 2011-06-10 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Keep overlap testing logic until real 3d transforms are being used https://bugs.webkit.org/show_bug.cgi?id=49857 For pages that use the translateZ(0) hack to force compositing layers, it's advantageous to keep overlap testing, to avoid putting too many other elements into layers. Only turn off overlap testing if non-identity 3D transforms are used. Tests: compositing/layer-creation/rotate3d-overlap.html compositing/layer-creation/translatez-overlap.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): (WebCore::RenderLayerCompositor::hasNonIdentity3DTransform): * rendering/RenderLayerCompositor.h: 2011-06-10 David Levin <levin@chromium.org> Reviewed by Dmitry Titov. Web Worker fails to fire error event when a resource fetch fails. https://bugs.webkit.org/show_bug.cgi?id=62475 Test: http/tests/workers/worker-workerScriptNotThere.html * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didFinishLoading): Ensure that the client is notified of the error when it happens during loading. 2011-06-10 David Levin <levin@chromium.org> Reviewed by Dmitry Titov. Fetching a Worker with url that isn't allowed from a file based test causes DRT to crash. https://bugs.webkit.org/show_bug.cgi?id=62469 Test: fast/workers/worker-crash-with-invalid-location.html * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerScriptLoader::load): Changed to using the RefCounted version of WorkerScriptLoader. * workers/Worker.cpp: (WebCore::Worker::create): Ditto. * workers/Worker.h: Ditto. * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts): Ditto. * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::~WorkerScriptLoader): Created to allow removing some header includes in WorkerScriptLoader.h. (WebCore::WorkerScriptLoader::loadAsynchronously): Fix the ordering of setPendingActivity and keep WorkerScriptLoader alive during a potential callback. * workers/WorkerScriptLoader.h: Made this RefCounted to allow for keeping it alive during callbacks. Also, removed unnecessary header inclusions (and added a destructor to facilitate that). (WebCore::WorkerScriptLoader::create): 2011-06-10 Alok Priyadarshi <alokp@chromium.org> Reviewed by James Robinson. [chromium] Top portion of page is rendered messed up with accelerated drawing https://bugs.webkit.org/show_bug.cgi?id=62484 Fixed the math in flipping the texture from bottom-up to top-down. Test: compositing/repaint/shrink-layer.html (existing) * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::draw): 2011-06-10 Tony Chang <tony@chromium.org> Reviewed by Ojan Vafai. add a compile guard ENABLE(FLEXBOX) https://bugs.webkit.org/show_bug.cgi?id=62049 * Configurations/FeatureDefines.xcconfig: 2011-06-10 Sam Weinig <sam@webkit.org> Roll out r88568. It is not the right fix for the problem. * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::isApplicationCacheEnabled): 2011-06-10 Mark Rowe <mrowe@apple.com> Reviewed by Dimitri Glazkov. <rdar://problem/9562114> Fix DumpRenderTree build for production configuration. Rename the built WebCoreTestSupport dylib to libWebCoreTestSupport.dylib so that it can be found via the library search path rather than requiring an absolute path be passed to the linker. Install the library and its associated header file in a more appropriate location for the production configuration. * Configurations/WebCoreTestSupport.xcconfig: 2011-06-10 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt. Add a scheduleSetNeedsStyleRecalc() method to ContainerNode for use by RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=62471 RenderLayerCompositor had some code that did a setNeedsStyleRecalc(), but in a way that was safe to call during existing style recalc or layout. Move this code to ContainerElement so it can be called elsewhere. Also add a param to the node callback so we can pass the style change type. * dom/ContainerNode.cpp: (WebCore::ContainerNode::queuePostAttachCallback): (WebCore::ContainerNode::dispatchPostAttachCallbacks): (WebCore::needsStyleRecalcCallback): (WebCore::ContainerNode::scheduleSetNeedsStyleRecalc): * dom/ContainerNode.h: * dom/Node.h: (WebCore::Node::scheduleSetNeedsStyleRecalc): * html/HTMLFormControlElement.cpp: (WebCore::focusPostAttach): (WebCore::updateFromElementCallback): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateWidgetCallback): * html/HTMLPlugInImageElement.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::attachRootPlatformLayer): (WebCore::RenderLayerCompositor::detachRootPlatformLayer): (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): * rendering/RenderLayerCompositor.h: * svg/SVGUseElement.cpp: (WebCore::updateFromElementCallback): 2011-06-10 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: indexedDB.open() name argument is required https://bugs.webkit.org/show_bug.cgi?id=62398 Test: storage/indexeddb/database-name-undefined.html * storage/IDBFactory.idl: use appropriate IDL magic to force undefined values to null, so we handle missing arguments as well as null arguments 2011-06-10 Sam Weinig <sam@webkit.org> Reviewed by Beth Dakin. Common crash in ApplicationCacheHost::isApplicationCacheEnabled <rdar://problem/9328684> * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::isApplicationCacheEnabled): Speculative fix for a null frame on ApplicationCacheHost's DocumentLoader. 2011-06-10 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Remove Document::finishParsing https://bugs.webkit.org/show_bug.cgi?id=62474 This function appears to exist only to confuse and befuddle us. This patch prepares for DocumentWriter to grab hold of the parser. This patch removes one of the print statements from INSTRUMENT_LAYOUT_SCHEDULING, but I'm not sure INSTRUMENT_LAYOUT_SCHEDULING works anymore anyway. * dom/Document.cpp: * dom/Document.h: * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::finish): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::finish): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::addData): (WebCore::DocumentWriter::endIfNotLoadingMainResource): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stop): 2011-06-10 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Tony Chang. IndexedDB: setVersion() version argument is required https://bugs.webkit.org/show_bug.cgi?id=62401 Test: storage/indexeddb/setVersion-undefined.html * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::setVersion): check for null version * storage/IDBDatabase.idl: add IDL magic to force undefined to null so we can handle both missing and null arguments 2011-06-10 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Null-check the layer owner again when painting layers https://bugs.webkit.org/show_bug.cgi?id=62473 Speculative fix for a crash that occurs when the layer's owner gets destroyed during painting. * platform/graphics/mac/WebLayer.mm: (drawLayerContents): 2011-06-08 Robert Hogan <robert@webkit.org> Reviewed by Andreas Kling. [Qt] Lighten the --no-svg build a little https://bugs.webkit.org/show_bug.cgi?id=62314 Only generate source from SVG*.idl if the build is svg-enabled. * CodeGenerators.pri: 2011-06-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Rob Buis. Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts https://bugs.webkit.org/show_bug.cgi?id=59085 Add glyph table to SVGFontElement mapping between SVGGlyph <-> Glyph https://bugs.webkit.org/show_bug.cgi?id=62441 Preparation patch 1: Introduce the internal glyph table in SVGGlyphMap that will be used to identify each SVGGlyph identifier with a Glyph (which is just an ushort). It will be used by follow-up patches. Doesn't affect any test so far. * platform/graphics/SVGGlyph.h: (WebCore::SVGGlyph::SVGGlyph): (WebCore::SVGGlyph::operator==): * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunWalker::walk): * svg/SVGFontData.cpp: (WebCore::SVGFontData::initializeFontData): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::SVGFontElement): (WebCore::SVGFontElement::registerLigaturesInGlyphCache): (WebCore::SVGFontElement::ensureGlyphCache): (WebCore::kerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::collectGlyphsForString): (WebCore::SVGFontElement::collectGlyphsForGlyphName): (WebCore::SVGFontElement::svgGlyphForGlyph): (WebCore::SVGFontElement::missingGlyph): * svg/SVGFontElement.h: (WebCore::SVGKerningPair::SVGKerningPair): * svg/SVGGlyphMap.h: (WebCore::SVGGlyphMap::addGlyphByUnicodeString): (WebCore::SVGGlyphMap::addGlyphByName): (WebCore::SVGGlyphMap::appendToGlyphTable): (WebCore::SVGGlyphMap::collectGlyphsForString): (WebCore::SVGGlyphMap::clear): (WebCore::SVGGlyphMap::svgGlyphForGlyph): (WebCore::SVGGlyphMap::glyphIdentifierForGlyphName): 2011-06-10 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Regression r85573: Blank pages appear at the end of some wikipedia documents. https://bugs.webkit.org/show_bug.cgi?id=62343 Fix regression caused by r85573. Cached document size not updated after layout. Test: printing/page-count-relayout-shrink.html * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): 2011-06-10 Rob Buis <rbuis@rim.com> Reviewed by Nikolas Zimmermann. amation event handling broken: focusin https://bugs.webkit.org/show_bug.cgi?id=12894 focusin, focusout, activate not implemented in SVG https://bugs.webkit.org/show_bug.cgi?id=40545 Make elements that should support GraphicalEventAttribute handle focussing, since focusin, focusout is part of that: http://www.w3.org/TR/SVG11/intro.html#TermGraphicalEventAttribute Match Opera behaviour ; elements that support GraphicalEventAttribute can receive visual mouse focus when having either a focusin or focusout event handler. Elements that support GraphicalEventAttribute can receive visual keyboard focus when having either a focusin or focusout event handler. Keyboard focus does not advance to SVG elements that are not focusable at the time. Tests: svg/custom/focus-event-handling-keyboard.xhtml svg/custom/focus-event-handling.xhtml * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::computeRectForRepaint): * svg/SVGCircleElement.h: (WebCore::SVGCircleElement::supportsFocus): * svg/SVGEllipseElement.h: (WebCore::SVGEllipseElement::supportsFocus): * svg/SVGGElement.h: (WebCore::SVGGElement::supportsFocus): * svg/SVGImageElement.h: (WebCore::SVGImageElement::supportsFocus): * svg/SVGLineElement.h: (WebCore::SVGLineElement::supportsFocus): * svg/SVGPathElement.h: (WebCore::SVGPathElement::supportsFocus): * svg/SVGPolyElement.h: (WebCore::SVGPolyElement::supportsFocus): * svg/SVGRectElement.h: (WebCore::SVGRectElement::supportsFocus): * svg/SVGSVGElement.h: (WebCore::SVGSVGElement::supportsFocus): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::isMouseFocusable): (WebCore::SVGStyledElement::isKeyboardFocusable): * svg/SVGStyledElement.h: * svg/SVGSwitchElement.h: (WebCore::SVGSwitchElement::supportsFocus): * svg/SVGSymbolElement.h: (WebCore::SVGSymbolElement::supportsFocus): * svg/SVGTextElement.h: (WebCore::SVGTextElement::supportsFocus): * svg/SVGUseElement.h: (WebCore::SVGUseElement::supportsFocus): 2011-06-10 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Clean up CSSPrimitiveValue::computeLength* https://bugs.webkit.org/show_bug.cgi?id=61612 No new tests as no functionality changed. * css/CSSGradientValue.cpp: Use new computeLength functions. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthIntForLength): Reduce to a single function using default parameter values. (WebCore::CSSPrimitiveValue::computeLength): Redefine existing functions with separate names as a single function using templated function specialization. * css/CSSPrimitiveValue.h: Prototypes for computeLengthIntForLength and computeLength. * css/CSSStyleApplyProperty.cpp: Use new computeLength functions. * css/CSSStyleSelector.cpp: Use new computeLength functions. * css/MediaQueryEvaluator.cpp: Use new computeLength functions. * css/SVGCSSStyleSelector.cpp: Use new computeLength functions. 2011-06-10 Simon Fraser <simon.fraser@apple.com> Reviewed by Beth Dakin. Add utility to RenderLayer to determine if the layer is scrollable https://bugs.webkit.org/show_bug.cgi?id=62467 New method that returns true if either scrollbar is present and enabled. Not called anywhere yet. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::allowsScrolling): * rendering/RenderLayer.h: 2011-06-10 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Tony Chang. REGRESSION (r88332): prototype-inheritance-2 ASSERTS attempting to enumerate spellCheckRanges https://bugs.webkit.org/show_bug.cgi?id=62460 Test: fast/dom/prototype-inheritance-2.html * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::userSpellingMarkersForNode): Added an extra 0-check. 2011-06-10 James Simonsen <simonjam@chromium.org> Reviewed by Tony Gentilcore. Don't execute scripts in shadow SVG. https://bugs.webkit.org/show_bug.cgi?id=62225 Test: svg/dom/use-style-recalc-script-execute-crash.html * dom/ScriptElement.cpp: (WebCore::ScriptElement::prepareScript): 2011-06-10 Konstantin Tokarev <ktokarev@smartlabs.tv> Reviewed by Joseph Pecoraro. Fixed build with enabled workers and disabled inspector https://bugs.webkit.org/show_bug.cgi?id=62461 * inspector/InspectorWorkerAgent.cpp: Added inspector guard 2011-06-10 Darin Adler <darin@apple.com> Reviewed by Eric Carlson. REGRESSION: Fullscreen video controller can't be dragged https://bugs.webkit.org/show_bug.cgi?id=62462 No regression test because we don't have machinery for testing the fullscreen mode. We may find a way to add this in the future. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::MediaControlPanelElement): Initialize new booleans related to dragging. (WebCore::MediaControlPanelElement::startDrag): Added. Starts drag if dragging is allowed and a drag isn't already in progress. (WebCore::MediaControlPanelElement::continueDrag): Added. Moves the window if dragging is already in progress. (WebCore::MediaControlPanelElement::endDrag): Added. Ends the capture that is done during the dragging process. (WebCore::MediaControlPanelElement::setPosition): Added. Positions the panel using explicit top/left. (WebCore::MediaControlPanelElement::resetPosition): Added. Removes the positioning done by setPosition. (WebCore::MediaControlPanelElement::defaultEventHandler): Added. Calls startDrag, continueDrag, and endDrag in response to mouse events. (WebCore::MediaControlPanelElement::setCanBeDragged): Added. * html/shadow/MediaControlElements.h: Added new function and data members as mentioned above. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::enteredFullscreen): Call setCanBeDragged(true) so you can drag the panel while in fullscreen. (WebCore::MediaControlRootElement::exitedFullscreen): Call setCanBeDragged(false) so you can't drag the panel while not in fullscreen. Also call resetPosition so position changes from dragging don't affect the panel in other contexts. 2011-06-10 Darin Adler <darin@apple.com> Reviewed by Eric Carlson. REGRESSION: Full screen video HUD is positioned too low for standalone video documents https://bugs.webkit.org/show_bug.cgi?id=62463 No test because we don't currently have machinery for testing fullscreen. * css/fullscreen.css: Removed rule that said bottom: 0px for the control panel for full page media in full screen mode. This is not needed because the control panel for full screen mode already has style rules to set its vertical position. (:-webkit-full-screen-ancestor:not(iframe)): Fixed typo where it said -webkit-tranform. This will fix a potential problem where fullscreen would malfunction on a page that had a media element inside a transform. 2011-06-10 Sergio Villar Senin <svillar@igalia.com> Reviewed by Gustavo Noronha Silva. [GTK] Add support for non-ASCII filenames in Content-Disposition header https://bugs.webkit.org/show_bug.cgi?id=62454 Try latin1 as fallback for header parameter values as some servers do not follow RFC 2045 for example with filename parameter in Content-Disposition. No new tests required as no functionality changed. * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::updateFromSoupMessage): 2011-06-10 No'am Rosenthal <noam.rosenthal@nokia.com> and Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> Reviewed by Kenneth Rohde Christiansen. Add layer factory to GraphicsLayer for creating non-default layer type. https://bugs.webkit.org/show_bug.cgi?id=61925 Added a static factory protected member to GraphicsLayer, which should be accessed from a port-specific implementation of GraphicsLayer::create. For now this is enabled for Qt only. This is needed for accelerated compositing across processes in WebKit2, since WebCore doesn't know in compile time whether it's in WebKit or WebKit2, which makes having two different implementations of GraphicsLayer coexist impossible without some runtime factory that can be overridden by the web process. Note that the use of the factory would be optional, and the port-specific GraphicsLayer::create would have to explicitly call it, in order to be unintrusive with current implementations. No new functionality, so no new tests. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setGraphicsLayerFactory): * platform/graphics/GraphicsLayer.h: 2011-06-10 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Kenneth Rohde Christiansen. [CMAKE] Add generic support for building with WebGL https://bugs.webkit.org/show_bug.cgi?id=62376 Set new THIRDPARTY_DIR variable to compile sources under ThirdParty. No change in functionality so no new tests. * CMakeLists.txt: 2011-06-10 Ryuan Choi <ryuan.choi@samsung.com> Reviewed by Andreas Kling. [GTK][EFL] m_imageInterpolationQuality is not initialized in PlatformContextCairo::PlatformContextCairo. https://bugs.webkit.org/show_bug.cgi?id=62435 No new tests required as just fixed warning. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::PlatformContextCairo): 2011-06-11-06-09 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens. https://bugs.webkit.org/show_bug.cgi?id=62377 * inspector/InspectorValues.cpp: 2011-06-10 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88530. http://trac.webkit.org/changeset/88530 https://bugs.webkit.org/show_bug.cgi?id=62440 qt build was broken (Requested by loislo on #webkit). * inspector/InspectorValues.cpp: 2011-06-09 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens. https://bugs.webkit.org/show_bug.cgi?id=62377 * inspector/InspectorValues.cpp: 2011-06-09 Jer Noble <jer.noble@apple.com> Reviewed by Darin Adler. REGRESSION: Vertical scroll bar appears when taking videos into full screen at jerryseinfeld.com https://bugs.webkit.org/show_bug.cgi?id=62402 Sites are able to override the "overflow:hidden" rule for root full-screen nodes simply by adding a "html {}" rule. Make this rule !important, and also make it apply to root nodes who are merely ancestors of full-screen elements, to cover the case of a root node containing an <iframe> whose contents have gone full-screen. * css/fullscreen.css: (:root:-webkit-full-screen-document:not(:-webkit-full-screen), :root:-webkit-full-screen-ancestor): Apply the overflow rule to root elements who are full-screen ancestors, and make them !important. 2011-06-09 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Rename RenderStyle visuallyOrdered property and use an enum instead of a bool. https://bugs.webkit.org/show_bug.cgi?id=61495 No new tests required as no functionality changed. * css/CSSPrimitiveValueMappings.h: Support cast to/from Order * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): Convert from bool to enum type. (WebCore::CSSStyleSelector::applyProperty): Convert to macro that uses the cast defined in CSSPrimitiveValueMappings. * dom/Document.cpp: (WebCore::Document::setVisuallyOrdered): Change call to RenderStyle::setRTLOrdering using enum parameter. * rendering/style/RenderStyle.h: rename visuallyOrdered proerties rtlOrdering and use appropriate enum types. * rendering/style/RenderStyleConstants.h: Define enum type. 2011-06-09 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Implement CSSPropertyOutlineStyle handler in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=61601 No new tests. No new functionality added / covered by existing tests. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator EBorderStyle): Support CSSValueAuto as required by outline-style property. (WebCore::CSSPrimitiveValue::operator OutlineIsAuto): Add cast to new OutlineIsAuto enum. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize handler for CSSPropertyOutlineStyle. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove old handler for CSSPropertyOutlineStyle. * rendering/style/OutlineValue.h: Use new OutlineIsAuto enum instead of bool. * rendering/style/RenderStyle.h: Split existing two-parameter setter setOutlineStyle into separate setters for style and auto properties. Use new OutlineIsAuto enum type. * rendering/style/RenderStyleConstants.h: Define new enum OutlineIsAuto. 2011-06-09 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Code cleanup - add wrappers for function pointer dereferences to improve readability in ApplyPropertyDefaultBase and derived classes. https://bugs.webkit.org/show_bug.cgi?id=62418 No new tests / cleanup only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyDefaultBase::applyInheritValue): Use new wrapper functions. (WebCore::ApplyPropertyDefaultBase::applyInitialValue): Use new wrapper functions. (WebCore::ApplyPropertyDefaultBase::setValue): Wrapper for calling m_setter function pointer. (WebCore::ApplyPropertyDefaultBase::value): Wrapper for calling m_getter function pointer. (WebCore::ApplyPropertyDefaultBase::initial): Wrapper for calling m_initial function pointer. (WebCore::ApplyPropertyDefault::applyValue): Use new setValue function. (WebCore::ApplyPropertyLength::applyValue): Use new setValue function. (WebCore::ApplyPropertyWidth::applyValue): Use new setValue function. 2011-06-09 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Antonio Gomes. [EFL] Make accelerated compositing build in Webkit-EFL https://bugs.webkit.org/show_bug.cgi?id=62361 Add a new class, GraphicsLayerEfl - not yet implemented. Add ACCELERATED_COMPOSITING related files to CMakeLists. * CMakeLists.txt: * CMakeListsEfl.txt: * platform/graphics/efl/GraphicsLayerEfl.cpp: Added. (WebCore::GraphicsLayer::create): (WebCore::GraphicsLayerEfl::GraphicsLayerEfl): (WebCore::GraphicsLayerEfl::~GraphicsLayerEfl): (WebCore::GraphicsLayerEfl::setNeedsDisplay): (WebCore::GraphicsLayerEfl::setNeedsDisplayInRect): * platform/graphics/efl/GraphicsLayerEfl.h: Added. 2011-06-09 Jian Li <jianli@chromium.org> Reviewed by David Levin. Calling WebKitBlobBuilder.append with null argument should not crash https://bugs.webkit.org/show_bug.cgi?id=62419 Test: fast/files/blob-builder-crash.html * fileapi/WebKitBlobBuilder.cpp: (WebCore::WebKitBlobBuilder::append): 2011-06-09 Jer Noble <jer.noble@apple.com> Reviewed by David Hyatt. Roll out r88468, and fix bug #61911 without making Element::offset functions virtual. https://bugs.webkit.org/show_bug.cgi?id=62400 No new tests; covered by existing fullscreen/full-screen-video-offset.html test. * rendering/RenderVideo.cpp: (WebCore::rendererPlaceholder): Added; returns the placeholder block, if it exists. (WebCore::RenderVideo::offsetLeft): Pass the offset request to the placeholder block. (WebCore::RenderVideo::offsetTop): Ditto. (WebCore::RenderVideo::offsetWidth): Ditto. (WebCore::RenderVideo::offsetHeight): Ditto. * rendering/RenderVideo.h: Added virtual overrides for the offset functions. 2011-06-09 James Robinson <jamesr@chromium.org> Reviewed by Kenneth Russell. [chromium] Scissor rect not set for clipping layers set offscreen https://bugs.webkit.org/show_bug.cgi?id=62339 We set a scissorRect on each layer, but only layers with masksToBounds and their descendants should actually set a scissor. Layers that didn't need to scissor had empty scissorRects. Unfortunately layers with masksToBounds and their descendants that are scrolled offscreen also end up with an empty clipped scissor rect. This patch sets an explicit bit on each layer that should scissor and then checks that bit instead of checking for an empty scissor rect at draw time. RenderSurfaceChromiums have different requirements for setScissorToRect, so the old behavior is still available with a flag. This can probably be cleaned up more. Test: platform/chromium/compositing/scissor-out-of-viewport.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces): (WebCore::LayerRendererChromium::drawLayer): (WebCore::LayerRendererChromium::setScissorToRect): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setUsesLayerScissor): (WebCore::CCLayerImpl::usesLayerScissor): 2011-06-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88468. http://trac.webkit.org/changeset/88468 https://bugs.webkit.org/show_bug.cgi?id=62408 It broke build if !ENABLE(FULLSCREEN_API) (Requested by Ossy on #webkit). * dom/Element.cpp: (WebCore::adjustForLocalZoom): * dom/Element.h: * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: 2011-06-09 Kenneth Russell <kbr@google.com> Reviewed by Adam Barth. Disallow use of cross-domain media (images, video) in WebGL https://bugs.webkit.org/show_bug.cgi?id=62257 Updated WebGL implementation to track recent spec updates in this area. Tests: http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html http/tests/security/webgl-remote-read-remote-image-allowed.html http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::readPixels): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::videoFrameToImage): (WebCore::WebGLRenderingContext::texSubImage2D): * html/canvas/WebGLRenderingContext.h: 2011-06-09 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Add an ASSERT to HTMLTreeBuilder https://bugs.webkit.org/show_bug.cgi?id=62403 This ASSERT was useful in investigating a re-entrancy bug. We should keep it. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndOfFile): 2011-06-09 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. Fix a regression from r88478. * platform/graphics/mac/ComplexTextControllerCoreText.cpp: (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Add the runs in reverse order in the RTL case here, since the whole vector is reversed by collectComplexTextRuns() afterwards. 2011-06-09 Julien Chaffraix <jchaffraix@codeaurora.org> Reviewed by Antti Koivisto. REGRESSION(84329): Stylesheets on some pages do not load https://bugs.webkit.org/show_bug.cgi?id=61400 Test: fast/css/link-disabled-attr.html Fixed r84329: the change did not take into account the fact that HTMLLinkElement did already contain the disabled information and the 2 information were not linked as they should have! The new logic pushes the information to the stylesheet as this is what the spec mandates and what FF is doing. Also it keeps one bit of information (that JS enabled the stylesheet) as it is needed for the recalcStyleSelector logic. * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): s/isDisabled/disabled. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): Removed m_disabledState, replaced by m_isEnabledViaScript. (WebCore::HTMLLinkElement::setDisabled): Updated the logic after m_disabledState removal. It also matches the spec by forwarding the disabled state to our stylesheet if we have one. (WebCore::HTMLLinkElement::parseMappedAttribute): Removed harmful handling of the disabledAttr. (WebCore::HTMLLinkElement::process): Updated after m_disabledState removal. * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isEnabledViaScript): Ditto. (WebCore::HTMLLinkElement::isAlternate): Ditto. 2011-06-09 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. Simplify ComplexTextController::collectComplexTextRuns() https://bugs.webkit.org/show_bug.cgi?id=62387 No new test, since functionality is unchanged. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::collectComplexTextRuns): Always iterate characters in logical order, then reverse the run vector for RTL. 2011-06-09 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Kent Tamura. Fold isShadowBoundary into isShadowRoot. https://bugs.webkit.org/show_bug.cgi?id=62317 Since there are no longer cases where Node::isShadowBoundary() != Node::isShadowRoot, we can remove this function. In one case where isShadowBoundary was also tested to find ShadowContentElemnt, added a new isContentElement function. Refactoring, covered by existing tests. * css/CSSStyleSelector.cpp: (WebCore::isAtShadowBoundary): Changed to use isShadowRoot. * dom/Element.cpp: (WebCore::Element::isSpellCheckingEnabled): Ditto. * dom/Node.cpp: (WebCore::Node::nonBoundaryShadowTreeRootNode): Ditto. (WebCore::Node::nonShadowBoundaryParentNode): Ditto. * dom/Node.h: (WebCore::Node::isContentElement): Added. * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): Changed to use isShadowRoot. * dom/Position.cpp: (WebCore::Position::Position): Ditto. * dom/ShadowContentElement.h: (WebCore::ShadowContentElement::isContentElement): Added. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::hasContentElement): Changed to use isContentElement. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertNodeAfter): Changed to use isShadowRoot. * editing/htmlediting.cpp: (WebCore::visiblePositionBeforeNode): Ditto. (WebCore::visiblePositionAfterNode): Ditto. * page/DragController.cpp: (WebCore::asFileInput): Ditto. * rendering/RenderTreeAsText.cpp: (WebCore::nodePosition): Ditto. 2011-06-09 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler. Crashes in RenderLayerBacking::paintingGoesToWindow https://bugs.webkit.org/show_bug.cgi?id=61159 Speculative fix for unreproducible crash that can occur when RenderObject::repaintUsingContainer() finds a repaintContainer that is not the RenderView, but that is also not composited (for unknown reasons), by checking to see if the layer is compositing before using backing(). An assertion remains to try to catch this in debug builds. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setBackingNeedsRepaintInRect): 2011-06-09 Julien Chaffraix <jchaffraix@webkit.org> Reviewed by Darin Adler. WebCore::WebKitCSSKeyframesRuleInternal::nameAttrSetter() - crash https://bugs.webkit.org/show_bug.cgi?id=62384 Test: fast/css/webkit-keyframes-crash.html * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::setName): stylesheet() is never garanteed to return a non-null pointer. Thus null-check here like the rest of the code. 2011-06-09 Julien Chaffraix <jchaffraix@codeaurora.org> Reviewed by David Hyatt. chrome.dll!WebCore::RenderStyle::fontMetrics ReadAV@NULL (two crashes) https://bugs.webkit.org/show_bug.cgi?id=57756 Tests: fast/css/fontMetric-border-radius-null-crash.html fast/css/fontMetric-webkit-border-end-width-null-crash.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): Added a call to Font::update so that our FontFallbackList is allocated if we ever need it when applying our style rules. 2011-06-09 Cary Clark <caryclark@google.com> Reviewed by Eric Seidel. Create local CG context for Mac UI elements when Skia is renderer https://bugs.webkit.org/show_bug.cgi?id=62213 When building Mac Chrome using Skia as the WebKit renderer, add state to LocalCurrentGraphicsContext to convert the SkCanvas context passed by WebKit into the CGContext needed by UI rendering. No new tests. The define typo in question is not yet enabled, so this change has no functional impact. * platform/mac/LocalCurrentGraphicsContext.h: Add SkiaBitLocker to create and release the converted CGContext. Add ContextContainer, a class for Skia to create and release the converted CGContext. If Skia is not used, the class has no effect. * platform/mac/LocalCurrentGraphicsContext.mm: (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): When building with Skia, create the CGContext before passing it on. (WebCore::LocalCurrentGraphicsContext::cgContext): Get the CGContext from the SkiaBitLocker, or the saved context, as appropriate. * rendering/RenderThemeMac.mm: Get the CGContext from Skia conversion or native, as appropriate. Use the LocalCurrentGraphicsContext if there is one. Otherwise, add a ContextContainer to house the SkCanvas to CGContext conversion. (WebCore::RenderThemeMac::paintCapsLockIndicator): (WebCore::RenderThemeMac::paintProgressBar): (WebCore::RenderThemeMac::paintMenuListButtonGradients): (WebCore::RenderThemeMac::paintSliderTrack): (WebCore::RenderThemeMac::paintMediaFullscreenButton): (WebCore::RenderThemeMac::paintMediaMuteButton): (WebCore::RenderThemeMac::paintMediaPlayButton): (WebCore::RenderThemeMac::paintMediaSeekBackButton): (WebCore::RenderThemeMac::paintMediaSeekForwardButton): (WebCore::RenderThemeMac::paintMediaSliderTrack): (WebCore::RenderThemeMac::paintMediaSliderThumb): (WebCore::RenderThemeMac::paintMediaRewindButton): (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): (WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton): (WebCore::RenderThemeMac::paintMediaControlsBackground): (WebCore::RenderThemeMac::paintMediaCurrentTime): (WebCore::RenderThemeMac::paintMediaTimeRemaining): (WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): (WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): (WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): 2011-06-02 Jer Noble <jer.noble@apple.com> Reviewed by Maciej Stachowiak. REGRESSION: Page layout messed up after exiting full screen after video ends at jerryseinfeld.com https://bugs.webkit.org/show_bug.cgi?id=61911 <rdar://problem/9523017> Test: fullscreen/full-screen-video-offset.html When the video element is taken full-screen in the new element full-screen API, return the offset width and height of the placeholder renderer which is filling in for the full-screen element. To do so, override offsetWidth, Height, Left, and Top from Element. These are non-virtual functions, so make them virtual. * dom/Element.cpp: (WebCore::Element::adjustForLocalZoom): Made into a class-static function. * dom/Element.h: Made offset functions virtual. * html/HTMLMediaElement.cpp: (WebCore::elementPlaceholder): Added; utility function. (WebCore::HTMLMediaElement::offsetLeft): Added; virtual override of the Element function. Will be called directly via javascript. (WebCore::HTMLMediaElement::offsetTop): Ditto. (WebCore::HTMLMediaElement::offsetWidth): Ditto. (WebCore::HTMLMediaElement::offsetHeight): Ditto. * html/HTMLMediaElement.h: 2011-06-09 Dave Tapuska <dtapuska@rim.com> Reviewed by Daniel Bates. PingLoader destructor could dereference 0 if the Resource Handle creation failed. https://bugs.webkit.org/show_bug.cgi?id=62304 * loader/PingLoader.cpp: (WebCore::PingLoader::~PingLoader): 2011-06-08 Abhishek Arya <inferno@chromium.org> Reviewed by Ryosuke Niwa. Make indexForVisiblePosition and isSelectableElement static. https://bugs.webkit.org/show_bug.cgi?id=62329 This protects us when converting frame->selection->start() or end() to VisiblePosition which blows away the RenderTextControl from underneath (due to layout update). Test: fast/forms/text-control-selection-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::selectionStart): (WebCore::RenderTextControl::selectionEnd): (WebCore::RenderTextControl::isSelectableElement): (WebCore::RenderTextControl::indexForVisiblePosition): * rendering/RenderTextControl.h: 2011-06-09 Ben Murdoch <benm@google.com> Reviewed by Yury Semikhatsky. Build break in ScriptProfile.cpp and inspector disabled. https://bugs.webkit.org/show_bug.cgi?id=62373 No new tests - build fix only. * bindings/v8/ScriptProfile.cpp: Add necessary guards. * bindings/v8/ScriptProfile.h: ditto. 2011-06-09 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: Network panel preview tab does not reattach SourceFrame when switching between preview and response tabs. https://bugs.webkit.org/show_bug.cgi?id=62298 * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype._ensureInnerViewShown.callback): (WebInspector.ResourcePreviewView.prototype._ensureInnerViewShown): 2011-06-09 Csaba Osztrogonác <ossy@webkit.org> [Qt][Mac] Speculative buildfix after r88286. * platform/graphics/IntPoint.h: 2011-06-09 Mike Lawther <mikelawther@chromium.org> Reviewed by Kent Tamura. Parsing issue with -webkit-calc https://bugs.webkit.org/show_bug.cgi?id=62276 Set the CSSParserString for the calc functions. Test: css3/calc/regression-62276.html * css/CSSParser.cpp: (WebCore::CSSParser::lex): 2011-06-09 Robert Hogan <robert@webkit.org> Reviewed by Andreas Kling. Teach Qt about window.internals https://bugs.webkit.org/show_bug.cgi?id=61074 A weakness of the Qt DRT setup is that things like JSContextRef are abstracted away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals. Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing. Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame and others. The only alternative seems like a compile time guard which we would have to teach the bots about. * CodeGenerators.pri: * WebCore.pri: * WebCore.pro: 2011-06-08 Mikołaj Małecki <m.malecki@samsung.com> Reviewed by Pavel Feldman. Web Inspector: Crash by buffer overrun crash when serializing inspector object tree. https://bugs.webkit.org/show_bug.cgi?id=52791 No new tests. The problem can be reproduced by trying to create InspectorValue from 1.0e-100 and call ->toJSONString() on this. * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): Added checking the predicted buffer size and choosing exponential format, or eventually "NaN" if the buffer is too small for decimal format. 2011-06-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88387. http://trac.webkit.org/changeset/88387 https://bugs.webkit.org/show_bug.cgi?id=62368 New tests introduced in 88387 fail on Leopard,GTK,Qt bots (Requested by Ossy on #webkit). * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/CanvasRenderingContext.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::readPixels): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::videoFrameToImage): (WebCore::WebGLRenderingContext::texSubImage2D): * html/canvas/WebGLRenderingContext.h: 2011-06-09 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Running script from attach can remove elements from the stack of open elements https://bugs.webkit.org/show_bug.cgi?id=62160 When the tree build runs script synchronously, that script can remove arbitrary elements from the stack of open elements. We need to hold a reference to |parent| in attach instead of rely upon the reference in the stack of open elements. Test: fast/parser/document-write-onload-clear.html * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): 2011-06-08 Luke Macpherson <macpherson@chromium.org> Reviewed by Eric Seidel. Make CSSPrimitiveValue support cast to EVerticalAlign. https://bugs.webkit.org/show_bug.cgi?id=62356 No new tests / refactoring only. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EVerticalAlign): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-06-08 Justin Novosad <junov@chromium.org> Reviewed by James Robinson. [Chromium] Crash when closing a tab with accelerated 2d canvas https://bugs.webkit.org/show_bug.cgi?id=62324 Upon graphics context destruction, it is important to signal skia to abandon all of its resource handles. This prevents a crash caused by skia attempting to release resources that were in the destroyed graphics context. * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D): 2011-06-08 James Robinson <jamesr@chromium.org> Reviewed by Darin Fisher. REGRESSION(88260): 10-50% performance regression across many page cyclers https://bugs.webkit.org/show_bug.cgi?id=62349 r88260 fixed a font cache resource leak and lowered the inactive font cache threshold. The latter caused a significant performance regression across many chromium page cyclers, for example http://build.chromium.org/f/chromium/perf/linux-release-webkit-latest/moz/report.html?history=50&rev=88279. This restores the previous inactive font size thresholds to their previous values, but retains the font cleanup logic. * platform/graphics/FontCache.cpp: 2011-06-08 Hayato Ito <hayato@chromium.org> Reviewed by Dimitri Glazkov. A forward/backward tab traversal now visits focusable elements in a shadow root. https://bugs.webkit.org/show_bug.cgi?id=61410 Test: fast/dom/shadow/tab-order-iframe-and-shadow.html Like a iframe element, a shadow host becomes a scope of tabindex. That means all descendant elements in a shadow root are skipped if the host node of the shadow root is not focusable. The patch doesn't affect HTMLInputElement and HTMLTextAreaElement, which uses a shadow root and do extra works in their focus() method. A shadow root's <content> is not considered in this patch. That will be addressed in a following patch. * page/FocusController.cpp: (WebCore::shadowRoot): (WebCore::isTreeScopeOwner): (WebCore::FocusController::deepFocusableNode): (WebCore::FocusController::advanceFocusInDocumentOrder): (WebCore::FocusController::findFocusableNodeAcrossTreeScope): (WebCore::FocusController::findFocusableNode): (WebCore::FocusController::nextFocusableNode): (WebCore::FocusController::previousFocusableNode): (WebCore::FocusController::ownerOfTreeScope): * page/FocusController.h: 2011-06-08 Hayato Ito <hayato@chromium.org> Reviewed by Hajime Morita. Makes sure that document.activeElement won't be an element in shadow root. https://bugs.webkit.org/show_bug.cgi?id=61413 Test: fast/dom/shadow/activeelement-should-be-shadowhost.html * html/HTMLDocument.cpp: (WebCore::focusedFrameOwnerElement): (WebCore::HTMLDocument::activeElement): 2011-06-08 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. Allow drawing a slider thumb for any nodes. https://bugs.webkit.org/show_bug.cgi?id=62196 RenderObject::node() should provide various information which is necessary for rendering. We don't need to refer the parent renderer. * dom/Node.cpp: (WebCore::Node::focusDe1egate): Added. * dom/Node.h: Added a declaration. * html/shadow/MediaControlElements.cpp: (WebCore::toParentMediaElement): Added an overload of toParentMediaElement() with Node* parameter. * html/shadow/MediaControlElements.h: (WebCore::toParentMediaElement): ditto. * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::isEnabledFormControl): Returns the status of the host node. (WebCore::SliderThumbElement::isReadOnlyFormControl): ditto. (WebCore::SliderThumbElement::focusDe1egate): Returns the host node so that RenderTheme::isFocused() returns true. (WebCore::SliderThumbElement::detach): Style nit. (WebCore::SliderThumbElement::hostInput): Make it const because it is called by const functions. * html/shadow/SliderThumbElement.h: - Remove inDragMode() - Update declarations * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintMediaSliderThumb): Use Node::shadowAncestorNode() instead of RenderObject::parent() to support deeper thumb nodes. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaSliderThumb): ditto. (WebCore::paintMediaVolumeSliderThumb): Remove isSlider() check. * rendering/RenderSlider.cpp: (WebCore::RenderSlider::inDragMode): SliderThumbElement::inDragMode() was removed, and Node::active() has the same information. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Remove isSlider() checks. (WebCore::RenderTheme::isFocused): Apply Node::focusDelegate(). * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderThemeChromiumLinux::paintSliderThumb): isPressed() is enough. * rendering/RenderThemeChromiumWin.cpp: isEnabled(), isFocused(), and isPressed() are enough. (WebCore::RenderThemeChromiumWin::determineSliderThumbState): (WebCore::RenderThemeChromiumWin::determineClassicState): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderThumb): - Remove isSlider() check. - Passing 'o' to udpateFooState functions is enough. - isPressed() is enough. * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintSliderThumb): We don't need special handling anymore. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::determineSliderThumbState): isEnabled(), isFocused(), and isPressed() are enough. 2011-06-08 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. constructTreeFromToken can re-enter parser, causing ASSERTs https://bugs.webkit.org/show_bug.cgi?id=62160 This patch clears the HTMLToken before constructing the tree from the token, putting the HTMLDocumentParser in a good state to be re-entered. Tests: fast/parser/document-write-onload-nesting.html fast/parser/document-write-onload-ordering.html * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): * html/parser/HTMLToken.h: (WebCore::HTMLToken::isUninitialized): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::constructTreeFromToken): 2011-06-08 Kent Tamura <tkent@chromium.org> Fix Qt build for r88405. https://bugs.webkit.org/show_bug.cgi?id=62208 * platform/qt/RenderThemeQt.h: 2011-06-08 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. Change the argument of RenderTheme::adjustSliderThumbSize(): RenderObject* -> RenderStyle* https://bugs.webkit.org/show_bug.cgi?id=62208 Change the argument type of RenderTheme::adjustSliderThumbSize() and RenderMediaControls::adjustMediaSliderThumbSize() from RenderObject* to RenderStyle*. Also, each of adjustSliderThumbStyle() overrides calls RenderTheme:: adjustSliderThumbStyle() for future changes. No new tests. This is a refactoring and should not change any behavior. * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::layout): Passing RenderStyle* and remove a FIXME comment. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSliderThumbStyle): Calls RenderTheme::adjustSliderThumbStyle(). * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::adjustSliderThumbStyle): ditto. (WebCore::RenderThemeGtk::adjustMediaSliderThumbSize): * platform/gtk/RenderThemeGtk.h: * platform/gtk/RenderThemeGtk2.cpp: (WebCore::RenderThemeGtk::adjustSliderThumbSize): * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::adjustSliderThumbSize): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustSliderThumbStyle): ditto. (WebCore::RenderThemeQt::adjustSliderThumbSize): * rendering/RenderMediaControls.cpp: (WebCore::RenderMediaControls::adjustMediaSliderThumbSize): * rendering/RenderMediaControls.h: * rendering/RenderMediaControlsChromium.cpp: (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize): * rendering/RenderMediaControlsChromium.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::layout): Passing RenderStyle* and remove a FIXME comment. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustSliderThumbStyle): Add a comment. (WebCore::RenderTheme::adjustSliderThumbSize): * rendering/RenderTheme.h: * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize): * rendering/RenderThemeChromiumLinux.h: * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::adjustMediaSliderThumbSize): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): * rendering/RenderThemeChromiumSkia.h: * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize): * rendering/RenderThemeChromiumWin.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustSliderThumbStyle): Calls RenderTheme::adjustSliderThumbStyle(). (WebCore::RenderThemeMac::adjustSliderThumbSize): (WebCore::RenderThemeMac::adjustMediaSliderThumbSize): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::adjustSliderThumbStyle): Calls RenderTheme::adjustSliderThumbStyle(). (WebCore::RenderThemeSafari::adjustSliderThumbSize): * rendering/RenderThemeSafari.h: * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSliderThumbSize): * rendering/RenderThemeWin.h: * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::adjustSliderThumbSize): * rendering/RenderThemeWinCE.h: 2011-06-08 Brian Salomon <bsalomon@google.com> Reviewed by James Robinson. Avoid always binding FBO 0 implicitly when deleting FBO in DrawingBuffer code because it invalidates Ganesh's cache of the current FBO. https://bugs.webkit.org/show_bug.cgi?id=62318 Chromium-only crash Failures takes multiple seconds to occur, relying on JS garbage-collection to occur http://www.hotbazooka.com/privatejoe-large * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::clear): 2011-06-08 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. RenderEmbeddedObject::getReplacementTextGeometry https://bugs.webkit.org/show_bug.cgi?id=62313 Replace the last use of tx, ty with IntPoint. Covered by existing tests. * platform/graphics/FloatRect.h: (WebCore::FloatRect::move): (WebCore::FloatRect::moveBy): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintReplaced): (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator): * rendering/RenderEmbeddedObject.h: 2011-06-08 Tim Horton <timothy_horton@apple.com> Reviewed by Ryosuke Niwa. Use correct CFURLStorageSessionRef definition on Leopard, as we created an inconsistency in const-ness between WebCoreSystemInterface.h and these two files in the case of Leopard only. https://bugs.webkit.org/show_bug.cgi?id=62223 * platform/network/ResourceHandle.h: * platform/network/cf/ResourceRequest.h: 2011-06-08 Sailesh Agrawal <sail@chromium.org> Reviewed by Mihai Parparita. Chromium Mac: Enable overlay scrollbars https://bugs.webkit.org/show_bug.cgi?id=59756 Sync ScrollbarThemeChromiumMac.mm/.h with ScrollbarThemeMac.mm to pick up support for overlay scrollbars. The only changes are renaming ScrollbarThemeMac to ScrollbarThemeChromiumMac and using runtime checks instead of #ifdef's. No new tests, since this code is only enabled on future versions of Mac OS X. * platform/chromium/ScrollAnimatorChromiumMac.mm: All changes to this file except in scroll() were to swap #if USE(WK_SCROLLBAR_PAINTER) with runtime checks. (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::notityPositionChanged): (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint): (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentsResized): (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide): (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::cancelAnimations): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (preferredScrollerStyle): Disabled overlay scrollbar styles due to trailing artifacts. (wkScrollbarPainterPaint): Fixed a problem where the scrollbar track wasn't being drawn. (wkScrollbarPainterKnobRect): Implemented a previously unimplemented function. (wkSetScrollbarPainterKnobStyle): Implemented a function that's now supported by the latest Mac OS X seeds. (isScrollbarOverlayAPIAvailable): Enabled new scrollbar code. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: Sync with ScrollbarThemeMac.mm. (WebCore::scrollbarMap): (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::ScrollbarThemeChromiumMac::painterForScrollbar): (WebCore::ScrollbarThemeChromiumMac::scrollbarThickness): (WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeChromiumMac::hasButtons): (WebCore::ScrollbarThemeChromiumMac::hasThumb): (WebCore::buttonRepaintRect): (WebCore::ScrollbarThemeChromiumMac::minimumThumbLength): (WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::paint): 2011-06-06 Nate Chapin <japhet@chromium.org> Reviewed by Adam Barth. Remove all knowledge of CachedResourceRequests from CachedResourceLoader. This puts the full burden of canceling these requests on DocumentLoader (via SubresourceLoader), and makes a CachedResourceRequest an OwnPtr in CachedResource. https://bugs.webkit.org/show_bug.cgi?id=62308 * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::load): (WebCore::CachedResource::stopLoading): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::~CachedResourceLoader): (WebCore::CachedResourceLoader::loadDone): * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::CachedResourceRequest): (WebCore::CachedResourceRequest::~CachedResourceRequest): (WebCore::CachedResourceRequest::load): (WebCore::CachedResourceRequest::didFinishLoading): (WebCore::CachedResourceRequest::didFail): (WebCore::CachedResourceRequest::didReceiveResponse): (WebCore::CachedResourceRequest::end): * loader/cache/CachedResourceRequest.h: 2011-06-08 Mike Reed <reed@google.com> Reviewed by James Robinson. [Skia] check for null-shader from gradient factory https://bugs.webkit.org/show_bug.cgi?id=62319 * platform/graphics/skia/GradientSkia.cpp: (WebCore::Gradient::platformDestroy): (WebCore::Gradient::platformGradient): 2011-06-08 Kenneth Russell <kbr@google.com> Reviewed by Adam Barth. Disallow use of cross-domain media (images, video) in WebGL https://bugs.webkit.org/show_bug.cgi?id=62257 Updated WebGL implementation to track recent spec updates in this area. Tests: http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html http/tests/security/webgl-remote-read-remote-image-allowed.html http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::readPixels): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::videoFrameToImage): (WebCore::WebGLRenderingContext::texSubImage2D): * html/canvas/WebGLRenderingContext.h: 2011-06-08 John Bauman <jbauman@chromium.org> Reviewed by James Robinson. Only draw portions of tiles in contentRect https://bugs.webkit.org/show_bug.cgi?id=62243 Old garbage data can remain in tiles, so make sure to draw only those portions that are supposed to be drawn. Test: compositing/repaint/shrink-layer.html * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::draw): 2011-06-08 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderBlock::isPointInOverflowControl to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62312 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInOverflowControl): (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBlock.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::isPointInOverflowControl): * rendering/RenderListBox.h: 2011-06-08 James Simonsen <simonjam@chromium.org> Reviewed by Tony Gentilcore. Fix clang issue, virtual function const mismatch https://bugs.webkit.org/show_bug.cgi?id=62307 No new tests. Built with clang & ran layout tests. * page/MediaStreamFrameController.h: (WebCore::MediaStreamFrameController::GenericClient::isGenericClient): 2011-06-08 Chris Rogers <crogers@google.com> Reviewed by Kenneth Russell. Implement BiquadFilterNode for filter types: LOWPASS, HIGHPASS, BANDPASS, LOWSHELF, HIGHSHELF, PEAKING, NOTCH, ALLPASS https://bugs.webkit.org/show_bug.cgi?id=62078 No new tests since audio API is not yet implemented. * DerivedSources.make: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/audio/Biquad.cpp: (WebCore::Biquad::Biquad): (WebCore::Biquad::reset): (WebCore::Biquad::setLowpassParams): (WebCore::Biquad::setHighpassParams): (WebCore::Biquad::setNormalizedCoefficients): (WebCore::Biquad::setLowShelfParams): (WebCore::Biquad::setHighShelfParams): (WebCore::Biquad::setPeakingParams): (WebCore::Biquad::setAllpassParams): (WebCore::Biquad::setNotchParams): (WebCore::Biquad::setBandpassParams): (WebCore::Biquad::setZeroPolePairs): (WebCore::Biquad::setAllpassPole): * platform/audio/Biquad.h: * webaudio/AudioContext.cpp: (WebCore::AudioContext::createBiquadFilter): (WebCore::AudioContext::createLowPass2Filter): (WebCore::AudioContext::createHighPass2Filter): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/AudioNode.h: * webaudio/BiquadDSPKernel.cpp: (WebCore::BiquadDSPKernel::process): * webaudio/BiquadFilterNode.cpp: Added. (WebCore::BiquadFilterNode::BiquadFilterNode): * webaudio/BiquadFilterNode.h: Added. (WebCore::BiquadFilterNode::create): (WebCore::BiquadFilterNode::type): (WebCore::BiquadFilterNode::setType): (WebCore::BiquadFilterNode::frequency): (WebCore::BiquadFilterNode::q): (WebCore::BiquadFilterNode::gain): (WebCore::BiquadFilterNode::biquadProcessor): * webaudio/BiquadFilterNode.idl: Added. * webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::BiquadProcessor): * webaudio/BiquadProcessor.h: (WebCore::BiquadProcessor::setType): * webaudio/HighPass2FilterNode.cpp: (WebCore::HighPass2FilterNode::HighPass2FilterNode): * webaudio/LowPass2FilterNode.cpp: (WebCore::LowPass2FilterNode::LowPass2FilterNode): 2011-06-08 No'am Rosenthal <noam.rosenthal@nokia.com> Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 No new tests, code path is not activated yet. * WebCore.xcodeproj/project.pbxproj: Changed the TransformOperation subclassed from "project" to "private" 2011-06-08 Tom Sepez <tsepez@chromium.org> Reviewed by Adam Barth. Cause checks for insecure content blocking policy to callback to client. https://bugs.webkit.org/show_bug.cgi?id=61946 Tests: platform/chromium/http/tests/security/mixedContent/insecure-image-in-main-frame-allowed.html platform/chromium/http/tests/security/mixedContent/insecure-image-in-main-frame-blocked.html platform/chromium/http/tests/security/mixedContent/insecure-script-in-main-frame-allowed.html platform/chromium/http/tests/security/mixedContent/insecure-script-in-main-frame-blocked.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkIfDisplayInsecureContent): (WebCore::FrameLoader::checkIfRunInsecureContent): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::allowDisplayingInsecureContent): (WebCore::FrameLoaderClient::allowRunningInsecureContent): 2011-06-08 Kevin Ollivier <kevino@theolliviers.com> [wx] Build fix after introduction of FontCache::ShouldRetain * platform/graphics/wx/FontCacheWx.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-06-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88365. http://trac.webkit.org/changeset/88365 https://bugs.webkit.org/show_bug.cgi?id=62301 windows bots broken (Requested by loislo_ on #webkit). * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): 2011-06-08 Mikołaj Małecki <m.malecki@samsung.com> Reviewed by Pavel Feldman. Web Inspector: Crash by buffer overrun crash when serializing inspector object tree. https://bugs.webkit.org/show_bug.cgi?id=52791 No new tests. The problem can be reproduced by trying to create InspectorValue from 1.0e-100 and call ->toJSONString() on this. * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): Added checking the predicted buffer size and choosing exponential format, or eventually "NaN" if the buffer is too small for decimal format. 2011-06-08 Nico Weber <thakis@chromium.org> Reviewed by Darin Adler. Fix a ?: precedence error in ScrollbarThemeMac and ScrollbarThemeChromium https://bugs.webkit.org/show_bug.cgi?id=62295 This was found by a new warning recently added to clang's -Wparentheses * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::backButtonRect): * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::backButtonRect): 2011-06-08 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed by Andreas Kling. [Qt] Remove dead code from our JSC bridge https://bugs.webkit.org/show_bug.cgi?id=62287 The m_defaultMethod member is not used since r36848 and QtMethod was replaced by QtRuntimeMethod and subclasses in r29729. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::removeCachedMethod): (JSC::Bindings::QtInstance::visitAggregate): * bridge/qt/qt_instance.h: * bridge/qt/qt_runtime.h: 2011-06-08 Ryan Sleevi <rsleevi@chromium.org> Reviewed by Tony Chang. Suppress C++0x compat warnings when compiling Chromium port with GCC 4.6 Compiling Chromium port under GCC 4.6 produces warnings about nullptr https://bugs.webkit.org/show_bug.cgi?id=62242 * WebCore.gyp/WebCore.gyp: 2011-05-25 Xiaomei Ji <xji@chromium.org> Reviewed by Ryosuke Niwa. --webkit-visual-word does not work well in words separated by multiple spaces https://bugs.webkit.org/show_bug.cgi?id=61324 Remove positionBeforeNextWord and positionAfterPreviousWord short-cuts. They try to find the right word boundary (before the space or after the space) by using previousWordPosition and nextWordPosition. But they assume words are separated by single space and are not correct for words separated by multiple spaces and words not separated by space. Consider positionBeforeNextWord() for example, First, it checks whether the current position is after the current word by checking current position's previousWordPosition's nextWordPosition is the same as current position, which is wrong for words separated by multiple spaces. For example, given words A and B separated by 3 continuous spaces "A B", position "A|", "A |", and "A |" should all be considered as position after current word. But for position "A |", its previousWordPosition's nextWordPosition is position "A|", which is different from its current position, so the current position is not considered as a position after current word, consequently, instead of returning the right position as "A |B", positionBeforeNextWord returns the position before next next word, as "A B |C". Similar happens for position "A |". Second, given 3 Chinese words "ABC" that are not segmented by space, when cursor is at "A|BC", positionBeforeNextWord() returns the same position after calling current position's nextWordPosition's previousWordPosition. It should returns position "AB|C". For those cases, we will have to collect all the word breaks inside the box and look for the one at left or right of current position. * editing/visible_units.cpp: (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-06-08 Greg Simon <gregsimon@chromium.org> Reviewed by Dimitri Glazkov. Control Indexeddb backends from LayoutTestController https://bugs.webkit.org/show_bug.cgi?id=61000 Test: storage/indexeddb/migrate-basics.html * storage/IDBBackingStore.h: * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): (WebCore::IDBFactoryBackendImpl::migrate): * storage/IDBFactoryBackendImpl.h: * storage/IDBFactoryBackendInterface.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::backingStoreExists): * storage/IDBLevelDBBackingStore.h: (WebCore::IDBLevelDBBackingStore::backingStoreType): * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::backingStoreExists): * storage/IDBSQLiteBackingStore.h: (WebCore::IDBSQLiteBackingStore::backingStoreType): 2011-06-08 Dmitry Lomov <dslomov@google.com> Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=62164 Remove "multi-threaded" logic in V8 DOMData, DOMDataStore and friends This functionality is untested and unused: This is an old code from Lockers-based implementation of WebWorkers in V8 bindings, to make sure that DOM objects are released on the right thread even though GC could have happened on any thread. It is currently unused (since current model is one worker per process) and is being removed because new implementation of WebWorkers will be using V8 isolates. * WebCore.gypi: * WebCore.pro: * bindings/v8/ChildThreadDOMData.cpp: Removed. * bindings/v8/ChildThreadDOMData.h: Removed. * bindings/v8/DOMData.cpp: (WebCore::DOMData::DOMData): (WebCore::DOMData::getCurrent): (WebCore::DOMData::getMainThreadStore): * bindings/v8/DOMData.h: (WebCore::DOMData::getStore): (WebCore::DOMData::getCurrentMainThreadStore): (WebCore::DOMData::handleWeakObject): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::DOMDataStore): (WebCore::DOMDataStore::~DOMDataStore): (WebCore::DOMDataStore::weakNodeCallback): * bindings/v8/DOMDataStore.h: * bindings/v8/MainThreadDOMData.cpp: Removed. * bindings/v8/MainThreadDOMData.h: Removed. * bindings/v8/V8DOMMap.cpp: (WebCore::getDOMDataStore): (WebCore::removeAllDOMObjects): (WebCore::visitDOMNodes): (WebCore::visitDOMObjects): (WebCore::visitActiveDOMObjects): (WebCore::visitDOMSVGElementInstances): * bindings/v8/V8DOMMap.h: * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): 2011-06-08 Yael Aharon <yael.aharon@nokia.com> Reviewed by Andreas Kling. [Qt] Build fix for building QtWebKit inside of Qt. https://bugs.webkit.org/show_bug.cgi?id=62280 Remove CONFIG=staticlib, because it causes the configure script to add -lwebcore into QtWebKit.prl. No new tests, as this is just a build fix. * WebCore.pri: 2011-06-08 Vsevolod Vlasov <vsevik@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Render non-document HTML resources as HTML https://bugs.webkit.org/show_bug.cgi?id=58886 * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType): (WebInspector.Resource.prototype.hasErrorStatusCode): * inspector/front-end/ResourceHTMLView.js: Added. (WebInspector.ResourceHTMLView): (WebInspector.ResourceHTMLView.prototype.hasContent): (WebInspector.ResourceHTMLView.prototype.show): (WebInspector.ResourceHTMLView.prototype.hide): (WebInspector.ResourceHTMLView.prototype._createIFrame): * inspector/front-end/ResourcePreviewView.js: Added. (WebInspector.ResourcePreviewView): (WebInspector.ResourcePreviewView.prototype.hasContent): (WebInspector.ResourcePreviewView.prototype.show): (WebInspector.ResourcePreviewView.prototype._ensureInnerViewShown.callback): (WebInspector.ResourcePreviewView.prototype._ensureInnerViewShown): (WebInspector.ResourcePreviewView.prototype._createInnerView): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.resource-view.html iframe): * inspector/front-end/inspector.html: 2011-05-18 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: hide script location to ui location conversion details from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=61035 * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.sourceFileForScriptURL): (WebInspector.DebuggerPresentationModel.prototype.scriptLocationToUILocation.didRequestSourceMapping): (WebInspector.DebuggerPresentationModel.prototype.scriptLocationToUILocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.showAnchorLocation.didGetUILocation): (WebInspector.ScriptsPanel.prototype.showAnchorLocation): 2011-06-08 Tommy Widenflycht <tommyw@google.com> Reviewed by Tony Gentilcore. StreamEvent Media Stream PeerConnection API: adding StreamEvent class https://bugs.webkit.org/show_bug.cgi?id=61537 Tests for the Media Stream API will be provided by the bug 56587. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * dom/DOMAllInOne.cpp: * dom/Event.cpp: (WebCore::Event::isStreamEvent): * dom/Event.h: * dom/StreamEvent.cpp: Added. (WebCore::StreamEvent::create): (WebCore::StreamEvent::StreamEvent): (WebCore::StreamEvent::~StreamEvent): (WebCore::StreamEvent::initStreamEvent): (WebCore::StreamEvent::stream): * dom/StreamEvent.h: Added. (WebCore::StreamEvent::isStreamEvent): * dom/StreamEvent.idl: Added. 2011-06-08 Tommy Widenflycht <tommyw@google.com> Reviewed by Tony Gentilcore. Media Stream API: integrate the Track List objects into the existing code. https://bugs.webkit.org/show_bug.cgi?id=60205 Tests for the Media Stream API will be provided by the bug 56587. * dom/ExclusiveTrackList.cpp: (WebCore::ExclusiveTrackList::select): (WebCore::ExclusiveTrackList::trackFailed): * dom/ExclusiveTrackList.h: * dom/GeneratedStream.cpp: (WebCore::GeneratedStream::create): (WebCore::GeneratedStream::GeneratedStream): (WebCore::GeneratedStream::streamEnded): (WebCore::GeneratedStream::audioTracks): (WebCore::GeneratedStream::videoTracks): (WebCore::GeneratedStream::stop): * dom/GeneratedStream.h: * dom/GeneratedStream.idl: * dom/MultipleTrackList.cpp: (WebCore::MultipleTrackList::trackFailed): (WebCore::MultipleTrackList::enable): (WebCore::MultipleTrackList::disable): * dom/MultipleTrackList.h: * dom/Stream.h: * dom/TrackList.cpp: (WebCore::TrackList::clear): (WebCore::TrackList::associateStream): (WebCore::TrackList::associatedStreamLabel): (WebCore::TrackList::trackFailed): (WebCore::TrackList::scriptExecutionContext): * dom/TrackList.h: * page/MediaStreamClient.h: * page/MediaStreamController.cpp: (WebCore::MediaStreamController::enableAudioTrack): (WebCore::MediaStreamController::disableAudioTrack): (WebCore::MediaStreamController::selectVideoTrack): (WebCore::MediaStreamController::streamGenerated): (WebCore::MediaStreamController::audioTrackFailed): (WebCore::MediaStreamController::videoTrackFailed): * page/MediaStreamController.h: * page/MediaStreamFrameController.cpp: (WebCore::MediaStreamFrameController::unregister): (WebCore::MediaStreamFrameController::enterDetachedState): (WebCore::MediaStreamFrameController::disconnectFrame): (WebCore::MediaStreamFrameController::enableAudioTrack): (WebCore::MediaStreamFrameController::disableAudioTrack): (WebCore::MediaStreamFrameController::selectVideoTrack): (WebCore::MediaStreamFrameController::streamGenerated): (WebCore::MediaStreamFrameController::audioTrackFailed): (WebCore::MediaStreamFrameController::videoTrackFailed): * page/MediaStreamFrameController.h: (WebCore::MediaStreamFrameController::ClientBase::isGenericClient): (WebCore::MediaStreamFrameController::GenericClient::GenericClient): (WebCore::MediaStreamFrameController::GenericClient::~GenericClient): (WebCore::MediaStreamFrameController::GenericClient::isGenericClient): (WebCore::MediaStreamFrameController::GenericClient::unregister): 2011-06-08 Pavel Podivilov <podivilov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [REGRESSION] breakpoints are not persisted. https://bugs.webkit.org/show_bug.cgi?id=62273 * inspector/front-end/Settings.js: 2011-06-08 Alexander Pavlov <apavlov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: node selection is slow in the Elements panel. https://bugs.webkit.org/show_bug.cgi?id=60813 Schedule full style updates rather than request all node styles from the backend immediately. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles): (WebInspector.StylesSidebarPane.prototype.update): 2011-06-08 Andreas Kling <andreas.kling@nokia.com> Reviewed by Laszlo Gombos. [Symbian] Float{32,64}Array and Int16Array fail to build. https://bugs.webkit.org/show_bug.cgi?id=62219 For some reason, RVCT 2.x is moaning about "class member designated by a using-declaration must be visible in a direct base class". Apply same fix as r69122 and r76592. * html/canvas/Float32Array.h: (WebCore::Float32Array::set): * html/canvas/Float64Array.h: (WebCore::Float64Array::set): * html/canvas/Int16Array.h: (WebCore::Int16Array::set): 2011-06-08 Syed Idris Shah <syed.idris-shah@nokia.com> Reviewed by Andreas Kling. [Qt] GL_POINT_SPRITE and GL_VERTEX_PROGRAM_POINT_SIZE should be enabled for desktop WebGL https://bugs.webkit.org/show_bug.cgi?id=61945 For OpenGL ES we do not need these features. These features are available via shaders in OpenGL ES. But for desktop WebGL using QtWebKit they should be enabled. LayoutTests/fast/canvas/webgl/point-size.html * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): 2011-06-08 Gyuyoung Kim <gyuyoung.kim@samsung.com> Unreviewed. Fix style error. * platform/efl/RenderThemeEfl.cpp: * platform/efl/RenderThemeEfl.h: 2011-06-08 Hironori Bono <hbono@chromium.org> Reviewed by Brent Fulgham. Add SpellCheck API https://bugs.webkit.org/show_bug.cgi?id=59693 This change adds two SpellCheck API functions (addSpellcheckRange and removeSpellcheckRange) and one attribute (spellcheckRange) discussed in the public-webapps ML. This change is currently available only on Chromium. Tests: editing/spelling/spellcheck-api-pixel.html editing/spelling/spellcheck-api.html * WebCore.gypi: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::spellCheckAPIEnabled): (WebCore::RuntimeEnabledFeatures::setSpellCheckAPIEnabled): * dom/DocumentMarker.h: (WebCore::DocumentMarker::length): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::userSpellingMarkersForNode): (WebCore::DocumentMarkerController::addUserSpellingMarker): (WebCore::DocumentMarkerController::removeUserSpellingMarker): (WebCore::DocumentMarkerController::userSpellingNode): * dom/DocumentMarkerController.h: * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::spellcheckRanges): (WebCore::HTMLDivElement::addSpellcheckRange): (WebCore::HTMLDivElement::removeSpellcheckRange): * html/HTMLDivElement.h: * html/HTMLDivElement.idl: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::spellcheckRanges): (WebCore::HTMLInputElement::addSpellcheckRange): (WebCore::HTMLInputElement::removeSpellcheckRange): * html/HTMLInputElement.h: * html/HTMLInputElement.idl: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::spellcheckRanges): (WebCore::HTMLTextAreaElement::addSpellcheckRange): (WebCore::HTMLTextAreaElement::removeSpellcheckRange): * html/HTMLTextAreaElement.h: * html/HTMLTextAreaElement.idl: * html/SpellcheckRange.cpp: Added. (WebCore::SpellcheckRange::SpellcheckRange): (WebCore::SpellcheckRange::~SpellcheckRange): * html/SpellcheckRange.h: Added. (WebCore::SpellcheckRange::create): (WebCore::SpellcheckRange::start): (WebCore::SpellcheckRange::length): (WebCore::SpellcheckRange::suggestions): (WebCore::SpellcheckRange::options): * html/SpellcheckRange.idl: Added. * html/SpellcheckRangeList.cpp: Added. (WebCore::SpellcheckRangeList::SpellcheckRangeList): (WebCore::SpellcheckRangeList::~SpellcheckRangeList): (WebCore::SpellcheckRangeList::item): * html/SpellcheckRangeList.h: Added. (WebCore::SpellcheckRangeList::create): (WebCore::SpellcheckRangeList::isEmpty): (WebCore::SpellcheckRangeList::clear): (WebCore::SpellcheckRangeList::append): (WebCore::SpellcheckRangeList::remove): (WebCore::SpellcheckRangeList::length): * html/SpellcheckRangeList.idl: Added. * rendering/InlineTextBox.cpp: (WebCore::textCheckingLineStyleForMarkerType): (WebCore::InlineTextBox::paintDocumentMarkers): 2011-06-07 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. Web Inspector: remove shadow dom inspection from Elements panel by default. https://bugs.webkit.org/show_bug.cgi?id=62188 This reverts r85751 * dom/Element.cpp: (WebCore::Element::ensureShadowRoot): (WebCore::Element::removeShadowRoot): * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::didRemoveDOMNode): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): (WebInspector.DOMNode.prototype._renumber): (WebInspector.DOMAgent.prototype._bindNodes): (WebInspector.DOMAgent.prototype.querySelectorAll): (WebInspector.DOMDispatcher.prototype.searchResults): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._attributesUpdated): (WebInspector.ElementsPanel.prototype._characterDataModified): (WebInspector.ElementsPanel.prototype._nodeInserted): (WebInspector.ElementsPanel.prototype._nodeRemoved): (WebInspector.ElementsPanel.prototype.updateModifiedNodes): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement): (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode): (WebInspector.ElementsTreeElement.prototype._updateChildren): (): * inspector/front-end/inspector.css: * inspector/front-end/utilities.js: (Element.prototype.query): 2011-06-08 Mark Rowe <mrowe@apple.com> Fix the build. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::timeChanged): (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): 2011-06-07 Keishi Hattori <keishi@webkit.org> Reviewed by Kent Tamura. Rename HTMLInputElement::m_value to m_valueIfDirty https://bugs.webkit.org/show_bug.cgi?id=61990 No new tests because no behavior change. * html/HTMLInputElement.cpp: Replaced m_value with m_valueIfDirty. (WebCore::HTMLInputElement::tooLong): (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::copyNonAttributeProperties): (WebCore::HTMLInputElement::value): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setValueFromRenderer): (WebCore::HTMLInputElement::updateValueIfNeeded): * html/HTMLInputElement.h: Renamed m_value to m_valueIfDirty. (WebCore::HTMLInputElement::hasDirtyValue): Added. Returns the dirty value flag. 2011-06-07 Ian Henderson <ianh@apple.com> Reviewed by Dan Bernstein. (CG) Sub-image drawing clips unnecessarily https://bugs.webkit.org/show_bug.cgi?id=62258 If destRect completely encompasses the adjustedDestRect into which we draw, clipping to destRect will do nothing. Skip the call to CGContextClipToRect in this case. * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert nodeAtPoint to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62145 Convert nodeAtPoint to take an IntPoint instead of a pair of ints for the accumulated offset. Covered by existing tests. * platform/graphics/FloatPoint.h: (WebCore::FloatPoint::moveBy): Add moveBy(IntPoint) method * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/EllipsisBox.h: * rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): * rendering/InlineTextBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestContents): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): * rendering/RenderBox.h: * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint): * rendering/RenderFrameSet.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::nodeAtPoint): * rendering/RenderInline.h: * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::hitTest): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::nodeAtPoint): * rendering/RenderListBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::hitTest): * rendering/RenderObject.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTable.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderTableSection.h: * rendering/RenderText.h: (WebCore::RenderText::nodeAtPoint): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::nodeAtPoint): * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::nodeAtPoint): * rendering/RenderTextControlSingleLine.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::nodeAtPoint): * rendering/RenderWidget.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint): * rendering/RootInlineBox.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): (WebCore::RenderSVGForeignObject::nodeAtPoint): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::nodeAtPoint): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtFloatPoint): (WebCore::RenderSVGText::nodeAtPoint): * rendering/svg/RenderSVGText.h: 2011-06-07 Yi Shen <yi.4.shen@nokia.com> Reviewed by Simon Hausmann. [Qt] Fix the error code for media resource failures when using QtMobility https://bugs.webkit.org/show_bug.cgi?id=55901 To indicate the media resource failures, set the network state to MediaPlayer::FormatError when receives QMediaPlayer::InvalidMedia or QMediaPlayer::ResourceError. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::updateStates): 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Change RenderBlock::hitTestFloats to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62176 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestColumns): * rendering/RenderBlock.h: 2011-06-07 Tim Horton <timothy_horton@apple.com> Reviewed by Alexey Proskuryakov. Use correct CFURLStorageSessionRef definition on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=62223 * platform/mac/WebCoreSystemInterface.h: * platform/network/ResourceHandle.h: * platform/network/cf/ResourceRequest.h: 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Change RenderBlock::hitTestColumns to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62172 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestColumns): * rendering/RenderBlock.h: 2011-06-07 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler. Opacity transition doesn't work while content property is set. https://bugs.webkit.org/show_bug.cgi?id=59301 StyleRareNonInheritedData's copy constructor omitted to copy the m_content data, which caused us to detach and re-attach the renderer at the start of the transition, thereby killing the transition. Fix by making StyleRareNonInheritedData's copy ctor do the right thing. Test: transitions/transition-on-element-with-content.html * rendering/style/ContentData.h: * rendering/style/ContentData.cpp: (WebCore::ContentData::clone): New method to do a deep clone. (Can't use a copy ctor because of the subclasses.) * rendering/style/CounterDirectives.h: Pack the data members to save space. Add a clone() function for the HashMap. * rendering/style/CounterDirectives.cpp: (WebCore::clone): Make a new HashMap and copy the contents over. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Copy the content and counter directives over. (WebCore::StyleRareNonInheritedData::operator==): Rather than just comparing for pointer equality, do a correct check for m_counterDirectives equality. (WebCore::StyleRareNonInheritedData::counterDataEquivalent): * rendering/style/StyleRareNonInheritedData.h: 2011-06-07 Robert Kroeger <rjkroege@chromium.org> Reviewed by Adam Barth. [chromium] Add a basic gesture recognizer to the Chromium platform https://bugs.webkit.org/show_bug.cgi?id=54417 Adds a basic gesture recognizer to the Chromium platform. Adds an entry point to the GestureRecognizer to reset any internal state on a page reset. Resetting the gesture recognizer on page load is necesary for reliable layout test execution and improves gesture recognizer operational robustness. Added an additional constructor to permit building a synthetic PlatformWheelEvent. Small modifications to the PlatformGestureRecognizer as required to implement the simple Chromium platform gesture recognizer. Tests: fast/events/touch/touch-gesture-click.html * WebCore.gypi: * page/EventHandler.cpp: (WebCore::EventHandler::resetGestureRecognizer): * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): * platform/PlatformGestureRecognizer.h: * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/chromium/GestureRecognizerChromium.cpp: Added. (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::~InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::addEdgeFunction): (WebCore::InnerGestureRecognizer::isInClickTimeWindow): (WebCore::InnerGestureRecognizer::isInsideManhattanSquare): (WebCore::InnerGestureRecognizer::dispatchSyntheticClick): (WebCore::InnerGestureRecognizer::processTouchEventForGesture): (WebCore::InnerGestureRecognizer::scrollViaTouchMotion): (WebCore::InnerGestureRecognizer::updateValues): (WebCore::InnerGestureRecognizer::signature): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): (WebCore::PlatformGestureRecognizer::create): (WebCore::PlatformGestureRecognizer::PlatformGestureRecognizer): (WebCore::PlatformGestureRecognizer::~PlatformGestureRecognizer): (WebCore::GestureRecognizerChromium::GestureRecognizerChromium): (WebCore::GestureRecognizerChromium::~GestureRecognizerChromium): * platform/chromium/GestureRecognizerChromium.h: Added. (WebCore::InnerGestureRecognizer::setState): (WebCore::InnerGestureRecognizer::state): (WebCore::GestureRecognizerChromium::reset): (WebCore::GestureRecognizerChromium::processTouchEventForGesture): 2011-06-07 No'am Rosenthal <noam.rosenthal@nokia.com> Reviewed by Andreas Kling. [Texmap][Qt] Enable TextureMapper by default https://bugs.webkit.org/show_bug.cgi?id=61740 Enable TextureMapper on Windows+Symbian, disabling the direct OpenGL path. This would mean that for now QtWebKit on Windows/Symbian would use the Qt backend for TextureMapper. No new functionality so no new tests. * WebCore.pri: * WebCore.pro: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/graphics/qt/TextureMapperQt.cpp: (WebCore::TextureMapper::create): 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderBox::absoluteRects to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62130 Covered by existing tests. * dom/Node.cpp: (WebCore::Node::hasNonEmptyBoundingBox): * rendering/InlineBox.h: (WebCore::InlineBox::size): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRect): * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): * rendering/RenderView.h: * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::absoluteRects): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteRects): * rendering/svg/RenderSVGModelObject.h: 2011-06-07 Kent Tamura <tkent@chromium.org> Reviewed by Andreas Kling. [Qt] RenderThemeQt::adjustSliderThumbSize() should not refer to the parent style. https://bugs.webkit.org/show_bug.cgi?id=62207 * css/mediaControlsQt.css: Add comments. (audio::-webkit-media-controls-timeline): (video::-webkit-media-controls-timeline): (audio::-webkit-media-controls-volume-slider): (video::-webkit-media-controls-volume-slider): * platform/qt/RenderThemeQt.cpp: Use fixed values to avoid referring to o->parent(). (WebCore::RenderThemeQt::adjustSliderThumbSize): 2011-06-07 Sailesh Agrawal <sail@chromium.org> Reviewed by Mihai Parparita. Chromium Mac: Fork ScrollAnimatorMac to ScrollAnimatorChromiumMac for overlay scrollbar support https://bugs.webkit.org/show_bug.cgi?id=59753 No new tests. Just forking ScrollAnimatorMac to ScrollAnimatorChromiumMac. * WebCore.gyp/WebCore.gyp: Added IntPointMac.mm. This is used by some functions in ScrollAnimatorChromiumMac. Also added filters for conflicting class names in ScrollAnimatorChromiumMac. * WebCore.gypi: Added ScrollAnimatorChromiumMac.h/mm. * platform/ScrollAnimator.cpp: Extended the #ifdef around ScrollAnimator::create() so that the chromium version will be created. * platform/chromium/ScrollAnimatorChromiumMac.h: Added. (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer): (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer): (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad): * platform/chromium/ScrollAnimatorChromiumMac.mm: Added. Forked from ScrollAnimatorMac and replaced all instances of ScrollAnimatorMac with ScrollAnimatorChromiumMac and ScrollbarThemeMac with ScrollbarThemeChromiumMac. Removed the ENABLE(SMOOTH_SCROLLING) around the file. Stubbed out ScrollAnimatorChromiumMac::scroll() if smooth scrolling is disabled. (abs): (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]): (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]): (-[ScrollAnimationHelperDelegate bounds]): (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]): (-[ScrollAnimationHelperDelegate convertSizeToBase:]): (-[ScrollAnimationHelperDelegate convertSizeFromBase:]): (-[ScrollAnimationHelperDelegate convertSizeToBacking:]): (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]): (-[ScrollAnimationHelperDelegate superview]): (-[ScrollAnimationHelperDelegate documentView]): (-[ScrollAnimationHelperDelegate window]): (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]): (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]): (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPartAnimation setCurrentProgress:]): (-[ScrollbarPartAnimation scrollAnimatorDestroyed]): (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterDelegate cancelAnimations]): (-[ScrollbarPainterDelegate convertRectToBacking:]): (-[ScrollbarPainterDelegate convertRectFromBacking:]): (-[ScrollbarPainterDelegate layer]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]): (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]): (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::scroll): (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorChromiumMac::notityPositionChanged): (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint): (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentsResized): (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide): (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::cancelAnimations): (WebCore::elasticDeltaForTimeDelta): (WebCore::elasticDeltaForReboundDelta): (WebCore::reboundDeltaForElasticDelta): (WebCore::scrollWheelMultiplier): (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent): (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection): (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching): (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::endScrollGesture): (WebCore::ScrollAnimatorChromiumMac::snapRubberBand): (WebCore::roundTowardZero): (WebCore::roundToDevicePixelTowardZero): (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer): (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive): (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer): (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired): (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect): * platform/graphics/IntPoint.h: Exposed NSPoint conversion routines to chromium mac. 2011-06-07 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Remove repeated IPC traffic from SetRenderTreeSize message https://bugs.webkit.org/show_bug.cgi?id=62244 * WebCore.xcodeproj/project.pbxproj: Make RenderArena.h private so it can be called from WebKit2. * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::dispatchDidLayout): Added. * page/ChromeClient.h: Remove setRenderTreeSize. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): Call dispatchDidLayout for all frames instead of calling setRenderTreeSize for the main frame. 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Change RenderBlock::hitTestContents to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62170 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestColumns): (WebCore::RenderBlock::hitTestContents): * rendering/RenderBlock.h: 2011-06-07 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Video with poster attribute will not display new frames when scrubbing. https://bugs.webkit.org/show_bug.cgi?id=62036 Remove our "detection" about the end of a scrub now that there is an explicit seek completion handler available in AVFoundation. Move what we used to do upon detection in timeChanged() into seekCompleted(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::timeChanged): (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): 2011-06-07 James Simonsen <simonjam@chromium.org> Unreviewed, build fix, missing files from r88274. * bindings/v8/ChildThreadDOMData.cpp: Added. (WebCore::ChildThreadDOMData::ChildThreadDOMData): (WebCore::ChildThreadDOMData::getStore): * bindings/v8/ChildThreadDOMData.h: Added. * bindings/v8/MainThreadDOMData.cpp: Added. (WebCore::MainThreadDOMData::MainThreadDOMData): (WebCore::MainThreadDOMData::getCurrent): (WebCore::MainThreadDOMData::getMainThreadStore): (WebCore::MainThreadDOMData::getCurrentMainThreadStore): * bindings/v8/MainThreadDOMData.h: Added. (WebCore::MainThreadDOMData::getStore): 2011-06-07 Abhishek Arya <inferno@chromium.org> Reviewed by Dan Bernstein. Replicate WidthIterator.cpp fix from r88139. https://bugs.webkit.org/show_bug.cgi?id=62238 No new tests. Covered by existing layout tests on XP debug bots. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::advance): 2011-06-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88221, r88224, and r88231. http://trac.webkit.org/changeset/88221 http://trac.webkit.org/changeset/88224 http://trac.webkit.org/changeset/88231 https://bugs.webkit.org/show_bug.cgi?id=62233 assert failure on chromium linux debug (Requested by simonjam on #webkit). * WebCore.gypi: * WebCore.pro: * bindings/v8/ChildThreadDOMData.cpp: Copied from Source/WebCore/bindings/v8/DOMData.cpp. (WebCore::ChildThreadDOMData::ChildThreadDOMData): (WebCore::ChildThreadDOMData::getStore): * bindings/v8/ChildThreadDOMData.h: Copied from Source/WebCore/bindings/v8/DOMData.cpp. * bindings/v8/DOMData.cpp: (WebCore::DOMData::DOMData): (WebCore::DOMData::getCurrent): * bindings/v8/DOMData.h: (WebCore::DOMData::owningThread): (WebCore::DOMData::handleWeakObject): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::DOMDataStore): (WebCore::DOMDataStore::~DOMDataStore): (WebCore::DOMDataStore::allStoresMutex): (WebCore::DOMDataStore::weakNodeCallback): * bindings/v8/DOMDataStore.h: * bindings/v8/MainThreadDOMData.cpp: Copied from Source/WebCore/bindings/v8/DOMData.cpp. (WebCore::MainThreadDOMData::MainThreadDOMData): (WebCore::MainThreadDOMData::getCurrent): (WebCore::MainThreadDOMData::getMainThreadStore): (WebCore::MainThreadDOMData::getCurrentMainThreadStore): * bindings/v8/MainThreadDOMData.h: Copied from Source/WebCore/bindings/v8/DOMData.cpp. (WebCore::MainThreadDOMData::getStore): * bindings/v8/V8DOMMap.cpp: (WebCore::getDOMDataStore): (WebCore::removeAllDOMObjectsInCurrentThread): (WebCore::visitDOMNodesInCurrentThread): (WebCore::visitDOMObjectsInCurrentThread): (WebCore::visitActiveDOMObjectsInCurrentThread): (WebCore::visitDOMSVGElementInstancesInCurrentThread): * bindings/v8/V8DOMMap.h: * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): 2011-06-07 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt. Clean up ContentData https://bugs.webkit.org/show_bug.cgi?id=62185 ContentData did manual ref()/deref() and had a lot of awkward code from using a union to store data. Clean this up by adding ContentData subclasses for different content types, which are then able to use RefPtr and OwnPtr as appropriate. * css/CSSComputedStyleDeclaration.cpp: (WebCore::contentToCSSValue): Cast to different ContentData types as appropriate. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::loadPendingImages): Cast to ImageContentData, and do some const gyrations. * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::createRenderer): Use hasContent(). * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::createRenderer): Ditto * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::createRenderer): Ditto * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): Cast to ImageContentData. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): Cast to different ContentData types as appropriate. * rendering/style/ContentData.h: (WebCore::ContentData::~ContentData): (WebCore::ContentData::isCounter): (WebCore::ContentData::isImage): (WebCore::ContentData::isQuote): (WebCore::ContentData::isText): (WebCore::ContentData::next): (WebCore::ContentData::setNext): (WebCore::ImageContentData::image): (WebCore::ImageContentData::setImage): (WebCore::ImageContentData::ImageContentData): (WebCore::ImageContentData::type): (WebCore::ImageContentData::isImage): (WebCore::TextContentData::text): (WebCore::TextContentData::setText): (WebCore::TextContentData::TextContentData): (WebCore::TextContentData::type): (WebCore::TextContentData::isText): (WebCore::CounterContentData::counter): (WebCore::CounterContentData::setCounter): (WebCore::CounterContentData::CounterContentData): (WebCore::CounterContentData::type): (WebCore::CounterContentData::isCounter): (WebCore::QuoteContentData::quote): (WebCore::QuoteContentData::setQuote): (WebCore::QuoteContentData::QuoteContentData): (WebCore::QuoteContentData::type): (WebCore::QuoteContentData::isQuote): Add subclasses for different content types, which are created via overloaded create() methods on the base class. * rendering/style/ContentData.cpp: (WebCore::ContentData::create): (WebCore::operator==): Test for type equality, followed by comparing data. (WebCore::operator!=): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::clearContent): (WebCore::RenderStyle::appendContent): (WebCore::RenderStyle::setContent): Replace the overly complex prepareToSetContent() code with code that either appends, or replaces the content. This loses an optimization where the existing ContentData object could get reused, but this seems to be rarely hit in practice. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hasContent): Convenience method. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Test that the pointers are non-null, then use the != operator. * rendering/style/StyleRareNonInheritedData.h: ContentData is a class now. 2011-06-07 Brian Weinstein <bweinstein@apple.com> Build fix after r88260. * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getFontDataForCharacters): Update to use enum instead of bool. * platform/graphics/wince/FontCacheWinCE.cpp: 2011-06-07 Rob Buis <rbuis@rim.com> Reviewed by Dirk Schulze. stroke-dasharray does not handle "none" https://bugs.webkit.org/show_bug.cgi?id=62203 Use the initial strokeDashArray style for stroke-dasharray="none" to apply to SVGRenderStyle rather than bailing out. Tests: svg/W3C-SVG-1.1-SE/styling-css-04-f.svg svg/custom/invalid-dasharray.svg * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): 2011-06-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88259 and r88263. http://trac.webkit.org/changeset/88259 http://trac.webkit.org/changeset/88263 https://bugs.webkit.org/show_bug.cgi?id=62228 broke builds (Requested by rniwa on #webkit). * platform/mac/WebCoreSystemInterface.h: * platform/network/ResourceHandle.h: * platform/network/cf/ResourceRequest.h: 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Switch ContainerNode to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61893 Covered by existing tests. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getUpperLeftCorner): (WebCore::ContainerNode::getLowerRightCorner): (WebCore::ContainerNode::getRect): Change to use maxX/maxY instead of x+width/y+height * platform/graphics/FloatPoint.h: (WebCore::FloatPoint::move): (WebCore::FloatPoint::moveBy): (WebCore::FloatPoint::expandedTo): Add move, moveBy and expandedTo mirroring the IntPoint implementation of the same. 2011-06-07 Ryosuke Niwa <rniwa@webkit.org> Speculative build fix after r88259. * platform/network/cf/ResourceRequest.h: 2011-06-07 Michael Saboff <msaboff@apple.com> Reviewed by Geoffrey Garen. Need to enable font cache purging in MemoryPressureHandler https://bugs.webkit.org/show_bug.cgi?id=62060 Improve memory usage under pressure. Added call to fontCache()->purgeInactiveFontData() in MemoryPressureHandler::respondToMemoryPressure(). Added protection to MemoryPressureHandler::install() being called multiple times. No new tests as funtionality wasn't changed. * platform/MemoryPressureHandler.cpp: (WebCore::MemoryPressureHandler::MemoryPressureHandler): * platform/MemoryPressureHandler.h: * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::install): (WebCore::MemoryPressureHandler::respondToMemoryPressure): 2011-06-07 Michael Saboff <msaboff@apple.com> Reviewed by Geoffrey Garen. Fonts returned by FontCache::getFontDataForCharacters() are never released https://bugs.webkit.org/show_bug.cgi?id=61875 This change allows fonts allocated as system fallback fonts to be released. Previously, the reference counts for these fonts grew without bound. This is implemented as an auto release class that wraps accesses to the cache for system fallback fonts. All such accesses are via the method FontCache::getFontDataForCharacters. The new class is called FontCachePurgePreventer. When such an object exists, it protects these fonts from deletion. Most accesses to the font cache still use the reference counting implemented by FontCache::getCacheFontData() and FontCache::releaseFontData() and that operation is not affected by this change. Added local scoped instance of FontCachePurgePreventer to wrap code that directly or indirectly accesses fonts via getFontDataForCharacters. Did a few other miscellaneous bug fixes and changes to allow system fallback fonts to be pruned from the GlyphPageTree. Changed the calls to getFontData in the platform specific versions of Fontcache::getFontDataForCharacters to not increment the reference count. Moved the purge font check outside of FontCache::getCachedFontData() into a separate method, purgeInactiveFontDataIfNeeded() since almost all calls to getCachedFontData() now happen when purging is not allowed. purgeInactiveFontDataIfNeeded is invoked in enablePurging() when m_purgePreventCount is 0. No new test as the functionality has not changed. Improved font life cycle management. * WebCore.exp.in: Added FontCache::purgeInactiveFontDataIfNeeded(). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::measureText): (WebCore::CanvasRenderingContext2D::drawTextInternal): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in these methods. * page/FrameView.cpp: (WebCore::FrameView::layout): (WebCore::FrameView::paintContents): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in these methods. * platform/graphics/FontCache.cpp: (WebCore::FontCache::FontCache): (WebCore::FontCache::getCachedFontData): Moved purge check to new method since it likely can't happen here. (WebCore::FontCache::releaseFontData): (WebCore::FontCache::purgeInactiveFontDataIfNeeded): (WebCore::FontCache::purgeInactiveFontData): Made purging conditional on m_purgePreventCount. Now some fonts in the cache are reference counted while other can be purged outside of code wrapped by in scope FontCachePurgePreventer objects. * platform/graphics/FontCache.h: (WebCore::FontCache::disablePurging): (WebCore::FontCache::enablePurging): (WebCore::FontCachePurgePreventer::FontCachePurgePreventer): (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer): Added new simple purge prevention wrapper class and methods that it calls in FontCache actually prevent purging. The simple methods inlined to reduce overhead. * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): Update level in glyph page tree for system fallback fonts so pruning works. * platform/graphics/GlyphPage.h: (WebCore::GlyphPage::clearForFontData): New method used for pruning * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::pruneFontData): Now we prune system fallback fonts. * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/haiku/FontCacheHaiku.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/qt/FontCacheQt.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/wince/FontCacheWinCE.cpp: * platform/graphics/wx/FontCacheWx.cpp: (WebCore::FontCache::getFontDataForCharacters): Changed the calls to getFontData() to not increment the reference count. The caller of this getFontDataForCharacters() (currently only Font::glyphDataForCharacter() in fontFastPath.cpp) and it's callers don't attempt to release the returned fonts so we use the purge protection described above. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): (WebCore::InlineTextBox::offsetForPosition): (WebCore::InlineTextBox::positionForOffset): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in these methods. * rendering/RenderImage.cpp: (WebCore::RenderImage::setImageSizeForAltText): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in this method. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): (WebCore::RenderListBox::paintItemForeground): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in these methods * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::selectionRectForTextFragment): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in this method. 2011-06-07 Tim Horton <timothy_horton@apple.com> Reviewed by Alexey Proskuryakov. Use correct CFURLStorageSessionRef definition on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=62223 * platform/mac/WebCoreSystemInterface.h: * platform/network/ResourceHandle.h: * platform/network/cf/ResourceRequest.h: 2011-06-07 Alok Priyadarshi <alokp@chromium.org> Reviewed by Stephen White. [chromium] PlatformContextSkia leaks SkDeviceFactory https://bugs.webkit.org/show_bug.cgi?id=62163 Valgrind tests should have caught this. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setSharedGraphicsContext3D): 2011-06-07 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderTextControl::hitInnerTextElement to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62167 Covered by existing tests. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::hitInnerTextElement): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::nodeAtPoint): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::nodeAtPoint): 2011-06-07 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paint to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62177 Flipping the switch on the remaining paint functions to have them all use IntPoint for the paint offset instead of tx/ty. No new tests since this is just refactoring. * page/FrameView.cpp: (WebCore::FrameView::paintScrollCorner): * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): (WebCore::RenderBlock::paintContents): (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::paintFloats): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paint): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint): * rendering/RenderDetailsMarker.h: * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paint): * rendering/RenderEmbeddedObject.h: * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paint): * rendering/RenderFrameSet.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::paint): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::paint): * rendering/RenderInline.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::paintLayer): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): * rendering/RenderLineBoxList.h: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::paint): * rendering/RenderListItem.h: * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/RenderListMarker.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::paint): * rendering/RenderObject.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderReplaced.h: * rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint): * rendering/RenderReplica.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::paintPart): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): * rendering/RenderScrollbarPart.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): (WebCore::RenderTable::paintObject): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paint): * rendering/RenderTableCell.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::paint): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paint): (WebCore::RenderTableSection::paintCell): * rendering/RenderTableSection.h: * rendering/RenderText.h: (WebCore::RenderText::paint): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::paint): * rendering/RenderTextControlSingleLine.h: * rendering/RenderView.cpp: (WebCore::RenderView::paint): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/RenderWidget.h: * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::paint): * rendering/mathml/RenderMathMLBlock.h: * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::paint): * rendering/mathml/RenderMathMLFraction.h: * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::paint): * rendering/mathml/RenderMathMLRoot.h: * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::paint): * rendering/mathml/RenderMathMLSquareRoot.h: * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): * rendering/svg/RenderSVGContainer.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::paint): * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::paint): * rendering/svg/RenderSVGHiddenContainer.h: * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): * rendering/svg/RenderSVGImage.h: * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::paint): * rendering/svg/RenderSVGPath.h: * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::draw): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::paint): * rendering/svg/RenderSVGText.h: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer): 2011-06-07 Young Han Lee <joybro@company100.net> Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Accelerated animation is not paused properly. https://bugs.webkit.org/show_bug.cgi?id=61446 The transform matrix of an accelerated animation shouldn't be synced with the matrix of the GraphicsLayer when the animation is paused. Test: animations/play-state-paused.html * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): (WebCore::TextureMapperNode::hasOpacityAnimation): (WebCore::TextureMapperNode::hasTransformAnimation): * platform/graphics/texmap/TextureMapperNode.h: 2011-06-07 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Antonio Gomes. [EFL] Remove Ecore_X bits from PlatformScreenEfl https://bugs.webkit.org/show_bug.cgi?id=61649 Remove the need for Ecore_X and some X calls by always using new functions available in EFL to get the screen size. No new tests since the same functionality are done inside EFL now. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): 2011-06-07 Carlos Garcia Campos <cgarcia@igalia.com> Reviewed by Martin Robinson. [GTK] Move moduleMixesGtkSymbols() from PluginPackage to PluginView https://bugs.webkit.org/show_bug.cgi?id=62200 In WebKit2 PluginPackage is used by the UI process to load plugins in order to get information about them, but it doesn't use any GTK symbol. So the UI process should be able to load plugins even when building with GTK3, but we should not allow the plugin view to use the plugin if it mixes GTK2 and GTK3 symbols. * plugins/PluginPackage.h: (WebCore::PluginPackage::module): New method to return the platform module. * plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::load): Remove moduleMixesGtkSymbols(). * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::updatePluginWidget): Check whether plugin was successfully loaded before trying to create the drawable. (WebCore::PluginView::paint): Return early if plugin didn't start or was not successfully loaded. (WebCore::PluginView::handleKeyboardEvent): Ditto. (WebCore::PluginView::handleMouseEvent): Ditto. (WebCore::PluginView::handleFocusInEvent): Ditto. (WebCore::PluginView::handleFocusOutEvent): Ditto. (WebCore::moduleMixesGtkSymbols): (WebCore::PluginView::platformStart): Check whether module is mixing GTK+ 2 and GTK+ 3 symbols. 2011-06-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88238. http://trac.webkit.org/changeset/88238 https://bugs.webkit.org/show_bug.cgi?id=62216 Broke a couple of inspector tests (Requested by apavlov on #webkit). * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): 2011-06-07 Dinu Jacob <dinu.jacob@nokia.com> Reviewed by Dimitri Glazkov. Inform ChromeClient touch events are not needed by the webpage when navigating away from the page instead of in both Document:detach/CachedFrame https://bugs.webkit.org/show_bug.cgi?id=61543 Inform chrome client that touch events are not needed by the webpage when navigating away from the page only once to avoid the flag being overwritten later if a page is removed from the page cache * dom/Document.cpp: (WebCore::Document::detach): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): 2011-06-07 Alexander Pavlov <apavlov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: node selection is slow in the Elements panel. https://bugs.webkit.org/show_bug.cgi?id=60813 Schedule full style updates rather than request all node styles from the backend immediately. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles): (WebInspector.StylesSidebarPane.prototype.update): 2011-06-07 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: remove duplicate breakpoints from localStorage https://bugs.webkit.org/show_bug.cgi?id=62206 Perform one-time breakpoint storage cleanup to get rid of duplicate breakpoints in case when settings version is less than 1. * inspector/front-end/Settings.js: (WebInspector.Settings): (WebInspector.Settings.prototype._set): (WebInspector.Settings.prototype._migrateSettings.splitObjects): (WebInspector.Settings.prototype._migrateSettings.removeDuplicateObjects): (WebInspector.Settings.prototype._migrateSettings): 2011-06-03 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. [Chromium] Web Inspector: correctly handle disconnect from worker when script execution is paused https://bugs.webkit.org/show_bug.cgi?id=62019 Dispatch disconnecFrontend message in debugger task mode to make sure it is processed even if execution is paused. * bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause): (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause): * bindings/v8/WorkerScriptDebugServer.h: 2011-06-07 Felician Marton <marton.felician.zoltan@stud.u-szeged.hu> Reviewed by Nikolas Zimmermann. SVG animation beginElement() does not restart the animation after endElement(). https://bugs.webkit.org/show_bug.cgi?id=43452 Test: svg/animations/animate-endElement-beginElement.html Calling beginElement() after calling endElement() previously does not restarted the animation when animation element's end attribute doesn't contains a bigger value than the current animation time. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::findInstanceTime): 2011-06-07 Naoki Takano <takano.naoki@gmail.com> Reviewed by Kent Tamura. [Chromium] Click event is not fired for a menulist <select> https://bugs.webkit.org/show_bug.cgi?id=60563 Tests: SelectItemEventFire, SelectItemKeyEvent, SelectItemRemoveSelectOnChange and SelectItemRemoveSelectOnChange in webkit_unit_tests. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::showPopup): Set m_focusedNode from m_frameView. (WebCore::PopupListBox::handleMouseReleaseEvent): Call dispatchMouseEvent to forward the event only if select popup. (WebCore::PopupListBox::acceptIndex): Change to return accepted or not. 2011-06-07 Andras Becsi <abecsi@webkit.org> Reviewed by Yury Semikhatsky. REGRESSION(r88221): "Chromium debug compilation broken". https://bugs.webkit.org/show_bug.cgi?id=62197 No new tests needed. * bindings/v8/V8GCController.cpp: Also rename call-sites. (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): 2011-06-07 MORITA Hajime <morrita@google.com> Unreviewed, rolling out r88212 and r88219. http://trac.webkit.org/changeset/88212 http://trac.webkit.org/changeset/88219 https://bugs.webkit.org/show_bug.cgi?id=57439 Tests get timeout at Snow Leopard * css/html.css: (html:focus, body:focus, input[readonly]:focus): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): 2011-06-07 Andras Becsi <abecsi@webkit.org> Rubber-stamped by Csaba Osztrogonác. [Qt][V8] Fix the build after 88221. No new tests needed. * WebCore.pro: Remove non-existing files. * bindings/v8/V8DOMMap.cpp: (WebCore::removeAllDOMObjects): Also rename the definition of the function. 2011-06-06 Dmitry Lomov <dslomov@google.com> Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=62164 Remove "multi-threaded" logic in V8 DOMData, DOMDataStore and friends This functionality is untested and unused: This is an old code from Lockers-based implementation of WebWorkers in V8 bindings, to make sure that DOM objects are released on the right thread even though GC could have happened on any thread. It is currently unused (since current model is one worker per process) and is being removed because new implementation of WebWorkers will be using V8 isolates. * WebCore.gypi: * bindings/v8/ChildThreadDOMData.cpp: Removed. * bindings/v8/ChildThreadDOMData.h: Removed. * bindings/v8/DOMData.cpp: (WebCore::DOMData::DOMData): (WebCore::DOMData::getCurrent): (WebCore::DOMData::getMainThreadStore): * bindings/v8/DOMData.h: (WebCore::DOMData::getStore): (WebCore::DOMData::getCurrentMainThreadStore): (WebCore::DOMData::handleWeakObject): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::DOMDataStore): (WebCore::DOMDataStore::~DOMDataStore): (WebCore::DOMDataStore::weakNodeCallback): * bindings/v8/DOMDataStore.h: * bindings/v8/MainThreadDOMData.cpp: Removed. * bindings/v8/MainThreadDOMData.h: Removed. * bindings/v8/V8DOMMap.cpp: (WebCore::getDOMDataStore): (WebCore::visitDOMNodes): (WebCore::visitDOMObjects): (WebCore::visitActiveDOMObjects): (WebCore::visitDOMSVGElementInstances): * bindings/v8/V8DOMMap.h: * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): 2011-06-06 Nico Weber <thakis@chromium.org> Reviewed by Adam Barth. [chromium] Make VideoFrameChromium's destructor virtual https://bugs.webkit.org/show_bug.cgi?id=62186 This fixes a real bug, since WebMediaPlayerClientImpl::putCurrentFrame deletes a VideoFrameChromium subclass type through this interface class, causing ~VideoFrameChromiumImpl's destructor not to run. (VideoFrameChroimumImpl happens to not have a destructor or any non-POD member variables, so it's more a latent bug.) * platform/graphics/chromium/VideoFrameChromium.cpp: (WebCore::VideoFrameChromium::~VideoFrameChromium): * platform/graphics/chromium/VideoFrameChromium.h: 2011-06-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Sammy Weinig. Remove some unnecessary includes from AnimationBase.cpp https://bugs.webkit.org/show_bug.cgi?id=62183 * page/animation/AnimationBase.cpp: 2011-06-06 Kent Tamura <tkent@chromium.org> Unreviewed, a crash fix by a roll out. REGRESSION(r87980): Null pointer dereference in RenderTextControl::setInnerText() https://bugs.webkit.org/show_bug.cgi?id=62116 Roll out the WebCore part of r87980. * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): (WebCore::SearchInputType::createShadowSubtree): (WebCore::SearchInputType::destroyShadowSubtree): * html/SearchInputType.h: (WebCore::SearchInputType::innerBlockElement): (WebCore::SearchInputType::resultsButtonElement): (WebCore::SearchInputType::cancelButtonElement): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::TextFieldInputType): (WebCore::TextFieldInputType::createShadowSubtree): (WebCore::TextFieldInputType::destroyShadowSubtree): * html/TextFieldInputType.h: (WebCore::TextFieldInputType::innerTextElement): (WebCore::TextFieldInputType::innerSpinButtonElement): (WebCore::TextFieldInputType::speechButtonElement): (WebCore::TextFieldInputType::setInnerTextElement): (WebCore::TextFieldInputType::setSpeechButtonElement): * html/shadow/TextControlInnerElements.cpp: * html/shadow/TextControlInnerElements.h: 2011-06-06 No'am Rosenthal <noam.rosenthal@nokia.com> Reviewed by Simon Fraser. Allow copying of KeyframeValueList. https://bugs.webkit.org/show_bug.cgi?id=62171 Make a deep copy of KeyframeValueList, copying each of the keyframes with a virtual clone() function. No new functionality so no new tests. * platform/graphics/GraphicsLayer.h: (WebCore::FloatAnimationValue::clone): (WebCore::TransformAnimationValue::TransformAnimationValue): (WebCore::TransformAnimationValue::clone): (WebCore::TransformAnimationValue::value): (WebCore::KeyframeValueList::KeyframeValueList): 2011-06-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. Incorrect rounding of color values during transitions https://bugs.webkit.org/show_bug.cgi?id=62141 When blending integers, round to the nearest integer, instead of always rounding down. Test: transitions/color-transition-rounding.html * page/animation/AnimationBase.cpp: (WebCore::blendFunc): 2011-06-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r88202. http://trac.webkit.org/changeset/88202 https://bugs.webkit.org/show_bug.cgi?id=62182 This broke the mac clang bot (Requested by koz__ on #webkit). * dom/Node.cpp: (WebCore::Node::hasNonEmptyBoundingBox): * rendering/InlineBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRect): * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): * rendering/RenderView.h: 2011-06-06 Noel Gordon <noel.gordon@gmail.com> Reviewed by Hajime Morita. Draw CSS outline style for render widgets: iframe, embed, object, applet. https://bugs.webkit.org/show_bug.cgi?id=57439 Draw CSS outlines for render widgets: iframe, embed, object, applet. These elements can be focused (via clicks or tabIndex) but should not have a visible focus ring by default. Tests: fast/replaced/no-focus-ring-embed-1.html fast/replaced/no-focus-ring-embed-2.html fast/replaced/no-focus-ring-iframe.html fast/replaced/no-focus-ring-object-1.html fast/replaced/no-focus-ring-object-2.html fast/replaced/outline-replaced-elements.html * css/html.css: (applet:focus, embed:focus, iframe:focus, object:focus): Default to no focus ring. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): Paint the render widget CSS outline style. 2011-06-06 MORITA Hajime <morrita@google.com> Reviewed by Kent Tamura. Assertion fails in TextCheckingHelper by right-clicking on <input type=search> https://bugs.webkit.org/show_bug.cgi?id=61991 Added a guard bofore TextCheckingHelper construction sites. Test: editing/spelling/spellcheck-input-search-crash.html * editing/Editor.cpp: (WebCore::Editor::isSelectionUngrammatical): (WebCore::Editor::guessesForUngrammaticalSelection): (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection): 2011-06-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Update RenderBlock::paint to use IntPoint internally https://bugs.webkit.org/show_bug.cgi?id=62140 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): 2011-06-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderBox::absoluteRects to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62130 Covered by existing tests. * dom/Node.cpp: (WebCore::Node::hasNonEmptyBoundingBox): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRect): * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): * rendering/RenderView.h: 2011-06-06 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch shouldPaint to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62158 Switching shouldPaint to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this is simple refactoring. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): (WebCore::RenderReplaced::shouldPaint): * rendering/RenderReplaced.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): 2011-06-06 James Simonsen <simonjam@chromium.org> Reviewed by James Robinson. Add monotonicallyIncreasingTime() to get monotonically increasing time https://bugs.webkit.org/show_bug.cgi?id=37743 * platform/chromium/SystemTimeChromium.cpp: (WebCore::monotonicallyIncreasingTime): Add primitive monotonicallyIncreasingTime() which just wraps currentTime(). 2011-06-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderBox::pushContentsClip to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62133 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::Covered by existing tests.RenderBlock::paint): * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): * rendering/RenderBox.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paint): 2011-06-06 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch InlineFlowBox::paintMask to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62156 Switching InlineFlowBox::paintMask to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this is simple refactoring. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: 2011-06-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert hitTest to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62144 Covered by existing tests. * rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestContents): * rendering/RenderInline.cpp: (WebCore::RenderInline::nodeAtPoint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestContents): * rendering/RenderLayer.h: (WebCore::RenderLayer::renderBoxLocation): (WebCore::RenderLayer::renderBoxX): (WebCore::RenderLayer::renderBoxY): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::hitTest): * rendering/RenderLineBoxList.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::hitTest): * rendering/RenderObject.h: 2011-06-06 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintScrollbar to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62151 Switching paintScrollbar to use IntPoint instead of a pair of ints. No new tests since this is simple refactoring. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject): (WebCore::RenderListBox::paintScrollbar): * rendering/RenderListBox.h: 2011-06-06 Daniel Cheng <dcheng@chromium.org> Reviewed by Tony Chang. [chromium] Delete dead clipboard code. https://bugs.webkit.org/show_bug.cgi?id=62113 No new tests since this change only deleted unused code. * WebCore.gypi: * platform/chromium/ChromiumDataObjectLegacy.cpp: Removed. * platform/chromium/ChromiumDataObjectLegacy.h: Removed. * platform/chromium/ReadableDataObject.cpp: Removed. * platform/chromium/ReadableDataObject.h: Removed. * platform/chromium/WritableDataObject.cpp: Removed. * platform/chromium/WritableDataObject.h: Removed. 2011-06-06 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintOutline, paintContinuationOutlines, and paintOutlineForLine to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62137 Switching paintOutline, paintContinuationOutlines, and paintOutlineForLine to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this is simple refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::paintContinuationOutlines): * rendering/RenderBlock.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline): (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderInline.h: * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): 2011-06-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderBox::popContentsClip to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62132 Covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): * rendering/RenderBox.cpp: (WebCore::RenderBox::popContentsClip): * rendering/RenderBox.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paint): 2011-06-06 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Remove tx/ty offset from selectionRect https://bugs.webkit.org/show_bug.cgi?id=62146 Removing unused offset parameters from selectionRect. No new tests since this is just cleanup. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::selectionRect): * rendering/EllipsisBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): * rendering/InlineTextBox.h: * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRectsForRange): (WebCore::ellipsisRectForBox): (WebCore::RenderText::absoluteQuadsForRange): (WebCore::RenderText::selectionRectForRepaint): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::localCaretRect): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::selectionRect): * rendering/svg/SVGInlineTextBox.h: 2011-06-06 Paul Kinlan <paulkinlan@google.com> Reviewed by Jeremy Orlow. Let developers call createEvent("PopStateEvent"), previously it wasn't exposed and threw an exeception. https://bugs.webkit.org/show_bug.cgi?id=62099 * WebCore/dom/Document.cpp: * WebCore/dom/PopStateEvent.cpp: * WebCore/dom/PopStateEvent.h: 2011-06-03 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintSelection to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62059 Switching paintSelection to use an IntPoint to represent the paint offset instead of a pair of ints. No new tests since this is simple refactoring. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): (WebCore::EllipsisBox::paintSelection): * rendering/EllipsisBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::paintSelection): * rendering/RenderBlock.h: 2011-06-06 Emil A Eklund <eae@chromium.org> Reviewed by Eric Seidel. Convert RenderBox::clipRect to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62045 Covered by existing tests. * rendering/RenderBox.cpp: (WebCore::RenderBox::clipRect): * rendering/RenderBox.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::repaintBlockSelectionGaps): * rendering/RenderLayerBacking.cpp: (WebCore::clipBox): 2011-06-06 Peter Kasting <pkasting@google.com> Reviewed by Antonio Gomes. Remove unnecessary args from scroll functions. https://bugs.webkit.org/show_bug.cgi?id=61648 No behavior change, so no tests. * WebCore.exp.in: * WebCore.order: * dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::scrollIntoViewIfNeeded): * editing/FrameSelection.cpp: (WebCore::FrameSelection::revealSelection): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): * page/FrameView.cpp: (WebCore::FrameView::scrollToAnchor): * rendering/RenderBox.cpp: (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): (WebCore::RenderBox::canBeProgramaticallyScrolled): * rendering/RenderBox.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::autoscroll): * rendering/RenderLayer.h: * rendering/RenderListBox.h: (WebCore::RenderListBox::canBeProgramaticallyScrolled): * rendering/RenderTextControl.h: (WebCore::RenderTextControl::canBeProgramaticallyScrolled): 2011-06-06 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintContents, paintColumnContents, paintColumnRules, and paintSelection to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62134 Switching paintContents, paintColumnContents, paintColumnRules, and paintSelection to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this simple refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::paintContents): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::paintSelection): * rendering/RenderBlock.h: 2011-06-06 Yael Aharon <yael.aharon@nokia.com> Reviewed by Eric Seidel. Inline elements are wrapped prematurely with non-zero border, margin or padding. https://bugs.webkit.org/show_bug.cgi?id=60459 When an inline element has a right border/margin/padding and it has more than one descendant with no siblings, the width of the right border/margin/padding should be included in line breaking calculation only once, and not for each descendant. Test: fast/inline/inline-wrap-with-parent-padding.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-06-06 Shishir Agrawal <shishir@chromium.org> Reviewed by Tony Gentilcore. Add a "prerender" state for page visibility. https://bugs.webkit.org/show_bug.cgi?id=62062 * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: 2011-06-06 Cary Clark <caryclark@google.com> Reviewed by Eric Seidel. Fix typo in CachedFont.cpp #define https://bugs.webkit.org/show_bug.cgi?id=62127 No new tests. The define typo in question is not yet enabled, so this change has no functional impact. * loader/cache/CachedFont.cpp: change SKIA_MAC_ON_CHROME to SKIA_ON_MAC_CHROME 2011-06-03 Levi Weintraub <leviw@chromium.org> Reviewed by Eric Seidel. Switch paintFloats, paintChildren, and paintEllipsisBoxes to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62058 Switching paintFloats, paintChildren, and paintEllipsisBoxes to take IntPoints representing their paint offsets instead of pairs of ints. No new tests since this is simple refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::paintContents): (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::paintEllipsisBoxes): * rendering/RenderBlock.h: 2011-06-06 Steve Block <steveblock@google.com> Reviewed by Yury Semikhatsky. Use of ENABLE(INSPECTOR) is inconsistent https://bugs.webkit.org/show_bug.cgi?id=62118 Correctly guard implementation of ScriptProfiler. No new tests, build fix only. * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::initialize): 2011-06-04 Dominic Cooney <dominicc@chromium.org> Reviewed by Dimitri Glazkov. Add WebCoreTestSupport project. https://bugs.webkit.org/show_bug.cgi?id=61076 * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/WebCoreTestSupport.vcproj: Added. * WebCore.vcproj/copyForwardingHeaders.cmd: Copy WebCoreTestSupport.h. 2011-06-06 Alexandru Chiculita <achicu@adobe.com> Reviewed by Kent Tamura. Add ENABLE_CSS_EXCLUSIONS support for build-webkit script https://bugs.webkit.org/show_bug.cgi?id=61628 This patch modifies only the build system. Therefore, there are no new tests. * Configurations/FeatureDefines.xcconfig: 2011-06-06 Mihnea Ovidenie <mihnea@adobe.com> Reviewed by Kent Tamura. Add ENABLE(CSS_REGIONS) guard for CSS Regions support https://bugs.webkit.org/show_bug.cgi?id=61631 This patch modifies only the build system. Therefore, there are no new tests. * Configurations/FeatureDefines.xcconfig: 2011-06-03 Hans Wennborg <hans@chromium.org> Reviewed by Tony Gentilcore. IndexedDB: Clean-up function prototypes in IDBLevelDBBackingStore.cpp https://bugs.webkit.org/show_bug.cgi?id=62013 Clean up the prototypes for cursor open functions by introducing the CursorOptions struct. Just clean-up, no new functionality so no new tests. * storage/IDBLevelDBBackingStore.cpp: (WebCore::CursorOptions::CursorImplCommon::CursorImplCommon): (WebCore::CursorOptions::CursorImplCommon::firstSeek): (WebCore::CursorOptions::CursorImplCommon::continueFunction): (WebCore::CursorOptions::ObjectStoreCursorImpl::create): (WebCore::CursorOptions::ObjectStoreCursorImpl::ObjectStoreCursorImpl): (WebCore::CursorOptions::IndexKeyCursorImpl::create): (WebCore::CursorOptions::IndexKeyCursorImpl::IndexKeyCursorImpl): (WebCore::CursorOptions::IndexCursorImpl::create): (WebCore::CursorOptions::IndexCursorImpl::IndexCursorImpl): (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor): (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor): (WebCore::IDBLevelDBBackingStore::openIndexCursor): 2011-06-06 Mustafizur Rahaman <mustaf.here@gmail.com> Reviewed by Darin Adler. Fix LayoutTests/canvas/philip/tests/2d.composite.operation.highlight.html https://bugs.webkit.org/show_bug.cgi?id=48290 "highlight" is not a valid globalComposite operation as per http://www.w3.org/TR/2011/WD-2dcontext-20110525/#compositing Therefore, removed the option from the source code. Tests: No new tests required. LayoutTests\canvas\philip\tests\2d.composite.operation.highlight.html can be used for testing. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator CompositeOperator): * platform/graphics/GraphicsTypes.cpp: * platform/graphics/GraphicsTypes.h: * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::toCairoOperator): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::applyCompositeOperator): * platform/graphics/openvg/PainterOpenVG.cpp: (WebCore::PlatformPainterState::applyBlending): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQtCompositionMode): * platform/graphics/skia/SkiaUtils.cpp: 2011-06-04 Abhishek Arya <inferno@chromium.org> Reviewed by Kent Tamura. Add some asserts for array boundary checks in TextRun. Fix an integer issue in linux text controller code. https://bugs.webkit.org/show_bug.cgi?id=62085 Testing ComplexTextControllerLinux change requires a testcase > 32 kb which is not feasible. All other changes are tested by existing layouttests. * platform/graphics/TextRun.h: (WebCore::TextRun::operator[]): add assert. (WebCore::TextRun::data): add assert. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): bail early and prevent access to one byte across the text run boundary. * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::ComplexTextController::getNormalizedTextRun): wrong int16 vs int comparison. * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunWalker::walk): bail early when from and to is outside the text run boundary. this hit easily after adding the assert when from = to = end and read in run.data(from). 2011-06-05 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. Rolling out r84528. http://trac.webkit.org/changeset/84528 https://bugs.webkit.org/show_bug.cgi?id=62100 It made several problems on elements with new shadow DOM. * dom/Element.cpp: (WebCore::Element::copyNonAttributeProperties): 2011-06-05 Igor Oliveira <igor.oliveira@openbossa.org> Reviewed by Kenneth Rohde Christiansen. fast/viewport/viewport-45.html fails in GTK+/Qt https://bugs.webkit.org/show_bug.cgi?id=47481 computeViewportAttributes does many math operations with float point arithmetic and in some cases there is loss of precision making tests have incorrect values. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): == Rolled over to ChangeLog-2011-06-04 ==