2013-03-14 Chris Fleizach AX: Crash when removing aria-menu item from DOM https://bugs.webkit.org/show_bug.cgi?id=112396 Reviewed by Tim Horton. Prevent nil access to items in the ARIA menu flow when deleting objects from the DOM. Test: accessibility/menu-item-crash.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::siblingWithAriaRole): (WebCore::AccessibilityNodeObject::menuButtonForMenu): 2013-03-14 Hayato Ito [Shadow]: left side of ::-webkit-distributed selector not working as expected https://bugs.webkit.org/show_bug.cgi?id=110825 Reviewed by Dimitri Glazkov. Make functional pseudo distributed elements work even when a left side element has specifiers. Test: fast/dom/shadow/distributed-pseudo-element-specifiers-in-left-side.html * css/CSSParser.cpp: (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Make it call rewriteSpecifiersForShadowDistributed() if required. (WebCore::CSSParser::rewriteSpecifiersWithElementName): Updated so that it can generate a correct chain of CSSParserSelectors even when '::distributed()' is used with an element, which might be empty, with specifiers. e.g. When parsing a selector of 'content.content-class::-webkit-distributed(div)', the following happens: 1. rewriteSpecifiersWithElementName(...) is called with: elementName is: "content" specifiers is: [.content-class] -> [::-webkit-distributed] 2. Looking for a distributed pseudo element in the specifiers and found it at the end of tagHistory chain of the specifiers. 3. The result of calling specifiers->prependTagSelector(tag) is: specifiers is: [content] -> [.content-class] -> [::-webkit-distributed] 4. rewriteSpecifiersForShadowDistributed() is called with: specifiers is: [content] -> [.content-class] -> [::-webkit-distributed] distributedPseudoElementSelector is: [::-webkit-distributed] 5. An argumentSelector of the distributedPseudoElementSelector is: argumentSelector is: [div] 6. Remove the distributed pseudo element selector from the specifiers. specifiers is: [content] -> [.content-class] Note that one pseudo-element may appear per complex selector and the pseudo-element may appear only if the subject of the selector is the last compound selector in the selector. 7. Append specifiers to the end of the argument selector with a relation of ShadowDistributed: argumentSelector is: [div] -(ShadowDistributed)-> [content] -> [.content-class] 8. Returns the argument selector as a return value. (WebCore::CSSParser::rewriteSpecifiersForShadowDistributed): As explained. * css/CSSParserValues.cpp: (WebCore): (WebCore::CSSParserSelector::findDistributedPseudoElementSelector): * css/CSSParserValues.h: (CSSParserSelector): (WebCore::CSSParserSelector::clearTagHistory): 2013-03-14 Takashi Sakamoto Crash at CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement reported by fuzzer https://bugs.webkit.org/show_bug.cgi?id=112328 Reviewed by Dimitri Glazkov. ensureDefaultStyleSheets should check whether page() is null or not. Test: fast/css/ensure-default-style-sheets-crash.xhtml * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement): 2013-03-14 Brandon Jones Check to ensure MultisampleRenderbuffer creation succeeds https://bugs.webkit.org/show_bug.cgi?id=111780 Reviewed by Kenneth Russell. On OSX systems using AMD graphics chips the allocation of large Multisample Renderbuffers in Chromium would fail without any indication of failure. Attempting to draw to the buffer resulted in garbage being rendered onscreen. This could be reproduced by opening a full-page WebGL app and pressing (Command + "-") several times. This patch adds an additional check during DrawingBuffer resize to verify that the resized buffer is valid. * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore): (WebCore::DrawingBuffer::checkBufferIntegrity): (WebCore::DrawingBuffer::reset): * platform/graphics/gpu/DrawingBuffer.h: (DrawingBuffer): 2013-03-14 Enrica Casucci Character orientation should follow UTR50 specs for vertical layout. https://bugs.webkit.org/show_bug.cgi?id=112213 Reviewed by Ryosuke Niwa. platform/mac/fast/text/vertical-no-sideways.html: Modified to cover samples of the additional character ranges that should not be rotated in vertical layout. Added pixel results. This patch modifies shouldIgnoreRotation to include all the characters that should not be rotated sideways in vertical layout according to the UTR50 draft 6 specifications. It also fixes rotation for Emojii. * platform/graphics/FontFastPath.cpp: (WebCore::shouldIgnoreRotation): (WebCore::isInRange): Added. * platform/graphics/mac/FontMac.mm: (WebCore::showGlyphsWithAdvances): Adds the proper transforms to ensure Emojii also are drawn correctly upright. 2013-03-14 Manuel Rego Casasnovas Add selectTrailingWhitespaceEnabled setting to WebCore::Page https://bugs.webkit.org/show_bug.cgi?id=109404 Reviewed by Tony Chang. Covered by editing/selection/doubleclick-inline-first-last-contenteditable.html. * page/Settings.cpp: (WebCore): Configure default value for smartInsertDeleteEnabled and selectTrailingWhitespaceEnabled seetings as they are different in Chromium port depending on the OS. * page/Settings.in: Add new setting. 2013-03-14 Robert Flack [chromium] Short scrollbar has empty track rect even when buttons have no size. https://bugs.webkit.org/show_bug.cgi?id=102580 Reviewed by James Robinson. When computing the scrollbar track rect, don't assume the button's height is the track width. Test: platform/chromium/scrollbars/short-scrollbar.html Note however that this doesn't expose the bug on any tested platforms and mock scrollbars don't use ScrollbarThemeChromium.cpp. Manually running this test on linux chromiumos will show the now present scrollbar track and thumb. * platform/chromium/ScrollbarThemeChromium.cpp: (WebCore::ScrollbarThemeChromium::trackRect): 2013-03-14 Andrey Lushnikov Web Inspector: Show syntax highlight for application/javascript in Resource Preview tab https://bugs.webkit.org/show_bug.cgi?id=112355 Reviewed by Pavel Feldman. No new tests. Return canonical mimeType in requestContent method of NetworkRequest.js * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest.prototype.requestContent): 2013-03-14 Jesus Sanchez-Palencia [EFL] Use CROSS_PLATFORM_CONTEXT_MENU https://bugs.webkit.org/show_bug.cgi?id=111877 Reviewed by Caio Marcelo de Oliveira Filho. Now EFL uses the CROSS_PLATFORM_CONTEXT_MENUS USE flag. This flag provides a full cross-platform representation of a ContextMenu and a ContextMenuItem. The embedder can then decide how to show this and neither WebCore nor WebCore/platform need to know any platform specific code about the menus, even though they could. No new tests needed, no behavior changes. * platform/ContextMenu.h: (ContextMenu): * platform/ContextMenuItem.h: (WebCore): * platform/PlatformMenuDescription.h: (WebCore): * platform/efl/ContextMenuEfl.cpp: (WebCore::ContextMenu::ContextMenu): (WebCore::ContextMenu::getContextMenuItems): (WebCore::ContextMenu::createPlatformContextMenuFromItems): (WebCore::ContextMenu::platformContextMenu): * platform/efl/ContextMenuItemEfl.cpp: (WebCore::ContextMenuItem::platformContextMenuItem): 2013-03-14 Julien Chaffraix [CSS Grid Layout] resolveContentBasedTrackSizingFunctions should iterate over the grid items not the grid tracks https://bugs.webkit.org/show_bug.cgi?id=112299 Reviewed by Tony Chang. Our initial implementation would iterate over the grid tracks. This was equivalent as no items were spanning but once grid items spans, they start to contribute to several grid tracks differently. This change aligns our code with what the specification does. One upside of doing a grid items' iteration is that the complexity should be better in all cases as we don't do a full grid walking (which is potentially quadratic), only some extra grid tracks' iteration (which are linear). Refactoring, there should be no change in behavior. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Moved the |availableLogicalSpace| update into resolveContentBasedTrackSizingFunctions. This simplifies and consolidate our handling. (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions): Updated the core loop to iterator over grid items and not grid tracks. This idea is that now resolveContentBasedTrackSizingFunctionsForItems uses a filtering function to only process the appropriate grid tracks. (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): Updated to filter the grid tracks here (this matches the |TracksForGrowth| spec logic that is merely a filtering function). * rendering/RenderGrid.h: Added a new typedef and updated resolveContentBasedTrackSizingFunctionsForItems to use it. * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Added the following filtering function, which matches the values from |TracksForGrowth| in the specification. 2013-03-14 Alberto Garcia [BlackBerry] Gradient: don't use the default setPlatformGradientSpaceTransform() https://bugs.webkit.org/show_bug.cgi?id=112246 Reviewed by Xan Lopez. BlackBerry has its own implementation. * platform/graphics/Gradient.cpp: (WebCore): 2013-03-14 Xabier Rodriguez Calvar [GStreamer] simulateAudioInterruption needs to be guarded by ENABLE(VIDEO)" https://bugs.webkit.org/show_bug.cgi?id=112358 Guarded with ENABLE(VIDEO) to prevent problems when it is not enabled. Reviewed by Philippe Normand. 2013-03-12 Florin Malita Tighten up the type bounds for SVGPropertyInfo callback parameters https://bugs.webkit.org/show_bug.cgi?id=111786 Reviewed by Philip Rogers. Update SVGPropertyInfo's callbacks to pass SVGElement* parameters instead of void*. This allows us to perform some ASSERT-based type checking before downcasting in implementors. To avoid adding virtual methods unused in release builds to the base class (and overrides in descendants), for subtypes lacking polymorphic type markers (isXXX()) the check is performed using hasTagName() instead. The patch is also removing the lookupOrCreateWrapperForAnimatedProperty() SVGPropertyInfo callback for SVGViewSpec properties, because a) it doesn't appear to be reachable (SVGViewSpec doesn't have a backing element and thus cannot have an associated animator) b) it interferes with the parameter specialization described above (SVGViewSpec does not inherit from SVGElement) No new tests, refactoring only. * svg/SVGElement.cpp: (WebCore::SVGElement::synchronizeRequiredFeatures): (WebCore::SVGElement::synchronizeRequiredExtensions): (WebCore::SVGElement::synchronizeSystemLanguage): * svg/SVGElement.h: (SVGElement): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::synchronizeOrientType): (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper): * svg/SVGMarkerElement.h: (SVGMarkerElement): (WebCore::toSVGMarkerElement): (WebCore): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::lookupOrCreateDWrapper): (WebCore::SVGPathElement::synchronizeD): * svg/SVGPathElement.h: (SVGPathElement): (WebCore::toSVGPathElement): (WebCore): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::synchronizePoints): (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): * svg/SVGPolyElement.h: (SVGPolyElement): (WebCore::toSVGPolyElement): (WebCore): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::synchronizeTextLength): (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper): * svg/SVGTextContentElement.h: (SVGTextContentElement): (WebCore::toSVGTextContentElement): (WebCore): Change SVGPropertyInfo callback params to SVGElement* and replace static casts with conversion wrappers. Implement conversion wrappers where needed. * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::viewBoxPropertyInfo): (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo): (WebCore::SVGViewSpec::transformPropertyInfo): (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): * svg/SVGViewSpec.h: (SVGViewSpec): Remove SVGPropertyInfo-based lookupOrCreate* callbacks and updated the methods' parameters to SVGViewSpec*. Remove now-unneeded casts. * svg/properties/SVGAnimatedPropertyMacros.h: (WebCore): * svg/properties/SVGPropertyInfo.h: (WebCore): (SVGPropertyInfo): Update callback declarations. 2013-03-14 Jesus Sanchez-Palencia Move platform-specific typedefs to PlatformMenuDescription.h https://bugs.webkit.org/show_bug.cgi?id=111876 Reviewed by Caio Marcelo de Oliveira Filho. Cross platform Context Menu platform-specific typedefs fit better in PlatformMenuDescription.h and should not be part of the classes ContextMenu and ContextMenuItem. We have also renamed them to PlatformContextMenu and PlatformContextMenuItem instead of NativeMenu and NativeMenuItem respectively. No new tests needed since no behavior has changed. * platform/ContextMenu.h: (ContextMenu): * platform/ContextMenuItem.h: (ContextMenuItem): * platform/PlatformMenuDescription.h: (WebCore): * platform/efl/ContextMenuEfl.cpp: (WebCore::ContextMenu::createPlatformContextMenuFromItems): (WebCore::ContextMenu::platformContextMenu): * platform/efl/ContextMenuItemEfl.cpp: (WebCore::ContextMenuItem::platformContextMenuItem): * platform/win/ContextMenuItemWin.cpp: (WebCore): (WebCore::ContextMenuItem::platformContextMenuItem): * platform/win/ContextMenuWin.cpp: (WebCore::ContextMenu::createPlatformContextMenuFromItems): (WebCore::ContextMenu::platformContextMenu): 2013-03-11 Jer Noble Crash in DumpRenderTree at com.apple.WebCore: WebCore::CaptionUserPreferences::captionPreferencesChanged + 185 https://bugs.webkit.org/show_bug.cgi?id=112051 Reviewed by Eric Carlson. No new tests; fixes a crash during media/video-controls-captions-trackmenu.html. Instead of relying on a registration system which can fail when an element's document does not have a page, Elements will register for captionPreferencesChanged() notifications directly with their owning Document. CaptionUserPreferences, in turn, will notify all Documents in its PageGroup, rather than only directly registered listeners. * dom/Document.cpp: (WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Added. Notify the CaptionUserPreferences that someone is interested in captionPreferencesChanged notfications. (WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Added. (WebCore::Document::captionPreferencesChanged): Added. Pass to all registered elements. * dom/Document.h: * dom/Element.h: (WebCore::Element::captionPreferencesChanged): Added. Empty; intended to be overridden by subclasses. * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): Initialize m_needsCaptionPreferenceChanged member. (WebCore::CachedPage::restore): Call captionPreferencesChanged() if necessary. * history/CachedPage.h: (WebCore::CachedPage::markForCaptionPreferencesChanged): Set the m_needsCaptionPreferenceChanged member. * history/PageCache.cpp: (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Pass to every CachedPage. * history/PageCache.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Register with the Document. (WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister with same. (WebCore::HTMLMediaElement::attach): Remove previous registration call. * html/HTMLMediaElement.h: * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the PageGroup. * page/CaptionUserPreferences.h: (WebCore::CaptionUserPreferences::setInterestedInCaptionPreferenceChanges): Empty; intended to be overridden by subclasses. * page/CaptionUserPreferencesMac.h: * page/CaptionUserPreferencesMac.mm: (WebCore::CaptionUserPreferencesMac::setInterestedInCaptionPreferenceChanges): Renamed from registerForPreferencesChangedCallbacks(). (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Replace call to havePreferenceChangeListeners() with m_listeningForPreferenceChanges. * page/Page.cpp: (WebCore::Page::captionPreferencesChanged): Pass to every contained Document. * page/Page.h: * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the PageGroup. * page/CaptionUserPreferences.h: * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferencesChanged): Pass to every page, as well as pages in the PageCache. * page/PageGroup.h: 2013-03-14 David Grogan IndexedDB: Histogram leveldb open errors. https://bugs.webkit.org/show_bug.cgi?id=112307 Reviewed by Tony Chang. No new tests, I don't know if there's a good way to test histograms. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::open): 2013-03-14 Robert Hogan REGRESSION(r145305) Performance: 1.3% mac-release-10.6-webkit-latest/intl2/times/t change after rev 145300 https://bugs.webkit.org/show_bug.cgi?id=112125 Reviewed by Julien Chaffraix. When detecting cases where a loaded image may need to move up into the padding created by the row's baseline we don't need to do anything if the row doesn't have a baseline yet. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::layout): 2013-03-14 Brady Eidson Add a mode to ResourceLoader that takes SharedBuffers instead of raw pointers and lengths. and https://bugs.webkit.org/show_bug.cgi?id=112310 Reviewed by Andy Estes. No new tests (No independently testable change in behavior). Many of the tested platforms deliver data buffers to their ResourceHandles from objects that encapsulate a data buffer such as NSData (Mac), CFDataRef (CF), or QByteArray (qt). If those platforms also augmented SharedBuffer to wrap their native object (which Mac/CF do) and there existed ResourceLoader callbacks to take that SharedBuffer instead of char* + length, then many resource loads could avoid a useless copy. At least on Mac, there are some extremely important behind-the-scenes optimizations for NS/CFData that will be a more important win than simply avoiding a copy. This patch adds that SharedBuffer-based callback with the hope that all platforms could find a way to use a buffer-encapsulating object going forward, and we could therefore deprecate the char* + length version of didReceiveData. * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didReceiveBuffer): Add a didReceiveBuffer callback that takes a SharedBuffer object. The default implementation passes raw bytes + length to didReceiveData. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::addDataOrBuffer): Replacing addData(), optionally adding the data from either a data+length or SharedBuffer (WebCore::ResourceLoader::didReceiveData): Pipe to didReceiveDataOrBuffer. (WebCore::ResourceLoader::didReceiveBuffer): Pipe to didReceiveDataOrBuffer. (WebCore::ResourceLoader::didReceiveDataOrBuffer): Single chokepoint for receiving data. * loader/ResourceLoader.h: Add OVERRIDE to all of the ResourceHandleClient methods to help catch future mistakes. Remove "virtual" from methods that didn't need it. Make "addData" into "addDataOrBuffer" and make it private. * loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::didReceiveData): Pipe to didReceiveDataOrBuffer. (WebCore::NetscapePlugInStreamLoader::didReceiveBuffer): Pipe to didReceiveDataOrBuffer. (WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer): Single chokepoint for receiving data. * loader/NetscapePlugInStreamLoader.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveData): Pipe to didReceiveDataOrBuffer. (WebCore::SubresourceLoader::didReceiveBuffer): Pipe to didReceiveDataOrBuffer. (WebCore::SubresourceLoader::didReceiveDataOrBuffer): Single chokepoint for receiving data. Also, rely on ResourceLoader's base implementation for notifying the ResourceLoadNotifier. * loader/SubresourceLoader.h: * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::append): Add a mode that appends a SharedBuffer. * loader/ResourceBuffer.h: * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::maybeTransferPlatformData): Fix a bug where appending data to a CFData-backed SharedBuffer would re-enter maybeTransferPlatformData and blow out the stack. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): Send a wrapped NSData to didReceiveBuffer() instead of sending its char* and length to didReceiveData() 2013-03-14 Yury Semikhatsky Web Inspector: nuke bottom up CPU profile calculation on backend https://bugs.webkit.org/show_bug.cgi?id=112351 Reviewed by Pavel Feldman. Removed code that builds bottom-up CPU profile on the inspector backend. Bottom-up view is already built on the front-end from the top-down profile data. * bindings/js/ScriptProfile.cpp: * bindings/js/ScriptProfile.h: (ScriptProfile): * bindings/v8/ScriptProfile.cpp: (WebCore::ScriptProfile::buildInspectorObjectForHead): * bindings/v8/ScriptProfile.h: (ScriptProfile): * inspector/Inspector.json: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getCPUProfile): 2013-03-14 Abhishek Arya Replace static_casts with to* helper functions. https://bugs.webkit.org/show_bug.cgi?id=112296 Reviewed by Kentaro Hara. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * accessibility/AXObjectCache.cpp: (WebCore::nodeHasRole): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::hasAttribute): (WebCore::AccessibilityObject::getAttribute): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::anchorElement): (WebCore::AccessibilityRenderObject::helpText): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): (WebCore::AccessibilityRenderObject::accessKey): (WebCore::AccessibilityRenderObject::setElementAttributeValue): (WebCore::AccessibilityRenderObject::setValue): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): (WebCore::AccessibilityRenderObject::inheritsPresentationalRole): (WebCore::AccessibilityRenderObject::setAccessibleName): (WebCore::AccessibilityRenderObject::stringRoleForMSAA): * bindings/gobject/WebKitDOMBinding.cpp: (WebKit::createWrapper): * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::setDragImage): * bindings/js/JSElementCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/JSNodeCustom.cpp: (WebCore::createWrapperInline): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::setDragImageMethodCustom): * bindings/v8/custom/V8ElementCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::wrap): * dom/Document.cpp: (WebCore::Document::importNode): (WebCore::Document::recalcStyle): (WebCore::Document::setFocusedNode): (WebCore::Document::updateFocusAppearanceTimerFired): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): * dom/Element.cpp: (WebCore::Element::offsetParent): (WebCore::Element::boundsInRootViewSpace): (WebCore::Element::getBoundingClientRect): (WebCore::Element::recalcStyle): (WebCore::Element::computeInheritedLanguage): (WebCore::Element::lastElementChild): * dom/LiveNodeList.cpp: (WebCore::LiveNodeList::namedItem): * dom/Node.cpp: (WebCore::Node::dumpStatistics): (WebCore::Node::normalize): (WebCore::Node::rootEditableElement): (WebCore::Node::isDefaultNamespace): (WebCore::Node::ancestorElement): (WebCore::appendAttributeDesc): * dom/Position.cpp: (WebCore::Position::element): * dom/Range.cpp: (WebCore::Range::getBorderAndTextQuads): * dom/SelectorQuery.cpp: (WebCore::SelectorDataList::queryFirst): (WebCore::SelectorDataList::execute): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcStyle): * dom/StaticHashSetNodeList.cpp: (WebCore::StaticHashSetNodeList::namedItem): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical): (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): * editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToBodyElement): * editing/FrameSelection.cpp: (WebCore::removingNodeRemovesPosition): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::entityMaskForText): (WebCore::MarkupAccumulator::appendStartMarkup): (WebCore::MarkupAccumulator::appendEndMarkup): * editing/ModifySelectionListLevel.cpp: (WebCore::IncreaseSelectionListLevelCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::haveSameTagName): (WebCore::handleStyleSpansBeforeInsertion): (WebCore::ReplaceSelectionCommand::doApply): * editing/SplitTextNodeContainingElementCommand.cpp: (WebCore::SplitTextNodeContainingElementCommand::doApply): * editing/TextIterator.cpp: (WebCore::TextIterator::advance): * editing/htmlediting.cpp: (WebCore::unsplittableElementForPosition): (WebCore::enclosingTableCell): * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::wrapWithNode): (WebCore::createMarkupInternal): (WebCore::createFragmentFromMarkupWithContext): (WebCore::isPlainTextMarkup): (WebCore::createFragmentFromText): * html/HTMLElement.cpp: (WebCore::HTMLElement::insertAdjacentElement): (WebCore::contextElementForInsertion): * html/HTMLFormControlElement.cpp: (WebCore::focusPostAttach): (WebCore::updateFromElementCallback): * html/HTMLFormElement.cpp: (WebCore::submitElementFromEvent): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateDocNamedItem): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addRange): * html/parser/HTMLTreeBuilder.cpp: (WebCore::closestFormAncestor): * html/shadow/MediaControlElementTypes.cpp: (WebCore::toParentMediaElement): * html/shadow/TextFieldDecorationElement.h: (WebCore::toTextFieldDecorationElement): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::didInvalidateStyleAttr): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::inlineStyleSheetText): * mathml/MathMLElement.h: (WebCore::toMathMLElement): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * page/DragController.cpp: (WebCore::elementUnderMouse): (WebCore::DragController::startDrag): * page/FocusController.cpp: (WebCore::FocusController::advanceFocusInDocumentOrder): * page/Frame.cpp: (WebCore::Frame::searchForLabelsBeforeElement): * page/FrameView.cpp: (WebCore::FrameView::updateWidget): * page/SpatialNavigation.cpp: (WebCore::rectToAbsoluteCoordinates): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): (WebCore::KeyframeAnimation::sendAnimationEvent): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintMediaFullscreenButton): (WebCore::RenderThemeEfl::paintMediaMuteButton): * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::buildReferenceFilter): * rendering/svg/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calcViewport): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): * svg/SVGUseElement.cpp: (WebCore::isDisallowedElement): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::buildPendingResource): * xml/XPathStep.cpp: (WebCore::XPath::nodeMatchesBasicTest): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::parseEndElement): 2013-03-14 Pavel Feldman Web Inspector: keep deprecated function stubs in InspectorFrontendHost. https://bugs.webkit.org/show_bug.cgi?id=112347 Reviewed by Vsevolod Vlasov. In order to open older front-ends in newer hosts, we need to keep stubs for deprecated functions. Longer term, we need to wrap all calls to InspectorFrontendHost in the front-end. * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::canInspectWorkers): (WebCore): (WebCore::InspectorFrontendHost::hiddenPanels): * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: 2013-03-14 Vladislav Kaznacheev Fixed styles pane visibility when docked to right. https://bugs.webkit.org/show_bug.cgi?id=112348 Reviewed by Pavel Feldman. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._splitVertically): * inspector/front-end/SidebarPane.js: (WebInspector.SidebarPane.prototype.setExpandCallback): (WebInspector.SidebarPaneTitle): (WebInspector.SidebarTabbedPane.prototype.addPane): 2013-03-14 Alberto Garcia [BlackBerry] GraphicsContext3D: implement ImageExtractor::extractImage() https://bugs.webkit.org/show_bug.cgi?id=112242 Reviewed by Rob Buis. In r136282 GraphicsContext3D::getImageData() was refactored in a new class called ImageExtractor. This patch implements the necessary changes for the BlackBerry port, which is still using the old API. * platform/graphics/GraphicsContext3D.h: (ImageExtractor): * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor): (WebCore): (WebCore::GraphicsContext3D::ImageExtractor::extractImage): 2013-03-14 Xabier Rodriguez Calvar [GStreamer] Stopping playback of html5 media when receiving a higher priority audio event needs implementation https://bugs.webkit.org/show_bug.cgi?id=91611 React to REQUEST_STATE GStreamer message to stop the pipeline when a higher priority stream is played. When this happens, states are updated accordingly. A method was added in the MediaPlayer class and internals to allow the the test runner to simulate an audio interruption. Reviewed by Philippe Normand. Test: media/media-higher-prio-audio-stream.html * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayer.cpp: (WebCore): (MediaPlayer): (WebCore::MediaPlayer::simulateAudioInterruption): New method delegating an audio interruption to the private backend to simulate the use-case where an external application needs exclusive access to the audio device. * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): (WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption): Added default empty method in the common private header. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore): (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): (WebCore::setAudioStreamPropertiesCallback): Hooked to child-added signal on the audio sink, delegates on setAudioStreamProperties. (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Sets the audio stream properties. (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initializes the new attribute. (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnects autoaudiosink signal. (WebCore::MediaPlayerPrivateGStreamer::changePipelineState): Changed logging. (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Reacting to the REQUEST_STATE message. (WebCore::MediaPlayerPrivateGStreamer::simulateAudioInterruption): Added. Injects the REQUEST_STATE message to the pipeline. (WebCore::MediaPlayerPrivateGStreamer::updateStates): Updating the playback state if REQUEST_STATE. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): Added new method and attribute. * testing/Internals.h: * testing/Internals.idl: * testing/Internals.cpp: (WebCore): (WebCore::Internals::simulateAudioInterruption): Added to call the method to stop the element because of a higher prio stream at the tests. 2013-03-14 Allan Sandfeld Jensen [Qt] Add support for tiled shadow blur https://bugs.webkit.org/show_bug.cgi?id=90082 Reviewed by Noam Rosenthal. Use the optimized ShadowBlur::drawRectShadow as long as we do not have a rotating transform. Such a transform would go through the slow path in ShadowBlur anyway, and would end up using a transformed TransparencyLayer with an alphaMap which causes scaling artifacts for us. Tested by fast/canvas/canvas-scale-fillRect-shadow.html and fast/canvas/canvas-transforms-fillRect-shadow.html * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawInsetShadowWithTiling): Handle scaling transforms when shadows ignore transforms. (WebCore::ShadowBlur::drawRectShadowWithTiling): Ditto. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2013-03-12 Andrey Kosyakov Web Inspector: do not aggregate non-main thread timeline events, handle them in a generic fashion https://bugs.webkit.org/show_bug.cgi?id=112172 Reviewed by Vsevolod Vlasov. - build nested event trees for non-main thread events similar to how it's done on the main thread; - drop aggregation logic for Rasterize events; - extract time conversion logic so that it may be reused in TimelineTraceEventProcessor. * English.lproj/localizedStrings.js: drive-by: drop duplicate line. * inspector/InspectorTimelineAgent.cpp: (WebCore::TimelineTimeConverter::reset): (WebCore): (WebCore::InspectorTimelineAgent::pushGCEventRecords): (WebCore::InspectorTimelineAgent::start): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::appendRecord): (WebCore::InspectorTimelineAgent::sendEvent): (WebCore::InspectorTimelineAgent::timestamp): * inspector/InspectorTimelineAgent.h: (TimelineTimeConverter): (WebCore::TimelineTimeConverter::TimelineTimeConverter): (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): (WebCore): (InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::timeConverter): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createBackgroundRecord): (WebCore): * inspector/TimelineRecordFactory.h: (TimelineRecordFactory): * inspector/TimelineTraceEventProcessor.cpp: (WebCore::TimelineRecordStack::TimelineRecordStack): (WebCore): (WebCore::TimelineRecordStack::addScopedRecord): (WebCore::TimelineRecordStack::closeScopedRecord): (WebCore::TimelineRecordStack::addInstantRecord): (WebCore::TimelineRecordStack::isOpenRecordOfType): (WebCore::TimelineRecordStack::send): (WebCore::TimelineTraceEventProcessor::TimelineTraceEventProcessor): (WebCore::TimelineTraceEventProcessor::onBeginFrame): (WebCore::TimelineTraceEventProcessor::onRasterTaskBegin): (WebCore::TimelineTraceEventProcessor::onRasterTaskEnd): (WebCore::TimelineTraceEventProcessor::createRecord): * inspector/TimelineTraceEventProcessor.h: (TimelineRecordStack): (WebCore::TimelineRecordStack::Entry::Entry): (Entry): (WebCore::TimelineRecordStack::TimelineRecordStack): (WebCore): (WebCore::TimelineTraceEventProcessor::TimelineThreadState::TimelineThreadState): (TimelineThreadState): (TimelineTraceEventProcessor): (WebCore::TimelineTraceEventProcessor::TraceEvent::TraceEvent): (WebCore::TimelineTraceEventProcessor::TraceEvent::isNull): (WebCore::TimelineTraceEventProcessor::threadState): 2013-03-14 Xan Lopez [GTK] Wrong ASSERT in AudioDestinationGstreamer::stop https://bugs.webkit.org/show_bug.cgi?id=112344 Reviewed by Philippe Normand. Correct erroneous ASSERT, we want both member variables to exist. * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestinationGStreamer::stop): 2013-03-14 Ilya Tikhonovsky Web Inspector: Flame Chart. Support scroll and zoom with help of mouse wheel. https://bugs.webkit.org/show_bug.cgi?id=112337 Reviewed by Yury Semikhatsky. New member variable _xOffset were introduced. * inspector/front-end/FlameChart.js: (WebInspector.FlameChart): (WebInspector.FlameChart.prototype._onMouseMove): (WebInspector.FlameChart.prototype._adjustXOffset): (WebInspector.FlameChart.prototype._adjustXScale): (WebInspector.FlameChart.prototype._onMouseWheel): (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): (WebInspector.FlameChart.prototype.onResize): (WebInspector.FlameChart.prototype.draw): (WebInspector.FlameChart.prototype._scheduleUpdate): (WebInspector.FlameChart.prototype.update): 2013-03-14 No'am Rosenthal [Texmap] Synchronize layers only if the layer has been changed. https://bugs.webkit.org/show_bug.cgi?id=112095 Reviewed by Allan Sandfeld Jensen. A regression was introduced in r144787, causing an infinite IPC commitState/renderNextFrame loop. This patch fixes this by making sure we only commit layer states that have actual pending changes. No new tests, this is an optimization. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: (CoordinatedGraphicsLayerState): (WebCore::CoordinatedGraphicsLayerState::hasPendingChanges): 2013-03-14 Simon Hausmann [Qt] Improve the handling of mock geolocation, device orientation and motion clients Reviewed by Tor Arne Vestbø. The mock versions of these web facing features should be instantiated when running in DumpRenderTree only. In order for them to work, no extra Qt modules such as QtLocation are actually needed. This patch decouples enabling device orientation/motion and geolocation from the underlying Qt modules and makes them available in developer builds (!production_build) and backed by mock backends when running in drt. So if the Qt 5 modules are available, they'll be used (unless drtRun). For developers the web facing features are always enabled (although requests will time out) and the mock backends are enabled inside DRT, allowing for the layout tests to run with less dependencies. In addition this also enables the mock device motion client, which was previously never instantiated. * Target.pri: * WebCore.pri: 2013-03-14 Allan Sandfeld Jensen [TexMap] Painting into area of composited tile not cleared https://bugs.webkit.org/show_bug.cgi?id=112268 Reviewed by Kenneth Rohde Christiansen. Clip painting to the area that has been cleared, so we do not accidentally overpaint other areas. Can be observed in ManualTests/scrollbars/scrollbars-in-composited-layers.html. * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): 2013-03-14 Marja Hölttä [V8] Store main world and non-main world templates separately. https://bugs.webkit.org/show_bug.cgi?id=111724 Reviewed by Jochen Eisinger. This is needed for generating specialized bindings for the main world (bug 110874). No new tests (updated existing bindings tests). * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateDomainSafeFunctionGetter): (GenerateNormalAttrSetter): (GenerateParametersCheckExpression): (GenerateParametersCheck): (GenerateImplementation): (JSValueToNative): (CreateCustomSignature): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::Float64ArrayV8Internal::fooMethod): (WebCore::ConfigureV8Float64ArrayTemplate): (WebCore::V8Float64Array::GetTemplate): (WebCore::V8Float64Array::HasInstance): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionMethod): (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): (WebCore::ConfigureV8TestActiveDOMObjectTemplate): (WebCore::V8TestActiveDOMObject::GetTemplate): (WebCore::V8TestActiveDOMObject::HasInstance): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::GetTemplate): (WebCore::V8TestCustomNamedGetter::HasInstance): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::GetTemplate): (WebCore::V8TestEventConstructor::HasInstance): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::dispatchEventMethod): (WebCore::ConfigureV8TestEventTargetTemplate): (WebCore::V8TestEventTarget::GetTemplate): (WebCore::V8TestEventTarget::HasInstance): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore::V8TestException::GetTemplate): (WebCore::V8TestException::HasInstance): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetter): (WebCore::TestInterfaceV8Internal::supplementalMethod2Method): (WebCore::ConfigureV8TestInterfaceTemplate): (WebCore::V8TestInterface::GetTemplate): (WebCore::V8TestInterface::HasInstance): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::GetTemplate): (WebCore::V8TestMediaQueryListListener::HasInstance): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::GetTemplate): (WebCore::V8TestNamedConstructor::HasInstance): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::GetTemplate): (WebCore::V8TestNode::HasInstance): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::testObjAttrAttrSetter): (WebCore::TestObjV8Internal::XMLObjAttrAttrSetter): (WebCore::TestObjV8Internal::typedArrayAttrAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter): (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter): (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter): (WebCore::TestObjV8Internal::mutablePointAttrSetter): (WebCore::TestObjV8Internal::immutablePointAttrSetter): (WebCore::TestObjV8Internal::voidMethodWithArgsMethod): (WebCore::TestObjV8Internal::longMethodWithArgsMethod): (WebCore::TestObjV8Internal::objMethodWithArgsMethod): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod): (WebCore::TestObjV8Internal::overloadedMethod1Method): (WebCore::TestObjV8Internal::overloadedMethod2Method): (WebCore::TestObjV8Internal::overloadedMethod8Method): (WebCore::TestObjV8Internal::overloadedMethodMethod): (WebCore::TestObjV8Internal::convert1Method): (WebCore::TestObjV8Internal::convert2Method): (WebCore::TestObjV8Internal::convert4Method): (WebCore::TestObjV8Internal::convert5Method): (WebCore::TestObjV8Internal::variadicNodeMethodMethod): (WebCore::ConfigureV8TestObjTemplate): (WebCore::V8TestObj::GetTemplate): (WebCore::V8TestObj::HasInstance): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::TestOverloadedConstructorsV8Internal::constructor1): (WebCore::TestOverloadedConstructorsV8Internal::constructor2): (WebCore::TestOverloadedConstructorsV8Internal::constructor3): (WebCore::TestOverloadedConstructorsV8Internal::constructor): (WebCore::V8TestOverloadedConstructors::GetTemplate): (WebCore::V8TestOverloadedConstructors::HasInstance): * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: (V8TestOverloadedConstructors): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::GetTemplate): (WebCore::V8TestSerializedScriptValueInterface::HasInstance): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::TestTypedefsV8Internal::funcMethod): (WebCore::ConfigureV8TestTypedefsTemplate): (WebCore::V8TestTypedefs::GetTemplate): (WebCore::V8TestTypedefs::HasInstance): * bindings/scripts/test/V8/V8TestTypedefs.h: (V8TestTypedefs): * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::visitNodeWrappers): * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8AdaptorFunction.cpp: (WebCore::V8AdaptorFunction::getTemplate): * bindings/v8/V8Binding.cpp: (WebCore::toDOMStringList): (WebCore::toXPathNSResolver): * bindings/v8/V8Binding.h: (WebCore): (WebCore::toRefPtrNativeArray): * bindings/v8/V8Collection.cpp: (WebCore::toOptionsCollectionSetter): * bindings/v8/V8GCController.cpp: * bindings/v8/V8NPObject.cpp: (WebCore::npObjectInvokeImpl): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::reportMemoryUsage): (WebCore::V8PerIsolateData::hasPrivateTemplate): (WebCore::V8PerIsolateData::privateTemplate): (WebCore::V8PerIsolateData::rawTemplate): (WebCore::V8PerIsolateData::hasInstance): * bindings/v8/V8PerIsolateData.h: (WebCore::V8PerIsolateData::rawTemplateMap): (V8PerIsolateData): (WebCore::V8PerIsolateData::templateMap): * bindings/v8/V8Utilities.cpp: (WebCore::extractTransferables): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCustom): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toCanvasStyle): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::setDragImageMethodCustom): * bindings/v8/custom/V8CryptoCustom.cpp: (WebCore::V8Crypto::getRandomValuesMethodCustom): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCustom): (WebCore::V8DOMFormData::appendMethodCustom): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCustom): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::evaluateMethodCustom): * bindings/v8/custom/V8HTMLMediaElementCustom.cpp: (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::addMethodCustom): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::removeElement): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionMethodCustom): (WebCore::V8InjectedScriptHost::typeMethodCustom): (WebCore::V8InjectedScriptHost::getEventListenersMethodCustom): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeMethodCustom): (WebCore::V8Node::replaceChildMethodCustom): (WebCore::V8Node::removeChildMethodCustom): (WebCore::V8Node::appendChildMethodCustom): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::opaqueRootForGC): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toWebGLUniformLocation): (WebCore::V8WebGLRenderingContext::getAttachedShadersMethodCustom): (WebCore::V8WebGLRenderingContext::getProgramParameterMethodCustom): (WebCore::V8WebGLRenderingContext::getShaderParameterMethodCustom): (WebCore::V8WebGLRenderingContext::getUniformMethodCustom): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::isDocumentType): (WebCore::V8XMLHttpRequest::sendMethodCustom): 2013-03-14 Mike West Explicitly send only one report via XSSAuditorDelegate. https://bugs.webkit.org/show_bug.cgi?id=111964 Reviewed by Adam Barth. This patch pulls the XSSAuditor report generation out into a separate function in XSSAuditorDelegate::generateViolationReport, and moves the call to that function into the "have we already notified folks about violations on this page?" block. This both clarifies the flow in XSSAuditorDelegate::didBlockScript, and ensures that only one violation report will be sent per page, which regressed in r145695. Existing tests verify that reports are generated and sent correctly. We have no tests for the latter condition: the XSSAuditor tests currently verify that a report showed up, but they can't verify that no report appeared without sitting around for a few more than a few seconds on every run. * html/parser/XSSAuditorDelegate.cpp: (WebCore::XSSAuditorDelegate::generateViolationReport): Pull the report generation logic out to this new function. (WebCore::XSSAuditorDelegate::didBlockScript): Move the report generation call into the block that ensures it only executes for the first violation. 2013-03-14 Sergio Villar Senin Empty list items after drag&drop in contentEditable divs https://bugs.webkit.org/show_bug.cgi?id=110610 Reviewed by Ryosuke Niwa. Perform a cleanup after moving operations. This will mainly prune extra placeholders left by the editing algorithms. Also do not leave empty
  • when moving them around inside a list element. Tests: editing/pasteboard/cleanup-on-move.html editing/pasteboard/drag-list-item.html * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): perform cleanupAfterDeletion(). * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::insertAsListItems): do not insert an empty list item. * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::insertAsListItems): 2013-03-14 Eric Seidel Threaded HTML Parser should limit speculation to avoid using too much memory https://bugs.webkit.org/show_bug.cgi?id=112069 Reviewed by Adam Barth. This is a speculative fix for memory issues seen in: https://code.google.com/p/chromium/issues/detail?id=180819 This also fixed https://bugs.webkit.org/show_bug.cgi?id=110546 as a side-effect of simplifying the m_currentChunk handling. We now tell the background html parser every time we start a chunk on the main thread (instead of end), which greatly simplified the checkpoint cleanup code from: https://trac.webkit.org/changeset/145277 The cost for this is now we have more messages going to the background thread (and postTask acquires a lock to write to the message queue). Chromium has more advanced (lock-less) primatives for message posting, which we'll hopefully add to WebKit in furture patches. The outstanding chunks limit has not been tuned. But it makes sense that we should not keeping infinite speculative tokens around for large documents with slow-to-load scripts. * html/parser/BackgroundHTMLInputStream.cpp: (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream): (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsBefore): (WebCore): (WebCore::BackgroundHTMLInputStream::rewindTo): * html/parser/BackgroundHTMLInputStream.h: (BackgroundHTMLInputStream): (WebCore::BackgroundHTMLInputStream::outstandingCheckpointCount): (Checkpoint): (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull): (WebCore::BackgroundHTMLInputStream::Checkpoint::clear): * html/parser/BackgroundHTMLParser.cpp: (WebCore): (WebCore::BackgroundHTMLParser::startedChunkWithCheckpoint): (WebCore::BackgroundHTMLParser::pumpTokenizer): * html/parser/BackgroundHTMLParser.h: (BackgroundHTMLParser): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::validateSpeculations): (WebCore::HTMLDocumentParser::discardSpeculationsAndResumeFrom): (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser): (WebCore::HTMLDocumentParser::pumpPendingSpeculations): (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): * html/parser/HTMLDocumentParser.h: (HTMLDocumentParser): 2013-03-14 Ilya Tikhonovsky Web Inspector: Flame Chart. Minor changes for the popover. https://bugs.webkit.org/show_bug.cgi?id=112331 Reviewed by Yury Semikhatsky. popover timeout needs to be decreased a bit. hidePopover call in onMouseMove doesn't necessary. We have to keep anchor element unmodified if the hovered item didn't changed. * inspector/front-end/FlameChart.js: (WebInspector.FlameChart): (WebInspector.FlameChart.prototype._onMouseMove): 2013-03-14 Jonathan Liu Fix detection of Intel Mac OS X platform on Intel Mac 64-bit https://bugs.webkit.org/show_bug.cgi?id=112312 Reviewed by Simon Hausmann. * platform/gtk/UserAgentGtk.cpp: (WebCore::platformVersionForUAString): 2013-03-13 Ilya Tikhonovsky Web Inspector: Flame Chart. Rewrite drawing procedure for better performance. https://bugs.webkit.org/show_bug.cgi?id=112264 Reviewed by Yury Semikhatsky. I traverses the profile tree in calculateTimelineData and calculates all the sizes and colors. Later in draw code we lineary pass the array and draw items. Also we could easily swap to another format of the profile. * inspector/front-end/FlameChart.js: (WebInspector.FlameChart): (WebInspector.FlameChart.prototype._nodeCount): (WebInspector.FlameChart.prototype._calculateTimelineData.appendReversedArray): (WebInspector.FlameChart.prototype._calculateTimelineData): (WebInspector.FlameChart.prototype._getPopoverAnchor): (WebInspector.FlameChart.prototype._showPopover): (WebInspector.FlameChart.prototype._hidePopover): (WebInspector.FlameChart.prototype._onClick): (WebInspector.FlameChart.prototype._onMouseMove): (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): (WebInspector.FlameChart.prototype.onResize): (WebInspector.FlameChart.prototype.draw): 2013-03-14 Alice Liu Add to HistoryItem a way to know if its underlying CachedPage has expired. https://bugs.webkit.org/show_bug.cgi?id=110652 Reviewed by Brady Eidson. * WebCore.exp.in: Added WebCore::HistoryItem::isInPageCache and hasCachedPageExpired. * history/CachedPage.cpp: Add a data member, m_expirationTime, and a function, hasExpired(). * history/CachedPage.h: * history/HistoryItem.cpp: (WebCore::HistoryItem::hasCachedPageExpired): Added. returns m_cachedPage's expiration state. * history/HistoryItem.h: * history/PageCache.cpp: (WebCore::PageCache::get): Address the fixme about not using WebKitBackForwardCacheExpirationIntervalKey. * page/Settings.in: Add backForwardCacheExpirationInterval to the automatically generated setters for Settings. 2013-03-13 Ryosuke Niwa Cannot select a canvas element at the beginning or the end of a document https://bugs.webkit.org/show_bug.cgi?id=112319 Reviewed by Eric Seidel. The bug was caused by the editing code treating canvas element as if an empty inline element. Treat it as an "atomic" element for the purpose of determining whether selection can have an end point in it or not. Test: editing/pasteboard/copy-paste-content-starting-and-ending-canvas.html * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::canContainRangeEndPoint): Added. 2013-03-13 Kunihiko Sakamoto Implement FontLoader interface https://bugs.webkit.org/show_bug.cgi?id=98395 Reviewed by Eric Seidel. This patch implements the FontLoader interface defined in CSS Font Load Events Module Level 3.[1] It adds fontloader attribute to Document, and adds two interfaces, FontLoader and CSSFontFaceLoadEvent to WebCore. [1]: http://dev.w3.org/csswg/css-font-load-events-3/ This feature is guarded by FONT_LOAD_EVENTS compiler flag and RuntimeEnabledFeatures::fontLoadEventsEnabled() runtime flag. Tests: fast/css/fontloader-download-error.html fast/css/fontloader-events.html fast/css/fontloader-loadingdone.html fast/css/fontloader-multiple-faces-download-error.html fast/css/fontloader-multiple-faces.html fast/css/fontloader-multiple-families.html http/tests/webfont/fontloader-loading-attribute.html * CMakeLists.txt: Adding FontLoader/CSSFontFaceLoadEvent files. * DerivedSources.cpp: Ditto. * DerivedSources.make: Ditto. * DerivedSources.pri: Ditto. * GNUmakefile.list.am: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.vcxproj/WebCore.vcxproj: Ditto. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Add convertValue() for CSSFontFaceRule, DOMError, and VoidCallback. * bindings/js/JSDictionary.h: Ditto. * bindings/v8/Dictionary.cpp: Add get() for CSSFontFaceRule, DOMError, and VoidCallback. (WebCore::Dictionary::get): * bindings/v8/Dictionary.h: Ditto. (Dictionary): * css/CSSFontFace.cpp: Notifies FontLoader as load progresses. (WebCore::CSSFontFace::fontLoaded): (WebCore::CSSFontFace::getFontData): (WebCore::CSSFontFace::notifyFontLoader): (WebCore::CSSFontFace::notifyLoadingDone): * css/CSSFontFace.h: Add two member variables. m_rule stores CSSFontFaceRule for the fontface. m_loadState holds current state of the fontface in terms of FontLoader. (WebCore::CSSFontFace::create): Takes additional parameter of type CSSFontFaceRule. (WebCore::CSSFontFace::loadState): (WebCore::CSSFontFace::CSSFontFace): * css/CSSFontFaceLoadEvent.cpp: Added. (WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent): (WebCore::CSSFontFaceLoadEvent::~CSSFontFaceLoadEvent): (WebCore::CSSFontFaceLoadEvent::interfaceName): * css/CSSFontFaceLoadEvent.h: Added. (CSSFontFaceLoadEventInit): (CSSFontFaceLoadEvent): (WebCore::CSSFontFaceLoadEvent::create): (WebCore::CSSFontFaceLoadEvent::createForFontFaceRule): (WebCore::CSSFontFaceLoadEvent::createForError): (WebCore::CSSFontFaceLoadEvent::fontface): (WebCore::CSSFontFaceLoadEvent::error): * css/CSSFontFaceLoadEvent.idl: Added. * css/CSSFontFaceRule.idl: Add JSGenerateToJSObject and JSGenerateToNativeObject as JSC binding needs them. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::isDecodeError): Added. (WebCore::CSSFontFaceSource::ensureFontData): Added. * css/CSSFontFaceSource.h: (CSSFontFaceSource): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Pass a CSSFontFaceRule to CSSFontFace::create(). (WebCore::CSSFontSelector::getFontData): Moved logic for creating a CSSSegmentedFontFace to a helper function getFontFace(). (WebCore::CSSFontSelector::getFontFace): Added. * css/CSSFontSelector.h: * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::fontLoaded): Fires callbacks when load is completed. (WebCore::CSSSegmentedFontFace::isLoading): Returns true if any fonts are still loading. (WebCore::CSSSegmentedFontFace::checkFont): Returns true if all fonts are loaded. (WebCore::CSSSegmentedFontFace::loadFont): Starts load by calling getFontData(). * css/CSSSegmentedFontFace.h: (CSSSegmentedFontFace): Declares new functions and a vector to store callbacks. (LoadFontCallback): (WebCore::CSSSegmentedFontFace::LoadFontCallback::~LoadFontCallback): * css/FontLoader.cpp: Added. (LoadFontCallback): Holds callback functions of FontLoader.loadFont(). (WebCore::LoadFontCallback::create): (WebCore::LoadFontCallback::createFromParams): (WebCore::LoadFontCallback::LoadFontCallback): (WebCore::LoadFontCallback::notifyLoaded): (WebCore::LoadFontCallback::notifyError): (WebCore::FontLoader::FontLoader): (WebCore::FontLoader::~FontLoader): (WebCore::FontLoader::eventTargetData): (WebCore::FontLoader::ensureEventTargetData): (WebCore::FontLoader::interfaceName): (WebCore::FontLoader::scriptExecutionContext): (WebCore::FontLoader::didLayout): Fires pending events and callbacks. This is called when layout have completed. (WebCore::FontLoader::scheduleEvent): Defers event dispatching until layout completes. (WebCore::FontLoader::firePendingEvents): Dispatches pending events. (WebCore::FontLoader::beginFontLoading): Schedules loading/loadstart events. This is called from CSSFontFace. (WebCore::FontLoader::fontLoaded): Schedules load/loadingdone events. This is called from CSSFontFace. (WebCore::FontLoader::loadError): Schedules error/loadingdone events. This is called from CSSFontFace. (WebCore::FontLoader::notifyWhenFontsReady): Implements fontloader.notifyWhenFontsReady(). (WebCore::FontLoader::loadingDone): Fires callbacks of notifyWhenFontsReady. (WebCore::FontLoader::loadFont): Implements fontloader.loadFont(). (WebCore::FontLoader::checkFont): Implements fontloader.checkFont(). (WebCore::FontLoader::resolveFontStyle): Parses the given font parameter using the syntax of CSS 'font' property and creates Font object. The logic is taken from CanvasRenderingContext2D::setFont(). * css/FontLoader.h: Added. (FontLoader): (WebCore::FontLoader::create): (WebCore::FontLoader::loading): (WebCore::FontLoader::document): (WebCore::FontLoader::refEventTarget): (WebCore::FontLoader::derefEventTarget): * css/FontLoader.idl: Added. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::fontloader): Added. * dom/Document.h: (Document): Add m_fontloader and fontloader(). * dom/Document.idl: Add fontloader attribute. * dom/EventNames.h: Add loading and loadingdone events. * dom/EventNames.in: Add CSSFontFaceLoadEvent. * dom/EventTargetFactory.in: Add FontLoader. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): Calls FontLoader::didLayout(). 2013-03-13 Antti Koivisto Compute image background size when testing for background visibility https://bugs.webkit.org/show_bug.cgi?id=112313 Reviewed by Simon Fraser. We can catch more cases where background is fully obscured. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBackground): Use early returns. (WebCore::RenderBox::backgroundPaintedExtent): Compute the bounds for image backgrounds. (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect): (WebCore::RenderBox::backgroundIsKnownToBeObscured): Rename to make clear that the answers are certain to one direction only. * rendering/RenderBox.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground): (WebCore::RenderImage::backgroundIsKnownToBeObscured): * rendering/RenderImage.h: 2013-03-13 Bruno de Oliveira Abinader [css3-text] Add support for text-decoration-color https://bugs.webkit.org/show_bug.cgi?id=91638 Reviewed by Julien Chaffraix. This patch implements the CSS3's 'text-decoration-color' property, with '-webkit' vendor prefix. More info about "text-decoration-color" property can be found here: http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-color-property Mozilla implementation (using -moz prefix) is described here: https://developer.mozilla.org/en/CSS/text-decoration-color Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color.html fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-color.html fast/css3-text/css3-text-decoration/text-decoration-color.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isColorPropertyID): (WebCore::CSSParser::parseValue): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): Added parsing checks for '-webkit-text-decoration-color' property. * css/CSSPropertyNames.in: Added '-webkit-text-decoration-color' property name. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Set property handler for '-webkit-text-decoration-color'. * css/StyleResolver.cpp: (WebCore::isValidVisitedLinkProperty): (WebCore::StyleResolver::applyProperty): Added switch case checks for text-decoration-color property on visited link checks and property appliance. * rendering/RenderObject.cpp: (WebCore::decorationColor): The newly added property needs to checked here when selecting the text decoration color. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): (WebCore::RenderStyle::colorIncludingFallback): (WebCore::RenderStyle::visitedDependentColor): There is no proper way to check if a property has been set or not, so if text decoration color fallbacks to default color, it would override the check for 'text-fill-color' and 'text-stroke-color' properties on WebCore::decorationColor() static function, changing current behavior, which can be verified by new failing layout tests (ie. fast/text/stroking-decorations.html). * rendering/style/RenderStyle.h: Added {non-}visited text decoration color getters and setters. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): Added {non-}visited text decoration color variables initialization to copy constructor and operator assignment functions. * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): Added here as this property is not used regularly. 2013-03-13 Rik Cabanier create runtime flags for CSS Compositing https://bugs.webkit.org/show_bug.cgi?id=111818 Reviewed by Ryosuke Niwa. No new tests, no change in functionality. Added a runtime flags that enables CSS compositing * WebCore.exp.in: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled): (WebCore::RuntimeEnabledFeatures::cssCompositingEnabled): * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::isValidKeywordPropertyAndValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFillProperty): (WebCore::CSSParser::cssCompositingEnabled): (WebCore): * css/CSSParser.h: * css/CSSParserMode.h: (CSSParserContext): * dom/Document.cpp: (WebCore::Document::cssCompositingEnabled): (WebCore): * dom/Document.h: (Document): 2013-03-11 Kinuko Yasuda Quota API: Update IDL to make it match the latest WD https://bugs.webkit.org/show_bug.cgi?id=88396 Reviewed by Adam Barth. Add a new interface object (navigator.StorageQuota) and deprecate the old one (window.StorageInfo) to make the code match with the latest Quota API WD: http://www.w3.org/TR/quota-api/ Tests: storage/storagequota-query-usage.html storage/storagequota-request-quota.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Modules/quota/DOMWindowQuota.cpp: (WebCore::DOMWindowQuota::webkitStorageInfo): Added a deprecate warning message for the old interface. * Modules/quota/NavigatorStorageQuota.cpp: Added for the new interface. * Modules/quota/NavigatorStorageQuota.h: Added for the new interface. * Modules/quota/NavigatorStorageQuota.idl: Added for the new interface. * Modules/quota/StorageErrorCallback.cpp: (WebCore::StorageErrorCallback::CallbackTask::CallbackTask): (WebCore::StorageErrorCallback::CallbackTask::performTask): * Modules/quota/StorageErrorCallback.h: Renamed from Source/WebCore/Modules/quota/StorageInfoErrorCallback.h. (WebCore): (StorageErrorCallback): (WebCore::StorageErrorCallback::~StorageErrorCallback): (WebCore::StorageErrorCallback::CallbackTask::create): * Modules/quota/StorageErrorCallback.idl: Renamed from Source/WebCore/Modules/quota/StorageInfoErrorCallback.idl. * Modules/quota/StorageInfo.cpp: Added code to relay requests to the new StorageQuota implementation. * Modules/quota/StorageInfo.h: * Modules/quota/StorageInfo.idl: * Modules/quota/StorageQuota.cpp: Added for the new interface. * Modules/quota/StorageQuota.h: (WebCore::StorageQuota::create): * Modules/quota/StorageQuota.idl: Copied from Source/WebCore/Modules/quota/StorageInfo.idl. * Modules/quota/StorageQuotaCallback.h: Renamed from Source/WebCore/Modules/quota/StorageInfoQuotaCallback.h. * Modules/quota/StorageQuotaCallback.idl: Renamed from Source/WebCore/Modules/quota/StorageInfoQuotaCallback.idl. * Modules/quota/StorageUsageCallback.h: Renamed from Source/WebCore/Modules/quota/StorageInfoUsageCallback.h. * Modules/quota/StorageUsageCallback.idl: Renamed from Source/WebCore/Modules/quota/StorageInfoUsageCallback.idl. * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * page/FeatureObserver.h: 2013-03-13 Ryosuke Niwa Unreviewed. Sort the Xcode project file. * WebCore.xcodeproj/project.pbxproj: 2013-03-13 Rafael Weinstein [HTMLTemplateElement] EOF should unwind the stack of template insertion modes iteratively https://bugs.webkit.org/show_bug.cgi?id=111907 Reviewed by Adam Barth. No behavioral changes. This patch only aligns our parser implementation with the present spec. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processTemplateEndTag): (WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents): (WebCore::HTMLTreeBuilder::processEndOfFile): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): 2013-03-13 Michael Nordman FileSystem mods: Changes to snapshot file creation to reduce dependencies on blob URLs. Adding a new minimal BlobDataHandle class which will be reimplemented/built upon in later CLs. In this patch, it's just enough to refactor the FileSystem code to not function in terms of blobURLs. https://bugs.webkit.org/show_bug.cgi?id=108851 Reviewed by Adam Barth. No new tests. This is strictly a refactoring of the existing code. * Modules/filesystem/DOMFileSystem.cpp: (WebCore): (WebCore::DOMFileSystem::createFile): * Modules/filesystem/DOMFileSystemSync.cpp: (WebCore): * platform/AsyncFileSystemCallbacks.h: (AsyncFileSystemCallbacks): (WebCore::AsyncFileSystemCallbacks::didCreateSnapshotFile): * platform/gtk/AsyncFileSystemGtk.cpp: (WebCore::AsyncFileSystemGtk::createSnapshotFileAndReadMetadata): (WebCore): * platform/network/BlobData.cpp: (WebCore): (WebCore::BlobDataHandle::BlobDataHandle): (WebCore::BlobDataHandle::~BlobDataHandle): * platform/network/BlobData.h: (WebCore): (BlobDataHandle): (WebCore::BlobDataHandle::create): 2013-03-13 Ryosuke Niwa Threaded HTML Parser is missing feature define flags in all but Chromium port's build files https://bugs.webkit.org/show_bug.cgi?id=112277 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: 2013-03-13 Marja Hölttä [V8] Get rid of more function-level static FunctionTemplates and ObjectTemplates in bindings https://bugs.webkit.org/show_bug.cgi?id=112262 Reviewed by Jochen Eisinger. In the future we'll create and store function templates for main world and non-main worlds separately (see bug 111724), having function templates and object templates as static variables inside functions will break the functionality. No new tests (no changes in functionality yet; existing bindings tests still pass). * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateImplementation): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::createContext): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::hasPrivateTemplate): (WebCore): * bindings/v8/V8PerIsolateData.h: (V8PerIsolateData): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::wrapInShadowObject): 2013-03-13 Julien Chaffraix [CSS Grid Layout] Refactor GridCoordinate to hold GridSpans https://bugs.webkit.org/show_bug.cgi?id=112211 Reviewed by Tony Chang. In order to bring more spanning knowledge to RenderGrid without having duplicated GridSpan resolution, it became needed to store them into GridCoordinate. Note that this change is needed as we can only resolve all the positions with enough context in one place: when we place the item in the grid. Refactoring, no change in behavior expected. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated to create 2 GridSpans. Also fixed a style violation (PassOwnPtr as local member, not sure why it wasn't caught earlier). (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::findChildLogicalPosition): Updated the original function after GridCoordinate internal representation change. (WebCore::RenderGrid::insertItemIntoGrid): Ditto. Also added a new overloaded function that does resolution after auto-placement. (WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Removed the extra GridSpan computation, which was wrong. * rendering/RenderGrid.h: (WebCore::RenderGrid::GridCoordinate::GridCoordinate): Updated GridCoordinate to hold 2 GridSpan. Also removed the 2 position constructor (it would have been a hazard), replaced by a 2 GridSpan constructor. 2013-03-13 Jochen Eisinger Also don't log error messages from the GraphicsContext3D if webGLErrorsToConsoleEnabled is false https://bugs.webkit.org/show_bug.cgi?id=112284 Reviewed by Adam Barth. When running layout tests in content_shell, we end up logging more information. Since webGLErrorsToConsoleEnabled is false during layout tests, this change makes sure we match the baselines. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContextErrorMessageCallback::onErrorMessage): 2013-03-13 David Grogan IndexedDB: Record attemps to open a path with non-ascii characters https://bugs.webkit.org/show_bug.cgi?id=112224 Reviewed by Tony Chang. We want to see if that's correlated with errors on open. No new tests, there's no way to test histogramming that I know of. I ran chrome locally with a non ascii path though. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::IDBBackingStore::open): 2013-03-13 Julien Chaffraix [CSS Grid Layout] Handle min-width / max-width on the grid element https://bugs.webkit.org/show_bug.cgi?id=112269 Reviewed by Ojan Vafai. Test: fast/css-grid-layout/grid-element-min-max-width.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::GridIterator::GridIterator): Added some sanity checks that the starting indexes are in the grid. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Updated the code to use m_grid to iterate: this is the correct way to go as it will handle implicit rows / columns properly. Added a comment about the current way being inefficient and incorrect with spanning grid items. (WebCore::RenderGrid::computePreferredLogicalWidths): Updated the comments. (WebCore::RenderGrid::gridTrackSize): * rendering/RenderGrid.h: Constified gridTrackSize. 2013-03-13 Simon Hausmann [Qt] Prospective trivial build fix after r145744 Add missing closing parentheses. * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parseDtd): 2013-03-13 Brady Eidson Account for review feedback in https://bugs.webkit.org/show_bug.cgi?id=112279 that I'd mistakenly left out of my commit. * loader/ResourceLoaderTypes.h: 2013-03-13 Abhishek Arya Crash in CompositeEditCommand::insertNodeAt. https://bugs.webkit.org/show_bug.cgi?id=112280 Reviewed by Ryosuke Niwa. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertNodeAt): Fix incorrect cast use of toElement. Subsitute with toContainerNode. 2013-03-13 Brady Eidson Small ResourceLoader cleanups. https://bugs.webkit.org/show_bug.cgi?id=112279 Reviewed by Geoff Garen. No new tests (Refactor with no behavior change). 1 - Add "OVERRIDE" to virtual methods in subclasses of ResourceLoader to catch future mistakes. 2 - Replace the "bool allAtOnce" flag with a descriptive enum to make reading code easier. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired): * loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::didReceiveData): * loader/NetscapePlugInStreamLoader.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::addData): (WebCore::ResourceLoader::didReceiveData): * loader/ResourceLoader.h: * loader/ResourceLoaderTypes.h: Added. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveData): * loader/SubresourceLoader.h: 2013-03-13 Nate Chapin chromium's WebFrameTest.ReplaceNavigationAfterHistoryNavigation failing after r145734 https://bugs.webkit.org/show_bug.cgi?id=112281 Reviewed by Adam Barth. Fixes the aforementioned chromiun webkit_unit_test * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): FrameLoader::isReplacing() is not quite synonymous with loading multipart content. Check that it's actually loading multipart before doing multipart-specific things. 2013-03-13 Tao Bai Add the default video poster if it doesn't exist in video tag https://bugs.webkit.org/show_bug.cgi?id=110263 Reviewed by Eric Carlson. Tests: media/video-default-poster.html media/video-no-default-poster.html The Android web view application could provide the default poster for a video that doesn't have the poster attribute. To provide the default poster, the application must set defaultVideoPosterURL setting and return the image in the response of that URL. The way to do this would be: A) Replace the Element::imageSourceAttributeName function with an Element::imageSourceURL function that returns the imageSourceURL as a const AtomicString&. The body will be the same as before, it will just also include a call to getAttribute. Also will need to revise the four classes that override that function. B) Add a new HTMLVideoElement::posterImageURL function that implements the default poster URL logic. C) Update the four functions that get the poster attribute to handle poster loading and display to call posterImageURL. 1) HTMLVideoElement::imageSourceURL. 2) HTMLVideoElement::setDisplayMode. 3) HTMLVideoElement::updateDisplayState. 4) HTMLMediaElement::getPluginProxyParams. Will need to cast to HTMLVideoElement after checking isVideo. * dom/Element.cpp: (WebCore::Element::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL() * dom/Element.h: Replace imageSourceAttributeName() with imageSourceURL() * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL() * html/HTMLEmbedElement.h: Replace imageSourceAttributeName() with imageSourceURL() * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::getPluginProxyParams): Change to use posterImageURL * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL() * html/HTMLObjectElement.h: Replace imageSourceAttributeName with imageSourceURL * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::HTMLVideoElement): set m_defaultPosterURL if there is such settings (WebCore::HTMLVideoElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL() (WebCore::HTMLVideoElement::setDisplayMode): Use imageSourceURL() (WebCore::HTMLVideoElement::updateDisplayState): Use imageSourceURL() (WebCore::HTMLVideoElement::posterImageURL): Return image source's KURL * html/HTMLVideoElement.h: Replace imageSourceAttributeName() with imageSourceURL() and add m_defaultPosterURL * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Use imageSourceURL() * page/Settings.in: Add defaultVideoPosterURL setting. * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): use imageSourceURL() * platform/gtk/PasteboardGtk.cpp: (WebCore::getURLForImageNode): use imageSourceURL() * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absoluteImageURL): use imageSourceURL() * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL() * svg/SVGImageElement.h: Replace imageSourceAttributeName() with imageSourceURL() * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): support backup defaultVideoPosterURL. (WebCore::InternalSettings::Backup::restoreTo): support restore defaultVideoPosterURL. (WebCore::InternalSettings::setDefaultVideoPosterURL): set defaultVideoPosterURL. * testing/InternalSettings.h: (Backup): support backup defaultVideoPosterURL. (InternalSettings): Add setDefaultVidoePosterURL method. * testing/InternalSettings.idl: Add setDefaultVideoPosterURL for test purpose. * testing/Internals.cpp: (WebCore::Internals::getImageSourceURL): Add getImageSourceURL method. * testing/Internals.h: Add getImageSourceURL method. * testing/Internals.idl: Add getImageSourceURL method. 2013-03-13 Abhishek Arya Replace static_casts with to* functions for document types. https://bugs.webkit.org/show_bug.cgi?id=112225 Reviewed by Ryosuke Niwa. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::document): ....lot of files. 2013-03-13 Liam Quinn Handle XHTML entities in XHTML Mobile Profile 1.1 and 1.2. We previously only handled them in XHTML Mobile Profile 1.0. https://bugs.webkit.org/show_bug.cgi?id=112174 RIM PR 309038 Reviewed by Rob Buis. Internally reviewed by Leo Yang. Check for the 1.1 and 1.2 doctypes alongside the 1.0 doctype. Tests: fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::externalSubsetHandler): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parseDtd): 2013-03-13 Christophe Dumez [EFL] Better error handling in NetworkStateNotifierEfl https://bugs.webkit.org/show_bug.cgi?id=112184 Reviewed by Kenneth Rohde Christiansen. Improve error handling in for system calls in NetworkStateNotifierEfl. - EINTR errors are now properly handled for close() and recv() syscalls - recv() errors are now correctly detected, for e.g. if the socket was closed unexpectedly. - Make sure m_fdHandler is reset when the callback returns ECORE_CALLBACK_CANCEL to avoid double free in destructor. m_fdHandler gets destroyed when the callback returns ECORE_CALLBACK_CANCEL. - Keep netlink socket file descriptor as a class member so that we can close() it in the class destructor, even if m_fdHandler has already been destroyed. No new tests, no behavior change for layout tests. * platform/network/NetworkStateNotifier.h: (NetworkStateNotifier): * platform/network/efl/NetworkStateNotifierEfl.cpp: (WebCore::NetworkStateNotifier::readSocketCallback): (WebCore::NetworkStateNotifier::~NetworkStateNotifier): (WebCore::NetworkStateNotifier::NetworkStateNotifier): 2013-03-13 Tony Chang Regression(r143542): -webkit-align-items: center with overflow: auto/scroll has extra bottom padding https://bugs.webkit.org/show_bug.cgi?id=112047 Reviewed by Ojan Vafai. Add a new pass for computing the client bottom edge that runs after we've repositioned children due to wrap-reverse, flex-end or vertical centering. Test: css3/flexbox/negative-overflow.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Remove the code to use clientLogicalBottom() that was computed before repositioning. The repositioning can change the edge. (WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning): Compute the new bottom based on the final position of flex items. * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): 2013-03-13 Nate Chapin REGRESSION(r137607): Redirecting a post to a get then reloading triggers resubmit warning https://bugs.webkit.org/show_bug.cgi?id=112194 Reviewed by Alexey Proskuryakov. Test: http/tests/navigation/post-redirect-get-reload.php * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): Matching urls aren't a reliable way of checking whether we are in a redirect. Check redirectResponse.isNull() instead. * testing/Internals.cpp: (WebCore::Internals::forceReload): Expose a means of forcing a reload like one a user generates for testing. Note that testRunner.queueReload() does this, but is not supported after the initial load completes, which makes it unsuitable for this case. * testing/Internals.h: * testing/Internals.idl: 2013-03-13 Nate Chapin Merge MainResourceLoader's didFinishLoading and dataReceived into DocumentLoader https://bugs.webkit.org/show_bug.cgi?id=109952 Reviewed by Antti Koivisto. No new tests, refactor only. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::responseReceived): (WebCore::DocumentLoader::receivedData): (WebCore::DocumentLoader::maybeLoadEmpty): * loader/DocumentLoader.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::responseReceived): Move content filtering to DocumentLoader. (WebCore::MainResourceLoader::dataReceived): Mostly moved to DocumentLoader. (WebCore::MainResourceLoader::didFinishLoading): Mostly moved to DocumentLoader. * loader/MainResourceLoader.h: Expose some variables that haven't been moved to DocumentLoader yet. 2013-03-13 Andrei Bucur [CSS Regions] Break after doesn't work correctly with auto-height regions https://bugs.webkit.org/show_bug.cgi?id=112241 Reviewed by David Hyatt. The change correctly returns the break position during the normal layout phase for auto-height regions. The problem doesn't exist during the constrained layout phase so it only affects the size of the auto-height regions by incorrectly positioning the content inside the flow. Test: fast/regions/autoheight-break-after.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::applyAfterBreak): Include the margin offset in the returned break position. 2013-03-12 Andrey Kosyakov Web Inspector: coalesce repeating timeline records https://bugs.webkit.org/show_bug.cgi?id=112168 Reviewed by Vsevolod Vlasov. - coalesce repeating top-level timeline events; - drive-by: only show categories that actually took time in aggregated stats; * English.lproj/localizedStrings.js: * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._innerAddRecord): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._highlightRect): (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.prototype.reset): (WebInspector.TimelinePresentationModel.prototype._innerAddRecord): (WebInspector.TimelinePresentationModel.prototype._updateAncestorStats): (WebInspector.TimelinePresentationModel.prototype._findCoalescedParent): (WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord): (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.adoptRecord): (WebInspector.TimelinePresentationModel.insertRetrospectiveRecord): (WebInspector.TimelinePresentationModel.Record.prototype.get selfTime): (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview): (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails): (WebInspector.TimelinePresentationModel.Record.prototype.calculateAggregatedStats): 2013-03-13 Philip Rogers Fix body background image geometry calculation https://bugs.webkit.org/show_bug.cgi?id=112226 Reviewed by Stephen Chenney. Images that depend on a container size require a call to set the container size before rendering, and a call to look up the correct image during painting. The body's renderer is special in that it may not be the renderer that actually paints its background. This patch fixes a bug where the correct RenderObject was used for looking up the image, but not for setting the container size. This fixes SVG background images on body. Test: svg/as-background-image/svg-as-background-body.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): This change introduces clientForBackgroundImage in the background geometry calculation. This is very similar to how the client is looked up in paintFillLayerExtended. * rendering/RenderBoxModelObject.h: The new signature for calculateBackgroundImageGeometry now mirrors paintFillLayerExtended, containing a parameter for the correct background renderer. (RenderBoxModelObject): 2013-03-13 Andrey Lushnikov Web Inspector: [CodeMirror] Handle "enter" key in {|} situation https://bugs.webkit.org/show_bug.cgi?id=112153 Reviewed by Vsevolod Vlasov. Add a keymap to handle "Enter" key and override it in case of {|} situation. No new tests. * inspector/front-end/CodeMirrorTextEditor.js: (WebInspector.CodeMirrorTextEditor): (WebInspector.CodeMirrorTextEditor.BlockIndentController): (WebInspector.CodeMirrorTextEditor.BlockIndentController.prototype.Enter): 2013-03-13 Andrey Lushnikov Web Inspector: [CodeMirror] bug with LineWidgets https://bugs.webkit.org/show_bug.cgi?id=111978 Reviewed by Vsevolod Vlasov. Implement CodeMirrorTextEditor.beginUpdates and CodeMirrorTextEditor.endUpdates and surround decoration creation with the beginUpdates/endUpdates calls. No new tests. * inspector/front-end/CodeMirrorTextEditor.js: (WebInspector.CodeMirrorTextEditor): (WebInspector.CodeMirrorTextEditor.prototype.beginUpdates): (WebInspector.CodeMirrorTextEditor.prototype.endUpdates): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.addMessageToSource): 2013-03-13 Pavel Feldman Web Inspector: get rid of hiddenPanels filter https://bugs.webkit.org/show_bug.cgi?id=112252 Reviewed by Vsevolod Vlasov. * WebCore.order: * inspector/InspectorFrontendClient.h: (InspectorFrontendClient): * inspector/InspectorFrontendHost.cpp: * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/externs.js: * inspector/front-end/inspector.js: (WebInspector._panelDescriptors): * testing/Internals.cpp: 2013-03-13 Pavel Feldman Web Inspector: convert workers inspection into capability https://bugs.webkit.org/show_bug.cgi?id=112251 Reviewed by Vsevolod Vlasov. It should be up to backend * inspector/Inspector.json: * inspector/InspectorFrontendClient.h: (InspectorFrontendClient): * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorFrontendHost.cpp: * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::canInspectWorkers): (WebCore): * inspector/InspectorWorkerAgent.h: (InspectorWorkerAgent): * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/Settings.js: * inspector/front-end/externs.js: * inspector/front-end/inspector.js: (WebInspector.doLoadedDone): 2013-03-13 Mikhail Pozdnyakov [EFL] Start using evas object directly in Widget class https://bugs.webkit.org/show_bug.cgi?id=111858 Reviewed by Antonio Gomes. Based on a patch by Kenneth Rohde Christiansen. EFL Widget class should use evas object pointer directly rather than WidgetPrivate* m_data as platformWidget() is a Mac specific implementation detail that they are moving away from with WebKit2. This patch brings: firstly better compliance with other ports, secondly it makes code cleaner. Besides, the evasObject is only directly used in the ScrollbarEfl subclass of Widget and not in Widget or ScrollView or any other subclass, thus the evas_object code has now been concentrated in ScrollbarEfl. No new tests as there are no behavioral changes. * page/efl/EventHandlerEfl.cpp: * platform/Widget.h: (Widget): (WebCore::Widget::evasObject): * platform/efl/ScrollbarEfl.cpp: (ScrollbarEfl::~ScrollbarEfl): (scrollbarEflEdjeMessage): (ScrollbarEfl::show): (ScrollbarEfl::hide): (ScrollbarEfl::setParent): (ScrollbarEfl::updateThumbPositionAndProportion): (ScrollbarEfl::frameRectsChanged): * platform/efl/ScrollbarEfl.h: (ScrollbarEfl): * platform/efl/WidgetEfl.cpp: (WebCore::Widget::Widget): (WebCore::Widget::~Widget): (WebCore::Widget::frameRectsChanged): (WebCore::Widget::show): (WebCore::Widget::hide): (WebCore::Widget::setEvasObject): * plugins/efl/PluginViewEfl.cpp: (WebCore::PluginView::platformGetValue): 2013-03-13 Andrey Lushnikov Web Inspector: [CodeMirror] token highlight still has some problems https://bugs.webkit.org/show_bug.cgi?id=112173 Reviewed by Vsevolod Vlasov. Use pseudo elements with borders to draw token highlight. No new tests. * inspector/front-end/cm/cmdevtools.css: (.cm-token-highlight): (.cm-token-highlight:before): (.cm-line-with-selection .cm-column-with-selection:before): 2013-03-13 Alberto Garcia [BlackBerry] SimpleFontData: remove duplicate code https://bugs.webkit.org/show_bug.cgi?id=112149 Reviewed by Carlos Garcia Campos. smallCapsFontData() and emphasisMarkFontData() were moved from platform specific files into platform/graphics/SimpleFontData.cpp in r133362, so the BlackBerry port no longer needs its own implementation. * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp: 2013-03-13 Ilya Tikhonovsky Web Inspector: throw an exception if the requested lazy loaded script does not exist. https://bugs.webkit.org/show_bug.cgi?id=112237 Reviewed by Pavel Feldman. * inspector/front-end/utilities.js: 2013-03-13 Mike West Pass the XSSAuditor's report URL to the XSSAuditorDelegate on the main thread. https://bugs.webkit.org/show_bug.cgi?id=112179 Reviewed by Adam Barth. Rather than relying on XSSInfo objects to move the XSSAuditor's report URL into the XSSAuditorDelegate for reporting, we should be able to grab the URL directly from XSSAuditor before it moves off the main thread, and store it on the delegate. This will enable us to drop the report URL properties from both XSSAuditor and XSSInfo. Oh, happy day! * html/parser/BackgroundHTMLParser.cpp: (WebCore::BackgroundHTMLParser::sendTokensToMainThread): We no longer need to check whether XSSInfo objects are thread safe, as we've dropped the only problematic bit. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::startBackgroundParser): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::init): When initializing the XSSAuditor, pass in an XSSAuditorDelegate* and assign the report URL directly onto that object. (WebCore::XSSAuditor::filterToken): Drop the report URL parameter from XSSInfo objects we create in the Auditor, as they're now handled directly from the delegate. (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Drop the report URL property from XSSAuditor's threadsafeness check, as properties that do not exist are automatically thread-safe. * html/parser/XSSAuditorDelegate.cpp: (WebCore::XSSAuditorDelegate::didBlockScript): Use the delegate's own report URL rather than the XSSInfo objects'. * html/parser/XSSAuditorDelegate.h: (WebCore::XSSInfo::create): (WebCore::XSSInfo::XSSInfo): Drop the report URL property from XSSInfo. (WebCore::XSSAuditorDelegate::setReportURL): (XSSAuditorDelegate): Provide a public API for setting a delegate's report URL. 2013-03-13 Mike West Unsafe JavaScript attempt errors are ludicrously verbose and annoying https://bugs.webkit.org/show_bug.cgi?id=112042 Reviewed by Timothy Hatcher. This patch attempts to make the most common case of error message less ludicrous by adjusting it to include only an origin as opposed to full URLs for the active and target frames. It now reads: "Blocked a frame with origin 'http://127.0.0.1:8000' from accessing a frame with origin 'http://localhost:8000'. Protocols, domains, and ports must match." In the interest of keeping the patch size down, I'll follow up on the other cases (sandboxed access, 'document.domain' mismatches, etc) in future patches. * page/DOMWindow.cpp: (WebCore::DOMWindow::crossDomainAccessErrorMessage): 2013-03-13 Takashi Sakamoto Implement :scope for element.querySelector[All]() https://bugs.webkit.org/show_bug.cgi?id=81069 Reviewed by Dimitri Glazkov. Implemented :scope for element.querySelector[All](). Reuse scope in SelectorCheckingContext and added a new value to enum BehaviorAtBoundary. :scope spec is http://dev.w3.org/csswg/selectors4/#scope-pseudo. Test: fast/selectors/querySelector-scope.html * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType): Added :scope pseudo type. * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::match): (WebCore::SelectorChecker::checkOne): Added PseudoScope case and modified "scope" meaning when behaviorAtBoundary is equal to StaysWithinTreeScope. If so, "scope" is just a contextual reference node. * css/SelectorChecker.h: * dom/SelectorQuery.cpp: (WebCore::SelectorDataList::selectorMatches): (WebCore::SelectorDataList::matches): (WebCore::SelectorDataList::execute): Use rootNode as a contextual reference node. * dom/SelectorQuery.h: (SelectorDataList): 2013-03-13 Alberto Garcia [BlackBerry] FontPlatformData: remove TextOrientation parameter https://bugs.webkit.org/show_bug.cgi?id=112135 Reviewed by Rob Buis. This doesn't exist since r136520. * platform/graphics/blackberry/FontCacheBlackBerry.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/blackberry/FontCustomPlatformData.h: (FontCustomPlatformData): * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::applyState): * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp: (WebCore::SimpleFontData::createScaledFontData): 2013-03-12 Antti Koivisto Basic child obscuration test for backgrounds https://bugs.webkit.org/show_bug.cgi?id=111701 Reviewed by Simon Fraser. Test: fast/repaint/obscured-background-no-repaint.html We can easily detect some simple cases where a background image is fully obscured by an opaque child. This avoids unncessary painting and image decoding. It is especially helpful for cases like about.com home page where a fully obscured 'loading' spinner keeps triggering frequent complex repaints (gif animations progress by getting painted and stop if they are not). This could be made way more sophisticated. The checking could also be done per-layout rather per-paint. Even this simple approach gets hit surprisingly often in real world sites. * rendering/RenderBox.cpp: (WebCore::RenderBox::backgroundIsObscured): Before painting background test if any single child renderer fully obscures it. (WebCore::RenderBox::backgroundIsOpaqueInRect): * rendering/RenderBox.h: 2013-03-12 Hayato Ito [Crash] Touch Events retargeting causes crashes on chrome on android. https://bugs.webkit.org/show_bug.cgi?id=112210 Reviewed by Dimitri Glazkov. Added null-check for TouchEvent's touches(), targetTouches() and changedTouches(). No new tests - no new functionality. * dom/EventRetargeter.cpp: (WebCore::EventRetargeter::adjustForTouchEvent): (WebCore::EventRetargeter::adjustTouchList): * dom/EventRetargeter.h: 2013-03-12 Geoffrey Garen Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592. * platform/RunLoopTimer.h: Removed. 2013-03-12 Huang Dongsung Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer(). https://bugs.webkit.org/show_bug.cgi?id=111835 Reviewed by Luiz Agostini. This patch removes CoordinatedGraphicsLayer::setRootLayer() because CoordinatedGraphicsScene already knows which layer is root. No new tests, no behavior change. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp: (WebCore::CoordinatedGraphicsScene::setLayerState): * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState): 2013-03-12 Jun Jiang Enable GPU-GPU texture copy in texImage2D() for HTMLVideoElement if hardware accelerated video decode is in use https://bugs.webkit.org/show_bug.cgi?id=111126 Reviewed by Kenneth Russell. In texImage2D() for HTMLVideoElement in WebGL, it is possible to do a GPU-GPU texture copy instead of CPU readback and upload when videoFrame is in the form of textures. Each platform port needs to implement the interface copyVideoTextureToPlatformTexture() defined in MediaPlayer.h to make it work. Already covered by current tests. * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture): * html/HTMLVideoElement.h: (HTMLVideoElement): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::videoFrameToImage): Move some security check to upper level. (WebCore::WebGLRenderingContext::texImage2D): Add the fast GPU-GPU textures copy path for HTMLVideoElement and some security check. (WebCore::WebGLRenderingContext::texSubImage2D): Add some security check. * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::isValid): Added to check if the texture is defined at the given level. * html/canvas/WebGLTexture.h: (WebGLTexture): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::copyVideoTextureToPlatformTexture): Added to do the GPU-GPU textures copy. * platform/graphics/MediaPlayer.h: (MediaPlayer): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::copyVideoTextureToPlatformTexture): 2013-03-12 Sheriff Bot Unreviewed, rolling out r145280. http://trac.webkit.org/changeset/145280 https://bugs.webkit.org/show_bug.cgi?id=112217 This patch broke chromium WebGL conformance tests (Requested by shawnsingh on #webkit). * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::reset): * platform/graphics/gpu/DrawingBuffer.h: (DrawingBuffer): 2013-03-12 Dean Jackson Don't send events to plugins that are being snapshotted https://bugs.webkit.org/show_bug.cgi?id=112215 Reviewed by Tim Horton. If a plugin is in the process of being snapshotted, do not forward it any events. This avoids the case where we can accidentally capture some custom mouse pointers, as well as trigger a plugin menu. The next step will be to detect if the event should stop the snapshotting (restart the plugin). * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Return early if the plugin is snapshotting. 2013-03-12 Tim Horton Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: 2013-03-12 James Robinson Fix Gamepad::axes and Gamepad::buttons to avoid calling std::copy(..., ..., 0) https://bugs.webkit.org/show_bug.cgi?id=89510 Reviewed by Kenneth Russell. WTF::Vector::begin() returns 0 when the vector has length zero. On windows, the debug implementation of std::copy() is unhappy with 0 as a third parameter even when the first and second parameters are equal. Covered by gamepad/gamepad-polling-access.html * Modules/gamepad/Gamepad.cpp: (WebCore::Gamepad::axes): (WebCore::Gamepad::buttons): 2013-03-12 Elliott Sprehn Remove TextIterator.cpp's isAllCollapsibleWhitespace https://bugs.webkit.org/show_bug.cgi?id=112200 Reviewed by Ryosuke Niwa. Remove isAllCollapsibleWhitespace since nothing uses it. * editing/TextIterator.cpp: Remove isAllCollapsibleWhitespace. 2013-03-12 Bear Travis [css exclusions] Move ExclusionShapeInsideInfo into RenderBlockRareData https://bugs.webkit.org/show_bug.cgi?id=110995 Reviewed by Julien Chaffraix. This patch moves ExclusionShapeInsideInfo into the RenderBlockRareData struct, which enables us to move away from the global ExclusionShapeInsideInfo map. Some additional refactoring was done to remove ExclusionShapeInsideInfo's dependency on InlineIterator, which depended on RenderBlock. This work required adding a new LineSegmentIterator struct. Refactoring, no new tests. * rendering/ExclusionShapeInsideInfo.cpp: (WebCore): (WebCore::LineSegmentRange::LineSegmentRange): Moving the InlineIterator constructor to the .cpp file, as InlineIterator is now forward declared in the .h file. (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Moving isEnabledFor to the .cpp file, as RenderBlock is now forward declared in the .h file. * rendering/ExclusionShapeInsideInfo.h: (WebCore): (LineSegmentIterator): A simple struct for containing segment positions for layout. (WebCore::LineSegmentIterator::LineSegmentIterator): Constructor. (LineSegmentRange): Transitioning to store LineSegmentIterator. (WebCore::LineSegmentRange::LineSegmentRange): Ditto. (ExclusionShapeInsideInfo): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::willBeDestroyed): Destroying a block will now destroy its ExclusionShapeInsideInfo, so there is no need to remove it from the map. (WebCore): (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Use the RenderBlockRareData struct rather than the global map. * rendering/RenderBlock.h: (WebCore): (WebCore::RenderBlock::ensureExclusionShapeInsideInfo): Ensure an info struct is present if the shape-inside style is set. (WebCore::RenderBlock::exclusionShapeInsideInfo): Look up the info struct for the current block. (WebCore::RenderBlock::setExclusionShapeInsideInfo): Update the info struct for the current block. (RenderBlockRareData): Add the ExclusionShapeInsideInfo member. Move the struct declaration to be public, so that the OwnPtr reference can properly delete it. * rendering/RenderBlockLineLayout.cpp: (WebCore::constructBidiRunsForLine): Construct the appropriate offsets during layout based on the stored LineSegmentIterators. 2013-03-12 James Robinson Build fix for r145592 - update gyp files to refer to new file locations. * WebCore.gypi: 2013-03-12 Benjamin Poulain Add a single character cache to WidthCache https://bugs.webkit.org/show_bug.cgi?id=112084 Reviewed by Geoffrey Garen. More than half of the values stored in WidthCache are values for a single character. Previously, we were creating a new SmallStringKey for each one of them, causing a lot of extra memory operations even for the simple cases. This patch adds a second map, m_singleCharMap, to simplify the computation for the common case of a single char TextRun. * platform/graphics/WidthCache.h: (WebCore::WidthCache::clear): (WidthCache): (WebCore::WidthCache::addSlowCase): 2013-03-12 Philip Rogers Replace static_casts for SVG transformable and locatable elements https://bugs.webkit.org/show_bug.cgi?id=111651 Reviewed by Abhishek Arya. toSVGStyledTransformableElement and toSVGStyledLocatableElement are preferred over static_casts because bad casts can be caught on our testing infrastructure. This patch replaces all static_casts for SVGStyledTransformableElement and SVGStyledLocatableElement with toSVGStyledTransformableElement and toSVGStyledLocatableElement, respectively. No new tests as this is covered with existing tests. * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::pathOnlyClipping): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::nonScalingStrokeTransform): (WebCore::RenderSVGShape::shouldGenerateMarkerPositions): * rendering/svg/RenderSVGTransformableContainer.cpp: (WebCore::RenderSVGTransformableContainer::calculateLocalTransform): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::calculateDistance): This was an unnecessary cast and has been removed. * svg/SVGElement.cpp: (WebCore::SVGElement::getBoundingBox): * svg/SVGLocatable.cpp: (WebCore::SVGLocatable::getTransformToElement): * svg/SVGStyledLocatableElement.h: (WebCore): (WebCore::toSVGStyledLocatableElement): * svg/SVGStyledTransformableElement.h: (WebCore): (WebCore::toSVGStyledTransformableElement): It makes the code cleaner to pass Node* in here, rather than converting the Node* to an SVGElement* before calling this function. The same was not necessary for SVGStyledLocatable. * svg/SVGSVGElement.h: (WebCore): (WebCore::toSVGSVGElement): This code has been cleaned up. During the review of this patch, a similar cleanup was done in toSVGStyledTransformableElement. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::toClipPath): 2013-03-12 Abhishek Arya Replace static_casts with to* helper functions. https://bugs.webkit.org/show_bug.cgi?id=112164 Reviewed by Philip Rogers. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::collectMatchingRulesForRegion): * platform/gtk/PasteboardGtk.cpp: (WebCore::getURLForImageNode): (WebCore::Pasteboard::writeImage): * platform/gtk/RenderThemeGtk.cpp: (WebCore::getMediaElementFromRenderObject): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::checkMultiple): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::title): (WebCore::HitTestResult::absoluteImageURL): (WebCore::HitTestResult::absolutePDFURL): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): (WebCore::RenderLayer::hitTest): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::valueChanged): * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): * rendering/RenderPart.cpp: (WebCore::RenderPart::requiresAcceleratedCompositing): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::checkRegionStyle): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computePreferredLogicalWidths): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isEnabled): (WebCore::RenderTheme::isSpinUpButtonPartPressed): (WebCore::RenderTheme::isHovered): (WebCore::RenderTheme::isSpinUpButtonPartHovered): (WebCore::RenderTheme::paintSliderTicks): * rendering/RenderThemeWinCE.cpp: (WebCore::mediaElementParent): * rendering/RenderTreeAsText.cpp: (WebCore::isEmptyOrUnstyledAppleStyleSpan): (WebCore::RenderTreeAsText::writeRenderObject): (WebCore::writeRenderRegionList): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeSVGResourceContainer): 2013-03-12 Geoffrey Garen Moved RunLoopTimer and SchedulePair to WTF https://bugs.webkit.org/show_bug.cgi?id=112171 Reviewed by Oliver Hunt. This will allow us to use timers in lower level primitives without duplicating all the code. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * loader/DocumentLoader.h: (WTF): (WebCore): (DocumentLoader): * loader/MainResourceLoader.h: * page/Page.h: * platform/AutodrainedPool.h: Removed. * platform/cf/RunLoopTimerCF.cpp: Removed. * platform/cf/SchedulePair.cpp: Removed. * platform/cf/SchedulePair.h: Removed. * platform/mac/AutodrainedPool.mm: Removed. * platform/mac/SchedulePairMac.mm: Removed. * platform/network/NetworkingContext.h: * platform/network/ResourceHandle.h: (WTF): (WebCore): (ResourceHandle): * platform/network/cf/FormDataStreamCFNet.cpp: * platform/network/mac/ResourceHandleMac.mm: 2013-03-12 Christian Biesinger Mac: Incorrect rendering of