2011-01-12 Chris Marrin Unreviewed. Another fix for Gtk * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintsWithTransform): 2011-01-12 Chris Marrin Unreviewed. Fix for Gtk and Windows builds * page/Frame.cpp: (WebCore::Frame::scalePage): * page/Frame.h: * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayer::contentsScale): (PlatformCALayer::setContentsScale): 2011-01-12 Chris Marrin UNreviewed. Fix for the Windows build * platform/graphics/ca/win/PlatformCALayerWin.cpp: (contentsScale): (setContentsScale): 2011-01-12 Chris Marrin Unreviewed. Another build fix * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::clampedContentsScaleForScale): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::setContentsScale): 2011-01-11 Matthew Delaney Reviewed by Simon Fraser. Max area bound needed in creation of IOSurface in ImageBufferCG.cpp https://bugs.webkit.org/show_bug.cgi?id=52172 Tests: fast/canvas/canvas-large-dimensions.html * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): 2011-01-12 Daniel Bates And Benjamin C Meyer Build fix when building with Inspector disabled https://bugs.webkit.org/show_bug.cgi?id=52313 After changeset 75604 it's not possible to build when the Inspector is disabled. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::updateApplicationCacheStatus): Fix build breakage when building with Inspector disabled and Offline Web Applications enabled by moving macro guard condition ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS) into function body. This makes us also consistent with the form we use for InspectorInstrumentation::networkStateChanged() and other InspectorInstrumentation functions. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveData): Fix build breakage when building with Inspector disabled by adding ENABLE(INSPECTOR) guard around code that references the instance variable ApplicationCacheGroup::m_currentResourceIdentifier as this variable only exists when building with the Inspector. (WebCore::ApplicationCacheGroup::didFinishLoading): Ditto. (WebCore::ApplicationCacheGroup::didFail): Ditto. 2011-01-12 Chris Marrin Unreviewed. Fix a build issue from http://trac.webkit.org/changeset/75639. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::contentsScale): (WebCore::GraphicsLayer::setContentsScale): 2011-01-12 Chris Marrin Reviewed by Kevin Decker. Pages with accelerated layers lose subpixel-AA and become blurry when a scale factor is applied rdar://problem/8824974 This prevents the rootLayer (with the WebKit rendered content) from going becoming a tiled layer when zoomed, and when there is other layered content on the page. This speeds up zooming a lot and avoids some buggy behavior in CA with a very large number of layers. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintsWithTransform): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintingGoesToWindow): 2011-01-12 Chris Marrin Reviewed by Simon Fraser. Pages with accelerated layers lose subpixel-AA and become blurry when a scale factor is applied rdar://problem/8824974 When scaled, WebKit renders the page content at the scaled up size, so there are no scaling artifacts. But content drawn into a layer's backing store does not scale up. This is made worse by the fact that the root page contents become layered when there are other accelerated compositing layers present (video, plugins, etc.). Plumb scaling factor from Frame::scalePage() down into all layers with content. It eventually calls CALayer::setContentsScale which renders to a backing store whose dimensions are scaled, causing them to render larger and appear pixel perfect at the scaled page size. * page/Frame.cpp: (WebCore::Frame::updateContentsScale): (WebCore::Frame::scalePage): * page/Frame.h: * platform/graphics/GraphicsLayer.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setContentsScale): (WebCore::GraphicsLayerCA::clampedContentsScaleForScale): * platform/graphics/ca/GraphicsLayerCA.h: (WebCore::GraphicsLayerCA::contentsScale): * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::contentsScale): (PlatformCALayer::setContentsScale): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateContentsScale): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createGraphicsLayer): (WebCore::RenderLayerBacking::updateForegroundLayer): (WebCore::RenderLayerBacking::updateMaskLayer): (WebCore::RenderLayerBacking::updateContentsScale): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateContentsScale): * rendering/RenderLayerCompositor.h: 2011-01-12 Stephen White Reviewed by James Robinson. Fix DrawingBuffer issues for depth/stencil, extensions, etc. https://bugs.webkit.org/show_bug.cgi?id=52310 1) GL_TEXTURE is not a valid argument to glFramebufferTexture2D() (should be GL_TEXTURE_2D). 2) Support for the multisampling extension was being checked after the DrawingBuffer constructor was called, which calls multisample() to check for the extension. 3) If depth or stencil is set, the corresponding framebuffers must be created in the DrawingBuffer constructor. 4) GL_DEPTH_STENCIL is not a valid framebuffer internal type in GLES2. Must use GL_OES_DEPTH24_STENCIL8, and check for the OES_packed_depth_stencil extension. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): Record the extension support in the constructor. Create all the secondary drawing buffers (for multisampling, depth/stencil). * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::create): Check for the extensions before calling the DrawingBuffer constructor. (WebCore::DrawingBuffer::createSecondaryBuffers): Refactor creation of the secondary buffers from DrawingBufferMac.mm to here. (WebCore::DrawingBuffer::reset): Use DEPTH24_STENCIL8 format, not DEPTH_STENCIL. Use DEPTH_COMPONENT16, not DEPTH_COMPONENT. Use GL_TEXTURE_2D, not GL_TEXTURE (for glFramebufferTexture2D). * platform/graphics/gpu/DrawingBuffer.h: Refactor createSecondaryBuffers(). Add extension support arguments to constructor. Add support for packed_depth_stencil extension. * platform/graphics/gpu/mac/DrawingBufferMac.mm: (WebCore::DrawingBuffer::DrawingBuffer): Record extension support in constructor. Refactor out creation of secondary buffers. 2011-01-12 Beth Dakin Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose fixed layout through WebKit SPI -and corresponding- Export symbols for ScrollView::setUseFixedLayout() and ScrollView::setFixedLayoutSize() * WebCore.exp.in: 2011-01-12 Robert Hogan Reviewed by Kenneth Rohde Christiansen. [Qt] Search input field doesn't have cancel button Add a cancel button to the search field and make it customizable by the client. For now, use the close dialog button associated with the application's style as the default. Unskip a bunch of search field related tests that pass now: fast/forms/search-cancel-button-mouseup.html fast/forms/search-rtl.html fast/forms/search-abs-pos-cancel-button.html fast/forms/search-styled.html fast/forms/search-transformed.html fast/forms/search-zoomed.html fast/forms/search-cancel-button-style-sharing.html fast/forms/search-display-none-cancel-button.html fast/forms/search-placeholder-value-changed.html fast/repaint/search-field-cancel.html fast/forms/search-cancel-button-events.html https://bugs.webkit.org/show_bug.cgi?id=42887 * platform/graphics/qt/ImageQt.cpp: (loadResourcePixmap): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::isControlStyled): (WebCore::RenderThemeQt::computeSizeBasedOnStyle): (WebCore::RenderThemeQt::paintSearchField): (WebCore::RenderThemeQt::adjustSearchFieldStyle): (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeQt::convertToPaintingRect): (WebCore::RenderThemeQt::paintSearchFieldCancelButton): * platform/qt/RenderThemeQt.h: 2011-01-12 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: cookie table is multiplied after repeated switching to cookies tab in network item view Only create cookiesTable is it hasn't been done yet. https://bugs.webkit.org/show_bug.cgi?id=52303 * inspector/front-end/ResourceCookiesView.js: (WebInspector.ResourceCookiesView.prototype.show): 2011-01-12 Koan-Sin Tan Reviewed by Martin Robinson. [Gtk] WebKitGtk+ doesn't build on Mac OS X 10.6 https://bugs.webkit.org/show_bug.cgi?id=50867 * config.h: Don't disallow ctype for (OS(DARWIN) && PLATFORM(GTK)) Many GTK+ related files include or . On Mac, includes . includes , which uses isacii(). * platform/UUID.cpp: (WebCore::createCanonicalUUIDString): For OS(DARWIN) && !PLATFORM(CF) use the Chromium Linux UUID generation. 2011-01-12 Simon Fraser Reviewed by Eric Seidel. [CSS Gradients] One color stop should not paint anything for linear-gradient https://bugs.webkit.org/show_bug.cgi?id=52259 Share color stop parsing code between linear and radial gradients. Consider the gradient invalid if it has less than two color stops. * css/CSSParser.cpp: (WebCore::CSSParser::parseLinearGradient): (WebCore::CSSParser::parseRadialGradient): (WebCore::CSSParser::parseGradientColorStops): * css/CSSParser.h: 2011-01-12 Mikhail Naganov Reviewed by Pavel Feldman. Fix inconsistencies in Inspector strings found by the new check-inspector-strings script. https://bugs.webkit.org/show_bug.cgi?id=52295 * English.lproj/localizedStrings.js: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.EventListenerBreakpointsSidebarPane): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.setRecordingProfile): * inspector/front-end/Resource.js: (WebInspector.Resource.Type.toString): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourceRevisionTreeElement): * inspector/front-end/utilities.js: (): 2011-01-12 Yury Semikhatsky Unreviewed. Fix WML compilation on Mac. * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::setValue): (WebCore::WMLInputElement::setValueForUser): (WebCore::WMLInputElement::initialize): (WebCore::WMLInputElement::validateInputMask): * wml/WMLSelectElement.cpp: (WebCore::WMLSelectElement::listBoxSelectItem): 2011-01-12 Justin Schuh Unreviewed build fix for debug strict compiles. Use fprintf for debug statements instead of fwrite, which caused compile failures in debug strict mode because of failure to check the fwrite return value. No behavior changed. * rendering/CounterNode.cpp: (WebCore::showTreeAndMark): 2010-12-29 Yury Semikhatsky Reviewed by Pavel Feldman. inspector/timeline-network-resource.html fails when run twice https://bugs.webkit.org/show_bug.cgi?id=37394 Send didReceiveResponse notification to the timeline agent from ResourceLoadNotifier instead of ResourceLoader::didReceiveResponse to cover the cases when resources are loaded from memory cache. Network notifications are now sent to InspectorInstrumentation which dispatches them to interested agents and InspectorController. * inspector/Inspector.idl: * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::didReceiveManifestResponse): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::willSendRequest): (WebCore::InspectorController::didReceiveResponse): (WebCore::InspectorController::didFailLoading): (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): * inspector/InspectorController.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl): (WebCore::InspectorInstrumentation::willSendRequestImpl): (WebCore::InspectorInstrumentation::markResourceAsCachedImpl): (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): (WebCore::InspectorInstrumentation::didReceiveContentLengthImpl): (WebCore::InspectorInstrumentation::didFinishLoadingImpl): (WebCore::InspectorInstrumentation::didFailLoadingImpl): (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl): (WebCore::InspectorInstrumentation::scriptImportedImpl): (WebCore::InspectorInstrumentation::retrieveResourceAgent): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::identifierForInitialRequest): (WebCore::InspectorInstrumentation::willSendRequest): (WebCore::InspectorInstrumentation::markResourceAsCached): (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache): (WebCore::InspectorInstrumentation::willReceiveResourceResponse): (WebCore::InspectorInstrumentation::didReceiveContentLength): (WebCore::InspectorInstrumentation::didFinishLoading): (WebCore::InspectorInstrumentation::didFailLoading): (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequest): (WebCore::InspectorInstrumentation::scriptImported): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::identifierForInitialRequest): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createResourceSendRequestData): * inspector/TimelineRecordFactory.h: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.identifierForInitialRequest): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.addRecordToTimeline): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::didReceiveResponse): (WebCore::ResourceLoadNotifier::didFailToLoad): (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest): (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse): (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength): (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading): (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveResponse): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::createResourceHandle): (WebCore::ApplicationCacheGroup::didReceiveResponse): (WebCore::ApplicationCacheGroup::didReceiveData): (WebCore::ApplicationCacheGroup::didFinishLoading): (WebCore::ApplicationCacheGroup::didFail): * loader/appcache/ApplicationCacheGroup.h: * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerScriptLoader::notifyFinished): * workers/Worker.cpp: (WebCore::Worker::notifyFinished): * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didFinishLoading): 2011-01-12 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: do not replace all tabs with spaces when editing script source https://bugs.webkit.org/show_bug.cgi?id=52291 * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype._editLine): 2011-01-11 Jeremy Orlow Reviewed by Nate Chapin. Enforce READ_ONLY transactions in IndexedDB https://bugs.webkit.org/show_bug.cgi?id=52229 Add READ_ONLY_ERR and return it whenever delete or put are called. Note that IDBCursor's delete and update are simply aliases for delete/put, which is why no extra code is required to handle those cases. Test: storage/indexeddb/transaction-read-only.html * dom/ExceptionCode.cpp: * storage/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::deleteFunction): * storage/IDBDatabase.idl: * storage/IDBDatabaseException.h: * storage/IDBDatabaseException.idl: * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): (WebCore::IDBObjectStoreBackendImpl::deleteFunction): (WebCore::IDBObjectStoreBackendImpl::deleteIndex): 2011-01-11 Philippe Normand Reviewed by Eric Seidel. [GTK] minimal build breaks in RenderThemeGtk3 https://bugs.webkit.org/show_bug.cgi?id=52202 * platform/gtk/RenderThemeGtk3.cpp: Added VIDEO guards around initMediaColors(). 2011-01-11 Philippe Normand Reviewed by Eric Carlson. [GStreamer] PlatformVideoWindowMac implementation https://bugs.webkit.org/show_bug.cgi?id=50770 This new implementation will be used on Mac OS to display the fullscreen video window with the GStreamer-based media player. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::gstGWorldSyncMessageCallback): * platform/graphics/gstreamer/PlatformVideoWindow.h: (WebCore::PlatformVideoWindow::window): * platform/graphics/gstreamer/PlatformVideoWindowMac.mm: (PlatformVideoWindow::PlatformVideoWindow): (PlatformVideoWindow::~PlatformVideoWindow): (PlatformVideoWindow::prepareForOverlay): 2011-01-11 Simon Fraser Reviewed by Dan Bernstein. Webkit crashes when a gradient is applied using the first-line pseudo element https://bugs.webkit.org/show_bug.cgi?id=52225 When a pseudostyle references images, we fail to register/unregister the relevant RenderObjects as clients of the image in the style. For gradients, this caused a crash. This patch fixes the crash by returning a null gradient image in this situation. Test: fast/gradients/gradient-on-pseudoelement-crash.html * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::image): 2011-01-11 Andy Estes Reviewed by Darin Adler. REGRESSION (r71562): servePendingRequests() no longer called when resources are done loading. https://bugs.webkit.org/show_bug.cgi?id=52264 In r71562, servePendingRequests() is no longer called in Loader's didFinishLoading(), didFail() and didReceiveResponse() methods. Since r71562 was intended only as a refactoring, these calls should be restored. At least one WebKit-based Mac OS X application relies on this for correct behavior. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::loadDone): Call resourceLoadScheduler()->servePendingRequests(). 2011-01-11 Patrick Gansterer Reviewed by Eric Seidel. Add Document::setContent() https://bugs.webkit.org/show_bug.cgi?id=52085 Add a method to Document to set the whole content at once. This removes the hack of the insert method in the xml parser and is a predecessor to feed the xml parser with raw data. * dom/Document.cpp: (WebCore::Document::setContent): * dom/Document.h: * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::insert): Added ASSERT_NOT_REACHED(). * loader/cache/CachedFont.cpp: (WebCore::CachedFont::ensureSVGFontData): Use setContent. * xml/DOMParser.cpp: (WebCore::DOMParser::parseFromString): Ditto. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): Ditto. * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): Ditto. 2011-01-11 Brent Fulgham Unreviewed build fix. * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::addArc): Switch to MathExtra's piFloat define, rather than M_PI which is not always available. 2011-01-11 Nicolas Dufresne Reviewed by Adam Barth. Use plug-in DB for extensions to MIME type convertion Plugins extension to MIME type conversion was not used in the frameLoader. This was causing some fallback to be use which as the side effect of loosing all the parameters or attributes. This patch ensure that we try to convert the extension to MIME type using the plugin database beofre using this fallback. Attribute lost with Flash plugin without mime type set https://bugs.webkit.org/show_bug.cgi?id=50657 Test: plugins/no-mime-with-valid-extension.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): Use PluginDatabase for MIME 2011-01-11 James Simonsen Reviewed by Eric Seidel. [Web Timing] Rename sslHandshakeStart to secureConnectionStart https://bugs.webkit.org/show_bug.cgi?id=52239 * page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::secureConnectionStart): * page/PerformanceTiming.h: * page/PerformanceTiming.idl: 2011-01-11 Adam Barth Reviewed by Eric Seidel. Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs https://bugs.webkit.org/show_bug.cgi?id=50182 This patch actually makes the display-isolated schemes display isolated. The behavior should be the same as the previous iteration of this patch, but re-organized a bit because reading the access white list is expensive. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::isAccessToURLWhiteListed): (WebCore::SecurityOrigin::canDisplay): * page/SecurityOrigin.h: * platform/SchemeRegistry.cpp: * platform/SchemeRegistry.h: 2011-01-11 Mihai Parparita Reviewed by Darin Fisher. Scroll event should be fired asynchronously https://bugs.webkit.org/show_bug.cgi?id=45631 Tests: fast/events/fire-scroll-event.html fast/events/fire-scroll-event-element.html fast/events/scroll-event-phase.html Makes scroll events fire asynchronously to be in compliance with the CSSOM View Module and consistent with Gecko, Opera and (to some degree) IE. Implemented via the EventQueue class added by r74062 (EventQueue now has a convenience enqueueScrollEvent method). * dom/EventQueue.cpp: (WebCore::EventQueue::enqueueScrollEvent): (WebCore::EventQueue::pendingEventTimerFired): * dom/EventQueue.h: * page/EventHandler.cpp: (WebCore::EventHandler::sendScrollEvent): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::valueChanged): 2011-01-11 Patrick Gansterer Unreviewed WinCE build fix for r75523. * platform/wince/DragDataWinCE.cpp: Added missing include. 2011-01-11 Abhishek Arya Reviewed by Dimitri Glazkov. RefPtr the FrameView to prevent scrollbar from getting deleted inside its scroll event. https://bugs.webkit.org/show_bug.cgi?id=52238 Test: scrollbars/scrollable-iframe-remove-crash.html * page/DOMWindow.cpp: (WebCore::DOMWindow::scrollTo): 2011-01-08 Dimitri Glazkov Reviewed by David Hyatt. Make pseudo-style resolution less hard-coded when used to select a shadow node https://bugs.webkit.org/show_bug.cgi?id=46595 Essentially implements the plumbing for the XBL2 pseudo attribute: http://dev.w3.org/2006/xbl2/#the-pseudo-attribute Test: fast/css/unknown-pseudo-element-matching.html * css/CSSGrammar.y: Changed to handle specifier_list structure with the CSSParser::updateSpecifierWithElementName helper, added logic to keep unknown pseudo-element selectors at the top of the selector chain, so that we can easily check for them and grab them, and also because they would either not match anything or act as a descendant selector (descendant into a shadow DOM subtree that is), not a specifier. * css/CSSParser.cpp: (WebCore::CSSParser::updateSpecifiersWithElementName): Generalized/combined the logic adding element name to selectors and added the special case to handle unknown pseudo-element selectors. * css/CSSParser.h: Added def. * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Removed any mention of PseudoSliderThumb/SLIDER_THUMB. (WebCore::nameToPseudoTypeMap): Ditto. (WebCore::CSSSelector::extractPseudoType): Ditto. * css/CSSSelector.h: Added a new ShadowDescendant relation type, removed PseudoSliderThumb def. (WebCore::CSSSelector::isUnknownPseudoElement): Added a helper method. * css/CSSSelectorList.cpp: (WebCore::SelectorHasUnknownPseudoElementFunctor::operator()): Added a functor to check for an unknown pseudo-element in the list. (WebCore::CSSSelectorList::hasUnknownPseudoElements): Added. * css/CSSSelectorList.h: Added a def. * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::getPseudoRules): Added accessor to pseudo-element hash. (WebCore::CSSStyleSelector::matchRules): Added matching pseudo elements. (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Added handling of ShadowDescendant relation. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Enabled handling of unknown pseudo-element selectors. (WebCore::CSSRuleSet::addRule): Added populating unknown pseudo-element hash. * css/html.css: (input[type="range"]::-webkit-slider-thumb): Added previously-hard-coded display:block. * dom/Element.h: (WebCore::Element::shadowPseudoId): Added new virtual method to allow elements to provide the value of pseudo-element selector they would match. * dom/Node.cpp: (WebCore::Node::querySelector): Added checking for unknown pseudo-element selectors, so that we can throw a SYNTAX_ERR if found. (WebCore::Node::querySelectorAll): Ditto. * html/shadow/SliderThumbElement.h: (WebCore::SliderThumbElement::shadowPseudoId): Added to return "-webkit-slider-thumb"; * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Changed to use the new styleForElement logic. * rendering/style/RenderStyleConstants.h: Removed SLIDER_THUMB. 2011-01-11 Dean Jackson Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=52233 WebKitCSSMatrix constructor should accept 'none' as a valid string parameter. * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): 2011-01-11 James Robinson Reviewed by Dimitri Glazkov. Set all RenderBlocks as replaced when an inline display type is specified https://bugs.webkit.org/show_bug.cgi?id=50858 When a RenderBlock is created for an element with a specified display:inline style, it should always be treated as inline-block. This situations often comes up for form controls. Previously, RenderBlock::styleWillChange set the replaced flag for display values of inline-block, inline-table, and inline-table and a number of subclasses of RenderBlock set the replaced flag in styleDidChange for a display:inline. However sometimes new subclasses would miss this step leading to bugs (such as with RenderDetails). This patch sets the replaced flag for all inline display types in RenderBlock::styleWillChange. Code cleanup only, no change in behavior so no new tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleWillChange): * rendering/RenderButton.cpp: (WebCore::RenderButton::styleDidChange): * rendering/RenderFieldset.cpp: * rendering/RenderFieldset.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::styleDidChange): * rendering/RenderListBox.cpp: * rendering/RenderListBox.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::styleDidChange): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::styleDidChange): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::styleDidChange): 2011-01-11 Dimitri Glazkov Reviewed by Eric Seidel. REGRESSION(r71934) Can't type in search edit field on skin-one.com https://bugs.webkit.org/show_bug.cgi?id=52195 Restored the original behavior, where the selectstart event is not dispatched when selection changes inside of the shadow DOM. * dom/Node.cpp: (WebCore::determineDispatchBehavior): Moved EventDispatchBehavior-determining logic into a helper function, also added a check to keep selectstart events inside of the shadow DOM. (WebCore::Node::dispatchGenericEvent): Changed to use the helper function. 2011-01-11 Viatcheslav Ostapenko Reviewed by Eric Seidel. [Qt] Provide plugin coordinates to windowless plugins on Symbian. https://bugs.webkit.org/show_bug.cgi?id=52213 * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginView::setNPWindowIfNeeded): 2011-01-10 Zhenyao Mo Reviewed by Kenneth Russell. Need to consider UNPACK_ALIGNMENT in GraphicsContext3D::texImage2DResourceSafe https://bugs.webkit.org/show_bug.cgi?id=52068 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::copyTexImage2D): Use computeImageSizeInBytes. (WebCore::WebGLRenderingContext::copyTexSubImage2D): Ditto. (WebCore::WebGLRenderingContext::readPixels): Ditto, and fix a bug on generating the wrong error. (WebCore::WebGLRenderingContext::texImage2DBase): Ditto. (WebCore::WebGLRenderingContext::validateTexFuncData): Use computeImageSizeInBytes. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::texImage2DResourceSafe): Add a new parameter alignment. (WebCore::GraphicsContext3D::computeFormatAndTypeParameters): Add more supported format/type. (WebCore::GraphicsContext3D::computeImageSizeInBytes): Added. * platform/graphics/GraphicsContext3D.h: 2011-01-10 Enrica Casucci Reviewed by Alexey Proskuryakov. Paste and drag and drop use different code paths to interact with the pasteboard. https://bugs.webkit.org/show_bug.cgi?id=52093 The change consists in a refactoring of the code to have only one class that deals with the pasteboard on Mac. No new tests. A test is already available for this (editing/pasteboard/drag-image-to-contenteditable-in-iframe.html) but had incorrect results. * WebCore.exp.in: * loader/EmptyClients.h: Added two Mac only methods to call into WebKit to use functionality that is in NSURLExtras. (WebCore::EmptyEditorClient::canonicalizeURL): (WebCore::EmptyEditorClient::canonicalizeURLString): * page/DragController.cpp: The following methods have been changed to pass a pointer to the Frame object to the DragData class. (WebCore::documentFragmentFromDragData): (WebCore::DragController::performDrag): (WebCore::DragController::dispatchTextInputEventFor): (WebCore::DragController::concludeEditDrag): * page/EditorClient.h: Added two Mac only methods to call into WebKit to use functionality that is in NSURLExtras. The following files have been modified to pass the Frame object to the DragData method calls. * page/chromium/DragControllerChromium.cpp: (WebCore::DragController::dragOperation): * page/gtk/DragControllerGtk.cpp: (WebCore::DragController::dragOperation): * page/mac/DragControllerMac.mm: (WebCore::DragController::dragOperation): * page/qt/DragControllerQt.cpp: (WebCore::DragController::dragOperation): * page/win/DragControllerWin.cpp: (WebCore::DragController::dragOperation): * platform/DragData.h: Removed Mac specific constructor and reference to PasteboardHelper class. * platform/Pasteboard.h: Added public constructor to create a Pasteboard object from an NSPasteboard. The following files were all modified to match the new parameters of the methods listed. * platform/android/DragDataAndroid.cpp: (WebCore::DragData::asPlainText): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asPlainText): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::asFragment): * platform/gtk/DragDataGtk.cpp: (WebCore::DragData::asPlainText): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): * platform/haiku/DragDataHaiku.cpp: (WebCore::DragData::asPlainText): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): * platform/mac/DragDataMac.mm: (WebCore::DragData::DragData): (WebCore::DragData::asPlainText): (WebCore::insertablePasteboardTypes): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::getBestURL): (WebCore::Pasteboard::asURL): * platform/qt/DragDataQt.cpp: (WebCore::DragData::asPlainText): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): * platform/win/DragDataWin.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asPlainText): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::asFragment): * platform/wince/DragDataWinCE.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asPlainText): (WebCore::DragData::asFragment): * platform/wx/DragDataWx.cpp: (WebCore::DragData::asPlainText): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): 2011-01-11 Abhishek Arya Reviewed by Dimitri Glazkov. RefPtr text node in setOuterText since calling appendData on a text node can fire away dom event listener which might remove the text node from underneath. https://bugs.webkit.org/show_bug.cgi?id=52163 Test: fast/dom/text-node-append-data-remove-crash.html * html/HTMLElement.cpp: (WebCore::HTMLElement::setOuterText): 2011-01-11 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Add support for element https://bugs.webkit.org/show_bug.cgi?id=48713 * GNUmakefile.am: Enable meter element. 2011-01-11 Csaba Osztrogonác Unreviewed buildfix. [Qt][V8] Add missing include for debug build. * loader/cache/CachedResourceLoader.cpp: 2011-01-11 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: redirects are lost from the network panel upon navigation. https://bugs.webkit.org/show_bug.cgi?id=52210 * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.didCommitLoadForFrame): 2011-01-11 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] Remove uses of QFuture since it isn't supported on all platforms. https://bugs.webkit.org/show_bug.cgi?id=51204 * platform/network/qt/QtNAMThreadSafeProxy.cpp: (WebCore::QtNAMThreadSafeProxy::QtNAMThreadSafeProxy): (WebCore::QtNAMThreadSafeProxy::localCookiesForUrl): (WebCore::QtNAMThreadSafeProxy::localWillLoadFromCache): * platform/network/qt/QtNAMThreadSafeProxy.h: (WebCore::QtNAMThreadSafeProxy::cookiesForUrl): (WebCore::QtNAMThreadSafeProxy::willLoadFromCache): 2011-01-11 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: recreate script view after live edit. https://bugs.webkit.org/show_bug.cgi?id=51751 * inspector/front-end/Script.js: (WebInspector.Script.prototype.set source): * inspector/front-end/ScriptView.js: (WebInspector.ScriptView): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback): (WebInspector.ScriptsPanel.prototype.editScriptSource): (WebInspector.ScriptsPanel.prototype.viewRecreated): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._doEditLine): 2011-01-11 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: frameDetachedFromParent notification handler is missing in NetworkManager. https://bugs.webkit.org/show_bug.cgi?id=52205 * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.frameDetachedFromParent): 2011-01-11 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: "Audit present state" always disabled https://bugs.webkit.org/show_bug.cgi?id=52199 Removed all traces of resource tracking checks, as we have it no more. * English.lproj/localizedStrings.js: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView.prototype._createLauncherUI): * inspector/front-end/AuditsPanel.js: 2011-01-11 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: move delayed search implementation to SourceFrame. https://bugs.webkit.org/show_bug.cgi?id=51753 * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._createViewerIfNeeded): (WebInspector.SourceFrame.prototype.findSearchMatches): (WebInspector.SourceFrame.prototype.cancelFindSearchMatches): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.hide): (WebInspector.SourceView.prototype.searchCanceled): (WebInspector.SourceView.prototype.performSearch.didFindSearchMatches): (WebInspector.SourceView.prototype.performSearch): 2011-01-11 Ilya Tikhonovsky Reviewed by Pavel Feldman. Web Inspector: innerFirstChild has a side effect which should be called explicitly. If a node is a frame's owner then innerFirstChild method subscribes DOMAgent instance to the frame's doc's events. I think this should be done explicitly when we meet with the node for the first time. As I understand it happens in buildArrayForContainerChildren method. https://bugs.webkit.org/show_bug.cgi?id=52204 * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::startListeningFrameDoc): (WebCore::InspectorDOMAgent::buildArrayForContainerChildren): (WebCore::InspectorDOMAgent::innerFirstChild): * inspector/InspectorDOMAgent.h: 2011-01-11 Adam Roben Delete WKCACFLayer.{cpp,h} These have been unused since r75262 * platform/graphics/win/WKCACFLayer.cpp: Removed. * platform/graphics/win/WKCACFLayer.h: Removed. 2011-01-11 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: [regression] Cookies view does not allow columns resize. https://bugs.webkit.org/show_bug.cgi?id=51877 * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._updateWithCookies): 2011-01-11 Noel Gordon Reviewed by James Robinson. [chromium] canvas.toDataURL("image/jpeg") should composite onto black. https://bugs.webkit.org/show_bug.cgi?id=51237 The Canvas specification requires that the canvas image is composited using the Porter-Duff operator source-over onto a black background; the resultant image should be JPEG encoded and returned as a dataURL. To composite image A and background B, for any Porter-Duff operator, produce pixels I with I = c(A)F(A) + c(B)F(B) where, F(X) is the fraction [0.0-1.0] contributed to the composite by image X, and c(X) are the premultiplied RGB color components of image X. Note by definition, c(B) = 0 since the background is black, so I = c(A)F(A). Since F(A) = 1 in Porter-Duff operator source-over, the composited pixels satisfy I = c(A). Hence, to conform to the Canvas spec, pass the premultiplied RGB color components of the canvas image to the JPEG encoder. Covered by canvas/philip/tests/toDataURL.jpeg.alpha.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::preMultipliedBGRAtoRGB): Use Porter-Duff source-over black. 2011-01-11 Pavel Feldman Reviewed by Yury Semikhatsky. Chromium DevTools: get rid of APU-related code in WebKit/chromium. https://bugs.webkit.org/show_bug.cgi?id=52152 * inspector/InspectorController.cpp: (WebCore::InspectorController::restoreInspectorStateFromCookie): (WebCore::InspectorController::setInjectedScriptSource): * inspector/InspectorState.cpp: (WebCore::InspectorState::InspectorState): * inspector/InspectorState.h: * inspector/front-end/inspector.js: 2011-01-11 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: [REGRESSION] Load timing is requested for all resources (not only for the main one). https://bugs.webkit.org/show_bug.cgi?id=51749 * inspector/InspectorController.cpp: (WebCore::InspectorController::willSendRequest): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): 2011-01-11 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] GRefPtr should not be used with Gtk widgets https://bugs.webkit.org/show_bug.cgi?id=51241 GRefPtr breaks the widget life-cycle, the main problem is that GRefPtr calls g_object_unref() when it's destroyed, which is undesirable for widgets. In gtk+ widgets are created with a floating reference and when added to a container, the container takes the ownership of the widget consuming the floating reference. So you don't usually need to call g_object_ref/unref on widgets (only for some operations like reparent a widget) and toplevel widgets are destroyed with gtk_widget_destroy(). * platform/ContextMenuItem.h: * platform/gtk/ContextMenuGtk.cpp: (WebCore::ContextMenu::ContextMenu): (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::setPlatformDescription): * platform/gtk/ContextMenuItemGtk.cpp: (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::releasePlatformDescription): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::title): (WebCore::ContextMenuItem::setTitle): (WebCore::ContextMenuItem::platformSubMenu): (WebCore::ContextMenuItem::setSubMenu): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::setEnabled): 2010-10-10 David Hyatt Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=51119, transformed elements not responding properly to :hover after r73385. Just use the entire document area as the hit test area, since there appears to be a rounding bug/issues with relying on float math when mapping the hit test area into transformed coordinates. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): 2011-01-10 Stephen White Reviewed by James Robinson. Fix canvas->canvas draws on the GPU path. https://bugs.webkit.org/show_bug.cgi?id=52141 Two problems: according to the canvas spec, both source and destination rects can have negative width or height, but this shouldn't cause the image to be flipped. So we need to normalize the rects (in the software path, this is done by BitmapImage*::draw). Secondly, in the FBO->FBO path, the image needs to be flipped vertically, since it is drawn upside down. We were doing this by flipping the destination rect, but this doesn't work if the source rect is not the entire image, since we extract the wrong part of the image. Fixed by flipping the source rect instead (and flipping it within the image buffer's height, not the source rect's height). Covered by fast/canvas/drawImage-with-negative-source-destination.html. * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Put normalizeRect() in global scope. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::draw): Fix as above: normalize both source and dest rects, and flip the source rect instead of the dest rect. * platform/graphics/skia/ImageSkia.cpp: (WebCore::normalizeRect): Put normalizeRect() in global scope. 2011-01-10 Laszlo Gombos Reviewed by Csaba Osztrogonác. [Qt] Baseline qt_minimal configuration https://bugs.webkit.org/show_bug.cgi?id=51313 No new tests as there is no new functionality. * platform/graphics/qt/GraphicsLayerQt.cpp: Fix the location of the QT_NO_ANIMATION guard. * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::applyDelta): Fix the location of the QT_NO_WHEELEVENT guard. 2011-01-10 Joe Mason Reviewed by Alexey Proskuryakov. WebSockets: unbounded buffer growth when server sends bad data https://bugs.webkit.org/show_bug.cgi?id=51253 Fail a websocket handshake after 1024 bytes without a newline, or if it contains a null byte before the first newline. Tests: http/tests/websocket/tests/handshake-fail-by-maxlength.html http/tests/websocket/tests/handshake-fail-by-prepended-null.html * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::readStatusLine): 2011-01-10 Adam Barth Reviewed by Darin Adler. Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs https://bugs.webkit.org/show_bug.cgi?id=50182 This patch adds the basic plumbing for display-isolated URL schemes. Originally, this patch also had the functional change, but I've split that off into a separate patch because the original patch caused a performance regression. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canDisplay): * platform/SchemeRegistry.cpp: (WebCore::displayIsolatedURLSchemes): (WebCore::SchemeRegistry::registerURLSchemeAsLocal): (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal): (WebCore::SchemeRegistry::localSchemes): (WebCore::SchemeRegistry::deprecatedShouldTreatURLAsLocal): (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): (WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated): (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): * platform/SchemeRegistry.h: 2011-01-10 Jer Noble Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=52095 REGRESSION (r75277): 2 test cases (<1%) had incorrect layout Fixes tests: fullscreen/full-screen-remove-ancestor.html fullscreen/full-screen-remove.html Previously, the above tests were failing because DRT dumped the contents of their