2011-10-07 Martin Robinson [Freetype] Pseudo-italics do not work https://bugs.webkit.org/show_bug.cgi?id=40856 Reviewed by Philippe Normand. * platform/graphics/freetype/FontPlatformData.h: Add the font description as an argument initializeWithFontFace. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::FontPlatformData): Pass the font description to initializeWithFontFace. (WebCore::FontPlatformData::initializeWithFontFace): If we were asked for an italic font and we were given one that wasn't oblique or italic, activate the synthetic oblique bit. 2011-10-07 Philippe Normand [GStreamer] avoid direct access to GstMessage structure field https://bugs.webkit.org/show_bug.cgi?id=69629 Reviewed by Martin Robinson. Use gst_message_get_structure() instead of direct access to the structure field. No direct benefit apart from compatibility with GStreamer 0.11. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::gstGWorldSyncMessageCallback): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): (WebCore::MediaPlayerPrivateGStreamer::mediaLocationChanged): 2011-10-07 Pavel Feldman Web Inspector: add timeline panel to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69628 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/SidebarTreeElement.js: (WebInspector.SidebarTreeElement): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceHTMLTokenizer.js: (WebInspector.SourceHTMLTokenizer.prototype.nextToken): * inspector/front-end/SourceHTMLTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken): * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/TimelineGrid.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createEventDivider): (WebInspector.TimelinePanel.prototype._addRecordToTimeline): (WebInspector.TimelinePanel.prototype._findParentRecord): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype.updateMainViewWidth): (WebInspector.TimelinePanel.prototype.onResize): (WebInspector.TimelinePanel.prototype._windowChanged): (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelineRecordGraphRow.prototype._onClick): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-10-07 Sheriff Bot Unreviewed, rolling out r96892. http://trac.webkit.org/changeset/96892 https://bugs.webkit.org/show_bug.cgi?id=69626 it broke windows canary bots (Requested by podivilov on #webkit). * WebCore.gyp/scripts/rule_binding.py: 2011-10-07 Andreas Kling Shrink StyleInheritedData. https://bugs.webkit.org/show_bug.cgi?id=69625 Reviewed by Antti Koivisto. Rearrange the members of StyleInheritedData to fold as much as possible into the padding at the end of RefCounted. This shrinks StyleInheritedData by 8 bytes on 64-bit, reducing memory consumption by 500 kB when loading the full HTML5 spec. * rendering/style/StyleInheritedData.cpp: (WebCore::StyleInheritedData::StyleInheritedData): * rendering/style/StyleInheritedData.h: 2011-10-07 Pavel Feldman Web Inspector: make ScriptsPanel compile https://bugs.webkit.org/show_bug.cgi?id=69623 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update): (WebInspector.CallStackSidebarPane.prototype._placardSelected): * inspector/front-end/DebuggerModel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): * inspector/front-end/KeyboardShortcut.js: * inspector/front-end/Object.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/StatusBarButton.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update.appendResult): (WebInspector.WatchExpressionsSection.prototype.update): (WebInspector.WatchExpressionTreeElement.prototype.startEditing): * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.WorkerManager.prototype._pageInspectorClosing): (WebInspector.DedicatedWorkerMessageForwarder.prototype._receiveMessage): * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkersSidebarPane.prototype.removeWorker): * inspector/front-end/externs.js: (WebInspector.linkifyURL): (InjectedFakeWorker): * inspector/front-end/inspector.js: 2011-10-07 Sheriff Bot Unreviewed, rolling out r96879. http://trac.webkit.org/changeset/96879 https://bugs.webkit.org/show_bug.cgi?id=69618 Broke CCLayerTreeHostTestShortlived1 on chromium mac. (Requested by podivilov on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-07 Pavel Feldman Web Inspector: add ResourcesPanel to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69612 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid): * inspector/front-end/NetworkPanel.js: * inspector/front-end/ResourceView.js: * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): (WebInspector.ResourcesPanel.prototype.showResource): (WebInspector.BaseStorageTreeElement.prototype.isEventWithinDisclosureTriangle): (WebInspector.FrameTreeElement.prototype.frameNavigated): (WebInspector.StorageCategoryView): (WebInspector.SearchResultsTreeElementsTraverser.prototype.last): * inspector/front-end/externs.js: (WebInspector.openRequestInNetworkPanel): 2011-10-07 Sheriff Bot Unreviewed, rolling out r96909. http://trac.webkit.org/changeset/96909 https://bugs.webkit.org/show_bug.cgi?id=69616 Broke chromium mac compilation (Requested by podivilov on #webkit). * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-07 Vsevolod Vlasov Web Inspector: Element highlighting does not highlight padding/border/margin for inline elements. https://bugs.webkit.org/show_bug.cgi?id=69558 Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-10-07 Mario Sanchez Prada [GTK] Don't expose objects with unknown role on GTK https://bugs.webkit.org/show_bug.cgi?id=69561 Reviewed by Chris Fleizach. Ignore accessibility objects in accessibilityPlatformIncludesObject. Test: platform/gtk/accessibility/unknown-roles-not-exposed.html * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): For unknown accessibility objects, return IgnoreObject. 2011-10-07 Pavel Feldman Web Inspector: add Elements and Network panels to the compilation https://bugs.webkit.org/show_bug.cgi?id=69604 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked): (WebInspector.XHRBreakpointsSidebarPane.prototype._labelClicked): * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMBreakpointsSidebarPane.js: * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._startEditingConfig): * inspector/front-end/Drawer.js: * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._hideSearchHighlights): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes.collapseDimmed): (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes): (WebInspector.ElementsPanel.prototype._registerShortcuts): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): (WebInspector.ElementsTreeElement.prototype._startEditingTextNode): (WebInspector.ElementsTreeElement.prototype._startEditingTagName): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): * inspector/front-end/GoToLineDialog.js: (WebInspector.GoToLineDialog._show): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype.startEditing): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._onLoadEventFired): (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired): (WebInspector.NetworkLogView.prototype._updateOffscreenRows): (WebInspector.NetworkLogView.prototype._removeAllNodeHighlights): (WebInspector.NetworkPanel.prototype._resourceByAnchor): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.startEditing): * inspector/front-end/Panel.js: * inspector/front-end/Popover.js: * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._editBreakpointCondition): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/TimelineGrid.js: * inspector/front-end/UIUtils.js: (WebInspector.EditingConfig): (WebInspector.startEditing.editingCancelled): (WebInspector.startEditing.editingCommitted): (WebInspector.formatLocalized): (WebInspector.openLinkExternallyLabel): (WebInspector.openInNetworkPanelLabel): (WebInspector.copyLinkAddressLabel): * inspector/front-end/externs.js: (WebInspector.extensionServer.notifyObjectSelected): (WebInspector.openResource): * inspector/front-end/inspector.js: (WebInspector.resourceForURL): 2011-10-07 Anna Cavender Change enum value names for TextTrack::readyState and TextTrack::mode https://bugs.webkit.org/show_bug.cgi?id=69603 Reviewed by David Levin. No new tests. No new functionality. * html/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::trackLoadStarted): (WebCore::LoadableTextTrack::trackLoadError): (WebCore::LoadableTextTrack::trackLoadCompleted): * html/TextTrack.cpp: (WebCore::TextTrack::TextTrack): (WebCore::TextTrack::setMode): * html/TextTrack.h: 2011-10-07 Anna Cavender Adding parens in WebVTTParser.cpp to appease compiler preferences. https://bugs.webkit.org/show_bug.cgi?id=69602 Reviewed by David Levin. No new tests. No new functionality. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2011-10-06 Antoine Labour Webkit API for compositor https://bugs.webkit.org/show_bug.cgi?id=69107 Reviewed by Darin Fisher. Covered by existing compositing tests. * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-06 Kent Tamura Remove SelectElement class https://bugs.webkit.org/show_bug.cgi?id=69518 Reviewed by Ryosuke Niwa. SelectElement used to be an abstract class for HTMLSelectElement and WMLSelectElement. SelectElement is not needed anymore because WML was removed. This patch just removes SelectElement by moving SelectElement functions to HTMLSelectElement. No new tests. Just a refactoring. * WebCore.vcproj/WebCore.vcproj: Rename dom\SelectElementWin.cpp to html\HTMLSelectElementWin.cpp. * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::setSelected): Remove unnecessary cast. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::stringValue): Use HTMLSelectElement instead of SelectElement. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (optionFromSelection): ditto. (webkit_accessible_selection_get_selection_count): ditto. * accessibility/gtk/AXObjectCacheAtk.cpp: (notifyChildrenSelectionChange): ditto. * dom/OptionElement.cpp: (WebCore::OptionElement::optionIndex): ditto. * dom/OptionElement.h: ditto. * dom/SelectElement.cpp: (WebCore::SelectElementData::checkListItems): ditto. (WebCore::SelectElementData::listItems): ditto. * dom/SelectElementWin.cpp: Removed. * dom/SelectElement.h: Removed SelectElement class declaration. * html/HTMLSelectElement.cpp: Move functions from SelectElement.cpp. (WebCore::HTMLSelectElement::selectedIndex): Removed 'SelectElement::' because the function is moved to HTMLSelectElement. (WebCore::HTMLSelectElement::deselectItems): dito. (WebCore::HTMLSelectElement::setSelectedIndex): dito. (WebCore::HTMLSelectElement::setSelectedIndexByUser): ditto. (WebCore::HTMLSelectElement::activeSelectionEndListIndex): ditto. (WebCore::HTMLSelectElement::length): ditto. (WebCore::HTMLSelectElement::saveFormControlState): ditto. (WebCore::HTMLSelectElement::restoreFormControlState): ditto. (WebCore::HTMLSelectElement::parseMappedAttribute): ditto. (WebCore::HTMLSelectElement::selectAll): ditto. (WebCore::HTMLSelectElement::appendFormData): ditto. (WebCore::HTMLSelectElement::optionToListIndex): ditto. (WebCore::HTMLSelectElement::listToOptionIndex): ditto. (WebCore::HTMLSelectElement::recalcListItems): ditto. (WebCore::HTMLSelectElement::setRecalcListItems): ditto. (WebCore::HTMLSelectElement::reset): ditto. (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto. (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto. (WebCore::HTMLSelectElement::defaultEventHandler): ditto. (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto. (WebCore::HTMLSelectElement::setActiveSelectionEndIndex): ditto. (WebCore::HTMLSelectElement::updateListBoxSelection): ditto. (WebCore::HTMLSelectElement::menuListOnChange): ditto. (WebCore::HTMLSelectElement::listBoxOnChange): ditto. (WebCore::HTMLSelectElement::saveLastSelection): ditto. (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): ditto. (WebCore::HTMLSelectElement::scrollToSelection): ditto. (WebCore::HTMLSelectElement::insertedIntoTree): ditto. (WebCore::nextValidIndex): Moved from SelectElement.cpp. (WebCore::nextSelectableListIndex): ditto. (WebCore::previousSelectableListIndex): ditto. (WebCore::firstSelectableListIndex): ditto. (WebCore::lastSelectableListIndex): ditto. (WebCore::nextSelectableListIndexPageAway): ditto. (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): ditto. (WebCore::HTMLSelectElement::parseMultipleAttribute): ditto. (WebCore::HTMLSelectElement::platformHandleKeydownEvent): ditto. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::updateSelectedState): ditto. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto. (WebCore::HTMLSelectElement::lastSelectedListIndex): ditto. (WebCore::stripLeadingWhiteSpace): ditto. (WebCore::HTMLSelectElement::typeAheadFind): ditto. (WebCore::HTMLSelectElement::optionCount): ditto. (WebCore::toSelectElement): ditto. * html/HTMLSelectElementWin.cpp: Copied from Source/WebCore/dom/SelectElementWin.cpp. (WebCore::HTMLSelectElement::platformHandleKeydownEvent): * html/HTMLSelectElement.h: Removed 'virtual' of SelectElement functions. (WebCore::HTMLSelectElement::size): (WebCore::HTMLSelectElement::multiple): (WebCore::HTMLSelectElement::listItems): (WebCore::HTMLSelectElement::updateValidity): * rendering/RenderListBox.cpp: Replace SelectElement with HTMLSelectElement (WebCore::RenderListBox::RenderListBox): (WebCore::RenderListBox::scrollToRevealSelection): (WebCore::RenderListBox::addFocusRingRects): (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): (WebCore::RenderListBox::panScroll): (WebCore::RenderListBox::autoscroll): (WebCore::RenderListBox::valueChanged): * rendering/RenderMenuList.cpp: Replace SelectElement with HTMLSelectElement (WebCore::RenderMenuList::RenderMenuList): (WebCore::RenderMenuList::setTextFromOption): (WebCore::RenderMenuList::showPopup): (WebCore::RenderMenuList::valueChanged): (WebCore::RenderMenuList::listBoxSelectItem): (WebCore::RenderMenuList::multiple): (WebCore::RenderMenuList::didSetSelectedIndex): (WebCore::RenderMenuList::didUpdateActiveOption): (WebCore::RenderMenuList::itemText): (WebCore::RenderMenuList::itemAccessibilityText): (WebCore::RenderMenuList::itemToolTip): (WebCore::RenderMenuList::itemIsEnabled): (WebCore::RenderMenuList::itemStyle): (WebCore::RenderMenuList::itemBackgroundColor): (WebCore::RenderMenuList::listSize): (WebCore::RenderMenuList::selectedIndex): (WebCore::RenderMenuList::itemIsSeparator): (WebCore::RenderMenuList::itemIsLabel): (WebCore::RenderMenuList::itemIsSelected): (WebCore::RenderMenuList::setTextFromItem): 2011-10-06 Sheriff Bot Unreviewed, rolling out r96896. http://trac.webkit.org/changeset/96896 https://bugs.webkit.org/show_bug.cgi?id=69601 broke windows and mac chromium builds (Requested by simonjam on #webkit). * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-06 Antoine Labour Webkit API for compositor https://bugs.webkit.org/show_bug.cgi?id=69107 Reviewed by Darin Fisher. Covered by existing compositing tests. * platform/graphics/chromium/ContentLayerChromium.h: 2011-10-06 Joseph Pecoraro Reviewed by Kent Tamura. Pass "accept" mime type information into FileChooser at all call sites https://bugs.webkit.org/show_bug.cgi?id=69592 No new tests. This only exposes some more information to WebKit ports, no functionality change in WebCore. * html/FileInputType.cpp: (WebCore::FileInputType::receiveDropForDirectoryUpload): 2011-10-06 Kent Tamura [JSC binding] Fix inconsistent behavior of DOMStringMap https://bugs.webkit.org/show_bug.cgi?id=53752 Reviewed by Darin Adler. The dataset behavior was inconsistent. The get operation handled data-* attributes first, and the put and delete operations handled JavaScript properties first. Like Firefox and Opera, the put and delete operations should handle data-* attribute first. * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::deleteProperty): Handles DOMStringMap first, then returns false if the DOMStringMap makes an error. (WebCore::JSDOMStringMap::putDelegate): ditto. 2011-10-06 Nico Weber [chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes. https://bugs.webkit.org/show_bug.cgi?id=69589 Reviewed by Adam Barth. When building with `make -j40`, all the binding rules are built en bloc. Since this script currently uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of 255 by default, so the build used to fail with "open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60" As a fix, use execvp() instead, which replaces the current process instead of spawning a new one. * WebCore.gyp/scripts/rule_binding.py: 2011-10-06 Anders Carlsson When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors https://bugs.webkit.org/show_bug.cgi?id=69586 Reviewed by Darin Adler. * Configurations/Base.xcconfig: Add -Wglobal-constructors and -Wexit-time-destructors when building with clang. * WebCore.xcodeproj/project.pbxproj: When building with clang, we don't need to run the check-for-global-initializers and check-for-exit-time-destructors anymore. * platform/graphics/filters/FEGaussianBlur.cpp: (gaussianKernelFactor): (WebCore::FEGaussianBlur::calculateKernelSize): (WebCore::FEGaussianBlur::calculateStdDeviation): Change the gaussian kernel factor global to be an inline function instead. 2011-10-06 Anders Carlsson Add DEFINE_DEBUG_ONLY_GLOBAL for globals that should be defined in debug builds https://bugs.webkit.org/show_bug.cgi?id=69584 Reviewed by Darin Adler. Adopt the DEFINE_DEBUG_ONLY_GLOBAL macro. * bindings/js/JSLazyEventListener.cpp: * dom/Node.cpp: * dom/Range.cpp: * history/CachedPage.cpp: * loader/SubresourceLoader.cpp: * loader/cache/CachedResource.cpp: * page/Frame.cpp: * page/Page.cpp: * rendering/BidiRun.cpp: * rendering/RenderObject.cpp: * svg/SVGElementInstance.cpp: * xml/XMLHttpRequest.cpp: 2011-10-06 James Robinson [chromium] Remove USE(THREADED_COMPOSITING) from the tree https://bugs.webkit.org/show_bug.cgi?id=69489 Reviewed by Darin Fisher. This macro isn't needed any more since the logic it guarded is guarded by a runtime switch. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-06 David Grogan Return null for the value of IDB key cursors instead of ASSERTing https://bugs.webkit.org/show_bug.cgi?id=69131 This is in support of the IndexedDB performance improvement here: http://codereview.chromium.org/7834006/ Reviewed by Tony Chang. * storage/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::value): 2011-10-06 Alexey Proskuryakov [Mac] Should be able to scroll embedded PDFs using mouse https://bugs.webkit.org/show_bug.cgi?id=69579 Reviewed by Darin Adler. Hit testing doesn't find scrollbars installed by a plug-in, so mouse events don't work. As we want to use WebKit scrollbars with PDF plug-in, a cleaner long-term solution would be to have a base class under PluginViewBase that can handle scrolling instead of doing that in PluginView and Plugin. * plugins/PluginViewBase.h: (WebCore::PluginViewBase::horizontalScrollbar): (WebCore::PluginViewBase::verticalScrollbar): Added accessors for scrollbars installed by plug-in. * rendering/nodeAtPoint.cpp: (WebCore::RenderEmbeddedObject::nodeAtPoint): Like RenderLayer, add scrollbars to hit result after normal hit testing. * rendering/RenderEmbeddedObject.h: Added a nodeAtPoint override. * rendering/RenderWidget.h: Made nodeAtPoint() protected instead of private, so that RenderEmbeddedObject could call it. 2011-10-06 Dan Bernstein Flash of white when navigating daringfireball.net https://bugs.webkit.org/show_bug.cgi?id=69581 Reviewed by Darin Adler. * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): Moved the calls to Scrollbar::setEnabled() into the code section where invalidation is suppressed if necessary, so that they do not trigger premature invalidation. 2011-10-06 Dan Bernstein Added a comment explaining code added in r96834. Suggested by Darin Adler. * editing/FrameSelection.cpp: (WebCore::FrameSelection::updateAppearance): 2011-10-05 Ryosuke Niwa Deleting line break before h1 converts h1 to span https://bugs.webkit.org/show_bug.cgi?id=45784 Reviewed by Enrica Casucci. This patch fundamentally alters the kind of styles we preserve while merging or moving paragraphs. StylizedMarkupAccumulator no longer wraps nodes by computed style when it's not annotating for interchange. Instead, it accumulates implicit and inline styles of ancestors of the serialized contents. The most significant code change is in StyledMarkupAccumulator::serializeNodes where we setup m_wrappingStyle by merging implicit and inline style of ancestors with mergeInlineAndImplicitStyleOfElement. Because it walks up the DOM tree upwards, it should not be overriding any CSS properties. Consequently, mergeStyle, mergeInlineStyleOfElement, and mergeInlineAndImplicitStyleOfElement are modified to take CSSPropertyOverrideMode. New behavior matches that of Internet Explorer and Firefox when merging paragraphs. Tests: editing/deleting/merge-paragraph-from-address.html editing/deleting/merge-paragraph-from-h6-with-style-2.html editing/deleting/merge-paragraph-from-h6-with-style.html editing/deleting/merge-paragraph-from-h6.html editing/deleting/merge-paragraph-from-listing.html editing/deleting/merge-paragraph-from-p-with-style-2.html editing/deleting/merge-paragraph-from-p-with-style-3.html editing/deleting/merge-paragraph-from-p-with-style.html editing/deleting/merge-paragraph-into-h1-with-style.html editing/deleting/merge-paragraph-into-h1.html editing/deleting/merge-paragraph-into-pre.html * css/CSSValueList.cpp: (WebCore::CSSValueList::hasValue): Made const. * css/CSSValueList.h: * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Calls mergeInlineStyleOfElement. (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Ditto. * editing/EditingStyle.cpp: (WebCore::copyEditingProperties): Takes a boolean includeBackgroundColor. (WebCore::isEditingProperty): Extracted from elementIsStyledSpanOrHTMLEquivalent. (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent): Calls isEditingProperty. (WebCore::EditingStyle::mergeTypingStyle): Calls mergeStyle. (WebCore::EditingStyle::mergeInlineStyleOfElement): Takes CSSPropertyOverrideMode. (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Added. (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Added. (WebCore::mergeTextDecorationValues): Extracted from mergeStyle. (WebCore::EditingStyle::mergeStyle): Takes CSSPropertyOverrideMode. * editing/EditingStyle.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::nodeToSplitToAvoidPastingIntoInlineNodesWithStyle): Extracted from doApply. (WebCore::ReplaceSelectionCommand::doApply): Calls nodeToSplitToAvoidPastingIntoInlineNodesWithStyle. (WebCore::ReplaceSelectionCommand::performTrivialReplace): Exit early when we need to split the tree to avoid pasting into inline nodes with style. Also remove a collapsed or spurious br. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::serializeNodes): 2011-10-06 Abhishek Arya Crash in VisiblePosition::canonicalPosition. https://bugs.webkit.org/show_bug.cgi?id=69568 Reviewed by Ryosuke Niwa. Move the position's containerNode calculation after layout is complete(in updateLayoutIgnorePendingStylesheets). Test: editing/selection/selection-plugin-clear-crash.html * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::canonicalPosition): 2011-10-06 Sheriff Bot Unreviewed, rolling out r96861. http://trac.webkit.org/changeset/96861 https://bugs.webkit.org/show_bug.cgi?id=69573 This patch didn't compile on windows (Requested by annacc on #webkit). * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2011-10-06 Anna Cavender Adding parens in WebVTTParser.cpp to appease compiler preferences. https://bugs.webkit.org/show_bug.cgi?id=69460 Reviewed by David Levin. No new tests. No new functionality. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2011-10-06 Fady Samuel Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false https://bugs.webkit.org/show_bug.cgi?id=69009 Reviewed by Simon Fraser. Upcoming patches may make use of absoluteBoundingBoxRect on a const RenderObject, so this needed to be fixed. Making useTransforms default to true instead of false and replacing instances of absoluteBoundingBoxRect() to absoluteBoundingBoxRectIgnoringTransforms() partially addreses // FIXME: useTransforms should go away eventually. * WebCore.exp.in: * dom/Element.cpp: (WebCore::Element::screenRect): * dom/Node.cpp: (WebCore::Node::getRect): (WebCore::Node::renderRect): * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * inspector/DOMNodeHighlighter.cpp: * plugins/IFrameShimSupport.cpp: (WebCore::getPluginOcclusions): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): (WebCore::RenderBlock::absoluteQuads): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteQuads): * rendering/RenderBox.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::flattenFrame): * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): (WebCore::RenderInline::culledInlineAbsoluteRects): (WebCore::RenderInline::absoluteQuads): (WebCore::RenderInline::culledInlineAbsoluteQuads): * rendering/RenderInline.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRect): (WebCore::RenderObject::addAbsoluteRectForLayer): (WebCore::RenderObject::paintingRootRect): * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): (WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms): (WebCore::RenderObject::absoluteQuads): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): (WebCore::RenderText::absoluteQuads): * rendering/RenderText.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::showPopup): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintSearchFieldCancelButton): (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): (WebCore::RenderView::absoluteQuads): * rendering/RenderView.h: * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::absoluteRects): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::absoluteQuads): * rendering/svg/RenderSVGHiddenContainer.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::absoluteQuads): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteRects): (WebCore::RenderSVGModelObject::absoluteQuads): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::absoluteQuads): * rendering/svg/RenderSVGText.h: * testing/Internals.cpp: (WebCore::Internals::boundingBox): 2011-10-06 Simon Hausmann [Qt][Wk2] Fix build with Qt 5 when QtScript is built as standalone module https://bugs.webkit.org/show_bug.cgi?id=69520 Reviewed by Csaba Osztrogonác. * WebCore.pri: Use qt5 scope. * WebCore.pro: Use qt5 scope and pull in QtScript for the time being. 2011-10-06 Tony Chang last frame of a multipart response is not displayed https://bugs.webkit.org/show_bug.cgi?id=69449 Reviewed by Adam Barth. Test: http/tests/multipart/load-last-non-html-frame.php * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): for non-progressive load pages, commit the load so the last frame will be displayed. * loader/DocumentLoader.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didFinishLoading): 2011-10-06 Gavin Peters conditionalize m_cachedScript stacks to just Chromium port https://bugs.webkit.org/show_bug.cgi?id=69537 New stack saving telemetry code in ScriptElement shouldn't have been put in all ports; just narrowing it to the chromium port will save other ports the memory hit of this diagnostic code. Reviewed by Nate Chapin. No new tests. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-06 Arthur Hsu Ensure font loaded before calling Skia to drawPosText in Chrome sandbox https://bugs.webkit.org/show_bug.cgi?id=69370 Reviewed by James Robinson. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-10-06 Chris Rogers BiquadFilterNode must not reset filter state if type attribute is set to the same type https://bugs.webkit.org/show_bug.cgi?id=69485 Reviewed by Kenneth Russell. No new tests. This particular case is difficult to test with a layout test using OfflineAudioContext. * webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::setType): * webaudio/BiquadProcessor.h: 2011-10-06 Raphael Kubo da Costa [EFL] Do not create cairo surfaces with the wrong size for form elements https://bugs.webkit.org/show_bug.cgi?id=69533 Reviewed by Ryosuke Niwa. RenderThemeEfl::cacheThemePartResizeAndReset resizes the Ecore_Evas associated with an entry, but did not reset the `size` attribute of the struct -- in practice, this meant the subsequent call to themePartCacheEntrySurfaceCreate would create a cairo surface with the previous size, thus rendering an element with the wrong size. No new tests, this is triggered by running running pixel tests for running, in this order, fast/forms/button-sizes.html, fast/forms/input-appearance-preventDefault.html, fast/forms/input-appearance-spinbutton-disabled-readonly.html, fast/forms/input-appearance-width.html, fast/forms/input-button-sizes.html, fast/forms/input-placeholder-text-indent.html and fast/forms/input-text-click-inside.html (!). * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::cacheThemePartResizeAndReset): Reset the size attribute when resizing the canvas. 2011-10-06 Chris Rogers Make sure OfflineAudioContext can not be created with a sample-rate less than 44.1KHz https://bugs.webkit.org/show_bug.cgi?id=69483 Reviewed by Kenneth Russell. No new tests. * webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::createBuffer): 2011-10-06 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69544 [CSS3 Regions] Compute the starting and ending regions of a block, so that we can clamp descendants to those regions. This is preparation for having true overflow in the boxes in each region, and it's also a performance optimization to reduce the amount of region walking that the RenderFlowThread is doing. Add a range map to RenderFlowThread to cache the start/end regions for each box. Amend everyone who calls renderRegionForLine to pass in the box that is making the query. This box is then used to clamp to start and end regions so that any regions outside of that range will never be examined. Reviewed by Dan Bernstein. Test: fast/regions/top-overflow-out-of-second-region.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::hasNextPage): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::regionAtBlockOffset): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::~RenderFlowThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): (WebCore::RenderFlowThread::regionLogicalHeightForLine): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): (WebCore::RenderFlowThread::mapFromFlowToRegion): (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): (WebCore::RenderFlowThread::logicalWidthChangedInRegions): (WebCore::RenderFlowThread::setRegionRangeForBox): (WebCore::RenderFlowThread::getRegionRangeForBox): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::takeRenderBoxRegionInfo): (WebCore::RenderRegion::removeRenderBoxRegionInfo): * rendering/RenderRegion.h: 2011-10-05 Gavin Barraclough Add explicit JSGlobalThis type. https://bugs.webkit.org/show_bug.cgi?id=69478 Reviewed by Darin Adler. JSC supports a split global object, as used by WebCore for the Window. As a stage of making this visible to JSC, make it so that if the global this value is not the global object itself, it must be a subclass of JSGlobalThis. * ForwardingHeaders/runtime/JSGlobalThis.h: Added. - Added forwarding header. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: - finishCreation takes a JSGlobalThis, or thisValue is implicit. * bindings/js/JSDOMWindowShell.h: - Make the window shell a subclass of JSGlobalThis. * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::finishCreation): - Don't pass the thisValue to JSGlobalObject::finishCreation. * bindings/js/JSWorkerContextBase.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): - Don't pass the thisValue to JSGlobalObject::finishCreation, for worker contexts. 2011-10-06 Anna Cavender Fix CodeGeneratorV8 for EnabledAtRuntime when class has no parent class. https://bugs.webkit.org/show_bug.cgi?id=69480 Reviewed by Adam Barth. No new tests. No new functionality, yet. * bindings/scripts/CodeGeneratorV8.pm: 2011-10-06 Dan Bernstein Assertion failure beneath blockSelectionGaps() when a selected node is removed Reviewed by Ryosuke Niwa. Test: editing/selection/invalid-in-RenderView.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::updateAppearance): Ensure that the VisibleSelection used to set the selection in the RenderView is valid, by reconstructing it from the current selection. 2011-10-06 Andreas Kling InlineBox's virtualLogicalHeight() partially limited to builds with SVG. https://bugs.webkit.org/show_bug.cgi?id=69538 Reviewed by Dan Bernstein. Remove erroneous ENABLE(SVG) guards around the initialization and use of InlineBox::hasVirtualLogicalHeight. This variable is used by TrailingFloatsRootInlineBox and should always be respected regardless of SVG support. * rendering/InlineBox.cpp: (WebCore::InlineBox::logicalHeight): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-10-06 Carlos Garcia Campos [GTK] Implement cache model for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=68434 Reviewed by Martin Robinson. Add a function to FileSystem to get the free space of the file system where the given path is on. * platform/FileSystem.h: * platform/gtk/FileSystemGtk.cpp: (WebCore::getVolumeFreeSizeForPath): 2011-10-06 Sergey Glazunov Add check for JavaScript URLs in HTMLPlugInImageElement::allowedToLoadFrameURL https://bugs.webkit.org/show_bug.cgi?id=68813 Reviewed by Adam Barth. Test: http/tests/security/xss-DENIED-object-element.html * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL): 2011-10-06 Yury Semikhatsky Web Inspector: avoid assertion failure in ~InspectorDebuggerAgent in case of workers https://bugs.webkit.org/show_bug.cgi?id=69534 Make sure frontend is disconnected before WorkerInspectorController is destroyed. Reviewed by Pavel Feldman. * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::~WorkerInspectorController): 2011-10-05 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=69492 [Mac] Should be able to scroll embedded PDFs from keyboard Reviewed by Darin Adler. * WebCore.exp.in: Export ScrollableArea::scroll. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Call base class default event handler, so that events on focused plug-in elements would fall through to EventHandler::defaultKeyboardEventHandler. * plugins/PluginViewBase.h: (WebCore::PluginViewBase::scroll): Added a method that's called on a plug-in when WebCore asks it to scroll. Plug-in cannot really know what key events result in scroll actions. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::scroll): (WebCore::RenderEmbeddedObject::logicalScroll): * rendering/RenderEmbeddedObject.h: Ask plug-in to scroll when EventHandler::scrollOverflow() is called. 2011-10-06 Konstantin Scheglov REGRESSION (r95852?): Disappearing Border on bugs.webkit.org attachments https://bugs.webkit.org/show_bug.cgi?id=69296 Reviewed by David Hyatt. Test: fast/table/border-collapsing/cached-69296.html Remember BorderValue in CollapsedBorderValue by value. See https://bugs.webkit.org/show_bug.cgi?id=69296#c7 for motivation. * rendering/style/CollapsedBorderValue.h: (WebCore::CollapsedBorderValue::CollapsedBorderValue): (WebCore::CollapsedBorderValue::width): (WebCore::CollapsedBorderValue::style): (WebCore::CollapsedBorderValue::exists): (WebCore::CollapsedBorderValue::isTransparent): (WebCore::CollapsedBorderValue::operator==): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::collapsedStartBorder): (WebCore::RenderTableCell::collapsedEndBorder): (WebCore::RenderTableCell::collapsedBeforeBorder): (WebCore::RenderTableCell::collapsedAfterBorder): 2011-10-06 Gavin Peters save resource zeroing stacks in ScriptElement for debugging https://bugs.webkit.org/show_bug.cgi?id=69453 The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug 75604). This patch will save a stack in the ScriptElement when this happens, so that if we do later crash, we can see how we did the first zeroing. See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that this change will help track down. Reviewed by Nate Chapin. No new tests, this shouldn't affect output at all, and isn't particularly testable. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-06 Rémi Duraffort Fix compilation by adding some missing ENABLE(VIDEO|XSLT) https://bugs.webkit.org/show_bug.cgi?id=69522 Unreviewed build fix * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: * bindings/v8/custom/V8HTMLAudioElementConstructor.h: * bindings/v8/custom/V8XSLTProcessorCustom.cpp: 2011-10-06 Pavel Feldman Web Inspector: add Styles and Metrics sidebars to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69529 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions.requestCSSNameCompletions): * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.forProperty): (WebInspector.CSSKeywordCompletions.isColorAwareProperty): * inspector/front-end/Checkbox.js: * inspector/front-end/ElementsPanel.js: * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._updateMetrics): (WebInspector.MetricsSidebarPane.prototype.startEditing): (WebInspector.MetricsSidebarPane.prototype._handleKeyDown): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.BlankStylePropertiesSection.prototype.makeNormal): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/externs.js: (WebInspector.linkifyResourceAsNode): (Element.prototype.scrollIntoViewIfNeeded): (Element.prototype.selectionLeftOffset): * inspector/front-end/inspector.js: * inspector/front-end/utilities.js: 2011-10-06 Pavel Feldman Web Inspector: extract DOMPresentation, make EventListenersSidebar compile https://bugs.webkit.org/show_bug.cgi?id=69527 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.nodeNameInCorrectCase): (WebInspector.DOMNode.prototype.moveTo): (WebInspector.DOMNode.prototype.isXMLNode): * inspector/front-end/DOMBreakpointsSidebarPane.js: (WebInspector.DOMBreakpointsSidebarPane.prototype._setBreakpoint): * inspector/front-end/DOMPresentation.js: Added. (WebInspector.DOMPresentation.decorateNodeLabel): (WebInspector.DOMPresentation.linkifyNodeReference): (WebInspector.DOMPresentation.linkifyNodeById): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode): * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/PropertiesSection.js: * inspector/front-end/Section.js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-10-06 Pavel Feldman Web Inspector: add all Resource panel views to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69526 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._contextMenu): (WebInspector.Cookies.cookieMatchesResourceURL): * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable): (WebInspector.CookiesTable.prototype._onDeleteFromGrid): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid.comparator): (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid): (WebInspector.DataGrid.createSortableDataGrid): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._queryFinished): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype.showDatabase): * inspector/front-end/TextPrompt.js: 2011-10-06 Pavel Feldman Web Inspector: add all Resource panel views to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69526 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._contextMenu): (WebInspector.Cookies.cookieMatchesResourceURL): * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable): (WebInspector.CookiesTable.prototype._onDeleteFromGrid): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid.comparator): (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid): (WebInspector.DataGrid.createSortableDataGrid): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._queryFinished): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype.showDatabase): * inspector/front-end/TextPrompt.js: 2011-10-06 Sheriff Bot Unreviewed, rolling out r96791. http://trac.webkit.org/changeset/96791 https://bugs.webkit.org/show_bug.cgi?id=69528 webkit_unit_tests broken on Mac and Win (Requested by hwennborg on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-05 Mikhail Naganov Web Inspector: [Chromium] Heap Snapshot colors legend help popup is not shown. https://bugs.webkit.org/show_bug.cgi?id=69482 Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._helpClicked): 2011-10-05 Pavel Feldman Web Inspector: add 10 more front-end classes to the compilation process. https://bugs.webkit.org/show_bug.cgi?id=69445 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/HAREntry.js: * inspector/front-end/HandlerRegistry.js: * inspector/front-end/IFrameView.js: * inspector/front-end/JavaScriptSourceFrame.js: * inspector/front-end/PanelEnablerView.js: (WebInspector.PanelEnablerView): * inspector/front-end/PartialQuickSort.js: * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.fillSection): (WebInspector.PropertiesSidebarPane.prototype.update): * inspector/front-end/ShowMoreDataGridNode.js: * inspector/front-end/SidebarTreeElement.js: * inspector/front-end/TimelineAgent.js: * inspector/front-end/WelcomeView.js: * inspector/front-end/externs.js: (WebInspector.addMainEventListeners): 2011-10-05 Pavel Feldman Web Inspector: make ElementsTreeOutline compile https://bugs.webkit.org/show_bug.cgi?id=69439 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMSyntaxHighlighter.js: * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._populateContextMenu): (WebInspector.ElementsPanel.prototype._inspectElementRequested): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired): (WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes): (WebInspector.ElementsTreeOutline.prototype._populateContextMenu): (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): (WebInspector.ElementsTreeElement.prototype._startEditingTextNode): (WebInspector.ElementsTreeElement.prototype._startEditingTagName): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted): (): * inspector/front-end/externs.js: (WebInspector.highlightDOMNode): (WebInspector.resourceURLForRelatedNode): 2011-10-06 Pavel Feldman Web Inspector: Inspector fails to start if there was at least one watch expression. https://bugs.webkit.org/show_bug.cgi?id=69516 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane): 2011-10-06 Dominic Cooney Don't make virtual calls in Node::parentNode. https://bugs.webkit.org/show_bug.cgi?id=69266 Reviewed by Antti Koivisto. ShadowRoot and SVGShadowRoot remain semantically separate (eg isShadowRoot/isSVGShadowRoot) but share a flag (IsShadowRootOrSVGShadowRootFlag, hitherto IsShadowRootFlag just for ShadowRoot). In combination with IsSVGFlag ShadowRoot (false) can be distinguished from SVGShadowRoot (true). This lets us make isSVGShadowRoot non-virtual. No change in behavior => No new tests. * dom/Node.cpp: (WebCore::Node::shadowHost): * dom/Node.h: (WebCore::Node::isSVGShadowRoot): (WebCore::Node::isShadowRoot): (WebCore::Node::parentNode): (WebCore::Node::parentNodeGuaranteedHostFree): * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::SVGShadowTreeContainerElement): (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): * rendering/svg/SVGShadowTreeElements.h: * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): * svg/SVGElement.h: * svg/SVGGElement.cpp: (WebCore::SVGGElement::SVGGElement): * svg/SVGGElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::SVGStyledElement): * svg/SVGStyledElement.h: * svg/SVGStyledLocatableElement.cpp: (WebCore::SVGStyledLocatableElement::SVGStyledLocatableElement): * svg/SVGStyledLocatableElement.h: * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): * svg/SVGStyledTransformableElement.h: 2011-10-06 John Knottenbelt Take pageScaleFactor into account for MouseRelatedEvents. https://bugs.webkit.org/show_bug.cgi?id=67592 Reviewed by Tony Gentilcore. Tests: fast/events/page-scaled-mouse-click-iframe.html fast/events/page-scaled-mouse-click.html * dom/MouseRelatedEvent.cpp: (WebCore::contentsScrollOffset): (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::frameScaleFactor): (WebCore::MouseRelatedEvent::computePageLocation): (WebCore::MouseRelatedEvent::computeRelativePosition): 2011-10-03 Hans Wennborg IndexedDB: Remove SQLite-LevelDB migration code https://bugs.webkit.org/show_bug.cgi?id=69264 Reviewed by Tony Chang. Remove migration functionality. Just removing code, so no new tests. * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): * storage/IDBFactoryBackendImpl.h: 2011-10-06 James Robinson [chromium] Remove USE(THREADED_COMPOSITING) from the tree https://bugs.webkit.org/show_bug.cgi?id=69489 Reviewed by Darin Fisher. This macro isn't needed any more since the logic it guarded is guarded by a runtime switch. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-10-05 Kentaro Hara Refactor IDL attributes about constructor https://bugs.webkit.org/show_bug.cgi?id=69074 Reviewed by Adam Barth. Currently, IDL attributes about constructor are confusing: - [CustomConstructFunction] means that there is a custom constructor for JSC. - [V8CustomConstructor] means that there is a custom constructor for V8. - [CustomConstructor] exists in CodeGenerator*.pm but is not used in any IDL files. - For almost all IDL files, [CustomConstructFunction] and [V8CustomConstructor] are used at the same time. - ObjC, CPP and GObject bindings do not support custom constructors. This patch makes the following changes: - Rename [CustomConstructFunction] to [JSCustomConstructor]. - [JSCustomConstructor] means that there is a custom constructor for JSC. - [V8CustomConstructor] means that there is a custom constructor for V8. - [CustomConstructor] means that there is a custom constructor for both JSC and V8. No new tests. No change in behavior. Confirm that build succeeds. * bindings/scripts/CodeGeneratorJS.pm: Removed [CustomConstructFunction] and added [JSCustomConstructor] (GenerateHeader): (GenerateAttributesHashTable): (GenerateImplementation): (GenerateConstructorDefinition): * css/WebKitCSSMatrix.idl: Renamed [CustomConstructFunction] to [JSCustomConstructor]. If both [JSCustomConstructor] and [V8CustomConstructor] are specified, then we replaced them with [CustomConstructor]. * dom/CustomEvent.idl: Ditto. * dom/ErrorEvent.idl: Ditto. * dom/Event.idl: Ditto. * dom/HashChangeEvent.idl: Ditto. * dom/MessageChannel.idl: Ditto. * dom/MessageEvent.idl: Ditto. * dom/PageTransitionEvent.idl: Ditto. * dom/PopStateEvent.idl: Ditto. * dom/ProgressEvent.idl: Ditto. * dom/WebKitAnimationEvent.idl: Ditto. * html/DOMFormData.idl: Ditto. * html/canvas/ArrayBuffer.idl: Ditto. * html/canvas/DataView.idl: Ditto. * html/canvas/Float32Array.idl: Ditto. * html/canvas/Float64Array.idl: Ditto. * html/canvas/Int16Array.idl: Ditto. * html/canvas/Int32Array.idl: Ditto. * html/canvas/Int8Array.idl: Ditto. * html/canvas/Uint16Array.idl: Ditto. * html/canvas/Uint32Array.idl: Ditto. * html/canvas/Uint8Array.idl: Ditto. * p2p/PeerConnection.idl: Ditto. * page/EventSource.idl: Ditto. * page/WebKitPoint.idl: Ditto. * webaudio/AudioContext.idl: Ditto. * websockets/CloseEvent.idl: Ditto. * websockets/WebSocket.idl: Ditto. * workers/SharedWorker.idl: Ditto. * workers/Worker.idl: Ditto. * xml/XMLHttpRequest.idl: Ditto. * xml/XSLTProcessor.idl: Ditto. 2011-10-03 Andy Estes Add the option to suppress rendering until the document's load event fires. https://bugs.webkit.org/show_bug.cgi?id=69298 Reviewed by Simon Fraser. Add a WebCore setting that suppresses painting and compositing layer updates until the document's load event fires. This masks the effects of incremental rendering (for clients that opt in) by ensuring that all sub-resources have loaded and a full layout has taken place before painting the document for the first time. No tests currently possible. Testing this would require the ability for DRT to dump state while resources are loading, which it doesn't currently do. * dom/Document.cpp: (WebCore::Document::implicitClose): If rendering was previously suppressed, force a repaint and compositing layer update. (WebCore::Document::visualUpdatesAllowed): Add a helper method to determine if the document is in a state where rendering is allowed. * dom/Document.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setSuppressIncrementalRendering): (WebCore::Settings::suppressIncrementalRendering): * rendering/RenderLayer.cpp: (WebCore::shouldSuppressPaintingLayer): Encapsulate the FOUC and painting suppression checks into a single helper function for readability's sake. (WebCore::RenderLayer::paintLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): If we should suppress compositing layer updates and the load event has yet to fire, return early. 2011-10-05 Yuta Kitamura WebSocket: Add extensions attribute https://bugs.webkit.org/show_bug.cgi?id=69408 Reviewed by Kent Tamura. Add WebSocket's "extensions" attribute as specified in the WebSocket API . WebSocket protocol extension is not implemented at all, thus this attribute always returns an empty string. Test: http/tests/websocket/tests/hybi/extensions.html http/tests/websocket/tests/hixie76/undefined-attributes.html (updated) * websockets/WebSocket.cpp: (WebCore::WebSocket::extensions): If the hixie-76 protocol is chosen, we need to return "undefined" in order to keep behavior of the ports which have not used the newer hybi protocol yet. * websockets/WebSocket.h: * websockets/WebSocket.idl: 2011-10-05 Dominic Cooney IsShadowRootFlag should not depend on whether a ShadowRoot is attached to a host. https://bugs.webkit.org/show_bug.cgi?id=69406 Reviewed by Hajime Morita. No change in behavior => No new tests. * dom/Node.cpp: (WebCore::Node::setShadowHost): Don't twiddle the flag. * dom/Node.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): Set the IsShadowRootFlag on creation. * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): Let ShadowRoot set creation flags. * dom/TreeScope.h: 2011-10-05 Chris Rogers Define a log2f() function for Windows in wtf/MathExtras.h https://bugs.webkit.org/show_bug.cgi?id=69491 Reviewed by Darin Adler. No new tests. This change is tested in existing layout tests. * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 2011-10-05 Erik Arvidsson window.location.href and others needlessly decodes URI-encoded characters https://bugs.webkit.org/show_bug.cgi?id=30225 Reviewed by Darin Adler. Don't decode KURL::path() and stop using KURL::deprecatedString() in Location methods. This slightly changes how we parse data and javascript URLs (non hierarchical URLs) to not encode so aggressively. * fileapi/DOMFileSystemBase.cpp: (WebCore::DOMFileSystemBase::crackFileSystemURL): Manually decode path() * loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): Manually decode path() * page/Location.cpp: (WebCore::Location::href): Use string() instead of deprecatedString() * page/Location.h: (WebCore::Location::toString): Inline call to href() * platform/KURL.cpp: (WebCore::KURL::path): Don't decode. (WebCore::escapeAndAppendNonHierarchicalPart): Rename escapeAndAppendFragment to escapeAndAppendNonHierarchicalPart since this is now used for more than just fragments. (WebCore::KURL::parse): Don't decode * platform/KURLGoogle.cpp: (WebCore::KURL::path): Remove out of date comment * platform/qt/KURLQt.cpp: (WebCore::KURL::fileSystemPath): Manually decode path() * platform/win/ClipboardWin.cpp: (WebCore::createGlobalHDropContent): Manually decode path() * workers/WorkerLocation.cpp: (WebCore::WorkerLocation::href): Use string() instead of deprecatedString() * workers/WorkerLocation.h: (WebCore::WorkerLocation::toString): Inline call to href() 2011-10-05 Darin Adler [Mac] Use four more named cursors if present https://bugs.webkit.org/show_bug.cgi?id=69488 Reviewed by Dan Bernstein. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use the names "Help", "Cell", "ZoomIn", and "ZoomOut" to get those cursors. Structure the code so it falls back if the cursors are not present. 2011-10-05 Tony Chang force margin:auto to 0 in flex items https://bugs.webkit.org/show_bug.cgi?id=69475 Reviewed by Ojan Vafai. The spec used to say the margin had a value of flex(1 0 0), but changed to just be 0. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computePreferredLogicalWidth): (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): 2011-10-05 Dean Jackson Computed style for filter property https://bugs.webkit.org/show_bug.cgi?id=68477 Reviewed by Simon Fraser. Reports the computed style for the new -webkit-filter property value. Test: css3/filters/filter-property-computed-style.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::computedFilter): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-10-05 Jer Noble Enable WEB_AUDIO by default in the WebKit/mac port. https://bugs.webkit.org/show_bug.cgi?id=68587 Reviewed by Simon Fraser. No new tests; existing webaudio/ layout tests cover this. * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: Add a build step which copies audio resources to the WebCore.framework bundle. 2011-10-03 Ojan Vafai [flexbox] take marginBeforeForChild into account when positioning children https://bugs.webkit.org/show_bug.cgi?id=69313 Reviewed by Tony Chang. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): 2011-10-05 Vangelis Kokkevis Switching threaded compositor from a compile time option to a run time one. https://bugs.webkit.org/show_bug.cgi?id=69391 Reviewed by Darin Fisher. Mostly converted #if USE(THREADED_COMPOSITING) to a regular if statements. In addition, CCLayerTreeHost::scheduleComposite() is removed as it wasn't being called from anywhere, No new tests as it doesn't add new functionality. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsCommitThenRedraw): (WebCore::CCLayerTreeHost::setNeedsRedraw): (WebCore::CCLayerTreeHost::composite): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommitThenRedraw): (WebCore::CCSingleThreadProxy::compositeImmediately): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2011-10-05 Dean Jackson Parse '-webkit-filter' property syntax https://bugs.webkit.org/show_bug.cgi?id=68473 Reviewed by Nikolas Zimmermann. Parse the new -webkit-filter property, looking for shorthand functions then testing number, type and value of parameters. Note that support for drop-shadow() was omitted from this patch because parsing CSS shadow syntax was going to require some refactoring of the box and text shadow code. The followup bug is https://bugs.webkit.org/show_bug.cgi?id=69108. Also, computed style will return null for filters at the moment. That's https://bugs.webkit.org/show_bug.cgi?id=68477. Tests: css3/filters/filter-property-parsing-invalid.html css3/filters/filter-property-parsing.html * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Build files updated for new WebKitCSSFilterValue classes. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS): * bindings/objc/DOMCSS.mm: Test if value is WebKitCSSFilterValue. * css/CSSParser.cpp: (WebCore::filterInfoForName): (WebCore::CSSParser::isValidFilterArgument): (WebCore::CSSParser::parseFilter): * css/CSSParser.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::filterOperationForType): (WebCore::CSSStyleSelector::createFilterOperations): * css/CSSStyleSelector.h: Handle the new shorthand functions in -webkit-filter. * css/CSSValue.h: (WebCore::CSSValue::isWebKitCSSFilterValue): Add virtual function that returns false here. * css/WebKitCSSFilterValue.cpp: Added. (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue): (WebCore::WebKitCSSFilterValue::~WebKitCSSFilterValue): (WebCore::WebKitCSSFilterValue::cssText): * css/WebKitCSSFilterValue.h: Added. (WebCore::WebKitCSSFilterValue::create): (WebCore::WebKitCSSFilterValue::operationType): (WebCore::WebKitCSSFilterValue::isWebKitCSSFilterValue): * css/WebKitCSSFilterValue.idl: Added. WebKitCSSFilterValue modelled closely on WebKitCSSTransformValue, basically identifying the type of operation in a CSSValueList. * page/DOMWindow.idl: New WebKitCSSFilterValue constructor. * platform/graphics/filters/FilterOperation.h: (WebCore::BlurFilterOperation::create): (WebCore::BlurFilterOperation::stdDeviationX): (WebCore::BlurFilterOperation::stdDeviationY): (WebCore::BlurFilterOperation::BlurFilterOperation): (WebCore::SharpenFilterOperation::create): (WebCore::SharpenFilterOperation::radius): (WebCore::SharpenFilterOperation::threshold): (WebCore::SharpenFilterOperation::SharpenFilterOperation): Use Length rather than double for parameters that are CSS lengths. 2011-10-05 Chris Rogers Fix Windows build - it doesn't have a log2f() function... https://bugs.webkit.org/show_bug.cgi?id=69473 Unreviewed build fix. * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 2011-10-05 James Robinson [chromium] ASSERT triggered when gpu process lost in single-threaded compositing path https://bugs.webkit.org/show_bug.cgi?id=69467 Reviewed by Kenneth Russell. Shuffles debug-only bookkeeping around to more closely match what we do in the threaded path and not trip a false-positive ASSERT(). * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): 2011-10-05 Sheriff Bot Unreviewed, rolling out r96756. http://trac.webkit.org/changeset/96756 https://bugs.webkit.org/show_bug.cgi?id=69472 Many builds broken due to WTFGetBacktrace not being exported from JavaScriptCore (Requested by aroben on #webkit). * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-05 Gavin Peters save resource zeroing stacks in ScriptElement for debugging https://bugs.webkit.org/show_bug.cgi?id=69453 The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug 75604). This patch will save a stack in the ScriptElement when this happens, so that if we do later crash, we can see how we did the first zeroing. See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that this change will help track down. Reviewed by Nate Chapin. No new tests, this shouldn't affect output at all, and isn't particularly testable. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-10-05 Alexey Proskuryakov More build fix. * WebCore.exp.in: Made a typo in a last minute change for my 32-bit build fix. 2011-10-05 Anna Cavender Fix CueParser::didFinishLoading to match changes in ThreadableLoaderClient https://bugs.webkit.org/show_bug.cgi?id=69456 Reviewed by David Levin. No new tests. No new functionality. * html/track/CueParser.cpp: (WebCore::CueParser::didFinishLoading): * html/track/CueParser.h: 2011-10-05 Alexey Proskuryakov 32-bit build fix. * WebCore.exp.in: In 32-bit, WebCore needs to export both NSSize and CGSize constructors. In 64-bit, NSSize is just a typedef for CGSize. Also fixed conversion operators, for good measure. 2011-10-05 Jer Noble WEB_AUDIO does not compile on Leopard 32-bit. https://bugs.webkit.org/show_bug.cgi?id=69292 Reviewed by Simon Fraser. No new tests; covered by all existing audio tests. Use of float and double within the WEB_AUDIO implementation have been harmonized, with most calculations done using floats, with narrowPrecisionToFloat() added when necessary to narrow double results down to floats, and with float constants initialized with float values: * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): (WebCore::AudioBus::createByMixingToMono): * platform/audio/AudioBus.h: (WebCore::AudioBus::sampleRate): (WebCore::AudioBus::setSampleRate): * platform/audio/AudioDSPKernel.h: (WebCore::AudioDSPKernel::AudioDSPKernel): (WebCore::AudioDSPKernel::sampleRate): * platform/audio/AudioDSPKernelProcessor.cpp: (WebCore::AudioDSPKernelProcessor::AudioDSPKernelProcessor): * platform/audio/AudioDSPKernelProcessor.h: * platform/audio/AudioDestination.h: * platform/audio/AudioFileReader.h: * platform/audio/AudioProcessor.h: (WebCore::AudioProcessor::AudioProcessor): (WebCore::AudioProcessor::sampleRate): * platform/audio/AudioUtilities.cpp: (WebCore::AudioUtilities::decibelsToLinear): (WebCore::AudioUtilities::linearToDecibels): (WebCore::AudioUtilities::discreteTimeConstantForSampleRate): * platform/audio/AudioUtilities.h: * platform/audio/DynamicsCompressor.cpp: (WebCore::DynamicsCompressor::DynamicsCompressor): (WebCore::DynamicsCompressor::initializeParameters): (WebCore::DynamicsCompressor::parameterValue): (WebCore::DynamicsCompressor::setEmphasisStageParameters): (WebCore::DynamicsCompressor::process): * platform/audio/DynamicsCompressor.h: (WebCore::DynamicsCompressor::sampleRate): (WebCore::DynamicsCompressor::nyquist): * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::saturate): (WebCore::DynamicsCompressorKernel::DynamicsCompressorKernel): (WebCore::DynamicsCompressorKernel::process): * platform/audio/DynamicsCompressorKernel.h: * platform/audio/EqualPowerPanner.cpp: (WebCore::EqualPowerPanner::EqualPowerPanner): * platform/audio/EqualPowerPanner.h: * platform/audio/HRTFDatabase.cpp: (WebCore::HRTFDatabase::create): (WebCore::HRTFDatabase::HRTFDatabase): * platform/audio/HRTFDatabase.h: (WebCore::HRTFDatabase::sampleRate): * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary): (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader): * platform/audio/HRTFDatabaseLoader.h: (WebCore::HRTFDatabaseLoader::databaseSampleRate): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::calculateSymmetricKernelsForAzimuthElevation): (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation): (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFElevation.h: (WebCore::HRTFElevation::sampleRate): (WebCore::HRTFElevation::HRTFElevation): * platform/audio/HRTFKernel.cpp: (WebCore::extractAverageGroupDelay): (WebCore::HRTFKernel::HRTFKernel): (WebCore::HRTFKernel::createInterpolatedKernel): * platform/audio/HRTFKernel.h: (WebCore::HRTFKernel::create): (WebCore::HRTFKernel::frameDelay): (WebCore::HRTFKernel::sampleRate): (WebCore::HRTFKernel::HRTFKernel): * platform/audio/HRTFPanner.cpp: (WebCore::HRTFPanner::HRTFPanner): (WebCore::HRTFPanner::fftSizeForSampleRate): * platform/audio/HRTFPanner.h: (WebCore::HRTFPanner::sampleRate): * platform/audio/Panner.cpp: (WebCore::Panner::create): * platform/audio/Panner.h: * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): * platform/audio/mac/AudioBusMac.mm: (WebCore::AudioBus::loadPlatformResource): * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestination::create): (WebCore::AudioDestination::hardwareSampleRate): (WebCore::AudioDestinationMac::AudioDestinationMac): * platform/audio/mac/AudioDestinationMac.h: (WebCore::AudioDestinationMac::sampleRate): * platform/audio/mac/AudioFileReaderMac.cpp: (WebCore::AudioFileReader::createBus): (WebCore::createBusFromAudioFile): (WebCore::createBusFromInMemoryAudioFile): * platform/audio/mac/AudioFileReaderMac.h: * webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): (WebCore::AsyncAudioDecoder::DecodingTask::create): (WebCore::AsyncAudioDecoder::DecodingTask::DecodingTask): * webaudio/AsyncAudioDecoder.h: (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate): * webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): * webaudio/AudioBasicProcessorNode.h: * webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::create): (WebCore::AudioBuffer::createFromAudioFileData): (WebCore::AudioBuffer::AudioBuffer): * webaudio/AudioBuffer.h: (WebCore::AudioBuffer::sampleRate): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::create): (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): (WebCore::AudioBufferSourceNode::process): (WebCore::AudioBufferSourceNode::renderFromBuffer): * webaudio/AudioBufferSourceNode.h: * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::AudioChannelMerger): * webaudio/AudioChannelMerger.h: (WebCore::AudioChannelMerger::create): * webaudio/AudioChannelSplitter.cpp: (WebCore::AudioChannelSplitter::AudioChannelSplitter): * webaudio/AudioChannelSplitter.h: (WebCore::AudioChannelSplitter::create): * webaudio/AudioContext.cpp: (WebCore::AudioContext::createOfflineContext): (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::createBuffer): * webaudio/AudioContext.h: (WebCore::AudioContext::sampleRate): * webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * webaudio/AudioDestinationNode.h: * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::AudioGainNode): * webaudio/AudioGainNode.h: (WebCore::AudioGainNode::create): * webaudio/AudioListener.cpp: (WebCore::AudioListener::AudioListener): * webaudio/AudioListener.h: (WebCore::AudioListener::setPosition): (WebCore::AudioListener::setOrientation): (WebCore::AudioListener::setVelocity): * webaudio/AudioNode.cpp: (WebCore::AudioNode::AudioNode): * webaudio/AudioNode.h: (WebCore::AudioNode::sampleRate): * webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::AudioPannerNode): (WebCore::AudioPannerNode::getAzimuthElevation): * webaudio/AudioPannerNode.h: (WebCore::AudioPannerNode::create): * webaudio/AudioParam.cpp: (WebCore::AudioParam::value): (WebCore::AudioParam::smoothedValue): (WebCore::AudioParam::smooth): (WebCore::AudioParam::calculateSampleAccurateValues): * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::timeToSampleFrame): (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): * webaudio/AudioSourceNode.h: (WebCore::AudioSourceNode::AudioSourceNode): * webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * webaudio/BiquadFilterNode.h: (WebCore::BiquadFilterNode::create): * webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::BiquadProcessor): * webaudio/BiquadProcessor.h: * webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): * webaudio/ConvolverNode.h: (WebCore::ConvolverNode::create): * webaudio/DefaultAudioDestinationNode.cpp: (WebCore::DefaultAudioDestinationNode::initialize): * webaudio/DefaultAudioDestinationNode.h: (WebCore::DefaultAudioDestinationNode::sampleRate): * webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::DelayDSPKernel): (WebCore::DelayDSPKernel::process): * webaudio/DelayDSPKernel.h: * webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * webaudio/DelayNode.h: (WebCore::DelayNode::create): * webaudio/DelayProcessor.cpp: (WebCore::DelayProcessor::DelayProcessor): * webaudio/DelayProcessor.h: * webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): * webaudio/DynamicsCompressorNode.h: (WebCore::DynamicsCompressorNode::create): * webaudio/HighPass2FilterNode.cpp: (WebCore::HighPass2FilterNode::HighPass2FilterNode): * webaudio/HighPass2FilterNode.h: (WebCore::HighPass2FilterNode::create): * webaudio/JavaScriptAudioNode.cpp: (WebCore::JavaScriptAudioNode::create): (WebCore::JavaScriptAudioNode::JavaScriptAudioNode): (WebCore::JavaScriptAudioNode::initialize): * webaudio/JavaScriptAudioNode.h: * webaudio/LowPass2FilterNode.cpp: (WebCore::LowPass2FilterNode::LowPass2FilterNode): * webaudio/LowPass2FilterNode.h: (WebCore::LowPass2FilterNode::create): * webaudio/OfflineAudioDestinationNode.h: (WebCore::OfflineAudioDestinationNode::sampleRate): * webaudio/RealtimeAnalyserNode.cpp: (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode): * webaudio/RealtimeAnalyserNode.h: (WebCore::RealtimeAnalyserNode::create): * webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::process): * webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::WaveShaperProcessor): * webaudio/WaveShaperProcessor.h: 2011-10-05 Alexey Proskuryakov [Mac] Make built-in PDF description localizable https://bugs.webkit.org/show_bug.cgi?id=69442 Reviewed by Dan Bernstein. Added strings for plug-in's name and for its supported MIME type. * English.lproj/Localizable.strings: * WebCore.exp.in: * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::builtInPDFPluginName): (WebCore::DefaultLocalizationStrategy::pdfDocumentTypeDescription): * platform/DefaultLocalizationStrategy.h: * platform/LocalizationStrategy.h: * platform/LocalizedStrings.cpp: (WebCore::builtInPDFPluginName): (WebCore::pdfDocumentTypeDescription): * platform/LocalizedStrings.h: 2011-10-05 David Levin Attempt to fix the bindings test (broken by r96727). Reviewed by Adam Barth. * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::ConfigureV8TestMediaQueryListListenerTemplate): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): 2011-10-05 James Robinson [chromium] Hook WebCompositor interface for input events up to the compositor proper https://bugs.webkit.org/show_bug.cgi?id=69394 Reviewed by Darin Fisher. This wires up WebCompositorImpl to the compositor itself so we can handle input events as scrolls on the compositor thread, although it doesn't actually wire up any input events to actual scrolling. The way this works: - CCThreadProxy owns an adapter that implements the CCScrollController interface - CCThreadProxy owns a CCInputHandler, which is implemented by WebKit::WebCompositorImpl, that has a pointer to the adapter - CCLayerTreeHost has an identifier (an int) for its WebKit::WebCompositorImpl that's initialized in initializeLayerRenderer. This identifier is exposed to its owner (WebKit::WebViewImpl) so the embedder can wire up the threading logic behind the scenes. This is just plumbing, no change in behavior. * WebCore.gypi: * platform/graphics/chromium/cc/CCInputHandler.h: Added. (WebCore::CCInputHandler::~CCInputHandler): (WebCore::CCInputHandler::CCInputHandler): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::compositorIdentifier): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::scrollRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCScrollController.h: Added. (WebCore::CCScrollController::CCScrollController): (WebCore::CCScrollController::~CCScrollController): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore::CCSingleThreadProxy::compositorIdentifier): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxyScrollControllerAdapter::create): (WebCore::CCThreadProxyScrollControllerAdapter::~CCThreadProxyScrollControllerAdapter): (WebCore::CCThreadProxyScrollControllerAdapter::scrollRootLayer): (WebCore::CCThreadProxyScrollControllerAdapter::CCThreadProxyScrollControllerAdapter): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::compositorIdentifier): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-05 Andreas Kling Shrink OutlineValue. https://bugs.webkit.org/show_bug.cgi?id=69436 Reviewed by Darin Adler. Move OutlineValue::m_isAuto up into the base class (BorderValue.) This shrinks OutlineValue by 32 bit, which in turn shrinks StyleBackgroundData by one CPU word. This reduces memory consumption by 250 kB (on 64-bit) when loading the full HTML5 spec. * rendering/style/BorderValue.h: (WebCore::BorderValue::BorderValue): * rendering/style/OutlineValue.h: (WebCore::OutlineValue::OutlineValue): (WebCore::OutlineValue::isAuto): 2011-10-05 Chang Shu [WK2] WebKitTestRunner needs LayoutTestController.dumpConfigurationForViewport https://bugs.webkit.org/show_bug.cgi?id=69365 Reviewed by Darin Adler. Expose computeViewportAttributes for mac build. * WebCore.exp.in: 2011-10-05 Anna Cavender Functions to make enabled at runtime, including changes to CodeGeneratorvV8 to allow entire interfaces (not just attributes) to be runtime-enabled. https://bugs.webkit.org/show_bug.cgi?id=69352 Reviewed by Adam Barth. No new tests. No new functionality. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled): * bindings/scripts/CodeGeneratorV8.pm: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadTextTracks): * html/HTMLTrackElement.idl: 2011-10-05 Kenneth Russell Mask underlying RENDERER and VENDOR strings https://bugs.webkit.org/show_bug.cgi?id=69389 Reviewed by Sam Weinig. Test: fast/canvas/webgl/renderer-and-vendor-strings.html * html/canvas/WebGLGetInfo.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getParameter): 2011-10-05 Sachin Puranik Spec change - option.label should be reflected like option.value https://bugs.webkit.org/show_bug.cgi?id=68684 Reviewed by Darin Adler. Incorporating the recent change in spec for label attribute of option element. While retrieving the "Label" IDL attribute return the "Label" content attribute if present , else return the value of textContent attribute. Tests: fast/forms/option-label-trim-html-spaces.html fast/forms/option-value-and-label-changed-by-js.html * dom/OptionElement.cpp: (WebCore::OptionElement::normalizeText):style fixes * dom/OptionElement.h: make collectOptionInnerText() protected. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::label): return innerText if label attribute un-available. (WebCore::HTMLOptionElement::setLabel):setLabel() implementation. * html/HTMLOptionElement.h: add setLabel declaration. * html/HTMLOptionElement.idl: Change reflect to ConvertNullToNullString in idl 2011-10-05 Rémi Duraffort [GTK] Fix compilation with gtk v2.20.1 https://bugs.webkit.org/show_bug.cgi?id=69418 Unreviewed build fix * platform/gtk/GtkDragAndDropHelper.cpp: 2011-10-05 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68731 Outline sides not painted for region. Fix the painting and hit testing code for regions to add in the maximalOutlineSize on unclipped sides. Also fix some math errors with the computation of the translation offset and clip rects when overflow or outlines spill out. Reviewed by Darin Adler. Added new test in fast/regions. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): 2011-10-05 Yury Semikhatsky Unreviewed. Build fix: make InspectorStateClient.h Private in XCode project. * WebCore.xcodeproj/project.pbxproj: 2011-10-05 Martin Robinson libsoup-CRITICAL **: soup_message_io_pause: assertion `io != NULL' failed https://bugs.webkit.org/show_bug.cgi?id=64263 Reviewed by Xan Lopez. No new tests. This is difficult to test because it relies on network timing and to catch and parse stdout. Instead of allowing messages to pause and unpause after receiving headers, we wait until the completion of the sendRequestCallback. This will ensure that the SoupSession is in the correct state to allow for pausing and unpausing. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::platformSetDefersLoading): Don't pause and unpause until the sendRequestCallback is called. We detect this situation by checking whether or not we have an input stream yet. Previously the code was only pausing until after soupMessage->status_code was not equal to SOUP_STATUS_NONE. This means that the message was pausable right after headers are received. sendRequestCallback happens some time after that. 2011-10-05 Ilya Tikhonovsky Unreviewed build fix for Debug builders. * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::restoreInspectorStateFromCookie): 2011-10-05 Dirk Schulze SVG 1.1: ineffectual transform attribute for ClipPath https://bugs.webkit.org/show_bug.cgi?id=55361 Reviewed by Nikolas Zimmermann. Respect 'transform' attribute/property for . If the masking code path is used the mask context gets transformed, otherwise the path itself. Tests: svg/clip-path/clip-path-transform-1.svg svg/clip-path/clip-path-transform-2.svg svg/dynamic-updates/SVGClipPathElement-transform-influences-hitTesting.html * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::pathOnlyClipping): Transform the clip path. (WebCore::RenderSVGResourceClipper::applyClippingToContext): (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): Transform the context of the mask image. (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect): Repaint rect must get concatenated with the current animated transformation. (WebCore::RenderSVGResourceClipper::hitTestClipContent): Point for hit testing must be transformed by the current animated transformation. * rendering/svg/RenderSVGResourceClipper.h: 2011-10-05 Pavel Feldman Web Inspector: move elements panel update semantics from ElementsPanel to ElementsTreeOutline. https://bugs.webkit.org/show_bug.cgi?id=69431 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.show): (WebInspector.ElementsPanel.prototype.hide): (WebInspector.ElementsPanel.prototype._selectedNodeChanged): (WebInspector.ElementsPanel.prototype._reset): (WebInspector.ElementsPanel.prototype._nodeRemoved): (WebInspector.ElementsPanel.prototype.updateBreadcrumb.selectCrumbFunction): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype.wireToDomAgent): (WebInspector.ElementsTreeOutline.prototype.setVisible): (WebInspector.ElementsTreeOutline.prototype.addEventListener): (WebInspector.ElementsTreeOutline.prototype.removeEventListener): (WebInspector.ElementsTreeOutline.prototype.selectDOMNode): (WebInspector.ElementsTreeOutline.prototype.update): (WebInspector.ElementsTreeOutline.prototype._selectedNodeChanged): (WebInspector.ElementsTreeOutline.prototype.findTreeElement.parentNode): (WebInspector.ElementsTreeOutline.prototype.findTreeElement): (WebInspector.ElementsTreeOutline.prototype.createTreeElementFor): (WebInspector.ElementsTreeOutline.prototype._ondrop.callback): (WebInspector.ElementsTreeOutline.prototype._ondrop): (WebInspector.ElementsTreeOutline.prototype.adjustCollapsedRange): (WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes): (WebInspector.ElementsTreeElement.prototype.insertChildElement): (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback): (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted): (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): (WebInspector.ElementsTreeElement.prototype._editingCancelled): (): * inspector/front-end/externs.js: (WebInspector.ElementsTreeOutline): * inspector/front-end/utilities.js: 2011-10-05 Yury Semikhatsky Web Inspector: provide a way for persisting worker inspector state https://bugs.webkit.org/show_bug.cgi?id=69422 Worker inspector can persist and restore its state. InspectorStateClient is exctracted into a separate interface and has a custom implementation in case of worker inspector. Reviewed by Pavel Feldman. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorClient.h: * inspector/InspectorState.cpp: (WebCore::InspectorState::InspectorState): * inspector/InspectorState.h: * inspector/InspectorStateClient.h: Copied from Source/WebCore/inspector/InspectorClient.h. (WebCore::InspectorStateClient::~InspectorStateClient): (WebCore::InspectorStateClient::updateInspectorStateCookie): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::restoreInspectorStateFromCookie): * inspector/WorkerInspectorController.h: * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerProxy::postMessageToPageInspector): (WebCore::SharedWorkerProxy::updateInspectorStateCookie): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::updateInspectorStateCookie): * workers/WorkerMessagingProxy.h: * workers/WorkerReportingProxy.h: 2011-10-05 Abhishek Arya Crash in SVGTRefElement::updateReferencedText. https://bugs.webkit.org/show_bug.cgi?id=67555 Reviewed by Rob Buis. Test: svg/text/tref-event-listener-crash.svg * svg/SVGTRefElement.cpp: (WebCore::SubtreeModificationEventListener::clear): This fixes the crash. there can be cases when our target is removed, but our event listener is alive. when our tref is going away, we need to disable those event listeners by nulling out our tref element. (WebCore::SubtreeModificationEventListener::handleEvent): Adding null check for tref element, which can happen in cases where event listener's clear is called, but we could not remove it from the target. (WebCore::SVGTRefElement::~SVGTRefElement): There are always cases when removedFromDocument is not called. So, important to clear event listener in those cases. (WebCore::SVGTRefElement::svgAttributeChanged): Use common function buildPendingResource. (WebCore::SVGTRefElement::buildPendingResource): Common function to prevent triple duplication of same code. made it more readable. (WebCore::SVGTRefElement::insertedIntoDocument): Use common function buildPendingResource. (WebCore::SVGTRefElement::removedFromDocument): Use new helper removeEventListener. (WebCore::SVGTRefElement::clearEventListener): Helper to clear event listener. Name chosen to not collide with Node::removeEventListener. * svg/SVGTRefElement.h: definition of new helpers. * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedIntoDocument): Copy same logic as tref and use element. more asserts and easy bailouts. 2011-10-05 Pavel Feldman Not reviewed: restoring : shortcut in inspector. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSidebarButtons): 2011-10-05 Andreas Kling Shrink FontDescription. https://bugs.webkit.org/show_bug.cgi?id=69426 Reviewed by Nikolas Zimmermann. Pack FontDescription's members in a bitfield, effectively shrinking the class by two CPU-words. This reduces memory consumption by ~1 MB on 64-bit when loading the full HTML5 spec. * platform/graphics/FontDescription.h: (WebCore::FontDescription::orientation): (WebCore::FontDescription::textOrientation): (WebCore::FontDescription::widthVariant): 2011-10-05 Vsevolod Vlasov Web Inspector: Add support for search in script content. https://bugs.webkit.org/show_bug.cgi?id=69015 Reviewed by Pavel Feldman. Tests: http/tests/inspector/search/search-in-concatenated-script.html http/tests/inspector/search/search-in-script.html * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::getScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._sortedScripts.var): (WebInspector.ConcatenatedScriptsContentProvider.prototype._sortedScripts): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.maybeCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.searchCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.requestSource.didGetScriptSource): (WebInspector.Script.prototype.requestSource): (WebInspector.Script.prototype.searchInContent): 2011-10-05 Alexis Menard [Qt][WK2] Default directories and paths are missing for LocalStorage, Database and IconDatabase. https://bugs.webkit.org/show_bug.cgi?id=69111 Reviewed by Kenneth Rohde Christiansen. Provide default path for LocalStorage, Database and IconDatabase using QDesktopServices. No new tests : existing ones should cover. * platform/qt/CookieJarQt.cpp: (WebCore::SharedCookieJarQt::SharedCookieJarQt): 2011-10-05 Patrick Gansterer Unreviewed build fix for !ENABLE(FILTERS) after r96203. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientUpdatedFromElement): 2011-10-05 Ilya Tikhonovsky Unreviewed build fix for windows bots after r96679. * html/NumberInputType.h: 2011-10-04 Pavel Feldman Web Inspector: make ResourceView(s) compile https://bugs.webkit.org/show_bug.cgi?id=69351 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable.prototype._sortCookies): * inspector/front-end/DataGrid.js: * inspector/front-end/EmptyView.js: * inspector/front-end/FontView.js: (WebInspector.FontView.prototype._createContentIfNeeded): * inspector/front-end/ImageView.js: (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad): (WebInspector.ImageView.prototype._createContentIfNeeded): (WebInspector.ImageView.prototype._openInNewTab): * inspector/front-end/NetworkItemView.js: * inspector/front-end/ResourceCookiesView.js: * inspector/front-end/ResourceHTMLView.js: (WebInspector.ResourceHTMLView.prototype.hide): * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._refreshParms): (WebInspector.ResourceHeadersView.prototype._refreshHeadersTitle): (WebInspector.ResourceHeadersView.prototype._refreshHeaders): (WebInspector.ResourceHeadersView.prototype._refreshHeadersText): * inspector/front-end/ResourceJSONView.js: (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.parseJSONP): * inspector/front-end/ResourcePreviewView.js: * inspector/front-end/ResourceResponseView.js: * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.createTimingTable): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame): * inspector/front-end/SourceFrame.js: * inspector/front-end/TabbedPane.js: * inspector/front-end/UIUtils.js: (Number.secondsToString): (Number.bytesToString): * inspector/front-end/inspector.js: 2011-10-04 Ilya Tikhonovsky Web Inspector: debuggerPresentatioModel.linkifyLocation leaks updateAnchor closure instances. https://bugs.webkit.org/show_bug.cgi?id=69146 In many places we use linkifyLocation function to produce a link node which updates automatically when the source file is changed on the fly. Such changes happen when we use pretty print or another operation that changes the source code somehow. linkifyLocation associates a new instance of updateAnchor closure with the each link node and add the closure to the SourceMappingUpdated event's list. As the result the node<->closure pairs wouldn't be collected until reset the UI and DebuggerPresentationModel. Reviewed by Pavel Feldman. Test: inspector/debugger/linkifier.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl): (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleCommandResult): (WebInspector.ConsoleMessage.create): (WebInspector.ConsoleMessage.createTextMessage): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.createLinkifier): (WebInspector.DebuggerPresentationModel.Linkifier): (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.Linkifier.prototype.reset): (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateSourceAnchors): (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView): (WebInspector.CPUProfileView.prototype._resetClicked): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._linkifyLocation): (WebInspector.TimelinePanel.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/inspector.js: 2011-10-03 Andreas Kling REGRESSION(r82611) InlineBox has 33 bits of bitset, causing alignment issues and extra memory use. https://bugs.webkit.org/show_bug.cgi?id=64914 Reviewed by Antti Koivisto. Remove InlineBox::prevOnLineExists() and its two accompanying bitfields since nobody is using them anymore. nextOnLineExists() is still used by GTK+ accessibility code. Also added a compile-time assertion to guard against future bloating of the InlineBox class. * rendering/InlineBox.cpp: (WebCore::SameSizeAsInlineBox::~SameSizeAsInlineBox): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-10-05 Andreas Kling Shrink FontFallbackList. https://bugs.webkit.org/show_bug.cgi?id=69093 Rubber-stamped by Antti Koivisto. Workaround MSVC quirk by making enum bitfield "unsigned". * platform/graphics/FontFallbackList.h: 2011-10-05 Andreas Kling Shrink StyleRareNonInheritedData. https://bugs.webkit.org/show_bug.cgi?id=69331 Reviewed by Darin Adler. Workaround MSVC quirk by making enum bitfields "unsigned". * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionOverflow): (WebCore::InheritedFlags::transformStyle3D): (WebCore::InheritedFlags::backfaceVisibility): (WebCore::InheritedFlags::pageSizeType): * rendering/style/StyleRareNonInheritedData.h: 2011-10-05 Pavel Feldman Web Inspector: add CSS model classes to the compilation. https://bugs.webkit.org/show_bug.cgi?id=69376 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/CSSCompletions.js: * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.forProperty): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleDeclaration): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): (WebInspector.CSSStyleModelResourceBinding.prototype.canSetContent): * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._containsInherited): (WebInspector.StylePropertiesSection.prototype.isPropertyInherited): (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded): (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): * inspector/front-end/externs.js: (Array.prototype.keySet): 2011-10-05 Kent Tamura Input styles are unexpectedly shared regardless of required status difference. https://bugs.webkit.org/show_bug.cgi?id=69402 Reviewed by Daniel Bates. Tests: fast/css/pseudo-required-shared.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): Check the difference of required(). 2011-10-04 Kent Tamura Remove Node::willBlur() https://bugs.webkit.org/show_bug.cgi?id=69395 Reviewed by Ryosuke Niwa. Revert the WebCore part of r87371 because FrameSelection::textWillBeReplaced() doesn't set focus anymore. No new tests. Covered by fast/forms/input-number-blur-twice.html. * dom/Document.cpp: (WebCore::Document::setFocusedNode): Revert r87371. * dom/Node.cpp: ditto. * dom/Node.h: ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::handleBlurEvent): ditto. * html/HTMLInputElement.h: ditto. * html/InputType.cpp: (WebCore::InputType::handleBlurEvent): ditto. * html/InputType.h: ditto. * html/NumberInputType.cpp: (WebCore::NumberInputType::handleBlurEvent): ditto. * html/NumberInputType.h: ditto. 2011-10-04 Kent Tamura Introduce feature flags for incomplete input types https://bugs.webkit.org/show_bug.cgi?id=68971 Reviewed by Hajime Morita. * Configurations/FeatureDefines.xcconfig: Add ENABLE_INPUT_TYPE_* flags. They are enabled only for iOS. * html/DateInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_DATE) * html/DateInputType.h: ditto. * html/DateTimeInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_DATETIME) * html/DateTimeInputType.h: ditto. * html/DateTimeLocalInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_DATETIMELOCAL) * html/DateTimeLocalInputType.h: ditto. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): Recognizes type attribute value only if it is enabled by ENABLE(INPUT_TYPE_*). * html/MonthInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_MONTH) * html/MonthInputType.h: ditto. * html/TimeInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_TIME) * html/TimeInputType.h: ditto. * html/WeekInputType.cpp: Wrapped with ENABLE(INPUT_TYPE_WEEK) * html/WeekInputType.h: ditto. 2011-10-04 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69398 [CSS3 Regions] Support the region-overflow property properly. (1) Change -webkit-break to break, since the -webkit-region-overflow property already has the -webkit- extension. (2) Fix clipping so that it works when overflow is set or when region break is set. (3) Refactor all the pagination spots to check if a next page is available using the new hasNextPage function. This prevents us from paginating if we hit the last region and further breaks are no longer allowed. Reviewed by Dan Bernstein. Added new tests in fast/regions. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator RegionOverflow): * css/CSSValueKeywords.in: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::hasNextPage): (WebCore::RenderBlock::nextPageLogicalTop): (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::pushToNextPageWithMinimumLogicalHeight): (WebCore::RenderBlock::adjustLinePositionForPagination): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::repaintRectangleInRegions): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): 2011-10-04 Mark Hahnenberg Add static ClassInfo structs to classes that override JSCell::getCallData https://bugs.webkit.org/show_bug.cgi?id=69311 Reviewed by Darin Adler. No new tests. Added ClassInfo structs to each class that defined its own getCallData function but did not already have its own ClassInfo struct. This is a necessary addition for when we switch over to looking up getCallData from the MethodTable in ClassInfo rather than doing the virtual call (which we are removing). These new ClassInfo structs are public because we often use these structs in other areas of the code to uniquely identify JSC classes and to enforce runtime invariants based on those class identities using ASSERTs. Also added new createStructure methods to those classes that didn't have them so that the new ClassInfo structs would be used when creating the Structures in these classes. * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-10-03 Geoffrey Garen Some JSValue cleanup https://bugs.webkit.org/show_bug.cgi?id=69320 Reviewed by Darin Adler. * bindings/js/JSDOMBinding.cpp: (WebCore::valueToDate): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSQLTransactionSyncCustom.cpp: (WebCore::JSSQLTransactionSync::executeSql): * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): Updated for JSC changes. 2011-10-04 Sadrul Habib Chowdhury Fix FrameView::scrollElementToRect to take already scrolled amount into consideration. https://bugs.webkit.org/show_bug.cgi?id=69220 Reviewed by Simon Fraser. * page/FrameView.cpp: (WebCore::FrameView::scrollElementToRect): 2011-10-04 Anders Carlsson Ignore the warning about using 'override'. * WebCore.vcproj/WebCore.vcproj: 2011-10-04 Sam Weinig Stub out WorkerScriptController::disableEval for v8 to fix the build. * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): * bindings/v8/WorkerScriptController.h: 2011-10-04 Sam Weinig OVERRIDE seems to not be working for Windows. Remove it for now. * dom/Document.h: * workers/WorkerContext.h: 2011-10-04 Sam Weinig Wean ContentSecurityPolicy from the Document https://bugs.webkit.org/show_bug.cgi?id=69387 Reviewed by Adam Barth. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): * bindings/js/WorkerScriptController.h: * dom/Document.cpp: (WebCore::Document::disableEval): * dom/Document.h: * workers/WorkerContext.cpp: (WebCore::WorkerContext::disableEval): * workers/WorkerContext.h: * dom/ScriptExecutionContext.h: Add pure virtual disableEval to ScriptExecutionContext, so that ContentSecurityPolicy can call it for both Documents and WorkerContexts. * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): Call the new ScriptExecutionContext::disableEval() function. (WebCore::ContentSecurityPolicy::reportViolation): Use ScriptExecutionContext::addMessage() instead of going directly to the DOMWindow. 2011-10-04 Anders Carlsson Move code into ScrollElasticityController::beginScrollGesture() https://bugs.webkit.org/show_bug.cgi?id=69383 Reviewed by John Sullivan. * platform/mac/ScrollAnimatorMac.h: Add new ScrollElasticityControllerClient member functions. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::isHorizontalScrollerPinnedToMinimumPosition): (WebCore::ScrollAnimatorMac::isHorizontalScrollerPinnedToMaximumPosition): (WebCore::ScrollAnimatorMac::stretchAmount): (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Implement the new ScrollElasticityControllerClient member functions. (WebCore::ScrollAnimatorMac::beginScrollGesture): Move code into ScrollElasticityController::beginScrollGesture and call it directly. * platform/mac/ScrollElasticityController.h: Add new ScrollElasticityControllerClient member functions. * platform/mac/ScrollElasticityController.mm: (WebCore::reboundDeltaForElasticDelta): (WebCore::ScrollElasticityController::beginScrollGesture): Set up the scroll gesture state. (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): New helper function. 2011-10-04 Scott Graham Add GAMEPAD feature flag https://bugs.webkit.org/show_bug.cgi?id=66859 Reviewed by Darin Fisher. No new tests, as no new functionality yet. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * features.pri: 2011-10-04 Fady Samuel [Chromium] Moved files towards GTK removal https://bugs.webkit.org/show_bug.cgi?id=69229 Reviewed by Tony Chang. * WebCore.gypi: * platform/chromium/PlatformThemeChromiumLinux.cpp: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp. (WebCore::PlatformThemeChromiumLinux::setScrollbarColors): (WebCore::clamp): (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten): (WebCore::PlatformThemeChromiumLinux::outlineColor): (WebCore::PlatformThemeChromiumLinux::paintArrowButton): * platform/chromium/PlatformThemeChromiumLinux.h: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.h. (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor): (WebCore::PlatformThemeChromiumLinux::thumbActiveColor): (WebCore::PlatformThemeChromiumLinux::trackColor): (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux): 2011-10-04 James Robinson [chromium] Extract scheduling logic from CCThreadProxy to its own class https://bugs.webkit.org/show_bug.cgi?id=69049 Reviewed by Kenneth Russell. This partially extracts the commit/draw scheduling from CCThreadProxy to a separate isolated class. This makes the commit/draw logic easier to test, understand and extend. There is one subtle behavior change here to the way that the function formerly known as CCLayerTreeHost::setNeedsCommitAndRedraw works. Previously, this would trigger a begin frame message, if one wasn't pending, and then trigger a redraw if one wasn't pending. This was subtly wrong - the intent of that call is that a redraw should happen after the commit. It isn't useful to draw before the commit occurs. This patch changes the name of the function to setNeedsCommitThenRedraw and only requests a redraw after a commit occurs. Covered by new CCSchedulerTest unit tests, CCLayerTreeHostTest unit tests, and compositing/ layout tests. * WebCore.gypi: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::setZoomAnimatorTransform): (WebCore::CCLayerTreeHost::setNeedsCommitThenRedraw): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCScheduler.cpp: Added. (WebCore::CCScheduler::CCScheduler): (WebCore::CCScheduler::requestCommit): (WebCore::CCScheduler::requestCommitThenRedraw): (WebCore::CCScheduler::requestRedraw): (WebCore::CCScheduler::didCommit): (WebCore::CCScheduler::didDraw): * platform/graphics/chromium/cc/CCScheduler.h: Added. (WebCore::CCSchedulerClient::~CCSchedulerClient): (WebCore::CCScheduler::create): (WebCore::CCScheduler::commitPending): (WebCore::CCScheduler::redrawPending): (WebCore::CCScheduler::redrawAfterCommit): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommitThenRedraw): (WebCore::CCSingleThreadProxy::setNeedsRedraw): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxySchedulerClient::create): (WebCore::CCThreadProxySchedulerClient::~CCThreadProxySchedulerClient): (WebCore::CCThreadProxySchedulerClient::scheduleBeginFrameAndCommit): (WebCore::CCThreadProxySchedulerClient::scheduleDrawAndPresent): (WebCore::CCThreadProxySchedulerClient::CCThreadProxySchedulerClient): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitThenRedraw): (WebCore::CCThreadProxy::setNeedsCommitThenRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): (WebCore::CCThreadProxy::finishAllRenderingOnCCThread): (WebCore::CCThreadProxy::obtainBeginFrameAndCommitTaskFromCCThread): (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::drawLayersAndPresentOnCCThread): (WebCore::CCThreadProxy::initializeImplOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-10-04 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=67774 PDF in a frameset is not displayed, always downloads Reviewed by Darin Adler. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: Added exports necessary to subclass a ScrollableArea. 2011-10-04 Anders Carlsson ScrollElasticityController should keep track of the rubberband timer state https://bugs.webkit.org/show_bug.cgi?id=69381 Reviewed by Sam Weinig. Add a m_snapRubberbandTimerIsActive member variable to ScrollElasticityController and use it instead of checking whether the m_snapRubberbandTimer is active. Eventually, ScrollElasticityControllerClient will have two member functions for starting and stopping the timer, and the ScrollElasticityController will call them at the appropriate times. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): It's OK to stop the timer unconditionally. (WebCore::ScrollAnimatorMac::snapRubberBand): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::ScrollElasticityController): 2011-10-04 Anders Carlsson Move all rubber-banding related member variables to ScrollElasticityController https://bugs.webkit.org/show_bug.cgi?id=69379 Reviewed by Dan Bernstein. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): (WebCore::ScrollAnimatorMac::snapRubberBand): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::ScrollElasticityController): 2011-10-04 Anders Carlsson Build fixes for everyone. * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): Fix Chromium build. * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Fix GTK+ build. 2011-10-04 Anders Carlsson Add a ScrollElasticityController class and move some members over from ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=69373 Reviewed by David Hyatt. ScrollElasticityController is a new class that will handle the rubber-banding when handling scroll events. * WebCore.xcodeproj/project.pbxproj: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): (WebCore::ScrollAnimatorMac::snapRubberBand): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * platform/mac/ScrollElasticityController.h: Added. (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): * platform/mac/ScrollElasticityController.mm: Added. (WebCore::ScrollElasticityController::ScrollElasticityController): 2011-10-04 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69372 [CSS3 Regions] Make sure overflow:visible lets content spill out of regions. Reviewed by Anders Carlsson. No new tests, since plenty of results changed. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintIntoRegion): (WebCore::RenderFlowThread::hitTestRegion): (WebCore::RenderFlowThread::repaintRectangleInRegions): (WebCore::RenderFlowThread::firstRegion): (WebCore::RenderFlowThread::lastRegion): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::regionOverflowRect): (WebCore::RenderRegion::isFirstRegion): (WebCore::RenderRegion::isLastRegion): (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: (WebCore::RenderRegion::setRegionRect): (WebCore::RenderRegion::regionRect): 2011-10-04 Chris Rogers Avoid unnecessary ASSERT in AudioDSPKernelProcessor::setNumberOfChannels() https://bugs.webkit.org/show_bug.cgi?id=69361 Reviewed by James Robinson. No new tests. This changes no JavaScript API. * platform/audio/AudioDSPKernelProcessor.cpp: (WebCore::AudioDSPKernelProcessor::setNumberOfChannels): 2011-10-04 Anders Carlsson Use const PlatformWheelEvent references where possible https://bugs.webkit.org/show_bug.cgi?id=69367 Reviewed by Sam Weinig. * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): * platform/ScrollAnimator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::handleWheelEvent): * platform/ScrollableArea.h: * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): 2011-10-04 Andreas Kling Shrink HTMLTableCellElement. https://bugs.webkit.org/show_bug.cgi?id=69347 Reviewed by Antti Koivisto. Don't cache the rowspan and colspan attributes on the element. This shrinks HTMLTableCellElement by one CPU word, reducing memory consumption by 80 kB (on 64-bit) when loading the full HTML5 spec. * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::HTMLTableCellElement): (WebCore::HTMLTableCellElement::colSpan): (WebCore::HTMLTableCellElement::rowSpan): (WebCore::HTMLTableCellElement::parseMappedAttribute): * html/HTMLTableCellElement.h: 2011-10-04 Sheriff Bot Unreviewed, rolling out r96630. http://trac.webkit.org/changeset/96630 https://bugs.webkit.org/show_bug.cgi?id=69368 Caused assertion failures in validateCell (Requested by mhahnenberg on #webkit). * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-10-04 Cary Clark Enable sub pixel text (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69354 http://code.google.com/p/chromium/issues/detail?id=98165 Reviewed by Eric Seidel. No new tests. Layout test pixel results have been disabled and will be rebaselined once all Skia on Mac changes are in. * platform/graphics/skia/FontSkia.cpp: (WebCore::setupPaint): Enable sub pixel text. This is set by default to enabled by CoreGraphics, but by default disabled on Skia. 2011-10-04 Anders Carlsson Remove PlatformWheelEvent::m_isAccepted https://bugs.webkit.org/show_bug.cgi?id=69357 Reviewed by Darin Adler. Remove PlatformWheelEvent::m_isAccepted and all the getters/setters. * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::handleGestureEvent): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::handleGestureEvent): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): * platform/efl/PlatformWheelEventEfl.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2011-09-21 Cris Neckar Hold refptr to identified previous sibling within findPlaceForCounter. https://bugs.webkit.org/show_bug.cgi?id=68563 Reviewed by Adam Barth. Test: fast/css/counters/counter-after-style-crash.html * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): 2011-10-04 Joshua Bell IndexedDB add() should fail if key is NaN https://bugs.webkit.org/show_bug.cgi?id=62286 Reviewed by Tony Chang. Test: storage/indexeddb/invalid-keys.html Implement special case - numbers are valid keys, except for NaN. * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): 2011-10-04 Mark Hahnenberg Add static ClassInfo structs to classes that override JSCell::getCallData https://bugs.webkit.org/show_bug.cgi?id=69311 Reviewed by Darin Adler. No new tests. Added ClassInfo structs to each class that defined its own getCallData function but did not already have its own ClassInfo struct. This is a necessary addition for when we switch over to looking up getCallData from the MethodTable in ClassInfo rather than doing the virtual call (which we are removing). These new ClassInfo structs are public because we often use these structs in other areas of the code to uniquely identify JSC classes and to enforce runtime invariants based on those class identities using ASSERTs. * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-10-04 Ryosuke Niwa REGRESSION(r94274): setting input.value erroneously triggers focus event https://bugs.webkit.org/show_bug.cgi?id=69315 Reviewed by Kent Tamura. Fixed the bug by adding a new flag to setSelection to avoid calling setFocusedNodeIfNeeded when called by nodeWillBeRemoved and textWillBeReplaced. Added a manual test. Unfortunately, the test always passes in DRT. * editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelection): (WebCore::FrameSelection::respondToNodeModification): (WebCore::FrameSelection::textWillBeReplaced): * editing/FrameSelection.h: * manual-tests/mutate-unfocused-text-with-selection.html: Added. 2011-10-04 Young Han Lee HTML canvas strokes with dash and dashOffset https://bugs.webkit.org/show_bug.cgi?id=63933 Reviewed by Simon Fraser. Add webkitLineDash and webkitLineDashOffset attributes to CanvasRenderingContext2D for JSC. These attributes can be used to determine the dash-style of stroke in HTML Canvas. As this kind of attributes are not specified in the HTML Canvas specification yet, the 'webkit' prefix is added to its names. Mozilla already implemented these attributes, mozDash and mozDashOffset [1], and this patch is created by referring to the implementation. This patch is basically using the specified behavior of stroke-dasharray and stroke-dashoffset in the SVG specification [2], except that doesn't support units or percentages, just floating point numbers. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=662038 [2] http://www.w3.org/TR/SVG/painting.html#StrokeProperties Tests: fast/canvas/canvas-webkitLineDash-invalid.html fast/canvas/canvas-webkitLineDash.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::webkitLineDash): (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::webkitLineDash): (WebCore::CanvasRenderingContext2D::setWebkitLineDash): (WebCore::CanvasRenderingContext2D::webkitLineDashOffset): (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: 2011-10-04 Matthew Delaney Allow canvas backing store to be lazily allocated https://bugs.webkit.org/show_bug.cgi?id=67054 Reviewed by Darin Adler. No new tests; doesn't affect behavior. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): Removed the setting of lineWidth that caused the eager creation of ImageBuffer to use its GraphicsContext. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Added in default line width setting along with other default context settings. 2011-10-04 Sam Weinig Add support for the CSP connect-src directive https://bugs.webkit.org/show_bug.cgi?id=69353 Reviewed by Adam Barth. Add CSP support for XMLHttpRequest, WebSockets and EventSource. Tests: http/tests/security/contentSecurityPolicy/connect-src-eventsource-allowed.html http/tests/security/contentSecurityPolicy/connect-src-eventsource-blocked.html http/tests/security/contentSecurityPolicy/connect-src-websocket-allowed.html http/tests/security/contentSecurityPolicy/connect-src-websocket-blocked.html http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-allowed.html http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked.html * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::allowConnectFromSource): (WebCore::ContentSecurityPolicy::addDirective): * page/ContentSecurityPolicy.h: Add connect-src directive parsing and predicate. * page/EventSource.cpp: (WebCore::EventSource::create): * websockets/WebSocket.cpp: (WebCore::WebSocket::connect): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): Test allowConnectFromSource when establishing a connection. 2011-10-03 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69317 [CSS3 Regions] Make overflow:hidden/auto/scroll sections behave properly when split across regions. This includes sizing and positioning independently in each region, clipping independently in each region, and shifting to avoid floats in each region. Reviewed by Anders Carlsson. Added many new tests in fast/regions. * editing/Editor.cpp: (WebCore::Editor::insideVisibleArea): Patching a call to overflowClipRect, which now includes a region argument so that clipping can be adjusted per-region. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't clear out the cached region information when the width changes. Instead make a new call to the flow thread to check if widths changed in any region and set relayoutChildren to true if so. (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): This is a new function that has been split out from determineLogicalLeftPositionForChild so that it can be called by region code to compute offsets independently in each region without altering the overall object's logical left position. (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Patched to call computeStartPositionDeltaForChildAvoidingFloats instead of doing the work of avoiding the floats itself. (WebCore::RenderBlock::computeLogicalLocationForFloat): Fix the left clamping code to clamp to the left border in the correct region rather than always just clamping to 0. (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::logicalRightOffsetForContent): Tweaked to handle the new signature of borderBoxRectInRegion. (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Reworked not to return 0 on failure or when done, but to just return the current height. This is a more fitting answer for the function to return when no more floats remain. (WebCore::RenderBlock::getClearDelta): Big changes to this function. It was never patched to support writing modes, so the new code is all writing-mode-aware now. Also improved the computeLogicalWidth() call to make sure margins didn't get incorrectly changed. The code computes transient information in each region as the object tries to find a place to fit, so that the old widths are properly retained when layout of that child later checks to see if it needs to relayout children or not. (WebCore::RenderBlock::nodeAtPoint): Patched to call overflowClipRect with the region being hit tested. (WebCore::inNormalFlow): Tweaked to not need the initialBlock variable. (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::adjustLinePositionForPagination): (WebCore::RenderBlock::lineWidthForPaginatedLineChanged): Tweaked to use inRenderFlowThread() now that it exists. Also removing the regionsHaveUniformLogicalWidth() optimization, since you can't rely on that when objects size differently depending on floats. In other words, the future of pagination is variable width objects even in printing/columns. (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage): Renamed to make it more clear what logicalPageOffset() was. It's your offset from the top of the first page. (WebCore::RenderBlock::regionAtBlockOffset): New helper function for accessing the region at a given offset within your block. (WebCore::RenderBlock::logicalWidthChangedInRegions): New helper function that computes whether or not your logical width information changed in any regions. If so, relayoutChildren gets set to true (just as it would have when computeLogicalWidth for the overall block changes values). (WebCore::RenderBlock::collapsedMarginBeforeForChild): (WebCore::RenderBlock::collapsedMarginAfterForChild): (WebCore::RenderBlock::marginBeforeForChild): (WebCore::RenderBlock::marginAfterForChild): (WebCore::RenderBlock::marginLogicalLeftForChild): (WebCore::RenderBlock::marginLogicalRightForChild): (WebCore::RenderBlock::marginStartForChild): (WebCore::RenderBlock::marginEndForChild): Tweaked because of const to take const arguments. * rendering/RenderBlock.h: (WebCore::RenderBlock::availableLogicalWidthForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::startOffsetForLine): (WebCore::RenderBlock::logicalWidthForChild): (WebCore::RenderBlock::logicalHeightForChild): (WebCore::RenderBlock::logicalTopForChild): (WebCore::RenderBlock::logicalLeftForChild): (WebCore::RenderBlock::availableLogicalWidthForContent): (WebCore::RenderBlock::startOffsetForContent): (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::logicalRightOffsetForContent): Reworking these functions so versions exist that take regions and page offsets to avoid having to recalculate where you are over and over again as you walk up a containing block chain. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitBelowFloats): Changed to handle the better return value for nextFloatLogicalBottomBelow. (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Removing the uniform logical width optimization. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): Changed to take a region and offset from the first page so that it doesn't have to be recomputed as you recur up the containing block chain. (WebCore::RenderBox::clearRenderBoxRegionInfo): Changed to just use inRenderFlowThread(). (WebCore::RenderBox::pushContentsClip): Changed for the new region-parameterized overflow clip function. (WebCore::RenderBox::overflowClipRect): Now takes a region so that a specific clip rect can be returned sized to the appropriate border box in that region. (WebCore::RenderBox::containingBlockLogicalWidthForContent): (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): Objects in flow threads no longer shrink to avoid floats when computing their overall widths. The region-specific check now does the shrinking. It checks at the point where the region slices the object, or the top of the object if it begins in the middle of the region. (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalWidthInRegion): Push all the rest of the computeLogicalWidth code into computeLogicalWidthInRegion. (WebCore::RenderBox::renderBoxRegionInfo): Changed to take the region and the offset from the top of the first page to avoid recomputation. * rendering/RenderBox.h: (WebCore::RenderBox::hasRenderOverflow): (WebCore::RenderBox::hasVisualOverflow): New helper used by the RenderLayer code to avoid having to check visual overflow when none exists. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use the new region-specific overflow clip. * rendering/RenderBoxRegionInfo.h: (WebCore::RenderBoxRegionInfo::shiftLogicalLeft): Helper used by the region code to shift a box over when floats cause it to move. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::computeLogicalWidth): Remove the optimization to avoid creating box info for uniform widths. (WebCore::RenderFlowThread::paintIntoRegion): Make the clip rects used when painting the flow thread's layer tree temporary in each region. (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Removing the uniform logical width optimization (WebCore::RenderFlowThread::logicalWidthChangedInRegions): * rendering/RenderFlowThread.h: New helper called to see if a block needs to relayout its children because its width changed in some region. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::parentClipRects): (WebCore::RenderLayer::backgroundClipRect): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::childrenClipRect): (WebCore::RenderLayer::selfClipRect): (WebCore::RenderLayer::repaintBlockSelectionGaps): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::clipBox): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::clippedByAncestor): Changing all the layer clipping code to pass regions through to all of the helper functions involved. This is so overflowClipRect can ultimately take a region. Eventually when we get positioned objects moving independently in each region, we'll patch the "clip" property as well, and it will be much easier because all the plumbing has been put in place here for overflow. * rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingRenderFlowThread): Optimized to not walk up the render tree if we're in layout and a currentRenderFlowThread() exists. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::renderBoxRegionInfo): (WebCore::RenderRegion::setRenderBoxRegionInfo): (WebCore::RenderRegion::takeRenderBoxRegionInfo): Removing the optimization for uniform logical width regions. Changed remove to take so that the caller can examine it before deleting. (WebCore::RenderRegion::offsetFromLogicalTopOfFirstPage): * rendering/RenderRegion.h: Helper function that computes the region's offset from the top of the first page. * rendering/RenderTable.cpp: (WebCore::RenderTable::overflowClipRect): (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTable.h: * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): Changed to pass the region to overflowClipRect. * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): Modified because the layer clip functions need regions now. * rendering/RenderView.h: (WebCore::RenderView::pushLayoutState): Changed to use inRenderFlowThread over view()->hasRenderFlowThread. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): Patched to use the new overflowClipRect that is region-specific. 2011-10-04 Anders Carlsson More work towards making PlatformWheelEvent immutable https://bugs.webkit.org/show_bug.cgi?id=69348 Reviewed by Sam Weinig. More work on getting rid of m_isAccepted from PlatformWheelEvent. Add more asserts that the return value of handleWheelEvent is equal to m_isAccepted. * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): 2011-10-04 Cary Clark Inset focus ring (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69166 http://code.google.com/p/chromium/issues/detail?id=97956 This focus ring was drawn too large and was left tracks in subsequent invalidations. Make it more closely match the CG version. Reviewed by Adam Barth. No new tests. This platform is not enabled. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-10-03 Jon Lee Extend DOM WheelEvent to differentiate between physical and logical scroll directions https://bugs.webkit.org/show_bug.cgi?id=68959 Reviewed by Sam Weinig. Test: fast/events/wheelevent-direction-inverted-from-device.html * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * dom/WheelEvent.h: (WebCore::WheelEvent::create): (WebCore::WheelEvent::webkitDirectionInvertedFromDevice): * dom/WheelEvent.idl: Added the webkitDirectionInvertedFromDevice idl attribute. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): (WebCore::PlatformWheelEvent::webkitDirectionInvertedFromDevice): * platform/efl/PlatformWheelEventEfl.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): if building on Lion or later, use [NSEvent isDirectionInvertedFromDevice]. * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): default to false. 2011-10-04 Rémi Duraffort [EFL] Fix compilation when SQLite and/or libxslt are not installed in /usr/include https://bugs.webkit.org/show_bug.cgi?id=69338 Unreviewed build fix * CMakeListsEfl.txt: 2011-10-03 Ken Buchanan Resource loader should block HTTP redirects to local resources https://bugs.webkit.org/show_bug.cgi?id=68706 Reviewed by Adam Barth. Modified MainResourceLoader to add an extra security check on HTTP redirects. Also, moved isFeedWithNestedProtocolInHTTPFamily to SecurityOrigin.cpp. * loader/FrameLoader.cpp: (WebCore::isFeedWithNestedProtocolInHTTPFamily): (WebCore::FrameLoader::loadFrameRequest): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::willSendRequest): * page/SecurityOrigin.cpp: (WebCore::isFeedWithNestedProtocolInHTTPFamily): (WebCore::SecurityOrigin::canDisplay): 2011-10-04 Cary Clark Apply color profile found to decoded bitmap (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69144 This fixes http://code.google.com/p/chromium/issues/detail?id=97830 Reviewed by Stephen White. No new tests. This platform is not enabled. * platform/image-decoders/ImageDecoder.h: Add color profile slot to Skia variation. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::resolveColorSpace): Adjust the bitmap in place to use the supplied color space. (WebCore::createColorSpace): Create a CGColorSpace from a color profile. (WebCore::ImageFrame::setColorProfile): Save the image's color profile until the image is complete. (WebCore::ImageFrame::setStatus): Apply the color profile, if any, to the image. 2011-10-04 Leandro Pereira [CMake] Unreviewed: pass feature definitions in the right format for the CSS scripts. The Perl scripts in the css/ directory expect the definitions passed via --defines to be a string of space-separated entries, however we were passing a list of semicolon-separated strings, thus making all feature defines actually be ignored. Detected after r96433, which checked for some definitions in CSSPropertyNames.in. No new tests, this is a build fix. * CMakeLists.txt: 2011-10-04 Pavel Feldman Web Inspector: make SourceFrame compile. https://bugs.webkit.org/show_bug.cgi?id=69345 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype.inspectElement): (WebInspector.DOMDispatcher.prototype.inspectElementRequested): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._inspectElementRequested): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired): (WebInspector.ObjectPropertyTreeElement.prototype.startEditing): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._applyDiffMarkup): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._onShowPopover.showObjectPopover): (WebInspector.SourceFrame.prototype._onShowPopover): (WebInspector.SourceFrame.prototype._editBreakpointCondition): (WebInspector.SourceFrame.prototype.startEditing): (WebInspector.SourceFrame.prototype.commitEditing.didEditContent): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrameDelegate.prototype.requestContent): (WebInspector.SourceFrameDelegate.prototype.debuggingSupported): (WebInspector.SourceFrameDelegate.prototype.setBreakpoint): (WebInspector.SourceFrameDelegate.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegate.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegate.prototype.findBreakpoint): (WebInspector.SourceFrameDelegate.prototype.continueToLine): (WebInspector.SourceFrameDelegate.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegate.prototype.setScriptSource): (WebInspector.SourceFrameDelegate.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegate.prototype.debuggerPaused): (WebInspector.SourceFrameDelegate.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegate.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegate.prototype.suggestedFileName): * inspector/front-end/externs.js: (WebInspector.log): * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): * inspector/front-end/utilities.js: (): 2011-10-04 Mikhail Naganov Web Inspector: Factor out object properties popup. https://bugs.webkit.org/show_bug.cgi?id=69234 Also, for HTML elements, show a non-empty id value in the element name. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ObjectPopoverHelper.js: Added. * inspector/front-end/SourceFrame.js: Extracted from here. (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._mouseDown): (WebInspector.SourceFrame.prototype._onShowPopover.showObjectPopover): (WebInspector.SourceFrame.prototype._onShowPopover): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-10-04 Pavel Feldman Web Inspector: compile text editor. https://bugs.webkit.org/show_bug.cgi?id=69339 Drive-by compilation for color, database and dom storage entities. Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/Color.js: (WebInspector.Color.prototype._individualRGBValueToFloatValue): * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut.makeKey): (WebInspector.KeyboardShortcut.makeKeyFromEvent): (WebInspector.KeyboardShortcut.makeDescriptor): * inspector/front-end/SourceCSSTokenizer.js: * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceHTMLTokenizer.js: * inspector/front-end/SourceHTMLTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/SourceTokenizer.js: (WebInspector.SourceTokenizer.prototype._charAt): (WebInspector.SourceTokenizer.prototype.createInitialCondition): (WebInspector.SourceTokenizer.prototype.nextToken): * inspector/front-end/TextEditorHighlighter.js: (WebInspector.TextEditorHighlighter.prototype.highlight): (WebInspector.TextEditorHighlighter.prototype._highlightLines): * inspector/front-end/TextEditorModel.js: * inspector/front-end/TextViewer.js: (WebInspector.TextViewerDelegate.prototype.doubleClick): (WebInspector.TextViewerDelegate.prototype.beforeTextChanged): (WebInspector.TextViewerDelegate.prototype.afterTextChanged): (WebInspector.TextViewerDelegate.prototype.commitEditing): (WebInspector.TextViewerDelegate.prototype.cancelEditing): (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu): (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu): (WebInspector.TextViewerDelegate.prototype.suggestedFileName): (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf): (WebInspector.TextEditorMainPanel.prototype._createLink): (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges): * inspector/front-end/externs.js: (WebInspector.completeURL): (window.getComputedStyle): (Event.prototype.initWebKitWheelEvent): * inspector/front-end/utilities.js: 2011-10-04 Vsevolod Vlasov Web Inspector: Timeline panel shortcut for filtering short records should have shorter description. https://bugs.webkit.org/show_bug.cgi?id=69333 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._registerShortcuts): 2011-10-04 Andreas Kling Shrink StyleRareNonInheritedData. https://bugs.webkit.org/show_bug.cgi?id=69331 Reviewed by Antti Koivisto. Rearrange the members and move all small types into the bitfield. This shrinks StyleRareNonInheritedData by two CPU words, reducing memory consumption by 140 kB (on 64-bit) when loading the full HTML5 spec. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleRareNonInheritedData.h: 2011-10-04 Vsevolod Vlasov Web Inspector: Remove http/tests/inspector/network/disabled-cache-crash.html. https://bugs.webkit.org/show_bug.cgi?id=69332 Reviewed by Pavel Feldman. * WebCore.exp.in: * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: 2011-10-04 Pavel Feldman Web Inspector: make DataGrid compile https://bugs.webkit.org/show_bug.cgi?id=69334 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode): (WebInspector.DataGrid.prototype._startEditing): (WebInspector.DataGrid.prototype._startEditingConfig): (WebInspector.DataGrid.prototype._editingCommitted.moveToNextIfNeeded): (WebInspector.DataGrid.prototype._editingCommitted): (WebInspector.DataGrid.prototype._editingCancelled): (WebInspector.DataGrid.prototype.removeChildrenRecursive): (WebInspector.DataGrid.prototype._keyDown): (WebInspector.DataGrid.prototype._startResizerDragging): (WebInspector.DataGrid.prototype._resizerDragging): (WebInspector.DataGrid.prototype._endResizerDragging): (WebInspector.DataGridNode.prototype._attach): * inspector/front-end/UIUtils.js: (WebInspector.isBeingEdited): (WebInspector.markBeingEdited): (WebInspector.isEditingAnyField): (WebInspector.EditingConfig): (WebInspector.startEditing.blurEventListener): (WebInspector.startEditing.getContent): (WebInspector.startEditing.cleanUpAfterEditing): (WebInspector.startEditing.editingCancelled): (WebInspector.startEditing.editingCommitted): (WebInspector.startEditing.defaultFinishHandler): (WebInspector.startEditing): (WebInspector.startEditing.pasteEventListener): (WebInspector.startEditing.keyDownEventListener): * inspector/front-end/externs.js: (Array.prototype.remove): (window.getComputedStyle): * inspector/front-end/inspector.js: 2011-10-04 Andrey Kosyakov Web Inspector: [Extensions API] extension panel's toolbar icon is incorrect when inspector window is docked https://bugs.webkit.org/show_bug.cgi?id=69336 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): 2011-10-04 Pavel Podivilov Web Inspector: update call frame location when source mapping is changed. https://bugs.webkit.org/show_bug.cgi?id=68997 Currently we use fake "debugger-paused" event hack to update execution line and call stack placards when source mapping is changed. - add PresentationCallFrame.createPlacard method to create "live" placards that are updated on source mapping changes. - remove PresentationCallFrame functionName, isInternalScript, and url getters. - fire execution-line-changed event when selected call frame or source mapping is changed. Reviewed by Pavel Feldman. * inspector/compile-front-end.sh: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update): * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMappingPayload): (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMappings): * inspector/front-end/ContentProviders.js: (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent): (WebInspector.CompilerSourceMappingContentProvider.prototype.searchInContent): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.createPlacard.updatePlacard): (WebInspector.DebuggerPresentationModel.prototype.createPlacard): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed): (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame): (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame): (WebInspector.DebuggerPresentationModel.prototype._dispatchExecutionLineChanged): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationCallFrame): (WebInspector.PresentationCallFrame.prototype.get rawSourceCode): (WebInspector.PresentationCallFrame.prototype.uiLocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype._executionLineChanged): (WebInspector.ScriptsPanel.prototype._callFrameSelected): * inspector/front-end/externs.js: (WebInspector.displayNameForURL): 2011-10-04 Pavel Feldman Not reviewed: inspector tests fix. * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): (WebInspector.ExtensionPanel.prototype.get toolbarItemLabel): 2011-09-29 Pavel Podivilov Web Inspector: add compiler source mapping support to RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=68891 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): * inspector/front-end/CompilerSourceMappingProvider.js: Added. (WebInspector.CompilerSourceMappingProvider): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.continueToLine): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype.setCompilerSourceMappingProvider): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createSourceMapping.didLoadSourceMapping): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.get uiSourceCodeList): (WebInspector.CompilerSourceMappingProvider): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping): (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode): * inspector/front-end/UISourceCodeContentProviders.js: (WebInspector.CompilerSourceMappingContentProvider): (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-10-04 Pavel Feldman Web Inspector: start adding UI components to the compilation process. https://bugs.webkit.org/show_bug.cgi?id=69319 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.resize): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.statusBarResized): * inspector/front-end/EmptyView.js: * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.set get toolbarItemLabel): (WebInspector.Panel.prototype.get statusBarItems): (WebInspector.Panel.prototype.updateMainViewWidth): (WebInspector.Panel.prototype.statusBarResized): * inspector/front-end/PropertiesSection.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype._onKeyDown): * inspector/front-end/Section.js: (WebInspector.Section.prototype.set populated): (WebInspector.Section.prototype.onpopulate): (WebInspector.Section.prototype.expand): * inspector/front-end/SidebarPane.js: * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.createPanelToolbarItem): (WebInspector.ToolbarDropdown.prototype.show): * inspector/front-end/UIUtils.js: Added. (WebInspector.elementDragStart): (WebInspector.elementDragEnd): (WebInspector.animateStyle): (WebInspector.animateStyle.forceComplete): (WebInspector.animateStyle.cancel): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (WebInspector.extensionServer.notifyPanelShown): (WebInspector.extensionServer.notifyPanelHidden): (WebInspector.currentPanel): (WebInspector.setCurrentPanel): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-10-04 Kenichi Ishibashi [Chromium] Implement font shaping with font-feature-settings on Windows https://bugs.webkit.org/show_bug.cgi?id=65904 Reviewed by Kenneth Russell. Use Uniscribe's OpenType APIs to shape complex text to support -webkit-font-feature-settings property. No new tests. css3/font-feature-settings-rendering.html should pass by this patch. * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::loadOpenTypeFunctions): (WebCore::UniscribeHelper::UniscribeHelper): Calls loadOpenTypeFunctions if needed. (WebCore::UniscribeHelper::fillRuns): Uses ScriptItemizeOpenType() if possible. (WebCore::UniscribeHelper::shape): Uses ScriptShapeOpenType() if possible. (WebCore::UniscribeHelper::fillShapes): Adds OpenType script tag as an argument. (WebCore::convertFeatureTag): Added. (WebCore::UniscribeHelper::setRangeProperties): Added. * platform/graphics/chromium/UniscribeHelper.h: * platform/graphics/chromium/UniscribeHelperTextRun.cpp: (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun): Calls setRangeProperties(). 2011-10-04 Ryuan Choi [EFL] Implement declared but missing functions. https://bugs.webkit.org/show_bug.cgi?id=65368 Unreviewed build fix for WebKit/Efl builds after r96566. * platform/efl/CursorEfl.cpp: (WebCore::Cursor::operator=): * platform/efl/LocalizedStringsEfl.cpp: (WebCore::localizedString): 2011-10-04 Pavel Feldman Web Inspector: move abstract panel search logic into the only view that is using it. https://bugs.webkit.org/show_bug.cgi?id=69328 Reviewed by Yury Semikhatsky. * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.searchCanceled): (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.performSearch.updateMatchesCount): (WebInspector.ProfilesPanel.prototype.performSearch.updateMatchesCountSoon): (WebInspector.ProfilesPanel.prototype.performSearch.finishedCallback): (WebInspector.ProfilesPanel.prototype.performSearch.processChunk): (WebInspector.ProfilesPanel.prototype.performSearch): (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult): (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult): (WebInspector.ProfilesPanel.prototype._searchableViews): (WebInspector.ProfilesPanel.prototype.searchCanceled): 2011-10-04 Pavel Feldman Not reviewed: fixed poor inspector merge, drive-by front-endcompilation fix. * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): * inspector/front-end/DebuggerPresentationModel.js: 2011-10-04 Pavel Feldman Web Inspector: remove dependency from GoToLine dialog from Panel. https://bugs.webkit.org/show_bug.cgi?id=69327 Reviewed by Yury Semikhatsky. * inspector/front-end/GoToLineDialog.js: (WebInspector.GoToLineDialog.install): (WebInspector.GoToLineDialog._show): * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView.prototype._tabSelected): (WebInspector.ResourceContentView.prototype.contentLoaded): (WebInspector.ResourceContentView.prototype.canHighlightLine): (WebInspector.ResourceContentView.prototype.highlightLine): (set WebInspector): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.viewGetter): (WebInspector.NetworkPanel): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.registerShortcut): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.viewGetter): (WebInspector.ResourcesPanel): (WebInspector.ResourcesPanel.prototype.showResource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.viewGetter): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.canHighlightLine): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype._hideTab): (WebInspector.TabbedPane.prototype.canHighlightLine): (WebInspector.TabbedPane.prototype.highlightLine): * inspector/front-end/View.js: (WebInspector.View.prototype.canHighlightLine): (WebInspector.View.prototype.highlightLine): 2011-10-04 Sheriff Bot Unreviewed, rolling out r96491. http://trac.webkit.org/changeset/96491 https://bugs.webkit.org/show_bug.cgi?id=69326 Breaks Slow Leopard inspector tests (Requested by pfeldman on #webkit). * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::getScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.requestContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.requestSource.didGetScriptSource): (WebInspector.Script.prototype.requestSource): 2011-10-03 Pavel Feldman Web Inspector: add DebuggerPresentationModel and ConsoleView to compilation. https://bugs.webkit.org/show_bug.cgi?id=69269 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._completions.evaluated.getCompletions): (WebInspector.ConsoleView.prototype._completions.evaluated): (WebInspector.ConsoleView.prototype._messagesClicked): * inspector/front-end/ContentProviders.js: (WebInspector.StaticContentProvider.prototype.requestContent): (WebInspector.StaticContentProvider.prototype.searchInContent): * inspector/front-end/ContextMenu.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScriptWithURL): (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript): (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): * inspector/front-end/HelpScreen.js: * inspector/front-end/JavaScriptContextManager.js: (WebInspector.FrameEvaluationContext.prototype.get displayName): * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut): * inspector/front-end/Resource.js: (WebInspector.Resource.displayName): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype._didFormatContent): * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/StatusBarButton.js: * inspector/front-end/TextPrompt.js: * inspector/front-end/externs.js: (WebInspector.populateHrefContextMenu): (WebInspector.useLowerCaseMenuTitles): (WebInspector.ScriptsPanel.this.evaluateInSelectedCallFrame): (WebInspector.ScriptsPanel.this.getSelectedCallFrameVariables): (WebInspector.ScriptsPanel): * inspector/front-end/inspector.js: * inspector/front-end/utilities.js: 2011-10-03 Ryosuke Niwa Mac release build fix after r96561, and Leopard build fix after r96568. * editing/TextCheckingHelper.h: (WebCore::TextCheckingParagraph::textCharAt): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): 2011-10-03 Ryosuke Niwa Build fix after r96568. * accessibility/AccessibilityObject.cpp: * accessibility/mac/WebAccessibilityObjectWrapper.mm: * editing/Editor.cpp: 2011-10-03 Shinya Kawanaka Should call checkTextOfParagraph() indirectly to make unifying spell-checking code path easy. https://bugs.webkit.org/show_bug.cgi?id=69241 Reviewed by Ryosuke Niwa. WebCore has two different code paths for spell-checking: 1) checkTextOfParagraph() for Snow Leopard or later 2) checkSpellingOfString() for checkGrammarOfString() for other platforms. At the first step, this patch introduces an indirect wrapper to call checkTextOfParagraph() in Snow Leopard or later. This is intended to make it easy to introduce a function for mimicing checkTextOfParagraph() in Chromium platform or other non-SL or non-Lion platform. No new tests because this patch does not change a behavior. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::hasMisspelling): Calling checkTextOfParagraph() indirectly. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (AXAttributeStringSetSpelling): ditto. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): ditto. * editing/TextCheckingHelper.cpp: (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): ditto. (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange): ditto. (WebCore::checkTextOfParagraph): Added. * editing/TextCheckingHelper.h: 2011-10-03 Darin Adler Change cursor to hand over missing plug-in message https://bugs.webkit.org/show_bug.cgi?id=69312 Reviewed by Sam Weinig. No tests because we currently don't have any test machinery for cursors. * page/EventHandler.cpp: (WebCore::OptionalCursor::OptionalCursor): Added. Construct an object to represent either a cursor, or no cursor change. (WebCore::OptionalCursor::isCursorChange): Added. (WebCore::OptionalCursor::cursor): Added. (WebCore::EventHandler::selectCursor): Changed return type to OptionalCursor, moved some special cases from handleMouseMoveEvent in here. Moved the logic for plug-ins and framesets into the specific renderer classes for those. Added a call to the new getCursor virtual function. (WebCore::EventHandler::handleMouseMoveEvent): Changed cursor setting code to just be a call to selectCursor and then setCursor. Plug-in-specific code is now in RenderWidget. * page/EventHandler.h: Changed return type of selectCursor. * page/MouseEventWithHitTestResults.cpp: Made some functions be inline. * page/MouseEventWithHitTestResults.h: (WebCore::MouseEventWithHitTestResults::localPoint): Made this inline. (WebCore::MouseEventWithHitTestResults::scrollbar): Made this inline. Yes, this has nothing to do with the rest of the patch, but it's good. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): Made const. (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator): Made const. Overloaded so it can be called with a point rather than an event. (WebCore::shouldMissingPluginMessageBeButton): Added. Helps streamline the logic below. (WebCore::RenderEmbeddedObject::handleMissingPluginIndicatorEvent): Changed to use shouldMissingPluginMessageBeButton. (WebCore::RenderEmbeddedObject::getCursor): Added. Sets the cursor to a hand when over the missing plug-in message. * rendering/RenderEmbeddedObject.h: Added getCursor override. Also updated for other changes above. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::getCursor): Added. Contains the logic that used to be hardcoded in EventHandler::selectCursor about cursors when over resizable frame borders. * rendering/RenderFrameSet.h: Added getCursor. * rendering/RenderObject.cpp: (WebCore::RenderObject::getCursor): Added. Returns SetCursorBasedOnStyle. * rendering/RenderObject.h: Added getCursor. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::getCursor): Added. Contains the logic that used to be hardcoded in EventHandler::handleMouseMoveEvent to prevent setting the cursor when the pointer is over a plug-in. This new code is much better, because it only kicks in when there is actually a plug-in present. The old was based on the HTML tag! * rendering/RenderWidget.h: Added getCursor. 2011-10-03 Anders Carlsson Work towards making PlatformWheelEvent immutable https://bugs.webkit.org/show_bug.cgi?id=69306 Reviewed by Sam Weinig. Currently, PlatformWheelEvent has an m_isAccepted flag that tracks whether the event has been handled or not. For all other event types, that state is instead tracked by the return value of the various event handlers. As a first step, add return values to the various handleWheelEvent functions and add an assertion in EventHandler::wheelEvent that the return value is the same as the state of PlatformWheelEvent::isAccepted. * Configurations/Base.xcconfig: Don't warn when using C++11 extensions. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): Assert that isAccepted matches the return value. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): Return isAccepted. * platform/ScrollAnimator.h: HandleWheelEvent now returns a boolean. * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): Return whether the event was handled or not. * platform/ScrollView.h: ScrollView::wheelEvent now returns a bool. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::handleWheelEvent): * platform/ScrollableArea.h: ScrollableArea::handleWheelEvent now returns a bool. * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): Add return values, based on either the base class calls or the state of PlatformWheelEvent::isAccepted(). * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): Ditto. 2011-10-03 Dan Bernstein REGRESSION (r66599): -[DOMNode boundingBox] returns the zero rect for SVG elements https://bugs.webkit.org/show_bug.cgi?id=69305 Reviewed by Simon Fraser. Test: svg/custom/boundingBox.html Rather than asserting and returning the zero rect, take the transform-aware code path for computing SVG bounding rects. * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer(). * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto. (WebCore::RenderSVGModelObject::absoluteRects): Replaced an incorrect assertion with code to approximate the bounding box. * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer(). * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): Removed the fixed and useTransform boolean parameters. * rendering/svg/SVGRenderSupport.h: 2011-10-03 Michael Nordman A little more WebSQLDatabase thread safety. https://bugs.webkit.org/show_bug.cgi?id=69277 - switch to using AtomicallyInitializedStatic where appropiate - avoid using some Strings across threads Reviewed by David Levin. Existing tests apply. * storage/AbstractDatabase.cpp: (WebCore::guidMutex): (WebCore::guidToVersionMap): (WebCore::guidToDatabaseMap): (WebCore::guidForOriginAndName): (WebCore::AbstractDatabase::databaseInfoTableName): (WebCore::AbstractDatabase::AbstractDatabase): (WebCore::AbstractDatabase::performOpenAndVerify): (WebCore::AbstractDatabase::getVersionFromDatabase): (WebCore::AbstractDatabase::setVersionInDatabase): * storage/AbstractDatabase.h: * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::tracker): * storage/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::instance): 2011-10-03 Ryosuke Niwa Replace m_firstNodeInserted and m_lastLeafInserted in ReplaceSelectionCommand by positions https://bugs.webkit.org/show_bug.cgi?id=68874 Reviewed by Enrica Casucci. Replaced m_firstNodeInserted and m_lastLeafInserted by m_startOfInsertedContent and m_endOfInsertedContent respectively. Also removed removeNodePreservingChildren and removeNodeAndPruneAncestors in ReplaceSelectionCommand because they were not virtual in CompositeEditCommand and implicitly overriding the functions was confusing. Since each of these two functions is used at exactly one place, just update positions and insertedNodes explicitly. * editing/CompositeEditCommand.cpp: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): (WebCore::ReplaceSelectionCommand::handleStyleSpans): (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Update m_endOfInsertedContent by endingSelection().visibleEnd() instead of m_lastLeafInserted with destination.previous() because moveParagraph could have removed leading whitespace in the text node referenced by destination. This is tested by an existing layout test. (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Update positions as needed. All changes are tested by the existing layout tests in editing/pasteboard. (WebCore::ReplaceSelectionCommand::updateNodesInserted): * editing/ReplaceSelectionCommand.h: * editing/htmlediting.cpp: (WebCore::hasARenderedDescendant): Moved from CompositeEditCommand.cpp. (WebCore::highestNodeToRemoveInPruning): Ditto. * editing/htmlediting.h: 2011-10-03 Ryosuke Niwa REGRESSION(r94274): cloned text input loses value https://bugs.webkit.org/show_bug.cgi?id=69095 Reviewed by Darin Adler. The bug was caused by copyNonAttributeProperties not updating inner element text after copying m_valueIfDirty. Fixed the bug by calling updateInnerTextValue. Test: fast/forms/clone-input-with-dirty-value.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::copyNonAttributeProperties): 2011-10-03 Ryosuke Niwa Leopard build fix after r96530. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): 2011-10-03 Sam Weinig Move ContentSecurityPolicy to the ScriptExecutionContext to prepare it for working with XHR and workers https://bugs.webkit.org/show_bug.cgi?id=69294 Reviewed by Darin Adler. * dom/Document.cpp: (WebCore::Document::initSecurityContext): Initialize the ContentSecurityPolicy by calling down to the ScriptExecutionContext. * dom/Document.h: Move the ContentSecurityPolicy member and getter from here to ScriptExecutionContext.h. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::setContentSecurityPolicy): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::contentSecurityPolicy): Add ContentSecurityPolicy member and getter/setter. * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::ContentSecurityPolicy): (WebCore::ContentSecurityPolicy::didReceiveHeader): (WebCore::ContentSecurityPolicy::reportViolation): (WebCore::ContentSecurityPolicy::parseReportURI): (WebCore::ContentSecurityPolicy::createCSPDirective): * page/ContentSecurityPolicy.h: (WebCore::ContentSecurityPolicy::create): Replace Document with ScriptExecutionContext. Add temporary checked casts to document where necessary. * workers/WorkerContext.cpp: (WebCore::WorkerContext::WorkerContext): Add initialization of the ContentSecurityPolicy. 2011-10-03 Anders Carlsson Remove custom scrollbar painting hooks https://bugs.webkit.org/show_bug.cgi?id=69163 Reviewed by Alexey Proskuryakov. The custom scrollbar and scroll corner painting hooks aren't used by anyone so go ahead and remove them. This removes the setter/getter and ChromeClient functions. * page/Chrome.cpp: * page/ChromeClient.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): (WebCore::ScrollbarThemeComposite::paintScrollCorner): 2011-09-22 Darin Adler Rename many obviously-correct call sites in WebCore using releaseRef to use it by its new name leakRef https://bugs.webkit.org/show_bug.cgi?id=68672 Reviewed by Daniel Bates. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): * css/CSSInitialValue.h: (WebCore::CSSInitialValue::createExplicit): (WebCore::CSSInitialValue::createImplicit): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::init): * css/CSSStyleSelector.cpp: (WebCore::parseUASheet): (WebCore::CSSStyleSelector::styleForElement): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderTheme::themeForPage): * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderTheme::themeForPage): * platform/haiku/RenderThemeHaiku.cpp: (WebCore::RenderTheme::themeForPage): * platform/network/cf/DNSCFNet.cpp: (WebCore::DNSResolveQueue::resolve): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::releaseConnectionForDownload): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderTheme::themeForPage): (WebCore::RenderThemeQt::paintSearchFieldCancelButton): * platform/text/BidiContext.cpp: (WebCore::BidiContext::create): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeMac.mm: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeSafari.cpp: (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeWin.cpp: (WebCore::RenderTheme::themeForPage): (WebCore::RenderThemeWin::paintSearchFieldCancelButton): (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration): (WebCore::RenderThemeWin::paintSearchFieldResultsButton): * rendering/RenderThemeWinCE.cpp: (WebCore::RenderTheme::themeForPage): * rendering/style/RenderStyle.cpp: (WebCore::defaultStyle): Call leakRef instead of releaseRef. I did this only in the cases where it was obvious to me this was the right way to do it. I'll keep revisiting sites still calling it releaseRef until they are all gone. 2011-09-27 Ojan Vafai remove dead code in flipForWritingMode https://bugs.webkit.org/show_bug.cgi?id=68948 Reviewed by Hajime Morita. ChildToParentFlippingAdjustment is never used, so the third argument to flipForWritingMode always has the same value. In addition, renamed to flipForWritingModeForChild to be more clear that it's operating on the child and renamed flipFloatForWritingMode to match. No new tests. This is just a code cleanup. No functional changes. * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::flipFloatForWritingModeForChild): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestContents): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::flipForWritingModeForChild): (WebCore::RenderBox::topLeftLocation): * rendering/RenderBox.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): (WebCore::RenderTableSection::nodeAtPoint): 2011-10-03 Jer Noble Unreviewed, rolling out r96526. http://trac.webkit.org/changeset/96526 https://bugs.webkit.org/show_bug.cgi?id=68587 WEB_AUDIO has numerous 64->32 bit casting warnings, causing build breakages where -Wall is enabled. * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: 2011-10-03 Joseph Pecoraro Web Inspector: rgb() with percentages shows wrong hex/hsl values https://bugs.webkit.org/show_bug.cgi?id=69152 Reviewed by Pavel Feldman. Previously we assumed rgb values were always in byte form, but they could include percentage values. Ex. rgb(100%,0,0). This patch fixes this, and in the process includes clamping for invalid percentages, byte values, and alpha values. Test: inspector/styles/styles-invalid-color-values.html * inspector/front-end/Color.js: (WebInspector.Color.prototype._clamp): (WebInspector.Color.prototype._individualRGBValueToFloatValue): (WebInspector.Color.prototype._individualRGBValueToHexValue): (WebInspector.Color.prototype._rgbToHex): (WebInspector.Color.prototype._rgbToHSL): An individual rgb value can be either a decimal/float or a percentage. Rewrite the conversion functions to handle either input. Regardless of the type of input, always return a clamped decimal/float value between 0 and 255. (WebInspector.Color.prototype._rgbaToHSLA): (WebInspector.Color.prototype._hslaToRGBA): (WebInspector.Color.prototype._parse): Clamp the alpha value between 0 and 1. 2011-10-03 Dirk Schulze SVG Pattern tile pixelated on patternTransform https://bugs.webkit.org/show_bug.cgi?id=69261 Reviewed by Rob Buis. Scale the SVG pattern tile by the scale level of patternTransform to avoid pixelation. Test: svg/custom/pattern-scaled-pattern-space.svg * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): 2011-10-03 Jer Noble Enable WEB_AUDIO by default in the WebKit/mac port. https://bugs.webkit.org/show_bug.cgi?id=68587 Reviewed by Simon Fraser. No new tests; existing webaudio/ layout tests cover this. * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: Add a build step which copies audio resources to the WebCore.framework bundle. 2011-10-03 Chris Rogers BiquadFilterNode .type attribute is not handled correctly https://bugs.webkit.org/show_bug.cgi?id=69182 Reviewed by Kenneth Russell. Test: webaudio/biquadfilternode-basic.html * platform/audio/AudioDSPKernelProcessor.cpp: (WebCore::AudioDSPKernelProcessor::initialize): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::AudioChannelMerger): * webaudio/AudioChannelSplitter.cpp: (WebCore::AudioChannelSplitter::AudioChannelSplitter): * webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::AudioGainNode): * webaudio/AudioNode.cpp: (WebCore::AudioNode::AudioNode): (WebCore::AudioNode::~AudioNode): (WebCore::AudioNode::setNodeType): (WebCore::AudioNode::ref): (WebCore::AudioNode::finishDeref): * webaudio/AudioNode.h: (WebCore::AudioNode::nodeType): * webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::AudioPannerNode): (WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode): * webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): (WebCore::BiquadFilterNode::setType): * webaudio/BiquadFilterNode.h: * webaudio/BiquadFilterNode.idl: * webaudio/BiquadProcessor.h: (WebCore::BiquadProcessor::setType): * webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): * webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): * webaudio/HighPass2FilterNode.cpp: (WebCore::HighPass2FilterNode::HighPass2FilterNode): * webaudio/JavaScriptAudioNode.cpp: (WebCore::JavaScriptAudioNode::JavaScriptAudioNode): * webaudio/LowPass2FilterNode.cpp: (WebCore::LowPass2FilterNode::LowPass2FilterNode): * webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): * webaudio/RealtimeAnalyserNode.cpp: (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode): * webaudio/WaveShaperNode.cpp: (WebCore::WaveShaperNode::WaveShaperNode): 2011-10-03 Chris Fleizach AX: support role mapping for HTML5 section elements https://bugs.webkit.org/show_bug.cgi?id=69150 We need to map these HTML5 elements to appropriate ARIA roles. That mapping is: article -> Document article nav -> Landmark navigation aside -> Landmark complementary section -> Document region address -> Landmark content info header -> Landmark banner (unless it's in an article or section) footer -> Landmark content info (unless it's in an article or section) Reviewed by Darin Adler. Test: platform/mac/accessibility/html-section-elements.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isDescendantOfElementType): (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/AccessibilityRenderObject.h: 2011-10-03 Chris Fleizach AX: click point for AXHeadings often returns point on empty space (results in wrong context menu) https://bugs.webkit.org/show_bug.cgi?id=69262 When the contextual menu is opened for a heading, often it will open on empty space because the heading is wider than the content inside. The click point should thus use the content inside the heading as the click point. To accomplish this we need to query whether we have children using children() which is a non-const method, hence the removal of const from clickPoint(). Reviewed by John Sullivan. Test: platform/mac/accessibility/heading-clickpoint.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clickPoint): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::clickPoint): * accessibility/AccessibilityRenderObject.h: 2011-10-03 Sheriff Bot Unreviewed, rolling out r96500. http://trac.webkit.org/changeset/96500 https://bugs.webkit.org/show_bug.cgi?id=69268 Breaks inspector, change landed with no test. (Requested by pfeldman on #webkit). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (): * inspector/front-end/Linkifier.js: Removed. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView): (WebInspector.CPUProfileView.prototype._resetClicked): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyLocation): (WebInspector.TimelinePanel.FormattedRecord.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-09-30 Antti Koivisto Add exact match attribute selectors to the fast path https://bugs.webkit.org/show_bug.cgi?id=69159 Reviewed by Sam Weinig. Attribute selectors are increasingly common and we have them in our default style sheet too. [foo] and [foo="bar"] type selectors can be resolved quickly and easily in the fast path. - Implement fast path checking for simple attribute selectors. - Get rid of the ill-defined CSSSelector::hasAttribute(), inline CSSSelector::attribute() This is ~20% progression in styleForElement() performance loading the full HTML5 spec (~0.8s). * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): * css/CSSSelector.h: (WebCore::CSSSelector::hasTag): (WebCore::CSSSelector::attribute): (WebCore::CSSSelector::isAttributeSelector): * css/CSSSelectorList.cpp: (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::fastCheckRightmostSelector): (WebCore::SelectorChecker::fastCheckSelector): (WebCore::isFastCheckableMatch): (WebCore::isFastCheckableRightmostSelector): (WebCore::SelectorChecker::isFastCheckableSelector): (WebCore::SelectorChecker::checkSelector): (WebCore::htmlAttributeHasCaseInsensitiveValue): (WebCore::anyAttributeMatches): (WebCore::SelectorChecker::checkOneSelector): * css/SelectorChecker.h: (WebCore::SelectorChecker::attributeNameMatches): (WebCore::SelectorChecker::checkExactAttribute): (WebCore::SelectorChecker::fastCheckRightmostAttributeSelector): 2011-10-03 Mike Reed respect other paint flags when setting flags for the font. No need to fiddle with DC(0) in paintSkiaText. https://bugs.webkit.org/show_bug.cgi?id=69172 Reviewed by Stephen White. No new tests. This is a cleanup/optimization, existing tests apply * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::getDefaultGDITextFlags): (WebCore::setupPaintForFont): (WebCore::paintSkiaText): 2011-10-03 Andreas Kling FontFallbackList: Glyph pages waste a lot of memory. https://bugs.webkit.org/show_bug.cgi?id=69260 Reviewed by Dan Bernstein. Use a minimum hash table size of 16 (down from 64) for FontFallbackList's glyph pages. This reduces memory consumption by ~900 kB when loading the full HTML5 spec. The cost is two additional rehash()es of FontFallbackList::m_pages when adding the 32nd and 64th pages to the hash map. * platform/graphics/FontFallbackList.h: 2011-10-03 Konstantin Scheglov Right border missing from table with colspan and collapsing border https://bugs.webkit.org/show_bug.cgi?id=14274 Reviewed by David Hyatt. Test: fast/table/border-collapsing/bug14274.html * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): * rendering/RenderTable.h: (WebCore::RenderTable::colToEffCol): 2011-10-03 Carlos Garcia Campos [GTK] Fix make distcheck build https://bugs.webkit.org/show_bug.cgi?id=69243 Reviewed by Martin Robinson. * GNUmakefile.am: * GNUmakefile.list.am: 2011-10-03 Pierre Rossi [Qt] Build fix: Qt::escape is deprecated in Qt5 https://bugs.webkit.org/show_bug.cgi?id=69162 Use QString::toHtmlEscaped in the Qt5 case. Reviewed by Andreas Kling. No new tests needed. * WebCore.pro: adjust the include path accordingly in the v8 case. 2011-10-03 Ilya Tikhonovsky Web Inspector: debuggerPresentatioModel.linkifyLocation leaks updateAnchor closure instances. https://bugs.webkit.org/show_bug.cgi?id=69146 In many places we use linkifyLocation function to produce a link node which updates automatically when the source file is changed on the fly. Such changes happen when we use pretty print or another operation that changes the source code somehow. linkifyLocation associates a new instance of updateAnchor closure with the each link node and add the closure to the SourceMappingUpdated event's list. As the result the node<->closure pairs wouldn't be collected until reset the UI and DebuggerPresentationModel. Reviewed by Yury Semikhatsky. Test: inspector/performance/resources/network-append-30-requests.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype._linkifyLocation): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (): * inspector/front-end/Linkifier.js: Added. (WebInspector.Linkifier): (WebInspector.Linkifier.prototype.linkifyLocation): (WebInspector.Linkifier.prototype.reset): (WebInspector.Linkifier.prototype._updateSourceAnchors): (WebInspector.Linkifier.prototype._updateAnchor): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView): (WebInspector.CPUProfileView.prototype._resetClicked): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._linkifyLocation): (WebInspector.TimelinePanel.prototype._linkifyCallFrame): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2011-10-03 Pavel Feldman Web Inspector: more compilation fixes including making ConsoleMessage a part of console model. https://bugs.webkit.org/show_bug.cgi?id=69253 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.create): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleMessageImpl): * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleMessage.create): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleDispatcher.prototype.messageAdded): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleCommandResult): (WebInspector.ConsoleCommandResult.prototype.toMessageElement): * inspector/front-end/CookieParser.js: (WebInspector.Cookie.prototype.get path): (WebInspector.Cookie.prototype.get domain): (WebInspector.Cookie.prototype.expires): * inspector/front-end/DOMAgent.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onAddConsoleMessage): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.setContent): (WebInspector.Resource.prototype.searchInContent): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._createResource): * inspector/front-end/externs.js: (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): (WebInspector.extensionServer.notifyResourceContentCommitted): (WebInspector.resourceForURL): (WebInspector.debuggerPresentationModel.linkifyLocation): (WebInspector.ObjectPropertiesSection): (WebInspector.ElementsTreeOutline): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): * inspector/generate-protocol-externs: 2011-10-03 Pavel Feldman Web Inspector: move console message formatting from ConsoleView.js into ConsoleMessage.js https://bugs.webkit.org/show_bug.cgi?id=69244 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier): (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatParameter): (WebInspector.ConsoleMessage.prototype._formatParameterAsValue): (WebInspector.ConsoleMessage.prototype._formatParameterAsObject): (WebInspector.ConsoleMessage.prototype._formatParameterAsNode): (WebInspector.ConsoleMessage.prototype._formatParameterAsArray): (WebInspector.ConsoleMessage.prototype._formatParameterAsString): (WebInspector.ConsoleMessage.prototype._printArray): (WebInspector.ConsoleMessage.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString): * inspector/front-end/ConsoleView.js: 2011-10-03 Dirk Schulze feColorMatrix saturation is not limited to range 0..1 anymore https://bugs.webkit.org/show_bug.cgi?id=69245 Reviewed by Nikolas Zimmermann. Opera doesn't limit the range of values for saturation on feColorMatrix from 0 to 1. The limitation was also removed from the new Filter Effects 1.0 specification. Values outside this range lead to under- or oversaturation of the filter input image. https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html#feColorMatrixElement Test: svg/filters/feColorMatrix-saturate.svg * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::build): 2011-10-03 Andreas Kling Shrink HTMLLIElement. https://bugs.webkit.org/show_bug.cgi?id=69250 Reviewed by Antti Koivisto. Don't cache the explicit "value" attribute on the HTMLLIElement, but fetch it with fastGetAttribute when needed. This shrinks HTMLLIElement by one CPU word. * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::HTMLLIElement): (WebCore::HTMLLIElement::parseMappedAttribute): (WebCore::HTMLLIElement::attach): * html/HTMLLIElement.h: 2011-10-03 Vsevolod Vlasov Web Inspector: Add support for backend search in script content. https://bugs.webkit.org/show_bug.cgi?id=69015 Reviewed by Pavel Feldman. Tests: http/tests/inspector/search/search-in-concatenated-script.html http/tests/inspector/search/search-in-script.html * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::getScriptSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ScriptContentProvider.prototype.searchInContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.maybeCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent.searchCallback): (WebInspector.ConcatenatedScriptsContentProvider.prototype.searchInContent): * inspector/front-end/Script.js: (WebInspector.Script.prototype.requestSource): (WebInspector.Script.prototype.searchInContent): 2011-10-03 Pavel Feldman Web Inspector: move console message formatting from ConsoleView.js into ConsoleMessage.js https://bugs.webkit.org/show_bug.cgi?id=69244 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier): (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatParameter): (WebInspector.ConsoleMessage.prototype._formatParameterAsValue): (WebInspector.ConsoleMessage.prototype._formatParameterAsObject): (WebInspector.ConsoleMessage.prototype._formatParameterAsNode): (WebInspector.ConsoleMessage.prototype._formatParameterAsArray): (WebInspector.ConsoleMessage.prototype._formatParameterAsString): (WebInspector.ConsoleMessage.prototype._printArray): (WebInspector.ConsoleMessage.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString): * inspector/front-end/ConsoleView.js: 2011-10-03 Pavel Feldman Web Inspector: restore partial front-end compilability https://bugs.webkit.org/show_bug.cgi?id=69221 Removed unused isWhitespace; introduced missing classes in Inspector.json; generated externs for the protocol types along with the commands. Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (): * inspector/front-end/Object.js: * inspector/front-end/Popover.js: (WebInspector.PopoverHelper.prototype._mouseMove): * inspector/front-end/View.js: * inspector/front-end/externs.js: (Array.prototype.remove): * inspector/generate-protocol-externs: 2011-10-02 Kent Tamura method/enctype/formMethod/formEnctype properties should be limited to known values. https://bugs.webkit.org/show_bug.cgi?id=68887 Reviewed by Hajime Morita. According to the standard and other browser behaviors, the following IDL properties should be reflected to the corresponding HTML attributes on setting, but should return normalized values on getting. - HTMLFormElement::method - HTMLFormElement::enctype - HTMLInputElement::formMethod - HTMLInputElement::formEnctype - HTMLButtonElement::formMethod - HTMLButtonElement::formEnctype Tests: fast/forms/enctype-attribute.html fast/forms/method-attribute.html * html/HTMLButtonElement.idl: Replace 'Reflect' with 'ConvertNullToNullString' in order to use a getter function. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::formEnctype): Normalizes the value by parseEncodingType(). (WebCore::HTMLFormControlElement::setFormEnctype): Simply calls setAttribute() (WebCore::HTMLFormControlElement::formMethod): Normalizes the value by parseMethodType(). (WebCore::HTMLFormControlElement::setFormMethod): Simply calls setAttribute() * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): Follow the Attributes function renaming. (WebCore::HTMLFormElement::method): Normalizes the value by parseMethodType(). * html/HTMLFormElement.idl: Replace 'Reflect' with 'ConvertNullToNullString' in order to use a getter function. * html/HTMLInputElement.idl: ditto. * loader/FormSubmission.cpp: (WebCore::FormSubmission::Attributes::parseEncodingType): New function made from a part of old parseEncodingType(). (WebCore::FormSubmission::Attributes::updateEncodingType): Renamed from parseEncodingType(). (WebCore::FormSubmission::Attributes::parseMethodType): New function made from a part of old parseMethodType(). (WebCore::FormSubmission::Attributes::updateMethodType): Renamed from parseMethodType(). (WebCore::FormSubmission::create): Follow the Attributes function renaming. * loader/FormSubmission.h: (WebCore::FormSubmission::Attributes::methodString): A helper function to provide normalized strings for FormSubmission::Method. 2011-10-02 Sam Weinig Strength reduce Mac only Frame::searchForLabelsBeforeElement and Frame::matchLabelsAgainstElement into callers https://bugs.webkit.org/show_bug.cgi?id=69230 Reviewed by Anders Carlsson. * WebCore.exp.in: * page/Frame.h: * page/mac/FrameMac.mm: 2011-10-02 Zeno Albisser [Qt][WK2][Mac] WebKit2 does not build on mac after merge of Qt5 refactor branch. https://bugs.webkit.org/show_bug.cgi?id=69223 Add a missing import (NSWindow.h) in WebVideoFullscreenHUDWindowController. Add a missing include path and a missing objective source file to WebCore.pro. Reviewed by Noam Rosenthal. No new tests, build fix. * WebCore.pro: * platform/mac/WebVideoFullscreenHUDWindowController.h: 2011-10-02 Julien Chaffraix Remove an unused member in RenderTable::ColumnStruct https://bugs.webkit.org/show_bug.cgi?id=69119 Reviewed by Darin Adler. No test as there should be no change in behavior. The member was added several years ago and its users were removed or changed. The code would need a refactoring but this would be tricky to get right. This change just removes the member to reap the short-term benefits. * rendering/RenderTable.h: (WebCore::RenderTable::ColumnStruct::ColumnStruct): Remove anything associated with m_width. 2011-10-02 Dan Bernstein REGRESSION (r95502): Assertion failure in CSSPrimitiveValue::computeLengthDouble() when media query specifies unit-less length https://bugs.webkit.org/show_bug.cgi?id=68760 Reviewed by Antti Koivisto. Test: fast/media/invalid-lengths.html Made length-comparison media queries accept only length values. In compatibility mode, numbers are allowed as well, and they are interpreted as pixels. * css/MediaQueryEvaluator.cpp: (WebCore::computeLength): Added this helper function. (WebCore::device_heightMediaFeatureEval): Changed to use computeLength(). (WebCore::device_widthMediaFeatureEval): Ditto. (WebCore::heightMediaFeatureEval): Ditto. (WebCore::widthMediaFeatureEval): Ditto. 2011-10-02 Dirk Schulze SVG Mask should take 'color-interpolation' into account to determine the color space of the mask image https://bugs.webkit.org/show_bug.cgi?id=69076 Reviewed by Simon Fraser. SVG Masks should take 'color-interpolation' into account to determine the color space of the mask image. The behavior was changed in SVG 1.1 SE. The color space of the mask image gets defined by the computed value of the 'color-interpolation' property. This will switch the default color space from linearRGB to sRGB for mask images and is a performance improvement for platforms without native support for linearRGB color space. The color space transformation can be avoided. Test: svg/custom/grayscale-gradient-mask-2.svg * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceMasker.h: 2011-10-01 Vangelis Kokkevis [chromium] Fixing draw matrix for composited layers. This was a regression introduced by: http://trac.webkit.org/changeset/96454 https://bugs.webkit.org/show_bug.cgi?id=69217 Reviewed by James Robinson. Tests: compositor test now pass * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: 2011-10-01 Geoffrey Garen Removed redundant helper functions for allocating Strong handles https://bugs.webkit.org/show_bug.cgi?id=69218 Reviewed by Sam Weinig. * ForwardingHeaders/heap/StrongInlines.h: Added. * bindings/js/JSCallbackData.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/ScheduledAction.h: * bindings/js/ScriptCachedFrameData.cpp: * bindings/js/ScriptController.cpp: * bindings/js/ScriptState.cpp: * bindings/js/ScriptValue.h: * bindings/js/WorkerScriptController.cpp: * bridge/runtime_root.cpp: 2011-10-01 Sheriff Bot Unreviewed, rolling out r96421. http://trac.webkit.org/changeset/96421 https://bugs.webkit.org/show_bug.cgi?id=69206 It broke Qt-WK2 build (Requested by ossy on #webkit). * WebCore.pro: 2011-09-30 Adrienne Walker [chromium] Track separate scroll deltas on the compositor thread https://bugs.webkit.org/show_bug.cgi?id=69034 Reviewed by James Robinson. Test: new tests in CCLayerTreeHostImplTest/CCLayerTreeHostTest Track scroll deltas and maximum scrolls on LayerChromium/CCLayerImpl. The CCLayerImpl tree is now able to adjust these scroll deltas independent of the main thread. To push them back to the main thread, CCLayerTreeHostImpl collects them all and then bakes them into the scroll position during a begin frame and commit call. This allows new deltas to be collected while the scroll position containing the old delta and the old scroll position will be overwritten during the next commit. Only the main frame is supported right now for pushing this scroll delta back into the authoritative WebKit source to keep both sides in sync. Move tilingTransform() to the impl tree because drawTransform() is now updated using scroll deltas and so the results from calculating draw transforms needs to be dynamic so that children are updated properly. Also, exposed DebugScopedSetImplThread public because it's used in a few places. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::maxScrollPosition): (WebCore::LayerChromium::setMaxScrollPosition): (WebCore::LayerChromium::scrollDelta): (WebCore::LayerChromium::scrollable): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::setViewport): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::scrollBy): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::maxScrollPosition): (WebCore::CCLayerImpl::setMaxScrollPosition): (WebCore::CCLayerImpl::scrollDelta): (WebCore::CCLayerImpl::setScrollDelta): (WebCore::CCLayerImpl::scrollable): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::applyScrollDeltas): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::scrollRootLayer): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::start): (WebCore::CCSingleThreadProxy::context): (WebCore::CCSingleThreadProxy::finishAllRendering): (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore::DebugScopedSetImplThread::DebugScopedSetImplThread): (WebCore::DebugScopedSetImplThread::~DebugScopedSetImplThread): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread): (WebCore::CCThreadProxy::beginFrameAndCommit): * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::tilingTransform): (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: 2011-09-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69202 [CSS3 Regions] Make positioned objects use the first region as the ICB when it is their containing block. Make sure static distance computations take into account the current region as well. Reviewed by Sam Weinig. Added new tests in fast/regions. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock): * rendering/RenderBlock.h: (WebCore::RenderBlock::startOffsetForContent): * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): (WebCore::computeInlineStaticDistance): (WebCore::computeLogicalLeftPositionedOffset): (WebCore::computeLogicalTopPositionedOffset): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion): (WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion): (WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion): * rendering/RenderFlowThread.h: 2011-09-30 David Barr Implement currentColor support for CSS gradients https://bugs.webkit.org/show_bug.cgi?id=58730 Reviewed by Adam Barth. Allow currentColor as a CSS3 gradient color-stop. Test: fast/css/linear-gradient-currentcolor.html * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::isCacheable): Make currentColor uncacheable since the background image may be invalidated if currentColor is used as a gradient stop and the value of the 'color' property changes. * css/CSSParser.cpp: (WebCore::parseGradientColorOrKeyword): Accept the currentColor keyword. * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::image): Initialize document styleSelector so that currentColor may be computed for a StyleGeneratedImage. 2011-09-30 Gavin Barraclough Remove toStrictThisObject, toThisString, toThisJSString https://bugs.webkit.org/show_bug.cgi?id=69203 Rubber stamped by Sam Weinig These are no longer used. * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: 2011-09-30 Adam Barth Remove ASSERT introduced in http://trac.webkit.org/changeset/96427 which is triggering all over the place. Sorting this out is covered in this bug: https://bugs.webkit.org/show_bug.cgi?id=69200 * rendering/RenderView.cpp: (WebCore::RenderView::layout): 2011-09-30 Sheriff Bot Unreviewed, rolling out r96426. http://trac.webkit.org/changeset/96426 https://bugs.webkit.org/show_bug.cgi?id=69199 Broke a zillion image results on Chromium Skia Mac (Requested by abarth|gardener on #webkit). * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-09-30 Ilya Sherman Fix assertion failure in XSS Auditor https://bugs.webkit.org/show_bug.cgi?id=69050 https://code.google.com/p/chromium/issues/detail?id=97346 Reviewed by Daniel Bates. Test: fast/forms/xss-auditor-doesnt-crash.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::init): Don't try to decode the HTML body if it is empty. 2011-09-30 Maciej Stachowiak Loading page on potterybankids causes reproducible assertion failure in debug builds https://bugs.webkit.org/show_bug.cgi?id=69185 Reviewed by Simon Fraser. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeRepaintRects): Remove assert condition that isn't guaranteed to be true. 2011-09-30 Johnny Ding Support -webkit-tap-highlight-color when enabling touch events support. https://bugs.webkit.org/show_bug.cgi?id=48544 Reviewed by Kenneth Rohde Christiansen. Original code from the iOS WebCore code dump, extracted and modified by tijiang@rim and jnd@chromium. Supports the new CSS property -webkit-tap-highlight-color on platforms which support touch events. Platform can override WebCore::RenderTheme::platformTapHighlightColor to use its own platform specific default tap highlight color. Otherwise RenderTheme::defaultTapHighlightColor will be used as default tap highlight color. Test: fast/events/touch/tap-highlight-color.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::tapHighlightColor): * rendering/RenderTheme.h: (WebCore::RenderTheme::platformTapHighlightColor): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::initialTapHighlightColor): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::tapHighlightColor): (WebCore::InheritedFlags::setTapHighlightColor): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: 2011-09-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69173 RTL/LTR mixtures still not correct in regions. Simplify the loop once I realized it's only your directionality that matters and not your containing block's. Reviewed by Dan Bernstein. Added new test in fast/regions. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): 2011-09-30 Dan Bernstein first-letter in generated before content with display: table is not updated Reviewed by Sam Weinig. Test: fast/css-generated-content/first-letter-in-nested-before.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): Preserve the style type of anonymous containers around the generated content when updating their style. This preserves the first-letter-ness of the inline wrapping the first letter, which allows updateFirstLetter() to identify it later. 2011-09-30 Cary Clark Inset focus ring (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=69166 http://code.google.com/p/chromium/issues/detail?id=97956 This focus ring was drawn too large and was left tracks in subsequent invalidations. Make it more closely match the CG version. Reviewed by Stephen White. No new tests. This platform is not enabled. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::getFocusRingOutset): (WebCore::GraphicsContext::drawFocusRing): 2011-09-30 Sheriff Bot Unreviewed, rolling out r96422. http://trac.webkit.org/changeset/96422 https://bugs.webkit.org/show_bug.cgi?id=69170 Broke Windows build and kling wanted to roll it out as well (Requested by rniwa on #webkit). * rendering/InlineBox.cpp: (WebCore::InlineBox::prevOnLineExists): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-09-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69167 [CSS3 Regions] Fix some bugs in the computation of the logical left and width offsets for blocks in variable width regions. Specifically, this patch addresses a minor bug with overflow:hidden/scroll/auto block placement and with RTL directionality. Reviewed by Sam Weinig. Added five new tests in fast/regions. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalRightOffsetForContent): Avoid a double fetch of the border box in a given region by not calling logicalLeftOffsetForContent. No correctness change here. It's just cleaner. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): Change the shifted optimization to be cached for "self" rather than for "containing block". Rework the adjustment loop to handle changes in directionality and to fix correctness issues with RTL. (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): Don't double adjust if an object uses line width as the containing block width. In that case we already computed the line width in the region, so we don't need to apply any additional fixup. (WebCore::RenderBox::renderBoxRegionInfo): * rendering/RenderBoxRegionInfo.h: (WebCore::RenderBoxRegionInfo::RenderBoxRegionInfo): (WebCore::RenderBoxRegionInfo::isShifted): Changed the shifted code to be on self rather than on containing block. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): Refactor the layout code for RenderFlowThread to properly set up region rects assuming right alignment in RTL code. This change forces us to compute our maximum logical width first before looping through the regions again to set their content rects. 2011-09-30 Andreas Kling REGRESSION(r82611) InlineBox has 33 bits of bitset, causing alignment issues and extra memory use. https://bugs.webkit.org/show_bug.cgi?id=64914 Reviewed by Antti Koivisto. Remove InlineBox::prevOnLineExists() and its two accompanying bitfields since nobody is using them anymore. nextOnLineExists() is still used by GTK+ accessibility code. Also added a compile-time assertion to guard against future bloating of the InlineBox class. * rendering/InlineBox.cpp: (WebCore::SameSizeAsInlineBox::~SameSizeAsInlineBox): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2011-09-30 Pierre Rossi [Qt] Build fix: Qt::escape is deprecated in Qt5 https://bugs.webkit.org/show_bug.cgi?id=69162 Use QString::toHtmlEscaped in the Qt5 case. Reviewed by Andreas Kling. No new tests needed. * WebCore.pro: adjust the include path accordingly in the v8 case. 2011-09-30 Ryosuke Niwa Remove unused ReplaceSelectionCommand::copyStyleToChildren https://bugs.webkit.org/show_bug.cgi?id=69153 Reviewed by Antonio Gomes. Removed the function because it's no called anywhere. * editing/ReplaceSelectionCommand.cpp: * editing/ReplaceSelectionCommand.h: 2011-09-30 Aaron Colwell Fix EnabledAtRuntime support for constants. https://bugs.webkit.org/show_bug.cgi?id=67311 Reviewed by Adam Barth. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): 2011-09-29 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=69043 [CSS3 Regions] Blocks split across regions with variable width need to size differently in each region. This patch adds the capability for blocks to have variable width and positioning when split across regions. It is very rudimentary and so far only operates on basic normal flow RenderBlocks. Future patches will expand the support to cover other layout constructs like flexible boxes and tables. Reviewed by Sam Weinig. Added new tests in fast/regions and updated existing results. * WebCore.xcodeproj/project.pbxproj: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): * rendering/HitTestResult.h: (WebCore::HitTestResult::region): (WebCore::HitTestResult::setRegion): The hit test result now holds the active RenderRegion so that hit testing can adjust block widths and positions when hit testing their border boxes. * rendering/PaintInfo.h: (WebCore::PaintInfo::PaintInfo): The paint info struct now holds the active RenderRegion so that painting can adjust block widths and positions when painting borders and backgrounds and shadows. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): If our width ever changes, we invalidate all of our cached RenderBoxRegionInfo in all regions that we span. (WebCore::RenderBlock::clearRenderBoxRegionInfo): Called to clear out our cached region-specific information in all regions that we span. (WebCore::RenderBlock::borderBoxRectInRegionAtPosition): Returns the borderBoxRect for the region at the specified vertical offset. This rect can be both shifted horizontally and have a different width from our original border rect. (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::logicalRightOffsetForContent): Modified to call borderBoxRectInRegionAtPosition so that lines will fit inside the content rect of the border box rect for the specific region. * rendering/RenderBlock.h: (WebCore::RenderBlock::logicalRightOffsetForContent): Modified to call logicalLeftOffsetForContent since it's cleaner. * rendering/RenderBox.cpp: (WebCore::RenderBox::borderBoxRectInRegion): Called to compute the border box rect in a specific region. The result is cached in a HashMap in the region itself so that subsequent lookups are fast. (WebCore::RenderBox::nodeAtPoint): Modified to use the border box rect in the active region when hit testing the backgrounds of boxes. (WebCore::RenderBox::paintBoxDecorations): Modified to use the border box rect in the active region when painting the backgrounds of boxes. (WebCore::RenderBox::containingBlockLogicalWidthForContent): (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalWidthInRegion): Helpers for computing logical widths and margins in a specific region. The result is then cached in a HashMap in the region. (WebCore::RenderBox::renderBoxRegionInfo): The function for obtaining the region-specific information for a given box. * rendering/RenderBox.h: (WebCore::RenderBox::borderBoxRectInRegion): New function for returning the border box rect in a given region. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Make sure mask painting honors the active region. * rendering/RenderBoxRegionInfo.h: Added. (WebCore::RenderBoxRegionInfo::RenderBoxRegionInfo): (WebCore::RenderBoxRegionInfo::logicalLeft): (WebCore::RenderBoxRegionInfo::logicalWidth): (WebCore::RenderBoxRegionInfo::containingBlockChainIsShifted): New class held by RenderRegions that caches box-specific info for a given region. This will eventually expand to include custom styles as well, but for now it is limited to a new logical left and a new logical width, along with a bit for optimizing accumulated shifting when painting/hit testing to avoid too much groveling up the containing block chain. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): Removed the region fitting optimization, since eventually everyone is going to care, and there's no reason to limit it with the results now being cached. (WebCore::RenderFlowThread::layout): All box-specific region information is always cleared whenever the regions are invalidated. (WebCore::RenderFlowThread::computeLogicalWidth): Modified to set up RenderBoxRegionInfo for the flow thread in all regions. (WebCore::RenderFlowThread::paintIntoRegion): (WebCore::RenderFlowThread::hitTestRegion): Modified to take the region instead of the region's rectangle so that painting and hit testing of the flow thread layer tree can properly receive the active region. (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Helper for removing a box's information from all regions. For now it grovels through every region, so eventually we may want to have a cache of the start/end regions for a given box somewhere. * rendering/RenderFlowThread.h: Removal of the region fitting stuff. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::paintOverlayScrollbars): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintList): (WebCore::RenderLayer::paintPaginatedChildLayer): (WebCore::RenderLayer::paintChildLayerIntoColumns): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): Modified to pass the current region down through painting functions so that it is known at paint time. * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): Added a new bit to RenderObjects, inRenderFlowThread(), so that it is quick to determine whether or not an object needs flow thread special casing. (WebCore::RenderObject::enclosingRenderFlowThread): Modified enclosingRenderFlowThread to be able to quickly return 0 if the object is not in a flow thread. (WebCore::RenderObject::containerForRepaint): Same. * rendering/RenderObject.h: (WebCore::RenderObject::setParent): setParent now updates inRenderFlowThread() state. (WebCore::RenderObject::inRenderFlowThread): (WebCore::RenderObject::setInRenderFlowThread): Adding the new bit. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): Make sure when an object is removed from a RenderFlowThread that it deletes its box-specific information in all regions. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::~RenderRegion): (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::nodeAtPoint): (WebCore::RenderRegion::renderBoxRegionInfo): (WebCore::RenderRegion::setRenderBoxRegionInfo): (WebCore::RenderRegion::removeRenderBoxRegionInfo): (WebCore::RenderRegion::deleteAllRenderBoxRegionInfo): (WebCore::RenderRegion::matchesRenderFlowThreadLogicalWidth): * rendering/RenderRegion.h: Added the new HashMap for holding box-specific region information. Also added an additional optimization to check if a specific region matches the overall width of the RenderFlowThread. If it does, we don't need to cache box-specific information for that region. * rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer): Modified the PaintInfo construction to include the region argument. It's not optional so that callers will have to consider it (since masks illustrated this is necessary). 2011-09-30 Tim Horton feBlend uses a table of function pointers which reduces inlineability inside the main loop https://bugs.webkit.org/show_bug.cgi?id=69154 Reviewed by Darin Adler. Don't use a table of function pointers inside the feBlend inner loop, instead use switch and inline functions, bringing a 20% performance gain across the board to feBlend. No new tests, minor performance improvement. * platform/graphics/filters/FEBlend.cpp: (WebCore::normal): (WebCore::multiply): (WebCore::screen): (WebCore::darken): (WebCore::lighten): (WebCore::FEBlend::apply): 2011-09-30 Mark Hahnenberg Add getCallData to MethodTable in ClassInfo https://bugs.webkit.org/show_bug.cgi?id=69024 Reviewed by Sam Weinig. No new tests. * WebCore.exp.in: Changed getCallData from private to protected to allow subclasses who don't override getCallData themselves to reference it in their own method tables when calling the CREATE_METHOD_TABLE macro. * bridge/runtime_method.h: 2011-09-30 Ned Holbrook Complex spaces with synthetic bold are too wide https://bugs.webkit.org/show_bug.cgi?id=69033 Reviewed by Dan Bernstein. Test: fast/text/complex-synthetic-bold-space-width.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Subtract synthetic bold offset from spaceWidth. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): Ditto. 2011-09-30 Pavel Feldman Web Inspector: [chromium] expose inspector protocol version to the embedder. https://bugs.webkit.org/show_bug.cgi?id=69092 This change also introduces major/minor inspector version components. Reviewed by Yury Semikhatsky. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * inspector/Inspector-0.1.json: Renamed from Source/WebCore/inspector/Inspector.draft-01.json. * inspector/Inspector.json: * inspector/generate-inspector-protocol-version: Renamed from Source/WebCore/inspector/validate-protocol-compatibility. 2011-09-29 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=69106 Universal attribute selectors disable style sharing Reviewed by Dave Hyatt. Selectors of type [foo="bar"] ended up marking every element style with the affectedByAttributeSelectors bit rendering style sharing inoperative. This happens on http://www.whatwg.org/specs/web-apps/current-work/ for example. Instead we now mark style with affectedByUncommonAttributeSelectors bit only if an attribute selector actually matches the element. Before sharing, we also check the current element against collected attribute rules. We can share the style if neither element was affected. This speeds up style matching and applying ~15% on full HTML5 spec (=~0.7s). Sharing percentage goes from 0% to ~30%. Increased sharing should also save a substantial amount of memory. * css/CSSSelector.h: (WebCore::CSSSelector::isAttributeSelector): * css/CSSStyleSelector.cpp: (WebCore::RuleData::containsUncommonAttributeSelector): (WebCore::collectSpecialRulesInDefaultStyle): (WebCore::assertNoSiblingRulesInDefaultStyle): (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchesRuleSet): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::locateSharedStyle): (WebCore::CSSStyleSelector::styleForElement): (WebCore::selectorListContainsUncommonAttributeSelector): (WebCore::isCommonAttributeSelectorAttribute): (WebCore::containsUncommonAttributeSelector): (WebCore::RuleData::RuleData): (WebCore::collectFeaturesFromSelector): (WebCore::collectFeaturesFromList): * css/CSSStyleSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::affectedByUncommonAttributeSelectors): (WebCore::InheritedFlags::setAffectedByUncommonAttributeSelectors): 2011-09-30 James Robinson [chromium] Add WebKit API for sending input events to the compositor thread https://bugs.webkit.org/show_bug.cgi?id=69117 Reviewed by Darin Fisher. Convert to using an externally-provided thread instead of one managed by CCThreadProxy internally. Most changes in these files are mechanically changing references from ccThread to s_ccThread to reflect the class-static nature of this pointer, the rest are removing the old thread creation codepath. These changes are covered by the CC* unit tests and by the gpu layout tests when run with the use_threaded_compositing=1 gyp define. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setThread): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::finishAllRendering): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitAndRedraw): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::start): (WebCore::CCThreadProxy::stop): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::scheduleDrawTaskOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-29 Fady Samuel Fixed Hit testing on Framesets when Frameset is transformed https://bugs.webkit.org/show_bug.cgi?id=67740 Reviewed by Simon Fraser. Tests: fast/frames/frame-set-rotation-hit.html fast/frames/frame-set-scaling-hit.html * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize): 2011-09-29 Dirk Pranke fix gyp warnings in chromium for renamed files https://bugs.webkit.org/show_bug.cgi?id=69116 Reviewed by Adam Barth. * WebCore.gypi: 2011-09-29 Martin Robinson [Freetype] Some text in Planet GNOME renders in the wrong place https://bugs.webkit.org/show_bug.cgi?id=69099 Reviewed by Dirk Schulze. Test: platform/gtk/fonts/synthetic-oblique-positioning.html Fold the oblique transform into the font matrix itself rather than transforming the CTM of the context at render time. Not only does this fix the issue, it prevents unnecessary work on every paint. * platform/graphics/cairo/FontCairo.cpp: No longer set the synthetic oblique transformation matrix on the context when rendering the text. Instead it is now folded into the TM of the font itself. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::initializeWithFontFace): Fold the oblique transform into the scaled font. * platform/graphics/win/FontPlatformDataCairoWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Ditto. 2011-09-29 Dan Bernstein Follow-up fix for Glyph variants (line final swashes) appear where they should not Reviewed by Simon Fraser. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): Check for Hoefler Text Black Italic as well. 2011-09-29 Cary Clark Enable LCD text in Skia on Mac https://bugs.webkit.org/show_bug.cgi?id=68734 Reviewed by Stephen White. No new tests. Existing layout tests are generated with LCD text disabled for pixel comparisons. Duplicate the logic in FontMac.mm to pass settings for antialiasing and smoothing. Also disable smoothing for DumpRenderTree. * platform/graphics/skia/FontSkia.cpp: (WebCore::setupPaint): (WebCore::Font::drawGlyphs): 2011-09-29 Varun Jain Implement flick gesture in Chromium Gesture Recognizer https://bugs.webkit.org/show_bug.cgi?id=67930 Reviewed by Dimitri Glazkov. Test: Source/WebKit/chromium/tests/InnerGestureRecognizerTest.cpp * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::GestureRecognizerChromium::isOverMinFlickSpeed): (WebCore::GestureRecognizerChromium::appendScrollGestureEnd): (WebCore::GestureRecognizerChromium::updateValues): (WebCore::GestureRecognizerChromium::scrollEnd): * platform/chromium/GestureRecognizerChromium.h: 2011-09-29 Noel Gordon [chromium] canvas.toDataURL("image/jpeg"): use libjpeg-turbo data swizzle https://bugs.webkit.org/show_bug.cgi?id=67402 Reviewed by Kenneth Russell. libjpeg-turbo can read directly from the input data for the premultiplied BRGX (SkBitmap) encoding case. No change in behavior, covered by existing canvas 2d/3d tests canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::encodePixels): If JCS_EXTENSIONS is defined (libjpeg-turbo), swizzle the input BRGX pixels directly within libjpeg-turbo. 2011-09-29 Adam Barth Fixenate the build. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-29 Ryosuke Niwa Remove direct reads to m_firstNodeInserted and m_lastLeafInserted in ReplaceSelectionCommand https://bugs.webkit.org/show_bug.cgi?id=69023 Reviewed by Enrica Casucci. Converted to removeUnrenderedTextNodesAtEnds to use InsertedNodes instead of m_firstNodeInserted and m_lastLeafInserted. Extracted the logic to update nodes as InsertedNodes::willRemoveNode (old one was renamed to InsertedNodes::willRemoveNodePreservingChildren). Also extracted shouldPerformSmartReplace and addSpacesForSmartReplace out of doApply, and rewrote the logic to obtain endNode and startNode using startOfInsertedContent and endOfInsertedContent instead of m_firstNodeInserted and m_lastLeafInserted. Finally, replaced the nullity checks of m_firstNodeInserted and m_lastLeafInserted in completeHTMLReplacement by nullity checks of start and end positions. * dom/Node.cpp: (WebCore::Node::traversePreviousSibling): Added. * dom/Node.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren): Renamed from willRemoveNode. (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode): Extracted from removeUnrenderedTextNodesAtEnds. (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Made const. (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Made const. (WebCore::ReplaceSelectionCommand::handleStyleSpans): Takes firstNodeInserted instead of directly accessing m_firstNodeInserted. (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace): (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): * editing/ReplaceSelectionCommand.h: 2011-09-29 Andreas Kling Shrink HTMLAnchorElement on 32-bit. https://bugs.webkit.org/show_bug.cgi?id=69094 Reviewed by Antti Koivisto. * html/HTMLAnchorElement.h: Pack members into a bitfield. 2011-09-29 Dan Bernstein Glyph variants (line final swashes) appear where they should not Reviewed by Simon Fraser. Test: fast/text/line-initial-and-final-swashes.html Hoefler Text Italic enables line-initial and -final swashes by default, so disable them. This change targets only this known-bad font rather than all fonts, because at least one font (Khmer MN) incorrectly claims to have the line-initial feature enabled, but disabling it actually does something different and bad (breaking some combining marks). * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::createFeatureSettingDictionary): Added this helper function. (WebCore::cascadeToLastResortFontDescriptor): Deployed WTF_ARRAY_LENGTH(). (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Added. Returns a font descriptor that, in addition to having a cascade list consisting of the last resort font, also has feature settings to disable line-initial and line-final swashes. (WebCore::FontPlatformData::ctFont): For Hoefler Text Italic, use cascadeToLastResortAndDisableSwashesFontDescriptor(). 2011-09-29 Mark Hahnenberg Unreviewed: resetting baseline for code generator bindings Unreviewed build fix No new tests. * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: 2011-09-29 Nate Chapin [V8, chromium] More logging to determine cause of a null v8::Context in V8DOMWindowShell::namedItemAdded(). https://bugs.webkit.org/show_bug.cgi?id=68099 Reviewed by Adam Barth. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-29 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=69040 ScrollbarThemeComposite requires a ScrollView to draw scroll corner Reviewed by Simon Fraser. No new tests. This will be needed later. * platform/ScrollbarThemeComposite.cpp: (WebCore::pageForScrollView): (WebCore::ScrollbarThemeComposite::paintScrollCorner): Use pageForScrollView() function which already existed in this file, used in another similar location. * platform/chromium/FramelessScrollView.cpp: * platform/chromium/FramelessScrollView.h: * platform/gtk/ScrollbarThemeGtk.cpp: * platform/gtk/ScrollbarThemeGtk.h: * platform/wx/ScrollbarThemeWx.cpp: * platform/wx/ScrollbarThemeWx.h: All these overrides are no longer needed, ScrollbarThemeComposite will do the right thing. * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paintScrollCorner): Removed a special case for updatingControlTints phase. The same case is present in cross-platform code now, and Qt doesn't have any custom subclasses of ScrollableArea or ScrollView to need special handling. This was added in r37377 without a bug or much ChangeLog explanation. 2011-09-29 Mark Hahnenberg De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods https://bugs.webkit.org/show_bug.cgi?id=68839 Reviewed by Geoffrey Garen. No new tests. Removed the remaining visitChildrenVirtual methods. This patch completes the process of de-virtualizing visitChildren. * WebCore.exp.in: * bindings/js/JSAttrCustom.cpp: * bindings/js/JSAudioContextCustom.cpp: * bindings/js/JSCSSRuleCustom.cpp: * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSCanvasRenderingContextCustom.cpp: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: * bindings/js/JSJavaScriptAudioNodeCustom.cpp: * bindings/js/JSMessageChannelCustom.cpp: * bindings/js/JSMessagePortCustom.cpp: * bindings/js/JSNamedNodeMapCustom.cpp: * bindings/js/JSNodeCustom.cpp: * bindings/js/JSNodeFilterCustom.cpp: * bindings/js/JSNodeIteratorCustom.cpp: * bindings/js/JSSVGElementInstanceCustom.cpp: * bindings/js/JSSharedWorkerCustom.cpp: * bindings/js/JSStyleSheetCustom.cpp: * bindings/js/JSTreeWalkerCustom.cpp: * bindings/js/JSWebGLRenderingContextCustom.cpp: * bindings/js/JSWorkerContextCustom.cpp: * bindings/js/JSXMLHttpRequestCustom.cpp: * bindings/js/JSXPathResultCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/qt/qt_instance.cpp: * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: 2011-09-23 Tor Arne Vestbø [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi QWidget and friends now live in the QtWidgets library. We update includes in implementation files and private headers to us the non-module-prefixed path, and leave the lookup for the include path. For public headers we have to ifdef the includes as the user might now have the modules we need in his QT config. Finally, QSGCanvas is no longer a QWidget but a QWindow, so we have to update our code and use windowHandle() for setting the parent relationships. https://bugs.webkit.org/show_bug.cgi?id=68687 Reviewed by Andreas Kling. * WebCore.pri: * platform/graphics/qt/GraphicsLayerQt.cpp: 2011-09-29 Sheriff Bot Unreviewed, rolling out r96340. http://trac.webkit.org/changeset/96340 https://bugs.webkit.org/show_bug.cgi?id=69098 Caused 10 tests to crash in Debug (Requested by abarth|gardener on #webkit). * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::childrenChanged): * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::childrenChanged): * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): 2011-09-29 Andreas Kling Shrink FontFallbackList. https://bugs.webkit.org/show_bug.cgi?id=69093 Reviewed by Antti Koivisto. Reduce the size of FontFallbackList by one CPU word, decreasing memory consumption by 300 kB (on 64-bit) when loading the full HTML5 spec. * platform/graphics/FontCache.h: * platform/graphics/FontCache.cpp: (WebCore::FontCache::generation): Store the FontCache generation as an ushort rather than uint. * platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): * platform/graphics/FontFallbackList.h: Pack enum and bool members in a bitfield. 2011-09-29 Adam Barth We should ignore the return value of GetRealNamedProperty https://bugs.webkit.org/show_bug.cgi?id=68840 Reviewed by Nate Chapin. Instead of skipping the lookup process by using the result of real named property, we should just indiciate that it wasn't handled by the interceptor. Test: http/tests/security/window-named-valueOf.html * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedPropertyGetter): 2011-09-29 Chris Fleizach ARIA live regions don't trigger notifications for elements that aren't in the AX tree https://bugs.webkit.org/show_bug.cgi?id=62289 If an ARIA Live region udpates an element that is not in the AX object cache, then the Live region notification is not sent. To fix this, the childrenChanged() method needs to actually create the appropriate objects, but since that method gets called during a render tree update, we've learned that it's generally not safe to create objects. Instead a one shot timer can be fired that will update and create the necessary objects so that the correct notification can be sent. Reviewed by Darin Adler. Test: platform/mac/accessibility/aria-liveregion-without-element-access.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenUpdateTimerFired): (WebCore::AXObjectCache::childrenChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::childrenChanged): * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::childrenChanged): * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::childrenChanged): * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): 2011-09-29 Martin Robinson [GTK] Dragging a selection does not produce a drag image https://bugs.webkit.org/show_bug.cgi?id=69064 Reviewed by Andreas Kling. Moved Chromium's generic implementation of Frame::nodeImage and Frame::dragImageForSeletion to Frame.cpp and simply excluded via #ifdefs platforms that do not have their own implementation. Removed all empty implementations of these functions and Qt's which was functionally identical. No new tests. Drag-and-drop drag image functionality changes are incredibly difficult to test in a non-manual way. * CMakeListsEfl.txt: Delist FrameEfl.cpp. * GNUmakefile.list.am: Delist FrameGtk.cpp. * WebCore.gypi: Delist removed Frame*.cpp. * WebCore.pro: Delist FrameQt.cpp. * page/Frame.cpp: Moved FrameChromium implementation here. (WebCore::ScopedFramePaintingState::ScopedFramePaintingState): (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState): (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * page/chromium/FrameChromium.cpp: Removed. * page/efl/FrameEfl.cpp: Removed. * page/gtk/FrameGtk.cpp: Removed. * page/qt/FrameQt.cpp: Removed. * page/wx/FrameWx.cpp: Removed. * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::createDragImage): Call nodeImage to get the drag image for a node. 2011-09-29 Noel Gordon [chromium skia] PNGImageEncoder: hoist constants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=68988 Reviewed by Kenneth Russell. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.png.*.html fast/canvas/toDataURL-alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/PNGImageEncoder.cpp: (WebCore::encodePixels): Move constant out of the encoding loop. (WebCore::PNGImageEncoder::encode): Consistency & style: call encodePixels() just like we do in the JPEG encoder. 2011-09-29 Iain Merrick Add unit test for CCLayerSorter https://bugs.webkit.org/show_bug.cgi?id=68622 Minor refactoring for testability: - Made pointInTriangle public. - Added LayerShape to decouple LayerIntersector and GraphNode. - Added a public wrapper function for LayerIntersector. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::pointInTriangle): (WebCore::CCLayerSorter::calculateZDiff): (WebCore::CCLayerSorter::LayerIntersector::LayerIntersector): (WebCore::CCLayerSorter::LayerIntersector::go): (WebCore::CCLayerSorter::LayerIntersector::checkZDiff): (WebCore::CCLayerSorter::LayerIntersector::layerZFromProjectedPoint): (WebCore::CCLayerSorter::checkOverlap): (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::createGraphNodes): * platform/graphics/chromium/cc/CCLayerSorter.h: (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::GraphNode::GraphNode): 2011-09-29 Ilya Tikhonovsky Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh. https://bugs.webkit.org/show_bug.cgi?id=69087 The fix has the changes for the test and minor perf framework improvements. Reviewed by Yury Semikhatsky. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh): 2011-09-29 Vsevolod Vlasov Web Inspector: Make search-in-resource test simpler. https://bugs.webkit.org/show_bug.cgi?id=69025 Changed search-in-resource test. Removed error parameter from content provider's searchInContent callback. Reviewed by Pavel Feldman. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.searchInContent): 2011-09-29 Hans Wennborg IndexedDB: Use LevelDB also for in-memory databases https://bugs.webkit.org/show_bug.cgi?id=68903 Reviewed by Steve Block. Add LevelDBDatabase::openInMemory() which uses leveldb::NewMemEnv() to create in-memory LevelDB databases. Use this in IDBLeveLDBBackingStore::open() when the caller passes in an empty file path. This happens in Chromium's incognito mode, and when running layout tests. Fix IDBSQLiteBackingStore::backingStoreExists() so it doesn't create files when passed in an empty file path, but uses the in-memory mode instead. Existing layout tests will all be run in-memory. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::~LevelDBDatabase): (WebCore::openDB): (WebCore::LevelDBDatabase::open): (WebCore::LevelDBDatabase::openInMemory): * platform/leveldb/LevelDBDatabase.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::open): * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::backingStoreExists): 2011-09-29 Ilya Tikhonovsky Web Inspector: speed-up Network panel. Change _staleResources type from array to object. https://bugs.webkit.org/show_bug.cgi?id=69081 There is a test with 30 requests. For the each stage of loading a resource we have an entry in _staleResources array. There are at least 4 stages per request. NetworkLogView._refresh function is creating/updating the resource row for the each such entry. This array can be replaced with a hash map just because the resource associated with the entry is the same for all the entries with the same request id. Reviewed by Pavel Feldman. Test: inspector/performance/resources/network-append-30-requests.html * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype._invalidateAllItems): (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkLogView.prototype._refreshResource): 2011-09-28 Pavel Feldman Web Inspector: make inspector protocol validation a part of the build process. https://bugs.webkit.org/show_bug.cgi?id=68999 Since we'd like to commit to inspector protocol backwards compatibility, violating it should be a build failure. Reviewed by Yury Semikhatsky. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * inspector/Inspector.draft-01.json: * inspector/Inspector.json: * inspector/generate-inspector-idl: * inspector/generate-protocol-externs: * inspector/validate-protocol-compatibility: 2011-09-27 Pavel Feldman Web Inspector: Scripts panel without folders causes errors when creating content scripts section. https://bugs.webkit.org/show_bug.cgi?id=68827 Reviewed by Yury Semikhatsky. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): 2011-09-28 Andrey Kosyakov Web Inspector: network log view refresh optimizations https://bugs.webkit.org/show_bug.cgi?id=69010 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.refresh): 2011-09-29 Pavel Podivilov Web Inspector: split SourceFile.js into RawSourceCode.js and UISourceCodeContentProviders.js. https://bugs.webkit.org/show_bug.cgi?id=69068 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/RawSourceCode.js: Renamed from Source/WebCore/inspector/front-end/SourceFile.js. (WebInspector.RawSourceCode): Moved from SourceFile.js. (WebInspector.UILocation): Moved from SourceFile.js. * inspector/front-end/UISourceCodeContentProviders.js: Added. Moved ContentProvider implementations from SourceFile.js (WebInspector.ScriptContentProvider): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent.appendChunk): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): (WebInspector.ResourceContentProvider): (WebInspector.ResourceContentProvider.prototype.requestContent): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-29 Philippe Normand [GStreamer] 2 flaky media tests https://bugs.webkit.org/show_bug.cgi?id=67407 Reviewed by Martin Robinson. Workaround for GStreamer bug#639941. In GStreamer 0.10.35 basesink reports wrong duration in case of EOS and negative playback rate. This workaround fixes two media tests, media/video-timeupdate-reverse-play.html and media/video-reverse-play-duration.html. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): (WebCore::MediaPlayerPrivateGStreamer::currentTime): (WebCore::MediaPlayerPrivateGStreamer::didEnd): 2011-09-29 Philippe Normand [GStreamer] fullscreen video pause/play fails https://bugs.webkit.org/show_bug.cgi?id=66936 Reviewed by Martin Robinson. Don't use the identity element to avoid painting of the in-window video. Instead simply make the sink aware of the fullscreen state and ignore buffers if fullscreen and autovideosink are active. Also fixed two deadlocks happening when a paused pipeline is switched to fullscreen and when fullscreen is disabled for a paused pipeline. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::enterFullscreen): (WebCore::GStreamerGWorld::exitFullscreen): * platform/graphics/gstreamer/GStreamerGWorld.h: (WebCore::GStreamerGWorld::isFullscreen): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkit_video_sink_render): (webkit_video_sink_new): * platform/graphics/gstreamer/VideoSinkGStreamer.h: 2011-09-29 Tim Horton REGRESSION(87010): elements in ECMA-cloud neither filled nor blurred https://bugs.webkit.org/show_bug.cgi?id=68679 Reviewed by Nikolas Zimmermann. Strip prefixes from SVG attributes before testing if they're supported. Namespaced attributes will be matched using their namespace instead of the (user-choosable) prefix. Test: svg/custom/xlink-custom-namespace.svg * svg/SVGAElement.cpp: (WebCore::SVGAElement::isSupportedAttribute): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::isSupportedAttribute): * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::isSupportedAttribute): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isSupportedAttribute): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::isSupportedAttribute): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::isSupportedAttribute): * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::isSupportedAttribute): * svg/SVGElement.h: (WebCore::SVGAttributeHashTranslator::hash): (WebCore::SVGAttributeHashTranslator::equal): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::isSupportedAttribute): * svg/SVGExternalResourcesRequired.h: * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::isSupportedAttribute): * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::isSupportedAttribute): * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): * svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::isSupportedAttribute): * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::isSupportedAttribute): * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::isSupportedAttribute): * svg/SVGFEMergeNodeElement.cpp: (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::isSupportedAttribute): * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::isSupportedAttribute): * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::isSupportedAttribute): * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::isSupportedAttribute): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::isSupportedAttribute): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::isSupportedAttribute): * svg/SVGGElement.cpp: (WebCore::SVGGElement::isSupportedAttribute): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::isSupportedAttribute): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::isSupportedAttribute): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::isSupportedAttribute): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::isSupportedAttribute): * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::isSupportedAttribute): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::isSupportedAttribute): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::isSupportedAttribute): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::isSupportedAttribute): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::isSupportedAttribute): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::isSupportedAttribute): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::isSupportedAttribute): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::isSupportedAttribute): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::isSupportedAttribute): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::isSupportedAttribute): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::isSupportedAttribute): * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::isSupportedAttribute): * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::isSupportedAttribute): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::isSupportedAttribute): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::isSupportedAttribute): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::isSupportedAttribute): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::isSupportedAttribute): * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::isSupportedAttribute): * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::addSupportedAttributes): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::isSupportedAttribute): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::isSupportedAttribute): 2011-09-28 Kentaro Hara "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&" https://bugs.webkit.org/show_bug.cgi?id=68984 Reviewed by Darin Adler. Just a follow-up fix for the bug 68345. For performance, "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&". Tests: fast/events/constructors/pop-state-event-constructor.html fast/events/fire-popstate-event.html * dom/PopStateEvent.cpp: (WebCore::PopStateEvent::PopStateEvent): (WebCore::PopStateEvent::create): (WebCore::PopStateEvent::initPopStateEvent): * dom/PopStateEvent.h: 2011-09-28 Martin Robinson [GTK] Move drag-and-drop code which can be shared with WebKit2 to WebCore https://bugs.webkit.org/show_bug.cgi?id=66890 Added a GtkDragAndDropHelper class to hold all the logic that is common between WebKit1 and WebKit2. This will allow greater code sharing between the two ports. Reviewed by Philippe Normand. No new tests. This patch should not change behavior. * GNUmakefile.list.am: Added the GtkDragAndDropHelper to the sources list. * platform/gtk/GtkDragAndDropHelper.cpp: Added. * platform/gtk/GtkDragAndDropHelper.h: Added. 2011-09-28 Dan Bernstein first-letter after list marker not updated correctly Reviewed by Simon Fraser. Test: fast/dynamic/first-letter-after-list-marker.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): Improved the logic for continuing past list markers when trying to locate a first letter to update. 2011-09-28 Kent Tamura REGRESSION(r93858): Can't type anything into input elements when maxlength is greater than 2^31 https://bugs.webkit.org/show_bug.cgi?id=68981 Reviewed by Darin Adler. * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTMLInteger): Check the failure of charactersToIntStrict(). (WebCore::parseHTMLNonNegativeInteger): Check the failure of charactersToUIntStrict(). 2011-09-28 Antoine Labour Remove unused createRootLayerPainter from CCLayerTreeHostClient https://bugs.webkit.org/show_bug.cgi?id=69042 Reviewed by James Robinson. No new test needed: no semantic change. * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-09-28 Luke Macpherson Only resolve direction aware properties when properties are direction aware. https://bugs.webkit.org/show_bug.cgi?id=68968 Reviewed by Eric Seidel. No new tests / no functionality changed. Profiling showed a ~8% improvement in applyProperty by not calling resolveDirectionAwareProperty for every property. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-28 Simon Fraser fast/dom/scroll-element-to-rect.html fails on WK1 Mac port https://bugs.webkit.org/show_bug.cgi?id=68815 Reviewed by Dan Bernstein. FrameView::scrollElementToRect() was incorrectly using Element::boundsInWindowSpace(), which is window-relative (not web view-relative), and has flipped coordinates in WebKit1. Change to use Node::getRect() which is what the author intended. * dom/Element.h: * page/FrameView.cpp: (WebCore::FrameView::scrollElementToRect): 2011-09-28 Peter Beverloo Don't clamp cubic-bezier timing functions between 0 and 1 https://bugs.webkit.org/show_bug.cgi?id=45761 Remove the limitation of clamping the cubic-bezier timing function values between 0 and 1, following the specification change made on April 5 of this year. Reviewed by Dean Jackson. Tests: transitions/cubic-bezier-overflow-color.html transitions/cubic-bezier-overflow-length.html transitions/cubic-bezier-overflow-shadow.html transitions/cubic-bezier-overflow-svg-length.html transitions/cubic-bezier-overflow-transform.html * css/CSSParser.cpp: (WebCore::CSSParser::parseCubicBezierTimingFunctionValue): 2011-09-28 Chris Rogers DelayNode must set the context on delayTime AudioParam to support automation https://bugs.webkit.org/show_bug.cgi?id=68828 Reviewed by Kenneth Russell. Test: webaudio/delaynode-scheduling.html * webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): 2011-09-28 Sergey Glazunov JavaScript generated documents don't inherit the cookie URL https://bugs.webkit.org/show_bug.cgi?id=69003 Reviewed by Adam Barth. Test: http/tests/security/cookies/cookie-theft-with-javascript-doc.html * dom/Document.h: (WebCore::Document::setCookieURL): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::replaceDocument): (WebCore::DocumentWriter::begin): * loader/DocumentWriter.h: 2011-09-27 Dimitri Glazkov REGRESSION(r95573): Crash when loading SVG documents in a flattened frame or any SVG document in Chromium/Mac. https://bugs.webkit.org/show_bug.cgi?id=68938 Reviewed by David Hyatt. Test: all svg tests in LayoutTests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): Added a null-check for containingBlock. 2011-09-28 Una Sabovic Setting innerText to an empty string on editable div loses focus https://bugs.webkit.org/show_bug.cgi?id=62092 Reviewed by Ryosuke Niwa. When selection start or end node is being deleted do not clear the selection. Instead update the start/end position to an equivalent parent-anchored positions. When text is inserted/deleted update selection per range modification spec: http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Mutation Tests: editing/selection/document-mutation.html editing/selection/editable-div-clear-on-keydown.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::respondToNodeModification): (WebCore::updatePositionAfterAdoptingTextReplacement): (WebCore::FrameSelection::textWillBeReplaced): * editing/htmlediting.cpp: (WebCore::updatePositionForNodeRemoval): 2011-09-28 Joseph Pecoraro FTPDirectoryDocument Shows Garbled String for Last Modified Date https://bugs.webkit.org/show_bug.cgi?id=69011 Reviewed by Dan Bernstein. Force WTF::String concatenation instead of an accidental char* pointer addition. * html/FTPDirectoryDocument.cpp: (WebCore::processFileDateString): 2011-09-28 Nate Chapin Fix a regression in r96060. ResourceLoader shouldn't get initialized with a null DocumentLoader. https://bugs.webkit.org/show_bug.cgi?id=69004 Reviewed by Csaba Osztrogonác. This should fix a debug crash in some platforms in plugins/js-from-destroy.html * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): Move the activeDocumentLoader() null checks back to SubresouceLoader::create(). * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): 2011-09-28 Adam Barth CSP doesn't work for a wide variety of cases https://bugs.webkit.org/show_bug.cgi?id=68921 Reviewed by Darin Adler. Patch suggested by Sam Weinig. It's unclear to me how to test this change because all our tests run on non-default ports, which is why we have this bug in the first place. Mozilla uses a proxy while testing so they can test with URLs like http://example.com, but we don't have such a facility. * page/ContentSecurityPolicy.cpp: (WebCore::CSPSource::portMatches): 2011-09-28 Fady Samuel [Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules https://bugs.webkit.org/show_bug.cgi?id=68936 Reviewed by Tony Chang. Chromium need to be built without Gtk for future version of ChromiumOS. * WebCore.gyp/WebCore.gyp: 2011-09-28 Tom Sepez Revert change which broke displaying end script tags in view-source, instead deal with any trailing tag included by mistake in the XSSAuditor itself. Correct tests to detect the missing close tags. https://bugs.webkit.org/show_bug.cgi?id=68898 Reviewed by Adam Barth. * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::end): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::nextToken): * html/parser/XSSAuditor.cpp: (WebCore::startsHTMLEndTagAt): (WebCore::XSSAuditor::snippetForJavaScript): 2011-09-28 Adam Barth Remove empty directories. * editing/brew: Removed. * page/brew: Removed. * platform/brew: Removed. * platform/graphics/brew: Removed. * platform/network/brew: Removed. * platform/text/brew: Removed. 2011-09-28 Ilya Tikhonovsky Web Inspector: optional arguments support for the frontend needs to be extended. https://bugs.webkit.org/show_bug.cgi?id=69005 Generator supports optional arguments but they are transferred by value. It is not suitable if the used type doesn't have operator bool. I'll transfer such arguments by pointer. Reviewed by Pavel Feldman. Build is the test. * inspector/CodeGeneratorInspector.pm: (generateFrontendFunction): (paramTypeTraits): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didFailLoading): 2011-09-28 Antaryami Pandia Reflected attribute input.size wraps on negative values (Chrome), or returns them (Safari). https://bugs.webkit.org/show_bug.cgi?id=44886 Reviewed by Darin Adler. Test: fast/dom/HTMLInputElement/input-size-attribute.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): 2011-09-28 Vsevolod Vlasov Web Inspector: Add support for search in single resource to page agent. https://bugs.webkit.org/show_bug.cgi?id=68998 Reviewed by Pavel Feldman. Test: http/tests/inspector/search/search-in-resource.html * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines): * inspector/ContentSearchUtils.h: * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::buildObjectForSearchMatch): (WebCore::InspectorPageAgent::searchInResource): * inspector/InspectorPageAgent.h: * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.searchInContent): * inspector/front-end/SourceFile.js: (WebInspector.ResourceContentProvider.prototype.requestContent): (WebInspector.ResourceContentProvider.prototype.searchInContent): * inspector/front-end/UISourceCode.js: (WebInspector.ContentProvider.prototype.requestContent): (WebInspector.ContentProvider.prototype.searchInContent): 2011-09-28 Ilya Tikhonovsky Web Inspector: It'd be useful to have performance stats for the back-end to front-end communication channel. https://bugs.webkit.org/show_bug.cgi?id=69002 Reviewed by Yury Semikhatsky. * inspector/CodeGeneratorInspector.pm: 2011-09-27 Pavel Podivilov Web Inspector: live edit cursor always appears at the beginning of the file. https://bugs.webkit.org/show_bug.cgi?id=68900 Reviewed by Pavel Feldman. * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing): 2011-09-28 Vsevolod Vlasov Web Inspector: Refactor searching in inspector, add test (fixed non regex search). https://bugs.webkit.org/show_bug.cgi?id=68930 Reviewed by Yury Semikhatsky. Search moved out from page agent. Fixed search for non regex case which is not yet used. Test: http/tests/inspector/search/search-in-resources.html * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/ContentSearchUtils.cpp: Added. (WebCore::ContentSearchUtils::createSearchRegexSource): (WebCore::ContentSearchUtils::createSearchRegex): (WebCore::ContentSearchUtils::countRegularExpressionMatches): * inspector/ContentSearchUtils.h: Added. * inspector/InspectorPageAgent.cpp: (WebCore::hasTextContent): (WebCore::InspectorPageAgent::cachedResourceContent): (WebCore::textContentForCachedResource): (WebCore::buildObjectForSearchResult): (WebCore::InspectorPageAgent::searchInResources): * inspector/front-end/utilities.js: (): 2011-09-28 Kentaro Hara Implement a PopStateEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=68896 Reviewed by Adam Barth. Test: fast/events/constructors/pop-state-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added a PopStateEvent constructor. * dom/PopStateEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-28 No'am Rosenthal [Texmap] Allow TextureMapperGL to work without a GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=68980 Reviewed by Andreas Kling. Perform a null-check for m_context and initialize that variable. If a graphics-context doesn't exist, we don't need to reset it. No new functionality so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapperGL::beginPainting): (WebCore::TextureMapperGL::endPainting): 2011-09-28 Kentaro Hara Implement an ErrorEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=68336 Reviewed by Adam Barth. Test: fast/events/constructors/error-event-constructor.html * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyValue): Returns an unsigned value corresponding to a given key. * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Added the ErrorEvent constructor. * dom/ErrorEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-27 Andy Estes WebKitLinkedOnOrAfter() check is ineffective for Solar Walk app-specific hack. https://bugs.webkit.org/show_bug.cgi?id=68863 Reviewed by Darin Adler. The SolarWalk binary does not link against WebKit.framework directly, so calling NSVersionOfLinkTimeLibrary() will not return the version of WebKit against which SolarWalk was linked. Since Solar Walk has released an update that addresses the issue for which this app-specific hack was originally added, we should just remove the hack. * WebCore.exp.in: Remove applicationIsSolarWalkMac(). * platform/RuntimeApplicationChecks.cpp: Ditto. * platform/RuntimeApplicationChecks.h: Ditto. 2011-09-28 Tim Horton Fix potential SVG performance regression (over-invalidation of caches) from 96052 https://bugs.webkit.org/show_bug.cgi?id=68941 Reviewed by Zoltan Herczeg. Only invalidate the cache of a filter when target style changes, as of the different types of cached resources, only filters make use of the style of the target element and thus need to be invalidated when the target style changes. No new tests, performance improvement. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientUpdatedFromElement): 2011-09-28 Adenilson Cavalcanti Missing initialization of member in ImageFrameQt class https://bugs.webkit.org/show_bug.cgi?id=68943 Reviewed by Kenneth Rohde Christiansen. No new tests, this fixes internal implementation detail. * platform/image-decoders/qt/ImageFrameQt.cpp: (WebCore::ImageFrame::ImageFrame): (WebCore::ImageFrame::operator=): 2011-09-27 Luke Macpherson Defer call to CSSValue::isPrimitiveValue(), saves ~4% in CSSStyleSelector::applyProperty(). https://bugs.webkit.org/show_bug.cgi?id=68964 Reviewed by Eric Seidel. No new tests / no functionality changed. Doing value->isPrimitiveValue() is relatviely expensive, so moving it after the early returns but before the result is used saves a significant number of cycles. (Tested with Shark profiler in Safari). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-27 Ryosuke Niwa Simplify ReplaceSelectionCommand::positionAtStartOfInsertedContent https://bugs.webkit.org/show_bug.cgi?id=68939 Reviewed by Darin Adler. Simplified ReplaceSelectionCommand::positionAtStartOfInsertedContent. This change revealed a bug in removeUnrenderedTextNodesAtEnds that text nodes without any visible text at ends are not removed when it has a render object. Fixed the bug by checking the length of the rendered text. (Tested by editing/pasteboard/pasting-word-in-div-extra-line.html) This further revealed that caretMaxRenderedOffset doesn't return an offset and caretMaxRenderedOffset on InlineBox, InlineTextBox, RenderObject, RenderBR, RenderPlaced are never called. To address this issue, renamed caretMaxRenderedOffset to renderedTextLength for RenderText and removed the rest. * dom/Position.cpp: (WebCore::Position::rendersInDifferentPosition): * editing/ReplaceSelectionCommand.cpp: (WebCore::nodeHasVisibleRenderText): Added. (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Calls nodeHasVisibleRenderText. (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Simplified. * editing/visible_units.cpp: (WebCore::startOfParagraph): Calls renderedTextLength. (WebCore::endOfParagraph): Ditto. * rendering/InlineBox.cpp: Removed caretMaxRenderedOffset. * rendering/InlineBox.h: Ditto. * rendering/InlineTextBox.cpp: Ditto. * rendering/InlineTextBox.h: Ditto. * rendering/RenderBR.cpp: Ditto. * rendering/RenderBR.h: Ditto. * rendering/RenderObject.cpp: Ditto. * rendering/RenderObject.h: Ditto. * rendering/RenderReplaced.cpp: Ditto. * rendering/RenderReplaced.h: Ditto. * rendering/RenderText.cpp: (WebCore::RenderText::renderedTextLength): Renamed from caretMaxRenderedOffset. * rendering/RenderText.h: 2011-09-27 James Robinson [chromium] LayerRenderChromium asserts about leaking textures. https://bugs.webkit.org/show_bug.cgi?id=68190 Reviewed by Kenneth Russell. This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures. This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format enum type, making it more testable. It also allows us to track the allocations by subclassing TextureAllocator to make sure we aren't leaking any textures. * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator): (WebCore::LayerRendererChromium::contentsTextureAllocator): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::memoryUseBytes): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::evictAndDeleteAllTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureAllocator::~TextureAllocator): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added. (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h. (WebCore::TrackingTextureAllocator::create): (WebCore::TrackingTextureAllocator::currentMemoryUseBytes): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::updateTexture): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread): (WebCore::CCLayerTreeHost::commitToOnCCThread): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): 2011-09-27 James Robinson [chromium] Only initiate the beginFrameAndCommit sequence if a commit has been requested https://bugs.webkit.org/show_bug.cgi?id=68967 Reviewed by Kenneth Russell. When updating the scheduler state, we should only initiate a new commit flow if a commit has been requested (as opposed to only a redraw). Covered by the unit test CCLayerTreeHostTestSetNeedsRedraw with USE(THREADED_COMPOSITING) set to true. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread): 2011-09-27 Kentaro Hara Implement a PageTransitionEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=68067 Reviewed by Adam Barth. Test: fast/events/constructors/page-transition-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the PageTransitionEvent constructor. * dom/PageTransitionEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-27 Kentaro Hara Implement a MessageEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=68883 Reviewed by Adam Barth. The spec for MessageEvent is here: http://www.whatwg.org/specs/web-apps/current-work/#messageevent Currently, some tests in fast/events/constructors/message-event-constructor.html are failing or crashing in DRT, as we commented in the test file. This is because MessageEvent.data is implemented as SerializedScriptValue, and thus it cannot keep ScriptValue passed by JavaScript. This is the same issue as the bug (https://bugs.webkit.org/show_bug.cgi?id=68345). We will soon make a follow-up patch to fix these failures, after this patch is landed. Test: fast/events/constructors/message-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the MessageEvent constructor. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Generates MessagePortArray from the list of message ports in the format of JSValues. * bindings/js/JSDictionary.h: * bindings/js/JSEventConstructors.cpp: Added #includes for MessageEvent. * dom/MessageEvent.cpp: (WebCore::MessageEventInit::MessageEventInit): (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): * dom/MessageEvent.h: Added a definition for MessageEvent. Removed an extra leading spaces. (WebCore::MessageEvent::create): (WebCore::MessageEvent::origin): (WebCore::MessageEvent::lastEventId): (WebCore::MessageEvent::source): (WebCore::MessageEvent::ports): (WebCore::MessageEvent::dataType): (WebCore::MessageEvent::dataAsSerializedScriptValue): (WebCore::MessageEvent::dataAsString): (WebCore::MessageEvent::dataAsBlob): (WebCore::MessageEvent::dataAsArrayBuffer): * dom/MessageEvent.idl: Makes MessageEvent constructible. 2011-09-27 Eric Uhrhane [Chromium/FileWriter] race condition in FileWriter completion can lead to assert https://bugs.webkit.org/show_bug.cgi?id=67684 Reviewed by David Levin. Tests: fast/filesystem/file-writer-abort-continue.html fast/filesystem/file-writer-abort.html Track the state of the backend and be prepared for reentrant user requests. Limit recursion depth to an arbitrary small constant. * fileapi/FileWriter.cpp: Lots of event-handling changes. * fileapi/FileWriter.h: 2011-09-27 Mihai Parparita Unreviewed, rolling out r96141. http://trac.webkit.org/changeset/96141 https://bugs.webkit.org/show_bug.cgi?id=68190 Breaks PrerenderBrowserTest.PrerenderHTML5Video in browser_tests * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::createLayerTexture): (WebCore::LayerRendererChromium::deleteLayerTexture): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::memoryUseBytes): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::evictAndDeleteAllTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/TrackingTextureAllocator.cpp: Removed. * platform/graphics/chromium/TrackingTextureAllocator.h: Removed. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::updateTexture): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp.rej: Removed. * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): 2011-09-27 James Robinson [chromium] Guard accelerated skia drawing logic with its own define to remove dependency on USE(THREADED_COMPOSITING) https://bugs.webkit.org/show_bug.cgi?id=68953 Reviewed by Kenneth Russell. The accelerated drawing code is incompatible with threaded compositing. Rather than tying the two behaviors together via USE(THREADED_COMPOSITING), this patch guards the accelerated drawing code with its own USE() guard so the features can advance independently. Today, it's not safe to set both of these flags. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: 2011-09-27 Luke Macpherson Slightly improve performance of CSSStyleApplyProperty handler lookup. https://bugs.webkit.org/show_bug.cgi?id=68868 Reviewed by Eric Seidel. No new tests as no functionality changed. * css/CSSStyleApplyProperty.h: (WebCore::CSSStyleApplyProperty::propertyHandler): Make propertyHandler() public and remove redirecting functions. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Perform property handler lookup once and reuse the result. 2011-09-27 Kent Tamura [V8] element.dataset.nonExistingKey should return undefined. https://bugs.webkit.org/show_bug.cgi?id=68877 Reviewed by Nate Chapin. * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyGetter): Uses v8StringOrUndefined() instead of v8String(). 2011-09-23 Mark Hahnenberg Add static version of JSCell::visitChildren https://bugs.webkit.org/show_bug.cgi?id=68404 Reviewed by Darin Adler. No new tests. In this patch we just extract the bodies of the virtual visitChildren methods throughout the JSCell inheritance hierarchy out into static methods, which are now called from the virtual methods. This is an intermediate step in trying to move the virtual-ness of visitChildren into our own custom vtable stored in ClassInfo. We need to convert the methods to static methods in order to be able to more easily store and refer to them in our custom vtable since normal member methods store some implicit information in their types, making it impossible to store them generically in ClassInfo. * WebCore.exp.in: * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::visitChildrenVirtual): (WebCore::JSAttr::visitChildren): * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContext::visitChildrenVirtual): (WebCore::JSAudioContext::visitChildren): * bindings/js/JSCSSRuleCustom.cpp: (WebCore::JSCSSRule::visitChildrenVirtual): (WebCore::JSCSSRule::visitChildren): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual): (WebCore::JSCSSStyleDeclaration::visitChildren): * bindings/js/JSCanvasRenderingContextCustom.cpp: (WebCore::JSCanvasRenderingContext::visitChildrenVirtual): (WebCore::JSCanvasRenderingContext::visitChildren): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::visitChildrenVirtual): (WebCore::JSDOMGlobalObject::visitChildren): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::visitChildrenVirtual): (WebCore::JSDOMWindow::visitChildren): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::visitChildrenVirtual): (WebCore::JSDOMWindowShell::visitChildren): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSJavaScriptAudioNodeCustom.cpp: (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual): (WebCore::JSJavaScriptAudioNode::visitChildren): * bindings/js/JSMessageChannelCustom.cpp: (WebCore::JSMessageChannel::visitChildrenVirtual): (WebCore::JSMessageChannel::visitChildren): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::visitChildrenVirtual): (WebCore::JSMessagePort::visitChildren): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::visitChildrenVirtual): (WebCore::JSNamedNodeMap::visitChildren): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::visitChildrenVirtual): (WebCore::JSNode::visitChildren): * bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::visitChildrenVirtual): (WebCore::JSNodeFilter::visitChildren): * bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::visitChildrenVirtual): (WebCore::JSNodeIterator::visitChildren): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::visitChildrenVirtual): (WebCore::JSSVGElementInstance::visitChildren): * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorker::visitChildrenVirtual): (WebCore::JSSharedWorker::visitChildren): * bindings/js/JSStyleSheetCustom.cpp: (WebCore::JSStyleSheet::visitChildrenVirtual): (WebCore::JSStyleSheet::visitChildren): * bindings/js/JSTreeWalkerCustom.cpp: (WebCore::JSTreeWalker::visitChildrenVirtual): (WebCore::JSTreeWalker::visitChildren): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::visitChildrenVirtual): (WebCore::JSWebGLRenderingContext::visitChildren): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::visitChildrenVirtual): (WebCore::JSWorkerContext::visitChildren): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::visitChildrenVirtual): (WebCore::JSXMLHttpRequest::visitChildren): * bindings/js/JSXPathResultCustom.cpp: (WebCore::JSXPathResult::visitChildrenVirtual): (WebCore::JSXPathResult::visitChildren): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::visitChildrenVirtual): (WebCore::JSTestObj::visitChildren): * bindings/scripts/test/JS/JSTestObj.h: * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual): (JSC::Bindings::QtRuntimeObject::visitChildren): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual): (JSC::Bindings::QtRuntimeMetaMethod::visitChildren): * bridge/qt/qt_runtime.h: * workers/WorkerContext.h: <<<<<<< .mine 2011-09-27 Mark Hahnenberg Add static version of JSCell::getCallData https://bugs.webkit.org/show_bug.cgi?id=68741 Reviewed by Darin Adler. No new tests. In this patch we just extract the bodies of the virtual getCallData methods throughout the JSCell inheritance hierarchy out into static methods, which are now called from the virtual methods. This is an intermediate step in trying to move the virtual-ness of getCallData into our own method table stored in ClassInfo. We need to convert the methods to static methods because static methods can be represented as function pointers rather than pointers to member functions, and function pointers are smaller and faster to call than pointers to member functions. * WebCore.exp.in: * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::getCallDataVirtual): (WebCore::JSHTMLAllCollection::getCallData): * bindings/js/JSHTMLAppletElementCustom.cpp: (WebCore::JSHTMLAppletElement::getCallDataVirtual): (WebCore::JSHTMLAppletElement::getCallData): * bindings/js/JSHTMLEmbedElementCustom.cpp: (WebCore::JSHTMLEmbedElement::getCallDataVirtual): (WebCore::JSHTMLEmbedElement::getCallData): * bindings/js/JSHTMLObjectElementCustom.cpp: (WebCore::JSHTMLObjectElement::getCallDataVirtual): (WebCore::JSHTMLObjectElement::getCallData): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::evaluate): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetCallData): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::getCallDataVirtual): (JSC::Bindings::ObjcFallbackObjectImp::getCallData): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::getCallDataVirtual): (JSC::Bindings::QtRuntimeMetaMethod::getCallData): (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::getCallDataVirtual): (JSC::Bindings::QtRuntimeConnectionMethod::getCallData): (JSC::Bindings::isJavaScriptFunction): * bridge/qt/qt_runtime.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::getCallDataVirtual): (JSC::RuntimeMethod::getCallData): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::getCallDataVirtual): (JSC::Bindings::RuntimeObject::getCallData): * bridge/runtime_object.h: ======= 2011-09-27 Dean Jackson Unreviewed. Remove duplicate FilterOperation{s}.h that were accidentally added to the top level of the Xcode project. * WebCore.xcodeproj/project.pbxproj: >>>>>>> .r96163 2011-09-27 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68940 Narrow the float/lines pagination heuristic to only kick in if the previous line broke cleanly and if the floats are occurring at the start of the line. Reviewed by Dan Bernstein. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::positionNewFloatOnLine): 2011-09-27 James Robinson Add a mechanism to test for the compositing tree mutated during painting https://bugs.webkit.org/show_bug.cgi?id=68738 Reviewed by Adam Barth. Sets a static bool during GraphicsLayer::paintGraphicsLayerContents and ASSERT()s that we never create or destroy a GraphicsLayer inside this function. Painting should never mutate the GraphicsLayer tree. Test: compositing/video/video-with-invalid-source.html * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): (WebCore::GraphicsLayer::~GraphicsLayer): (WebCore::GraphicsLayer::paintGraphicsLayerContents): 2011-09-27 Ojan Vafai take padding/border on flexbox into account with direction:rtl https://bugs.webkit.org/show_bug.cgi?id=68846 Reviewed by David Hyatt. Use the logicalWidth of the flexbox instead of it's availableLogicalWidth so that we include the flexbox's border and padding. Also, change all uses of availableLogicalWidth to contentLogicalWidth. The former takes multi-column into account. Multi-column flexboxes don't make any sense, so there's no point in calling availableLogicalWidth. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::flowAwareLogicalWidth): (WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth): (WebCore::RenderFlexibleBox::computePreferredLogicalWidth): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection): (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): * rendering/RenderFlexibleBox.h: 2011-09-27 Sheriff Bot Unreviewed, rolling out r96139. http://trac.webkit.org/changeset/96139 https://bugs.webkit.org/show_bug.cgi?id=68933 Broke table-percent-height.html on Mac bots (Requested by mwenge2 on #webkit). * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: 2011-09-27 Tim Horton REGRESSION(65665): Pattern size being clamped to SVG size can prevent transformed elements from being fully covered by userSpaceOnUse patterns https://bugs.webkit.org/show_bug.cgi?id=67700 Reviewed by Darin Adler. Clamp all resources to the same size, 4096x4096 (arbitrarily chosen), instead of to the size of the element. This fixes the case where a transformed element displays part of a resource outside of the size of the element. When drawing an oversized pattern into its tile image, scale the content down to fit. When drawing the tile image to the screen, scale it back up to fit the expected area. This will cause pixelation when patterns are over the 4k limit. Tests: svg/custom/transformed-pattern-clamp-svg-root.svg, svg/custom/oversized-pattern-scale.svg * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/RenderSVGResourcePattern.h: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect): * rendering/svg/SVGImageBufferTools.h: 2011-09-27 Dan Bernstein Assertion failure in RenderLayer::paintPaginatedChildLayer() Reviewed by Simon Fraser. Test: fast/dynamic/layer-no-longer-paginated.html FrameView::layout() calls adjustViewSize() before calling RenderLayer::updateLayerPositions(). The former may trigger painting with a layer tree that is not entirely up-to-date. Specifically, the isPaginated() state of a layer may be incorrect, leading to the assertion in this bug. Instead of asserting, return early and count on the upcoming updateLayerPositions() to repaint as needed. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintPaginatedChildLayer): Replaced the assertion with an early return. 2011-09-27 Ojan Vafai offsetTop/offsetLeft return the wrong values for horizontal-bt/vertical-rl writing modes https://bugs.webkit.org/show_bug.cgi?id=68304 Reviewed by David Hyatt. When grabbing the x/y values of the RenderBox, we need to take writing mode flipping into account. Test: fast/dom/offset-position-writing-modes.html * rendering/RenderBox.cpp: (WebCore::RenderBox::locationIncludingFlipping): * rendering/RenderBox.h: (WebCore::RenderBox::yFlippedForWritingMode): (WebCore::RenderBox::xFlippedForWritingMode): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::offsetLeft): (WebCore::RenderBoxModelObject::offsetTop): 2011-09-27 Tim Horton Rapidly refreshing a feMorphology[erode] with r=0 can sometimes cause display corruption https://bugs.webkit.org/show_bug.cgi?id=68816 Reviewed by Simon Fraser. If a filter returns without writing into its result buffer, make sure to return an cleared buffer. Test: svg/filters/feMorphology-zero-radius.svg * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::apply): * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::apply): 2011-09-27 Ryosuke Niwa CompositeEditCommand::prune should remove subtree at once https://bugs.webkit.org/show_bug.cgi?id=68866 Reviewed by Darin Adler. Extracted the logic to find the highest ancestor to remove as highestNodeToRemoveInPruning from prune. This reduces the number of node removals from O(n) to O(1) where n is the depth of the tree. * editing/CompositeEditCommand.cpp: (WebCore::hasARenderedDescendant): Takes excludedNode in addition to node. excludedNode is used to ignore the child node from which we climbed up the tree in highestNodeToRemoveInPruning. (WebCore::highestNodeToRemoveInPruning): Extracted from prune. (WebCore::CompositeEditCommand::prune): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): 2011-09-27 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68922 Paginated floats should not grow the height of a block when they don't end up being tied to a line. Floats encountered in skipLeadingWhitespace that paginate can't immediately grow the height of the block, since there may not end up being any actual line content. We only want to push the height of the block down if we have actual line content that we want to keep with the float. Make positionNewFloatOnLine check if the line is empty or not, and if it is, it just puts the desired pagination strut into LineInfo. If and when actual line content is encountered and setEmpty becomes false, we'll grow the block height then. Reviewed by Dan Bernstein. Added fast/multicol/float-paginate-empty-lines.html and fast/regions/webkit-flow-double-pagination-float-push.html. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::LineWidth): (WebCore::LineWidth::fitsOnLine): (WebCore::LineWidth::currentWidth): (WebCore::LineWidth::uncommittedWidth): (WebCore::LineWidth::committedWidth): (WebCore::LineWidth::availableWidth): (WebCore::LineWidth::addUncommittedWidth): (WebCore::LineWidth::commit): (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight): (WebCore::LineWidth::updateAvailableWidth): (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): (WebCore::LineWidth::applyOverhang): (WebCore::LineWidth::fitBelowFloats): (WebCore::LineInfo::LineInfo): (WebCore::LineInfo::floatPaginationStrut): (WebCore::LineInfo::setEmpty): (WebCore::LineInfo::setFloatPaginationStrut): (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): (WebCore::RenderBlock::LineBreaker::nextLineBreak): (WebCore::RenderBlock::positionNewFloatOnLine): 2011-09-27 Dean Jackson Add 'filter' value to RenderStyle https://bugs.webkit.org/show_bug.cgi?id=68471 Reviewed by Simon Fraser. Add a filter property to RenderStyle when ENABLE(CSS_FILTERS) is turned on. Similar to -webkit-transform, -webkit-filter is a list of FilterOperations, each identifying what type of operation it is. This change simply adds the basic objects, it does not parse the property to generate the list. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FilterOperation.h: Added. (WebCore::FilterOperation::~FilterOperation): (WebCore::FilterOperation::operator!=): (WebCore::FilterOperation::getOperationType): (WebCore::FilterOperation::isSameType): (WebCore::FilterOperation::FilterOperation): (WebCore::ReferenceFilterOperation::create): (WebCore::ReferenceFilterOperation::reference): (WebCore::ReferenceFilterOperation::operator==): (WebCore::ReferenceFilterOperation::ReferenceFilterOperation): (WebCore::BasicColorMatrixFilterOperation::create): (WebCore::BasicColorMatrixFilterOperation::amount): (WebCore::BasicColorMatrixFilterOperation::operator==): (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation): (WebCore::BasicComponentTransferFilterOperation::create): (WebCore::BasicComponentTransferFilterOperation::amount): (WebCore::BasicComponentTransferFilterOperation::operator==): (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation): (WebCore::GammaFilterOperation::create): (WebCore::GammaFilterOperation::amplitude): (WebCore::GammaFilterOperation::exponent): (WebCore::GammaFilterOperation::offset): (WebCore::GammaFilterOperation::operator==): (WebCore::GammaFilterOperation::GammaFilterOperation): (WebCore::BlurFilterOperation::create): (WebCore::BlurFilterOperation::stdDeviationX): (WebCore::BlurFilterOperation::stdDeviationY): (WebCore::BlurFilterOperation::operator==): (WebCore::BlurFilterOperation::BlurFilterOperation): (WebCore::SharpenFilterOperation::create): (WebCore::SharpenFilterOperation::radius): (WebCore::SharpenFilterOperation::threshold): (WebCore::SharpenFilterOperation::amount): (WebCore::SharpenFilterOperation::operator==): (WebCore::SharpenFilterOperation::SharpenFilterOperation): (WebCore::DropShadowFilterOperation::create): (WebCore::DropShadowFilterOperation::shadow): (WebCore::DropShadowFilterOperation::operator==): (WebCore::DropShadowFilterOperation::DropShadowFilterOperation): * platform/graphics/filters/FilterOperations.cpp: Added. (WebCore::FilterOperations::FilterOperations): (WebCore::FilterOperations::operator==): * platform/graphics/filters/FilterOperations.h: Added. (WebCore::FilterOperations::operator!=): (WebCore::FilterOperations::clear): (WebCore::FilterOperations::operations): (WebCore::FilterOperations::size): (WebCore::FilterOperations::at): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::filter): (WebCore::InheritedFlags::hasFilter): (WebCore::InheritedFlags::setFilter): (WebCore::InheritedFlags::initialFilter): * rendering/style/StyleAllInOne.cpp: Added include of new StyleFilterData. * rendering/style/StyleFilterData.cpp: Added. (WebCore::StyleFilterData::StyleFilterData): (WebCore::StyleFilterData::operator==): * rendering/style/StyleFilterData.h: Added. (WebCore::StyleFilterData::create): (WebCore::StyleFilterData::copy): (WebCore::StyleFilterData::operator!=): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: New filter DataRef. 2011-09-27 James Robinson [chromium] LayerRenderChromium asserts about leaking textures. https://bugs.webkit.org/show_bug.cgi?id=68190 Reviewed by Kenneth Russell. This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures. This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format enum type, making it more testable. It also allows us to track the allocations by subclassing TextureAllocator to make sure we aren't leaking any textures. * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator): (WebCore::LayerRendererChromium::contentsTextureAllocator): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::memoryUseBytes): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::evictAndDeleteAllTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureAllocator::~TextureAllocator): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added. (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h. (WebCore::TrackingTextureAllocator::create): (WebCore::TrackingTextureAllocator::currentMemoryUseBytes): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::updateTexture): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread): (WebCore::CCLayerTreeHost::commitToOnCCThread): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): 2011-06-28 Robert Hogan Reviewed by David Hyatt. Replaced elements squeezed when width is specified as percentage inside a table with Auto layout https://bugs.webkit.org/show_bug.cgi?id=29447 If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height. Test: fast/replaced/table-percent-width.html * rendering/RenderBox.cpp: (WebCore::avoidSqueezingWidth): (WebCore::avoidSqueezingHeight): (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): * rendering/RenderBox.h: 2011-09-27 Simon Fraser https://bugs.webkit.org/show_bug.cgi?id=67858 Roll r96070 back in now that the crash has been fixed in r96130. Reviewed by Darin Adler. When non-overlay scrollbars are hidden on a composited iframe, nothing invalidated the scrollbar areas or the scroll corner, so the scrollbars appear to remain. Fix by invalidating the scrollbars and scroll corner when they are removed. Invalidation on scrollbar creation appears to happen via updating the scrollbar style. Tested by compositing/iframes/repaint-after-losing-scrollbars.html which no longer shows stale scrollbars when run manually, even though the green squares are missing from the pixel result (bug 67878). * page/FrameView.cpp: (WebCore::FrameView::updateScrollCorner): Pass the corner rect into invalidateScrollCorner(). * platform/ScrollView.cpp: (WebCore::ScrollView::setHasHorizontalScrollbar): Invalidate the scrollbar area if hiding it. (WebCore::ScrollView::setHasVerticalScrollbar): Ditto. (WebCore::ScrollView::updateScrollbars): In the case where both scrollbars are going away, compute the scroll corner rect while we still have scrollbars, and then invalidate it explicitly. (updateScrollCorner() doesn't, because it doesn't have access to the old corner rect.) * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::invalidateScrollCorner): Pass the rect in, because we can't compute it in the case where the scrollbars are going away. * platform/ScrollableArea.h: Pass in a rect to invalidateScrollCorner(), which matches invalidateScrollbar(). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::destroyRootLayer): Pass the corner rect into invalidateScrollCorner(). * rendering/RenderScrollbarPart.cpp: Ditto. (WebCore::RenderScrollbarPart::imageChanged): Ditto. 2011-09-27 Mihai Parparita Fix Chromium Mac build after r96130. * page/FrameView.cpp: (WebCore::FrameView::layerForOverhangAreas): 2011-09-27 Kaustubh Atrawalkar Autofocus on readonly inputs does not focus the element. https://bugs.webkit.org/show_bug.cgi?id=24092 Reviewed by Ryosuke Niwa. Readonly input elements should be autofocusable. Removed the check. Tests: fast/forms/autofocus-readonly-attribute.html * html/HTMLFormControlElement.cpp: (WebCore::shouldAutofocus): 2011-09-27 Simon Fraser Clean up how FrameView accesses the RenderView https://bugs.webkit.org/show_bug.cgi?id=68914 Reviewed by Sam Weinig. Clean up how FrameView accesses the content renderer of its frame. Previously, this was done in several different ways, only some of which did null-checking. Use an inline method to avoid having to expose Frame in the header. Standardize the terminology to use 'root' for this RenderView. * page/FrameView.cpp: (WebCore::rootRenderer): (WebCore::FrameView::setFrameRect): (WebCore::FrameView::adjustViewSize): (WebCore::FrameView::updateCompositingLayers): (WebCore::FrameView::clearBackingStores): (WebCore::FrameView::restoreBackingStores): (WebCore::FrameView::layerForHorizontalScrollbar): (WebCore::FrameView::layerForVerticalScrollbar): (WebCore::FrameView::layerForScrollCorner): (WebCore::FrameView::layerForOverhangAreas): (WebCore::FrameView::syncCompositingStateForThisFrame): (WebCore::FrameView::hasCompositedContent): (WebCore::FrameView::enterCompositingMode): (WebCore::FrameView::isSoftwareRenderable): (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): (WebCore::FrameView::layout): (WebCore::FrameView::embeddedContentBox): (WebCore::FrameView::contentsInCompositedLayer): (WebCore::FrameView::scrollContentsFastPath): (WebCore::FrameView::scrollContentsSlowPath): (WebCore::FrameView::maintainScrollPositionAtAnchor): (WebCore::FrameView::scrollPositionChanged): (WebCore::FrameView::repaintFixedElementsAfterScrolling): (WebCore::FrameView::visibleContentsResized): (WebCore::FrameView::scheduleRelayoutOfSubtree): (WebCore::FrameView::needsLayout): (WebCore::FrameView::setNeedsLayout): (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::updateControlTints): (WebCore::FrameView::paintContents): (WebCore::FrameView::forceLayoutForPagination): (WebCore::FrameView::adjustPageHeightDeprecated): (WebCore::FrameView::isVerticalDocument): (WebCore::FrameView::isFlippedDocument): 2011-09-27 Dominic Mazzoni AXObjectCache cleared unnecessarily when non-top Document is detached. https://bugs.webkit.org/show_bug.cgi?id=68636 Reviewed by Chris Fleizach. Test: accessibility/deleting-iframe-destroys-axcache.html * dom/Document.cpp: (WebCore::Document::attach): (WebCore::Document::detach): 2011-09-27 Sheriff Bot Unreviewed, rolling out r96108, r96111, r96113, and r96116. http://trac.webkit.org/changeset/96108 http://trac.webkit.org/changeset/96111 http://trac.webkit.org/changeset/96113 http://trac.webkit.org/changeset/96116 https://bugs.webkit.org/show_bug.cgi?id=68913 Wait for working Qt5 (Requested by ossy on #webkit). * WebCore.pri: * platform/graphics/qt/GraphicsLayerQt.cpp: 2011-09-27 Csaba Osztrogonác Fix ENABLE(SQL_DATABASE)=0 build after r95919 https://bugs.webkit.org/show_bug.cgi?id=68902 r95919 enabled OFFLINE_WEB_APPLICATIONS by default and it needs SQLite stuff even if ENABLE_SQL_DATABASE=0. Reviewed by Adam Barth. * platform/sql/SQLiteAuthorizer.cpp: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteFileSystem.cpp: * platform/sql/SQLiteStatement.cpp: * platform/sql/SQLiteTransaction.cpp: * storage/DatabaseAuthorizer.cpp: 2011-09-27 Julien Chaffraix Crash because CSSPrimitiveValue::computeLengthDouble assumes fontMetrics are available https://bugs.webkit.org/show_bug.cgi?id=66291 Reviewed by Darin Adler. Test: fast/canvas/crash-set-font.html This is Yet Another Missing updateFont (similar to bug 57756 and likely others). Here the issue is that applying one of the font properties could mutate the parent style's font if m_parentStyle == m_style. We would then query the newly created font when applying CSSPropertyFontSize, which has no font fallback list as Font::update was never called. The right fix would be to refactor of how we handle fonts to avoid such manual updates (see bug 62390). Until this happens, it is better not to crash. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Added updateFont() here as the fonts could have been mutated by the previous property change. Also added a comment explaining why it is safe to do it this way. 2011-09-27 No'am Rosenthal [Texmap] Code cleanup: remove unused boundingRect/visibleRect calculations https://bugs.webkit.org/show_bug.cgi?id=68897 Reviewed by Andreas Kling. No new functionality so no new tests. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::computeAllTransforms): (WebCore::TextureMapperNode::computeTiles): (WebCore::TextureMapperNode::syncCompositingState): * platform/graphics/texmap/TextureMapperNode.h: 2011-09-27 No'am Rosenthal [Texmap][Qt] Refactor texture-upload to allow direct chunk update https://bugs.webkit.org/show_bug.cgi?id=68808 Add a function to BitmapTexture for direct pixel updates. Modify BitmapTextureGL::endPaint to use that function. Since the BGRA to RGBA swizzling is done inside that function, there's no need for the RGBA32PremultipliedBuffer class to contain such function. Also, RGBA32PremultipliedBuffer was renamed to BGRA32PremultipliedBuffer, correcting an old mistake. Reviewed by Andreas Kling. No new tests. Existing tests in LayoutTests/compositing test this. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::beginPaint): (WebCore::BitmapTextureGL::endPaint): (WebCore::swizzleBGRAToRGBA): (WebCore::BitmapTextureGL::updateContents): * platform/graphics/opengl/TextureMapperGL.h: (WebCore::BGRA32PremultimpliedBuffer::~BGRA32PremultimpliedBuffer): * platform/graphics/qt/TextureMapperQt.cpp: (WebCore::BitmapTextureQt::updateContents): (WebCore::BGRA32PremultimpliedBufferQt::data): (WebCore::BGRA32PremultimpliedBuffer::create): * platform/graphics/qt/TextureMapperQt.h: * platform/graphics/texmap/TextureMapper.h: 2011-09-23 Tor Arne Vestbø [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi QWidget and friends now live in the QtWidgets library. We update includes in implementation files and private headers to us the non-module-prefixed path, and leave the lookup for the include path. For public headers we have to ifdef the includes as the user might now have the modules we need in his QT config. Finally, QSGCanvas is no longer a QWidget but a QWindow, so we have to update our code and use windowHandle() for setting the parent relationships. https://bugs.webkit.org/show_bug.cgi?id=68687 Reviewed by Andreas Kling. * WebCore.pri: * platform/graphics/qt/GraphicsLayerQt.cpp: 2011-09-27 Pavel Feldman Web Inspector: split DOM.attributesUpdated into attributeModified and attributeRemoved. Send attribute name and value within the event. https://bugs.webkit.org/show_bug.cgi?id=68613 Reviewed by Yury Semikhatsky. * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::removeAttribute): * inspector/Inspector.draft-01.json: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didModifyDOMAttr): (WebCore::InspectorDOMAgent::didRemoveDOMAttr): * inspector/InspectorDOMAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl): (WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didModifyDOMAttr): (WebCore::InspectorInstrumentation::didRemoveDOMAttr): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype._addAttribute): (WebInspector.DOMNode.prototype._setAttribute): (WebInspector.DOMNode.prototype._removeAttribute): (WebInspector.DOMAgent.prototype._attributeModified): (WebInspector.DOMAgent.prototype._attributeRemoved): (WebInspector.DOMAgent.prototype._inlineStyleInvalidated): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMDispatcher.prototype.attributeModified): (WebInspector.DOMDispatcher.prototype.attributeRemoved): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._attributesUpdated): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane): (WebInspector.MetricsSidebarPane.prototype._attributesUpdated): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype._attributesModified): (WebInspector.StylesSidebarPane.prototype._attributesRemoved): (WebInspector.StylesSidebarPane.prototype._styleInvalidated): (WebInspector.StylePropertyTreeElement.prototype.event): (WebInspector.StylePropertyTreeElement.prototype): * inspector/validate-protocol-compatibility: 2011-09-27 Sheriff Bot Unreviewed, rolling out r96070 and r96075. http://trac.webkit.org/changeset/96070 http://trac.webkit.org/changeset/96075 https://bugs.webkit.org/show_bug.cgi?id=68893 WK2 tests started crashing after r96070 for SL and Qt (Requested by torarne on #webkit). * page/FrameView.cpp: (WebCore::FrameView::updateScrollCorner): * platform/ScrollView.cpp: (WebCore::ScrollView::setHasHorizontalScrollbar): (WebCore::ScrollView::setHasVerticalScrollbar): (WebCore::ScrollView::updateScrollbars): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::invalidateScrollCorner): * platform/ScrollableArea.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::destroyRootLayer): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::imageChanged): 2011-09-27 Andrey Kosyakov Web Inspector: JS exception upon clicking on "Word Wrap" checkbox in Settings screen https://bugs.webkit.org/show_bug.cgi?id=68888 Reviewed by Pavel Feldman. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged): 2011-09-21 Pavel Podivilov Web Inspector: migrate RawSourceCode clients to SourceMapping class. https://bugs.webkit.org/show_bug.cgi?id=68524 Clients should use uiSourceCode(), rawLocationToUILocation(), uiLocationToRawLocation() methods of SourceMapping class. Initially, RawSourceCode may not have associated SourceMapping, so it is natural to extract this methods and associated state to a separate class. Reviewed by Yury Semikhatsky. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.PresentationCallFrame.prototype.get url): (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated): (WebInspector.PresentationCallFrame.prototype.sourceLine): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.get sourceMapping): 2011-09-27 Vineet Chaudhary wrap attribute of textarea element cannot be accessed by JavaScript. https://bugs.webkit.org/show_bug.cgi?id=68592 Reviewed by Kent Tamura. Added JS interface for wrap attribute to HTMLTextAreaElement.idl. Test: fast/forms/textarea-wrap-attribute.html * html/HTMLTextAreaElement.idl: 2011-09-27 Xan Lopez [GTK] Add compatibility methods for DOM bindings https://bugs.webkit.org/show_bug.cgi?id=68884 Reviewed by Philippe Normand. Add compatibility methods for our DOM bindings. * bindings/gobject/WebKitDOMCustom.cpp: (webkit_dom_blob_slice): alias to the new method name. (webkit_dom_html_form_element_dispatch_form_change): this was removed from WebCore, so just print a warning about it. (webkit_dom_html_form_element_dispatch_form_input): ditto. * bindings/gobject/WebKitDOMCustom.h: 2011-09-27 Ryosuke Niwa Encapsulate m_firstNodeInserted and m_lastLeafInserted in node insertion logic https://bugs.webkit.org/show_bug.cgi?id=68875 Reviewed by Kent Tamura. Added InsertedNode class inside ReplaceSelection to encapsulate m_firstNodeInserted and m_lastLeafInserted. Deployed it in removeRedundantStylesAndKeepStyleSpanInline, doApply, and insertAsListItems of ReplaceSelectionCommand. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): (WebCore::DeleteSelectionCommand::handleGeneralDelete): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::insertAsListItems): * editing/ReplaceSelectionCommand.h: (WebCore::ReplaceSelectionCommand::InsertedNodes::respondToNodeInsertion): (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode): (WebCore::ReplaceSelectionCommand::InsertedNodes::firstNodeInserted): (WebCore::ReplaceSelectionCommand::InsertedNodes::lastLeafInserted): (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf): * editing/htmlediting.cpp: (WebCore::updatePositionForNodeRemoval): Moved from DeleteSelectionCommand.cpp. * editing/htmlediting.h: 2011-09-27 Arun Patole Audio element doesn't emit the 'playing' event every time it starts playing, after it has finished playing. https://bugs.webkit.org/show_bug.cgi?id=60972 Reviewed by Philippe Normand. The paused attribute should be set to true and the media element should emit a 'paused' at the end of playback. WHATWG revision r6562: http://html5.org/tools/web-apps-tracker?from=6561&to=6562 Test: media/media-element-play-after-eos.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): set m_paused to true and schedule 'pause' event when playback ended. 2011-09-27 Rakesh KN xxxxxxxlyyyyyyy". In order to avoid the two rubies overlapping with each other, this patch overhangs the ruby by no more than half the ruby font size and no more than half the width of the neighboring text. Tests: fast/ruby/overhang-horizontal-no-overlap1.html fast/ruby/overhang-horizontal-no-overlap2.html fast/ruby/overhang-vertical-no-overlap1.html fast/ruby/overhang-vertical-no-overlap2.html * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::getOverhang): Calculates the width of ruby overhanging. 2011-09-16 Sheriff Bot Unreviewed, rolling out r95304. http://trac.webkit.org/changeset/95304 https://bugs.webkit.org/show_bug.cgi?id=68299 Broke GTK+ builds. It pulls derived headers into main.c (Requested by rniwa on #webkit). * bindings/scripts/CodeGeneratorGObject.pm: (): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2011-09-16 Shawn Singh Re-named isRootLayer to isNonCompositedContent because that is what the flag actually means. https://bugs.webkit.org/show_bug.cgi?id=68214 Reviewed by James Robinson. Code cleanup towards unit testing. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setIsNonCompositedContent): (WebCore::LayerChromium::isNonCompositedContent): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::NonCompositedContentHost): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setIsNonCompositedContent): (WebCore::CCLayerImpl::isNonCompositedContent): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-09-16 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by Sam Weinig. Add a new setting to control whether the mock scrollbar theme is used. This is a global setting, so that it can be set without having to access a specific Settings object. * page/Settings.h: (WebCore::Settings::setMockScrollbarsEnabled): (WebCore::Settings::mockScrollbarsEnabled): 2011-09-16 Ben Wells Large canvas fills should not crash or create unnecessarily large image buffers https://bugs.webkit.org/show_bug.cgi?id=67988 When using source-in, destination-in, source-out, or destination-atop a temporary buffer is created. This buffer only needs to be big enough to cover the intersection of the path and the canvas. If the area of intersection between the fill and the canvas is empty the canvas is completely cleared and a temporary buffer is not used. This change also adds some null checks for failures to create contexts or buffers. Reviewed by Darin Adler. Test: fast/canvas/canvas-large-fills.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-16 Shawn Singh Remove default NULL argument in LayerChromium::create(). https://bugs.webkit.org/show_bug.cgi?id=68211 Reviewed by James Robinson. Code cleanup related to creating unit testing. * platform/graphics/chromium/LayerChromium.h: 2011-09-16 Adrienne Walker [chromium] Move quad drawing code from LayerChromium to LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=68272 Reviewed by James Robinson. All the OpenGL code is in LayerRendererChromium and the CCLayerImpl tree, so move the static drawTexturedQuad/toGLMatrix functions to LayerRendererChromium, where they really belong. Just moving code around. Tested by existing compositor tests. * platform/graphics/chromium/LayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::toGLMatrix): (WebCore::LayerRendererChromium::drawTexturedQuad): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::drawDebugBorder): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): 2011-09-16 Shawn Singh Fixed const correctness on accessors in LayerChromium https://bugs.webkit.org/show_bug.cgi?id=68210 Reviewed by James Robinson. Code cleanup related to creating unit testing. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::preserves3D): (WebCore::LayerChromium::replicaLayer): 2011-09-14 Ryosuke Niwa Deleting line break before h1 converts h1 to span https://bugs.webkit.org/show_bug.cgi?id=45784 Reviewed by Kenneth Rohde Christiansen. Fixed the bug by treating h1 and other elements that retain structure like Mail blockquote. We already had a logic to overriding styles of merged paragraphs by Mail blockquote so just extend this logic for h1-h6, pre, etc... Tests: editing/deleting/merge-paragraph-from-address.html editing/deleting/merge-paragraph-from-h6-with-style.html editing/deleting/merge-paragraph-from-h6.html editing/deleting/merge-paragraph-from-listing.html editing/deleting/merge-paragraph-into-h1-with-style.html editing/deleting/merge-paragraph-into-h1.html editing/deleting/merge-paragraph-into-pre.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * editing/markup.cpp: (WebCore::isBlockNodeToRetainAppearance): Extracted from ancestorToRetainStructureAndAppearance. (WebCore::StyledMarkupAccumulator::serializeNodes): (WebCore::ancestorToRetainStructureAndAppearance): * editing/markup.h: 2011-09-16 Max Perepelitsyn Set but not used variables cleanup (gcc 4.6) https://bugs.webkit.org/show_bug.cgi?id=68157 Reviewed by Darin Adler. * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::process): * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaButton): 2011-09-16 Geoffrey Garen Removed undetectable style.filter. Reviewed by Sam Weinig. This feature was added in http://trac.webkit.org/changeset/15557 to support housingmaps.com. But housingmaps.com no longer needs this hack, we don't know of other websites that need it, and we don't know of any other browsers that have implemented this feature. * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h: Removed. * WebCore.order: * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): 2011-09-16 Adam Barth Update JSC results to account for intrinsics change. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 2011-09-16 Sheriff Bot Unreviewed, rolling out r95312. http://trac.webkit.org/changeset/95312 https://bugs.webkit.org/show_bug.cgi?id=68277 It's innocent, innocent I tell you! (Requested by jamesr_ on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Sheriff Bot Unreviewed, rolling out r95309. http://trac.webkit.org/changeset/95309 https://bugs.webkit.org/show_bug.cgi?id=68271 Broke many chromium gpu tests. (Requested by dave_levin on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Filip Pizlo DFG JIT should inline Math.abs https://bugs.webkit.org/show_bug.cgi?id=68227 Reviewed by Oliver Hunt. Added JavaScriptCore/dfg to include path path. Changed the bindings scripts to handle the presence of intrinsics. * CMakeLists.txt: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHashTable): 2011-09-16 Iain Merrick [chromium] Fix CCLayerTreeHostTest https://bugs.webkit.org/show_bug.cgi?id=67418 This is a minimal set of changes to get CCLayerTreeHostTest compiling, running and passing with USE_THREADED_COMPOSITING enabled. Reviewed by James Robinson. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::createLayerTreeHostImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Sheriff Bot Unreviewed, rolling out r95227. http://trac.webkit.org/changeset/95227 https://bugs.webkit.org/show_bug.cgi?id=68262 Broke a bunch of SVG tests (Requested by andersca on #webkit). * platform/ScrollView.cpp: (WebCore::ScrollView::contentsSize): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformContentsSize): * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformContentsSize): 2011-09-16 James Simonsen Fix HTML5 parser's adoption agency algorithm to reparent correctly https://bugs.webkit.org/show_bug.cgi?id=68147 Reviewed by Eric Seidel. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-09-16 Adam Barth CodeGeneratorGObject should use C++ style comments for ENABLE guards https://bugs.webkit.org/show_bug.cgi?id=68256 Reviewed by Darin Adler. This patch should have not behavioral effect. It just cleans up the GObject code generator to use C++-style comments for ENABLE guards and to use the usual comment style for license blocks. * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2011-09-16 Csaba Osztrogonác [Qt] REGRESSION(r95091) It made many tests flakey https://bugs.webkit.org/show_bug.cgi?id=68232 Unreviewed rolling out r95091 and followup patches. * English.lproj/localizedStrings.js: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willCallFunction): * inspector/InspectorTimelineAgent.cpp: * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-09-16 Abhishek Arya cachedFont not getting updated for inline SVG text. https://bugs.webkit.org/show_bug.cgi?id=68060 Reviewed by Nikolas Zimmermann. The cached scaledFont needs to be updated on every style set call. It is not similar to m_style which can get derived from parent's style and hence will get automatically updated on ancestor's style change. This is required, otherwise we will maintain stale font list in cached scaledFont when custom fonts are retired on Document::recalcStyle. Test: svg/text/text-style-recalc-crash.html * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::styleDidChange): (WebCore::RenderSVGInlineText::setStyle): * rendering/svg/RenderSVGInlineText.h: 2011-09-16 Antti Koivisto REGRESSION (r95052): SelectorChecker identifier filter not working https://bugs.webkit.org/show_bug.cgi?id=68244 Reviewed by Dan Bernstein. Missing &. * css/SelectorChecker.cpp: (WebCore::collectDescendantSelectorIdentifierHashes): 2011-09-16 Csaba Osztrogonác Unreviewed typo fix after r95271. * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: 2011-09-16 Andrey Kosyakov Web Inspector: [Extensions API] support extensions for remote inspector front-end https://bugs.webkit.org/show_bug.cgi?id=67840 Reviewed by Pavel Feldman. - Merge ExtensionCommon.js into ExtensionAPI.js - refactor building of extension API for better reuse - expose interface for extension registration * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (buildExtensionAPIInjectedScript): * inspector/front-end/ExtensionCommon.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): (WebInspector.ExtensionServer.prototype._buildExtensionAPIScript): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerExtension): (WebInspector.ExtensionServer.prototype._expandResourcePath): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-16 Ilya Tikhonovsky Web Inspector: change WebInspector.currentPanel getter/setter to functions. https://bugs.webkit.org/show_bug.cgi?id=68242 This is necessary for the panel switching performance tests. Reviewed by Pavel Feldman. * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished): (WebInspector.Drawer.prototype._animateDrawerHeight): (WebInspector.Drawer.prototype._statusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.switchToAndFocus): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchMatchesCount): (WebInspector.SearchController.prototype.updateCurrentMatchIndex): (WebInspector.SearchController.prototype.updateSearchLabel): (WebInspector.SearchController.prototype.handleShortcut): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.createPanelToolbarItem.onToolbarItemClicked): (WebInspector.Toolbar.createPanelToolbarItem): * inspector/front-end/inspector.js: (WebInspector.currentPanel): (WebInspector._updateFocusedNode): (WebInspector.windowResize): (WebInspector.documentKeyDown): (WebInspector.documentCanCopy): (WebInspector.documentCopy): (WebInspector.showPanel): (WebInspector.startUserInitiatedDebugging): (WebInspector.inspect): (WebInspector._showAnchorLocationInPanel): (WebInspector._toolbarItemClicked): (WebInspector.PanelHistory.prototype.goBack): (WebInspector.PanelHistory.prototype.goForward): 2011-09-15 Pavel Feldman Web Inspector: rename Console.clearConsoleMessages to Console.clearMessages, brush up console domain doc. https://bugs.webkit.org/show_bug.cgi?id=68165 Reviewed by Yury Semikhatsky. * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::clearConsoleMessages): * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::clearMessages): * inspector/InspectorConsoleAgent.h: * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype.requestClearMessages): 2011-09-16 Alejandro G. Castro Fix GTK build after r95245. * GNUmakefile.list.am: 2011-09-16 Leo Yang [Qt] Crash when dragging google maps. https://bugs.webkit.org/show_bug.cgi?id=68223 The custom image for a cursor might not be ready when WebKit trying to use it to construct the cursor in Qt porting. This patch is using arrow image to substitute the unready custom image. Reviewed by Adam Barth. Test: fast/css/crash-on-custom-cursor-when-loading.html * platform/qt/CursorQt.cpp: (WebCore::createCustomCursor): (WebCore::Cursor::ensurePlatformCursor): 2011-09-15 Adam Barth Rename ENABLE(DATABASE) to ENABLE(SQL_DATABASE) https://bugs.webkit.org/show_bug.cgi?id=68205 Reviewed by Eric Seidel. As discussed on webkit-dev. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * UseJSC.cmake: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::databaseId): * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSSQLTransactionSyncCustom.cpp: * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: * bindings/scripts/test/CPP/WebDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/JS/JSTestCallback.cpp: * bindings/scripts/test/JS/JSTestCallback.h: * bindings/scripts/test/ObjC/DOMTestCallback.mm: * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: * bindings/scripts/test/V8/V8TestCallback.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::databaseIdCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8SQLTransactionCustom.cpp: * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: * dom/Document.cpp: * dom/Document.h: * dom/ExceptionCode.cpp: (WebCore::getExceptionCodeDescription): * dom/ExceptionCode.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): * dom/ScriptExecutionContext.h: * features.pri: * history/PageCache.cpp: (WebCore::logCanCacheFrameDecision): (WebCore::PageCache::canCachePageContainingThisFrame): * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): (WebCore::InjectedScriptHost::disconnect): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::restoreInspectorStateFromCookie): * inspector/InspectorController.h: * inspector/InspectorDatabaseAgent.cpp: * inspector/InspectorDatabaseInstrumentation.h: * inspector/InspectorDatabaseResource.cpp: * inspector/InspectorDatabaseResource.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::InstrumentingAgents): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): * loader/EmptyClients.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/ChromeClient.h: * page/DOMWindow.cpp: * page/DOMWindow.h: * page/DOMWindow.idl: * platform/sql/SQLiteAuthorizer.cpp: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteFileSystem.cpp: * platform/sql/SQLiteStatement.cpp: * platform/sql/SQLiteTransaction.cpp: * storage/AbstractDatabase.cpp: * storage/AbstractDatabase.h: * storage/ChangeVersionWrapper.cpp: * storage/ChangeVersionWrapper.h: * storage/Database.cpp: * storage/Database.h: * storage/Database.idl: * storage/DatabaseAuthorizer.cpp: * storage/DatabaseCallback.h: * storage/DatabaseCallback.idl: * storage/DatabaseDetails.h: * storage/DatabaseSync.cpp: * storage/DatabaseSync.h: * storage/DatabaseSync.idl: * storage/DatabaseTask.cpp: * storage/DatabaseTask.h: * storage/DatabaseThread.cpp: * storage/DatabaseThread.h: * storage/DatabaseTracker.cpp: * storage/DatabaseTracker.h: * storage/DatabaseTrackerClient.h: * storage/OriginQuotaManager.cpp: * storage/OriginQuotaManager.h: * storage/OriginUsageRecord.cpp: * storage/OriginUsageRecord.h: * storage/SQLCallbackWrapper.h: * storage/SQLError.h: * storage/SQLError.idl: * storage/SQLException.h: * storage/SQLException.idl: * storage/SQLResultSet.cpp: * storage/SQLResultSet.h: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.cpp: * storage/SQLResultSetRowList.h: * storage/SQLResultSetRowList.idl: * storage/SQLStatement.cpp: * storage/SQLStatement.h: * storage/SQLStatementCallback.h: * storage/SQLStatementCallback.idl: * storage/SQLStatementErrorCallback.h: * storage/SQLStatementErrorCallback.idl: * storage/SQLStatementSync.cpp: * storage/SQLStatementSync.h: * storage/SQLTransaction.cpp: * storage/SQLTransaction.h: * storage/SQLTransaction.idl: * storage/SQLTransactionCallback.h: * storage/SQLTransactionCallback.idl: * storage/SQLTransactionClient.cpp: * storage/SQLTransactionClient.h: * storage/SQLTransactionCoordinator.cpp: * storage/SQLTransactionCoordinator.h: * storage/SQLTransactionErrorCallback.h: * storage/SQLTransactionErrorCallback.idl: * storage/SQLTransactionSync.cpp: * storage/SQLTransactionSync.h: * storage/SQLTransactionSync.idl: * storage/SQLTransactionSyncCallback.h: * storage/SQLTransactionSyncCallback.idl: * storage/chromium/DatabaseObserver.h: * storage/chromium/DatabaseTrackerChromium.cpp: * storage/chromium/QuotaTracker.cpp: * storage/chromium/QuotaTracker.h: * storage/chromium/SQLTransactionClientChromium.cpp: * workers/WorkerContext.cpp: * workers/WorkerContext.h: * workers/WorkerContext.idl: * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownStartTask::performTask): (WebCore::WorkerThread::stop): 2011-09-15 Alexandru Chiculita [CSSRegions] Regions should not slice line box rendering https://bugs.webkit.org/show_bug.cgi?id=66198 Created a new LayoutState constructor for the RenderFlowThread. It will set m_isPaginated to true and force a pageHeight if 1. The actual pageHeight is not used, because pageLogicalHeightForOffset will actually redirect the call to RenderFlowThread. Removed some of the duplicate code that calculated the page logical offset. Added new methods like logicalPageOffset, pageLogicalHeightForOffset, pageRemainingLogicalHeightForOffset. There are still some issues related to incremental layout and different region widths. Those issues will be addressed in different patches. Reviewed by David Hyatt. Tests: fast/regions/text-region-breaks.html fast/regions/text-region-split-horizontal-bt.html fast/regions/text-region-split-vertical-rl.html fast/regions/text-region-split-vertical.html fast/regions/text-region-split.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/LayoutState.h: (WebCore::LayoutState::LayoutState): (WebCore::LayoutState::isPaginated): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::nextPageLogicalTopExcludingBoundaryPoint): (WebCore::RenderBlock::nextPageLogicalTopIncludingBoundaryPoint): (WebCore::inNormalFlow): (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::logicalPageOffset): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::adjustLinePositionForPagination): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::regionLogicalHeightForLine): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): * rendering/RenderFlowThread.h: * rendering/RenderView.cpp: (WebCore::RenderView::pushLayoutState): * rendering/RenderView.h: (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): (WebCore::LayoutStateMaintainer::push): 2011-09-15 Kentaro Hara Implement a PopStateEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67977 Reviewed by Sam Weinig. Test: fast/events/constructors/pop-state-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the PopStateEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for PopStateEvent. * dom/PopStateEvent.cpp: (WebCore::PopStateEventInit::PopStateEventInit): (WebCore::PopStateEvent::PopStateEvent): (WebCore::PopStateEvent::create): * dom/PopStateEvent.h: Added a definition for PopStateEventInit. * dom/PopStateEvent.idl: Makes PopStateEvent constructible. 2011-09-15 Mihai Parparita Fragment navigations should interrupt a provisional load of a different document https://bugs.webkit.org/show_bug.cgi?id=64556 Reviewed by Adam Barth. Tests: http/tests/history/back-with-fragment-change.php http/tests/navigation/navigation-interrupted-by-fragment.html * loader/FrameLoader.cpp: Stop provisional load if a fragment commits. * loader/HistoryController.cpp: Don't commit the wrong provisional item. 2011-09-15 Adrienne Walker [chromium] Add temporary diagnostics for LayerTreeHost::commitTo crash https://bugs.webkit.org/show_bug.cgi?id=68204 Reviewed by James Robinson. Add CRASH calls to determine which assumptions are being violated. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): 2011-09-15 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (7/7) https://bugs.webkit.org/show_bug.cgi?id=68122 Reviewed by Geoffrey Garen. No new tests. Completed the seventh and final level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This consists of moving the finishCreation() method call into the create methods of the sixth level of the hierarchy as was done in previous patches. The special cases for JSAudioConstructor, JSOptionConstructor, and JSImageConstructor were also lumped in and given finishCreation() methods that are called in their create methods because we are at the end and want to avoid a trivial patch just for moving their finishCreation() methods from their constructor to their create method. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): (WebCore::JSAudioConstructor::finishCreation): * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::create): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): (WebCore::JSImageConstructor::finishCreation): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::create): * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): (WebCore::JSOptionConstructor::finishCreation): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::create): * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::JSWorkerContextBase): The bindings generation script was also changed to move the finishCreation() call into the create methods for descendants of JSWorkerContextBase and JSDOMWindowBase because those base classes had it removed from their constructors. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): (JavaRuntimeMethod::JavaRuntimeMethod): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): (ObjCRuntimeMethod::ObjCRuntimeMethod): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): (JSC::Bindings::QtRuntimeConnectionMethod::create): 2011-09-15 Kentaro Hara A single line must not be split into two pages. https://bugs.webkit.org/show_bug.cgi?id=65005 Reviewed by David Hyatt. When the document width of a page is overflowed, the last line of the page can be split into the next page. This is the regression caused by r88737. r88737 tried to fix rounding errors in rendering calculations by expanding and shrinking a page using one common method, resizePageRectsKeepingRatio(), but overlooked the case where a document width gets overflowed. This patch fixes the problem by also using resizePageRectsKeepingRatio() for the case where the document width gets overflowed. Test: printing/single-line-must-not-be-split-into-two-pages.html * WebCore.exp.in: Updated the signature of forceLayoutForPagination(). * page/Frame.cpp: (WebCore::Frame::setPrinting): Added a new argument |originalPageSize|, which is an original page size before being expanded or shrunk. * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): Uses resizePageRectsKeepingRatio() in the case where the document width gets overflowed. * page/FrameView.h: * page/PrintContext.cpp: (WebCore::PrintContext::begin): Passes an original page size to setPrinting(). (WebCore::PrintContext::end): Ditto. 2011-09-15 Sheriff Bot Unreviewed, rolling out r95243 and r95246. http://trac.webkit.org/changeset/95243 http://trac.webkit.org/changeset/95246 https://bugs.webkit.org/show_bug.cgi?id=68202 Broke the Windows build (Requested by smfr on #webkit). * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::hookCallback): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copy): * platform/win/StructuredExceptionHandlerSupressor.h: Removed. 2011-09-15 Simon Fraser Attempt to fix Windows build after r95243. * WebCore.vcproj/WebCore.vcproj: 2011-09-15 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel differences between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by James Robinson. Add new scrollbar theme, called ScrollbarThemeMock, for use in layout tests. The mock scrollbar simply draws a light gray box in the track, with a dark gray box for the thumb. Add ScrollbarThemeMock files to the build on all platforms. It isn't hooked up yet. * CMakeLists.txt: * CMakeListsEfl.txt: * CMakeListsWinCE.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarTheme::nativeTheme): * platform/mock/ScrollbarThemeMock.cpp: Added. (WebCore::ScrollbarThemeMock::trackRect): (WebCore::ScrollbarThemeMock::scrollbarThickness): (WebCore::ScrollbarThemeMock::paintTrackBackground): (WebCore::ScrollbarThemeMock::paintThumb): * platform/mock/ScrollbarThemeMock.h: Added. (WebCore::ScrollbarThemeMock::hasButtons): (WebCore::ScrollbarThemeMock::hasThumb): (WebCore::ScrollbarThemeMock::backButtonRect): (WebCore::ScrollbarThemeMock::forwardButtonRect): 2011-09-15 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67884 Delete button icon does not properly update when the device resolution changes dynamically -and corresponding- Reviewed by Darin Adler. In DeleteButtonController::deviceScaleFactorChanged(), if the delete button is currently showing, hide it and re-show it, forcing it to re-create the deletion UI. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::deviceScaleFactorChanged): * editing/DeleteButtonController.h: * editing/Editor.cpp: (WebCore::Editor::deviceScaleFactorChanged): * editing/Editor.h: Iterate through all of the frames and propagate the deviceScaleFactorChange() message to Editor. * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): 2011-09-15 Chris Marrin Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction https://bugs.webkit.org/show_bug.cgi?id=67510 Reviewed by Adam Roben. Another fix to take care of one last crash when running pause-crash.html. CACF can't deal with null valueFunctions, so avoid setting it when it doesn't exist. This also adds logic to the Windows Hook in LayerChangesFlusher to prevent it from catching the null pointer exception generated by the pause-crash.html test before this bug was fixed. Windows was ignoring the exception, so the testcase would appear to succeed, even though it should have crashed. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::hookCallback): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copy): * platform\win\StructuredExceptionHandlerSupressor.h: New file to encapsulate the exception handling supression. 2011-09-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=27579 Make sure that the border shorthand also resets border-image. Reviewed by Beth Dakin. Added fast/borders/border-image-reset-by-border-shorthand.html. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2011-09-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=50072 Make overflow clipping to border-radius work across layers. This patch makes painting work but does not attempt to fix hit testing. It also doesn't work when a composited layer is clipped by a non-composited ancestor. Add a new ClipRect class (used by ClipRects and RenderLayer) that is basically just tracking a rect and a border radius taint. At the time we set a clip, if the rectangle is listed as also being clipped by a radius, then we walk up the layer tree and push those inner border rounded rect clips for any overflow areas in the containing block chain. Reviewed by Beth Dakin. Added new tests in fast/clip. * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): * rendering/RenderLayer.cpp: (WebCore::inContainingBlockChain): (WebCore::RenderLayer::clipToRect): (WebCore::RenderLayer::restoreClip): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::backgroundClipRect): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::childrenClipRect): (WebCore::RenderLayer::selfClipRect): * rendering/RenderLayer.h: (WebCore::ClipRect::ClipRect): (WebCore::ClipRect::rect): (WebCore::ClipRect::setRect): (WebCore::ClipRect::hasRadius): (WebCore::ClipRect::setHasRadius): (WebCore::ClipRect::operator==): (WebCore::ClipRect::intersect): (WebCore::ClipRect::move): (WebCore::ClipRect::isEmpty): (WebCore::ClipRect::intersects): (WebCore::intersection): (WebCore::ClipRects::overflowClipRect): (WebCore::ClipRects::setOverflowClipRect): (WebCore::ClipRects::fixedClipRect): (WebCore::ClipRects::setFixedClipRect): (WebCore::ClipRects::posClipRect): (WebCore::ClipRects::setPosClipRect): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::clippedByAncestor): * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): 2011-09-15 Julien Chaffraix Crash in RenderBox::paintMaskImages due to a mask without an associated image https://bugs.webkit.org/show_bug.cgi?id=50151 Reviewed by Simon Fraser. Test: fast/css/empty-webkit-mask-crash.html The crash stems from the fact that FillLayer::hasImage would walk over the linked list of FillLayers and return true if one had an image. This means that hasImage() is true does not mean that image() is non-NULL on all FillLayers. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMaskImages): Simplify the logic by doing the hasImage() check up-front and properly check image() for each FillLayers. This has the nice benefit of changing the complexity from O(n^2) to O(n), which was what the code expected anyway. 2011-09-15 Eric Seidel Remove ENABLE(SVG_AS_IMAGE) since all major ports have it on by default https://bugs.webkit.org/show_bug.cgi?id=68182 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::createImage): 2011-09-15 Andy Estes Having an empty listener to beforeload events changes the behavior of other scripts https://bugs.webkit.org/show_bug.cgi?id=45586 Reviewed by Darin Adler. Test: fast/dom/beforeload/cached-image-before-load.html When loading a cached image after a beforeload handler has been installed on the document, ImageLoader would dispatch both the beforeload and load events asynchronously in such a way that caused load to fire first. Since a side effect of firing the beforeload event is to wire up the CachedImage to its associated RenderImage object, this work was not done by the time load fired, and scripts that queried renderer-dependent attributes of the image in an onload handler would get bogus values in return. Fix this by ensuring load fires after beforeload in the cached image case. * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Call setClient() after dispatching beforeload, since setClient() will dispatch the load event if the image is cached. 2011-09-15 Anders Carlsson Remove ScrollView::platformContentsSize https://bugs.webkit.org/show_bug.cgi?id=68188 Reviewed by Darin Adler. Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never have to ask the underlying platform scroll view for contents size since it should always just be equal to m_contentsSize. * platform/ScrollView.cpp: (WebCore::ScrollView::contentsSize): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: * platform/wx/ScrollViewWx.cpp: 2011-09-15 Jon Lee Submitting a form with target=_blank works only once https://bugs.webkit.org/show_bug.cgi?id=28633 Reviewed by Andy Estes. Test: fast/forms/submit-to-blank-multiple-times.html The call to reset the multiple form submission bool is pushed down from the mouseDown handler to handleMousePressEvent(), to include WK2 coverage, similar to keyEvent. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::keyEvent): clarified old FIXME comment. Both key events and mouse events may submit a form multiple times, but the call to reset the handler should probably be in another abstraction layer. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::mouseDown): 2011-09-15 Peter Rybin XMLDocumentParserQt.cpp incorrectly converts 0-based number into 1-based number https://bugs.webkit.org/show_bug.cgi?id=63540 ZeroBasedNumber/OneBasedNumber are used in more places, inconsistency in xml parser is fixed. Reviewed by Adam Barth. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::eventHandlerLineNumber): * dom/ScriptableDocumentParser.h: * dom/StyleElement.cpp: (WebCore::StyleElement::StyleElement): * dom/ViewportArguments.cpp: (WebCore::parserLineNumber): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::lineNumber): * html/parser/HTMLDocumentParser.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::buildInitiatorObject): * svg/SVGDocumentExtensions.cpp: (WebCore::parserLineNumber): * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::lineNumber): * xml/parser/NewXMLDocumentParser.h: * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::pushCurrentNode): * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::error): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): 2011-09-15 Peter Kasting Fix WebCore.gypi after r95130. Unreviewed, build fix. * WebCore.gypi: 2011-09-15 Eric Seidel Remove ENABLE_SVG_ANIMATION as all major ports have it on by default https://bugs.webkit.org/show_bug.cgi?id=68022 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: * page/DOMWindow.idl: * svg/svgtags.in: 2011-09-15 Matthew Delaney REGRESSION (Safari 5.1-r95043): Incorrect box-shadow offset https://bugs.webkit.org/show_bug.cgi?id=68041 Reviewed by Dan Bernstein. Test: fast/box-shadow/no-blur-multiple-offsets.html * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): Add hack back in for Lion if context is not accelerated. 2011-09-15 James Simonsen Ref protect HTMLObjectElement and HTMLEmbedElement while requesting plugins https://bugs.webkit.org/show_bug.cgi?id=68014 Reviewed by Adam Barth. Test: plugins/destroy-during-npp-new.html under valgrind plugins/destroy-during-npp-new-object-with-fallback-content.html under valgrind * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): 2011-09-15 Sam Weinig Experiment with removing ability to call a collection (except document.all) https://bugs.webkit.org/show_bug.cgi?id=67579 Reviewed by Anders Carlsson. At the request of the public-script-coord mailing list (specifically Brendan Eich, see http://lists.w3.org/Archives/Public/public-script-coord/2011JulSep/0360.html), this patch removes the ability to call a collection (either a NodeList or HTMLCollection, but not an HTMLAllCollection) as function, a syntax that we adopted to emulate IE. It is being landed to find out if there are any sites relying on this behavior of WebKit, or, if it is only used in IE only paths. If we find sites are breaking, it should be rolled out and we should inform the public-script-coord mailing list. * bindings/js/JSHTMLAllCollectionCustom.cpp: Update comment. * bindings/js/JSHTMLCollectionCustom.cpp: * bindings/js/JSNodeListCustom.cpp: Remove custom call code. * bindings/scripts/CodeGeneratorV8.pm: Add support for V8CustomCall. * dom/NodeList.idl: * html/HTMLCollection.idl: Remove CustomCall. 2011-09-15 Andreas Kling CanvasRenderingContext2D::State copy ctor should use initializer list. https://bugs.webkit.org/show_bug.cgi?id=68152 Reviewed by Darin Adler. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): 2011-09-15 Andreas Kling Don't bother calculating dirty rect for accelerated 2D canvases. https://bugs.webkit.org/show_bug.cgi?id=68158 Reviewed by Kenneth Rohde Christiansen. For accelerated CanvasRenderingContext2D, didDraw() simply calls out to RenderLayer::contentChanged(). Move this to the top of didDraw() so we don't waste time calculating a precise dirty rect. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::didDraw): 2011-09-15 Brian Salomon [Skia/Chrome] Cleanup unneeded code now that GrGLInterface is used to set GL ctx per GL call. https://bugs.webkit.org/show_bug.cgi?id=68096 Reviewed by Stephen White. This change removes PlatformContextSkia::makeGrContextCurrent now that GrGLInterface is used to set the context on every Skia GL call. Tested by every canvas layout test. * platform/graphics/chromium/FontLinux.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clearRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::drawFocusRing): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawLineForTextChecking): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::strokeRect): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::paintSkiaText): 2011-09-15 Peter Beverloo [Chromium] Make sure that the ARM NEON files build with -marm https://bugs.webkit.org/show_bug.cgi?id=68088 Simply adding the -marm cflag for OS=Android compiles results in it being overridden by an -mthumb cflag later in the project generating process. Therefore we should explicitly exclude -mthumb. Reviewed by Tony Gentilcore. * WebCore.gyp/WebCore.gyp: 2011-09-15 Keishi Hattori [chromium] Build fix: Remove use of GraphicsContext::setIsAcceleratedContext r95174 introduced GraphicsContext::setIsAcceleratedContext into Skia code and caused chromium builds to fail. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): 2011-09-15 Yuta Kitamura ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. https://bugs.webkit.org/show_bug.cgi?id=67908 Reviewed by David Levin. Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector. ThreadableWebSocketChannelClientWrapper is derived from ThreadSafeRefCounted. It may be destroyed on different threads, which will affect String's refcounting. Therefore, classes derived from ThreadSafeRefCounted must not have a String member variable. No change in functionality, thus no new tests. WebSocket worker tests (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): Create a String from Vector. Note that String constructor taking an empty vector returns a null string, not an empty string. We want an empty string in that case, so I had to add special-case handling for an empty vector. (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Copy the content of the given String into Vector. * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-14 Matthew Delaney Use isAcceleratedContext() on the GraphicsContext instead of flags in ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=68137 Reviewed by Simon Fraser. No new tests. No change in behavior. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::isAccelerated): Have all just query the context directly. (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): just use isAccelerated directly * platform/graphics/ImageBuffer.h: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): Set isAcceleratedContext on the GraphicsContext instead of carrying the bit around on the ImageBuffer itself. (WebCore::ImageBuffer::copyNativeImage): Update the check. Same for all below... (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): * platform/graphics/skia/ImageBufferSkia.cpp: Set isAcceleratedContext on the GraphicsContext instead of carrying the bit around on the ImageBuffer itself. (WebCore::ImageBuffer::ImageBuffer): Remove m_acceleratesRendering flag and getter. 2011-09-14 Jeffrey Pfau libxml2 fragment parser loses prefix namespaces https://bugs.webkit.org/show_bug.cgi?id=66423 This makes the loop over the elements outside of the context actually update the element it's processing. Reviewed by Eric Seidel. Test: fast/parser/innerhtml-with-prefixed-elements.xhtml * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-09-14 Nate Chapin [V8] Null-check the v8::Context in V8DOMWindowShell:namedItemAdded() before using it. Also, add some logging to figure out how we're getting into this bad state. https://bugs.webkit.org/show_bug.cgi?id=68099 Reviewed by Adam Barth. No new tests, no known repro. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-14 Patrick Gansterer Replace ENABLE_XHR_RESPONSE_BLOB preprocessor statements in IDL files with Conditional attribute https://bugs.webkit.org/show_bug.cgi?id=64960 Reviewed by Ryosuke Niwa. * xml/XMLHttpRequest.idl: 2011-09-14 Alexei Svitkine Chromium: Add a layer for rubber-band overhang painting to the hardware path. https://bugs.webkit.org/show_bug.cgi?id=66969 Also, add layout tests for rubber-band overhang drawing for compositing path. Reviewed by James Robinson. * page/FrameView.cpp: (WebCore::FrameView::layerForOverhangAreas): * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::scrollContents): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/ScrollableArea.h: (WebCore::ScrollableArea::layerForOverhangAreas): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::paintContents): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): (WebCore::RenderLayerCompositor::destroyRootLayer): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::layerForOverhangAreas): 2011-09-14 Antoine Labour Remove the dependency on GraphicsLayer from CCLayerTreeHost. Move root layer management into the NonCompositedContentHost. Have WebViewImpl create a NonCompositedContentHost explicitly. https://bugs.webkit.org/show_bug.cgi?id=67883 Reviewed by James Robinson. Covered by compositing/ layout tests. * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::setRootLayer): (WebCore::NonCompositedContentHost::setViewport): (WebCore::NonCompositedContentHost::setVisible): (WebCore::NonCompositedContentHost::clearRenderSurfacesRecursive): (WebCore::NonCompositedContentHost::invalidateRect): * platform/graphics/chromium/NonCompositedContentHost.h: (WebCore::NonCompositedContentHost::topLevelRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): 2011-09-14 Henrik Grunell MediaStream API: Change PeerConnection constructor name to webkitPeerConnection https://bugs.webkit.org/show_bug.cgi?id=67843 Reviewed by Tony Gentilcore. Tests for the MediaStream API will be provided by the bug 56587, pending enough landed code. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitPeerConnectionEnabled): * page/DOMWindow.idl: 2011-09-14 John Bauman Make sure to GC decoded images that are only used with WebGL https://bugs.webkit.org/show_bug.cgi?id=67899 Reviewed by James Robinson. Tell CachedImage that the WebGL image was drawn so WebGL-only content will have decoded images collected. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractImageData): 2011-09-14 Antoine Labour Added a pure virtual class CCLayerDelegate which helps to isolate the chromium compositor from the rest of WebCore, and aids unit testing by being easily mockable. The compositor layers no longer directly see instances of GraphicsLayerChromium, instead they use this interface. https://bugs.webkit.org/show_bug.cgi?id=67750 Reviewed by James Robinson. No new tests: changes already covered by existing compositing layout tests. * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerChromium::create): (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::getDrawsContent): (WebCore::GraphicsLayerChromium::getPreserves3D): (WebCore::GraphicsLayerChromium::paintingGoesToWindow): (WebCore::GraphicsLayerChromium::doPaintGraphicsLayerContents): (WebCore::GraphicsLayerChromium::notifySyncRequired): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::create): (WebCore::ImageLayerChromium::ImageLayerChromium): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::create): (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/LayerChromium.h: (WebCore::CCLayerDelegate::~CCLayerDelegate): (WebCore::LayerChromium::preserves3D): (WebCore::LayerChromium::setOwner): * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::create): (WebCore::PluginLayerChromium::PluginLayerChromium): * platform/graphics/chromium/PluginLayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::create): (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::create): (WebCore::WebGLLayerChromium::WebGLLayerChromium): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-09-14 Anders Carlsson Try to fix GTK+ build. * GNUmakefile.list.am: 2011-09-14 James Robinson [chromium] LayerRendererChromium shouldn't be RefCounted https://bugs.webkit.org/show_bug.cgi?id=68121 Reviewed by Kenneth Russell. LayerRendererChromium is owned exclusively by CCLayerTreeHostImpl, so there's no reason to have it be refcounted. Making it an OwnPtr<> makes the lifecycle for these objects much cleaner and reduces the chance of introducing accidental reference cycles. This also removes the LayerRendererChromium pointers from CCLayerImpls since it only needed at draw time. Covered by compositing/ tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::draw): (WebCore::CCLayerImpl::bindContentsTexture): (WebCore::CCLayerImpl::drawDebugBorder): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::cleanupResources): (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-09-14 Anders Carlsson Get rid of WebCoreViewFactory and its WebViewFactory subclass https://bugs.webkit.org/show_bug.cgi?id=68124 Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/mac/FrameSelectionMac.mm: * page/mac/FrameMac.mm: * page/mac/WebCoreViewFactory.h: Removed. * page/mac/WebCoreViewFactory.m: Removed. 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=52736 Tiles were not being properly centered within border image sides for the "repeat" keyword. This patch fixes the buggy math behind the pattern tiling to actually get the initial phases correct. Reviewed by Sam Weinig. Added new tests in fast/borders and updated broken existing tests. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): 2011-09-14 Anders Carlsson Remove DocTypeStrings.gperf https://bugs.webkit.org/show_bug.cgi?id=68119 Reviewed by Sam Weinig. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/DocTypeStrings.gperf: Removed. * make-hash-tools.pl: * platform/HashTools.h: 2011-09-14 Chris Rogers Address lifetime issues in OfflineAudioDestinationNode (take 2) https://bugs.webkit.org/show_bug.cgi?id=68111 Reviewed by Kenneth Russell. No new tests. This fixes existing layout tests. * webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::startRendering): (WebCore::OfflineAudioDestinationNode::render): 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68103 Centered portions of border images don't render correctly. Make the tile scale factor have to be explicitly passed in and modify paintNinePieceImage to compute it for all sides. The attempts to implicitly compute the scale for the pattern based off the source and destination rects just don't work, since the center image rects don't provide the right information to be able to infer the scale factor. Reviewed by Sam Weinig. Reset all the existing fast/borders pixel results to Lion for these changes. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2011-09-14 Anders Carlsson Get rid of ResourceHandle::bufferedData() https://bugs.webkit.org/show_bug.cgi?id=68112 Reviewed by David Hyatt. ResourceHandle::bufferedData() was only implemented on Mac, and the support in the underlying NSURLConnection class hasn't been there for several OS releases. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::resourceData): (WebCore::ResourceLoader::addData): * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: * platform/network/curl/ResourceHandleCurl.cpp: * platform/network/mac/ResourceHandleMac.mm: * platform/network/qt/ResourceHandleQt.cpp: * platform/network/soup/ResourceHandleSoup.cpp: * platform/network/win/ResourceHandleWin.cpp: 2011-09-14 Mark Hahnenberg REGRESSION: r95108 broke Qt Linux tests https://bugs.webkit.org/show_bug.cgi?id=68104 Reviewed by Csaba Osztrogonác. No new tests. Build fix for Qt tests broken in r95108. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: 2011-09-14 James Robinson [skia] fast/canvas/setWidthResetAfterForcedRender is flaky https://bugs.webkit.org/show_bug.cgi?id=67955 Reviewed by Stephen White. When destroying an ImageBuffer due to a canvas resize, we weren't clearing the texture ID on the layer, resulting in future compositor draw calls binding an invalid texture. This results in the test failing and possibly drawing from a bad texture. Covered by fast/canvas/setWidthResetAfterForcedRender.html in the GPU configuration. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent) * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-09-14 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. I missed a couple uses of SVG_USE in my previous patch. * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/SVGUseElement.h: 2011-09-14 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (6/7) https://bugs.webkit.org/show_bug.cgi?id=67692 Reviewed by Geoffrey Garen. No new tests. Completed the sixth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the fifth level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): (WebCore::DOMConstructorWithDocument::finishCreation): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::finishCreation): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::JSWorkerContextBase): (WebCore::JSWorkerContextBase::finishCreation): * bindings/js/JSWorkerContextBase.h: * bindings/scripts/CodeGeneratorJS.pm: Added a finishCreation declaration and Moved the finishCreation call into the create method for all classes except for subclasses of JSWorkerContextBase and JSDOMWindowBase because those classes are on the next level, and it's easier to do all of these classes in one fell swoop rather than level by level. (GenerateHeader): Added the implementation of the finishCreation method for the classes described above. (GenerateImplementation): Also added the finishCreation calls to the autogenerated DOM constructor classes. (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::create): (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor): (WebCore::JSTestInterfaceConstructor::finishCreation): (WebCore::JSTestInterface::JSTestInterface): (WebCore::JSTestInterface::finishCreation): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::create): (WebCore::JSTestInterfacePrototype::create): (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::create): (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor): (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation): (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): (WebCore::JSTestMediaQueryListListener::finishCreation): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): (WebCore::JSTestMediaQueryListListenerPrototype::create): (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::create): (WebCore::JSTestObjConstructor::JSTestObjConstructor): (WebCore::JSTestObjConstructor::finishCreation): (WebCore::JSTestObj::JSTestObj): (WebCore::JSTestObj::finishCreation): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): (WebCore::JSTestObjPrototype::create): (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation): (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): (WebCore::JSTestSerializedScriptValueInterface::finishCreation): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): (JSC::Bindings::CRuntimeMethod::finishCreation): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::JavaRuntimeMethod): (JavaRuntimeMethod::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::ObjCRuntimeMethod): (ObjCRuntimeMethod::finishCreation): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::create): (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::create): (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeMetaMethod::finishCreation): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): (JSC::Bindings::QtRuntimeConnectionMethod::finishCreation): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_method.h: (JSC::RuntimeMethod::create): 2011-09-13 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: 2011-09-14 Eric Carlson MediaPlayerPrivateAVFoundationObjC's "periodic time observer" is unnecessary https://bugs.webkit.org/show_bug.cgi?id=68056 MediaPlayerPrivateAVFoundationObjC creates a "periodic time observer" not because it wants periodic callbacks, but because a time observer also fires whenever a seek completes. This is no longer necessary because it now uses but AVPlayerItem's -seekToTime:toleranceBefore:toleranceAfter:completionHandler to seek, so seek completions are always notified. Reviewed by Darin Adler. No new tests, code removed is tested by existing tests. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): 2011-09-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=68054 Return an image scale factor as well as an Image* from CachedImage::brokenImage() Reviewed by Darin Adler. CachedImage::brokenImage() now returns a pair where the float represents the image's scale factor. This is important because currently, the broken image will either be only 1x or 2x, but a deviceScaleFactor could theoretically be something different (1.5, 3, etc). So it is not safe to assume that the image's scale factor is equivalent to the deviceScaleFactor, and hardcoding 2 for now is lame. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): * loader/cache/CachedImage.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): 2011-09-14 James Robinson [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67440 Reviewed by Kenneth Russell. This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path to make sure that textures are deleted even if the page is not visible. This move also removed the need for LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well. That meant moving the layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway. Covered by existing compositing/ tests and platform/chromium/compositor/lost-compositor-context-with-rendersurface.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): (WebCore::TextureManager::lowLimitBytes): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68040 Make sure border image sub-properties can be specified in any order. Reviewed by Beth Dakin. New tests in fast/borders. * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::canAdvance): (WebCore::BorderImageParseContext::setCanAdvance): (WebCore::BorderImageParseContext::allowCommit): (WebCore::BorderImageParseContext::allowImage): (WebCore::BorderImageParseContext::allowImageSlice): (WebCore::BorderImageParseContext::allowSlash): (WebCore::BorderImageParseContext::requireWidth): (WebCore::BorderImageParseContext::requireOutset): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: (WebCore::CSSParserValueList::previous): 2011-09-14 Mike Reed query SystemParametersInfo for GDI font smoothing settings https://bugs.webkit.org/show_bug.cgi?id=68080 Reviewed by Stephen White. No new tests. fixes antialiasing issues based on User settings * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::getDefaultGDITextFlags): (WebCore::setupPaintForFont): 2011-09-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68050 Regressions in some layout tests from making border/mask/reflection nine-piece-image parsing match the spec, which allows any of the pieces to be omitted and to also be specifiable in any order. When the higher level code suddenly allowed the image slices to be omitted, the fixup for legacy compatibility for reflections and masks in the parseBorderImageSlice function no longer happened because that function no longer got called. The fix is to properly set the defaults to include the "fill" keyword, so the fixup is applied to the NinePieceImages you create before you ever map anything in from the rules. This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as "0 fill" instead of just "0", which is the correct initial value for this property. Reviewed by Adam Roben. * css/CSSParser.cpp: (WebCore::CSSParser::parseBorderImageSlice): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleReflection.h: (WebCore::StyleReflection::StyleReflection): 2011-09-13 Pavel Feldman Web Inspector: InspectorInstrumentation::frameDestroyed is called after m_page has been reset. https://bugs.webkit.org/show_bug.cgi?id=67997 We should not instrument frameDestroyed event from within Frame's destructor since frame's m_page pointer is likely to be 0 by that time and appropriate instrumenting agent won't be found. As a result, stale frame with its id end up in the inspector. This change wipes out frame binding from the inspector upon detach rather than destroy. Reviewed by Tony Gentilcore. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDetachedImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): * inspector/InspectorPageAgent.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::detachFromPage): * page/Frame.h: 2011-09-14 Pavel Feldman Not reviewed: rolling out r95089. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDestroyedImpl): (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameWindowDiscarded): (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): (WebCore::InspectorInstrumentation::didCommitLoad): (WebCore::InspectorInstrumentation::frameDestroyed): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): (WebCore::InspectorPageAgent::frameDestroyed): * inspector/InspectorPageAgent.h: * page/Frame.cpp: (WebCore::Frame::~Frame): 2011-09-14 Ilya Tikhonovsky Web Inspector: requestAnimationFrame callbacks don't show up in the timeline panel. https://bugs.webkit.org/show_bug.cgi?id=67986 Reviewed by Pavel Feldman. Test: inspector/timeline/timeline-animation-frame.html * English.lproj/localizedStrings.js: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::callFunctionWithoutFrame): (WebCore::V8Proxy::instrumentedCallFunction): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didRegisterAnimationFrameCallbackImpl): (WebCore::InspectorInstrumentation::didCancelAnimationFrameCallbackImpl): (WebCore::InspectorInstrumentation::willFireAnimationFrameEventImpl): (WebCore::InspectorInstrumentation::didFireAnimationFrameEventImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willCallFunction): (WebCore::InspectorInstrumentation::didRegisterAnimationFrameCallback): (WebCore::InspectorInstrumentation::didCancelAnimationFrameCallback): (WebCore::InspectorInstrumentation::willFireAnimationFrameEvent): (WebCore::InspectorInstrumentation::didFireAnimationFrameEvent): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didRegisterAnimationFrameCallback): (WebCore::InspectorTimelineAgent::didCancelAnimationFrameCallback): (WebCore::InspectorTimelineAgent::willFireAnimationFrameEvent): (WebCore::InspectorTimelineAgent::didFireAnimationFrameEvent): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createAnimationFrameCallbackData): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-09-13 Pavel Feldman Web Inspector: InspectorInstrumentation::frameDestroyed is called after m_page has been reset. https://bugs.webkit.org/show_bug.cgi?id=67997 We should not instrument frameDestroyed event from within Frame's destructor since frame's m_page pointer is likely to be 0 by that time and appropriate instrumenting agent won't be found. As a result, stale frame with its id end up in the inspector. This change wipes out frame binding from the inspector upon detach rather than destroy + adds an assertion into the inspector agents lookup with 0 page. Reviewed by Tony Gentilcore. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDetachedImpl): (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameWindowDiscarded): (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): (WebCore::InspectorInstrumentation::frameDetached): (WebCore::InspectorInstrumentation::didCommitLoad): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): * inspector/InspectorPageAgent.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::detachFromPage): (WebCore::Frame::transferChildFrameToNewDocument): * page/Frame.h: 2011-09-14 Sheriff Bot Unreviewed, rolling out r95080. http://trac.webkit.org/changeset/95080 https://bugs.webkit.org/show_bug.cgi?id=68070 It caused some 2d.composite.uncovered tests fail (Requested by rgabor on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-13 Pavel Feldman Web Inspector: [v8] building call frame info for location-less internal script function crashes. https://bugs.webkit.org/show_bug.cgi?id=67991 Reviewed by Yury Semikhatsky. Test: inspector/debugger/debugger-pause-in-internal.html * bindings/v8/DebuggerScript.js: (): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::currentCallFrame): 2011-09-14 Ben Wells Large canvas fills should not crash or create unnecessarily large image buffers https://bugs.webkit.org/show_bug.cgi?id=67988 When using source-in, destination-in, source-out, or destination-atop a temporary buffer is created. This buffer only needs to be big enough to cover the intersection of the path and the canvas. This change also adds some null checks for failures to create contexts or buffers. Reviewed by Stephen White. Test: fast/canvas/canvas-large-fills.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-14 Kentaro Hara Implement a PageTransitionEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=68048 Reviewed by Sam Weinig. The spec for the PageTransitionEvent constructor is here: http://www.whatwg.org/specs/web-apps/current-work/#pagetransitionevent Test: fast/events/constructors/page-transition-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the PageTransitionEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for PageTransitionEvent. * dom/PageTransitionEvent.cpp: (WebCore::PageTransitionEventInit::PageTransitionEventInit): (WebCore::PageTransitionEvent::PageTransitionEvent): (WebCore::PageTransitionEvent::initPageTransitionEvent): * dom/PageTransitionEvent.h: Added a definition for PageTransitionEventInit. (WebCore::PageTransitionEvent::create): (WebCore::PageTransitionEvent::isPageTransitionEvent): (WebCore::PageTransitionEvent::persisted): * dom/PageTransitionEvent.idl: Makes PageTransitionEvent constructible. 2011-09-13 Sheriff Bot Unreviewed, rolling out r95058. http://trac.webkit.org/changeset/95058 https://bugs.webkit.org/show_bug.cgi?id=68058 It made css3/calc/regression-62276.html crash (Requested by Ossy on #webkit). * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowBreak): (WebCore::BorderImageParseContext::allowWidth): (WebCore::BorderImageParseContext::allowOutset): (WebCore::BorderImageParseContext::allowRepeat): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: 2011-09-13 Abhishek Arya Crash in RenderScrollbarPart::imageChanged. https://bugs.webkit.org/show_bug.cgi?id=68009 Reviewed by Simon Fraser. When a custom scrollbar is removed from its FrameView, its destruction can be delayed because of RefPtr maintained in EventHandler class (m_lastScrollbarUnderMouse). Upon removal, we delete all the scrollbar parts so that they don't link back to scrollbar. However, because of the delay, we can have a call to updateScrollbarPart which recreates it. When scrollbar is getting destroyed, we just check to see if there are remaining scrollbar parts and if yes, we destroy them. Test: scrollbars/scrollbar-part-created-with-no-parent-crash.html * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::~RenderScrollbar): 2011-09-13 Adam Klein Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized read https://bugs.webkit.org/show_bug.cgi?id=68021 Reviewed by Tony Chang. Reported by valgrind in http://crbug.com/60653. Besides fixing the uninitialized read, add support for outputting the list separator for counters() calls and the list-style name. Test: fast/css/counters/counter-cssText.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): 2011-09-13 Kenichi Ishibashi WebFont followed tiny monospace text displays weird https://bugs.webkit.org/show_bug.cgi?id=67996 Reviewed by Darin Adler. Always call wkSetCGFontRenderingMode() in Font::drawGlyphs() so that the rendering mode is set correctly. Test: platform/mac/fast/text/webfont-after-tiny-monospace-text.html * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): 2011-09-13 Tom Sepez Fix XSS auditor bypass when inline handlers contain comments. https://bugs.webkit.org/show_bug.cgi?id=27895 Reviewed by Adam Barth. Tests: http/tests/security/xssAuditor/property-escape-comment.html http/tests/security/xssAuditor/property-escape-entity.html http/tests/security/xssAuditor/property-escape-quote.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::snippetForAttribute): 2011-09-13 Kentaro Hara Implement a HashChangeEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67969 Reviewed by Nate Chapin. Test: fast/events/constructors/hash-change-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the HashChangeEvent constructor. * dom/HashChangeEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-13 Jeremy Apthorp Fix crash when an iframe element is removed during a transition to fullscreen. https://bugs.webkit.org/show_bug.cgi?id=67960 Reviewed by Adam Barth. Test: fullscreen/full-screen-remove-ancestor-during-transition.html * dom/Document.cpp: (WebCore::Document::~Document): Clear the list of elements to which we need to send a fullscreenchange event. 2011-09-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68040 Make sure border image sub-properties can be specified in any order. Reviewed by Beth Dakin. New tests in fast/borders. * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::canAdvance): (WebCore::BorderImageParseContext::setCanAdvance): (WebCore::BorderImageParseContext::allowCommit): (WebCore::BorderImageParseContext::allowImage): (WebCore::BorderImageParseContext::allowImageSlice): (WebCore::BorderImageParseContext::allowSlash): (WebCore::BorderImageParseContext::requireWidth): (WebCore::BorderImageParseContext::requireOutset): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: (WebCore::CSSParserValueList::previous): 2011-09-13 Jeff Miller WebCore::Cursor::ensurePlatformCursor() should always set a valid platform cursor on Windows https://bugs.webkit.org/show_bug.cgi?id=68043 Make sure we set a valid platform cursor in the Cursor::NoDrop case, and add a default clause that uses the arrow cursor in case another cursor type is added in the future and we forget to update ensurePlatformCursor(). Reviewed by Anders Carlsson. * platform/win/CursorWin.cpp: (WebCore::Cursor::ensurePlatformCursor): Always set a valid platform cursor. 2011-09-12 Jon Honeycutt MSAA: WebKit reports the document state as disabled https://bugs.webkit.org/show_bug.cgi?id=67974 Reviewed by Brian Weinstein. Test: platform/win/accessibility/document-enabled-state.html * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::isEnabled): This object backs the AccessibleDocument on Windows - always return true for its enabled state. 2011-08-11 Cris Neckar Fixes several bugs when adding CounterNodes to a tree which can cause asymetrical relationships. https://bugs.webkit.org/show_bug.cgi?id=65996 Reviewed by Eric Seidel. Test: fast/css/counters/counter-reparent-table-children-crash.html * rendering/CounterNode.cpp: (WebCore::CounterNode::insertAfter): * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): (WebCore::makeCounterNode): 2011-09-13 Beth Dakin Adding a comment I forgot to add before. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-13 Antti Koivisto Move identifier filter from CSSStyleSelector to SelectorChecker https://bugs.webkit.org/show_bug.cgi?id=68025 Reviewed by Sam Weinig. This is a more logical place for this code. It also makes CSSStyleSelector slightly less bloated. It will make it possible to use fastRejectSelector for querySelectorAll in the future. * css/CSSStyleSelector.cpp: (WebCore::loadViewSourceStyle): (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::RuleData::RuleData): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::pushParent): (WebCore::CSSStyleSelector::popParent): * css/SelectorChecker.cpp: (WebCore::collectElementIdentifierHashes): (WebCore::SelectorChecker::pushParentStackFrame): (WebCore::SelectorChecker::popParentStackFrame): (WebCore::SelectorChecker::pushParent): (WebCore::SelectorChecker::popParent): (WebCore::collectDescendantSelectorIdentifierHashes): (WebCore::SelectorChecker::collectIdentifierHashes): * css/SelectorChecker.h: (WebCore::SelectorChecker::parentStackIsConsistent): (WebCore::SelectorChecker::ParentStackFrame::ParentStackFrame): (WebCore::SelectorChecker::fastRejectSelector): 2011-09-13 Kiyoto Tamura For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS' https://bugs.webkit.org/show_bug.cgi?id=36683 Reviewed by Ryosuke Niwa. In addition to supporting the deprecated 'useCSS', 'styleWithCSS' now accepts any argument other than the boolean false or the case-insensitive string "false". This is per http://aryeh.name/spec/editing/editing.html#the-stylewithcss-command Tests: editing/execCommand/style-with-css.html editing/execCommand/use-css.html * editing/EditorCommand.cpp: (WebCore::executeStyleWithCSS): (WebCore::executeUseCSS): (WebCore::createCommandMap): 2011-09-13 Anders Carlsson Disable C++ exceptions when building with clang https://bugs.webkit.org/show_bug.cgi?id=68031 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: 2011-09-13 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67885 Outline for the high-resolution broken image icon draws at 2x -and corresponding- Reviewed by Dan Bernstein. Scaled the image size to account for the deviceScaleFactor. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-13 Tim Horton REGRESSION (64275): Shape pattern-image fill turns black https://bugs.webkit.org/show_bug.cgi?id=51061 Reviewed by Simon Fraser. When destroying a resource, register clients who are losing their resource as having pending resources, so they can be resolved in the case a resource with that id is re-registered. Test: svg/custom/pending-resource-after-removal.xhtml * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::resourceDestroyed): * svg/SVGStyledElement.h: (WebCore::toSVGStyledElement): Added. 2011-09-13 Eric Seidel Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5 https://bugs.webkit.org/show_bug.cgi?id=68018 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * WebCore.exp.in: * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): * dom/Text.cpp: (WebCore::Text::createRenderer): * features.pri: * page/DOMWindow.idl: * rendering/svg/RenderSVGForeignObject.cpp: * rendering/svg/RenderSVGForeignObject.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::hasValidAttributeType): * svg/SVGForeignObjectElement.cpp: * svg/SVGForeignObjectElement.h: * svg/SVGForeignObjectElement.idl: * svg/SVGLocatable.cpp: (WebCore::isViewportElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::isOutermostSVG): * svg/SVGUseElement.cpp: (WebCore::isDisallowedElement): (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/svgtags.in: 2011-09-13 Joseph Pecoraro CRASH under WebCore::ArchiveResourceCollection::addAllResources loading WebArchive https://bugs.webkit.org/show_bug.cgi?id=67983 Reviewed by Darin Adler. Null mimetypes are okay for subresources, but as previously discovered in bug 41082 they were required for main resources. Here we ensure that they are required for main resources, but we allow null mimetypes for subresources. To fix a crash for bad input we never add a null ArchiveResource to the Archive's subresource collection. It is useless and causes crashes whenever someone iterates the Archive's subresource collection. Test: webarchive/loading/test-loading-archive-subresource-null-mimetype.html * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::createResource): Allow a null mimetype, just type check from the dictionary. (WebCore::LegacyWebArchive::extract): Require a mimetype for the main resource. Do not add null subresources to the subresource list. 2011-09-13 Mihai Parparita [Chromium] Remove javascript_engine from WebCore.gyp https://bugs.webkit.org/show_bug.cgi?id=68001 Reviewed by Tony Chang. Remove javascript_engine GYP variable (similar to the removal done on the Chromium side with http://crrev.com/100692) * WebCore.gyp/WebCore.gyp: 2011-09-12 Ryosuke Niwa [CSS3 Backgrounds and Borders] Add unprefixed border-image shorthand. https://bugs.webkit.org/show_bug.cgi?id=67970 Reviewed by David Hyatt. Also update CSSStyleSelector.cpp to support border-image to suppress assertion in fast/borders/border-image-omit-right-slice.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): 2011-09-13 Xianzhu Wang Reviewed by Darin Adler. Webkit wraps between hyphen-minus and numeric characters https://bugs.webkit.org/show_bug.cgi?id=20677 Disallow wrapping between a hyphen-minus and a digit if the hyphen-minus is not directly after a digit or a letter. Test: fast/text/line-breaks-after-hyphen-before-number.html * rendering/break_lines.cpp: (WebCore::asciiLineBreakTable): Disabled line-breaking after '-' and before '.', '0'-'9'. Note: the change for '0'-'9' doesn't really matter because the case is handled hard-coded in shouldBreakAfter(). (WebCore::shouldBreakAfter): Changed line-breaking behavior after '-'. (WebCore::nextBreakablePosition): Passes lastLastCh to shouldBreakAfter. 2011-09-13 Erik Wright platform/graphics/gtk/FontGtk.cpp was renamed to platform/graphics/pango/FontPango.cpp . Reflect this change in WebCore.gypi to fix a Chromium build breakage. https://bugs.webkit.org/show_bug.cgi?id=68000 Reviewed by Tony Gentilcore. No change in functionality, thus no new tests. * WebCore.gypi: 2011-09-10 Mikhail Naganov Web Inspector: Profiler: Fix overlapping data in function names column. https://bugs.webkit.org/show_bug.cgi?id=67896 Reviewed by Pavel Feldman. * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/dataGrid.css: (.data-grid table.data): (.data-grid td): 2011-09-13 Sheriff Bot Unreviewed, rolling out r95025. http://trac.webkit.org/changeset/95025 https://bugs.webkit.org/show_bug.cgi?id=68005 Test failed on Snow Leopard bots. (Requested by yutak_home on #webkit). * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-13 Yuta Kitamura ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. https://bugs.webkit.org/show_bug.cgi?id=67908 Reviewed by David Levin. Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector. No change in functionality, thus no new tests. WebSocket worker tests (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): Create a String from Vector. (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Copy the content of the given String into Vector. * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-13 Fumitoshi Ukai Unreviewed, build fix. CSSPropertyBorderImage was added in r94989, but not yet added in WebCore::CSSStyleSelector::applyProperty CSSStyleSelector.cpp:2481: warning: enumeration value 'CSSPropertyBorderImage' not handled in switch * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-12 Shinya Kawanaka Crashes in WebCore::InsertListCommand::unlistifyParagraph. https://bugs.webkit.org/show_bug.cgi?id=67918 Reviewed by Ryosuke Niwa. execCommand("InsertUnorderedList") was crashing if the parent node of the target is a kind of list element and it is not contenteditable. This patch checks the parent node is contenteditable. Test: editing/execCommand/insert-list-in-noneditable-list-parent.html * editing/htmlediting.cpp: (WebCore::enclosingListChild): Checks the parent node is contenteditable. 2011-09-12 Sheriff Bot Unreviewed, rolling out r94975. http://trac.webkit.org/changeset/94975 https://bugs.webkit.org/show_bug.cgi?id=67984 crash in PrerenderBrowserTest.PrerenderHTML5VideoJs (Requested by ukai on #webkit). * platform/graphics/chromium/CanvasLayerChromium.h: (WebCore::CanvasLayerChromium::layerTypeAsString): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore::ContentLayerChromium::layerTypeAsString): * platform/graphics/chromium/ImageLayerChromium.h: (WebCore::ImageLayerChromium::layerTypeAsString): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::layerTreeAsText): (WebCore::writeIndent): (WebCore::LayerChromium::dumpLayer): (WebCore::LayerChromium::dumpLayerProperties): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTypeAsString): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::textureMemoryReclaimLimit): (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::close): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::owner): (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::rootLayerImpl): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::contentsTextureManager): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/PluginLayerChromium.h: (WebCore::PluginLayerChromium::layerTypeAsString): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::name): (WebCore::writeIndent): (WebCore::RenderSurfaceChromium::dumpSurface): * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureManager::setAssociatedContextDebugOnly): (WebCore::TextureManager::associatedContextDebugOnly): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::writeIndent): (WebCore::TiledLayerChromium::dumpLayerProperties): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.h: (WebCore::VideoLayerChromium::layerTypeAsString): * platform/graphics/chromium/WebGLLayerChromium.h: (WebCore::WebGLLayerChromium::layerTypeAsString): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::setVisible): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::contentsTextureManager): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::contentsTextureManager): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-09-12 Joseph Pecoraro Possible ASSERT(!storageTracker) in Lazily Initialized StorageTracker https://bugs.webkit.org/show_bug.cgi?id=67957 Reviewed by Darin Adler. The storageTracker singleton may already have been created through StorageTracker::tracker before initializeTracker gets called. Update the ASSERT in this case to check that there is no client for the tracker. No test, this depends on how the port initializes the tracker. * storage/StorageTracker.cpp: (WebCore::StorageTracker::initializeTracker): 2011-09-12 Adam Klein Fix out-of-bounds access in Gradient::sortStopsIfNecessary https://bugs.webkit.org/show_bug.cgi?id=67958 Reviewed by Darin Adler. Reported by Valgrind in http://crbug.com/77049. The errant code was added as an optimization in r67804. This patch reverts that one, as all parties agree that the optimization doesn't seem worthwhile, and there clearly aren't any tests covering the special case. No new tests, as existing tests should cover the remaining call to |std::stable_sort|. * platform/graphics/Gradient.cpp: (WebCore::Gradient::sortStopsIfNecessary): 2011-09-12 Jacky Jiang Setting document.title doesn't affect contents of title tag of XHTML documents https://bugs.webkit.org/show_bug.cgi?id=57537 Reviewed by Alexey Proskuryakov. Update the contents of the tag of XHTML documents when setting document.title. Test: fast/dom/title-content-set-innerText-get.xhtml * dom/Document.cpp: (WebCore::Document::setTitle): 2011-09-12 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Initialize m_unmodifiedText in PlatformKeyboardEventEfl. https://bugs.webkit.org/show_bug.cgi?id=67038 Reviewed by Kenneth Rohde Christiansen. Since most of the time it will return the same thing as text(), we initialize it the same way we initialize m_text. The other case (what would have been generated if no modifiers were pressed) should be covered by this as well. As this method is used when handling access keys, tests such as fast/events/access-key-self-destruct.html should now pass. No new tests, as this fixes a problem uncovered by the existing ones. * platform/efl/PlatformKeyboardEventEfl.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2011-09-12 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Eric Seidel. [EFL] Add GraphicsContext3DEfl for WebGL and accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=62709 Add GraphicsContext3D implementation for EFL port. GraphicsContext3D delegates to GraphicsContext3DInternal. * platform/graphics/efl/GraphicsContext3DEfl.cpp: Added. (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::isGLES2Compliant): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::blendColor): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::blendEquationSeparate): (WebCore::GraphicsContext3D::blendFunc): (WebCore::GraphicsContext3D::blendFuncSeparate): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::checkFramebufferStatus): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::clearColor): (WebCore::GraphicsContext3D::clearDepth): (WebCore::GraphicsContext3D::clearStencil): (WebCore::GraphicsContext3D::colorMask): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::cullFace): (WebCore::GraphicsContext3D::depthFunc): (WebCore::GraphicsContext3D::depthMask): (WebCore::GraphicsContext3D::depthRange): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::disable): (WebCore::GraphicsContext3D::disableVertexAttribArray): (WebCore::GraphicsContext3D::drawArrays): (WebCore::GraphicsContext3D::drawElements): (WebCore::GraphicsContext3D::enable): (WebCore::GraphicsContext3D::enableVertexAttribArray): (WebCore::GraphicsContext3D::finish): (WebCore::GraphicsContext3D::flush): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::frontFace): (WebCore::GraphicsContext3D::generateMipmap): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttachedShaders): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (WebCore::GraphicsContext3D::getContextAttributes): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::getFloatv): (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getRenderbufferParameteriv): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getString): (WebCore::GraphicsContext3D::getTexParameterfv): (WebCore::GraphicsContext3D::getTexParameteriv): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::hint): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isEnabled): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::isTexture): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::sampleCoverage): (WebCore::GraphicsContext3D::scissor): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::stencilFunc): (WebCore::GraphicsContext3D::stencilFuncSeparate): (WebCore::GraphicsContext3D::stencilMask): (WebCore::GraphicsContext3D::stencilMaskSeparate): (WebCore::GraphicsContext3D::stencilOp): (WebCore::GraphicsContext3D::stencilOpSeparate): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform4i): (WebCore::GraphicsContext3D::uniform4iv): (WebCore::GraphicsContext3D::uniformMatrix2fv): (WebCore::GraphicsContext3D::uniformMatrix3fv): (WebCore::GraphicsContext3D::uniformMatrix4fv): (WebCore::GraphicsContext3D::useProgram): (WebCore::GraphicsContext3D::validateProgram): (WebCore::GraphicsContext3D::vertexAttrib1f): (WebCore::GraphicsContext3D::vertexAttrib1fv): (WebCore::GraphicsContext3D::vertexAttrib2f): (WebCore::GraphicsContext3D::vertexAttrib2fv): (WebCore::GraphicsContext3D::vertexAttrib3f): (WebCore::GraphicsContext3D::vertexAttrib3fv): (WebCore::GraphicsContext3D::vertexAttrib4f): (WebCore::GraphicsContext3D::vertexAttrib4fv): (WebCore::GraphicsContext3D::vertexAttribPointer): (WebCore::GraphicsContext3D::viewport): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::markContextChanged): (WebCore::GraphicsContext3D::markLayerComposited): (WebCore::GraphicsContext3D::layerComposited): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): (WebCore::GraphicsContext3D::createBuffer): (WebCore::GraphicsContext3D::createFramebuffer): (WebCore::GraphicsContext3D::createProgram): (WebCore::GraphicsContext3D::createRenderbuffer): (WebCore::GraphicsContext3D::createShader): (WebCore::GraphicsContext3D::createTexture): (WebCore::GraphicsContext3D::deleteBuffer): (WebCore::GraphicsContext3D::deleteFramebuffer): (WebCore::GraphicsContext3D::deleteProgram): (WebCore::GraphicsContext3D::deleteRenderbuffer): (WebCore::GraphicsContext3D::deleteShader): (WebCore::GraphicsContext3D::deleteTexture): (WebCore::GraphicsContext3D::synthesizeGLError): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::getInternalFramebufferSize): (WebCore::GraphicsContext3D::setContextLostCallback): (WebCore::GraphicsContext3D::getImageData): 2011-09-12 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Eric Seidel. [CMAKE] Remove platform/graphics/opengl/*OpenGL.cpp files in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=62707 No change in fuctionality so no new tests. Bug 62376 makes all ports use GraphicsContext3DOpenGL and Extensions3DOpenGL when enabling WebGL. However, some ports already have their own GC3D implementation. In QT and chromium, for example, GC3D delegates to GC3DInternal. So, it would be better to allow each port to decide whether or not to include files in platform/graphics/opengl. * CMakeLists.txt: 2011-09-12 Dan Bernstein <mitz@apple.com> <rdar://problem/10054615> Floats in ruby text intrude into the base Reviewed by Darin Adler. Test: fast/ruby/float-overhang-from-ruby-text.html * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::avoidsFloats): Added. Returns true. This ensures that RenderBlock::clearFloats() will not consider ruby text as having intruding floats. * rendering/RenderRubyText.h: 2011-09-12 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67970 Add unprefixed border-image property. Reviewed by Beth Dakin. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: 2011-09-12 Ryosuke Niwa <rniwa@webkit.org> REGRESSION: Moving up doesn't work in some cases https://bugs.webkit.org/show_bug.cgi?id=67522 Reviewed by Eric Seidel. The bug was caused by previousLinePosition's attempting to obtain the last root line box using a position at minCaretOffset (which is, in practice, located at the beginning of wrapped lines). Fix the bug by calling maxCaretOffset instead. Because isCandidate returns false at (br, 1), use the positionBeforeNode for br elements. Test: editing/selection/move-up-into-wrapped-line.html * editing/visible_units.cpp: (WebCore::previousLinePosition): 2011-09-12 David Levin <levin@chromium.org> Make the ThreadSafeRefCounted support in CrossThreadCopier work for T*. https://bugs.webkit.org/show_bug.cgi?id=67947 Reviewed by Adam Barth. The changes are tested by compiling and added compile asserts to do some verification as well. * platform/CrossThreadCopier.cpp: Added some compile asserts to verify various match and non-matches for CrossThreadCopier. * platform/CrossThreadCopier.h: Added a typedef to convert T* to T, just like the typedef's to remove RefPtr and PassRefPtr. Added a compile assert to verify that only one of the typedef did anything. (CrossThreadCopierBase<false, true, T>::copy): Remove "get" as it is unnecessary. It shouldn't have been here (PassRefPtr and RefPtr easily and sometimes more efficiently convert to PassRefPtr without get). Also, a raw pointer doesn't have a get() method. 2011-09-12 Chris Rogers <crogers@google.com> Address lifetime issues in OfflineAudioDestinationNode https://bugs.webkit.org/show_bug.cgi?id=67949 Reviewed by Kenneth Russell. No new tests. This does not change JavaScript API. * webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::render): (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): 2011-09-12 Jeff Timanus <twiz@chromium.org> [chromium] Prevent a crash when tearing down an ImageBuffer that was not successfully initialized. https://bugs.webkit.org/show_bug.cgi?id=67944 Reviewed by Stephen White. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-09-12 Michael Saboff <msaboff@apple.com> Update RegExp and related classes to use 8 bit strings when available https://bugs.webkit.org/show_bug.cgi?id=67337 Updated call to match to use UString& instead of UChar*. Reviewed by Gavin Barraclough. No new tests, Covered by existing tests. * platform/text/RegularExpression.cpp: (WebCore::RegularExpression::match): 2011-09-12 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67898 REGRESSION(r94900): fast/images/support-broken-image-delegate.html fails on Mac Reviewed by Simon Fraser. New function willPaintBrokenImage() returns true when there has been an error loading the image and the broken image icon will be used in its place. This is necessary since it is possible to have an error loading an image and to NOT use the broken image icon. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::willPaintBrokenImage): * loader/cache/CachedImage.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-12 James Robinson <jamesr@chromium.org> [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67440 Reviewed by Kenneth Russell. This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path to make sure that textures are deleted even if the page is not visible. This move also removed the need for LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well. That meant moving the layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway. Covered by existing compositing/ tests and platform/chromium/compositor/lost-compositor-context-with-rendersurface.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): (WebCore::TextureManager::lowLimitBytes): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-12 Chris Rogers <crogers@google.com> DelayNode delay buffer is not correctly wrapping around https://bugs.webkit.org/show_bug.cgi?id=67872 Reviewed by Kenneth Russell. Test: webaudio/delaynode.html * webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::process): 2011-09-12 Arko Saha <arko@motorola.com> Selectstart is not fired when selection was created by arrow keys. https://bugs.webkit.org/show_bug.cgi?id=60430 Reviewed by Ryosuke Niwa. Fire selectstart when a user starts extending the selection using arrow key. Fixed by Arko Saha <arko@motorola.com> and Kaustubh Atrawalkar <kaustubh@motorola.com> Tests: fast/events/selectstart-by-arrow-keys-prevent-default.html fast/events/selectstart-by-arrow-keys.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::modify): (WebCore::FrameSelection::shouldChangeSelection): (WebCore::FrameSelection::dispatchSelectStart): * editing/FrameSelection.h: 2011-09-12 James Robinson <jamesr@chromium.org> [chromium] REGRESSION(94353): Compositor textures and resources leaked when tab closed that is not last tab in the process https://bugs.webkit.org/show_bug.cgi?id=67816 Reviewed by Kenneth Russell. We lack infrastructure to construct an automated test for this today. To test manually, open up a composited page (like the poster circle), duplicate the tab many times, close all the duplicates, and verify that the memory use returns to the single tab level. * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::clearRenderSurfacesRecursive): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-09-12 Kentaro Hara <haraken@google.com> Implement a HashChangeEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67924 Reviewed by Sam Weinig. The spec for the HashChangeEvent constructor is here: http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent Test: fast/events/constructors/hash-change-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the HashChangeEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for HashChangeEvent. * dom/HashChangeEvent.h: Added a definition for HashChangeEventInit. (WebCore::HashChangeEventInit::HashChangeEventInit): (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::HashChangeEvent): * dom/HashChangeEvent.idl: Makes HashChangeEvent constructible. 2011-09-12 Mike Reed <reed@google.com> [skia] remove dead code, no functionality change https://bugs.webkit.org/show_bug.cgi?id=67844 Reviewed by Kenneth Russell. No new tests. just removing dead-code, existing tests apply * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-09-12 Pavel Feldman <pfeldman@google.com> Web Inspector: Runtime.callFunctionOn does not accept arguments that evaluate to false. https://bugs.webkit.org/show_bug.cgi?id=67934 Reviewed by Tony Gentilcore. * inspector/InjectedScriptSource.js: 2011-09-12 Pavel Feldman <pfeldman@google.com> Web Inspector: event dividers do not update timeline boundaries. https://bugs.webkit.org/show_bug.cgi?id=67932 * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._onLoadEventFired): (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired): (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventTime): 2011-09-12 Kentaro Hara <haraken@google.com> Implement a WebKitAnimationEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67922 Reviewed by Adam Barth. Test: fast/events/constructors/webkit-animation-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the WebKitAnimationEvent constructor. * dom/WebKitAnimationEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-12 Andreas Kling <kling@webkit.org> Shrink CanvasGradient for builds without ENABLE(DASHBOARD_SUPPORT). https://bugs.webkit.org/show_bug.cgi?id=67916 Reviewed by Kenneth Rohde Christiansen. * html/canvas/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): (WebCore::CanvasGradient::addColorStop): * html/canvas/CanvasGradient.h: 2011-09-12 Shinya Kawanaka <shinyak@google.com> Characters beyond U+10000 should be deleted by one pressing delete key. https://bugs.webkit.org/show_bug.cgi?id=40351 Reviewed by Kent Tamura. If a character is the trail part of unicode surrogate pair, the lead part of it should also be deleted. Also, If in MacOSX, the deletion should honor Mac's behavior. Test: editing/deleting/delete-surrogatepair.html * rendering/RenderText.cpp: (WebCore::RenderText::previousOffsetForBackwardDeletion): Added if-macro to support chromium on mac, and added trail part check for unicode character. 2011-09-11 Kentaro Hara <haraken@google.com> Implement a ProgressEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67800 Reviewed by Sam Weinig. Test: fast/events/constructors/progress-event-constructor.html * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Replaced UnsignedLongLongMax with std::numeric_limits<unsigned long long>::max(). * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyValue): Returns an unsigned long long value corresponding to a given key. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Added the ProgressEvent constructor. * dom/ProgressEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-11 Dimitri Glazkov <dglazkov@chromium.org> REGRESSION (r87351): toggling display of lots (thousands) of elements with display:none is very slow https://bugs.webkit.org/show_bug.cgi?id=67581 Reviewed by Darin Adler. Test: perf/show-hide-table-rows.html * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): Moved style-creating code into createRendererIfNeeded, renamed to createRenderer. (WebCore::NodeRendererFactory::createRendererIfNeeded): Re-arrange code to avoid unnecessary creation of renderers. 2011-09-11 Jeremy Moskovich <jeremy@chromium.org> [Chromium] Change OOP Font loading code to use CGFont*() APIs. https://bugs.webkit.org/show_bug.cgi?id=66935 This change is necessary due a bug in ATSFontDeactivate() on 10.7. See crbug.com/93191 for details. Reviewed by Eric Seidel. No new tests - covered by existing tests. * platform/chromium/PlatformBridge.h: * platform/graphics/chromium/CrossProcessFontLoading.h: * platform/graphics/chromium/CrossProcessFontLoading.mm: (WebCore::MemoryActivatedFont::create): (WebCore::MemoryActivatedFont::MemoryActivatedFont): (WebCore::MemoryActivatedFont::~MemoryActivatedFont): 2011-09-09 Oliver Hunt <oliver@apple.com> Remove support for anonymous storage from jsobjects https://bugs.webkit.org/show_bug.cgi?id=67881 Reviewed by Sam Weinig. Remove all use of anonymous slots, this required modifying bindings generation to add member variables for cached attributes, and override visitChildren with the necessary logic to mark those new members. I added bindings generation tests for these values. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): * bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure): * bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::createStructure): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure): * bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::createStructure): (WebCore::JSTestInterfacePrototype::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure): (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::createStructure): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::JSTestObj::visitChildren): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure): (WebCore::JSTestObjPrototype::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure): (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::cachedAttribute1AttrGetter): (WebCore::TestObjInternal::cachedAttribute2AttrGetter): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure): 2011-09-01 Filip Pizlo <fpizlo@apple.com> The executable allocator makes it difficult to free individual chunks of executable memory https://bugs.webkit.org/show_bug.cgi?id=66363 Reviewed by Oliver Hunt. Introduced a best-fit, balanced-tree based allocator. The allocator required a balanced tree that does not allocate memory and that permits the removal of individual nodes directly (as opposed to by key); neither AVLTree nor WebCore's PODRedBlackTree supported this. Changed all references to executable code to use a reference counted handle. No new layout tests because behavior is not changed. New API unit tests: Tests/WTF/RedBlackTree.cpp Tests/WTF/MetaAllocator.cpp * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added. 2011-09-10 Sam Weinig <sam@webkit.org> Add isInterruptedExecutionException and isTerminatedExecutionException predicates https://bugs.webkit.org/show_bug.cgi?id=67892 Reviewed by Andy "First Time Reviewer" Estes. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): Use the new predicates instead of probing the ClassInfo directly. 2011-09-10 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. MSW build fixes. * config.h: 2011-09-09 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67861 Implement border-image-outset (and the mask equivalents). Reviewed by Beth Dakin. Added new tests in fast/borders and fast/reflections. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Add m_outset field to CSSBorderImageValue and teach it how to dump the field as part of cssText(). * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageQuad): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for border-image-outset and -webkit-mask-box-image-outset. Refactor the code so that border-image-width and border-image-outset use a common function. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowOutset): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Teach the border image parsing code about outsets. This code will soon be replaced by true shorthand parsing code, but for now keep it working and add outset support to it. (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): (WebCore::CSSParser::parseBorderImageQuad): (WebCore::CSSParser::parseBorderImageWidth): (WebCore::CSSParser::parseBorderImageOutset): * css/CSSParser.h: Refactor the border-image-width code so that it can be shared by border-image-outset, since they are extremely similar. * css/CSSPropertyNames.in: Add the new properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageQuad): (WebCore::CSSStyleSelector::loadPendingImages): * css/CSSStyleSelector.h: Refactor the code so that width/outset share common mapping functions. Add support for outset. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::addBoxShadowVisualOverflow): (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): (WebCore::InlineFlowBox::computeOverflow): Add new functions for computing the visual overflow caused by border outsets. Fix bugs in the shadow overflow code as well. (WebCore::clipRectForNinePieceImageStrip): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: Make sure the clip rect pushed when painting one piece of a split inline strip is expanded to include the border and mask outsets. Always include the block direction expansion, and conditionally include the inline direction expansion based off includeLogicalLeftEdge()/includeLogicalRightEdge(). clipRectForNinePieceImageStrip is a common function shared by masks and border images that does this work. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeOverflow): * rendering/RenderBox.cpp: (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::addBoxShadowAndBorderOverflow): * rendering/RenderBox.h: Rename addShadowOverflow to addBoxShadowAndBorderOverflow. Have it compute both shadow and border image outset overflow. Fix bugs with shadow overflow computation. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): Change painting to apply the outsets to inflate the border image drawing area. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::layout): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::layout): Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateRects): Patched to no longer apply box-shadow to overflow clip areas when inflating the intersection area for the layer bounds. Instead we generically apply all visual overflow so that border image outsets will also be included. This fixes https://bugs.webkit.org/show_bug.cgi?id=37467. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::layout): Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::outset): (WebCore::NinePieceImage::setOutset): (WebCore::NinePieceImage::computeOutset): (WebCore::NinePieceImage::copyOutsetFrom): Add the outset field to NinePieceImage along with some helpers for manipulating outsets. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getImageOutsets): (WebCore::RenderStyle::getImageHorizontalOutsets): (WebCore::RenderStyle::getImageVerticalOutsets): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hasBorderImageOutsets): (WebCore::InheritedFlags::getBorderImageOutsets): (WebCore::InheritedFlags::getBorderImageHorizontalOutsets): (WebCore::InheritedFlags::getBorderImageVerticalOutsets): (WebCore::InheritedFlags::getBorderImageInlineDirectionOutsets): (WebCore::InheritedFlags::getBorderImageBlockDirectionOutsets): (WebCore::InheritedFlags::getImageInlineDirectionOutsets): (WebCore::InheritedFlags::getImageBlockDirectionOutsets): Helpers for outset computation used by painting and overflow functions. 2011-09-10 Dan Bernstein <mitz@apple.com> Actually prevent unnecessary casts to MediaControls*. Reviewed by Oliver Hunt. * html/shadow/MediaControls.h: 2011-09-10 Ryosuke Niwa <rniwa@webkit.org> Remove printf added by r94900. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): 2011-09-09 Chris Marrin <cmarrin@apple.com> requestAnimationFrame doesn't throttle on Mac https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Changed requestAnimationFrame to use a Timer in ScriptedAnimationController on Mac, rather than runLoopObservers. The Timer is throttled to fire no faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER flag and can be used by any implementation, but currently it is only enabled by PLATFORM(MAC). * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::resume): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::scheduleAnimation): * page/ChromeClient.h: 2011-09-10 Jarred Nicholls <jarred@sencha.com> [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters https://bugs.webkit.org/show_bug.cgi?id=34884 KURL::path() alone does not handle removing the leading slash from a windows file path. Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately. Reviewed by Andreas Kling. * platform/qt/KURLQt.cpp: (WebCore::KURL::fileSystemPath): 2011-09-10 Ken Buchanan <kenrb@chromium.org> Crash due to bad data in SVGDocumentExtensions m_pendingResources https://bugs.webkit.org/show_bug.cgi?id=67488 Reviewed by Nikolas Zimmermann. Resolving a crash condition caused by the deletion of elements while pending resource entries for those elements are still recorded. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource) * svg/SVGDocumentExtensions.h: (WebCore::SVGDocumentExtensions::isElementInPendingResources) * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource) (WebCore::SVGDocumentExtensions::isElementInPendingResources) (WebCore::SVGDocumentExtensions::removeElementFromPendingResources) * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded) (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged) 2011-09-10 Adam Barth <abarth@webkit.org> Remove DocumentWriter::deprecatedFrameEncoding() https://bugs.webkit.org/show_bug.cgi?id=67882 Reviewed by Eric Seidel. Three years ago, in http://trac.webkit.org/changeset/39026, Alexey Proskuryakov added ContentDispositionEncodingFallbackArray to work around a web site compatibility issue with a non-ASCII file name becoming garbled when received in the Content-Disposition header. Since that time, there has been copious discussion of this topic among browser vendors, in the IETF, and in the broader web community. For example, here is a Stack Overflow thread about this topic: http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http Eric Lawrence has written a blog post that summarizes IE's perspective on this issue: http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx The current consensus is that browsers should implement RFC 6266, which is a new RFC that updates the definition of the Content-Disposition header. Chrome and Firefox have both implemented RFC 6266 and have encountered only one issue, which was then fixed by the web site operator. IE has also implemented RFC 6266, but I don't have detailed information about their compatibility experience. This patch add explicit PLATFORM #ifdefs around the quirky implementation previously used in Apple's Mac and Windows ports. This code is already only used on Apple's ports, so this patch introduces no functional changes. It does, however, discourage other ports from adopting this quirk. IMHO, Apple should remove this quirk as soon as compatibility allows and converge behavior with the other major browser vendors. See bug for manual test (the bug manifests in Safari download UI). * loader/DocumentWriter.cpp: * loader/DocumentWriter.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::adopt): (WebCore::ResourceRequestBase::copyData): * platform/network/ResourceRequestBase.h: 2011-09-09 Beth Dakin <bdakin@apple.com> Attempted Leopard build fix. * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): 2011-09-09 Beth Dakin <bdakin@apple.com> Fix for https://bugs.webkit.org/show_bug.cgi?id=67819 Use high resolution platform images when the deviceScaleFactor > 1 -and corresponding- <rdar://problem/10003098> Reviewed by Darin Adler. Add all of the new high resolution images. I also removed some tiffs from the project and replaced them with png equivalents (that are already checked into WebCore anyway). Since the high resolution images are pngs, it makes sense to use pngs for all of the images that load through Image::loadPlatformResource() * WebCore.xcodeproj/project.pbxproj: * platform/graphics/mac/ImageMac.mm: (WebCore::Image::loadPlatformResource): Load the @2x resource for deviceScaleFactors >= 2. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): CachedImage::brokenImage() is no longer a static helper function, but a real member function. It also now loads the @2x resource for deviceScaleFactors >= 2 and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns the brokenImage(), it just returns the 1x version. brokenImage() has to be called directly to reliably return the deviceScaleFactor-appropriate resource. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): * loader/cache/CachedImage.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): (WebCore::RenderLayer::paintResizer): * rendering/RenderLayer.h: New static function to retrieve the deviceScaleFactor for callers that do not have direct access to a Page. * page/Page.cpp: (WebCore::Page::deviceScaleFactor): * page/Page.h: Call CachedImage::brokenImage() for the broken-image image at an accurate resolution. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): 2011-09-09 Erik Arvidsson <arv@chromium.org> Move Element.contains to Node https://bugs.webkit.org/show_bug.cgi?id=67651 Reviewed by Darin Adler. This moves the contains method from Element to Node as in the DOM4 working draft: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains This also special cases Document contains to make it O(1) instead of O(depth). Tests: fast/dom/Node/contains-method.html perf/document-contains.html * bindings/objc/PublicDOMInterfaces.h: Move contains from DOMElement to DOMNode. * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): Added document special case. * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check. 2011-09-09 Tim Horton <timothy_horton@apple.com> Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow https://bugs.webkit.org/show_bug.cgi?id=67543 <rdar://problem/10070536> Reviewed by Darin Adler. Generalize (begin|end)TransparencyLayer, which now forward through to (begin|end)PlatformTransparencyLayer, so that isInTransparencyLayer can exist on every platform. Make use of isInTransparencyLayer in FontMac to disable "simple" shadow drawing when the text is being rendered into a transparency layer. Test: svg/custom/simple-text-double-shadow.svg * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::isInTransparencyLayer): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::isInTransparencyLayer): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/win/ScrollbarThemeWin.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeWin.cpp: 2011-09-09 Julien Chaffraix <jchaffraix@webkit.org> [V8] V8WebKitPoint::constructorCallback leaks https://bugs.webkit.org/show_bug.cgi?id=67865 Reviewed by Adam Barth. Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind. * bindings/v8/custom/V8WebKitPointConstructor.cpp: (WebCore::V8WebKitPoint::constructorCallback): Changed the code to use a RefPtr (per our usual style). Also use toV8 that will take care of properly wrapping the object. 2011-09-09 Chris Rogers <crogers@google.com> HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once https://bugs.webkit.org/show_bug.cgi?id=67866 Reviewed by David Levin. No new tests since this is difficult to test. This is designed to fix existing webaudio layout test failures. * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader): (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader): (WebCore::HRTFDatabaseLoader::loadAsynchronously): (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion): * platform/audio/HRTFDatabaseLoader.h: 2011-09-09 Jessie Berlin <jberlin@apple.com> Cookies are not available after turning off Private Browsing after the last window has been closed. https://bugs.webkit.org/show_bug.cgi?id=67874 Reviewed by Darin Adler. The private browsing storage session is a global setting that is being incorrectly set on a per-page basis (see http://webkit.org/b/67870). In this case, the global value was getting out of sync with the per-page setting: 1. The global value was getting set to true when setPrivateBrowsingEnabled(true) was called. 2. All Pages were then closed, destroying their Settings objects. 3. When a new Page was created, a new Settings object was created and its m_privateBrowsingEnabled value was getting set to false. 4. The WebPage settings were then applied to the new Settings object, resulting in setPrivateBrowsingEnabled(false) to be called. 5. An if (m_privateBrowsingEnabled == privateBrowsingEnabled) early return prevented the global value for the storage session from being destroyed. * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): Move the early return to be after setting the global private browsing values, and add a clearer comment + FIXME. 2011-09-09 Kentaro Hara <haraken@google.com> Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67458 Reviewed by Adam Barth. Added a 'CallWithNullValue' extended attribute. If a parameter is optional and missing, 'CallWithDefaultValue' handles it as a string "undefined". On the other hand, 'CallWithNullValue' handles it as a null string (Note: not a string "null", but a null string). Tests: fast/dom/Window/custom-constructors.html transforms/svg-vs-css.xhtml transforms/cssmatrix-2d-interface.xhtml transforms/cssmatrix-3d-interface.xhtmlGenerate a WebKitCSSMatrix constructor * WebCore.gypi: Removed V8WebKitCSSMatrixConstructor.cpp. * WebCore.pro: Removed V8WebKitCSSMatrixConstructor.cpp. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): If the 'CallWithNullValue' extended attribute is set, we call MAYBE_MISSING_PARAMETER() with MissingIsEmpty mode to obtain a maybe missing parameter. Otherwise, we call MAYBE_MISSING_PARAMETER() with MissingIsUndefined mode. (RequiresCustomSignature): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated test results. (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. (WebCore::TestMediaQueryListListenerInternal::methodCallback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::optionsObjectCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::withDynamicFrameAndArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::TestObjInternal::classMethodWithOptionalCallback): (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): * bindings/v8/V8Binding.h: (WebCore::V8ParameterBase::prepareBase): The fact that V8ParameterBase does not have any object means that we do not need to prepare anything, i.e. we should just return true in this case. (WebCore::::prepare): If V8ParameterBase does not have any object, then we set a null string. * bindings/v8/custom/V8BindingMacros.h: MAYBE_MISSING_PARAMETER() returns the parameter of a given index if the parameter exists. If the parameter does not exist and MissingIsUndefined is set, this macro returns an object that represents undefined. If the parameter does not exist and MissingIsEmpty is set, this macro returns an empty object. * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Removed. * css/WebKitCSSMatrix.idl: Added the 'Constructor' extended attribute. 2011-09-09 Geoffrey Garen <ggaren@apple.com> Reviewed by Dan Bernstein. Removed ENABLE(SINGLE_THREADED) support, since it is always false https://bugs.webkit.org/show_bug.cgi?id=67862 Next step toward making the baseline platform assumption that threads exist. * WebCore.pri: * features.pri: * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): Removed now-dead code. 2011-09-09 Fady Samuel <fsamuel@chromium.org> Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp} https://bugs.webkit.org/show_bug.cgi?id=67250 Reviewed by Simon Fraser. No new tests because there's no change in functionality. * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): * dom/Element.cpp: (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): * dom/Range.cpp: (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::pageScaleFactor): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setPageScaleFactor): * page/Page.h: (WebCore::Page::pageScaleFactor): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): (WebCore::RenderLayerCompositor::pageScaleFactor): * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2011-09-09 Dominic Mazzoni <dmazzoni@google.com> AX: Images within anchors causes crash https://bugs.webkit.org/show_bug.cgi?id=44149 Reviewed by Chris Fleizach. Fixes the way parent RenderObject of an AccessibilityRenderObject is computed in the presence of adjacent continuations. Test: accessibility/div-within-anchors-causes-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::renderParentObject): 2011-09-09 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> CSS rules not being applied when a hidden field is inserted between an input[type=checkbox] and a label https://bugs.webkit.org/show_bug.cgi?id=66887 Reviewed by David Hyatt. Test: fast/css/adjacent-sibling-selector.html This patch addresses the problem of elements not getting their style recomputed when they are affected by direct adjacent sibling rules and one of their sibling in their corresponding rules is modified dynamically. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::parentStylePreventsSharing): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::checkForSiblingStyleChanges): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::affectedByDirectAdjacentRules): (WebCore::InheritedFlags::setAffectedByDirectAdjacentRules): 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Make the EFL port use the correct rendering file. https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. When compiling with Pango support, the EFL port should use FontPango.cpp instead of FontEfl.cpp (which is just full of stubs). No new functionality so no new tests. * CMakeListsEfl.txt: 2011-09-09 Chris Rogers <crogers@google.com> AudioBufferSourceNode must validate AudioBuffer in .buffer attribute setter https://bugs.webkit.org/show_bug.cgi?id=67749 Reviewed by Kenneth Russell. Test: webaudio/audiobuffersource-channels.html * WebCore.gypi: * bindings/js/JSAudioBufferSourceNodeCustom.cpp: (WebCore::JSAudioBufferSourceNode::setBuffer): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: Copied from Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp. (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::setBuffer): * webaudio/AudioBufferSourceNode.h: * webaudio/AudioBufferSourceNode.idl: 2011-09-09 Dan Bernstein <mitz@apple.com> RenderBlock::addOverhangingFloats() takes superfluous parameters https://bugs.webkit.org/show_bug.cgi?id=67863 Reviewed by Dave Hyatt. No new tests, because behavior is unchanged. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters, since they were always the inverse of the logical{Left, Top}() of the child parameter. * rendering/RenderBlock.h: 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Add replacement functions for gdk ones. https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. This will allow the EFL port to don't depend on gdk anymore. No new functionality so no new tests. * CMakeListsEfl.txt: * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::appendRegionToCairoContext): * platform/graphics/cairo/CairoUtilities.h: * platform/graphics/pango/FontPango.cpp: (WebCore::drawGlyphsShadow): (WebCore::Font::drawComplexText): * platform/graphics/pango/PangoUtilities.cpp: Added. (WebCore::getLineClipRegionFromLayoutIter): (WebCore::getClipRegionFromPangoLayoutLine): * platform/graphics/pango/PangoUtilities.h: Added. 2011-09-09 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. No new tests. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::finishCreation): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::finishCreation): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): (JSC::RuntimeMethod::finishCreation): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Rename FontGtk.cpp to FontPango.cpp https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. This file will be used by the EFL port too, and since it's not GTK specific anymore, rename it to something better. No new functionality so no new tests. * GNUmakefile.list.am: * platform/graphics/pango/FontPango.cpp: Renamed from Source/WebCore/platform/graphics/gtk/FontGtk.cpp. 2011-09-09 Adam Klein <adamk@chromium.org> Initialize ExceptionCode in Element::removeAttribute https://bugs.webkit.org/show_bug.cgi?id=67820 Reviewed by Darin Adler. Silences valgrind warning reported in http://crbug.com/76490. No new tests since this would only very occasionally be flaky, and in the codepath in the valgrind report, the ec is ignored anyway. * dom/Element.cpp: (WebCore::Element::removeAttribute): Initialize ec to 0. 2011-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> [Qt] Remove common.pri https://bugs.webkit.org/show_bug.cgi?id=67814 Reviewed by Andreas Kling. No new tests, no change in functionality. * CodeGenerators.pri: * WebCore.pri: 2011-09-09 Dominic Mazzoni <dmazzoni@google.com> Assert being hit in AccessibilityRenderObject::addChildren() https://bugs.webkit.org/show_bug.cgi?id=61805 Reviewed by Chris Fleizach. Fix nextSibling and previousSibling to handle adjacent continuations properly, otherwise nodes end up appearing in the accessibility tree twice (or a debug assertion could be raised). Test: accessibility/adjacent-continuations-cause-assertion-failure.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::previousSibling): (WebCore::AccessibilityRenderObject::nextSibling): 2011-09-08 Kentaro Hara <haraken@google.com> Implement a WebKitAnimationEvent constructor. https://bugs.webkit.org/show_bug.cgi?id=67825 Reviewed by Sam Weinig. There is no spec for the WebKitAnimationEvent constructor since it is WebKit-specific. However, based on the current IDL of initWebKitAnimationEvent(), the constructor IDL should be as follows. [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)] interface WebKitAnimationEvent : Event { ...; } dictionary WebKitAnimationEventInit : EventInit { DOMString animationName; double elapsedTime; } Test: fast/events/constructors/webkit-animation-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the WebKitAnimationEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitAnimationEvent. * dom/WebKitAnimationEvent.cpp: (WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit): (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): * dom/WebKitAnimationEvent.h: Added a definition for WebKitAnimationEventInit. (WebCore::WebKitAnimationEvent::create): * dom/WebKitAnimationEvent.idl: Makes WebKitAnimationEvent constructible. 2011-09-08 Abhishek Arya <inferno@chromium.org> :before content rendering issues with list markers and run-ins. https://bugs.webkit.org/show_bug.cgi?id=67735 1) Remove the isAnonymous checks for run-in detection since the run-in can belong to a node. 2) When the parent has block children, then the list marker will be enclosed in an anonymous block. In that case, for going to the next list marker, we need to traverse one level up. We don't need this check when searching for generated run-in (loop 2), since we know parent will have inline children, so the list marker wont be enclosed in an anonymous block. Reviewed by Dave Hyatt. Tests: fast/lists/list-marker-before-content-table.html fast/runin/runin-generated-before-content.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::beforePseudoElementRenderer): 2011-09-09 Pavel Podivilov <podivilov@chromium.org> Web Inspector: introduce JavaScriptSourceFrame class. https://bugs.webkit.org/show_bug.cgi?id=67838 SourceFrame should not deal with JavaScript debugging since it is a base class for all source frame implementations. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/JavaScriptSourceFrame.js: Added. (WebInspector.JavaScriptSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): moved from ScriptsPanel.js (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94845. http://trac.webkit.org/changeset/94845 https://bugs.webkit.org/show_bug.cgi?id=67839 This patch kicked Qt-SL bots, but we don't need this modification. (Requested by ossy_ on #webkit). * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: 2011-09-09 Csaba Osztrogonác <ossy@webkit.org> [Qt][Mac]REGRESSION(r94774): Build is broken https://bugs.webkit.org/show_bug.cgi?id=67799 It seems these files didn't rebuilt because of a dependency bug. Touch them to trigger a rebuild. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: 2011-09-09 Alexander Pavlov <apavlov@chromium.org> Unreviewed, Chromium valgrind build fix. Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle https://bugs.webkit.org/show_bug.cgi?id=67837 * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): 2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94536. http://trac.webkit.org/changeset/94536 https://bugs.webkit.org/show_bug.cgi?id=67836 breaks absoluteLocation() of RelatedMouseEvent (Requested by jknotten on #webkit). * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: live edit both for JS and CSS is not discoverable. https://bugs.webkit.org/show_bug.cgi?id=65962 Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the Resources and the Scripts panels. The button is grayed out if the resource/script is not editable. Reviewed by Yury Semikhatsky. * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype.canEditSource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype.set visibleView): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.get statusBarItems): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._editButtonClicked): (WebInspector.SourceFrame.prototype.canEditSource): (WebInspector.SourceFrame.prototype.startEditing): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype._setReadOnly): (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick): * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype.set readOnly): (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing): * inspector/front-end/inspector.css: (button.edit-source-status-bar-item .glyph): (button.edit-source-status-bar-item.toggled-on .glyph): 2011-09-09 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::AppendNodeCommand::create(). https://bugs.webkit.org/show_bug.cgi?id=67767 Reviewed by Darin Adler. In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node. The current code assumes lastNode is an Element node. This patch checks it. Test: editing/execCommand/ident-crashes-topnode-is-text.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check. 2011-09-09 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::ApplyStyleCommand.doApply() https://bugs.webkit.org/show_bug.cgi?id=67765 Reviewed by Ryosuke Niwa. WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked. Test: editing/style/remove-format-without-enclosing-block.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check. 2011-09-09 James Simonsen <simonjam@chromium.org> [Chromium] Fix leak of Skia stream with custom CSS fonts https://bugs.webkit.org/show_bug.cgi?id=67815 Reviewed by Adam Barth. Test: fast/css/font-face-opentype.html under valgrind * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue https://bugs.webkit.org/show_bug.cgi?id=67742 Reviewed by Darin Adler. Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged InputType::valueChanged into InputType::setValue. Also introduced InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType. * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): * html/BaseCheckableInputType.h: * html/ColorInputType.cpp: * html/ColorInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue): * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): (WebCore::InputType::dispatchChangeEventInResponseToSetValue): * html/InputType.h: * html/RangeInputType.cpp: (WebCore::RangeInputType::setValue): * html/RangeInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue): * html/TextFieldInputType.h: 2011-09-08 Annie Sullivan <sullivan@chromium.org> Crashes in WebCore::InsertNodeBeforeCommand constructor. https://bugs.webkit.org/show_bug.cgi?id=67763 Reviewed by Ryosuke Niwa. Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that positions which are before or after a given node cannot return that node as the editable root. Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html * editing/htmlediting.cpp: (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode. 2011-09-08 James Weatherall <wez@chromium.org> Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document. This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down. https://bugs.webkit.org/show_bug.cgi?id=66181 Reviewed by Anders Carlsson. No new tests - no functional change. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::removedFromDocument): * html/HTMLPlugInElement.h: 2011-09-08 Daniel Bates <dbates@webkit.org> XSS filter bypass via non-standard URL encoding https://bugs.webkit.org/show_bug.cgi?id=66588 Reviewed by Adam Barth. Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html Implement support for decoding non-standard 16-bit Unicode escape sequences of the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>. See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>. * GNUmakefile.list.am: Added DecodeEscapeSequences.h. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/parser/XSSAuditor.cpp: (WebCore::decode16BitUnicodeEscapeSequences): Added. (WebCore::decodeStandardURLEscapeSequences): Added. (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences(). (WebCore::XSSAuditor::init): Modified to return early when the URL of the document is the empty string. This can happen when opening a new browser window or calling window.open(""). * platform/KURL.cpp: (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences(). This function just calls decodeEscapeSequences<URLEscapeSequence>(). * platform/text/DecodeEscapeSequences.h: Added. (WebCore::Unicode16BitEscapeSequence::findInString): (WebCore::Unicode16BitEscapeSequence::matchStringPrefix): (WebCore::Unicode16BitEscapeSequence::decodeRun): (WebCore::URLEscapeSequence::findInString): (WebCore::URLEscapeSequence::matchStringPrefix): (WebCore::URLEscapeSequence::decodeRun): (WebCore::decodeEscapeSequences): 2011-09-08 Adam Barth <abarth@webkit.org> DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings https://bugs.webkit.org/show_bug.cgi?id=67812 Reviewed by Eric Seidel. The one caller of this function does this work already. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::deprecatedFrameEncoding): 2011-09-08 Adam Klein <adamk@chromium.org> Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator https://bugs.webkit.org/show_bug.cgi?id=67810 Reviewed by Tony Chang. Reported as a valgrind failure in http://crbug.com/84777. No possible change in behavior, so no tests. The unitialized read could never have an impact: if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ... Since m_sortedTextBoxes.size() will be zero here if m_sortedTextBoxesPosition is uninitialized, and they're both unsigned, so no possible value of m_sortedTextBoxesPosition could be < 0. * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): 2011-09-08 Tony Chang <tony@chromium.org> Cleanup of switch statements with default cases https://bugs.webkit.org/show_bug.cgi?id=67808 Reviewed by Adam Barth. No new tests, just a small refactoring. * page/WebKitAnimation.cpp: (WebCore::WebKitAnimation::fillMode): * platform/audio/Distance.cpp: (WebCore::DistanceEffect::gain): 2011-09-08 Eric Seidel <eric@webkit.org> [BiDi] Add support for the BDI element https://bugs.webkit.org/show_bug.cgi?id=50913 Reviewed by Ryosuke Niwa. This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit. Test: css3/bdi-element.html * css/html.css: (bdi): 2011-09-08 David Levin <levin@chromium.org> [chromium] KURL::copy doesn't produce something usable on another thread. https://bugs.webkit.org/show_bug.cgi?id=67809 Reviewed by Adam Barth. No new functionality exposed so no new test. This was caught by testing code: the thread sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708). * platform/KURLGoogle.cpp: (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will not be used on another thread. 2011-09-08 Alexey Proskuryakov <ap@apple.com> REGRESSION (r66874): Missing RefPtr in ScriptController https://bugs.webkit.org/show_bug.cgi?id=67748 Reviewed by Adam Barth. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): 2011-09-08 Adam Barth <abarth@webkit.org> Second attempt to fix Chromium build. * dom/Document.h: 2011-09-08 Oliver Hunt <oliver@apple.com> Use bump allocator for initial property storage https://bugs.webkit.org/show_bug.cgi?id=67494 Reviewed by Geoffrey Garen. Add a forwarding header. * ForwardingHeaders/runtime/StorageBarrier.h: Added. 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> Unreviewed, rolling out r94809. http://trac.webkit.org/changeset/94809 https://bugs.webkit.org/show_bug.cgi?id=67718 commit _still_ premature, despite CQ eagerness * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Sam Weinig <sam@webkit.org> Remove the Completion object from JSC, I have never liked it https://bugs.webkit.org/show_bug.cgi?id=67755 Reviewed by Gavin Barraclough. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::evaluate): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject evaluateWebScript:]): * bridge/NP_jsobject.cpp: (_NPN_Evaluate): * bridge/jni/jni_jsobject.mm: (JavaJSObject::eval): 2011-09-08 Adam Barth <abarth@webkit.org> Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding() https://bugs.webkit.org/show_bug.cgi?id=67807 Reviewed by Eric Seidel. This function is super nutty. We don't want any more folks to call it thinking that it does something sane. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::deprecatedFrameEncoding): * loader/DocumentWriter.h: 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> <style scoped>: Add 'scoped' attribute https://bugs.webkit.org/show_bug.cgi?id=67718 Add 'scoped' attribute to IDL and attribute list, implement and test setting/resetting of the attribute. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/basic-attribute.html * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::scoped): (WebCore::HTMLStyleElement::setScoped): (WebCore::HTMLStyleElement::scopingElement): * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94781. http://trac.webkit.org/changeset/94781 https://bugs.webkit.org/show_bug.cgi?id=67806 Broke Objective-C binding on Mac (Requested by rniwa on #webkit). * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): 2011-09-08 Eric Seidel <eric@webkit.org> Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers https://bugs.webkit.org/show_bug.cgi?id=67803 Reviewed by Adam Barth. Smells like dead code. * loader/DocumentWriter.cpp: * loader/DocumentWriter.h: 2011-09-08 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::ReplaceSelectionCommand::doApply https://bugs.webkit.org/show_bug.cgi?id=67762 Reviewed by Ryosuke Niwa. WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it. Tests: editing/inserting/insert-without-enclosing-block.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Added null check. 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94784. http://trac.webkit.org/changeset/94784 https://bugs.webkit.org/show_bug.cgi?id=67796 Commit was premature (Requested by rolandsteiner on #webkit). * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 W. James MacLean <wjmaclean@chromium.org> [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation. https://bugs.webkit.org/show_bug.cgi?id=66472 This patch contains plumbing from Internals to WebViewImpl that can be removed at a later time when the zoom animator code is complete. Reviewed by James Robinson. Test: platform/chromium/compositing/zoom-animator-scale-test.html * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setZoomAnimatorScale): (WebCore::Settings::zoomAnimatorScale): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setZoomAnimatorScale): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setZoomAnimatorScale): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * testing/Internals.cpp: (WebCore::Internals::setZoomAnimatorScale): * testing/Internals.h: * testing/Internals.idl: 2011-09-08 Eric Carlson <eric.carlson@apple.com> HTMLMediaElement is missing initialTime attribute https://bugs.webkit.org/show_bug.cgi?id=67791 Reviewed by Darin Adler. Test: media/media-initialTime.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initialTime): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::initialTime): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::initialTime): 2011-09-03 Robert Hogan <robert@webkit.org> Elements with position:absolute don't move to correct position after images load https://bugs.webkit.org/show_bug.cgi?id=54611 Reviewed by Simon Fraser. Test: fast/block/positioning/absolute-layout-after-image-load.html In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Note: Although the issue is encountered only on first load without a fragment identifier, it happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so because scrolling to the fragment always happens before the image has loaded, rendering the page and clearing the initial dirty bits in the positioned element's renderer. When the image finally loads in this scenario, the positioned element is otherwise clean and relies on the above code to get re-rendered. Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately in bug 67759. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when deciding whether to mark children for layout 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> <style scoped>: Add 'scoped' attribute https://bugs.webkit.org/show_bug.cgi?id=67718 Add 'scoped' attribute to IDL and attribute list, implement and test setting/resetting of the attribute. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/basic-attribute.html * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::scoped): (WebCore::HTMLStyleElement::setScoped): (WebCore::HTMLStyleElement::scopingElement): * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Erik Arvidsson <arv@chromium.org> Move Element.contains to Node https://bugs.webkit.org/show_bug.cgi?id=67651 Reviewed by Darin Adler. This moves the contains method from Element to Node as in the DOM4 working draft: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains This also special cases Document contains to make it O(1) instead of O(depth). Tests: fast/dom/Node/contains-method.html perf/document-contains.html * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): Added document special case. * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check. 2011-09-08 Chris Rogers <crogers@google.com> Check AudioContext createChannelMerger() for thread safety https://bugs.webkit.org/show_bug.cgi?id=67247 Reviewed by Kenneth Russell. Test: webaudio/audiochannelmerger-stereo.html * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::process): (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput): * webaudio/AudioChannelMerger.h: 2011-09-08 Ned Holbrook <nholbrook@apple.com> Refactor hyphen measurement https://bugs.webkit.org/show_bug.cgi?id=67728 Reviewed by Darin Adler. No new tests, purely refactoring. * rendering/RenderBlockLineLayout.cpp: (WebCore::measureHyphenWidth): Added. (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth(). (WebCore::tryHyphenating): Ditto. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto. 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> Remove LayoutStateDisabler instances from RenderLayer https://bugs.webkit.org/show_bug.cgi?id=66896 Reviewed by Simon Fraser. As part of r93614, scrollTo does not call updateLayerPositions anymore. This means that we don't need to disable LayoutState from the scrolling code in RenderLayer. This change is covered by the existing tests. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Updated the comment that was not accurate anymore. Also explained what is wrong with LayoutState vs RenderLayer now. Note that the ASSERT is still valid and will not trigger as the remaining calls to updateLayerPositions are done *outside* layout() where LayoutState is not set (thus disabled). (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed 2 LayoutStateDisabler surrounding scrollToOffset. 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> Factor out the code to get the first non-null RenderTableSection in RenderTable https://bugs.webkit.org/show_bug.cgi?id=66972 Reviewed by Darin Adler. Refactoring only, covered by existing tests. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildren): (WebCore::AccessibilityTable::cellForColumnAndRow): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::rowIndexRange): Updated those for the signature change in sectionBelow. Also added a FIXME where topSection should be used instead of iterating over the section (and likely missing some corner cases). * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): * rendering/RenderTable.cpp: (WebCore::RenderTable::calcBorderStart): (WebCore::RenderTable::calcBorderEnd): (WebCore::RenderTable::outerBorderBefore): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): (WebCore::RenderTable::firstLineBoxBaseline): Updated all those functions to use the newly added functions. Also changed the variable names to match the functions. (WebCore::RenderTable::layout): (WebCore::RenderTable::topNonEmptySection): Newly added function that returns the top non null section of the table that has at least a row. (WebCore::RenderTable::cellAbove): (WebCore::RenderTable::cellBelow): Update the signature of those 2 functions to take an enum as it makes the rest of the code more readable. * rendering/RenderTable.h: (WebCore::RenderTable::topSection): Newly added function to return the top non null section in the table. 2011-04-19 Eric Seidel <eric@webkit.org> Reviewed by Ryosuke Niwa. [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property https://bugs.webkit.org/show_bug.cgi?id=50912 This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix. Parsing support was added in a previous patch, this wires up the RenderStyle values to code changes in the BidiResolver. The effect of this patch is that it makes it possible to "isolate" runs of text so that their RTL-ness or LTR-ness does not bleed out into the rest of your text and effect layout. This is important because many unicode characters (like parenthesis, ':', '-', etc.) do not have intrinsic directionality and are affected by whatever characters come before/after. If you have usernames which include RTL text, if you inject those usernames in your page you might end up with nearby characters moving! (like 'RTL USERNAME - my awesome site' as a title, could end up as 'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.) This patch makes it possible to wrap sections of text in isolated spans, so that they correctly order all their RTL/LTR contents, but also correctly participate in the larger RTL/LTR ordering without affecting nearby characters. Because much of this code is old and rarely touched, I've included extra background information in hopes of expanding my set of potential reviewers: WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA. The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart. Text layout is done per-block (<div>, <p>, etc), and begins with a string of text (which in our case comes from the rendering tree) and a specified width. First: Text is measured and wrapped into lines. Second: The UBA is run over the lines of text. Third: WebKit builds InlineBoxes (its linebox tree) and eventually render the text. This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters) and then adds another step after running the UBA, where we run the UBA recursively on any previously identified "isolated" content. The result of the UBA is an ordered list of "runs" of text with the RTL runs correctly RTL and the LTR runs LTR. The UBA does three things: 1. It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.) 2. Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR). 3. Re-orders those runs. The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree) walks along its InlineIterators, looking at each character and running the Unicode Bidi Algorithm (UBA). It walks through the rendering tree subtree under a block, using a (poorly named) bidiNext function which returns the next inline object. Each inline object (or text character there-in) has a corresponding meaning in the UBA such as a "strong RTL" character or a "neutral" character. The UBA reads these sequence of characters, and figures out what direction (RTL or LTR) to assign to any neutral characters it encounters, based on surrounding characters. As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance() function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject notifying InlineBidiResolver that it is entering or exiting an "isolated" span, at which point it will either start or stop ignoring the stream of characters from the InlineIterator. When the InlineBidiResolver is ignoring the stream of characters, instead of creating separate BidiRuns at each RTL/LTR boundary as it normally would, it instead creates one "fake" run for the entire isolated span. These fake runs participate in the normal UBA run ordering process, but after the main UBA, a second pass is made where we examine the list of isolatedRuns() and run the UBA on each of them, replacing the fake run we previously inserted, with the resulting list of runs from that inner UBA run. The way it "ignores" characters is by treating them all as neutral when inside an isolate. Thus all the characters end up grouped in a single run, but their directionality (as a group) is correctly affected by any surrounding strong characters. If you understood that last paragraph, than the rest of the change is just plumbing. I added a huge number of FIXMEs to this code, because this code has a variety of design choices (or lack there of) which make some of this very difficult. For example the bidiNext iterator function has two sets of mutually exclusive parameters and can be used optionally with or without an observer. Prior to this change there was only ever one object which cared about observing a walk over inlines and that was InlineBidiResolver. This patch (regretfully) templatizes bidiNext to support a new Observer type. The correct fix would be to rip bidiNext into multiple functions and rip need for observation out of InlineBidiResolver. Unfortunately I've tried both in separate bugs and failed. This code is very very old and very poorly understood. We're slowly moving forward, this is another tiny step. This is my fourth iteration of this patch (I'm happy to do more!), but I believe it's a good compromise between fixing all of the design gotcha's of our bidi system and doing the minimum amount to add this killer CSS feature. I ran the PLT. (It averaged 0.2% faster with this change, but I attribute that to noise). Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html * platform/text/BidiResolver.h: (WebCore::BidiCharacterRun::setNext): - Needed by the new replaceRunWithRuns function. (WebCore::BidiResolver::BidiResolver): (WebCore::BidiResolver::~BidiResolver): (WebCore::BidiResolver::enterIsolate): (WebCore::BidiResolver::exitIsolate): (WebCore::BidiResolver::inIsolate): (WebCore::BidiResolver::isolatedRuns): - Used to track isolated spans of text as they're encoutered. They're stuffed away here to be processed recursively after the main UBA has done its thang. (WebCore::::appendRun): (WebCore::::embed): (WebCore::::commitExplicitEmbedding): (WebCore::::createBidiRunsForLine): * platform/text/BidiRunList.h: (WebCore::::replaceRunWithRuns): - This effectively takes all the runs from one runlist and adds them to this one, replacing the fake run we inserted during a previous pass of the UBA. - This RunList now owns the runs, so we call clear() on the other RunList so that we don't end up double-freeing the runs. (WebCore::::clear): - This allows us to "take" runs from another run list and then clear it. * rendering/BidiRun.h: (WebCore::BidiRun::object): * rendering/InlineIterator.h: (WebCore::InlineIterator::object): (WebCore::InlineIterator::offset): (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext. (WebCore::notifyObserverWillExitObject): Mostly just renaming. (WebCore::addPlaceholderRunForIsolatedInline): (WebCore::isIsolatedInline): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::statusWithDirection): (WebCore::constructBidiRuns): - This is the heavy-lifting of this change. This function runs the UBA recursively on all the previously identified isolated spans. - If we encounter more isolated spans in our run, we just add them to the main list an keep going. Because the runs are linked lists and we have direct pointers to our placeholder objects, we don't care what order we process the placeholders in, so long as when we're done, they're all processed. (WebCore::RenderBlock::layoutInlineChildren): 2011-09-08 Kentaro Hara <haraken@google.com> Implement a ProgressEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67537 Reviewed by Sam Weinig. The spec for the ProgressEvent constructor is here: http://www.w3.org/TR/progress-events/#interface-progressevent Test: fast/events/constructors/progress-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent. * dom/ProgressEvent.cpp: (WebCore::ProgressEventInit::ProgressEventInit): (WebCore::ProgressEvent::ProgressEvent): * dom/ProgressEvent.h: Added a definition for ProgressEventInit. (WebCore::ProgressEvent::create): * dom/ProgressEvent.idl: Makes ProgressEvent constructible. 2011-09-08 Ryosuke Niwa <rniwa@webkit.org> Make bindings tests quiet after r94701. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): 2011-09-07 Pavel Podivilov <podivilov@chromium.org> Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded. https://bugs.webkit.org/show_bug.cgi?id=67717 Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage): (WebInspector.DebuggerPresentationModel.prototype._consoleCleared): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated): (WebInspector.PresentationCallFrame.prototype.sourceLine): * inspector/front-end/SourceFile.js: 2011-09-06 Pavel Podivilov <podivilov@chromium.org> Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=67647 1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything. 2) Add RawSourceCode unit tests. 3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now). Reviewed by Yury Semikhatsky. Test: inspector/debugger/raw-source-code.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken https://bugs.webkit.org/show_bug.cgi?id=67711 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._registerShortcuts): (WebInspector.ConsoleView.prototype._promptKeyDown): 2011-09-08 Andras Becsi <andras.becsi@nokia.com> [Qt] Build fails with strict compiler https://bugs.webkit.org/show_bug.cgi?id=67778 Reviewed by Csaba Osztrogonác. No new tests needed. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable]. 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94695. http://trac.webkit.org/changeset/94695 https://bugs.webkit.org/show_bug.cgi?id=67776 Hitting an assertion on Snow Leopard, Qt, GTK (Requested by Zoltan on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionedFloatsNeedRelayout): (WebCore::RenderBlock::layoutPositionedObjects): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css). * inspector/front-end/ApplicationCacheItemsView.js: * inspector/front-end/AuditResultView.js: * inspector/front-end/BinarySearch.js: * inspector/front-end/CSSStyleModel.js: * inspector/front-end/ConsoleMessage.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/CookieItemsView.js: * inspector/front-end/CookieParser.js: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMStorage.js: * inspector/front-end/DOMStorageItemsView.js: * inspector/front-end/DataGrid.js: * inspector/front-end/Database.js: * inspector/front-end/DatabaseQueryView.js: * inspector/front-end/DetailedHeapshotGridNodes.js: * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/EmptyView.js: * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/ExtensionCommon.js: * inspector/front-end/GoToLineDialog.js: * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotProxy.js: * inspector/front-end/HeapSnapshotWorkerDispatcher.js: * inspector/front-end/ImageView.js: * inspector/front-end/InjectedFakeWorker.js: * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/MetricsSidebarPane.js: * inspector/front-end/NetworkManager.js: * inspector/front-end/NetworkPanel.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/PartialQuickSort.js: * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: * inspector/front-end/RemoteObject.js: * inspector/front-end/Resource.js: * inspector/front-end/ResourceCategory.js: * inspector/front-end/ResourceHTMLView.js: * inspector/front-end/ResourceHeadersView.js: * inspector/front-end/ResourceJSONView.js: * inspector/front-end/ResourceTimingView.js: * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/ResourceView.js: * inspector/front-end/ResourcesPanel.js: * inspector/front-end/SearchController.js: * inspector/front-end/SettingsScreen.js: * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/SourceCSSTokenizer.js: * inspector/front-end/SourceHTMLTokenizer.js: * inspector/front-end/SourceJavaScriptTokenizer.js: * inspector/front-end/StatusBarButton.js: * inspector/front-end/TextEditorModel.js: * inspector/front-end/TimelineGrid.js: * inspector/front-end/View.js: * inspector/front-end/heapProfiler.css: * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: * inspector/front-end/inspectorSyntaxHighlight.css: * inspector/front-end/networkPanel.css: * inspector/front-end/treeoutline.js: * inspector/front-end/utilities.js: 2011-09-07 Andrey Kosyakov <caseq@chromium.org> Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR https://bugs.webkit.org/show_bug.cgi?id=67715 Reviewed by Yury Semikhatsky. - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.forwardWheelEvent): (WebInspector.TextViewer): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94674 and r94689. http://trac.webkit.org/changeset/94674 http://trac.webkit.org/changeset/94689 https://bugs.webkit.org/show_bug.cgi?id=67754 Broke inspector/debugger/script-formatter.html (Requested by rniwa on #webkit). * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.get rawSourceCode): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-07 Julien Chaffraix <jchaffraix@webkit.org> offsetFromRoot optimization is disabled after r93837 https://bugs.webkit.org/show_bug.cgi?id=67677 Reviewed by Simon Fraser. Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2) because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't have a good test harness to cover such slowdown. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss the optimization altogether. (WebCore::RenderLayer::computeRepaintRects): (WebCore::RenderLayer::updateLayerPositionsAfterScroll): * rendering/RenderLayer.h: Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming. 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Windows build fix after r94737. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): 2011-09-07 Dan Bernstein <mitz@apple.com> Removed hyphenation function implementations for an usupported build configuration. Reviewed by Sam Weinig. * platform/text/cf/HyphenationCF.cpp: 2011-09-07 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67739 adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this function by removing the loop and just computing the start and end column for a repaint rect and uniting everything in between. Reviewed by Dan Bernstein. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94714 and r94723. http://trac.webkit.org/changeset/94714 http://trac.webkit.org/changeset/94723 https://bugs.webkit.org/show_bug.cgi?id=67746 breaks gtk-linux tests with assertion failure (Requested by thorton on #webkit). * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::inTransparencyLayer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintTrackPiece): (WebCore::ScrollbarThemeWin::paintButton): (WebCore::ScrollbarThemeWin::paintThumb): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::paint): * rendering/RenderThemeWin.cpp: (WebCore::drawControl): 2011-09-07 Chris Fleizach <cfleizach@apple.com> Changes to aria-hidden don't change VO navigation https://bugs.webkit.org/show_bug.cgi?id=67722 Reviewed by Darin Adler. When altering aria-hidden, WebCore needs to update the children caches of affected elements. However, for elements that were children, but ignored, their caches did not get updated, and stale information would be propagated. The fix is to always clearChildren() when a parent is asking for children. This ensures information is always up to date when the parent itself is asking for new data. Test: accessibility/aria-hidden-updates-alldescendants.html * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaIsHidden): (WebCore::AccessibilityRenderObject::childrenChanged): (WebCore::AccessibilityRenderObject::addChildren): 2011-09-07 Tim Horton <timothy_horton@apple.com> Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow https://bugs.webkit.org/show_bug.cgi?id=67543 <rdar://problem/10070536> Reviewed by Simon Fraser. Generalize (begin|end)TransparencyLayer, which now forward through to (begin|end)PlatformTransparencyLayer, so that isInTransparencyLayer can exist on every platform. Make use of isInTransparencyLayer in FontMac to disable "simple" shadow drawing when the text is being rendered into a transparency layer. Test: svg/custom/simple-text-double-shadow.svg * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::isInTransparencyLayer): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::isInTransparencyLayer): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/win/ScrollbarThemeWin.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeWin.cpp: 2011-09-07 Dan Bernstein <mitz@apple.com> <rdar://problem/8881922> Support the hyphenate-limit-lines property https://bugs.webkit.org/show_bug.cgi?id=67730 Reviewed by Dave Hyatt. Tests: fast/css/parsing-hyphenate-limit-lines.html fast/text/hyphenate-limit-lines.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword "no-limit". * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines. * css/CSSValueKeywords.in: Added the "no-limit" value keyword. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines before the start line and pass it to layoutRunsAndFloatsInRange(). (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak(). (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before the current line and the limit on consecutive hyphenated lines, and an early return if the limit has been reached. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive hyphenated lines before the current line, which is passed through to tryHyphenating, along with the value of hyphenate-limit-lines. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated. * rendering/RootInlineBox.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter. (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter. (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1, corresponding to "no-limit". * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable. (WebCore::StyleRareInheritedData::operator==): Compare new member variable. * rendering/style/StyleRareInheritedData.h: 2011-09-02 Ojan Vafai <ojan@chromium.org> split overrideSize into overrideHeight and overrideWidth https://bugs.webkit.org/show_bug.cgi?id=67550 Reviewed by Sam Weinig. All uses of overrideSize only set one of the width or the height. This change removes a bool from RenderObject and removes some flexbox specific logic from RenderBox. The only downside is that we have two global maps where we used to have one. No functional changes so existing tests are sufficient. * rendering/RenderBox.cpp: (WebCore::RenderBox::hasOverrideHeight): (WebCore::RenderBox::hasOverrideWidth): (WebCore::RenderBox::setOverrideHeight): (WebCore::RenderBox::setOverrideWidth): (WebCore::RenderBox::clearOverrideSize): (WebCore::RenderBox::overrideWidth): (WebCore::RenderBox::overrideHeight): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBox.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::setOverrideHeightFromRowHeight): * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): (WebCore::RenderTableSection::layoutRows): 2011-09-07 Alexei Svitkine <asvitkine@chromium.org> Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path. https://bugs.webkit.org/show_bug.cgi?id=67511 Reviewed by Dimitri Glazkov. Tests: platform/chromium-mac/rubberbanding/overhang-e.html platform/chromium-mac/rubberbanding/overhang-n.html platform/chromium-mac/rubberbanding/overhang-ne.html platform/chromium-mac/rubberbanding/overhang-nw.html platform/chromium-mac/rubberbanding/overhang-s.html platform/chromium-mac/rubberbanding/overhang-se.html platform/chromium-mac/rubberbanding/overhang-sw.html platform/chromium-mac/rubberbanding/overhang-w.html * WebCore.exp.in: * platform/ScrollableArea.h: * testing/Internals.cpp: (WebCore::Internals::setScrollViewPosition): * testing/Internals.h: * testing/Internals.idl: 2011-09-07 David Reveman <reveman@chromium.org> [Chromium] Render surface anti-aliasing. https://bugs.webkit.org/show_bug.cgi?id=66437 Reviewed by James Robinson. Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow edge computations to be shared between tiled layers and render surfaces. Move isCCW utility function to FloatQuad class and add to2dTransform method to TransformationMatrix class. Add necessary anti-aliasing shaders for render surfaces and use them to avoid aliased edges. Tests: compositing/reflections/nested-reflection-transformed.html (existing) * WebCore.gypi: * platform/graphics/FloatQuad.cpp: (WebCore::FloatQuad::isCounterclockwise): * platform/graphics/FloatQuad.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::drawTexturedQuad): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceProgramAA): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::sharedGeometryQuad): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderQuad::VertexShaderQuad): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderQuad::getShaderString): (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA): (WebCore::FragmentShaderRGBATexAlphaAA::init): (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString): (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding): (WebCore::FragmentTexClampAlphaAABinding::init): (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::VertexShaderQuad::matrixLocation): (WebCore::VertexShaderQuad::pointLocation): (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation): (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation): (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added. (WebCore::CCLayerQuad::Edge::Edge): (WebCore::CCLayerQuad::CCLayerQuad): (WebCore::CCLayerQuad::floatQuad): (WebCore::CCLayerQuad::toFloatArray): * platform/graphics/chromium/cc/CCLayerQuad.h: Added. (WebCore::CCLayerQuad::Edge::Edge): (WebCore::CCLayerQuad::Edge::x): (WebCore::CCLayerQuad::Edge::y): (WebCore::CCLayerQuad::Edge::z): (WebCore::CCLayerQuad::Edge::setX): (WebCore::CCLayerQuad::Edge::setY): (WebCore::CCLayerQuad::Edge::setZ): (WebCore::CCLayerQuad::Edge::set): (WebCore::CCLayerQuad::Edge::moveX): (WebCore::CCLayerQuad::Edge::moveY): (WebCore::CCLayerQuad::Edge::moveZ): (WebCore::CCLayerQuad::Edge::move): (WebCore::CCLayerQuad::Edge::scaleX): (WebCore::CCLayerQuad::Edge::scaleY): (WebCore::CCLayerQuad::Edge::scaleZ): (WebCore::CCLayerQuad::Edge::scale): (WebCore::CCLayerQuad::Edge::intersect): (WebCore::CCLayerQuad::CCLayerQuad): (WebCore::CCLayerQuad::left): (WebCore::CCLayerQuad::top): (WebCore::CCLayerQuad::right): (WebCore::CCLayerQuad::bottom): (WebCore::CCLayerQuad::inflateX): (WebCore::CCLayerQuad::inflateY): (WebCore::CCLayerQuad::inflate): (WebCore::CCLayerQuad::inflateAntiAliasingDistance): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::to2dTransform): * platform/graphics/transforms/TransformationMatrix.h: 2011-09-06 Oliver Hunt <oliver@apple.com> Remove JSObjectWithGlobalObject https://bugs.webkit.org/show_bug.cgi?id=67689 Reviewed by Geoff Garen. Remove use of anonymous storage and JSObjectWithGlobalObject for accessing a JSObject's global object now that they're available on the object's structure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::globalObject): (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): (JSC::Bindings::ObjcFallbackObjectImp::finishCreation): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): (JSC::Bindings::RuntimeObject::finishCreation): * bridge/runtime_object.h: 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r94694. * WebCore.xcodeproj/project.pbxproj: 2011-09-07 Tim Horton <timothy_horton@apple.com> FELighting is using width instead of height to determine skip for parallel(n>2) case https://bugs.webkit.org/show_bug.cgi?id=67719 <rdar://problem/10086178> Reviewed by Dirk Schulze. No new tests, because the bug only exhibits under conditions which are currently impossible by default (using more than 2 cores) on some platforms. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplyGeneric): 2011-09-07 W. James MacLean <wjmaclean@chromium.org> Eliminate motion jitter in animated, blurred SVG image https://bugs.webkit.org/show_bug.cgi?id=67503 Fixes filter shear-free transform applied to SVG images. In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region, which is based on the object bounding box (which doesn't move). For a rotation around the centre of the box, this should really just be the identity matrix, since the BB should neither change size nor location. So really, we're just interested in the scale change of the BB here, and not in moving it. This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions for vertical and horizontal slices, so the test verifies these. Reviewed by Dirk Schulze. Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): 2011-09-03 Robert Hogan <robert@webkit.org> Elements with position:absolute don't move to correct position after images load https://bugs.webkit.org/show_bug.cgi?id=54611 Reviewed by Simon Fraser. Test: fast/block/positioning/absolute-layout-after-image-load.html fast/block/positioning/positioned-float-layout-after-image-load.html In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects() takes care of it this at least ensures no regression in future. Note: Although the issue is encountered only on first load without a fragment identifier, it happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so because scrolling to the fragment always happens before the image has loaded, rendering the page and clearing the initial dirty bits in the positioned element's renderer. When the image finally loads in this scenario, the positioned element is otherwise clean and relies on the above code to get re-rendered. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when deciding whether to mark children for layout (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto 2011-09-07 Anna Cavender <annacc@chromium.org> Moving platform/track to html/track to avoid layering violation. https://bugs.webkit.org/show_bug.cgi?id=67680 Reviewed by Adam Barth. No new tests. No new functionality. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp. * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h. * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h. * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp. * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h. * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h. * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp. * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h. 2011-09-07 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67286 REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084. Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with leading to just be the block height. Reviewed by Dan Bernstein. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::linkToEndLineIfNeeded): 2011-09-06 Abhishek Arya <inferno@chromium.org> Null owningRenderer crash in RenderScrollbar::updateScrollbarParts. https://bugs.webkit.org/show_bug.cgi?id=67669 Reviewed by James Robinson. Owning renderer can be cleared for custom scrollbars in clearOwningRenderer() call. We need a null check in updateScrollbarParts, so that we do not crash. No tests since issue seen in crash reports only and I donot know a way to reproduce. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::updateScrollbarParts): 2011-09-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to. https://bugs.webkit.org/show_bug.cgi?id=67606 Reviewed by Noam Rosenthal. TiledBackingStore previously used different values for horizontal and vertial multiplication to calculate the cover area. This patch replaces this mechanism, used to give a bigger panning range to vertical panning, with the possibility to use the motion vector of the viewport to request tiles ahead instead. This allows economies on rendering resources as tiles won't be rendered beside the trajectory of the viewport. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers): (WebCore::TiledBackingStore::setCoverAreaFocusVector): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::calculateKeepRect): (WebCore::TiledBackingStore::calculateCoverRect): * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers): 2011-09-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy. https://bugs.webkit.org/show_bug.cgi?id=67416 Reviewed by Kenneth Rohde Christiansen. Original code by Antti Koivisto. With the current code, when the page is layouted during load, edge tiles will get removed instead of continuing to show their front buffer while the tile is being rendered for the new size. * platform/graphics/Tile.h: * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::resizeEdgeTiles): * platform/graphics/TiledBackingStore.h: * platform/graphics/qt/TileQt.cpp: (WebCore::TileQt::resize): * platform/graphics/qt/TileQt.h: 2011-09-07 Tim Horton <timothy_horton@apple.com> Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation https://bugs.webkit.org/show_bug.cgi?id=67242 <rdar://problem/10069770> Reviewed by Dirk Schulze. No new tests, minor performance improvement. * platform/graphics/transforms/AffineTransform.cpp: (WebCore::AffineTransform::blend): (WebCore::AffineTransform::decompose): (WebCore::AffineTransform::recompose): * platform/graphics/transforms/AffineTransform.h: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::clear2DRotation): 2011-09-06 Pavel Podivilov <podivilov@chromium.org> Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=67647 1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything. 2) Add RawSourceCode unit tests. 3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now). Reviewed by Yury Semikhatsky. Test: inspector/debugger/raw-source-code.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-07 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Implement circular tabbing through the Styles sidebar pane contents https://bugs.webkit.org/show_bug.cgi?id=67127 Reviewed by Yury Semikhatsky. * inspector/front-end/Section.js: (WebInspector.Section.prototype.get firstSibling): (WebInspector.Section.prototype.get lastSibling): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.nextEditableSibling): (WebInspector.StylePropertiesSection.prototype.previousEditableSibling): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection): 2011-09-02 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] expose console API https://bugs.webkit.org/show_bug.cgi?id=67506 Reviewed by Pavel Feldman. Test: inspector/extensions/extensions-console.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype.get text): (WebInspector.ConsoleMessage.prototype.get parameters): * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.InspectorExtensionAPI): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.Console.prototype.getMessages): (WebInspector.injectedExtensionAPI.Console.prototype.addMessage): (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel): (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent): (WebInspector.injectedExtensionAPI.Network): (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent): (WebInspector.injectedExtensionAPI.AuditCategoryImpl): (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent): (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent): (WebInspector.injectedExtensionAPI.InspectedWindow): * inspector/front-end/ExtensionCommon.js: (WebInspector.commonExtensionSymbols): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded): (WebInspector.ExtensionServer.prototype._onGetConsoleMessages): (WebInspector.ExtensionServer.prototype._onAddConsoleMessage): (WebInspector.ExtensionServer.prototype._makeConsoleMessage): (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter): (WebInspector.ExtensionServer.prototype._dispatchCallback): (WebInspector.ExtensionServer.prototype.initExtensions): 2011-09-05 Andrey Kosyakov <caseq@chromium.org> Web Inspector: disable popover when a mouse button is pressed https://bugs.webkit.org/show_bug.cgi?id=67610 Reviewed by Pavel Feldman. - disable popover when a mouse button is pressed - disable popover in a SourceFrame when the source is being edited * inspector/front-end/Popover.js: (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseUp): (WebInspector.PopoverHelper.prototype._mouseDown): (WebInspector.PopoverHelper.prototype._handleMouseAction): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._onHidePopover): (WebInspector.SourceFrame.prototype.doubleClick): 2011-09-07 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67634 De-virtualize styleForRenderer() Reviewed by Sam Weinig. This has performance and code clarity benefits. - move styleForRenderer from Node to Element - get rid of the now unnecessary NodeRenderingContext parameter - de-virtualize, add virtual customStyleForRenderer() * dom/Element.cpp: (WebCore::Element::customStyleForRenderer): (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): * dom/Element.h: * dom/Node.cpp: * dom/Node.h: (WebCore::Node::hasCustomWillOrDidRecalcStyle): (WebCore::Node::setHasCustomWillOrDidRecalcStyle): (WebCore::Node::hasCustomStyleForRenderer): (WebCore::Node::setHasCustomStyleForRenderer): Move styleForRenderer, add customStyleForRenderer, add a bit. * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): Handle non-element case separately since styleForRenderer was moved from Node to Element. * html/HTMLNoScriptElement.cpp: (WebCore::HTMLNoScriptElement::HTMLNoScriptElement): (WebCore::HTMLNoScriptElement::customStyleForRenderer): * html/HTMLNoScriptElement.h: Move a strange XHTMLMP special case to where it belongs. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::textWithDirection): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerElement::customStyleForRenderer): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): (WebCore::TextControlInnerTextElement::customStyleForRenderer): * html/shadow/TextControlInnerElements.h: * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::customStyleForRenderer): * rendering/svg/SVGShadowTreeElements.h: * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::customStyleForRenderer): * svg/SVGElement.h: Adopt customStyleForRenderer(). 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Change event is not fired for input[type=number] when the user reverts a change made by script https://bugs.webkit.org/show_bug.cgi?id=67697 Reviewed by Kent Tamura. The bug was caused by HTMLInputElement::setValue not calling setTextAsOfLastFormControlChangeEvent for text fields other than type=text. Also fixed a that stepUpFromRenderer does not call setTextAsOfLastFormControlChangeEvent at appropriate timing due to setValueAsNumber always passing sendChangeEvent=false to setValue by propagating values through setValueAsNumber and applyStep. This refactoring allows us to remove calls to dispatch* in stepUpFromRenderer because they're now called in setValueAsNumber or applyStep. Test: fast/forms/number-input-changeevent.html * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsNumber): * html/BaseDateAndTimeInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::applyStep): (WebCore::HTMLInputElement::stepUp): (WebCore::HTMLInputElement::stepDown): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setValueAsNumber): (WebCore::HTMLInputElement::stepUpFromRenderer): * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::setValueAsNumber): * html/InputType.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsNumber): * html/NumberInputType.h: * html/RangeInputType.cpp: (WebCore::RangeInputType::setValueAsNumber): (WebCore::RangeInputType::handleKeydownEvent): * html/RangeInputType.h: 2011-09-07 Antti Koivisto <antti@apple.com> Try to fix Qt build by moving the Qt specific include (which is not really allowed here!). Not reviewed. * css/CSSStyleSelector.cpp: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineLinkStateSlowCase): 2011-09-07 Antti Koivisto <antti@apple.com> Move SelectorChecker out from CSSStyleSelector scope https://bugs.webkit.org/show_bug.cgi?id=67648 Reviewed by Sam Weinig. - Move SelectorChecker to SelectorChecker.h/cpp - Make private functions private - Make members private, add accessors - Move m_sameOriginOnly to CSSStyleSelector as it is not used by SelectorChecker * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::CSSStyleSelector::sortMatchedRules): (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::matchUARules): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::CSSStyleSelector::styleForPage): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): (WebCore::CSSStyleSelector::checkSelector): (WebCore::RuleData::RuleData): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::checkForGenericFamilyChange): (WebCore::CSSStyleSelector::setFontSize): (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::style): (WebCore::CSSStyleSelector::parentStyle): (WebCore::CSSStyleSelector::rootElementStyle): (WebCore::CSSStyleSelector::element): (WebCore::CSSStyleSelector::fontDescription): (WebCore::CSSStyleSelector::parentFontDescription): (WebCore::CSSStyleSelector::setFontDescription): (WebCore::CSSStyleSelector::setZoom): (WebCore::CSSStyleSelector::setEffectiveZoom): (WebCore::CSSStyleSelector::setTextSizeAdjust): (WebCore::CSSStyleSelector::setStyle): (WebCore::CSSStyleSelector::fontSelector): (WebCore::CSSStyleSelector::allVisitedStateChanged): (WebCore::CSSStyleSelector::visitedStateChanged): (WebCore::CSSStyleSelector::usesSiblingRules): (WebCore::CSSStyleSelector::usesFirstLineRules): (WebCore::CSSStyleSelector::usesBeforeAfterRules): (WebCore::CSSStyleSelector::usesLinkRules): (WebCore::CSSStyleSelector::addMatchedRule): (WebCore::CSSStyleSelector::isRightPage): (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame): (WebCore::CSSStyleSelector::styleNotYetAvailable): * css/SelectorChecker.cpp: Added. (WebCore::SelectorChecker::SelectorChecker): (WebCore::linkAttribute): (WebCore::SelectorChecker::determineLinkStateSlowCase): (WebCore::SelectorChecker::checkSelector): (WebCore::SelectorChecker::fastCheckSelector): (WebCore::SelectorChecker::isFastCheckableSelector): (WebCore::addLocalNameToSet): (WebCore::createHtmlCaseInsensitiveAttributesSet): (WebCore::htmlAttributeHasCaseInsensitiveValue): (WebCore::attributeQualifiedNameMatches): (WebCore::attributeValueMatches): (WebCore::anyAttributeMatches): (WebCore::SelectorChecker::checkOneSelector): (WebCore::SelectorChecker::checkScrollbarPseudoClass): (WebCore::SelectorChecker::allVisitedStateChanged): (WebCore::SelectorChecker::visitedStateChanged): * css/SelectorChecker.h: Added. (WebCore::SelectorChecker::document): (WebCore::SelectorChecker::strictParsing): (WebCore::SelectorChecker::isCollectingRulesOnly): (WebCore::SelectorChecker::setCollectingRulesOnly): (WebCore::SelectorChecker::isMatchingVisitedPseudoClass): (WebCore::SelectorChecker::setMatchingVisitedPseudoClass): (WebCore::SelectorChecker::pseudoStyle): (WebCore::SelectorChecker::setPseudoStyle): (WebCore::SelectorChecker::hasUnknownPseudoElements): (WebCore::SelectorChecker::clearHasUnknownPseudoElements): (WebCore::SelectorChecker::determineLinkState): * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): * dom/SelectorQuery.h: 2011-09-07 Dmitry Lomov <dslomov@google.com> https://bugs.webkit.org/show_bug.cgi?id=67413 [Chromium]Web Inspector: inspected page with dedicated worker crashes on refresh. This patch enforces lifetime ordering between WorkerInspectorController and WorkerScriptController. Reviewed by Yury Semikhatsky. * workers/WorkerContext.cpp: (WebCore::WorkerContext::clearInspector): * workers/WorkerContext.h: * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94627 and r94632. http://trac.webkit.org/changeset/94627 http://trac.webkit.org/changeset/94632 https://bugs.webkit.org/show_bug.cgi?id=67698 It broke tests on GTK and Qt (Requested by Ossy on #webkit). * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-08-31 Yury Semikhatsky <yurys@chromium.org> fast/workers/worker-script-error.html fails on Chromium after r94061 https://bugs.webkit.org/show_bug.cgi?id=67206 Default action should be prevented if window.onerror returned true and stay not prevented otherwise. Reviewed by Dmitry Titov. Tests: fast/events/window-onerror14.html fast/events/window-onerror15.html fast/events/window-onerror16.html * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::invokeEventHandler): (WebCore::V8AbstractEventListener::shouldPreventDefault): allow specific event listeners to decide when to prevent default action based on the handler return value. * bindings/v8/V8AbstractEventListener.h: * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): (WebCore::V8WindowErrorHandler::shouldPreventDefault): * bindings/v8/V8WindowErrorHandler.h: * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): (WebCore::V8WorkerContextErrorHandler::shouldPreventDefault): * bindings/v8/V8WorkerContextErrorHandler.h: 2011-09-06 Xianzhu Wang <wangxianzhu@chromium.org> Replace usages of Vector<UChar> with existing StringBuilder https://bugs.webkit.org/show_bug.cgi?id=67079 Reviewed by Gavin Barraclough. No new tests. All existing unit tests and layout tests should run as before. * css/CSSOMUtils.cpp: (WebCore::appendCharacter): (WebCore::serializeCharacter): (WebCore::serializeCharacterAsCodePoint): (WebCore::serializeIdentifier): (WebCore::serializeString): * css/CSSOMUtils.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase): * css/CSSWrapShapes.cpp: (WebCore::CSSWrapShapeRect::cssText): (WebCore::CSSWrapShapeCircle::cssText): (WebCore::CSSWrapShapeEllipse::cssText): (WebCore::CSSWrapShapePolygon::cssText): * editing/HTMLInterchange.cpp: (WebCore::convertHTMLTextToInterchangeFormat): * editing/MarkupAccumulator.cpp: (WebCore::appendCharactersReplacingEntities): (WebCore::MarkupAccumulator::serializeNodes): (WebCore::MarkupAccumulator::appendStartTag): (WebCore::MarkupAccumulator::appendEndTag): (WebCore::MarkupAccumulator::concatenateMarkup): (WebCore::MarkupAccumulator::appendAttributeValue): (WebCore::MarkupAccumulator::appendCustomAttributes): (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): (WebCore::MarkupAccumulator::appendNodeValue): (WebCore::MarkupAccumulator::appendNamespace): (WebCore::MarkupAccumulator::appendText): (WebCore::MarkupAccumulator::appendComment): (WebCore::MarkupAccumulator::appendDocumentType): (WebCore::MarkupAccumulator::appendProcessingInstruction): (WebCore::MarkupAccumulator::appendElement): (WebCore::MarkupAccumulator::appendOpenTag): (WebCore::MarkupAccumulator::appendCloseTag): (WebCore::MarkupAccumulator::appendAttribute): (WebCore::MarkupAccumulator::appendCDATASection): (WebCore::MarkupAccumulator::appendStartMarkup): (WebCore::MarkupAccumulator::appendEndMarkup): * editing/MarkupAccumulator.h: * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendElement): (WebCore::StyledMarkupAccumulator::wrapWithNode): (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): (WebCore::StyledMarkupAccumulator::takeResults): (WebCore::StyledMarkupAccumulator::appendText): (WebCore::urlToMarkup): * html/DOMTokenList.cpp: (WebCore::DOMTokenList::removeToken): * html/HTMLFontElement.cpp: (WebCore::parseFontSize): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/CSSPreloadScanner.h: * html/parser/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * html/parser/HTMLEntityParser.h: * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTMLInteger): (WebCore::parseHTMLNonNegativeInteger): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::processEntity): (WebCore::HTMLTokenizer::nextToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo): (WebCore::HTMLTreeBuilder::defaultForInTableText): * html/parser/HTMLTreeBuilder.h: * inspector/InspectorValues.cpp: (WebCore::InspectorValue::toJSONString): (WebCore::InspectorValue::writeJSON): (WebCore::InspectorBasicValue::writeJSON): (WebCore::InspectorString::writeJSON): (WebCore::InspectorObject::writeJSON): (WebCore::InspectorArray::writeJSON): * inspector/InspectorValues.h: * loader/CrossOriginAccessControl.cpp: (WebCore::createAccessControlPreflightRequest): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): * page/Chrome.cpp: (WebCore::Chrome::setToolTip): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendText): (WebCore::SerializerMarkupAccumulator::appendElement): (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::toString): * platform/KURL.cpp: (WebCore::KURL::deprecatedString): (WebCore::decodeURLEscapeSequences): * platform/LinkHash.cpp: (WebCore::squeezeOutNullCharacters): (WebCore::cleanSlashDotDotSlashes): (WebCore::mergeDoubleSlashes): (WebCore::cleanSlashDotSlashes): (WebCore::cleanPath): (WebCore::visitedURLInline): (WebCore::visitedURL): (WebCore::visitedLinkHash): * platform/LinkHash.h: * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::setURL): * platform/network/HTTPParsers.cpp: (WebCore::extractMIMETypeFromMediaType): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode): * platform/text/TextStream.cpp: (WebCore::TextStream::operator<<): (WebCore::TextStream::release): * platform/text/TextStream.h: * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): * rendering/InlineTextBox.cpp: (WebCore::adjustCharactersAndLengthForHyphen): * rendering/InlineTextBox.h: (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::markerTextWithSuffix): * rendering/RenderListMarker.cpp: (WebCore::toSymbolic): (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::suffix): * rendering/RenderTreeAsText.cpp: (WebCore::quoteAndEscapeNonPrintables): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::decodeString): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::getAllResponseHeaders): * xml/XPathFunctions.cpp: (WebCore::XPath::FunId::evaluate): (WebCore::XPath::FunConcat::evaluate): * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): * xml/XSLTProcessorLibxslt.cpp: (WebCore::writeToStringBuilder): (WebCore::saveResultToString): * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::unconsumeCharacters): (WebCore::consumeCharacterReference): * xml/parser/XMLCharacterReferenceParser.cpp: (WebCore::consumeXMLCharacterReference): * xml/parser/XMLCharacterReferenceParser.h: * xml/parser/XMLTokenizer.cpp: (WebCore::XMLTokenizer::nextToken): 2011-09-05 Kent Tamura <tkent@chromium.org> REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset https://bugs.webkit.org/show_bug.cgi?id=67567 Reviewed by Dimitri Glazkov. - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue(). - Clear m_icon in FileInputType::setValue(). Tests: fast/forms/file/file-reset-in-change-expected.html fast/forms/file/file-reset-in-change.html * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): Implemenation for the "default" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): Implemenation for the "default/on" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on * html/BaseCheckableInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): Implemenation for the "filename" mode, and clearing m_icon. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Move some code to InputType::setValue(). (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue(). * html/HTMLInputElement.h: * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): Implementation for the "default" mode. * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): Implementation for the "value" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): In addition to the "value" mode processing, updates placeholder visibililty. * html/TextFieldInputType.h: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): The inner text value of an input element is not updated when input.value is set https://bugs.webkit.org/show_bug.cgi?id=67681 Reviewed by Kent Tamura. The bug was caused by HTMLInputElement::setValue's not clearing m_suggestedValue before updateInnerTextValue is called. Since updateInnerTextValue uses the suggested value when one is present, we need to clear m_suggestedValue in advance. Test: fast/forms/suggested-value-after-setvalue.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): 2011-09-06 Adam Barth <abarth@webkit.org> Attempt to fix GTK build. * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: (WebKit::createHTMLElementWrapper): 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> fast/forms/suggested-value-crash.html crashes on Windows https://bugs.webkit.org/show_bug.cgi?id=67688 Reviewed by Adam Barth. The crash was caused because functions in internals were accessing uninitialized QualifiedNames. Fixed the bug by avoiding to link to inputTag and textareaTag. Instead, we resort to toInputElement and string comparison. * testing/Internals.cpp: (WebCore::Internals::wasLastChangeUserEdit): (WebCore::Internals::suggestedValue): (WebCore::Internals::setSuggestedValue): 2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. No new tests. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::finishCreation): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::finishCreation): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): (JSC::RuntimeMethod::finishCreation): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-09-06 Luke Macpherson <macpherson@chromium.org> Implement list style properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=67103 Reviewed by Eric Seidel. No new tests / no behavioral changes. * css/CSSStyleApplyProperty.cpp: Add class to wrap call to CSSStyleSelector::styleImage(). (WebCore::ApplyPropertyStyleImage::ApplyPropertyStyleImage): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize handlers for list style properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing property implementations. 2011-09-06 Alexis Menard <alexis.menard@openbossa.org> [Qt] Move away from QPointer as it is slow and it has a replacement QWeakPointer. https://bugs.webkit.org/show_bug.cgi?id=67673 Reviewed by Ariya Hidayat. Move away from QPointer to QWeakPointer, it is faster. No new tests, the existing ones should cover. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getClass): (JSC::Bindings::QtField::name): (JSC::Bindings::QtField::valueFromInstance): * bridge/qt/qt_instance.h: (JSC::Bindings::QtInstance::getObject): * bridge/qt/qt_runtime.h: * platform/qt/SharedTimerQt.cpp: (WebCore::SharedTimerQt::inst): 2011-09-06 Oliver Hunt <oliver@apple.com> Update expected results of bindings tests. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::createStructure): (WebCore::JSTestInterface::createPrototype): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::createStructure): (WebCore::JSTestInterfacePrototype::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): (WebCore::JSTestMediaQueryListListener::createPrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure): (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::createStructure): (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure): (WebCore::JSTestObjPrototype::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): (WebCore::JSTestSerializedScriptValueInterface::createPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure): (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): 2011-09-06 Eric Seidel <eric@webkit.org> Remove window.HTMLBlockquoteElement per HTML5 (and DOM Core 1) https://bugs.webkit.org/show_bug.cgi?id=67678 Reviewed by Darin Adler. This is why we can't have nice things. There was some confusion in the original DOM HTML 1 spec about the existence of HTMlBlockquoteElement which was clarified by a later errata, removing HTMLBlockquoteElement: http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html "This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements" Le sigh. Personally I think having a separate HTMLBlockquoteElement is clearer, but thats not how the web works. Removed it and updated test results. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * editing/IndentOutdentCommand.cpp: * html/HTMLBlockquoteElement.cpp: Removed. * html/HTMLBlockquoteElement.h: Removed. * html/HTMLBlockquoteElement.idl: Removed. * html/HTMLElementsAllInOne.cpp: * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::HTMLQuoteElement): (WebCore::HTMLQuoteElement::insertedIntoDocument): * html/HTMLTagNames.in: * page/DOMWindow.idl: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> Rename confirmCompositionWithoutDisturbingSelection to cancelComposition https://bugs.webkit.org/show_bug.cgi?id=67569 Reviewed by Antonio Gomes. Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition. Also renamed the shared function from confirmComposition to setComposition. * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::confirmComposition): (WebCore::Editor::cancelComposition): (WebCore::Editor::setComposition): * editing/Editor.h: 2011-09-06 Sam Weinig <sam@webkit.org> WebVTTTokenizer files in the wrong place in the Xcode project. * WebCore.xcodeproj/project.pbxproj: Move WebVTTTokenizer files so they are in the right place in the project. 2011-09-06 Chris Rogers <crogers@google.com> MediaElementAudioSourceNode destruction triggers ASSERTS https://bugs.webkit.org/show_bug.cgi?id=67665 Reviewed by Nate Chapin. Test: webaudio/mediaelementaudiosourcenode-gc.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setAudioSourceNode): * webaudio/AudioContext.cpp: (WebCore::AudioContext::uninitializeDispatch): (WebCore::AudioContext::stop): * webaudio/AudioContext.h: 2011-09-05 Oliver Hunt <oliver@apple.com> An object's structure should reference the global object responsible for its creation https://bugs.webkit.org/show_bug.cgi?id=67624 Reviewed by Gavin Barraclough. Update calls to Structure::create() to pass the globalObject in, and update the CodeGenerator to generate appropriate createStructure methods. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): (WebCore::getDOMStructure): * bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure): (WebCore::getDOMConstructor): * bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::createStructure): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure): * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure): * bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure): 2011-09-06 Anders Carlsson <andersca@apple.com> Move NPAPI headers in bridge to plugins https://bugs.webkit.org/show_bug.cgi?id=67661 Reviewed by Darin Adler. * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Update build systems. * bridge/npapi.h: Removed. * bridge/npruntime.h: Removed. * bridge/nptypes.h: Removed. * plugins/npapi.h: Copied from Source/WebCore/bridge/npapi.h. * plugins/npruntime.h: Copied from Source/WebCore/bridge/npruntime.h. * plugins/nptypes.h: Copied from Source/WebCore/bridge/nptypes.h. 2011-09-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67672 Improve background-size parsing. Make it actually dump auto values properly, and also make it omit auto if it is the second value. Fix the parsing to not create a value list when only a singleton value is specified. Reviewed by Beth Dakin. Covered well by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::fillSizeToCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseFillSize): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapFillSize): 2011-09-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67657 Implement border-image-width. This patch stops short of converting -webkit-border-image to a shorthand. I'll do that in the next patch. Note that unlike the -webkit-border-image syntax, border-image-width does not actually set the border width values. It simply makes cuts into the border image drawing area (which for now is just the border box, but that will change once border-image-outset is implemented). This means we need additional storage for the slices, since they are now separate from the border widths. For backwards compatibility, -webkit-border-image will continue to set the border widths when border-image-width is specified in the -webkit-border-image shorthand. Reviewed by Beth Dakin. Added new tests in fast/borders. * css/CSSBorderImageSliceValue.cpp: (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::cssText): * css/CSSBorderImageSliceValue.h: (WebCore::CSSBorderImageSliceValue::create): (WebCore::CSSBorderImageSliceValue::slices): Rename slices() to imageSlices() and add borderSlices() and m_borderSlices to hold the desired cuts for the border image drawing area. Converted the slices over to the new Quad primitive value (a RectBase subclass that is identical to Rect but dumps as a quad instead of a rect primitive). * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Make CSSBorderImageValue take the border slices during construction now. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageWidth): (WebCore::valueForNinePieceImageRepeat): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for computed style via valueForNinePieceImageWidth. Patch all of the border image properties to dump the most compact form possible for the property values, e.g., "stretch stretch" becomes "stretch." * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseReflect): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): (WebCore::isBorderImageRepeatKeyword): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::BorderImageWidthParseContext::BorderImageWidthParseContext): (WebCore::BorderImageWidthParseContext::allowNumber): (WebCore::BorderImageWidthParseContext::allowFinalCommit): (WebCore::BorderImageWidthParseContext::top): (WebCore::BorderImageWidthParseContext::commitNumber): (WebCore::BorderImageWidthParseContext::setAllowFinalCommit): (WebCore::BorderImageWidthParseContext::setTop): (WebCore::BorderImageWidthParseContext::commitBorderImageWidth): (WebCore::CSSParser::parseBorderImageWidth): * css/CSSParser.h: Modify the border-image code to pass off border-image-width parsing to parseBorderImageWidth. * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::init): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getQuadValue): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getQuadValue): Add the new Quad value to CSSPrimitiveValue. * css/CSSPropertyNames.in: Add the new properties for border-image-width and -webkit-mask-box-image-width. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageSlice): (WebCore::CSSStyleSelector::mapNinePieceImageWidth): (WebCore::CSSStyleSelector::loadPendingImages): * css/CSSStyleSelector.h: Add the code to map the image width into border slices. * css/Rect.h: (WebCore::RectBase::top): (WebCore::RectBase::right): (WebCore::RectBase::bottom): (WebCore::RectBase::left): (WebCore::RectBase::setTop): (WebCore::RectBase::setRight): (WebCore::RectBase::setBottom): (WebCore::RectBase::setLeft): (WebCore::RectBase::RectBase): (WebCore::RectBase::~RectBase): (WebCore::Rect::create): (WebCore::Rect::Rect): (WebCore::Quad::create): (WebCore::Quad::Quad): Adding the new Quad value. * rendering/RenderBoxModelObject.cpp: (WebCore::computeBorderImageSide): (WebCore::RenderBoxModelObject::paintNinePieceImage): Modify painting to treat the border slices as separate from the border widths. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::imageSlices): (WebCore::NinePieceImage::setImageSlices): (WebCore::NinePieceImage::borderSlices): (WebCore::NinePieceImage::setBorderSlices): (WebCore::NinePieceImage::copyImageSlicesFrom): (WebCore::NinePieceImage::copyBorderSlicesFrom): * rendering/style/StyleRareNonInheritedData.cpp: Add the border slices. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleReflection.h: (WebCore::StyleReflection::StyleReflection): Make sure masks and reflections default border-image-width to auto instead of 1, since that matches old behavior. 2011-09-06 Noel Gordon <noel.gordon@gmail.com> [chromium skia] JPEGImageEncoder: hoist constants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=67589 Reviewed by Kenneth Russell. Change the row converter function signatures to be the same. Call them via a function pointer during the encoding loop. Minor webkit style cleanup, remove unused include. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: Remove SkUnPreMultiply.h (not used). (WebCore::preMultipliedBGRAtoRGB): Use unsigned char* instead of void* for pixels. (WebCore::RGBAtoRGB): pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature. (WebCore::encodePixels): Move constants out of the encoding loop: use a function pointer to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures), define and use pixelRowStride constant. (WebCore::JPEGImageEncoder::encode): 2011-09-06 Aaron Colwell <acolwell@chromium.org> Allow MediaSource API to be enabled at runtime. https://bugs.webkit.org/show_bug.cgi?id=67306 Reviewed by Eric Carlson. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitMediaSourceEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitMediaSourceEnabled): * html/HTMLMediaElement.idl: 2011-09-06 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::skiaDrawText): * platform/graphics/skia/SkiaFontWin.h: 2011-09-06 Nat Duca <nduca@chromium.org> [chromium] REGRESSION(94353): requestAnimationFrame not throttled in compositing path https://bugs.webkit.org/show_bug.cgi?id=67621 CCSingleThreadProxy should not perform layout when called via the compositeImmediately path. Doing so makes it look like frame rate is unbounded. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::compositeImmediately): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium https://bugs.webkit.org/show_bug.cgi?id=67453 Reviewed by Kent Tamura. Fixed the bug by updating inner text value in setSuggestedValue. Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes. Test: fast/forms/suggested-value.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::suggestedValue): (WebCore::Internals::setSuggestedValue): * testing/Internals.h: * testing/Internals.idl: 2011-09-06 Eric Carlson <eric.carlson@apple.com> load() does not reset the resource selection algorithm https://bugs.webkit.org/show_bug.cgi?id=64917 Reviewed by Darin Adler. Test: media/video-source-load.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): Reset m_nextChildNodeToConsider, update comments and rearrange logic to more closely match logic in spec. (WebCore::HTMLMediaElement::noneSupported): Update comments. 2011-09-06 Abhishek Arya <inferno@chromium.org> Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: 2011-09-06 Robin Cao <robin.cao@torchmobile.com.cn> [skia] States of GraphicsContext may never be restored after clipToImageBuffer https://bugs.webkit.org/show_bug.cgi?id=67358 beginLayerClippedToImage/applyClipFromImage are mismatched when clipping to an empty ImageBuffer, which will make states of GraphicsContext incorrect. Reviewed by James Robinson. Test: fast/repaint/background-clip-text.html * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::beginLayerClippedToImage): 2011-09-06 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Do not allocate memory for extremely large surfaces. https://bugs.webkit.org/show_bug.cgi?id=65192 Reviewed by Martin Robinson. So far, RenderThemeEfl tried to allocate a buffer and a cairo surface the size of the whole form element passed to it. In the case of fast/overflow/overflow-height-float-not-removed-crash.html and others, this meant extremely large widgets, which crashed the code. We now only render the widgets if they are smaller than some hardcoded and sufficiently large values which should work in most cases. No new tests, as this was uncovered by existing ones. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::isFormElementTooLargeToDisplay): (WebCore::RenderThemeEfl::cacheThemePartNew): (WebCore::RenderThemeEfl::paintThemePart): * platform/efl/RenderThemeEfl.h: 2011-08-30 Pavel Podivilov <podivilov@chromium.org> Web Inspector: implement source map v3 consumer. https://bugs.webkit.org/show_bug.cgi?id=67205 Reviewed by Yury Semikhatsky. Test: inspector/debugger/compiler-source-mapping.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/CompilerSourceMapping.js: Added. (WebInspector.CompilerSourceMapping): (WebInspector.CompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.CompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.CompilerSourceMapping.prototype.get sources): (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.ClosureCompilerSourceMapping.prototype.get sources): (WebInspector.ClosureCompilerSourceMapping.prototype._findMapping): (WebInspector.ClosureCompilerSourceMapping.prototype._parsePayload): (WebInspector.ClosureCompilerSourceMapping.prototype._isSeparator): (WebInspector.ClosureCompilerSourceMapping.prototype._decodeVLQ): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.next): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.peek): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.hasNext): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-05 Pavel Podivilov <podivilov@chromium.org> Web Inspector: re-implement RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=67609 RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): 2011-09-06 Csaba Osztrogonác <ossy@webkit.org> Unreviewed, rolling out r94564. http://trac.webkit.org/changeset/94564 https://bugs.webkit.org/show_bug.cgi?id=67555 It broke many tests * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): 2011-09-06 Rob Buis <rbuis@rim.com> use after free in WebCore::SVGTRefElement::updateReferencedText https://bugs.webkit.org/show_bug.cgi?id=67555 Reviewed by Nikolas Zimmermann. Do not install event listener if tref is not part of any document. Test: svg/custom/tref-clone-crash.html * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): 2011-09-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94560. http://trac.webkit.org/changeset/94560 https://bugs.webkit.org/show_bug.cgi?id=67636 It made inspector/debugger/script-formatter.html flakey (Requested by Ossy on #webkit). * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.set reset): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.PresenationCallFrame.prototype.select): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.didRequestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype._setContentProvider): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._reload): (WebInspector.RawSourceCode.prototype._requestContent): (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.RawSourceCode.prototype._didRequestContent): (WebInspector.RawSourceCode.prototype._hasPendingResource): (WebInspector.FormattedContentProvider): (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent): (WebInspector.FormattedContentProvider.prototype.requestContent): 2011-09-06 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67480 [Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing Reviewed by Dimitri Glazkov. The text node needs willRecalcStyle mechanism too. * dom/Text.cpp: (WebCore::Text::recalcTextStyle): * dom/Text.h: (WebCore::Text::willRecalcTextStyle): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): (WebCore::SVGShadowText::SVGShadowText): (WebCore::SVGShadowText::willRecalcTextStyle): 2011-09-05 Pavel Podivilov <podivilov@chromium.org> Web Inspector: re-implement RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=67609 RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): 2011-09-06 Dirk Schulze <krit@webkit.org> Return to transform multiplication: motion transform * other transforms https://bugs.webkit.org/show_bug.cgi?id=67601 Reviewed by Nikolas Zimmermann. Right now we take the current transform of a transformable SVG element, post multiply the animation transform and post multiply the motion transform to the other both: transform * animation transform * motion transform We switched to this behavior with the clean up of AffineTransform. While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to: motion transform * transform * animation transform This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms on the SVG WG, their is a consense that the current specified behavior is unwanted. See http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details. We pass the following tests of the official W3C SVG test suite again now: - animate-elem-24-t.svg - animate-elem-30-t.svg * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::animatedLocalTransform): 2011-09-05 Adam Barth <abarth@webkit.org> window.HTMLSpanElement does not exist https://bugs.webkit.org/show_bug.cgi?id=67571 Reviewed by Sam Weinig. We have these objects for most other elements and HTMLSpanElement exists in Firefox and in the HTML5 spec. This patch adds it. Test: fast/dom/wrapper-classes.html * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLElementsAllInOne.cpp: * html/HTMLSpanElement.cpp: Added. (WebCore::HTMLSpanElement::HTMLSpanElement): (WebCore::HTMLSpanElement::create): * html/HTMLSpanElement.h: Added. * html/HTMLSpanElement.idl: Added. * html/HTMLTagNames.in: * page/DOMWindow.idl: 2011-09-04 Abhishek Arya <inferno@chromium.org> Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html fast/ruby/ruby-block-style-not-updated.html fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html fast/ruby/ruby-inline-style-not-updated.html fast/table/table-row-style-not-updated-with-after-content.html fast/table/table-row-style-not-updated-with-before-content.html fast/table/table-row-style-not-updated.html fast/table/table-style-not-updated.html * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: (WebCore::RenderObject::isBeforeAfterContent): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::styleDidChange): (WebCore::RenderRubyAsBlock::styleDidChange): * rendering/RenderRuby.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): (WebCore::RenderTableSection::addChild): * rendering/RenderTableSection.h: 2011-09-05 Abhishek Arya <inferno@chromium.org> Crash in RenderObjectChildList::destroyLeftOverChildren() https://bugs.webkit.org/show_bug.cgi?id=64753 Reviewed by James Robinson. If any of the ancestors between column span element and containing column's block is a continuation, then don't attempt to render the column span by splitting the block into continuations. Test: fast/multicol/column-span-parent-continuation-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::columnsBlockForSpanningElement): 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94537. http://trac.webkit.org/changeset/94537 https://bugs.webkit.org/show_bug.cgi?id=67618 Does not compile on Chromium Mac (Requested by abarth_ on #webkit). * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::preMultipliedBGRAtoRGB): (WebCore::RGBAtoRGB): (WebCore::encodePixels): (WebCore::JPEGImageEncoder::encode): 2011-09-05 Noel Gordon <noel.gordon@gmail.com> [chromium skia] JPEGImageEncoder: hoist contants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=67589 Reviewed by Adam Barth. Change the row converter function signatures to be the same. Call them via a function pointer during the encoding loop. Minor webkit stlye cleanup, remove unused include. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: Remove SkUnPreMultiply.h (not used). (WebCore::preMultipliedBGRAtoRGB): Use unsigned char* instead of void* for pixels. (WebCore::RGBAtoRGB): pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature. (WebCore::encodePixels): Move contants out of the encoding loop: use a function pointer to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures) during the image row encoding loop. Add/use pixelRowStride constant. (WebCore::JPEGImageEncoder::encode): webkit style: no need to split lines. 2011-09-05 John Knottenbelt <jknotten@chromium.org> Take pageScaleFactor into account for MouseRelatedEvents. https://bugs.webkit.org/show_bug.cgi?id=67592 Reviewed by Dimitri Glazkov. Test: fast/events/page-scaled-mouse-click.html * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2011-09-02 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename RawSourceCode.reload to contentEdited. https://bugs.webkit.org/show_bug.cgi?id=67504 Make RawSourceCode.reload private and remove RawSourceCode.content getter and setter (RawSourceCode isn't supposed to have any content). Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._reload): (WebInspector.RawSourceCode.prototype._didRequestContent): 2011-09-05 Leandro Gracia Gil <leandrogracia@chromium.org> Fix the regression of bug 65333 introduced by 60170. This caused the speech input bubble to appear in the wrong side for RTL text inputs. https://bugs.webkit.org/show_bug.cgi?id=67597 Reviewed by Tony Gentilcore. No new tests. Fixing regression. * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): 2011-09-05 Alexander Pavlov <apavlov@chromium.org> Web Inspector: F5 results in a Web Inspector frontend reload on non-Macs https://bugs.webkit.org/show_bug.cgi?id=67602 Reviewed by Yury Semikhatsky. * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94525. http://trac.webkit.org/changeset/94525 https://bugs.webkit.org/show_bug.cgi?id=67599 WinCE compilation failed. (Requested by loislo on #webkit). * platform/text/TextBoundaries.cpp: * platform/text/TextBreakIteratorICU.cpp: * platform/text/qt/TextBoundariesQt.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2011-09-05 Alexander Færøy <alexander.faeroy@nokia.com> [Qt] Compiling using system ICU uses QTextBreakIterator in some cases. https://bugs.webkit.org/show_bug.cgi?id=67391 Reviewed by Kenneth Rohde Christiansen. * platform/text/TextBoundaries.cpp: * platform/text/TextBreakIteratorICU.cpp: * platform/text/qt/TextBoundariesQt.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2011-09-05 Kaustubh Atrawalkar <kaustubh@motorola.com> Logic from HTMLElement::deprecatedCreateContextualFragment moved into Range::createContextualFragment function. https://bugs.webkit.org/show_bug.cgi?id=67056 Reviewed by Ryosuke Niwa. Code Refactoring for deprecatedCreateContextualFragment. No new tests. Code Re-factoring. * dom/Element.cpp: * dom/Element.h: * dom/Range.cpp: (WebCore::insertIntoFragment): (WebCore::Range::createDocumentFragmentForElement): (WebCore::Range::createContextualFragment): * dom/Range.h: * editing/markup.cpp: (WebCore::createFragmentFromMarkup): * html/HTMLElement.cpp: * html/HTMLElement.h: 2011-09-04 James Kozianski <koz@chromium.org> Unreviewed, rolling out r94510. http://trac.webkit.org/changeset/94510 https://bugs.webkit.org/show_bug.cgi?id=66531 Causes layout test crashes. * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::wrapWithRenderFullScreen): (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (RenderFullScreen::createFullScreenStyle): * rendering/RenderFullScreen.h: 2011-09-04 Abhishek Arya <inferno@chromium.org> Unreviewed. Compile fix for r94511. * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-09-04 Abhishek Arya <inferno@chromium.org> Crash in Range::processAncestorsAndTheirSiblings. https://bugs.webkit.org/show_bug.cgi?id=67556 Reviewed by Ryosuke Niwa. Create a temporary RefPtr Node vector to keep all the ancestor's childs so that we don't access removed child nodes. Test: fast/dom/Range/range-delete-contents-event-fire-crash.html * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-09-04 Jeremy Apthorp <jeremya@google.com> Don't detach elements from the render tree when entering fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=66531 This prevents plugin instances from being destroyed and reinstantiated when entering fullscreen mode. Reviewed by Darin Fisher. Test: plugins/fullscreen-plugins-dont-reload.html * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): (RenderFullScreen::wrapRenderer): (RenderFullScreen::unwrapRenderer): * rendering/RenderFullScreen.h: 2011-09-04 Dan Bernstein <mitz@apple.com> <rdar://problem/10071256> Retain retired custom fonts until the next style recalc Reviewed by Darin Adler. Test: fast/css/font-face-used-after-retired.html During style recalc, existing renderers may reference their old style, including font data. Allow them to do so safely by keeping retired custom font data around until after style recalc. * css/CSSFontFace.cpp: (WebCore::CSSFontFace::retireCustomFont): Added. Calls through to CSSFontSelector, if the font face is still part of any segmented font face. Otherwise, deletes the custom font data. * css/CSSFontFace.h: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::pruneTable): Changed to call retireCustomFont() instead of deleting retired font data. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::retireCustomFont): Added. Calls through to the Document, if this is still the active font selector for a document. Otherwise, deletes the custom font data. * css/CSSFontSelector.h: * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::pruneTable): Changed to call retireCustomFont() instead of deleting retired font data. * dom/Document.cpp: (WebCore::Document::~Document): Added a call to deleteRetiredCustomFonts(), in case the Document is destroyed before getting a chance to recalc style after custom fonts have been retired. (WebCore::Document::recalcStyle): Added a call to deleteRetiredCustomFonts() after style recalc. (WebCore::Document::deleteRetiredCustomFonts): Added. Deletes all previously-retired custom font data. * dom/Document.h: (WebCore::Document::retireCustomFont): Added. 2011-09-04 Sam Weinig <sam@webkit.org> Document.createEvent should support all the interfaces of Event we got https://bugs.webkit.org/show_bug.cgi?id=67568 Reviewed by Anders Carlsson. Updated fast/events/event-creation.html * dom/BeforeLoadEvent.h: (WebCore::BeforeLoadEvent::create): (WebCore::BeforeLoadEvent::BeforeLoadEvent): Added empty create. * dom/Document.cpp: (WebCore::Document::createEvent): Add missing interfaces. * dom/HashChangeEvent.h: (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::HashChangeEvent): Added empty create. * page/SpeechInputEvent.cpp: (WebCore::SpeechInputEvent::create): (WebCore::SpeechInputEvent::SpeechInputEvent): (WebCore::SpeechInputEvent::~SpeechInputEvent): * page/SpeechInputEvent.h: Added empty create. 2011-09-04 Adam Barth <abarth@webkit.org> [Chromium] Add memory threshold values to WebKitPlatformSupport.h https://bugs.webkit.org/show_bug.cgi?id=67575 Reviewed by Darin Fisher. Grab these memory thresholds from PlatformSupport rather than hard-coding them. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * platform/chromium/PlatformSupport.h: * platform/qt/PlatformSupport.h: (WebCore::PlatformSupport::lowMemoryUsageMB): (WebCore::PlatformSupport::highMemoryUsageMB): (WebCore::PlatformSupport::highUsageDeltaMB): 2011-09-04 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Add new / moved files missing from last commit. * platform/wx/LocalDC.h: Added. (WebCore::LocalDC::LocalDC): (WebCore::LocalDC::context): (WebCore::LocalDC::~LocalDC): * platform/wx/wxcode/cairo: Added. * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added. (WebCore::pangoFontMap): (WebCore::createPangoFontForFont): (WebCore::createScaledFontForFont): (WebCore::pango_font_get_glyph): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gdiplus: Added. * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added. (dmin): (dmax): (DegToRad): (RadToDeg): (WebCore::drawTextWithSpacing): 2011-09-04 Robin Dunn <robin@alldunn.com> [wx] Enable wxWebKit to run using the wxGC Cairo backend on platforms other than GTK. https://bugs.webkit.org/show_bug.cgi?id=67577 Reviewed by Kevin Ollivier. * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::glyphAt): (WebCore::GlyphBuffer::add): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipPath): * platform/graphics/wx/PathWx.cpp: (WebCore::Path::Path): (WebCore::Path::clear): * platform/graphics/wx/TransformationMatrixWx.cpp: (WebCore::TransformationMatrix::operator wxGraphicsMatrix): (WebCore::AffineTransform::operator wxGraphicsMatrix): * platform/image-decoders/wx/ImageDecoderWx.cpp: (WebCore::ImageFrame::asNewNativeImage): * platform/wx/ContextMenuWx.cpp: (ContextMenu::ContextMenu): * platform/wx/LocalDC.h: Added. (WebCore::LocalDC::LocalDC): (WebCore::LocalDC::context): (WebCore::LocalDC::~LocalDC): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderThemeWx::paintButton): (WebCore::RenderThemeWx::paintTextField): (WebCore::RenderThemeWx::paintMenuList): (WebCore::RenderThemeWx::paintMenuListButton): * platform/wx/ScrollbarThemeWx.cpp: (WebCore::ScrollbarThemeWx::paint): * platform/wx/wxcode/cairo: Added. * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added. (WebCore::pangoFontMap): (WebCore::createPangoFontForFont): (WebCore::createScaledFontForFont): (WebCore::pango_font_get_glyph): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gdiplus: Added. * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added. (dmin): (dmax): (DegToRad): (RadToDeg): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Removed. * platform/wx/wxcode/win/non-kerned-drawing.cpp: Removed. * platform/wx/wxcode/win/scrollbar_render.cpp: (GraphicsHDC::GraphicsHDC): (GraphicsHDC::~GraphicsHDC): (wxRenderer_DrawScrollbar): 2011-09-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> REGRESSION (r86268): Fix for qt_networkAccessAllowed() https://bugs.webkit.org/show_bug.cgi?id=67570 Reviewed by Noam Rosenthal. No new tests as this change only removes dead code. Support for Qt 4.6 has been removed a while back. * WebCore.pri: * WebCore.pro: * features.pri: * platform/network/NetworkStateNotifier.h: * platform/network/qt/NetworkStateNotifierQt.cpp: 2011-09-03 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): selection-change-closes-typing.html fails https://bugs.webkit.org/show_bug.cgi?id=67377 Reviewed by Kent Tamura. The problem was that when the shadow DOM is updated by setInnerTextValue, WebKit layer detects the selection change and calls confirmCompositionWithoutDisturbingSelection, which in turn modifies the shadow DOM by inserting text. Fixed the bug by not inserting text in confirmCompositionWithoutDisturbingSelection. It turned out that this function is only used to cancel composition but never to confirming composition and restoring selection. Test: platform/mac/editing/input/selection-change-closes-typing-2.html * editing/Editor.cpp: (WebCore::Editor::confirmCompositionWithoutDisturbingSelection): (WebCore::Editor::confirmComposition): 2011-09-03 Sam Weinig <sam@webkit.org> Add missing Event constructors to DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=67449 Reviewed by Anders Carlsson. Covered by existing tests. * page/DOMWindow.idl: 2011-08-27 Robert Hogan <robert@webkit.org> div align="center" rendering problem https://bugs.webkit.org/show_bug.cgi?id=4860 Reviewed by David Hyatt. When an inline element with absolute position was the sole or first child of a render block with centred alignment, it wasn't obeying its parent's alignment. However it would obey the alignment if it was preceded by some text. The problem was that the element's render object was getting skipped as leading white space, so it was not included in a normal line block in a bidi run. Instead, its position was getting set by RenderBlockLineLayout::setStaticPositions() which does not pay attention to alignment. Preceding the element with some text allowed the object to get included in a Bidi run and so get a linebox which would get properly aligned. The fix is to get RenderBlockLineLayout::setStaticPositions() to obey the alignment specified by the object's container. This allows WebKit to get the same result on the test as Firefox and IE. Opera has the same bug as unpatched WebKit. Tests: fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html - Ensure positioned block elements inherit alignment. fast/css/bug4860-absolute-inline-child-inherits-alignment.html - Ensure positioned inline elements inherit alignment. fast/inline/absolute-positioned-inline-in-centred-block.html - Ensure positioned inline element that's the sole or first child of a rendered block obeys parents alignment. fast/inline/absolute-positioned-block-in-centred-block.html - As above, but a positioned block should not inherit alignment. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine and use startAlignedOffsetForBlock (WebCore::RenderBlock::startAlignedOffsetForLine): New function, find the aligned offset using updateLogicalWidthForAlignment 2011-09-03 Andreas Kling <kling@webkit.org> Remove two unused functions from Element. https://bugs.webkit.org/show_bug.cgi?id=67492 Reviewed by Benjamin Poulain. Removed openTagStartToString() and setCStringAttribute() as they are not called from anywhere. * dom/Element.cpp: * dom/Element.h: 2011-09-03 Andrew Wason <rectalogic@rectalogic.com> [Qt] Enable support for WebGL OES_standard_derivatives for Qt https://bugs.webkit.org/show_bug.cgi?id=67430 Reviewed by Noam Rosenthal. Tested using https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/extensions/oes-standard-derivatives.html Enable existing support for OES_standard_derivatives for Qt. * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::ensureEnabled): (WebCore::Extensions3DOpenGL::isEnabled): 2011-09-03 Yuta Kitamura <yutak@chromium.org> WebSocket: Send ArrayBuffer as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67477 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/send-arraybuffer.html http/tests/websocket/tests/hybi/workers/send-arraybuffer.html http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::sendRequestResult): (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult): * websockets/ThreadableWebSocketChannelClientWrapper.h: Rename "sent" to "sendRequestResult" to clarify the meaning. Messages from the script may not be sent immediately, thus the return value of WebSocketChannel::send() indicates whether the message has been queued successfully, rather than whether the message has been sent or not. * websockets/WebSocket.cpp: (WebCore::WebSocket::send): Case of sending "[object ArrayBuffer]" is covered by an existing test http/tests/websocket/tests/{hybi,hixie76}/send-object.html. * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::workerContextDidSend): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Construct an ArrayBuffer from the data on Vector<char>. (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Copy the content into temporary buffer of Vector<char>, and send it to the main thread. * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Kentaro Hara <haraken@google.com> Implement a CustomEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67527 Reviewed by Sam Weinig. Test: fast/events/constructors/custom-event-constructor.html * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns ScriptValue corresponding to a given key. * bindings/v8/custom/V8EventConstructors.cpp: Added the CustomEvent constructor. * dom/CustomEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-02 Adrienne Walker <enne@google.com> [chromium] Move updateLayers from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67438 Reviewed by James Robinson. Covered by existing tests. Move functionality used by both CCLayerTreeHost and LayerRendererChromium into CCLayerTreeHostCommon. Move update, paint, and updateCompositorResource functions into CClayerTreeHost. * WebCore.gypi: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::sortLayers): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::textureMemoryReclaimLimit): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::sortLayers): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::paintContentsIfDirty): (WebCore::CCLayerTreeHost::paintLayerContents): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: Added. (WebCore::CCLayerTreeHostCommon::isScaleOrTranslation): (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: Added. (WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::commitIfNeeded): 2011-09-02 Chris Marrin <cmarrin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67510 Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction Reviewed by Simon Fraser. Do a null check in two places to avoid sending nulls to CACF ValueFunction API. Test: animations/pause-crash.html * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::valueFunction): (PlatformCAAnimation::setValueFunction): 2011-09-02 Bill Budge <bbudge@chromium.org> Add a 'didDownloadData' method to ResourceLoader, SubresourceLoader, SubresourceLoaderClient, DocumentThreadableLoader, ResourceHandleClient, and ThreadableLoaderClient for the Chromium port only, so we can pass these notifications from our ResourceHandle implementation through the WebCore loader framework. https://bugs.webkit.org/show_bug.cgi?id=67229 Reviewed by Darin Fisher. No new tests. Exposes no new functionality. * WebCore.gypi: * loader/DocumentThreadableLoader.h: * loader/ResourceLoader.h: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::didDownloadData): * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didDownloadData): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didDownloadData): * loader/chromium: Added. * loader/chromium/DocumentThreadableLoaderChromium.cpp: Added. (WebCore::DocumentThreadableLoader::didDownloadData): * loader/chromium/ResourceLoaderChromium.cpp: Added. (WebCore::ResourceLoader::didDownloadData): * loader/chromium/SubresourceLoaderChromium.cpp: Added. (WebCore::SubresourceLoader::didDownloadData): * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didDownloadData): 2011-09-02 Jeff Miller <jeffm@apple.com> Assert that PlatformCALayerWinInternal::displayCallback() is only called on the main thread https://bugs.webkit.org/show_bug.cgi?id=67541 Reviewed by Simon Fraser. No new tests, covered by existing media tests. * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): Assert that is function is only called on the main thread. 2011-09-02 Julien Chaffraix <jchaffraix@webkit.org> Enable RenderLayer::updateLayerPosition's cachedOffset optimization for more cases https://bugs.webkit.org/show_bug.cgi?id=66901 Reviewed by Simon Fraser. Test: fast/layers/assert-RenderLayer-update-positions.html Also covered by existing tests under the new ASSERT. This change extends the range of callers making use of the cachedOffset optimization. Most callers did not make use of cachedOffset as it did not work when called on a subtree. This limitation is now gone thus we can enable it more widely. The semantics of the optimization are changed a bit as we now return if it is enabled whereas the old code would check if it was *disabled*. Also there were some renames done to match more closely what was going on (s/cachedOffset/offsetFromRoot/ and s/cachedOffsetDisabled/hasLayerOffset/). Note that this is an optimistic optimization: if cachedOffset is not used, then we have done at least an extra traversal up to the root. I have found it to be a wash on file cycler (alexa) but to be a nice improvement (~20%) on some table benchmarks (modifying a cell, scrolling). * page/FrameView.cpp: (WebCore::FrameView::layout): Extended the use of cachedOffset to subtree layouts. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleDidChange): Forbid the use cachedOffset in this case as we have only a single layer to update. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeOffsetFromRoot): Added this function to get the offset from the root layer at a certain point in the RenderLayer's tree. It gets the root layer's checking if no layer in between would prevent convertToLayerCoords to work and return the position relative to this layer. (WebCore::RenderLayer::updateLayerPositions): Added a new ASSERT to make sure our cachedOffset is always fine. Also added a comment about calling convertToLayerCoords. (WebCore::RenderLayer::removeOnlyThisLayer): Added cachedOffset here too as we may have to update several layers. We save the offset prior to being