2012-02-09 Ojan Vafai nesting horizontal flexboxes is broken https://bugs.webkit.org/show_bug.cgi?id=76867 Reviewed by David Hyatt. This is copied from RenderDeprecatedFlexibleBox and updated for RenderFlexibleBox and to handle vertical writing mode. Tests: css3/flexbox/preferred-widths-orthogonal.html css3/flexbox/preferred-widths.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computePreferredLogicalWidths): * rendering/RenderFlexibleBox.cpp: (WebCore::marginWidthForChild): (WebCore): (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): 2012-02-13 Mihnea Ovidenie Crash in RenderFlowThread::setRegionBoxesRegionStyle https://bugs.webkit.org/show_bug.cgi?id=78298 Reviewed by David Hyatt. Test: fast/regions/set-box-style-in-region-crash.html We have to make sure that anonymous block objects get their information in RenderFlowThread removed properly. * dom/Node.cpp: (WebCore::Node::diff): Correct a comment. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseAnonymousBoxChild): Remove the information for anonymous block from render flow thread. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::removeFlowChildInfo): (WebCore): (WebCore::RenderFlowThread::setRegionRangeForBox): Do not set region range if the flow thread does not have regions. * rendering/RenderFlowThread.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): Add an assert to make sure that after we remove an object, there is no remaining info in any render flow thread. 2012-02-13 Tony Chang Unreviewed, rolling out r107582. http://trac.webkit.org/changeset/107582 https://bugs.webkit.org/show_bug.cgi?id=78349 Broke three inspector interactive_ui_tests * English.lproj/localizedStrings.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._removeUISourceCode.get while): (WebInspector.ScriptsNavigator.prototype._removeUISourceCode): (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): 2012-02-13 Abhishek Arya Incorrect children placement in multi-column layout. https://bugs.webkit.org/show_bug.cgi?id=78160 Reviewed by David Hyatt. Test: fast/multicol/span/clone-before-after-content-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clone): no longer need to take care of making children noninline (remove fix r105769) since moveChild functions take care of adding the child properly if type of children differ. this function just makes sure to set the right value of childrenInline property. (WebCore::RenderBlock::splitBlocks): similar to moveChild functions below. (WebCore::RenderBlock::moveChildTo): when child is fullRemoveInsert (across different parents, e.g clones), we should use addChild function to make sure it handles the case of different type of children between fromBlock and toBlock correctly (specifically making children non-inline/wrapping inline children under anonymous blocks.). (WebCore::RenderBlock::moveChildrenTo): * rendering/RenderBlock.h: (RenderBlock): (WebCore::RenderBlock::moveAllChildrenTo): Rename to->toBlock. (WebCore::RenderBlock::moveChildrenTo): Rename to->toBlock. 2012-02-13 Stephen White [chromium] Implement Brightness and Contrast filters on composited layers. Fix Saturation filter. https://bugs.webkit.org/show_bug.cgi?id=78527 Reviewed by Kenneth Russell. Will be covered by existing tests in css3/filters, when enabled. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): 2012-02-13 Anders Carlsson Turn off edge antialiasing for tile cache tile layers https://bugs.webkit.org/show_bug.cgi?id=78533 Reviewed by Sam Weinig. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::createTileLayer): 2012-02-13 Enrica Casucci Build fix. Unreviewed. * WebCore.xcodeproj/project.pbxproj: 2012-02-13 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=26777 Add https pages to the page cache in some cases Reviewed by Anders Carlsson. Test: http/tests/navigation/https-in-page-cache.html * history/PageCache.cpp: (WebCore::PageCache::canCachePageContainingThisFrame): Allow HTTPS pages that do not specify cache-control: no-cache or cache-control: no-store into the page cache. This will match Firefox's behavior for HTTPS in their bfcache. 2012-02-10 Enrica Casucci Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies. https://bugs.webkit.org/show_bug.cgi?id=78282 This patch removes any accesss to the NSPasteboard object from the Pasteboard class which now makes use of a new pasteboardStrategy object that is implemented both in WebKit and WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy interface but this one more step in the direction of removing access to NSPasteboard from the WebProcess. As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes. Reviewed by Anders Carlsson. No new tests. No change in behavior, just code refactoring. * WebCore.exp.in: Added exported class PlatformPasteboard. * WebCore.xcodeproj/project.pbxproj: Added new files to the build. * editing/mac/EditorMac.mm: (WebCore::Editor::writeSelectionToPasteboard): New method signature that doesn't use OBJ-C types. * platform/Pasteboard.h: * platform/PasteboardStrategy.h: Added PasteboardStrategy abstract class. * platform/PlatformPasteboard.h: Added. This class implements access to NSPasteboard. * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::pasteboardStrategy): Added. * platform/mac/DragDataMac.mm: (WebCore::DragData::canSmartReplace): (WebCore::insertablePasteboardTypes): (WebCore::DragData::asURL): * platform/mac/PasteboardMac.mm: (WebCore::selectionPasteboardTypes): Changed to use Vector instead of NSArray. (WebCore::writableTypesForURL): Ditto. (WebCore::createWritableTypesForImage): Ditto. (WebCore::writableTypesForImage): Ditto. (WebCore::Pasteboard::Pasteboard): Removed access to NSPasteboard. (WebCore::Pasteboard::clear): Modified to use platformStrategies()->pasteboardStrategy(). (WebCore::Pasteboard::writeSelectionForTypes): Ditto. (WebCore::Pasteboard::writePlainText): Ditto. (WebCore::Pasteboard::writeSelection): Ditto. (WebCore::writeURLForTypes): Ditto. (WebCore::Pasteboard::writeURL): Ditto. (WebCore::writeFileWrapperAsRTFDAttachment): Ditto. (WebCore::Pasteboard::writeImage): Ditto. (WebCore::Pasteboard::writeClipboard): Ditto. (WebCore::Pasteboard::canSmartReplace): Ditto. (WebCore::Pasteboard::plainText): Ditto. (WebCore::documentFragmentWithRTF): Ditto. (WebCore::Pasteboard::documentFragment): Ditto. * platform/mac/PlatformPasteboardMac.mm: Added. (WebCore::PlatformPasteboard::PlatformPasteboard): (WebCore::PlatformPasteboard::getTypes): (WebCore::PlatformPasteboard::bufferForType): (WebCore::PlatformPasteboard::getPathnamesForType): (WebCore::PlatformPasteboard::stringForType): (WebCore::PlatformPasteboard::copy): (WebCore::PlatformPasteboard::setTypes): (WebCore::PlatformPasteboard::setBufferForType): (WebCore::PlatformPasteboard::setPathnamesForType): (WebCore::PlatformPasteboard::setStringForType): 2012-02-13 Raul Hudea [CSS Regions] Inconsistent text selection behavior in regions https://bugs.webkit.org/show_bug.cgi?id=76456 Reviewed by David Hyatt. Use the proper bounding rect when doing hit testing on flow threads. Based on initial patch by Alexandru Chiculita. Test: fast/regions/hit-test-region.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::nodeAtPoint): 2012-02-12 Andy Estes [Windows] Add API to enable inverted color drawing on a WebView https://bugs.webkit.org/show_bug.cgi?id=77382 Reviewed by Adam Roben. Implement CACFLayerTreeHost::setShouldInvertColors(), which instructs the layer tree host to render composited content with inverted colors. Test: platform/win/inverted-colors/non-composited.html * platform/graphics/ca/win/CACFLayerTreeHost.cpp: (WebCore::CACFLayerTreeHost::setShouldInvertColors): (WebCore): * platform/graphics/ca/win/CACFLayerTreeHost.h: (CACFLayerTreeHost): * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Use SOFT_LINK_OPTIONAL since WKCACFViewSetShouldInvertColors might not exist in older versions of WebKitQuartzCoreAdditions. (WebCore::WKCACFViewLayerTreeHost::setShouldInvertColors): (WebCore): * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: (WKCACFViewLayerTreeHost): 2012-02-13 Anders Carlsson The scrolling tree needs to know about the back forward state of the page https://bugs.webkit.org/show_bug.cgi?id=78523 Reviewed by Sam Weinig. In order to know if a page should rubber-band in the horizontal direction, the scrolling tree needs to know about the back/forward state of the page. * WebCore.exp.in: Export new symbols. * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): Initialize m_canGoBack and m_canGoForward. (WebCore::ScrollingTree::updateBackForwardState): Update m_canGoBack and m_canGoForward. * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::canGoBack): (WebCore::ScrollingTree::canGoForward): Add getters. * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::shouldRubberBandInDirection): Implement this, using canGoBack and canGoForward. 2012-02-13 Brady Eidson https://bugs.webkit.org/show_bug.cgi?id=78520 Cleanup PageCache::canCachePageContainingThisFrame readability Reviewed by Anders Carlsson. No new tests. (Code cleanup, no change in behavior) * history/PageCache.cpp: (WebCore::PageCache::canCachePageContainingThisFrame): Store three commonly getter-accessed variables in local variables for readability. 2012-02-13 Timothy Hatcher Don't include a separator before the "Inspect Element" context menu item when the context menu is empty. https://webkit.org/b/78312 Reviewed by Brian Weinstein. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::addInspectElementItem): Check itemCount before appending the separator. * platform/gtk/ContextMenuGtk.cpp: (WebCore::ContextMenu::itemCount): Added. Implement so this builds on GTK. 2012-02-13 Patrick Gansterer [WIN] Define HWND_MESSAGE if not done already https://bugs.webkit.org/show_bug.cgi?id=78341 Reviewed by Adam Roben. HWND_MESSAGE is not defined on WinCE. Set it to 0 when not defined to avoid #ifdefs. * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::Pasteboard): * platform/win/WindowsExtras.h: (WebCore): 2012-02-13 Chris Fleizach AX: element should be exposed through attributes https://bugs.webkit.org/show_bug.cgi?id=75727 Reviewed by Beth Dakin. Exposes an attribute indicating that an element has highlighting through attributedStringForRange. Also allows the search mechanism to find elements with this style. Test: platform/mac/accessibility/attributed-string-includes-highlighting.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch): (WebCore::AccessibilityObject::hasHighlighting): * accessibility/AccessibilityObject.h: * accessibility/mac/WebAccessibilityObjectWrapper.mm: (createAccessibilitySearchKeyMap): (AXAttributeStringSetStyle): 2012-02-13 Chris Fleizach AX: the web area should report that focus can be set to itself https://bugs.webkit.org/show_bug.cgi?id=78272 Reviewed by Beth Dakin. Test: platform/mac/accessibility/webarea-can-set-focus.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::canSetFocusAttribute): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::isDataTable): Fixed erroneous comment. 2012-02-13 Patrick Gansterer Port RunLoop to WinCE https://bugs.webkit.org/show_bug.cgi?id=76781 Reviewed by Adam Roben. * platform/win/RunLoopWin.cpp: (WebCore::RunLoop::registerRunLoopMessageWindowClass): 2012-02-10 Vsevolod Vlasov Web Inspector: Make ScriptsNavigator default file selector. https://bugs.webkit.org/show_bug.cgi?id=78349 Reviewed by Pavel Feldman. Moved ScriptsNavigator out of experiments. Introduced new setting "useScriptsNavigator" with true as default value. Updated scripts panel tests related to file selector. Tests: inspector/debugger/scripts-combobox-file-selector-history.html inspector/debugger/scripts-file-selector.html * English.lproj/localizedStrings.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._removeUISourceCode): (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded): (WebInspector.ScriptsPanel.prototype._addUISourceCode): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): 2012-02-13 Andreas Kling Make HTMLTableCaptionElement inherit from HTMLElement. Reviewed by Antti Koivisto. HTMLTableCaptionElement was already bypassing its base class (HTMLTablePartElement) and calling up to HTMLElement in all its overrides. Just make it an HTMLElement instead since it doesn't use anything from HTMLTablePartElement. Remove parseAttribute() overload since it's no longer needed. * html/HTMLTableCaptionElement.cpp: (WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement): (WebCore::HTMLTableCaptionElement::isPresentationAttribute): (WebCore::HTMLTableCaptionElement::collectStyleForAttribute): * html/HTMLTableCaptionElement.h: 2012-02-13 Andreas Kling HTMLMarqueeElement: Don't cache presence of truespeed attribute. Reviewed by Antti Koivisto. Out-of-line minimumDelay() and look up the "truespeed" attribute there instead of caching the minimum delay in parseAttribute(). Remove HTMLMarqueeElement::parseAttribute() as it's no longer needed. * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::HTMLMarqueeElement): (WebCore::HTMLMarqueeElement::minimumDelay): * html/HTMLMarqueeElement.h: (HTMLMarqueeElement): 2012-02-13 Andrey Kosyakov Web Inspector: [refactoring] factor common timeline UI state into TimelinePresentationModel https://bugs.webkit.org/show_bug.cgi?id=78501 Reviewed by Pavel Feldman. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged): (WebInspector.TimelineOverviewPane.prototype.update): (WebInspector.TimelineOverviewPane.prototype.sidebarResized): (WebInspector.TimelineOverviewPane.prototype._setWindowPosition): (WebInspector.TimelineOverviewPane.prototype.scrollWindow): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._createTopPane): (WebInspector.TimelinePanel.prototype.get statusBarItems): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._createStatusbarButtons): (WebInspector.TimelinePanel.prototype._createTimelineCategoryStatusBarCheckbox): (WebInspector.TimelinePanel.prototype._onCategoryCheckboxClicked): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype.sidebarResized): (WebInspector.TimelinePanel.prototype._updateBoundaries): (WebInspector.TimelinePanel.prototype._showPopover): (WebInspector.TimelinePresentationModel): (WebInspector.TimelinePresentationModel.prototype.get categories): (WebInspector.TimelinePresentationModel.prototype.addCategory): (WebInspector.TimelinePresentationModel.prototype.setWindowPosition): (WebInspector.TimelinePresentationModel.prototype.setCategoryVisibility): 2012-02-13 Joel Webber Use requestAnimationFrame callbacks to pump CSS animations https://bugs.webkit.org/show_bug.cgi?id=64591 Reviewed by James Robinson. No new tests needed (covered by tests in animations/*). * page/FrameView.cpp: (WebCore::FrameView::serviceScriptedAnimations): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateAnimations): (WebCore::AnimationControllerPrivate::updateAnimationTimer): (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): (WebCore::AnimationControllerPrivate::animationFrameCallbackFired): (WebCore::AnimationController::updateAnimations): (WebCore::AnimationController::serviceAnimations): * page/animation/AnimationController.h: * page/animation/AnimationControllerPrivate.h: 2012-02-13 Patrick Gansterer Add WindowsExtras.h https://bugs.webkit.org/show_bug.cgi?id=78340 Reviewed by Adam Roben. Add a new file to share common code for Win32/WinCE differences. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::PopupMenuWndProc): * platform/win/RunLoopWin.cpp: (WebCore::RunLoop::RunLoopWndProc): * platform/win/WindowsExtras.h: Added. (WebCore): (WebCore::getWindowPointer): (WebCore::setWindowPointer): 2012-02-13 Andreas Kling Don't mark element for style recalc when modifying its attribute style. Reviewed by Antti Koivisto. StylePropertySet::setNeedsStyleRecalc() shouldn't do anything for attribute styles. Their invalidation is handled exclusively by StyledElement::attributeChanged(). Elements with presentation attributes were being marked for style recalc twice, once when the attribute changed, and again during attribute style update, below the call to collectStyleForAttribute(). * css/StylePropertySet.cpp: (WebCore::StylePropertySet::setNeedsStyleRecalc): 2012-02-13 Caio Marcelo de Oliveira Filho Move attribute storage from NamedNodeMap to ElementAttributeData https://bugs.webkit.org/show_bug.cgi?id=77674 Reviewed by Andreas Kling. Move m_attributes vector from NamedNodeMap to ElementAttributeData. Make the remaining callsites interact with ElementAttributeData if possible. The parsing code is still interacting with NamedNodeMap, so some functions remained as wrappers there. A next change will it use ElementAttributeData instead. The code for DOM exported functions remained in NamedNodeMap. This implementation should move to Element in a next change, too. * dom/Attr.h: (Attr): * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributeMap): (WebCore::Element::removeAttribute): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::normalizeAttributes): * dom/Element.h: (Element): (WebCore::Element::ensureUpdatedAttributes): (WebCore::Element::ensureAttributeData): (WebCore): (WebCore::Element::updatedAttributeData): (WebCore::Element::ensureUpdatedAttributeData): These *AttributeData functions are the correct correct way for callers to touch the details of attribute storage. The "updated" variants will update invalid attributes before return. (WebCore::Element::setAttributesFromElement): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::~ElementAttributeData): (WebCore): (WebCore::ElementAttributeData::ensureInlineStyleDecl): (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::detachAttributesFromElement): (WebCore::ElementAttributeData::copyAttributesToVector): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::setAttributes): Make use of the assumption that this will only be called with a valid Element, since the only call site is an Element method. (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): Make use of the assumption this will only be called with a valid Element, since the only call site return early if there's no Element. * dom/ElementAttributeData.h: (ElementAttributeData): (WebCore::ElementAttributeData::length): (WebCore::ElementAttributeData::isEmpty): (WebCore::ElementAttributeData::attributeItem): (WebCore::ElementAttributeData::removeAttribute): (WebCore): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::getNamedItem): (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::item): (WebCore::NamedNodeMap::detachFromElement): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::length): (WebCore::NamedNodeMap::isEmpty): (WebCore::NamedNodeMap::attributeItem): (WebCore::NamedNodeMap::getAttributeItem): (WebCore::NamedNodeMap::getAttributeItemIndex): (WebCore::NamedNodeMap::shrinkToLength): (WebCore::NamedNodeMap::reserveInitialCapacity): (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): (NamedNodeMap): * dom/StyledElement.cpp: (WebCore::StyledElement::updateAttributeStyle): * dom/StyledElement.h: (WebCore::StyledElement::ensureInlineStyleDecl): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): * svg/properties/SVGAnimatedPropertySynchronizer.h: * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2012-02-13 Alexei Filippov Web Inspector: wrong percent calculations for empty snapshot. https://bugs.webkit.org/show_bug.cgi?id=78329 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype._createValueCell): 2012-02-13 Alexei Filippov Web Inspector: add class filter to heap profiler. https://bugs.webkit.org/show_bug.cgi?id=78362 Reviewed by Yury Semikhatsky. * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype.insertChild): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting): (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._nameFilterChanged): (WebInspector.DetailedHeapshotView.prototype._changeNameFilter): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view .constructors-view-grid): (.detailed-heapshot-view .constructors-view-toolbar): (.detailed-heapshot-view .constructors-view-toolbar input.constructors-view-filter): 2012-02-13 Peter Rybin Web Inspector: In Inspector.json PropertyDescriptor.writable should be declared optional https://bugs.webkit.org/show_bug.cgi?id=77917 Reviewed by Pavel Feldman. Property descriptor is fixed in Inspector.json. Also retroactively in 0.1 and 1.0. Injected script in instructed to never return null property values. * inspector/InjectedScriptSource.js: (.): * inspector/Inspector-0.1.json: * inspector/Inspector-1.0.json: * inspector/Inspector.json: 2012-02-13 ChangSeok Oh [GTK] Revise configuration for MHTML https://bugs.webkit.org/show_bug.cgi?id=78364 Reviewed by Gustavo Noronha Silva. Added mhtml directory and removed target files duplicated to build when enabling mhtml. Archive.cpp, ArchiveFactory.cpp & their headers are included at the above line. This duplication has caused build-break if mhtml is enabled. No new tests, since no new features. * GNUmakefile.am: * GNUmakefile.list.am: 2012-02-06 Raphael Kubo da Costa [EFL] Drop support for the Curl network backend. https://bugs.webkit.org/show_bug.cgi?id=77874 Reviewed by Eric Seidel. Nobody seems to be maintaining the Curl backend in WebCore, the EFL port developers all seem to be using the Soup backend and the port itself has many features which are only implemented for the latter. No new tests, just some dependency plumbing. * PlatformEfl.cmake: Build the glib/soup source files unconditionally. * platform/efl/FileSystemEfl.cpp: Remove ENABLE(GLIB_SUPPORT) check. 2012-02-13 Pavel Feldman Web Inspector: wrap settings selector text and adding a rule with undoable actions. https://bugs.webkit.org/show_bug.cgi?id=78482 Reviewed by Yury Semikhatsky. Tests: inspector/styles/undo-add-new-rule.html inspector/styles/undo-set-selector-text.html * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::StyleSheetAction::StyleSheetAction): (InspectorCSSAgent::StyleSheetAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::SetStyleSheetTextAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::perform): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::undo): (WebCore::InspectorCSSAgent::SetPropertyTextAction::SetPropertyTextAction): (WebCore::InspectorCSSAgent::SetPropertyTextAction::perform): (WebCore::InspectorCSSAgent::SetPropertyTextAction::undo): (WebCore::InspectorCSSAgent::SetPropertyTextAction::mergeId): (WebCore::InspectorCSSAgent::TogglePropertyAction::TogglePropertyAction): (WebCore::InspectorCSSAgent::TogglePropertyAction::perform): (WebCore::InspectorCSSAgent::TogglePropertyAction::undo): (InspectorCSSAgent::SetRuleSelectorAction): (WebCore::InspectorCSSAgent::SetRuleSelectorAction::SetRuleSelectorAction): (WebCore::InspectorCSSAgent::SetRuleSelectorAction::perform): (WebCore::InspectorCSSAgent::SetRuleSelectorAction::undo): (WebCore): (InspectorCSSAgent::AddRuleAction): (WebCore::InspectorCSSAgent::AddRuleAction::AddRuleAction): (WebCore::InspectorCSSAgent::AddRuleAction::perform): (WebCore::InspectorCSSAgent::AddRuleAction::undo): (WebCore::InspectorCSSAgent::AddRuleAction::newRuleId): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::bindStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::styleSheetChanged): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::reparseStyleSheet): (WebCore::InspectorStyleSheet::ruleSelector): (WebCore): (WebCore::InspectorStyleSheet::setRuleSelector): (WebCore::InspectorStyleSheet::addRule): (WebCore::InspectorStyleSheet::deleteRule): (WebCore::InspectorStyleSheet::setPropertyText): (WebCore::InspectorStyleSheet::toggleProperty): (WebCore::InspectorStyleSheet::fireStyleSheetChanged): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (InspectorStyleSheet): (WebCore::InspectorStyleSheet::styleId): (InspectorStyleSheetForInlineStyle): 2012-02-13 Hayato Ito Rename names defined in ContentInclutionSelector to more intuitive names. https://bugs.webkit.org/show_bug.cgi?id=78333 Reviewed by Hajime Morita. This is just refactoring, renaming non-intuitive names to more intuitive names so that they match the terms in the spec. No tests. No change in behavior. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::nextRendererOf): (WebCore::previousRendererOf): (WebCore::firstRendererOf): (WebCore::lastRendererOf): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: (NodeRenderingContext): (WebCore::NodeRenderingContext::insertionPoint): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::insertionPointFor): (WebCore::ShadowRoot::isSelectorActive): (WebCore::ShadowRoot::attach): (WebCore::ShadowRoot::selector): (WebCore::ShadowRoot::ensureSelector): * dom/ShadowRoot.h: (WebCore): (ShadowRoot): * html/shadow/ContentInclusionSelector.h: Removed. * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::HTMLContentElement): (WebCore::HTMLContentElement::attach): (WebCore::HTMLContentElement::detach): * html/shadow/HTMLContentElement.h: (WebCore): (WebCore::HTMLContentElement::selections): (WebCore::HTMLContentElement::hasSelection): (HTMLContentElement): * html/shadow/HTMLContentSelector.cpp: Renamed from Source/WebCore/html/shadow/ContentInclusionSelector.cpp. (WebCore): (WebCore::HTMLContentSeleciton::append): (WebCore::HTMLContentSeleciton::unlink): (WebCore::HTMLContentSelectionList::HTMLContentSelectionList): (WebCore::HTMLContentSelectionList::~HTMLContentSelectionList): (WebCore::HTMLContentSelectionList::find): (WebCore::HTMLContentSelectionList::clear): (WebCore::HTMLContentSelectionList::append): (WebCore::HTMLContentSelector::HTMLContentSelector): (WebCore::HTMLContentSelector::~HTMLContentSelector): (WebCore::HTMLContentSelector::select): (WebCore::HTMLContentSelector::unselect): (WebCore::HTMLContentSelector::findFor): (WebCore::HTMLContentSelector::didSelect): (WebCore::HTMLContentSelector::willSelectOver): * html/shadow/HTMLContentSelector.h: Added. (WebCore): (HTMLContentSeleciton): (WebCore::HTMLContentSeleciton::insertionPoint): (WebCore::HTMLContentSeleciton::node): (WebCore::HTMLContentSeleciton::next): (WebCore::HTMLContentSeleciton::previous): (WebCore::HTMLContentSeleciton::HTMLContentSeleciton): (WebCore::HTMLContentSeleciton::create): (HTMLContentSelectionList): (WebCore::HTMLContentSelectionList::first): (WebCore::HTMLContentSelectionList::last): (WebCore::HTMLContentSelectionList::isEmpty): (HTMLContentSelectionSet): (WebCore::HTMLContentSelectionSet::add): (WebCore::HTMLContentSelectionSet::remove): (WebCore::HTMLContentSelectionSet::isEmpty): (Translator): (WebCore::HTMLContentSelectionSet::Translator::hash): (WebCore::HTMLContentSelectionSet::Translator::equal): (WebCore::HTMLContentSelectionSet::Hash::hash): (WebCore::HTMLContentSelectionSet::Hash::equal): (Hash): (WebCore::HTMLContentSelectionSet::find): (HTMLContentSelector): (WebCore::HTMLContentSelector::hasCandidates): * testing/Internals.cpp: (WebCore::Internals::includerFor): 2012-02-13 No'am Rosenthal [Texmap] morphing-cubes animation appears too close when clicking the button https://bugs.webkit.org/show_bug.cgi?id=78476 Fixed bug in TextureMapperAnimation that made transform animations that go to/from identity to not work. Reviewed by Simon Hausmann. No behavior changes. * platform/graphics/texmap/TextureMapperAnimation.cpp: (WebCore::applyTransformAnimation): 2012-02-13 Yosifumi Inoue [Forms] Use enum instead of bool for HTMLInputElement::setValue https://bugs.webkit.org/show_bug.cgi?id=75217 Reviewed by Kent Tamura. Use TextFieldEventBehavior enum instead of sendChangeEvent bool parameter for HTMLInputElement::setValue method. This new enum parameter will be extended to dispatch input and change events when user agent populates input field as specified in "Common events behavior" of HTML5 standard. This patch is required for fixing bug 75067 "[Forms] Spin buttons of number input type should fire both input and change event." No new tests. Existing tests cover this patch. * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): * html/BaseCheckableInputType.h: * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsNumber): * html/BaseDateAndTimeInputType.h: * html/CheckboxInputType.cpp: (WebCore::CheckboxInputType::willDispatchClick): * html/ColorInputType.cpp: (WebCore::ColorInputType::setValue): * html/ColorInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::applyStep): (WebCore::HTMLInputElement::stepUp): (WebCore::HTMLInputElement::stepDown): (WebCore::HTMLInputElement::setChecked): (WebCore::HTMLInputElement::setValueForUser): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setValueInternal): (WebCore::HTMLInputElement::setValueAsNumber): (WebCore::HTMLInputElement::stepUpFromRenderer): * html/HTMLInputElement.h: * html/HTMLTextFormControlElement.h: * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValueAsNumber): (WebCore::InputType::setValue): * html/InputType.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsNumber): * html/NumberInputType.h: * html/RadioInputType.cpp: (WebCore::RadioInputType::willDispatchClick): * html/RangeInputType.cpp: (WebCore::RangeInputType::setValueAsNumber): (WebCore::RangeInputType::handleKeydownEvent): (WebCore::RangeInputType::setValue): * html/RangeInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): * html/TextFieldInputType.h: 2012-02-13 Andreas Kling Move attribute style invalidation to attributeChanged(). Reviewed by Antti Koivisto. Moved attribute style invalidation out of the parseAttribute() overloads and added an "isPresentationAttribute(Attribute*) virtual to StyledElement. Returning true for a given Attribute will cause attribute style invalidation when that attribute passes through attributeChanged(). Removed a couple of parseAttribute() overloads whose only remaining purpose was invalidating attribute style. For form elements that deliberately don't map the "align" attribute, added short-circuits in isPresentationAttribute instead of falling back to the respective base class (which may othweise then map "align") * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * dom/StyledElement.h: (WebCore::StyledElement::isPresentationAttribute): * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::isPresentationAttribute): * html/HTMLBRElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::isPresentationAttribute): (WebCore::HTMLBodyElement::collectStyleForAttribute): (WebCore::HTMLBodyElement::parseAttribute): * html/HTMLBodyElement.h: * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::isPresentationAttribute): (WebCore::HTMLButtonElement::parseAttribute): * html/HTMLButtonElement.h: * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::isPresentationAttribute): * html/HTMLDivElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::isPresentationAttribute): (WebCore::HTMLElement::parseAttribute): * html/HTMLElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::isPresentationAttribute): (WebCore::HTMLEmbedElement::parseAttribute): * html/HTMLEmbedElement.h: * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::isPresentationAttribute): * html/HTMLFontElement.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::isPresentationAttribute): (WebCore::HTMLFrameSetElement::parseAttribute): * html/HTMLFrameSetElement.h: * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::isPresentationAttribute): (WebCore::HTMLHRElement::collectStyleForAttribute): * html/HTMLHRElement.h: * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::isPresentationAttribute): (WebCore::HTMLIFrameElement::collectStyleForAttribute): (WebCore::HTMLIFrameElement::parseAttribute): * html/HTMLIFrameElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::isPresentationAttribute): (WebCore::HTMLImageElement::collectStyleForAttribute): (WebCore::HTMLImageElement::parseAttribute): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isPresentationAttribute): (WebCore::HTMLInputElement::collectStyleForAttribute): (WebCore::HTMLInputElement::parseAttribute): * html/HTMLInputElement.h: * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::isPresentationAttribute): (WebCore::HTMLLIElement::parseAttribute): * html/HTMLLIElement.h: * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::isPresentationAttribute): (WebCore::HTMLMarqueeElement::collectStyleForAttribute): (WebCore::HTMLMarqueeElement::parseAttribute): * html/HTMLMarqueeElement.h: * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::isPresentationAttribute): (WebCore::HTMLOListElement::parseAttribute): * html/HTMLOListElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::isPresentationAttribute): (WebCore::HTMLObjectElement::parseAttribute): * html/HTMLObjectElement.h: * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::isPresentationAttribute): * html/HTMLParagraphElement.h: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::isPresentationAttribute): (WebCore::HTMLPlugInElement::collectStyleForAttribute): * html/HTMLPlugInElement.h: * html/HTMLPreElement.cpp: (WebCore::HTMLPreElement::isPresentationAttribute): (WebCore::HTMLPreElement::collectStyleForAttribute): * html/HTMLPreElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::isPresentationAttribute): (WebCore::HTMLSelectElement::parseAttribute): * html/HTMLSelectElement.h: * html/HTMLTableCaptionElement.cpp: (WebCore::HTMLTableCaptionElement::isPresentationAttribute): (WebCore::HTMLTableCaptionElement::parseAttribute): * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::isPresentationAttribute): (WebCore::HTMLTableCellElement::collectStyleForAttribute): (WebCore::HTMLTableCellElement::parseAttribute): * html/HTMLTableCellElement.h: * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::isPresentationAttribute): (WebCore::HTMLTableColElement::parseAttribute): * html/HTMLTableColElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::isPresentationAttribute): (WebCore::HTMLTableElement::parseAttribute): * html/HTMLTableElement.h: * html/HTMLTablePartElement.cpp: (WebCore::HTMLTablePartElement::isPresentationAttribute): (WebCore::HTMLTablePartElement::collectStyleForAttribute): * html/HTMLTablePartElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::isPresentationAttribute): (WebCore::HTMLTextAreaElement::parseAttribute): * html/HTMLTextAreaElement.h: * html/HTMLUListElement.cpp: (WebCore::HTMLUListElement::isPresentationAttribute): (WebCore::HTMLUListElement::collectStyleForAttribute): * html/HTMLUListElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::isPresentationAttribute): (WebCore::HTMLVideoElement::parseAttribute): * html/HTMLVideoElement.h: * mathml/MathMLElement.cpp: (WebCore::MathMLElement::isPresentationAttribute): (WebCore::MathMLElement::collectStyleForAttribute): * mathml/MathMLElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::isPresentationAttribute): (WebCore::SVGImageElement::parseAttribute): * svg/SVGImageElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::isPresentationAttribute): (WebCore::SVGStyledElement::parseAttribute): * svg/SVGStyledElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::isPresentationAttribute): (WebCore::SVGTextContentElement::parseAttribute): * svg/SVGTextContentElement.h: 2012-02-13 Kentaro Hara Add [JSCustomToJSObject] IDL attribute to interfaces that have custom toJS() but do not have custom toV8() https://bugs.webkit.org/show_bug.cgi?id=78466 Reviewed by Adam Barth. This is the second step to remove hard-coding in HasCustomToV8Implementation() in CodeGeneratorV8.pm. This patch replaces [JSCustomToJS] with [JSCustomToJSObject] for interfaces which have custom toJS() but do not have custom toV8(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (HasCustomToV8Implementation): I found that AbstractWorker and CanvasRenderingContext are the only IDL files to which I need to add [JSCustomToJSObject]. Other IDL files which had been listed here do not have [JSCustomToJS]. * html/canvas/CanvasRenderingContext.idl: * workers/AbstractWorker.idl: 2012-02-13 Andreas Kling Avoid unnecessary work when evaluating style sharing candidates. Reviewed by Antti Koivisto. Do the cheap checks (bitfields, pointers) before calling virtuals and doing hash lookups. Remove comparison of attributes that are reflected in the attribute styles (cellpadding.) Moved comparison of "type" and "readonly" attributes into the more specific canShareStyleWithControl() since they are only relevant for input elements. Don't bother calling isFormControlElement() on both elements as they already have the same tagQName(). Altogether this knocks off ~8ms worth of samples per cycle of the "Moz" page cycler test. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::isCommonAttributeSelectorAttribute): 2012-02-13 Arko Saha is not keyboard accessible. https://bugs.webkit.org/show_bug.cgi?id=75478 Reviewed by Hajime Morita. Toggle the content of
element on pressing Enter or Spacebar key on a focused element. Test: fast/html/details-keyboard-show-hide.html * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::supportsFocus): (WebCore): (WebCore::HTMLSummaryElement::defaultEventHandler): * html/HTMLSummaryElement.h: (HTMLSummaryElement): 2012-02-13 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=78434 Unreviewed - temporarily reverting r107498 will I fix a couple of testcases. * bindings/js/JSDOMWindowBase.cpp: (WebCore): * bindings/js/JSDOMWindowBase.h: (JSDOMWindowBase): 2012-02-13 Ilya Tikhonovsky Web Inspector: get rid of cycles in containment view of an object. https://bugs.webkit.org/show_bug.cgi?id=78462 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): 2012-02-12 Adam Barth Remove ENABLE(MEDIA_STREAM) from Navigator.h https://bugs.webkit.org/show_bug.cgi?id=78467 Reviewed by Kentaro Hara. Navigator.webkitGetUser media doesn't really have anything to do with Navigator.cpp. This patch moves it into the mediastream directory and removes the ENABLE(MEDIA_STREAM) ifdefs in Navigator.h and Navigator.cpp. * GNUmakefile.list.am: * WebCore.gypi: * mediastream/NavigatorMediaStream.cpp: Added. (WebCore): (WebCore::NavigatorMediaStream::NavigatorMediaStream): (WebCore::NavigatorMediaStream::~NavigatorMediaStream): (WebCore::NavigatorMediaStream::webkitGetUserMedia): * mediastream/NavigatorMediaStream.h: Added. (WebCore): (NavigatorMediaStream): * mediastream/NavigatorMediaStream.idl: Added. * page/Navigator.cpp: (WebCore): * page/Navigator.h: (WebCore): (Navigator): * page/Navigator.idl: 2012-02-12 Adam Barth Navigator.webkitGetUserMedia doesn't need to be custom https://bugs.webkit.org/show_bug.cgi?id=78464 Reviewed by Eric Seidel. The code generator has gotten smarter since this function was added. * GNUmakefile.list.am: * UseV8.cmake: * WebCore.gypi: * bindings/js/JSNavigatorCustom.cpp: Removed. * bindings/v8/custom/V8NavigatorCustom.cpp: Removed. * page/Navigator.idl: 2012-02-12 Adam Barth Move ENABLE(GAMEPAD) logic out of Navigator.h/cpp https://bugs.webkit.org/show_bug.cgi?id=78457 Reviewed by Hajime Morita. This patch moves GAMEPAD-specific logic out of Navigator by introducing the concept of a NavigatorSupplement, analogous to the recently introduced PageSupplement. * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): (WebCore): (WebCore::NavigatorGamepad::webkitGamepads): (WebCore::NavigatorGamepad::gamepads): * Modules/gamepad/NavigatorGamepad.h: (NavigatorGamepad): * WebCore.gypi: * dom/DeviceMotionController.cpp: (WebCore::DeviceMotionController::supplementName): * page/Navigator.cpp: (WebCore::Navigator::provideSupplement): (WebCore): (WebCore::Navigator::requireSupplement): * page/Navigator.h: (Navigator): * page/Page.h: (Page): * page/PageSupplement.h: - This patch cleans up some nits in PageSupplement. (WebCore): (PageSupplement): 2012-02-12 Kentaro Hara Add a [V8CustomToJSObject] IDL attribute https://bugs.webkit.org/show_bug.cgi?id=78450 Reviewed by Adam Barth. This is the first step to remove hard-coding in HasCustomToV8Implementation() in CodeGeneratorV8.pm. This patch adds [V8CustomToJSObject] to interfaces which have custom toV8() but do not have custom toJS(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Replaced hard-coding with [V8CustomToJSObject]. (HasCustomToV8Implementation): * css/CSSStyleSheet.idl: Added [V8CustomToJSObject]. * dom/DOMStringMap.idl: * dom/Element.idl: * dom/NamedNodeMap.idl: * html/DOMTokenList.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/canvas/CanvasPixelArray.idl: * inspector/ScriptProfile.idl: * inspector/ScriptProfileNode.idl: * page/DOMWindow.idl: * page/Location.idl: * svg/SVGDocument.idl: * svg/SVGElement.idl: * workers/WorkerContext.idl: 2012-02-12 David Barr CSS3 currentColor on outline-color gets treated as inherit https://bugs.webkit.org/show_bug.cgi?id=73180 Reviewed by Antti Koivisto. The CSS2 and CSS3 UI modules state that outline-color is not inherited. Make it so. http://www.w3.org/TR/CSS2/ui.html#propdef-outline-color http://www.w3.org/TR/css3-ui/#outline-color Test: fast/css/outline-currentcolor.html * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 2012-02-12 Antti Koivisto CSSPageRule should inherit from CSSRule instead of CSSStyleRule https://bugs.webkit.org/show_bug.cgi?id=78452 Reviewed by Anders Carlsson. This matches CSSOM and eliminates the only subclass of CSSStyleRule, enabling further refactoring. * css/CSSPageRule.cpp: (WebCore::CSSPageRule::CSSPageRule): (WebCore::CSSPageRule::~CSSPageRule): (WebCore): (WebCore::CSSPageRule::selectorText): (WebCore::CSSPageRule::setSelectorText): (WebCore::CSSPageRule::cssText): * css/CSSPageRule.h: (CSSPageRule): (WebCore::CSSPageRule::style): (WebCore::CSSPageRule::selector): (WebCore::CSSPageRule::properties): (WebCore::CSSPageRule::adoptSelectorVector): (WebCore::CSSPageRule::setDeclaration): * css/CSSRule.cpp: (WebCore::CSSRule::cssText): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::generateSelectorText): * css/CSSStyleSelector.cpp: (WebCore::RuleSet::pageRules): (RuleSet): (WebCore::RuleSet::addPageRule): (WebCore::comparePageRules): (WebCore::CSSStyleSelector::matchPageRules): (WebCore::CSSStyleSelector::matchPageRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-02-12 Shinya Kawanaka Introduce ShadowRootList. https://bugs.webkit.org/show_bug.cgi?id=78069 Reviewed by Hajime Morita. This is a step to implement multiple shadow subtrees. This patch introduces a shadow root list. ShadowRootList is a doubly linked list, and each shadow root now has a younger shadow root and older shadow root, which are a previous element and a next element respectively. Since a visual tree traversal, which will be introduced in coming patches, will need a older shadow root, we make a shadow root list a doubly linked list. However, ShadowRootList does not have more than one shadow root now. This will be changed in a series of coming patches. Element::shadowRoot(), setShadowRoot(), ensureShadowRoot(), and removeShadowRoot() are emulated using ShadowRootList for a while. These API will be replaced to ShadowRootList API later. No new tests, no change in behavior. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/Element.cpp: (WebCore::Element::hasShadowRoot): Retruns true if an element has a shadowRoot. (WebCore::Element::shadowRootList): Gets shadow root list if any. (WebCore::Element::shadowRoot): Gets the first shadow root from the shadow root list. (WebCore::Element::setShadowRoot): Sets the first shadow root to the shadow root list. (WebCore::Element::removeShadowRoot): Removes all the shadow roots in the shadow root list. * dom/Element.h: (WebCore): (Element): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::ElementRareData): Has shadow root lists instead of shadow root. (WebCore::ElementRareData::~ElementRareData): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::~ShadowRoot): * dom/ShadowRoot.h: (ShadowRoot): (WebCore::ShadowRoot::youngerShadowRoot): (WebCore::ShadowRoot::olderShadowRoot): * dom/ShadowRootList.cpp: Added. (WebCore): (WebCore::ShadowRootList::ShadowRootList): (WebCore::ShadowRootList::~ShadowRootList): (WebCore::ShadowRootList::pushShadowRoot): Adds a shadow root into the list. Currently we limit the list can have only one shadow root. (WebCore::ShadowRootList::popShadowRoot): Removes and returns the youngest shadow root if any. * dom/ShadowRootList.h: Added. (WebCore): (ShadowRootList): (WebCore::ShadowRootList::hasShadowRoot): (WebCore::ShadowRootList::youngestShadowRoot): (WebCore::ShadowRootList::oldestShadowRoot): 2012-02-12 Shinya Kawanaka INPUT shouldn't create ShadowRoot dynamically. https://bugs.webkit.org/show_bug.cgi?id=77930 Reviewed by Dimitri Glazkov. When input type is changed, ShadowRoot was being re-created. This makes it difficult to support multiple shadow subtrees. This patch makes input re-use the existing shadow root instead of re-creating a shaow root. A shadow root should be created when an element is created. Since media control elements are implemented using input elements, these elements should also create a shadow root in their construction phase. Test: fast/dom/shadow/input-shadow-nochange.html Tests related to media controls should be covered by existing tests. * html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): * html/FileInputType.cpp: (WebCore::FileInputType::createShadowSubtree): (WebCore::FileInputType::multipleAttributeChanged): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::createShadowSubtree): * html/InputType.cpp: (WebCore::InputType::destroyShadowSubtree): * html/RangeInputType.cpp: (WebCore::RangeInputType::createShadowSubtree): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): * html/shadow/MediaControlElements.cpp: Creates a shadow tree in the construction phase. (WebCore::MediaControlPanelMuteButtonElement::create): (WebCore::MediaControlVolumeSliderMuteButtonElement::create): (WebCore::MediaControlPlayButtonElement::create): (WebCore::MediaControlSeekForwardButtonElement::create): (WebCore::MediaControlSeekBackButtonElement::create): (WebCore::MediaControlRewindButtonElement::create): (WebCore::MediaControlReturnToRealtimeButtonElement::create): (WebCore::MediaControlToggleClosedCaptionsButtonElement::create): (WebCore::MediaControlTimelineElement::create): (WebCore::MediaControlVolumeSliderElement::create): (WebCore::MediaControlFullscreenVolumeSliderElement::create): (WebCore::MediaControlFullscreenButtonElement::create): (WebCore::MediaControlFullscreenVolumeMinButtonElement::create): (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create): 2012-02-12 Shinya Kawanaka SVGTRefElement shouldn't create a shadow root dynamically. https://bugs.webkit.org/show_bug.cgi?id=77938 Reviewed by Hajime Morita. SVGTRefElement creates a shadow root dynamically. This will cause a problem to support multiple shadow subtrees. So it should be created in a constructor phase. Test: svg/custom/tref-shadowdom.html * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::create): (WebCore::SVGTRefElement::createShadowSubtree): (WebCore): (WebCore::SVGTRefElement::updateReferencedText): * svg/SVGTRefElement.h: (SVGTRefElement): 2012-02-12 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSFloat64Array.cpp: (WebCore): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore): (WebCore::JSTestActiveDOMObject::destroy): (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject): * bindings/scripts/test/JS/JSTestActiveDOMObject.h: (JSTestActiveDOMObject): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore): (WebCore::JSTestCustomNamedGetter::destroy): (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter): * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: (JSTestCustomNamedGetter): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore): (WebCore::JSTestEventConstructor::destroy): (WebCore::JSTestEventConstructor::~JSTestEventConstructor): * bindings/scripts/test/JS/JSTestEventConstructor.h: (JSTestEventConstructor): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore): (WebCore::JSTestEventTarget::destroy): (WebCore::JSTestEventTarget::~JSTestEventTarget): * bindings/scripts/test/JS/JSTestEventTarget.h: (JSTestEventTarget): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore): (WebCore::JSTestInterface::destroy): (WebCore::JSTestInterface::~JSTestInterface): * bindings/scripts/test/JS/JSTestInterface.h: (JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore): (WebCore::JSTestMediaQueryListListener::destroy): (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore): (WebCore::JSTestNamedConstructor::destroy): (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (JSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::JSTestObj::destroy): (WebCore::JSTestObj::~JSTestObj): * bindings/scripts/test/JS/JSTestObj.h: (JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore): (WebCore::JSTestSerializedScriptValueInterface::destroy): (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (JSTestSerializedScriptValueInterface): 2012-02-12 Abhishek Arya Regression (r104528): Crash when moving nodes across documents. https://bugs.webkit.org/show_bug.cgi?id=78432 Reviewed by Hajime Morita. Test: fast/dom/node-move-to-new-document-crash-main.html * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): (WebCore::TreeScopeAdopter::moveTreeToNewDocument): (WebCore::TreeScopeAdopter::moveNodeToNewDocument): 2012-02-12 Hajime Morrita Page should have less intrusive way to associate API implementation objects. https://bugs.webkit.org/show_bug.cgi?id=78085 Reviewed by Adam Barth. Introducing PageSupplement interface to attach behind-the-flag-ish objects to Page instances. This change aims to improve modularity of Modules/ entries. With PageSupplement mechinary, we can eliminate ifdef conditionals from Page.h/Page.cpp and are able to add Modules/ entries without touching non-Module WebCore files. WebKit API classes like WebPage can "provide" these objects dynamically during the Page setup phase. In this change, DeviceMotionController and DeviceOrientationController is updated to adopt PageSupplement inteface for an illustrative purpose because they are going to move into Modules/ shortly. Other Page associated API backing objects also should be transformed to PageSupplement family. Reviewed by Adam Barth. No new tests. No behavior change. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DeviceMotionClient.h: (WebCore): * dom/DeviceMotionController.cpp: (WebCore::DeviceMotionController::supplementName): (WebCore): (WebCore::DeviceMotionController::isActiveAt): (WebCore::provideDeviceMotionTo): * dom/DeviceMotionController.h: (DeviceMotionController): (WebCore::DeviceMotionController::from): * dom/DeviceOrientationClient.h: (WebCore): * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::supplementName): (WebCore): (WebCore::DeviceOrientationController::isActiveAt): (WebCore::provideDeviceOrientationTo): * dom/DeviceOrientationController.h: (DeviceOrientationController): (WebCore::DeviceOrientationController::from): * dom/Document.cpp: (WebCore::Document::suspendActiveDOMObjects): (WebCore::Document::resumeActiveDOMObjects): * history/PageCache.cpp: (WebCore::logCanCachePageDecision): (WebCore::PageCache::canCache): * page/DOMWindow.cpp: (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): (WebCore::DOMWindow::removeAllEventListeners): * page/PageSupplement.cpp: (WebCore::PageSupplement::~PageSupplement): (WebCore::PageSupplement::provideTo): (WebCore::PageSupplement::from): * page/PageSupplement.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::~Page): (WebCore::Page::provideSupplement): (WebCore): (WebCore::Page::requireSupplement): (WebCore::Page::notifyDestroyedToSupplements): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore): (PageClients): (Page): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): 2012-02-12 Nico Weber [chromium/mac] Change the type of webkit_system_interface from static_library to none https://bugs.webkit.org/show_bug.cgi?id=78441 This target exists only run an action and to add a dependency to the action's output to targets depending on webkit_system_interface. This is what target type 'none' is for. With this, no dummy source file is needed, and no empty libwebkit_system_interface.a is created. This also fixes this (harmless) libtool warning: libtool: warning for library: libwebkit_system_interface.a the table of contents is empty (no object file members in the library define global symbols) Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/mac/Empty.cpp: Removed. 2012-02-12 Kenichi Ishibashi If @font-face does not provide an explicit italic/bold variant, regular is used. https://bugs.webkit.org/show_bug.cgi?id=34147 Reviewed by Dan Bernstein. Update @font-face handling code so that it matches @font-face behavior to the current draft of CSS3 Font spec. The original patch was written by yusukes@chromium.org. - Drops support for "bolder", "lighter", and "all" value. These are no longer allowed. - Only allows one value for font-style and font-weight. Tests: fast/css/font-face-synthetic-bold-italic.html fast/css/font-face-weight-matching.html * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Removed "all", "lighter", "bolder" handling code. (WebCore::compareFontFaces):Updated the weight matching algortihm. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Replaced parseFontStyle() call with checking primitive values. (WebCore::CSSParser::parseFontWeight): Changed to allow only primitive values. (WebCore::CSSParser::createFontFaceRule): Removed checks for font-weight and font-style. (WebCore::CSSParser::deleteFontFaceOnlyValues): Ditto. * css/CSSParser.h: Removed parseFontStyle(). 2012-02-12 David Reveman [Chromium] Avoid unnecessary memset in per-tile layer updater. https://bugs.webkit.org/show_bug.cgi?id=78426 Reviewed by Stephen White. Use our own SkBitmap and call SkBitmap::allocPixels() instead of letting SkDevice construct a SkBitmap. This avoids an unnecessary memset otherwise done by SkDevice. No new tests. * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): 2012-02-12 Joe Thomas Add toText and isTextNode helpers in Text class. https://bugs.webkit.org/show_bug.cgi?id=78140 Added a new helper function toText() in dom/Text.h which does the type casting operation to Text object. Modified the code to make use of this helper function. Reviewed by Adam Barth. No new tests. * accessibility/AccessibilityRenderObject.cpp: (WebCore::accessibleNameForNode): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * dom/Attr.cpp: (WebCore::Attr::childrenChanged): * dom/Element.cpp: (WebCore::Element::recalcStyle): * dom/Node.cpp: (WebCore::Node::normalize): * dom/Position.cpp: (WebCore::Position::containerText): (WebCore::Position::leadingWhitespacePosition): * dom/Range.cpp: (WebCore::Range::insertNode): (WebCore::Range::getBorderAndTextQuads): * dom/ScriptElement.cpp: (WebCore::ScriptElement::scriptContent): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcShadowTreeStyle): * dom/Text.h: Added new helper function toText. (WebCore::toText): new helper function which does the type casting operation to Text object. (WebCore): * editing/ApplyBlockElementCommand.cpp: (WebCore::isNewLineAtPosition): (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::splitTextAtEnd): (WebCore::ApplyStyleCommand::splitTextElementAtEnd): (WebCore::ApplyStyleCommand::joinChildTextNodes): * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertNodeAt): (WebCore::CompositeEditCommand::positionOutsideTabSpan): (WebCore::CompositeEditCommand::canRebalance): (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): (WebCore::CompositeEditCommand::deleteInsignificantText): (WebCore::CompositeEditCommand::removePlaceholderAt): (WebCore::CompositeEditCommand::cleanupAfterDeletion): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete): (WebCore::DeleteSelectionCommand::fixupWhitespace): * editing/Editor.cpp: (WebCore::Editor::setComposition): * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::insertTab): * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::appendStartMarkup): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): (WebCore::ReplaceSelectionCommand::insertAsListItems): (WebCore::ReplaceSelectionCommand::performTrivialReplace): * editing/htmlediting.cpp: (WebCore::lineBreakExistsAtPosition): * editing/visible_units.cpp: (WebCore::startPositionForLine): (WebCore::endPositionForLine): (WebCore::startOfParagraph): (WebCore::endOfParagraph): * html/HTMLElement.cpp: (WebCore::replaceChildrenWithFragment): (WebCore::replaceChildrenWithText): (WebCore::mergeWithNextTextNode): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::hasFallbackContent): (WebCore::HTMLObjectElement::updateDocNamedItem): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setText): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::setText): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::defaultValue): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::innerTextValue): (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::text): (WebCore::HTMLTitleElement::setText): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setNodeValue): * rendering/RenderText.cpp: (WebCore::RenderText::originalText): * rendering/RenderTextFragment.cpp: (WebCore::RenderTextFragment::originalText): (WebCore::RenderTextFragment::previousCharacter): 2012-02-12 Kentaro Hara Remove [CPPCustom] from CodeGeneratorCPP.pm https://bugs.webkit.org/show_bug.cgi?id=78342 Reviewed by Adam Barth. This patch removes [CPPCustom]. [CPPCustom] has been used in DOMWindow.location only to indicate that DOMWindow.location should be ignored in CPP. However, there are many other attributes and methods that CPP does not support (e.g. [CallWith=...], [CustomSetter], etc), and they are not yet marked with [CPPCustom]. CPP just generates "meaningless" code for those unsupported attributes and methods. Ideally we can mark all unsupported attributes and methods with [CPPCustom], but it would not be so practical. Otherwise, removing [CPPCustom] would make sense. The side effect of removing [CPPCustom] is just that CPP will generate "meaningless" code for DOMWindow.location. No tests. No change in behavior. * bindings/scripts/CodeGeneratorCPP.pm: (ShouldSkipType): * page/DOMWindow.idl: 2012-02-12 Kentaro Hara Rename [JSCustomPrototypeDefineOwnProperty] to [JSCustomDefineOwnPropertyOnPrototype] https://bugs.webkit.org/show_bug.cgi?id=78354 Reviewed by Adam Barth. This patch renames [JSCustomPrototypeDefineOwnProperty] to [JSCustomDefineOwnPropertyOnPrototype], for naming consistency with [JSCustomDefineOwnProperty] and [JSCustomNamedGetterOnPrototype]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * page/Location.idl: 2012-02-11 Filip Pizlo It should be possible to send all JSC debug logging to a file https://bugs.webkit.org/show_bug.cgi?id=78418 Reviewed by Sam Weinig. Introduced wtf/DataLog, which defines WTF::dataFile, WTF::dataLog, and WTF::dataLogV. Changed all debugging- and profiling-related printfs to use WTF::dataLog() or one of its friends. By default, debug logging goes to stderr, unless you change the setting in wtf/DataLog.cpp. No new tests because behavior is unchanged. * ForwardingHeaders/wtf/DataLog.h: Added. 2012-02-11 Gavin Barraclough Move special __proto__ property to Object.prototype https://bugs.webkit.org/show_bug.cgi?id=78409 Reviewed by Oliver Hunt. Re-implement this as a regular accessor property. This has three key benefits: 1) It makes it possible for objects to be given properties named __proto__. 2) Object.prototype.__proto__ can be deleted, preventing object prototypes from being changed. 3) This largely removes the magic used the implement __proto__, it can just be made a regular accessor property. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::allowsAccessFrom): (WebCore): - expose allowsAccessFrom check to JSC. * bindings/js/JSDOMWindowBase.h: (JSDOMWindowBase): - expose allowsAccessFrom check to JSC. 2012-02-11 Benjamin Poulain Get rid of WebCore::URLString https://bugs.webkit.org/show_bug.cgi?id=78429 Reviewed by Adam Barth. URLString is unused, remove the class. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/KURL.cpp: * platform/KURL.h: (KURL): * platform/URLString.h: Removed. 2012-02-11 Sam Weinig Fix the windows build. Since Windows uses an all-in-one file to compile, the isRespectedPresentationAttribute() functions all need unique names. * html/HTMLBodyElement.cpp: * html/HTMLHRElement.cpp: * html/HTMLIFrameElement.cpp: * html/HTMLImageElement.cpp: * html/HTMLInputElement.cpp: * html/HTMLMarqueeElement.cpp: * html/HTMLPlugInElement.cpp: * html/HTMLTableCellElement.cpp: * html/HTMLTablePartElement.cpp: * mathml/MathMLElement.cpp: 2012-02-11 Anders Carlsson Overlay scrollbars don't appear when scrolling on the scrolling thread https://bugs.webkit.org/show_bug.cgi?id=78427 Reviewed by Sam Weinig. Add a ScrollAnimator::notifyContentAreaScrolled and call it from ScrollAnimator::notifyContentAreaScrolled. It is then overridden in ScrollAnimatorMac to tickle AppKit so that overlay scrollbars will be shown. * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::notifyContentAreaScrolled): (ScrollAnimator): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::notifyScrollPositionChanged): * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled): (WebCore): 2012-02-11 Anders Carlsson Implement more ScrollElasticityControllerClient member functions https://bugs.webkit.org/show_bug.cgi?id=78425 Reviewed by Sam Weinig. * page/scrolling/ScrollingTreeNode.h: (ScrollingTreeNode): (WebCore::ScrollingTreeNode::horizontalScrollElasticity): (WebCore::ScrollingTreeNode::verticalScrollElasticity): (WebCore::ScrollingTreeNode::hasEnabledHorizontalScrollbar): (WebCore::ScrollingTreeNode::hasEnabledVerticalScrollbar): Add new getters. * page/scrolling/mac/ScrollingTreeNodeMac.h: * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::allowsHorizontalStretching): (WebCore::ScrollingTreeNodeMac::allowsVerticalStretching): (WebCore::ScrollingTreeNodeMac::stretchAmount): (WebCore::ScrollingTreeNodeMac::pinnedInDirection): (WebCore::ScrollingTreeNodeMac::canScrollHorizontally): (WebCore::ScrollingTreeNodeMac::canScrollVertically): (WebCore::ScrollingTreeNodeMac::absoluteScrollPosition): (WebCore::ScrollingTreeNodeMac::immediateScrollByWithoutContentEdgeConstraints): (WebCore::ScrollingTreeNodeMac::startSnapRubberbandTimer): (WebCore::ScrollingTreeNodeMac::stopSnapRubberbandTimer): (WebCore::ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints): Implement ScrollElasticityControllerClient member functions. 2012-02-11 Antti Koivisto Add size assert for Length https://bugs.webkit.org/show_bug.cgi?id=78420 Rubber-stamped by Andreas Kling. Length type is memory critical and must not grow. * platform/Length.cpp: (SameSizeAsLength): (WebCore): 2012-02-11 Anders Carlsson Pass wheel events to a scroll elasticity controller on the scrolling thread https://bugs.webkit.org/show_bug.cgi?id=78421 Reviewed by Sam Weinig. Add a ScrollElasticityController to ScrollingTreeNodeMac and pass wheel events to it. Fix ScrollingTreeNodeMac::scrollBy to clamp by the minimum and maximum scroll positions. * page/scrolling/mac/ScrollingTreeNodeMac.h: (ScrollingTreeNodeMac): * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::ScrollingTreeNodeMac): (WebCore::ScrollingTreeNodeMac::handleWheelEvent): (WebCore::ScrollingTreeNodeMac::immediateScrollBy): (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition): (WebCore::ScrollingTreeNodeMac::minimumScrollPosition): (WebCore): (WebCore::ScrollingTreeNodeMac::maximumScrollPosition): (WebCore::ScrollingTreeNodeMac::scrollBy): 2012-02-11 Andreas Kling Attribute styles should be created lazily. Reviewed by Antti Koivisto. TL;DR summary: Lazily construct the StyledElement::attributeStyle() instead of moving properties in/out of it in parseAttribute(). This allows us to enable the matched declaration cache for elements with presentation attributes. The matched declaration cache has been disabled for elements with presentation attributes because attributeStyle() was mutable, and (simply put) the cache maps a set of StylePropertySet pointers to a resulting RenderStyle. This requires that the StylePropertySets are immutable. To make them immutable, we now construct the attribute style lazily by adding a flag (to Node) that gets set in parseAttribute() when a presentation attribute respected by the element changes. A subsequent call to attributeStyle() checks the flag and rebuilds the style by looping over the attributes and calling the new virtual StyledElement::collectStyleForAttribute() on each one. Any dangling references to the previous attribute style will be garbage collected by the cache in CSSStyleSelector::sweepMatchedDeclarationCache(). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchAllRules): Enable matched declaration cache for elements with attribute style. * dom/Node.h: (WebCore::Node::attributeStyleDirty): (WebCore::Node::setAttributeStyleDirty): (WebCore::Node::clearAttributeStyleDirty): Add a Node flag to signify that a presentation attribute has changed and the attribute style needs to be rebuilt. * dom/ElementAttributeData.h: * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::setAttributeStyle): Added a setter for the attribute style, called by updateAttributeStyle(). * dom/StyledElement.cpp: (WebCore::StyledElement::addHTMLLengthToStyle): (WebCore::StyledElement::addHTMLColorToStyle): Moved and renamed two of the old addCSS* helpers from StyledElement. (WebCore::StyledElement::updateAttributeStyle): Called by attributeStyle() in case the "attribute style dirty" flag is set. Rebuilds the attribute style from scratch by looping over the attribute map and calling collectStyleForAttribute() on each attribute. * dom/StyledElement.h: (WebCore::StyledElement::collectStyleForAttribute): (WebCore::StyledElement::attributeStyle): (WebCore::StyledElement::setNeedsAttributeStyleUpdate): Helper, sets the attribute style dirty flag and marks the element for full style recalc. This is what parseAttribute() calls in subclasses when they encounter a presentation attribute. * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::collectStyleForAttribute): (WebCore::HTMLBRElement::parseAttribute): * html/HTMLBRElement.h: * html/HTMLBodyElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLBodyElement::collectStyleForAttribute): (WebCore::HTMLBodyElement::parseAttribute): * html/HTMLBodyElement.h: * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::collectStyleForAttribute): (WebCore::HTMLDivElement::parseAttribute): * html/HTMLDivElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::applyBorderAttributeToStyle): (WebCore::HTMLElement::mapLanguageAttributeToLocale): (WebCore::HTMLElement::collectStyleForAttribute): (WebCore::HTMLElement::parseAttribute): (WebCore::HTMLElement::applyAlignmentAttributeToStyle): * html/HTMLElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::collectStyleForAttribute): (WebCore::HTMLEmbedElement::parseAttribute): * html/HTMLEmbedElement.h: * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::collectStyleForAttribute): (WebCore::HTMLFontElement::parseAttribute): * html/HTMLFontElement.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::collectStyleForAttribute): (WebCore::HTMLFrameSetElement::parseAttribute): * html/HTMLFrameSetElement.h: * html/HTMLHRElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLHRElement::collectStyleForAttribute): (WebCore::HTMLHRElement::parseAttribute): * html/HTMLHRElement.h: * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::collectStyleForAttribute): (WebCore::HTMLIFrameElement::parseAttribute): * html/HTMLIFrameElement.h: * html/HTMLImageElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLImageElement::collectStyleForAttribute): (WebCore::HTMLImageElement::parseAttribute): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLInputElement::collectStyleForAttribute): (WebCore::HTMLInputElement::parseAttribute): * html/HTMLInputElement.h: * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::collectStyleForAttribute): (WebCore::HTMLLIElement::parseAttribute): * html/HTMLLIElement.h: * html/HTMLMarqueeElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLMarqueeElement::collectStyleForAttribute): (WebCore::HTMLMarqueeElement::parseAttribute): * html/HTMLMarqueeElement.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/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::collectStyleForAttribute): (WebCore::HTMLParagraphElement::parseAttribute): * html/HTMLParagraphElement.h: * html/HTMLPlugInElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLPlugInElement::collectStyleForAttribute): (WebCore::HTMLPlugInElement::parseAttribute): * html/HTMLPlugInElement.h: * html/HTMLPreElement.cpp: (WebCore::HTMLPreElement::collectStyleForAttribute): (WebCore::HTMLPreElement::parseAttribute): * html/HTMLPreElement.h: * html/HTMLTableCaptionElement.cpp: (WebCore::HTMLTableCaptionElement::collectStyleForAttribute): (WebCore::HTMLTableCaptionElement::parseAttribute): * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.cpp: (WebCore::isRespectedPresentationAttribute): (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::getBordersFromFrameAttributeValue): (WebCore::HTMLTableElement::collectStyleForAttribute): (WebCore::HTMLTableElement::parseAttribute): * html/HTMLTableElement.h: * html/HTMLTablePartElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::HTMLTablePartElement::collectStyleForAttribute): (WebCore::HTMLTablePartElement::parseAttribute): * html/HTMLTablePartElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::collectStyleForAttribute): (WebCore::HTMLTextAreaElement::parseAttribute): * html/HTMLTextAreaElement.h: * html/HTMLUListElement.cpp: (WebCore::HTMLUListElement::collectStyleForAttribute): (WebCore::HTMLUListElement::parseAttribute): * html/HTMLUListElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::collectStyleForAttribute): (WebCore::HTMLVideoElement::parseAttribute): * html/HTMLVideoElement.h: * mathml/MathMLElement.cpp: (WebCore::isRespectedPresentationAttribute): (WebCore::MathMLElement::collectStyleForAttribute): (WebCore::MathMLElement::parseAttribute): * mathml/MathMLElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::collectStyleForAttribute): (WebCore::SVGImageElement::parseAttribute): * svg/SVGImageElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::collectStyleForAttribute): (WebCore::SVGStyledElement::parseAttribute): * svg/SVGStyledElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::collectStyleForAttribute): (WebCore::SVGTextContentElement::parseAttribute): * svg/SVGTextContentElement.h: Split handling of presentation attributes between parseAttribute() and collectStyleForAttribute() as appropriate. Some minor refactorings here and there (mostly in HTMLTableElement) to avoid excessive code duplication. Also sprinkled FIXMEs about inefficiencies we should clean up. 2012-02-11 Arko Saha HTML 5: Support click() method on HTMLElement. https://bugs.webkit.org/show_bug.cgi?id=27880 Reviewed by Timothy Hatcher. Test: fast/dom/click-method-on-html-element.html * bindings/objc/PublicDOMInterfaces.h: Added click() method in DOMHTMLElement with availability macro AVAILABLE_AFTER_WEBKIT_VERSION_5_1. * html/HTMLButtonElement.idl: Moved click() method under LANGUAGE_OBJECTIVE_C. * html/HTMLElement.idl: Added click() IDL method. * html/HTMLInputElement.idl: Moved click() method under LANGUAGE_OBJECTIVE_C. 2012-02-11 Martin Robinson [GStreamer] html5test.com says that gstreamer ports do not support WebM for audio https://bugs.webkit.org/show_bug.cgi?id=78244 Reviewed by Eric Seidel. Specifically advertise support for audio/webm when we support the vorbis audio codec. This is necessary because gstreamer doesn't advertise it. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::mimeTypeCache): Add an override for audio/webm. 2012-02-11 Anders Carlsson Try to fix the Windows build. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::scrollToRevealSelection): 2012-02-08 Stephen White [chromium] Enable CSS filters on composited layers. https://bugs.webkit.org/show_bug.cgi?id=77266 Reviewed by James Robinson. Will be covered by existing tests in css3/filters (when enabled). * WebCore.gypi: Add CCRenderSurfaceFilters.* to the Chromium build. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setFilters): * platform/graphics/chromium/GraphicsLayerChromium.h: Override setFilters() virtual from GraphicsLayer. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setFilters): Implement setFilters() to cache the filters here... (WebCore::LayerChromium::pushPropertiesTo): ... and push them to the CCLayerImpl at commit time. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::filters): Implement accessor. * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::setFilters): Implement stub version of setFilters(), to satisfy the templates. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setFilters): Implement setter to receive filters at commit time. * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::filters): Implement member var and accessor for filters. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): Add another clause here to force creation of a RenderSurface when filters are present, and to forward them from the layer to the RenderSurface. * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): Check for filters at draw time, apply them, and forward the result through the drawing traversal. (WebCore::CCRenderSurface::drawSurface): If filter bitmap is present, bind it instead of the normal RenderSurface texture. (WebCore::CCRenderSurface::applyFilters): Apply filters to the render surface texture, and return the result. This function is a no-op for the threaded compositor, due to use of the SharedGraphicsContext3D. * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore::CCRenderSurface::setFilters): (WebCore::CCRenderSurface::filters): (CCRenderSurface): Filters getters and setters. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: Added. (WebCore::CCRenderSurfaceFilters::apply): External interface for this (static) class. All internal implementation and helper functions are in the unnamed namespace. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.h: Added. 2012-02-11 Andreas Kling Node.isEqualNode() compares attributes twice. Reviewed by Anders Carlsson. A single pass across the attribute maps should be enough for anyone. Added a test verifying correct behavior of Node.isEqualNode() when comparing two elements, one of which has had attributes that were all removed, resulting in an empty but non-null NamedNodeMap hanging off of the element. Note that this change is not fixing a regression, I'm just adding the test since I came close to introducing a bug here. Test: fast/dom/isEqualNode-after-removeAttribute.html * dom/Node.cpp: (WebCore::Node::isEqualNode): 2012-02-11 Andreas Kling HTMLTablePartElement: Add helper method to find parent table. Reviewed by Anders Carlsson. Add HTMLTablePartElement::findParentTable() and use that in subclasses instead of duplicating the code. * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::additionalAttributeStyle): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::additionalAttributeStyle): * html/HTMLTablePartElement.cpp: (WebCore::HTMLTablePartElement::findParentTable): (WebCore): * html/HTMLTablePartElement.h: (WebCore): (HTMLTablePartElement): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::additionalAttributeStyle): 2012-02-11 Andreas Kling Use Element's hasName/hasID flags to avoid unnecessary work when looking up name/id attributes. Reviewed by Anders Carlsson. Have Element::getIdAttribute() check the hasID() flag before looking up the attribute. Add an Element::getNameAttribute() to do the same thing with hasName(). Update call sites to make use of these helpers whenever possible. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityDescription): * dom/DocumentOrderedMap.cpp: (WebCore::keyMatchesId): * dom/Element.h: (Element): (WebCore::Element::getIdAttribute): (WebCore): (WebCore::Element::getNameAttribute): * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): * dom/StaticHashSetNodeList.cpp: (WebCore::StaticHashSetNodeList::itemWithName): * dom/StaticNodeList.cpp: (WebCore::StaticNodeList::itemWithName): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::name): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::updateNameCache): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::formControlName): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::name): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setNameAndOpenURL): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::name): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::containsJavaApplet): (WebCore::HTMLObjectElement::formControlName): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): 2012-02-11 Sheriff Bot Unreviewed, rolling out r107435. http://trac.webkit.org/changeset/107435 https://bugs.webkit.org/show_bug.cgi?id=78410 It broke the Qt build (Requested by Ossy on #webkit). * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/mac/EditorMac.mm: (WebCore::Editor::writeSelectionToPasteboard): * platform/Pasteboard.h: (WebCore): (Pasteboard): * platform/PasteboardStrategy.h: Removed. * platform/PlatformPasteboard.h: Removed. * platform/PlatformStrategies.h: (WebCore): (WebCore::PlatformStrategies::PlatformStrategies): (PlatformStrategies): * platform/mac/DragDataMac.mm: (WebCore::DragData::canSmartReplace): (WebCore::insertablePasteboardTypes): (WebCore::DragData::asURL): * platform/mac/PasteboardMac.mm: (WebCore): (WebCore::selectionPasteboardTypes): (WebCore::writableTypesForURL): (WebCore::createWritableTypesForImage): (WebCore::writableTypesForImage): (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::clear): (WebCore::Pasteboard::writeSelectionForTypes): (WebCore::Pasteboard::writePlainText): (WebCore::Pasteboard::writeSelection): (WebCore::writeURLForTypes): (WebCore::Pasteboard::writeURL): (WebCore::writeFileWrapperAsRTFDAttachment): (WebCore::Pasteboard::writeImage): (WebCore::Pasteboard::writeClipboard): (WebCore::Pasteboard::canSmartReplace): (WebCore::Pasteboard::plainText): (WebCore::documentFragmentWithRTF): (WebCore::Pasteboard::documentFragment): * platform/mac/PlatformPasteboardMac.mm: Removed. 2012-02-10 Antti Koivisto Move CSSOM wrapper pointer out of StylePropertySet https://bugs.webkit.org/show_bug.cgi?id=78406 Reviewed by Andreas Kling. Most StylePropertySet instances never have CSSOM wrappers so having a pointer to one in each and and every object makes no sense. Move the PropertySetCSSStyleDeclaration instances to a global HashMap. This shrinks StylePropertySet by a pointer. Added COMPILE_ASSERT for StylePropertySet size. * css/StylePropertySet.cpp: (WebCore): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::~StylePropertySet): (WebCore::StylePropertySet::ensureCSSStyleDeclaration): * css/StylePropertySet.h: (StylePropertySet): 2012-02-10 David Barton MathML internals - use createXXX() function naming, ASSERT()s https://bugs.webkit.org/show_bug.cgi?id=78384 Reviewed by Eric Seidel. Standard RefPtr function naming uses "createXXX" instead of "makeXXX". I also added a couple of ASSERT()s. No new tests. * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::createBlockStyle): * rendering/mathml/RenderMathMLBlock.h: (RenderMathMLBlock): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::createOperatorStyle): (WebCore::RenderMathMLFenced::makeFences): (WebCore::RenderMathMLFenced::addChild): * rendering/mathml/RenderMathMLFenced.h: (RenderMathMLFenced): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::addChild): * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::addChild): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::RenderMathMLSubSup): * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): (WebCore::RenderMathMLUnderOver::addChild): 2012-02-10 Dan Bernstein Non-threaded scrolling build fix. * page/FrameView.cpp: (WebCore::FrameView::requestScrollPositionUpdate): 2012-02-10 Edward O'Connor Change values for WEBKIT_KEYFRAMES_RULE, WEBKIT_KEYFRAME_RULE https://bugs.webkit.org/show_bug.cgi?id=71293 Reviewed by Chris Marrin. Tests: animations/animation-css-rule-types.html * css/CSSRule.h: Change WEBKIT_KEYFRAMES_RULE to 7 and WEBKIT_KEYFRAME_RULE to 8. * css/CSSRule.idl: Ditto. 2012-02-10 Eric Seidel AtomicMarkupTokenBase::initializeAttributes should not create a StringImpl if it doesn't need to https://bugs.webkit.org/show_bug.cgi?id=78394 Reviewed by Adam Barth. On the very next line is passes value to Attribute::create which takes an AtomicString, so this code was just allocating a StringImpl (every time) only to (much of the time) just release that StringImpl on the next line when it got the AtomicString instead. I discovered this while looking at DOM/Events.html, but it's unclear if this fix actually makes that benchmark faster. * xml/parser/MarkupTokenBase.h: (WebCore::::initializeAttributes): 2012-02-10 Anders Carlsson Always update the scroll position through the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=78403 Reviewed by Sam Weinig. To get correct behavior, we always want to update the scrolling layer position on the scrolling thread. Do this by allowing the scrolling coordinator to intercept scroll position update requests and send them to the scrolling tree. * page/FrameView.cpp: (WebCore::FrameView::requestScrollPositionUpdate): Let the scrolling coordinator have a go at updating the scroll position for this frame view. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::requestScrollPositionUpdate): If it's a frame view we're coordinating scrolling for, tell the scrolling tree to update the scroll position. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::setMainFrameScrollPosition): Call through to the scrolling tree node. * page/scrolling/ScrollingTreeNode.h: Add a new pure virtual setScrollPosition member function. (WebCore::ScrollingTreeNodeMac::setScrollPosition): Move most of the code from scrollBy here. (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition): Rename this member function from setScrollPosition to avoid conflicts. (WebCore::ScrollingTreeNodeMac::scrollBy): Just call setScsrollPosition. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setScrollOffsetFromAnimation): Call requestScrollPositionUpdate, which allows subclasses of scrollable area to intercept the scroll operation and call it asynchronously. 2012-02-10 Anders Carlsson ScrollableArea should have a function for noting that the scroll position changed https://bugs.webkit.org/show_bug.cgi?id=78402 Reviewed by Sam Weinig. The scrolling coordinator needs a specialized function to call whenever the main frame scrolling position has changed, so add ScrollableArea::notifyScrollPositionChanged and call it from the scrolling coordinator. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::notifyScrollPositionChanged): New function. (WebCore::ScrollableArea::setScrollOffsetFromAnimation): Call ScrollableArea::notifyScrollPositionChanged. 2012-02-09 Levi Weintraub Unreviewed build fix. Fixing the build by removing a duplicate definition of pixelSnappedIntRect in LayoutTypes.h and removing conflict markers from the changelog. * rendering/LayoutTypes.h: (pixelSnappedIntRect): * ChangeLog: 2012-02-09 Levi Weintraub Add pixelSnappedIntRect method https://bugs.webkit.org/show_bug.cgi?id=78054 Reviewed by Eric Seidel. This patch introduces a pixelSnappedIntRect method that will snap a sub-pixel LayoutRect to pixel boundaries. These pixel snapped forms are what is used to communicate with the graphics engine (to paint at whole pixel boundaries) and the embedding app (so they don't need to understand we're using sub-pixel units). No new tests. No change in behavior. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): * dom/Range.cpp: (WebCore::Range::boundingBox): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * page/Frame.cpp: (WebCore::Frame::nodeImage): * page/FrameView.cpp: (WebCore::FrameView::repaintContentRectangle): (WebCore::FrameView::doDeferredRepaints): (WebCore::FrameView::windowClipRectForLayer): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::paintGraphicsLayerContents): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/LayoutTypes.h: (WebCore::pixelSnappedIntRect): (WebCore): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::selectionGaps): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::pushContentsClip): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::RenderBoxModelObject::drawBoxSideFromPath): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paintColumnBorder): (WebCore::RenderFrameSet::paintRowBorder): (WebCore::RenderFrameSet::positionFramesWithFlattening): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::paintScrollbar): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): (WebCore::RenderObject::addPDFURLRect): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getRoundedBorderFor): (WebCore::RenderStyle::getRoundedInnerBorderFor): <<<<<<< .mine 2012-02-09 Levi Weintraub Add pixelSnappedIntRect method https://bugs.webkit.org/show_bug.cgi?id=78054 Reviewed by Eric Seidel. This patch introduces a pixelSnappedIntRect method that will snap a sub-pixel LayoutRect to pixel boundaries. These pixel snapped forms are what is used to communicate with the graphics engine (to paint at whole pixel boundaries) and the embedding app (so they don't need to understand we're using sub-pixel units). No new tests. No change in behavior. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): * dom/Range.cpp: (WebCore::Range::boundingBox): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * page/Frame.cpp: (WebCore::Frame::nodeImage): * page/FrameView.cpp: (WebCore::FrameView::repaintContentRectangle): (WebCore::FrameView::doDeferredRepaints): (WebCore::FrameView::windowClipRectForLayer): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::paintGraphicsLayerContents): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/LayoutTypes.h: (WebCore::pixelSnappedIntRect): (WebCore): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::selectionGaps): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::pushContentsClip): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::RenderBoxModelObject::drawBoxSideFromPath): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paintColumnBorder): (WebCore::RenderFrameSet::paintRowBorder): (WebCore::RenderFrameSet::positionFramesWithFlattening): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::paintScrollbar): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): (WebCore::RenderObject::addPDFURLRect): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getRoundedBorderFor): (WebCore::RenderStyle::getRoundedInnerBorderFor): 2012-02-10 Brian Weinstein Web Inspector: Add the ability to jump to the source for a given frame https://bugs.webkit.org/show_bug.cgi?id=78396 Reviewed by Tim Hatcher. * WebCore.exp.in: Add a new exported function. * inspector/InspectorController.cpp: Add and expose the InspectorPageAgent. (WebCore::InspectorController::InspectorController): Set m_pageAgent. * inspector/InspectorController.h: Add m_pageAgent. (WebCore::InspectorController::pageAgent): Return m_pageAgent. * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame): Get the inspector's frame ID of the frame that was passed in, and add a call to evaluate on load. * inspector/InspectorFrontendClientLocal.h: * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.showMainResourceForFrame): Add a FIXME to show the source code for the main resource of the given frame. 2012-02-10 Vineet Chaudhary https://bugs.webkit.org/show_bug.cgi?id=72756 DOMHTMLElement’s accessKey property is declared as available in WebKit version that didn’t have it. Reviewed by Timothy Hatcher. No new tests. * bindings/objc/PublicDOMInterfaces.h: Moving accessKey property to DOMHTMLElement with an appropriate availability macro AVAILABLE_AFTER_WEBKIT_VERSION_5_1. Also Moving accessKey property to HTMLAnchorElement, HTMLAreaElement, HTMLButtonElement, HTMLInputElement, HTMLLabelElement, HTMLLegendElement and HTMLTextAreaElement idls with an availability macro AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_5_1. * html/HTMLAnchorElement.idl: Adding accessKey entries back to idls under LANGUAGE_OBJECTIVE_C. * html/HTMLAreaElement.idl: Ditto. * html/HTMLButtonElement.idl: Ditto. * html/HTMLInputElement.idl: Ditto. * html/HTMLLabelElement.idl: Ditto. * html/HTMLLegendElement.idl: Ditto. * html/HTMLTextAreaElement.idl: Ditto. 2012-02-10 Beth Dakin Speculative build fix. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::scrollToRevealSelection): 2012-02-10 Adam Klein Enable MUTATION_OBSERVERS by default on all platforms https://bugs.webkit.org/show_bug.cgi?id=78196 Reviewed by Ojan Vafai. * Configurations/FeatureDefines.xcconfig: * UseV8.cmake: Add some previously-missing files. * WebCore.vcproj/WebCore.vcproj: ditto. * bindings/js/JSBindingsAllInOne.cpp: ditto. * dom/DOMAllInOne.cpp: ditto. 2012-02-10 Emil A Eklund and Levi Weintraub Add FractionalLayoutUnit type for sub-pixel layout https://bugs.webkit.org/show_bug.cgi?id=77485 Reviewed by Eric Seidel. Add fixed point implementation (FractionalLayoutUnit). FractionalLayoutUnit represents values as multiples of 1/60th pixel. This allows us to represent sub-pixel values using integer math and avoids floating point precision problems. No new tests. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/FractionalLayoutUnit.h: Added. 2012-02-10 Adam Langley Don't lowercase ping URLs. Previously, ping URLs would be lowercased when splitting them apart. URLs are not, however, case-insensitive. https://bugs.webkit.org/show_bug.cgi?id=78371 Reviewed by Tony Chang. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::sendPings): Don't lowercase URL. 2012-02-10 Ojan Vafai flex-pack:center and flex-item-align:center should do true centering https://bugs.webkit.org/show_bug.cgi?id=77385 Reviewed by Tony Chang. Also, removed passing totalPositiveFlexibility around. We don't need to know about positive/negative flex once we run the flexing algorithm. We used to need to know this in order to flex margins, but margins can no longer be flexed. Test: css3/flexbox/true-centering.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::initialPackingOffset): (WebCore::packingSpaceBetweenChildren): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::layoutColumnReverse): * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): 2012-02-10 Mark Hahnenberg Split MarkedSpace into destructor and destructor-free subspaces https://bugs.webkit.org/show_bug.cgi?id=77761 Reviewed by Geoffrey Garen. No new tests. * bindings/js/JSDOMWindowShell.cpp: Removed old operator new, which was just used in the create function so that we can use allocateCell instead. (WebCore): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): (JSDOMWindowShell): * bindings/scripts/CodeGeneratorJS.pm: Added destructor back to root JS DOM nodes (e.g. JSNode, etc) because their destroy functions need to be called, so we don't want the NeedsDestructor struct to think they don't need destruction due to having empty/trivial destructors. Removed ASSERT_HAS_TRIVIAL_DESTRUCTOR from all JS DOM wrapper auto-generated objects because their ancestors now have non-trivial destructors. (GenerateHeader): (GenerateImplementation): (GenerateConstructorDefinition): 2012-02-10 Anders Carlsson Remove a bunch of unused ScrollableArea member functions https://bugs.webkit.org/show_bug.cgi?id=78388 Reviewed by Beth Dakin. * platform/ScrollableArea.cpp: * platform/ScrollableArea.h: 2012-02-10 Pavel Podivilov Fix a few typos in IDL exception names. https://bugs.webkit.org/show_bug.cgi?id=78356 Reviewed by Adam Barth. * dom/Node.idl: * notifications/NotificationCenter.idl: * page/Navigator.idl: 2012-02-10 Benjamin Poulain DefaultLocalizationStrategy::htmlSelectMultipleItems() should use size_t instead of int https://bugs.webkit.org/show_bug.cgi?id=78374 Reviewed by Joseph Pecoraro. The value comes from size_t and is converted to int for no good reason. We should use size_t. * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems): * platform/DefaultLocalizationStrategy.h: (DefaultLocalizationStrategy): 2012-02-10 Anders Carlsson More ScrollableArea cleanup https://bugs.webkit.org/show_bug.cgi?id=78383 Reviewed by Beth Dakin. Get rid of setScrollOriginX and setScrollOriginY. Make ScrollableArea::setScrollOrigin private. * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setScrollOrigin): * platform/ScrollableArea.h: (ScrollableArea): 2012-02-10 Kentaro Hara Rename [JSCustomPrototypePutDelegate] to [JSCustomNamedGetterOnPrototype] https://bugs.webkit.org/show_bug.cgi?id=78353 Reviewed by Adam Barth. [JSCustomPrototypePutDelegate] is used to write custom code for named getters on a prototype interface. "PutDelegate" is just a method name in implementation and not so descriptive. This patch renames it to [JSCustomNamedGetterOnPrototype]. This is also for naming consistency with [CustomNamedGetter]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * page/Location.idl: 2012-02-10 Enrica Casucci Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies. https://bugs.webkit.org/show_bug.cgi?id=78282 This patch removes any accesss to the NSPasteboard object from the Pasteboard class which now makes use of a new pasteboardStrategy object that is implemented both in WebKit and WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy interface but this one more step in the direction of removing access to NSPasteboard from the WebProcess. As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes. Reviewed by Anders Carlsson. No new tests. No change in behavior, just code refactoring. * WebCore.exp.in: Added exported class PlatformPasteboard. * WebCore.xcodeproj/project.pbxproj: Added new files to the build. * editing/mac/EditorMac.mm: (WebCore::Editor::writeSelectionToPasteboard): New method signature that doesn't use OBJ-C types. * platform/Pasteboard.h: * platform/PasteboardStrategy.h: Added PasteboardStrategy abstract class. * platform/PlatformPasteboard.h: Added. This class implements access to NSPasteboard. * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::pasteboardStrategy): Added. * platform/mac/DragDataMac.mm: (WebCore::DragData::canSmartReplace): (WebCore::insertablePasteboardTypes): (WebCore::DragData::asURL): * platform/mac/PasteboardMac.mm: (WebCore::selectionPasteboardTypes): Changed to use Vector instead of NSArray. (WebCore::writableTypesForURL): Ditto. (WebCore::createWritableTypesForImage): Ditto. (WebCore::writableTypesForImage): Ditto. (WebCore::Pasteboard::Pasteboard): Removed access to NSPasteboard. (WebCore::Pasteboard::clear): Modified to use platformStrategies()->pasteboardStrategy(). (WebCore::Pasteboard::writeSelectionForTypes): Ditto. (WebCore::Pasteboard::writePlainText): Ditto. (WebCore::Pasteboard::writeSelection): Ditto. (WebCore::writeURLForTypes): Ditto. (WebCore::Pasteboard::writeURL): Ditto. (WebCore::writeFileWrapperAsRTFDAttachment): Ditto. (WebCore::Pasteboard::writeImage): Ditto. (WebCore::Pasteboard::writeClipboard): Ditto. (WebCore::Pasteboard::canSmartReplace): Ditto. (WebCore::Pasteboard::plainText): Ditto. (WebCore::documentFragmentWithRTF): Ditto. (WebCore::Pasteboard::documentFragment): Ditto. * platform/mac/PlatformPasteboardMac.mm: Added. (WebCore::PlatformPasteboard::PlatformPasteboard): (WebCore::PlatformPasteboard::getTypes): (WebCore::PlatformPasteboard::bufferForType): (WebCore::PlatformPasteboard::getPathnamesForType): (WebCore::PlatformPasteboard::stringForType): (WebCore::PlatformPasteboard::copy): (WebCore::PlatformPasteboard::setTypes): (WebCore::PlatformPasteboard::setBufferForType): (WebCore::PlatformPasteboard::setPathnamesForType): (WebCore::PlatformPasteboard::setStringForType): 2012-02-10 Kentaro Hara Rename [JSCustomGetOwnPropertySlotDelegate] to [JSCustomGetOwnPropertySlotAndDescriptor] https://bugs.webkit.org/show_bug.cgi?id=78352 Reviewed by Adam Barth. [JSCustomGetOwnPropertySlotDelegate] is used for "flexibly customizable" named getter. It allows us to write custom code for getOwnPropertySlotDelegate() and getOwnPropertyDescriptorDelegate(). To clarify that, we can rename [JSCustomGetOwnPropertySlotDelegate] to [JSCustomGetOwnPropertySlotAndDescriptor]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): * html/HTMLAppletElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLObjectElement.idl: * page/History.idl: * page/Location.idl: * workers/WorkerContext.idl: 2012-02-10 Anders Carlsson Minor ScrollAnimatorMac cleanup https://bugs.webkit.org/show_bug.cgi?id=78375 Reviewed by Beth Dakin. Get rid of adjustScrollXPositionIfNecessary and adjustScrollYPositionIfNecessary. Also, reduce nesting in willAdd/didAdd functions by using early returns. * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::immediateScrollBy): 2012-02-10 Anders Carlsson Minor ScrollableArea cleanup https://bugs.webkit.org/show_bug.cgi?id=78372 Reviewed by Beth Dakin. Get rid of scrollToXOffsetWithoutAnimation and scrollToYOffsetWithoutAnimation. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation): * platform/ScrollableArea.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::computeLogicalHeight): (WebCore::RenderListBox::scrollToRevealElementAtListIndex): (WebCore::RenderListBox::setScrollTop): 2012-02-10 Benjamin Poulain [Mac] DYLIB_INSTALL_NAME_BASE should not be prefixed by the SDKROOT https://bugs.webkit.org/show_bug.cgi?id=78320 Reviewed by Joseph Pecoraro. * Configurations/WebCore.xcconfig: 2012-02-10 Anders Carlsson Update the non-fast-scrollable region for subframe layout as well https://bugs.webkit.org/show_bug.cgi?id=78366 Reviewed by Beth Dakin. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::computeNonFastScrollableRegion): Move the non-fast-scrollable region computation out into a new function. (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): Always recompute the non-fast-scrollable region whenever a frame view's layout is updated, not just the main frame. 2012-02-09 Chris Marrin Implement hardware animation of CSS filters https://bugs.webkit.org/show_bug.cgi?id=78155 Added logic to PlatformCAAnimation to return enough information to GraphicsLayerCA to be able to construct a keyPath animation for each filter property. Some filters need to animate multiple properties per filter, so PlatformCAAnimation also returns the number of properties per filter and then an animation is constructed for each one. Also added all the support logic to handle hardware filter animation in the higher level logic, just like we do for transforms and opacity. Also stubbed out new PlatformCAAnimation functions for Windows. We don't yet support hardware filters on Windows. Reviewed by Dean Jackson. Tests: css3/filters/filter-animation-from-none-hw.html css3/filters/filter-animation-from-none-multi-hw.html css3/filters/filter-animation-from-none-multi.html css3/filters/filter-animation-hw.html css3/filters/filter-animation-multi-hw.html css3/filters/filter-animation-multi.html * page/animation/AnimationBase.cpp: (WebCore): (PropertyWrapperAcceleratedFilter): (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter): (WebCore::PropertyWrapperAcceleratedFilter::animationIsAccelerated): (WebCore::PropertyWrapperAcceleratedFilter::blend): (WebCore::AnimationBase::ensurePropertyMap): * platform/graphics/GraphicsLayer.cpp: (WebCore): (WebCore::filterOperationsAt): (WebCore::GraphicsLayer::validateFilterOperations): * platform/graphics/GraphicsLayer.h: (WebCore): (FilterAnimationValue): (WebCore::FilterAnimationValue::FilterAnimationValue): (WebCore::FilterAnimationValue::clone): (WebCore::FilterAnimationValue::value): (GraphicsLayer): * platform/graphics/GraphicsLayerClient.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::propertyIdToString): (WebCore::GraphicsLayerCA::moveOrCopyAnimations): (WebCore::GraphicsLayerCA::addAnimation): (WebCore::GraphicsLayerCA::ensureStructuralLayer): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): (WebCore): (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes): (WebCore::GraphicsLayerCA::createBasicAnimation): (WebCore::GraphicsLayerCA::createKeyframeAnimation): (WebCore::GraphicsLayerCA::setFilterAnimationEndpoints): (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): (WebCore::GraphicsLayerCA::cloneLayer): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/ca/PlatformCAAnimation.h: (PlatformCAAnimation): * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (PlatformCAAnimation::setFromValue): (PlatformCAAnimation::setToValue): (PlatformCAAnimation::setValues): (PlatformCAAnimation::numAnimatedFilterProperties): (PlatformCAAnimation::animatedFilterPropertyName): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::setFromValue): (PlatformCAAnimation::setToValue): (PlatformCAAnimation::setValues): (PlatformCAAnimation::numAnimatedFilterProperties): (PlatformCAAnimation::animatedFilterPropertyName): * platform/graphics/filters/FilterOperation.h: (FilterOperation): (WebCore::FilterOperation::isDefault): (DefaultFilterOperation): (WebCore::DefaultFilterOperation::create): (WebCore::DefaultFilterOperation::operator==): (WebCore::DefaultFilterOperation::isDefault): (WebCore::DefaultFilterOperation::DefaultFilterOperation): (WebCore): * rendering/RenderLayer.h: (WebCore::RenderLayer::hasFilter): (RenderLayer): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty): (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty): 2012-02-10 Peter Rybin Web Inspector: CodeGeneratorInspector.py: properly resolve output types of commands https://bugs.webkit.org/show_bug.cgi?id=78025 Reviewed by Vsevolod Vlasov. Code for generating ad-hoc types is added. It was reused from event generator part. * inspector/CodeGeneratorInspector.py: (Generator.process_event): (Generator.process_command): (Generator.resolve_type_and_generate_ad_hoc): (Generator.resolve_type_and_generate_ad_hoc.AdHocTypeContext): (Generator.resolve_type_and_generate_ad_hoc.AdHocTypeContext.get_type_name_fix): (Generator.resolve_type_and_generate_ad_hoc.AdHocTypeContext.get_type_name_fix.NameFix): (Generator.resolve_type_and_generate_ad_hoc.AdHocTypeContext.get_type_name_fix.NameFix.output_comment): (Generator.resolve_type_and_generate_ad_hoc.AdHocTypeContext.add_type): (Generator.resolve_type_and_generate_ad_hoc.InterfaceForwardListener): (Generator.resolve_type_and_generate_ad_hoc.InterfaceForwardListener.add_type_data): (Generator.resolve_type_and_generate_ad_hoc.InterfaceResolveContext): (Generator.resolve_type_and_generate_ad_hoc.InterfaceGenerateContext): (Generator): 2012-02-10 Kentaro Hara Rename [CustomPropertyNames] to [CustomEnumerateProperty] https://bugs.webkit.org/show_bug.cgi?id=78351 Reviewed by Adam Barth. This patch renames [CustomPropertyNames] to [CustomEnumerateProperty], for clarification and for naming consistency with [CustomDeleteProperty]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateImplementationNamedPropertyGetter): * css/CSSStyleDeclaration.idl: * dom/DOMStringMap.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * storage/Storage.idl: 2012-02-09 Antti Koivisto Use underlying property set to refcount PropertySetCSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=78257 Reviewed by Andreas Kling. Clean up the PropertySetCSSStyleDeclaration refcounting. PropertySetCSSStyleDeclaration now forwards the ref/deref to the underlying StylePropertySet. Also made CSSComputedStyleDeclaration construction use the standard create() pattern. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::ref): (WebCore): (WebCore::CSSComputedStyleDeclaration::deref): * css/CSSComputedStyleDeclaration.h: (WebCore::CSSComputedStyleDeclaration::create): (CSSComputedStyleDeclaration): (WebCore): * css/CSSStyleDeclaration.h: (CSSStyleDeclaration): * css/StylePropertySet.cpp: (WebCore::PropertySetCSSStyleDeclaration::PropertySetCSSStyleDeclaration): (WebCore): (WebCore::StylePropertySet::~StylePropertySet): (WebCore::StylePropertySet::ensureCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): * css/StylePropertySet.h: * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): (WebCore::highestEmbeddingAncestor): (WebCore::ApplyStyleCommand::computedFontSize): * editing/EditingStyle.cpp: (WebCore::EditingStyle::init): (WebCore::EditingStyle::removeStyleAddedByNode): (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode): (WebCore::EditingStyle::triStateOfStyle): (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): (WebCore::backgroundColorInEffect): * editing/Editor.cpp: (WebCore::Editor::textDirectionForSelection): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getComputedStyleForNode): * page/DOMWindow.cpp: (WebCore::DOMWindow::getComputedStyle): * svg/SVGAnimateElement.cpp: (WebCore::getPropertyValue): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::baseValueFor): 2012-02-10 Alexander Pavlov Web Inspector: [TextPrompt] TAB should complete suggestions up to their common prefix in Console https://bugs.webkit.org/show_bug.cgi?id=78236 Reviewed by Vsevolod Vlasov. * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._completionsReady): (WebInspector.TextPrompt.prototype._completeCommonPrefix): (WebInspector.TextPrompt.prototype.acceptSuggestion): (WebInspector.TextPrompt.prototype.tabKeyPressed): 2012-02-10 Pavel Feldman Web Inspector: implement undo for setOuterHTML via undo-ing nested primitive commands. https://bugs.webkit.org/show_bug.cgi?id=78346 Reviewed by Yury Semikhatsky. Tests: inspector/elements/undo-set-outer-html-2.html inspector/elements/undo-set-outer-html.html * inspector/DOMEditor.cpp: (WebCore::DOMEditor::RemoveChildAction::RemoveChildAction): (WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction): (WebCore::DOMEditor::InsertBeforeAction::undo): (WebCore::DOMEditor::RemoveAttributeAction::RemoveAttributeAction): (WebCore::DOMEditor::SetAttributeAction::SetAttributeAction): (WebCore::DOMEditor::SetOuterHTMLAction::SetOuterHTMLAction): (WebCore::DOMEditor::SetOuterHTMLAction::perform): (WebCore::DOMEditor::SetOuterHTMLAction::undo): (DOMEditor::SetOuterHTMLAction): (WebCore::DOMEditor::ReplaceWholeTextAction::ReplaceWholeTextAction): (DOMEditor::ReplaceChildNodeAction): (WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction): (WebCore::DOMEditor::ReplaceChildNodeAction::perform): (WebCore::DOMEditor::ReplaceChildNodeAction::undo): (WebCore): (DOMEditor::SetNodeValueAction): (WebCore::DOMEditor::SetNodeValueAction::SetNodeValueAction): (WebCore::DOMEditor::SetNodeValueAction::perform): (WebCore::DOMEditor::SetNodeValueAction::undo): (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::removeChild): (WebCore::DOMEditor::setAttribute): (WebCore::DOMEditor::removeAttribute): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::replaceWholeText): (WebCore::DOMEditor::replaceChild): (WebCore::DOMEditor::setNodeValue): (WebCore::populateErrorString): * inspector/DOMEditor.h: (DOMEditor): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchDocument): (WebCore): (WebCore::DOMPatchSupport::DOMPatchSupport): (WebCore::DOMPatchSupport::patchNode): (WebCore::DOMPatchSupport::innerPatchNode): (WebCore::DOMPatchSupport::innerPatchChildren): (WebCore::DOMPatchSupport::insertBeforeAndMarkAsUsed): (WebCore::DOMPatchSupport::removeChildAndMoveToNew): * inspector/DOMPatchSupport.h: (WebCore): (DOMPatchSupport): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::StyleSheetAction::perform): (WebCore::InspectorCSSAgent::StyleSheetAction::undo): (InspectorCSSAgent::StyleSheetAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::perform): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::undo): (WebCore::InspectorCSSAgent::SetPropertyTextAction::perform): (WebCore::InspectorCSSAgent::SetPropertyTextAction::undo): (WebCore::InspectorCSSAgent::TogglePropertyAction::perform): (WebCore::InspectorCSSAgent::TogglePropertyAction::undo): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::assertStyleSheetForId): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::toErrorString): (WebCore): (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::setOuterHTML): (WebCore::InspectorDOMAgent::undo): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/InspectorHistory.cpp: (WebCore::InspectorHistory::perform): (WebCore::InspectorHistory::undo): * inspector/InspectorHistory.h: (WebCore): (Action): (InspectorHistory): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::setDocumentContent): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::toggleProperty): (WebCore::InspectorStyleSheet::setPropertyText): (WebCore::InspectorStyleSheet::toggleProperty): * inspector/InspectorStyleSheet.h: (InspectorStyle): (InspectorStyleSheet): 2012-02-10 Kentaro Hara Replace [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack] https://bugs.webkit.org/show_bug.cgi?id=78327 Reviewed by Adam Barth. This patch replaces [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack], and removes [CustomArgumentHandling]. Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorJS.pm: Modified to replace [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack]. (GenerateCallWith): (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateCallWith): * bindings/scripts/CodeGeneratorGObject.pm: Ditto. (SkipFunction): (GenerateFunction): * bindings/scripts/CodeGeneratorCPP.pm: Simply removed [CustomArgumentHandling] from the skipped list. By this fix, CodeGeneratorCPP.pm will generate meaningless code for attributes or methods which was previously marked as [CustomArgumentHandling], but this change will be harmless. (ShouldSkipType): * bindings/v8/custom/V8ConsoleCustom.cpp: Changed the argument order. (WebCore::V8Console::assertCallback): * page/Console.cpp: Ditto. (WebCore::Console::assertCondition): (WebCore::Console::timeEnd): * page/Console.h: Ditto. (Console): * bindings/scripts/test/TestObj.idl: Added test cases for [CallWith=ScriptArguments|CallStack]. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::withScriptArgumentsAndCallStackAttribute): (WebDOMTestObj::setWithScriptArgumentsAndCallStackAttribute): (WebDOMTestObj::withScriptArgumentsAndCallStack): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_with_script_arguments_and_call_stack): (webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute): (webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj withScriptArgumentsAndCallStackAttribute]): (-[DOMTestObj setWithScriptArgumentsAndCallStackAttribute:]): (-[DOMTestObj withScriptArgumentsAndCallStack]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrGetter): (TestObjInternal): (WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrSetter): (WebCore::TestObjInternal::withScriptArgumentsAndCallStackCallback): (WebCore): (WebCore::ConfigureV8TestObjTemplate): 2012-02-10 Carlos Garcia Campos [GTK] KURL::fileSystemPath() doesn't work if uri contains # https://bugs.webkit.org/show_bug.cgi?id=78339 Reviewed by Philippe Normand. * platform/gtk/KURLGtk.cpp: (WebCore::KURL::fileSystemPath): Use GFile API instead of g_filename_from_uri() to convert the uri to a local path. g_file_get_path() removes the anchor from the uri and returns a valid path instead of NULL. 2012-02-10 Pablo Flouret CodeGeneratorJS doesn't always generate visitChildren() implementation when required https://bugs.webkit.org/show_bug.cgi?id=78336 Reviewed by Kentaro Hara. In an IDL for an interface that declares no functions, but has attributes with [CachedAttribute], the implementation of visitChildren() is not generated by the JSC code generator. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::visitChildren): (WebCore): 2012-02-10 Noel Gordon [chromium] Increase JPEG decoding performance some more https://bugs.webkit.org/show_bug.cgi?id=78323 Reviewed by Adam Barth. Increase JPEG image decoding speed by another 9% (avg) according to libjpeg-turbo tjbench. No new tests. Covered by many existing tests, all requiring subsequent rebaselines. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (dctMethod): Fast decode on the jpeg-turbo using ports (Chrome Android, Chrome, Chromium). (WebCore::JPEGImageReader::decode): Select DCT method via a helper routine. 2012-02-10 Vsevolod Vlasov Web Inspector: FileSelector should not depend on DebuggerPresentationModel. https://bugs.webkit.org/show_bug.cgi?id=78337 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsNavigator.prototype.reset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.FileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.FileSelector.prototype.reset): (WebInspector.ScriptsPanel.ComboBoxFileSelector): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.reset): 2012-02-10 Kentaro Hara Remove [ConvertingNullStringTo] from CloseEvent.idl https://bugs.webkit.org/show_bug.cgi?id=78328 Reviewed by Adam Barth. In CloseEvent.idl, [ConvertingNullStringTo] is a typo of [ConvertNullStringTo], (although in bug 78108, [ConvertNullStringTo] was renamed to [TreatReturnedNullStringAs]). Anyway, the spec says that "The reason attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to empty string." http://dev.w3.org/html5/websockets/#event-definitions Thus, this patch removes [ConvertingNullStringTo] from CloseEvent.idl. Test: fast/events/constructors/close-event-constructor.html * websockets/CloseEvent.idl: 2012-02-10 Pavel Feldman [Qt] REGRESSION(r107242): It made 5 inspector tests crash in debug mode https://bugs.webkit.org/show_bug.cgi?id=78330 Reviewed by Yury Semikhatsky. * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::innerPatchChildren): 2012-02-09 Andrey Kosyakov Web Inspector: [refactoring] TimelineModel should not depend on TimelinePanel https://bugs.webkit.org/show_bug.cgi?id=78254 Reviewed by Yury Semikhatsky. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._loadFromFile): (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked): (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.prototype._onRecordsCleared): (WebInspector.TimelineModel): (WebInspector.TimelineModel.prototype.startRecord): (WebInspector.TimelineModel.prototype.stopRecord): (WebInspector.TimelineModel.prototype._onRecordAdded): (WebInspector.TimelineModel.prototype._addRecord): (WebInspector.TimelineModel.prototype._loadNextChunk): (WebInspector.TimelineModel.prototype._loadFromFile): (WebInspector.TimelineModel.prototype._reset): 2012-02-09 Kentaro Hara Unreviewed, rolling out r107368. http://trac.webkit.org/changeset/107368 https://bugs.webkit.org/show_bug.cgi?id=78327 break GTK build * bindings/scripts/CodeGeneratorCPP.pm: (ShouldSkipType): * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): (GenerateFunction): * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallWith): (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): (GenerateCallWith): (GenerateFunctionCallString): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj customArgsAndException:]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::customArgsAndExceptionCallback): (TestObjInternal): (WebCore): (WebCore::ConfigureV8TestObjTemplate): * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::assertCallback): * page/Console.cpp: (WebCore::Console::assertCondition): (WebCore::Console::timeEnd): * page/Console.h: (Console): * page/Console.idl: 2012-02-09 Zoltan Herczeg Heap-buffer-overflow in WebCore::CSSParser::lex https://bugs.webkit.org/show_bug.cgi?id=77402 Reviewed by Antti Koivisto. Comments should check only a single \0 terminator. Test: fast/css/parsing-css-comment.html * css/CSSParser.cpp: (WebCore::CSSParser::lex): 2012-02-09 Kentaro Hara Replace [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack] https://bugs.webkit.org/show_bug.cgi?id=78327 Reviewed by Adam Barth. This patch replaces [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack], and removes [CustomArgumentHandling]. Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorJS.pm: Modified to replace [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack]. (GenerateCallWith): (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateCallWith): * bindings/scripts/CodeGeneratorCPP.pm: Simply removed [CustomArgumentHandling] from the skipped list. By this fix, CodeGeneratorCPP.pm will generate meaningless code for attributes or methods which was previously marked as [CustomArgumentHandling], but this change will be harmless. (ShouldSkipType): * bindings/scripts/CodeGeneratorGObject.pm: Ditto. (SkipFunction): (GenerateFunction): * bindings/v8/custom/V8ConsoleCustom.cpp: Changed the argument order. (WebCore::V8Console::assertCallback): * page/Console.cpp: Ditto. (WebCore::Console::assertCondition): (WebCore::Console::timeEnd): * page/Console.h: Ditto. (Console): * bindings/scripts/test/TestObj.idl: Added test cases for [CallWith=ScriptArguments|CallStack]. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::withScriptArgumentsAndCallStackAttribute): (WebDOMTestObj::setWithScriptArgumentsAndCallStackAttribute): (WebDOMTestObj::withScriptArgumentsAndCallStack): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_with_script_arguments_and_call_stack): (webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute): (webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj withScriptArgumentsAndCallStackAttribute]): (-[DOMTestObj setWithScriptArgumentsAndCallStackAttribute:]): (-[DOMTestObj withScriptArgumentsAndCallStack]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrGetter): (TestObjInternal): (WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrSetter): (WebCore::TestObjInternal::withScriptArgumentsAndCallStackCallback): (WebCore): (WebCore::ConfigureV8TestObjTemplate): 2012-02-09 Adam Barth Dromaeo/dom-traverse.html should go fast https://bugs.webkit.org/show_bug.cgi?id=78307 Reviewed by Eric Seidel. This patch improves Dromaeo/dom-traverse.html by roughly 2.5% by removing a branch. Previously, we null-checked the result of V8DOMWrapper::getWrapper in a hot code path, but the only case where we return a non-empty wrapper comes from a cold code path. By pushing the null check into the cold codepath, we eliminate the branch from the hot code path. This patch also annotates the branches in the hot code path with their likely outcome. I didn't measure a statistically significant improvement with that aspect of the change, but it seems worthwhile. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/v8/V8DOMWrapper.cpp: (WebCore::getExistingWrapperInline): (WebCore): (WebCore::V8DOMWrapper::getExistingWrapperSlow): (WebCore::V8DOMWrapper::getWrapperSlow): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getExistingWrapper): (V8DOMWrapper): (WebCore::V8DOMWrapper::getWrapper): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): 2012-02-09 Emil A Eklund Convert Frame/FrameView to LayoutUnits in preparation for turning on subpixel layout https://bugs.webkit.org/show_bug.cgi?id=78311 Reviewed by Eric Seidel. No new tests, no new functionality. * page/Frame.cpp: (WebCore::Frame::nodeImage): Pixel snap painting rect for image to ensure that it is painted aligned to device pixels. This avoids avoid unwanted anti-aliasing. * page/FrameView.cpp: (WebCore::FrameView::windowClipRectForLayer): Pixel snap clip rects as all window coordinates and sizes are exposed as integers. * page/GestureTapHighlighter.cpp: * page/Page.cpp: (WebCore::Page::addRelevantRepaintedObject): As the painting is done aligned on pixel boundaries we need to pixel snap the view rect when checking if it intersects the objects paint rect. * page/mac/FrameMac.mm: (WebCore::Frame::snapshotDragImage): (WebCore::Frame::nodeImage): Pixel snap painting rect for image to ensure that it is painted aligned to device pixels. This avoids avoid unwanted anti-aliasing. * page/win/FrameCGWin.cpp: (WebCore::Frame::nodeImage): Pixel snap painting rect for image to ensure that it is painted aligned to device pixels. This avoids avoid unwanted anti-aliasing. * rendering/LayoutTypes.h: (WebCore::pixelSnappedIntRect): (WebCore): No-op implementation of pixelSnappedIntRect for now. 2012-02-09 Kenichi Ishibashi Add WebSocket extension support https://bugs.webkit.org/show_bug.cgi?id=78079 This patch introduces WebSocketExtensionDispatcher class, which creates client's Sec-WebSocket-Extensions header field and parses the server response. This patch doesn't add any actual extension, so no changes in behavior. Reviewed by Kent Tamura. No new tests except for chromium port. * CMakeLists.txt: Added WebSocketExtensionDispatcher.(cpp|h) and WebSocketExtensionProcessor.h. * GNUmakefile.list.am: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * websockets/WebSocketExtensionDispatcher.cpp: Added. (WebCore): (ExtensionParser): (WebCore::ExtensionParser::ExtensionParser): (WebCore::ExtensionParser::currentToken): (WebCore::ExtensionParser::finished): (WebCore::ExtensionParser::parsedSuccessfully): (WebCore::isTokenCharacter): (WebCore::isSeparator): (WebCore::ExtensionParser::skipSpaces): (WebCore::ExtensionParser::consumeToken): (WebCore::ExtensionParser::consumeQuotedString): (WebCore::ExtensionParser::consumeQuotedStringOrToken): (WebCore::ExtensionParser::consumeCharacter): (WebCore::WebSocketExtensionDispatcher::reset): (WebCore::WebSocketExtensionDispatcher::addProcessor): (WebCore::WebSocketExtensionDispatcher::createHeaderValue): (WebCore::WebSocketExtensionDispatcher::processHeaderValue): (WebCore::WebSocketExtensionDispatcher::failureReason): * websockets/WebSocketExtensionDispatcher.h: Added. (WebCore): (WebSocketExtensionDispatcher): (WebCore::WebSocketExtensionDispatcher::WebSocketExtensionDispatcher): * websockets/WebSocketExtensionProcessor.h: Added. (WebCore): (WebSocketExtensionProcessor): (WebCore::WebSocketExtensionProcessor::~WebSocketExtensionProcessor): (WebCore::WebSocketExtensionProcessor::extensionToken): (WebCore::WebSocketExtensionProcessor::failureReason): (WebCore::WebSocketExtensionProcessor::WebSocketExtensionProcessor): * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage): Adds extension header value if exists. (WebCore::WebSocketHandshake::clientHandshakeRequest): Ditto. (WebCore::WebSocketHandshake::reset): Resets WebSocketExtensionDispatcher object. (WebCore::WebSocketHandshake::serverHandshakeResponse): Removed. (WebCore::WebSocketHandshake::addExtensionProcessor): Added. (WebCore::WebSocketHandshake::readHTTPHeaders): Parses and checks every time Sec-WebSocket-Extensions header appears. (WebCore::WebSocketHandshake::checkResponseHeaders): Removed the check of Sec-WebSocket-Extensions. * websockets/WebSocketHandshake.h: Removed serverHandshakeResponse(). 2012-02-09 Xianzhu Wang Avoid compositing invisible fixed positioned elements https://bugs.webkit.org/show_bug.cgi?id=78186 Reviewed by James Robinson. Test: compositing/layer-creation/fixed-position-out-of-view.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 2012-02-09 Timothy Hatcher Prevent attaching when inspecting the Web Inspector. https://webkit.org/b/78304 Reviewed by Brian Weinstein. * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::canAttachWindow): Prevent attaching when the page is an inspector page. 2012-02-09 Dana Jansens [Chromium] Assertion failure minX <= maxX in Region.cpp https://bugs.webkit.org/show_bug.cgi?id=78038 Reviewed by James Robinson. Covered by existing tests (should make them stop asserting). Clamp sizes for composited layers coming out of WebCore to make sure they are valid non-negative values. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setSize): 2012-02-09 Gregg Tavares Make WebGLRenderingContext::printWarningToConsole safer https://bugs.webkit.org/show_bug.cgi?id=78284 Reviewed by Kenneth Russell. No new tests because no change in functionality. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::printWarningToConsole): 2012-02-09 W. James MacLean [chromium] Add support for starting page/scale animations on CC impl thread from WebViewImpl https://bugs.webkit.org/show_bug.cgi?id=77872 Reviewed by James Robinson. Added unit test. Provides a pathway to invoke CCLayerTreeHostImpl::startPageScaleAnimation() from WebViewImpl. This is intended to support scale and scroll animations, such as WebInputEvent::GestureDoubleTap. * platform/CrossThreadCopier.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::startPageScaleAnimation): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::startPageScaleAnimation): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::startPageScaleAnimation): (WebCore): (WebCore::CCThreadProxy::requestStartPageScaleAnimationOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-02-09 Xianzhu Wang [Chromium] TiledLayerChromium::protectVisibleTileTextures() should only protect the visible textures https://bugs.webkit.org/show_bug.cgi?id=78249 Reviewed by James Robinson. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::protectVisibleTileTextures): 2012-02-09 Hayato Ito Add Node::isShadowElement() member function. https://bugs.webkit.org/show_bug.cgi?id=78201 Reviewed by Dimitri Glazkov. No tests. No change in behavior. An upcoming change requires this to detect HTMLShadowElement. * dom/Node.h: (Node): (WebCore::Node::isShadowElement): * html/shadow/HTMLShadowElement.h: (WebCore::HTMLShadowElement::isShadowElement): 2012-02-09 Ryosuke Niwa CachedResourceLoader is destroyed before CSSFontSelector is destroyed https://bugs.webkit.org/show_bug.cgi?id=77817 Reviewed by Adam Barth. Explicitly clear style selector before destorying the cached resource loader. No new tests but PerformanceTests/Parser/html5-full-render.html was crashing on performance bots due to this bug. * dom/Document.cpp: (WebCore::Document::~Document): 2012-02-09 Anders Carlsson Update the scroll layer position on the main thread when we have slow repaint objects https://bugs.webkit.org/show_bug.cgi?id=78300 Reviewed by Dan Bernstein. When we have slow repaint objects (background-attachment: fixed), we need to update the scroll layer position on the main thread, otherwise the web page will appear to jiggle. * page/FrameView.cpp: (WebCore::FrameView::addSlowRepaintObject): (WebCore::FrameView::removeSlowRepaintObject): Call ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange if needed. * page/FrameView.h: (WebCore::FrameView::hasSlowRepaintObjects): Add new getter. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange): Call ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread. (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition): New function that will update both the main frame scroll position and the scroll layer position. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::updateMainFrameScrollPositionAndScrollLayerPosition): Dispatch a call to ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition on the main thread. * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::ScrollingTreeNode): Initialize m_shouldUpdateScrollLayerPositionOnMainThread. (WebCore::ScrollingTreeNode::update): Set m_shouldUpdateScrollLayerPositionOnMainThread. * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::ScrollingTreeState): Initialize m_shouldUpdateScrollLayerPositionOnMainThread. (WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread): Update m_shouldUpdateScrollLayerPositionOnMainThread if needed. * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::setScrollPosition): Assert that we're not supposed to update the scroll layer position on the main thread. (WebCore::ScrollingTreeNodeMac::scrollBy): If we're supposed to update the scroll layer position on the main thread, call ScrollingTree::updateMainFrameScrollPositionAndScrollLayerPosition. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidScroll): If the frame view has its scrolling coordinated by a scrolling coordinator, don't update the scroll layer position. 2012-02-09 Anders Carlsson FrameView::addSlowRepaintObject() doesn't update m_canBlitOnScroll correctly https://bugs.webkit.org/show_bug.cgi?id=78291 Reviewed by Dan Bernstein. m_slowRepaintObjectCount needs to be incremented before calling updateCanBlitOnScrollRecursively(), because otherwise useSlowRepaints() will return false even though we have to use slow repaints. I was unable to make a layout test for this because it requires that updateCanBlitOnScrollRecursively() isn't called again after m_slowRepaintObjectCount has been incremented. * page/FrameView.cpp: (WebCore::FrameView::addSlowRepaintObject): 2012-02-09 Ojan Vafai Remove TreeOrderIterator and iterate over the child boxes directly. https://bugs.webkit.org/show_bug.cgi?id=78294 Reviewed by Tony Chang. No new tests. This is purely a refactor. No change in behavior. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): (FlexOrderHashTraits): (WebCore::RenderFlexibleBox::FlexOrderHashTraits::emptyValue): (WebCore::RenderFlexibleBox::FlexOrderHashTraits::constructDeletedValue): (WebCore::RenderFlexibleBox::FlexOrderHashTraits::isDeletedValue): 2012-02-09 Kentaro Hara Code generators should support multiple values for the [CallWith=] attribute https://bugs.webkit.org/show_bug.cgi?id=78224 Reviewed by Adam Barth. Currently we can specify only one value for one [CallWith=], like [CallWith=ScriptExecutionContext] or [CallWith=ScriptState]. To reduce redundant IDL attributes, we are planning to support multiple values for [CallWith=], like [CallWith=ScriptExecutionContext|ScriptArguments|CallStack]. This patch makes a change on code generators to support it. Test: bindings/scripts/test/TestObj.idl No change in WebKit behavior since IDL files have not yet used [CallWith=X|Y|Z]. * bindings/scripts/CodeGenerator.pm: Modified to support [CallWith=X|Y|Z]. (ExtendedAttributeContains): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): (GenerateCallWith): (GenerateParametersCheck): (GenerateImplementationFunctionCall): (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateCallWith): (GenerateFunctionCallString): * bindings/scripts/test/TestObj.idl: Added test cases for [CallWith=X|Y|Z]. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::withScriptExecutionContextAndScriptStateAttribute): (WebDOMTestObj::setWithScriptExecutionContextAndScriptStateAttribute): (WebDOMTestObj::withScriptExecutionContextAndScriptStateAttributeRaises): (WebDOMTestObj::setWithScriptExecutionContextAndScriptStateAttributeRaises): (WebDOMTestObj::withScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebDOMTestObj::setWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebDOMTestObj::withScriptExecutionContextAndScriptState): (WebDOMTestObj::withScriptExecutionContextAndScriptStateObjException): (WebDOMTestObj::withScriptExecutionContextAndScriptStateWithSpaces): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_with_script_execution_context_and_script_state): (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception): (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj withScriptExecutionContextAndScriptStateAttribute]): (-[DOMTestObj setWithScriptExecutionContextAndScriptStateAttribute:]): (-[DOMTestObj withScriptExecutionContextAndScriptStateAttributeRaises]): (-[DOMTestObj setWithScriptExecutionContextAndScriptStateAttributeRaises:]): (-[DOMTestObj withScriptExecutionContextAndScriptStateWithSpacesAttribute]): (-[DOMTestObj setWithScriptExecutionContextAndScriptStateWithSpacesAttribute:]): (-[DOMTestObj withScriptExecutionContextAndScriptState]): (-[DOMTestObj withScriptExecutionContextAndScriptStateObjException]): (-[DOMTestObj withScriptExecutionContextAndScriptStateWithSpaces]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateAttributeAttrGetter): (TestObjInternal): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateAttributeAttrSetter): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateCallback): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateObjExceptionCallback): (WebCore::TestObjInternal::withScriptExecutionContextAndScriptStateWithSpacesCallback): (WebCore): 2012-02-09 Kentaro Hara Rename [ConvertNullStringTo=] to [TreatReturnedNullStringAs=] https://bugs.webkit.org/show_bug.cgi?id=78108 Reviewed by Adam Barth. [ConvertNullStringTo=] is not descriptive. To clarify that it specifies the behavior when the null string is returned by WebCore, this patch renames [ConvertNullStringTo=] to [TreatReturnedNullStringAs=]. This change is also for naming consistency with [TreatNullAs] and [TreatUndefinedAs]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementationIndexer): (NativeToJSValue): * bindings/scripts/test/TestObj.idl: * css/CSSCharsetRule.idl: * css/CSSImportRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSValue.idl: * css/MediaList.idl: * css/StyleSheet.idl: * css/WebKitCSSKeyframesRule.idl: * dom/Attr.idl: * dom/CharacterData.idl: * dom/Clipboard.idl: * dom/DOMStringList.idl: * dom/Document.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/Entity.idl: * dom/MutationRecord.idl: * dom/Node.idl: * dom/Notation.idl: * dom/ProcessingInstruction.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLMediaElement.idl: * html/canvas/WebGLDebugShaders.idl: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * storage/IDBObjectStore.idl: * storage/IDBRequest.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * websockets/WebSocket.idl: * xml/XMLHttpRequest.idl: * xml/XPathNSResolver.idl: * xml/XSLTProcessor.idl: 2012-02-09 Tony Chang more refactoring of RenderFlexibleBox in preparation for multiline https://bugs.webkit.org/show_bug.cgi?id=78281 Reviewed by Ojan Vafai. Previously, we were creating Vector of each flex item's preferred size in document order, but for multiline, we need to break the lines in the flex order. I just removed this code since it was the wrong order. Instead, have 2 funtions, computeMainAxisPreferredSizes which only does the necessary layouts and margin computations to compute preferred sizes and computeFlexOrder which does the work of computing the flex order, preferred sizes, positive/negative flex. For multiline, we will have computeFlexOrder drive a while loop and it will return the flex items, preferred size, and positive/negative flex values for each line. No new tests, just refactoring. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Only layout auto sized children and set margins. (WebCore::RenderFlexibleBox::computeFlexOrder): Compute flex order, preferred size, positive/negative flex. (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm): Use the precomputed flex order. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Use the precomputed flex order. (WebCore::RenderFlexibleBox::layoutColumnReverse): Use the precomputed flex order. (WebCore::RenderFlexibleBox::alignChildren): Use the precomputed flex order. * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): 2012-02-09 Kentaro Hara Rename [Optional=CallWithDefaultValue] and [Optional=CallWithNullValue] https://bugs.webkit.org/show_bug.cgi?id=78200 Reviewed by Adam Barth. [Optional=CallWithDefaultValue] and [Optional=CallWithNullValue] are confusing. - [Optional=CallWithDefaultValue] indicates that a missing value should be treated as if the JavaScript undefined is passed. - [Optional=CallWithNullValue] indicates that a missing value should be treated as the WebKit null value (i.e. JSValue() or v8::Local()). - Actually, the difference between [Optional=CallWithDefaultValue] and [Optional=CallWithNullValue] will appear only when the type of the missing value is DOMString. In case of [Optional=CallWithDefaultValue], the missing value is converted to the string "undefined". On the other hand, in case of [Optional=CallWithNullValue], the missing value is converted to the WebKit null string. With these observations, this patch renames as follows: - Rename [Optional=CallWithDefaultValue] to [Optional=DefaultIsUndefined]. - Rename [Optional=CallWithNullValue] to [Optional=DefaultIsNullString]. Test: bindings/scripts/test/TestObj.idl * bindings/js/JSDOMBinding.h: Renamed MissingIsEmpty to DefaultIsNullString, renamed MissingIsUndefined to DefaultIsUndefined. * bindings/v8/V8Binding.h: Ditto. * bindings/v8/custom/V8BindingMacros.h: Ditto. * bindings/scripts/CodeGeneratorJS.pm: Modified to support the renaming. (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateParametersCheck): (RequiresCustomSignature): * bindings/scripts/test/TestObj.idl: Renamed [Optional=...] as described above. * bindings/scripts/test/TestInterface.idl: Ditto. * bindings/scripts/test/TestNamedConstructor.idl: Ditto. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::methodWithOptionalString): (WebDOMTestObj::methodWithOptionalStringIsUndefinedString): (WebDOMTestObj::methodWithOptionalStringIsNullString): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_method_with_optional_string): (webkit_dom_test_obj_method_with_optional_string_is_undefined_string): (webkit_dom_test_obj_method_with_optional_string_is_null_string): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj methodWithOptionalString:]): (-[DOMTestObj methodWithOptionalStringIsUndefinedString:]): (-[DOMTestObj methodWithOptionalStringIsNullString:]): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodWithOptionalStringCallback): (TestObjInternal): (WebCore::TestObjInternal::methodWithOptionalStringIsUndefinedStringCallback): (WebCore::TestObjInternal::methodWithOptionalStringIsNullStringCallback): (WebCore): * Modules/gamepad/GamepadList.idl: Renamed [Optional=...] as described above. * Modules/intents/Intent.idl: * css/CSSMediaRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSValueList.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/MediaQueryListListener.idl: * css/StyleMedia.idl: * css/StyleSheetList.idl: * css/WebKitCSSKeyframesRule.idl: * css/WebKitCSSMatrix.idl: * dom/CharacterData.idl: * dom/ClientRectList.idl: * dom/CompositionEvent.idl: * dom/CustomEvent.idl: * dom/DOMImplementation.idl: * dom/DOMStringList.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/Element.idl: * dom/Event.idl: * dom/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeList.idl: * dom/OverflowEvent.idl: * dom/Range.idl: * dom/ShadowRoot.idl: * dom/Text.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * html/DOMFormData.idl: * html/HTMLAllCollection.idl: * html/HTMLAudioElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/TextTrackCue.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * page/Console.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/IDBDatabase.idl: * storage/StorageEvent.idl: * svg/ElementTimeControl.idl: * svg/SVGDocument.idl: * svg/SVGElementInstanceList.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFilterElement.idl: * svg/SVGLocatable.idl: * svg/SVGMarkerElement.idl: * svg/SVGPathElement.idl: * svg/SVGSVGElement.idl: * svg/SVGStylable.idl: * svg/SVGTests.idl: * svg/SVGTextContentElement.idl: * webaudio/AudioNode.idl: * workers/SharedWorker.idl: * workers/WorkerContext.idl: * xml/DOMParser.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathExpression.idl: * xml/XPathNSResolver.idl: * xml/XPathResult.idl: 2012-02-09 Matthew Delaney getComputedStyle() returns different values for different zoom levels https://bugs.webkit.org/show_bug.cgi?id=32230 Reviewed by Beth Dakin. Test: fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::fillSizeToCSSValue): Pass down the RenderStyle for use in adjusting values to account for zoom. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Adjust additional properties that are affected by zoom. 2012-02-09 Kentaro Hara Rename [Return] to [CustomReturn] https://bugs.webkit.org/show_bug.cgi?id=78225 Reviewed by Adam Barth. [Return] is used to handle custom code for a returned value. To clarify it, this patch renames [Return] to [CustomReturn]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorGObject.pm: (GenerateFunction): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * dom/Node.idl: 2012-02-09 Levi Weintraub Add roundedIntPoint method for LayoutPoints https://bugs.webkit.org/show_bug.cgi?id=78262 Reviewed by Eric Seidel. Adding a roundedIntPoint method that operates on a LayoutPoint. Currently, this does nothing as LayoutPoint is a typedef to IntPoint. When we enable sub-pixel LayoutUnits, this is a critical part in our pixel snapping strategy, where we round the logical top- left point, then snap the right and bottom edges. Also using this new method where we wish to convert LayoutPoints to IntPoints, which we're currently doing implicitly (since they're the same thing). No new tests. No change in functionality. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::visiblePositionForPoint): (WebCore::AccessibilityRenderObject::accessibilityHitTest): * page/EventHandler.cpp: (WebCore::EventHandler::eventMayStartDrag): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::selectCursor): * rendering/LayoutTypes.h: (WebCore::roundedIntPoint): (WebCore): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::getCursor): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::offsetFromResizeCorner): (WebCore::RenderLayer::isPointInResizeControl): (WebCore::RenderLayer::paintLayerContents): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::paintContents): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::paint): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::paint): * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::paint): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::paint): 2012-02-09 John Bates [Chromium] Add chromium-style tracing support https://bugs.webkit.org/show_bug.cgi?id=76885 Reviewed by Darin Fisher. This code enables WebKit trace events to pass through more data to the chromium platform tracing API and generally to use the full tracing API provided by chromium. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluate): Replace old tracing API. * page/Console.cpp: (WebCore::Console::time): Replace old tracing API. (WebCore::Console::timeEnd): Replace old tracing API. * platform/chromium/PlatformSupport.h: * platform/chromium/TraceEvent.h: (WebCore::TraceEvent::TraceID::TraceID): (WebCore::TraceEvent::TraceID::data): (WebCore::TraceEvent::TraceStringWithCopy::TraceStringWithCopy): (WebCore::TraceEvent::TraceStringWithCopy::operator const char* ): (WebCore::TraceEvent::setTraceValue): (WebCore::TraceEvent::addTraceEvent): (WebCore::TraceEvent::TraceEndOnScopeClose::TraceEndOnScopeClose): (WebCore::TraceEvent::TraceEndOnScopeClose::~TraceEndOnScopeClose): (WebCore::TraceEvent::TraceEndOnScopeClose::initialize): (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::TraceEndOnScopeCloseThreshold): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::~TraceEndOnScopeCloseThreshold): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::initialize): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::addEventIfEnabled): 2012-02-09 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=78256 Rename line-grid-snap to line-snap so that it matches the draft proposal for the property. Reviewed by Dan Bernstein. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator LineSnap): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::alignBoxesInBlockDirection): (WebCore::RootInlineBox::lineSnapAdjustment): * rendering/RootInlineBox.h: (RootInlineBox): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): 2012-02-09 Benjamin Poulain The localization of htmlSelectMultipleItems() needs better support of pluralization https://bugs.webkit.org/show_bug.cgi?id=78197 Reviewed by Joseph Pecoraro. For translation, the localization of 0 and 1 depends on the language. * English.lproj/Localizable.strings: * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems): 2012-02-09 Anders Carlsson ScrollingTreeNodeMac should implement ScrollElasticityController https://bugs.webkit.org/show_bug.cgi?id=78277 Reviewed by Andreas Kling. Add stubbed out implementations of the ScrollElasticityController member functions. * page/scrolling/mac/ScrollingTreeNodeMac.h: (ScrollingTreeNodeMac): * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::allowsHorizontalStretching): (WebCore): (WebCore::ScrollingTreeNodeMac::allowsVerticalStretching): (WebCore::ScrollingTreeNodeMac::stretchAmount): (WebCore::ScrollingTreeNodeMac::pinnedInDirection): (WebCore::ScrollingTreeNodeMac::canScrollHorizontally): (WebCore::ScrollingTreeNodeMac::canScrollVertically): (WebCore::ScrollingTreeNodeMac::shouldRubberBandInDirection): (WebCore::ScrollingTreeNodeMac::absoluteScrollPosition): (WebCore::ScrollingTreeNodeMac::immediateScrollBy): (WebCore::ScrollingTreeNodeMac::immediateScrollByWithoutContentEdgeConstraints): (WebCore::ScrollingTreeNodeMac::startSnapRubberbandTimer): (WebCore::ScrollingTreeNodeMac::stopSnapRubberbandTimer): 2012-02-09 Adrienne Walker [chromium] Correct potential double reserveTextures() in CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=78258 Reviewed by James Robinson. This isn't a problem currently, because scrollbar layers don't create render surfaces. However, if this ever got used for other layers, we could call reserve on them twice needlessly. It's also just bad form to have an iterator doing the wrong thing. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::reserveTextures): 2012-02-09 Sheriff Bot Unreviewed, rolling out r107261. http://trac.webkit.org/changeset/107261 https://bugs.webkit.org/show_bug.cgi?id=78274 It has regressed svg/W3C-SVG-1.1/styling-css-05-b.svg (using lang() selectors) (Requested by jchaffraix on #webkit). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::isCommonAttributeSelectorAttribute): 2012-02-09 Joshua Bell [Chromium] IndexedDB: IDBVersionChangeRequest V8 wrapper not generated as ActiveDOMObject https://bugs.webkit.org/show_bug.cgi?id=78167 Add ActiveDOMObject annotation to IDBVersionChangeRequest.idl; it is not automagically inherited from IDBRequest.idl. Reviewed by Adam Barth. Test: storage/indexeddb/versionchangerequest-activedomobject.html * storage/IDBVersionChangeRequest.idl: 2012-02-09 Anders Carlsson The scrolling tree should know more about the scrollbar state https://bugs.webkit.org/show_bug.cgi?id=78268 Reviewed by Andreas Kling. With this change, the scroll tree now keeps track of the horizontal scroll elasticity, the vertical scroll elasticity and whether the page has enabled scrollbars. This is needed in order to make rubber-banding work correctly when doing fast scrolling. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::ScrollingTreeNode): (WebCore::ScrollingTreeNode::update): * page/scrolling/ScrollingTreeNode.h: (ScrollingTreeNode): * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::ScrollingTreeState): (WebCore::ScrollingTreeState::setHorizontalScrollElasticity): (WebCore): (WebCore::ScrollingTreeState::setVerticalScrollElasticity): (WebCore::ScrollingTreeState::setHasEnabledHorizontalScrollbar): (WebCore::ScrollingTreeState::setHasEnabledVerticalScrollbar): * page/scrolling/ScrollingTreeState.h: (WebCore::ScrollingTreeState::horizontalScrollElasticity): (ScrollingTreeState): (WebCore::ScrollingTreeState::verticalScrollElasticity): (WebCore::ScrollingTreeState::hasEnabledHorizontalScrollbar): (WebCore::ScrollingTreeState::hasEnabledVerticalScrollbar): 2012-02-09 Xianzhu Wang Unnecessary and incorrect invalidation about composited fixed-position layers https://bugs.webkit.org/show_bug.cgi?id=75638 When a FrameView scrolls, composited fixed-position layers should not contribute to the invalidation rect of the root layer. Reviewed by Simon Fraser. No new tests. Haven't found a good way to test this programatically. * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): 2012-02-09 Sheriff Bot Unreviewed, rolling out r107035. http://trac.webkit.org/changeset/107035 https://bugs.webkit.org/show_bug.cgi?id=78253 Regressed DOMDivWalk (Requested by arv on #webkit). * Target.pri: * UseV8.cmake: * WebCore.gypi: * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (HasCustomToV8Implementation): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): (WebCore): * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp. (WebCore): (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): (WebCore): 2012-02-09 David Barton MathML internals for bug 52444 fix - type checking, PassRefPtr https://bugs.webkit.org/show_bug.cgi?id=78180 Reviewed by Eric Seidel. static_cast(node()) is done in methods in RenderMathMLFenced.cpp and a few other files. It is more type-safe if the RenderMathMLFenced() or other constructor only accepts an Element*, not a Node*. Also a couple functions were changed to return a PassRefPtr instead of a RefPtr. No new tests. * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::RenderMathMLFenced): (WebCore::RenderMathMLFenced::updateFromElement): (WebCore::RenderMathMLFenced::makeOperatorStyle): (WebCore::RenderMathMLFenced::makeFences): (WebCore::RenderMathMLFenced::addChild): * rendering/mathml/RenderMathMLFenced.h: (RenderMathMLFenced): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::RenderMathMLFraction): * rendering/mathml/RenderMathMLFraction.h: (RenderMathMLFraction): * rendering/mathml/RenderMathMLMath.cpp: (WebCore::RenderMathMLMath::RenderMathMLMath): * rendering/mathml/RenderMathMLMath.h: (RenderMathMLMath): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::RenderMathMLOperator): (WebCore::RenderMathMLOperator::updateFromElement): (WebCore::RenderMathMLOperator::createStackableStyle): (WebCore::RenderMathMLOperator::createGlyph): * rendering/mathml/RenderMathMLOperator.h: (RenderMathMLOperator): * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::RenderMathMLRoot): (WebCore::RenderMathMLRoot::layout): * rendering/mathml/RenderMathMLRoot.h: (RenderMathMLRoot): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::RenderMathMLRow): * rendering/mathml/RenderMathMLRow.h: (RenderMathMLRow): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot): * rendering/mathml/RenderMathMLSquareRoot.h: (RenderMathMLSquareRoot): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::addChild): * rendering/mathml/RenderMathMLSubSup.h: (RenderMathMLSubSup): * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): * rendering/mathml/RenderMathMLUnderOver.h: (RenderMathMLUnderOver): 2012-02-09 Andreas Kling Avoid unnecessary work when evaluating style sharing candidates. Reviewed by Antti Koivisto. Do the cheap checks (bitfields, pointers) before calling virtuals and doing hash lookups. Remove comparison of attributes that are reflected in the attribute styles (cellpadding, lang and xml:lang.) Moved comparison of "type" and "readonly" attributes into the more specific canShareStyleWithControl() since they are only relevant for input elements. Don't bother calling isFormControlElement() on both elements since we already know they have the same tagQName(). Altogether this knocks off 8-9ms worth of samples per cycle of the "Moz" page cycler test. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::isCommonAttributeSelectorAttribute): 2012-02-09 Mike Lawther CSS3 calc() - remove mod https://bugs.webkit.org/show_bug.cgi?id=78226 mod has been removed from the spec for calc(). Reviewed by Ojan Vafai. * css/CSSCalculationValue.cpp: (WebCore::CSSCalcBinaryOperation::create): (WebCore::CSSCalcBinaryOperation::evaluate): (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression): * css/CSSGrammar.y: * platform/CalculationValue.h: 2012-02-09 Pavel Feldman Web Inspector: rename DOMEditor to DOMPatchSupport, move undoable actions from InspectorDOMAgent to the new DOMEditor. https://bugs.webkit.org/show_bug.cgi?id=78245 Reviewed by Yury Semikhatsky. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/DOMEditor.cpp: (DOMEditor::DOMAction): (WebCore::DOMEditor::DOMAction::DOMAction): (WebCore::DOMEditor::DOMAction::perform): (WebCore::DOMEditor::DOMAction::undo): (DOMEditor::RemoveChildAction): (WebCore::DOMEditor::RemoveChildAction::RemoveChildAction): (WebCore::DOMEditor::RemoveChildAction::perform): (WebCore::DOMEditor::RemoveChildAction::undo): (DOMEditor::InsertBeforeAction): (WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction): (WebCore::DOMEditor::InsertBeforeAction::perform): (WebCore::DOMEditor::InsertBeforeAction::undo): (DOMEditor::RemoveAttributeAction): (WebCore::DOMEditor::RemoveAttributeAction::RemoveAttributeAction): (WebCore::DOMEditor::RemoveAttributeAction::perform): (WebCore::DOMEditor::RemoveAttributeAction::undo): (DOMEditor::SetAttributeAction): (WebCore::DOMEditor::SetAttributeAction::SetAttributeAction): (WebCore::DOMEditor::SetAttributeAction::perform): (WebCore::DOMEditor::SetAttributeAction::undo): (DOMEditor::SetOuterHTMLAction): (WebCore::DOMEditor::SetOuterHTMLAction::SetOuterHTMLAction): (WebCore::DOMEditor::SetOuterHTMLAction::perform): (WebCore::DOMEditor::SetOuterHTMLAction::undo): (WebCore::DOMEditor::SetOuterHTMLAction::newNode): (DOMEditor::ReplaceWholeTextAction): (WebCore::DOMEditor::ReplaceWholeTextAction::ReplaceWholeTextAction): (WebCore::DOMEditor::ReplaceWholeTextAction::perform): (WebCore::DOMEditor::ReplaceWholeTextAction::undo): (WebCore::DOMEditor::DOMEditor): (WebCore): (WebCore::DOMEditor::~DOMEditor): (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::removeChild): (WebCore::DOMEditor::setAttribute): (WebCore::DOMEditor::removeAttribute): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::replaceWholeText): * inspector/DOMEditor.h: (WebCore): (DOMEditor): * inspector/DOMPatchSupport.cpp: Copied from Source/WebCore/inspector/DOMEditor.cpp. (WebCore::DOMPatchSupport::DOMPatchSupport): (WebCore::DOMPatchSupport::~DOMPatchSupport): (WebCore::DOMPatchSupport::patchDocument): (WebCore::DOMPatchSupport::patchNode): (WebCore::DOMPatchSupport::innerPatchNode): (WebCore): (WebCore::DOMPatchSupport::diff): (WebCore::DOMPatchSupport::innerPatchChildren): (WebCore::DOMPatchSupport::createDigest): (WebCore::DOMPatchSupport::insertBefore): (WebCore::DOMPatchSupport::removeChild): (WebCore::DOMPatchSupport::markNodeAsUsed): (WebCore::DOMPatchSupport::dumpMap): * inspector/DOMPatchSupport.h: Copied from Source/WebCore/inspector/DOMEditor.h. (DOMPatchSupport): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::setFrontend): (WebCore::InspectorDOMAgent::clearFrontend): (WebCore::InspectorDOMAgent::reset): (WebCore::InspectorDOMAgent::setAttributeValue): (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::removeAttribute): (WebCore::InspectorDOMAgent::removeNode): (WebCore::InspectorDOMAgent::setNodeName): (WebCore::InspectorDOMAgent::setOuterHTML): (WebCore::InspectorDOMAgent::setNodeValue): (WebCore::InspectorDOMAgent::moveTo): * inspector/InspectorDOMAgent.h: (WebCore): (InspectorDOMAgent): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::setDocumentContent): 2012-02-09 Mark Rowe REGRESSION (r104746): iframes load PDFs as media documents / Roll out r104746 since it completely broke support for loading PDF documents in subframes. Reviewed by Adam Treat. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): 2012-02-09 Andrey Kosyakov Web Inspector: [refactoring] take _showShortEvents out of timeline calculator https://bugs.webkit.org/show_bug.cgi?id=78230 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._toggleFilterButtonClicked): (WebInspector.TimelinePanel.prototype._refresh): (WebInspector.TimelinePanel.prototype._addToRecordsWindow): 2012-02-08 Dan Vrátil , Milan Crha [GTK] Embedded GtkWidgets are not drawn https://bugs.webkit.org/show_bug.cgi?id=63451 Remove widget from it's parent container when GtkPluginWidget is destroyed. Remove paint() method because real expose even is used for drawing child widgets now. Reviewed by Martin Robinson. * platform/gtk/GtkPluginWidget.cpp: (WebCore::GtkPluginWidget::~GtkPluginWidget): (WebCore): * platform/gtk/GtkPluginWidget.h: (GtkPluginWidget): 2012-02-09 Arun Patole Setting media element 'src' attribute to "" should trigger load https://bugs.webkit.org/show_bug.cgi?id=47907 Reviewed by Eric Carlson. Test: media/video-src-empty.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged):Trigger a load, as long as the 'src' attribute is present. 2012-02-09 Jonathan Backer [chromium] Add setNeedsRedraw to WebWidget https://bugs.webkit.org/show_bug.cgi?id=77555 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsRedraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setFullRootLayerDamage): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsRedraw): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::setFullRootLayerDamageOnImplThread): (WebCore): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-02-09 Pavel Feldman Web Inspector: fix setOuterHTML for the case that adds / removes duplicate. https://bugs.webkit.org/show_bug.cgi?id=78235 Reviewed by Yury Semikhatsky. * inspector/DOMEditor.cpp: (WebCore::DOMEditor::diff): (WebCore::DOMEditor::innerPatchChildren): (WebCore): (WebCore::nodeName): (WebCore::DOMEditor::dumpMap): * inspector/DOMEditor.h: (DOMEditor): 2012-02-09 Allan Sandfeld Jensen Ensure timers and other active DOM objects do not fire in suspended documents. https://bugs.webkit.org/show_bug.cgi?id=53733 ScriptExecutionContext now remembers it has suspended active DOM objects and suspends all newly installed active DOM objects as well. All create-calls active DOM objects now calls the post constructor method suspendIfNeeded that updates the suspend state. It is post constructor because the suspend/resume functions are virtual and thus can not be called from constructors. Reviewed by Mihai Parparita. Test: fast/events/suspend-timers.html * Modules/intents/IntentRequest.cpp: (WebCore::IntentRequest::create): * bindings/generic/ActiveDOMCallback.cpp: (WebCore::ActiveDOMCallback::ActiveDOMCallback): * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): (WebCore::ActiveDOMObject::suspendIfNeeded): * dom/ActiveDOMObject.h: (WebCore::ActiveDOMObject::suspendIfNeededCalled): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded): * dom/ScriptExecutionContext.h: (ScriptExecutionContext): (WebCore::ScriptExecutionContext::activeDOMObjectsAreSuspended): * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::create): * fileapi/FileReader.cpp: (WebCore::FileReader::create): * fileapi/FileReader.h: * fileapi/FileWriter.cpp: (WebCore::FileWriter::create): * fileapi/FileWriter.h: * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): (WebCore::HTMLAudioElement::createForJSConstructor): * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::create): * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::create): * notifications/Notification.cpp: (WebCore::Notification::create): * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::create): * notifications/NotificationCenter.h: * page/DOMTimer.cpp: (WebCore::DOMTimer::install): (WebCore::DOMTimer::fired): * page/EventSource.cpp: (WebCore::EventSource::create): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::create): * storage/IDBRequest.cpp: (WebCore::IDBRequest::create): * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::create): * storage/IDBVersionChangeRequest.cpp: (WebCore::IDBVersionChangeRequest::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): (WebCore::AudioContext::createOfflineContext): * websockets/WebSocket.cpp: (WebCore::WebSocket::create): * websockets/WebSocket.h: * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::create): 2012-02-09 Vsevolod Vlasov Unreviewed followup for r107235. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._hideNavigatorOverlay): (WebInspector.ScriptsPanel.prototype._navigatorOverlayWillHide): 2012-02-09 Vsevolod Vlasov Web Inspector: Support hiding scripts panel debug sidebar. https://bugs.webkit.org/show_bug.cgi?id=77543 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/Dialog.js: (WebInspector.Dialog): (WebInspector.DialogDelegate.prototype.show): * inspector/front-end/Images/navigatorPinButton.png: Added. * inspector/front-end/Images/navigatorShowHideButton.png: Added. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get view): (WebInspector.ScriptsNavigator.prototype.get element): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype.focus): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._fileSelected): (WebInspector.ScriptsPanel.prototype._createDebugToolbar): (WebInspector.ScriptsPanel.prototype._createNavigatorControls): (WebInspector.ScriptsPanel.prototype._createNavigatorControlButton): (WebInspector.ScriptsPanel.prototype._toggleNavigator): (WebInspector.ScriptsPanel.prototype._hidePinnedNavigator): (WebInspector.ScriptsPanel.prototype.set _pinNavigator): (WebInspector.ScriptsPanel.prototype.set _showNavigatorOverlay): (WebInspector.ScriptsPanel.prototype._hideNavigatorOverlay): (WebInspector.ScriptsPanel.prototype._navigatorOverlayWasShown): (WebInspector.ScriptsPanel.prototype._navigatorOverlayWillHide): * inspector/front-end/SidebarOverlay.js: Added. * inspector/front-end/SplitView.js: (WebInspector.SplitView.prototype.get resizable): (WebInspector.SplitView.prototype.hideMainElement): (WebInspector.SplitView.prototype.showMainElement): (WebInspector.SplitView.prototype.hideSidebarElement): (WebInspector.SplitView.prototype.showSidebarElement): (WebInspector.SplitView.prototype._resizerDragging): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype.get element): * inspector/front-end/WebKit.qrc: * inspector/front-end/dialog.css: * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: 2012-02-09 Alexei Filippov Web Inspector: Show percentage by default in heap profiler. https://bugs.webkit.org/show_bug.cgi?id=78103 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype._toPercentString): (WebInspector.HeapSnapshotGridNode.prototype._createValueCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotConstructorNode.prototype.get data): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.profileCallback): (WebInspector.DetailedHeapshotView): (WebInspector.DetailedHeapshotView.prototype.get statusBarItems): (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): (WebInspector.DetailedHeapshotView.prototype._updateFilterOptions): * inspector/front-end/UIUtils.js: (Number.withThousandsSeparator): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view .data-grid span.percent-column): 2012-02-09 Ilya Tikhonovsky Web Inspector: Timeline memory graph would have been more useful if it had used minUsedHeapSize as the lower bound. Currently it uses zero as the lower bound. https://bugs.webkit.org/show_bug.cgi?id=78222 Reviewed by Pavel Feldman. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.HeapGraph): (WebInspector.HeapGraph.prototype.update): * inspector/front-end/timelinePanel.css: (.memory-graph-label): (.max.memory-graph-label): (.min.memory-graph-label): 2012-02-09 Alexander Pavlov Web Inspector: Update protocol and UI to follow bug 77204 (Kill per-Attribute style declarations) https://bugs.webkit.org/show_bug.cgi?id=77962 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun): (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getInlineStylesAsync): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate.inlineCallback): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules.get continue): 2012-02-08 Pavel Feldman Web Inspector: toggle Edit as HTML on F2, drag nodes up / down upon Ctrl(Cmd) Up / Down. https://bugs.webkit.org/show_bug.cgi?id=78123 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::SetOuterHTMLAction::SetOuterHTMLAction): (WebCore::InspectorDOMAgent::SetOuterHTMLAction::undo): (InspectorDOMAgent::SetOuterHTMLAction): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._registerShortcuts): (WebInspector.ElementsPanel.prototype.handleShortcut): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype._ondragstart): (WebInspector.ElementsTreeOutline.prototype._ondragover): (WebInspector.ElementsTreeOutline.prototype._doMove): (WebInspector.ElementsTreeOutline.prototype._ondragend): (WebInspector.ElementsTreeOutline.prototype._populateContextMenu): (WebInspector.ElementsTreeOutline.prototype.handleShortcut): (WebInspector.ElementsTreeOutline.prototype._toggleEditAsHTML): (WebInspector.ElementsTreeOutline.prototype._selectNodeAfterEdit): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.commit): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted): * inspector/front-end/UIUtils.js: 2012-02-09 Roland Steiner SelectorChecker::checkSelector: move parameters into a struct https://bugs.webkit.org/show_bug.cgi?id=77525 Added 'SelectorCheckingContext' struct to hold parameters for the function. Adapted calling sites. (fixing change log after the commit message got bungled up). Reviewed by Antti Koivisto. No new tests. (refactoring) * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): (WebCore): (WebCore::SelectorChecker::checkOneSelector): * css/SelectorChecker.h: (SelectorCheckingContext): (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): (SelectorChecker): 2012-02-09 Philip Rogers Fix mirroring with SVG fonts https://bugs.webkit.org/show_bug.cgi?id=77067 Reviewed by Nikolas Zimmermann. SVG fonts were incorrectly handling mirrored characters in bidi text. In this change I added the function createStringWithMirroredCharacters which handles mirroring the characters when selecting glyphs for SVG fonts. I also made a small cosmetic change in the function charactersWithArabicForm, changing the bool parameter "mirror" to "rtl" which better reflects what it actually does. Several new tests were added to test mirroring with SVG fonts in the presence of Arabic forms and non-BMP characters. Tests: svg/custom/glyph-selection-arabic-forms.svg svg/custom/glyph-selection-bidi-mirror.svg svg/custom/glyph-selection-non-bmp.svg * platform/graphics/SVGGlyph.cpp: (WebCore::charactersWithArabicForm): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): (WebCore::SVGFontData::createStringWithMirroredCharacters): * svg/SVGFontData.h: (SVGFontData): 2012-02-09 Vsevolod Vlasov Web Inspector: Scripts navigator fails to reopen previously closed script. https://bugs.webkit.org/show_bug.cgi?id=78212 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._showFile): (WebInspector.ScriptsPanel.prototype._editorClosed): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype._tabClosed): 2012-02-09 Shinya Kawanaka ASSERT_NO_EXCEPTION should be initialized with non-zero value. https://bugs.webkit.org/show_bug.cgi?id=78194 Reviewed by Hajime Morita. ExceptionCode should not be checked without initializing it. However, we encountered a bug that breaks this rule. It was missed until now because ExceptionCode is sometimes set to 0 even if it is not initialized. This patch ensures it is initialized as non-zero value. No new tests, no change in behavior. * dom/ExceptionCodePlaceholder.cpp: (WebCore::NoExceptionAssertionChecker::NoExceptionAssertionChecker): (WebCore::NoExceptionAssertionChecker::~NoExceptionAssertionChecker): * dom/ExceptionCodePlaceholder.h: (NoExceptionAssertionChecker): 2012-02-09 Roland Steiner Unreviewed, rolling out r107197. http://trac.webkit.org/changeset/107197 https://bugs.webkit.org/show_bug.cgi?id=77525 broke Chromium Linux * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): (WebCore): (WebCore::SelectorChecker::checkOneSelector): * css/SelectorChecker.h: 2012-02-09 Kentaro Hara Unreviewed, rolling out r107182, r107186, r107189, r107191, and r107199. http://trac.webkit.org/changeset/107182 http://trac.webkit.org/changeset/107186 http://trac.webkit.org/changeset/107189 http://trac.webkit.org/changeset/107191 http://trac.webkit.org/changeset/107199 https://bugs.webkit.org/show_bug.cgi?id=78200 Layout tests of JSC-related port are crashing * Modules/gamepad/GamepadList.idl: * Modules/intents/Intent.idl: * bindings/js/JSDOMBinding.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateParametersCheck): (NativeToJSValue): (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): (GenerateImplementationIndexer): (RequiresCustomSignature): (NativeToJSValue): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSFloat64Array.cpp: (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert3): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionStrictFunction): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestNamedConstructor.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::Float64ArrayInternal::fooCallback): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectInternal::excitingFunctionCallback): (WebCore::TestActiveDOMObjectInternal::postMessageCallback): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::TestCustomNamedGetterInternal::anotherFunctionCallback): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetInternal::itemCallback): (WebCore::TestEventTargetInternal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceInternal::supplementalMethod2Callback): (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::TestMediaQueryListListenerInternal::methodCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::idbKeyCallback): (WebCore::TestObjInternal::optionsObjectCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::TestObjInternal::overloadedMethod6Callback): (WebCore::TestObjInternal::overloadedMethod7Callback): (WebCore::TestObjInternal::classMethodWithOptionalCallback): (WebCore::TestObjInternal::overloadedMethod11Callback): (WebCore::TestObjInternal::overloadedMethod12Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): (WebCore::TestObjInternal::convert1Callback): (WebCore::TestObjInternal::convert2Callback): (WebCore::TestObjInternal::convert3Callback): (WebCore::TestObjInternal::convert4Callback): (WebCore::TestObjInternal::convert5Callback): (WebCore::TestObjInternal::strictFunctionCallback): (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): * bindings/v8/V8Binding.h: * bindings/v8/custom/V8BindingMacros.h: * css/CSSCharsetRule.idl: * css/CSSImportRule.idl: * css/CSSMediaRule.idl: * css/CSSPageRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRule.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSStyleSheet.idl: * css/CSSValue.idl: * css/CSSValueList.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/MediaQueryListListener.idl: * css/StyleMedia.idl: * css/StyleSheet.idl: * css/StyleSheetList.idl: * css/WebKitCSSKeyframesRule.idl: * css/WebKitCSSMatrix.idl: * dom/Attr.idl: * dom/CharacterData.idl: * dom/ClientRectList.idl: * dom/Clipboard.idl: * dom/CompositionEvent.idl: * dom/CustomEvent.idl: * dom/DOMImplementation.idl: * dom/DOMStringList.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/Entity.idl: * dom/Event.idl: * dom/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/MutationRecord.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeList.idl: * dom/Notation.idl: * dom/OverflowEvent.idl: * dom/ProcessingInstruction.idl: * dom/Range.idl: * dom/ShadowRoot.idl: * dom/Text.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * html/DOMFormData.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLAllCollection.idl: * html/HTMLAudioElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/TextTrackCue.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * html/canvas/WebGLDebugShaders.idl: * html/canvas/WebGLRenderingContext.idl: * page/Console.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/IDBDatabase.idl: * storage/IDBObjectStore.idl: * storage/IDBRequest.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * svg/ElementTimeControl.idl: * svg/SVGDocument.idl: * svg/SVGElementInstanceList.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFilterElement.idl: * svg/SVGLocatable.idl: * svg/SVGMarkerElement.idl: * svg/SVGPathElement.idl: * svg/SVGSVGElement.idl: * svg/SVGStylable.idl: * svg/SVGTests.idl: * svg/SVGTextContentElement.idl: * webaudio/AudioNode.idl: * websockets/WebSocket.idl: * workers/SharedWorker.idl: * workers/WorkerContext.idl: * xml/DOMParser.idl: * xml/XMLHttpRequest.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathExpression.idl: * xml/XPathNSResolver.idl: * xml/XPathResult.idl: * xml/XSLTProcessor.idl: 2012-02-09 Shinya Kawanaka Disable adding a shadow root to elements having a dynamic built-in shadow root. https://bugs.webkit.org/show_bug.cgi?id=77935 Reviewed by Hajime Morita. We temporarily disable adding a shadow root in elements having a dynamic user agent shadow root. These shadow roots are currently created using Element::ensureShadowRoot. So we don't check the condition if a shadow root is created eaither using Element::ensureShadowRoot or ShadowRoot::CreatingUserAgentShadowRoot is specified for ShadowRoot::create. Test: fast/dom/shadow/shadow-disable.html * dom/Element.cpp: (WebCore::Element::ensureShadowRoot): * dom/ShadowRoot.cpp: (WebCore::allowsUserShadowRoot): (WebCore): (WebCore::ShadowRoot::create): * dom/ShadowRoot.h: (ShadowRoot): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): ShadowRoot::CreatingUserAgentShadowRoot is specified. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): ditto. * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): ditto. * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): ditto. * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): ditto. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): ditto. 2012-02-08 Alexander Pavlov Web Inspector: hovering over element with :hover style halts inspector https://bugs.webkit.org/show_bug.cgi?id=78086 Reviewed by Pavel Feldman. Test: inspector/styles/updates-throttled.html * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate): (WebInspector.StylesSidebarPane.prototype._innerUpdate.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate): 2012-02-09 Kentaro Hara Unreviewed. Fix build failure caused by r107191. * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): 2012-02-09 Roland Steiner SelectorChecker::checkSelector: move parameters into a struct https://bugs.webkit.org/show_bug.cgi?id=77525 Added 'SelectorCheckingContext' struct to hold parameters for the function. Adapted calling sites. Reviewed by Antti Koivisto. No new tests. (refactoring) * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): (WebCore): (WebCore::SelectorChecker::checkOneSelector): * css/SelectorChecker.h: (SelectorCheckingContext): (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): (SelectorChecker): 2012-02-09 Kent Tamura Do not localize numbers in scientific notation https://bugs.webkit.org/show_bug.cgi?id=78208 Reviewed by Hajime Morita. For a preparation of fixing http://wkb.ug/62939, we stop supporting localized numbers in scientific notation in . We're going to change number localization processing so that it replaces letters one by one. It will be very hard to support scientific notation. * html/NumberInputType.cpp: (WebCore::isE): A helper functio for String::find() to detect scientific notation. (WebCore::NumberInputType::visibleValue): Avoid localization for scientific notation. (WebCore::NumberInputType::convertFromVisibleValue): ditto. (WebCore::NumberInputType::isAcceptableValue): Use convertFromVisibleValue, also stop accepting a standard format as a fallback. 2012-02-09 Leo Yang EntryBase.cpp is missing in CMake build system when turning on ENABLE_FILE_SYSTEM https://bugs.webkit.org/show_bug.cgi?id=78190 Reviewed by Antonio Gomes. EntryBase.cpp is not in the CMake build system, which causes build failure (undefined symbols to EntryBase) when turning on ENABLE_FILE_SYSTEM. Build system fix, no new tests. * CMakeLists.txt: 2012-02-09 Andreas Kling REGRESSION(r53878): Input elements don't share their styles if the document contains no validity style rules. Reviewed by Kent Tamura. Don't reject style sharing candidates prematurely just because the document doesn't have any :valid or :invalid selectors. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): 2012-02-09 Kentaro Hara Unreviewed. Fixed typo in the following files. [TreatUndefinedAs] => [TreatAsUndefined]. * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::methodWithOptionalIsUndefinedString): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_method_with_optional_is_undefined_string): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsUndefinedString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString): (WebCore::jsTestObjPrototypeFunctionConvert5): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj methodWithOptionalIsUndefinedString:]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodWithOptionalIsUndefinedStringCallback): (WebCore): 2012-02-09 Kentaro Hara Unreviewed. Fixed typo in the following files. [TreatReturnedNullStringTo=] => [TreatReturnedNullStringAs=]. * bindings/scripts/test/TestObj.idl: * css/CSSCharsetRule.idl: * css/CSSImportRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSValue.idl: * css/MediaList.idl: * css/StyleSheet.idl: * css/WebKitCSSKeyframesRule.idl: * dom/Attr.idl: * dom/CharacterData.idl: * dom/Clipboard.idl: * dom/DOMStringList.idl: * dom/Document.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/Entity.idl: * dom/MutationRecord.idl: * dom/Node.idl: * dom/Notation.idl: * dom/ProcessingInstruction.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLMediaElement.idl: * html/canvas/WebGLDebugShaders.idl: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * storage/IDBObjectStore.idl: * storage/IDBRequest.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * websockets/WebSocket.idl: * xml/XMLHttpRequest.idl: * xml/XPathNSResolver.idl: * xml/XSLTProcessor.idl: 2012-02-08 Kentaro Hara Rename [ConvertNullStringTo=] to [TreatReturnedNullStringAs=] https://bugs.webkit.org/show_bug.cgi?id=78108 Reviewed by Adam Barth. [ConvertNullStringTo=] is not descriptive. To clarify that it specifies the behavior when the null string is returned by WebCore, this patch renames [ConvertNullStringTo=] to [TreatReturnedNullStringAs=]. This change is also for naming consistency with [TreatNullAs] and [TreatUndefinedAs]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementationIndexer): (NativeToJSValue): * bindings/scripts/test/TestObj.idl: No change in run-bindings-tests results. * css/CSSCharsetRule.idl: * css/CSSImportRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSValue.idl: * css/MediaList.idl: * css/StyleSheet.idl: * css/WebKitCSSKeyframesRule.idl: * dom/Attr.idl: * dom/CharacterData.idl: * dom/Clipboard.idl: * dom/DOMStringList.idl: * dom/Document.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/Entity.idl: * dom/MutationRecord.idl: * dom/Node.idl: * dom/Notation.idl: * dom/ProcessingInstruction.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLMediaElement.idl: * html/canvas/WebGLDebugShaders.idl: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * storage/IDBObjectStore.idl: * storage/IDBRequest.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * websockets/WebSocket.idl: * xml/XMLHttpRequest.idl: * xml/XPathNSResolver.idl: * xml/XSLTProcessor.idl: 2012-02-08 Andreas Kling Simplify ownership of StyledElement::additionalAttributeStyles(). Reviewed by Anders Carlsson. Change additionalAttributeStyle() to return a raw pointer rather than a PassRefPtr. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchAllRules): (WebCore::CSSStyleSelector::canShareStyleWithElement): * dom/StyledElement.h: (WebCore::StyledElement::additionalAttributeStyle): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::additionalAttributeStyle): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::additionalAttributeStyle): * html/HTMLTableColElement.h: (HTMLTableColElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::additionalAttributeStyle): (WebCore::HTMLTableElement::additionalCellStyle): (WebCore::HTMLTableElement::additionalGroupStyle): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::additionalAttributeStyle): * html/HTMLTableSectionElement.h: (HTMLTableSectionElement): 2012-02-08 Kentaro Hara Rename [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] https://bugs.webkit.org/show_bug.cgi?id=78200 Reviewed by Adam Barth. [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] are confusing. - [Optional=CallWithDefalutValue] indicates that a missing value should be treated as if the JavaScript undefined is passed. - [Optional=CallWithNullValue] indicates that a missing value should be treated as the WebKit null value (i.e. JSValue() or v8::Local()). - Actually, the difference between [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] appears only when the type of the missing value is DOMString. In case of [Optional=CallWithDefalutValue], the missing value is converted to the string "undefined". On the other hand, in case of [Optional=CallWithNullValue], the missing value is converted to the WebKit null string. With these observations, this patch renames them as follows: - Rename [Optional=CallWithDefalutValue] to [Optional=TreatAsUndefined]. - Remove [Optional=CallWithNullValue]. Instead, we use [Optional=TreatAsUndefined, TreatUndefinedAs=NullString]. Test: bindings/scripts/test/TestInterface.idl * bindings/js/JSDOMBinding.h: Renamed MissingIsUndefined to MissingIsUndefinedValue, renamed MissingIsEmpty to MissingIsNullValue. * bindings/v8/V8Binding.h: Ditto. * bindings/v8/custom/V8BindingMacros.h: Ditto. * bindings/scripts/CodeGeneratorJS.pm: Modified to support the IDL attribute renaming. (GenerateParametersCheck): (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateParametersCheck): (RequiresCustomSignature): * Modules/gamepad/GamepadList.idl: Renamed IDL attributes as described above. * Modules/intents/Intent.idl: * css/CSSMediaRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSValueList.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/MediaQueryListListener.idl: * css/StyleMedia.idl: * css/StyleSheetList.idl: * css/WebKitCSSKeyframesRule.idl: * css/WebKitCSSMatrix.idl: * dom/CharacterData.idl: * dom/ClientRectList.idl: * dom/CompositionEvent.idl: * dom/CustomEvent.idl: * dom/DOMImplementation.idl: * dom/DOMStringList.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/Element.idl: * dom/Event.idl: * dom/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeList.idl: * dom/OverflowEvent.idl: * dom/Range.idl: * dom/ShadowRoot.idl: * dom/Text.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * html/DOMFormData.idl: * html/HTMLAllCollection.idl: * html/HTMLAudioElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/TextTrackCue.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * page/Console.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/IDBDatabase.idl: * storage/StorageEvent.idl: * svg/ElementTimeControl.idl: * svg/SVGDocument.idl: * svg/SVGElementInstanceList.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFilterElement.idl: * svg/SVGLocatable.idl: * svg/SVGMarkerElement.idl: * svg/SVGPathElement.idl: * svg/SVGSVGElement.idl: * svg/SVGStylable.idl: * svg/SVGTests.idl: * svg/SVGTextContentElement.idl: * webaudio/AudioNode.idl: * workers/SharedWorker.idl: * workers/WorkerContext.idl: * xml/DOMParser.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathExpression.idl: * xml/XPathNSResolver.idl: * xml/XPathResult.idl: * bindings/scripts/test/TestInterface.idl: Added test cases for [Optional], [Optional=TreatAsUndefined] and [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] * bindings/scripts/test/TestNamedConstructor.idl: Renamed IDL attributes as described above. * bindings/scripts/test/TestObj.idl: Ditto. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::methodWithOptionalString): (WebDOMTestObj::methodWithOptionalIsTreatAsUndefinedString): (WebDOMTestObj::methodWithOptionalIsNullStringString): * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto. * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. (webkit_dom_test_obj_method_with_optional_string): (webkit_dom_test_obj_method_with_optional_is_treat_as_undefined_string): (webkit_dom_test_obj_method_with_optional_is_null_string_string): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. * bindings/scripts/test/JS/JSFloat64Array.cpp: Ditto. (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Ditto. (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto. (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto. (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto. (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto. (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto. (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert3): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionStrictFunction): * bindings/scripts/test/JS/JSTestObj.h: Ditto. (WebCore): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto. (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. (-[DOMTestObj methodWithOptionalString:]): (-[DOMTestObj methodWithOptionalIsTreatAsUndefinedString:]): (-[DOMTestObj methodWithOptionalIsNullStringString:]): * bindings/scripts/test/V8/V8Float64Array.cpp: Ditto. (WebCore::Float64ArrayInternal::fooCallback): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Ditto. (WebCore::TestActiveDOMObjectInternal::excitingFunctionCallback): (WebCore::TestActiveDOMObjectInternal::postMessageCallback): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: Ditto. (WebCore::TestCustomNamedGetterInternal::anotherFunctionCallback): * bindings/scripts/test/V8/V8TestEventTarget.cpp: Ditto. (WebCore::TestEventTargetInternal::itemCallback): (WebCore::TestEventTargetInternal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto. (WebCore::TestInterfaceInternal::supplementalMethod2Callback): (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. (WebCore::TestMediaQueryListListenerInternal::methodCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: Ditto. (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::idbKeyCallback): (WebCore::TestObjInternal::optionsObjectCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithOptionalStringCallback): (TestObjInternal): (WebCore::TestObjInternal::methodWithOptionalIsTreatAsUndefinedStringCallback): (WebCore::TestObjInternal::methodWithOptionalIsNullStringStringCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::TestObjInternal::overloadedMethod6Callback): (WebCore::TestObjInternal::overloadedMethod7Callback): (WebCore::TestObjInternal::classMethodWithOptionalCallback): (WebCore::TestObjInternal::overloadedMethod11Callback): (WebCore::TestObjInternal::overloadedMethod12Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): (WebCore::TestObjInternal::convert1Callback): (WebCore::TestObjInternal::convert2Callback): (WebCore::TestObjInternal::convert3Callback): (WebCore::TestObjInternal::convert4Callback): (WebCore::TestObjInternal::convert5Callback): (WebCore::TestObjInternal::strictFunctionCallback): (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: Ditto. (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-02-08 Kentaro Hara Rename [HasNumericIndexGetter] to [NumericIndexedGetter] https://bugs.webkit.org/show_bug.cgi?id=78096 Reviewed by Adam Barth. This patch renames [HasNumericIndexGetter] to [NumericIndexedGetter], for naming consistency with [IndexedGetter] and [CustomIndexedGetter]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateImplementationIndexer): * bindings/scripts/test/TestTypedArray.idl: No change in run-bindings-tests results. * html/canvas/CanvasPixelArray.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: 2012-02-08 Tony Chang refactor RenderFlexibleBox to return preferred sizes of all children https://bugs.webkit.org/show_bug.cgi?id=78169 Reviewed by Ojan Vafai. This is in preparation for multi-line flexbox. We need the preferred size of each child so we can compute where the multi-line breaks happen. No new tests, just refactoring. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Renamed from preferredMainAxisContentExtentForFlexItem because other methods are ForChild rather than ForFlexItem. (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm): * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): 2012-02-08 Shinya Kawanaka Stop calling Element::ensureShadowRoot() if it is used in construction phase. https://bugs.webkit.org/show_bug.cgi?id=77929 Reviewed by Hajime Morita. ShadowRoot's life cycle can be consufing If Element::ensureShadowRoot() is used. So we want to remove Element::ensureShadowRoot(). This patch replaces Element::ensureShadowRoot() if it is used in object construction phase. No new tests, no change in behavior. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::create): Initialize exception code before calling appendChild. * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): 2012-02-08 David Reveman [Chromium] Avoid unnecessary full tile updates without breaking atomicity of commits. https://bugs.webkit.org/show_bug.cgi?id=76740 Reviewed by James Robinson. Allow the final batch of texture uploads to be performed without allocating new textures and re-painting complete tiles. This patch is tested by the following unit test: - CCLayerTreeHostTestAtomicCommitWithPartialUpdate.runMultiThread - TiledLayerChromiumTest.partialUpdates * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::UpdatableTile): (UpdatableTile): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore): (WebCore::TiledLayerChromium::tileOnlyNeedsPartialUpdate): (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate): (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::requestPartialTextureUpdate): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doCommit): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore::CCSingleThreadProxy::maxPartialTextureUpdates): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::append): (WebCore): (WebCore::CCTextureUpdater::appendPartial): (WebCore::CCTextureUpdater::hasMoreUpdates): (WebCore::CCTextureUpdater::update): (WebCore::CCTextureUpdater::clear): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WTF): (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): (WebCore::CCThreadProxy::maxPartialTextureUpdates): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-02-07 MORITA Hajime Replacement text should be available from the marker. https://bugs.webkit.org/show_bug.cgi?id=77934 Reviewed by Kent Tamura. On spellchecking, TextCheckingResult can contain a replacement text which is usable both for an automatic replacement and for showing a suggestion. But when marking a misspelled word ragarding to returned TextCheckingResult, Editor uses only the misspelled range data and discards the replacement value. Then it asks the same value again when showing suggestion/autocorrection. It would be great if the marker holds the replacement text and Editor can use it on suggesting a correction, without any re-request. This is especially true in the case when it needs IPC messaging for spellchecking: We can save one round-trip by this technique. Here is actual change: - Passed the replacement text to addMarker() for for misspelling markers. Note that this is done only for the unified checker path because legacy TextCheckerClient API doesn't provide such a replacement. - Added an Internals API to retrieve a description text on a marker. Test: editing/spelling/spelling-marker-description.html * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): * testing/Internals.cpp: (WebCore::Internals::markerAt): (WebCore): (WebCore::Internals::markerRangeForNode): (WebCore::Internals::markerDescriptionForNode): * testing/Internals.h: (WebCore): (Internals): * testing/Internals.idl: 2012-02-08 Eric Seidel Remove more cruft now that HTMLIsIndexElement is gone https://bugs.webkit.org/show_bug.cgi?id=77887 Reviewed by Darin Adler. Just removing dead code, thus no tests. There is likely more to remove after this. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLInputElement.cpp: * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): * html/InputType.h: (InputTypeNames): * html/IsIndexInputType.cpp: Removed. * html/IsIndexInputType.h: Removed. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::isContentEditable): 2012-02-08 Andreas Kling Increased style sharing for elements with presentation attributes. Reviewed by Antti Koivisto. When determining whether two elements can share style, we can do a lot better. Instead of comparing the attribute maps for exact equality, do a property-by-property comparison of the attributeStyle() and the additionalAttributeStyle() (if any.) This increases our style sharing hit rate and shaves 100ms off of each cycle on Chromium's "Moz" page cycler test on my machine. The function that compares attribute styles has O(n^2) runtime in the worst case, where n is the number of properties in the styles. However, given the low number of properties found in attribute styles, this should be fine, and it doesn't seem to heat up in profiles. * css/CSSStyleSelector.cpp: (WebCore::attributeStylesEqual): (WebCore::CSSStyleSelector::canShareStyleWithElement): 2012-02-08 Raymond Liu Fix the caculation of preDelayFrames in DynamicsCompressorKernel https://bugs.webkit.org/show_bug.cgi?id=78057 Reviewed by Chris Rogers. No new tests required. * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::DynamicsCompressorKernel::setPreDelayTime): 2012-02-08 Adam Klein DOM mutations should not be delivered on worker threads https://bugs.webkit.org/show_bug.cgi?id=77898 Reviewed by Dmitry Titov. In V8RecursionScope, only call WebKitMutationObserver::deliverAllMutations if in a Document context. This is accomplished through a change to V8Proxy::instrumentedCallFunction (which now takes a Frame* instead of a Page*), requiring an update to all callers of that function (accounting for the majority of files changed in this patch). Added ASSERT(isMainThread()) in a deliverAllMutations to confirm that it's no longer called on worker threads, and in enqueueMutationRecord, where the same global store of active observers is accessed. See also http://crbug.com/112586, where the problem was initially reported. * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptCallback::call): * bindings/v8/V8NodeFilterCondition.cpp: (WebCore::V8NodeFilterCondition::acceptNode): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::runScript): (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::instrumentedCallFunction): * bindings/v8/V8Proxy.h: (WebCore): (V8Proxy): * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): * bindings/v8/V8RecursionScope.h: (WebCore): (WebCore::V8RecursionScope::V8RecursionScope): (V8RecursionScope): (WebCore::V8RecursionScope::~V8RecursionScope): * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::enqueueMutationRecord): (WebCore::WebKitMutationObserver::deliverAllMutations): 2012-02-08 Anders Carlsson Don't use the wheel event handler count to track if a page has horizontal scrollbars https://bugs.webkit.org/show_bug.cgi?id=78192 Reviewed by Andreas Kling. Stop calling Document::didAddWheelEventHandler and Document::didRemoveWheelEventHandler when adding and removing scrollbars. * page/FrameView.cpp: * page/FrameView.h: (FrameView): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: 2012-02-08 Igor Oliveira Implement reverse animation direction Implement reverse animation direction https://bugs.webkit.org/show_bug.cgi?id=60525 Implement reverse and alternate-reverse direction. Reviewed by Dean Jackson. Tests: animations/animation-direction-alternate-reverse.html animations/animation-direction-reverse.html animations/fill-mode-reverse.html * css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationDirection): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapAnimationDirection): * css/CSSValueKeywords.in: * page/WebKitAnimation.cpp: (WebCore::WebKitAnimation::direction): * page/WebKitAnimation.h: * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::fractionalTime): * platform/animation/Animation.h: (Animation): * platform/graphics/texmap/TextureMapperAnimation.cpp: (WebCore): (WebCore::shouldReverseAnimationValue): (WebCore::normalizedAnimationValue): 2012-02-08 James Robinson [chromium] Avoid creating a temporary GraphicsContext3D if someone requests the WebView's GraphicsContext3D before initialization is complete https://bugs.webkit.org/show_bug.cgi?id=78154 Reviewed by Kenneth Russell. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::context): 2012-02-08 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=78157 Make multi-column layout work with line grids that are outside of the multi-column block. Reviewed by Dan Bernstein. Added new tests in fast/line-grid. * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): (WebCore::LayoutState::propagateLineGridInfo): (WebCore::LayoutState::establishLineGrid): (WebCore): (WebCore::LayoutState::computeLineGridPaginationOrigin): * rendering/LayoutState.h: (WebCore::LayoutState::LayoutState): (WebCore::LayoutState::lineGrid): (WebCore::LayoutState::lineGridOffset): (WebCore::LayoutState::lineGridPaginationOrigin): (WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout): (LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderView.h: (WebCore::RenderView::pushLayoutState): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::lineGridSnapAdjustment): 2012-02-08 Matthew Delaney GeneratorGeneratedImage::drawPattern does not factor in its destination context's scale when generating its image tiles https://bugs.webkit.org/show_bug.cgi?id=67729 Reviewed by Beth Dakin. No new tests, current pixel tests will cover this. Though some pixel results might improve to become less pixel-y. * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::draw): Updated context to destContext for consistency. (WebCore::GeneratorGeneratedImage::drawPattern): Taught drawPattern about the destination scale factor to avoid having low-res generated images such as gradients in certain cases. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::createCompatibleBuffer): Have the image buffer match the context acceleration setting as well. 2012-02-08 Adam Klein Simplify and correct mutation delivery timing for JSC https://bugs.webkit.org/show_bug.cgi?id=78172 Reviewed by Adam Barth. Instead of keeping a static recursion counter in JSMainThreadExecState, simply wait for a state change from non-null ExecState to null ExecState. Because s_mainThreadState is initially null, this equivalent to waiting for s_recursionLevel to rewind to zero. This also properly handles the usage of JSMainThreadNullState (and does not do mutation delivery), since that class is only used by non-JS bindings. Now fast/mutation/end-of-task-delivery.html properly fails, whereas it was passing before due to usage of the ObjC DOM API from DumpRenderTree. * bindings/js/JSMainThreadExecState.cpp: (WebCore): * bindings/js/JSMainThreadExecState.h: Added a comment explaining the purpose of JSMainThreadNullState. (WebCore::JSMainThreadExecState::JSMainThreadExecState): (WebCore::JSMainThreadExecState::~JSMainThreadExecState): (JSMainThreadExecState): (WebCore): 2012-02-08 Kentaro Hara Remove [ConvertToString] from CodeGeneratorCPP.pm and rename it to [ObjCImplementedAsUnsignedLong] https://bugs.webkit.org/show_bug.cgi?id=78100 Reviewed by Eric Seidel. Now [ConvertToString] is used by ObjC's HTMLElement.size only. This patch removes [ConvertToString] code from CodeGeneratorCPP.pm, and renames [ConvertToString] to [ObjCImplementedAsUnsignedLong]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * html/HTMLInputElement.idl: Removed FIXME comment, because the latest spec says HTMLInputElement.size should be unsigned long. (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element) 2012-02-08 Leo Yang REGRESSION(r84194): Build fails when turning on ENABLE_FILE_SYSTEM https://bugs.webkit.org/show_bug.cgi?id=78088 Reviewed by Antonio Gomes. WebCore::getDOMObjectWrapper was changed to WebCore::wrap in r84194. Adapt to this change in JSEntryCustom.cpp and JSEntrySyncCustom.cpp. Build fix, no new tests. * bindings/js/JSEntryCustom.cpp: (WebCore::toJS): * bindings/js/JSEntrySyncCustom.cpp: (WebCore::toJS): 2012-02-08 Dana Jansens [Chromium] Fix opaque tracking for box shadows and non-composited child elements https://bugs.webkit.org/show_bug.cgi?id=78073 Reviewed by Stephen White. Tests: compositing/culling/scrolled-within-boxshadow.html compositing/culling/translated-boxshadow.html Unit tests: PlatformContextSkiaTest.cpp When painting a box shadow, a filter is applied to the skia canvas, that can make pixels painted with an opaque color end up non-opaque. So consider image/mask/color filters when deciding if a paint is opaque. Also when painting the background of an element with a box shadow, the background is painted with a transform on the skia canvas based on the size of the box shadow. This transform needs to be considered when tracking an opaque paint. However, when a layer's contentRect position is non-zero, we translate the GraphicsContext to put the contentRect at 0,0 in the skia canvas. For tracking opaque regions in the resulting layer, we need to unto this translation. Scaling can also occur which we must undo. So we pass the transform in to PlatformContextSkia to go from the SkCanvas back to the layer's content coordinate space. Opaque paints can then be tracked in the layer's content space rather than in the skia canvas space. * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/CanvasLayerTextureUpdater.h: (WebCore): (CanvasLayerTextureUpdater): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::paintIsOpaque): (WebCore::OpaqueRegionSkia::didDrawRect): (WebCore::OpaqueRegionSkia::didDrawPath): (WebCore::OpaqueRegionSkia::didDrawPoints): (WebCore::OpaqueRegionSkia::didDrawBounded): (WebCore::OpaqueRegionSkia::didDraw): (WebCore::OpaqueRegionSkia::markRectAsOpaque): (WebCore::OpaqueRegionSkia::markRectAsNonOpaque): * platform/graphics/skia/OpaqueRegionSkia.h: (WebCore): (OpaqueRegionSkia): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::didDrawRect): (WebCore::PlatformContextSkia::didDrawPath): (WebCore::PlatformContextSkia::didDrawPoints): (WebCore::PlatformContextSkia::didDrawBounded): * platform/graphics/skia/PlatformContextSkia.h: (PlatformContextSkia): (WebCore::PlatformContextSkia::setOpaqueRegionTransform): 2012-02-08 Kentaro Hara Remove [CustomHeader] from CanvasPixelArray and rename [CustomHeader] to [JSCustomHeader] https://bugs.webkit.org/show_bug.cgi?id=78089 Reviewed by Adam Barth. This patch removes [CustomHeader] from CanvasPixelArray.idl, since CanvasPixelArrayCustom.h does not exist. (The reason why missing CanvasPixelArrayCustom.h has not caused build failure is that [CustomHeader] has been JSC-specific and JSC has not enabled CanvasPixelArray.) Also, this patch renames [CustomHeader] to [JSCustomHeader], since whether a given class should have custom header or not will depend on JavaScript bindings. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * dom/Node.idl: * html/canvas/CanvasPixelArray.idl: 2012-02-08 Zalan Bujtas Dispatch updateViewportArguments(), when Document is finished restoring from page cache. https://bugs.webkit.org/show_bug.cgi?id=77943 Reviewed by Kenneth Rohde Christiansen. Move updateViewportArguments() call from setPageInCache() to documentDidResumeFromPageCache() to ensure, that the Document is fully resumed from the page cache and attached to the mainframe, when the viewport arguments are updated. No tests. No change in behaviour. * dom/Document.cpp: (WebCore::Document::setInPageCache): (WebCore::Document::documentDidResumeFromPageCache): 2012-02-08 Shawn Singh [chromium] Remove incorrect early exit in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=76924 Reviewed by James Robinson. New unit test added to CCDamageTrackerTest.cpp This patch does three things: (1) adds unit test that demonstrates that early exiting in CCDamageTracker is wrong, (2) removes the early exit and cleans up the surrounding code, and (3) re-names several functions in CCDamageTracker so that state updating is implied by the name, and not just a bad side-effect of the functions. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::updateDamageTrackingState): (WebCore::CCDamageTracker::trackDamageFromActiveLayers): (WebCore::CCDamageTracker::trackDamageFromSurfaceMask): (WebCore::CCDamageTracker::trackDamageFromLeftoverRects): * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): 2012-02-08 James Robinson [chromium] Check that we can make the SharedGraphicsContext3D current before returning https://bugs.webkit.org/show_bug.cgi?id=78142 Reviewed by Stephen White. If we can't make the context current, we can't use it. * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::get): 2012-02-08 Abhishek Arya Crash in Node::normalize. https://bugs.webkit.org/show_bug.cgi?id=78135 Reviewed by Ryosuke Niwa. No new tests. Original testcase does not reduce to manageable extent. * dom/Node.cpp: (WebCore::Node::normalize): 2012-02-08 Antoine Labour Make WebGL context current early to check validity https://bugs.webkit.org/show_bug.cgi?id=78141 Reviewed by James Robinson. Covered by existing tests * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::create): 2012-02-08 Jonathan Backer [chromium] Disable root layer clears on release builds. https://bugs.webkit.org/show_bug.cgi?id=77478 Reviewed by James Robinson. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearRenderSurface): (WebCore::LayerRendererChromium::drawRenderPass): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): 2012-02-08 Anders Carlsson Add a content shadow layer to the render layer compositor https://bugs.webkit.org/show_bug.cgi?id=78133 Reviewed by Beth Dakin. Have the render layer compositor optionally create a content shadow layer, and add a ScrollbarTheme::setUpContentShadowLayer member function that subclasses can use to set content shadow properties. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::setUpContentShadowLayer): Set the layer properties once, and set the shadow path on every call, since we know that this function will be called every time the size of the content shadow layer changes. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateRootLayerPosition): Reposition the content shadow layer, and call ScrollbarTheme::setUpContentShadowLayer if the size changes. (WebCore::RenderLayerCompositor::requiresContentShadowLayer): Add new helper function. (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Create a content shadow layer if needed. 2012-02-07 Andy Estes REGRESSION (r102983): ClicktoFlash drawing of old style youtube embeds missing until resize https://bugs.webkit.org/show_bug.cgi?id=77167 Reviewed by Eric Seidel. Test: plugins/layout-in-beforeload-listener-affects-plugin-loading.html r102983 made FrameView::updateWidgets() check if the DOM node actually needs a widget update before calling updateWidget(). Due to historical reasons, however, updateWidget() can be legitimately called twice: once at attach time for non-Netscape plug-ins and once at layout time for Netscape plug-ins. If the widget represents a Netscape plug-in, but updateWidget() is called for the CreateOnlyNonNetscapePlugins case after the DOM node was marked as needing an update, updateWidget() will clear the update flag and prevent a second call to updateWidget() at layout time for the CreateAnyWidgetType case. As much as I loathe adding to the code duplication between HTMLEmbedElement::updateWidget() and HTMLObjectElement::updateWidget(), the simplest solution seems to be marking the DOM node as needing update in the case where we are calling updateWidget() for the CreateOnlyNonNetscapePlugins case and we know we will be loading a Netscape plug-in. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): Call setNeedsWidgetUpdate(true) if pluginCreationOption is CreateOnlyNonNetscapePlugins but we will load a Netscape plug-in. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): Ditto. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::guardedDispatchBeforeLoadEvent): Remove an invalid assertion that prevents the layout test from running in a Debug configuration. 2012-02-07 Ojan Vafai Floated flexboxes render as regular RenderBlocks https://bugs.webkit.org/show_bug.cgi?id=77909 Reviewed by Eric Seidel. Add grid/flexbox cases to adjusting the display of floated/positioned elements. Also, move this logic into a switch statement. This makes the code more readable and gives compile warnings when new display types are added that aren't handled here. Test: css3/flexbox/floated-flexbox.html * css/CSSStyleSelector.cpp: (WebCore::adjustDisplay): (WebCore): (WebCore::CSSStyleSelector::adjustRenderStyle): 2012-02-08 Dirk Schulze viewBox on nested SVG causes wrong content size for relative values https://bugs.webkit.org/show_bug.cgi?id=69459 Reviewed by Nikolas. In the past we just checked the change of the viewport size of the root SVG element. If the size changed, all childs with relative length values needed a relayout. We did not consider that we might have other viewports in the document. Childs with relative lengths had a strange zooming, if just the viewport size of an inner SVG element changed. With this patch we check if the size of the nearest viewport changes. Is this the case, childs with relative lengths need a relayout. Test: inner-svg-change-viewBox.svg * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/svg/RenderSVGContainer.h: (RenderSVGContainer): (WebCore::RenderSVGContainer::determineIfLayoutSizeChanged): Check if we need layout and have relative length values. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): Remove resetting 'viewport size changed' flag for code operability. No influence on the layout. * rendering/svg/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer): Add a flag that indicates that the viewport size changes. (WebCore::RenderSVGViewportContainer::determineIfLayoutSizeChanged): The flag gets set during the layout phase of the SVG element if the size changes. (WebCore): * rendering/svg/RenderSVGViewportContainer.h: (WebCore::RenderSVGViewportContainer::isLayoutSizeChanged): Added getter to get flag status. (RenderSVGViewportContainer): (WebCore::toRenderSVGViewportContainer): Added casting function for constant RenderObjects. (WebCore): * rendering/svg/SVGRenderSupport.cpp: (WebCore::layoutSizeOfNearestViewportChanged): Search the nearest viewport and check if the size changed. (WebCore): (WebCore::SVGRenderSupport::layoutChildren): Don't check the roots viewport for size changes, but the nearest viewport. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::svgAttributeChanged): Added viewBoxAttr to the list of attributes that cause relayout. 2012-02-08 Gregg Tavares Implement new WEBGL compressed texture extensions https://bugs.webkit.org/show_bug.cgi?id=77066 This removes the old experimental compressed texture extension and implements the first new one. A test is in the WebGL conformance tests in extensions/webgl-compressed-texture-s3tc.html and will be copied here in a future patch. Reviewed by Kenneth Russell. No new tests. Test coming in future patch. * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLCompressedTextureS3TC.cpp: Added. (WebCore): (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC): (WebCore::WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC): (WebCore::WebGLCompressedTextureS3TC::getName): (WebCore::WebGLCompressedTextureS3TC::create): (WebCore::WebGLCompressedTextureS3TC::supported): * html/canvas/WebGLCompressedTextureS3TC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h. (WebCore): (WebGLCompressedTextureS3TC): * html/canvas/WebGLCompressedTextureS3TC.idl: Renamed from Source/WebCore/html/canvas/WebGLCompressedTextures.idl. * html/canvas/WebGLCompressedTextures.cpp: Removed. * html/canvas/WebGLCompressedTextures.h: Removed. * html/canvas/WebGLExtension.h: * html/canvas/WebGLGetInfo.cpp: (WebCore::WebGLGetInfo::WebGLGetInfo): (WebCore): (WebCore::WebGLGetInfo::getWebGLUnsignedIntArray): * html/canvas/WebGLGetInfo.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::addCompressedTextureFormat): (WebCore::WebGLRenderingContext::compressedTexImage2D): (WebCore::WebGLRenderingContext::compressedTexSubImage2D): (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getParameter): (WebCore::WebGLRenderingContext::getSupportedExtensions): (WebCore::WebGLRenderingContext::validateCompressedTexFormat): (WebCore::WebGLRenderingContext::validateCompressedTexFuncData): (WebCore::WebGLRenderingContext::validateCompressedTexDimensions): (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions): * html/canvas/WebGLRenderingContext.h: (WebCore): (WebGLRenderingContext): * html/canvas/WebGLRenderingContext.idl: 2012-02-08 Ilya Tikhonovsky Web Inspector: heap snapshot: implement Distance column in Object's retaining tree. https://bugs.webkit.org/show_bug.cgi?id=78113 Retaining path list was replaced with Retaining tree some time ago. But it was not so useful when we want to track the retaining path from an object to a DOM Window node. Drive by fix: sort doesn't work in retaining tree panel. Drive by fix: save/load child nodes doesn't work for the retaining tree panel. Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype._childHashForEntity): save/load children fix (WebInspector.HeapSnapshotObjectNode.prototype._childHashForNode): save/load children fix (WebInspector.HeapSnapshotObjectNode.prototype.comparator): (WebInspector.HeapSnapshotObjectNode.prototype._enhanceData): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotContainmentDataGrid): (WebInspector.HeapSnapshotRetainmentDataGrid): (WebInspector.HeapSnapshotRetainmentDataGrid.prototype._sortFields): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotRetainerEdge.prototype.set retainerIndex): (WebInspector.HeapSnapshotRetainerEdge.prototype.set edgeIndex): (WebInspector.HeapSnapshotRetainerEdge.prototype.get _node): (WebInspector.HeapSnapshotRetainerEdge.prototype.get _edge): (WebInspector.HeapSnapshotNode.prototype.get distanceToWindow): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance): (WebInspector.HeapSnapshot.prototype._bfs): (WebInspector.HeapSnapshotEdgesProvider.prototype._serialize): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareEdgeFieldName): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareEdgeAndNode): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeAndEdge): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeAndNode): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort): (WebInspector.HeapSnapshotNodesProvider.prototype._serialize): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view .data-grid td.distanceToWindow-column): 2012-02-08 Anders Carlsson Fix assertion in svg/dom/SVGStyledElement-pendingResource-crash.html https://bugs.webkit.org/show_bug.cgi?id=78126 Reviewed by Dan Bernstein. This broke in r106977 when I tried to change an early return into an ASSERT, so let's bring back the early return. * page/FrameView.cpp: (WebCore::FrameView::notifyPageThatContentAreaWillPaint): 2012-02-08 Sheriff Bot Unreviewed, rolling out r106920, r106924, r106933, r106939, and r107090. http://trac.webkit.org/changeset/106920 http://trac.webkit.org/changeset/106924 http://trac.webkit.org/changeset/106933 http://trac.webkit.org/changeset/106939 http://trac.webkit.org/changeset/107090 https://bugs.webkit.org/show_bug.cgi?id=78124 Something is completely wrong this change (Requested by Ossy_gardener on #webkit). * platform/FileSystem.h: (WebCore): * platform/qt/FileSystemQt.cpp: 2012-02-08 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=78122 Add support for the "contains" value for line-grid-snap. This value centers the line box in between the text-top and text-bottom of the minimum number of grid lines that enclose the line box. This is useful for centering headers in a line grid. Reviewed by Adam Roben. Added a new test in fast/line-grid. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::lineGridSnapAdjustment): 2012-02-08 Cary Clark [Skia Mac] Make misspelling underline dots unclipped https://bugs.webkit.org/show_bug.cgi?id=78117 http://code.google.com/p/chromium/issues/detail?id=113154 Reviewed by Stephen White. No new tests. Existing layout tests cover this. As is done on the CoreGraphics Mac platform, adjust the underline width to remove partial dots, not including the trailing transparent pixel column. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawLineForTextChecking): 2012-02-08 Pavel Feldman Web Inspector: bind entire subtree upon childNodeInserted so that text node were accounted. https://bugs.webkit.org/show_bug.cgi?id=78116 Reviewed by Yury Semikhatsky. * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): (WebInspector.DOMDocument): (WebInspector.DOMAgent.prototype._setDocument): (WebInspector.DOMAgent.prototype._setDetachedRoot): (WebInspector.DOMAgent.prototype._setChildNodes): (WebInspector.DOMAgent.prototype._childNodeRemoved): (WebInspector.DOMAgent.prototype._unbind): 2012-02-08 Peter Rybin Web Inspector: Optional out arguments are not supported in the Web Inspector protocol, which breaks the implementation https://bugs.webkit.org/show_bug.cgi?id=77967 Reviewed by Yury Semikhatsky. Condition for RefPtr-based types added. This is more-or-less a hack and it's should be redone together with the switch to type-safe API. * inspector/CodeGeneratorInspector.py: (Generator.process_command): 2012-02-07 Yury Semikhatsky Web Inspector: inspected object wrapper should be released by InjectedScript when popover closes https://bugs.webkit.org/show_bug.cgi?id=77972 When object popover is shown the object under cursor is resolved and its wrapper is put into 'popover' object wrapper group. The group is discarded when the popover closes. Reviewed by Pavel Feldman. * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): * bindings/js/ScriptProfiler.h: (WebCore): (ScriptProfiler): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): (WebCore): * bindings/v8/ScriptProfiler.h: (WebCore): (ScriptProfiler): * inspector/Inspector.json: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: (InspectorProfilerAgent): * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._resolveObjectForPopover): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover): * inspector/front-end/ObjectPopoverHelper.js: (WebInspector.ObjectPopoverHelper): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover): (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover): 2012-02-08 Mario Sanchez Prada [Gtk] atk_text_get_text_at_offset() fails to provide the correct line for list items whose text wraps https://bugs.webkit.org/show_bug.cgi?id=73431 Reviewed by Chris Fleizach. Don't replace item's markers with the objectReplacementCharacter character, as they will be treated in an special way later on. * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: (textForRenderer): Don't append the objectReplacementCharacter character for list item's markers. 2012-02-08 Pavel Feldman Web Inspector: do not clear entire tree map upon last element deletion. https://bugs.webkit.org/show_bug.cgi?id=78112 Reviewed by Yury Semikhatsky. * inspector/front-end/treeoutline.js: (TreeOutline.prototype._forgetChildrenRecursive): 2012-02-08 Kaustubh Atrawalkar Migrate createObjectURL & revokeObjectURL to static (Class) methods. https://bugs.webkit.org/show_bug.cgi?id=74386 Reviewed by Kentaro Hara. Move createObjectURL & revokeObjectURL from DOMURL implementation to static methods as per specs - http://www.w3.org/TR/FileAPI/#creating-revoking Test: fast/dom/DOMURL/check-instanceof-domurl-functions.html Already Existing: fast/files/revoke-blob-url.html fast/dom/window-domurl-crash.html fast/files/apply-blob-url-to-img.html fast/files/create-blob-url-crash.html fast/files/workers/inline-worker-via-blob-url.html * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::fileThread): (WebCore): (WebCore::ScriptExecutionContext::publicURLManager): * dom/ScriptExecutionContext.h: (WebCore): (ScriptExecutionContext): * html/DOMURL.cpp: (WebCore): (WebCore::DOMURL::createObjectURL): Changed to static. (WebCore::DOMURL::revokeObjectURL): ditto. * html/DOMURL.h: (DOMURL): (WebCore::DOMURL::create): * html/DOMURL.idl: * html/PublicURLManager.h: Added. (WebCore): (PublicURLManager): (WebCore::PublicURLManager::create): (WebCore::PublicURLManager::contextDestroyed): (WebCore::PublicURLManager::blobURLs): (WebCore::PublicURLManager::streamURLs): * page/DOMWindow.cpp: Removed object initialization for DOMURL. (WebCore): * page/DOMWindow.h: ditto. (DOMWindow): * page/DOMWindow.idl: * workers/WorkerContext.cpp: (WebCore): * workers/WorkerContext.h: (WorkerContext): * workers/WorkerContext.idl: 2012-02-01 Brian Grinstead Web Inspector: Add changes for Spectrum colorpicker https://bugs.webkit.org/show_bug.cgi?id=75454 Reviewed by Pavel Feldman. * inspector/front-end/Color.js: (WebInspector.Color.fromRGB): * inspector/front-end/utilities.js: (Element.prototype.totalOffsetLeft): (Element.prototype.totalOffsetTop): (Element.prototype.totalOffset): (Element.prototype.scrollOffset): (): 2012-02-08 Alexander Pavlov Web Inspector: Avoid an avalanche of "class" attribute modifications in WatchExpressionsSidebarPane https://bugs.webkit.org/show_bug.cgi?id=78102 Reviewed by Vsevolod Vlasov. * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype._updateHoveredElement): 2012-02-08 Antaryami Pandia CSS2 overflow: scrollbar not visible on SELECT elements when overflow: scroll is set. https://bugs.webkit.org/show_bug.cgi?id=69993 Reviewed by Simon Fraser. The issue was that for overflow:scroll, currently webkit always places the horizontal and vertical scrollbar. But Since the listbox renderer handles its scrolling, we should not set scrollbar for list-box. Tests: fast/css/getComputedStyle/computed-style-select-overflow.html fast/forms/select-overflow-scroll-inherited.html fast/forms/select-overflow-scroll.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollInfoAfterLayout): 2012-02-08 Nikolas Zimmermann feImage doesn't invalidate when its target SVG element is animated https://bugs.webkit.org/show_bug.cgi?id=73860 Reviewed by Dirk Schulze. Consider following testcase: If the gets changed dynamically (attribute/property/style change) the doesn't notice this, as there's no link between the and the , as the is not a child of the . To get invalidations working for these situations, we have to track the referencingElement & referencedElement in SVGDocumentExtensions. Fixes parts the SVG-Wow twirl testcase and David Daileys SVG waves example. Tests: svg/filters/feImage-animated-transform-on-target-rect.svg svg/filters/feImage-late-indirect-update.svg svg/filters/feImage-mutliple-targets-id-change.svg svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg svg/filters/feImage-target-attribute-change-with-use-indirection.svg svg/filters/feImage-target-attribute-change.svg svg/filters/feImage-target-inline-style-change.svg svg/filters/feImage-target-property-change.svg svg/filters/feImage-target-style-change.svg * rendering/svg/RenderSVGResource.cpp: (WebCore::removeFromFilterCacheAndInvalidateDependencies): Renamed from removeFromFilterCache, as it has another purpose now. (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): s/removeFromFilterCache/removeFromFilterCacheAndInvalidateDependencies/. * rendering/svg/RenderSVGResource.h: Removed removeFromFilterCache, it got inlined. * svg/SVGDocumentExtensions.cpp: Add a new HashMap > > used for dependency tracking. (WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget): Returns all elements the passed in element depends on. (WebCore::SVGDocumentExtensions::addElementReferencingTarget): Register element 'a' referencing target 'b'. (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Called by element 'a' on destruction or any target change. (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Called by element 'b' on destruction. * svg/SVGDocumentExtensions.h: Expose new methods. * svg/SVGElement.cpp: (WebCore::SVGElement::~SVGElement): Call remove removeAllElementReferencesForTarget on destruction. * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::clearResourceReferences): (WebCore::SVGFEImageElement::buildPendingResource): 2012-02-08 Kihong Kwon [EFL] Using string method instead of char* operation in the platformLanguage(). https://bugs.webkit.org/show_bug.cgi?id=78077 Reviewed by Andreas Kling. No new tests. Just fix a bug of platformLanguage function. * platform/efl/LanguageEfl.cpp: (WebCore::platformLanguage): Change char* operation to string operation. 2012-02-08 Alexander Pavlov Web Inspector: Touch event emulation fails for iframes https://bugs.webkit.org/show_bug.cgi?id=77987 Reviewed by Pavel Feldman. Test: fast/events/touch/emulated-touch-iframe.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): 2012-02-08 Andreas Kling StyledElement: Manully setNeedsStyleRecalc() after adding CSSProperties directly. Rubber-stamped by Ryosuke Niwa. Turns out that setProperty() with a CSSProperty has quite different behavior from the other setProperty() methods. We should probably clean that up (separately.) For now, simply call setNeedsStyleRecalc() manually in the addCSS* functions that use setProperty(CSSProperty). * dom/StyledElement.cpp: (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): 2012-02-08 Sheriff Bot Unreviewed, rolling out r107050. http://trac.webkit.org/changeset/107050 https://bugs.webkit.org/show_bug.cgi?id=78094 May crash editing tests (Requested by morrita on #webkit). * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): 2012-02-08 Nikolas Zimmermann [Qt] REGRESSION(r106918): It made svg/zoom/page/zoom-foreignObject.svg crash with Qt5-WK1 https://bugs.webkit.org/show_bug.cgi?id=77995 Reviewed by Csaba Osztrogonác. From the stack traces it's obvious that SVGImageChromeClient tried to invalidate the root view, while its SVGImage was being destructed, due to an updateStyleIfNeeded() call, coming from frameDetached(). There's no point in redrawing there, so we should just stop it. Covered by existing tests on the Qt but, unfortunately I couldn't reproduce it on Mac. * svg/graphics/SVGImage.cpp: (WebCore::SVGImageChromeClient::invalidateContentsAndRootView): Stop invalidating if m_page is 0. (WebCore::SVGImage::~SVGImage): Clear m_page, so that SVGImageChromeClient knows we're destructing. * svg/graphics/SVGImage.h: 2012-02-08 Pablo Flouret Add state attribute to history's dom interface. https://bugs.webkit.org/show_bug.cgi?id=76035 Reviewed by Kentaro Hara. Tests: fast/loader/stateobjects/state-attribute-object-types.html fast/loader/stateobjects/state-attribute-only-one-deserialization.html * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::state): (WebCore): (WebCore::JSHistory::pushState): (WebCore::JSHistory::replaceState): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): (WebCore): (WebCore::V8History::pushStateCallback): (WebCore::V8History::replaceStateCallback): * page/History.cpp: (WebCore::History::History): (WebCore::History::state): (WebCore): (WebCore::History::stateInternal): (WebCore::History::stateChanged): * page/History.h: (History): * page/History.idl: 2012-02-08 Nikolas Zimmermann SVGLoad event fires too early https://bugs.webkit.org/show_bug.cgi?id=78084 Reviewed by Hajime Morita. SVGLoad event fires too early, making it impossible to use the vanilla repaint.js harness (runRepaintTest). We're using a hack called runSVGRepaintTest() at the moment in trunk, which runs runRepaintTest() from a 0ms timer, which is not reliable. The main difference between HTML onload and SVG onload is that HTMLs event is a "window event", thus dispatched through DOMWindow (eg. will say SVGSVGElement). Consider: As soon as the finishes parsing (SVGElement::finishedParsingChildren), it's SVGLoad event is fired. So first you'll see '3', then '2', then '1'. Using: will yield the same SVGLoad order. When using is seen, if no externalResourceRequired="true" attributes are set anywhere. This is not wrong, but not correct for WebKit, as we're not yet "ready to render". HTML fires its window onload event from Document::implicitClose(), where it calls Document::dispatchWindowLoadEvent. At this point we're ready to render. So I'm now aligning the timing of the outermost elements SVGLoad event, to be equal to HTML. This lets use use the repaint.js harness w/o any special SVG tricks. Covered by existing tests. * dom/Document.cpp: (WebCore::Document::implicitClose): Dispatch SVGLoad event for outermost elements from here, as HTML does for its window onload event. * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements): Sends a SVGLoad event to all outermost elements in a document, if possible. There can be multiple ones, if using ... - the in the also acts as outermost element. * svg/SVGDocumentExtensions.h: Add new dispatchSVGLoadEventToOutermostSVGElements() helper. * svg/SVGElement.cpp: (WebCore::SVGElement::isOutermostSVGSVGElement): Moved from SVGSVGElement into SVGElement, and renamed from isOutermostSVG(). (WebCore::SVGElement::sendSVGLoadEventIfPossible): Don't dispatch load events to outermost elements, if Document::implicitClose() wasn't called yet. (WebCore::SVGElement::finishParsingChildren): Stop using the default SVGLoad dispatching logic for outermost elements. * svg/SVGElement.h: Add isOutermostSVGSVGElement(). * svg/SVGSVGElement.cpp: Rename isOutermostSVG to isOutermostSVGSVGElement. (WebCore::SVGSVGElement::currentScale): (WebCore::SVGSVGElement::setCurrentScale): (WebCore::SVGSVGElement::localCoordinateSpaceTransform): (WebCore::SVGSVGElement::createRenderer): * svg/SVGSVGElement.h: Move isOutermostSVG() to SVGElement. * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::title): Rename isOutermostSVG to isOutermostSVGSVGElement. 2012-02-08 Alexander Pavlov Web Inspector: [CRASH] InspectorDOMAgent::updateTouchEventEmulationInPage() https://bugs.webkit.org/show_bug.cgi?id=78090 Reviewed by Vsevolod Vlasov. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::updateTouchEventEmulationInPage): 2012-02-07 Alexander Pavlov Web Inspector: Closed computed style sidebar pane rebuilds, resulting in slowness https://bugs.webkit.org/show_bug.cgi?id=77865 Reviewed by Pavel Feldman. Test: inspector/styles/lazy-computed-style.html * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate): (WebInspector.StylesSidebarPane.prototype._refreshComputedStyleSection): (WebInspector.ComputedStyleSidebarPane.prototype.expand): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): 2012-02-08 Tommy Widenflycht MediaStream API: Adding the onstatechange callback to PeerConnection https://bugs.webkit.org/show_bug.cgi?id=77954 When readyState changes a callback should be triggered. Reviewed by Adam Barth. Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code. * dom/EventNames.h: (WebCore): * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::changeReadyState): * mediastream/PeerConnection.h: (PeerConnection): (WebCore::PeerConnection::didChangeState): * mediastream/PeerConnection.idl: * platform/mediastream/PeerConnectionHandlerClient.h: (PeerConnectionHandlerClient): 2012-02-08 Kentaro Hara Rename [DelegatingPutFunction] IDL to [CustomNamedSetter] IDL https://bugs.webkit.org/show_bug.cgi?id=77963 Reviewed by Adam Barth. This patch renames [DelegatingPutFunction] IDL to [CustomNamedSetter] IDL, for clarification and for naming consistency with [NamedGetter] and [CustomIndexedSetter]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateImplementationIndexer): (GenerateImplementationNamedPropertyGetter): * bindings/scripts/test/TestInterface.idl: * css/CSSStyleDeclaration.idl: * dom/DOMStringMap.idl: * html/HTMLAppletElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLObjectElement.idl: * page/History.idl: * page/Location.idl: * storage/Storage.idl: 2012-02-08 Kentaro Hara Replace [CheckNodeSecurity] with [CheckAccessToNode] https://bugs.webkit.org/show_bug.cgi?id=77971 Reviewed by Adam Barth. [CheckNodeSecurity] is not implemented by code generators. This patch replaces [CheckNodeSecurity] with [CheckAccessToNode]. Test: http/tests/security/cross-frame-access-frameelement.html * page/DOMWindow.idl: 2012-02-08 Kentaro Hara Rename [CustomPushEventHandlerScope] to [JSCustomPushEventHandlerScope] https://bugs.webkit.org/show_bug.cgi?id=78081 Reviewed by Adam Barth. [CustomPushEventHandlerScope] is a JSC-specific IDL attribute. This patch renames it to [JSCustomPushEventHandlerScope] No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * dom/Node.idl: * html/HTMLElement.idl: 2012-02-06 Kentaro Hara Add "JS" prefix to JSC-specific IDLs https://bugs.webkit.org/show_bug.cgi?id=77846 Reviewed by Darin Adler. In bug 77693, we have added "JS" prefix to several JSC specific IDLs. This patch adds "JS" prefix to the remaining JSC specific IDLs. Specifically, this patch renames IDLs as follows: [CustomDefineOwnProperty] => [JSCustomDefineOwnProperty] [CustomPrototypeDefineOwnProperty] => [JSCustomPrototypeDefineOwnProperty] [GenerateNativeConverter] => [JSGenerateToNativeObject] (Note: For naming consistency with [JSGenerateToJS] and [JSCustomToNativeObject]) [DelegatingGetOwnPropertySlot] => [JSCustomGetOwnPropertySlotDelegate] (Note: Should be prefixed "JS", should be prefixed with "Custom", and for naming consistency with [CustomGetOwnPropertySlot]) No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/TestTypedArray.idl: * dom/Attr.idl: * dom/DataTransferItemList.idl: * dom/Document.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/Node.idl: * fileapi/DirectoryEntry.idl: * fileapi/DirectoryEntrySync.idl: * fileapi/File.idl: * fileapi/FileEntry.idl: * fileapi/FileEntrySync.idl: * fileapi/WebKitBlobBuilder.idl: * html/DOMFormData.idl: * html/DOMURL.idl: * html/HTMLAppletElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLImageElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLTableCaptionElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLVideoElement.idl: * html/TextTrackCue.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * mediastream/LocalMediaStream.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * storage/StorageInfo.idl: * svg/SVGElement.idl: * svg/SVGElementInstance.idl: * workers/DedicatedWorkerContext.idl: * workers/SharedWorker.idl: * workers/SharedWorkerContext.idl: * workers/Worker.idl: * workers/WorkerContext.idl: 2012-02-07 Kentaro Hara Rename [HasOverridingNameGetter] attribute to [CustomNamedGetter] attribute https://bugs.webkit.org/show_bug.cgi?id=78076 Reviewed by Adam Barth. This patch renames the [HasOverridingNameGetter] attribute to the [CustomNamedGetter] attribute, for naming consistency with [CustomNamedSetter]. Test: bindings/scripts/test/TestCustomNamedGetter.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateImplementationNamedPropertyGetter): * html/HTMLDocument.idl: * html/HTMLFormElement.idl: * html/HTMLFrameSetElement.idl: * bindings/scripts/test/TestCustomNamedGetter.idl: Renamed from Source/WebCore/bindings/scripts/test/TestOverridingNameGetter.idl. * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp: Updated run-bindings-tests results. (WebDOMTestCustomNamedGetter::WebDOMTestCustomNamedGetterPrivate::WebDOMTestCustomNamedGetterPrivate): (WebDOMTestCustomNamedGetter::WebDOMTestCustomNamedGetterPrivate): (WebDOMTestCustomNamedGetter::WebDOMTestCustomNamedGetter): (WebDOMTestCustomNamedGetter::operator=): (WebDOMTestCustomNamedGetter::impl): (WebDOMTestCustomNamedGetter::~WebDOMTestCustomNamedGetter): (WebDOMTestCustomNamedGetter::anotherFunction): (toWebCore): (toWebKit): * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.h: Ditto. (WebCore): (WebDOMTestCustomNamedGetter): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: Ditto. (WebKit): (WebKit::kit): (webkit_dom_test_custom_named_getter_another_function): (WebKit::core): (webkit_dom_test_custom_named_getter_finalize): (webkit_dom_test_custom_named_getter_set_property): (webkit_dom_test_custom_named_getter_get_property): (webkit_dom_test_custom_named_getter_constructed): (webkit_dom_test_custom_named_getter_class_init): (webkit_dom_test_custom_named_getter_init): (WebKit::wrapTestCustomNamedGetter): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: Ditto. (_WebKitDOMTestCustomNamedGetter): (_WebKitDOMTestCustomNamedGetterClass): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h: Ditto. (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetter.h: Ditto. * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto. (WebCore): (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor): (WebCore::JSTestCustomNamedGetterConstructor::finishCreation): (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot): (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertyDescriptor): (WebCore::JSTestCustomNamedGetterPrototype::self): (WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot): (WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertyDescriptor): (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): (WebCore::JSTestCustomNamedGetter::finishCreation): (WebCore::JSTestCustomNamedGetter::createPrototype): (WebCore::JSTestCustomNamedGetter::destroy): (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot): (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor): (WebCore::jsTestCustomNamedGetterConstructor): (WebCore::JSTestCustomNamedGetter::getConstructor): (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): (WebCore::isObservable): (WebCore::JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots): (WebCore::JSTestCustomNamedGetterOwner::finalize): (WebCore::toJS): (WebCore::toTestCustomNamedGetter): * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Ditto. (WebCore): (JSTestCustomNamedGetter): (WebCore::JSTestCustomNamedGetter::create): (WebCore::JSTestCustomNamedGetter::createStructure): (WebCore::JSTestCustomNamedGetter::impl): (WebCore::JSTestCustomNamedGetter::releaseImpl): (WebCore::JSTestCustomNamedGetter::releaseImplIfNotNull): (JSTestCustomNamedGetterOwner): (WebCore::wrapperOwner): (WebCore::wrapperContext): (JSTestCustomNamedGetterPrototype): (WebCore::JSTestCustomNamedGetterPrototype::create): (WebCore::JSTestCustomNamedGetterPrototype::createStructure): (WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype): (JSTestCustomNamedGetterConstructor): (WebCore::JSTestCustomNamedGetterConstructor::create): (WebCore::JSTestCustomNamedGetterConstructor::createStructure): * bindings/scripts/test/JS/JSTestOverridingNameGetter.cpp: * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h: Ditto. * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm: Ditto. (-[DOMTestCustomNamedGetter dealloc]): (-[DOMTestCustomNamedGetter finalize]): (-[DOMTestCustomNamedGetter anotherFunction:]): (core): (kit): * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h: Ditto. (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: Ditto. (WebCore): (TestCustomNamedGetterInternal): (WebCore::TestCustomNamedGetterInternal::V8_USE): (WebCore::TestCustomNamedGetterInternal::anotherFunctionCallback): (WebCore::ConfigureV8TestCustomNamedGetterTemplate): (WebCore::V8TestCustomNamedGetter::GetRawTemplate): (WebCore::V8TestCustomNamedGetter::GetTemplate): (WebCore::V8TestCustomNamedGetter::HasInstance): (WebCore::V8TestCustomNamedGetter::wrapSlow): (WebCore::V8TestCustomNamedGetter::derefObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: Ditto. (WebCore): (V8TestCustomNamedGetter): (WebCore::V8TestCustomNamedGetter::toNative): (WebCore::V8TestCustomNamedGetter::existingWrapper): (WebCore::V8TestCustomNamedGetter::wrap): (WebCore::toV8): 2012-02-07 Emil A Eklund Revert TableSection cell and border calculations to integers https://bugs.webkit.org/show_bug.cgi?id=77918 Reviewed by Eric Seidel. Change RenderTableSection cell width, row height and border calculations back to use integers. Table layout is done on integer bounds to comply with the specification and to ensure that columns given the same width, including percentage widths, are rendered with identical widths. The same applies to heights. No new tests. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::setCellLogicalWidths): (WebCore::RenderTableSection::calcRowLogicalHeight): (WebCore::RenderTableSection::layoutRows): (WebCore::RenderTableSection::calcOuterBorderBefore): (WebCore::RenderTableSection::calcOuterBorderAfter): (WebCore::RenderTableSection::calcOuterBorderStart): (WebCore::RenderTableSection::calcOuterBorderEnd): (WebCore::RenderTableSection::paintObject): (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderTableSection.h: (RenderTableSection): (WebCore::RenderTableSection::RowStruct::RowStruct): (WebCore::RenderTableSection::outerBorderBefore): (WebCore::RenderTableSection::outerBorderAfter): (WebCore::RenderTableSection::outerBorderStart): (WebCore::RenderTableSection::outerBorderEnd): 2012-02-07 Robert Kroeger [chromium] Remove the no longer necessary Chromium gesture recognizer. https://bugs.webkit.org/show_bug.cgi?id=77492 Reviewed by Adam Barth. * WebCore.gypi: * platform/PlatformGestureRecognizer.h: Removed. * platform/chromium/FramelessScrollView.h: (WebCore): (FramelessScrollView): * platform/chromium/GestureRecognizerChromium.cpp: Removed. * platform/chromium/GestureRecognizerChromium.h: Removed. * platform/chromium/PopupContainer.cpp: (WebCore): * platform/chromium/PopupContainer.h: * platform/chromium/PopupListBox.cpp: (WebCore): * platform/chromium/PopupListBox.h: (PopupListBox): 2012-02-07 Erik Arvidsson [V8] Allow bindings for attributes on DOM nodes to also set a named hidden reference https://bugs.webkit.org/show_bug.cgi?id=78052 Reviewed by Nate Chapin. Before this patch the code generator did not add the named hidden reference when the data node was a DOM Node. This lead to us having to create custom toV8 bindings in a few places. Covered by existing tests * Target.pri: * UseV8.cmake: * WebCore.gypi: * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (HasCustomToV8Implementation): * bindings/v8/custom/V8DOMStringMapCustom.cpp: * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed. * bindings/v8/custom/V8NamedNodeMapCustom.cpp: 2012-02-07 Kentaro Hara [GTK] Ignore [Custom] attributes in CodeGeneratorGObject.pm https://bugs.webkit.org/show_bug.cgi?id=78059 Reviewed by Adam Barth. CodeGeneratorGObject.pm does not support custom attributes. We can skip generating code for attributes with [Custom]. The change would make sense, since CodeGeneratorGObject.pm already skips attributes with [CustomGetter] or [CustomSetter]. Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorGObject.pm: (SkipAttribute): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: 2012-02-07 Emil A Eklund Add pixelSnappedX/Y/Width/Height methods https://bugs.webkit.org/show_bug.cgi?id=78040 Reviewed by Eric Seidel. Add pixel snapped versions of x/y/width/height methods. These return the same value as the x/w/width/height methods for now but once we move over to sub pixel layout they will snap the subpixel value to a device pixel and return an integer value. When snapping the left and top edge is simply rounded to the nearest device pixel. The right and bottom edges are computed by subtracting the rounded left/ top edge from the precise location and size. This ensures that the edges all line up with device pixels and that the total size of an object, including borders, is at most one pixel off. In summary, the values are computed as follows: x: round(x) y: round(y) maxX: round(x + width) maxY: round(y + height) width: round(x + width) - round(x) height: round(y + height) - round(y) We use the term pixel snapped to indicate that the numbers are not merely rounded. This also matches the naming used by the line box tree. No new tests, no functionality changes. * page/PrintContext.cpp: (WebCore::PrintContext::pageNumberForElement): * rendering/RenderBlock.cpp: (WebCore::::collectIfNeeded): * rendering/RenderBlock.h: (RenderBlock): (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): (WebCore::RenderBlock::FloatingObject::pixelSnappedX): (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxX): (WebCore::RenderBlock::FloatingObject::pixelSnappedY): (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxY): (WebCore::RenderBlock::FloatingObject::pixelSnappedWidth): (WebCore::RenderBlock::FloatingObject::pixelSnappedHeight): (FloatingObject): (WebCore::RenderBlock::pixelSnappedLogicalTopForFloat): (WebCore::RenderBlock::pixelSnappedLogicalBottomForFloat): (WebCore::RenderBlock::pixelSnappedLogicalLeftForFloat): (WebCore::RenderBlock::pixelSnappedLogicalRightForFloat): * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): * rendering/RenderBox.cpp: (WebCore::RenderBox::pixelSnappedClientWidth): (WebCore): (WebCore::RenderBox::pixelSnappedClientHeight): (WebCore::RenderBox::scrollHeight): * rendering/RenderBox.h: (WebCore::RenderBox::pixelSnappedWidth): (WebCore::RenderBox::pixelSnappedHeight): (RenderBox): (WebCore::RenderBox::pixelSnappedOffsetWidth): (WebCore::RenderBox::pixelSnappedOffsetHeight): (WebCore::RenderBox::clientLogicalWidth): (WebCore::RenderBox::clientLogicalHeight): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): (WebCore): (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::pixelSnappedOffsetLeft): (WebCore::RenderBoxModelObject::pixelSnappedOffsetTop): (RenderBoxModelObject): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::pixelSnappedScrollWidth): (WebCore): (WebCore::RenderLayer::pixelSnappedScrollHeight): (WebCore::RenderLayer::computeScrollDimensions): (WebCore::RenderLayer::updateScrollInfoAfterLayout): * rendering/RenderLayer.h: (RenderLayer): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::scrollHeight): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton): * rendering/RenderTreeAsText.cpp: (WebCore::write): 2012-02-07 Mike Lawther CSS3 calc() - simple parse time evaluation https://bugs.webkit.org/show_bug.cgi?id=77960 Adds simple number/percent expression evaluation. rgb() and hsl() functions now allow simple calc() expressions. Reviewed by Ojan Vafai. * css/CSSCalculationValue.cpp: (WebCore): (WebCore::CSSCalcValue::doubleValue): (WebCore::CSSCalcPrimitiveValue::doubleValue): (WebCore::CSSCalcBinaryOperation::doubleValue): (CSSCalcBinaryOperation): (WebCore::CSSCalcBinaryOperation::evaluate): * css/CSSCalculationValue.h: (CSSCalcExpressionNode): (WebCore::CSSCalcValue::isInt): (CSSCalcValue): * css/CSSParser.cpp: (WebCore::CSSParser::parsedDouble): 2012-02-07 Andreas Kling REGRESSION(r106668-r106889): Chromium page cycler tests (Intl2) performance regressions. Reviewed by Ryosuke Niwa. Create CSS_IDENT values for attribute styles in the document's CSSValuePool. This regressed in r106756 and I suspect it'll fix up the cycler regression. * dom/StyledElement.cpp: (WebCore::StyledElement::addCSSProperty): 2012-02-07 Noel Gordon Remove TextureMapperQt from the gyp projects https://bugs.webkit.org/show_bug.cgi?id=78055 Reviewed by Noam Rosenthal. TextureMapperQt.{cpp,h} were removed in r106659, remove references to these files from the gyp projects. * WebCore.gypi: 2012-02-07 Tony Chang merge DashboardSupportCSSPropertyNames.in into CSSPropertyNames.in https://bugs.webkit.org/show_bug.cgi?id=78036 Reviewed by Darin Adler. In r89362, we started running the preprocessor through CSSPropertyNames.in. Now we can move DashboardSupportCSSPropertyNames.in into CSSPropertyNames.in and wrap it in an #if. No new tests, build refactoring. * Configurations/FeatureDefines.xcconfig: Add ENABLE_DASHBOARD_SUPPORT to FEATURE_DEFINES. * DerivedSources.make: Remove DashboardSupportCSSPropertyNames.in. * DerivedSources.pri: Remove DashboardSupportCSSPropertyNames.in. * WebCore.xcodeproj/project.pbxproj: Remove DashboardSupportCSSPropertyNames.in. * css/CSSPropertyNames.in: Wrap -webkit-dashboard-region in an #if. * css/DashboardSupportCSSPropertyNames.in: Removed. 2012-02-07 Xingnan Wang Enable IPP for FFTFrame https://bugs.webkit.org/show_bug.cgi?id=75522 Reviewed by Tony Chang. Add the FFTFrame implementation using Intel IPP's DFT algorithm. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/audio/FFTFrame.h: (FFTFrame): * platform/audio/FFTFrameStub.cpp: * platform/audio/ipp/FFTFrameIPP.cpp: Added. (WebCore): (WebCore::FFTFrame::FFTFrame): (WebCore::FFTFrame::initialize): (WebCore::FFTFrame::cleanup): (WebCore::FFTFrame::~FFTFrame): (WebCore::FFTFrame::multiply): (WebCore::FFTFrame::doFFT): (WebCore::FFTFrame::doInverseFFT): (WebCore::FFTFrame::realData): (WebCore::FFTFrame::imagData): (WebCore::FFTFrame::getUpToDateComplexData): 2012-02-07 Adrienne Walker Properly detect top level frames when propogating compositing https://bugs.webkit.org/show_bug.cgi?id=78033 Reviewed by James Robinson. There's no need to enumerate all tag names when searching for a top-level frame. If a render view's document has a frame, then that frame is not the top-level one. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-02-07 Chris Palmer Resolve crash in FrameLoader::checkTimerFired. https://bugs.webkit.org/show_bug.cgi?id=77907 Reviewed by Eric Seidel. Test is LayoutTests/http/tests/appcache/deferred-events-delete-while-raising-timer.html. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkTimerFired): 2012-02-07 Yong Li [BlackBerry] NetworkJob should stop redirecting when the request is cleared by client https://bugs.webkit.org/show_bug.cgi?id=78029 Reviewed by Rob Buis. When a redirect is rejected by security origin check, the ResourceRequest will be cleared (see DocumentThreadableLoader::redirectReceived()). In this case, we should stop handling the request. No new tests because existing tests (like http:/tests/xmlhttprequest/redirect-cross -origin-tripmine.html) can cover this. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::startNewJobWithRequest): 2012-02-07 David Barton Remove extraneous MathML code before bug 52444 fix https://bugs.webkit.org/show_bug.cgi?id=78034 Reviewed by Eric Seidel. Per Darin Adler, I am breaking up the patch fixing bug 52444 into smaller pieces. This patch removes a couple unused functions, some extra blank lines, unused #include directives, etc., and adds a very few WebKit-standard changes to these files. No new tests. * rendering/mathml/RenderMathMLBlock.cpp: (WebCore): * rendering/mathml/RenderMathMLBlock.h: (WebCore::RenderMathMLBlock::getBoxModelObjectHeight): - changed to a static member function since 'this' is unused; removed redundant non-const version (WebCore::RenderMathMLBlock::getBoxModelObjectWidth): - changed to a static member function since 'this' is unused; removed redundant non-const version (WebCore): * rendering/mathml/RenderMathMLFraction.cpp: * rendering/mathml/RenderMathMLMath.cpp: * rendering/mathml/RenderMathMLMath.h: * rendering/mathml/RenderMathMLOperator.h: (WebCore): * rendering/mathml/RenderMathMLRoot.cpp: * rendering/mathml/RenderMathMLRow.cpp: * rendering/mathml/RenderMathMLRow.h: * rendering/mathml/RenderMathMLSquareRoot.cpp: * rendering/mathml/RenderMathMLSquareRoot.h: * rendering/mathml/RenderMathMLSubSup.cpp: * rendering/mathml/RenderMathMLSubSup.h: * rendering/mathml/RenderMathMLUnderOver.cpp: * rendering/mathml/RenderMathMLUnderOver.h: 2012-02-07 David Reveman [Chromium] REGRESSION(r101854): Causing large amounts of unnecessary repainting. https://bugs.webkit.org/show_bug.cgi?id=78020 Reviewed by James Robinson. Revert r101854. This patch is tested by the following unit test: - TextureManagerTest.requestTextureExceedingPreferredLimit * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::reserve): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (TextureManager): 2012-02-07 Anders Carlsson Use the non-fast-scrollable region to detect when we can't do fast scrolling https://bugs.webkit.org/show_bug.cgi?id=78056 Reviewed by Sam Weinig. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): Actually set the non-fast scrollable region on the scrolling tree state. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::tryToHandleWheelEvent): Check if the wheel event's position is inside the non-fast-scrollable region and return false if it is. (WebCore::ScrollingTree::updateMainFrameScrollPosition): Store the cached main frame scroll position so we can use it in tryToHandleWheelEvent. * platform/graphics/Region.cpp: * platform/graphics/Region.h: Add a simple contains(const IntPoint&) member function. 2012-02-07 Dan Bernstein Synthetic bold is illegible under some scaling transforms https://bugs.webkit.org/show_bug.cgi?id=78044 Reviewed by Beth Dakin. Tests: fast/text/synthetic-bold-transformed-expected.html fast/text/synthetic-bold-transformed.html * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): Changed to interpret syntheticBoldOffset as a length in device pixels. 2012-02-07 Levi Weintraub Update LayoutUnit usage in ColumnInfo and RenderFrameSet https://bugs.webkit.org/show_bug.cgi?id=77914 Reviewed by Eric Seidel. Updating ColumnInfo and RenderFrameSet to use LayoutUnits instead of directly referencing integers for locations and distances. No new tests. No changed behavior. * rendering/ColumnInfo.h: (WebCore::ColumnInfo::forcedBreakOffset): (WebCore::ColumnInfo::maximumDistanceBetweenForcedBreaks): (ColumnInfo): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paintColumnBorder): (WebCore::RenderFrameSet::paintRowBorder): * rendering/RenderFrameSet.h: (RenderFrameSet): 2012-02-07 Adam Klein Add JSC support for delivering mutations when the outermost script context exits https://bugs.webkit.org/show_bug.cgi?id=70289 Reviewed by Eric Seidel. The meat of this change is in JSMainThreadExecState, where a counter is incremented every time WebCore calls into JSC and decremented every time it returns. When the counter reaches zero, any pending mutations are delivered (this mirrors very similar code in V8Proxy and V8RecursionScope). The rest of the changes are of two sorts: compilation/logic fixes for JSC code when ENABLE(MUTATION_OBSERVERS) is true, and additional usages of JSMainThreadExecState so as to trigger the above increment/decrements at the appropriate times. * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Use JSMainThreadExecState instead of JSC::call. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Add support for tryGetProperty with a HashMap. * bindings/js/JSDictionary.h: * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): Use JSMainThreadExecState instead of JSC::call. * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open): Use JSMainThreadExecState instead of JSC::call. * bindings/js/JSMainThreadExecState.cpp: (WebCore::JSMainThreadExecState::didLeaveScriptContext): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::JSMainThreadExecState): Increment a static recursion level counter. (WebCore::JSMainThreadExecState::~JSMainThreadExecState): Decrement a static recursion level counter and, if we are at zero (the outermost script invocation), deliver any outstanding mutation records. * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): Use JSMainThreadExecState instead of JSC::call. * bindings/js/JSWebKitMutationObserverCustom.cpp: (WebCore::JSWebKitMutationObserver::observe): Fix JSDictionary logic, add support for attributeFilter. 2012-02-07 Anders Carlsson Fix build. * platform/ScrollableArea.h: (WebCore::ScrollableArea::scrollableAreaBoundingBox): 2012-02-07 Levi Weintraub [SVG] Use element disappears after scripted change https://bugs.webkit.org/show_bug.cgi?id=74392 Reviewed by Eric Seidel. Solution uncovered by Nikolas Zimmermann. Removing an early return that caused SVGUseElements to not update the shadow root's style, and therefor not render correctly. Test: svg/custom/use-disappears-after-style-update.svg * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::didRecalcStyle): 2012-02-07 Kentaro Hara Rename [v8OnProto] IDL attribute to [V8OnProto] IDL attribute https://bugs.webkit.org/show_bug.cgi?id=77973 Reviewed by Adam Barth. This patch renames [v8OnProto] to [V8OnProto], since V8 specific IDL attributes should be prefixed by "V8". No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateSingleBatchedAttribute): (GenerateImplementation): 2011-10-10 Jer Noble media/audio-data-url.html test broken on Lion https://bugs.webkit.org/show_bug.cgi?id=69779 Reviewed by Eric Carlson. Do not use "OpenForPlayback" attribute on data:// urls, as CoreMedia/QuickTime X cannot handle those URLs. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::createQTMovie): 2012-02-07 Anders Carlsson Scrolling tree should keep track of region we can't do fast scrolling for https://bugs.webkit.org/show_bug.cgi?id=78050 Reviewed by Dan Bernstein. We currently won't do fast scrolling for subframes and other types of scrollable areas. Because of this, we'll have the scrolling tree keep a region of the page for which we can't do fast scrolling. This region will be updated after layout. * page/FrameView.cpp: (WebCore::FrameView::scrollableAreaBoundingBox): Return the bounding box. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): Go through all the scrollable areas in this frame view and compute the region which we can't do fast scrolling for. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitNewTreeState): Update the non-fast-scrollable region. * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::setNonFastScrollableRegion): Set the non-fast-scrollable region if it's changed. * platform/ScrollableArea.h: Add scrollableAreaBoundingBox member function. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollableAreaBoundingBox): Return the bounding box. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::scrollableAreaBoundingBox): Return the bounding box. 2012-02-07 Levi Weintraub unicode-bidi:plaintext is supposed to be effective on display:inline elements too https://bugs.webkit.org/show_bug.cgi?id=73310 Reviewed by Eric Seidel. Adding support for unicode-bidi: plaintext as a property on inlines. These are treated like unicode-bidi: isolate with the addition of their directionality being determined by the UBA. Tests: fast/text/international/inline-plaintext-is-isolated-expected.html fast/text/international/inline-plaintext-is-isolated.html fast/text/international/inline-plaintext-relayout-with-leading-neutrals-expected.html fast/text/international/inline-plaintext-relayout-with-leading-neutrals.html fast/text/international/inline-plaintext-with-generated-content-expected.html fast/text/international/inline-plaintext-with-generated-content.html * platform/text/UnicodeBidi.h: (WebCore::isIsolated): Added this convenience function as Plaintext and Isolate Unicode-Bidi values are both treated as isolated content. * rendering/InlineIterator.h: (WebCore::notifyObserverEnteredObject): Inline now supports Unicode-Bidi Plaintext. (WebCore::notifyObserverWillExitObject): Ditto. (WebCore::bidiFirstSkippingEmptyInlines): Changed to support being called without a resolver. (WebCore::isIsolatedInline): Inline now supports Unicode-Bidi: Plaintext. * rendering/RenderBlockLineLayout.cpp: (WebCore::determineDirectionality): Generalized for inlines. (WebCore::constructBidiRuns): Added support for Unicode-Bidi: Plaintext as an isolated inline. (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Fixed comment. (WebCore::RenderBlock::determineStartPosition): Fixed comment and switched to updated bidiFirstSkippingEmptyInlines. 2012-02-07 Kentaro Hara [Refactoring] Use the [IsWorkerContext] IDL in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=77957 Reviewed by Adam Barth. This patch replaces IsSubType("WorkerContext") and something equivalent that with the [IsWorkerContext] IDL. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GetInternalFields): (GenerateConstructorGetter): (GenerateImplementation): 2012-02-07 David Reveman [Chromium] Crash when using per-tile painting on Windows. https://bugs.webkit.org/show_bug.cgi?id=75715 Reviewed by James Robinson. PlatformCanvas constructor on win32 expects forth argument to be a shared section handle. Passing a pointer to a system memory causes it to crash. Fix this by not using the PlatformCanvas API for SkCanvas construction in per-tile texture uploader. Tested with manual tests. * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): 2012-02-07 Jer Noble Unreviewed build fix; make OSStatus the explicit return type for CMTimebase functions. * platform/mac/PlatformClockCM.mm: 2012-02-07 James Robinson [chromium] Allow retaining texture across frames in composited video playback and correctly handle lost context https://bugs.webkit.org/show_bug.cgi?id=77923 Reviewed by Kenneth Russell. Thanks to r106840, we can improve the video playback mode a bit. Instead of creating a new texture on every frame, this attempts to reuse the texture from the previous frame unless the context is lost. Also improves error checking in case the TextureManager cannot successfully reserve memory for the texture. Tested manually by killing the GPU process with an html5 video playing and verifying that the video playback continues and that we don't create a new set of textures for each plane on each frame. * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::reserveTextures): 2012-02-07 Matthew Delaney https://bugs.webkit.org/show_bug.cgi?id=77912 Removing old CG shadow code. A CG-specific shadow offset hack was added in http://trac.webkit.org/changeset/34317 for this particular setShadow method. However, this shadow offset adjustment for CG has since moved down into platform specific code. Thus, this offset adjustment here is now redundant. The CG-only shadow setting code block in this setShadow method is now redundant. Since it sets the shadow values to the CGContext directly - and not to the State object - it will be overwritten later by any subsequent calls to setting shadow values such as blur, offset, or shadow color. Reviewed by Simon Fraser. No new tests. Current canvas tests cover this path. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setShadow): 2012-02-07 James Robinson [chromium] Gracefully handle compositor initialization failure in single-threaded proxy https://bugs.webkit.org/show_bug.cgi?id=78013 Reviewed by Kenneth Russell. If compositor initialization fails it's not safe to proceed through the rest of the frame process. This adds some early outs. Tested manually by forcing the first makeContextCurrent() call fail. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::compositeImmediately): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): 2012-02-07 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=78003 WebKit associates credentials with the wrong site if the authentication challenge takes place after a redirect chain Reviewed by Alexey Proskuryakov. Test: http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html Associate the credential with the URL of the challenge itself, not the original request: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): 2012-02-07 Tony Chang move warning about css values and render style constants closer to where it applies https://bugs.webkit.org/show_bug.cgi?id=78017 Reviewed by Darin Adler. Move the warning about keeping RenderStyleConstnats.h enums and CSSValueKeywords.in values in the same order closer to the properties that the warning applies to. The warning was easy to miss and was confusing since it doesn't apply to most values. Also refactor 2 conversion functions to enumerate the possible values so the order doesn't matter. No new tests, just refactoring and comment cleanup. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator EListStylePosition): Name all possible values and add a NOT_REACHED(). (WebCore::CSSPrimitiveValue::operator EUserModify): Name all possible values and add a NOT_REACHED(). * css/CSSValueKeywords.in: * css/SVGCSSPropertyNames.in: * css/SVGCSSValueKeywords.in: * rendering/style/RenderStyleConstants.h: 2012-02-06 Jer Noble Use CMClock as a timing source for PlatformClock where available. https://bugs.webkit.org/show_bug.cgi?id=77885 Reviewed by Eric Carlson. No new tests; performance improvement covered by existing test cases. * WebCore.xcodeproj/project.pbxproj: * platform/Clock.cpp: (Clock::create): Use PlatformClockCM if available. * platform/mac/PlatformClockCM.h: Added. (WebCore::PlatformClockCM::playRate): (WebCore::PlatformClockCM::isRunning): * platform/mac/PlatformClockCM.mm: Added. (PlatformClockCM::PlatformClockCM): (PlatformClockCM::initializeWithTimingSource): (PlatformClockCM::setCurrentTime): (PlatformClockCM::currentTime): (PlatformClockCM::setPlayRate): (PlatformClockCM::start): (PlatformClockCM::stop): 2012-02-06 Anders Carlsson ScrollableAreaSet should be moved from Page to FrameView https://bugs.webkit.org/show_bug.cgi?id=62762 Reviewed by Beth Dakin. It makes more sense for the set of scrollable areas to be per frame view instead of per page; scrollable areas are associated with a containing frame view and their lifecycle follows the lifecycle of the frame view much more closely. This could even fix a bunch of crashes where a scrollable area outlived its containing page. * WebCore.exp.in: Replace the Page member functions with FrameView member functions instead. * page/EventHandler.cpp: (WebCore::EventHandler::mouseMoved): Check if the frame view contains the given layer. (WebCore::EventHandler::updateMouseEventTargetNode): Ditto. * page/FocusController.cpp: (WebCore::contentAreaDidShowOrHide): Add helper function. (WebCore::FocusController::setContainingWindowIsVisible): Call contentAreaDidShowOrHide for the main frame view, and for all scrollable areas inside all subframe views. * page/FrameView.cpp: (WebCore::FrameView::FrameView): Use early returns to make the code more clear. Also, don't add the scrollable area to the set here. (WebCore::FrameView::~FrameView): Don't remove the scrollable area here. (WebCore::FrameView::zoomAnimatorTransformChanged): m_page is gone so use m_frame->page() instead. (WebCore::FrameView::setAnimatorsAreActive): Call ScrollAnimator::setIsActive for all the scrollable areas in this frame view. Previously we used to do this for all scrollable areas on the page, but since setAnimatorsAreActive will be called for each document, this will be done implicitly. (WebCore::FrameView::notifyPageThatContentAreaWillPaint): Call ScrollableArea::contentDidPaint for this frame view and all its immediate scrollable areas. Previously, we used to do this for all scrollable areas on the page, but we only need to do it for this frame view. (WebCore::FrameView::scrollAnimatorEnabled): Get the page from m_frame since m_page is gone. (WebCore::FrameView::addScrollableArea): (WebCore::FrameView::removeScrollableArea): (WebCore::FrameView::containsScrollableArea): Move these member functions here from Page. (WebCore::FrameView::addChild): If we are adding a frame view, add it to the scrollable area set. (WebCore::FrameView::removeChild): If we are removing a frame view, remove it from the scrollable area set. * page/FrameView.h: Move the member function declarations and the scrollable area set member variable here from Page. * page/Page.cpp: (WebCore::Page::~Page): Don't call disconnectPage on the scrollable areas anymore. * platform/ScrollView.h: (ScrollView): Make addChild and removeChild virtual. * platform/ScrollableArea.h: Remove disconnectFromPage. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::~RenderLayer): (WebCore::RenderLayer::styleChanged): The frame view now keeps track of the scrollable areas. * rendering/RenderLayer.h: Remove the page member variable and disconnectFromPage. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::RenderListBox): (WebCore::RenderListBox::~RenderListBox): The frame view now keeps track of the scrollable areas. * rendering/RenderListBox.h: Remove the page member variable and disconnectFromPage. 2012-02-07 Matthew Delaney Remove redundant checks in CanvasRenderingContext2D.cpp https://bugs.webkit.org/show_bug.cgi?id=78000 Reviewed by Dan Bernstein. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setShadowColor): (WebCore::CanvasRenderingContext2D::setShadow): (WebCore::CanvasRenderingContext2D::drawImage): 2012-02-07 Abhishek Arya Crash in ContainerNode functions due to mutation events. https://bugs.webkit.org/show_bug.cgi?id=77999 Reviewed by Ryosuke Niwa. Add RefPtr to protect premature deletion of this due to mutation events. Tests: fast/dom/remove-body-during-body-replacement.html fast/dom/remove-body-during-body-replacement2.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::appendChild): 2012-02-07 Dana Jansens [Chromium] Memory bug during occlusion tracking if Vector::append() needs to reallocate the buffer https://bugs.webkit.org/show_bug.cgi?id=77996 Reviewed by James Robinson. We're holding onto the last element in the Vector and then calling append(). If append() reallocates the Vector's buffer, the pointer is no longer valid. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::enterTargetRenderSurface): 2012-02-07 Abhishek Arya Crash due to column style not updated on post block in splitInlines. https://bugs.webkit.org/show_bug.cgi?id=77939 Reviewed by Julien Chaffraix. Test: fast/multicol/span/split-inline-wrong-post-block-crash.html * rendering/RenderInline.cpp: (WebCore::RenderInline::splitFlow): 2012-02-07 Peter Rybin Web Inspector: CodeGeneratorInspector.py: extend Array validator functionality https://bugs.webkit.org/show_bug.cgi?id=77919 Patch by Peter Rybin on 2012-02-07 Reviewed by Yury Semikhatsky. Array validator method runtimeCast is added, internal backing method is moved from .cpp to .h (it's template anyway), boolean validator is supported. * inspector/CodeGeneratorInspector.py: (RawTypes.Bool.get_validate_method_params.ValidateMethodParams): (RawTypes.Bool.get_validate_method_params): (TypeBuilder): 2012-02-07 Dean Jackson Apple/Safari: Enable WebGL multisampling on ATI cards for OS X 10.7.2 and above. https://bugs.webkit.org/show_bug.cgi?id=77922 Address review comments by Alexey Proskuryakov and Mark Rowe. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::systemAllowsMultisamplingOnATICards): 2012-02-07 Dean Jackson Apple/Safari: Enable WebGL multisampling on ATI cards for OS X 10.7.2 and above. https://bugs.webkit.org/show_bug.cgi?id=77922 Reviewed by Chris Marrin. Follow Chrome's lead to allow WebGL antialiasing on ATI cards as long as we're on 10.7.2 and above. No new tests. Covered by existing tests. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::systemAllowsMultisamplingOnATICards): (WebCore): (WebCore::GraphicsContext3D::validateAttributes): 2012-02-07 Pavel Feldman Web Inspector: add generic support for undo-ing DOM edits. https://bugs.webkit.org/show_bug.cgi?id=77875 Reviewed by Yury Semikhatsky. This change introduces InspectorHistory::Action that encapsulates all DOM modifications initiated by the inspector. There is a way to undo these actions up until the undoable state marker. Tests: inspector/elements/undo-dom-edits-2.html inspector/elements/undo-dom-edits.html inspector/styles/undo-add-property.html inspector/styles/undo-change-property.html inspector/styles/undo-property-toggle.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorCSSAgent.cpp: (InspectorCSSAgent::StyleSheetAction): (WebCore::InspectorCSSAgent::StyleSheetAction::StyleSheetAction): (WebCore::InspectorCSSAgent::StyleSheetAction::perform): (WebCore::InspectorCSSAgent::StyleSheetAction::undo): (WebCore): (InspectorCSSAgent::SetStyleSheetTextAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::SetStyleSheetTextAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::perform): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::undo): (InspectorCSSAgent::SetPropertyTextAction): (WebCore::InspectorCSSAgent::SetPropertyTextAction::SetPropertyTextAction): (WebCore::InspectorCSSAgent::SetPropertyTextAction::toString): (WebCore::InspectorCSSAgent::SetPropertyTextAction::perform): (WebCore::InspectorCSSAgent::SetPropertyTextAction::undo): (WebCore::InspectorCSSAgent::SetPropertyTextAction::mergeId): (WebCore::InspectorCSSAgent::SetPropertyTextAction::merge): (InspectorCSSAgent::TogglePropertyAction): (WebCore::InspectorCSSAgent::TogglePropertyAction::TogglePropertyAction): (WebCore::InspectorCSSAgent::TogglePropertyAction::perform): (WebCore::InspectorCSSAgent::TogglePropertyAction::undo): (WebCore::InspectorCSSAgent::getStyleSheetText): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (InspectorDOMAgent::DOMAction): (WebCore::InspectorDOMAgent::DOMAction::DOMAction): (WebCore::InspectorDOMAgent::DOMAction::perform): (WebCore::InspectorDOMAgent::DOMAction::undo): (WebCore): (InspectorDOMAgent::RemoveChildAction): (WebCore::InspectorDOMAgent::RemoveChildAction::RemoveChildAction): (WebCore::InspectorDOMAgent::RemoveChildAction::perform): (WebCore::InspectorDOMAgent::RemoveChildAction::undo): (InspectorDOMAgent::InsertBeforeAction): (WebCore::InspectorDOMAgent::InsertBeforeAction::InsertBeforeAction): (WebCore::InspectorDOMAgent::InsertBeforeAction::perform): (WebCore::InspectorDOMAgent::InsertBeforeAction::undo): (InspectorDOMAgent::RemoveAttributeAction): (WebCore::InspectorDOMAgent::RemoveAttributeAction::RemoveAttributeAction): (WebCore::InspectorDOMAgent::RemoveAttributeAction::perform): (WebCore::InspectorDOMAgent::RemoveAttributeAction::undo): (InspectorDOMAgent::SetAttributeAction): (WebCore::InspectorDOMAgent::SetAttributeAction::SetAttributeAction): (WebCore::InspectorDOMAgent::SetAttributeAction::perform): (WebCore::InspectorDOMAgent::SetAttributeAction::undo): (InspectorDOMAgent::SetOuterHTMLAction): (WebCore::InspectorDOMAgent::SetOuterHTMLAction::SetOuterHTMLAction): (WebCore::InspectorDOMAgent::SetOuterHTMLAction::perform): (WebCore::InspectorDOMAgent::SetOuterHTMLAction::undo): (WebCore::InspectorDOMAgent::SetOuterHTMLAction::newNode): (InspectorDOMAgent::ReplaceWholeTextAction): (WebCore::InspectorDOMAgent::ReplaceWholeTextAction::ReplaceWholeTextAction): (WebCore::InspectorDOMAgent::ReplaceWholeTextAction::perform): (WebCore::InspectorDOMAgent::ReplaceWholeTextAction::undo): (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::reset): (WebCore::InspectorDOMAgent::setAttributeValue): (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::removeAttribute): (WebCore::InspectorDOMAgent::removeNode): (WebCore::InspectorDOMAgent::setNodeName): (WebCore::InspectorDOMAgent::setOuterHTML): (WebCore::InspectorDOMAgent::setNodeValue): (WebCore::InspectorDOMAgent::moveTo): (WebCore::InspectorDOMAgent::undo): (WebCore::InspectorDOMAgent::markUndoableState): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): (WebCore::InspectorDOMAgent::history): * inspector/InspectorHistory.cpp: Added. (WebCore::InspectorHistory::Action::Action): (WebCore): (WebCore::InspectorHistory::Action::~Action): (WebCore::InspectorHistory::Action::toString): (WebCore::InspectorHistory::Action::isUndoableStateMark): (WebCore::InspectorHistory::Action::mergeId): (WebCore::InspectorHistory::Action::merge): (WebCore::InspectorHistory::InspectorHistory): (WebCore::InspectorHistory::~InspectorHistory): (WebCore::InspectorHistory::perform): (WebCore::InspectorHistory::markUndoableState): (WebCore::InspectorHistory::undo): (WebCore::InspectorHistory::reset): * inspector/InspectorHistory.h: Added. (WebCore): (InspectorHistory): (Action): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::styleText): (WebCore::InspectorStyleSheet::addRule): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::setPropertyText): (WebCore::InspectorStyleSheet::getText): (WebCore::InspectorStyleSheetForInlineStyle::getText): * inspector/InspectorStyleSheet.h: (InspectorStyle): (InspectorStyleSheet): (InspectorStyleSheetForInlineStyle): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSProperty.prototype.setText): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._selectedNodeChanged): (WebInspector.ElementsPanel.prototype._updateSidebars): (WebInspector.ElementsPanel.prototype.handleShortcut): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertyTreeElement): (WebInspector.StylePropertyTreeElement.prototype): 2012-02-07 Sheriff Bot Unreviewed, rolling out r106935. http://trac.webkit.org/changeset/106935 https://bugs.webkit.org/show_bug.cgi?id=77994 "Crashes runMultiThread webkit_unit_test" (Requested by tonyg- cr on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsRedraw): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsRedraw): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsRedraw): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-02-07 Sheriff Bot Unreviewed, rolling out r106932. http://trac.webkit.org/changeset/106932 https://bugs.webkit.org/show_bug.cgi?id=77988 Breaks Mac bots (Requested by pfeldman on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getStyleSheetText): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::reset): (WebCore::InspectorDOMAgent::setAttributeValue): (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::removeAttribute): (WebCore::InspectorDOMAgent::removeNode): (WebCore::InspectorDOMAgent::setNodeName): (WebCore::InspectorDOMAgent::setOuterHTML): (WebCore::InspectorDOMAgent::setNodeValue): (WebCore::InspectorDOMAgent::moveTo): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/InspectorHistory.cpp: Removed. * inspector/InspectorHistory.h: Removed. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::styleText): (WebCore::InspectorStyleSheet::addRule): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::setPropertyText): (WebCore::InspectorStyleSheet::text): (WebCore::InspectorStyleSheetForInlineStyle::text): * inspector/InspectorStyleSheet.h: (InspectorStyle): (InspectorStyleSheet): (InspectorStyleSheetForInlineStyle): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSProperty.prototype.setText): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._selectedNodeChanged): (WebInspector.ElementsPanel.prototype.handleShortcut): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertyTreeElement): (WebInspector.StylePropertyTreeElement.prototype): 2012-02-07 Priit Laes [GTK] Build failure with --enable-web-audio https://bugs.webkit.org/show_bug.cgi?id=77978 Reviewed by Gustavo Noronha Silva. * GNUmakefile.list.am: Include AudioSourceProviderClient.h 2012-02-07 Alexei Filippov Web Inspector: fix objects duplication when switching filter in heap profiler. https://bugs.webkit.org/show_bug.cgi?id=77974 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): 2012-02-07 Jonathan Backer [chromium] Add setNeedsRedraw to WebWidget https://bugs.webkit.org/show_bug.cgi?id=77555 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsRedraw): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsRedraw): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::resetDamageTrackerOnImplThread): (WebCore): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-02-07 Michael Brüning [Qt][WK2] Compute and set cache capacities using the current CacheModel https://bugs.webkit.org/show_bug.cgi?id=73918 Reviewed by Kenneth Rohde Christiansen. No new tests. (build fix) * platform/qt/FileSystemQt.cpp: (WebCore::getVolumeFreeSizeForPath): 2012-02-07 Pavel Feldman Web Inspector: add generic support for undo-ing DOM edits. https://bugs.webkit.org/show_bug.cgi?id=77875 Reviewed by Yury Semikhatsky. This change introduces InspectorHistory::Action that encapsulates all DOM modifications initiated by the inspector. There is a way to undo these actions up until the undoable state marker. Tests: inspector/elements/undo-dom-edits-2.html inspector/elements/undo-dom-edits.html inspector/styles/undo-add-property.html inspector/styles/undo-change-property.html inspector/styles/undo-property-toggle.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorCSSAgent.cpp: (InspectorCSSAgent::StyleSheetAction): (WebCore::InspectorCSSAgent::StyleSheetAction::StyleSheetAction): (WebCore::InspectorCSSAgent::StyleSheetAction::perform): (WebCore::InspectorCSSAgent::StyleSheetAction::undo): (WebCore): (InspectorCSSAgent::SetStyleSheetTextAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::SetStyleSheetTextAction): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::perform): (WebCore::InspectorCSSAgent::SetStyleSheetTextAction::undo): (InspectorCSSAgent::SetPropertyTextAction): (WebCore::InspectorCSSAgent::SetPropertyTextAction::SetPropertyTextAction): (WebCore::InspectorCSSAgent::SetPropertyTextAction::toString): (WebCore::InspectorCSSAgent::SetPropertyTextAction::perform): (WebCore::InspectorCSSAgent::SetPropertyTextAction::undo): (WebCore::InspectorCSSAgent::SetPropertyTextAction::mergeId): (WebCore::InspectorCSSAgent::SetPropertyTextAction::merge): (InspectorCSSAgent::TogglePropertyAction): (WebCore::InspectorCSSAgent::TogglePropertyAction::TogglePropertyAction): (WebCore::InspectorCSSAgent::TogglePropertyAction::perform): (WebCore::InspectorCSSAgent::TogglePropertyAction::undo): (WebCore::InspectorCSSAgent::getStyleSheetText): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::reset): (WebCore::InspectorDOMAgent::setAttributeValue): (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::removeAttribute): (WebCore::InspectorDOMAgent::removeNode): (WebCore::InspectorDOMAgent::setNodeName): (WebCore::InspectorDOMAgent::setOuterHTML): (WebCore::InspectorDOMAgent::setNodeValue): (WebCore::InspectorDOMAgent::moveTo): (WebCore::InspectorDOMAgent::undo): (WebCore): (WebCore::InspectorDOMAgent::markUndoableState): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): (WebCore::InspectorDOMAgent::history): * inspector/InspectorHistory.cpp: Added. (WebCore::InspectorHistory::Action::Action): (WebCore): (WebCore::InspectorHistory::Action::~Action): (WebCore::InspectorHistory::Action::toString): (WebCore::InspectorHistory::Action::isUndoableStateMark): (WebCore::InspectorHistory::Action::mergeId): (WebCore::InspectorHistory::Action::merge): (WebCore::InspectorHistory::InspectorHistory): (WebCore::InspectorHistory::~InspectorHistory): (WebCore::InspectorHistory::perform): (WebCore::InspectorHistory::markUndoableState): (WebCore::InspectorHistory::undo): (WebCore::InspectorHistory::reset): * inspector/InspectorHistory.h: Added. (WebCore): (InspectorHistory): (Action): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::styleText): (WebCore::InspectorStyleSheet::addRule): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::setPropertyText): (WebCore::InspectorStyleSheet::getText): (WebCore::InspectorStyleSheetForInlineStyle::getText): * inspector/InspectorStyleSheet.h: (InspectorStyle): (InspectorStyleSheet): (InspectorStyleSheetForInlineStyle): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSProperty.prototype.setText): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._selectedNodeChanged): (WebInspector.ElementsPanel.prototype._updateSidebars): (WebInspector.ElementsPanel.prototype.handleShortcut): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertyTreeElement): (WebInspector.StylePropertyTreeElement.prototype): 2012-02-07 Chris Guan [Blackberry] Clean up Networkjob and Networkmanger: remove unused variables in release build and change some public functions into be private ones https://bugs.webkit.org/show_bug.cgi?id=77926 Reviewed by Rob Buis. 1. rename clientIsOk to isClientAvailable. 2. m_isRunning is only for an ASSERT in NetWorkManager, So move out from release build but keep available in debug build. No changes in behavior, so no new tests. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::handleNotifyDataReceived): (WebCore::NetworkJob::handleNotifyDataSent): (WebCore::NetworkJob::handleNotifyClose): (WebCore::NetworkJob::startNewJobWithRequest): (WebCore::NetworkJob::sendResponseIfNeeded): (WebCore::NetworkJob::sendMultipartResponseIfNeeded): * platform/network/blackberry/NetworkJob.h: (NetworkJob): (WebCore::NetworkJob::isClientAvailable): 2012-02-06 Yury Semikhatsky Web Inspector: don't mark object is queriable if it is only reachable by internal reference https://bugs.webkit.org/show_bug.cgi?id=77877 Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): 2012-02-07 Sheriff Bot Unreviewed, rolling out r106909. http://trac.webkit.org/changeset/106909 https://bugs.webkit.org/show_bug.cgi?id=77965 ~20 tests are crashing on chromium win release bot. (Requested by loislo on #webkit). * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): 2012-02-07 Andreas Kling REGRESSION(r106819): ~28% or so performance regression on the ManInBlue HTML benchmark Reviewed by Andreas Kling. Patch by Ryosuke Niwa. The performance regression was caused by using ensureAttributeData() which forces the regeneration of invalidated attributes ("style" and SVG animatable attributes.) Added an ensureAttributeDataWithoutUpdate() helper that only ensures the presence of ElementAttributeData, not the validity of its contents. Use that when grabbing at an element's inline and attribute styles. * dom/Element.h: (Element): (WebCore::Element::ensureAttributeDataWithoutUpdate): * dom/StyledElement.h: (WebCore::StyledElement::ensureInlineStyleDecl): (WebCore::StyledElement::ensureAttributeStyle): 2012-02-07 Michael Brüning [Qt][WK2] Compute and set cache capacities using the current CacheModel https://bugs.webkit.org/show_bug.cgi?id=73918 Reviewed by Csaba Osztrogonác. No new tests. (build fix). * platform/qt/FileSystemQt.cpp: 2012-02-07 Michael Brüning [Qt][WK2] Compute and set cache capacities using the current CacheModel https://bugs.webkit.org/show_bug.cgi?id=73918 Reviewed by Kenneth Rohde Christiansen. No new tests. (Not applicable) Added OS-specific implementation for retrieving the free disk space. * platform/FileSystem.h: (WebCore): * platform/qt/FileSystemQt.cpp: (WebCore::getVolumeFreeSizeForPath): (WebCore): 2012-02-07 Kenneth Rohde Christiansen [Inspector] Add the Nokia N9 user agent https://bugs.webkit.org/show_bug.cgi?id=77949 Reviewed by Simon Hausmann. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const): 2012-02-07 Alexander Pavlov [CRASH] bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event) references a NULL pointer https://bugs.webkit.org/show_bug.cgi?id=77953 Reviewed by Andreas Kling. * page/EventHandler.cpp: (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): 2012-02-07 Sheriff Bot Unreviewed, rolling out r106912. http://trac.webkit.org/changeset/106912 https://bugs.webkit.org/show_bug.cgi?id=77947 "AppleWebKit build is broken" (Requested by haraken on #webkit). * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore): * dom/ScriptExecutionContext.h: (WebCore): (ScriptExecutionContext): * html/DOMURL.cpp: (WebCore::DOMURL::DOMURL): (WebCore): (WebCore::DOMURL::~DOMURL): (WebCore::DOMURL::contextDestroyed): (WebCore::DOMURL::createObjectURL): (WebCore::DOMURL::revokeObjectURL): * html/DOMURL.h: (WebCore::DOMURL::create): (DOMURL): * html/DOMURL.idl: * html/PublicURLManager.h: Removed. * page/DOMWindow.cpp: (WebCore): (WebCore::DOMWindow::webkitURL): * page/DOMWindow.h: (DOMWindow): * page/DOMWindow.idl: * workers/WorkerContext.cpp: (WebCore): (WebCore::WorkerContext::webkitURL): * workers/WorkerContext.h: (WorkerContext): * workers/WorkerContext.idl: 2012-02-07 Kentaro Hara Unreviewed, rolling out r106862. http://trac.webkit.org/changeset/106862 https://bugs.webkit.org/show_bug.cgi?id=77510 Mac build fails if we manually remove generated code * DerivedSources.make: * bindings/scripts/generate-bindings.pl: (generateEmptyHeaderAndCpp): * bindings/scripts/resolve-supplemental.pl: * bindings/scripts/update-idl-needs-rebuild.pl: Removed. 2012-02-07 Kaustubh Atrawalkar Migrate createObjectURL & revokeObjectURL to static (Class) methods. https://bugs.webkit.org/show_bug.cgi?id=74386 Reviewed by David Levin. Test: fast/dom/DOMURL/check-instanceof-domurl-functions.html Already Existing: fast/files/revoke-blob-url.html fast/dom/window-domurl-crash.html fast/files/apply-blob-url-to-img.html fast/files/create-blob-url-crash.html fast/files/workers/inline-worker-via-blob-url.html * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::fileThread): (WebCore): (WebCore::ScriptExecutionContext::publicURLManager): * dom/ScriptExecutionContext.h: (WebCore): (ScriptExecutionContext): * html/DOMURL.cpp: (WebCore): (WebCore::DOMURL::createObjectURL): Changed to static. (WebCore::DOMURL::revokeObjectURL): ditto. * html/DOMURL.h: (DOMURL): (WebCore::DOMURL::create): * html/DOMURL.idl: * html/PublicURLManager.h: Added. (WebCore): (PublicURLManager): (WebCore::PublicURLManager::create): (WebCore::PublicURLManager::contextDestroyed): (WebCore::PublicURLManager::blobURLs): (WebCore::PublicURLManager::streamURLs): * page/DOMWindow.cpp: Removed object initialization for DOMURL. (WebCore): * page/DOMWindow.h: ditto. (DOMWindow): * page/DOMWindow.idl: * workers/WorkerContext.cpp: (WebCore): * workers/WorkerContext.h: (WorkerContext): * workers/WorkerContext.idl: 2012-02-03 Vsevolod Vlasov http/tests/inspector/indexeddb/database-structure.html failing on chromium win/linux https://bugs.webkit.org/show_bug.cgi?id=77661 Reviewed by Yury Semikhatsky. * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-02-07 Hayato Ito Fix build on Mac with '--shadow-dom'. https://bugs.webkit.org/show_bug.cgi?id=77940 Reviewed by Hajime Morita. * WebCore.xcodeproj/project.pbxproj: 2012-02-06 Shinya Kawanaka Stop calling Element::ensureShadowRoot() if it is used in construction phase. https://bugs.webkit.org/show_bug.cgi?id=77929 Reviewed by Hajime Morita. ShadowRoot's life cycle can be consufing If Element::ensureShadowRoot() is used. So we want to remove Element::ensureShadowRoot(). This patch replaces Element::ensureShadowRoot() if it is used in object construction phase. No new tests, no change in behavior. * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): 2012-02-06 Shinya Kawanaka Remove Element::ensureShadowRoot export. https://bugs.webkit.org/show_bug.cgi?id=77932 Reviewed by Hajime Morita. Removes Element::ensureShadowRoot export. No new tests, no change in behavior. * WebCore.exp.in: 2012-02-06 Ilya Tikhonovsky Unreviewed. Web Inspector: rename Artificial to Synthetic according to v8 patch r10614. * inspector/front-end/DetailedHeapshotGridNodes.js: * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get isSynthetic): (WebInspector.HeapSnapshot.prototype._init): 2012-02-06 Hayato Ito Implement querySelector on ShadowRoot. https://bugs.webkit.org/show_bug.cgi?id=77714 Reviewed by Dimitri Glazkov. * dom/SelectorQuery.cpp: (WebCore::nodeIsRootNodeOfTreeScope): (WebCore): (WebCore::SelectorDataList::execute): 2012-02-06 Martin Robinson and Nayan Kumar K [GTK] Add TextureMapperGL implementation https://bugs.webkit.org/show_bug.cgi?id=75308 Reviewed by Alejandro G. Castro. No new tests. This will be covered by accelerated compositing and 3D CSS transform tests eventually. * GNUmakefile.list.am: Added some files necessary to build TextureMapperGL. * platform/graphics/cairo/TextureMapperGLCairo.cpp: Added implementations. * platform/graphics/cairo/TextureMapperGLCairo.h: Updated member list. * platform/graphics/gtk/WindowGLContext.h: Added. * platform/graphics/gtk/WindowGLContextGLX.cpp: Added. * platform/graphics/opengl/TextureMapperGL.cpp: Use the GL shims on GTK. 2012-02-06 Emil A Eklund Change baselinePosition and lineHeight to LayoutUnit https://bugs.webkit.org/show_bug.cgi?id=77905 Reviewed by Eric Seidel. Change the virtual baselinePosition and lineHeight methods to return LayoutUnits as they are both computed from the height and top/bottom margins (or width and left/right margins for vertical text), all of which are LayoutUnits. No new tests. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::baselinePosition): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::baselinePosition): * platform/gtk/RenderThemeGtk.h: (RenderThemeGtk): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::baselinePosition): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::lineHeight): (WebCore::RenderListMarker::baselinePosition): * rendering/RenderListMarker.h: (RenderListMarker): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::baselinePosition): * rendering/RenderSlider.h: (RenderSlider): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::baselinePosition): (WebCore::RootInlineBox::lineHeight): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::baselinePosition): * rendering/mathml/RenderMathMLFraction.h: (RenderMathMLFraction): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::baselinePosition): * rendering/mathml/RenderMathMLOperator.h: (RenderMathMLOperator): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::baselinePosition): * rendering/mathml/RenderMathMLRow.h: (RenderMathMLRow): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::baselinePosition): * rendering/mathml/RenderMathMLSubSup.h: (RenderMathMLSubSup): * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::baselinePosition): * rendering/mathml/RenderMathMLUnderOver.h: (RenderMathMLUnderOver): 2012-02-06 Xianzhu Wang Avoid Page::updateViewportArguments() if the causing frame is not the main frame https://bugs.webkit.org/show_bug.cgi?id=77387 Reviewed by Kenneth Rohde Christiansen. * dom/Document.cpp: (WebCore::Document::processViewport): (WebCore::Document::updateViewportArguments): (WebCore::Document::setInPageCache): * dom/Document.h: (Document): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::insertedIntoDocument): * page/Frame.cpp: (WebCore::Frame::setDocument): * page/Page.cpp: (WebCore::Page::viewportArguments): (WebCore): * page/Page.h: (Page): 2012-02-06 Martin Robinson Fix some miscellaneous 'make dist' error for WebKitGTK+. * GNUmakefile.list.am: Add some missing Shadow DOM files to the source list. 2012-02-06 Dana Jansens Add contains() test to Region https://bugs.webkit.org/show_bug.cgi?id=72294 Reviewed by Anders Carlsson. * platform/graphics/Region.cpp: (WebCore::Region::contains): (WebCore): * platform/graphics/Region.h: (Region): (Shape): (WebCore::operator==): (WebCore): 2012-02-06 Kentaro Hara Rename [DontCheckEnums], [ReturnsNew], [DoNotCheckDomainSecurityOnGet], [DoNotCheckDomainSecurityOnSet] and [ImplementationFunction] IDLs https://bugs.webkit.org/show_bug.cgi?id=77852 Reviewed by Adam Barth. This patch renames [DontCheckEnums], [ReturnsNew], [DoNotCheckDomainSecurityOnGet], [DoNotCheckDomainSecurityOnSet] and [ImplementationFunction] IDLs for clarification. [DontCheckEnums] => [DoNotCheckConstants] (This IDL inserts assertions to check if a constant value is equal to the expected constant value) [ReturnsNew] => [ReturnNewObject] (For clarification) [DoNotCheckDomainSecurityOnGet] => [DoNotCheckDomainSecurityOnGetter] (For naming consistency with other [*Getter] IDLs) [DoNotCheckDomainSecurityOnSet] => [DoNotCheckDomainSecurityOnSetter] (For naming consistency with other [*Setter] IDLs) [ImplementationFunction=] => [ImplementedAs=] (For clarification. This IDL specifies a method name in implementation) No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (ShouldCheckEnums): (GenerateCompileTimeCheckForEnumsIfNeeded): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GenerateSingleBatchedAttribute): (GenerateFunctionCallString): (NativeToJSValue): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestTypedArray.idl: * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * css/WebKitCSSFilterValue.idl: * css/WebKitCSSTransformValue.idl: * dom/DOMCoreException.idl: * dom/Document.idl: * dom/EventException.idl: * dom/RangeException.idl: * fileapi/FileException.idl: * fileapi/OperationNotAllowedException.idl: * html/HTMLFormElement.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * html/canvas/WebGLCompressedTextures.idl: * html/canvas/WebGLDebugRendererInfo.idl: * html/canvas/WebGLRenderingContext.idl: * inspector/JavaScriptCallFrame.idl: * loader/appcache/DOMApplicationCache.idl: * page/Console.idl: * page/DOMWindow.idl: * page/Location.idl: * storage/IDBCursor.idl: * storage/IDBDatabaseException.idl: * storage/IDBObjectStore.idl: * storage/SQLException.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGException.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGGradientElement.idl: * xml/XMLHttpRequestException.idl: * xml/XPathException.idl: 2012-02-06 James Robinson [chromium] canvas demo is slow due to unnecessary resource cleanups https://bugs.webkit.org/show_bug.cgi?id=77135 Reviewed by Kenneth Russell. This defers dropping a ManagedTexture until it is evicted by the manager, the layer is destroyed, the TextureManager is destroyed, or the layer is added to a CCLayerTreeHost that has a different texture manager. In particular, removing a layer from a CCLayerTreeHost and then adding it back to the same host does not drop any ManagedTextures unless the manager has to evict it for other reasons. This provides a big speedup on sites that rebuild the compositing tree frequently. New unit test added for ManagedTexture / TextureManager interaction. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::setLayerTreeHost): (WebCore::Canvas2DLayerChromium::setTextureManager): * platform/graphics/chromium/Canvas2DLayerChromium.h: (Canvas2DLayerChromium): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerTreeHost): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::setTextureManager): (WebCore): (WebCore::ManagedTexture::steal): (WebCore::ManagedTexture::clear): * platform/graphics/chromium/ManagedTexture.h: (ManagedTexture): * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore): (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/TiledLayerChromium.h: 2012-02-06 Kentaro Hara Unreviewed, rolling out r106883. http://trac.webkit.org/changeset/106883 https://bugs.webkit.org/show_bug.cgi?id=77852 build failure around Chromium V8 bindings * bindings/scripts/CodeGenerator.pm: (ShouldCheckEnums): (GenerateCompileTimeCheckForEnumsIfNeeded): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GenerateSingleBatchedAttribute): (GenerateFunctionCallString): (NativeToJSValue): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestTypedArray.idl: * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * css/WebKitCSSFilterValue.idl: * css/WebKitCSSTransformValue.idl: * dom/DOMCoreException.idl: * dom/Document.idl: * dom/EventException.idl: * dom/RangeException.idl: * fileapi/FileException.idl: * fileapi/OperationNotAllowedException.idl: * html/HTMLFormElement.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * html/canvas/WebGLCompressedTextures.idl: * html/canvas/WebGLDebugRendererInfo.idl: * html/canvas/WebGLRenderingContext.idl: * inspector/JavaScriptCallFrame.idl: * loader/appcache/DOMApplicationCache.idl: * page/Console.idl: * page/DOMWindow.idl: * page/Location.idl: * storage/IDBCursor.idl: * storage/IDBDatabaseException.idl: * storage/IDBObjectStore.idl: * storage/SQLException.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGException.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGGradientElement.idl: * xml/XMLHttpRequestException.idl: * xml/XPathException.idl: 2012-02-06 Yongsheng Zhu WebGL must allocate smaller drawing buffer when the allocation fails. https://bugs.webkit.org/show_bug.cgi?id=76654 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/drawingbuffer-test.html * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore): (WebCore::DrawingBuffer::create): (WebCore::DrawingBuffer::reset): 2012-02-06 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::optionsObjectCallback): 2012-02-06 Levi Weintraub Correct usage of LayoutUnits in dom, editing, page, accessibility, inspector, and loader https://bugs.webkit.org/show_bug.cgi?id=77891 Reviewed by Darin Adler. Updating the usage of LayoutUnits in the dom, editing, page, accessibility, inspector, and loader directories to properly use LayoutUnits vs ints. No new tests. No new behavior. * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::boundsForVisiblePositionRange): (WebCore::AccessibilityObject::doAXBoundsForRange): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::clickPoint): (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): (WebCore::AccessibilityRenderObject::doAXBoundsForRange): (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::elementAccessibilityHitTest): * accessibility/AccessibilitySlider.h: (AccessibilitySlider): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]): * css/CSSComputedStyleDeclaration.cpp: (WebCore::computedTransform): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * dom/Clipboard.h: (WebCore::Clipboard::dragLocation): (Clipboard): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::renderedRectsForMarkers): * dom/DocumentMarkerController.h: * dom/Element.cpp: (WebCore::Element::screenRect): * dom/Element.h: (Element): * editing/Editor.cpp: (WebCore::Editor::rangeForPoint): (WebCore::Editor::firstRectForRange): * editing/RenderedPosition.cpp: (WebCore::RenderedPosition::absoluteRect): * editing/RenderedPosition.h: (WebCore::RenderedPosition::absoluteRect): (RenderedPosition): * editing/VisiblePosition.h: (VisiblePosition): * inspector/DOMNodeHighlighter.cpp: * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::createJavaAppletWidget): * loader/SubframeLoader.h: (SubframeLoader): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): * page/Frame.cpp: (WebCore::Frame::nodeImage): * page/win/FrameCGWin.cpp: (WebCore::Frame::nodeImage): 2012-02-05 Kentaro Hara Rename [DontCheckEnums], [ReturnsNew], [DoNotCheckDomainSecurityOnGet], [DoNotCheckDomainSecurityOnSet] and [ImplementationFunction] IDLs https://bugs.webkit.org/show_bug.cgi?id=77852 Reviewed by Adam Barth. This patch renames [DontCheckEnums], [ReturnsNew], [DoNotCheckDomainSecurityOnGet], [DoNotCheckDomainSecurityOnSet] and [ImplementationFunction] IDLs for clarification. [DontCheckEnums] => [DoNotCheckConstants] (This IDL inserts assertions to check if a constant value is equal to the expected constant value) [ReturnsNew] => [ReturnNewObject] (For clarification) [DoNotCheckDomainSecurityOnGet] => [DoNotCheckDomainSecurityOnGetter] (For naming consistency with other [*Getter] IDLs) [DoNotCheckDomainSecurityOnSet] => [DoNotCheckDomainSecurityOnSetter] (For naming consistency with other [*Setter] IDLs) [ImplementationFunction=] => [ImplementedAs=] (For clarification. This IDL specifies a method name in implementation) No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (ShouldCheckEnums): (GenerateCompileTimeCheckForEnumsIfNeeded): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GenerateSingleBatchedAttribute): (GenerateFunctionCallString): (NativeToJSValue): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestTypedArray.idl: * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests results. (WebCore): * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto. (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestTypedArray.idl: * css/WebKitCSSFilterValue.idl: * css/WebKitCSSTransformValue.idl: * dom/DOMCoreException.idl: * dom/Document.idl: * dom/EventException.idl: * dom/RangeException.idl: * fileapi/FileException.idl: * fileapi/OperationNotAllowedException.idl: * html/HTMLFormElement.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * html/canvas/WebGLCompressedTextures.idl: * html/canvas/WebGLDebugRendererInfo.idl: * html/canvas/WebGLRenderingContext.idl: * inspector/JavaScriptCallFrame.idl: * loader/appcache/DOMApplicationCache.idl: * page/Console.idl: * page/DOMWindow.idl: * page/Location.idl: * storage/IDBCursor.idl: * storage/IDBDatabaseException.idl: * storage/IDBObjectStore.idl: * storage/SQLException.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGException.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGGradientElement.idl: * xml/XMLHttpRequestException.idl: 2012-02-06 Stephen Chenney RenderSVGShape::strokeContains will fail for some strokes https://bugs.webkit.org/show_bug.cgi?id=76931 Reviewed by Darin Adler. Adding support for rounded zero-length endcaps for SVG path hit testing. Tests: svg/hittest/zero-length-butt-cap-path.xhtml svg/hittest/zero-length-round-cap-path.xhtml svg/hittest/zero-length-square-cap-path.xhtml * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::strokeContains): 2012-02-06 Gregg Tavares Add webGLErrorsToConsoleEnabled Settings flag https://bugs.webkit.org/show_bug.cgi?id=77696 Reviewed by Kenneth Russell. No new tests as there is no change in behavior. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::setupFlags): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): (WebCore::Settings::webGLErrorsToConsoleEnabled): 2012-02-06 Emil A Eklund Convert PopupMenuClient::clientPadding over to new layout abstraction https://bugs.webkit.org/show_bug.cgi?id=77798 Reviewed by Eric Seidel. Change PopupMenuClient and all classes inheriting from it to use the new layout types for padding. No new tests. * platform/PopupMenuClient.h: (PopupMenuClient): * rendering/RenderMenuList.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): * rendering/RenderTextControlSingleLine.h: 2012-02-06 Philip Rogers Fix color animations by value https://bugs.webkit.org/show_bug.cgi?id=77812 Reviewed by Darin Adler. Test: svg/animations/animate-color-fill-from-by.html * svg/SVGAnimatedColor.cpp: (WebCore::SVGAnimatedColorAnimator::calculateFromAndByValues): 2012-02-03 Jer Noble REGRESSION (r104303): Clicking inline video controls gives the video a focus ring https://bugs.webkit.org/show_bug.cgi?id=77288 Reviewed by Darin Adler. Test: media/video-mouse-focus.html Do not allow media elements to be focused by mouse click by overriding isMouseFocusable and returning false. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isMouseFocusable): * html/HTMLMediaElement.h: 2012-02-06 Anders Carlsson Overlay scrollbars flash when window is simply activated https://bugs.webkit.org/show_bug.cgi?id=77911 Reviewed by Kenneth Russell. Add a new member function, FocusController::setContainingWindowIsVisible, and move the code that calls ScrollableArea::contentAreaDidShow/ScrollableArea::contentAreaDidHide there, since we only want to flash scrollers when the window becomes visible. * WebCore.exp.in: * page/FocusController.cpp: (WebCore::FocusController::FocusController): (WebCore::FocusController::setActive): (WebCore::FocusController::setContainingWindowIsVisible): (WebCore): * page/FocusController.h: (FocusController): (WebCore::FocusController::containingWindowIsVisible): * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]): Call ScrollAnimatorMac::contentAreaWillPaint here, since that will trigger AppKit to flash the scrollers. 2012-02-06 Greg Simon postMessage leaks MemoryEvent object https://bugs.webkit.org/show_bug.cgi?id=77893 Reviewed by Adam Barth. Changed from PassRefPtr().leakRef() to RefPtr.get() when calling into FrameLoaderClient to stop +1 extra ref. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): 2012-02-06 Ehsan Akhgari WebGL conformance test misc/functions-returning-strings.html fails https://bugs.webkit.org/show_bug.cgi?id=77149 Make sure that WebGL methods returning strings don't return null when they run successfully. Reviewed by Kenneth Russell. Test: fast/canvas/webgl/functions-returning-strings.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::getProgramInfoLog): (WebCore::WebGLRenderingContext::getShaderInfoLog): (WebCore::WebGLRenderingContext::getShaderSource): (WebCore::WebGLRenderingContext::ensureNotNull): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-02-06 Enrica Casucci Refactor Mac platform implementation of the Pasteboard class. https://bugs.webkit.org/show_bug.cgi?id=77567 The goal of this change is to remove the majority of the methods in the class interface that are Mac specific. writeSelectionForTypes has been left to support OS X services. Some of the methods have been turned into static functions. The method asURL was being used only by the DragData class and its implementation has been moved there. This is a first step in the direction of removing NSPasteboard access from the WebProcess for WebKit2 (https://bugs.webkit.org/show_bug.cgi?id=77259) leaving the WebKit1 behavior unchanged. Reviewed by Alexey Proskuryakov. No new tests. No changes in behavior. * platform/Pasteboard.h: Removed most of the Mac specific methods. * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::writeRange): (WebCore::ClipboardMac::writeURL): * platform/mac/DragDataMac.mm: (WebCore::DragData::asURL): Moved code from PasteboardMac.mm. Removed FIXME because we only want to handle the case of single file, otherwise the user doesn't know which of the files has been chosen. * platform/mac/PasteboardMac.mm: (WebCore::writeURLForTypes): (WebCore::Pasteboard::writeURL): (WebCore::writeFileWrapperAsRTFDAttachment): Now a static function. (WebCore::Pasteboard::writeImage): (WebCore::documentFragmentWithImageResource): Ditto. (WebCore::documentFragmentWithRTF): Ditto. (WebCore::Pasteboard::documentFragment): 2012-02-06 James Robinson [chromium] Drop tiles completely outside of layer bounds when resizing to a smaller size https://bugs.webkit.org/show_bug.cgi?id=77910 Reviewed by Kenneth Russell. When resizing a tiled layer to a smaller size, drop all tiles that lie completely outside the new layer bounds. This avoids attempting to access out-of-bounds tiles when iterating over all tiles in the tiler, which triggers ASSERT()s, as well as saves some memory. New unit test added to TiledLayerChromiumTest. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::invalidateRect): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBounds): 2012-02-06 Chris Rogers zvmul incorrectly multiplies complex arrays on Windows. https://bugs.webkit.org/show_bug.cgi?id=77900 Reviewed by Kenneth Russell. * platform/audio/VectorMath.cpp: (WebCore::VectorMath::zvmul): 2012-02-06 Andreas Kling REGRESSION(r106756): 10% performance hit on DOM/Template. Reviewed by Ryosuke Niwa. Let the StylePropertySet used for element attribute style have the element as its parent. This is accomplished by adding an m_parentIsElement bit to StylePropertySet and sharing some of the internal logic with inline styles. In the end, this means that CSSParser will now pick up the document's CSSValuePool when parsing properties for attribute styles, which fixes the perf regression from r106756. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::contextStyleSheet): Find contextStyleSheet via the parentElement() when there is one. (WebCore::StylePropertySet::setNeedsStyleRecalc): Always set FullStyleChange for attribute style mutations. We can probably use the same lighter invalidation as inline styles, but that's a topic for another patch. * css/StylePropertySet.h: (WebCore::StylePropertySet::createInline): (WebCore::StylePropertySet::createAttributeStyle): (WebCore::StylePropertySet::parentRuleInternal): (WebCore::StylePropertySet::clearParentRule): (StylePropertySet): (WebCore::StylePropertySet::parentElement): (WebCore::StylePropertySet::clearParentElement): Added m_parentIsElement bit and update assertions as appropriate to not just cover the inline style case. Added a createAttributeStyle() helper to create a StylePropertySet for use as Element::attributeStyle(). * dom/StyledElement.h: * dom/ElementAttributeData.h: * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ensureAttributeStyle): Use StylePropertySet::createAttributeStyle(). * dom/StyledElement.cpp: (WebCore::StyledElement::removeCSSProperties): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): Remove setNeedsStyleRecalc() calls since that is now handled automatically by StylePropertySet's mutation methods. 2012-02-06 Kentaro Hara In AppleWebKit, stop rebuilding IDLs that need not to be rebuilt https://bugs.webkit.org/show_bug.cgi?id=77510 Reviewed by Adam Barth. Currently, if any IDL file is updated, all IDL files are rebuilt. This patch stops rebuilding IDL files which are not modified nor whose supplemental dependencies are not changed. The new build flow is as follows: supplemental.dep : $(ALL_IDLS) perl resolve-supplemental.pl ... %.idl-needs-rebuild : %.idl supplemental.dep perl update-idl-needs-rebuild.pl ... JS%.cpp : %.idl-needs-rebuild perl generate-bindings.pl ... resolve-supplemental.pl generates the following supplemental.dep. The number in () is the last access timestamp of the file. A.idl(1200) B.idl(1000) B-supplemental1.idl(800) B-supplemental2.idl(1200) C.idl(1000) update-idl-needs-rebuild.pl for X.idl touches X.idl-needs-rebuild, if X.idl-needs-rebuild is older than X.idl or the IDL files which are supplementing X.idl. For example, if the timestamps of A.idl-needs-rebuild, B.idl-needs-rebuild and C.idl-needs-rebuild are all 1000, then A.idl-needs-rebuild and B.idl-needs-rebuild will be touched. Even if no IDL files are modified, update-idl-needs-rebuild.pl can run for all IDL files, but generate-bindings.pl won't run. If any IDL file is updated, resolve-supplemental.pl will run once, update-idl-needs-rebuild.pl will run for all IDL files, and generate-bindings.pl will run for the IDL files which are modified or whose dependencies are changed. No tests. I manually confirmed the followings: - Touch Element.idl, then only Element.idl is rebuilt - Touch DOMWindow.idl, then only DOMWindow.idl is rebuilt - Touch DOMWindowWebAudio.idl, then only DOMWindow.idl and DOMWindowWebAudio.idl are rebuilt * DerivedSources.make: Modified the build flow as described above. * bindings/scripts/generate-bindings.pl: Modified to read an IDL file path from .idl-needs-rebuild. * bindings/scripts/update-idl-needs-rebuild.pl: Added. Touches X.idl-needs-rebuild if the X.idl-needs-rebuild is older than X.idl or the IDL files which are supplementing X.idl. (touch): 2012-02-06 Wei James AudioBus need to support stereo->mono down mix in copyFrom sumFrom etc. https://bugs.webkit.org/show_bug.cgi?id=77609 Reviewed by Kenneth Russell. Test: webaudio/stereo2mono-down-mixing.html * platform/audio/AudioBus.cpp: (WebCore): (WebCore::AudioBus::copyFrom): (WebCore::AudioBus::sumFrom): 2012-02-06 Cris Neckar Add RefPtrs for parent and sibling counter nodes https://bugs.webkit.org/show_bug.cgi?id=75212 Reviewed by Adam Barth. Test: fast/css/counters/reparent-table-children-with-counters-crash.html * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): (WebCore::makeCounterNode): (WebCore::updateCounters): 2012-02-06 Kalev Lember [GTK] Add missing pango include dir to fix build https://bugs.webkit.org/show_bug.cgi?id=77832 Reviewed by Martin Robinson. * GNUmakefile.am: Added $(PANGO_CFLAGS) to libWebCore_la_CPPFLAGS. 2012-02-06 Jochen Eisinger Before accessing a frame's script controller in V8 bindings, first check that the frame actually exists https://bugs.webkit.org/show_bug.cgi?id=77370 Reviewed by Adam Barth. I don't have a working reproduction of the crash yet. As soon as I have one, I will add new layout tests. * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/v8/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::restore): * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): remove temporary debug code 2012-02-06 James Robinson Support detaching TextureManager from ManagedTexture https://bugs.webkit.org/show_bug.cgi?id=77655 Reviewed by Kenneth Russell. Initial patch by Alok Priyadarshi. TextureManager now holds references to the textures it manages. This allows TextureManager to inform managed textures when it gets deleted so that the texture that outlive the TextureManager can handle the situation gracefully. Unit test in TextureManagerTest.cpp * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::ManagedTexture): (WebCore::ManagedTexture::~ManagedTexture): (WebCore): (WebCore::ManagedTexture::managerWillDie): (WebCore::ManagedTexture::isValid): (WebCore::ManagedTexture::reserve): (WebCore::ManagedTexture::unreserve): (WebCore::ManagedTexture::steal): (WebCore::ManagedTexture::reset): * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::manager): (ManagedTexture): (WebCore::ManagedTexture::isReserved): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::~TextureManager): (WebCore): (WebCore::TextureManager::setPreferredMemoryLimitBytes): (WebCore::TextureManager::registerTexture): (WebCore::TextureManager::unregisterTexture): * platform/graphics/chromium/TextureManager.h: (WebCore): (TextureManager): 2012-02-06 Anders Carlsson Wheel event handler count not updated when adding handlers to the window https://bugs.webkit.org/show_bug.cgi?id=77895 Reviewed by Dan Bernstein. Test: fast/events/wheelevent-handler-count.html * page/DOMWindow.cpp: (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): Update the wheel event count. * testing/Internals.cpp: (WebCore::Internals::wheelEventHandlerCount): * testing/Internals.h: * testing/Internals.idl: Add wheelEventHandlerCount to window.internals. 2012-02-06 Matthew Delaney toDataURL() uses stale data after putImageData() https://bugs.webkit.org/show_bug.cgi?id=65767 This patch fixes the issue we've encountered of getting back stale copies of the CGContext of accelerated ImageBuffers who have seen putImageData calls but have not been drawn into via the CG API. This issue is fixed by modifying the way we implement putImageData in ImageBufferCG to draw the bits wrapped in a CGImage while the CGContext is in a state where the data will effectively be copied (as is needed for implementing putImageData) instead of directly modifying the bits of the IOSurface. Reviewed by Chris Marrin. Test: fast/canvas/check-stale-putImageData, pixel test to check that the canvas is in fact painted. * platform/graphics/cg/ImageBufferCG.cpp: Implement new way of putting image data. * platform/graphics/ImageBuffer.h: Merged two previously separate put data calls into a single and more sensibly named 'putByteArray', since that's what it does! * WebCore.exp.in: Added new WKSI call for use in ImageBufferCG.cpp * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Using new method name. * html/canvas/CanvasRenderingContext2D.cpp: * platform/graphics/ImageBuffer.cpp: * platform/graphics/ShadowBlur.cpp: * platform/graphics/filters/FEColorMatrix.cpp: * platform/graphics/filters/FEDropShadow.cpp: * platform/graphics/filters/FilterEffect.cpp: Updated other ports' ImageBuffers to use new method. * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/qt/ImageBufferQt.cpp: * platform/graphics/skia/ImageBufferSkia.cpp: * platform/graphics/wince/ImageBufferWinCE.cpp: * platform/graphics/wx/ImageBufferWx.cpp: 2012-02-06 Caio Marcelo de Oliveira Filho Provide more attribute methods in Element https://bugs.webkit.org/show_bug.cgi?id=77800 Reviewed by Ryosuke Niwa. Reduce the clients of NamedNodeMap. This will make easier to change the implementation of our attribute storage. The clients now use Element methods that expose Attribute* accessors. Instead of checking the existence of NamedNodeMap, clients can call hasAttributes() or hasAttributesWithoutUpdate() (that skips updating invalid style or animation svg attributes). If there are attributes, they can be accessed by index via attributeCount() / attributeItem(), as well as by QualifiedName. Those accessors assume there are an attribute storage. * css/SelectorChecker.cpp: (WebCore::anyAttributeMatches): (WebCore::SelectorChecker::checkOneSelector): * css/SelectorChecker.h: (WebCore::SelectorChecker::checkExactAttribute): * dom/DatasetDOMStringMap.cpp: (WebCore::DatasetDOMStringMap::getNames): (WebCore::DatasetDOMStringMap::item): (WebCore::DatasetDOMStringMap::contains): * dom/Document.cpp: (WebCore::Document::importNode): use setAttributesFromElement() instead of manually copying. * dom/Element.h: (Element): (WebCore::Element::hasAttributesWithoutUpdate): (WebCore): (WebCore::Element::attributeCount): (WebCore::Element::attributeItem): (WebCore::Element::getAttributeItem): (WebCore::Element::removeAttribute): * dom/Node.cpp: (WebCore::Node::isDefaultNamespace): (WebCore::Node::lookupNamespaceURI): (WebCore::Node::lookupNamespacePrefix): (WebCore::Node::compareDocumentPosition): * editing/ApplyStyleCommand.cpp: (WebCore::hasNoAttributeOrOnlyStyleAttribute): (WebCore::isEmptyFontTag): * editing/EditingStyle.cpp: (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::highestVisuallyEquivalentDivBelowRoot): * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::appendElement): * editing/markup.cpp: (WebCore::completeURLs): (WebCore::StyledMarkupAccumulator::appendElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parametersForPlugin): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parametersForPlugin): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::isURLAttribute): * html/parser/HTMLFormattingElementList.cpp: (WebCore::attributeCountWithoutUpdate): (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition): Store Attribute* to avoid looking up the right element again by name. * inspector/DOMEditor.cpp: (WebCore::DOMEditor::innerPatchNode): (WebCore::DOMEditor::createDigest): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::performSearch): (WebCore::InspectorDOMAgent::buildArrayForElementAttributes): * page/PageSerializer.cpp: (WebCore::isCharsetSpecifyingNode): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): * xml/XPathFunctions.cpp: (WebCore::XPath::FunLang::evaluate): * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::traversalSort): * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::XMLTreeBuilder): 2012-02-06 Joshua Bell IndexedDB: Raise exception during add/put call if autoIncrement key insertion will fail https://bugs.webkit.org/show_bug.cgi?id=77374 If a put request will use a key generator, try inserting a dummy key during the sync put() call to check if the key insertion will succeed so an exception can be raised early, rather than deferring to the asynchronous task. Reviewed by Tony Chang. Test: storage/indexeddb/keypath-edges.html * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): 2012-02-06 Gustavo Noronha Silva Add a null check for the gdkwindow, that will happen if the window is not mapped. Reviewed by Martin Robinson. * platform/gtk/GtkUtilities.cpp: (WebCore::convertWidgetPointToScreenPoint): 2012-02-06 Eugene Girard IndexedDB createObjectStore should throw if options arg is invalid Added logic to OptionsObject to determine if an invalid object was created. Javascript bindings now detect invalid OptionsObject's and throw TypeError when found. https://bugs.webkit.org/show_bug.cgi?id=58471 Reviewed by Adam Barth. Test: storage/indexeddb/createObjectStore-bad-options.html * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::isObject): * bindings/v8/OptionsObject.h: 2012-02-06 Sheriff Bot Unreviewed, rolling out r106797 and r106806. http://trac.webkit.org/changeset/106797 http://trac.webkit.org/changeset/106806 https://bugs.webkit.org/show_bug.cgi?id=77888 The change is still causing some crashes in webaudio/ on the Chromium bots (Requested by jchaffraix on #webkit). * Modules/intents/IntentRequest.cpp: (WebCore::IntentRequest::create): * bindings/generic/ActiveDOMCallback.cpp: (WebCore::ActiveDOMCallback::ActiveDOMCallback): * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): * dom/ActiveDOMObject.h: (ActiveDOMObject): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): * dom/ScriptExecutionContext.h: (ScriptExecutionContext): * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::create): * fileapi/FileReader.cpp: (WebCore): * fileapi/FileReader.h: (WebCore::FileReader::create): * fileapi/FileWriter.cpp: (WebCore): * fileapi/FileWriter.h: (WebCore::FileWriter::create): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): (WebCore::HTMLAudioElement::createForJSConstructor): * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::create): * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::create): * notifications/Notification.cpp: (WebCore::Notification::create): * notifications/NotificationCenter.cpp: * notifications/NotificationCenter.h: (WebCore::NotificationCenter::create): * page/DOMTimer.cpp: (WebCore::DOMTimer::install): (WebCore::DOMTimer::fired): * page/EventSource.cpp: (WebCore::EventSource::create): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::create): * storage/IDBRequest.cpp: (WebCore::IDBRequest::create): * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::create): * storage/IDBVersionChangeRequest.cpp: (WebCore::IDBVersionChangeRequest::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): * websockets/WebSocket.cpp: * websockets/WebSocket.h: (WebCore::WebSocket::create): * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::create): 2012-02-06 Caio Marcelo de Oliveira Filho Move style related functions from NamedNodeMap to ElementAttributeData https://bugs.webkit.org/show_bug.cgi?id=77879 Reviewed by Ryosuke Niwa. This commit also removes the NamedNodeMap::mappedAttributeCount(), which is a leftover from removal of mapped attributes. * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ensureInlineStyleDecl): (WebCore): (WebCore::ElementAttributeData::destroyInlineStyleDecl): (WebCore::ElementAttributeData::ensureAttributeStyle): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::inlineStyleDecl): (ElementAttributeData): (WebCore::ElementAttributeData::attributeStyle): * dom/NamedNodeMap.cpp: * dom/NamedNodeMap.h: * dom/StyledElement.h: (StyledElement): (WebCore::StyledElement::inlineStyleDecl): (WebCore::StyledElement::ensureInlineStyleDecl): (WebCore::StyledElement::attributeStyle): (WebCore::StyledElement::ensureAttributeStyle): (WebCore::StyledElement::destroyInlineStyleDecl): 2012-02-06 Abhishek Arya Crash in SubframeLoader::loadSubframe. https://bugs.webkit.org/show_bug.cgi?id=77345 Reviewed by Nate Chapin. Mutation event when loading subframe can blow away the main frame. Add a RefPtr to protect against that. Test: fast/frames/subframe-load-crash-main.html * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::loadSubframe): 2012-02-06 ChangSeok Oh Initial implementation of GraphicsContext3DOpenGLES.cpp https://bugs.webkit.org/show_bug.cgi?id=76248 Reviewed by Martin Robinson. Implemented APIs in GraphicsContext3DOpenGLES.cpp according to the GLES spec. roughly. But no way to run these codes right now, because they need an extra port specific implementation to work. I plan to add these extra codes for the GTK port in the next patch. And also this patch doesn't support anti-aliasing yet. Another bug will deal with it. Moved some APIs in GraphicsContext3DOpenGLES.cpp to GraphicsContext3DCommon.cpp. It looks it could be shared between gl and gles. Two helper functions are added to avoid code duplication in GraphicsContext3D. Added a missing period at the end of comment lines. No new tests required. We'll be able to verify this patch by using the existing webgl test cases. * platform/graphics/GraphicsContext3D.h: Add build flag to access stencilBuffer & depthBuffer for gles. (WebCore): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): Helper function extracted from GC3D::reshape to resize regular & multisampled FBOs. (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): Helper function to resolve multisampling. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateAttributes): Add condition to disable antialiasing & packedDepthStencilExtension for GLES. (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): Following APIs looked shareable so that moved into GC3DOpenGLCommon.cpp. (WebCore::GraphicsContext3D::prepareTexture): (WebCore): (WebCore::GraphicsContext3D::readRenderingResults): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::readPixels): Added a missing period at the end of comment line. (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4iv): (WebCore::GraphicsContext3D::uniformMatrix2fv): (WebCore::GraphicsContext3D::uniformMatrix3fv): (WebCore::GraphicsContext3D::uniformMatrix4fv): (WebCore::GraphicsContext3D::texSubImage2D): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): Same with the above. (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): Same with the above. Brief explanation about what the differences are between gl and gles. (WebCore::GraphicsContext3D::renderbufferStorage): Removed codes for converting GLES parameter to GL parameter. (WebCore::GraphicsContext3D::getIntegerv): Removed codes that emulate GLES. (WebCore::GraphicsContext3D::texImage2D): Removed codes for converting GLES parameter to GL parameter. 2012-02-06 Alexander Pavlov Web Inspector: [Meta] Allow emulation of touch events https://bugs.webkit.org/show_bug.cgi?id=77096 Reviewed by Pavel Feldman. This is the inspector part of the change, core part implementation tracked in bug 77105. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (DOMAgentState): (WebCore::InspectorDOMAgent::clearFrontend): (WebCore::InspectorDOMAgent::restore): (WebCore): (WebCore::InspectorDOMAgent::updateTouchEventEmulationInDocuments): (WebCore::InspectorDOMAgent::setTouchEmulationEnabled): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._captureDOM): (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): 2012-02-06 Chris Guan [Blackberry] Non-supported about: operations never stops loading https://bugs.webkit.org/show_bug.cgi?id=76366 Reviewed by Rob Buis. If user typed a non-supported "about:" scheme such as "about:nonsupport", the loadAboutURL() function in NetworkManger should recognize and handle it as an error of invalid url. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::loadAboutURL): (WebCore::NetworkJob::handleAbout): * platform/network/blackberry/NetworkJob.h: (NetworkJob): * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::startJob): 2012-02-06 Alexander Pavlov Web Inspector: Remove unused disabledComputedProperties from methods in StylesSidebarPane https://bugs.webkit.org/show_bug.cgi?id=77876 Reviewed by Pavel Feldman. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._refreshUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._markUsedProperties): (WebInspector.StylesSidebarPane.prototype._refreshSectionsForStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.ComputedStylePropertiesSection): (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited): 2012-02-06 Alexei Filippov Web Inspector: Redesign summary view / retaining tree contents https://bugs.webkit.org/show_bug.cgi?id=77870 Reviewed by Pavel Feldman. 1. Make object IDs less contrast. 2. Put array indices in []. 3. Do not write type if it's just "Object". * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotObjectNode.prototype._emptyData): (WebInspector.HeapSnapshotObjectNode.prototype._enhanceData): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): (WebInspector.HeapSnapshotConstructorNode.prototype.get data): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view .console-formatted-id): (.detailed-heapshot-view td.object-column span.grayed): 2012-02-06 No'am Rosenthal [Texmap][Qt] Avoid an image copy when uploading textures in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=77748 Reviewed by Kenneth Rohde Christiansen. Use QPixmap::buffer() API to get access to the QPixmap's pixels without implicit copies. Instrumentation shows that the deep image copies created from TextureMapperGL are eliminated. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::updateContents): 2012-02-06 Allan Sandfeld Jensen LayoutTest failures on r106797 https://bugs.webkit.org/show_bug.cgi?id=77868 Call suspendIfNeeded from subclass of IDBRequest, IDBVersionChangeRequest. Reviewed by Simon Hausmann. * storage/IDBVersionChangeRequest.cpp: (WebCore::IDBVersionChangeRequest::create): 2012-02-06 No'am Rosenthal [Qt] Implement ImageBuffer::copyImage(ImageBuffer::DontCopyBackingStore) https://bugs.webkit.org/show_bug.cgi?id=77689 Reviewed by Kenneth Rohde Christiansen. Use StillImageQt::createForRendering when using DontCopyBackingStore. Enable DontCopyBackingStore in TextureMapperNode. This removes deep copies resulting from the use of ImageBuffer. Instrumentation shows that deep image copies resulted from ImageBuffer are eliminated. * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::copyImage): * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::renderContent): 2012-02-06 Allan Sandfeld Jensen WebGestureEvent can not encode delta and area. https://bugs.webkit.org/show_bug.cgi?id=77728 Add area field to PlatformGestureEvent. Reviewed by Kenneth Rohde Christiansen. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (WebCore::PlatformGestureEvent::area): 2012-02-06 Charles Wei [BlackBerry]Use extension for a mimetype as the suggested extension if the url file doesn't have an extension. https://bugs.webkit.org/show_bug.cgi?id=76779 Reviewed by Antonio Gomes. No new tests. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendResponseIfNeeded): 2012-02-06 Kentaro Hara Rename [HasIndexGetter], [HasNameGetter] and [HasCustomIndexSetter] IDLs https://bugs.webkit.org/show_bug.cgi?id=77848 Reviewed by Adam Barth. For naming consistency with [CustomGetter] and [CustomSetter], this patch renames the following IDLs: [HasIndexGetter] => [IndexedGetter] (Remove "Has". This IDL is for "indexed" properties in the Web IDL: http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties) [HasCustomIndexSetter] => [CustomIndexedSetter] (Ditto.) [HasNameGetter] => [NamedGetter] (Remove "Has". This IDL is for "named" properties in the Web IDL: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties) No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateImplementationIndexer): (GenerateImplementationNamedPropertyGetter): * bindings/scripts/test/TestEventTarget.idl: No change in run-bindings-tests results. * bindings/scripts/test/TestTypedArray.idl: Ditto. * Modules/gamepad/GamepadList.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSValueList.idl: * css/MediaList.idl: * css/StyleSheetList.idl: * css/WebKitCSSFilterValue.idl: * css/WebKitCSSKeyframesRule.idl: * css/WebKitCSSTransformValue.idl: * dom/ClientRectList.idl: * dom/DOMStringList.idl: * dom/DOMStringMap.idl: * dom/DataTransferItemList.idl: * dom/NamedNodeMap.idl: * dom/NodeList.idl: * dom/TouchList.idl: * fileapi/EntryArray.idl: * fileapi/EntryArraySync.idl: * fileapi/FileList.idl: * html/DOMSettableTokenList.idl: * html/DOMTokenList.idl: * html/HTMLAllCollection.idl: * html/HTMLCollection.idl: * html/HTMLFormElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLPropertiesCollection.idl: * html/HTMLSelectElement.idl: * html/TextTrackCueList.idl: * html/canvas/CanvasPixelArray.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * html/track/TextTrackList.idl: * mediastream/MediaStreamList.idl: * mediastream/MediaStreamTrackList.idl: * page/SpeechInputResultList.idl: * page/WebKitAnimationList.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/Storage.idl: 2012-02-06 Allan Sandfeld Jensen Ensure timers and other active DOM objects do not fire in suspended documents. https://bugs.webkit.org/show_bug.cgi?id=53733 ScriptExecutionContext now remembers it has suspended active DOM objects and suspends all newly installed active DOM objects as well. All create-calls active DOM objects now calls the post constructor method suspendIfNeeded that updates the suspend state. It is post constructor because the suspend/resume functions are virtual and thus can not be called from constructors. Reviewed by Mihai Parparita. Test: fast/events/suspend-timers.html * Modules/intents/IntentRequest.cpp: (WebCore::IntentRequest::create): * bindings/generic/ActiveDOMCallback.cpp: (WebCore::ActiveDOMCallback::ActiveDOMCallback): * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): (WebCore::ActiveDOMObject::suspendIfNeeded): * dom/ActiveDOMObject.h: (WebCore::ActiveDOMObject::suspendIfNeededCalled): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::activeDOMObjectsAreSuspended): * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::create): * fileapi/FileReader.cpp: (WebCore::FileReader::create): * fileapi/FileReader.h: * fileapi/FileWriter.cpp: (WebCore::FileWriter::create): * fileapi/FileWriter.h: * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::create): * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::create): * notifications/Notification.cpp: (WebCore::Notification::create): * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::create): * notifications/NotificationCenter.h: * page/DOMTimer.cpp: (WebCore::DOMTimer::install): (WebCore::DOMTimer::fired): * page/EventSource.cpp: (WebCore::EventSource::create): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::create): * storage/IDBRequest.cpp: (WebCore::IDBRequest::create): * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): * websockets/WebSocket.cpp: (WebCore::WebSocket::create): * websockets/WebSocket.h: * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::create): 2012-02-06 Philippe Normand Adding FFTFrameGStreamer.cpp that I forgot to commit in r106537. That new file was reviewed in https://bugs.webkit.org/show_bug.cgi?id=73545. * platform/audio/gstreamer/FFTFrameGStreamer.cpp: Added. 2012-02-06 Hayato Ito Add element, which is guarded by SHADOW_DOM flag. https://bugs.webkit.org/show_bug.cgi?id=76435 Reviewed by Dimitri Glazkov. Test: fast/dom/shadow/shadow-element.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * html/shadow/HTMLShadowElement.cpp: Added. (WebCore): (WebCore::HTMLShadowElement::HTMLShadowElement): (WebCore::HTMLShadowElement::create): (WebCore::HTMLShadowElement::~HTMLShadowElement): * html/shadow/HTMLShadowElement.h: Added. (WebCore): (HTMLShadowElement): * html/shadow/HTMLShadowElement.idl: Added. 2012-02-06 Joe Thomas https://bugs.webkit.org/show_bug.cgi?id=76995. WebKit fails IETC :indeterminate and input type=radio test. All input types should respect indeterminate property(getter and setter). This is true with other browsers. Indeterminate appearance for radio input type is supported by IOS platform. Webkit need not support indeterminate appearance for radio input type on other platforms. Reviewed by Kent Tamura. Test: fast/forms/indeterminate-input-types.html * html/CheckboxInputType.cpp: (WebCore::CheckboxInputType::supportsIndeterminateAppearance): Checks indeterminate appearance is supported. (WebCore): * html/CheckboxInputType.h: (CheckboxInputType): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setIndeterminate): Removed the check isCheckable(). (WebCore::HTMLInputElement::isIndeterminate): Checks indeterminate appearance is supported. (WebCore): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::supportsIndeterminateAppearance): Checks indeterminate appearance is supported. (WebCore): * html/InputType.h: (InputType): * html/RadioInputType.cpp: (WebCore::RadioInputType::willDispatchClick): Indeterminate related code is moved to IOS specific. (WebCore::RadioInputType::didDispatchClick): Ditto. (WebCore::RadioInputType::supportsIndeterminateAppearance): Checks indeterminate appearance is supported. (WebCore): * html/RadioInputType.h: (RadioInputType): 2012-02-06 Robin Cao [BlackBerry] Remove unused variable in PluginViewBlackBerry https://bugs.webkit.org/show_bug.cgi?id=77847 Reviewed by Kentaro Hara. No changes in behavior, so no new tests. * plugins/blackberry/PluginViewBlackBerry.cpp: (WebCore::PluginView::updatePluginWidget): 2012-02-06 Peter Rybin Web Inspector: Fix CallArgument type in Inspector.json https://bugs.webkit.org/show_bug.cgi?id=77839 Reviewed by Yury Semikhatsky. Protocol description is fixed: field type is changed. No changes to program code are necessary. * inspector/Inspector-0.1.json: * inspector/Inspector-1.0.json: * inspector/Inspector.json: 2012-02-05 Gavin Barraclough Remove JSObject defineGetter/defineSetter lookupGetter/lookupSetter https://bugs.webkit.org/show_bug.cgi?id=77451 Reviewed by Sam Weinig. These can now all be implemented in terms of defineOwnProperty & getPropertyDescriptor. Also remove initializeGetterSetterProperty, since this is equivalent to putDirectAccessor. * bindings/js/JSDOMWindowCustom.cpp: (WebCore): (WebCore::JSDOMWindow::defineOwnProperty): * bindings/js/JSDOMWindowShell.cpp: (WebCore): * bindings/js/JSDOMWindowShell.h: (JSDOMWindowShell): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::defineOwnProperty): (WebCore::JSLocationPrototype::defineOwnProperty): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * page/DOMWindow.idl: * page/Location.idl: 2012-02-06 Carlos Garcia Campos Unreviewed. Fix make distrcheck. * GNUmakefile.am: Fix typo in inspector json file. * GNUmakefile.list.am: Remove non existent file. 2012-02-06 Yury Semikhatsky Unreviewed. Qt minimal compilation fix after r106777. * inspector/InspectorDatabaseAgent.h: added missing #if ENABLED guards. 2012-02-05 Ilya Tikhonovsky Web Inspector: REGRESSION detached dom nodes aren't highlighted https://bugs.webkit.org/show_bug.cgi?id=77829 This functionality was lost when I replaced (Native roots) with (Detached DOM trees) on v8 side. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTreesRoot): (WebInspector.HeapSnapshot.prototype._markDetachedDOMTreeNodes): 2012-02-05 Ilya Tikhonovsky Web Inspector: get rid of artificial heap snapshot nodes from the retaining tree. https://bugs.webkit.org/show_bug.cgi?id=77850 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get isArtificial): (WebInspector.HeapSnapshot.prototype._init): 2012-02-05 Peter Rybin Web Inspector: CodeGeneratorInspector.py: switch domain agents to formal interfaces in BackendDispatcher https://bugs.webkit.org/show_bug.cgi?id=77444 Reviewed by Yury Semikhatsky. All agent code is switched to formal interfaces. Actual agent class names and includes are dropped from InspectorBackendDispatcher.h. * inspector/CodeGeneratorInspector.py: (DomainNameFixes.get_fixed_data): (Generator.go): * inspector/InspectorAgent.h: * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getMatchedStylesForNode): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorConsoleAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightNode): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorFileSystemAgent.h: * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::removeProfile): * inspector/InspectorProfilerAgent.h: (InspectorProfilerAgent): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::setExtraHTTPHeaders): * inspector/InspectorResourceAgent.h: (InspectorResourceAgent): * inspector/InspectorRuntimeAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::start): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::sendMessageToWorker): * inspector/InspectorWorkerAgent.h: (InspectorWorkerAgent): 2012-02-05 Kentaro Hara Rename [TreatNullAs=EmptyString] to [TreatNullAs=NullString], [TreatUndefinedAs=EmptyString] to [TreatUndefinedAs=NullString] https://bugs.webkit.org/show_bug.cgi?id=77611 Reviewed by Adam Barth. While the Web IDL spec requires [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString], the current WebKit treats them as (not an empty string but) a null string. To avoid confusion, this patch renames [TreatNullAs=EmptyString] to [TreatNullAs=NullString], and [TreatUndefinedAs=EmptyString] to [TreatUndefinedAs=NullString]. (Eventually we should fix WebKit so that it uses an empty string and then rename them to [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString].) No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: Added FIXME. (JSValueToNative): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GetNativeTypeFromSignature): * bindings/scripts/test/TestObj.idl: * css/CSSCharsetRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSValue.idl: * css/MediaList.idl: * css/WebKitCSSKeyframesRule.idl: * dom/Attr.idl: * dom/CharacterData.idl: * dom/DOMImplementation.idl: * dom/Document.idl: * dom/Element.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/ProcessingInstruction.idl: * dom/ShadowRoot.idl: * fileapi/Blob.idl: * fileapi/DirectoryEntry.idl: * fileapi/DirectoryEntrySync.idl: * fileapi/Entry.idl: * fileapi/EntrySync.idl: * fileapi/WebKitBlobBuilder.idl: * html/HTMLAnchorElement.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOutputElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLTitleElement.idl: * html/canvas/CanvasRenderingContext2D.idl: * page/Console.idl: * page/DOMWindow.idl: * storage/StorageEvent.idl: * svg/SVGAngle.idl: * svg/SVGElement.idl: * svg/SVGLength.idl: * svg/SVGScriptElement.idl: 2012-02-05 Kentaro Hara Rename [JSCCustom*] IDL to [JSCustom*] IDL https://bugs.webkit.org/show_bug.cgi?id=77844 Reviewed by Adam Barth. Most existing JSC-specific IDLs have "JS" prefix. We can rename [JSCCustom] to [JSCustom], [JSCCustomGetter] to [JSCustomGetter], and [JSCCustomSetter] to [JSCustomSetter]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * css/CSSStyleDeclaration.idl: * html/HTMLDocument.idl: * html/canvas/DataView.idl: * page/DOMWindow.idl: * page/MemoryInfo.idl: * webaudio/ConvolverNode.idl: * webaudio/DOMWindowWebAudio.idl: * webaudio/WaveShaperNode.idl: * websockets/DOMWindowWebSocket.idl: * workers/WorkerContext.idl: 2012-02-05 ChangSeok Oh [EFL] Enable WebGL with glx backend https://bugs.webkit.org/show_bug.cgi?id=77308 Reviewed by Martin Robinson. Implemented WebGL feature for EFL port. The way is very similar to the one of GTK port. No new tests required. We can verify this feature with the existing test cases. * CMakeLists.txt: Revised common files required for WebGL. * PlatformEfl.cmake: Added EFL specific files. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext3D.h: (WebCore): (WebCore::GraphicsContext3D::platformTexture): (GraphicsContext3D): (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): * platform/graphics/efl/DrawingBufferEfl.cpp: Copied from GTK port. (WebCore): (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::~DrawingBuffer): (WebCore::DrawingBuffer::platformColorBuffer): (WebCore::DrawingBuffer::paintCompositedResultsToCanvas): * platform/graphics/efl/GraphicsContext3DEfl.cpp: Almost same with GraphicsContext3DGtk.cpp. (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::isGLES2Compliant): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::createVertexArrayOES): (WebCore::Extensions3DOpenGL::deleteVertexArrayOES): (WebCore::Extensions3DOpenGL::isVertexArrayOES): (WebCore::Extensions3DOpenGL::bindVertexArrayOES): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: 2012-02-05 Abhishek Arya Crash in FormSubmission::create. https://bugs.webkit.org/show_bug.cgi?id=77813 Reviewed by Kent Tamura. Test: fast/forms/form-submission-create-crash.xhtml * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): 2012-02-05 Andreas Kling Remove unused file MappedAttributeEntry.h. Reviewed by Anders Carlsson. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/MappedAttributeEntry.h: Removed. * dom/StyledElement.h: 2012-02-05 Andreas Kling StyledElement: Rename parseMappedAttribute() to parseAttribute(). Reviewed by Anders Carlsson. Rename across the board and decorate subclasses with OVERRIDE. 2012-02-05 Gustavo Noronha Silva Unreviewed syntax fix. * English.lproj/localizedStrings.js: 2012-02-05 Andreas Kling Swedish buildfix. * dom/Document.cpp: (WebCore::wheelEventHandlerCountChanged): 2012-02-05 Anders Carlsson The scrolling tree should be aware of any wheel event handlers on the page https://bugs.webkit.org/show_bug.cgi?id=77840 Reviewed by Andreas Kling. If there are wheel event handlers on the page, any wheel events must be redispatched to the main thread so they can go through the DOM event handling. * dom/Document.cpp: (WebCore::wheelEventHandlerCountChanged): Inform the scrolling coordinator that the wheel event count changed. (WebCore::Document::didAddWheelEventHandler): (WebCore::Document::didRemoveWheelEventHandler): Call wheelEventHandlerCountChanged. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged): Call recomputeWheelEventHandlerCount. (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCount): Update the scrolling tree state. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): Initialize m_hasWheelEventHandlers to false. (WebCore::ScrollingTree::tryToHandleWheelEvent): If m_hasWheelEventHandlers is true, bail. (WebCore::ScrollingTree::commitNewTreeState): Update m_hasWheelEventHandlers. * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::ScrollingTreeState): (WebCore::ScrollingTreeState::setWheelEventHandlerCount): Add getter and setter for the wheel event handler count. 2012-02-05 Andreas Kling Remove mapped vs non-mapped attribute distinction. Reviewed by Antti Koivisto. Removed the isMappedAttribute flag from Attribute as it no longer serves a practical purpose. Previously, StyledElement would generate mapped attributes and plain Element would generate non-mapped ones. The distinction is now made much more clearly by dividing the work between Element's and StyledElement's attributeChanged() methods. The only thing that StyledElement wants to do in addition to what Element does is calling parseMappedAttribute() (which we'll rename in a later patch.) * dom/Attribute.cpp: (WebCore::Attribute::clone): * dom/Attribute.h: (WebCore::Attribute::create): (WebCore::Attribute::Attribute): (Attribute): * dom/Document.cpp: (WebCore::Document::createAttributeNS): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Element.h: (Element): * dom/Node.cpp: (WebCore::Node::dumpStatistics): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::parseMappedAttribute): * dom/StyledElement.h: (StyledElement): * html/parser/HTMLConstructionSite.cpp: (WebCore): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::attributesForIsindexInput): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): * xml/parser/MarkupTokenBase.h: (WebCore::::initializeAttributes): 2012-02-05 Andreas Kling Kill CSSMappedAttributeDeclaration. Reviewed by Antti Koivisto. Replace all use of CSSMappedAttributeDeclaration by StylePropertySet. Moved the setNeedsStyleRecalc() calls from CSSMappedAttributeDeclaration to the add/remove-CSS-property helpers in StyledElement. This removes one step of indirection for attribute styles and reduces the size of elements that have presentational attributes by one pointer. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/CSSMappedAttributeDeclaration.cpp: Removed. * dom/CSSMappedAttributeDeclaration.h: Removed. * dom/DOMAllInOne.cpp: Remove CSSMappedAttributeDeclaration.{cpp,h} * css/CSSParser.h: * css/CSSParser.cpp: (WebCore::parseSimpleLengthValue): Remove CSSParser::parseMappedAttributeValue(), we now use parseValue() directly instead. We lose the benefit of caching new CSSValues in the document's CSSValuePool but this optimization can be added back later. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchAllRules): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::ensureAttributeStyle): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::attributeStyle): (NamedNodeMap): * dom/StyledElement.cpp: (WebCore::StyledElement::removeCSSProperties): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): (WebCore::StyledElement::addCSSLength): (WebCore::StyledElement::addCSSColor): * dom/StyledElement.h: (WebCore): (WebCore::StyledElement::attributeStyle): (WebCore::StyledElement::ensureAttributeStyle): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles): 2012-02-05 Ilya Tikhonovsky Web Inspector: beautify retaining tree items view. https://bugs.webkit.org/show_bug.cgi?id=77810 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): * inspector/front-end/heapProfiler.css: (.cycled-ancessor-node): * inspector/front-end/profilesPanel.css: 2012-02-04 Shawn Singh [chromium] Add support to force full damage in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=76805 Reviewed by James Robinson. Unit test added to CCDamageTrackerTest.cpp. This feature is needed for events that should cause the entire surface to be damaged, even if layers themselves had only partial damage or no damage at all. For example, tab-switching is one such event. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::CCDamageTracker): (WebCore::CCDamageTracker::updateDamageRectForNextFrame): * platform/graphics/chromium/cc/CCDamageTracker.h: (WebCore::CCDamageTracker::forceFullDamageNextUpdate): (CCDamageTracker): 2012-02-04 Anders Carlsson Remove dead code from ScrollingCoordinator https://bugs.webkit.org/show_bug.cgi?id=77821 Reviewed by Sam Weinig. * WebCore.exp.in: * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::ScrollingCoordinator): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::frameViewScrollLayerDidChange): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::updateRootLayerPosition): 2012-02-04 Anders Carlsson The scrolling tree should inform the main scrolling coordinator when the scroll position changes https://bugs.webkit.org/show_bug.cgi?id=77818 Reviewed by Sam Weinig. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): Set the main frame scroll position. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::updateMainFrameScrollPosition): Call ScrollingCoordinator::updateMainFrameScrollPosition on the main thread. * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::scrollBy): Call ScrollingTree::updateMainFrameScrollPosition. 2012-02-04 Andreas Kling Element: Remove unnecessary attributeChanged() argument. Reviewed by Ryosuke Niwa. Remove the 'preserveDecls' argument to Element::attributeChanged() as that is no longer needed after the removal of per-attribute style declarations. Decorated subclass overrides with OVERRIDE since we're touching the lines. Also removed an old inaccurate comment in NamedNodeMap::setAttributes() - calling attributeChanged() is absolutely necessary to initialize element-specific state. * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Element.h: (Element): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * dom/StyledElement.h: (StyledElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): * html/HTMLMediaElement.h: (HTMLMediaElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::attributeChanged): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::attributeChanged): * html/HTMLTrackElement.h: (HTMLTrackElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::attributeChanged): * svg/SVGAnimationElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::attributeChanged): * svg/SVGElement.h: (SVGElement): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::attributeChanged): * svg/animation/SVGSMILElement.h: (SVGSMILElement): 2012-02-04 Ken Buchanan Crash when reparenting children of flexible boxes https://bugs.webkit.org/show_bug.cgi?id=77458 Reviewed by Ojan Vafai. This fixes some regressions I introduced in r106150. RenderBlock:: removeChild needs to be careful about not collapsing anonymous blocks underneath flexible boxes, and also about node ordering when there is an after block. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::collapseAnonymousBoxChild): 2012-02-04 Ryosuke Niwa Debug build fix after r106715. * html/HTMLDetailsElement.cpp: (WebCore::DetailsSummaryElement::create): 2012-02-04 Andreas Kling Unreviewed test fix after r106740. Disable matched declaration caching for elements with attribute style until we can figure out how it's supposed to work. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchAllRules): 2012-02-03 Andreas Kling Kill per-Attribute style declarations. Reviewed by Antti Koivisto. TL;DR summary: Remove the per-Attribute style declarations and replace them by a single style declaration on StyledElement that acts as a secondary inline style. The previous design was conceived in the Age of the Old Web(tm) where the majority of element styling was accomplished via attributes. Nowadays, CSS is a much better tool for this and we should optimize around that instead. StyledElements now have an attributeStyle() which contains all the styling from attributes. parseMappedAttribute() is responsible for adding/removing properties to the attributeStyle as the corresponding attributes come in/out of the element. Each Attribute instance shrinks by one pointer, each element that has attributes grows by one pointer. The styles from individual attributes are no longer shared, so content that uses a lot of repeating styling attributes will see a slight memory regression from this. Future improvements to this could enable sharing the attributeStyle between elements that have the same exact attributes to mitigate some of the damage. There should be no web-facing behavior change from this, but it does break two things: - The Inspector feature for displaying per-attribute styles. To keep things manageable, this patch simply files all the attribute styles together under an anonymous attribute in the Inspector. - The Obj-C DOM binding for Attr::style() has to be kept for compatibility reasons, though it's already deprecated. It will now always return nil, since there's no way to retrieve a live style declaration that's specific to a certain Attr. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchAllRules): (WebCore::CSSStyleSelector::canShareStyleWithElement): * dom/Attr.h: (WebCore): (Attr): (WebCore::Attr::style): * dom/Attribute.cpp: (WebCore::Attribute::clone): * dom/Attribute.h: (WebCore): (WebCore::Attribute::create): (WebCore::Attribute::createMapped): (Attribute): (WebCore::Attribute::Attribute): * dom/CSSMappedAttributeDeclaration.cpp: (WebCore::CSSMappedAttributeDeclaration::~CSSMappedAttributeDeclaration): (WebCore::CSSMappedAttributeDeclaration::setMappedProperty): * dom/CSSMappedAttributeDeclaration.h: (CSSMappedAttributeDeclaration): (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration): * dom/Element.h: (Element): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::ensureAttributeStyle): (WebCore): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::attributeStyle): (NamedNodeMap): * dom/StyledElement.cpp: (WebCore): (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::removeCSSProperties): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): (WebCore::StyledElement::addCSSLength): (WebCore::StyledElement::addCSSColor): * dom/StyledElement.h: (StyledElement): (WebCore::StyledElement::removeCSSProperty): (WebCore::StyledElement::attributeStyle): (WebCore::StyledElement::ensureAttributeStyle): * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::parseMappedAttribute): * html/HTMLBRElement.h: (HTMLBRElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::parseMappedAttribute): * html/HTMLDivElement.h: (HTMLDivElement): * html/HTMLElement.cpp: (WebCore::HTMLElement::applyBorderAttribute): (WebCore::HTMLElement::mapLanguageAttributeToLocale): (WebCore::HTMLElement::parseMappedAttribute): (WebCore::HTMLElement::removeHTMLAlignment): (WebCore): (WebCore::HTMLElement::addHTMLAlignmentToStyledElement): (WebCore::HTMLElement::setContentEditable): * html/HTMLElement.h: (HTMLElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): * html/HTMLEmbedElement.h: (HTMLEmbedElement): * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::parseMappedAttribute): * html/HTMLFontElement.h: (HTMLFontElement): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * html/HTMLFrameSetElement.h: (HTMLFrameSetElement): * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::parseMappedAttribute): * html/HTMLHRElement.h: (HTMLHRElement): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseMappedAttribute): * html/HTMLIFrameElement.h: (HTMLIFrameElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::parseMappedAttribute): * html/HTMLLIElement.h: (HTMLLIElement): * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::parseMappedAttribute): * html/HTMLMarqueeElement.h: (HTMLMarqueeElement): * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::parseMappedAttribute): * html/HTMLOListElement.h: (HTMLOListElement): * html/HTMLOutputElement.cpp: * html/HTMLOutputElement.h: (HTMLOutputElement): * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::parseMappedAttribute): * html/HTMLParagraphElement.h: (HTMLParagraphElement): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::parseMappedAttribute): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * html/HTMLPreElement.cpp: (WebCore::HTMLPreElement::parseMappedAttribute): * html/HTMLPreElement.h: (HTMLPreElement): * html/HTMLTableCaptionElement.cpp: (WebCore::HTMLTableCaptionElement::parseMappedAttribute): * html/HTMLTableCaptionElement.h: (HTMLTableCaptionElement): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::parseMappedAttribute): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::parseMappedAttribute): * html/HTMLTableColElement.h: (HTMLTableColElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseMappedAttribute): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTablePartElement.cpp: (WebCore): (WebCore::HTMLTablePartElement::parseMappedAttribute): * html/HTMLTablePartElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): * html/HTMLUListElement.cpp: (WebCore::HTMLUListElement::parseMappedAttribute): * html/HTMLUListElement.h: (HTMLUListElement): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::parseMappedAttribute): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles): * mathml/MathMLElement.cpp: (WebCore::MathMLElement::parseMappedAttribute): * mathml/MathMLElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::parseMappedAttribute): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::parseMappedAttribute): (WebCore::SVGStyledElement::getPresentationAttribute): * svg/SVGStyledElement.h: (SVGStyledElement): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::parseMappedAttribute): 2012-02-03 Ilya Tikhonovsky Web Inspector: get rid of cycles in retaining tree https://bugs.webkit.org/show_bug.cgi?id=77801 Drive by fix: 'retained by' prefix was removed. Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype._updateHasChildren): (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): * inspector/front-end/profilesPanel.css: (.cycled-ancessor-node): 2012-02-04 Kentaro Hara Add the "JS" prefix to JSC specific IDL attributes https://bugs.webkit.org/show_bug.cgi?id=77693 Reviewed by Darin Adler. Some JSC specific IDLs do not have "JS" prefix, e.g. [CustomIsReachable]. It might be OK since JSC is the main JavaScript engine in WebKit, but distinguishing IDLs widely used in WebKit and IDLs used in JSC only would help people understand the role of IDLs. This patch renames the following JSC specific IDLs: CustomFinalize => JSCustomFinalize CustomIsReachable => JSCustomIsReachable CustomMarkFunction => JSCustomMarkFunction CustomToJS => JSCustomToJS CustomNativeConverter => JSCustomToNativeObject (Note: For naming consistency with [JSCustomToJS]) GenerateIsReachable => JSGenerateIsReachable GenerateToJS => JSGenerateToJS NoStaticTables => JSNoStaticTables WindowEventListener => JSWindowEventListener InlineGetOwnPropertySlot => JSInlineGetOwnPropertySlot DelegatingPrototypePutFunction => JSCustomPrototypePutDelegate No tests. No changes in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (HasCustomToV8Implementation): * bindings/scripts/test/TestTypedArray.idl: No change in run-bindings-tests results. * css/CSSRule.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSValue.idl: * css/MediaList.idl: * css/MediaQueryListListener.idl: * css/StyleMedia.idl: * css/StyleSheet.idl: * css/StyleSheetList.idl: * dom/Attr.idl: * dom/DOMCoreException.idl: * dom/DOMImplementation.idl: * dom/DOMStringMap.idl: * dom/Document.idl: * dom/Element.idl: * dom/ErrorEvent.idl: * dom/Event.idl: * dom/EventException.idl: * dom/EventListener.idl: * dom/MessageChannel.idl: * dom/MessageEvent.idl: * dom/MessagePort.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeIterator.idl: * dom/NodeList.idl: * dom/TreeWalker.idl: * dom/WebKitNamedFlow.idl: * fileapi/Blob.idl: * fileapi/DOMFileSystem.idl: * fileapi/DOMFileSystemSync.idl: * fileapi/DirectoryEntry.idl: * fileapi/DirectoryEntrySync.idl: * fileapi/DirectoryReader.idl: * fileapi/DirectoryReaderSync.idl: * fileapi/Entry.idl: * fileapi/EntryArray.idl: * fileapi/EntryArraySync.idl: * fileapi/EntrySync.idl: * fileapi/File.idl: * fileapi/FileEntry.idl: * fileapi/FileEntrySync.idl: * fileapi/FileError.idl: * fileapi/FileException.idl: * fileapi/FileList.idl: * fileapi/FileReader.idl: * fileapi/FileReaderSync.idl: * fileapi/FileWriter.idl: * fileapi/Metadata.idl: * fileapi/OperationNotAllowedException.idl: * fileapi/WebKitBlobBuilder.idl: * html/DOMFormData.idl: * html/DOMSettableTokenList.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLAllCollection.idl: * html/HTMLBodyElement.idl: * html/HTMLCollection.idl: * html/HTMLFrameSetElement.idl: * html/ImageData.idl: * html/MediaController.idl: * html/TextTrack.idl: * html/TextTrackCue.idl: * html/VoidCallback.idl: * html/canvas/ArrayBuffer.idl: * html/canvas/ArrayBufferView.idl: * html/canvas/CanvasRenderingContext.idl: * html/canvas/DataView.idl: * html/canvas/Float32Array.idl: * html/canvas/Float64Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESTextureFloat.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: * html/canvas/Uint8ClampedArray.idl: * html/canvas/WebGLCompressedTextures.idl: * html/canvas/WebGLDebugRendererInfo.idl: * html/canvas/WebGLDebugShaders.idl: * html/canvas/WebGLLoseContext.idl: * html/canvas/WebGLRenderingContext.idl: * html/track/TextTrackList.idl: * loader/appcache/DOMApplicationCache.idl: * mediastream/LocalMediaStream.idl: * page/BarInfo.idl: * page/Console.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/EventSource.idl: * page/Geolocation.idl: * page/History.idl: * page/Location.idl: * page/Navigator.idl: * page/Screen.idl: * page/WorkerNavigator.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPluginArray.idl: * storage/Database.idl: * storage/DatabaseSync.idl: * storage/IDBAny.idl: * storage/IDBKey.idl: * storage/SQLError.idl: * storage/SQLException.idl: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.idl: * storage/SQLTransaction.idl: * storage/SQLTransactionSync.idl: * storage/Storage.idl: * svg/SVGElementInstance.idl: * svg/SVGPathSeg.idl: * webaudio/AudioBufferCallback.idl: * webaudio/AudioBufferSourceNode.idl: * webaudio/AudioContext.idl: * webaudio/AudioDestinationNode.idl: * webaudio/AudioGain.idl: * webaudio/AudioGainNode.idl: * webaudio/AudioPannerNode.idl: * webaudio/AudioProcessingEvent.idl: * webaudio/BiquadFilterNode.idl: * webaudio/ConvolverNode.idl: * webaudio/DelayNode.idl: * webaudio/DynamicsCompressorNode.idl: * webaudio/HighPass2FilterNode.idl: * webaudio/JavaScriptAudioNode.idl: * webaudio/LowPass2FilterNode.idl: * webaudio/MediaElementAudioSourceNode.idl: * webaudio/OfflineAudioCompletionEvent.idl: * webaudio/RealtimeAnalyserNode.idl: * webaudio/WaveShaperNode.idl: * websockets/CloseEvent.idl: * websockets/WebSocket.idl: * workers/AbstractWorker.idl: * workers/DedicatedWorkerContext.idl: * workers/SharedWorker.idl: * workers/SharedWorkerContext.idl: * workers/Worker.idl: * workers/WorkerContext.idl: * workers/WorkerLocation.idl: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestException.idl: * xml/XMLHttpRequestProgressEvent.idl: * xml/XMLHttpRequestUpload.idl: * xml/XPathResult.idl: 2012-02-04 Emil A Eklund Convert RenderTheme over to new layout abstraction https://bugs.webkit.org/show_bug.cgi?id=77783 Reviewed by Eric Seidel. Change the RenderTheme classes to use the new layout abstraction as a part of the ongoing conversion work. No new tests. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton): (WebCore::RenderTheme::baselinePosition): (WebCore::RenderTheme::adjustRepaintRect): (WebCore::RenderTheme::meterSizeForBounds): * rendering/RenderTheme.h: (RenderTheme): (WebCore::RenderTheme::paintCapsLockIndicator): * rendering/RenderThemeChromiumMac.h: (RenderThemeChromiumMac): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::volumeSliderOffsetFromMuteButton): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::convertToPaintingRect): (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumSkia.h: * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustRepaintRect): (WebCore::RenderThemeMac::inflateRect): (WebCore::RenderThemeMac::setControlSize): (WebCore::RenderThemeMac::paintCapsLockIndicator): (WebCore::RenderThemeMac::paintMenuList): (WebCore::RenderThemeMac::meterSizeForBounds): (WebCore::RenderThemeMac::paintMenuListButtonGradients): (WebCore::RenderThemeMac::setPopupButtonCellState): (WebCore::RenderThemeMac::paintSearchFieldCancelButton): (WebCore::RenderThemeMac::volumeSliderOffsetFromMuteButton): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::baselinePosition): * rendering/RenderThemeSafari.h: (RenderThemeSafari): * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::paintSearchFieldCancelButton): (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration): (WebCore::RenderThemeWin::paintSearchFieldResultsButton): (WebCore::RenderThemeWin::volumeSliderOffsetFromMuteButton): * rendering/RenderThemeWin.h: (RenderThemeWin): 2012-02-04 Stephen White [chromium] Fix multi-second hangs in compositor invalidating large layers https://bugs.webkit.org/show_bug.cgi?id=77774 Reviewed by James Robinson. Correctness covered by existing tests. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): Remove tiles from the tiler when they are invalid (ie., no longer have texture backing). (WebCore::TiledLayerChromium::invalidateRect): Instead of iterating over the tile indices (which may be very large), iterate over the tile hash map instead. 2012-02-04 Swapna P Reviewed by Antonio Gomes. Bug: iframe with scrolling=no incorrectly autoscrollable https://bugs.webkit.org/show_bug.cgi?id=61558 Added check for frame scrolling mode just before applying scroll on frame content in function RenderLayer::scrollRect Testcase: LayoutTests/fast/events/autoscroll-with-non-scrollable-parent.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): 2012-02-03 Tim Horton Canvas-into-canvas drawing should respect backing store scale ratio https://bugs.webkit.org/show_bug.cgi?id=77784 Reviewed by Dan Bernstein. Respect the backing store scale ratio when drawing a canvas into another canvas via ctx.drawImage(canvas, x, y). Previous behavior caused canvas drawing to differ based on the size of the backing store, which is ideally an implementation detail to authors. Also, rename the source canvas arguments to CanvasRenderingContext2D::drawImage to be more clear. No new tests. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): 2012-02-03 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=77782 WebPageProxy::didNewFirstVisuallyNonEmptyLayout should is called more than once on some pages with frames -and corresponding- Reviewed by Sam Weinig. startCountingRelevantRepaintedObjects() should only be called for the main frame. Otherwise, the counter will be re-set inappropriately, and didNewFirstVisuallyNonEmptyLayout may even end up firing more than once. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): 2012-02-03 Benjamin Poulain Reduce the memory allocations of WebCore's cssPropertyName() https://bugs.webkit.org/show_bug.cgi?id=74782 Reviewed by Geoffrey Garen. Add a fast path to avoid the use of the StringBuilder. The string builder is needed for two cases: -CSS prefix (the character after the prefix must be uppercase) -JavaScript CamelCase name for CSS properties We can skip all memory allocations if the property is not in those two cases. We start by testing the string for uppercase characters, and just return the an identical string. This patch create a "fast case" 2.7 times faster than previously. The "slow case" is 2-3% slower due to the additional check at the beginning. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore): (WebCore::containsASCIIUpperChar): (WebCore::cssPropertyName): (WebCore::isCSSPropertyName): 2012-02-03 Anders Carlsson WebKit2 should dispatch wheel events to the new ScrollingTree class https://bugs.webkit.org/show_bug.cgi?id=77795 Reviewed by Andreas Kling. * WebCore.exp.in: Add new symbols needed by WebKit2. * WebCore.xcodeproj/project.pbxproj: Make ScrollingTree.h private so it can be included by WebKit2. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::scrollingTree): * page/scrolling/ScrollingCoordinator.h: Add a scrolling tree getter. 2012-02-03 Dmitry Lomov [Chromium] WebCore::toV8Context crashes if DomWindow::frame() returns null. https://bugs.webkit.org/show_bug.cgi?id=77686. Reviewed by Adam Barth. * bindings/v8/V8Helpers.cpp: (WebCore::toV8Context): 2012-02-03 Anders Carlsson The scrolling tree should be able to handle wheel events https://bugs.webkit.org/show_bug.cgi?id=77794 Reviewed by Andreas Kling. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::tryToHandleWheelEvent): New function. Currently this always returns that it was able to handle the wheel event, but this will change in the future. (WebCore::ScrollingTree::handleWheelEvent): Ask the root node to handle the wheel event. * page/scrolling/ScrollingTreeNode.h: Add a handleWheelEvent pure virtual member function. * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::handleWheelEvent): Call scrollBy for now. Eventually this should use a scroll elasticity controller to handle things like rubber-banding. (WebCore::ScrollingTreeNodeMac::scrollPosition): (WebCore::ScrollingTreeNodeMac::setScrollPosition): Add getters and setters for the scroll position. (WebCore::ScrollingTreeNodeMac::scrollBy): Update the scroll position given the offset. 2012-02-03 Ryosuke Niwa Crash in Node::dispatchSubtreeModifiedEvent https://bugs.webkit.org/show_bug.cgi?id=77449 Reviewed by Alexey Proskuryakov. The bug was caused by appendChild not retaining this pointer. This is normally okay because there's another owner within JSC/V8 binding code that holds onto the node but this isn't the case when nodes are created as a part of setting document.title. Fixed the crash by retaining the pointer as needed. Test: fast/dom/remove-body-during-title-creation.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::appendChild): 2012-02-03 Anders Carlsson Apply changed properties from the updated scrolling tree state https://bugs.webkit.org/show_bug.cgi?id=77792 Reviewed by Andreas Kling. * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::update): Update the tree node properties from the scrolling tree state. * page/scrolling/ScrollingTreeNode.h: (WebCore::ScrollingTreeNode::scrollingTree): (WebCore::ScrollingTreeNode::viewportRect): (WebCore::ScrollingTreeNode::contentsSize): Add getters. * page/scrolling/ScrollingTreeState.h: (WebCore::ScrollingTreeState::changedProperties): New function for accessing the changed properties of the scrolling tree state. * page/scrolling/mac/ScrollingTreeNodeMac.h: * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::update): Update the scroll layer from the scrolling tree if necessary. 2012-02-03 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=77766 Need a WK2 API to filter which subframes go into WebArchives as they are created. Reviewed by Darin Adler. This adds a filter callback object that allows clients to get called back for each subframe that might be added to a WebArchive. API only, No new layout tests. * WebCore.exp.in: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): (WebCore::LegacyWebArchive::createFromSelection): * loader/archive/cf/LegacyWebArchive.h: (FrameFilter): (WebCore:: FrameFilter::~ FrameFilter): (LegacyWebArchive): 2012-02-03 Joshua Bell IndexedDB: Key generators not rolled back if insertion fails or is aborted https://bugs.webkit.org/show_bug.cgi?id=77060 Reviewed by Tony Chang. Test: storage/indexeddb/key-generator.html * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): Add abort task to reset cache. (WebCore::IDBObjectStoreBackendImpl::revertAutoIncrementKeyCache): (WebCore): (WebCore::IDBObjectStoreBackendImpl::putInternal): Reset cache on error. * storage/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-02-03 Tony Chang positive and negative flex values are not being cleared on style changes https://bugs.webkit.org/show_bug.cgi?id=77771 Reviewed by Ojan Vafai. If the width or height was a flex() value, but is no longer a flex value, we weren't clearing the positive and negative flex values in RenderStyle. Test: css3/flexbox/flex-no-flex.html * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLength::applyValue): 2012-02-03 James Robinson [chromium] Defer makeContextCurrent in compositor until first frame https://bugs.webkit.org/show_bug.cgi?id=77269 Reviewed by Kenneth Russell. There are situations where we need to instantiate a compositor, but can't call makeContextCurrent() until some initialization work completes on another thread that we cannot block for. This defers the first makeContextCurrent() call until we need to produce the first frame at which point we know the call can succeed, assuming that the scheduler does the right thing. This is accomplished by splitting up proxy initialization into two pieces: *) initializeContext() which attempts to instantiate a GraphicsContext3D. This can fail if we can't make a context at all, in which case we abort completely and return NULL from CCLayerTreeHost::create(). *) initializeLayerRenderer() which uses the previously-created context to instantiate our compositor objects and grab our renderer capabilities. This can fail if the context is not usable for compositing, which we report to the client as a lost context event. Internally this introduces a new state to the CCLayerTreeHostImpl where it has a context but does not yet have a LayerRendererChromium, which has fairly minimal impact. One other change is that we don't instantiate the TextureManagers until we have the renderer capabilities, but this isn't necessary until we want to start painting so it doesn't have any impact outside of some overly intrustive unit tests. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.h: (ImageLayerChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: * platform/graphics/chromium/TiledLayerChromium.h: (WebCore::TiledLayerChromium::setSampledTexelFormat): (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore): (WebCore::CCLayerTreeHost::beginCommitOnImplThread): (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::finishAllRendering): (WebCore::CCLayerTreeHost::setViewportSize): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): (): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::isContextLost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::initializeContext): (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::layerRendererCapabilities): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::initializeContext): (WebCore): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::layerRendererCapabilities): (WebCore::CCThreadProxy::initializeImplOnImplThread): (WebCore::CCThreadProxy::initializeContextOnImplThread): (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-02-03 James Robinson Unreviewed compile fix for chromium - add commas after entries in list in WebCore.gypi * WebCore.gypi: 2012-02-03 Andreas Kling Unreviewed build fix attempt after r106695. CSSMutableStyleDeclaration was renamed to StylePropertySet. * bindings/scripts/CodeGeneratorCPP.pm: (AddIncludesForType): * bindings/scripts/CodeGeneratorV8.pm: (AddIncludesForType): * bindings/v8/V8DOMWindowShell.cpp: * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8Proxy.cpp: 2012-02-03 Yong Li [BlackBerry] Let userIdleTime() return maximum number instead of 0 as most of other ports do. https://bugs.webkit.org/show_bug.cgi?id=77769 Reviewed by Rob Buis. userIdleTime() should return a big number so it won't block page cache from releasing cached pages. See PageCache::releaseAutoreleasedPagesNowOrReschedule(). No new tests as no visible functional changes. * platform/blackberry/SystemTimeBlackBerry.cpp: (WebCore::userIdleTime): 2012-02-03 Anders Carlsson Commit scrolling tree state changes to the scrolling tree https://bugs.webkit.org/show_bug.cgi?id=77780 Reviewed by Darin Adler. * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::commitTreeState): Send the new scrolling tree state over to the ScrollingTree on the scrolling thread. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): Create a root node. (WebCore::ScrollingTree::commitNewTreeState): Update the root node. * page/scrolling/ScrollingTreeNode.cpp: Copied from Source/WebCore/page/scrolling/ScrollingTree.cpp. * page/scrolling/ScrollingTreeNode.h: Copied from Source/WebCore/page/scrolling/ScrollingTree.cpp. Stub out an abstract ScrollingTreeNode class. * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::frameViewScrollLayerDidChange): Update the scroll layer on the tree state. * page/scrolling/mac/ScrollingTreeNodeMac.h: Copied from Source/WebCore/page/scrolling/ScrollingTree.cpp. * page/scrolling/mac/ScrollingTreeNodeMac.mm: Copied from Source/WebCore/page/scrolling/ScrollingTree.cpp. Stub out the concrete ScrollingTreeNodeMac subclass. 2012-02-03 Antti Koivisto Rename CSSMutableStyleDeclaration.h/.cpp to StylePropertySet.h/.cpp https://bugs.webkit.org/show_bug.cgi?id=77779 Reviewed by Darin Adler. Match the new class name. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSDOMBinding.h: * bindings/scripts/CodeGeneratorJS.pm: (NativeToJSValue): * bindings/scripts/CodeGeneratorObjC.pm: (AddIncludesForType): * css/CSSAllInOne.cpp: * css/CSSComputedStyleDeclaration.cpp: * css/CSSFontFaceRule.cpp: * css/CSSFontFaceRule.h: * css/CSSFontSelector.cpp: * css/CSSMutableStyleDeclaration.cpp: Removed. * css/CSSMutableStyleDeclaration.h: Removed. * css/CSSPageRule.cpp: * css/CSSParser.cpp: * css/CSSStyleRule.cpp: * css/CSSStyleRule.h: * css/StylePropertySet.cpp: Copied from Source/WebCore/css/CSSMutableStyleDeclaration.cpp. * css/StylePropertySet.h: Copied from Source/WebCore/css/CSSMutableStyleDeclaration.h. * css/WebKitCSSKeyframeRule.cpp: * css/WebKitCSSKeyframeRule.h: * css/WebKitCSSKeyframesRule.cpp: * css/WebKitCSSMatrix.cpp: * dom/CSSMappedAttributeDeclaration.h: * dom/ElementAttributeData.h: * dom/StyledElement.cpp: * dom/StyledElement.h: * editing/ApplyStyleCommand.cpp: * editing/DeleteButtonController.cpp: * editing/EditingStyle.cpp: * editing/Editor.cpp: * editing/EditorCommand.cpp: * editing/RemoveCSSPropertyCommand.cpp: * editing/ReplaceSelectionCommand.cpp: * editing/markup.cpp: * html/canvas/CanvasRenderingContext2D.cpp: * html/shadow/MeterShadowElement.cpp: * inspector/InspectorCSSAgent.cpp: * inspector/InspectorDOMAgent.cpp: * page/DragController.cpp: * page/Frame.cpp: * rendering/RenderLayer.cpp: * rendering/RenderTreeAsText.cpp: * svg/SVGFontFaceElement.h: (WebCore): 2012-02-03 Mihnea Ovidenie Crash in RenderFlowThread::setRegionBoxesRegionStyle https://bugs.webkit.org/show_bug.cgi?id=77474 Reviewed by David Hyatt. Flexbox and deprecated flexible box should also compute their region range when they are part of a named flow. Until now, only RenderBlock elements were doing that. Flexbox and deprecated flexible box, while implementing their own layoutBlock method, were not doing that. Tests: fast/regions/flexbox-in-region-crash.html fast/regions/select-in-region-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeInitialRegionRangeForBlock): (WebCore): (WebCore::RenderBlock::computeRegionRangeForBlock): (WebCore::RenderBlock::layoutBlock): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::removeRegionFromThread): (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::paintReplaced): * rendering/RenderRegion.h: (RenderRegion): 2012-02-03 Anders Carlsson Update the tree state after layout and add a way to commit it https://bugs.webkit.org/show_bug.cgi?id=77767 Reviewed by Andreas Kling. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): Call ScrollingCoordinator::frameViewLayoutUpdated if we have a scrolling coordinator. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::ScrollingCoordinator): Initialize m_scrollingTreeStateCommitterTimer. (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): Update the viewport rect and contents size of the frame view. (WebCore::ScrollingCoordinator::scheduleTreeStateCommit): Schedule a tree state commit unless we've already scheduled one or there are no changed properties. (WebCore::ScrollingCoordinator::scrollingTreeStateCommitterTimerFired): Call commitTreeState(). (WebCore::ScrollingCoordinator::commitTreeStateIfNeeded): Commit the tree state unless there are no changed properties. (WebCore::ScrollingCoordinator::commitTreeState): Commit the tree state. We currently don't do anything with the committed state yet. * page/scrolling/ScrollingCoordinator.h: Add new member functions and the timer member variable. * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::commit): Copy the current tree state and restore the changed properties on the original. * page/scrolling/ScrollingTreeState.h: (WebCore::ScrollingTreeState::hasChangedProperties): Return whether there are any changed properties in the tree state. 2012-02-03 Andreas Kling HTMLElement: Clean up tabindex attribute parsing. Reviewed by Antti Koivisto. Remove an unnecessary getAttribute() call when parsing tabindexAttr. * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): 2012-02-03 Anders Carlsson ScrollingTreeState should keep track of the scroll layer https://bugs.webkit.org/show_bug.cgi?id=77762 Reviewed by Andreas Kling. * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingTreeState.h: (ScrollingTreeState): * page/scrolling/mac/ScrollingTreeStateMac.mm: Copied from Source/WebCore/page/scrolling/ScrollingTreeState.h. (WebCore): (WebCore::ScrollingTreeState::platformScrollLayer): (WebCore::ScrollingTreeState::setScrollLayer): 2012-02-03 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=77740 Split CSSMutableStyleDeclaration into separate internal and CSSOM types Reviewed by Andreas Kling and Darin Adler. Split the CSSMutableStyleDeclaration into an internal type (StylePropertySet) and a CSSOM implementation type (PropertySetCSSStyleDeclaration). To keep things somewhat manageable, this patch does NOT - rename or add any files (so files names won't match types) - rename fields, methods or variables to match new type names (like CSSStyleRule::declaration() -> CSSStyleRule::propertySet()) - try to realize any memory or performance gains (StylePropertySet loses the vptr but gains PropertySetCSSStyleDeclaration*) * WebCore.exp.in: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copy): (WebCore::CSSComputedStyleDeclaration::makeMutable): (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSComputedStyleDeclaration.h: (WebCore): (CSSComputedStyleDeclaration): * css/CSSFontFaceRule.h: (WebCore::CSSFontFaceRule::style): (WebCore::CSSFontFaceRule::declaration): (WebCore::CSSFontFaceRule::setDeclaration): (CSSFontFaceRule): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSMutableStyleDeclaration.cpp: (PropertySetCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::create): (WebCore::PropertySetCSSStyleDeclaration::PropertySetCSSStyleDeclaration): (WebCore): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::~StylePropertySet): (WebCore::StylePropertySet::deref): (WebCore::StylePropertySet::contextStyleSheet): (WebCore::StylePropertySet::copyPropertiesFrom): (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::borderSpacingValue): (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit): (WebCore::StylePropertySet::fontValue): (WebCore::StylePropertySet::get4Values): (WebCore::StylePropertySet::getLayeredShorthandValue): (WebCore::StylePropertySet::getShorthandValue): (WebCore::StylePropertySet::getCommonValue): (WebCore::StylePropertySet::getPropertyCSSValue): (WebCore::StylePropertySet::removeShorthandProperty): (WebCore::StylePropertySet::removeProperty): (WebCore::StylePropertySet::setNeedsStyleRecalc): (WebCore::StylePropertySet::propertyIsImportant): (WebCore::StylePropertySet::getPropertyShorthand): (WebCore::StylePropertySet::isPropertyImplicit): (WebCore::StylePropertySet::setProperty): (WebCore::StylePropertySet::parseDeclaration): (WebCore::StylePropertySet::addParsedProperties): (WebCore::StylePropertySet::addParsedProperty): (WebCore::StylePropertySet::asText): (WebCore::StylePropertySet::merge): (WebCore::StylePropertySet::addSubresourceStyleURLs): (WebCore::StylePropertySet::copyBlockProperties): (WebCore::StylePropertySet::removeBlockProperties): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::findPropertyWithId): (WebCore::StylePropertySet::propertyMatches): (WebCore::StylePropertySet::removeEquivalentProperties): (WebCore::StylePropertySet::copy): (WebCore::StylePropertySet::copyPropertiesInSet): (WebCore::StylePropertySet::ensureCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::parentRule): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::parentStyleSheet): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): * css/CSSMutableStyleDeclaration.h: (WebCore): (StylePropertySet): (WebCore::StylePropertySet::create): (WebCore::StylePropertySet::createInline): * css/CSSPageRule.h: (WebCore): * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::parseSimpleLengthValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseDeclaration): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createKeyframeRule): * css/CSSParser.h: (WebCore): (CSSParser): * css/CSSStyleDeclaration.h: (WebCore): (CSSStyleDeclaration): * css/CSSStyleRule.h: (WebCore::CSSStyleRule::style): (WebCore::CSSStyleRule::setDeclaration): (WebCore::CSSStyleRule::declaration): (CSSStyleRule): * css/CSSStyleSelector.cpp: (WebCore::leftToRightDeclaration): (WebCore::rightToLeftDeclaration): (WebCore::CSSStyleSelector::addMatchedDeclaration): (WebCore::CSSStyleSelector::collectMatchingRulesForList): (WebCore::CSSStyleSelector::matchAllRules): (WebCore::CSSStyleSelector::styleForKeyframe): (WebCore::isInsideRegionRule): (WebCore::CSSStyleSelector::applyDeclaration): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::matchPageRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): (MatchedStyleDeclaration): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::setDeclaration): * css/WebKitCSSKeyframeRule.h: (WebCore::WebKitCSSKeyframeRule::style): (WebCore::WebKitCSSKeyframeRule::declaration): (WebKitCSSKeyframeRule): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): * dom/Attr.h: (WebCore::Attr::style): * dom/Attribute.h: (WebCore::Attribute::decl): * dom/CSSMappedAttributeDeclaration.h: (WebCore::CSSMappedAttributeDeclaration::declaration): (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration): (CSSMappedAttributeDeclaration): * dom/Document.cpp: (WebCore::Document::createCSSStyleDeclaration): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::ensureInlineStyleDecl): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::inlineStyleDecl): (NamedNodeMap): * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): (WebCore::StyledElement::copyNonAttributeProperties): (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (WebCore::StyledElement::additionalAttributeStyle): (WebCore::StyledElement::inlineStyleDecl): (WebCore::StyledElement::ensureInlineStyleDecl): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): (WebCore::ApplyStyleCommand::removeCSSStyle): (WebCore::ApplyStyleCommand::addBlockStyle): (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): * editing/EditingStyle.cpp: (WebCore::copyEditingProperties): (WebCore::editingStyleFromComputedStyle): (WebCore): (WebCore::HTMLElementEquivalent::propertyExistsInStyle): (HTMLElementEquivalent): (WebCore::HTMLElementEquivalent::valueIsPresentInStyle): (HTMLTextDecorationEquivalent): (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): (HTMLAttributeEquivalent): (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle): (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue): (WebCore::EditingStyle::EditingStyle): (WebCore::getRGBAFontColor): (WebCore::EditingStyle::setProperty): (WebCore::EditingStyle::setStyle): (WebCore::EditingStyle::overrideWithStyle): (WebCore::EditingStyle::extractAndRemoveTextDirection): (WebCore::EditingStyle::removeStyleAddedByNode): (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode): (WebCore::EditingStyle::triStateOfStyle): (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent): (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): (WebCore::EditingStyle::mergeStyle): (WebCore::styleFromMatchedRulesForElement): (WebCore::EditingStyle::mergeStyleFromRules): (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): (WebCore::removePropertiesInStyle): (WebCore::EditingStyle::removeStyleFromRulesAndContext): (WebCore::EditingStyle::removePropertiesInElementDefaultStyle): (WebCore::EditingStyle::forceInline): (WebCore::reconcileTextDecorationProperties): (WebCore::StyleChange::StyleChange): (WebCore::setTextDecorationProperty): (WebCore::StyleChange::extractTextStyles): (WebCore::diffTextDecorations): (WebCore::fontWeightIsBold): (WebCore::getTextAlignment): (WebCore::getPropertiesNotIn): (WebCore::getIdentifierValue): (WebCore::isTransparentColorValue): (WebCore::hasTransparentBackgroundColor): * editing/EditingStyle.h: (WebCore): (WebCore::EditingStyle::create): (EditingStyle): (WebCore::EditingStyle::style): (StyleChange): * editing/Editor.cpp: (WebCore::Editor::setBaseWritingDirection): (WebCore::Editor::applyEditingStyleToElement): * editing/EditorCommand.cpp: (WebCore::applyCommandToFrame): (WebCore::executeApplyStyle): (WebCore::executeToggleStyleInList): (WebCore::executeApplyParagraphStyle): (WebCore::executeMakeTextWritingDirectionLeftToRight): (WebCore::executeMakeTextWritingDirectionNatural): (WebCore::executeMakeTextWritingDirectionRightToLeft): * editing/FrameSelection.cpp: (WebCore::FrameSelection::copyTypingStyle): * editing/FrameSelection.h: (WebCore): * editing/RemoveCSSPropertyCommand.cpp: (WebCore::RemoveCSSPropertyCommand::doApply): (WebCore::RemoveCSSPropertyCommand::doUnapply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * editing/ReplaceSelectionCommand.h: (WebCore): * editing/markup.cpp: (WebCore): (StyledMarkupAccumulator): (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): (WebCore::propertyMissingOrEqualToNone): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::additionalAttributeStyle): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::additionalAttributeStyle): * html/HTMLTableColElement.h: (HTMLTableColElement): * html/HTMLTableElement.cpp: (WebCore::leakBorderStyle): (WebCore::HTMLTableElement::additionalAttributeStyle): (WebCore::HTMLTableElement::createSharedCellStyle): (WebCore::HTMLTableElement::additionalCellStyle): (WebCore::leakGroupBorderStyle): (WebCore::HTMLTableElement::additionalGroupStyle): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::additionalAttributeStyle): * html/HTMLTableSectionElement.h: (HTMLTableSectionElement): * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setFont): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::setPosition): (WebCore::MediaControlPanelElement::resetPosition): (WebCore::MediaControlPanelElement::makeOpaque): (WebCore::MediaControlPanelElement::makeTransparent): * html/shadow/SliderThumbElement.cpp: (WebCore::TrackLimiterElement::create): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): * page/PageSerializer.cpp: (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): * page/PageSerializer.h: (WebCore): (PageSerializer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): * rendering/RenderTreeAsText.cpp: (WebCore::isEmptyOrUnstyledAppleStyleSpan): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::SVGFontFaceElement): 2012-02-03 Jochen Eisinger Remove unneccesary canExecuteScripts check from v8 bindings, and correctly indeicate when we're about to execute a script https://bugs.webkit.org/show_bug.cgi?id=76704 Reviewed by Adam Barth. Test: http/tests/security/isolatedWorld/sandboxed-iframe.html * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/v8/V8EventListener.cpp: (WebCore::V8EventListener::callListenerFunction): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::callListenerFunction): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::handleOutOfMemory): (WebCore::toV8Context): 2012-02-03 Anders Carlsson Add ScrollingTreeState class https://bugs.webkit.org/show_bug.cgi?id=77756 Reviewed by Andreas Kling. Add a new ScrollingTreeState whose intent is to be a data container for the current scrolling tree state. the ScrollingCoordinator class will update it and periodically send over the new state to the ScrollingTree object on the scrolling thread. * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::ScrollingCoordinator): * page/scrolling/ScrollingCoordinator.h: (WebCore): (ScrollingCoordinator): * page/scrolling/ScrollingTreeState.cpp: Added. (WebCore): (WebCore::ScrollingTreeState::create): (WebCore::ScrollingTreeState::ScrollingTreeState): (WebCore::ScrollingTreeState::~ScrollingTreeState): (WebCore::ScrollingTreeState::setViewportRect): (WebCore::ScrollingTreeState::setContentsSize): * page/scrolling/ScrollingTreeState.h: Added. (WebCore): (ScrollingTreeState): (WebCore::ScrollingTreeState::viewportRect): (WebCore::ScrollingTreeState::contentsSize): 2012-02-03 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=77691 Fix PlatformScreen layering violation and PlatformScreenMac's incorrect use of device scale Reviewed by Andy Estes. Make screenAvailableRect() and screenRect() take a Widget again instead of a FrameView since taking a FrameView is a layering violation. * WebCore.exp.in: * platform/PlatformScreen.h: (WebCore): * platform/blackberry/PlatformScreenBlackBerry.cpp: (WebCore::screenAvailableRect): (WebCore::screenRect): * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/qt/PlatformScreenQt.cpp: (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/win/PlatformScreenWin.cpp: (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/wx/ScreenWx.cpp: (WebCore::screenRect): (WebCore::screenAvailableRect): It's wrong for the deviceScaleFactor to be taken into consideration here at all. * platform/mac/PlatformScreenMac.mm: (WebCore::screenRect): (WebCore::screenAvailableRect): (WebCore::toUserSpace): (WebCore::toDeviceSpace): 2012-02-03 Dan Bernstein Floating image leaves hole in previous column when wrapped to next column https://bugs.webkit.org/show_bug.cgi?id=77694 Reviewed by Darin Adler. Tests: fast/dynamic/float-moved-downwards-for-pagination-expected.html fast/dynamic/float-moved-downwards-for-pagination.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloats): When determining which lines to dirty, also check for changes to the top edge of the float, which can happen when float gets pushed down by a pagination strut. 2012-02-03 Alexis Menard REGRESSION (r105401-105403): Blue flash on css border transition https://bugs.webkit.org/show_bug.cgi?id=77491 Reviewed by Simon Fraser. The new blend function added with r105403 takes unsigned as parameters therefore we have to be careful to not overflow in case the to is less than from (animating from 400 to 0 for example). Test: animations/animation-border-overflow.html * platform/animation/AnimationUtilities.h: (WebCore::blend): 2012-02-03 Justin Novosad [Chromium] ImageBufferSkia: remove unnecessary overload of flush in AcceleratedDeviceContext https://bugs.webkit.org/show_bug.cgi?id=77741 Reviewed by Stephen White. Removing dead code. * platform/graphics/skia/ImageBufferSkia.cpp: (AcceleratedDeviceContext): 2012-02-03 Balazs Kelemen Speculative unreviewed build fix for Qt-Windows after http://trac.webkit.org/changeset/106659. * platform/graphics/texmap/TextureMapper.h: (WebCore::TextureMapper::platformCreateAccelerated): 2012-02-03 Sheriff Bot Unreviewed, rolling out r106654. http://trac.webkit.org/changeset/106654 https://bugs.webkit.org/show_bug.cgi?id=77742 triggers asserts on mac, win, gtk, qt debug bots (Requested by philn-tp on #webkit). * Modules/intents/IntentRequest.cpp: (WebCore::IntentRequest::create): * bindings/generic/ActiveDOMCallback.cpp: (WebCore::ActiveDOMCallback::ActiveDOMCallback): * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): * dom/ActiveDOMObject.h: (ActiveDOMObject): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): * dom/ScriptExecutionContext.h: (ScriptExecutionContext): * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::create): * fileapi/FileReader.cpp: (WebCore): * fileapi/FileReader.h: (WebCore::FileReader::create): * fileapi/FileWriter.cpp: (WebCore): * fileapi/FileWriter.h: (WebCore::FileWriter::create): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::create): * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::create): * notifications/Notification.cpp: (WebCore::Notification::create): * notifications/NotificationCenter.cpp: * notifications/NotificationCenter.h: (WebCore::NotificationCenter::create): * page/DOMTimer.cpp: (WebCore::DOMTimer::install): (WebCore::DOMTimer::fired): * page/EventSource.cpp: (WebCore::EventSource::create): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::create): * storage/IDBRequest.cpp: (WebCore::IDBRequest::create): * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): * websockets/WebSocket.cpp: * websockets/WebSocket.h: (WebCore::WebSocket::create): * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::create): 2012-02-03 Kentaro Hara Add the "V8" prefix to V8 specific IDL attributes https://bugs.webkit.org/show_bug.cgi?id=77713 Reviewed by Adam Barth. This patch adds the "V8" prefix to a V8 specific IDL attribute: [EnabledAtRuntime] => [V8EnabledAtRuntime] No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateImplementation): (GetRuntimeEnableFunctionName): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: Updated the run-bindings-tests results. (WebCore::ConfigureV8TestObjTemplate): * Modules/gamepad/NavigatorGamepad.idl: * dom/Clipboard.idl: * dom/Document.idl: * dom/Element.idl: * dom/MouseEvent.idl: * dom/ShadowRoot.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLTrackElement.idl: * html/TextTrack.idl: * html/TextTrackCue.idl: * html/TextTrackCueList.idl: * html/shadow/HTMLContentElement.idl: * html/track/TextTrackList.idl: * html/track/TrackEvent.idl: * page/DOMWindow.idl: * page/History.idl: * page/Navigator.idl: * storage/DOMWindowSQLDatabase.idl: * webaudio/DOMWindowWebAudio.idl: * websockets/DOMWindowWebSocket.idl: * workers/WorkerContext.idl: * xml/XMLHttpRequest.idl: 2012-02-03 Alexei Filippov Web Inspector: Retained size for classes is too conservative in heap profiler https://bugs.webkit.org/show_bug.cgi?id=77726 Reviewed by Yury Semikhatsky. Makes retained size of all objects of particular class show correct value in Summary view of heap profiler. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotConstructorNode.prototype.get data): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._buildAggregates.forDominatedNodes): 2012-02-02 Alexander Pavlov Web Inspector: Introduce "Copy XPath" popup menu item for DOM elements https://bugs.webkit.org/show_bug.cgi?id=77619 Reviewed by Vsevolod Vlasov. XPath is optimized whenever an element has the "id" attribute. Test: inspector/elements/node-xpath.xhtml * English.lproj/localizedStrings.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.XPathStep): (WebInspector.DOMNode.XPathStep.prototype.toString): (WebInspector.DOMNode.prototype.copyXPath): (WebInspector.DOMNode.prototype.isXMLNode): (WebInspector.DOMNode.prototype.xPath): (WebInspector.DOMNode.prototype._xPathValue): (WebInspector.DOMNode.prototype._xPathIndex): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateNodeContextMenu): 2012-02-03 Dana Jansens [Chromium] Use the current clip when marking paints as opaque https://bugs.webkit.org/show_bug.cgi?id=77582 Reviewed by Stephen White. New unit test in PlatformContextSkiaTest.cpp * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::OpaqueRegionSkia::markRectAsOpaque): * platform/graphics/skia/PlatformContextSkia.h: (WebCore::PlatformContextSkia::canvas): 2012-02-03 Yury Semikhatsky inspector/debugger/pause-in-inline-script.html asserts in chromium debug https://bugs.webkit.org/show_bug.cgi?id=77663 Make ASSERT in MainResourceLoader not fail if debugger hits breakpoint in the main resource inline script. Reviewed by Pavel Feldman. Test: inspector/debugger/pause-in-inline-script.html * bindings/js/ScriptDebugServer.h: (WebCore::ScriptDebugServer::isPaused): (ScriptDebugServer): * bindings/v8/ScriptDebugServer.h: (ScriptDebugServer): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didClearMainFrameWindowObject): (WebCore): (WebCore::InspectorDebuggerAgent::isPaused): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::isDebuggerPausedImpl): (WebCore): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::isDebuggerPaused): (WebCore): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didFinishLoading): 2012-02-03 Kentaro Hara Fix typo https://bugs.webkit.org/show_bug.cgi?id=77708 Reviewed by Adam Roben. This patch fixes typos: [ObjCLegacyUnamedParameters] => [ObjCLegacyUnnamedParameters] No tests. No change in behavior. * css/CSSMediaRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * dom/CharacterData.idl: * dom/DOMImplementation.idl: * dom/Document.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventTarget.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/Range.idl: * dom/UIEvent.idl: * html/HTMLSelectElement.idl: * xml/XPathExpression.idl: 2012-02-03 No'am Rosenthal [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible. https://bugs.webkit.org/show_bug.cgi?id=77148 Reviewed by Martin Robinson. Removed TextureMapperQt, and instead created a TextureMapperImageBuffer class, which responds to an "Software" mode of TextureMapper, instead of creating subclasses of TextureMapper directly. This allows using the software fallback of TextureMapper by any sort. To make the ImageBuffer backend easier, content updates to BitmapTexture can now use either an image, or a raw data pointer. The raw data pointer is provided for performance reasons, as converting data to/from Image references in Qt generates unnecessary deep copies of the image data. Also, functions that use TransformationMatrix were added to GraphicsContext, to allow for 3D transforms in cross platform code. After this patch everything renders the same. An additional bug report was created to allow ImageBuffer shallow image copies: https://bugs.webkit.org/show_bug.cgi?id=77689 Covered extensively by existing tests, no behavioral changes. * Target.pri: * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContext.h: (WebCore): (GraphicsContext): * platform/graphics/cairo/TextureMapperCairo.cpp: * platform/graphics/opengl/TextureMapperGL.cpp: (TextureMapperGLData): (BitmapTextureGL): (WebCore::BitmapTextureGL::BitmapTextureGL): (WebCore::TextureMapperGL::beginPainting): (WebCore::BitmapTextureGL::reset): (WebCore): (WebCore::swizzleBGRAToRGBA): (WebCore::BitmapTextureGL::updateContents): (WebCore::BitmapTextureGL::destroy): (WebCore::TextureMapperGL::bindSurface): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/opengl/TextureMapperGL.h: (TextureMapperGL): (WebCore::TextureMapperGL::accelerationMode): (WebCore): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore): (WebCore::GraphicsContext::get3DTransform): (WebCore::GraphicsContext::concat3DTransform): (WebCore::GraphicsContext::set3DTransform): * platform/graphics/qt/TextureMapperQt.cpp: Removed. * platform/graphics/qt/TextureMapperQt.h: Removed. * platform/graphics/texmap/TextureMapper.cpp: (WebCore): (BitmapTextureImageBuffer): (TextureMapperImageBuffer): * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::BitmapTexture): (BitmapTexture): (WebCore::BitmapTexture::bpp): (WebCore::BitmapTexture::isOpaque): (WebCore::TextureMapper::setGraphicsContext): (WebCore::TextureMapper::graphicsContext): (TextureMapper): (WebCore::TextureMapper::TextureMapper): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::setContentsTileBackBuffer): * platform/graphics/texmap/TextureMapperNode.h: (TextureMapperNode): 2012-01-27 Yury Semikhatsky Web Inspector: console evaluation doesn't work on breakpoint in pages with CSP https://bugs.webkit.org/show_bug.cgi?id=77203 Inspector console evaluation now works when debugger is paused in a page with content-security-policy prohibiting evals. Reviewed by Pavel Feldman. Test: inspector/debugger/eval-on-pause-blocked.html * bindings/js/JSInjectedScriptHostCustom.cpp: * bindings/js/ScriptState.cpp: (WebCore::evalEnabled): (WebCore): (WebCore::setEvalEnabled): * bindings/js/ScriptState.h: (WebCore): * bindings/v8/ScriptObject.h: (WebCore::ScriptObject::ScriptObject): * bindings/v8/ScriptState.cpp: (WebCore::evalEnabled): (WebCore): (WebCore::setEvalEnabled): * bindings/v8/ScriptState.h: (WebCore): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: * inspector/InjectedScript.cpp: (WebCore::InjectedScript::makeCall): * inspector/InjectedScriptHost.idl: * inspector/InjectedScriptSource.js: (.): 2012-02-03 Rob Buis Upstream targetType usage on ResourceRequest for BlackBerry port https://bugs.webkit.org/show_bug.cgi?id=77649 Reviewed by Antonio Gomes. Upstream bits that make use of targetType enum. * loader/PingLoader.cpp: (WebCore::PingLoader::loadImage): (WebCore::PingLoader::sendPing): (WebCore::PingLoader::reportContentSecurityPolicyViolation): * platform/network/blackberry/ResourceRequest.h: (ResourceRequest): (WebCore::ResourceRequest::targetType): (WebCore::ResourceRequest::setTargetType): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2012-02-03 Allan Sandfeld Jensen Ensure timers and other active DOM objects do not fire in suspended documents. https://bugs.webkit.org/show_bug.cgi?id=53733 ScriptExecutionContext now remembers it has suspended active DOM objects and suspends all newly installed active DOM objects as well. All create-calls active DOM objects now calls the post constructor method suspendIfNeeded that updates the suspend state. It is post constructor because the suspend/resume functions are virtual and thus can not be called from constructors. Reviewed by Mihai Parparita. Test: fast/events/suspend-timers.html * Modules/intents/IntentRequest.cpp: (WebCore::IntentRequest::create): * bindings/generic/ActiveDOMCallback.cpp: (WebCore::ActiveDOMCallback::ActiveDOMCallback): * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): (WebCore::ActiveDOMObject::suspendIfNeeded): * dom/ActiveDOMObject.h: (WebCore::ActiveDOMObject::suspendIfNeededCalled): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::activeDOMObjectsAreSuspended): * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::create): * fileapi/FileReader.cpp: (WebCore::FileReader::create): * fileapi/FileReader.h: * fileapi/FileWriter.cpp: (WebCore::FileWriter::create): * fileapi/FileWriter.h: * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::create): * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::create): * notifications/Notification.cpp: (WebCore::Notification::create): * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::create): * notifications/NotificationCenter.h: * page/DOMTimer.cpp: (WebCore::DOMTimer::install): (WebCore::DOMTimer::fired): * page/EventSource.cpp: (WebCore::EventSource::create): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::create): * storage/IDBRequest.cpp: (WebCore::IDBRequest::create): * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::create): * websockets/WebSocket.cpp: (WebCore::WebSocket::create): * websockets/WebSocket.h: * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::create): 2012-02-03 Allan Sandfeld Jensen Do not ASSERT on TouchStationary TouchPoint state. https://bugs.webkit.org/show_bug.cgi?id=77620 Reviewed by Kenneth Rohde Christiansen. * page/EventHandler.cpp: (WebCore::eventNameForTouchPointState): Explicitly show that TouchStationary is asserted. (WebCore::EventHandler::handleTouchEvent): Remove TouchStationary from ASSERT. The value of HitTestRequest is restored to the value it should have if hittested, but is not used. 2012-02-03 Kentaro Hara Add the "ObjC" prefix to ObjC specific IDL attributes https://bugs.webkit.org/show_bug.cgi?id=77708 Reviewed by Adam Barth. This patch adds the "ObjC" prefix to ObjC specific IDL attributes, as follows: [Polymorphic] => [ObjCPolymorphic] [OldStyleObjC] => [ObjCLegacyUnamedParameters] [UsesView] => [ObjCUseDefaultView] (Note: Renamed for clarification) No tests. No changes in behavior. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateHeader): (GenerateImplementation): * css/CSSMediaRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSValue.idl: * css/StyleSheet.idl: * dom/CharacterData.idl: * dom/DOMImplementation.idl: * dom/Document.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventTarget.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/Range.idl: * dom/UIEvent.idl: * html/HTMLCollection.idl: * html/HTMLSelectElement.idl: * svg/SVGPathSeg.idl: * xml/XPathExpression.idl: 2012-02-03 MORITA Hajime TypingCommand should be prepared against detached document. https://bugs.webkit.org/show_bug.cgi?id=77216 Reviewed by Ryosuke Niwa. Added null checks for document()->frame(). No new tests. Just tighten guards for possible codepaths. * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): (WebCore::TypingCommand::typingAddedToOpenCommand): (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): 2012-02-03 Kentaro Hara Rename [DontEnum] IDL to [NotEnumerable] IDL https://bugs.webkit.org/show_bug.cgi?id=77710 Reviewed by Adam Barth. [DontEnum] is a negation of [[Enumerable]] in the ECMAScript spec (8.6.1 of http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf). This patch renames [DontEnum] to [NotEnumerable]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributesHashTable): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateSingleBatchedAttribute): (GenerateImplementation): * css/WebKitCSSMatrix.idl: * dom/DOMCoreException.idl: * dom/Document.idl: * dom/Element.idl: * dom/EventException.idl: * dom/RangeException.idl: * fileapi/FileException.idl: * fileapi/OperationNotAllowedException.idl: * html/DOMTokenList.idl: * html/HTMLAnchorElement.idl: * html/HTMLBodyElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLInputElement.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/Location.idl: * storage/IDBDatabaseException.idl: * storage/Storage.idl: * svg/SVGElementInstance.idl: * svg/SVGException.idl: * workers/WorkerLocation.idl: * xml/XMLHttpRequestException.idl: * xml/XPathException.idl: 2012-02-03 Kentaro Hara Rename [InitializedByConstructor] IDL to [InitializedByEventConstructor] IDL https://bugs.webkit.org/show_bug.cgi?id=77711 Reviewed by Adam Barth. [InitializedByConstructor] can be used only when [ConstructorTemplate=Event] is specified on the interface. This patch renames [InitializedByConstructor] to [InitializedByEventConstructor] for clarification. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: (GenerateEventConstructorCallback): * bindings/scripts/test/TestEventConstructor.idl: * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated the run-bindings-tests results. (WebCore): * dom/BeforeLoadEvent.idl: * dom/CustomEvent.idl: * dom/ErrorEvent.idl: * dom/Event.idl: * dom/HashChangeEvent.idl: * dom/MessageEvent.idl: * dom/OverflowEvent.idl: * dom/PageTransitionEvent.idl: * dom/PopStateEvent.idl: * dom/ProgressEvent.idl: * dom/WebKitAnimationEvent.idl: * dom/WebKitTransitionEvent.idl: * html/canvas/WebGLContextEvent.idl: * html/track/TrackEvent.idl: * storage/StorageEvent.idl: * websockets/CloseEvent.idl: 2012-02-03 Kentaro Hara Add the "CPP" prefix to CPP specific IDL attributes https://bugs.webkit.org/show_bug.cgi?id=77707 Reviewed by Adam Barth. This patch adds the "CPP" prefix to a CPP specific IDL attribute. Specifically, this patch renames [PureInterface] to [CPPPureInterface] No tests. No change in behavior. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateHeader): (GenerateImplementation): * css/MediaQueryListListener.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/NodeFilter.idl: 2012-01-27 Alexander Pavlov Implement touch event emulation in the WebCore layer https://bugs.webkit.org/show_bug.cgi?id=77105 Reviewed by Ryosuke Niwa. This change essentially maps mouse events into single-touch events in the following way: - mousedown -> touchstart - mouseup -> touchend - mousemove -> touchmove (between mousedown and mouseup). Test: fast/events/touch/emulate-touch-events.html * page/EventHandler.cpp: (SyntheticTouchPoint): A synthetic touch point built from PlatformMouseEvent. (WebCore::SyntheticTouchPoint::SyntheticTouchPoint): (SyntheticSingleTouchEvent): A synthetic touch point event built from PlatformMouseEvent. (WebCore::SyntheticSingleTouchEvent::SyntheticSingleTouchEvent): (WebCore::EventHandler::handleMouseReleaseEvent): Invoke maybeDispatchSyntheticTouchEvent() and bail out if necessary. (WebCore::EventHandler::handleMousePressEvent): Invoke maybeDispatchSyntheticTouchEvent() and bail out if necessary. (WebCore::EventHandler::mouseMoved): Invoke maybeDispatchSyntheticTouchEvent() and bail out if necessary. (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Dispatch a synthetic touch event if necessary. * page/EventHandler.h: Added new method. * page/Settings.cpp: (WebCore::Settings::Settings): Added m_touchEventEmulationEnabled initializer. * page/Settings.h: Added m_touchEventEmulationEnabled, getter, and setter. (WebCore::Settings::setTouchEventEmulationEnabled): Added. (WebCore::Settings::isTouchEventEmulationEnabled): Added. * platform/PlatformTouchPoint.h: (WebCore::PlatformTouchPoint::PlatformTouchPoint): Unconditionally compile the parameterless ctor. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setTouchEventEmulationEnabled): Added for testing. * testing/InternalSettings.h: Added setTouchEventEmulationEnabled() for testing. * testing/InternalSettings.idl: Added setTouchEventEmulationEnabled() for testing. 2012-02-03 Kentaro Hara Remove [NoCPPCustom] IDL https://bugs.webkit.org/show_bug.cgi?id=77704 Reviewed by Adam Barth. This patch removes [NoCPPCustom], by replacing [Custom, NoCPPCustom] in HTMLDocument.idl with [JSCCustom, V8Custom]. No tests. No change in behavior. * bindings/scripts/CodeGeneratorCPP.pm: (ShouldSkipType): * html/HTMLDocument.idl: 2012-02-03 Kentaro Hara Remove [LegacyParent] from CodeGeneratorGObject.pm, and rename it to [JSLegacyParent] https://bugs.webkit.org/show_bug.cgi?id=77706 Reviewed by Adam Barth. This patch removes dead code about [LegacyParent] from CodeGeneratorGObject.pm, and renames [LegacyParent] to [JSLegacyParent]. No tests. No changes in behavior. * bindings/scripts/CodeGeneratorGObject.pm: (Generate): * bindings/scripts/CodeGeneratorJS.pm: (GetParentClassName): (GenerateHeader): (GenerateImplementation): * page/DOMWindow.idl: * workers/WorkerContext.idl: 2012-02-03 Pavel Feldman Web Inspector: preserve elements panel selection upon node drag'n'drop https://bugs.webkit.org/show_bug.cgi?id=77722 Reviewed by Vsevolod Vlasov. Test: inspector/elements/move-node.html * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._markRevision): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype._ondrop): (WebInspector.ElementsTreeOutline.prototype._doMove.callback): (WebInspector.ElementsTreeOutline.prototype._doMove): 2012-02-03 Shinya Kawanaka Reimplement DETAILS and SUMMARY using selector query. https://bugs.webkit.org/show_bug.cgi?id=75930 Reviewed by Hajime Morita. DETAILS is reimplemented using content element and its fallback feature. We don't need to recreate DOM even if SUMMARY is removed from or added into DETAILS. No new tests, should be covered by existing tests. * html/HTMLDetailsElement.cpp: (WebCore::DetailsSummaryElement::fallbackSummary): Takes fallback element of content summary. (DetailsSummaryElement): (WebCore::DetailsSummaryElement::create): Creates a fallback element also. (WebCore): (WebCore::HTMLDetailsElement::create): (WebCore::HTMLDetailsElement::HTMLDetailsElement): (WebCore::HTMLDetailsElement::createShadowSubtree): (WebCore::HTMLDetailsElement::findMainSummary): (WebCore::HTMLDetailsElement::parseMappedAttribute): (WebCore::HTMLDetailsElement::childShouldCreateRenderer): (WebCore::HTMLDetailsElement::toggleOpen): * html/HTMLDetailsElement.h: (HTMLDetailsElement): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::isMainSummary): 2012-02-03 Jochen Eisinger Crash when trying to add a timer to a detached document. https://bugs.webkit.org/show_bug.cgi?id=77692 Reviewed by Alexey Proskuryakov. In http://webkit.org/b/77370, a timer is fired on a detached document. Since a document clears all timers when it is detached, and it shouldn't be possible to add a timer to a detached document, we crash if this should happen anyway. This will hopefully result in an easier to debug crash dump. * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): 2012-02-03 Shinya Kawanaka Stop calling Element::ensureShadowRoot in Internals. https://bugs.webkit.org/show_bug.cgi?id=77612 Reviewed by Hajime Morita. We want to check a shadow root is built-in or created by users to support multiple shadow subtrees. But Element::ensureShadowRoot() makes it difficult, because it doesn't care about the returning shadow element is built-in or user generated, so let's remove Element::ensureShadowRoot(). As a first step, this patch removes ensureShadowRoot() in Internals. No new tests, because no changes in behavior. * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::ensureShadowRoot): 2012-02-02 Alexei Filippov Web Inspector: Always show percents together with counters in heap inspector. https://bugs.webkit.org/show_bug.cgi?id=77434 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype._toPercentString): (WebInspector.HeapSnapshotGridNode.prototype._createValueCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.createCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotConstructorNode.prototype.createCell): (WebInspector.HeapSnapshotConstructorNode.prototype.get data): (WebInspector.HeapSnapshotDiffNode.prototype.get data): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotContainmentDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotDiffDataGrid): (WebInspector.HeapSnapshotDominatorsDataGrid): (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): (WebInspector.DetailedHeapshotView.prototype.get _isShowingAsPercent): (WebInspector.DetailedHeapshotView.prototype._percentClicked): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view .data-grid span.percent-column): 2012-02-02 Matt Falkenhagen Use content-language from http-equiv to set document locale and font https://bugs.webkit.org/show_bug.cgi?id=76701 Reviewed by Darin Adler. So far, only content-language set through http-equiv is used; the HTTP Content-Language header is not yet supported. Tests: fast/text/content-language-case-insensitivity.html fast/text/content-language-mapped-to-webkit-locale.html fast/text/international/content-language-font-selection-expected.html fast/text/international/content-language-font-selection.html fast/text/international/content-language-with-subtags-expected.html fast/text/international/content-language-with-subtags.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): Use content language when selecting initial font. * dom/Document.cpp: (WebCore::Document::setContentLanguage): Recalculate style so language is taken into account. (WebCore): * dom/Document.h: (Document): 2012-02-02 Sheriff Bot Unreviewed, rolling out r106620. http://trac.webkit.org/changeset/106620 https://bugs.webkit.org/show_bug.cgi?id=77716 It broke non ENABLE(3D_RENDERING) builds (Requested by Ossy_morning on #webkit). * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/graphics/GraphicsContext.h: (WebCore): (GraphicsContext): * platform/graphics/cairo/TextureMapperCairo.cpp: (WebCore::TextureMapper::create): (WebCore): * platform/graphics/opengl/TextureMapperGL.cpp: (Entry): (DirectlyCompositedImageRepository): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::findOrCreate): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::deref): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::DirectlyCompositedImageRepository): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::~DirectlyCompositedImageRepository): (TextureMapperGLData): (BitmapTextureGL): (WebCore::BitmapTextureGL::isOpaque): (WebCore::BitmapTextureGL::pack): (WebCore::BitmapTextureGL::unpack): (WebCore::BitmapTextureGL::isPacked): (WebCore::BitmapTextureGL::BitmapTextureGL): (WebCore::TextureMapperGL::beginPainting): (WebCore::BitmapTextureGL::reset): (WebCore::BitmapTextureGL::beginPaint): (WebCore::BitmapTextureGL::endPaint): (WebCore): (WebCore::BitmapTextureGL::updateContents): (WebCore::BitmapTextureGL::updateRawContents): (WebCore::BitmapTextureGL::setContentsToImage): (WebCore::BitmapTextureGL::destroy): (WebCore::TextureMapperGL::bindSurface): * platform/graphics/opengl/TextureMapperGL.h: (TextureMapperGL): (WebCore::TextureMapperGL::allowSurfaceForRoot): (BGRA32PremultimpliedBuffer): (WebCore::BGRA32PremultimpliedBuffer::~BGRA32PremultimpliedBuffer): (WebCore): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): * platform/graphics/qt/GraphicsContextQt.cpp: * platform/graphics/qt/TextureMapperQt.cpp: Added. (WebCore): (WebCore::BitmapTextureQt::destroy): (WebCore::BitmapTextureQt::reset): (WebCore::BitmapTextureQt::beginPaint): (WebCore::BitmapTextureQt::endPaint): (WebCore::BitmapTextureQt::updateContents): (WebCore::BitmapTextureQt::save): (WebCore::BitmapTextureQt::setContentsToImage): (WebCore::BitmapTextureQt::pack): (WebCore::BitmapTextureQt::unpack): (WebCore::TextureMapperQt::beginClip): (WebCore::TextureMapperQt::endClip): (WebCore::TextureMapperQt::viewportSize): (WebCore::TextureMapperQt::TextureMapperQt): (WebCore::TextureMapperQt::setGraphicsContext): (WebCore::TextureMapperQt::graphicsContext): (WebCore::TextureMapperQt::bindSurface): (WebCore::TextureMapperQt::drawTexture): (WebCore::TextureMapper::create): (WebCore::TextureMapperQt::createTexture): (WebCore::BitmapTextureQt::BitmapTextureQt): (WebCore::TextureMapperQt::beginPainting): (WebCore::TextureMapperQt::endPainting): (BGRA32PremultimpliedBufferQt): (WebCore::BGRA32PremultimpliedBufferQt::beginPaint): (WebCore::BGRA32PremultimpliedBufferQt::endPaint): (WebCore::BGRA32PremultimpliedBufferQt::data): (WebCore::BGRA32PremultimpliedBuffer::create): (WebCore::uidForImage): * platform/graphics/qt/TextureMapperQt.h: Added. (WebCore): (BitmapTextureQt): (WebCore::BitmapTextureQt::~BitmapTextureQt): (WebCore::BitmapTextureQt::size): (WebCore::BitmapTextureQt::isValid): (WebCore::BitmapTextureQt::sourceRect): (WebCore::BitmapTextureQt::isPacked): (WebCore::BitmapTextureQt::painter): (TextureMapperQt): (WebCore::TextureMapperQt::allowSurfaceForRoot): (WebCore::TextureMapperQt::initialize): (WebCore::TextureMapperQt::create): (WebCore::TextureMapperQt::currentPainter): * platform/graphics/texmap/TextureMapper.cpp: * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::BitmapTexture): (WebCore::BitmapTexture::allowOfflineTextureUpload): (BitmapTexture): (WebCore::BitmapTexture::pack): (WebCore::BitmapTexture::unpack): (WebCore::BitmapTexture::isPacked): (WebCore::BitmapTexture::updateRawContents): (WebCore::BitmapTexture::beginPaintMedia): (WebCore::BitmapTexture::save): (WebCore::BitmapTexture::lock): (WebCore::BitmapTexture::unlock): (WebCore::BitmapTexture::isLocked): (TextureMapper): (WebCore::TextureMapper::viewportSize): (WebCore::TextureMapper::setViewportSize): (WebCore::TextureMapper::allowPartialUpdates): (WebCore::TextureMapper::isOpenGLBacked): (WebCore::TextureMapper::setTransform): (WebCore::TextureMapper::transform): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed. * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::setContentsTileBackBuffer): * platform/graphics/texmap/TextureMapperNode.h: (TextureMapperNode): 2012-02-02 Keishi Hattori ColorInputType needs to use ensureInlineStyleDecl https://bugs.webkit.org/show_bug.cgi?id=77699 Reviewed by Kent Tamura. Because WebCore internally should use the more specific CSSMutableStyleDeclaration http://trac.webkit.org/changeset/105739 * html/ColorInputType.cpp: (WebCore::ColorInputType::updateColorSwatch): 2012-02-02 Roland Steiner Simplify SelectorChecker::checkSelector and checkOneSelector https://bugs.webkit.org/show_bug.cgi?id=77697 Make use of Element::previous/nextElementSibling. Made those methods inline. Simplify code in checkSelector and checkOneSelector, esp. for first/nth/nth-last/last/only-child implementations. Reviewed by Andreas Kling. No new tests. (refactoring) * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): (WebCore::SelectorChecker::checkOneSelector): * dom/Element.cpp: * dom/Element.h: (WebCore::Element::previousElementSibling): (WebCore): (WebCore::Element::nextElementSibling): 2012-02-02 Keishi Hattori ColorChooserClient is missing a virtual destructor https://bugs.webkit.org/show_bug.cgi?id=77698 Reviewed by Kent Tamura. * platform/ColorChooserClient.h: (WebCore::ColorChooserClient::~ColorChooserClient): Added. 2012-02-02 Keishi Hattori Remove OVERRIDE from ColorInputType::valueAsColor https://bugs.webkit.org/show_bug.cgi?id=77701 Reviewed by Kent Tamura. * html/ColorInputType.h: (WebCore::ColorInputType::valueAsColor): 2012-02-02 Bear Travis Support 'disabled' attribute on SVGStyleElement https://bugs.webkit.org/show_bug.cgi?id=52130 Adding disabled property to SVGStyleElement, which mirrors the functionality added to HTMLStyleElement for DOM1. The disabled property reflects and sets the disabled state of its style sheet. Based off of patch for bug 25287 Reviewed by Dirk Schulze. Test: svg/dom/SVGStyleElement/disable-svg-style-element.html * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::disabled): (WebCore): (WebCore::SVGStyleElement::setDisabled): * svg/SVGStyleElement.h: (SVGStyleElement): * svg/SVGStyleElement.idl: 2012-02-02 Hayato Ito Make ShadowRoot interface inherit DocumentFragment interface in IDL. https://bugs.webkit.org/show_bug.cgi?id=77511 Reviewed by Kentaro Hara. This patch contains only the change of IDL to isolate issues. Other changes, such as tests for querySelector of ShadowRoot, will be added in follow-up patches. No tests. No change in behavior. * dom/ShadowRoot.idl: 2012-02-02 Raymond Toy Check parameters to biquad filters https://bugs.webkit.org/show_bug.cgi?id=71413 Reviewed by Kenneth Russell. Tests added for each filter type and for the limiting cases for each filter type. * platform/audio/Biquad.cpp: (WebCore::Biquad::setLowpassParams): (WebCore::Biquad::setHighpassParams): (WebCore::Biquad::setLowShelfParams): (WebCore::Biquad::setHighShelfParams): (WebCore::Biquad::setPeakingParams): (WebCore::Biquad::setAllpassParams): (WebCore::Biquad::setNotchParams): (WebCore::Biquad::setBandpassParams): Check for invalid parameters and clip them to something sensible. Also check for the limiting cases and try to use the limiting form of the z-transform for the biquad. Some issues cannot be consistently handled because the z-transform is not continuous as the parameters approach the limit. 2012-02-02 No'am Rosenthal [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible. https://bugs.webkit.org/show_bug.cgi?id=77148 Reviewed by Martin Robinson. Removed TextureMapperQt, and instead created a TextureMapperImageBuffer class, which responds to an "Software" mode of TextureMapper, instead of creating subclasses of TextureMapper directly. This allows using the software fallback of TextureMapper by any sort. To make the ImageBuffer backend easier, content updates to BitmapTexture can now use either an image, or a raw data pointer. The raw data pointer is provided for performance reasons, as converting data to/from Image references in Qt generates unnecessary deep copies of the image data. Also, functions that use TransformationMatrix were added to GraphicsContext, to allow for 3D transforms in cross platform code. After this patch everything renders the same. An additional bug report was created to allow ImageBuffer shallow image copies: https://bugs.webkit.org/show_bug.cgi?id=77689 Covered extensively by existing tests, no behavioral changes. * Target.pri: * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContext.h: (WebCore): (GraphicsContext): * platform/graphics/cairo/TextureMapperCairo.cpp: * platform/graphics/opengl/TextureMapperGL.cpp: (TextureMapperGLData): (BitmapTextureGL): (WebCore::BitmapTextureGL::BitmapTextureGL): (WebCore::TextureMapperGL::beginPainting): (WebCore::BitmapTextureGL::reset): (WebCore): (WebCore::swizzleBGRAToRGBA): (WebCore::BitmapTextureGL::updateContents): (WebCore::BitmapTextureGL::destroy): (WebCore::TextureMapperGL::bindSurface): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/opengl/TextureMapperGL.h: (TextureMapperGL): (WebCore::TextureMapperGL::accelerationMode): (WebCore): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore): (WebCore::GraphicsContext::get3DTransform): (WebCore::GraphicsContext::concat3DTransform): (WebCore::GraphicsContext::set3DTransform): * platform/graphics/qt/TextureMapperQt.cpp: Removed. * platform/graphics/qt/TextureMapperQt.h: Removed. * platform/graphics/texmap/TextureMapper.cpp: (WebCore): (BitmapTextureImageBuffer): (TextureMapperImageBuffer): * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::BitmapTexture): (BitmapTexture): (WebCore::BitmapTexture::bpp): (WebCore::BitmapTexture::isOpaque): (WebCore::TextureMapper::setGraphicsContext): (WebCore::TextureMapper::graphicsContext): (TextureMapper): (WebCore::TextureMapper::TextureMapper): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::setContentsTileBackBuffer): * platform/graphics/texmap/TextureMapperNode.h: (TextureMapperNode): 2012-02-02 Adam Barth Rename checkNodeSecurity and allowsAccessFromFrame to have sensible names https://bugs.webkit.org/show_bug.cgi?id=75796 Reviewed by Eric Seidel. As requested by Darin Adler, this patch renames these functions be clear that we're asking whether the access should be allowed rather than explicitly allowing the access. * bindings/generic/BindingSecurity.h: (BindingSecurity): (WebCore::::shouldAllowAccessToNode): (WebCore::::allowSettingFrameSrcToJavascriptUrl): * bindings/js/JSDOMBinding.cpp: (WebCore::shouldAllowAccessToNode): (WebCore::shouldAllowAccessToFrame): * bindings/js/JSDOMBinding.h: (WebCore): * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL): * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::getOwnPropertySlotDelegate): (WebCore::JSHistory::getOwnPropertyDescriptorDelegate): (WebCore::JSHistory::putDelegate): (WebCore::JSHistory::deleteProperty): (WebCore::JSHistory::getOwnPropertyNames): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::getOwnPropertySlotDelegate): (WebCore::JSLocation::getOwnPropertyDescriptorDelegate): (WebCore::JSLocation::putDelegate): (WebCore::JSLocation::deleteProperty): (WebCore::JSLocation::getOwnPropertyNames): (WebCore::JSLocation::toStringFunction): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::canAccessFromCurrentOrigin): * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertyDescriptorBody): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallback): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjContentDocument): (WebCore::jsTestObjPrototypeFunctionGetSVGDocument): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::contentDocumentAttrGetter): (WebCore::TestObjInternal::getSVGDocumentCallback): 2012-02-02 Kalev Lember [GTK] Make gtk+ symbols available to WidgetBackingStoreCairo.cpp https://bugs.webkit.org/show_bug.cgi?id=77679 WidgetBackingStoreCairo.cpp uses GTK+ symbols, so we need it in webcoregtk_sources instead of webcore_sources. Reviewed by Martin Robinson. * GNUmakefile.list.am: Move WidgetBackingStoreCairo.cpp to webcoregtk. 2012-02-02 Shinya Kawanaka StyleRecalc should occur when shadow root exists and light children are changed. https://bugs.webkit.org/show_bug.cgi?id=76262 Reviewed by Hajime Morita. When light children is changed, the element included in HTMLContentElement may also be changed. So we have to recalculate inclusion of content element again. Test: fast/dom/shadow/shadow-contents-fallback-dynamic.html * dom/Element.cpp: (WebCore::Element::childrenChanged): 2012-02-02 Ami Fischman Avoid crashing renderer when GPU process dies by not caching textures between video frames. https://bugs.webkit.org/show_bug.cgi?id=77654 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): 2012-02-02 Anders Carlsson Add ScrollingTree class https://bugs.webkit.org/show_bug.cgi?id=77695 Reviewed by Andreas Kling. * WebCore.xcodeproj/project.pbxproj: Add new files. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::ScrollingCoordinator): Create a scrolling tree. (WebCore::ScrollingCoordinator::~ScrollingCoordinator): Assert that the scrolling tree is null. (WebCore::ScrollingCoordinator::pageDestroyed): Null out the scrolling tree member variable and tell it to invalidate itself. * page/scrolling/ScrollingTree.cpp: Added. (WebCore::ScrollingTree::invalidate): Null out the scrolling coordinator, breaking the reference cycle between the scrolling coordinator and the scrolling tree. * page/scrolling/ScrollingTree.h: Added. 2012-02-02 Tim Dresser Refactor plugin drawing to be more data driven https://bugs.webkit.org/show_bug.cgi?id=76715 Reviewed by James Robinson. CCPluginLayerImpl no longer handles drawing itself, but produces a list of CCPluginDrawQuads. These quads are then drawn by LayerRendererChromium. CCLayerImpl::willDraw(LayerRendererChromium*) is called directly before appendQuads. This allows for CCLayerImpl objects to allocate textures before appendQuads is called. This is a refactor, so no new tests were added. Flash was tested manually on Linux and Mac. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::PluginProgramBinding::set): (PluginProgramBinding): (WebCore): (WebCore::TexStretchPluginProgramBinding::set): (TexStretchPluginProgramBinding): (WebCore::TexTransformPluginProgramBinding::set): (TexTransformPluginProgramBinding): (WebCore::LayerRendererChromium::drawPluginQuad): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::willDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCPluginDrawQuad.cpp: (WebCore::CCPluginDrawQuad::create): (WebCore::CCPluginDrawQuad::CCPluginDrawQuad): * platform/graphics/chromium/cc/CCPluginDrawQuad.h: (CCPluginDrawQuad): (WebCore::CCPluginDrawQuad::uvRect): (WebCore::CCPluginDrawQuad::textureId): (WebCore::CCPluginDrawQuad::flipped): (WebCore::CCPluginDrawQuad::ioSurfaceWidth): (WebCore::CCPluginDrawQuad::ioSurfaceHeight): (WebCore::CCPluginDrawQuad::ioSurfaceTextureId): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::willDraw): (WebCore::CCPluginLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: (CCPluginLayerImpl): 2012-01-29 Pablo Flouret V8 idl code generator doesn't handle SerializedScriptValue attributes properly. https://bugs.webkit.org/show_bug.cgi?id=77295 Reviewed by Kentaro Hara. Only the case of one (and only one) SerializedScriptValue attribute was handled, and it was deserialized eagerly in the constructor instead of generating getters/setters. This patch gets rid of that behavior and generates the getters and setters instead (similar to what the JSC generator does). Also handle the case of SSV attributes with [CachedAttribute] declaration, caching the deserialized value in a hidden attribute on the object. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateConstructorCallback): (GenerateNamedConstructorCallback): (GenerateSingleBatchedAttribute): (GenerateImplementation): (GenerateToV8Converters): (JSValueToNative): (NativeToJSValue): * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp: (WebDOMTestSerializedScriptValueInterface::setValue): (WebDOMTestSerializedScriptValueInterface::readonlyValue): (WebDOMTestSerializedScriptValueInterface::cachedValue): (WebDOMTestSerializedScriptValueInterface::setCachedValue): (WebDOMTestSerializedScriptValueInterface::cachedReadonlyValue): * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h: (WebDOMTestSerializedScriptValueInterface): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (webkit_dom_test_serialized_script_value_interface_set_value): (webkit_dom_test_serialized_script_value_interface_get_readonly_value): (webkit_dom_test_serialized_script_value_interface_get_cached_value): (webkit_dom_test_serialized_script_value_interface_set_cached_value): (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value): (webkit_dom_test_serialized_script_value_interface_get_property): (webkit_dom_test_serialized_script_value_interface_class_init): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (): (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue): (WebCore): (WebCore::jsTestSerializedScriptValueInterfaceCachedValue): (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue): (WebCore::JSTestSerializedScriptValueInterface::put): (WebCore::setJSTestSerializedScriptValueInterfaceValue): (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (JSTestSerializedScriptValueInterface): (JSTestSerializedScriptValueInterfacePrototype): (WebCore): * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm: (-[DOMTestSerializedScriptValueInterface setValue:]): (-[DOMTestSerializedScriptValueInterface readonlyValue]): (-[DOMTestSerializedScriptValueInterface cachedValue]): (-[DOMTestSerializedScriptValueInterface setCachedValue:]): (-[DOMTestSerializedScriptValueInterface cachedReadonlyValue]): * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceInternal::valueAttrGetter): (TestSerializedScriptValueInterfaceInternal): (WebCore::TestSerializedScriptValueInterfaceInternal::valueAttrSetter): (WebCore::TestSerializedScriptValueInterfaceInternal::readonlyValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceInternal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceInternal::cachedValueAttrSetter): (WebCore::TestSerializedScriptValueInterfaceInternal::cachedReadonlyValueAttrGetter): (): (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): 2012-02-02 Adam Barth BMW Car Configuration Page doesn't work (Only manifests in Chromium) https://bugs.webkit.org/show_bug.cgi?id=77312 Reviewed by Dimitri Glazkov. When we autogenerated the event factory, we missed the check for whether touch events were enabled at runtime: http://trac.webkit.org/changeset/97933/trunk/Source/WebCore/dom/Document.cpp This patch adds the check back. Unfortunately, there isn't a testing frame work for RuntimeEnabledFeatures. The main difficulty is that these static bools need to be set when WebKit is initialized and can't be changed (which is why they're not part of WebCore::Settings). To test them properly, we'd need a testing framework that booted up WebKit for each test. We could test this particular change (which doesn't need the bool to be constant through the runtime of WebKit), but that would create a sandtrap for future patches who might thing that this testing framework can really be used to test RuntimeEnabledFeatures. The net result is that Chromium is going to end up living with the non-default codepath for these settings being untested, which will lead to regressions like this one. If we ened up with a bunch of these regressions, we'll likely end up with a testing framework similar to Chromium's browsers_tests, which create a fresh subprocess for each test. * dom/EventFactory.in: * dom/make_event_factory.pl: (defaultItemFactory): (generateImplementation): 2012-02-02 Justin Novosad [Chromium] Use SkCanvas::flush in skia port https://bugs.webkit.org/show_bug.cgi?id=77463 Reviewed by Stephen White. Code cleanup in skia port. Using SkCanvas::flush to remove unnecessary dependency on GrContext. Removed unnecessary inclusions and forward declarations of GrContext in several source files. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/skia/PlatformContextSkia.cpp: 2012-02-02 Chris Marrin Turn on CSS Filters on Windows https://bugs.webkit.org/show_bug.cgi?id=76667 Turning on CSS_FILTERS flag for Windows and fixed a couple of resultant build errors Reviewed by Adele Peterson. * WebCore.vcproj/copyForwardingHeaders.cmd: * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayer::setFilters): (PlatformCALayer::filtersCanBeComposited): 2012-02-02 Jon Lee Clear shown notifications when context is no longer active https://bugs.webkit.org/show_bug.cgi?id=77363 Reviewed by Darin Adler. * notifications/NotificationPresenter.h: Add new virtual function to clear notifications associated with a given execution context. By default the notifications are left alone, as before. Individual implementations can override to allow notifications to clear them. * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::disconnectFrame): When disconnecting the page from the frame, we call clearNotifications(). * page/Frame.cpp: (WebCore::Frame::pageDestroyed): When the page is destroyed, tell the DOM window to reset notifications. 2012-02-02 Anders Carlsson The overhang area layer should have a linen background https://bugs.webkit.org/show_bug.cgi?id=77670 Reviewed by Andreas Kling. * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::scrollByOnScrollingThread): Add an #ifdef so that scroll position clamping can be disabled. This will be removed once rubber-banding works properly. * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::setUpOverhangAreasLayerContents): Add new empty function. * platform/mac/ScrollbarThemeMac.h: (ScrollbarThemeMac): * platform/mac/ScrollbarThemeMac.mm: (WebCore::linenBackgroundColor): Helper function for getting the CGColorRef that represents the linen background color. (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents): Set the linen background color as the overhang areas layer background color. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Call ScrollbarTheme::setUpOverhangAreasLayerContents. 2012-02-02 Sheriff Bot Unreviewed, rolling out r106566. http://trac.webkit.org/changeset/106566 https://bugs.webkit.org/show_bug.cgi?id=77673 Broke the Windows build (Requested by jessieberlin on #webkit). * WebCore.vcproj/copyForwardingHeaders.cmd: * platform/graphics/ca/win/PlatformCALayerWin.cpp: 2012-02-02 Tommy Widenflycht [chromium] MediaStream API: Adding the embedding code for MediaStreamCenter https://bugs.webkit.org/show_bug.cgi?id=73130 Reviewed by Darin Fisher. Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code. * mediastream/UserMediaClient.h: (UserMediaClient): * mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::didCompleteQuery): * mediastream/UserMediaRequest.h: (UserMediaRequest): (WebCore::UserMediaRequest::audio): (WebCore::UserMediaRequest::video): (WebCore::UserMediaRequest::cameraPreferenceUser): (WebCore::UserMediaRequest::cameraPreferenceEnvironment): * platform/mediastream/MediaStreamCenter.cpp: (WebCore): (WebCore::MediaStreamCenter::queryMediaStreamSources): * platform/mediastream/MediaStreamCenter.h: (WebCore): (MediaStreamSourcesQueryClient): (MediaStreamCenter): 2012-02-02 Raymond Toy Constant values to set "distanceModel" are undefined https://bugs.webkit.org/show_bug.cgi?id=74273 Reviewed by Kenneth Russell. Tests: webaudio/distance-exponential.html webaudio/distance-inverse.html webaudio/distance-linear.html * webaudio/AudioPannerNode.h: Define enum for the new constants for the distance models. * webaudio/AudioPannerNode.idl: Define matching constants for the distance models. 2012-02-02 Raymond Toy Illegal panner model values should throw an exception https://bugs.webkit.org/show_bug.cgi?id=77235 Reviewed by Kenneth Russell. Modified existing panner-set-model test to catch exceptions. Debug build should not crash anymore. * webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::setPanningModel): Throw exception for invalid model values. * webaudio/AudioPannerNode.h: (AudioPannerNode): Update declaration * webaudio/AudioPannerNode.idl: Setting panner model can throw exception. 2012-02-02 Kentaro Hara Rename [ConvertUndefinedOrNullToNullString] to [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] https://bugs.webkit.org/show_bug.cgi?id=77611 Reviewed by Adam Barth. This patch renames [ConvertUndefinedOrNullToNullString] to [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString], according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs, http://dev.w3.org/2006/webapi/WebIDL/#TreatUndefinedAs). No tests. No changes in behavior. * bindings/scripts/CodeGeneratorJS.pm: (JSValueToNative): * bindings/scripts/CodeGeneratorV8.pm: (GetNativeTypeFromSignature): * dom/DOMImplementation.idl: * dom/Document.idl: * fileapi/Blob.idl: * fileapi/DirectoryEntry.idl: * fileapi/DirectoryEntrySync.idl: * fileapi/Entry.idl: * fileapi/EntrySync.idl: * fileapi/WebKitBlobBuilder.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOutputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTextAreaElement.idl: * page/Console.idl: * page/DOMWindow.idl: * bindings/scripts/test/TestObj.idl: No changes in run-bindings-tests results. 2012-02-02 Anders Carlsson NPAPI will not send mouse up events when mouse is outside plugin area https://bugs.webkit.org/show_bug.cgi?id=77657 Reviewed by Andreas Kling. Export EventHandler::setCapturingMouseEventsNode. * WebCore.exp.in: 2012-02-02 Antti Koivisto Move remaining implementation from CSSStyleDeclaration to subclasses https://bugs.webkit.org/show_bug.cgi?id=77621 Reviewed by Andreas Kling. This leaves CSSStyleDeclaration a near-pure CSSOM interface. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::isCSSPropertyName): (WebCore::JSCSSStyleDeclaration::putDelegate): * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::parentRule): (WebCore): * css/CSSComputedStyleDeclaration.h: (CSSComputedStyleDeclaration): * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration): (WebCore::CSSMutableStyleDeclaration::contextStyleSheet): (WebCore): (WebCore::CSSMutableStyleDeclaration::parentRule): * css/CSSMutableStyleDeclaration.h: (WebCore::CSSMutableStyleDeclaration::isInlineStyleDeclaration): (WebCore::CSSMutableStyleDeclaration::parentRuleInternal): (WebCore::CSSMutableStyleDeclaration::clearParentRule): (CSSMutableStyleDeclaration): (WebCore::CSSMutableStyleDeclaration::parentElement): (WebCore::CSSMutableStyleDeclaration::clearParentElement): (WebCore::CSSMutableStyleDeclaration::parentStyleSheet): * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::parseSimpleLengthValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseDeclaration): * css/CSSStyleDeclaration.cpp: (WebCore): * css/CSSStyleDeclaration.h: (CSSStyleDeclaration): (WebCore::CSSStyleDeclaration::parentStyleSheet): (WebCore::CSSStyleDeclaration::CSSStyleDeclaration): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): Eliminate unnecessary call to CSSMutableStyleDeclaration::parentStyleSheet() * css/CSSStyleRule.h: (WebCore::CSSStyleRule::setDeclaration): * css/CSSStyleSelector.cpp: (WebCore::isInsideRegionRule): (WebCore::CSSStyleSelector::applyDeclaration): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::setDeclaration): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): (WebCore::PageSerializer::serializeCSSStyleSheet): (WebCore::PageSerializer::retrieveResourcesForCSSRule): (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): * page/PageSerializer.h: Eliminate unnecessary call to CSSMutableStyleDeclaration::parentStyleSheet() (WebCore): (PageSerializer): 2012-02-02 Chris Marrin Turn on CSS Filters on Windows https://bugs.webkit.org/show_bug.cgi?id=76667 Turning on CSS_FILTERS flag for Windows and fixed a couple of resultant build errors Reviewed by Adele Peterson. * WebCore.vcproj/copyForwardingHeaders.cmd: * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayer::setFilters): (PlatformCALayer::filtersCanBeComposited): 2012-02-02 Anders Carlsson Move ScrollingThread to its own file https://bugs.webkit.org/show_bug.cgi?id=77652 Reviewed by Sam Weinig. This just shuffles some classes around and makes ScrollingCoordinator call into ScrollingThread. Hopefully we'll be able to make ScrollingThread use the new WebCore::RunLoop class eventually. * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleWheelEvent): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * page/scrolling/ScrollingThread.cpp: Added. (WebCore): (WebCore::ScrollingThread::ScrollingThread): (WebCore::ScrollingThread::isCurrentThread): (WebCore::ScrollingThread::dispatch): (WebCore::ScrollingThread::shared): (WebCore::ScrollingThread::createThreadIfNeeded): (WebCore::ScrollingThread::threadCallback): (WebCore::ScrollingThread::threadBody): (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread): * page/scrolling/ScrollingThread.h: Added. (WebCore): (ScrollingThread): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::scrollByOnScrollingThread): (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread): * page/scrolling/mac/ScrollingThreadMac.mm: Added. (WebCore): (WebCore::ScrollingThread::initializeRunLoop): (WebCore::ScrollingThread::wakeUpRunLoop): (WebCore::ScrollingThread::threadRunLoopSourceCallback): 2012-02-02 Sheriff Bot Unreviewed, rolling out r106551. http://trac.webkit.org/changeset/106551 https://bugs.webkit.org/show_bug.cgi?id=77648 Breaking mac and gtk tests due to font differences. (Requested by _pdr_ on #webkit). * platform/graphics/SVGGlyph.cpp: (WebCore::charactersWithArabicForm): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): * svg/SVGFontData.h: (SVGFontData): 2012-02-02 Alexander Pavlov Web Inspector: [REGRESSION] Slow continuous DOM traversal with Up/Down keys https://bugs.webkit.org/show_bug.cgi?id=77643 Reviewed by Pavel Feldman. Test: inspector/styles/updates-during-dom-traversal.html * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate): 2012-02-02 Claudio Saavedra and Martin Robinson [GTK] WebKitWebView won't work in a GtkOffscreenWindow https://bugs.webkit.org/show_bug.cgi?id=76911 Reviewed by Philippe Normand. * platform/gtk/GtkUtilities.cpp: (WebCore::widgetIsOnscreenToplevelWindow): Added this helper. * platform/gtk/GtkUtilities.h: (WebCore): Added helper declaration. 2012-02-02 Allan Sandfeld Jensen Update active and hover state on touch release. https://bugs.webkit.org/show_bug.cgi?id=77620 Reviewed by Kenneth Rohde Christiansen. * rendering/HitTestRequest.h: (WebCore::HitTestRequest::move): (WebCore::HitTestRequest::release): (WebCore::HitTestRequest::touchEvent): (WebCore::HitTestRequest::mouseEvent): (WebCore::HitTestRequest::touchMove): (WebCore::HitTestRequest::touchRelease): Rename the enum values in HitTestRequest to be mouse/touch agnostic, and add value for recognizing touch events. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint): Update for HitTestRequest rename. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): ditto (WebCore::RenderLayer::updateHoverActiveState): Reset hoverstate on touch release. * page/EventHandler.cpp: (WebCore::EventHandler::updateSelectionForMouseDrag): Update for HitTestRequest rename. (WebCore::EventHandler::handleMouseMoveEvent): ditto (WebCore::EventHandler::handleMouseReleaseEvent): ditto (WebCore::EventHandler::hoverTimerFired): ditto (WebCore::EventHandler::dragSourceEndedAt): ditto (WebCore::EventHandler::handleTouchEvent): Hittest touch release to reset active and hover states and add touch enum to all touch hittests. 2012-02-02 Pavel Feldman Web Inspector: enable editing of selected rows on single click in elements panel. https://bugs.webkit.org/show_bug.cgi?id=77627 Reviewed by Vsevolod Vlasov. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.onattach): (WebInspector.ElementsTreeElement.prototype.onselect): (WebInspector.ElementsTreeElement.prototype._mouseDown): * inspector/front-end/treeoutline.js: (TreeElement.prototype.selectOnMouseDown): (TreeElement.prototype.select): 2012-02-02 Philip Rogers Fix mirroring with SVG fonts https://bugs.webkit.org/show_bug.cgi?id=77067 Reviewed by Nikolas Zimmermann. SVG fonts were incorrectly handling mirrored characters in bidi text. In this change I added the function createStringWithMirroredCharacters which handles mirroring the characters when selecting glyphs for SVG fonts. I also made a small cosmetic change in the function charactersWithArabicForm, changing the bool parameter "mirror" to "rtl" which better reflects what it actually does. Several new tests were added to test mirroring with SVG fonts in the presence of Arabic forms and non-BMP characters. Tests: svg/custom/glyph-selection-arabic-forms.svg svg/custom/glyph-selection-bidi-mirror.svg svg/custom/glyph-selection-non-bmp.svg * platform/graphics/SVGGlyph.cpp: (WebCore::charactersWithArabicForm): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): (WebCore::SVGFontData::createStringWithMirroredCharacters): * svg/SVGFontData.h: (SVGFontData): 2012-02-02 Pavel Feldman Web Inspector: add experiment for single click styles editing. https://bugs.webkit.org/show_bug.cgi?id=77624 Reviewed by Vsevolod Vlasov. * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection): (WebInspector.StylePropertyTreeElement.prototype.onattach): (WebInspector.StylePropertyTreeElement.prototype._mouseDown): (WebInspector.StylePropertyTreeElement.prototype._resetMouseDownElement): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.selectElement.context): 2012-02-02 Kenneth Rohde Christiansen Make the tap highlighting work for all test cases https://bugs.webkit.org/show_bug.cgi?id=77626 Reviewed by Simon Hausmann. Clean up of the current code to make it more generic. Now uses addFocusRingRects for finding the areas to highlight. Tested by current manual tests. * page/GestureTapHighlighter.cpp: (WebCore::GestureTapHighlighter::pathForNodeHighlight): 2012-02-02 Mario Sanchez Prada [Gtk] atk_text_get_text_at_offset() sometimes fails to provide the correct line https://bugs.webkit.org/show_bug.cgi?id=72382 Reviewed by Martin Robinson. Do not add unnecesary blanks at the end of a line of text. * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: (textForRenderer): Do not just append a '\n' at the end of a line if the linebreak for that line was already considered. 2012-02-02 Raul Hudea Regions should ignore the saved currentRenderFlowThread during repainting because if there are imbricated flow threads, it might end using the wrong one. [CSSRegions] Assert failure in RenderView::computeRectForRepaint https://bugs.webkit.org/show_bug.cgi?id=77430 Reviewed by David Hyatt. Test: fast/regions/imbricated-flow-threads-crash.html * rendering/RenderFlowThread.cpp: (CurrentRenderFlowThreadDisabler): (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): (WebCore): (WebCore::RenderFlowThread::repaintRectangleInRegions): 2012-02-02 Kinuko Yasuda Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory (re-landing r105395) https://bugs.webkit.org/show_bug.cgi?id=76551 Reviewed by David Levin. Moved the implementation of crackFileSystemURL() and toURL() from WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem so that each platform can extend/implement their behavior if necessary. No new tests as it has no functional changes. * fileapi/DOMFileSystemBase.cpp: Moved crackFileSystemURL() to AsyncFileSystem. * fileapi/DOMFileSystemBase.h: (DOMFileSystemBase): * fileapi/EntryBase.cpp: Moved toURL() to AsyncFileSystem. (WebCore::EntryBase::toURL): * page/DOMWindow.cpp: Made corresponding callsite changes. (WebCore::DOMWindow::webkitRequestFileSystem): (WebCore::DOMWindow::webkitResolveLocalFileSystemURL): * page/DOMWindow.h: * platform/AsyncFileSystem.cpp: (WebCore::AsyncFileSystem::isValidType): Added. * platform/AsyncFileSystem.h: (AsyncFileSystem): * workers/WorkerContext.cpp: Made corresponding callsite changes. (WebCore::WorkerContext::webkitRequestFileSystem): (WebCore::WorkerContext::webkitRequestFileSystemSync): (WebCore::WorkerContext::webkitResolveLocalFileSystemURL): (WebCore::WorkerContext::webkitResolveLocalFileSystemSyncURL): * workers/WorkerContext.h: 2012-02-02 Yury Semikhatsky Web Inspector: pause on uncaugh exceptions state is not properly restored https://bugs.webkit.org/show_bug.cgi?id=77558 'Pause on exceptions' state is now stored in InspectorState object so that it is properly restored on inspected process change. Reviewed by Vsevolod Vlasov. * inspector/InspectorDebuggerAgent.cpp: (DebuggerAgentState): (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::restore): (WebCore::InspectorDebuggerAgent::setPauseOnExceptions): (WebCore): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): 2012-02-02 Kentaro Hara The third argument of addEventListener/removeEventListener of PeerConnection should be optional https://bugs.webkit.org/show_bug.cgi?id=77606 Reviewed by Adam Barth. This patch corrects a typo in PeerConnection.idl, i.e. [optional] => [Optional]. Test: fast/mediastream/peerconnection-eventlistener-optional-argument.html * mediastream/PeerConnection.idl: 2012-02-02 Rakesh KN hidden attribute on suppresses the file selection dialog https://bugs.webkit.org/show_bug.cgi?id=58208 Reviewed by Ryosuke Niwa. We want to allow opening file dialog on hidden element when click() is called on the element. The behaviour is similar to Firefox and IE. Added manual test as the file dialog opens only on user gesture. * html/FileInputType.cpp: (WebCore::FileInputType::handleDOMActivateEvent): Removed renderer check as input can be hidden. 2012-02-01 Philippe Normand [GStreamer] FFTFrame implementation https://bugs.webkit.org/show_bug.cgi?id=73545 Reviewed by Chris Rogers. FFTFrame implementation based on GStreamer's FFT processing library. No new tests, existing WebAudio tests cover this. * GNUmakefile.am: * GNUmakefile.list.am: * platform/audio/FFTFrame.h: * platform/audio/FFTFrameStub.cpp: * platform/audio/gstreamer/FFTFrameGStreamer.cpp: Added. (WebCore::FFTFrame::FFTFrame): (WebCore::FFTFrame::initialize): (WebCore::FFTFrame::cleanup): (WebCore::FFTFrame::~FFTFrame): (WebCore::FFTFrame::multiply): (WebCore::FFTFrame::doFFT): (WebCore::FFTFrame::doInverseFFT): (WebCore::FFTFrame::realData): (WebCore::FFTFrame::imagData): 2012-02-02 Kentaro Hara Rename [CheckFrameSecurity] and [SVGCheckSecurity] to [CheckAccessToNode] https://bugs.webkit.org/show_bug.cgi?id=77601 Reviewed by Adam Barth. [CheckFrameSecurity] and [SVGCheckSecurity] have the same meaning; i.e. generate code to check allowAccessToNode() for a given attribute or method. This patch renames them to [CheckAccessToNode]. No tests. No changes in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallback): * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLObjectElement.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: Updated the test results. (WebCore): 2012-02-01 Kentaro Hara Rename [V8DisallowShadowing] to [V8Unforgeable] https://bugs.webkit.org/show_bug.cgi?id=77599 Reviewed by Adam Barth. This patch renames [V8DisallowShadowing] to [V8Unforgeable], following the Web IDL spec (http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateSingleBatchedAttribute): (GenerateImplementation): * page/DOMWindow.idl: * page/Location.idl: 2012-02-01 Kentaro Hara Rename [ConvertNullToNullString] to [TreatNullAs=EmptyString] https://bugs.webkit.org/show_bug.cgi?id=77602 Reviewed by Adam Barth. This patch renames [ConvertNullToNullString] to [TreatNullAs=EmptyString], according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs). No tests. No changes in behavior. * bindings/scripts/CodeGeneratorJS.pm: (JSValueToNative): * bindings/scripts/CodeGeneratorV8.pm: (GetNativeTypeFromSignature): * css/CSSCharsetRule.idl: * css/CSSPageRule.idl: * css/CSSRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSValue.idl: * css/MediaList.idl: * css/WebKitCSSKeyframesRule.idl: * dom/Attr.idl: * dom/CharacterData.idl: * dom/DOMImplementation.idl: * dom/Document.idl: * dom/Element.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/ProcessingInstruction.idl: * dom/ShadowRoot.idl: * html/HTMLAnchorElement.idl: * html/HTMLButtonElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLOutputElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLTitleElement.idl: * html/canvas/CanvasRenderingContext2D.idl: * page/DOMWindow.idl: * storage/StorageEvent.idl: * svg/SVGAngle.idl: * svg/SVGElement.idl: * svg/SVGLength.idl: * svg/SVGScriptElement.idl: * bindings/scripts/test/TestObj.idl: No change in the run-bindings-tests results. 2012-02-01 Kentaro Hara Remove [GenerateConstructor] from IDL files https://bugs.webkit.org/show_bug.cgi?id=77598 Reviewed by Adam Barth. [GenerateConstructor] is used in some IDL files but it is not implemented in code generators. I could not find any history about [GenerateConstructor] in code generators. This patch removes them from IDL files. Maybe we want to replace [GenerateConstructor] with [Constructor] eventually, but currently no tests are written for their constructors (e.g. "new DOMTokenList()"). So simply removing them would make sense. No new tests. No change in behavior. * dom/DOMStringList.idl: * html/DOMSettableTokenList.idl: * html/DOMTokenList.idl: * svg/SVGFEConvolveMatrixElement.idl: * webaudio/AudioPannerNode.idl: 2012-02-01 Eric Carlson Consider user's preferred language when choosing text tracks https://bugs.webkit.org/show_bug.cgi?id=74121 Reviewed by Alexey Proskuryakov. Tests: media/track/track-language-preference.html media/track/track-prefer-captions.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadTimerFired): configureTextTracks -> configureNewTextTracks. (WebCore::HTMLMediaElement::textTracksAreReady): Add more comments. (WebCore::HTMLMediaElement::textTrackModeChanged): Ditto. (WebCore::HTMLMediaElement::showingTrackWithSameKind): Minor restructuring. (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Renamed from userIsInterestedInThisTrack, don't consider user's language preference. (WebCore::HTMLMediaElement::configureTextTrackGroup): New, configure all tracks in a group, considering user's kind and language preferences. (WebCore::HTMLMediaElement::configureNewTextTracks): New, configure all newly added tracks. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): (TrackGroup): * platform/Language.cpp: (WebCore::canonicalLanguageIdentifier): New, create a canonicalized version of a language string. (WebCore::bestMatchingLanguage): New, return the language from the list that best matches the specified language. (WebCore::preferredLanguageFromList): New, return the language in the specified list that best matches the user's language preference. * platform/Language.h: * testing/Internals.cpp: (WebCore::Internals::setShouldDisplayTrackType): New, allow DRT to set the track type preference. (WebCore::Internals::shouldDisplayTrackType): New, allow DRT to read the track type preference. * testing/Internals.h: * testing/Internals.idl: 2012-02-01 Hayato Ito Change class hierarycy so that ShadowRoot can inherit DocumentFragment. https://bugs.webkit.org/show_bug.cgi?id=76693 Reviewed by Darin Adler. Make ShadowRoot inherit DocumentFragment so that it matches the class hierarchy of IDL in the spec. TreeScope becomes a separated class, which is now inherited by Document and ShadowRoot using multiple-inheritance. This patch is pre-requirement for coming IDL change. No tests. No change in behavior. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::buildAccessKeyMap): (WebCore::Document::childrenChanged): (WebCore::Document::attach): (WebCore::Document::detach): * dom/Document.h: (Document): * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::DocumentFragment): * dom/DocumentFragment.h: (DocumentFragment): * dom/DocumentOrderedMap.cpp: (WebCore::DocumentOrderedMap::get): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::attach): * dom/ShadowRoot.h: * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::~TreeScope): (WebCore::TreeScope::setParentTreeScope): (WebCore::TreeScope::getImageMap): (WebCore::TreeScope::findAnchor): * dom/TreeScope.h: (WebCore): (WebCore::TreeScope::rootNode): (TreeScope): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): * page/DragController.cpp: (WebCore::asFileInput): * page/FocusController.cpp: (WebCore::ownerOfTreeScope): (WebCore::FocusController::nextFocusableNode): (WebCore::FocusController::previousFocusableNode): 2012-02-01 Benjamin Poulain WorkerScriptController::evaluate() should not return anything https://bugs.webkit.org/show_bug.cgi?id=77587 Reviewed by Adam Barth. Remove the return value from WorkerScriptController as it is (and should be) unused. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bindings/js/WorkerScriptController.h: (WorkerScriptController): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bindings/v8/WorkerScriptController.h: (WorkerScriptController): 2012-02-01 Kentaro Hara Remove [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter], [HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators https://bugs.webkit.org/show_bug.cgi?id=77585 Reviewed by Adam Barth. This patch removes [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter], [HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators, since they are not used by no IDL files. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (GetterExpression): * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateImplementation): (IsConstructable): (IsConstructorTemplate): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated the run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto. * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore): * bindings/scripts/test/JS/JSTestObj.h: Ditto. (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore): 2012-02-01 Shinya Kawanaka Select attribute of HTMLContentElement should be able be changed dynamically. https://bugs.webkit.org/show_bug.cgi?id=76261 Reviewed by Hajime Morita. When select attribute is changed, the flag to recalc style is set. Test: fast/dom/shadow/content-element-select-dynamic.html * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseMappedAttribute): Sets recalc style when select is changed. * html/shadow/HTMLContentElement.h: (HTMLContentElement): 2012-02-01 Kentaro Hara Remove [ImplementationUUID] and [InterfaceUUID] from html/canvas/*.idl https://bugs.webkit.org/show_bug.cgi?id=77589 Reviewed by Adam Barth. [ImplementationUUID] and [InterfaceUUID] are used in html/canvas/*.idl, but they are not implemented in code generators and thus have no meaning. This patch removes them. No tests. No change in behavior. * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPattern.idl: The file is now empty though. * html/canvas/CanvasRenderingContext.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/WebGLRenderingContext.idl: 2012-02-01 Sheriff Bot Unreviewed, rolling out r106408. http://trac.webkit.org/changeset/106408 https://bugs.webkit.org/show_bug.cgi?id=77592 crashes in chromium mac release tests (Requested by japhet on #webkit). * platform/graphics/Region.cpp: * platform/graphics/Region.h: (Region): (Shape): 2012-02-01 No'am Rosenthal [Texmap] Use glScissors for clipping in TextureMapperGL when possible https://bugs.webkit.org/show_bug.cgi?id=77575 Reviewed by Martin Robinson. Maintain a clipping stack, that helps us use stencils in conjunction with scissors. We apply scissors when the clip region is rectalinear, and stencil when it's not. No behavior changes so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (SharedGLData): (WebCore::TextureMapperGLData::SharedGLData::SharedGLData): (WebCore::TextureMapperGL::drawTexture): (WebCore::TextureMapperGL::bindSurface): (WebCore): (WebCore::scissorClip): (WebCore::TextureMapperGL::beginScissorClip): (WebCore::TextureMapperGL::endScissorClip): (WebCore::TextureMapperGL::beginClip): (WebCore::TextureMapperGL::endClip): * platform/graphics/opengl/TextureMapperGL.h: (TextureMapperGL): 2012-02-01 Anders Carlsson Move the scrolling coordinator to page/scrolling https://bugs.webkit.org/show_bug.cgi?id=77590 Reviewed by Dan Bernstein. Put scrolling related files in page/scrolling to avoid cluttering the page directory. * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingCoordinator.cpp: Renamed from Source/WebCore/page/ScrollingCoordinator.cpp. * page/scrolling/ScrollingCoordinator.h: Renamed from Source/WebCore/page/ScrollingCoordinator.h. * page/scrolling/mac/ScrollingCoordinatorMac.mm: Renamed from Source/WebCore/page/mac/ScrollingCoordinatorMac.mm. 2012-02-01 Kentaro Hara Remove [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode], [v8implname] and [v8referenceattr] from code generators https://bugs.webkit.org/show_bug.cgi?id=77588 Reviewed by Adam Barth. This patch removes [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode], [v8implname] and [v8referenceattr] from code generators, since they are not used by any IDL files. No tests. No changes in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (IsConstructable): (IsConstructorTemplate): (GenerateNormalAttrGetter): (GenerateFunctionCallString): 2012-02-01 Pablo Flouret Support targetOrigin = "/" in postMessage for sending messages to same origin as source document. https://bugs.webkit.org/show_bug.cgi?id=77580 Reviewed by Adam Barth. No new tests. Modified http/tests/security/postMessage/target-origin.html to test this case as well. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): 2012-02-01 Caio Marcelo de Oliveira Filho Avoid creating NamedNodeMap unnecessarily https://bugs.webkit.org/show_bug.cgi?id=77574 Reviewed by Ryosuke Niwa. The method Element::attributes() was being used for multiple things in our codebase: (1) as the getter for NamedNodeMap exposed to DOM, (2) as a way to other WebCore code get the "attribute storage" (currently inside NamedNodeMap), and (3) as a way to get the attribute storage creating one if necessary. This commit separate the jobs in different functions: 1) attributes() keeps being the DOM getter, and loses its boolean parameter. 2) updatedAttributes() updates the invalid attributes and returns the attribute storage. If we don't have one, return 0. 3) ensureUpdatedAttributes() updates the invalid attributes and forces the creation of attribute storage to return. There is also another way to get to the attribute storage currently, via attributeMap(), which doesn't update the attributes for possible changes in Style or SVG attributes. Note that the new functions are not available in Node class, so C++ code manipulating attributes should cast to Element. This separation also made easier to spot and fix some places where we do not need to create the attribute storage if it doesn't exist. No new tests, this commit shouldn't change the behavior of existing code. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * dom/DatasetDOMStringMap.cpp: (WebCore::DatasetDOMStringMap::getNames): (WebCore::DatasetDOMStringMap::item): (WebCore::DatasetDOMStringMap::contains): * dom/Document.cpp: (WebCore::Document::importNode): * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::hasAttributes): (WebCore::Element::setAttributeNode): (WebCore::Element::setAttributeNodeNS): (WebCore::Element::removeAttributeNode): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::normalizeAttributes): * dom/Element.h: (Element): (WebCore::Element::attributes): (WebCore::Element::ensureAttributeData): (WebCore::Element::ensureUpdatedAttributes): (WebCore::Element::updatedAttributes): (WebCore::Element::setAttributesFromElement): (WebCore::Element::ensureAttributeMap): Made const to be reused by ensureUpdatedAttributes(). (WebCore::Element::updateInvalidAttributes): (WebCore): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::mapsEquivalent): Having no attributes is equivalent to not having an attribute storage because the attribute storage is lazily created. * dom/Node.cpp: (WebCore::Node::isEqualNode): Do not force the creation of attribute storage to compare two nodes. (WebCore::Node::isDefaultNamespace): Use updatedAttributes(). Since we iterate using length, it's OK if the attribute storage is empty. (WebCore::Node::lookupNamespaceURI): Ditto. (WebCore::Node::lookupNamespacePrefix): Ditto. (WebCore::Node::compareDocumentPosition): Ditto. * editing/ApplyStyleCommand.cpp: (WebCore::hasNoAttributeOrOnlyStyleAttribute): (WebCore::isEmptyFontTag): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::isRemovableBlock): Use isElementNode() explicitly to identify non-Element nodes, then use hasAttributes() if is Element. * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::highestVisuallyEquivalentDivBelowRoot): * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::appendElement): Do not create the attribute storage unnecessarily. * editing/htmlediting.cpp: (WebCore::areIdenticalElements): Do not create the attribute storage unnecessarily. Use mapsEquivalent() for comparing the attributes. * editing/markup.cpp: (WebCore::completeURLs): Do not create the attribute storage unnecessarily. (WebCore::StyledMarkupAccumulator::appendElement): Ditto. (WebCore::isPlainTextMarkup): hasAttributes() will avoid creating the attribute storage unnecessarily. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parametersForPlugin): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parametersForPlugin): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::isURLAttribute): Do not create the attribute storage unnecessarily. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): Use ensureUpdatedAttributes() since we will add new attributes. (WebCore): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::performSearch): (WebCore::InspectorDOMAgent::buildArrayForElementAttributes): * page/PageSerializer.cpp: (WebCore::isCharsetSpecifyingNode): Do not assume attributeMap will exist. * svg/properties/SVGAnimatedPropertySynchronizer.h: Use ensureUpdatedAttributes() since we will add new attributes. * xml/XPathFunctions.cpp: (WebCore::XPath::FunLang::evaluate): Do not create the attribute storage unnecessarily. * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::traversalSort): * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): Use isElementNode() instead of comparing nodeType() manually. Do not create the attribute storage unnecessarily. * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): Do not create the attribute storage unnecessarily. * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): Ditto. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::XMLTreeBuilder): Ditto. 2012-02-01 Adam Barth contentDispositionType misparses the Content-Disposition header in some obscure corner cases https://bugs.webkit.org/show_bug.cgi?id=77577 Reviewed by Eric Seidel. The contentDispositionType extracts the disposition-type from the Content-Disposition header. According to RFC 6266 (and previous RFCs), the disposition-type must be an RFC 2616 token. Rather than enforce this general rule, we had special-cased some examples (including name=foo and filename=bar). This patch generalizes our check to properly validate that the disposition-type is an RFC 2616 token. In conjunction with some other work in the Chromium network stack, this causes Chromium to pass the following tests: http://greenbytes.de/tech/tc2231/#inlonlyquoted http://greenbytes.de/tech/tc2231/#attonlyquoted Without this patch, these test cases neither trigger a navigation nor a download in Chromium. This patch does not appear to cause any visible change in Safari. (Safari passes these tests both before and after this patch.) * platform/network/HTTPParsers.cpp: (WebCore::isRFC2616Token): (WebCore::contentDispositionType): - This patch also adds a comment to filenameFromHTTPContentDisposition, which explains some of the was this function incorrectly implements the requirements in RFC 6266. Resolving these issues is a subject for a future patch. * platform/network/HTTPParsers.h: 2012-02-01 Dan Bernstein WebCore part of Paginated display does not respect page-break-{before,after} https://bugs.webkit.org/show_bug.cgi?id=77505 Reviewed by Darin Adler. * page/Page.h: (WebCore::Page::Pagination::Pagination): Added initializer for the behavesLikeColumns member variable. (WebCore::Page::Pagination::operator==): Added comparison of behavesLikeColumns values. (Pagination): Added behavesLikeColumns member variable. When set to false (the default), paginated display respects the page-break-{before,after} properties rather than the column-break-{before,after} ones. * rendering/ColumnInfo.h: (WebCore::ColumnInfo::ColumnInfo): Added initializer for the m_paginationUnit member. (WebCore::ColumnInfo::paginationUnit): Added this getter. (WebCore::ColumnInfo::setPaginationUnit): Added this setter. (ColumnInfo): Added m_paginationUnit member. It defaults to Column. * rendering/LayoutState.h: (WebCore::LayoutState::isPaginatingColumns): Changed to check the pagination unit. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Added code to set the pagination unit in the ColumnInfo. (WebCore::RenderBlock::paginationUnit): Added. The base class implementation returns Column. * rendering/RenderBlock.h: * rendering/RenderView.cpp: (WebCore::RenderView::paginationUnit): Added this override that returns Page, unless this is the RenderView for the main frame and pagination is set to behave like columns. * rendering/RenderView.h: 2012-02-01 Florin Malita Backgrounds in HTML inside foreignObject don't draw https://bugs.webkit.org/show_bug.cgi?id=23111 Reviewed by Eric Seidel. Test: svg/foreignObject/body-background.svg * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBackground): Tweak the background inhibiting logic to allow drawing when the element is embedded in FOs. 2012-02-01 Gustavo Lima Chaves Make one able to set the local storage (tracker) database dir's path https://bugs.webkit.org/show_bug.cgi?id=77006 Reviewed by Darin Adler. There are no behavior changes with the diff, so no need for new tests. * storage/StorageTracker.cpp: (WebCore::StorageTracker::setDatabaseDirectoryPath): (WebCore): (WebCore::StorageTracker::databaseDirectoryPath): * storage/StorageTracker.h: (StorageTracker): 2012-02-01 Anders Carlsson Fix Window build. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::LayerClient::platformCALayerDidCreateTiles): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles): 2012-02-01 John Yani GetMIMEDescription should return const char * https://bugs.webkit.org/show_bug.cgi?id=77297 Reviewed by Alexey Proskuryakov. No new tests. No change in behaviour. * plugins/blackberry/PluginPackageBlackBerry.cpp: (WebCore::PluginPackage::fetchInfo): * plugins/efl/PluginPackageEfl.cpp: (WebCore): (WebCore::PluginPackage::fetchInfo): * plugins/npapi.h: * plugins/npfunctions.h: * plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::fetchInfo): 2012-02-01 Timothy Hatcher Consolidate duplicate "willHide" functions in DetailedHeapshotView.js to fix a syntax error in JSC and make the Inspector open again in Release builds. https://webkit.org/b/77424 Reviewed by Brian Weinstein. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype.willHide): Consolidated. (WebInspector.DetailedHeapshotView.prototype.willHide): Removed. 2012-02-01 Justin Novosad [Chromium] Enable deferred canvas rendering in the skia port https://bugs.webkit.org/show_bug.cgi?id=76732 Reviewed by Stephen White. No new tests: covered by existing canvas layout tests Adding a new setting to enable deferred 2d canvas rendering. Added support for deferred 2d canvas rendering in ImageBufferSkia and Canvas2DLayerChromium, mostly plumbing. Deffered rendering implementation is provided by skia (class SkDeferredCanvas). * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::shouldDefer): (WebCore): (WebCore::HTMLCanvasElement::createImageBuffer): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setAccelerated2dCanvasEnabled): (WebCore): (WebCore::Settings::setDeferred2dCanvasEnabled): * page/Settings.h: (Settings): (WebCore::Settings::deferred2dCanvasEnabled): * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): (ImageBuffer): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore): (WebCore::Canvas2DLayerChromium::setCanvas): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/Canvas2DLayerChromium.h: (Canvas2DLayerChromium): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/skia/ImageBufferSkia.cpp: (AcceleratedDeviceContext): (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext): (WebCore::AcceleratedDeviceContext::prepareForDraw): (WebCore::AcceleratedDeviceContext::flush): (WebCore): (WebCore::createAcceleratedCanvas): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::ImageBuffer): 2012-02-01 Ryosuke Niwa Gcc build fix after r106482. * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): 2012-02-01 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=77383 Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with -and corresponding- Reviewed by Sam Weinig. The goal is to re-vamp didFirstVisuallyNonEmptyLayout to be more accurate. This patch adds a new heuristic called didNewFirstVisuallNonEmptyLayout and leaves the old one for the time being. That is temporary. The heuristic for didNewFirstVisuallNonEmptyLayout is to count relevant painted RenderObjects on Page. * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setPaintedObjectsCounterThreshold): (WebCore::Page::addRelevantRepaintedObject): * page/Page.h: (WebCore): (Page): (WebCore::Page::startCountingRepaintedObjects): * WebCore.exp.in: Start counting relevant painted RenderObjects on the page once the first layout is complete. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): Machinery for firing didNewFirstVisuallNonEmptyLayout. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): * loader/FrameLoader.cpp: (WebCore::FrameLoader::didNewFirstVisuallyNonEmptyLayout): (WebCore): * loader/FrameLoader.h: (FrameLoader): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): These RenderObjects are the ones that this api currently consider to be relevant. If their repaint rects intersect with the viewRect, then they are added to the relevant objects set on the Page. * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintReplaced): * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::paintReplaced): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): 2012-02-01 Alexis Menard CSSStyleDeclaration.getPropertyPriority() fails for CSS shorthand properties with 'important' priority https://bugs.webkit.org/show_bug.cgi?id=49058 Reviewed by Andreas Kling. CSSMutableStyleDeclaration::getPropertyPriority was not handling shorthands properly. Shorthands are not part of the property list of the style so we need to query the longhands which are the one added in the list. Only if the longhands have equal priority the shorthand priority is known. I also renamed getPropertyPriority (not the CSSOM exposed method) to something more consistent with WebKit naming guidelines. Test: fast/css/shorthand-priority.html * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::propertyIsImportant): (WebCore::CSSMutableStyleDeclaration::addParsedProperty): (WebCore::CSSMutableStyleDeclaration::getPropertyPriority): * css/CSSMutableStyleDeclaration.h: (CSSMutableStyleDeclaration): * editing/EditingStyle.cpp: (WebCore::EditingStyle::extractAndRemoveTextDirection): (WebCore::EditingStyle::collapseTextDecorationProperties): (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): (WebCore::setTextDecorationProperty): * editing/RemoveCSSPropertyCommand.cpp: (WebCore::RemoveCSSPropertyCommand::doApply): 2012-02-01 Ryosuke Niwa Crash in EventHandler::updateDragAndDrop https://bugs.webkit.org/show_bug.cgi?id=77569 Reviewed by Alexey Proskuryakov. Test: fast/events/remove-target-with-shadow-in-drag.html * page/EventHandler.cpp: (WebCore::EventHandler::updateDragAndDrop): 2012-02-01 Sheriff Bot Unreviewed, rolling out r106382. http://trac.webkit.org/changeset/106382 https://bugs.webkit.org/show_bug.cgi?id=77571 Causing chromium crashes in PNGImageDecoder (Requested by japhet on #webkit). * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluate): * page/Console.cpp: (WebCore::Console::time): (WebCore::Console::timeEnd): * platform/chromium/PlatformSupport.h: * platform/chromium/TraceEvent.h: (internal): (ScopeTracer): (WebCore::internal::ScopeTracer::ScopeTracer): (WebCore::internal::ScopeTracer::~ScopeTracer): 2012-02-01 Anders Carlsson Reviewed by Darin Adler. Simplify the code that creates a new tile layer by getting a reference to the RetainPtr& slot in the hash map and assign directly into it. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::revalidateTiles): 2012-02-01 Anders Carlsson Tile cache doesn't have an upper limit https://bugs.webkit.org/show_bug.cgi?id=77564 Reviewed by Darin Adler. Cache enough tiles to cover 3x the visible height and 2x the visible width of the page, and drop tiles that are outside that area. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles): Call GraphicsLayerClient::notifySyncRequired here, which will schedule a layer flush and ensure that the page layout is up to date before the new tiles are painted. * platform/graphics/ca/PlatformCALayerClient.h: Add platformCALayerDidCreateTiles member function. * platform/graphics/ca/mac/TileCache.h: Update for new/removed member functions and member variables. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): Initialize the tile revalidation timer. (WebCore::TileCache::tileCacheLayerBoundsChanged): If we don't have any tiles at all right now, revalidate the tiles immediately. Otherwise, schedule the revalidation timer. (WebCore::TileCache::setNeedsDisplayInRect): Return early if we have no tiles. (WebCore::TileCache::visibleRectChanged): Schedule tile revalidation. (WebCore::TileCache::rectForTileIndex): New helper function that returns the bounds rect of a tile given its tile index. (WebCore::TileCache::getTileIndexRangeForRect): Clamp the rect to the bounds of the tile cache layer. (WebCore::TileCache::scheduleTileRevalidation): Schedule the revalidation timer if it hasn't already been scheduled. (WebCore::TileCache::tileRevalidationTimerFired): Call revalidateTiles. (WebCore::TileCache::revalidateTiles): Compute the tile coverage rect and remove all tiles that are outside. Create new tiles for any parts of the tile coverage rect that don't have tiles already. (WebCore::TileCache::tileLayerAtIndex): Remove invalid assertions. 2012-02-01 Max Vujovic Add support for fixed and percent min-width on the table element for table-layout: auto to match Firefox and Opera's behavior. In FixedTableLayout.cpp, the computePreferredLogicalWidths method looks like it has issues based on the comment: "FIXME: This entire calculation is incorrect for both minwidth and maxwidth." (minwidth and maxwidth refer to the preferred widths, not the min-width and max-width styles). I have not implemented min-width for FixedTableLayout in this patch since it requires some more research around that comment. min-width and max-width on the table element was discussed on the www-style list: http://lists.w3.org/Archives/Public/www-style/2012Jan/0684.html min-width is not implemented on for table-layout: auto https://bugs.webkit.org/show_bug.cgi?id=76553 Reviewed by Julien Chaffraix. Test: fast/table/min-width.html * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::computePreferredLogicalWidths): If the min or max preferred logical width is less than a fixed min width style, it is set to the fixed min width style. Like a percent width style, a percent min-width style does not affect the min or max preferred logical widths computed by the table layout algorithm. RenderTable's computeLogicalWidth method handles percent min-width styles. min-width for the table-layout: fixed case has been split out into this bug: https://bugs.webkit.org/show_bug.cgi?id=76948 * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): If the RenderStyle's logical min width is defined and greater than the logical width calculation, this method sets the logical width to the logical min width. (WebCore::RenderTable::convertStyleWidthToComputedWidth): This new method generalizes and factors out logic from RenderTable::computeLogicalWidth that converted the width style to a computed value in the fixed and percent case. RenderTable::computeLogicalWidth now calls this method to determine the computed values for both the width style and the min-width style. In the future, it can also be used for the max-width style. Note that this method handles the special CSS table case, which requires borders and paddings to be included in the computed width calculation. This applies to all width styles, including width, min-width, and max-width. Before, this special case was handled in RenderTable::computeLogicalWidth. * rendering/RenderTable.h: 2012-02-01 Brian Salomon [SKIA/CHROMIUM] Perform getImageData format conversions using Skia https://bugs.webkit.org/show_bug.cgi?id=77553 Reviewed by Stephen White. Many existing canvas tests exercise this functionality. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::getImageData): 2012-02-01 Nate Chapin preventDefault() in a mousedown in a subframe should not prevent the scrollbar from handling mouse movements if the cursor leaves the subframe. https://bugs.webkit.org/show_bug.cgi?id=73097 Reviewed by Darin Adler. Test: fast/events/scroll-div-with-prevent-default-in-subframe.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): 2012-02-01 Mario Sanchez Prada [GTK] editing/inserting/4960120-2.html flaky crash https://bugs.webkit.org/show_bug.cgi?id=76815 Reviewed by Martin Robinson. Check if the node for the first parent object not ignoring accessibility is null before using it. This might happen with certain kind of accessibility objects, such as the root one (the scroller containing the webArea object as its only child). * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: (objectFocusedAndCaretOffsetUnignored): Add missing null check. 2012-02-01 Antti Koivisto Make CSSMappedAttributeDeclaration have CSSMutableStyleDeclaration instead of being one https://bugs.webkit.org/show_bug.cgi?id=77545 Reviewed by Andreas Kling. This is the easiest path for eliminating the last remaining subclass of CSSMutableStyleDeclaration. On negative side this increases memory use of CSSMappedAttributeDeclaration by one ptr and refcount (it loses the vptr) in total. This is not meant to be the end state, just an intermediate refactoring step. CSSMappedAttributeDeclaration should clearly be renamed too but this patch doesn't do that. It might not exist in its current form much longer. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::setProperty): (WebCore::CSSMutableStyleDeclaration::merge): * css/CSSMutableStyleDeclaration.h: Remove protected section. No subclasses remain. Rename setPropertyInternal() to setProperty(). All public methods here are internal. (CSSMutableStyleDeclaration): * css/CSSParser.cpp: (WebCore::CSSParser::parseMappedAttributeValue): * dom/Attribute.cpp: (WebCore::Attribute::clone): * dom/Attribute.h: (Attribute): (WebCore::Attribute::decl): (WebCore::Attribute::mappedAttributeDeclaration): (WebCore::Attribute::setMappedAttributeDeclaration): (WebCore::Attribute::Attribute): * dom/CSSMappedAttributeDeclaration.cpp: (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedProperty): (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty): * dom/CSSMappedAttributeDeclaration.h: (CSSMappedAttributeDeclaration): (WebCore::CSSMappedAttributeDeclaration::declaration): (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration): Make CSSMutableStyleDeclaration a member instead of the base class. * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::removeCSSProperty): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): (WebCore::StyledElement::addCSSLength): (WebCore::StyledElement::addCSSColor): (WebCore::StyledElement::createMappedDecl): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): 2012-02-01 Allan Sandfeld Jensen [Qt] Set all PlatformTouchPoint values possible from a QTouch event. https://bugs.webkit.org/show_bug.cgi?id=77442 Reviewed by Kenneth Rohde Christiansen. * platform/qt/PlatformTouchPointQt.cpp: (WebCore::PlatformTouchPoint::PlatformTouchPoint): 2012-02-01 Peter Rybin Web Inspector: CodeGeneratorInspector.py: move type builder code to dedicated InspectorTypeBuilder .h/.cpp https://bugs.webkit.org/show_bug.cgi?id=77471 Reviewed by Yury Semikhatsky. Code is moved physically to other file -- generator is changed accrodingly. * inspector/CodeGeneratorInspector.py: (String): (provides): (typename): (Array): 2012-02-01 Yury Semikhatsky Web Inspector: debugger reports wrong sources when paused in inline script on page reload https://bugs.webkit.org/show_bug.cgi?id=77548 V8 returns treats each script source as ending with \n, now we take this into account when reporting script line count to the inspector front-end. Reviewed by Vsevolod Vlasov. Test: inspector/debugger/pause-in-inline-script.html * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): * bindings/v8/DebuggerScript.js: 2012-02-01 Shinya Kawanaka Content element should be able to be dynamically added/removed/replaced in a shadow tree. https://bugs.webkit.org/show_bug.cgi?id=76611 Reviewed by Hajime Morita When a content element is added/removed/replaced in a shadow tree, we have to recreate the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it when content element is removed. (When added, it is recalculated.) This patch enables us to recalcurate the shadow tree when content element is removed. Test: fast/dom/shadow/content-element-move.html * dom/Element.cpp: (WebCore::Element::attach): If a shadow root exists, attaches shadow tree before attaching child elements. * dom/ShadowRoot.cpp: Added a flag to recalculate shadow tree. (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::recalcShadowTreeStyle): Recalculates light children and shadow tree. (WebCore::ShadowRoot::setNeedsReattachHostChildrenAndShadow): (WebCore::ShadowRoot::reattachHostChildrenAndShadow): Detaches shadow tree and host light children, and attaches them again. * dom/ShadowRoot.h: (WebCore::ShadowRoot::clearNeedsReattachHostChildrenAndShadow): (WebCore::ShadowRoot::needsReattachHostChildrenAndShadow): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::attach): Does not need to detach included elements, because they are not attached in ContainerNode anymore. (WebCore::HTMLContentElement::detach): When a content element detached, reattaches a shadow tree. 2012-02-01 Peter Beverloo getIntersectionList causes transforms to be recalculated in SVG https://bugs.webkit.org/show_bug.cgi?id=77179 Reviewed by Nikolas Zimmermann. Introduce a local variable to store the element's local-to-parent transformation matrix in, removing the need for the const_cast and stopping us from modifying any matrices elsewhere. Test: svg/custom/intersection-list-transforms.svg * rendering/svg/RenderSVGModelObject.cpp: (WebCore::getElementCTM): 2012-02-01 Vsevolod Vlasov Web Inspector: [InspectorIndexedDB] Add tests for database names and database structure requests. https://bugs.webkit.org/show_bug.cgi?id=77439 Reviewed by Pavel Feldman. Tests: http/tests/inspector/indexeddb/database-names.html http/tests/inspector/indexeddb/database-structure.html * inspector/front-end/IndexedDBModel.js: (WebInspector.IndexedDBModel.prototype.refreshDatabase): 2012-01-31 Vsevolod Vlasov Web Inspector: Scripts navigator becomes empty after "show folders" settings change. https://bugs.webkit.org/show_bug.cgi?id=77441 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._reset): * inspector/front-end/utilities.js: 2012-02-01 Shawn Singh Fix the semantics of passing contentsVisible flag to GraphicsLayers https://bugs.webkit.org/show_bug.cgi?id=76975 Reviewed by Simon Fraser. This patch is covered by existing tests, in particular compositing/visibility/layer-visible-content.html; its expectations are rebaselined. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2012-02-01 Philippe Normand Unreviewed, another GTK build fix after r106446. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Restore webKitWebSrcGetProtocols as it was before r106446. 2012-02-01 Philippe Normand Unreviewed, GTK build fix after r106446. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 2012-02-01 Sheriff Bot Unreviewed, rolling out r106432. http://trac.webkit.org/changeset/106432 https://bugs.webkit.org/show_bug.cgi?id=77529 it breaks tests (Requested by shinyak on #webkit). * dom/Element.cpp: (WebCore::Element::attach): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcShadowTreeStyle): * dom/ShadowRoot.h: (ShadowRoot): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::attach): (WebCore::HTMLContentElement::detach): 2012-02-01 Hayato Ito Remove unnecessary [OldStyleObjC] from ShadowRoot.idl. https://bugs.webkit.org/show_bug.cgi?id=77516 Reviewed by Kentaro Hara. No new tests. No change in behavior. * dom/ShadowRoot.idl: 2012-01-26 Philippe Normand [GStreamer] 0.11 webkitwebsrc https://bugs.webkit.org/show_bug.cgi?id=77086 Port the webkitwebsrc element to GStreamer 0.11 APIs. Reviewed by Gustavo Noronha Silva. No new tests, existing http media layout tests should cover this. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webkit_web_src_class_init): 2012-01-31 Hans Wennborg Speech Input: Report speech element rect relative to window rather than frame https://bugs.webkit.org/show_bug.cgi?id=76443 Reviewed by Darin Fisher. When requesting speech input, report the speech element rect relative to the window rather than the frame. The embedder will typically use this position to show a bubble indicating that speech recognition is in progress. Test: fast/speech/bubble-position.html * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): 2012-01-31 Andreas Kling Make elements that don't have attributes smaller. Reviewed by Sam Weinig and Antti Koivisto. Move the inline style declaration from StyledElement to ElementAttributeData, since having an inline style declaration also implies having a style attribute on the element. This saves one CPU word per element that has no attributes. This reduces memory consumption by 412 kB (on 64-bit) when viewing the full HTML5 spec at . This was rolled out once because of a performance regression which has been averted this time around by adding an Element::ensureAttributeMap() so we can force creation of the NamedNodeMap without also serializing the inline style for the "style" attribute. * dom/Element.h: (Element): (WebCore::Element::ensureAttributeMap): (WebCore): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::ensureInlineStyleDecl): (WebCore): (WebCore::NamedNodeMap::destroyInlineStyleDecl): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::inlineStyleDecl): (NamedNodeMap): * dom/StyledElement.cpp: (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (WebCore::StyledElement::inlineStyleDecl): (WebCore::StyledElement::ensureInlineStyleDecl): (StyledElement): (WebCore::StyledElement::destroyInlineStyleDecl): 2012-01-31 Hayato Ito Add APIs, getElementsByXXX family, to ShadowRoot IDL. https://bugs.webkit.org/show_bug.cgi?id=77323 Reviewed by Dimitri Glazkov. Add APIs (getElementById, getElemesntByTagName, getElementsByClassName and getElementsByTagNameNS) to ShadowRoot IDL. * dom/ShadowRoot.idl: 2012-01-31 Shinya Kawanaka Content element should be able to be dynamically added/removed/replaced in a shadow tree. https://bugs.webkit.org/show_bug.cgi?id=76611 Reviewed by Hajime Morita. When a content element is added/removed/replaced in a shadow tree, we have to recreate the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it when content element is removed. (When added, it is recalculated.) This patch enables us to recalcurate the shadow tree when content element is removed. Test: fast/dom/shadow/content-element-move.html * dom/Element.cpp: (WebCore::Element::attach): If a shadow root exists, attaches shadow tree before attaching child elements. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcShadowTreeStyle): Recalculates light children and shadow tree. (WebCore::ShadowRoot::reattachHostChildrenAndShadow): Detaches shadow tree and host light children, and attaches them again. * dom/ShadowRoot.h: Added a flag to recalculate shadow tree. (WebCore::ShadowRoot::setNeedsShadowTreeStyleRecalc): (WebCore::ShadowRoot::clearNeedsShadowTreeStyleRecalc): (WebCore::ShadowRoot::needsShadowTreeStyleRecalc): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::attach): Does not need to detach included elements, because they are not attached in ContainerNode anymore. (WebCore::HTMLContentElement::detach): When a content element detached, reattaches a shadow tree. 2012-01-31 Joe Thomas https://bugs.webkit.org/show_bug.cgi?id=76801 Listboxes incorrectly display contents when cleared and then re-populated. Whenever the number of items in the listbox is less than the size of listbox (number of visible items the listbox can accomodate), we set the listbox scroll-offset to zero. The scroll-offset of the Scrollbar should also be set to 0 so that when the listbox is re-populated, scrollbar position and the content inside the listbox are in sync. Reviewed by Andreas Kling. Tests: fast/forms/listbox-clear-restore.html * rendering/RenderListBox.cpp: (WebCore::RenderListBox::computeLogicalHeight): Setting the scroll-offset of the Scrollbar to 0 when scrollbar is not needed. 2012-01-31 Gyuyoung Kim Unreviewed. Fix build break after r106373. * CMakeLists.txt: 2012-01-31 Adam Barth HTMLPreloadScanner should understand the element https://bugs.webkit.org/show_bug.cgi?id=77231 Reviewed by Eric Seidel. Previously, the HTMLPreloadScanner would ignore the element when preloading resources. If there was a tag, this could cause the preload scanner to make a bunch of useless requests. This patch teaches the preload scanner to use tags to better predict which URLs will be used by the document. Tests: fast/preloader/first-base-tag-scanned-wins.html fast/preloader/first-base-tag-wins.html fast/preloader/understands-base-tag.html * dom/Document.cpp: (WebCore::Document::completeURL): (WebCore): * dom/Document.h: (Document): (WebCore::Document::baseElementURL): * html/parser/HTMLPreloadScanner.cpp: (WebCore::HTMLNames::PreloadTask::PreloadTask): (WebCore::HTMLNames::PreloadTask::processAttributes): (WebCore::HTMLNames::PreloadTask::preload): (WebCore::HTMLNames::PreloadTask::baseElementHref): (PreloadTask): (WebCore::HTMLPreloadScanner::scan): (WebCore::HTMLPreloadScanner::processToken): (WebCore::HTMLPreloadScanner::updatePredictedBaseElementURL): (WebCore): * html/parser/HTMLPreloadScanner.h: (HTMLPreloadScanner): 2012-01-31 Raymond Liu Dynamic allocate AudioBus with required number of channels for AudioNodeInput https://bugs.webkit.org/show_bug.cgi?id=76516 Reviewed by Kenneth Russell. No new tests required. * webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput): * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput): * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::checkNumberOfChannelsForInput): * webaudio/AudioNode.cpp: (WebCore::AudioNode::checkNumberOfChannelsForInput): * webaudio/AudioNode.h: * webaudio/AudioNodeInput.cpp: (WebCore::AudioNodeInput::AudioNodeInput): (WebCore::AudioNodeInput::updateInternalBus): (WebCore::AudioNodeInput::internalSummingBus): * webaudio/AudioNodeInput.h: 2012-01-31 Alexey Proskuryakov REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian https://bugs.webkit.org/show_bug.cgi?id=77473 Reviewed by Darin Adler. Test: platform/mac/fast/events/non-roman-key-code.html * WebCore.exp.in: * platform/mac/PlatformEventFactoryMac.h: * platform/mac/PlatformEventFactoryMac.mm: (WebCore::keyIdentifierForKeyEvent): (WebCore::windowsKeyCodeForKeyEvent): Export functions for reuse in WebKit2. I did not attempt any larger refactoring at this time. 2012-01-31 Gregg Tavares Make WebGL put synthesized errors in the JS console https://bugs.webkit.org/show_bug.cgi?id=77267 Reviewed by Kenneth Russell. No new functionality so no new tests. * html/canvas/WebGLCompressedTextures.cpp: (WebCore::WebGLCompressedTextures::validateCompressedTexFuncData): (WebCore::WebGLCompressedTextures::compressedTexImage2D): (WebCore::WebGLCompressedTextures::compressedTexSubImage2D): * html/canvas/WebGLCompressedTextures.h: (WebGLCompressedTextures): * html/canvas/WebGLDebugShaders.cpp: (WebCore::WebGLDebugShaders::getTranslatedShaderSource): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::activeTexture): (WebCore::WebGLRenderingContext::attachShader): (WebCore::WebGLRenderingContext::bindAttribLocation): (WebCore::WebGLRenderingContext::checkObjectToBeBound): (WebCore::WebGLRenderingContext::bindBuffer): (WebCore::WebGLRenderingContext::bindFramebuffer): (WebCore::WebGLRenderingContext::bindRenderbuffer): (WebCore::WebGLRenderingContext::bindTexture): (WebCore::WebGLRenderingContext::blendEquation): (WebCore::WebGLRenderingContext::blendEquationSeparate): (WebCore::WebGLRenderingContext::blendFunc): (WebCore::WebGLRenderingContext::blendFuncSeparate): (WebCore::WebGLRenderingContext::bufferData): (WebCore::WebGLRenderingContext::bufferSubData): (WebCore::WebGLRenderingContext::checkFramebufferStatus): (WebCore::WebGLRenderingContext::clear): (WebCore::WebGLRenderingContext::compileShader): (WebCore::WebGLRenderingContext::compressedTexImage2D): (WebCore::WebGLRenderingContext::compressedTexSubImage2D): (WebCore::WebGLRenderingContext::copyTexImage2D): (WebCore::WebGLRenderingContext::copyTexSubImage2D): (WebCore::WebGLRenderingContext::createShader): (WebCore::WebGLRenderingContext::deleteObject): (WebCore::WebGLRenderingContext::depthRange): (WebCore::WebGLRenderingContext::detachShader): (WebCore::WebGLRenderingContext::disable): (WebCore::WebGLRenderingContext::disableVertexAttribArray): (WebCore::WebGLRenderingContext::validateWebGLObject): (WebCore::WebGLRenderingContext::drawArrays): (WebCore::WebGLRenderingContext::drawElements): (WebCore::WebGLRenderingContext::enable): (WebCore::WebGLRenderingContext::enableVertexAttribArray): (WebCore::WebGLRenderingContext::framebufferRenderbuffer): (WebCore::WebGLRenderingContext::framebufferTexture2D): (WebCore::WebGLRenderingContext::generateMipmap): (WebCore::WebGLRenderingContext::getActiveAttrib): (WebCore::WebGLRenderingContext::getActiveUniform): (WebCore::WebGLRenderingContext::getAttachedShaders): (WebCore::WebGLRenderingContext::getAttribLocation): (WebCore::WebGLRenderingContext::getBufferParameter): (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): (WebCore::WebGLRenderingContext::getParameter): (WebCore::WebGLRenderingContext::getProgramParameter): (WebCore::WebGLRenderingContext::getProgramInfoLog): (WebCore::WebGLRenderingContext::getRenderbufferParameter): (WebCore::WebGLRenderingContext::getShaderParameter): (WebCore::WebGLRenderingContext::getShaderInfoLog): (WebCore::WebGLRenderingContext::getShaderSource): (WebCore::WebGLRenderingContext::getTexParameter): (WebCore::WebGLRenderingContext::getUniform): (WebCore::WebGLRenderingContext::getUniformLocation): (WebCore::WebGLRenderingContext::getVertexAttrib): (WebCore::WebGLRenderingContext::hint): (WebCore::WebGLRenderingContext::isEnabled): (WebCore::WebGLRenderingContext::linkProgram): (WebCore::WebGLRenderingContext::pixelStorei): (WebCore::WebGLRenderingContext::readPixels): (WebCore::WebGLRenderingContext::renderbufferStorage): (WebCore::WebGLRenderingContext::scissor): (WebCore::WebGLRenderingContext::shaderSource): (WebCore::WebGLRenderingContext::stencilFunc): (WebCore::WebGLRenderingContext::stencilFuncSeparate): (WebCore::WebGLRenderingContext::stencilMaskSeparate): (WebCore::WebGLRenderingContext::texImage2DBase): (WebCore::WebGLRenderingContext::texImage2DImpl): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::videoFrameToImage): (WebCore::WebGLRenderingContext::texParameter): (WebCore::WebGLRenderingContext::texSubImage2DBase): (WebCore::WebGLRenderingContext::texSubImage2DImpl): (WebCore::WebGLRenderingContext::texSubImage2D): (WebCore::WebGLRenderingContext::uniform1f): (WebCore::WebGLRenderingContext::uniform1fv): (WebCore::WebGLRenderingContext::uniform1i): (WebCore::WebGLRenderingContext::uniform1iv): (WebCore::WebGLRenderingContext::uniform2f): (WebCore::WebGLRenderingContext::uniform2fv): (WebCore::WebGLRenderingContext::uniform2i): (WebCore::WebGLRenderingContext::uniform2iv): (WebCore::WebGLRenderingContext::uniform3f): (WebCore::WebGLRenderingContext::uniform3fv): (WebCore::WebGLRenderingContext::uniform3i): (WebCore::WebGLRenderingContext::uniform3iv): (WebCore::WebGLRenderingContext::uniform4f): (WebCore::WebGLRenderingContext::uniform4fv): (WebCore::WebGLRenderingContext::uniform4i): (WebCore::WebGLRenderingContext::uniform4iv): (WebCore::WebGLRenderingContext::uniformMatrix2fv): (WebCore::WebGLRenderingContext::uniformMatrix3fv): (WebCore::WebGLRenderingContext::uniformMatrix4fv): (WebCore::WebGLRenderingContext::useProgram): (WebCore::WebGLRenderingContext::validateProgram): (WebCore::WebGLRenderingContext::vertexAttrib1f): (WebCore::WebGLRenderingContext::vertexAttrib1fv): (WebCore::WebGLRenderingContext::vertexAttrib2f): (WebCore::WebGLRenderingContext::vertexAttrib2fv): (WebCore::WebGLRenderingContext::vertexAttrib3f): (WebCore::WebGLRenderingContext::vertexAttrib3fv): (WebCore::WebGLRenderingContext::vertexAttrib4f): (WebCore::WebGLRenderingContext::vertexAttrib4fv): (WebCore::WebGLRenderingContext::vertexAttribPointer): (WebCore::WebGLRenderingContext::viewport): (WebCore::WebGLRenderingContext::forceLostContext): (WebCore::WebGLRenderingContext::loseContextImpl): (WebCore::WebGLRenderingContext::forceRestoreContext): (WebCore::WebGLRenderingContext::validateTextureBinding): (WebCore::WebGLRenderingContext::validateLocationLength): (WebCore::WebGLRenderingContext::validateSize): (WebCore::WebGLRenderingContext::validateString): (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): (WebCore::WebGLRenderingContext::validateTexFuncLevel): (WebCore::WebGLRenderingContext::validateTexFuncParameters): (WebCore::WebGLRenderingContext::validateTexFuncData): (WebCore::WebGLRenderingContext::validateDrawMode): (WebCore::WebGLRenderingContext::validateStencilSettings): (WebCore::WebGLRenderingContext::validateStencilFunc): (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): (WebCore::WebGLRenderingContext::validateBlendEquation): (WebCore::WebGLRenderingContext::validateBlendFuncFactors): (WebCore::WebGLRenderingContext::validateCapability): (WebCore::WebGLRenderingContext::validateUniformParameters): (WebCore::WebGLRenderingContext::validateUniformMatrixParameters): (WebCore::WebGLRenderingContext::validateBufferDataParameters): (WebCore::WebGLRenderingContext::validateHTMLImageElement): (WebCore::WebGLRenderingContext::vertexAttribfImpl): (WebCore::WebGLRenderingContext::vertexAttribfvImpl): (WebCore::WebGLRenderingContext::maybeRestoreContext): (WebCore): (WebCore::WebGLRenderingContext::synthesizeGLError): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-01-31 Raymond Liu Clean up m_processLock logic in AudioBasicProcessorNode and AudioGainNode https://bugs.webkit.org/show_bug.cgi?id=76772 Reviewed by Kenneth Russell. No new tests required. * webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::process): (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput): * webaudio/AudioBasicProcessorNode.h: * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::process): (WebCore::AudioGainNode::checkNumberOfChannelsForInput): * webaudio/AudioGainNode.h: (AudioGainNode): 2012-01-31 Adam Klein ProcessingInstruction should not be a ContainerNode https://bugs.webkit.org/show_bug.cgi?id=75141 Reviewed by Darin Adler. Per the DOM spec, ProcessingInstruction can't have any children. And the WebCore behavior already matches the spec by always returning false for childTypeAllowed(). This change simplifies ProcessingInstruction's implementation by making it subclass Node instead of ContainerNode. Test: fast/dom/processing-instruction-appendChild-exceptions.xhtml * dom/ContainerNode.cpp: Moved dispatchBeforeLoadEvent up to Node. * dom/ContainerNode.h: * dom/Node.cpp: (WebCore::Node::dispatchBeforeLoadEvent): Moved up from ContainerNode since it's used both by ProcessingInstruction and various Element subclasses. * dom/Node.h: * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::ProcessingInstruction): Call Node constructor. (WebCore::ProcessingInstruction::insertedIntoDocument): Call Node impl. (WebCore::ProcessingInstruction::removedFromDocument): ditto. (WebCore::ProcessingInstruction::finishParsingChildren): ditto. * dom/ProcessingInstruction.h: 2012-01-31 Matthew Delaney Failing 2d.shadow.enable.off.2.html on Lion https://bugs.webkit.org/show_bug.cgi?id=77489 Reviewed by Dan Bernstein. The canvas spec requires that shadows not be drawn under certain circumstances outlined here: http://www.whatwg.org/specs/web-apps/current-work/#shadows This patch adds in those checks which allows us to pass now (on Lion) the philip canvas test that was checking that constraint. No new tests. Unskipping the test on Lion that this patch fixes. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault): (WebCore::CanvasRenderingContext2D::setShadow): (WebCore::CanvasRenderingContext2D::applyShadow): (WebCore::CanvasRenderingContext2D::shouldDrawShadows): * html/canvas/CanvasRenderingContext2D.h: (CanvasRenderingContext2D): 2012-01-31 Anders Carlsson TileCache::setNeedsDisplayInRect cleanup https://bugs.webkit.org/show_bug.cgi?id=77486 Reviewed by Andreas Kling. * platform/graphics/ca/mac/TileCache.h: * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setNeedsDisplayInRect): TileCache::tileLayerAtIndex can in the future return nil, so cope with that. Also, replace nested if statements with continue statements. (WebCore::TileCache::getTileIndexRangeForRect): Rename this to better indicate that it returns a range of indices. 2012-01-31 Dana Jansens Add contains() test to Region https://bugs.webkit.org/show_bug.cgi?id=72294 Reviewed by Anders Carlsson. * platform/graphics/Region.cpp: (WebCore::Region::contains): (WebCore): * platform/graphics/Region.h: (Region): (Shape): (WebCore::operator==): (WebCore): 2012-01-31 Sami Kyostila [chromium] Compositor debug borders are not scaled correctly https://bugs.webkit.org/show_bug.cgi?id=77468 Use CCLayerImpl::contentBounds() instead of CCLayerImpl::bounds() to calculate debug border geometry so that the borders are properly scaled. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendDebugBorderQuad): 2012-01-31 Sheriff Bot Unreviewed, rolling out r106376. http://trac.webkit.org/changeset/106376 https://bugs.webkit.org/show_bug.cgi?id=77481 Broke WebGLLayerChromiumTest in webkit_unit_tests (Requested by kbr_google on #webkit). * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore): (WebCore::DrawingBuffer::reset): 2012-01-31 Mihnea Ovidenie [CSSRegions]Reduce the cases when the box style in region is computed https://bugs.webkit.org/show_bug.cgi?id=77446 Reviewed by David Hyatt. Covered by existing region style tests. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::setRegionBoxesRegionStyle): (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle): 2012-01-31 Anders Carlsson Put tiles in a HashMap https://bugs.webkit.org/show_bug.cgi?id=77480 Reviewed by Antti Koivisto. Put tiles in a hash map keyed off the tile index. * platform/graphics/ca/mac/TileCache.h: Shuffle member variables around so the order makes more sense. Add the tile map. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): Update member initializers. (WebCore::TileCache::setNeedsDisplayInRect): Call tileLayerAtIndex instead of tileLayerAtPosition. (WebCore::TileCache::setAcceleratesDrawing): (WebCore::TileCache::setTileDebugBorderWidth): (WebCore::TileCache::setTileDebugBorderColor): Iterate over the hash map instead of the sublayers. (WebCore::TileCache::resizeTileGrid): Add the created layers to the map. (WebCore::TileCache::tileLayerAtIndex): Rename from tileLayerAtPoint to better reflect that this member function returns a tile layer at the given index and not the given point. 2012-01-31 Antti Koivisto Make CSSOM style() return CSSStyleDeclaration* https://bugs.webkit.org/show_bug.cgi?id=77475 Reviewed by Anders Carlsson CSSStyleRule::style() and some other places return CSSMutableStyleDeclaration. They should return the plain CSSOM type instead. CSSMutableStyleDeclaration* should be available through non-CSSOM function. * css/CSSFontFaceRule.h: (WebCore::CSSFontFaceRule::style): (WebCore::CSSFontFaceRule::declaration): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSStyleRule.h: (WebCore::CSSStyleRule::style): (WebCore::CSSStyleRule::declaration): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForKeyframe): * css/WebKitCSSKeyframeRule.h: (WebCore): (WebCore::WebKitCSSKeyframeRule::style): (WebCore::WebKitCSSKeyframeRule::declaration): (WebKitCSSKeyframeRule): * editing/EditingStyle.cpp: (WebCore::styleFromMatchedRulesForElement): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::revalidateStyle): * page/PageSerializer.cpp: (WebCore::PageSerializer::retrieveResourcesForCSSRule): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::parseMappedAttribute): (WebCore::SVGFontFaceElement::fontFamily): (WebCore::SVGFontFaceElement::rebuildFontFace): 2012-01-31 Scott Graham [Chromium] Remove references to gyp cygwin build target https://bugs.webkit.org/show_bug.cgi?id=77253 Reviewed by Julien Chaffraix. Target dependency is no longer required, it's done earlier in the build process. * WebCore.gyp/WebCore.gyp: 2012-01-31 Jon Lee Hidden form elements do not save their state prior to form submission https://bugs.webkit.org/show_bug.cgi?id=77391 Reviewed by Brady Eidson. Test: fast/forms/state-restore-hidden.html * html/HiddenInputType.cpp: Teach hidden inputs to save and restore their state. (WebCore::HiddenInputType::saveFormControlState): (WebCore::HiddenInputType::restoreFormControlState): * html/HiddenInputType.h: (HiddenInputType): 2012-01-31 Joshua Bell IndexedDB: IDBCursor.update() should raise exception if key changed https://bugs.webkit.org/show_bug.cgi?id=76952 Move the test from the async task to the synchronous call, per spec. Also re-ordered the tests done during the synchronous call and the asynchronous task to follow the spec order. Reviewed by Tony Chang. Tests: storage/indexeddb/cursor-update.html * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): Added check during update() call, order checks per spec. (WebCore::IDBObjectStoreBackendImpl::putInternal): Move effective key calculation inline. * storage/IDBObjectStoreBackendImpl.h: Removed selectKeyForPut method. 2012-01-31 Anders Carlsson Inform the tile cache whenever the visible rect changes https://bugs.webkit.org/show_bug.cgi?id=77470 Reviewed by Andreas Kling. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::visibleRectChanged): Add empty function. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::visibleRectChanged): Call through to the PlatformCALayer. * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::visibleRectChanged): Call through to the underlying WebTileCacheLayer. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::visibleRectChanged): Add empty stub. (WebCore::TileCache::visibleRect): Add new (currently unused) helper function that returns the visible rect of the tile cache layer. * platform/graphics/ca/mac/WebTileCacheLayer.h: * platform/graphics/ca/mac/WebTileCacheLayer.mm: (-[WebTileCacheLayer visibleRectChanged]): Call through to the TielCache object. * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayer::visibleRectChanged): Add stub. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidScroll): Call GraphicsLayer::visibleRectChanged. 2012-01-31 Antti Koivisto Remove CSSStyleDeclaration isElementStyleDeclaration bit https://bugs.webkit.org/show_bug.cgi?id=77460 Reviewed by Andreas Kling. Inline style declaration is now the only type of style declaration with element parent. We can remove the bit and the associated logic. * bindings/js/JSDOMBinding.h: (WebCore::root): * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration): (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc): * css/CSSMutableStyleDeclaration.h: (WebCore::CSSMutableStyleDeclaration::createInline): (CSSMutableStyleDeclaration): * css/CSSStyleDeclaration.cpp: (WebCore::CSSStyleDeclaration::CSSStyleDeclaration): (WebCore): (WebCore::CSSStyleDeclaration::parentStyleSheet): * css/CSSStyleDeclaration.h: (WebCore::CSSStyleDeclaration::parentRule): (WebCore::CSSStyleDeclaration::clearParentRule): (WebCore::CSSStyleDeclaration::parentElement): (WebCore::CSSStyleDeclaration::clearParentElement): (CSSStyleDeclaration): 2012-01-31 Dana Jansens [chromium] Compute occlusion during paint loop https://bugs.webkit.org/show_bug.cgi?id=76858 Reviewed by James Robinson. New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp * platform/graphics/FloatRect.cpp: (WebCore::enclosedIntRect): (WebCore): * platform/graphics/FloatRect.h: (WebCore): * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/Canvas2DLayerChromium.h: (Canvas2DLayerChromium): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.h: (ImageLayerChromium): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::contentToScreenSpaceTransform): (WebCore): (WebCore::LayerChromium::addSelfToOccludedScreenSpace): (WebCore::LayerChromium::isPaintedAxisAlignedInScreen): * platform/graphics/chromium/LayerChromium.h: (WebCore): (WebCore::LayerChromium::paintContentsIfDirty): (LayerChromium): * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace): * platform/graphics/chromium/TiledLayerChromium.h: (WebCore): (): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintContentsIfDirty): (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): (RenderSurfaceRegion): (WebCore): (WebCore::pushTargetRenderSurfaceRegion): (WebCore::popAndPushTargetRenderSurfaceRegion): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (): * platform/graphics/chromium/cc/CCQuadCuller.cpp: 2012-01-31 John Bates [Chromium] Add chromium-style tracing support https://bugs.webkit.org/show_bug.cgi?id=76885 Reviewed by Darin Fisher. This code enables WebKit trace events to pass through more data to the chromium platform tracing API and generally to use the full tracing API provided by chromium. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluate): Replace old tracing API. * page/Console.cpp: (WebCore::Console::time): Replace old tracing API. (WebCore::Console::timeEnd): Replace old tracing API. * platform/chromium/PlatformSupport.h: * platform/chromium/TraceEvent.h: (WebCore::TraceEvent::TraceID::TraceID): (WebCore::TraceEvent::TraceID::data): (WebCore::TraceEvent::TraceStringWithCopy::TraceStringWithCopy): (WebCore::TraceEvent::TraceStringWithCopy::operator const char* ): (WebCore::TraceEvent::setTraceValue): (WebCore::TraceEvent::addTraceEvent): (WebCore::TraceEvent::TraceEndOnScopeClose::TraceEndOnScopeClose): (WebCore::TraceEvent::TraceEndOnScopeClose::~TraceEndOnScopeClose): (WebCore::TraceEvent::TraceEndOnScopeClose::initialize): (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::TraceEndOnScopeCloseThreshold): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::~TraceEndOnScopeCloseThreshold): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::initialize): (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::addEventIfEnabled): 2012-01-31 Ryosuke Niwa Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block https://bugs.webkit.org/show_bug.cgi?id=77077 Reviewed by Enrica Casucci. The crash was caused by a missing null check after removing the position out of the start block. Fixed the bug by adding an early return. Tests: editing/deleting/delete-start-block.html editing/selection/move-into-empty-root-inline-box.html * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete): 2012-01-31 Rafael Brandao HTMLIsIndexElement should not expose HTMLInputElement properties https://bugs.webkit.org/show_bug.cgi?id=76095 Reviewed by Eric Seidel. This is a buildfix for r106373. * DerivedSources.pri: Removed reference to HTMLIsIndexElement.idl 2012-01-31 Yongsheng Zhu WebGL must allocate smaller drawing buffer when the allocation fails. https://bugs.webkit.org/show_bug.cgi?id=76654 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/drawingbuffer-test.html * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore): (WebCore::DrawingBuffer::create): (WebCore::DrawingBuffer::reset): 2012-01-25 Eric Seidel HTMLIsIndexElement should not expose HTMLInputElement properties https://bugs.webkit.org/show_bug.cgi?id=76095 Reviewed by Adam Barth. document.createElement("isindex") should produce an HTMLUnknownElement per the HTML5 spec. The parser automagically translates into a whole dom tree roughly representing what used to do 15 years ago. :) This patch just removes our support for HTMLIsIndexElement. The parser support was already in. Having support for HTMLIsIndexElement was causing one of the IE TestCenter tests to fail. Test: fast/dom/HTMLIsIndexElement/prototype-chain.html * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: (WebKit::createHTMLElementWrapper): * bindings/objc/DOM.mm: (WebCore::createElementClassMap): * bindings/objc/DOMHTML.h: * bindings/objc/PublicDOMInterfaces.h: * html/HTMLElementsAllInOne.cpp: * html/HTMLIsIndexElement.cpp: Removed. * html/HTMLIsIndexElement.h: Removed. * html/HTMLIsIndexElement.idl: Removed. * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-01-31 Alexis Menard Unreviewed include cleanup. Tested locally on Qt and Chromium port. * dom/Node.cpp: 2012-01-31 Arko Saha The spec renamed addTrack() to addTextTrack(). https://bugs.webkit.org/show_bug.cgi?id=77381 Reviewed by Eric Carlson. Renamed addTrack() to addTextTrack(). Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#media-elements * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::addTextTrack): * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::addTextTrack): * html/HTMLMediaElement.idl: 2012-01-31 Peter Rybin Web Inspector: CodeGeneratorInspector.py: reimplement generated array types https://bugs.webkit.org/show_bug.cgi?id=77289 Reviewed by Vsevolod Vlasov. Arrays are now rendered as a single template class. Its type-specific details are provided by an additional ArrayItemHelper class that is defined using C++ specialization technique. * inspector/CodeGeneratorInspector.py: (RawTypes.String): (RawTypes.String.get_array_item_raw_c_type_text): (RawTypes.Int): (RawTypes.Int.get_array_item_raw_c_type_text): (RawTypes.Number): (RawTypes.Number.get_array_item_raw_c_type_text): (RawTypes.Bool): (RawTypes.Bool.get_array_item_raw_c_type_text): (RawTypes.Object): (RawTypes.Object.get_array_item_raw_c_type_text): (RawTypes.Any): (RawTypes.Any.get_array_item_raw_c_type_text): (RawTypes.Array): (RawTypes.Array.get_array_item_raw_c_type_text): (RawTypes): (TypeBindings.create_type_declaration_.EnumBinding): (TypeBindings.create_type_declaration_.EnumBinding.get_array_item_c_type_text): (TypeBindings.create_type_declaration_.PlainString): (TypeBindings.create_type_declaration_.PlainString.get_array_item_c_type_text): (TypeBindings.create_type_declaration_.TypedefString): (TypeBindings.create_type_declaration_.TypedefString.get_array_item_c_type_text): (StructItemTraits): (get_array_item_c_type_text): (PlainObjectBinding): (PlainObjectBinding.get_array_item_c_type_text): (AdHocTypeContext): (AdHocTypeContext.get_type_name_fix): (AdHocTypeContext.add_type): (ArrayBinding): (ArrayBinding.resolve_inner): (ArrayBinding.resolve_inner.ResolveData): (ArrayBinding.request_user_runtime_cast): (ArrayBinding.request_internal_runtime_cast): (ArrayBinding.get_code_generator): (ArrayBinding.get_code_generator.CodeGenerator): (ArrayBinding.get_code_generator.CodeGenerator.generate_type_builder): (ArrayBinding.get_code_generator.CodeGenerator.generate_forward_declaration): (ArrayBinding.get_code_generator.CodeGenerator.register_use): (ArrayBinding.get_code_generator.CodeGenerator.get_generate_pass_id): (ArrayBinding.get_validator_call_text): (ArrayBinding.get_in_c_type_text): (ArrayBinding.get_array_item_c_type_text): (ArrayBinding.get_setter_value_expression_pattern): (ArrayBinding.reduce_to_raw_type): (RawTypeBinding.get_array_item_c_type_text): (ArrayItemHelper): (typename): (ArrayOf): (Traits): 2012-01-31 Antti Koivisto Parent SVGFontFaceElements style declaration to the rule https://bugs.webkit.org/show_bug.cgi?id=77421 Reviewed by Adam Roben. For some reason the declaration is parented to the element which adds a bunch of unnecessary special case code. The invalidation on mutation is done explicitly by SVGFontFaceElement so that is not affected. The declaration is not exposed so the change is not observable with a test. * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::~CSSFontFaceRule): * css/CSSMutableStyleDeclaration.h: (WebCore::CSSMutableStyleDeclaration::createInline): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::SVGFontFaceElement): (WebCore::SVGFontFaceElement::parseMappedAttribute): (WebCore::SVGFontFaceElement::fontFamily): (WebCore::SVGFontFaceElement::rebuildFontFace): * svg/SVGFontFaceElement.h: Remove the unnecessary m_styleDeclaration field, access through m_fontFaceRule instead. 2012-01-31 Kenneth Rohde Christiansen Tap highlighting: Support better outlines for multiline inlines https://bugs.webkit.org/show_bug.cgi?id=77428 Reviewed by Simon Hausmann. Covered by manual tests. Do not use the linesBoundingBox anymore but draw a custom path with rounded corners. Inlines are drawn as max 3 rects, first line rect, joined middle rect and the rect for the last line. * page/GestureTapHighlighter.cpp: * platform/graphics/Path.h: Make addBeziersForRoundedRect public. 2012-01-31 Alexei Filippov Web Inspector: show sizes in bytes instead of KB, MB in heap profiler. https://bugs.webkit.org/show_bug.cgi?id=77199 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData): (WebInspector.HeapSnapshotConstructorNode.prototype.get data): (WebInspector.HeapSnapshotDiffNode.prototype.get data): * inspector/front-end/UIUtils.js: (Number.withThousandsSeparator): 2012-01-26 Hans Wennborg Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation https://bugs.webkit.org/show_bug.cgi?id=77083 Reviewed by Darin Fisher. Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree implementation. No new tests, just refactoring. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/mock/SpeechInputClientMock.cpp: Removed. * platform/mock/SpeechInputClientMock.h: Removed. 2012-01-31 Pavel Feldman Web Inspector: boost protocol version to 1.0 https://bugs.webkit.org/show_bug.cgi?id=77408 Reviewed by Yury Semikhatsky. * inspector/Inspector-1.0.json: Copied from Source/WebCore/inspector/Inspector.json. * inspector/Inspector.json: 2012-01-31 Roland Steiner