2012-05-16 Shinya Kawanaka ShadowRoot.selection should return the seleciton whose range is in a shadow tree. https://bugs.webkit.org/show_bug.cgi?id=82698 Reviewed by Ryosuke Niwa. The selection object returned from shadowRoot.selection should be able to see the inner object of the shadowRoot. In the previous code, the node out of the shadow subtree was returned for anchorNode, focusNode, baseNode, and extentNode. This patch enables us to get the corresponding shadow ancestor in the specified TreeScope (m_treeScope). Tests: editing/shadow/selection-of-orphan-shadowroot.html editing/shadow/selection-of-shadowroot.html * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::selection): * dom/ShadowRoot.h: (ShadowRoot): * dom/TreeScope.cpp: (WebCore::TreeScope::getSelection): When shadow DOM feature is not enabled, we want to use the same instance of DOMSelection among Document and ShadowRoot. * dom/TreeScopeAdjuster.cpp: (WebCore::TreeScopeAdjuster::TreeScopeAdjuster): (WebCore::TreeScopeAdjuster::ancestorInThisScope): Since node could be null, I've added a node check code. * dom/TreeScopeAdjuster.h: (TreeScopeAdjuster): (WebCore::TreeScopeAdjuster::treeScope): * page/DOMSelection.cpp: (WebCore::DOMSelection::anchorNode): (WebCore::DOMSelection::anchorOffset): (WebCore::DOMSelection::focusNode): (WebCore::DOMSelection::focusOffset): (WebCore::DOMSelection::baseNode): (WebCore::DOMSelection::baseOffset): (WebCore::DOMSelection::extentNode): (WebCore::DOMSelection::extentOffset): (WebCore::DOMSelection::shadowAdjustedNode): Gets the corresponding node in the m_treeScope from the Position. (WebCore): (WebCore::DOMSelection::shadowAdjustedOffset): Gets the corresponding node offset in the m_treeScope from the Position. * page/DOMSelection.h: (WebCore): (DOMSelection): 2012-05-16 Jason Liu [BlackBerry] xhr request to non existent file response is 0 and not 404. https://bugs.webkit.org/show_bug.cgi?id=86344 Reviewed by George Staikos. NetworkJob receives 404 for a XMLHttpRequest which calls open("HEAD", "notExist.html", true). There are no data received because its method is HEAD. This case should not be treated as a failure. Add shouldNotifyClientFailed() to treat XMLHttpRequest as a special case. XMLHttpRequest will fail when status code is smaller than zero. If we use "GET" and receive 404 without body, NetworkJob won't go through failing code path, too. So add http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html to check this case. Test: http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendResponseIfNeeded): 2012-05-16 MORITA Hajime HasCustomWillOrDidRecalcStyleFlag and family should live in a bit. https://bugs.webkit.org/show_bug.cgi?id=86175 Reviewed by Ryosuke Niwa. This change unifies following flags into one HasCustomCallbacksFlag. - HasCustomWillOrDidRecalcStyleFlag - HasCustomStyleForRendererFlag - IsFrameOwnerElementFlag By this change, some callbacks can be called even if there are no override. So all custom callbacks should just pass these invocations. No new tests. No behavior change. * dom/ContainerNodeAlgorithms.h: (WebCore::ChildFrameDisconnector::collectDescendant): * dom/Element.cpp: (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): (WebCore::Element::willRecalcStyle): (WebCore): (WebCore::Element::didRecalcStyle): (WebCore::Element::customStyleForRenderer): * dom/Element.h: (Element): * dom/Node.h: (WebCore::Node::isFrameOwnerElement): (WebCore::Node::hasCustomCallbacks): (WebCore::Node::setHasCustomCallbacks): * dom/Text.cpp: (WebCore::Text::recalcTextStyle): (WebCore::Text::willRecalcTextStyle): (WebCore): * dom/Text.h: (Text): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): * html/HTMLFrameOwnerElement.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::HTMLFrameSetElement): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::HTMLIFrameElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): (WebCore::HTMLPlugInImageElement::customStyleForRenderer): * html/HTMLPlugInImageElement.h: (HTMLPlugInImageElement): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerElement::customStyleForRenderer): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): (WebCore::TextControlInnerTextElement::customStyleForRenderer): * html/shadow/TextControlInnerElements.h: (TextControlInnerElement): (TextControlInnerTextElement): * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::TextFieldDecorationElement): (WebCore::TextFieldDecorationElement::customStyleForRenderer): * html/shadow/TextFieldDecorationElement.h: (TextFieldDecorationElement): * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::customStyleForRenderer): * svg/SVGElement.h: (SVGElement): * svg/SVGTRefElement.cpp: (WebCore::SVGShadowText::SVGShadowText): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): 2012-05-16 Yury Semikhatsky Web Inspector: exception when switching to heap profiler comparison view https://bugs.webkit.org/show_bug.cgi?id=86224 Reviewed by Pavel Feldman. Make sure the messages are dispatched in the same order as they are sent in case a fake worker is used for heap snapshot processing. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.AsyncTaskQueue): (WebInspector.AsyncTaskQueue.prototype.addTask): (WebInspector.AsyncTaskQueue.prototype._onTimeout): (WebInspector.AsyncTaskQueue.prototype._scheduleTimer): (WebInspector.HeapSnapshotFakeWorker): (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage): (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker): 2012-05-16 Mikhail Pozdnyakov [EFL] PlatformKeyboardEvent: figures, letters and printscreen key handling https://bugs.webkit.org/show_bug.cgi?id=85503 Reviewed by Gustavo Noronha Silva. * platform/efl/EflKeyboardUtilities.cpp: (WebCore::addCharactersToKeyMap): aux function (WebCore): (WebCore::createKeyMap): Figures and letters keys are added to the keyMap (WebCore::addCharactersToWinKeyMap): aux function (WebCore::createWindowsKeyMap): Capital letters keys are added to the windowsKeyMap. Corrected value for printscreen key. (WebCore::singleCharacterString): Return empty text for printscreen key. 2012-05-16 Pavel Feldman Web Inspector: rename DebuggerPresentationModel to DebuggerScriptMapping, make it private to ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=86594 Reviewed by Vsevolod Vlasov. This change completes the elimination of the presentation model. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/AuditFormatters.js: (WebInspector.AuditFormatters.resourceLink): * inspector/front-end/DebuggerResourceBinding.js: (WebInspector.DebuggerResourceBinding): (WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource): * inspector/front-end/DebuggerScriptMapping.js: Renamed from Source/WebCore/inspector/front-end/DebuggerPresentationModel.js. (WebInspector.DebuggerScriptMapping): (WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeListChanged): * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.OpenScriptDialog): (WebInspector.OpenScriptDialog.install): (WebInspector.OpenScriptDialog._show): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): * inspector/front-end/PresentationConsoleMessageHelper.js: (WebInspector.PresentationConsoleMessageHelper): (WebInspector.PresentationConsoleMessageHelper.prototype._consoleCleared): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._loadUISourceCodes): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/ScriptsSearchScope.js: (WebInspector.ScriptsSearchScope): (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCodeProject): (WebInspector.UISourceCodeProject.prototype.uiSourceCodes): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createPanels): 2012-05-15 Yury Semikhatsky Web Inspector: use separate fields for storing HeapSnapshotLoaderProxy and HeapSnapshotProxy https://bugs.webkit.org/show_bug.cgi?id=86488 Reviewed by Pavel Feldman. Simplified heap profiler snapshot loading code. Introduced dedicated fields for snapshot loader proxy and for snapshot proxy. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): (WebInspector.HeapSnapshotLoaderProxy): (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData): (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.callLoadCallbacks): (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading): (WebInspector.HeapSnapshotLoaderProxy.prototype.get loaded): (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading): (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.profileCallback): (WebInspector.HeapSnapshotView): (WebInspector.HeapSnapshotView.prototype.dispose): (WebInspector.HeapSnapshotView.prototype.get baseProfileWrapper): (WebInspector.HeapSnapshotView.prototype.wasShown.profileCallback1): (WebInspector.HeapSnapshotView.prototype._changeView): (WebInspector.HeapProfileHeader): split _proxy field into _loaderProxy and _snapshotProxy (WebInspector.HeapProfileHeader.prototype.snapshotProxy): (WebInspector.HeapProfileHeader.prototype.load): (WebInspector.HeapProfileHeader.prototype._setupWorker): (WebInspector.HeapProfileHeader.prototype.dispose): (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate): (WebInspector.HeapProfileHeader.prototype.pushJSONChunk): (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot): (WebInspector.HeapProfileHeader.prototype.canSaveToFile): (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad): (WebInspector.HeapProfileHeader.prototype.loadFromFile): 2012-05-16 Eugene Klyuchnikov Web Inspector: Use CSS columns feature for HelpScreen contents. https://bugs.webkit.org/show_bug.cgi?id=86367 Reviewed by Yury Semikhatsky. Right-docked inspector should show shortcuts/settings in one column. Bottom-docked inspector should use horizontal space more effectively (more than 2 columns in shortcuts/settings). Please see attached screenshots. UI adjustments, no new tests. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): Turned table to div. (WebInspector.SettingsScreen.prototype._appendSection): Removed. * inspector/front-end/ShortcutsScreen.js: (WebInspector.ShortcutsScreen.prototype._buildTable): Removed "balancing" algorithm. (WebInspector.ShortcutsSection.prototype.renderSection): Turned table to div. (WebInspector.ShortcutsSection.prototype._renderHeader): Ditto. * inspector/front-end/helpScreen.css: Use CSS columns feature. (.help-container): Added columns container. (.help-block): Added "section". (.help-line): Added key shortcut line. (.help-key-cell): Added key shortcut cell. (.help-cell): Ditto (.help-section-title): Combined title classes (.help-content p): Adjusted spacing. 2012-05-16 Sheriff Bot Unreviewed, rolling out r117050. http://trac.webkit.org/changeset/117050 https://bugs.webkit.org/show_bug.cgi?id=86587 "Some heap profiler tests started timing out" (Requested by yurys on #webkit). * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotFakeWorker): (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage): (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker): 2012-05-16 Sheriff Bot Unreviewed, rolling out r117206. http://trac.webkit.org/changeset/117206 https://bugs.webkit.org/show_bug.cgi?id=86583 breaks chromium browser_tests (Requested by bashi1 on #webkit). * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::create): 2012-05-16 Nikolas Zimmermann REGRESSION(r105057): Infinite loop inside SVGTextLayoutEngine::currentLogicalCharacterMetrics https://bugs.webkit.org/show_bug.cgi?id=83405 Reviewed by Darin Adler. Dynamically adding tspans carrying position information in the x/y/dx/dy/rotate lists is broken. To avoid mistakes like this in future, simplify the calling code in RenderSVGInlineText and centralize the management of all caches (text positioning element cache / metrics map / layout attributes) in RenderSVGText. This avoids the hack in SVGRootInlineBox::computePerCharacterLayoutInformation() which called textRoot->rebuildLayoutAttributes(), which was used to fix previous security issues with this code. Instead correctly handle destruction of RenderSVGInlineText in RenderSVGText, keeping the m_layoutAttributes synchronized with the current state of the render tree. Fixes highcharts problems. Tests: svg/text/add-tspan-position-bug.html svg/text/highcharts-assertion.html svg/text/modify-tspan-position-bug.html * rendering/svg/RenderSVGBlock.h: (RenderSVGBlock): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::addChild): (WebCore::RenderSVGInline::removeChild): * rendering/svg/RenderSVGInline.h: (RenderSVGInline): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::setTextInternal): (WebCore::RenderSVGInlineText::styleDidChange): * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::RenderSVGText): (WebCore::RenderSVGText::~RenderSVGText): (WebCore::collectLayoutAttributes): (WebCore::RenderSVGText::subtreeChildWasAdded): (WebCore::findPreviousAndNextAttributes): (WebCore::checkLayoutAttributesConsistency): (WebCore::RenderSVGText::willBeDestroyed): (WebCore::RenderSVGText::subtreeChildWillBeRemoved): (WebCore::RenderSVGText::subtreeChildWasRemoved): (WebCore::RenderSVGText::subtreeStyleDidChange): (WebCore::RenderSVGText::subtreeTextDidChange): (WebCore::updateFontInAllDescendants): (WebCore::RenderSVGText::layout): (WebCore::RenderSVGText::addChild): (WebCore::RenderSVGText::removeChild): * rendering/svg/RenderSVGText.h: (RenderSVGText): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::layoutChildren): * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer): (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForWholeTree): (WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer): (WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap): * rendering/svg/SVGTextLayoutAttributesBuilder.h: (SVGTextLayoutAttributesBuilder): (WebCore::SVGTextLayoutAttributesBuilder::numberOfTextPositioningElements): * svg/SVGAElement.cpp: * svg/SVGAElement.h: (SVGAElement): * svg/SVGTextContentElement.cpp: * svg/SVGTextContentElement.h: (SVGTextContentElement): 2012-05-15 Abhishek Arya Crash in Document::nodeChildrenWillBeRemoved. https://bugs.webkit.org/show_bug.cgi?id=85247 Reviewed by Hajime Morita. Reverse ordering of commands to ref ptr the children set first before calling nodeChildrenWillBeRemoved, since it can fire mutation events. Test: fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml * dom/ContainerNode.cpp: (WebCore::willRemoveChildren): 2012-05-15 Igor Oliveira regression(111639): Issue with simultaneous CSS animations https://bugs.webkit.org/show_bug.cgi?id=85929 Currently, previousTimeToNextService is just saving the previous CompositeAnimation::timeToNextService for AnimationControllerPrivate::updateAnimationTimerForRenderer, however CompositeAnimation::timeToNextService is also called and used by updateAnimationTimer. Make sure we save the existing timeToNextService from both places, updateAnimationTimerForRenderer and updateAnimationTimer. Reviewed by Dean Jackson. Test: animations/fill-mode-forwards.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): (WebCore::AnimationControllerPrivate::updateAnimationTimer): * page/animation/AnimationControllerPrivate.h: (AnimationControllerPrivate): 2012-05-15 Tien-Ren Chen [Chromium] CCTimer::isActive() is incorrect inside tick callback https://bugs.webkit.org/show_bug.cgi?id=86513 This patch implements CCTimer::isActive() by clearing the task pointer when the timer fires. Reviewed by James Robinson. No new tests. Existing tests updated accordingly. * platform/graphics/chromium/cc/CCTimer.cpp: (WebCore::CCTimerTask::performTask): * rendering/RenderLayerBacking.cpp: 2012-05-15 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSFloat64Array.cpp: (WebCore::JSFloat64Array::getOwnPropertySlot): (WebCore::JSFloat64Array::getOwnPropertyDescriptor): (WebCore::JSFloat64Array::put): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTarget::getOwnPropertySlot): (WebCore::JSTestEventTarget::getOwnPropertyDescriptor): 2012-05-15 Shinya Kawanaka Rename Node::shadowTreeRootNode() to Node::shadowRoot() https://bugs.webkit.org/show_bug.cgi?id=86449 Reviewed by Darin Adler. Since Node::shadowTreeRootNode() returns always a ShadowRoot now, shadowRoot() is mure suitable than shadowTreeRootNode(). This patch changes the method name. No new tests, no change in behavior. * WebCore.order: * dom/Node.cpp: (WebCore::Node::rendererIsEditable): (WebCore::Node::shadowAncestorNode): (WebCore::Node::shadowRoot): * dom/Node.h: (Node): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): * dom/Range.cpp: (WebCore::Range::shadowRoot): * dom/Range.h: (Range): * editing/Editor.cpp: (WebCore::Editor::nextVisibleRange): (WebCore::Editor::countMatchesForText): * editing/TextIterator.cpp: (WebCore::TextIterator::handleReplacedElement): * editing/htmlediting.cpp: (WebCore::indexForVisiblePosition): * html/shadow/ContentSelectorQuery.cpp: (WebCore::ContentSelectorQuery::matches): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::detach): * page/EventHandler.cpp: (WebCore::instanceAssociatedWithShadowTreeElement): * svg/SVGElement.cpp: (WebCore::SVGElement::correspondingElement): (WebCore::collectInstancesForSVGElement): 2012-05-15 Nico Weber [chromium] Remove some unused gyp lines https://bugs.webkit.org/show_bug.cgi?id=86545 Reviewed by Dirk Pranke. mac_framework_dirs adds directories to search for frameworks (similar to -I for includes), it doesn't add any frameworks. Having something that ends in .framewok in mac_framework_dirs doesn't make sense. No intended functionality change. * WebCore.gyp/WebCore.gyp: 2012-05-13 Philippe Normand [GStreamer] build a static list of mime-types https://bugs.webkit.org/show_bug.cgi?id=86331 Reviewed by Martin Robinson. Don't bother parsing the gstreamer typefind factories and doing ugly hacks around this. Instead build a static list and let our ::supportsType() method return MediaPlayer::MayBeSupported or MediaPlayer::IsSupported for them. Playback will still fail if a demuxer or decoder is missing for one of these mime-types but we will handle that case more properly soon by fixing bug 34085 and bug 34318. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 2012-05-15 Greg Spencer MHTML files should be loadable from all schemes considered local, not just file: https://bugs.webkit.org/show_bug.cgi?id=86540 Reviewed by Adam Barth. Current tests should assure that loading is still allowed locally. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::create): 2012-05-15 Fady Samuel [Chromium] Reset ScriptInstance in HTMLPlugInElement on WebPluginContainerImpl::setPlugin https://bugs.webkit.org/show_bug.cgi?id=86535 Reviewed by Darin Fisher. When we swap out WebPluginImpls for the Browser Plugin, the HTMLPlugInElement continues to use a now invalid ScriptInstance, so we reset the ScriptInstance on WebPluginContainerImpl::setPlugin * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::resetInstance): (WebCore): * html/HTMLPlugInElement.h: (HTMLPlugInElement): 2012-05-15 Robert Hogan Heap-use-after-free in WebCore::RenderBlock::layoutRunsAndFloats https://bugs.webkit.org/show_bug.cgi?id=86206 Reviewed by Abhishek Arya. Revert https://trac.webkit.org/changeset/116438/. It caused three different regressions on ClusterFuzz. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderBlock.h: (RenderBlock): 2012-05-15 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=86549 Page Scale + Tiled Drawing: Twitter sign in page content disappears after typing into name and enabling password field -and corresponding- Reviewed by Oliver Hunt. The enormous rect we used to use would overflow in CA and do nothing when there was any scale > 1 on the context. Instead, just call setNeedsDisplay on each tile. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setNeedsDisplay): 2012-05-15 Andreas Kling Pass Attribute by const reference as much as possible. Reviewed by Darin Adler. Switch to passing around "const Attribute&" instead of "Attribute*" wherever possible. This helps enforce the constness and non-nullity of these arguments at compile time. Also renamed 'attr' to 'attribute' in the touched code. Attr and Attribute are two different classes, so having "Attribute attr" just looks wrong. * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/js/ScriptEventListener.h: * bindings/v8/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/v8/ScriptEventListener.h: * dom/Attr.cpp: (WebCore::Attr::setPrefix): (WebCore::Attr::setValue): (WebCore::Attr::childrenChanged): (WebCore::Attr::style): (WebCore::Attr::elementAttribute): * dom/Attr.h: * dom/Element.cpp: (WebCore::Element::setAttributeInternal): (WebCore::Element::attributeChanged): (WebCore::Element::parserSetAttributes): (WebCore::Element::didAddAttribute): (WebCore::Element::didModifyAttribute): (WebCore::Element::didRemoveAttribute): * dom/Element.h: * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::setAttributes): (WebCore::ElementAttributeData::replaceAttribute): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::parseAttribute): (WebCore::StyledElement::updateAttributeStyle): * dom/StyledElement.h: (WebCore::StyledElement::collectStyleForAttribute): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): * html/HTMLAnchorElement.h: * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseAttribute): * html/HTMLAppletElement.h: * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::parseAttribute): * html/HTMLAreaElement.h: * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::collectStyleForAttribute): * html/HTMLBRElement.h: * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::parseAttribute): * html/HTMLBaseElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::collectStyleForAttribute): (WebCore::HTMLBodyElement::parseAttribute): * html/HTMLBodyElement.h: * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::parseAttribute): * html/HTMLButtonElement.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::parseAttribute): * html/HTMLCanvasElement.h: * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::parseAttribute): * html/HTMLDetailsElement.h: * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::collectStyleForAttribute): * html/HTMLDivElement.h: * html/HTMLElement.cpp: (WebCore::parseBorderWidthAttribute): (WebCore::HTMLElement::applyBorderAttributeToStyle): (WebCore::HTMLElement::mapLanguageAttributeToLocale): (WebCore::HTMLElement::collectStyleForAttribute): (WebCore::HTMLElement::parseAttribute): (WebCore::HTMLElement::applyAlignmentAttributeToStyle): (WebCore::HTMLElement::dirAttributeChanged): * html/HTMLElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::collectStyleForAttribute): (WebCore::HTMLEmbedElement::parseAttribute): * html/HTMLEmbedElement.h: * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::collectStyleForAttribute): * html/HTMLFontElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::parseAttribute): * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseAttribute): * html/HTMLFormElement.h: * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::parseAttribute): * html/HTMLFrameElement.h: * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseAttribute): * html/HTMLFrameElementBase.h: (HTMLFrameElementBase): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::collectStyleForAttribute): (WebCore::HTMLFrameSetElement::parseAttribute): * html/HTMLFrameSetElement.h: * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::collectStyleForAttribute): * html/HTMLHRElement.h: * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::collectStyleForAttribute): (WebCore::HTMLIFrameElement::parseAttribute): * html/HTMLIFrameElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::collectStyleForAttribute): (WebCore::HTMLImageElement::parseAttribute): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::collectStyleForAttribute): (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::parseMaxLengthAttribute): * html/HTMLInputElement.h: * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::parseAttribute): * html/HTMLKeygenElement.h: * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::collectStyleForAttribute): (WebCore::HTMLLIElement::parseAttribute): * html/HTMLLIElement.h: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseAttribute): * html/HTMLLinkElement.h: * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseAttribute): * html/HTMLMapElement.h: * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::collectStyleForAttribute): * html/HTMLMarqueeElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::parseAttribute): * html/HTMLMetaElement.h: * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::parseAttribute): * html/HTMLMeterElement.h: * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::collectStyleForAttribute): (WebCore::HTMLOListElement::parseAttribute): * html/HTMLOListElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::collectStyleForAttribute): (WebCore::HTMLObjectElement::parseAttribute): * html/HTMLObjectElement.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::parseAttribute): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): * html/HTMLOptionElement.h: * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::parseAttribute): * html/HTMLOutputElement.h: * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::collectStyleForAttribute): * html/HTMLParagraphElement.h: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::collectStyleForAttribute): * html/HTMLPlugInElement.h: * html/HTMLPreElement.cpp: (WebCore::HTMLPreElement::collectStyleForAttribute): * html/HTMLPreElement.h: * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::parseAttribute): * html/HTMLProgressElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseAttribute): * html/HTMLScriptElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseAttribute): (WebCore::HTMLSelectElement::parseMultipleAttribute): * html/HTMLSelectElement.h: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::parseAttribute): * html/HTMLStyleElement.h: * html/HTMLTableCaptionElement.cpp: (WebCore::HTMLTableCaptionElement::collectStyleForAttribute): * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::collectStyleForAttribute): (WebCore::HTMLTableCellElement::parseAttribute): * html/HTMLTableCellElement.h: * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::collectStyleForAttribute): (WebCore::HTMLTableColElement::parseAttribute): * html/HTMLTableColElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::collectStyleForAttribute): (WebCore::HTMLTableElement::parseAttribute): * html/HTMLTableElement.h: * html/HTMLTablePartElement.cpp: (WebCore::HTMLTablePartElement::collectStyleForAttribute): * html/HTMLTablePartElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::collectStyleForAttribute): (WebCore::HTMLTextAreaElement::parseAttribute): * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::parseAttribute): * html/HTMLTextFormControlElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::parseAttribute): * html/HTMLTrackElement.h: * html/HTMLUListElement.cpp: (WebCore::HTMLUListElement::collectStyleForAttribute): * html/HTMLUListElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::collectStyleForAttribute): (WebCore::HTMLVideoElement::parseAttribute): * html/HTMLVideoElement.h: * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/HTMLContentElement.h: * mathml/MathMLElement.cpp: (WebCore::MathMLElement::collectStyleForAttribute): * mathml/MathMLElement.h: * svg/SVGAElement.cpp: (WebCore::SVGAElement::parseAttribute): * svg/SVGAElement.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::parseAttribute): * svg/SVGAnimateMotionElement.h: * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimateTransformElement.h: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseAttribute): * svg/SVGAnimationElement.h: * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::parseAttribute): * svg/SVGCircleElement.h: * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::parseAttribute): * svg/SVGClipPathElement.h: * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::parseAttribute): * svg/SVGComponentTransferFunctionElement.h: * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::parseAttribute): * svg/SVGCursorElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::reportAttributeParsingError): (WebCore::SVGElement::parseAttribute): (WebCore::SVGElement::attributeChanged): * svg/SVGElement.h: * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::parseAttribute): * svg/SVGEllipseElement.h: * svg/SVGExternalResourcesRequired.cpp: (WebCore::SVGExternalResourcesRequired::parseAttribute): * svg/SVGExternalResourcesRequired.h: (SVGExternalResourcesRequired): * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::parseAttribute): * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::parseAttribute): * svg/SVGFEColorMatrixElement.h: * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::parseAttribute): * svg/SVGFEComponentTransferElement.h: * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::parseAttribute): * svg/SVGFECompositeElement.h: * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::parseAttribute): * svg/SVGFEConvolveMatrixElement.h: * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::parseAttribute): * svg/SVGFEDiffuseLightingElement.h: * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::parseAttribute): * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::parseAttribute): * svg/SVGFEDropShadowElement.h: * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::parseAttribute): * svg/SVGFEGaussianBlurElement.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::parseAttribute): * svg/SVGFEImageElement.h: * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::parseAttribute): * svg/SVGFELightElement.h: * svg/SVGFEMergeNodeElement.cpp: (WebCore::SVGFEMergeNodeElement::parseAttribute): * svg/SVGFEMergeNodeElement.h: * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::parseAttribute): * svg/SVGFEMorphologyElement.h: * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::parseAttribute): * svg/SVGFEOffsetElement.h: * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::parseAttribute): * svg/SVGFESpecularLightingElement.h: * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::parseAttribute): * svg/SVGFETileElement.h: * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::parseAttribute): * svg/SVGFETurbulenceElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::parseAttribute): * svg/SVGFilterElement.h: * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): * svg/SVGFilterPrimitiveStandardAttributes.h: (SVGFilterPrimitiveStandardAttributes): * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::parseAttribute): * svg/SVGFitToViewBox.h: (SVGFitToViewBox): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::parseAttribute): * svg/SVGFontFaceElement.h: * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::parseAttribute): * svg/SVGFontFaceUriElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::parseAttribute): * svg/SVGForeignObjectElement.h: * svg/SVGGElement.cpp: (WebCore::SVGGElement::parseAttribute): * svg/SVGGElement.h: * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::parseAttribute): * svg/SVGGlyphElement.h: * svg/SVGGlyphRefElement.cpp: (WebCore::SVGGlyphRefElement::parseAttribute): * svg/SVGGlyphRefElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::parseAttribute): * svg/SVGGradientElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::collectStyleForAttribute): (WebCore::SVGImageElement::parseAttribute): * svg/SVGImageElement.h: * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::sourceURI): * svg/SVGLangSpace.cpp: (WebCore::SVGLangSpace::parseAttribute): * svg/SVGLangSpace.h: (SVGLangSpace): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseAttribute): * svg/SVGLineElement.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::parseAttribute): * svg/SVGLinearGradientElement.h: * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::parseAttribute): * svg/SVGMPathElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::parseAttribute): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::parseAttribute): * svg/SVGMaskElement.h: * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::parseAttribute): * svg/SVGPathElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::parseAttribute): * svg/SVGPatternElement.h: * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::parseAttribute): * svg/SVGPolyElement.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::parseAttribute): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::parseAttribute): * svg/SVGRectElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseAttribute): * svg/SVGSVGElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::parseAttribute): * svg/SVGScriptElement.h: * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::parseAttribute): * svg/SVGStopElement.h: * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::parseAttribute): * svg/SVGStyleElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::collectStyleForAttribute): (WebCore::SVGStyledElement::parseAttribute): * svg/SVGStyledElement.h: * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::parseAttribute): * svg/SVGStyledTransformableElement.h: * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::parseAttribute): * svg/SVGSymbolElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::parseAttribute): * svg/SVGTRefElement.h: * svg/SVGTests.cpp: (WebCore::SVGTests::parseAttribute): * svg/SVGTests.h: (SVGTests): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::collectStyleForAttribute): (WebCore::SVGTextContentElement::parseAttribute): * svg/SVGTextContentElement.h: * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::parseAttribute): * svg/SVGTextElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseAttribute): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::parseAttribute): * svg/SVGTextPositioningElement.h: * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::parseAttribute): * svg/SVGURIReference.h: (SVGURIReference): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::parseAttribute): * svg/SVGUseElement.h: * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::parseAttribute): * svg/SVGViewElement.h: * svg/SVGZoomAndPan.cpp: (WebCore::SVGZoomAndPan::parseAttribute): * svg/SVGZoomAndPan.h: (SVGZoomAndPan): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseAttribute): * svg/animation/SVGSMILElement.h: 2012-05-15 Kenneth Russell Assertion failure running Mozilla's WebGL performance regression tests https://bugs.webkit.org/show_bug.cgi?id=85942 Reviewed by Stephen White. Fixed incorrect assumptions about source formats and buffer sizes when uploading to floating-point textures. Added code paths supporting the necessary conversions. Tests have been added to the WebGL conformance suite which cover these new code paths; they verify uploads of HTMLCanvasElement, HTMLImageElement, HTMLVideoElement, and ImageData to floating-point textures. However, because floating-point texture support is optional, and generally only supported on bots which run with real GPUs and not in virtual machines, it isn't feasible to incorporate these tests as layout tests. Ran the new WebGL conformance tests in Chromium on Linux; all pass. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractImageData): Properly compute size of destination buffer. (WebCore): Add pack/unpack routines for converting RGBA8/BGRA8 to floating point. (WebCore::doFloatingPointPacking): Support RGBA8 and BGRA8 source formats. (WebCore::isFloatingPointSource): Factored out logic for assertions. (WebCore::GraphicsContext3D::packPixels): Generalized assertions and logic. * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::getImageData): Properly compute size of destination buffer. * platform/graphics/cg/GraphicsContext3DCG.cpp: (WebCore::GraphicsContext3D::getImageData): Properly compute size of destination buffer. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): Properly compute size of destination buffer. * platform/graphics/skia/GraphicsContext3DSkia.cpp: (WebCore::GraphicsContext3D::getImageData): Properly compute size of destination buffer. 2012-05-15 James Robinson [chromium] Chromium port never sets USE(CG) so code behind it is dead https://bugs.webkit.org/show_bug.cgi?id=86537 Reviewed by Adrienne Walker. Deletes code behind USE(CG) in chromium-specific code and removes unneeded USE(SKIA) guards. * platform/chromium/DragImageRef.h: (WebCore): * platform/chromium/MIMETypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): * platform/chromium/ThemeChromiumMac.mm: (WebCore::paintStepper): * platform/graphics/chromium/PlatformImage.cpp: (WebCore::PlatformImage::updateFromImage): 2012-05-15 Keyar Hood Skia does not respect a specified InterpolationQuality https://bugs.webkit.org/show_bug.cgi?id=86249 Reviewed by Stephen White. The added functionality is not exposed to higher layers of webkit. Tests will be added that will exercise these changes when bug 82804 is fixed. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawImageBuffer): Code to have the useLowQualityScale cause the InterpolationQuality be be set to low for Chromium but remain as none for other platforms. * platform/graphics/skia/ImageSkia.cpp: (WebCore::limitResamplingMode): Added (WebCore): (WebCore::paintSkBitmap): (WebCore::Image::drawPattern): We now limit the resampling choice based on what InterpolationQuality is set as. InterpolationNone restricts resampling to RESAMPLE_NONE, InterpolationLow and InterpolationMedium restricts resampling to RESAMPLE_LINEAR. InterpolationHigh and InterpolationDefault do not change the resampling. Furthermore, the choice on how to set the filter bitmap flag in paintSkBitmap was made to be consistent with that in Image::drawPattern. 2012-05-15 Jeffrey Pfau ImageDocuments erroneously trigger beforeload events for the main resource https://bugs.webkit.org/show_bug.cgi?id=86543 Reviewed by Brady Eidson. No new tests; testing framework doesn't allow for testing ImageDocuments with injected JavaScript. * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): 2012-05-15 Dirk Pranke [chromium] ScrollElasticityController.mm doesn't compile with the 10.6 SDK on mac https://bugs.webkit.org/show_bug.cgi?id=86544 Reviewed by Anders Carlsson. This is a build fix for now until we can figure out what a better way to approach this is. * platform/mac/ScrollElasticityController.mm: (WebCore): 2012-05-15 Nate Chapin MainResourceLoader::load() always returns true, so make it return void and delete the related dead code. https://bugs.webkit.org/show_bug.cgi?id=86413 Reviewed by Alexey Proskuryakov. No new tests, cleanup only. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::startLoadingMainResource): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::load): * loader/MainResourceLoader.h: (MainResourceLoader): 2012-05-15 Ian Vollick [chromium] Ensure animations get ticked at least once when added. https://bugs.webkit.org/show_bug.cgi?id=86013 Reviewed by James Robinson. Tested in CCLayerTreeHostTestTickAnimationWhileBackgrounded.runSingleThreaded CCLayerTreeHostTestAddAnimationWithTimingFunction.runSingleThreaded CCLayerTreeHostTestSynchronizeAnimationStartTimes.runSingleThreaded CCLayerTreeHostTestAnimationFinishedEvents.runSingleThreaded * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::didAddAnimation): (WebCore): (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (CCSingleThreadProxyAnimationTimer): (WebCore::CCSingleThreadProxyAnimationTimer::create): (WebCore::CCSingleThreadProxyAnimationTimer::CCSingleThreadProxyAnimationTimer): (WebCore): (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::didAddAnimation): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore): * platform/graphics/chromium/cc/CCThreadProxy.h: 2012-05-15 Alexandre Elias [chromium] Fix unsafe viewport tag dispatch https://bugs.webkit.org/show_bug.cgi?id=80554 Reviewed by Adam Barth. In some uncommon situations (such as window.open() new tab on Android), dispatchViewportPropertiesDidChange may early-return without setting the page scale because the window size is not yet available from the embedder. At that point, the previous behavior was to call it again in layoutUpdated(), but this is unsafe since it leaves a pending needsLayout. I moved the dispatch call into WebViewImpl::didChangeContentsSize and WebViewImpl::resize() instead -- these represent more explicitly the situations where the inputs to the viewport tag calculation change. I removed the other dispatch call from setFrameRect as it's now redundant. Covered by FixedLayoutInitializeAtMinimumPageScale test introduced in http://webk.it/82949 (an assertion will fire there without this fix). * page/FrameView.cpp: (WebCore::FrameView::setFrameRect): 2012-05-15 Jer Noble r117147 causes a null-deref crash in DOMImplementation::createDocument() https://bugs.webkit.org/show_bug.cgi?id=86532 Reviewed by James Robinson. No new tests, but fixes many crashing tests. Protect against the possibility of being passed a NULL frame in DOMImplementation::createDocument(). * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): 2012-05-15 Julien Chaffraix Use posZOrderList() / negZOrderList() everywhere to avoid querying dirtied lists https://bugs.webkit.org/show_bug.cgi?id=86416 Reviewed by Simon Fraser. Covered by existing tests that are not ASSERTing after this change. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::update3DTransformedDescendantStatus): Added a call to updateZOrderLists() to the previous sites as nothing guarantees that we have recomputed our z-order lists. (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::hitTestLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::needsContentsCompositingLayer): Converted those functions to use the safe getters. * rendering/RenderLayer.h: (WebCore::RenderLayer::hasNegativeZOrderList): Newly added funtion to return if we have a negative z-order list. 2012-05-15 Abhishek Arya Crash due shadow tree parent confusion in SVG. https://bugs.webkit.org/show_bug.cgi?id=84248 Reviewed by Nikolas Zimmermann. Test: svg/foreignObject/viewport-foreignobject-crash.html When we try to make a decision on whether we need an outer SVGRoot container, we detect if we are in shadow tree or not. We also need to make sure that our parentOrHostElement is also an svg element. * svg/SVGElement.cpp: (WebCore::SVGElement::isOutermostSVGSVGElement): 2012-05-15 Lauro Neto [File API] URL methods handling null arguments https://bugs.webkit.org/show_bug.cgi?id=69693 Reviewed by Adam Barth. Per the latest editor's draft of the File API: http://dev.w3.org/2006/webapi/FileAPI/#dfn-createObjectURL Use null instead of undefined as return value when a null blob is given to URL.createObjectURL. Test: fast/files/url-null.html * html/DOMURL.idl: 2012-05-15 Jer Noble Unreviewed build fix [Qt]. Protect the definition of DOMImplementationSupportsTypeClient class with #if ENABLE(VIDEO) so as not to cause compilation errors on ports with VIDEO disabled. * dom/DOMImplementation.cpp: 2012-05-14 Jer Noble Site-specific hack: Disclaim WebM as a supported type on Mac for YouTube. https://bugs.webkit.org/show_bug.cgi?id=86409 Reviewed by Darin Adler. No new tests; site specific hack. Add a Mac-only site-specific hack which disclaims both video/webm and video/x-flv as supported types when the media element's document has a host of youtube.com. Add a new, pure-virtual prototype class for use by MediaPlayer::supportsType: * platform/graphics/MediaPlayer.h: (MediaPlayerSupportsTypeClient): (WebCore::MediaPlayerSupportsTypeClient::~MediaPlayerSupportsTypeClient): (WebCore::MediaPlayerSupportsTypeClient::mediaPlayerNeedsSiteSpecificHacks): (WebCore::MediaPlayerSupportsTypeClient::mediaPlayerDocumentHost): Use these new client calls to determine whether to apply the site-specific hack: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::supportsType): Add this prototype class as a superclass of HTMLMediaElement. Pass in the HTMLMediaElement's this pointer when calling MediaPlayer::supportsType(): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlayType): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::mediaPlayerNeedsSiteSpecificHacks): (WebCore::HTMLMediaElement::mediaPlayerDocumentHost): * html/HTMLMediaElement.h: As is HTMLMediaElement, a MediaPlayerSupportsTypeClient class is needed. Add a new class DOMImplementationSupportsTypeClient, an instance of which will be passed to MediaPlayer::supportsType(): * dom/DOMImplementation.cpp: (DOMImplementationSupportsTypeClient): (WebCore::DOMImplementationSupportsTypeClient::DOMImplementationSupportsTypeClient): (WebCore::DOMImplementation::createDocument): (WebCore::DOMImplementation::mediaPlayerNeedsSiteSpecificHacks): (WebCore::DOMImplementation::mediaPlayerDocumentHost): * dom/DOMImplementation.h: 2012-05-15 Anders Carlsson Use unaccelerated scrolling deltas when rubber-banding https://bugs.webkit.org/show_bug.cgi?id=86503 Reviewed by Sam Weinig. * WebCore.exp.in: * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): (PlatformWheelEvent): (WebCore::PlatformWheelEvent::scrollCount): (WebCore::PlatformWheelEvent::unacceleratedScrollingDeltaX): (WebCore::PlatformWheelEvent::unacceleratedScrollingDeltaY): Add scroll count and unaccelerated scrolling deltas. * platform/mac/ScrollElasticityController.mm: (WebCore::elasticDeltaForTimeDelta): (WebCore::elasticDeltaForReboundDelta): (WebCore::reboundDeltaForElasticDelta): Call the new WKSI functions. (WebCore::ScrollElasticityController::handleWheelEvent): Use the unaccelerated scrolling deltas when needed. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Add new WKSI functions. 2012-05-15 Terry Anderson [chromium] Compute the best target node on a GestureTap event https://bugs.webkit.org/show_bug.cgi?id=85101 Reviewed by Adam Barth. Using the tests in the touchadjustment/ directory. * WebCore.gypi: Include TouchAdjustment.* files. * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::zoomableIntersectionQuotient): (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric): No longer using the INFINITY constant due to problems with compiling on chromium win. 2012-05-15 Chris Rogers Add AudioSummingJunction class to handle fan-in (abstracted from AudioNodeInput) https://bugs.webkit.org/show_bug.cgi?id=86396 Reviewed by Kenneth Russell. No new tests. Existing layout tests already extensively test summing. * CMakeLists.txt: * GNUmakefile.list.am: Add AudioSummingJunction files to makefiles. * Modules/webaudio/AudioContext.cpp: * Modules/webaudio/AudioContext.h: (WebCore::AudioContext::handlePreRenderTasks): (WebCore::AudioContext::handlePostRenderTasks): (WebCore::AudioContext::deleteMarkedNodes): (WebCore::AudioContext::markSummingJunctionDirty): (WebCore::AudioContext::removeMarkedSummingJunction): (WebCore::AudioContext::handleDirtyAudioSummingJunctions): Simple munge from AudioNodeInput -> AudioSummingJunction * Modules/webaudio/AudioNodeInput.cpp: * Modules/webaudio/AudioNodeInput.h: (WebCore::AudioNodeInput::AudioNodeInput): (WebCore::AudioNodeInput::didUpdate): Remove logic from AudioNodeInput which now is being moved to AudioSummingJunction. * Modules/webaudio/AudioSummingJunction.cpp: Added. * Modules/webaudio/AudioSummingJunction.h: Added. (WebCore::AudioSummingJunction::AudioSummingJunction): (WebCore::AudioSummingJunction::~AudioSummingJunction): (WebCore::AudioSummingJunction::changedOutputs): (WebCore::AudioSummingJunction::updateRenderingState): (WebCore::AudioSummingJunction::context): (WebCore::AudioSummingJunction::numberOfRenderingConnections): (WebCore::AudioSummingJunction::renderingOutput): (WebCore::AudioSummingJunction::isConnected): (WebCore::AudioSummingJunction::numberOfConnections): Add AudioSummingJunction which is an abstraction to manage/track the connections from AudioNodeOutputs representing the fan-in points for unity gain summing junctions. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: Add AudioSummingJunction files to makefiles. 2012-05-15 Dan Bernstein Ruby annotation is incorrectly identified as a paragraph boundary https://bugs.webkit.org/show_bug.cgi?id=86507 Reviewed by Darin Adler. Test: editing/selection/paragraph-with-ruby.html * editing/htmlediting.cpp: (WebCore::isBlock): Changed to return false for ruby text. 2012-05-15 Philippe Normand [GTK] Un-used GStreamer linker options https://bugs.webkit.org/show_bug.cgi?id=86407 Reviewed by Martin Robinson. * GNUmakefile.am: Remove no-longer used webcore_libadd variable. 2012-05-15 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=86506 REGRESSION (tiled drawing): No scrollbar while page is loading -and corresponding Reviewed by Anders Carlsson. We have always had a mechanism in place to suppress painting overlay scrollbars while the page is loading. However, that mechaism is overriden if the page has been scrolled. It should be, anyway. It was not being overriden when the scrolling was handled as a wheel event by the scrolling tree. This patch takes advantage of the fact that ScrollingTree::handleWheelEvent() already calls back to the main thread for handleWheelEventPhase() and just patches handleWheelEventPhase to mark m_haveScrolledSincePageLoad as true. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEventPhase): 2012-05-15 Jessie Berlin WKContextSetCacheModel(contextref, kWKCacheModelDocumentViewer) doesn't prevent pages from going into the PageCache. https://bugs.webkit.org/show_bug.cgi?id=85891 Reviewed by Brady Eidson. Do not claim that it is possible to cache a page when the page cache has a capacity of 0. Covered by the modified DOMWindowExtensionNoCache WK2 API test. * history/PageCache.cpp: (WebCore::PageCache::canCache): Check m_capacity. * history/PageCache.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): canCache is no longer static on PageCache. 2012-05-15 James Robinson Unreviewed, rolling out r116811. http://trac.webkit.org/changeset/116811 https://bugs.webkit.org/show_bug.cgi?id=86257 Introduced layering violation * WebCore.gypi: 2012-05-15 Darin Adler Font copy constructor unnecessarily recalculates transcoding https://bugs.webkit.org/show_bug.cgi?id=86490 Reviewed by Dan Bernstein. * platform/graphics/Font.cpp: (WebCore::Font::Font): Copy m_needsTranscoding instead of recomputing it. 2012-05-15 Andreas Kling Deep copy PluginModuleInfo before passing across thread boundary. Reviewed by Anders Carlsson. * plugins/PluginData.h: (MimeClassInfo): (WebCore::MimeClassInfo::isolatedCopy): (PluginInfo): (WebCore::PluginInfo::isolatedCopy): 2012-05-15 Sheriff Bot Unreviewed, rolling out r116712. http://trac.webkit.org/changeset/116712 https://bugs.webkit.org/show_bug.cgi?id=86484 This patch is causing crashes in Chromium Canary builds (Requested by pilgrim_google__ on #webkit). * storage/StorageArea.h: (StorageArea): * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame): (WebCore::StorageAreaImpl::setItem): (WebCore::StorageAreaImpl::removeItem): (WebCore::StorageAreaImpl::clear): * storage/StorageAreaImpl.h: (StorageAreaImpl): 2012-05-15 Darin Adler Optimize save/restore with no drawing operations between them (shows up on some canvas benchmarks) https://bugs.webkit.org/show_bug.cgi?id=86448 Reviewed by Simon Fraser. Since canvas programmers sometimes end up doing extra save/restore pairs with no actual drawing in between, optimize that case by not realizing saves until we have to. This is doubly important because saves are costly. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Initialize m_unrealizedSaveCount. (WebCore::CanvasRenderingContext2D::isAccelerated): Improve performance by calling the drawingContext function only once. (WebCore::CanvasRenderingContext2D::reset): Set m_unrealizedSaveCount to 0. (WebCore::CanvasRenderingContext2D::realizeSavesLoop): Added. Replaces the save function as the function that actually pushes context onto the state stack. (WebCore::CanvasRenderingContext2D::restore): Added code to do an early return if we can do the restore just by decrementing the unrealized save count. (WebCore::CanvasRenderingContext2D::setStrokeStyle): Added calls to realizeSaves and replaced calls to state with calls to modifiableState. (WebCore::CanvasRenderingContext2D::setFillStyle): Ditto. (WebCore::CanvasRenderingContext2D::setLineWidth): Ditto. Also added an early out for cases where the line width is not changing. (WebCore::CanvasRenderingContext2D::setLineCap): Ditto. (WebCore::CanvasRenderingContext2D::setLineJoin): Ditto. (WebCore::CanvasRenderingContext2D::setMiterLimit): Ditto. (WebCore::CanvasRenderingContext2D::setShadowOffsetX): Ditto. (WebCore::CanvasRenderingContext2D::setShadowOffsetY): Ditto. (WebCore::CanvasRenderingContext2D::setShadowBlur): Ditto. (WebCore::CanvasRenderingContext2D::setShadowColor): Ditto. (WebCore::CanvasRenderingContext2D::setWebkitLineDash): Ditto. (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset): Ditto. (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Ditto. (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Ditto. (WebCore::CanvasRenderingContext2D::scale): Ditto. (WebCore::CanvasRenderingContext2D::rotate): Ditto. (WebCore::CanvasRenderingContext2D::translate): Ditto. (WebCore::CanvasRenderingContext2D::transform): Ditto. (WebCore::CanvasRenderingContext2D::setTransform): Ditto. (WebCore::CanvasRenderingContext2D::setStrokeColor): Ditto. (WebCore::CanvasRenderingContext2D::setFillColor): Ditto. (WebCore::CanvasRenderingContext2D::clip): Ditto. (WebCore::CanvasRenderingContext2D::clearRect): Changed implementation so it does not save the graphics context in the common case where shadows, global alpha, and global compositing operators do not interfer with the function's operation. This allowed us to get rid of the setAllAttributesToDefault function, which was used nowhere else. (WebCore::CanvasRenderingContext2D::setShadow): Added a new common bottleneck and made all the setShadow functions call it. (WebCore::CanvasRenderingContext2D::clearShadow): Changed to call the new setShadow. (WebCore::CanvasRenderingContext2D::setFont): Renamed tempDecl to the more friendly parsedStyle. Changed code structure so the CSS parser is deleted right after parsing is done. Used string concatenation instead of more expensive string append. Added calls to realizeSaves and modifiableState. (WebCore::CanvasRenderingContext2D::setTextAlign): Added calls to realizeSaves and replaced calls to state with calls to modifiableState. Also added an early out for cases where the alignment is not changing. (WebCore::CanvasRenderingContext2D::setTextBaseline): Ditto. * html/canvas/CanvasRenderingContext2D.h: Made save an inline function that bumps m_unrealizedSaveCount. Removed setAllAttributesToDefault. Added OVERRIDE for all the virtual function overrides, and made them all private. Moved m_path down with the other data members. Renamed the non-const state function to modifiableState. Added a realizeSaves function and the realizeSavesLoop for the unusual case where there is work to do. Added m_unrealizedSaveCount. 2012-05-15 Tommy Widenflycht MediaStream API: Setting onended on a LocalMediaStream triggers an assertion in V8 https://bugs.webkit.org/show_bug.cgi?id=86459 Reviewed by Adam Barth. LocalMediaStream inherits from MediaStream, but only MediaStream have the EventTarget idl attribute. Adding the attribute to LocalMediaStream as well fixes the issue. Test: fast/mediastream/LocalMediaStream-onended.html * Modules/mediastream/LocalMediaStream.idl: 2012-05-15 Terry Anderson [chromium] Remove unused code for tap target fuzzing https://bugs.webkit.org/show_bug.cgi?id=86252 Reviewed by Adam Barth. No tests required since this is a cleanup of unused code. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureTap): * page/EventHandler.h: (EventHandler): The touch adjustment code will be used to determine the best target for a GestureTap event instead of passing in a pre-targeted node. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (PlatformGestureEvent): A rectangular touch region is defined by the touch center and the delta values only, so gammaX and gammaY are not needed. 2012-05-15 Caio Marcelo de Oliveira Filho [Qt] WebKit with Qt5 hangs on Mac https://bugs.webkit.org/show_bug.cgi?id=79785 Reviewed by Tor Arne Vestbø. Delay the initialization of our QNetworkConfigurationManager used in NetworkStateNotifierPrivate. On Mac it was causing a race condition because it spawns a thread that triggers a static initializer in Qt, while in the main thread NetworkStateNotifier is being static initialized. On Mac the lock for static initializers is shared between all of them, causing a deadlock. The issue was also reported in http://openradar.appspot.com/11217150. * platform/network/qt/NetworkStateNotifierPrivate.h: (NetworkStateNotifierPrivate): (WebCore::NetworkStateNotifierPrivate::effectivelyOnline): * platform/network/qt/NetworkStateNotifierQt.cpp: (WebCore::NetworkStateNotifierPrivate::NetworkStateNotifierPrivate): (WebCore::NetworkStateNotifierPrivate::setNetworkAccessAllowed): (WebCore::NetworkStateNotifierPrivate::setOnlineState): (WebCore::NetworkStateNotifierPrivate::initialize): (WebCore): (WebCore::NetworkStateNotifierPrivate::~NetworkStateNotifierPrivate): (WebCore::NetworkStateNotifier::updateState): (WebCore::NetworkStateNotifier::NetworkStateNotifier): (WebCore::NetworkStateNotifier::setNetworkAccessAllowed): 2012-05-15 Allan Sandfeld Jensen Factor HitTestPoint out of HitTestResult. https://bugs.webkit.org/show_bug.cgi?id=85965 Reviewed by Simon Fraser. In preparation for handling transformations on area-based hit-testing, we need to factor test-point and test-area out of HitTestResult so that it can be transformed independently. To maintain the current API as closely as possible HitTestResult now inherit from HitTestPoint, representing the original untransformed hitTestPoint. No change in functionality. No new tests. * rendering/HitTestResult.cpp: (WebCore::HitTestPoint::HitTestPoint): (WebCore::HitTestPoint::~HitTestPoint): (WebCore::HitTestPoint::operator=): (WebCore::HitTestPoint::rectForPoint): (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::isSelected): (WebCore::HitTestResult::spellingToolTip): (WebCore::HitTestResult::replacedString): * rendering/HitTestResult.h: (HitTestPoint): (WebCore::HitTestPoint::point): (WebCore::HitTestPoint::roundedPoint): (WebCore::HitTestPoint::setPoint): (WebCore::HitTestPoint::isRectBasedTest): (WebCore::HitTestPoint::topPadding): (WebCore::HitTestPoint::rightPadding): (WebCore::HitTestPoint::bottomPadding): (WebCore::HitTestPoint::leftPadding): (HitTestResult): (WebCore::HitTestResult::hitTestPoint): (WebCore::HitTestPoint::rectForPoint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::hitTestList): 2012-05-15 Rob Buis Refactor SVG parts of Node::addEventListener/removeEventListener https://bugs.webkit.org/show_bug.cgi?id=86426 Reviewed by Nikolas Zimmermann. Move SVG parts of Node::addEventListener/removeEventListener into svg/. Now we do not have to check in Node::addEventListener/removeEventListener if we are dealing with an SVG element. Make tryAddEventListener/tryRemoveEventListener protected methods on Node to be able to use it in SVGElement. No new tests, since no change in behavior, just refactoring. * dom/Node.cpp: (WebCore::tryAddEventListener): (WebCore::Node::addEventListener): (WebCore::tryRemoveEventListener): (WebCore::Node::removeEventListener): * svg/SVGElement.cpp: (WebCore::collectInstancesForSVGElement): (WebCore): (WebCore::SVGElement::addEventListener): (WebCore::SVGElement::removeEventListener): * svg/SVGElement.h: (SVGElement): 2012-05-15 Andreas Kling RuleSet::addToRuleSet wastes a bit of Vector capacity. Reviewed by Antti Koivisto. Have makeRuleSet call shrinkToFit() on the vectors before returning them. This avoids wasting space for the rulesets constructed in collectFeatures(). * css/StyleResolver.cpp: (WebCore::makeRuleSet): 2012-05-15 Darin Adler [CG] CGImageCreateWithImageInRect is too slow, but for now we still need to use it https://bugs.webkit.org/show_bug.cgi?id=86340 Reviewed by Geoffrey Garen. This patch adds a subimage cache to defray the cost of CGImageCreateWithImageInRect. Later, we will restructure the code so it doesn't use that function, but at the moment there are CG issues blocking that change. * platform/graphics/cg/GraphicsContextCG.cpp: (SubimageCacheEntry): Added. An entry in the cache. (SubimageCacheEntryTraits): Added. Traits for the cache. (SubimageCacheHash): Added. Hash function for the cache. (SubimageCacheTimer): Added. Timer that clears the cache after a second of inactivity. (SubimageCacheWithTimer): Added. Cache and its timer. (WebCore::subimageCache): Added. Function returning the single global timer. (WebCore::SubimageCacheTimer::restart): Added. Start the timer. (WebCore::SubimageCacheTimer::fired): Added. Clear the cache when the timer fires. (SubimageRequest): Added. A key to look up in the cache. (SubimageCacheAdder): Added. Translator to add to the cache. (WebCore::subimage): Added. Puts an entry in the cache. (WebCore::GraphicsContext::drawNativeImage): Changed to call the subimage function. 2012-05-15 Eugene Klyuchnikov Web Inspector: AdvancedSearchController is not stopped then view is hidden. https://bugs.webkit.org/show_bug.cgi?id=86466 Reviewed by Vsevolod Vlasov. AdvancedSearchController overrides "wasHidden" method instead of "willHide". UI event-flow, not tested. * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype.willHide): Renamed function. 2012-05-15 Jocelyn Turcotte [Qt] http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html times out https://bugs.webkit.org/show_bug.cgi?id=84016 Reviewed by Simon Hausmann. Calling didFail abort the connection and doesn't activate the HEADERS_RECEIVED state. Since the goal of HEAD is to test then the request should be marked as finished also in cases of HTTP errors. This matches other ports behavior. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::shouldIgnoreHttpError): 2012-05-15 Allan Sandfeld Jensen [Qt][WK2] Fix scrolling in touch mode https://bugs.webkit.org/show_bug.cgi?id=75006 Reviewed by Kenneth Rohde Christiansen. * page/FrameView.cpp: (WebCore::FrameView::setFixedVisibleContentRect): On changes to fixedVisibleContentRect update scroll-animators position, and recalculate page-step sizes in scrollbars. * platform/ScrollView.cpp: (WebCore::ScrollView::scrollTo): Forward scrolling-request to the host window. (WebCore::ScrollView::updateScrollbars): Allow ScrollViews to have invisible scrollbars when scrolling is delegated. * platform/ScrollView.h: (ScrollView): 2012-05-15 Vsevolod Vlasov Web Inspector: Refactor SnippetsModel: extract SnippetStorage, make SnippetScriptMapping delegate calls to ScriptSnippetModel and provide public interface on ScriptSnippetModel in terms of uiSourceCodes https://bugs.webkit.org/show_bug.cgi?id=86477 Reviewed by Pavel Feldman. Extracted SnippetStorage to be reused for other snippet types. Made SnippetScriptMapping delegate all calls to ScriptSnippetModel and injected it in DebuggerPresentationModel. ScriptSnippetModel now provides public interface for ScriptsPanel in terms of uiSourceCodes. Tests: inspector/debugger/script-snippet-model.html inspector/snippet-storage.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): * inspector/front-end/ScriptSnippetModel.js: Added. (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype.get scriptMapping): (WebInspector.ScriptSnippetModel.prototype.createScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._rawLocationToUILocation): (WebInspector.ScriptSnippetModel.prototype._uiLocationToRawLocation.get if): (WebInspector.ScriptSnippetModel.prototype._uiLocationToRawLocation): (WebInspector.ScriptSnippetModel.prototype._uiSourceCodeList): (WebInspector.ScriptSnippetModel.prototype._releasedUISourceCodes): (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript): (WebInspector.ScriptSnippetModel.prototype._sourceURLForSnippet): (WebInspector.ScriptSnippetModel.prototype._snippetIdForSourceURL): (WebInspector.ScriptSnippetModel.prototype._snippetForSourceURL): (WebInspector.ScriptSnippetModel.prototype._reset): (WebInspector.SnippetScriptMapping): (WebInspector.SnippetScriptMapping.prototype.rawLocationToUILocation): (WebInspector.SnippetScriptMapping.prototype.uiLocationToRawLocation): (WebInspector.SnippetScriptMapping.prototype.uiSourceCodeList): (WebInspector.SnippetScriptMapping.prototype.snippetIdForSourceURL): (WebInspector.SnippetScriptMapping.prototype.addScript): (WebInspector.SnippetScriptMapping.prototype._uiSourceCodesAdded): (WebInspector.SnippetScriptMapping.prototype._uiSourceCodesRemoved): (WebInspector.SnippetScriptMapping.prototype.reset): (WebInspector.SnippetContentProvider): * inspector/front-end/SnippetStorage.js: Added. (WebInspector.SnippetStorage): (WebInspector.SnippetStorage.prototype.get namePrefix): (WebInspector.SnippetStorage.prototype._saveSettings): (WebInspector.SnippetStorage.prototype.set snippets): (WebInspector.SnippetStorage.prototype.snippetForId): (WebInspector.SnippetStorage.prototype.deleteSnippet): (WebInspector.SnippetStorage.prototype._snippetAdded): (WebInspector.SnippetStorage.prototype.reset.set this): (WebInspector.Snippet): (WebInspector.Snippet.fromObject): (WebInspector.Snippet.prototype.get id): (WebInspector.Snippet.prototype.get name): (WebInspector.Snippet.prototype.set name): (WebInspector.Snippet.prototype.get content): (WebInspector.Snippet.prototype.set content): (WebInspector.Snippet.prototype.serializeToObject): * inspector/front-end/SnippetsModel.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2012-05-15 Pavel Feldman Web Inspector: add show/hide debugger sidebar button. https://bugs.webkit.org/show_bug.cgi?id=86478 Reviewed by Vsevolod Vlasov. As with the navigator, but with no overlay. See the screenshot. * English.lproj/localizedStrings.js: * inspector/front-end/NavigatorOverlayController.js: (WebInspector.NavigatorOverlayController.prototype.set _pinNavigator): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype._debuggerResumed): (WebInspector.ScriptsPanel.prototype._showJavaScriptOutlineDialog): (WebInspector.ScriptsPanel.prototype._installDebuggerSidebarController.clickHandler): (WebInspector.ScriptsPanel.prototype._showDebuggerSidebar): (WebInspector.ScriptsPanel.prototype.set _hideDebuggerSidebar): * inspector/front-end/scriptsPanel.css: (#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents): (button.status-bar-item.scripts-debugger-show-hide-button): (.status-bar-item.scripts-debugger-show-hide-button > .glyph): (.status-bar-item.scripts-debugger-show-hide-button.toggled-shown > .glyph): (.status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph): 2012-05-15 Zoltan Herczeg NEONizing forceValidPreMultipliedPixels https://bugs.webkit.org/show_bug.cgi?id=86468 Reviewed by Nikolas Zimmermann. Optimize forceValidPreMultipliedPixels with ARM-NEON intrinsics. Existing tests cover this feature. * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::forceValidPreMultipliedPixels): 2012-05-15 Yury Semikhatsky Web Inspector: remove unnecessary setTimeout in HeapSnapshotGridNodes.js https://bugs.webkit.org/show_bug.cgi?id=86464 Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.childrenRetrieved): Posting a message to worker is already asynchronous, no need to postpone the call via setTimeout. (WebInspector.HeapSnapshotGridNode.prototype._populateChildren): 2012-05-15 Florin Malita Mask deformations when masked content is rotated https://bugs.webkit.org/show_bug.cgi?id=76527 Reviewed by Nikolas Zimmermann. Test: svg/repaint/mask-clip-target-transform.svg RenderSVGResource::markForLayoutAndParentResourceInvalidation() needs to also invalidate parent mask and clip resources, not just filters. * rendering/svg/RenderSVGResource.cpp: (WebCore::removeFromCacheAndInvalidateDependencies): (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): 2012-05-15 Pavel Feldman Web Inspector: merge show navigator with pin navigator buttons. https://bugs.webkit.org/show_bug.cgi?id=86469 Reviewed by Vsevolod Vlasov. See screenshots attached to the bug. * English.lproj/localizedStrings.js: * inspector/front-end/Images/navigatorPinButton.png: Removed. * inspector/front-end/Images/navigatorShowHideButton.png: * inspector/front-end/NavigatorOverlayController.js: (WebInspector.NavigatorOverlayController.prototype._toggleNavigator): (WebInspector.NavigatorOverlayController.prototype.set _pinNavigator): (WebInspector.NavigatorOverlayController.prototype.set showNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype.hideNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype._containingElementFocused): * inspector/front-end/SidebarOverlay.js: (WebInspector.SidebarOverlay): (WebInspector.SidebarOverlay.prototype.show): (WebInspector.SidebarOverlay.prototype.hide): * inspector/front-end/navigatorView.css: (.navigator-tabbed-pane .tabbed-pane-header-contents): * inspector/front-end/scriptsPanel.css: (.status-bar-item.scripts-navigator-show-hide-button > .glyph): (.status-bar-item.scripts-navigator-show-hide-button.toggled-shown > .glyph): (.status-bar-item.scripts-navigator-show-hide-button.toggled-overlay > .glyph): (button.status-bar-item.scripts-navigator-show-hide-button): (button.status-bar-item.scripts-navigator-show-hide-button.toggled-overlay): 2012-05-15 Yury Semikhatsky Web Inspector: implement "Reveal in Dominators view" context menu action https://bugs.webkit.org/show_bug.cgi?id=86455 Reviewed by Pavel Feldman. Implemented "Reveal in Dominators view" context menu action for objects in the console. Test: inspector/profiler/heap-snapshot-reveal-in-dominators-view.html * English.lproj/localizedStrings.js: * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._nodeForSnapshotObjectId): (WebInspector.HeapSnapshot.prototype.nodeClassName): (WebInspector.HeapSnapshot.prototype.dominatorIdsForNode): * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotDominatorsDataGrid): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.highlightObjectByHeapSnapshotId.didGetDominators): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.highlightObjectByHeapSnapshotId.expandNextDominator): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.highlightObjectByHeapSnapshotId): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.childForPosition): (WebInspector.HeapSnapshotGridNode.prototype.expandWithoutPopulate): (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.childrenRetrieved): (WebInspector.HeapSnapshotGridNode.prototype._populateChildren): (WebInspector.HeapSnapshotGridNode.prototype.sort): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId.didGetNodePosition): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId.didPopulateChildren): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.dominatorIdsForNode): * inspector/front-end/ProfilesPanel.js: (WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu.revealInSummaryView): (WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu.didReceiveHeapObjectId): (WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu): 2012-05-15 Yury Semikhatsky Web Inspector: exception when switching to heap profiler comparison view https://bugs.webkit.org/show_bug.cgi?id=86224 Reviewed by Pavel Feldman. Make sure the messages are dispatched in the same order as they are sent in case a fake worker is used for heap snapshot processing. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.TimerQueue): (WebInspector.TimerQueue.prototype.addTask): (WebInspector.TimerQueue.prototype._onTimeout): (WebInspector.TimerQueue.prototype._scheduleTimer): (WebInspector.HeapSnapshotFakeWorker): (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage): (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker): 2012-05-15 Zoltan Herczeg The ARM NEON optimized filters does not compile on THUMB2 https://bugs.webkit.org/show_bug.cgi?id=86457 Reviewed by Csaba Osztrogonác. We should disable the compilation on Thumb2 until we fix the code. * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformArithmeticSoftware): * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplyWorker): (WebCore::FEGaussianBlur::platformApply): * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApply): * platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp: * platform/graphics/filters/arm/FECompositeArithmeticNEON.h: * platform/graphics/filters/arm/FEGaussianBlurNEON.cpp: * platform/graphics/filters/arm/FEGaussianBlurNEON.h: * platform/graphics/filters/arm/FELightingNEON.cpp: * platform/graphics/filters/arm/FELightingNEON.h: 2012-05-15 MORITA Hajime Kill unnecessary RuntimeEnabledFeatures.h inclusion https://bugs.webkit.org/show_bug.cgi?id=86451 Reviewed by Kentaro Hara. No new tests. No behavior change. * dom/Element.cpp: * dom/ElementShadow.cpp: * dom/TreeScope.cpp: 2012-05-14 Shinya Kawanaka document.execCommand('Indent') in the direct child of ShadowRoot causes a crash. https://bugs.webkit.org/show_bug.cgi?id=86341 Reviewed by Ryosuke Niwa. When document.execCommand('Indent') is executed in the direct child of ShadowRoot, the scope variable of TextIterator becomes ShadowRoot. However, an element is assumed for it, so a crash happended. This patch enables TextIterator to have ShadowRoot as a scope variable. Test: editing/shadow/execcommand-indent-in-shadow.html * WebCore.exp.in: * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::doApply): * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): * editing/TextIterator.cpp: (WebCore::TextIterator::rangeFromLocationAndLength): * editing/TextIterator.h: (TextIterator): * editing/htmlediting.cpp: (WebCore::indexForVisiblePosition): (WebCore::visiblePositionForIndex): * editing/htmlediting.h: (WebCore): 2012-05-14 Shinya Kawanaka Node::shadowTreeRootNode() should return ShadowRoot instead of Node. https://bugs.webkit.org/show_bug.cgi?id=86428 Reviewed by Hajime Morita. Since Node::shadowTreeRootNode() returns only ShadowRoot or 0 now, its return type should be ShadowRoot. This patch changes the return type and adds include directive to build. No new tests, no change in behavior. * dom/Node.cpp: (WebCore::Node::shadowAncestorNode): (WebCore::Node::shadowTreeRootNode): * dom/Node.h: (WebCore): (Node): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): * dom/Range.cpp: (WebCore::Range::shadowTreeRootNode): * dom/Range.h: (Range): * editing/Editor.cpp: * editing/TextIterator.cpp: * editing/htmlediting.cpp: * html/shadow/ContentSelectorQuery.cpp: * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::detach): * page/EventHandler.cpp: 2012-05-14 Luke Macpherson Make StyleResolver::applyMatchedProperties and ::applyProperties use enum template parameter instead of bool. https://bugs.webkit.org/show_bug.cgi?id=86424 Reviewed by Dimitri Glazkov. This patch changes from using a boolean template parameter for StyleResolver::applyMatchedProperties and StyleResolver::applyProperties functions. The motivation for this change is that it paves the way for CSS Variables to make the value tri-state, which is a requirement because variable definitions must occur before high priority CSS properties such that they can be referenced by the latter. This change affects only the type signatures of those functions, and not their behavior. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: 2012-05-14 MORITA Hajime [Refactoring] Get rid of ContentDistribution::Item https://bugs.webkit.org/show_bug.cgi?id=86350 This change replaces the linked list on ContentDistribution with a Vector. We no longer link item class ContentDistribution::Item. This simplification also allows ContentDistribution to go. ContentDistribution is now just a typedef of Vector >. Reviewed by Dimitri Glazkov. No new tests. Covered by existing tests. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseNode): (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint): * dom/ElementShadow.cpp: * dom/ElementShadow.h: (ElementShadow): * dom/NodeRenderingContext.cpp: (WebCore::nextRendererOfInsertionPoint): (WebCore::previousRendererOfInsertionPoint): (WebCore::firstRendererOfInsertionPoint): (WebCore::lastRendererOfInsertionPoint): * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::distribute): (WebCore::ContentDistributor::clearDistribution): (WebCore::ContentDistributor::findInsertionPointFor): * html/shadow/ContentDistributor.h: (WebCore): (ContentDistributor): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::InsertionPoint): (WebCore::InsertionPoint::attachDistributedNode): (WebCore::InsertionPoint::assignShadowRoot): (WebCore::InsertionPoint::nextTo): (WebCore): (WebCore::InsertionPoint::previousTo): * html/shadow/InsertionPoint.h: Added a set of delegate method to m_distribution. (WebCore::InsertionPoint::hasDistribution): (WebCore::InsertionPoint::indexOf): (WebCore::InsertionPoint::size): (WebCore::InsertionPoint::at): (WebCore::InsertionPoint::first): (WebCore::InsertionPoint::last): (InsertionPoint): 2012-05-14 Tim Horton RenderLayer::repaintRectIncludingDescendants shouldn't include repaint rects of composited descendants https://bugs.webkit.org/show_bug.cgi?id=86429 Reviewed by Simon Fraser. Change repaintRectIncludingDescendants to not include repaint rects for composited child layers, and rename the function to make it more clear that that's what it does now. No new tests, scrolling performance optimization. * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants): * rendering/RenderLayer.h: (RenderLayer): 2012-05-14 Gavin Peters Add Prerenderer, PrerenderHandle and a chromium interface for Prerendering. https://bugs.webkit.org/show_bug.cgi?id=85005 Reviewed by Adam Barth. The prerender case isn't quite a resource load, and using resource loading to retrieve them has constrained the API, and unnecessarily complicated the loader. The new Prerenderer and PrerenderHandle let elements signal removal and unload to their platform. No new tests, as this interface requires a full platform to work, and doesn't affect layout. Test it with your platform when implemented for it. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore): (Document): (WebCore::Document::prerenderer): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::removedFrom): * html/LinkRelAttribute.cpp: (WebCore::LinkRelAttribute::LinkRelAttribute): * html/LinkRelAttribute.h: (LinkRelAttribute): * loader/LinkLoader.cpp: (WebCore::LinkLoader::loadLink): (WebCore::LinkLoader::released): * loader/LinkLoader.h: (WebCore): (LinkLoader): * loader/Prerenderer.cpp: Added. (WebCore): (WebCore::Prerenderer::create): (WebCore::Prerenderer::Prerenderer): (WebCore::Prerenderer::~Prerenderer): (WebCore::Prerenderer::render): (WebCore::Prerenderer::stop): (WebCore::Prerenderer::suspend): (WebCore::Prerenderer::resume): (WebCore::Prerenderer::document): (WebCore::Prerenderer::client): * loader/Prerenderer.h: Copied from Source/Platform/chromium/public/WebPrerender.h. (WebCore): (Prerenderer): * loader/PrerendererClient.cpp: Copied from Source/WebCore/html/LinkRelAttribute.h. (WebCore): (WebCore::PrerendererClient::supplementName): (WebCore::PrerendererClient::from): (WebCore::providePrerendererClientTo): * loader/PrerendererClient.h: Copied from Source/WebCore/html/LinkRelAttribute.h. (WebCore): (PrerendererClient): (WebCore::PrerendererClient::~PrerendererClient): (WebCore::PrerendererClient::PrerendererClient): * loader/cache/CachedResource.cpp: (WebCore::defaultPriorityForResourceType): (WebCore::cachedResourceTypeToTargetType): (WebCore::CachedResource::load): * loader/cache/CachedResource.h: (WebCore::CachedResource::ignoreForRequestCount): * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): (WebCore::CachedResourceLoader::requestLinkResource): (WebCore::CachedResourceLoader::checkInsecureContent): (WebCore::CachedResourceLoader::canRequest): * platform/PrerenderHandle.h: Copied from Source/Platform/chromium/public/WebPrerender.h. (WebCore): (PrerenderHandle): * platform/chromium/Prerender.cpp: Added. (WebCore): (WebCore::Prerender::Prerender): (WebCore::Prerender::~Prerender): (WebCore::Prerender::setState): (WebCore::Prerender::add): (WebCore::Prerender::cancel): (WebCore::Prerender::abandon): (WebCore::Prerender::suspend): (WebCore::Prerender::resume): * platform/chromium/Prerender.h: Copied from Source/Platform/chromium/public/WebPrerender.h. (WebCore): (Prerender): (ExtraData): (WebCore::Prerender::ExtraData::~ExtraData): (WebCore::Prerender::url): (WebCore::Prerender::referrer): (WebCore::Prerender::referrerPolicy): (WebCore::Prerender::setExtraData): (WebCore::Prerender::extraData): * platform/chromium/PrerenderHandle.cpp: Copied from Source/Platform/chromium/public/WebPrerender.h. (WebCore): (WebCore::PrerenderHandle::create): (WebCore::PrerenderHandle::PrerenderHandle): (WebCore::PrerenderHandle::~PrerenderHandle): (WebCore::PrerenderHandle::prerender): (WebCore::PrerenderHandle::add): (WebCore::PrerenderHandle::cancel): (WebCore::PrerenderHandle::abandon): (WebCore::PrerenderHandle::suspend): (WebCore::PrerenderHandle::resume): (WebCore::PrerenderHandle::url): (WebCore::PrerenderHandle::referrer): (WebCore::PrerenderHandle::referrerPolicy): * platform/chromium/support/WebPrerender.cpp: Copied from Source/Platform/chromium/public/WebPrerender.h. (WebKit::WebPrerender::WebPrerender): (WebKit): (WebKit::WebPrerender::~WebPrerender): (WebKit::WebPrerender::url): (WebKit::WebPrerender::referrer): (WebKit::WebPrerender::referrerPolicy): (WebKit::WebPrerender::setExtraData): (WebKit::WebPrerender::extraData): * platform/network/blackberry/ResourceRequest.h: * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::platformTargetTypeForRequest): * platform/network/chromium/ResourceRequest.h: 2012-05-14 Luke Macpherson Introduce ENABLE_CSS_VARIABLES compile flag. https://bugs.webkit.org/show_bug.cgi?id=86338 Reviewed by Dimitri Glazkov. Add a configuration option for CSS Variables support, disabling it by default. No new tests. This patch only introduces an unused build flag. * Configurations/FeatureDefines.xcconfig: 2012-05-14 Eric Seidel Styles are not recalculated when the seamless attribute is dynamically added/removed https://bugs.webkit.org/show_bug.cgi?id=86315 Reviewed by Andreas Kling. Covered by fast/frames/seamless/seamless-css-cascade.html. * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::isPresentationAttribute): - Make seamless a presentational attribute, which means style on the