2012-05-22 Vitaly Buka Fix iframe printing. https://bugs.webkit.org/show_bug.cgi?id=85118 Reviewed by Darin Adler, Eric Seidel. Patch fixed two issues by disabling special handling of subframes for printing. 1. Regression. Division by zero when forceLayoutForPagination called for subframes and page sizes set to zero. 2. Old issue. RendererView adjusted layout of subframes for printing and set invalid dimensions. Sometimes it caused missing iframe when printed. Test: printing/iframe-print.html * page/Frame.cpp: (WebCore::Frame::setPrinting): Calls forceLayoutForPagination for root frames only. (WebCore::Frame::resizePageRectsKeepingRatio): Added ASSERTs to catch division by zero. * rendering/RenderView.cpp: Replaced printing() with shouldUsePrintingLayout() for most calls. (WebCore::RenderView::computeLogicalHeight): (WebCore::RenderView::computeLogicalWidth): (WebCore::RenderView::layout): (WebCore::RenderView::shouldUsePrintingLayout): Returns true only if printing enabled and it's a root frame. (WebCore::RenderView::viewRect): (WebCore::RenderView::viewHeight): (WebCore::RenderView::viewWidth): * rendering/RenderView.h: 2012-05-22 Rafael Brandao [Qt] canvas/philip/tests/2d.path.stroke.overlap.html fails with Qt-4.6.2 or higher https://bugs.webkit.org/show_bug.cgi?id=40362 Reviewed by Noam Rosenthal. Before drawing the stroke from a certain path, it should make the union of the stroke areas. The previous implementation didn't consider that so the intersection was painted twice. By using QPainterPathStroker, we create a QPainterPath on top of the platform path, and then we fill it with the expected brush. This way we avoid repainting areas. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::fillPathStroke): (WebCore): (WebCore::GraphicsContext::strokePath): 2012-05-21 Gavin Barraclough Disable private names by default in WebCore https://bugs.webkit.org/show_bug.cgi?id=87088 Reviewed by Geoff Garen. r117859 introduced a preliminary implementation of ES6-like private name objects to JSC. These are probably not yet ready to be web-facing, so disabling by default in WebCore. Opting-in for JSC & DumpRenderTree so that we can still run the fast/js/names.html test. * WebCore.exp.in: - Added export. * bindings/js/JSDOMWindowBase.cpp: (WebCore): (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): - Override default from JSC, enable based on corresponding Setting. * bindings/js/JSDOMWindowBase.h: (JSDOMWindowBase): - Added declaration for javaScriptExperimentsEnabled. * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setJavaScriptExperimentsEnabled): (WebCore): * page/Settings.h: (Settings): (WebCore::Settings::javaScriptExperimentsEnabled): - Added Setting, reflecting WebPreference. 2012-05-22 Adam Barth !HAVE(ACCESSIBILITY) depends on AccessibilityObject::actionVerb in the Chromium Android build https://bugs.webkit.org/show_bug.cgi?id=87141 Reviewed by Eric Seidel. In the Chromium Android build there is still one remaining dependency on object files in the accessibility directory: AccessibilityObject::actionVerb. I missed this function in my previous patch, but this patch changes it to be an inline stub. * accessibility/AccessibilityObject.cpp: (WebCore): * accessibility/AccessibilityObject.h: (WebCore): (WebCore::actionVerb): (WebCore::AccessibilityObject::lineForPosition): (WebCore::AccessibilityObject::updateBackingStore): 2012-05-22 Joshua Bell IndexedDB: Support Array-type key paths https://bugs.webkit.org/show_bug.cgi?id=84207 Reviewed by Tony Chang. Implement IDB spec behavior that key paths can be arrays of strings; when evaluated, these yield arrays of keys, providing compound key support. Also changes exception types to match the spec. Test: storage/indexeddb/keypath-arrays.html Test: storage/indexeddb/keypath-basics.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): Look for both string and array in option dict, throw exceptions for forbidden combinations of key generator and key paths. * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): Handle special cases (accepted and forbidden). (WebCore): * Modules/indexeddb/IDBObjectStore.h: (IDBObjectStore): (WebCore::IDBObjectStore::createIndex): Overloads to satisfy IDL overloads and optional dicts. * Modules/indexeddb/IDBObjectStore.idl: Add DOMString array overload. * bindings/v8/IDBBindingUtilities.cpp: Implement spec logic for evaluating array key paths. (WebCore::createIDBKeyFromSerializedValueAndKeyPath): (WebCore): 2012-05-22 Martin Robinson [GTK] REGRESSION(r116135): Keys that confirm composition trigger a default action https://bugs.webkit.org/show_bug.cgi?id=86925 Reviewed by Gustavo Noronha Silva. No new tests. Creating tests for GTK+ input methods is quite difficult, as they can differ from machine to machine. It's also hard to simulate composition sequences. * platform/gtk/CompositionResults.h: Instead of holding composition results, just keep a flag describing whether or not this event had results. (CompositionResults): 2012-05-22 Abhishek Arya Assertion failure (toRenderBox() called on a RenderInline) beneath RenderBlock::blockBeforeWithinSelectionRoot() https://bugs.webkit.org/show_bug.cgi?id=86500 Reviewed by Ojan Vafai. Patch by Dan Bernstein. I just added the test. Test: fast/block/line-layout/selection-highlight-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::blockBeforeWithinSelectionRoot): Demoted the object local variable to RenderObject, changed use of parentBox() to parent(), and added toRenderBlock() in two places. 2012-05-22 Rob Buis ASSERTs in RenderInline::layout() https://bugs.webkit.org/show_bug.cgi?id=63365 Reviewed by Nikolas Zimmermann. Do not allow creation of renderers for text content children in elements by default. Subclasses like SVGTextElement override this behavior. This also fixes the case because the parent decides to allow or not: http://www.w3.org/2003/01/REC-SVG11-20030114-errata#linking-text-environment Test: svg/custom/disallowed-text-content-rendering.svg * svg/SVGElement.cpp: (WebCore::SVGElement::childShouldCreateRenderer): * svg/SVGElement.h: (SVGElement): 2012-05-22 Takashi Sakamoto Implement DOM_KEY_LOCATION_LEFT and RIGHT of KeyboardEvent's location property https://bugs.webkit.org/show_bug.cgi?id=86694 As KeyboardEvent for left/right location key, e.g. left-control, right-control, provides DOM_KEY_LOCATION_STANDARD as keyLocation property, modified KeyCodeConversion to make PlatformKeyboardEvent provide virtual keycodes with location information, e.g. VK_LCONTROL or VK_RCONTROL, and modified KeyboardEvent to generate location information from the virtual keycodes, e.g. genrating DOM_KEY_LOCATION_LEFT for VK_LCONTROL. KeyboardEvent also removes location information from the virtual keycodes, e.g. genrating VK_CONTROL for VK_LCONTROL. The location property is defined in the W3C DOM3 specification: http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboardevents Reviewed by Alexey Proskuryakov. Test: fast/events/keydown-leftright-keys.html * dom/KeyboardEvent.cpp: (WebCore::windowsVirtualKeyCodeWithoutLocation): Added a function which removes location information from a given keycode. For example, when VK_LCONTROL is given, returns VK_CONTROL. (WebCore::keyLocationCode): Added a function which provides location information from a given keycode. For example, when VK_LCONTROL is given, returns DOM_KEY_LOCATION_LEFT. (WebCore::KeyboardEvent::KeyboardEvent): Initialized m_keyLocation by using the above keyLocationCode. (WebCore::KeyboardEvent::keyCode): Modified to use the above two functions to initialize keycode property and keylocation property. * platform/chromium/KeyCodeConversionAndroid.cpp: (WebCore::windowsKeyCodeForKeyEvent): * platform/chromium/KeyCodeConversionGtk.cpp: (WebCore::windowsKeyCodeForKeyEvent): * platform/cocoa/KeyEventCocoa.mm: (WebCore::windowsKeyCodeForKeyCode): Modified these keycode conversions to return keycodes with location information, e.g. modified keycode conversions returns VK_LCONTROL for left control. 2012-05-22 Pavel Feldman Web Inspector: provide content-related actions on the sources panel. https://bugs.webkit.org/show_bug.cgi?id=87144 Reviewed by Vsevolod Vlasov. Now that the authoring focus moved to the Source panel, context menu actions should follow: - refactored context menu actions to be provider-based - edited call sites to add applicable actions. * English.lproj/localizedStrings.js: * inspector/front-end/ContextMenu.js: (WebInspector.ContextMenu.prototype.appendApplicableItems): * inspector/front-end/HandlerRegistry.js: (WebInspector.HandlerRegistry.prototype.unregisterHandler): (WebInspector.HandlerRegistry.prototype.appendApplicableItems.doSave): (WebInspector.HandlerRegistry.prototype.appendApplicableItems.save): (WebInspector.HandlerRegistry.prototype.appendApplicableItems): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype.handleContextMenu): (WebInspector.BaseNavigatorTreeElement.prototype.onattach): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype.searchCanceled): (WebInspector.NetworkPanel.prototype.appendApplicableItems.reveal): (WebInspector.NetworkPanel.prototype.appendApplicableItems): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame.prototype._contentChanged): (WebInspector.ResourceSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.appendApplicableItems): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._contextMenu): * inspector/front-end/UIUtils.js: * inspector/front-end/externs.js: * inspector/front-end/inspector.js: (WebInspector._doLoadedDoneWithCapabilities.get if): 2012-05-22 Nico Weber Give FileInputType a setFiles() method, let Drag-n-Drop call it. https://bugs.webkit.org/show_bug.cgi?id=87139 Reviewed by Ojan Vafai. filesChosen(), the FileChooserClient callback, used to modify m_fileList directly. Instead, convert the FileChooserClient data to a FileList and pass that to a factored-out setFiles() method. This is in preparation to making the files property writable. Pure refactoring, no functionality change. * html/FileInputType.cpp: (WebCore::FileInputType::toFileList): (WebCore::FileInputType::setFiles): (WebCore::FileInputType::filesChosen): (WebCore): * html/FileInputType.h: (FileInputType): 2012-05-22 Vsevolod Vlasov Web Inspector: JavaScriptSourceFrame should be based on JavaScriptSource not UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=87135 Reviewed by Pavel Feldman. Renamed _uiSourceCode to _javaScriptSource in JavaScriptSourceFrame. Removed unused uiSourceCode getter from JavaScriptSourceFrame. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.canEditSource): (WebInspector.JavaScriptSourceFrame.prototype.commitEditing): (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged): (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded): (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved): (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded): (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype._continueToLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): 2012-05-22 Lu Guanqun add OVERRIDE annotations to classes derived from CCAnimationCurve https://bugs.webkit.org/show_bug.cgi?id=87073 Reviewed by James Robinson. No new tests required. * platform/graphics/chromium/cc/CCAnimationCurve.h: 2012-05-22 Lu Guanqun add OVERRIDE annotations to CCThreadTask https://bugs.webkit.org/show_bug.cgi?id=87074 Reviewed by James Robinson. No new tests required. * platform/graphics/chromium/cc/CCThreadTask.h: 2012-05-22 Julien Chaffraix Centralize and clean-up table column iteration https://bugs.webkit.org/show_bug.cgi?id=87051 Reviewed by Eric Seidel. Tests: fast/table/caption-between-column-and-column-group.html fast/table/caption-between-column-group-and-column.html fast/table/caption-between-columns.html The existing code had duplications between different classes and some of the iterating functions could use a better place. That's what this change solves, along with several renamings. * rendering/RenderTableCol.h: (WebCore::RenderTableCol::isTableColumnGroupWithColumnChildren): Renamed isTableColGroup to this to better reflect what it checks. Also added a new function: nextColumn. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): Updated after isTableColGroup renaming. * rendering/RenderTable.cpp: (WebCore::RenderTable::firstColumn): Added this new function to get the first column (or column group). (WebCore::RenderTable::colElement): Cleaned up this function: switched the loop to a 'for' now that the helper functions make it easy. Cleaned up the ordering and the naming. * rendering/RenderTable.h: Added firstColumn. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): Updated to use nextColumn(). * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::nextColumn): Added this new helper function to centralize the code to iterate over columns. 2012-05-22 Hao Zheng [chromium] Make color of spelling check marker cross-platform. https://bugs.webkit.org/show_bug.cgi?id=87095 Reviewed by Adam Barth. Pixel layout is RGBA on Android, while it is BGRA on other platforms. No new tests. To run tests on Android. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): 2012-05-22 Dana Jansens [chromium] Expand damage from the background-blurred layer to ensure readback is only including pixels below that layer https://bugs.webkit.org/show_bug.cgi?id=86884 Reviewed by Adrienne Walker. Consider layers in back-to-front order A, B, and C, where layer B has a blur background filter applied, and C exactly covers A. When B does its readback to perform its blur, it should include the pixels of A not C. With partial swap, if B is damaged, that damaged area will read pixels from outside of the damage rect. Those pixels should use the contents of A, not C, so we must expand the damage to ensure we redraw all pixels that are going to be included in the blur for the current frame. Also, when a layer below B has damage outside the contentBounds of B but within its blur radius, then that damage will be blurred inside B, so expand all damage within B's blurred contentBounds. Unit test: CCDamageTrackerTest.verifyDamageForBackgroundBlurredChild * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::expandRectWithFilters): (WebCore::expandDamageRectInsideRectWithFilters): (WebCore::CCDamageTracker::updateDamageTrackingState): (WebCore::CCDamageTracker::extendDamageForRenderSurface): 2012-05-22 Mihnea Ovidenie [CSSRegions] Add region styling support for color property https://bugs.webkit.org/show_bug.cgi?id=85633 Reviewed by David Hyatt. Test: fast/regions/region-style-color.html This patch extends the region styling support. In addition to background-color, it adds the possibility of styling color in regions. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::removeFlowChildInfo): (WebCore::RenderFlowThread::addRegionToThread): (WebCore::RenderFlowThread::removeRegionFromThread): (WebCore::RenderFlowThread::clearRenderObjectCustomStyle): (WebCore::RenderFlowThread::setRegionRangeForBox): (WebCore): (WebCore::RenderFlowThread::checkRegionsWithStyling): * rendering/RenderFlowThread.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::updateAlwaysCreateLineBoxes): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::styleDidChange): (WebCore::RenderRegion::setRegionObjectsRegionStyle): (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle): (WebCore::RenderRegion::computeStyleInRegion): (WebCore): (WebCore::RenderRegion::computeChildrenStyleInRegion): (WebCore::RenderRegion::setObjectStyleInRegion): (WebCore::RenderRegion::clearObjectStyleInRegion): * rendering/RenderRegion.h: (RenderRegion): (ObjectRegionStyleInfo): 2012-05-22 Kentaro Hara [V8] Remove GenerateSetDOMException() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=87114 Reviewed by Nate Chapin. GenerateSetDOMException() is used by only one place. This patch removes it. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): 2012-05-22 David Grogan IndexedDB: Fire error when there are problems opening a DB https://bugs.webkit.org/show_bug.cgi?id=85579 We used to either fire success or get into an infinite loop. Reviewed by Tony Chang. New unit test in Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::openInternal): (WebCore::IDBDatabaseBackendImpl::openConnection): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (WebCore::IDBDatabaseBackendImpl::create): (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::deleteDatabase): (WebCore::IDBFactoryBackendImpl::openInternal): * Modules/indexeddb/IDBFactoryBackendImpl.h: (IDBFactoryBackendImpl): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): 2012-05-22 Nikolas Zimmermann Not reviewed. Follow-up patch after r117975, as the strict approach fires assertions. CSS generated content can violate the ASSERT(child->isSVGInline() || child->isSVGInlineText()) logic. * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::subtreeChildWasAdded): (WebCore::RenderSVGText::subtreeChildWillBeRemoved): 2012-05-22 Dominic Mazzoni Chromium AX: Crash when menulist adds selected option via document.write https://bugs.webkit.org/show_bug.cgi?id=87028 Reviewed by Chris Fleizach. Test: platform/chromium/accessibility/add-to-menu-list-crashes.html * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::addChild): 2012-05-22 Nikolas Zimmermann Crash in WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap https://bugs.webkit.org/show_bug.cgi?id=86781 Reviewed by Rob Buis. Always invalidate the text positioning element cache if the render subtree mutates. Currently only RenderSVGInlineText renderers are tracked correctly, RenderSVGInline renderers like RenderSVGTSpan didn't cause text positioning element cache mutations so far. Fix that. Test: svg/custom/bug86781.html * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::removeChild): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::subtreeChildWasAdded): (WebCore::RenderSVGText::subtreeChildWillBeRemoved): (WebCore::RenderSVGText::removeChild): * rendering/svg/RenderSVGText.h: (RenderSVGText): 2012-05-22 Pavel Feldman Web Inspector: make "Go to source" shortcut accessible from all panels. https://bugs.webkit.org/show_bug.cgi?id=87132 Reviewed by Vsevolod Vlasov. * English.lproj/localizedStrings.js: * inspector/front-end/AdvancedSearchController.js: (WebInspector.AdvancedSearchController.prototype.handleShortcut): * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.OpenResourceDialog.filterOutEmptyURLs): (WebInspector.OpenResourceDialog.compareFunction): (WebInspector.OpenResourceDialog): (WebInspector.OpenResourceDialog.prototype.itemTitleAt): (WebInspector.OpenResourceDialog.prototype.itemKeyAt): (WebInspector.OpenResourceDialog.prototype.itemsCount): (WebInspector.OpenResourceDialog.prototype.requestItems): (WebInspector.OpenResourceDialog.prototype.selectItem): (WebInspector.OpenResourceDialog.show): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.appendApplicableItems): (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog): * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.handleShortcut): * inspector/front-end/inspector.js: (WebInspector._registerShortcuts): (WebInspector.documentKeyDown): 2012-05-22 Ilya Tikhonovsky Web Inspector: HeapSnapshot: speedUp buildAggregates. https://bugs.webkit.org/show_bug.cgi?id=87131 Engine can't inline getters and use fast-case if the function has for(i in object) loops. Reviewed by Yury Semikhatsky. No logic changes. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.classIndex): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize): 2012-05-22 Nikolas Zimmermann Crash in WebCore::RenderSVGContainer::paint https://bugs.webkit.org/show_bug.cgi?id=86392 Reviewed by Rob Buis. Modernize the code, switch to the same design pattern used for handling zero-length subpaths. Decouple the generation of the marker start/mid/end positions from the actual usage of these information. Only generate those marker positions if the underlying Path changes, and never else. When figuring out the bounds for a shape, access to current set of RenderSVGResourceMarker start/mid/end resources and ask the marker resources for their bounds using the previously figured out marker positions on the Path. Drawing markers is handled in the same way. Remove SVGMarkerLayoutInfo alltogether which stored raw pointers to the RenderSVGResourceMarkers. We assumed that those objects would stay alive from layout() to paint(), but that assumption is wrong. Tests: svg/custom/bug86392.html svg/custom/marker-zero-length-linecaps-expected.svg svg/custom/marker-zero-length-linecaps.svg * CMakeLists.txt: Remove SVGMarkerLayoutInfo.*. * GNUmakefile.list.am: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.order: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/svg/RenderSVGAllInOne.cpp: Ditto. * rendering/svg/RenderSVGShape.cpp: Handle markers just like the existing zero leng subpath code, which is superior. (WebCore::RenderSVGShape::createShape): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::shouldGenerateMarkerPositions): (WebCore::RenderSVGShape::paint): (WebCore::markerForType): (WebCore::RenderSVGShape::markerRect): (WebCore::RenderSVGShape::inflateWithStrokeAndMarkerBounds): (WebCore::RenderSVGShape::drawMarkers): (WebCore::RenderSVGShape::processMarkerPositions): * rendering/svg/RenderSVGShape.h: (RenderSVGShape): * rendering/svg/SVGMarkerData.h: (WebCore::MarkerPosition::MarkerPosition): (MarkerPosition): (WebCore::SVGMarkerData::SVGMarkerData): (WebCore::SVGMarkerData::updateFromPathElement): (WebCore::SVGMarkerData::pathIsDone): (SVGMarkerData): (WebCore::SVGMarkerData::currentAngle): * rendering/svg/SVGMarkerLayoutInfo.cpp: Removed. * rendering/svg/SVGMarkerLayoutInfo.h: Removed. * rendering/svg/SVGResourcesCache.cpp: (WebCore::resourcesCacheFromRenderObject): (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): * rendering/svg/SVGResourcesCache.h: (SVGResourcesCache): 2012-05-22 Alexander Pavlov [Chromium] Implement the ContextMenuItem SubMenu type https://bugs.webkit.org/show_bug.cgi?id=86625 Reviewed by Pavel Feldman. This change is the WebKit part of a two-sided patch that adds subMenuItems to ContextMenuItem and introduces code needed to handle it properly. * platform/ContextMenuItem.h: (PlatformMenuItemDescription): Add a Vector for subMenuItems. * platform/PlatformMenuDescription.h: (WebCore): Introduce a meaningful typedef for PlatformMenuDescription in Chromium. * platform/chromium/ContextMenuChromium.cpp: (WebCore::ContextMenu::itemWithAction): Search submenus when looking up a requested action id. (WebCore::ContextMenu::platformDescription): Return a real PlatformMenuDescription rather than 0. * platform/chromium/ContextMenuItemChromium.cpp: (WebCore::ContextMenuItem::ContextMenuItem): Set submenu if one has been passed in. (WebCore::ContextMenuItem::platformSubMenu): Return real subMenuItems instead of an empty PlatformMenuDescription. (WebCore::ContextMenuItem::setSubMenu): Implemented. (WebCore): 2012-05-22 Andrey Kosyakov Web Inspector: use canvas to render timeline category strips in overview pane https://bugs.webkit.org/show_bug.cgi?id=87109 Reviewed by Pavel Feldman. - use canvas, not DOM to represent timeline category strips in the default overview mode * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewPane.prototype._setVerticalOverview): propagate to TimelineCategoryStrips; (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged): force update of category strips; (WebInspector.TimelineOverviewPane.prototype._update): (WebInspector.TimelineOverviewPane.prototype.setShowShortEvents): (WebInspector.TimelineCategoryStrips): (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): process one record; (WebInspector.TimelineCategoryStrips.prototype.update): re-draw everything; (WebInspector.TimelineCategoryStrips.prototype.setShowShortEvents): (WebInspector.TimelineCategoryStrips.prototype._renderBar): render single bar; (WebInspector.TimelineVerticalOverview): (WebInspector.TimelineVerticalOverview.prototype._renderBar): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.createFillStyle): utility methods to create gradients for category bars; (WebInspector.TimelinePresentationModel.createFillStyleForCategory): (WebInspector.TimelineCategory): 2012-05-22 Pavel Feldman Web Inspector: [regression] dynamically created script tab is bound to the document resource. https://bugs.webkit.org/show_bug.cgi?id=87119 Reviewed by Vsevolod Vlasov. Test: inspector/debugger/dynamic-script-tag.html * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger.didSetBreakpoint): (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.rawLocationToUILocation): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): (WebInspector.ResourceScriptMapping.prototype._shouldBindScriptToContentProvider): * inspector/front-end/Script.js: (WebInspector.Script.prototype.rawLocationToUILocation): (WebInspector.Script.Location.prototype.update): 2012-05-22 Vsevolod Vlasov Web Inspector: JavaScript breakpoints disappear when Ctrl+S is pressed for the script without changes. https://bugs.webkit.org/show_bug.cgi?id=87121 Reviewed by Pavel Feldman. JavaScriptSourceFrame and StylesSourceFrame should not commit working copy unless UISourceCode is dirty. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.commitEditing): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSourceFrame.prototype.commitEditing): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.commitWorkingCopy): 2012-05-22 Ilya Tikhonovsky Web Inspector: HeapSnapshot: speed-up calculateRetainedSize functon. https://bugs.webkit.org/show_bug.cgi?id=87124 I found that in all dominators related functions we use nodeOrdinals. At the moment we divide nodeIndex to nodeFieldCount and this operation too expensive for these simple algorithms. Reviewed by Yury Semikhatsky. Covered by existing tests. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex): (WebInspector.HeapSnapshot.prototype._buildDominatorTree): (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes): (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): 2012-05-22 Yury Semikhatsky Web Inspector: annotate InjectedScriptSource.js for closure compiler https://bugs.webkit.org/show_bug.cgi?id=87120 Reviewed by Pavel Feldman. Annotated InjectedScriptSource.js for closure compiler. Replaced call of undefined _isPrimitiveValue function with isPrimitiveValue. * inspector/InjectedScriptExterns.js: Added. External APIs used in InjectedScriptSource.js (console.log): (InjectedScriptHost.prototype.storageId): (InjectedScriptHost.prototype.functionDetails): (InjectedScriptHost.prototype.isHTMLAllCollection): (InjectedScriptHost.prototype.internalConstructorName): (InjectedScriptHost.prototype.copyText): (InjectedScriptHost.prototype.clearConsoleMessages): (InjectedScriptHost.prototype.inspectedObject): (InjectedScriptHost.prototype.databaseId): (InjectedScriptHost.prototype.inspect): (InjectedScriptHost.prototype.type): (InjectedScriptHost.prototype.getEventListeners): (JavaScriptCallFrame.prototype.scopeType): * inspector/InjectedScriptSource.js: 2012-05-22 Ian Vollick [chromium] Speed up CCLayerTreeHostTestTickAnimationWhileBackgrounded https://bugs.webkit.org/show_bug.cgi?id=86871 Reviewed by James Robinson. With this patch, the background animation timer is lazily created, allowing for different time intervals to be used. In particular, a very short interval for unit tests. Unit tests: CCLayerTreeHostTestTickAnimationWhileBackgrounded.runSingleThread CCLayerTreeHostTestTickAnimationWhileBackgrounded.runMultiThread * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::setBackgroundTickingEnabled): (WebCore): (WebCore::CCLayerTreeHostImpl::setVisible): (WebCore::CCLayerTreeHostImpl::animateLayers): (WebCore::CCLayerTreeHostImpl::lowFrequencyAnimationInterval): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setVisible): 2012-05-22 Alexander Pavlov Web Inspector: [Styles] Odd synthetic shorthands may appear in the style https://bugs.webkit.org/show_bug.cgi?id=87081 Reviewed by Vsevolod Vlasov. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.onpopulate): 2012-05-22 Hayato Ito Fix crashes when a mouse points a element in shadow DOM subtree. https://bugs.webkit.org/show_bug.cgi?id=86795 Reviewed by Nikolas Zimmermann. elements in shadow dom subtree are still not supported. This fixes only crashes. Test: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/EventDispatcher.cpp: (WebCore::eventTargetRespectingSVGTargetRules): * page/EventHandler.cpp: (WebCore::instanceAssociatedWithShadowTreeElement): 2012-05-22 Andreas Kling DOM Attr objects pointing to "style" attribute should force reification when read. Reviewed by Antti Koivisto. Make sure that the "style" attribute is reserialized as needed when it gets retrieved through an Attr object. This fixes a bug where updating an element's inline style through the CSSOM API, and then retrieving the style attribute through an Attr node that was previously created by element.getAttributeNode() would return the old style attribute value. Test: fast/dom/attr-style-too-lazy.html * dom/Attr.cpp: (WebCore::Attr::value): 2012-05-22 Ilya Tikhonovsky Web Inspector: HeapProfiler: upstream retainedSize calculation. https://bugs.webkit.org/show_bug.cgi?id=87107 This patch upstreams V8::HeapSnapshotGenerator::CalculateRetainedSizes function to front-end. After that we will be able to drop retainedSize field from the snapshot serialized data. See meta-bug https://bugs.webkit.org/show_bug.cgi?id=87089 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get retainedSize): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes): 2012-05-22 Emil A Eklund Change RenderBlock to user RenderBox/RenderInline writing mode logic https://bugs.webkit.org/show_bug.cgi?id=87040 Reviewed by Eric Seidel. Remove unnecessary writing mode logic in RenderBlock and use the implementation in RenderBox and RenderInline instead. No new tests, no change in functionality. * rendering/RenderBlock.cpp: (WebCore): * rendering/RenderBlock.h: (WebCore::RenderBlock::marginBeforeForChild): (WebCore::RenderBlock::marginAfterForChild): (WebCore::RenderBlock::marginStartForChild): (WebCore::RenderBlock::marginEndForChild): (WebCore::RenderBlock::setMarginStartForChild): (WebCore::RenderBlock::setMarginEndForChild): (WebCore::RenderBlock::setMarginBeforeForChild): (WebCore::RenderBlock::setMarginAfterForChild): * rendering/RenderBox.cpp: (WebCore::RenderBox::marginBefore): (WebCore::RenderBox::marginAfter): (WebCore::RenderBox::marginStart): (WebCore::RenderBox::marginEnd): (WebCore::RenderBox::setMarginStart): (WebCore::RenderBox::setMarginEnd): (WebCore::RenderBox::setMarginBefore): (WebCore::RenderBox::setMarginAfter): * rendering/RenderBox.h: (RenderBox): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderInline.cpp: (WebCore::RenderInline::marginStart): (WebCore::RenderInline::marginEnd): (WebCore::RenderInline::marginBefore): (WebCore::RenderInline::marginAfter): * rendering/RenderInline.h: (RenderInline): 2012-05-22 Li Yin [WebSocket] WebSocket object should fire a simple event named error when it is required to fail the websocket connection. https://bugs.webkit.org/show_bug.cgi?id=86958 Reviewed by Kent Tamura. Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol If the user agent was required to fail the websocket connection or the WebSocket connection is closed with prejudice, fire a simple event named error at the WebSocket object. Tests: http/tests/websocket/tests/hybi/close.html * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveMessageError): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::fail): 2012-05-22 Yury Semikhatsky Web Inspector: allow showing selected object in another heap profiler view https://bugs.webkit.org/show_bug.cgi?id=87098 Reviewed by Vsevolod Vlasov. Added 2 context menu actions: 1) to jump from a node in the heap snapshot summary view to the same node in the dominators view; 2) to jump from a node in the dominators view to the same node in the summary view. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid): "sorting complete" event is only dispatched on when the data grid is populated. If we switch to already populated data grid the event is not dispatched. However when switching between different views of a heap snapshot we want to track the moment when the data grid is shown and populated. I added WebInspector.HeapSnapshotSortableDataGrid.Events.ContentShown for such cases. The event will always be dispatched after the data grid is shown and its content is populated. (WebInspector.HeapSnapshotSortableDataGrid.prototype.wasShown): (WebInspector.HeapSnapshotSortableDataGrid.prototype._sortingComplete): (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu.revealInDominatorsView): (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu.else.revealInSummaryView): (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu): (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype.populateContextMenu): (WebInspector.HeapSnapshotView.prototype.changeView.dataGridContentShown): (WebInspector.HeapSnapshotView.prototype.changeView): (WebInspector.HeapSnapshotView.prototype._onSelectedViewChanged): (WebInspector.HeapSnapshotView.prototype._changeView): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent): 2012-05-22 Yury Semikhatsky Web Inspector: show more button node should have height multiple of row height https://bugs.webkit.org/show_bug.cgi?id=87104 Reviewed by Vsevolod Vlasov. Made "show more" button height multiple of the data grid row height. * inspector/front-end/ShowMoreDataGridNode.js: (WebInspector.ShowMoreDataGridNode.prototype.nodeHeight): * inspector/front-end/dataGrid.css: (.data-grid button): 2012-05-22 Kentaro Hara [V8] Add an optional 'isolate' argument to throwTypeError() https://bugs.webkit.org/show_bug.cgi?id=87070 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch adds an optional 'isolate' argument to throwTypeError(), and passes Isolate to throwTypeError()s. In a following patch, I'll pass Isolate to all throwTypeError("message")s. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrSetter): (GenerateOverloadedFunctionCallback): (GenerateParametersCheck): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::overloadedMethodCallback): (WebCore::TestObjV8Internal::overloadedMethod1Callback): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::throwTypeError): * bindings/v8/V8Proxy.h: (V8Proxy): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCallback): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::valueAccessorSetter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): 2012-05-22 Yoshifumi Inoue [Forms][Meter][Progress] Change function signature of parseToDoubleForNumberType https://bugs.webkit.org/show_bug.cgi?id=87077 Reviewed by Hajime Morita. This patch changes function signature of parseToDoubleForNumberType and parseToDoubleForNumberTypeWithDecimalPlaces to return double value instead of bool for reducing code in call sites for ease of maintenance. This patch also allows to use functional style of using these functions. No new tests. This patch doesn't change behavior. * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::min): Changed for using double return value. (WebCore::HTMLMeterElement::max): Changed for using double return value. (WebCore::HTMLMeterElement::value): Changed for using double return value. (WebCore::HTMLMeterElement::low): Changed for using double return value. (WebCore::HTMLMeterElement::high): Changed for using double return value. (WebCore::HTMLMeterElement::optimum): Changed for using double return value. * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::value): Changed for using double return value. (WebCore::HTMLProgressElement::max): Changed for using double return value. * html/NumberInputType.cpp: (WebCore::NumberInputType::typeMismatchFor): Changed for using double return value. (WebCore::NumberInputType::sizeShouldIncludeDecoration): Changed for using double return value. (WebCore::NumberInputType::parseToDouble): Changed for using double return value. (WebCore::NumberInputType::parseToDoubleWithDecimalPlaces): Changed for using double return value. (WebCore::NumberInputType::visibleValue): Changed for using double return value. (WebCore::NumberInputType::sanitizeValue): Changed for using double return value. * html/RangeInputType.cpp: (WebCore::RangeInputType::parseToDouble): Changed for using double return value. * html/StepRange.cpp: (WebCore::StepRange::parseStep): Changed for using double return value. * html/StepRange.h: (WebCore::StepRange::defaultValue): Added "const" attribute (WebCore::StepRange::proportionFromValue): Added "const" attribute (WebCore::StepRange::valueFromProportion): Added "const" attribute * html/parser/HTMLParserIdioms.cpp: (WebCore::parseToDoubleForNumberType): Changed for using double return value. Added one parameter function. (WebCore::parseToDoubleForNumberTypeWithDecimalPlaces): Changed for using double return value. Added function for providing default fallback value. * html/parser/HTMLParserIdioms.h: Changed function prototype and added one parameter prototypes. * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): Changed for using double return value. 2012-05-22 Kentaro Hara REGRESSION r110315: Event handler throws TypeError for an input element with name="arguments" https://bugs.webkit.org/show_bug.cgi?id=86991 Reviewed by Ojan Vafai. Original Chromium bug: http://code.google.com/p/chromium/issues/detail?id=128723 Consider the following html:
Click here
If we click "Click here", JavaScript throws "Uncaught TypeError: undefined has no properties". This is a regression caused by r110315. V8LazyEventListener should not use 'arguments' to retrieve the execution contexts, since 'arguments' can be shadowed by JavaScript. This patch changes V8LazyEventListener so that it retrieves contexts by this[2], this[1] and this[0]. Test: fast/forms/form-input-named-arguments.html * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): 2012-05-22 Kentaro Hara [V8] setDOMException() should return v8::Handle() https://bugs.webkit.org/show_bug.cgi?id=87083 Reviewed by Adam Barth. The following patterns are used here and there in V8 bindings: setDOMException(); return v8::Handle(); and setDOMException(); return v8::Undefined(); By returning v8::Handle() from setDOMException(), we can simplify the above patterns into this: return setDOMException(); This patch just replaces the code in CodeGeneratorV8.pm. I'll replace all other custom bindings in a follow-up patch. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateSetDOMException): (GenerateFunctionCallback): (GenerateFunctionCallString): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::itemCallback): (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjV8Internal::methodWithExceptionCallback): (WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback): (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback): (WebCore::TestObjV8Internal::getSVGDocumentCallback): (WebCore::TestObjV8Internal::strictFunctionCallback): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-05-22 MORITA Hajime Unreviewed expectations update against r117989. * bindings/scripts/test/V8/V8Float64Array.cpp: * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: * bindings/scripts/test/V8/V8TestEventConstructor.cpp: * bindings/scripts/test/V8/V8TestEventTarget.cpp: * bindings/scripts/test/V8/V8TestException.cpp: * bindings/scripts/test/V8/V8TestInterface.cpp: * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: * bindings/scripts/test/V8/V8TestNode.cpp: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 2012-05-21 Ilya Tikhonovsky Web Inspector: migrate dominatorIndex code to the front-end calculated dominatorsTree. https://bugs.webkit.org/show_bug.cgi?id=87024 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex): (WebInspector.HeapSnapshot.prototype._init): 2012-05-22 Kentaro Hara [V8] Replace 'throwError(); return Undefined();' with 'return throwError()' https://bugs.webkit.org/show_bug.cgi?id=87079 Reviewed by Adam Barth. This patch replaces throwError(); return v8::Undefined(); with return throwError(); No tests. No change in behavior. * bindings/v8/DateExtension.cpp: (WebCore::DateExtension::OnSleepDetected): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::openCallback): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::inspectedObjectCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): 2012-05-22 Kenneth Russell Must set/reset pixel unpack alignment to 1 during texSubImage2D https://bugs.webkit.org/show_bug.cgi?id=86877 Reviewed by James Robinson. Set pixel unpack alignment to 1 during upload, resetting afterward. Tests: fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba5551.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444.html fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::texSubImage2DImpl): (WebCore::WebGLRenderingContext::texSubImage2D): Set pixel unpack alignment to 1 during upload; reset afterward. 2012-05-21 Sam D Web Inspector: "Deactivate All Breakpoints" should visually get reflected in Breakpoints pane. https://bugs.webkit.org/show_bug.cgi?id=86844 Reviewed by Pavel Feldman. Added an option for activate/deactivate breakpoints into Breakpoints pane section. Style properties has been attached with breakpoint list to reflect active state of breakpoints. No new tests. UI Change. * English.lproj/localizedStrings.js: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._breakpointsActiveStateChanged): * inspector/front-end/inspector.css: (.breakpoints-list-deactivated): 2012-05-21 Alexis Menard Web Inspector: Remove some dead code in CSSStyleModel.js. https://bugs.webkit.org/show_bug.cgi?id=87048 Reviewed by Pavel Feldman. Remove dead and unused code in CSSStyleModel.js. No new tests : the code is supposedly dead so we should not have any regressions. * inspector/front-end/CSSStyleModel.js: 2012-05-21 Adam Barth !HAVE(ACCESSIBILITY) should be able to build without linking in any code from WebCore/accessibility https://bugs.webkit.org/show_bug.cgi?id=87035 Reviewed by Chris Fleizach. The OS(ANDROID) already builds with !HAVE(ACCESSIBILITY), but because there are a few straggling references to objects in the WebCore/accessibility directory, we end up pulling in a bunch of code into the binary that we don't need. This patch stubs out a few more functions for !HAVE(ACCESSIBILITY) so we can link without any objects from WebCore/accessibility. This patch also locks in that property by actually excluding the WebCore/accessibility directory from the build on OS(ANDROID). * WebCore.gyp/WebCore.gyp: * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::enableAccessibility): (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): (WebCore::AXObjectCache::accessibilityEnabled): (WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled): (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::rootObject): (WebCore::AXObjectCache::rootObjectForFrame): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::handleScrolledToAnchor): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::nodeTextChangePlatformNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityObject.h: (WebCore): (WebCore::AccessibilityObject::updateBackingStore): (WebCore::AccessibilityObject::lineForPosition): (WebCore::AccessibilityObject::children): 2012-05-21 Andreas Kling Use stack-allocated BitArray in StylePropertySet serialization. Reviewed by Anders Carlsson. Use BitArray instead of BitVector to track seen properties in StylePropertySet::asText(). This removes two heap allocations from this path. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): 2012-05-21 Hajime Morrita Unreviewed Qt build fix against r117898. * Target.pri: 2012-05-21 Hajime Morrita [V8] Shadow DOM should be per-window-configurable. https://bugs.webkit.org/show_bug.cgi?id=86555 Reviewed by Kentaro Hara. This change introduces an IDL attribute named "V8EnabledAtContext" which allows DOMWindow properties to be turned on or off per windows basis. RuntimeEnabledFeatures::xxxAllowed() method decides the availability. - CodeGeneratorV8.pm now accepts V8EnabledAtContext and allows such properties to be configured per-Object basis, instead of per-ObjectTemplate basis. The script generates V8Window::installPerContextProperties(), which injects such per-object-turnable properties to newly created DOMWindow wrapper. - Added RuntimeEnabledFeatures::shadowDOMAllowed(DOMWindow*) which is used to decide the shadow dom availability of Shadow DOM feature. It delegates the call to FrameLoaderClient::shadowDOMAllowed() to make the decision. - The new IDL attribute is applied to DOMWindow.WebKitShadowRoot. - Updated existing shadowDOMEnabled() call sites with shadowDOMAllowed(). No new tests except run-bindings-test. This isn't testable from DRT and this change itself doesn't chagne the behaviour. It needs a client implementation. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/ContextEnabledFeatures.cpp: Added. (WebCore): (WebCore::ContextEnabledFeatures::shadowDOMEnabled): * bindings/generic/ContextEnabledFeatures.h: Added. (WebCore): (ContextEnabledFeatures): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateImplementation): (GetContextEnableFunction): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::enabledAtContextAttr1AttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::enabledAtContextAttr1AttrSetter): (WebCore::TestObjV8Internal::enabledAtContextAttr2AttrGetter): (WebCore::TestObjV8Internal::enabledAtContextAttr2AttrSetter): (WebCore::V8TestObj::installPerContextProperties): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::installDOMWindow): Adopted installPerContextProperties() * bindings/v8/V8Proxy.h: (WebCore): (WebCore::configureAttribute): Generalized to accept both ObjectTemplate and Object. * dom/Position.cpp: Adopted ContextEnabledFeatures (WebCore::Position::Position): (WebCore::Position::findParent): * dom/ShadowRoot.idl: * dom/TreeScope.cpp: (WebCore::TreeScope::getSelection): * html/shadow/HTMLContentElement.cpp: Adopted ContextEnabledFeatures (WebCore::contentTagName): (WebCore::HTMLContentElement::create): * loader/FrameLoaderClient.h: (FrameLoaderClient): (WebCore::FrameLoaderClient::shadowDOMAllowed): Added with a default behavior. * page/DOMWindow.cpp: * page/DOMWindow.idl: 2012-05-21 Tony Chang auto margins on flexbox should allocate space in the flex direction https://bugs.webkit.org/show_bug.cgi?id=83086 Reviewed by Ojan Vafai. Test: css3/flexbox/flex-flow-auto-margins.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis): (WebCore): (WebCore::RenderFlexibleBox::updateAutoMarginsInMainAxis): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Update the margins on the RenderBox *after* we do the final child layout. * rendering/RenderFlexibleBox.h: 2012-05-21 Gyuyoung Kim [EFL] Add inital mediaControlsEflfullscreen.css for fullscreen control UI https://bugs.webkit.org/show_bug.cgi?id=86988 Reviewed by Eric Carlson. In order to support fullscreen feature, EFL port needs to have new css file for fullscreen media control UI. No new tests because this patch is covered by existing tests. * PlatformEfl.cmake: * css/mediaControlsEflFullscreen.css: Added. (video::-webkit-media-controls-panel): (video:-webkit-full-page-media::-webkit-media-controls-panel): (video::-webkit-media-controls-mute-button): (video::-webkit-media-controls-play-button): (video::-webkit-media-controls-timeline-container): (video::-webkit-media-controls-current-time-display): (video::-webkit-media-controls-time-remaining-display): (video::-webkit-media-controls-timeline): (video::-webkit-media-controls-volume-slider-container): (video::-webkit-media-controls-volume-slider): (video::-webkit-media-controls-seek-back-button): (video::-webkit-media-controls-seek-forward-button): (video::-webkit-media-controls-fullscreen-button): (video::-webkit-media-controls-rewind-button): (video::-webkit-media-controls-return-to-realtime-button): (video::-webkit-media-controls-toggle-closed-captions-button): * platform/efl/RenderThemeEfl.cpp: (WebCore): (WebCore::RenderThemeEfl::extraFullScreenStyleSheet): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): 2012-05-21 Kentaro Hara [V8] Remove V8Proxy::notHandledByInterceptor() https://bugs.webkit.org/show_bug.cgi?id=86831 Reviewed by Adam Barth. This patch replaces 'return V8Proxy::notHandledByInterceptor()' with 'return v8::Handle()'. See the discussion in https://bugs.webkit.org/show_bug.cgi?id=85330 for more details. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateOverloadedFunctionCallback): (GenerateParametersCheck): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::overloadedMethodCallback): (WebCore::TestObjV8Internal::overloadedMethod1Callback): * bindings/v8/V8Collection.h: (WebCore::collectionNamedPropertyGetter): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * bindings/v8/V8NPObject.cpp: (WebCore::npObjectSetProperty): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::runScript): (WebCore::V8Proxy::throwError): * bindings/v8/V8Proxy.h: (WebCore): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): (WebCore::V8CSSStyleDeclaration::namedPropertySetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyGetter): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::indexedPropertyGetter): (WebCore::V8DOMWindow::namedPropertyGetter): * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: (WebCore::V8HTMLAllCollection::namedPropertyGetter): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::V8HTMLCollection::namedPropertyGetter): * bindings/v8/custom/V8HTMLFormElementCustom.cpp: (WebCore::V8HTMLFormElement::indexedPropertyGetter): (WebCore::V8HTMLFormElement::namedPropertyGetter): * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp: (WebCore::V8HTMLFrameSetElement::namedPropertyGetter): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::indexedPropertyGetter): * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp: (WebCore::npObjectNamedGetter): (WebCore::npObjectNamedSetter): (WebCore::npObjectIndexedGetter): (WebCore::npObjectIndexedSetter): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::V8HTMLSelectElement::indexedPropertyGetter): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::V8NamedNodeMap::indexedPropertyGetter): (WebCore::V8NamedNodeMap::namedPropertyGetter): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::namedPropertyGetter): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageGetter): (WebCore::V8Storage::namedPropertyGetter): (WebCore::storageSetter): * bindings/v8/custom/V8StyleSheetListCustom.cpp: (WebCore::V8StyleSheetList::namedPropertyGetter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): 2012-05-21 Rob Buis Shrink FontDescription object size https://bugs.webkit.org/show_bug.cgi?id=86950 Reviewed by Alexey Proskuryakov. Reduce object size of FontDescription by 8 bytes on 64-bit, 4 bytes on 32-bit systems. Note that this means Font, StyleInheritedData and RenderSVGInlineText shrink too. * platform/graphics/FontDescription.cpp: * platform/graphics/FontDescription.h: (WebCore::FontDescription::script): (FontDescription): 2012-05-21 Abhishek Arya Regression(r117482): Run-in crashes relating to generated content and inline line box clearing. https://bugs.webkit.org/show_bug.cgi?id=86879 Reviewed by Julien Chaffraix. Tests: fast/runin/generated-content-crash.html fast/runin/move-run-in-original-position-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use the new helper placeRunInIfNeeded. Do not place the run-in if it is a generated container since the caller such as updateBeforeAfterContent might be keeping a reference to it and adding children to it later. (WebCore::destroyRunIn): Add ability to clear line box tree for inlines. (WebCore::RenderBlock::placeRunInIfNeeded): Helper to place run-in. Add an argument to not modify generated content during addChild, it should be moved only at end of updateBeforeAfterContent. (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded): (WebCore::RenderBlock::runInIsPlacedIntoSiblingBlock): helper to tell if this run-in is actually placed into the next sibling block. (WebCore::RenderBlock::moveRunInToOriginalPosition): * rendering/RenderInline.cpp: (WebCore::RenderInline::deleteLineBoxTree): like RenderBlock, add a helper for deleteLineBoxTree. Virtualizing this might not be good, since this is the only call site for inline line box tree clearing and RenderBlock::deleteLineBoxTree is called a lot. * rendering/RenderObjectChildList.cpp: (WebCore::createRendererForBeforeAfterContent): fix a typo. (WebCore::RenderObjectChildList::updateBeforeAfterContent): If insertBefore is equal to the intruded run-in, then set it to next sibling so that new child will come after it. At the end, place the generatedContainer if it is a run-in. 2012-05-21 James Robinson [chromium] Port chromium compositor to use WebFilterOperation(s) https://bugs.webkit.org/show_bug.cgi?id=87046 Reviewed by Adrienne Walker. This converts all compositor implementation logic to use WebFilterOperation(s) directly instead of the WebCore types. GraphicsLayerChromium bridges between a WebCore::FilterOperations to WebFilterOperations, doing the necessary type conversions and checking for filters that our compositor implementation supports. This cleans up the chromium compositor's dependencies and removes any thread constraints from WebCore::FilterOperation / WebCore::FilterOperations. Covered by existing layout tests and unit tests in FilterOperationsTest.cpp * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/support/WebFilterOperations.cpp: Moved to Source/Platform/chromium/src/ * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::copyWebCoreFilterOperationsToWebFilterOperations): (WebCore): (WebCore::GraphicsLayerChromium::setFilters): (WebCore::GraphicsLayerChromium::setBackgroundFilters): (WebCore::GraphicsLayerChromium::updateTransform): (WebCore::GraphicsLayerChromium::updateChildrenTransform): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setFilters): (WebCore::LayerChromium::setBackgroundFilters): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::filters): (WebCore::LayerChromium::backgroundFilters): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::setFilters): (WebCore::RenderSurfaceChromium::filters): (WebCore::RenderSurfaceChromium::setBackgroundFilters): (WebCore::RenderSurfaceChromium::backgroundFilters): (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::expandDamageRectWithFilters): (WebCore::expandDamageRectInsideRectWithFilters): (WebCore::CCDamageTracker::updateDamageTrackingState): * platform/graphics/chromium/cc/CCDamageTracker.h: (WebKit): (WebCore): (CCDamageTracker): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setFilters): (WebCore::CCLayerImpl::setBackgroundFilters): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::filters): (WebCore::CCLayerImpl::backgroundFilters): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::applyFilters): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore::CCRenderSurface::setFilters): (WebCore::CCRenderSurface::filters): (CCRenderSurface): (WebCore::CCRenderSurface::setBackgroundFilters): (WebCore::CCRenderSurface::backgroundFilters): * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): * platform/graphics/chromium/cc/CCRenderSurfaceFilters.h: (WebKit): (CCRenderSurfaceFilters): * testing/Internals.cpp: (WebCore::Internals::setBackgroundBlurOnNode): 2012-05-15 Gavin Barraclough Add support for private names https://bugs.webkit.org/show_bug.cgi?id=86509 Reviewed by Oliver Hunt. The spec isn't final, but we can start adding support to allow property maps to contain keys that aren't identifiers. Test: fast/js/names.html * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyIDForJSCSSPropertyName): * bindings/js/JSDOMBinding.cpp: (WebCore::findAtomicString): (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMBinding.h: (WebCore::propertyNameToString): (WebCore::propertyNameToAtomicString): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodsNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::getMethod): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::methodsNamed): (JavaClass::fieldNamed): * bridge/jni/jsc/JavaInstanceJSC.cpp: * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodsNamed): (JSC::Bindings::ObjcClass::fieldNamed): (JSC::Bindings::ObjcClass::fallbackObject): * bridge/objc/objc_instance.mm: (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): - Removed PropertyName::impl(), call publicName() to get the string associated with a name. 2012-05-21 Tim Horton GeneratorGeneratedImage should cache intermediate images https://bugs.webkit.org/show_bug.cgi?id=86906 Reviewed by Dean Jackson. Cache generated images in GeneratorGeneratedImage. The cache is invalidated: a) if the Generator's hash changes. b) if the rendered size changes. c) if the cached image is incompatible with the destination context (acceleration state or CTM scale). d) after one second of disuse. Add a hash() function to Generator, which should be implemented in subclasses to provide a straightforward way to determine if Generators have been mutated in a way that will affect the resultant rendering. No new tests, performance optimization. Correctness is covered by the multitude of existing gradient tests. * platform/graphics/Generator.h: (Generator): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::drawPattern): * platform/graphics/GeneratorGeneratedImage.h: (WebCore): (GeneratorGeneratedImage): (WebCore::GeneratorGeneratedImage::~GeneratorGeneratedImage): (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage): (GeneratedImageCacheTimer): (WebCore::GeneratorGeneratedImage::GeneratedImageCacheTimer::GeneratedImageCacheTimer): (WebCore::GeneratorGeneratedImage::GeneratedImageCacheTimer::restart): * platform/graphics/Gradient.cpp: (WebCore::Gradient::Gradient): (WebCore::Gradient::addColorStop): (WebCore::Gradient::sortStopsIfNecessary): (WebCore::Gradient::setSpreadMethod): (WebCore::Gradient::setGradientSpaceTransform): (WebCore::Gradient::hash): * platform/graphics/Gradient.h: (WebCore::Gradient::setP0): (WebCore::Gradient::setP1): (WebCore::Gradient::setStartRadius): (WebCore::Gradient::setEndRadius): (Gradient): (WebCore::Gradient::clearHashCache): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::isCompatibleWithBuffer): (WebCore): * platform/graphics/GraphicsContext.h: (GraphicsContext): 2012-05-21 Emil A Eklund Fix bug in paintNinePieceImage exposed by subpixel change https://bugs.webkit.org/show_bug.cgi?id=87060 Reviewed by Levi Weintraub. Fix rounding in paintNinePieceImage where the left/right images where drawn on subpixel bounds. Covered by existing tests. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2012-05-21 Emil A Eklund Move padding/margin/offset writing mode logic from RenderStyle to LengthBox https://bugs.webkit.org/show_bug.cgi?id=86970 Reviewed by Eric Seidel. Move writing mode and bidi logic for paddings, margins and offsets from RenderStyle to LengthBox. This way the same logic can be used for all three removing unnecessary code duplication. No new tests, no change in functionality. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/LengthBox.cpp: Added. * platform/LengthBox.h: * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: 2012-05-21 Mike West Improving console error for CSP-blocked `setTimeout` and `setInterval` evaluation. https://bugs.webkit.org/show_bug.cgi?id=86943 Reviewed by Adam Barth. If the inspector is open, a stack trace is generated before calling ContentSecurityPolicy::allowEval, and passed through to ContentSecurityPolicy::reportViolation for use in the console message. Test: http/tests/inspector-enabled/contentSecurityPolicy-blocks-setInterval.html http/tests/inspector-enabled/contentSecurityPolicy-blocks-setTimeout.html * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::WindowSetTimeoutImpl): * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::reportViolation): (WebCore::CSPDirectiveList::checkEvalAndReportViolation): (WebCore::CSPDirectiveList::allowEval): (WebCore): (WebCore::isAllowedByAllWithCallStack): (WebCore::isAllowedByAllWithURL): (WebCore::ContentSecurityPolicy::allowEval): (WebCore::ContentSecurityPolicy::allowScriptFromSource): (WebCore::ContentSecurityPolicy::allowObjectFromSource): (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): (WebCore::ContentSecurityPolicy::allowImageFromSource): (WebCore::ContentSecurityPolicy::allowStyleFromSource): (WebCore::ContentSecurityPolicy::allowFontFromSource): (WebCore::ContentSecurityPolicy::allowMediaFromSource): (WebCore::ContentSecurityPolicy::allowConnectToSource): * page/ContentSecurityPolicy.h: (WebCore): 2012-05-21 Antoine Labour Don't force rendering in finishAllRendering https://bugs.webkit.org/show_bug.cgi?id=86919 Reviewed by James Robinson. After we acquire the texture layers on the main thread, we can't draw. In particular if we destroyed the texture ids used previously by TextureLayerChromium, drawing before a commit would cause a bind-after-destroy. Tested by CCLayerTreeHostTestFinishAllRendering. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::finishAllRenderingOnImplThread): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): 2012-05-21 Joshua Bell IndexedDB: Store key paths in IDBKeyPath type instead of String https://bugs.webkit.org/show_bug.cgi?id=85298 Reviewed by Tony Chang, Kentaro Hara and James Robinson. Migrate from storing key paths as (nullable) Strings to a dedicated IDBKeyPath type. Prep work for supporting array-type key paths: http://webkit.org/b/84207 Only functional change is handling of null/undefined parameters for key paths, to align with IDB spec, covered by layout test. Test: storage/indexeddb/keypath-basics.html Test: WebKit/chromium/IDBLevelDBCodingTest.cpp * Modules/indexeddb/IDBAny.cpp: Allow IDBAny to yield DOMStrings. (WebCore::IDBAny::createString): (WebCore): (WebCore::IDBAny::string): (WebCore::IDBAny::set): * Modules/indexeddb/IDBAny.h: (IDBAny): * Modules/indexeddb/IDBBackingStore.h: Switch from String to IDBKeyPath. (IDBBackingStore): * Modules/indexeddb/IDBDatabase.cpp: Switch from String to IDBKeyPath. (WebCore::IDBDatabase::createObjectStore): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Switch from String to IDBKeyPath. (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): * Modules/indexeddb/IDBDatabaseBackendImpl.h: Switch from String to IDBKeyPath. (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: Switch from String to IDBKeyPath. (WebCore): (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBIndex.h: Switch from String to IDBAny (via IDBKeyPath). (WebCore::IDBIndex::keyPath): * Modules/indexeddb/IDBIndex.idl: Switch from DOMString? to IDBAny. * Modules/indexeddb/IDBIndexBackendImpl.cpp: Switch from String to IDBKeyPath. (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): * Modules/indexeddb/IDBIndexBackendImpl.h: Switch from String to IDBKeyPath. (WebCore::IDBIndexBackendImpl::create): (WebCore::IDBIndexBackendImpl::keyPath): (IDBIndexBackendImpl): * Modules/indexeddb/IDBIndexBackendInterface.h: Switch from String to IDBKeyPath. (WebCore): (IDBIndexBackendInterface): * Modules/indexeddb/IDBKeyPath.cpp: Non-trivial method implementations. (WebCore::IDBKeyPath::isValid): (WebCore): (WebCore::IDBKeyPath::operator PassRefPtr): * Modules/indexeddb/IDBKeyPath.h: Introduce IDBKeyPath type. (IDBKeyPath): (WebCore::IDBKeyPath::IDBKeyPath): (WebCore::IDBKeyPath::type): (WebCore::IDBKeyPath::array): (WebCore::IDBKeyPath::string): (WebCore::IDBKeyPath::isNull): (WebCore): * Modules/indexeddb/IDBKeyPathBackendImpl.cpp: Switch from String to IDBKeyPath. (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath): (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue): * Modules/indexeddb/IDBKeyPathBackendImpl.h: Switch from String to IDBKeyPath. (WebCore): (IDBKeyPathBackendImpl): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Switch from String to IDBKeyPath, with back-compat. (WebCore): (WebCore::putIDBKeyPath): (WebCore::IDBLevelDBBackingStore::getObjectStores): (WebCore::IDBLevelDBBackingStore::createObjectStore): (WebCore::IDBLevelDBBackingStore::getIndexes): (WebCore::IDBLevelDBBackingStore::createIndex): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBLevelDBCoding.cpp: New coding scheme for key paths (with back-compat). (IDBLevelDBCoding): (WebCore::IDBLevelDBCoding::encodeIDBKeyPath): (WebCore::IDBLevelDBCoding::decodeIDBKeyPath): * Modules/indexeddb/IDBLevelDBCoding.h: Add key-path-specific methods. (WebCore): (IDBLevelDBCoding): * Modules/indexeddb/IDBObjectStore.cpp: Switch from String to IDBKeyPath. (WebCore::IDBObjectStore::keyPath): (WebCore::IDBObjectStore::createIndex): (WebCore): * Modules/indexeddb/IDBObjectStore.h: Switch from String to IDBAny (via IDBKeyPath). (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: Switch from DOMString? to IDBAny. * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Switch from String to IDBKeyPath. (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::fetchKeyFromKeyPath): (WebCore::injectKeyIntoKeyPath): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Switch from String to IDBKeyPath. (WebCore::IDBObjectStoreBackendImpl::create): (WebCore::IDBObjectStoreBackendImpl::keyPath): (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Switch from String to IDBKeyPath. (WebCore): (IDBObjectStoreBackendInterface): * bindings/v8/Dictionary.cpp: Add getter for DOMString[] (i.e. Vector) (WebCore): (WebCore::Dictionary::get): * bindings/v8/Dictionary.h: (Dictionary): * bindings/v8/IDBBindingUtilities.cpp: Switch from String to IDBKeyPath. (WebCore::createIDBKeyFromSerializedValueAndKeyPath): (WebCore::injectIDBKeyIntoSerializedValue): * bindings/v8/IDBBindingUtilities.h: Switch from String to IDBKeyPath. (WebCore): * bindings/v8/custom/V8IDBAnyCustom.cpp: Support String/DOMString. (WebCore::toV8): * dom/DOMStringList.h: Allow easy (const) access to strings. (WebCore::DOMStringList::operator const Vector&): (DOMStringList): * inspector/InspectorIndexedDBAgent.cpp: Temporary shim for non-strings: see http://webkit.org/b/84303 (WebCore): * platform/chromium/PlatformSupport.h: Switch from String to IDBKeyPath. (WebCore): (PlatformSupport): * storage/chromium/IDBKeyPathBackendImpl.cpp: Switch from String to IDBKeyPath. (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath): (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue): 2012-05-21 Zhenyao Mo Restore WebGL's framebuffer binding after DrawingBuffer's prepareBackBuffer() https://bugs.webkit.org/show_bug.cgi?id=87032 Reviewed by James Robinson. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::prepareBackBuffer): restore the user's framebuffer binding if there is one. 2012-05-21 Ryosuke Niwa isStartOfDocument and isEndOfDocument are poorly named https://bugs.webkit.org/show_bug.cgi?id=86649 Reviewed by Levi Weintraub. Renamed isEndOfDocument to isEndOfEditableOrNonEditableContent because that's what this function checks. Also added new versions of isStartOfDocument and isEndOfDocument that correctly cross editing boundaries to be used in selectFrameElementInParentIfFullySelected. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): * editing/Editor.cpp: (WebCore::Editor::insertLineBreak): (WebCore::Editor::insertParagraphSeparator): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): * editing/visible_units.cpp: (WebCore::isEndOfEditableOrNonEditableContent): * editing/visible_units.h: 2012-05-21 Anna Cavender Only render text track cues if kind=captions or kind=subtitles. https://bugs.webkit.org/show_bug.cgi?id=83321 Reviewed by Eric Carlson. No new tests. Modification to media/track/track-kind.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::textTrackKindChanged): If the kind changes from a 'visible' kind to a 'non-visible' kind, update the track's mode to HIDDEN. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Do not render cues from tracks that are not captions or subtitles. * html/track/TextTrack.cpp: (WebCore::TextTrack::setMode): If the track's mode changes from SHOWING to HIDDEN or DISABLED, ensure any currently visible cues will no longer be rendered. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::removeDisplayTree): New method. * html/track/TextTrackCue.h: (TextTrackCue): 2012-05-21 Andreas Kling CSS: Move duplicate property elimination to parser. Reviewed by Antti Koivisto. Remove the StylePropertySet constructor that handled elimination of duplicate properties and move that to a new parser method, CSSParser::filteredProperties(). Call sites are converted to using StylePropertySet(const Vector&). Instead of building a hashmap of seen properties, use the new WTF::BitArray class to track whether a given property ID has been seen, and whether we have an !important entry for a given ID. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseDeclaration): (WebCore::CSSParser::filteredProperties): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createKeyframe): * css/CSSParser.h: * css/StylePropertySet.cpp: (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::addParsedProperties): * css/StylePropertySet.h: (WebCore::StylePropertySet::create): (StylePropertySet): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::rebuildFontFace): 2012-05-21 Joshua Bell IndexedDB: Index key paths that yield invalid keys should not fail an add/put https://bugs.webkit.org/show_bug.cgi?id=86122 Reviewed by Tony Chang. A clause was removed from the IDB spec. Previously, on add/put, if evaluating an index's key path yielded a value that was not a valid key, an exception would be raised. Now, it is treated the same as if no value was yielded. Test: storage/indexeddb/index-basics.html Test: storage/indexeddb/index-basics-workers.html Test: storage/indexeddb/objectstore-basics.html Test: storage/indexeddb/objectstore-basics-workers.html * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): Preconditions removed (WebCore::IDBObjectStoreBackendImpl::putInternal): Treat invalid keys the same as missing keys. 2012-05-21 Pavel Feldman Web Inspector: refactor revision history to not include resource itself. https://bugs.webkit.org/show_bug.cgi?id=87026 Reviewed by Vsevolod Vlasov. This change makes resource contain pure revisions, it stops updating Resources upon free flow editing. * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent): (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent): (WebInspector.JavaScriptSource.prototype.setFormatted): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.commitEditing): (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged): (WebInspector.JavaScriptSourceFrame.prototype._didEditContent): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.addRevision): (WebInspector.Resource.prototype._innerRequestContent.callback): (WebInspector.Resource.prototype._innerRequestContent): (WebInspector.Resource.prototype.revertToOriginal): (WebInspector.ResourceRevision.prototype.revertToThis): (WebInspector.ResourceRevision.prototype.requestContent): (WebInspector.ResourceRevision.prototype.searchInContent): (WebInspector.ResourceRevision.prototype._persistRevision): * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryTreeElement): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype.setScriptSnippetContent): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSourceFrame.prototype.commitEditing): (WebInspector.StyleSourceFrame.prototype._didEditContent): (WebInspector.StyleSourceFrame.prototype._onContentChanged): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._revisionAdded): (WebInspector.UISourceCode.prototype.contentChanged): (WebInspector.UISourceCode.prototype.commitWorkingCopy): * inspector/front-end/inspector.js: (WebInspector._doLoadedDoneWithCapabilities.get if): 2012-05-21 Allan Sandfeld Jensen GCC 4.7 and C++11 https://bugs.webkit.org/show_bug.cgi?id=86465 Reviewed by Darin Adler. Avoid triggering C++11 string literals and use nullptr for correct type casting. * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): * platform/sql/SQLiteFileSystem.cpp: (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): 2012-05-18 Michael Nordman [chromium] DomStorage events handling needs TLC (2) https://bugs.webkit.org/show_bug.cgi?id=85221 Alter the StorageArea virtual interface such that the mutators no longer return old values. This is to allow implementations of the interface to operate more asynchronously. Reviewed by Adam Barth. No new tests. Existing tests cover this. * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame): removed an unneeded PLATFORM(CHROMIUM) guard (WebCore::StorageAreaImpl::setItem): no longer return the old value (WebCore::StorageAreaImpl::removeItem): no longer return the old value (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared * storage/StorageAreaImpl.h: match StorageArea's virtual interface 2012-05-21 MORITA Hajime [Refactoring] Node should have youngestShadowRoot. https://bugs.webkit.org/show_bug.cgi?id=86427 Reviewed by Dimitri Glazkov. This change adds Node::youngestShadowRoot() and replaced ElementShadow::youngestShadowRoot() with it if appropriate. By introducing this, traversal across node and its shadow tree can look more fluent and idiomatic. There are a few non-trivial traversal remaining like ElementShadow::recalcStyle() and attach(). But they should be flattened out eventually. No new tests. Refactoring. * dom/ContainerNodeAlgorithms.cpp: (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): * dom/ElementShadow.cpp: * dom/ElementShadow.h: (ElementShadow): (WebCore::Node::youngestShadowRoot): (WebCore): * dom/Node.h: (Node): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): (WebCore::TreeScopeAdopter::moveTreeToNewDocument): * dom/TreeScopeAdopter.h: (TreeScopeAdopter): * html/shadow/TextFieldDecorationElement.cpp: (WebCore::getDecorationRootAndDecoratedRoot): 2012-05-21 Christophe Dumez Add support for MessagePortArray type to JSC https://bugs.webkit.org/show_bug.cgi?id=84093 Reviewed by Adam Barth. Add support for MessagePortArray type to JSC code generator similarly to what was done for the V8 generator in r114319. Update bindings test results to reflect to change to the bindings generator. * CMakeLists.txt: Add new DeliveredIntent files to CMake. * bindings/js/JSDOMBinding.h: (WebCore): (WebCore::jsArray): Tweak jsArray() so that it accepts MessagePortArray as argument. * bindings/scripts/CodeGeneratorJS.pm: (JSValueToNative): (NativeToJSValue): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionSerializedValue): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): (WebCore::jsTestSerializedScriptValueInterfacePorts): (WebCore::setJSTestSerializedScriptValueInterfaceValue): (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList): 2012-05-21 Alexander Pavlov Web Inspector: [Styles] Cannot tab from selector of inherited rule, which in turn has leading inherited properties https://bugs.webkit.org/show_bug.cgi?id=87014 Reviewed by Yury Semikhatsky. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector): 2012-05-21 Greg Billock Add suggestions field to web intents API. https://bugs.webkit.org/show_bug.cgi?id=86791 Reviewed by Adam Barth. The |suggestions| field is used by the client to avoid an empty web intents selection window (picker). The UA can add the given suggestions to the picker if it would otherwise be empty. See http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html#intent-parameters-dictionary * Modules/intents/DeliveredIntent.cpp: (WebCore::DeliveredIntent::DeliveredIntent): * Modules/intents/Intent.cpp: (WebCore::Intent::create): (WebCore::Intent::Intent): * Modules/intents/Intent.h: (WebCore::Intent::suggestions): (Intent): 2012-05-21 Stephen Chenney SVGAnimatedPropertyTearOff does not clear a self pointer on deletion https://bugs.webkit.org/show_bug.cgi?id=86119 Reviewed by Nikolas Zimmermann. SVGAnimatedPropertyTearOff contains two SVGPropertyTearOff objects that have a pointer back to the SVGAnimatedPropertyTearOff. JS may also have a reference to these SVGPropertyTearOff objects. When the SVGAnimatedPropertyTearOff is deleted, the SVGPropertyTearOff objects may live on, but the pointer back to the deleted animated property tear off is left invalid. This patch clears the pointers on destruction of the SVGAnimatedPropertyTearOff. Test: svg/custom/bug86119.html * svg/properties/SVGAnimatedPropertyTearOff.h: (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff): (SVGAnimatedPropertyTearOff): 2012-05-21 Stephen Chenney [Chromium] REGRESSION: Assertion failure on svg/custom/acid3-test-77.html https://bugs.webkit.org/show_bug.cgi?id=86715 Reviewed by Nikolas Zimmermann. Calls to clear the text positioning elements in RenderSVGText must be protected with a FontCachePurgeProtector so that fonts are not removed before the SVG metrics are rebuilt. The protection must cover both the cache clearing and the reconstruction calls. Patch fixes existing tests. * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::subtreeChildWasAdded): (WebCore::RenderSVGText::subtreeChildWasRemoved): (WebCore::RenderSVGText::subtreeTextDidChange): (WebCore::RenderSVGText::removeChild): 2012-05-21 Stephen Chenney SVGTextRunRenderingContext can return null font, calling code asserts not null https://bugs.webkit.org/show_bug.cgi?id=86738 Reviewed by Nikolas Zimmermann. SVGTextRunRenderingContext::glyphDataForCharacter was returning a glyph with null font data for numerous code paths. It seems that it was doing so whenever it detected null fontData, rather than try to continue. Calling code would then immediately assert on this null fontData. This patch refactors SVGTextRunRenderingContext::glyphDataForCharacter so that it never returns null font data, adding an assertion to that effect. In particular, when the font data is null the code will reach the fallback glyph calculations. Refactoring covered by existing tests. A previously crashing test, svg/custom/acid3-test-77.html, no longer crashes. * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): 2012-05-21 Ilya Tikhonovsky Web Inspector: switch buildDominatedNodes function to front-end calculated _dominatorsTree https://bugs.webkit.org/show_bug.cgi?id=87022 The new version is using _dominatorsTree array that was build at front-end. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): 2012-05-21 Pavel Feldman Web Inspector: change WebCore/English.lproj/locallizedStrings encoding from UTF-16 to UTF-8. https://bugs.webkit.org/show_bug.cgi?id=86822 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: 2012-05-21 Vsevolod Vlasov Web Inspector: Move working copy support to UISourceCode and use it for both styles and scripts. https://bugs.webkit.org/show_bug.cgi?id=87021 Reviewed by Pavel Feldman. UISourceCode now listens for RevisionAdded event. Virtual methods workingCopyChanged and workingCopyCommitted added to UISourceCode and implemented in descendants. DebuggerResourceBinding does not call contentChanged on UISourceCode explicitly anymore. * inspector/front-end/DebuggerResourceBinding.js: (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource): (WebInspector.DebuggerResourceBinding.setScriptSource): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.commitEditing): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.SnippetJavaScriptSource.prototype.workingCopyCommitted): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.workingCopyCommitted): (WebInspector.StyleSource.prototype.workingCopyChanged): (WebInspector.StyleSourceFrame): (WebInspector.StyleSourceFrame.prototype.commitEditing): (WebInspector.StyleSourceFrame.prototype.afterTextChanged): (WebInspector.StyleSourceFrame.prototype._didEditContent): (WebInspector.StyleSourceFrame.prototype._onContentChanged): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype._revisionAdded): (WebInspector.UISourceCode.prototype.contentChanged): (WebInspector.UISourceCode.prototype.workingCopy): (WebInspector.UISourceCode.prototype.setWorkingCopy): (WebInspector.UISourceCode.prototype.workingCopyChanged): (WebInspector.UISourceCode.prototype.commitWorkingCopy): (WebInspector.UISourceCode.prototype.workingCopyCommitted): 2012-05-21 Andrey Kosyakov Web Inspector: [refactoring] promote fill/border colors used by timeline's frame overview to TimelineCategory https://bugs.webkit.org/show_bug.cgi?id=87016 Reviewed by Pavel Feldman. - drop unused 'color' field from TimelineCategory; - add borderColor and fillColorStop[0-1] to TimelineCategory; - fix style in a handful of places. Note we store textual values for color stops, not premade gradients so we can build gradients with different orientations rather than transforming a gradient. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.HeapGraph): (WebInspector.HeapGraph.prototype.get element): (WebInspector.HeapGraph.prototype.get visible): (WebInspector.HeapGraph.prototype.show): (WebInspector.HeapGraph.prototype.hide): (WebInspector.HeapGraph.prototype._clear): (WebInspector.TimelineCategoryStrips): (WebInspector.TimelineVerticalOverview): (WebInspector.TimelineVerticalOverview.prototype._renderBar): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.recordStyle): (WebInspector.TimelineCategory): 2012-05-21 'Pavel Feldman' Web Inspector: declare setFormatted on UISourceCode (otherwise fails for styles). Not reviewed: front-end fix as a follow up to r117751. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.consoleMessagesCleared): (WebInspector.UISourceCode.prototype.setFormatted): 2012-05-21 Yury Semikhatsky Unreviewed. Fix Closure compiler error after r117753. * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didGetNodePosition): 2012-05-21 Caio Marcelo de Oliveira Filho Move setEditingBehavior() from layoutTestController to window.internals https://bugs.webkit.org/show_bug.cgi?id=42689 Reviewed by Hajime Morita and Kenneth Rohde Christiansen. Add setEditingBehavior() to window.internals.settings. No new tests, but this change will allow more tests to run in WebKitTestRunner. * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setEditingBehavior): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-21 Vsevolod Vlasov Web Inspector: Temporary UISourceCode should be replaced each time another inline script is added in RawSourceCode with pending request. https://bugs.webkit.org/show_bug.cgi?id=87003 Reviewed by Pavel Feldman. This is needed to correctly show document content when debugger stops on several breakpoints in different scripts during page load. * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype._finishedLoading): 2012-05-20 Kinuko Yasuda Cleanup: Remove WebCore::revealFolderInOS() which is no longer used anywhere https://bugs.webkit.org/show_bug.cgi?id=86993 Reviewed by Adam Barth. No new tests as this must be just removing dead code. * platform/FileSystem.h: * platform/chromium/FileSystemChromium.cpp: * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-05-21 Alexander Pavlov Web Inspector: Annotate CSSStyleModel.js for the closure compiler https://bugs.webkit.org/show_bug.cgi?id=86858 Reviewed by Yury Semikhatsky. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleDeclaration.parseComputedStylePayload): (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty): (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): (WebInspector.CSSProperty.parsePayload): (WebInspector.CSSProperty.prototype.setText): (WebInspector.CSSProperty.prototype.setDisabled): (WebInspector.CSSStyleSheet.prototype.setText): (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper): (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent): (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders): 2012-05-21 Rakesh KN [Forms] Refactor HTMLFormCollection https://bugs.webkit.org/show_bug.cgi?id=86602 Reviewed by Kent Tamura. Modify HTMLFormCollection to be independent of HTMLFormElement which is needed for implementing HTMLFieldSetElement's element attribute. Covered by existing tests. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): Modified to take more generic HTMLElement* instead of HTMLFormElement* so that HTMLFormCollection for HTMLFieldSetElement can also be created. (WebCore::HTMLFormCollection::create): Ditto. (WebCore::HTMLFormCollection::formControlElements): Helper function for getting the array of FormAssociatedElements for this form. (WebCore::HTMLFormCollection::formImageElements): Helper function for getting the array of image elements for this form. (WebCore::HTMLFormCollection::numberOfFormControlElements): Helper function for getting the number of elements in this form. (WebCore::HTMLFormCollection::calcLength): Modified to use new helper functions defined for getting the FormAssociatedElements and image elements array instead of static_cast to HTMLFormElement. (WebCore::HTMLFormCollection::item): Ditto. (WebCore::HTMLFormCollection::getNamedFormItem): Ditto. (WebCore::HTMLFormCollection::updateNameCache): Ditto. * html/HTMLFormCollection.h: (WebCore): (HTMLFormCollection): * html/HTMLFormElement.h: (WebCore::HTMLFormElement::imageElements): New accessor for image elements array of form element. Also HTMLFormCollection is not needed to be friend of HTMLFormElement as collection does not access the form element memebers directly now. 2012-05-21 Yury Semikhatsky Web Inspector: expand only neighbors of the highlighted node when revealing it in heap snapshot https://bugs.webkit.org/show_bug.cgi?id=86998 Reviewed by Pavel Feldman. Only nearest nodes are expanded when a node is revealed in heap snapshot summary view. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightNode): (WebInspector.HeapSnapshotViewportDataGrid.prototype.highlightNode): (WebInspector.HeapSnapshotViewportDataGrid.prototype._isScrolledIntoView): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId): (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didGetNodePosition): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.showProfile): 2012-05-21 Mikhail Pozdnyakov [EFL] PlatformKeyboardEventEfl is missing ESC key handling. https://bugs.webkit.org/show_bug.cgi?id=86837 Reviewed by Kenneth Rohde Christiansen. Added ESC key handling. * platform/efl/EflKeyboardUtilities.cpp: (WebCore::createKeyMap): (WebCore::singleCharacterString): 2012-05-21 Pavel Feldman Web Inspector: move sources panel out of experimental. https://bugs.webkit.org/show_bug.cgi?id=86997 Reviewed by Yury Semikhatsky. This change moves sources panel out of experimental, removes revision support from the resources panel. * English.lproj/localizedStrings.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged): (WebInspector.JavaScriptSourceFrame.prototype._continueToLine): * inspector/front-end/ResourceView.js: * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._showResourceView): (WebInspector.FrameTreeElement.prototype.appendResource): (WebInspector.FrameResourceTreeElement): (WebInspector.FrameResourceTreeElement.prototype.sourceView): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get toolbarItemLabel): (WebInspector.ScriptsPanel.prototype.appendApplicableItems): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._setTextViewerDecorations): * inspector/front-end/textViewer.css: * inspector/front-end/utilities.js: 2012-05-21 Pavel Feldman Web Inspector: implement revision history view. https://bugs.webkit.org/show_bug.cgi?id=86966 Reviewed by Yury Semikhatsky. Added revision view into the drawer. It now lists all the revisions along with the inline diffs. Once source panel is enabled by default, this view will completely substitute the one in the resources panel. See the screenshot attached. View is updated when revisions are added and when editor view is switched. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/AdvancedSearchController.js: (WebInspector.FileBasedSearchResultsPane.prototype._appendSearchMatches): * inspector/front-end/ContextMenu.js: (WebInspector.ContextMenu.prototype._itemSelected): (WebInspector.ContextMenu.prototype.appendApplicableItems): (WebInspector.ContextMenu.Provider.prototype.appendApplicableItems): (WebInspector.ContextMenu.registerProvider): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/Resource.js: (WebInspector.ResourceRevision.prototype.revertToThis): * inspector/front-end/RevisionHistoryView.js: Added. (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.showHistory): (WebInspector.RevisionHistoryView.uiSourceCodeSelected): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryView.prototype._onclose): (WebInspector.RevisionHistoryTreeElement.else.revert): (WebInspector.RevisionHistoryTreeElement): (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step1): (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2): (WebInspector.RevisionHistoryTreeElement.prototype.onexpand): (WebInspector.RevisionHistoryTreeElement.prototype._createLine): (WebInspector.RevisionHistoryTreeElement.prototype._diff.popsym): (WebInspector.RevisionHistoryTreeElement.prototype._diff): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.prototype.registerUISourceCodeProvider): (WebInspector.ScriptsPanel.prototype._showLocalHistory): (WebInspector.ScriptsPanel.prototype.appendApplicableItems): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSourceFrame.prototype._contentChanged): (WebInspector.StyleSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (#search-results-pane-file-based .search-result): (#search-results-pane-file-based .search-result:hover): (#search-results-pane-file-based .search-match:hover): (#search-results-pane-file-based .search-match .search-match-content): * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: (.outline-disclosure.revision-history-drawer): (.outline-disclosure.revision-history-drawer ol): (.outline-disclosure.revision-history-drawer > ol): (.outline-disclosure.revision-history-drawer li): (.outline-disclosure.revision-history-drawer li.parent): (.revision-history-link): (.outline-disclosure.revision-history-drawer .revision-history-line): (.revision-history-drawer .webkit-line-number): (.revision-history-line-added): (.revision-history-line-removed): * inspector/front-end/textViewer.css: (.webkit-added-line.webkit-line-number): (.webkit-removed-line.webkit-line-number): (.webkit-changed-line.webkit-line-number): 2012-05-18 Ilya Tikhonovsky Web Inspector: upstream build dominators tree procedure from v8. https://bugs.webkit.org/show_bug.cgi?id=86640 The idea is to reduce transfer size and move all the post-processing steps to the front-end. The JS implementation is ~1.5 times slower. Reviewed by Yury Semikhatsky. Covered by existing tests and performance tests. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex): (WebInspector.HeapSnapshot.prototype._buildDominatorTree): (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes): (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): (WebInspector.HeapSnapshot.prototype._calculateFlags): 2012-05-21 Mike Lawther Crash in -webkit-calc https://bugs.webkit.org/show_bug.cgi?id=86954 Reviewed by Abhishek Arya. Ensure that both ends of a blend are checked for being Calculated. The current check did not cover the case where the 'from' end was Calculated and nonzero, and the 'to' end was zero and not Calculated. Blending doesn't work with calculated expressions and is being tracked in bug http://webkit.org/b/86160 Tests: css3/calc/transition-crash3.html css3/calc/transition-crash4.html * platform/Length.h: (WebCore::Length::blend): 2012-05-21 Pavel Feldman Web Inspector: make search results view more dense https://bugs.webkit.org/show_bug.cgi?id=86937 Reviewed by Yury Semikhatsky. - moved search field to the 'drawer status bar' - search view is now shown on scripts panel only - switching from the scripts panel closes the search view - beautified the looks (see the screenshot) * English.lproj/localizedStrings.js: * inspector/front-end/AdvancedSearchController.js: (WebInspector.AdvancedSearchController.prototype.handleShortcut): (WebInspector.AdvancedSearchController.prototype.show): (WebInspector.AdvancedSearchController.prototype.close): (WebInspector.SearchView): (WebInspector.FileBasedSearchResultsPane): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.willHide): * inspector/front-end/externs.js: (WebInspector.showViewInDrawer): (WebInspector.closeViewInDrawer): * inspector/front-end/inspector.css: (.search-drawer-header input[type="search"].search-config-search): (.search-drawer-header label.search-config-label): (.search-drawer-header input[type="checkbox"].search-config-checkbox): (body:not(.platform-mac) .search-drawer-header input[type="checkbox"].search-config-checkbox): (body.platform-mac .search-drawer-header input[type="checkbox"].search-config-checkbox): (.drawer-header): (.drawer-header-close-button): (.drawer-header-close-button:hover): (.drawer-header-close-button:active): (.search-view .search-results): (#search-results-pane-file-based li): (#search-results-pane-file-based ol): (#search-results-pane-file-based ol.children): (#search-results-pane-file-based ol.children.expanded): (#search-results-pane-file-based li.parent::before): (#search-results-pane-file-based li.parent.expanded::before): (#search-results-pane-file-based .search-result): (#search-results-pane-file-based .show-more-matches): * inspector/front-end/inspector.js: (WebInspector.showViewInDrawer.closeButtonPressed): (WebInspector.showViewInDrawer): (WebInspector.closeViewInDrawer): (WebInspector.postDocumentKeyDown): 2012-05-18 Andreas Kling REGRESSION(r117501): IconDatabase asserts on startup in synchronousIconForPageURL(). Reviewed by Anders Carlsson. - Correctly set m_retainOrReleaseIconRequested to true in retainIconForPageURL(). This was causing the assertions, as we would end up doing nothing until the first icon release request came in. - Require that m_urlsToRetainOrReleaseLock be held when accessing m_retainOrReleaseIconRequested. This removes a possible race condition in double checked locking. - Swap over the retain/release work queues while holding m_urlsToRetainOrReleaseLock and release it right away to avoid sitting on the lock while updating the database. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::synchronousIconForPageURL): (WebCore::IconDatabase::retainIconForPageURL): (WebCore::IconDatabase::releaseIconForPageURL): (WebCore::IconDatabase::retainedPageURLCount): (WebCore::IconDatabase::performURLImport): (WebCore::IconDatabase::syncThreadMainLoop): (WebCore::IconDatabase::performPendingRetainAndReleaseOperations): * loader/icon/IconDatabase.h: (IconDatabase): 2012-05-21 Kent Tamura Unreviewed, build fix. * html/StepRange.cpp: (WebCore::StepRange::parseStep): Remove bogus asssetions. 2012-05-21 Kent Tamura Unreviewed, build fix. * html/StepRange.cpp: (WebCore::StepRange::StepRange): Remove another ASSERT_NOT_REACHED. 2012-05-21 Kent Tamura Unreviewed, build fix. * html/StepRange.h: (WebCore::StepRange::StepDescription::StepDescription): Remove ASSERT_NOT_REACHED. 2012-05-21 Yoshifumi Inoue [Forms] Move numeric related methods in HTMLInputElement class to another place https://bugs.webkit.org/show_bug.cgi?id=82034 Reviewed by Kent Tamura. This patch moves step and range related methods into StepRange class for ease of using step calculation other than double floating point number arithmetic, e.g. decimal, long double, and so on. New class StepRange::StepDescription holds values for calculating stepped value, defaultStep, defaultStepBase, integer rounding flags, step scale factor instead of virtual methods in InputType class. No new tests because of this patch doesn't change behavior. * WebCore.xcodeproj/project.pbxproj: Set attribute of StepRange.h to "Private" for including it in HTMLInputElement.cpp. * html/BaseDateAndTimeInputType.cpp: (WebCore::InputType::rangeOverflow): Moved to use InputType class. (WebCore::InputType::rangeUnderflow): Moved to use InputType class. (WebCore::BaseDateAndTimeInputType::stepMismatch): Moved to use stepRange. * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): Removed method declaration for stepBase. * html/DateInputType.cpp: (WebCore::DateInputType::setupStepRange): Added. * html/DateInputType.h: (DateInputType): Removed method declarations. * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::defaultStep): Removed. (WebCore::DateTimeInputType::maximum): Removed. (WebCore::DateTimeInputType::minimum): Removed. (WebCore::DateTimeInputType::setupStepRange): Added (WebCore::DateTimeInputType::stepScaleFactor): Removed. * html/DateTimeInputType.h: (DateTimeInputType): Removed deprecated method declarations. * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::defaultStep): Removed. (WebCore::DateTimeLocalInputType::maximum): Removed. (WebCore::DateTimeLocalInputType::minimum): Removed. (WebCore::DateTimeLocalInputType::setupStepRange): Added. (WebCore::DateTimeLocalInputType::stepScaleFactor): Removed. * html/DateTimeLocalInputType.h: (DateTimeLocalInputType): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isInRange): Changed to call InputType::isInRange. (WebCore::HTMLInputElement::isOutOfRange): Changed to call InputType::isOutOfRange. (WebCore::HTMLInputElement::setupStepRange): Added. * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::acceptableError): Moved to StepRange class. (WebCore::InputType::alignValueForStep): Moved to StepRange class. (WebCore::InputType::minimum): Changed to use StepRange class. (WebCore::InputType::maximum): Changed to use StepRange class. (WebCore::InputType::parseToDouble): Changed to have ASSERT_NOT_REACHED. (WebCore::InputType::stepBaseWithDecimalPlaces): Changed to use StepRange class. (WebCore::InputType::validationMessage): Changed to use StepRange class. (WebCore::InputType::applyStep): Changed to use StepRange class. (WebCore::InputType::getAllowedValueStep): Changed to use StepRange class. (WebCore::InputType::isInRange): Added. (WebCore::InputType::isOutOfRange): Added. (WebCore::InputType::rangeOverflow): Changed to use StepRange class. (WebCore::InputType::rangeUnderflow): Changed to use StepRange class. (WebCore::InputType::setupStepRange): Added. (WebCore::InputType::stepUpFromRenderer): Changed to use StepRange class. (WebCore::InputType::stepMismatch): Changed to use StepRange class. * html/InputType.h: (InputType): * html/MonthInputType.cpp: (WebCore::MonthInputType::defaultStep): Removed. (WebCore::MonthInputType::maximum): Removed. (WebCore::MonthInputType::minimum): Removed. (WebCore::MonthInputType::setupStepRange): Added. (WebCore::MonthInputType::stepScaleFactor): Removed. * html/MonthInputType.h: (MonthInputType): * html/NumberInputType.cpp: (WebCore): (WebCore::NumberInputType::defaultStep): Removed. (WebCore::NumberInputType::maximum): Removed. (WebCore::NumberInputType::minimum): Removed. (WebCore::NumberInputType::rangeOverflow): Moved to InputType class. (WebCore::NumberInputType::rangeUnderflow): Moved to InputType class. (WebCore::NumberInputType::setupStepRange): Added. (WebCore::NumberInputType::stepMismatch): Moved to InputType class. (WebCore::NumberInputType::stepBaseWithDecimalPlaces): Changed to use StepRange class. (WebCore::NumberInputType::stepScaleFactor): Removed. * html/NumberInputType.h: (NumberInputType): * html/RangeInputType.cpp: (WebCore::RangeInputType::defaultStep): Removed. (WebCore::RangeInputType::maximum): Removed. (WebCore::RangeInputType::minimum): Removed. (WebCore::RangeInputType::setupStepRange): Added. (WebCore::RangeInputType::stepScaleFactor): Removed. (WebCore::RangeInputType::handleKeydownEvent): Changed to use StepRange class. (WebCore::RangeInputType::fallbackValue): Changed to use StepRange class. (WebCore::RangeInputType::sanitizeValue): Changed to use StepRange class. * html/RangeInputType.h: (RangeInputType): * html/StepRange.cpp: (WebCore::StepRange::StepRange): Added. (WebCore::StepRange::clampValue): Changed for member variable name changes. (WebCore::StepRange::hasStep): Added. (WebCore::StepRange::maximum): Added. (WebCore::StepRange::minimum): Added. (WebCore::StepRange::step): Added. (WebCore::StepRange::stepBase): Added. (WebCore::StepRange::stepDecimalPlaces): Added. (WebCore::StepRange::stepScaleFactor): Added. (WebCore::StepRange::setHasStep): Added. (WebCore::StepRange::setup): Added. (WebCore::StepRange::parse): Added. * html/StepRange.h: (StepDescription): Added (WebCore::StepRange::StepDescription::StepDescription): (WebCore::StepRange::acceptableError): Moved from InputType class. (WebCore::StepRange::alignValueForStep): Moved from InputType class. (WebCore::StepRange::defaultValue): Changed for member variable name changes. (WebCore::StepRange::proportionFromValue): Changed for member variable name changes. (WebCore::StepRange::valueFromProportion): Changed for member variable name changes. * html/TimeInputType.cpp: (WebCore::TimeInputType::defaultStep): Removed. (WebCore::TimeInputType::maximum): Removed. (WebCore::TimeInputType::minimum): Removed. (WebCore::TimeInputType::setupStepRange): Added. (WebCore::TimeInputType::stepScaleFactor): Removed. * html/TimeInputType.h: (TimeInputType): * html/WeekInputType.cpp: (WebCore): (WebCore::WeekInputType::defaultStep): Removed. (WebCore::WeekInputType::maximum): Removed. (WebCore::WeekInputType::minimum): Removed. (WebCore::WeekInputType::setupStepRange): Added. (WebCore::WeekInputType::stepScaleFactor): Removed. * html/WeekInputType.h: (WeekInputType): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): Changed to use StepRange class. (WebCore::SliderThumbElement::setPositionFromPoint): Changed to use StepRange class. 2012-05-21 Kentaro Hara [V8] Pass Isolate to throwNotEnoughArgumentsError() https://bugs.webkit.org/show_bug.cgi?id=86983 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to throwNotEnoughArgumentsError(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateArgumentsCountCheck): (GenerateEventConstructorCallback): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::Float64ArrayV8Internal::fooCallback): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback): (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::constructorCallback): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::itemCallback): (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::TestMediaQueryListListenerV8Internal::methodCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::voidMethodWithArgsCallback): (WebCore::TestObjV8Internal::intMethodWithArgsCallback): (WebCore::TestObjV8Internal::objMethodWithArgsCallback): (WebCore::TestObjV8Internal::methodWithSequenceArgCallback): (WebCore::TestObjV8Internal::methodReturningSequenceCallback): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjV8Internal::serializedValueCallback): (WebCore::TestObjV8Internal::idbKeyCallback): (WebCore::TestObjV8Internal::optionsObjectCallback): (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjV8Internal::methodWithCallbackArgCallback): (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjV8Internal::overloadedMethod1Callback): (WebCore::TestObjV8Internal::overloadedMethod2Callback): (WebCore::TestObjV8Internal::overloadedMethod3Callback): (WebCore::TestObjV8Internal::overloadedMethod4Callback): (WebCore::TestObjV8Internal::overloadedMethod5Callback): (WebCore::TestObjV8Internal::overloadedMethod6Callback): (WebCore::TestObjV8Internal::overloadedMethod7Callback): (WebCore::TestObjV8Internal::overloadedMethod11Callback): (WebCore::TestObjV8Internal::overloadedMethod12Callback): (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback): (WebCore::TestObjV8Internal::convert1Callback): (WebCore::TestObjV8Internal::convert2Callback): (WebCore::TestObjV8Internal::convert3Callback): (WebCore::TestObjV8Internal::convert4Callback): (WebCore::TestObjV8Internal::convert5Callback): (WebCore::TestObjV8Internal::strictFunctionCallback): (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback): (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): * bindings/v8/ScriptController.cpp: (WebCore::setValueAndClosePopupCallback): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::throwNotEnoughArgumentsError): * bindings/v8/V8Proxy.h: (V8Proxy): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): (WebCore::V8DataView::setInt8Callback): (WebCore::V8DataView::setUint8Callback): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8IntentConstructor.cpp: (WebCore::V8Intent::constructorCallback): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getExtensionCallback): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::constructorCallback): (WebCore::V8WebKitMutationObserver::observeCallback): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): (WebCore::V8WebSocket::sendCallback): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::openCallback): 2012-05-20 Kentaro Hara [V8] Pass Isolate to throwError()s in V8 custom bindings (Part 2) https://bugs.webkit.org/show_bug.cgi?id=86981 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to throwError()s in V8 custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::pushStateCallback): (WebCore::V8History::replaceStateCallback): * bindings/v8/custom/V8IntentConstructor.cpp: (WebCore::V8Intent::constructorCallback): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8NotificationCenterCustom.cpp: (WebCore::V8NotificationCenter::createHTMLNotificationCallback): (WebCore::V8NotificationCenter::createNotificationCallback): (WebCore::V8NotificationCenter::requestPermissionCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageSetter): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::constructorCallback): (WebCore::V8WebKitMutationObserver::observeCallback): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): (WebCore::V8WebSocket::sendCallback): (WebCore::V8WebSocket::closeCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::V8WorkerContext::importScriptsCallback): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): (WebCore::V8XMLHttpRequest::openCallback): (WebCore::V8XMLHttpRequest::sendCallback): 2012-05-20 Kentaro Hara [V8] Pass Isolate to throwError()s in V8 custom bindings (Part 1) https://bugs.webkit.org/show_bug.cgi?id=86980 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to throwError()s in V8 custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferCustom.cpp: (WebCore::V8ArrayBuffer::constructorCallback): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::constructWebGLArray): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::clearDataCallback): (WebCore::V8Clipboard::setDragImageCallback): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::appendCallback): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertySetter): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::evaluateCallback): 2012-05-20 Kentaro Hara [V8] Pass Isolate to V8NPObject::npObjectGetProperty() and V8NPObject::npObjectSetProperty() https://bugs.webkit.org/show_bug.cgi?id=86979 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to V8NPObject::npObjectGetProperty() and V8NPObject::npObjectSetProperty(). No tests. No change in behavior. * bindings/v8/V8NPObject.cpp: (WebCore::npObjectGetProperty): (WebCore::npObjectNamedPropertyGetter): (WebCore::npObjectIndexedPropertyGetter): (WebCore::npObjectGetNamedProperty): (WebCore::npObjectGetIndexedProperty): (WebCore::npObjectQueryProperty): (WebCore::npObjectSetProperty): (WebCore::npObjectNamedPropertySetter): (WebCore::npObjectIndexedPropertySetter): (WebCore::npObjectSetNamedProperty): (WebCore::npObjectSetIndexedProperty): * bindings/v8/V8NPObject.h: (WebCore): * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp: (WebCore::npObjectNamedGetter): (WebCore::npObjectNamedSetter): (WebCore::npObjectIndexedGetter): (WebCore::npObjectIndexedSetter): 2012-05-20 Ryosuke Niwa Using createContextualFragment to insert a correctly https://bugs.webkit.org/show_bug.cgi?id=62971 Reviewed by Eric Seidel. The reason these tags weren't colorized correctly was because the characters for the end tags where consumed by the tokenizer at the same time as it consumed the text of the script tag. These characters are buffered internally by the tokenizer because the tokenizer is searching for "an appropriate end tag", which is "" in this case. I tried a number of different approaches to fixing this bug. The approach in this patch adds an accessor to the tokenizer to read out the buffered characters. This approach makes it easier for the HTMLSourceTracker to get exactly the right value for these buffered characters without having to do a complicated simulation of the buffering itself. Tests: fast/frames/viewsource-plain-text-tags.html: * html/parser/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::pumpTokenizer): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): - Give the HTMLSourceTracker a pointer to the tokenizer so it can ask for the buffered characters. * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::start): - The idea here is to treat characters buffered internally by the tokenizer the same way we treat characters that were contained in a previous segment of source. We copy them into our accumulation buffer and adjust the token base offset to account for the extra characters. (WebCore::HTMLSourceTracker::end): - Don't consier the character buffered by the tokenizer to be part of the token we've just finished. (WebCore::HTMLSourceTracker::sourceForToken): - Remove the assumption that all of the m_previousSource is contained in the source for the current token. Because we now understand that the tokenizer can buffer some characters internally, we might not exhaust the m_previousSource. * html/parser/HTMLSourceTracker.h: - Rename m_sourceFromPreviousSegments to m_previousSource and changed to a SegementedString to avoid extra mallocs we keep appending tiny segments. - Rename m_source to m_currentSource to contrast nicely with m_previousSource. * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::flushBufferedEndTag): (WebCore::HTMLTokenizer::nextToken): - Previously, we cleared the temporary buffer lazily when we needed to add new characters to it. Now we clear it eagerly so that it's length tells us whether we're currently using it to store characters. - Previously, we weren't storing the character that we used to terminate the appropriate end tag (e.g., the > in ) because we didn't need to "unbuffer" that character into the HTMLToken::appendToCharacter. Now, we do store that character in the temporary buffer so that the HTMLSourceTracker can see that character. (WebCore::HTMLTokenizer::bufferedCharacters): * html/parser/HTMLTokenizer.h: (WebCore::HTMLTokenizer::numberOfBufferedCharacters): - Add accessor methods to copy out the buffered characters. - Also, unrelated to the rest of this patch, I made the constructor for HTMLTokenizer explicit because it takes only a single paramater, per the style guide. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::clear): - SegmentedString::clear wasn't clearing all of its state. I don't think this issue was actually observable, but I noticed it when working on this patch, so I fixed it. 2012-01-03 Benjamin Poulain Exclude Mac's PlatformEventFactory from iOS https://bugs.webkit.org/show_bug.cgi?id=75493 Reviewed by Sam Weinig. Move PlatformEventFactory.(h|cpp) to PlatformEventFactoryMac(h|cpp) and exclude the file from iOS build. * Configurations/WebCore.xcconfig: Also exclude EventHandlerMac for consistency. * WebCore.xcodeproj/project.pbxproj: * page/mac/EventHandlerMac.mm: * platform/mac/PlatformEventFactoryMac.h: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.h. * platform/mac/PlatformEventFactoryMac.mm: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.mm. (WebCore::globalPoint): (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::mouseEventTypeForEvent): (WebCore::clickCountForEvent): (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): (WebCore::gestureEventTypeForEvent): (WebCore::textFromEvent): (WebCore::unmodifiedTextFromEvent): (WebCore::keyIdentifierForKeyEvent): (WebCore::isKeypadEvent): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::isKeyUpEvent): (WebCore::modifiersForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformEventFactory::createPlatformWheelEvent): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): (WebCore::PlatformEventFactory::createPlatformKeyboardEvent): (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder): (WebCore::PlatformEventFactory::createPlatformGestureEvent): 2012-01-03 Wei James Optimize AudioBufferSourceNode process by avoiding interpolation when pitchRate==1 https://bugs.webkit.org/show_bug.cgi?id=74592 Reviewed by Kenneth Russell. Covered by existing webaudio layout tests, especially webaudio/audiobuffersource-playbackrate.html * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping): (WebCore::AudioBufferSourceNode::renderFromBuffer): * webaudio/AudioBufferSourceNode.h: 2012-01-03 Joseph Pecoraro Web Inspector: Access to Node Highlighting info without drawing https://bugs.webkit.org/show_bug.cgi?id=75504 Provide a "getHighlight" method alongside "drawHighlight" that gets most of the important node highlighting information. This can be used by a port to do its own node highlighting or provide extra content without interfering with the highlight rects. Reviewed by Timothy Hatcher. * WebCore.xcodeproj/project.pbxproj: Privately expose the Highlight struct in DOMNodeHighlighter.h. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawHighlight): (WebCore::DOMNodeHighlighter::getHighlight): * inspector/DOMNodeHighlighter.h: Reuse the existing draw code to instead populate the Highlight struct with the information it is about to draw, and only draw if there is a context. * inspector/InspectorController.cpp: (WebCore::InspectorController::getHighlight): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getHighlight): * inspector/InspectorDOMAgent.h: Get highlight information by going through getHighlight in InspectorController. This is alongside drawHighlight. 2012-01-03 Shawn Singh [chromium] Push drawsContent and contentsVisible into accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=71209 Reviewed by James Robinson. Tests: compositing/visibility/visibility-simple-canvas2d-layer.html compositing/visibility/visibility-simple-video-layer.html compositing/visibility/visibility-simple-webgl-layer.html Rebaselined compositing/visibility/visibility-image-layers.html The CSS visibility property was not being properly obeyed by many specialized layer types in the accelerated compositor. The root of the problem was that drawsContent and contentsVisible flags were not properly propagated into the compositor. This patch removes the drawsContent() callback, and instead makes sure that drawsContent and contentsVisible are "pushed" through the accelerated compositor. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setDrawsContent): (WebCore::GraphicsLayerChromium::setContentsVisible): (WebCore::GraphicsLayerChromium::setContentsToImage): (WebCore::GraphicsLayerChromium::setContentsToCanvas): (WebCore::GraphicsLayerChromium::setContentsToMedia): (WebCore::GraphicsLayerChromium::updateLayerIsDrawable): (WebCore::GraphicsLayerChromium::setupContentsLayer): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setIsDrawable): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::drawsContent): * platform/graphics/chromium/PluginLayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::drawsContent): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::drawsContent): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::dumpLayerProperties): 2012-01-03 Shawn Singh [chromium] Make sure root damage rect gets passed to renderer https://bugs.webkit.org/show_bug.cgi?id=74893 Reviewed by James Robinson. Unit test added to CCLayerTreeHostImplTest.cpp * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::swapBuffers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::swapBuffers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: 2012-01-03 Yuzhu Shen v8 binding: npCreateV8ScriptObject() should not returned an existing V8NPObject if the rootObject doesn't match https://bugs.webkit.org/show_bug.cgi?id=74515 Reviewed by Nate Chapin. Test: http/tests/plugins/create-v8-script-objects.html * bindings/v8/NPV8Object.cpp: (WebCore::freeV8NPObject): (WebCore::npCreateV8ScriptObject): 2012-01-03 Jon Lee Leak of WebNotificationClient when page is destroyed https://bugs.webkit.org/show_bug.cgi?id=74980 Reviewed by Mark Rowe. * notifications/NotificationController.cpp: (WebCore::NotificationController::~NotificationController): Notify the client that the controller has been destroyed. * notifications/NotificationPresenter.h: Add notificationControllerDestroyed() callback to the client interface. 2012-01-03 Alexis Menard getComputedStyle for list-style is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75443 Reviewed by Tony Chang. Implement getComputedStyle for list-style. Test: fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Adrienne Walker [chromium] Remove unneeded content vs. layer space distinction in tiled layers https://bugs.webkit.org/show_bug.cgi?id=75498 Reviewed by James Robinson. Long ago, before scrollbars became their own layers, tiled layers had a distinction between content space (what's mostly called layer space elsewhere) and layer space (the transformed content space). It seemed like this transform could get reused for supporting RTL pages, but as that's not the case, it should be eradicated. Tiled layers now deal with everything in "layer space", which is a 2d rectangle starting at (0, 0) in the top left of the layer and extending to contentBounds() in the bottom right. As no code actually set the tiler position, this change should be a no-op. Test: LayoutTests/compositing/ * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::isDirty): (WebCore::UpdatableTile::clearDirty): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdateTiles): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::operator=): (WebCore::CCLayerTilingData::layerRectToTileIndices): (WebCore::CCLayerTilingData::tileRect): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2011-12-22 Joseph Pecoraro Implement Date and Time Input Value Sanitization https://bugs.webkit.org/show_bug.cgi?id=59951 Sanitize non-parsable incoming strings to the empty string. Reviewed by Kent Tamura. Covered by existing tests. * html/BaseDateAndTimeInputType.h: * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::sanitizeValue): check if the incoming string is valid. If not just return the empty string. 2012-01-03 Julien Chaffraix RenderLayer::backgroundClipRect should not check parent() https://bugs.webkit.org/show_bug.cgi?id=73731 Reviewed by Simon Fraser. Clean-up only, no expected change in behavior. * rendering/RenderLayer.cpp: (WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to a check for AbsolutePosition for consistency but also as this is equivalent due to: - the previous check for FixedPosition. - RenderView, which is positioned, will never goes to this code as it has no parent(). (WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at it, also moved the inline initialization of |backgroundClipRect| to its own function and removed a |view| check as the associated ASSERT seems to never have been reached. 2012-01-03 Alexey Proskuryakov REGRESSION (r102247): Focus ring is not drawn around a button Rubber-stamped by Dan Bernstein. * platform/mac/ThemeMac.mm: (WebCore::updateStates): Flip an incorrect conditional, this code should run on Snow Leopard and Lion. 2012-01-03 Alexis Menard getComputedStyle should return shorthands property with the minimum number of sides possible. https://bugs.webkit.org/show_bug.cgi?id=75434 Reviewed by Tony Chang. As stated in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties we should return shorthands properties with the minimum number of sides possible. Existing tests have been updated accordingly. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand): * css/CSSComputedStyleDeclaration.h: 2012-01-03 Martin Robinson [GTK] GTK+ 3 theming code does not use the GtkOrientable style class https://bugs.webkit.org/show_bug.cgi?id=72789 Reviewed by Philippe Normand. No new tests. Testing GTK+ theming is quite difficult because no two distributions have the same set of themes. Current tests prevent regressions. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::applySliderStyleContextClasses): Added this helper that properly handles the orientable style class. (WebCore::RenderThemeGtk::paintSliderTrack): Use the new helper. (WebCore::RenderThemeGtk::paintSliderThumb): Ditto. * platform/gtk/ScrollbarThemeGtk3.cpp: (WebCore::applyScrollbarStyleContextClasses): Added this helper that properly handles the orientable style class. (WebCore::ScrollbarThemeGtk::paintTrackBackground): Use the new helper. (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto. (WebCore::ScrollbarThemeGtk::paintThumb): Ditto. (WebCore::ScrollbarThemeGtk::paintButton): Ditto. 2012-01-03 Florin Malita NULL ptr in WebCore::SVGStyledTransformableElement::animatedLocalTransform https://bugs.webkit.org/show_bug.cgi?id=75227 Reviewed by Dirk Schulze. Test: svg/custom/webkit-transform-crash.html * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): Add a null-renderer check. 2012-01-03 Alexis Menard getComputedStyle for border is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75319 Reviewed by Tony Chang. Implement getComputedStyle for border. fast/css/getComputedStyle/getComputedStyle-border-shorthand.html was extented. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Alexis Menard Sort the WebCore Xcode project file Reviewed by Dimitri Glazkov. * WebCore.xcodeproj/project.pbxproj: 2012-01-03 Adrienne Walker [chromium] Set tiler bounds explicitly rather than growing them https://bugs.webkit.org/show_bug.cgi?id=75331 Reviewed by James Robinson. Rather than only growing bounds, make the bounds on the tiler be set explicitly by TiledLayerChromium. This patch now properly invalidates regions when the bounds change. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateBounds): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBounds): (WebCore::CCLayerTilingData::bounds): * platform/graphics/chromium/cc/CCLayerTilingData.h: 2012-01-03 Martin Robinson [GTK] Slider thumb is not centered on the track with the unico theme https://bugs.webkit.org/show_bug.cgi?id=72802 Reviewed by Philippe Normand. No new tests. This only applies to certain GTK+ themes. Existing tests cover the default GTK+ theme. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the slider thumb by the trough border. 2012-01-03 Adrienne Walker [chromium] Make tiled layer's tiler always exist https://bugs.webkit.org/show_bug.cgi?id=75329 Reviewed by James Robinson. TiledLayerChromium has some awkward code to handle lazily creating the tiler, including lots of null checks and shadowing the tile size. Instead, always create the tiler up front. As values change that invalidate all tiles, reset it rather than clear the pointer. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setIsNonCompositedContent): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::setTileSize): (WebCore::TiledLayerChromium::setBorderTexelOption): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::setTilingOption): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::setIsNonCompositedContent): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBorderTexelOption): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/gpu/TilingData.cpp: (WebCore::TilingData::setHasBorderTexels): * platform/graphics/gpu/TilingData.h: 2012-01-03 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructor::destroy): * bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::destroy): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::destroy): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructor::destroy): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::destroy): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::destroy): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull): 2012-01-03 Carlos Garcia Campos [GTK] Fix scrollbars size with GTK+ 3.x https://bugs.webkit.org/show_bug.cgi?id=75467 Reviewed by Xan Lopez. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::getStyleContext): Add the style class for the given widget type to the GtkWidgetPath when creating GtkStyleContext objects. 2012-01-03 Alexis Menard getComputedStyle for outline is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75441 Reviewed by Antonio Gomes. Implement getComputedStyle for outline. Test: fast/css/getComputedStyle/getComputedStyle-outline-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Carlos Garcia Campos [GTK] Use gdk_screen_get_monitor_workarea() when available for screenAvailableRect() https://bugs.webkit.org/show_bug.cgi?id=75435 Reviewed by Martin Robinson. * platform/gtk/GtkVersioning.c: (getScreenCurrentDesktop): (getScreenWorkArea): (gdk_screen_get_monitor_workarea): Implement it when GTK+ < 3.3.6. * platform/gtk/GtkVersioning.h: * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenAvailableRect): Use gdk_screen_get_monitor_workarea() instead of our own implementation. 2012-01-02 Kentaro Hara REGRESSION(r103919): Remove resolve-supplemental.pl from the WebCore target in Xcode https://bugs.webkit.org/show_bug.cgi?id=75458 Reviewed by Adam Barth. At r103919, we added resolve-supplemental.pl to WebCore.framework/Resources, but we should have added it to the project without adding it to any target. This patch fixes it. No tests. No change in behavior. * WebCore.xcodeproj/project.pbxproj: 2012-01-02 Kentaro Hara Enable the [Supplemental] IDL on GTK/GObject https://bugs.webkit.org/show_bug.cgi?id=75411 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on GObject bindings of GTK by changing the build flow of bindings/gobject/GNUmakefile.am as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.am: * bindings/gobject/GNUmakefile.am: 2012-01-02 Kentaro Hara Add resolve-supplemental.pl to project.pbxproj https://bugs.webkit.org/show_bug.cgi?id=75426 Reviewed by Adam Barth. We should have added "resolve-supplemental.pl" to build scripts of AppleWebKit when we enabled the [Supplemental] IDL on AppleWebKit at r103519. This is a follow-up patch for it. No tests. Just confirm that the AppleWebKit build passes. * WebCore.xcodeproj/project.pbxproj: 2012-01-02 Kentaro Hara Add resolve-supplemental.pl to build scripts of AppleWin https://bugs.webkit.org/show_bug.cgi?id=75412 Reviewed by Adam Barth. We should have added "resolve-supplemental.pl" to build scripts of AppleWin when we enabled the [Supplemental] IDL on AppleWin at r103519. This is a follow-up patch for it. No tests. Just confirm that the AppleWin build passes. * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: 2012-01-02 Sam Weinig Fix the build. * bindings/scripts/CodeGeneratorJS.pm: 2012-01-02 Andy Estes Fix the Windows build after r103888. * WebCore.vcproj/WebCore.vcproj: Remove CollectionCache.{cpp, h} from the WebCore vcproj. 2012-01-02 Sam Weinig REGRESSION(r100517): We're leaking many, many DOM objects! https://bugs.webkit.org/show_bug.cgi?id=75451 Reviewed by Mark Rowe. * bindings/scripts/CodeGeneratorJS.pm: Add a temporary workaround to the problem of handle finalizers not getting called by adding back the destructors (or rather their replacement, destroy() functions). 2012-01-02 Caio Marcelo de Oliveira Filho Fix chromium mac build after r103905 https://bugs.webkit.org/show_bug.cgi?id=75436 Reviewed by Csaba Osztrogonác. Adding parenthesis to disambiguate because clang gives error "expression is not assignable". * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in RenderSVGResourceGradient https://bugs.webkit.org/show_bug.cgi?id=75364 Reviewed by Daniel Bates. * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::removeAllClientsFromCache): (WebCore::RenderSVGResourceGradient::removeClientFromCache): (WebCore::RenderSVGResourceGradient::applyResource): avoid looking up the hash twice by using HashMap::add(). * rendering/svg/RenderSVGResourceGradient.h: rename m_gradient to m_gradientMap. 2012-01-02 Tor Arne Vestbø [Qt] Fix qmake warning about unescaped backslashes Reviewed by Ossy. * DerivedSources.pri: 2012-01-02 Carlos Garcia Campos Unreviewed. Fix make distcheck issue. * GNUmakefile.am: Add resolve-supplemental.pl script to EXTRA_DIST. 2012-01-01 Andreas Kling Clear HTMLCollection's internal cache on construction. Reviewed by Antti Koivisto. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): 2012-01-01 Eunmi Lee [EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp. https://bugs.webkit.org/show_bug.cgi?id=75292 Reviewed by Andreas Kling. Move ewk_util_dpi_get() function in the ewk_util.cpp to the WebCore/platform/efl/EflScreenUtilities.cpp in order to use it in the WebKit2. The function's name is changed to getDPI(). * PlatformEfl.cmake: * platform/efl/EflScreenUtilities.cpp: Added. (WebCore::getDPI): * platform/efl/EflScreenUtilities.h: Added. 2012-01-01 Andreas Kling Merge CollectionCache into HTMLCollection. Reviewed by Anders Carlsson. - Move the members of CollectionCache into HTMLCollection. - Renamed resetCollectionInfo() to invalidateCacheIfNeeded(). - Removed a bunch of overkill HashMap::checkConsistency() calls. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/CollectionCache.cpp: Removed. * html/CollectionCache.h: Removed. Remove CollectionCache. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::nextItem): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollection::append): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedItem): (WebCore::HTMLFormCollection::nextItem): (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): HTMLCollection's m_info and info() become "struct m_cache" (protected.) * html/HTMLOptionsCollection.cpp: * html/HTMLOptionsCollection.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from HTMLSelectElement::setRecalcListItems(). * html/HTMLFormCollection.h: Remove stale declaration of formCollectionInfo() which no longer exists. 2012-01-01 Andreas Kling Move the remaining collections to caching on their respective base nodes. Reviewed by Anders Carlsson. Add a (lazily-allocated) array of HTMLCollections to ElementRareData and cache the various collections on their base node rather than recreating them every time. Test: fast/dom/collection-idempotence.html fast/dom/gc-9.html * html/CollectionType.h: * dom/ElementRareData.h: (WebCore::ElementRareData::hasCachedHTMLCollections): (WebCore::ElementRareData::cachedHTMLCollection): (WebCore::ElementRareData::ensureCachedHTMLCollection): * dom/Element.h: * dom/Element.cpp: (WebCore::Element::ensureCachedHTMLCollection): Plumbing to cache HTMLCollections on ElementRareData. (WebCore::Element::~Element): Detach any cached collections from an element when it's destroyed. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::detachFromNode): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * dom/Document.cpp: (WebCore::Document::cachedCollection): Consolidate the HTMLCollection constructors and get rid of the hacks to optionally retain the base node. * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::options): * html/HTMLElement.cpp: (WebCore::HTMLElement::children): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::areas): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::tBodies): * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::cells): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::rows): Cached collections! 2012-01-01 Raymond Liu Use overload methods to implement [Optional] parameters in AudioNode.idl https://bugs.webkit.org/show_bug.cgi?id=75402 Reviewed by Adam Barth. No new tests required. * GNUmakefile.list.am: * UseV8.cmake: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSAudioNodeCustom.cpp: Removed. * bindings/v8/custom/V8AudioNodeCustom.cpp: Removed. * webaudio/AudioNode.cpp: (WebCore::AudioNode::connect): (WebCore::AudioNode::disconnect): * webaudio/AudioNode.h: * webaudio/AudioNode.idl: 2011-12-20 Robert Hogan CSS 2.1 failure: border-collapse-offset-002.htm fails https://bugs.webkit.org/show_bug.cgi?id=71705 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/border-collapse-offset-002-expected.html fast/css/caption-width-absolute-position-offset-top.htm fast/css/caption-width-absolute-position.htm fast/css/caption-width-fixed-position-offset-top.htm fast/css/caption-width-fixed-position.htm fast/css/caption-width-relative-position-offset-top.htm fast/css/caption-width-relative-position.htm Table captions are implemented as children of the table but have a special requirement to expand to the full width of the table rather than just the 'available' width, i.e. the full width minus padding and borders. To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent() to return the full width of the containing block (i.e. the table) rather than the available width. * CMakeLists.txt: Add RenderTableCaption.[cpp|h] * GNUmakefile.list.am: Add RenderTableCaption.[cpp|h] * Target.pri: Add RenderTableCaption.[cpp|h] * WebCore.gypi: Add RenderTableCaption.[cpp|h] * WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h] * WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h] * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h] (WebCore::RenderObject::addChild): ditto * rendering/RenderObject.h: (WebCore::RenderObject::isTableCaption): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): * rendering/RenderTable.h: * rendering/RenderTableCaption.cpp: Added. (WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption (WebCore::RenderTableCaption::~RenderTableCaption): (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width. * rendering/RenderTableCaption.h: Added. (WebCore::RenderTableCaption::isTableCaption): (WebCore::toRenderTableCaption): * rendering/RenderingAllInOne.cpp: 2012-01-01 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Added. * bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.cpp: Added. * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.h: Added. * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Added. * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Added. 2012-01-01 Andreas Kling Make HTMLCollections play nice after their base node is gone. Reviewed by Anders Carlsson. Added HTMLCollection::detachFromNode() and call that from destructors of nodes with cached collections. Sprinkled checks/assertions where applicable to make sure HTMLCollections are empty after their associated node has been destroyed. This is a slight change in behavior, as collections would previously keep their nodes alive indefinitely. Added a test to document this. Test: fast/dom/htmlcollection-zombies.html * dom/Document.cpp: (WebCore::Document::~Document): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::detachFromNode): (WebCore::HTMLCollection::resetCollectionInfo): (WebCore::HTMLCollection::itemAfter): (WebCore::HTMLCollection::calcLength): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::nextItem): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollection::tags): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::calcLength): (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedItem): (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::~HTMLFormElement): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::add): (WebCore::HTMLOptionsCollection::remove): (WebCore::HTMLOptionsCollection::selectedIndex): (WebCore::HTMLOptionsCollection::setSelectedIndex): (WebCore::HTMLOptionsCollection::setLength): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::length): (WebCore::HTMLPropertiesCollection::item): (WebCore::HTMLPropertiesCollection::names): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::~HTMLSelectElement): * html/HTMLSelectElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::~HTMLTableElement): * html/HTMLTableElement.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::itemAfter): 2012-01-01 Andreas Kling HTMLCollection: Remove the constructor's custom CollectionCache* argument. Reviewed by Anders Carlsson. We no longer need to initialize HTMLCollections with a custom CollectionCache, so remove the argument from the constructor. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): 2011-12-31 Dan Bernstein WebCore changes for: REGRESSION (WebKit2): Cursor, hover states not updated when page scrolls under stationary mouse pointer https://bugs.webkit.org/show_bug.cgi?id=75405 Reviewed by Anders Carlsson. Test: fast/events/frame-scroll-fake-mouse-move.html * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChanged): Added a call to EventHandler::dispatchFakeMouseMoveEventSoon(). 2012-01-01 Andreas Kling Cache named item collections on Document, not just their caches. Reviewed by Anders Carlsson. Keep two maps of name -> RefPtr on Document. We already had maps for the CollectionCaches and were creating the HTMLNameCollections every time they were accessed. We now let the collections create and manage the CollectionCaches instead of Document. No new tests since these collections are not exposed to the web. * dom/Document.h: * dom/Document.cpp: (WebCore::Document::windowNamedItems): (WebCore::Document::documentNamedItems): Replace the name/CollectionCache maps by name/HTMLNameCollection maps. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): Pass names as AtomicStrings to Document's collection getters. * html/HTMLNameCollection.h: (WebCore::HTMLNameCollection::create): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): Store the name in an AtomicString instead of a String, incidentally making traversal of HTMLNameCollections more efficient. * html/CollectionType.h: Remove two now-unneeded constants. 2012-01-01 Andreas Kling Remove Document::collectionInfo() and let collections manage their caches. Reviewed by Anders Carlsson. Remove the CollectionCaches from Document and have the document's collections create and manage the caches on-demand instead. This is a step towards merging CollectionCache into HTMLCollection. * dom/Document.h: * dom/Document.cpp: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/HTMLOptionsCollection.cpp: 2012-01-01 Andreas Kling RenderThemeMac: Avoid double hash lookup in systemColor(). Reviewed by Anders Carlsson. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::systemColor): 2012-01-01 Andreas Kling CSSStyleSelector: Avoid double hash lookup in keyframeStylesForAnimation(). Reviewed by Anders Carlsson. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::keyframeStylesForAnimation): 2012-01-01 Andreas Kling KeyframeAnimation: Use hash lookups to determine if property is animated. Reviewed by Anders Carlsson. Clean out an old FIXME about using hash lookups instead of iterating over the properties. * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::hasAnimationForProperty): (WebCore::KeyframeAnimation::affectsProperty): 2011-12-31 Dan Bernstein WebCore change for Cannot print USPS shipping labels http://webkit.org/b/72801 Reviewed by Anders Carlsson and Alexey Proskuryakov. * WebCore.exp.in: Exported Chrome::print(). 2011-12-31 Dan Bernstein WebCore changes for REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document Reviewed by Alexey Proskuryakov. * WebCore.exp.in: Exported PluginDocument::pluginWidget(). * WebCore.xcodeproj/project.pbxproj: Promoted PluginDocument.h to private. * html/PluginDocument.h: Fixed a typo in a comment. 2011-12-30 Andreas Kling Cache and reuse the HTMLTableElement.rows collection. Reviewed by Anders Carlsson. Let HTMLTableElement::rows() cache the returned collection and tie it to the lifetime of the form. Test: fast/dom/table-rows-collection-idempotence.html fast/dom/gc-9.html * html/HTMLTableElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): Cache the HTMLTableRowsCollection returned by rows() on the HTMLTableElement. Remove the per-table CollectionCache and let the collection manage that. * html/HTMLTableRowsCollection.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::create): Tell the base class constructor to not retain the back-pointer to the table. 2011-12-30 Andreas Kling Cache and reuse the HTMLSelectElement.options collection. Reviewed by Anders Carlsson. Let HTMLSelectElement::options() cache the returned collection and tie it to the lifetime of the form. This shrinks HTMLSelectElement by sizeof(CollectionCache) minus one pointer. Test: fast/dom/select-options-collection-idempotence.html fast/gc-9.html * html/HTMLSelectElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::options): Cache the HTMLOptionsCollection returned by options() on the HTMLSelectElement. Remove the per-select CollectionCache and let the collection manage that. * html/HTMLOptionsCollection.h: * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::create): (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Tell the base class constructor to not retain the back-pointer to the element. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::invalidateCache): Added so HTMLSelectElement can invalidate the collection without triggering unnecessary instantiation of a CollectionCache. 2011-12-30 Kentaro Hara Enable the [Supplemental] IDL on CMake https://bugs.webkit.org/show_bug.cgi?id=75345 Reviewed by Daniel Bates. This patch enables the [Supplemental] IDL on CMake by changing the build flow of CMake as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * CMakeLists.txt: * UseJSC.cmake: Modified to reflect the new build flow as described above. * UseV8.cmake: Ditto. 2011-12-30 Robert Hogan REGRESSION (r94492): Text is shifted to the right in some buttons in the Mac App Store https://bugs.webkit.org/show_bug.cgi?id=74723 Reviewed by Dan Bernstein. Tests: fast/css/absolute-inline-alignment-2.html fast/css/absolute-inline-alignment.html Inline positioned elements in the leading spaces of an inline run need to align to adjacent text, so add them to the run as they're encountered. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineInfo::LineInfo): Keep a count of positioned objects encountered when skipping leading whitespace. (WebCore::LineInfo::runsFromLeadingWhitespace): (WebCore::LineInfo::resetRunsFromLeadingWhitespace): (WebCore::LineInfo::incrementRunsFromLeadingWhitespace): (WebCore::RenderBlock::constructLine): Leading positioned objects should not be considered when deciding the number of runs in a line. Otherwise they would contribute towards line height themselves and prevent a free-standing BR following the positioned object from providing a full 20px of height. (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Since a run containing line-breaks will enter skipLeadingWhitespace for each new line we reset the count every time so that the count of positioned objects we encounter only affects the line they appear on. This case is covered by fast/inline/styledEmptyInlinesWithBRs.html (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): Add a run for each inline positioned object encountered in leading white space. Keep a count of them so that they can be excluded from the total number of runs in constructLine. 2011-12-30 Raymond Liu Remove unnecessary [Custom] attribute in CanvasRenderingContext2D.idl https://bugs.webkit.org/show_bug.cgi?id=75376 Reviewed by Adam Barth. No new tests required. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-12-30 Andreas Kling Cache and reuse the HTMLFormElement.elements collection. Reviewed by Anders Carlsson. Let HTMLFormElement::elements() cache the returned collection and tie it to the lifetime of the form. This reduces memory consumption by ~70 kB (on 64-bit) when viewing your average popular post on reddit.com. Test: fast/dom/form-elements-collection-idempotence.html fast/dom/gc-9.html * html/HTMLFormElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): Cache the HTMLFormCollection returned by elements() on the HTMLFormElement. Remove the per-form CollectionCache and let the collection manage that. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): Have the HTMLCollection constructor take a bool argument that decides whether we retain the base node pointer or not. This mechanism is a temporary measure until all collection types are owned by their respective base nodes. * html/HTMLFormCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::create): Tell the base class constructor to not retain the back-pointer to the form. 2011-12-30 Andreas Kling Unreviewed buildfix after r103841. * inspector/InspectorMemoryAgent.cpp: 2011-12-30 Andreas Kling CSSStyleDeclaration: Only allow setting parent rule at construction. Reviewed by Dan Bernstein. A CSSStyleDeclaration should only ever belong to one CSSRule. Enforce this at compile-time by replacing setParentRule(CSSRule*) with clearParentRule(). * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::~CSSFontFaceRule): * css/CSSStyleDeclaration.h: (WebCore::CSSStyleDeclaration::clearParentRule): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::~CSSStyleRule): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule): 2011-12-30 Andreas Kling WebKitCSSKeyframeRule.style.parentRule should point to the keyframe rule. Reviewed by Antti Koivisto. Let CSS animation keyframe rules .style.parentRule point back to the keyframe board, rather than the keyframes rule containing it. Test: fast/css/css-keyframe-style-parentRule.html * css/CSSParser.cpp: (WebCore::CSSParser::createKeyframeRule): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::setDeclaration): Set the CSSMutableStyleDeclaration's parent rule when creating it instead of in WebKitCSSKeyframeRule::setDeclaration(). Add assertion to make sure it's only called with declarations already parented to the keyframe rule. * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule): (WebCore::WebKitCSSKeyframesRule::append): (WebCore::WebKitCSSKeyframesRule::deleteRule): Stop reparenting keyframe rules' style declarations to the keyframes rule. 2011-12-30 Yury Semikhatsky Web Inspector: use typed front-end API in the memory agent https://bugs.webkit.org/show_bug.cgi?id=75382 Memory agent now uses generate C++ API for communicating to the front-end. Reviewed by Pavel Feldman. * inspector/InspectorMemoryAgent.cpp: (WebCore::DOMTreeStatistics::CounterVisitor::CounterVisitor): (WebCore::DOMTreeStatistics::CounterVisitor::counters): (WebCore::DOMTreeStatistics::CounterVisitor::visitNode): 2011-12-30 Pavel Feldman Web Inspector: migrate from "attached" to "compact" styles. https://bugs.webkit.org/show_bug.cgi?id=75381 When front-end is docked to right, it should look like "detached", but is still "attached". Use "compact" mode instead of "attached" mode in the styles to mitigate it. Reviewed by Yury Semikhatsky. * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchLabel): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.prototype.set compact): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDrag): * inspector/front-end/helpScreen.css: (body.compact .help-window-outer): (body.compact .help-window-main): (body.compact .help-window-caption): (body.compact .help-close-button): (body.compact .help-content): * inspector/front-end/inspector.css: (body.compact #toolbar): (body.compact.port-qt #toolbar): (body.compact.inactive #toolbar): (body.compact #search-toolbar-label): (body.compact #toolbar-dropdown-arrow): (body.compact #search): (body.compact.port-qt .toolbar-item.close-left, body.compact.port-qt .toolbar-item.close-right): (body.compact #main): * inspector/front-end/inspector.js: (WebInspector.set attached): (WebInspector.get isCompactMode): (WebInspector.get _setCompactMode): (WebInspector._installDockToRight.listener.get if): (WebInspector._installDockToRight.listener): * inspector/front-end/inspectorCommon.css: (body.dock-to-right): (body.dock-to-right.inactive): 2011-12-30 Sheriff Bot Unreviewed, rolling out r103794. http://trac.webkit.org/changeset/103794 https://bugs.webkit.org/show_bug.cgi?id=75379 the ASSERT is triggered by several tests (Requested by jchaffraix on #webkit). * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::addChild): (WebCore::RenderTable::layout): (WebCore::RenderTable::recalcSections): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): * rendering/RenderTable.h: (WebCore::RenderTable::header): (WebCore::RenderTable::footer): (WebCore::RenderTable::firstBody): (WebCore::RenderTable::hasSections): (WebCore::RenderTable::topSection): 2011-12-29 Pavel Feldman Web Inspector: enable dock-to-right view (still need embedders to support it). https://bugs.webkit.org/show_bug.cgi?id=75360 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/inspector.js: (WebInspector.set attached): (WebInspector._renderAsAttached.get return): (WebInspector._renderAsAttached): (WebInspector._installDockToRight.updateToolbar): 2011-12-29 Raymond Liu Use IDL overloads in AudioContext.idl for createBuffer https://bugs.webkit.org/show_bug.cgi?id=75293 Reviewed by Adam Barth. No new tests required. * bindings/js/JSAudioContextCustom.cpp: * bindings/v8/custom/V8AudioContextCustom.cpp: * webaudio/AudioContext.cpp: (WebCore::AudioContext::createBuffer): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: 2011-12-29 Andreas Kling HTMLDivElement: Remove unnecessary variable in parseMappedAttribute(). Reviewed by Daniel Bates. * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::parseMappedAttribute): 2011-12-29 Andreas Kling HTMLParagraphElement: Remove unnecessary variable in parseMappedAttribute(). Reviewed by Daniel Bates. * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::parseMappedAttribute): 2011-12-29 Andreas Kling Use HashMap for Document's named item collection caches. Reviewed by Daniel Bates. * dom/Document.cpp: (WebCore::Document::~Document): Remove now-unneeded deleteAllValues() loop. (WebCore::Document::nameCollectionInfo): Use add() instead of find()/add() to avoid one extra hash lookup. * dom/Document.h: Switch the value type of m_nameCollectionInfo to use OwnPtr. 2011-12-29 David Barton mfenced skips the first separator if the separators attribute contains multiple separators https://bugs.webkit.org/show_bug.cgi?id=57697 Reviewed by Dan Bernstein. Added 2 test cases. * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::addChild): - Thanks to Xun Sun for the off-by-one error fix. 2011-12-29 Alexis Menard Enable the [Supplemental] IDL on Qt. https://bugs.webkit.org/show_bug.cgi?id=75274 Reviewed by Andreas Kling. http://trac.webkit.org/changeset/103783 broke the Qt SL bot. This patch fixes the problem by using 'tr' rather than 'sed' which seems to be more consistent between Mac and Linux. * DerivedSources.pri: 2011-12-29 Vsevolod Vlasov Web Inspector: Scripts navigator should support incremental search by typing. https://bugs.webkit.org/show_bug.cgi?id=75349 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype._reset): (WebInspector.NavigatorTreeOutline): (WebInspector.NavigatorTreeOutline.prototype.scriptTreeElements): (WebInspector.NavigatorTreeOutline.prototype.searchStarted): (WebInspector.NavigatorTreeOutline.prototype.searchFinished): (WebInspector.BaseNavigatorTreeElement.prototype.onreveal): (WebInspector.BaseNavigatorTreeElement.prototype.set titleText): (WebInspector.BaseNavigatorTreeElement.prototype.matchesSearchText): * inspector/front-end/inspector.css: (.outline-disclosure ol.search-match-not-found li.selected .selection): (.outline-disclosure ol.search-match-found li.selected): (.outline-disclosure ol.search-match-found li.selected *): (.outline-disclosure ol.search-match-found li.parent.selected::before): (.outline-disclosure ol.search-match-found li.parent.expanded.selected::before): * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tree-search-box): (#scripts-navigator-tree-search-box.visible): (#scripts-navigator-tree-search-box > input): (.scripts.panel .navigator .search-match-found li.selected .selection): (.scripts.panel .navigator .search-match-not-found li.selected .selection): (.scripts.panel .navigator .searching li.selected .selection): * inspector/front-end/treeoutline.js: (TreeOutline): (TreeOutline.prototype._treeKeyPress): (TreeOutline.prototype._startSearch.focusSearchInput): (TreeOutline.prototype._startSearch): (TreeOutline.prototype._searchTextChanged): (TreeOutline.prototype._showSearchMatchElement): (TreeOutline.prototype._searchInputKeyDown): (TreeOutline.prototype._nextSearchMatch): (TreeOutline.prototype._previousSearchMatch): (TreeOutline.prototype._searchInputBlur): (TreeOutline.prototype._searchFinished): (TreeOutline.prototype.stopSearch): 2011-12-29 Vsevolod Vlasov Web Inspector: Scripts navigator should trim long file names and show full url in tooltip. https://bugs.webkit.org/show_bug.cgi?id=75343 Reviewed by Pavel Feldman. Test: inspector/debugger/ui-source-code-display-name.html * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._appendSourceFrameTab): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab.get if): (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab): (WebInspector.TabbedEditorContainer.prototype.get replaceSourceFrames): (WebInspector.TabbedEditorContainer.prototype.reset): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.changeTabTooltip): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get tooltip): (WebInspector.TabbedPaneTab.prototype.set tooltip): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._parseURL): * inspector/front-end/utilities.js: (): 2011-12-29 Alexis Menard getComputedStyle for margin is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75358 Reviewed by Andreas Kling. Implement getComputedStyle for margin. Test: fast/css/getComputedStyle/getComputedStyle-margin-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in RenderSVGResourcePattern https://bugs.webkit.org/show_bug.cgi?id=75361 Reviewed by Andreas Kling. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::removeAllClientsFromCache): (WebCore::RenderSVGResourcePattern::removeClientFromCache): (WebCore::RenderSVGResourcePattern::applyResource): use HashMap::add() to avoid looking up the hash twice. * rendering/svg/RenderSVGResourcePattern.h: rename m_pattern to m_patternMap to improve readability a little bit. 2011-12-29 Alexis Menard getComputedStyle for padding is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75352 Reviewed by Andreas Kling. Implement getComputedStyle for padding shorthand property. Test: fast/css/getComputedStyle/getComputedStyle-padding-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in OriginAccessMap https://bugs.webkit.org/show_bug.cgi?id=75327 Reviewed by Andreas Kling. * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-29 Pavel Podivilov Web Inspector: support sourceMappingURL magic comment. https://bugs.webkit.org/show_bug.cgi?id=75356 Reviewed by Pavel Feldman. * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::findSourceMapURL): * inspector/ContentSearchUtils.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): 2011-12-29 Alexander Pavlov Web Inspector: Suggest pop-over doesn't hide on tab switch https://bugs.webkit.org/show_bug.cgi?id=73611 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.willHide): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.complete): (WebInspector.TextPrompt.prototype._completionsReady): (WebInspector.TextPrompt.prototype.acceptSuggestion): (WebInspector.TextPrompt.prototype.hideSuggestBox): (WebInspector.TextPrompt.SuggestBox.prototype._completionsReady): 2011-12-28 Alexander Pavlov Web Inspector: Implement CSS selector profiler https://bugs.webkit.org/show_bug.cgi?id=74004 Reviewed by Pavel Feldman. This implementation of CSS selector profiler measures the total time required to match a certain selector against DOM nodes and apply the style declaration properties to the particular element, as well as the number of selector matches (i.e. the number of nodes that matched the selector.) The results are approximate due to internal matching algorithm optimizations (shared styles et al.) Multiple selectors with the same selectorText are coalesced into a single record. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/CSSSelectorProfileView.js: Added. (WebInspector.CSSSelectorDataGridNode): (WebInspector.CSSSelectorDataGridNode.prototype.get rawData): (WebInspector.CSSSelectorProfileView): (WebInspector.CSSSelectorProfileView.prototype.get statusBarItems): (WebInspector.CSSSelectorProfileView.prototype.get profile): (WebInspector.CSSSelectorProfileView.prototype.set profile): (WebInspector.CSSSelectorProfileView.prototype._createProfileNodes): (WebInspector.CSSSelectorProfileView.prototype.rebuildGridItems): (WebInspector.CSSSelectorProfileView.prototype.refreshData): (WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.get selectorComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.timeComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.matchesComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile): (WebInspector.CSSSelectorProfileType): (WebInspector.CSSSelectorProfileType.prototype.get buttonTooltip): (WebInspector.CSSSelectorProfileType.prototype.buttonClicked): (WebInspector.CSSSelectorProfileType.prototype.get treeItemTitle): (WebInspector.CSSSelectorProfileType.prototype.get description): (WebInspector.CSSSelectorProfileType.prototype.reset): (WebInspector.CSSSelectorProfileType.prototype.isRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.setRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.createSidebarTreeElementForProfile): (WebInspector.CSSSelectorProfileType.prototype.createView): * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.reset): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype._removeTemporaryProfile): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilerDispatcher.prototype.addProfileHeader): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/profilesPanel.css: 2011-12-29 Sheriff Bot Unreviewed, rolling out r103798. http://trac.webkit.org/changeset/103798 https://bugs.webkit.org/show_bug.cgi?id=75353 some small scrollbar differences are making the tests fail on several platforms (Requested by jchaffraix on #webkit). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): 2011-12-29 Alexander Pavlov Web Inspector: Focus of the DOM tree is not restored when switching to the Elements panel https://bugs.webkit.org/show_bug.cgi?id=75351 Reviewed by Yury Semikhatsky. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.wasShown): 2011-12-29 Julien Chaffraix REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling https://bugs.webkit.org/show_bug.cgi?id=67100 Reviewed by Dan Bernstein. Tests: fast/layers/scroll-with-transform-composited-layer-expected.html fast/layers/scroll-with-transform-composited-layer.html fast/layers/scroll-with-transform-layer-expected.html fast/layers/scroll-with-transform-layer.html The regression came from a previous optimization that was wrongly kept after r93614. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Remove the early return for transformed layer. This change worked as we used to call updateLayerPositions from scrollTo which would call updateLayerPosition on all our descendants. After r93614, this is no longer the case and we explicitely need to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll. 2011-12-29 Alexander Pavlov Web Inspector: Tree views can be collapsed/hidden using the keyboard arrows https://bugs.webkit.org/show_bug.cgi?id=46272 Reviewed by Yury Semikhatsky. WebInspector.SidebarSectionTreeElement which is not selectable has also been made non-collapsible and expanded by default. * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._registerProfileType): * inspector/front-end/SidebarTreeElement.js: (WebInspector.SidebarSectionTreeElement): (WebInspector.SidebarSectionTreeElement.prototype.selectable.false.collapse): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2011-12-29 Pavel Feldman Web Inspector: [chromium] pass dock to side request to the embedder. https://bugs.webkit.org/show_bug.cgi?id=75344 Reviewed by Yury Semikhatsky. I'd like to enable dock-to-right for the front-end window. This is a background work to pass control flow from the front-end to the front-end host. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: (WebCore::InspectorFrontendClientLocal::requestSetDockSide): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::requestSetDockSide): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide): 2011-12-28 Pavel Podivilov Web Inspector: add "enable source maps" checkbox setting. https://bugs.webkit.org/show_bug.cgi?id=75311 Reviewed by Pavel Feldman. When "enable source maps" is on, all auto detected source maps are silently applied. * English.lproj/localizedStrings.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): * inspector/front-end/inspector.js: (WebInspector._toolbarItemClicked): 2011-12-29 Julien Chaffraix Tighten our checks for needsSectionRecalc in RenderTable https://bugs.webkit.org/show_bug.cgi?id=73972 Reviewed by Adam Barth. Refactoring covered under the new tests. Now most of the functions use the header, first body and footer's getters that checks if we need a section recalculation. The only exceptions are addChild and recalcSections as they can be called with the bit set. * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): Updated the previous functions to use the sections' getters. (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::addChild): (WebCore::RenderTable::recalcSections): Update the previous functions after the 2 renames (see below). * rendering/RenderTable.h: (WebCore::RenderTable::header): (WebCore::RenderTable::footer): (WebCore::RenderTable::firstBody): Added some ASSERT here. Also renamed m_head to m_header and m_foot to m_footer to match the getter and to avoid unneeded abbreviation. (WebCore::RenderTable::hasSections): (WebCore::RenderTable::topSection): Updated the previous functions to use the section getters. 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap for UserScriptMap and UserStyleSheetMap https://bugs.webkit.org/show_bug.cgi?id=75323 Reviewed by Darin Adler. * dom/Document.cpp: (WebCore::Document::pageGroupUserSheets): * page/PageGroup.cpp: (WebCore::PageGroup::addUserScriptToWorld): (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserScriptFromWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): fix a small mistake in previous code. Now the entry for world is removed (and deleted) only if its stylesheet vector is empty. (WebCore::PageGroup::removeUserScriptsFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): * page/UserScriptTypes.h: * page/UserStyleSheetTypes.h: 2011-12-28 Andreas Kling Reduce memory used by NamedNodeMap. Reviewed by Sam Weinig. Give NamedNodeMap's attribute vector an inline capacity of 4. The vast majority of elements have <= 4 attributes, and if they don't have any we normally don't allocate an attribute map at all. This reduces memory consumption by 1.2MB (on 64-bit) when loading the full HTML5 spec at . * dom/NamedNodeMap.h: 2011-12-28 Andreas Kling Reduce memory used by SpaceSplitString. Reviewed by Sam Weinig. Split the string upon creation instead of waiting until it's accessed. This allows us to get rid of all data members except the substring vector. Since we're storing AtomicStrings, this is way more memory-efficient than the previous implementation in the majority of cases. Also reduced the inline capcity of the vector to 2 (from 8), after testing showed this to cover 90% of the cases on the Alexa top sites. All in all this reduces memory consumption by 1.1MB (on 64-bit) when loading the full HTML5 spec at . On that same page, less than 2ms is spent (on my MBP) splitting the ~20000 strings. * dom/SpaceSplitString.cpp: (WebCore::SpaceSplitStringData::createVector): (WebCore::SpaceSplitStringData::containsAll): (WebCore::SpaceSplitStringData::remove): * dom/SpaceSplitString.h: (WebCore::SpaceSplitStringData::SpaceSplitStringData): (WebCore::SpaceSplitStringData::contains): (WebCore::SpaceSplitStringData::size): (WebCore::SpaceSplitStringData::operator[]): 2011-12-28 ChangSeok Oh [GTK] Fix compilation issue when selecting opengl for Accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=75309 Reviewed by Martin Robinson. Add TextureMapperGL and TextureMapperGLCairo files. They define new classes required to implement TextureMapperGL for GTK port. No new tests required. * GNUmakefile.list.am: * platform/graphics/cairo/TextureMapperGLCairo.cpp: Added. (WebCore::BGRA32PremultimpliedBufferCairo::BGRA32PremultimpliedBufferCairo): (WebCore::BGRA32PremultimpliedBufferCairo::~BGRA32PremultimpliedBufferCairo): (WebCore::BGRA32PremultimpliedBufferCairo::beginPaint): (WebCore::BGRA32PremultimpliedBufferCairo::data): (WebCore::BGRA32PremultimpliedBufferCairo::endPaint): (WebCore::uidForImage): (WebCore::BGRA32PremultimpliedBuffer::create): * platform/graphics/cairo/TextureMapperGLCairo.h: Added. 2011-12-28 Sheriff Bot Unreviewed, rolling out r103782. http://trac.webkit.org/changeset/103782 https://bugs.webkit.org/show_bug.cgi?id=75328 broke origin-whitelisting-removal.html (Requested by kling on #webkit). * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-28 Kentaro Hara Enable the [Supplemental] IDL on Qt https://bugs.webkit.org/show_bug.cgi?id=75274 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on Qt by changing the build flow of Qt as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * DerivedSources.pri: Described the above build flow. 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap in OriginAccessMap https://bugs.webkit.org/show_bug.cgi?id=75327 Reviewed by Andreas Kling. * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap for ProgressTracker's items https://bugs.webkit.org/show_bug.cgi?id=75326 Reviewed by Andreas Kling. * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::~ProgressTracker): although is empty, the destructor was kept so in the header file we can forward declare ProgressItem and use in an OwnPtr. (WebCore::ProgressTracker::reset): (WebCore::ProgressTracker::incrementProgress): (WebCore::ProgressTracker::completeProgress): removed a useless assignment to item member just before it is deleted. * loader/ProgressTracker.h: 2011-12-28 Alexis Menard getComputedStyle for border-color is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75324 Reviewed by Andreas Kling. Implement getComputedStyle for border-color. Test: fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-28 Darin Adler Use OwnPtr to handle lifetime and deletion of FontFace objects https://bugs.webkit.org/show_bug.cgi?id=75221 Reviewed by Daniel Bates. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Use add instead of get/set to read and then later fill a cache. Use new version of registerCustomFont that takes PassOwnPtr. * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): Ditto. * dom/Document.cpp: (WebCore::Document::registerCustomFont): Take a PassOwnPtr instead of raw pointer. * dom/Document.h: Ditto. 2011-12-28 Adam Barth "Fake" insertion mode in HTMLTreeBuilder doesn't do anything https://bugs.webkit.org/show_bug.cgi?id=75322 Reviewed by Darin Adler. This machinery isn't needed anymore now that we're using the new foreign content hotness. * html/parser/HTMLTreeBuilder.cpp: * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::setInsertionMode): 2011-12-28 Alexis Menard getComputedStyle for border-style is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75312 Reviewed by Andreas Kling. Implement getComputedStyle for border-style. Test: fast/css/getComputedStyle/getComputedStyle-border-style-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-28 Alexis Menard getComputedStyle for border-bottom, border-top, border-left, border-right is not implemented. https://bugs.webkit.org/show_bug.cgi?id=74743 Reviewed by Tony Chang. Implement getComputedStyle for border-top, border-bottom, border-right, border-left. Test: fast/css/getComputedStyle/getComputedStyle-border-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties): * css/CSSComputedStyleDeclaration.h: 2011-12-28 Robert Hogan Inline flow not learning height of all text descendants https://bugs.webkit.org/show_bug.cgi?id=75305 Reviewed by Dan Bernstein. Tests: fast/inline/nested-text-descendants-expected.html fast/inline/nested-text-descendants.html The root inline box would only learn it had text descendants if its first grandchild was text. It wasn't informed of subsequent text grandchildren so could not factor them into its calculation of the line height. To fix this, propagate the existence of a text descendant to the root inline box by walking up through the text child's ancestors. * rendering/InlineFlowBox.cpp: (WebCore::setHasTextDescendantsOnAncestors): (WebCore::InlineFlowBox::addToLine): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::setHasTextDescendants): 2011-12-28 Sheriff Bot Unreviewed, rolling out r103620. http://trac.webkit.org/changeset/103620 https://bugs.webkit.org/show_bug.cgi?id=75316 Causes many crashes (Requested by abarth on #webkit). * loader/FrameLoaderClient.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): 2011-12-28 Alexander Pavlov [V8][Chromium] 'randomString' in document.body.style always returns true https://bugs.webkit.org/show_bug.cgi?id=75313 Reviewed by Adam Barth. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): 2011-12-28 Vsevolod Vlasov Web Inspector: Add domain.png to WebCore.gypi / WebKit.qrc. https://bugs.webkit.org/show_bug.cgi?id=75310 Reviewed by Pavel Feldman. * WebCore.gypi: * inspector/front-end/WebKit.qrc: 2011-12-28 Vsevolod Vlasov Web Inspector: ExperimentsSettings causes warning on chromium when reading localizedStrings. https://bugs.webkit.org/show_bug.cgi?id=75299 Reviewed by Pavel Feldman. * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createExperimentCheckbox): 2011-12-28 Vsevolod Vlasov Web Inspector: Scripts panel: add debug sidebar resizer to TabbedEditorContainer. https://bugs.webkit.org/show_bug.cgi?id=75300 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: * inspector/front-end/scriptsPanel.css: (#scripts-debug-sidebar-resizer-widget): 2011-12-28 Alexander Pavlov Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel https://bugs.webkit.org/show_bug.cgi?id=75228 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotProfileType): (WebInspector.DetailedHeapshotProfileType.prototype.get treeItemTitle): (WebInspector.DetailedHeapshotProfileType.prototype.get description): * inspector/front-end/ProfileLauncherView.js: Added. (WebInspector.ProfileLauncherView): (WebInspector.ProfileLauncherView.prototype.setUpEventListeners): (WebInspector.ProfileLauncherView.prototype.addProfileType): (WebInspector.ProfileLauncherView.prototype._controlButtonClicked): (WebInspector.ProfileLauncherView.prototype._updateControls): (WebInspector.ProfileLauncherView.prototype._profileTypeChanged): (WebInspector.ProfileLauncherView.prototype._onProfileStarted): (WebInspector.ProfileLauncherView.prototype._onProfileFinished): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType): (WebInspector.CPUProfileType.prototype.get treeItemTitle): (WebInspector.CPUProfileType.prototype.get description): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.get treeItemTitle): (WebInspector.ProfileType.prototype.get description): (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype.toggleRecordButton): (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype._showLauncherView): (WebInspector.ProfilesPanel.prototype._registerProfileType): (WebInspector.ProfilesPanel.prototype._addProfileHeader): (WebInspector.ProfilesPanel.prototype._updateInterface): (WebInspector.ProfileTypeTreeElement): (WebInspector.ProfileTypeTreeElement.prototype.collapse): (WebInspector.ProfilesSidebarTreeElement): (WebInspector.ProfilesSidebarTreeElement.prototype.onattach): (WebInspector.ProfilesSidebarTreeElement.prototype.onselect): (WebInspector.ProfilesSidebarTreeElement.prototype.get selectable): (WebInspector.ProfilesSidebarTreeElement.prototype.refresh): * inspector/front-end/WebKit.qrc: * inspector/front-end/WelcomeView.js: Removed. * inspector/front-end/auditsPanel.css: (.audit-launcher-view .audit-launcher-view-content): (.audit-launcher-view div.button-container): (.panel-enabler-view.audit-launcher-view label): (.panel-enabler-view.audit-launcher-view label.disabled): * inspector/front-end/inspector.html: * inspector/front-end/panelEnablerView.css: (.panel-enabler-view img): (.panel-enabler-view .flexible-space): (.panel-enabler-view button:not(.status-bar-item)): (body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled): (.panel-enabler-view input[type="radio"]): (.panel-enabler-view input[type="radio"]:active:not(:disabled)): (.panel-enabler-view input[type="radio"]:checked): (.panel-enabler-view input[type="radio"]:checked:active): * inspector/front-end/profilesPanel.css: (.profile-launcher-view-tree-item > .icon): (.profile-launcher-view-content): (.profile-launcher-view-content h1): (.panel-enabler-view.profile-launcher-view form): (.panel-enabler-view.profile-launcher-view label): (.profile-launcher-view-content p): (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)): (.profile-launcher-view-content button.running:not(.status-bar-item)): (body.inactive .profile-launcher-view-content button.running:not(.status-bar-item)): 2011-12-28 Sheriff Bot Unreviewed, rolling out r103763. http://trac.webkit.org/changeset/103763 https://bugs.webkit.org/show_bug.cgi?id=75307 "Compilation fails on Snow Leopard" (Requested by yurys on #webkit). * inspector/CodeGeneratorInspector.py: (Helper): (create_ad_hoc_type_declaration.Helper): (CodeGenerator.generate_type_builder): (get_in_c_type_text): 2011-12-28 Peter Rybin Web Inspector: CodeGeneratorInspector.py: generate enum types. https://bugs.webkit.org/show_bug.cgi?id=74954 Reviewed by Yury Semikhatsky. Internal map of string contants is created. C enums are created for each JSON enum. * inspector/CodeGeneratorInspector.py: (EnumConstants.add_constant): (EnumConstants): (EnumConstants.get_enum_constant_code): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_in_c_type_text): (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern): (TypeBindings.create_type_declaration_.PlainString.reduce_to_raw_type): (TypeBindings.create_type_declaration_.PlainString.get_setter_value_expression_pattern): (get_in_c_type_text): (get_setter_value_expression_pattern): (PlainObjectBinding.get_in_c_type_text): (PlainObjectBinding.get_setter_value_expression_pattern): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding.get_setter_value_expression_pattern): (get_annotated_type_text): (MethodGenerateModes.get_modes): (MethodGenerateModes.StrictParameterMode.get_c_param_type_text): (MethodGenerateModes.StrictParameterMode): (MethodGenerateModes.StrictParameterMode.get_setter_value_expression): (MethodGenerateModes.RawParameterMode.get_c_param_type_text): (MethodGenerateModes.RawParameterMode): (MethodGenerateModes.RawParameterMode.get_setter_value_expression): (MethodGenerateModes.CombinedMode.get_c_param_type_text): (MethodGenerateModes): (MethodGenerateModes.CombinedMode): (MethodGenerateModes.CombinedMode.get_setter_value_expression): 2011-12-28 Hans Wennborg IndexedDB: IDBKeyRange constructor should throw when lower > upper https://bugs.webkit.org/show_bug.cgi?id=74705 Reviewed by Tony Chang. Make IDBKeyRange throw an exception when lower > upper, or lower == upper and one or both of the bounds is open. Tested in storage/indexeddb/keyrange.html. * storage/IDBKeyRange.cpp: (WebCore::IDBKeyRange::bound): 2011-12-28 Alexander Pavlov Web Inspector: [protocol] empty enum constant should be replaced with identifier https://bugs.webkit.org/show_bug.cgi?id=75273 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForRule): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSRule.prototype.get isRegular): 2011-12-27 Pavel Feldman Web Inspector: complete annotating SDK component. https://bugs.webkit.org/show_bug.cgi?id=75259 Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged): (WebInspector.NetworkDispatcher.prototype._isNull): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): * inspector/front-end/Resource.js: (WebInspector.Resource.displayName): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onResourceUpdated): (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded): (WebInspector.ResourceTreeFrame.prototype.get name): * inspector/front-end/TabbedEditorContainer.js: 2011-12-27 Anantanarayanan G Iyengar Crash in the WebKit accessibility code while attempting to retrieve the title UI element. https://bugs.webkit.org/show_bug.cgi?id=75279 Reviewed by Ryosuke Niwa. Fix a crash in the the WebKit accessibility code which occurs while retrieving the title UI clement. The fix is to NULL check the RenderObject::node return value. No test added as there is no reduction. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::titleUIElement): 2011-12-27 Dominic Cooney Remove initWebKitAnimationEvent method https://bugs.webkit.org/show_bug.cgi?id=71698 Reviewed by Ojan Vafai. Now that WebKitAnimationEvent has a constructor, we don't need this method. is tracking the change to the CSS Animations spec. * dom/WebKitAnimationEvent.cpp: * dom/WebKitAnimationEvent.h: * dom/WebKitAnimationEvent.idl: 2011-12-27 Dominic Cooney Remove initWebKitTransitionEvent method https://bugs.webkit.org/show_bug.cgi?id=71701 Reviewed by Ojan Vafai. Now that WebKitTransitionEvent has a constructor, we don't need this method. is tracking the change to the CSS Transitions spec. * dom/WebKitTransitionEvent.cpp: * dom/WebKitTransitionEvent.h: * dom/WebKitTransitionEvent.idl: 2011-12-27 Tony Chang Move HarfBuzz files into their own directory https://bugs.webkit.org/show_bug.cgi?id=72780 Reviewed by Daniel Bates. FontCacheLinux.cpp got moved to platform/graphics/skia/FontCacheSkia.cpp since it wasn't HarfBuzz specific. I used HarfBuzz in filenames since that seems to be how the name is capitalized on the project home page. Fixed some style errors caught by the style checker. * PlatformBlackBerry.cmake: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/graphics/chromium/FontPlatformData.h: * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h. * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontLinux.cpp. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.h. * platform/graphics/harfbuzz/HarfBuzzSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp. * platform/graphics/harfbuzz/HarfBuzzSkia.h: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.h. * platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/SimpleFontDataLinux.cpp. * platform/graphics/skia/FontCacheSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp. * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: 2011-12-27 Huang Dongsung [TexMap][QT] The fragment shader in OpenGL ES2 requires the default precision qualifier. https://bugs.webkit.org/show_bug.cgi?id=75168 Reviewed by Noam Rosenthal. No new functionality so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::initializeShaders): 2011-12-27 Ryosuke Niwa [Chromium] uninitialized variable in fakeMouseMoveEventTimerFired https://bugs.webkit.org/show_bug.cgi?id=75263 Reviewed by Tony Chang. The failure was caused by PlatformKeyboardEvent::getCurrentModifierState in PlatformKeyboardEventChromium.cpp not initializing arguments on Linux. Fixed the failure by always assigning false to the arguments. But we should really fix this function for Linux. Not recognizing any modifier isn't great. * platform/chromium/PlatformKeyboardEventChromium.cpp: (WebCore::PlatformKeyboardEvent::getCurrentModifierState): 2011-12-27 Kentaro Hara WIP: Enable the [Supplemental] IDL on Gtk https://bugs.webkit.org/show_bug.cgi?id=74972 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on Gtk by changing the build flow of Gtk as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.am: Described the above build flow. * GNUmakefile.list.am: Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp that are generated by the IDL files. 2011-12-27 Tony Chang [chromium] When building with clang, enable -Wglobal-constructors https://bugs.webkit.org/show_bug.cgi?id=74365 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2011-12-27 Tony Chang [chromium] really enable wpo for WebCore libs and for WTF https://bugs.webkit.org/show_bug.cgi?id=75264 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: The variable was getting clobbered by the value set in common.gypi. Use a target_defaults instead to set the variable. I tested manually on my Windows machine and WholeProgramOptimization is getting set when buildtype is Official. 2011-12-27 Tony Chang [chromium] remove references to files no longer in the tree https://bugs.webkit.org/show_bug.cgi?id=75262 Reviewed by Adam Barth. * WebCore.gypi: platform/mac/PlatformMouseEventMac.mm and platform/mac/WheelEventMac.mm were removed in r103652. 2011-12-27 Vsevolod Vlasov Unreviewed web inspector localizedStrings.js fix. * English.lproj/localizedStrings.js: 2011-12-27 Vsevolod Vlasov Web Inspector: Introduce support for experimental settings. https://bugs.webkit.org/show_bug.cgi?id=75250 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/ScriptsPanel.js: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): (WebInspector.ExperimentsSettings.prototype.get experiments): (WebInspector.ExperimentsSettings.prototype.get experimentsEnabled): (WebInspector.ExperimentsSettings.prototype._createExperiment): (WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting.get var): (WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting): (set WebInspector.Experiment): (WebInspector.Experiment.prototype.get name): (WebInspector.Experiment.prototype.get title): (WebInspector.Experiment.prototype.isEnabled): (WebInspector.Experiment.prototype.setEnabled): (set WebInspector): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype._createExperimentsWarningSubsection): (WebInspector.SettingsScreen.prototype._createExperimentCheckbox.listener): (WebInspector.SettingsScreen.prototype._createExperimentCheckbox): * inspector/front-end/helpScreen.css: (.settings-experiments-warning-subsection-warning): (.settings-experiments-warning-subsection-message): 2011-12-27 Alexander Pavlov Web Inspector: exception when scrolling in JavaScriptOutline dialog with empty query https://bugs.webkit.org/show_bug.cgi?id=75255 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptOutlineDialog.js: (WebInspector.JavaScriptOutlineDialog.prototype._onScroll): 2011-12-27 Pavel Feldman Web Inspector: add more annotations on SDK classes. https://bugs.webkit.org/show_bug.cgi?id=75247 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/ApplicationCacheModel.js: (WebInspector.ApplicationCacheDispatcher.prototype.networkStateUpdated): * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._breakpoint): * inspector/front-end/Color.js: (WebInspector.Color.prototype.get shorthex): (WebInspector.Color.prototype.get hex): (WebInspector.Color.prototype.get rgb): (WebInspector.Color.prototype.get hsl): (WebInspector.Color.prototype.get nickname): (WebInspector.Color.prototype.hasShortHex): (WebInspector.Color.prototype._individualRGBValueToFloatValue): (WebInspector.Color.prototype._rgbStringsToHex): (WebInspector.Color.prototype._parse.this.nickname.set 2): (WebInspector.Color.prototype._parse.this.hsla.set 1): (WebInspector.Color.prototype._parse.this.rgba.set 0): (WebInspector.Color.prototype._parse.set WebInspector): (WebInspector.Color.prototype._parse): * inspector/front-end/CompilerSourceMapping.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.CompilerSourceMappingContentProvider): (WebInspector.StaticContentProvider): * inspector/front-end/CookieParser.js: (WebInspector.CookieParser.KeyValue): (WebInspector.CookieParser.prototype.parseCookie): (WebInspector.CookieParser.prototype.parseSetCookie): (WebInspector.CookieParser.prototype._extractKeyValue): * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: (WebInspector.DatabaseDispatcher.prototype.sqlTransactionSucceeded): (WebInspector.DatabaseDispatcher.prototype.sqlTransactionFailed): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.Location): (WebInspector.DebuggerModel.prototype._failedToParseScriptSource): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/HAREntry.js: * inspector/front-end/NetworkLog.js: (WebInspector.NetworkLog.prototype._mainFrameNavigated): * inspector/front-end/Placard.js: * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.prototype.setPropertyValue.propertySetCallback): (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.LocalJSONObject.prototype.get hasChildren): (WebInspector.LocalJSONObject.prototype._children): * inspector/front-end/Resource.js: (WebInspector.Resource.restoreRevisions): (WebInspector.Resource.prototype.get queryParameters): (WebInspector.Resource.prototype.get formParameters): (WebInspector.Resource.prototype.isHttpFamily): * inspector/front-end/ResourceCategory.js: * inspector/front-end/ResourceUtils.js: * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/Script.js: (WebInspector.Script.prototype.isInlineScript): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.positionToLocation): * inspector/front-end/WelcomeView.js: (WebInspector.WelcomeView.prototype.addMessage): * inspector/front-end/externs.js: (Array.prototype.upperBound): 2011-12-27 Vsevolod Vlasov Web Inspector: Scripts panel tabbed editor does not reopen closed tabs. https://bugs.webkit.org/show_bug.cgi?id=75245 Reviewed by Pavel Feldman. * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._tabClosed): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.closeTab): (WebInspector.TabbedPane.prototype.selectTab): 2011-12-27 Yury Semikhatsky Web Inspector: report per document JS event listener count https://bugs.webkit.org/show_bug.cgi?id=74298 This patch adds JS event listener count to the memory agent report. Reviewed by Pavel Feldman. Test: inspector/dom-statistics.html * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: 2011-12-27 Alexander Pavlov Web Inspector: [REGRESSION] Go to Function dialog always has a minimal height https://bugs.webkit.org/show_bug.cgi?id=75254 Reviewed by Yury Semikhatsky. * inspector/front-end/scriptsPanel.css: (.script-view): 2011-12-26 Vsevolod Vlasov Web Inspector: Create tabbed editor for scripts panel. https://bugs.webkit.org/show_bug.cgi?id=75230 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes.get if): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.NavigatorScriptTreeElement.prototype.ondblclick): (WebInspector.NavigatorScriptTreeElement.prototype.onenter): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/TabbedEditorContainer.js: Added. * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.get visibleView): (WebInspector.TabbedPane.prototype.get selectedTabId): (WebInspector.TabbedPane.prototype.closeAllTabs): (WebInspector.TabbedPane.prototype.changeTabTitle): (WebInspector.TabbedPane.prototype.changeTabView): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get title): (WebInspector.TabbedPaneTab.prototype.set title): (WebInspector.TabbedPaneTab.prototype.get view): (WebInspector.TabbedPaneTab.prototype.set view): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: (.scripts-views-container): (.script-view): (#scripts-editor-container-tabbed-pane .tabbed-pane-header): (#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents): (#scripts-editor-container-tabbed-pane .tabbed-pane-content): 2011-12-27 Pavel Feldman Not reviewed: Rolling out r103703 for breaking Canvas2DLayerChromiumTest.testFullLifecycle. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-12-22 Vangelis Kokkevis [chromium] Bypass the shadow texture copy for accelerated canvas when running the compositor in single threaded mode. https://bugs.webkit.org/show_bug.cgi?id=75146 The texture copy fails on Windows as glCopyTexImage2D() doesn't support BGRA source textures. This change also modified Canvas2DLayerChromium::updateCompositorResources to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that the copy can work with texture allocated via the glTexStorage2D extension. Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-12-26 Gyuyoung Kim [EFL][WK2] Implement context menu for EFL port. https://bugs.webkit.org/show_bug.cgi?id=74995 Reviewed by Anders Carlsson. Implement missing ContextMenuEfl class in order to support WK2's context menu. Because WK2's context menu still needs WebCore's context menu implementation. And of course, this patch also can be used for WK1 without CROSS_PLATFORM_CONTEXT_MENU option. * platform/ContextMenu.h: * platform/ContextMenuItem.h: * platform/PlatformMenuDescription.h: * platform/efl/ContextMenuEfl.cpp: (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::appendItem): (WebCore::ContextMenu::insertItem): (WebCore::ContextMenu::itemCount): (WebCore::ContextMenu::setPlatformDescription): (WebCore::ContextMenu::platformDescription): (WebCore::ContextMenu::releasePlatformDescription): (WebCore::platformMenuDescription): (WebCore::contextMenuItemVector): * platform/efl/ContextMenuItemEfl.cpp: (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::~ContextMenuItem): (WebCore::ContextMenuItem::setType): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::setTitle): (WebCore::ContextMenuItem::title): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::checked): (WebCore::ContextMenuItem::setEnabled): (WebCore::ContextMenuItem::enabled): 2011-12-26 Hajime Morrita [Refactoring] Node::setTreeScopeRecursively() doesn't need includeRoot parameter https://bugs.webkit.org/show_bug.cgi?id=75240 Reviewed by Anders Carlsson. No new tests. No behavior change. * dom/Node.cpp: (WebCore::Node::setTreeScopeRecursively): * dom/Node.h: 2011-12-26 Darin Adler Use OwnPtr and OwnArrayPtr in a couple more places https://bugs.webkit.org/show_bug.cgi?id=75211 Reviewed by Andreas Kling. I had a patch with some changes from a while back from going through all sorts of classes and changing code to use adoptPtr. Most were landed long ago, these are the ones that still apply. There are six pieces here that could each be landed separately. The big one is CSSParser. * css/CSSGrammar.y: Update for members and functions that now return PassOwnPtr instead of raw pointers. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): Remove explicit construction for m_valueList and m_data since OwnPtr and OwnArrayPtr initialize to zero without it. (WebCore::CSSParser::~CSSParser): Removed delete m_valueList and fastFree(m_data) since OwnPtr and OwnArrayPtr handle that. (WebCore::CSSParser::setupParser): Use adoptArrayPtr and new for the character array instead of fastFree/fastMalloc. Added get function calls as needed. (WebCore::CSSParser::parseValue): Added get function calls as needed. (WebCore::CSSParser::parseContent): Ditto. (WebCore::CSSParser::parseFillProperty): Ditto. (WebCore::CSSParser::parseTransformOriginShorthand): Ditto. (WebCore::CSSParser::parseBorderImage): Ditto. (WebCore::CSSParser::parseTransformOrigin): Ditto. (WebCore::CSSParser::parsePerspectiveOrigin): Ditto. (WebCore::CSSParser::sinkFloatingValueList): Changed to return PassOwnPtr. The adoptPtr call is here. (WebCore::CSSParser::sinkFloatingFunction): Ditto. (WebCore::CSSParser::markSelectorListStart): Added get function calls as needed. (WebCore::CSSParser::markSelectorListEnd): Ditto. (WebCore::CSSParser::markRuleBodyStart): Ditto. (WebCore::CSSParser::markRuleBodyEnd): Ditto. (WebCore::CSSParser::markPropertyStart): Ditto. (WebCore::CSSParser::markPropertyEnd): Ditto. * css/CSSParser.h: Moved conditional includes to their own paragraph. Made sinkFloatingValueList and sinkFloatingFunction return PassOwnPtr. Made m_valueList an OwnPtr and m_data an OwnArrayPtr. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Added a call to the get function. * html/PluginDocument.h: Made isPluginDocument private. Also marked all the functions that are overriding here as OVERRIDE since I was touching the header. * html/parser/HTMLToken.h: (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData): Removed an unneeded line explicitly initializing the base class. * page/animation/AnimationBase.cpp: (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): Fixed indent. * rendering/style/RenderStyle.h: Moved conditional includes to their own paragraph. * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::beginDOCTYPE): Removed unneeded parentheses. 2011-12-26 Vsevolod Vlasov Web Inspector: Extract FileEditor from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=75229 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName): * inspector/front-end/ScriptsNavigator.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.get visibleView): (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced.get if): (WebInspector.ScriptsPanel.EditorContainer): (WebInspector.ScriptsPanel.EditorContainer.prototype.get currentSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.show): (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.isSourceFrameOpen): (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.EditorContainer.prototype.setSourceFrameIsDirty): (WebInspector.ScriptsPanel.EditorContainer.prototype.reset): (WebInspector.ScriptsPanel.SingleFileEditorContainer): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.get currentSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.show): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.isSourceFrameOpen): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.setSourceFrameIsDirty): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.get domain): (WebInspector.UISourceCode.prototype.get folderName): (WebInspector.UISourceCode.prototype.get fileName): (WebInspector.UISourceCode.prototype.get displayName): (WebInspector.UISourceCode.prototype._parseURL): 2011-12-26 Darin Adler Fix mutation observer build after didMoveToNewDocument change https://bugs.webkit.org/show_bug.cgi?id=75224 Reviewed by Hajime Morita. * dom/Node.cpp: (WebCore::willCallDidMoveToNewDocument): Added. (WebCore::didMoveToNewDocumentWasCalled): Added. (WebCore::Node::setDocument): Call new debugging function. (WebCore::Node::didMoveToNewDocument): Ditto. Also use ASSERT_UNUSED unconditionally rather than UNUSED_PARAM inside and #if. Also added a new assertion that checks that hte old document was passed through properly. 2011-12-26 Alexander Pavlov Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to Function" dialog item list https://bugs.webkit.org/show_bug.cgi?id=75226 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptOutlineDialog.js: (WebInspector.JavaScriptOutlineDialog): (WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp): (WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown): (WebInspector.JavaScriptOutlineDialog.prototype._updateSelection): (WebInspector.JavaScriptOutlineDialog.prototype._onScroll): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.highlightViewportItems): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.clearHighlight): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._highlightItem): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._viewportRowRange): * inspector/front-end/javaScriptOutlineDialog.css: (.js-outline-dialog > .container > div.item > span.highlight): 2011-12-26 Vsevolod Vlasov Web Inspector: Extract FileSelector from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=75173 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.ScriptsNavigator.prototype.scriptSelected): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): (WebInspector.ScriptsPanel.prototype._scriptSelected): (WebInspector.ScriptsPanel.FileSelector): (WebInspector.ScriptsPanel.FileSelector.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.FileSelector.prototype.show): (WebInspector.ScriptsPanel.FileSelector.prototype.addUISourceCode): (WebInspector.ScriptsPanel.FileSelector.prototype.isScriptSourceAdded): (WebInspector.ScriptsPanel.FileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.FileSelector.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.FileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.ComboBoxFileSelector): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.show): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.showDebugSidebarResizeWidget): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.addUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.isScriptSourceAdded): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._innerRevealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addToHistory): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._reset): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._createEditorToolbar): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.get var): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._resetFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._updateBackAndForwardButtons): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged): * inspector/front-end/inspector.html: * inspector/front-end/utilities.js: (): 2011-12-26 Alexander Pavlov Web Inspector: Implement "Go to Function" dialog for JavaScript https://bugs.webkit.org/show_bug.cgi?id=75092 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/JavaScriptOutlineDialog.js: Added. (WebInspector.JavaScriptOutlineDialog.onMouseDown): (WebInspector.JavaScriptOutlineDialog): (WebInspector.JavaScriptOutlineDialog.didAddChunk): (WebInspector.JavaScriptOutlineDialog.install): (WebInspector.JavaScriptOutlineDialog._show): (WebInspector.JavaScriptOutlineDialog.createShortcut): (WebInspector.JavaScriptOutlineDialog.prototype._resizeWindow): (WebInspector.JavaScriptOutlineDialog.prototype._appendItemElements): (WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp): (WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions): (WebInspector.JavaScriptOutlineDialog.prototype._selectFirstItem): (WebInspector.JavaScriptOutlineDialog.prototype._hide): (WebInspector.JavaScriptOutlineDialog.prototype._onBlur): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown): (WebInspector.JavaScriptOutlineDialog.prototype._scheduleFilter): (WebInspector.JavaScriptOutlineDialog.prototype._updateSelection): (WebInspector.JavaScriptOutlineDialog.prototype._onClick): (WebInspector.JavaScriptOutlineDialog.prototype._onMouseMove): (WebInspector.JavaScriptOutlineDialog.prototype._highlightFunctionLine): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.get uiSourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._didBuildOutlineChunk): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.requestVisibleScriptOutline): (WebInspector.ScriptsPanel.prototype._createEditorToolbar): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/javaScriptOutlineDialog.css: Added. (.js-outline-dialog): (.js-outline-dialog > input): (.js-outline-dialog > div.progress): (.js-outline-dialog > div.container): (.js-outline-dialog > .container > div.item): (.js-outline-dialog > .container > div.item.selected): 2011-12-26 Pavel Feldman Web Inspector: make SDK compilation component self-contained. https://bugs.webkit.org/show_bug.cgi?id=75172 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl): (WebInspector.ConsoleMessageImpl.prototype.get stackTrace): (WebInspector.ConsoleMessageImpl.prototype.clone): * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype.isErrorOrWarning): (WebInspector.ConsoleMessage.prototype.updateRepeatCount): (WebInspector.ConsoleMessage.prototype.clone): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): * inspector/front-end/ResourceUtils.js: * inspector/front-end/UIUtils.js: (WebInspector.resetToolbarColors): (WebInspector.populateHrefContextMenu): 2011-12-26 Hajime Morrita Unreviewed bad merge fix. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::didMoveToNewDocument): 2011-12-25 Hajime Morrita https://bugs.webkit.org/show_bug.cgi?id=74067 Refactoring: Unitfy willMoveToNewDocument() and didMoveToNewDocument() Reviewed by Darin Adler. No new tests. No behavior change. This change combines two method Node::willMoveToNewOwnerDocument() and Node::didMoveToNewOwnerDocument() into Node::didMoveToNewDocument(Document* oldDocument). The intention of this change is: - Making upcoming refactoring (Bug 59816) possible. The refactoring will turn Node::m_document into Node::m_treeScope, and we will no longer have Node::setDocument() where we can invoke both willMoveToNewDocument() and didMoveToNewDocument() at once. - Killing one extra virtual method call. - Making the concept of "move" clearer by keeping such an operation into the single method. * dom/Node.cpp: (WebCore::setWillMoveToNewDocumentWasCalled): (WebCore::setDidMoveToNewDocumentWasCalled): (WebCore::Node::setDocument): (WebCore::Node::didMoveToNewDocument): * dom/Node.h: * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::didMoveToNewDocument): * html/FormAssociatedElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::didMoveToNewDocument): (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument): * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::didMoveToNewDocument): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::didMoveToNewDocument): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::didMoveToNewDocument): * html/HTMLInputElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didMoveToNewDocument): * html/HTMLMediaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::didMoveToNewDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): * html/HTMLPlugInImageElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didMoveToNewDocument): * html/HTMLVideoElement.h: * html/ImageDocument.cpp: (WebCore::ImageDocumentElement::didMoveToNewDocument): * html/ImageInputType.cpp: (WebCore::ImageInputType::willMoveToNewDocument): * loader/ImageLoader.cpp: (WebCore::ImageLoader::elementDidMoveToNewDocument): * loader/ImageLoader.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::didMoveToNewDocument): * svg/SVGImageElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::didMoveToNewDocument): * svg/SVGSVGElement.h: 2011-12-25 Kentaro Hara REGRESSION(r102987): Fix the filename prefix of the generated empty .h and .cpp files for [Supplemental] IDLs https://bugs.webkit.org/show_bug.cgi?id=75082 Reviewed by Darin Adler. In bug 74481, we changed generate-bindings.pl so that it generates empty .h and .cpp files for the [Supplemental] IDLs. However, the filename prefixes of those .h and .cpp files are wrong. This patch fixes the prefixes as follows: generator=JS => JS*.h, JS*.cpp generator=V8 => V8*.h, V8*.cpp generator=ObjC => DOM*.h, DOM*.cpp generator=GObject => WebKitDOM*.h, WebKitDOM*.cpp generator=CPP => WebDOM*.h, WebDOM*.cpp No new tests. No change in behavior. I confirmed that the names of generated .h and .cpp files are correct. * bindings/scripts/CodeGenerator.pm: (FileNamePrefix): Returns the prefix of file names. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateInterface): Uses CodeGenerator::FileNamePrefix. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorJS.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorV8.pm: (GenerateInterface): Ditto. * bindings/scripts/generate-bindings.pl: (generateEmptyHeaderAndCpp): Ditto. 2011-12-25 Dan Bernstein WebCore changes for: Find indicators overlap when a match spans multiple text boxes https://bugs.webkit.org/show_bug.cgi?id=75220 Reviewed by Darin Adler. * WebCore.exp.in: Exported new unionRect(const Vector&) and existing FloatRect::intersects(). * platform/graphics/FloatRect.cpp: (WebCore::unionRect): Added. * platform/graphics/FloatRect.h: 2011-12-25 Darin Adler Use OwnPtr for CSSFontFace::m_sources https://bugs.webkit.org/show_bug.cgi?id=75219 Reviewed by Dan Bernstein. * css/CSSFontFace.cpp: (WebCore::CSSFontFace::isLoaded): Use the same size_t idiom here as in the rest of the functions. (WebCore::CSSFontFace::isValid): Ditto. Also removed unneeded empty special casing. (WebCore::CSSFontFace::addSource): Changed to take a PassOwnPtr. Reordered so the PassOwnPtr zeroing does not cause trouble. (WebCore::CSSFontFace::getFontData): Added call to get. (WebCore::CSSFontFace::hasSVGFontFaceSource): Use the same size_t idiom here as in the rest of the functions. * css/CSSFontFace.h: Use PassOwnPtr for addSource argument, and Vector for the m_sources vector. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Use OwnPtr and PassOwnPtr for font face sources that are passed to addSource. * css/CSSSegmentedFontFace.cpp: Added a now-needed include. 2011-12-24 Jarred Nicholls Allow XMLHttpRequest responseType to be set at any state up to and including HEADERS_RECEIVED https://bugs.webkit.org/show_bug.cgi?id=75190 XMLHttpRequest.responseType should be modifiable at any state up to and including the HEADERS_RECEIVED state. Therefore, subsequent calls to open() should not reset responseType to its default value, and calls to open() must follow the same spec mandate set forth in setResponseType() for synchronous HTTP(S) requests made from the window context. Reviewed by Alexey Proskuryakov. Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): Prevent setting the value only when in LOADING and DONE states. No longer check if m_loader is present, which is instantiated on a call to send(), because responseType can be safely changed after a request is sent. (WebCore::XMLHttpRequest::open): Do not reset m_responseTypeCode to the default value, and prevent calls to open() for synchronous HTTP(S) requests made from the window context when m_responseTypeCode is not the default value. 2011-12-25 Sam Weinig Fix tests failing as a result of r103643 https://bugs.webkit.org/show_bug.cgi?id=75209 Reviewed by Dan Bernstein. Switch accidental switch of default scroll granularity from ScrollByPageWheelEvent back to ScrollByPixelWheelEvent. * platform/mac/PlatformEventFactory.mm: (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): 2011-12-25 Darin Adler Change CSS canvas code that does HashMap get/set to use the more efficient add idiom https://bugs.webkit.org/show_bug.cgi?id=75204 Reviewed by Dan Bernstein. * dom/Document.cpp: (WebCore::Document::getCSSCanvasContext): Change local variable name of element to element; it's not the function result, so not good to name it result. (WebCore::Document::getCSSCanvasElement): Use add instead of get/set so we only do one hash table lookup. 2011-12-24 Andreas Kling CSSElementStyleDeclarations should never move between elements. Reviewed by Anders Carlsson. Have the CSSElementStyleDeclaration subclasses take a StyledElement* in the constructor and replace setElement(StyledElement*) by clearElement(). No behavior change, just enforcing the current behavior at compile-time. * css/CSSElementStyleDeclaration.h: (WebCore::CSSElementStyleDeclaration::clearElement): (WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration): * css/CSSInlineStyleDeclaration.h: (WebCore::CSSInlineStyleDeclaration::create): (WebCore::CSSInlineStyleDeclaration::CSSInlineStyleDeclaration): * dom/StyledElement.cpp: (WebCore::StyledElement::createInlineStyleDecl): (WebCore::StyledElement::destroyInlineStyleDecl): * svg/SVGFontFaceElement.cpp: (WebCore::FontFaceStyleDeclaration::FontFaceStyleDeclaration): 2011-12-23 Andreas Kling Decouple CSSMappedAttributeDeclaration from element completely. Reviewed by Darin Adler. Let CSSMappedAttributeDeclaration inherit from CSSMutableDeclaration instead of CSSElementStyleDeclaration. Add methods to CSSMappedAttributeDeclaration for setting properties that also take a StyledElement* and use that mechanism instead of temporarily associating an element with the declaration. This reduces the size of mapped attributes by 4/8 bytes, but more importantly opens a number of ways to simplify style declarations in future patches. * css/CSSMutableStyleDeclaration.h: * dom/CSSMappedAttributeDeclaration.cpp: (WebCore::CSSMappedAttributeDeclaration::setNeedsStyleRecalc): (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedLengthProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedProperty): (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty): * dom/CSSMappedAttributeDeclaration.h: (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration): Add/move methods to CSSMappedAttributeDeclaration for setting/removing properties that also take a StyledElement*. That element is used for scheduling style recalc and passing the right document to CSSParser. * css/CSSParser.h: * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::parseSimpleLengthValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseMappedAttributeValue): Added a parsedMappedAttributeValue() alternative to parseValue() that takes a StyledElement*. * dom/StyledElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): Add (and use) a StyledElement::removeCSSProperty() complement to the addCSS*() functions. * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::removeCSSProperty): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): (WebCore::StyledElement::addCSSLength): (WebCore::StyledElement::addCSSColor): (WebCore::StyledElement::createMappedDecl): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::additionalAttributeStyleDecls): (WebCore::HTMLTableElement::addSharedCellBordersDecl): (WebCore::HTMLTableElement::addSharedCellPaddingDecl): (WebCore::HTMLTableElement::addSharedGroupDecls): Use the setMapped*Property() functions to plumb the element through. * css/CSSElementStyleDeclaration.h: Update comment about CSSElementStyleDeclaration's subclasses. 2011-12-24 Jarred Nicholls Allow XMLHttpRequest withCredentials to be set prior to a call to open() https://bugs.webkit.org/show_bug.cgi?id=75194 XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute Reviewed by Alexey Proskuryakov. Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setWithCredentials): Prevent setting the value only after the OPENED state. 2011-12-24 Andreas Kling Remove empty inline RenderStyle destructor. Rubber-stamped by Anders "Ordvits" Carlsson. * rendering/style/RenderStyle.h: 2011-12-24 Andreas Kling RenderStyle: Inline the destructor. Reviewed by Kenneth Rohde Christiansen. The (empty) RenderStyle destructor gets a little hot sometimes, reaching up to 0.4% when loading the full HTML5 spec. Inline it to remove the pointless function call. * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::~RenderStyle): 2011-12-23 Noel Gordon JPEG decoders should only save color profile markers if color management is enabled https://bugs.webkit.org/show_bug.cgi?id=75182 Reviewed by Adam Barth. No new tests. Covered by existing tests. fast/images/ycbcr-with-cmyk-color-profile.html fast/images/gray-scale-jpeg-with-color-profile.html fast/images/cmyk-jpeg-with-color-profile.html fast/images/color-jpeg-with-color-profile.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::JPEGImageReader): Store color profile (JPEG_APP0 + 2) markers using the iccjpeg helper setup_read_icc_profile() if color management is enabled. 2011-12-23 Alice Boxhall Fix crash when adding paragraph in contenteditable with role=textbox. https://bugs.webkit.org/show_bug.cgi?id=75159 Reviewed by Ryosuke Niwa. Test: accessibility/textbox-role-on-contenteditable-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::childrenChanged): Use rendererIsEditable() rather than isContentEditable() as this method is called during render layouts, and isContentEditable() triggers a layout update, which crashes. 2011-12-23 Noel Gordon [chromium] JPEG image with CMYK ICC color profile renders color-inverted and squashed https://bugs.webkit.org/show_bug.cgi?id=74400 Reviewed by Adam Barth. Use color profiles for GRAYSCALE, RGB, YCbCr, CMYK and YCCK jpeg images only if their embedded color profile is from an RGB color space input device. Test: fast/images/ycbcr-with-cmyk-color-profile.html - YCbCr image, with CMYK output device color profile. Existing Tests: fast/images/gray-scale-jpeg-with-color-profile.html - YCbCr image, with GRAY input device color profile. fast/images/cmyk-jpeg-with-color-profile.html - YCCK image, with CMYK output device color profile. fast/images/color-jpeg-with-color-profile.html - YCbCr image, with RGB input device color profile. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::rgbColorProfile): Return true if the profile has an RGB color space. (WebCore::inputDeviceColorProfile): Return true if the profile is from an input device. (WebCore::readColorProfile): Ignore the embedded color profile unless if it is from an RGB color space input device. (WebCore::JPEGImageReader::decode): 2011-12-23 Dan Bernstein Print dlerror() when dyld functions fail unexpectedly https://bugs.webkit.org/show_bug.cgi?id=75185 Reviewed by Sam Weinig. * platform/mac/SoftLinking.h: 2011-12-23 Sam Weinig Start extracting platform specific bits out of PlatformEvents https://bugs.webkit.org/show_bug.cgi?id=75063 Reviewed by Anders Carlsson. * WebCore.exp.in: Update exports. * WebCore.xcodeproj/project.pbxproj: Add factory, remove implementation files for mac PlatformWheelEvent and PlatformMouseEvent. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::currentPlatformMouseEvent): Switch to use the factory. * platform/PlatformEvent.h: (WebCore::PlatformEvent::shiftKey): (WebCore::PlatformEvent::ctrlKey): (WebCore::PlatformEvent::altKey): (WebCore::PlatformEvent::metaKey): (WebCore::PlatformEvent::modifiers): (WebCore::PlatformEvent::PlatformEvent): Switch to storing the modifiers as bits on an unsigned instead of as individual bools. * platform/PlatformGestureEvent.h: Remove unused timestamp member. * platform/PlatformKeyboardEvent.h: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::keyIdentifier): (WebCore::PlatformKeyboardEvent::macCharCode): (WebCore::PlatformKeyboardEvent::isSystemKey): Give this class a more consistent interface across platforms, and remove constructor that took an NSEvent. * platform/PlatformMouseEvent.h: Remove constructor that took an NSEvent (and an unused constructor that took many arguments) as well as some free functions for point conversion. * platform/PlatformWheelEvent.h: Remove constructor that took an NSEvent and an unnecessary override of the timestamp() function. * platform/mac/KeyEventMac.mm: Removed constructor and moved helpers to PlatformEventFactory. * platform/mac/PlatformEventFactory.h: Added. * platform/mac/PlatformEventFactory.mm: Added. (WebCore::globalPoint): (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::mouseEventTypeForEvent): (WebCore::clickCountForEvent): (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): (WebCore::gestureEventTypeForEvent): (WebCore::textFromEvent): (WebCore::unmodifiedTextFromEvent): (WebCore::keyIdentifierForKeyEvent): (WebCore::isKeypadEvent): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::isKeyUpEvent): (WebCore::modifiersForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformEventFactory::createPlatformWheelEvent): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): (WebCore::PlatformEventFactory::createPlatformKeyboardEvent): (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder): (WebCore::PlatformEventFactory::createPlatformGestureEvent): Consolidate platform event creation logic and add factory functions. * platform/mac/PlatformMouseEventMac.mm: Removed. * platform/mac/WheelEventMac.mm: Removed. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Expose wkGetNSEventKeyChar in WebCore. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/PlatformMouseEventGtk.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/qt/PlatformMouseEventQt.cpp: (WebCore::mouseEventModifiersFromQtKeyboardModifiers): (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/qt/PlatformTouchEventQt.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Update for new variables/names. 2011-12-22 Andreas Kling CSSParser: Avoid creating dummy declaration in parseColor() slow path. Reviewed by Darin Adler. We only needed the dummy declaration to trigger the instantiation of a CSSValuePool. Added an ensureCSSValuePool() method and have parseColor() call that instead. Also renamed the fast-path parseColor() to fastParseColor() and reordered the arguments for consistency with the slow-path parseColor(). * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::CSSParser::parseColor): (WebCore::CSSParser::ensureCSSValuePool): (WebCore::CSSParser::fastParseColor): (WebCore::CSSParser::parseColorFromValue): * css/CSSParser.h: 2011-12-21 Andreas Kling Automate elements' registration as document namedItem/extraNamedItem. Reviewed by Antti Koivisto. Remove caching of the "id" and "name" attributes on applet, embed, form, image and object elements. We were caching them to keep the document's map of named and "extra named" (named by id) item counts in sync. Instead, add a hook to Element::willModifyAttribute() that detects when the attributes are being changed and handle the registration/unregistration automatically if the element returns true for shouldRegisterAsNamedItem() or shouldRegisterAsExtraNamedItem() respectively. This shrinks the elements by two AtomicStrings (8 or 16 bytes) each. IFrame elements retain the old mechanism for now, as there are some subtle differences to how that's handled. * dom/Node.h: (WebCore::Node::hasName): (WebCore::Node::setHasName): Cache whether we have a "name" attribute or not (1 bit on Node.) This is done in order to minimize the overhead added to Element's insertedIntoDocument() and removeFromDocument(). * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): Update the Node's has-name flag as appropriate. * dom/Element.cpp: (WebCore::Element::updateNamedItemRegistration): (WebCore::Element::updateExtraNamedItemRegistration): Added. Called when the "name" and "id" attributes are changed. Updates the document's named item maps accordingly. (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): Make sure updateName() is called in addition to updateId() when applicable. * dom/Element.h: (WebCore::Element::shouldRegisterAsNamedItem): (WebCore::Element::shouldRegisterAsExtraNamedItem): Added. If an element returns true for these, it will be automatically registered with the document when the name/id attribute changes. (WebCore::Element::updateId): (WebCore::Element::updateName): Register/unregister from the document's named item maps as appropriate. (WebCore::Element::willModifyAttribute): Add updateName() hook in addition to the existing updateId() hook. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): Make sure updateName() is called when we're cloning the attributes from another element. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: Remove duplicated code that is now handled by Element. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): Use fastGetAttribute() since we no longer cache the name. 2011-12-23 Anders Carlsson Add two (currently unused) new member functions to ScrollElasticityControllerClient https://bugs.webkit.org/show_bug.cgi?id=75179 Reviewed by Dan Bernstein. This is so we'll be able to move more code to ScrollElasticityController. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::pinnedInDirection): (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints): * platform/mac/ScrollElasticityController.h: 2011-12-23 Simon Fraser Blur filter doesn't invalidate enough https://bugs.webkit.org/show_bug.cgi?id=74891 Reviewed by Darin Adler. Take the effects of filters into account for repainting; we need to inflate the repaint rect by the outsets provided by the filter. Test: css3/filters/filter-repaint.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderInline.cpp: (WebCore::RenderInline::computeRectForRepaint): 2011-12-23 Simon Fraser Filters should apply to inline elements https://bugs.webkit.org/show_bug.cgi?id=75152 Reviewed by Darin Adler. Filters need to cause creation of RenderLayers for inlines, just like opacity and masks do. Test: css3/filters/filtered-inline.html * rendering/RenderInline.h: (WebCore::RenderInline::requiresLayer): * rendering/RenderTableRow.h: Remove an obviously incorrect comment. 2011-12-23 Jarred Nicholls Synchronous XHR in window context should not support new XHR responseTypes for HTTP(S) requests https://bugs.webkit.org/show_bug.cgi?id=72154 Per the latest W3C editor draft: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html This is a spec-mandated attempt to thwart and otherwise discourage the use of synchronous XHR in the window context by deliberately not exposing newer functionality. Here we are disabling the use of responseType in synchronous HTTP(S) XHR requests from the window context. When a user attempts this action, an InvalidAccessError exception is thrown and a message is printed to the console to further explain. Renamed reportUnsafeUsage to a more generic name, and hoisted it up so it would be defined earlier and thus referenceable by setResponseType. Reviewed by Alexey Proskuryakov. Test: fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request.html * xml/XMLHttpRequest.cpp: (WebCore::logConsoleError): reportUnsafeUsage -> logConsoleError (WebCore::XMLHttpRequest::setResponseType): (WebCore::XMLHttpRequest::setRequestHeader): reportUnsafeUsage -> logConsoleError (WebCore::XMLHttpRequest::getResponseHeader): reportUnsafeUsage -> logConsoleError (WebCore::XMLHttpRequest::didFail): reportUnsafeUsage -> logConsoleError 2011-12-23 Alexander Pavlov Web Inspector: Implement a worker for parsing out JavaScript function data https://bugs.webkit.org/show_bug.cgi?id=75166 Reviewed by Pavel Feldman. Test: inspector/debugger/script-extract-outline.html * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype.formatContent): * inspector/front-end/ScriptFormatterWorker.js: (onmessage): (format): (getChunkCount): (): (Array.prototype.keySet): 2011-12-23 Ilya Tikhonovsky Unreviewed, rolling out r103624. http://trac.webkit.org/changeset/103624 https://bugs.webkit.org/show_bug.cgi?id=68916 Broke Snow Leopard builders * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.pri: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDirectoryEntryCustom.cpp: (WebCore::JSDirectoryEntry::getFile): (WebCore::JSDirectoryEntry::getDirectory): * bindings/js/JSDirectoryEntrySyncCustom.cpp: (WebCore::getFlags): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::getFlags): * fileapi/WebKitFlags.idl: Added. * page/DOMWindow.idl: * workers/WorkerContext.idl: 2011-12-23 Eric Uhrhane [fileapi] WebKitFlags should not be constructable per Directories & System spec https://bugs.webkit.org/show_bug.cgi?id=68916 Reviewed by Eric Seidel. Remove IDL for the object and all DOM references to it. * fileapi/WebKitFlags.idl: Removed. * page/DOMWindow.idl: * workers/WorkerContext.idl: Remove references to the JSC/V8 objects compiled from the IDL. * bindings/js/JSDirectoryEntryCustom.cpp: (WebCore::JSDirectoryEntry::getFile): (WebCore::JSDirectoryEntry::getDirectory): * bindings/js/JSDirectoryEntrySyncCustom.cpp: (WebCore::getFlags): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::getFlags): Fix up build files. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCore/CMakeLists.txt: * WebCore/CodeGenerators.pri: * WebCore/DerivedSources.cpp: * WebCore/GNUmakefile.list.am: 2011-12-23 Pavel Feldman Web Inspector: Migrate to native Function.prototype.bind; fix front-end compilation with the version of compiler that respects Function.prototype.bind. https://bugs.webkit.org/show_bug.cgi?id=75170 Reviewed by Yury Semikhatsky. * inspector/front-end/ApplicationCacheModel.js: * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.colors): * inspector/front-end/CSSStyleModel.js: * inspector/front-end/CompilerSourceMapping.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype.pushNodeToFrontend): (WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMAgent.prototype.querySelector): (WebInspector.DOMAgent.prototype.querySelectorAll): * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.InspectorExtensionAPI): (injectedExtensionAPI): * inspector/front-end/ExtensionPanel.js: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.enableResourceTracking): (WebInspector.NetworkManager.prototype.disableResourceTracking): * inspector/front-end/Script.js: * inspector/front-end/Settings.js: * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.complete): * inspector/front-end/utilities.js: 2011-12-23 Leo Yang [BlackBerry] Add the BlackBerry specific pauseLoad(bool) to ResourceHandle https://bugs.webkit.org/show_bug.cgi?id=75162 Reviewed by George Staikos. The porting can be built now, no new tests so far. * platform/network/ResourceHandle.h: 2011-12-23 Karl Koscher Give embedders a chance to handle postMessage calls https://bugs.webkit.org/show_bug.cgi?id=73883 To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept postMessage calls to proxy windows. Originally we were just going to add a native event listener on the Chromium side, but that required more changes to WebKit and was a bit of a hack. See bug 73359 for a discuss about moving to this approach. Reviewed by Adam Barth. Test: platform/chromium/fast/events/intercept-postmessage.html * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the embedder to intercept postMessage calls * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): add a call to FrameLoaderClient::willCheckAndDispatchPostMessage 2011-12-23 Tom Sepez XSLT-created HTML documents do not inherit content-security-policy from originally loaded XML. https://bugs.webkit.org/show_bug.cgi?id=75043 Reviewed by Adam Barth. Test: http/tests/security/contentSecurityPolicy/xsl-img-blocked.php * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::copyStateFrom): (WebCore::ContentSecurityPolicy::didReceiveHeader): * page/ContentSecurityPolicy.h: * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): 2011-12-23 Darin Adler REGRESSION (r97533): Optgroup label is not disabled https://bugs.webkit.org/show_bug.cgi?id=74869 Reviewed by Alexey Proskuryakov. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemIsEnabled): Added back a line of code that was accidentally deleted as part of the refactoring in r97533. This line of code ensures that any items that are not option elements are disabled. 2011-12-19 Alexander Pavlov Web Inspector: Add CSSStyleSelector instrumentation calls towards implementing a CSS selector profiler https://bugs.webkit.org/show_bug.cgi?id=74863 Performance checks run on PerformanceTest/Parser/html5-full-render.html did not result in any noticeable perf regression, as the instrumentation calls are inline and bail out early if there are no Web Inspector frontends open. Reviewed by Antti Koivisto. No new tests, as the functionality is not bound to any user-visible outputs. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::CSSStyleSelector::applyDeclaration): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willMatchRuleImpl): (WebCore::InspectorInstrumentation::didMatchRuleImpl): (WebCore::InspectorInstrumentation::willProcessRuleImpl): (WebCore::InspectorInstrumentation::didProcessRuleImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willMatchRule): (WebCore::InspectorInstrumentation::didMatchRule): (WebCore::InspectorInstrumentation::willProcessRule): (WebCore::InspectorInstrumentation::didProcessRule): 2011-12-23 Ivan Briano [EFL] Fix building with Glib support disabled https://bugs.webkit.org/show_bug.cgi?id=70990 Reviewed by Martin Robinson. Add forward declaration for cairo_surface_t, missing when building the EFL port with Glib disabled. * platform/cairo/WidgetBackingStore.h: 2011-12-23 Adam Klein Minimize callsites and duplication of before/after advice for attribute mutations https://bugs.webkit.org/show_bug.cgi?id=75054 Reviewed by Ryosuke Niwa. r103452 helpfully made before and after advice regarding attribute changes symmetrical. This change finishes that work, by pulling together all the before/after work, not just the crumbs previously covered. This includes incrementing Document::domTreeVersion() when an attribute is about to be changed, Inspector instrumentation, and MutationEvent dispatch. This is in addition to the previous code, which handled enqueueing MutationRecords for MutationObservers and updating the Document's list of IDs. The only change in behavior should be in InspectorInstrumentation, which causes DOM breakpoints to occur for more cases of Attribute mutation. This seems like more correct behavior, and a test has been included to exercise it. Hopefully the last Attribute-related refactor for awhile. * dom/Attr.cpp: (WebCore::Attr::setValue): Update to call didModifyAttribute instead of attributeChanged. * dom/Element.cpp: (WebCore::Element::removeAttribute): Got rid of removeAttributeInternal as most of that logic moved back into NamedNodeMap::removeAttribute. (WebCore::Element::setAttributeInternal): Reorganized to read better now that only some cases result in calls to will/didModifyAttribute. (WebCore::Element::willModifyAttribute): Un-inlined and added incDOMTreeVersion and InspectorInstrumentation calls. (WebCore::Element::didModifyAttribute): New method which encapsulates calling attributeChanged, InspectorInstrumentation, and MutationEvents. (WebCore::Element::didRemoveAttribute): New method which encapsulates calling attributeChanged, InspectorInstrumentation, and MutationEvents. Separate from didModifyAttribute because it has special handling of the removed Attribute's value. * dom/Element.h: (WebCore::Element::willRemoveAttribute): New method which delegates to willModifyAttribute as appropriate. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): Simplified. (WebCore::NamedNodeMap::removeNamedItem): Simplified. (WebCore::NamedNodeMap::addAttribute): Added calls to will/didModifyAttribute. (WebCore::NamedNodeMap::removeAttribute): ditto. (WebCore::NamedNodeMap::replaceAttribute): ditto. * svg/properties/SVGAnimatedPropertySynchronizer.h: Reverted changes made in r103452 now that addAttribute/removeAttribute once again call attributeChanged appropriately. 2011-12-22 Matt Falkenhagen Map 'lang' and xml:lang attributes to '-webkit-locale' CSS property for use with font fallback and text-transform https://bugs.webkit.org/show_bug.cgi?id=67586 Original patch by Jungshik Shin Reviewed by Darin Adler. Tests: fast/text/lang-mapped-to-webkit-locale.xhtml fast/text/xml-lang-ignored-in-html.html * html/HTMLElement.cpp: (WebCore::HTMLElement::mapLanguageAttributeToLocale): (WebCore::HTMLElement::parseMappedAttribute): Map 'lang' and 'xml:lang' to -webkit-locale. * html/HTMLElement.h: 2011-12-22 Ryosuke Niwa WinCE build fix after r103539. * rendering/svg/RenderSVGResource.cpp: (WebCore::RenderSVGResource::removeFromFilterCache): 2011-12-22 Chris Marrin Crash and incorrect behavior when switching between hardware and software CSS filters https://bugs.webkit.org/show_bug.cgi?id=75130 Reviewed by Simon Fraser. Test: css3/filters/crash-hw-sw-switch.html Backing store on layer gets fixed up (added or removed) after style change is evaluated so the state of the m_filter variable might not match the current filter state. Added updateOrRemoveFilterEffect() call to ensureBacking() and clearBacking() to get the m_filter property in the right state. Also added an ASSERT() where the crash was occuring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::ensureBacking): (WebCore::RenderLayer::clearBacking): 2011-12-22 Jon Lee Radio buttons cut in download movie sheet https://bugs.webkit.org/show_bug.cgi?id=75128 Reviewed by Dan Bernstein. Test: compositing/overflow/theme-affects-visual-overflow.html The clipping comes from the fact the visual overflow rect of the radio button's RenderBlock is not expanded to accommodate for the size of the button on the Mac platform. We use the existing RenderTheme::adjustRepaintRect() to make the appropriate adjustment. This, consequently, makes it unnecessary to have to recalculate it for repaint. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeOverflow): As part of the overflow computation, we make a call to addVisualOverflowFromTheme(). (WebCore::RenderBlock::addVisualOverflowFromTheme): Ask the theme to inflate the RenderBlock's rect if necessary, and add that to the visual overflow rect. * rendering/RenderBlock.h: Added addVisualOverflowFromTheme(). * rendering/RenderBox.cpp: (WebCore::RenderBox::clippedOverflowRectForRepaint): Remove the call to adjustRepaintRect() since the rectangle r already uses the new visual overflow rect. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::clippedOverflowRectForRepaint): Remove the call to adjustRepaintRect() since the rectangle r already uses the new visual overflow rect. 2011-12-22 Chris Rogers Fix mac build breakage - add SincResampler files to WebCore.xcodeproj https://bugs.webkit.org/show_bug.cgi?id=75139 Unreviewed build fix. * WebCore.xcodeproj/project.pbxproj: 2011-12-22 Simon Fraser Animating some CSS filter values is wrong https://bugs.webkit.org/show_bug.cgi?id=75122 Reviewed by Chris Marrin. Fix some reversed filter animation behavior for brightness, contrast and drop-shadow filters. Test: css3/filters/filter-animation-from-none.html * platform/graphics/filters/FilterOperation.cpp: (WebCore::BasicComponentTransferFilterOperation::blend): Just use the global blend() function. (WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Add CONTRAST and BRIGHTNESS to the sswitch. (WebCore::GammaFilterOperation::blend): Fix the ordering. (WebCore::DropShadowFilterOperation::blend): Fix the ordering. 2011-12-22 Chris Rogers Fix mac build caused by improper include of "Locker.h" https://bugs.webkit.org/show_bug.cgi?id=75134 Unreviewed build fix. * webaudio/MediaElementAudioSourceNode.cpp: 2011-12-22 Anders Carlsson More ScrollAnimatorMac cleanup https://bugs.webkit.org/show_bug.cgi?id=75127 Reviewed by Andreas Kling. Introduce a immediateScrollByWithoutContentEdgeConstraints and use it whenever we want to scroll by an offset instead of doing the setConstrainsScrollingToContentEdge dance. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-12-22 Chris Rogers Implement MediaElementAudioSourceNode::setFormat() so numberOfChannels and sampleRate are accounted for https://bugs.webkit.org/show_bug.cgi?id=75057 Reviewed by Eric Carlson. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: Add MultiChannelResampler source files to makefiles. * platform/audio/MultiChannelResampler.cpp: Added. (WebCore::MultiChannelResampler::MultiChannelResampler): (WebCore::MultiChannelResampler::process): * platform/audio/MultiChannelResampler.h: Added. Add MultiChannelResampler implementation which uses one SincResampler per channel. * webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::create): (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::setFormat): (WebCore::MediaElementAudioSourceNode::process): Implement MediaElementAudioSourceNode::setFormat() so that we can properly setup a sample-rate converter and set the number of channels of the MediaElementAudioSourceNode output. * webaudio/MediaElementAudioSourceNode.h: 2011-12-22 Chris Fleizach AX: WebKit should ignore ARIA role=presentation on focusable elements https://bugs.webkit.org/show_bug.cgi?id=75101 Reviewed by Darin Adler. If an element is focusable, the presentational role must be ignored, lest the user not be able to interact with something important. Test: accessibility/presentational-elements-with-focus.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): (WebCore::AccessibilityRenderObject::inheritsPresentationalRole): 2011-12-22 Anders Carlsson Use immediateScrollBy instead of immediateScrollTo where possible https://bugs.webkit.org/show_bug.cgi?id=75124 Reviewed by Sam Weinig. Instead of computing the position to scroll to, just compute the delta and use scrollBy instead. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-12-22 Anders Carlsson Remove a private ScrollAnimatorMac getter/setter and just update the member variable directly https://bugs.webkit.org/show_bug.cgi?id=75121 Reviewed by Sam Weinig. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): 2011-12-22 Anders Carlsson Simplify ScrollAnimatorMac scrollByDelta functions https://bugs.webkit.org/show_bug.cgi?id=75120 Reviewed by Sam Weinig. Merge immediateScrollByDeltaX and immediateScrollByDeltaY to a single function and rename it to immediateScrollBy. Also, rename immediateScrollToPoint to immediateScrollTo. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorMac::immediateScrollTo): (WebCore::ScrollAnimatorMac::immediateScrollBy): (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-12-22 Anders Carlsson Make some ScrollAnimatorMac member functions private https://bugs.webkit.org/show_bug.cgi?id=75117 Reviewed by Sam Weinig. Make virtual member functions and functions that are only called from ScrollAnimatorMac private. * platform/mac/ScrollAnimatorMac.h: 2011-12-22 Anders Carlsson Move some member variables out of ScrollElasticityController https://bugs.webkit.org/show_bug.cgi?id=75115 Reviewed by Adam Roben. Move a couple of member variables that aren't related to rubberbanding out from ScrollElasticityController and back into ScrollAnimatorMac and remove now unneeded ScrollElasticityControllerClient member functions as well. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::ScrollElasticityController): (WebCore::ScrollElasticityController::beginScrollGesture): 2011-12-22 Balazs Kelemen Fix debug build with assertions disabled https://bugs.webkit.org/show_bug.cgi?id=75075 Reviewed by Darin Adler. Check whether assertions are disabled instead of NDEBUG where appropriate to avoid "defined but not used" warnings. No change in behaviour so no new tests. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::insertInLRUList): (WebCore::MemoryCache::removeFromLiveDecodedResourcesList): (WebCore::MemoryCache::insertInLiveDecodedResourcesList): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): 2011-12-22 Anders Carlsson Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll https://bugs.webkit.org/show_bug.cgi?id=75107 Reviewed by Adam Roben. This is another step towards removing the display throttling in WebKit2. * page/ChromeClient.h: * page/FrameView.cpp: * page/FrameView.h: * platform/ScrollableArea.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::scroll): (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): 2011-12-22 Anders Carlsson Remove didStartRubberBand and didCompleteRubberBand callbacks https://bugs.webkit.org/show_bug.cgi?id=75102 Reviewed by Adam Roben. The code to do display throttling in WebKit2 is complex and doesn't really help us except on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead. * page/ChromeClient.h: * page/FrameView.cpp: * page/FrameView.h: * platform/ScrollView.cpp: * platform/ScrollView.h: * platform/ScrollableArea.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: 2011-12-22 Vsevolod Vlasov Web Inspector: [Regression] Network item view is not displayed. https://bugs.webkit.org/show_bug.cgi?id=75100 Not reviewed, one line css fix. * inspector/front-end/networkPanel.css: (.network-item-view.visible): 2011-12-22 Andreas Kling NamedNodeMap: Get rid of declCount(). Reviewed by Darin Adler. We already have the number of mapped attribute declarations in the map stored in m_mappedAttributeCount (updated by declAdded()/declRemoved()) so compare that in mappedMapsEquivalent() to skip one loop over the map. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::mappedMapsEquivalent): * dom/NamedNodeMap.h: 2011-12-22 Andreas Kling SnowLeopard crashes due to thread-unsafe EventListenerIterator ASSERTs Reviewed by Darin Adler. Guard EventListenerMap::m_activeIteratorCount with a mutex. * dom/EventListenerMap.cpp: (WebCore::activeIteratorCountMutex): (WebCore::EventListenerMap::assertNoActiveIterators): (WebCore::EventListenerMap::clear): (WebCore::EventListenerMap::add): (WebCore::EventListenerMap::remove): (WebCore::EventListenerMap::find): (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup): (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget): (WebCore::EventListenerIterator::EventListenerIterator): (WebCore::EventListenerIterator::~EventListenerIterator): * dom/EventListenerMap.h: (WebCore::EventListenerMap::assertNoActiveIterators): 2011-12-22 Vsevolod Vlasov Web Inspector: TabbedPane should support closeable tabs, hiding tabs into drop down menu. https://bugs.webkit.org/show_bug.cgi?id=75085 Reviewed by Pavel Feldman. Test: inspector/tabbed-pane-tabs-to-show.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.set shrinkableTabs): (WebInspector.TabbedPane.prototype.set closeableTabs): (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.closeTab): (WebInspector.TabbedPane.prototype.selectTab): (WebInspector.TabbedPane.prototype.onResize): (WebInspector.TabbedPane.prototype._updateTabElements): (WebInspector.TabbedPane.prototype._showTabElement): (WebInspector.TabbedPane.prototype._hideTabElement): (WebInspector.TabbedPane.prototype._createDropDownButton): (WebInspector.TabbedPane.prototype._updateTabsDropDown): (WebInspector.TabbedPane.prototype._populateDropDownFromIndex): (WebInspector.TabbedPane.prototype._tabsSelectChanged): (WebInspector.TabbedPane.prototype._measureDropDownButton): (WebInspector.TabbedPane.prototype._updateWidths): (WebInspector.TabbedPane.prototype._calculateMaxWidth.var): (WebInspector.TabbedPane.prototype._calculateMaxWidth): (WebInspector.TabbedPane.prototype._hideCurrentTab): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get id): (WebInspector.TabbedPaneTab.prototype.get tabElement): (WebInspector.TabbedPaneTab.prototype.get measuredWidth): (WebInspector.TabbedPaneTab.prototype.get width): (WebInspector.TabbedPaneTab.prototype.set width): (WebInspector.TabbedPaneTab.prototype._createTabElement): (WebInspector.TabbedPaneTab.prototype._measure): (WebInspector.TabbedPaneTab.prototype._tabSelected): (WebInspector.TabbedPaneTab.prototype._tabClosed): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tabbed-pane .tabbed-pane-header-contents): * inspector/front-end/tabbedPane.css: Added. 2011-12-22 Chris Fleizach AX: attributed strings do not include AXHeading information when a link is contained within the heading https://bugs.webkit.org/show_bug.cgi?id=75059 Reviewed by Darin Adler. An attributed string should contain the heading level of an ancestor node if it exists. This change allows the ancestor to be higher up in the hierarchy than just the direct parent. Test: platform/mac/accessibility/heading-and-link-attributed-string.html * accessibility/mac/WebAccessibilityObjectWrapper.mm: (AXAttributeStringSetHeadingLevel): 2011-12-22 Chris Fleizach AX: Title attribute should not be used in AXTitle https://bugs.webkit.org/show_bug.cgi?id=75027 Reviewed by Darin Adler. Accessibility has been incorrectly exposing the title attribute through AXTitle. The title attribute better corresponds with a help tag for accessibility clients. Test: platform/mac/accessibility/title-attribute-not-used-as-axtitle.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): Don't use the title attribute. (WebCore::AccessibilityRenderObject::exposesTitleUIElement): Change the semantics around when a checkbox or radio button combines it's title ui element. The change makes it so that we will expose the title ui element when the control already has a label. Otherwise the title ui element is hidden, and it's text is used as the AXTitle for the control. (WebCore::AccessibilityRenderObject::titleUIElement): Change this method so it always returns the title ui element, and then leave it up to exposesTitleUIElement to determine whether it should be shown. * accessibility/AccessibilityTableCell.h: (WebCore::AccessibilityTableCell::exposesTitleUIElement): There's no special logic for table cells that have title ui elements, and we don't want to use the logic in AccessibilityRenderObject, hence the override here. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-12-22 Chris Fleizach AX: aria-describedby should not be part of AXDescription (should be a part of AXHelp) https://bugs.webkit.org/show_bug.cgi?id=75052 Reviewed by Darin Adler. According to the ARIA spec, aria-describedby is a more detailed description that is akin to help, rather than a description describing the actual object. As such, it makes more sense for this attribute to be exposed under help text. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::helpText): (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): 2011-12-22 Mariusz Grzegorczyk [EFL] Missing plugins support for efl port https://bugs.webkit.org/show_bug.cgi?id=44505 Reviewed by Anders Carlsson. Basic functionality of plugins for efl port. Template version, so no new tests are needed. * PlatformEfl.cmake: * plugins/PluginView.h: * plugins/efl/PluginDataEfl.cpp: Added. Copied from plugins/gtk/PluginDataGtk.cpp. (WebCore::PluginData::initPlugins): Fill mime/description/extension maps for plugins. (WebCore::PluginData::refresh): Refresh plugin's database. * plugins/efl/PluginPackageEfl.cpp: Added. Copied from plugins/gtk/PluginPackageGtk.cpp. (WebCore::PluginPackage::fetchInfo): Get info from plugin's library about name and mime supported. (WebCore::PluginPackage::NPVersion): (WebCore::PluginPackage::load): Load plugin. * plugins/efl/PluginViewEfl.cpp: Added. Copied from plugins/gtk/PluginViewGtk.cpp. (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleFocusInEvent): (WebCore::PluginView::handleFocusOutEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::setFocus): (WebCore::PluginView::show): (WebCore::PluginView::hide): (WebCore::PluginView::paint): (WebCore::PluginView::setParent): (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::setParentVisible): (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): (WebCore::PluginView::invalidateRect): (WebCore::PluginView::invalidateRegion): (WebCore::PluginView::forceRedraw): (WebCore::PluginView::platformStart): (WebCore::PluginView::platformDestroy): 2011-12-22 Pavel Podivilov Web Inspector: add "install source map" to JS source frame context menu. https://bugs.webkit.org/show_bug.cgi?id=74181 Reviewed by Pavel Feldman. Add "install source map" to source frame context menu when source map url is auto detected. * English.lproj/localizedStrings.js: * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping.prototype.load): (WebInspector.ClosureCompilerSourceMapping.prototype._parseSections): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.JavaScriptSourceFrame.prototype.cancelEditing): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): 2011-12-22 Branimir Lambov SVG: "filter" race condition may prevent SVG elements from being re-drawn https://bugs.webkit.org/show_bug.cgi?id=53088 Reviewed by Nikolas Zimmermann. Added code to explicitly invalidate data cached by filters applied to an invalidated object or one of its parents. Test: svg/filters/filter-refresh.svg * rendering/svg/RenderSVGResource.cpp: (WebCore::RenderSVGResource::removeFromFilterCache): (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): Added code to invalidate any filters applied to any of the parents. * rendering/svg/RenderSVGResource.h: * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Replaced a duplicate of RenderSVGResource:: markForLayoutAndParentResourceInvalidation with a call to the method. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientLayoutChanged): Removed filter invalidation code as this function would not be called if the filter isn't already invalidated. (WebCore::SVGResourcesCache::clientStyleChanged): (WebCore::SVGResourcesCache::clientUpdatedFromElement): Replaced filter invalidation with a markForLayoutAndParentResourceInvalidation call as all filters in the ancestor chain need to be invalidated. 2011-12-22 Leo Yang [BlackBerry] Upstream the BlackBerry change to ResourceHandle.h https://bugs.webkit.org/show_bug.cgi?id=75061 Reviewed by George Staikos. No functionality change to the existing code, no new tests. * platform/network/ResourceHandle.h: 2011-12-22 Alexandru Chiculita [CSS Shaders] Follow up bug to fix issues mentioned in comment 23 from bug 73317 https://bugs.webkit.org/show_bug.cgi?id=74840 Some comments were added on bug 73317 after the patch was reviewed and committed. This patch is fixing those issues, mostly about coding style and some missing comments. The initial patch had no explanation about the feature in the ChangeLog, so I'm including the description in this patch: CSS Shaders allow a designer to use a pair of WebGL vertex and fragment shaders to alter the final rendering of a specific element. The navigator will render the element inside a texture and map it to a mesh. The mesh is formed by equal sized quads, that depending on the mesh style, attached or detached, can be stitched or separated. The number of quads can be changed from CSS. Usually the vertex shader is changing the vertices of the mesh, while the fragment shader affects only the color that is rendered to screen (for example lighting effects). More info about CSS Shaders can be found in the specification https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html Also a good tutorial is published here http://www.adobe.com/devnet/html5/articles/css-shaders.html Initially we are using the software filter effects pipeline. It uploads the image to the GPU, applies the shaders, reads it back to CPU and continues the rendering. The advantage of using the software pipeline is that it can be enabled on all the platforms that have WebGL support. The obvious disadvantage is performance: copies from CPU memory to GPU memory and the CPU will need to wait the GPU to finish before it could continue. In following patches the shaders will be integrated in the hardware accelerated pipeline, so that no copies and, most important, no waits will be required. Also, the new syntax counts total number of the lines and the columns, not just the additional lines and columns, so the minimum accepted and the default value is now 1 by 1. Reviewed by Nikolas Zimmermann. Some tests were updated for the default mesh size change. * css/CSSParser.cpp: Only accept non-zero positive int values for mesh sizes. (WebCore::CSSParser::parseCustomFilter): * css/CSSStyleSelector.cpp: Updated the default mesh size to be 1 column with 1 line. (WebCore::CSSStyleSelector::createCustomFilterOperation): * loader/cache/CachedShader.cpp: (WebCore::CachedShader::shaderString): Corrected the CachedShader to use a StringBuilder. Also there was an incorrect cast to bool, which resulted from a copy/paste from CachedScript which still has both same issues. (WebCore::CachedShader::data): * loader/cache/CachedShader.h: * platform/graphics/filters/CustomFilterMesh.cpp: (WebCore::MeshGenerator::MeshGenerator): (WebCore::MeshGenerator::verticesCount): (WebCore::MeshGenerator::generateAttachedMesh): (WebCore::MeshGenerator::generateDetachedMesh): (WebCore::CustomFilterMesh::CustomFilterMesh): * platform/graphics/filters/CustomFilterMesh.h: (WebCore::CustomFilterMesh::create): * platform/graphics/filters/CustomFilterShader.cpp: (WebCore::CustomFilterShader::CustomFilterShader): Exploded the body of the constructor into smaller helper functions. (WebCore::CustomFilterShader::compileShader): (WebCore::CustomFilterShader::linkProgram): (WebCore::CustomFilterShader::initializeParameterLocations): * platform/graphics/filters/CustomFilterShader.h: * platform/graphics/filters/FECustomFilter.cpp: (WebCore::orthogonalProjectionMatrix): Passing a TransformationMatrix by reference to be filled with the result matrix, instead of returning it by value. Also changed the name of the method. (WebCore::FECustomFilter::FECustomFilter): (WebCore::FECustomFilter::platformApplySoftware): Created some helper functions to make this method shorter. (WebCore::FECustomFilter::initializeContext): (WebCore::FECustomFilter::resizeContext): (WebCore::FECustomFilter::bindVertexAttribute): (WebCore::FECustomFilter::bindProgramAndBuffers): * platform/graphics/filters/FECustomFilter.h: 2011-12-12 Pavel Podivilov Web Inspector: fix source map url resolving. https://bugs.webkit.org/show_bug.cgi?id=74305 Reviewed by Pavel Feldman. Also fix the bug with repeated source urls in mapping sections. * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.sources): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap): (WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping): * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2011-12-09 Pavel Podivilov Web Inspector: auto detect source map url. https://bugs.webkit.org/show_bug.cgi?id=74088 Reviewed by Pavel Feldman. Check to see if "X-SourceMap" HTTP response header was sent with script resource. Header value will be used as auto suggestion for source map url in UI. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): 2011-12-22 Kentaro Hara Change the build flow of AppleWebKit to use the [Supplemental] IDL https://bugs.webkit.org/show_bug.cgi?id=74900 Reviewed by Adam Barth. This is the final step for bug 74599. This patch changes the build flow of DerivedSources.make as follows, and thus enable the [Supplemental] IDL. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * DerivedSources.make: Described the build flow as described above. Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp which are generated by the IDL files. 2011-12-22 Eric Uhrhane [filesystem] Remove old filesystem naming restrictions https://bugs.webkit.org/show_bug.cgi?id=62813 Reviewed by David Levin. * fileapi/DOMFilePath.cpp: (WebCore::DOMFilePath::isValidPath): Replace strict restrictions with minimal safety [no files named "." or "..", no use of '\\' or '\0' in paths, no use of '/' in file names]. 2011-12-22 Greg Billock [Coverity] Address use-after-free report in MemoryCache https://bugs.webkit.org/show_bug.cgi?id=74970 Reviewed by Eric Seidel. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::revalidationSucceeded): 2011-12-22 Tom Sepez XSLT-created HTML documents do not inherit first party for cookies from originally loaded XML. https://bugs.webkit.org/show_bug.cgi?id=74757 Reviewed by Alexey Proskuryakov. Tests: http/tests/security/cookies/first-party-cookie-allow-xslt.xml http/tests/security/cookies/third-party-cookie-blocking-xslt.xml * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): 2011-12-22 Daniel Jalkut WebKit editing throws exception when monochrome color dragged onto text https://bugs.webkit.org/show_bug.cgi?id=74775 Reviewed by Ryosuke Niwa. Handle non-RGB colorspace colors in the Mac platform drag manager. Fixes NSException thrown when dragging monochrome colors to contentEditable regions. Manual test added to trunk/ManualTests/drag-color-to-contenteditable.html * platform/mac/DragDataMac.mm: (WebCore::DragData::asColor): 2011-12-22 Peter Rybin Web Inspector: CodeGeneratorInspector.py: generate anonymous types. https://bugs.webkit.org/show_bug.cgi?id=74890 Reviewed by Yury Semikhatsky. Anonymous types are generated. Forward declarations are generated. In general it now generates C++ types for anonymous object types from JSON. It takes a name from the type declaration site, usually a parameter name. This all is explained in comments in generated file. Also all generated types now refer to other generated types in setter methods -- but this is commented out in generated code for now. All necessary forward declarations are also added. Anonymous enums are generated, but they are in comments too, because we didn't have solution about form the enums should have in C++ API. Internally: The change reorganizes type bindings — a polymorphous "code generator" object is factored out from binding. A helper class Writer is added to allow generating code with ajustable indentations and to support insertion points where additional code can be inserted retroactively. ForwardListener class is used for preparing necessary forward declarations. AdHocTypeContext conception is a speculative abstract class that is needed wherever anonymous type can emerge. * inspector/CodeGeneratorInspector.py: (fix_type_name.Result.output_comment): (Writer.__init__): (Writer.newline): (Writer.append): (Writer.newline_multiline): (Writer.append_multiline): (Writer.get_indented): (Writer): (Writer.insert_writer): (TypeBindings.create_named_type_declaration.Helper.write_doc): (TypeBindings.create_named_type_declaration.Helper): (TypeBindings.create_named_type_declaration.Helper.add_to_forward_listener): (TypeBindings.create_named_type_declaration): (TypeBindings.create_ad_hoc_type_declaration.Helper.write_doc): (TypeBindings.create_ad_hoc_type_declaration.Helper): (TypeBindings.create_ad_hoc_type_declaration.Helper.add_to_forward_listener): (TypeBindings.create_ad_hoc_type_declaration): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.register_use): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.generate_type_builder.String): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.register_use): (TypeBindings.create_type_declaration_.PlainString.get_code_generator): (TypeBindings.create_type_declaration_.PlainString.get_in_c_type_text.name): (TypeBindings.create_type_declaration_.PlainString): (TypeBindings.create_type_declaration_): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder): (AdHocTypeContextImpl.__init__): (AdHocTypeContextImpl.get_type_name_fix.NameFix): (AdHocTypeContextImpl.get_type_name_fix.NameFix.output_comment): (AdHocTypeContextImpl.get_type_name_fix): (AdHocTypeContextImpl): (AdHocTypeContextImpl.call_generate_type_builder): (generate_forward_declaration): (register_use): (get_in_c_type_text): (reduce_to_raw_type): (PlainObjectBinding.get_code_generator): (CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix.NameFix): (CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix.NameFix.output_comment): (CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix): (CodeGenerator.generate_type_builder.AdHocTypeContext): (CodeGenerator.generate_type_builder.AdHocTypeContext.call_generate_type_builder): (CodeGenerator.generate_type_builder): (CodeGenerator): (CodeGenerator.register_use): (RawTypesBinding.get_code_generator): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding): (RawTypesBinding.reduce_to_raw_type): (TypeData.__init__): (TypeData.get_json_type): (resolve_param_type): (Generator.go): (Generator.process_event.NoOpForwardListener): (Generator.process_event.NoOpForwardListener.add_type_data): (Generator.process_event.AdHocTypeContext.get_type_name_fix.NameFix): (Generator.process_event.AdHocTypeContext.get_type_name_fix.NameFix.output_comment): (Generator.process_event.AdHocTypeContext.get_type_name_fix): (Generator.process_event.AdHocTypeContext): (Generator.process_event.AdHocTypeContext.call_generate_type_builder): (Generator.process_event): (Generator.process_types.ForwardListener): (Generator.process_types.ForwardListener.add_type_data): (Generator.process_types.generate_all_domains_code.namespace_lazy_generator): (Generator.process_types.generate_all_domains_code): (Generator.process_types.call_type_builder): (Generator.process_types.generate_forward_callback): (Generator): (Generator.process_types): (flatten_list.fill_recursive): (flatten_list): 2011-12-22 Hans Muller Onloadend event is not supported in XMLHttpRequest https://bugs.webkit.org/show_bug.cgi?id=40952 Reviewed by Julien Chaffraix. Added support for the loadend ProgressEvent to XMLHttpRequest and XMLHttpRequestUpload. A new method, dispatchEventAndLoadEnd(), was added to XMLHttpRequestProgressEventThrottle and XMLHttpRequestUpload to foolproof the common case of dispatching a load, abort, or error event followed by a loadend event. Tests: http/tests/xmlhttprequest/onloadend-event-after-abort.html http/tests/xmlhttprequest/onloadend-event-after-error.html http/tests/xmlhttprequest/onloadend-event-after-load.html http/tests/xmlhttprequest/onloadend-event-after-sync-requests.html http/tests/xmlhttprequest/upload-onloadend-event-after-abort.html http/tests/xmlhttprequest/upload-onloadend-event-after-load.html http/tests/xmlhttprequest/upload-onloadend-event-after-sync-requests.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::callReadyStateChangeListener): (WebCore::XMLHttpRequest::abort): (WebCore::XMLHttpRequest::networkError): (WebCore::XMLHttpRequest::abortError): (WebCore::XMLHttpRequest::didSendData): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventAndLoadEnd): * xml/XMLHttpRequestProgressEventThrottle.h: * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::dispatchEventAndLoadEnd): * xml/XMLHttpRequestUpload.h: * xml/XMLHttpRequestUpload.idl: 2011-12-22 Mark Pilgrim [FileSystem API] Entry.getMetadata successCallback is required https://bugs.webkit.org/show_bug.cgi?id=69638 Reviewed by Eric Seidel. Test: fast/filesystem/simple-required-arguments-getmetadata.html * fileapi/Entry.idl: remove [Optional] flag from successCallback parameter 2011-12-22 Ilya Tikhonovsky Unreviewed, rolling out r103405. http://trac.webkit.org/changeset/103405 https://bugs.webkit.org/show_bug.cgi?id=74088 it broke WorkerDevToolsSanityTest.InspectSharedWorker * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.searchInContent): 2011-12-21 Darin Adler Make ~CSSParserSelector use Vector https://bugs.webkit.org/show_bug.cgi?id=73782 Reviewed by Alexey Proskuryakov. * css/CSSParserValues.cpp: (WebCore::CSSParserSelector::~CSSParserSelector): Use Vector so we don't have to call leakPtr or deleteAllValues. 2011-12-21 Yosifumi Inoue [Forms] Selection change by type-ahead doesn't fire 'change' event https://bugs.webkit.org/show_bug.cgi?id=74590 Reviewed by Kent Tamura. This patch changes when onchange event fired in select element for: 1 Fire onchange event for type ahead selection. 2 Don't fire onchange event for Enter key. We've already fired onchange event for cursor key and type ahead selection. So, onchange for Enter key is redundant. This behavior is compatible to IE(9.0.8112.16421) and Opera(9.80) on Windows. FF(8.01) doesn't fire onchange by cursor key selection change and type ahead. FF requires Enter key press to fire onchange event. Test: fast/forms/select/menulist-type-ahead-find.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Don't fire onchange event for Entry key. (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when calling selectOption method. 2011-12-21 Darin Adler Tweak and comment some transform-related code https://bugs.webkit.org/show_bug.cgi?id=68670 Reviewed by Daniel Bates. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): Added a FIXME about additional overhead paid here when the scale factor is 2x. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow): Added a FIXME about this check possibly being wrong, and also changed the local vairable name so the check need not stretch over multiple lines. 2011-12-21 Kent Tamura Change the item type of Document::m_formElementsWithState from Element* to HTMLFormControlElementWithState*. https://bugs.webkit.org/show_bug.cgi?id=74998 Reviewed by Andreas Kling. No new tests. Just refactoring. * dom/Document.cpp: (WebCore::Document::formElementsState): Use HTMLFormControlElementWithState*. * dom/Document.h: (WebCore::Document::registerFormElementWithState): Change the argument type. (WebCore::Document::unregisterFormElementWithState): ditto. (WebCore::Document::formElements): Renamed from getFormElements(). * dom/Element.h: Removed shouldSaveAndRestoreFormControlState(), saveFormControlState(), and restoreFormControlState() because they are not called for Element anymore. * html/HTMLFormControlElement.h: - Make formControlName() and formControlType() public. They are called from Document class. - Make shouldSaveAndRestoreFormControlState() public, and non-virtual. This is called from Document class, and no other classes override this. (WebCore::HTMLFormControlElementWithState::saveFormControlState): Moved from Element. (WebCore::HTMLFormControlElementWithState::restoreFormControlState): ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateCheckedRadioButtons): Use HTMLFormControlElementWithState* instead of Element*. 2011-12-21 Alexandre Elias [chromium] Always use border texels on platforms using pageScaleDelta https://bugs.webkit.org/show_bug.cgi?id=74226 Reviewed by James Robinson. On platforms where the root layer can be zoomed in at draw time (pageScaleDelta), we want to turn on border texels in order for scaling to use GL_LINEAR instead of GL_NEAREST. No new tests. (Flag flip.) * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdate): 2011-12-21 Dale Curtis [chromium] Scale audio, video tags in MediaDocument to fit in window. https://bugs.webkit.org/show_bug.cgi?id=73948 Add CSS max-height: 100%, max-width: 100% settings to the audio and video tags when in MediaDocuments. Reviewed by Eric Seidel. Test: media/video-scales-in-media-document.html * css/mediaControlsChromium.css: (audio:-webkit-full-page-media, video:-webkit-full-page-media): 2011-12-21 Konrad Piascik Implement the JavaScriptCore bindings for eventListenerHandlerLocation https://bugs.webkit.org/show_bug.cgi?id=74313 Reviewed by Eric Seidel. Implemented the JavaScriptCore binding to allow Web Inspector to show the function name and line number for an event listener in the Elements panel. Tested by opening up a page which has a registered event listener in Safari and checking if the Elements panel script name and line number are present and clickable. * ForwardingHeaders/runtime/Executable.h: Added. * ForwardingHeaders/wtf/SegmentedVector.h: Added. * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): 2011-12-21 Chris Guan Upstream the Multipart feature in Blackberry port https://bugs.webkit.org/show_bug.cgi?id=73533 Reviewed by Rob Buis. I refactored Multipart code of Blackberry port. Moved Multipart into Blackerry network layer and removed the dependence of std::string. Initial upstream, no new test cases. * platform/network/blackberry/DeferredData.cpp: (WebCore::DeferredData::deferMultipartHeaderReceived): (WebCore::DeferredData::processHeaders): (WebCore::DeferredData::processDeferredData): * platform/network/blackberry/DeferredData.h: (WebCore::DeferredData::hasDeferredData): * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::notifyMultipartHeaderReceived): (WebCore::NetworkJob::handleNotifyMultipartHeaderReceived): (WebCore::NetworkJob::handleNotifyDataReceived): (WebCore::NetworkJob::handleNotifyClose): (WebCore::NetworkJob::startNewJobWithRequest): (WebCore::NetworkJob::sendResponseIfNeeded): (WebCore::NetworkJob::sendMultipartResponseIfNeeded): * platform/network/blackberry/NetworkJob.h: 2011-12-21 Eric Carlson Fix text track cue font size and colors https://bugs.webkit.org/show_bug.cgi?id=75051 Reviewed by Darin Adler. No new tests, updated media/track/track-cue-rendering.html for the changes. * css/mediaControls.css: (video::-webkit-media-text-track-container): Match WebVTT spec. (video::-webkit-media-text-track-display): Ditto. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateSizes): Change font size from 4% of the video height to 5% as per the spec. Don't enforce a minimum size. 2011-12-21 Andreas Kling Unreviewed, rolling out r103473. http://trac.webkit.org/changeset/103473 https://bugs.webkit.org/show_bug.cgi?id=74991 Overestimated my superpowers a bit here. * dom/Element.cpp: (WebCore::Element::attributeChanged): (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): * dom/Element.h: (WebCore::Element::updateId): (WebCore::Element::willModifyAttribute): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): * dom/Node.h: * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): (WebCore::HTMLAppletElement::insertedIntoDocument): (WebCore::HTMLAppletElement::removedFromDocument): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): (WebCore::HTMLEmbedElement::removedFromDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): (WebCore::HTMLImageElement::removedFromDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: 2011-12-21 Simon Fraser Clean up RenderLayer code that applies filters and transforms https://bugs.webkit.org/show_bug.cgi?id=75032 This also fixes: Nested filters not working as expected https://bugs.webkit.org/show_bug.cgi?id=75029 Filter region is computed incorrectly https://bugs.webkit.org/show_bug.cgi?id=74889 Reviewed by James Robinson. RenderLayer::paintLayer() had this confusing behavior where, for transforms, it would change the CTM and then re-enter the method with a bit set. This was partially, but incorrectly copied for filters, so things like nested filters didn't work, and the case of a filter + transform was confused. Clean up by making RenderLayer::paintLayer() be a fairly simple method that handles the re-entering with bit set, for both transforms and filters. The bulk of the code in RenderLayer::paintLayer() is now in RenderLayer::paintLayerContents(). There is no behavior change for transforms. There are two fixes for filters. First, instead of just using the layer size to compute the bounds of the filtered region, use transparencyClipBox() which already takes descendents, box decorations etc into account (it's what we use for opacity). Some cleanup of the coordinate math, and separation from transforms code was also achieved. Second, make sure we toggle off the PaintLayerAppliedFilters bit (which was renamed for clarity) for sublayers, so that sublayers paint their filters correctly. Tests: css3/filters/filter-region.html css3/filters/nested-filters.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::updateFilterBackingStore): * rendering/RenderLayer.h: 2011-12-21 Per-Erik Brodin Discard event data not followed by an empty line before eof when parsing an event-stream https://bugs.webkit.org/show_bug.cgi?id=68833 Reviewed by Alexey Proskuryakov. Test: http/tests/eventsource/eventsource-eof.html * page/EventSource.cpp: (WebCore::EventSource::didFinishLoading): (WebCore::EventSource::parseEventStreamLine): * page/EventSource.h: 2011-12-21 Andreas Kling Automate elements' registration as document namedItem/extraNamedItem. Reviewed by Antti Koivisto. Remove caching of the "id" and "name" attributes on applet, embed, form, image and object elements. We were caching them to keep the document's map of named and "extra named" (named by id) item counts in sync. Instead, add a hook to Element::willModifyAttribute() that detects when the attributes are being changed and handle the registration/unregistration automatically if the element returns true for shouldRegisterAsNamedItem() or shouldRegisterAsExtraNamedItem() respectively. This shrinks the elements by two AtomicStrings (8 or 16 bytes) each. IFrame elements retain the old mechanism for now, as there are some subtle differences to how that's handled. * dom/Node.h: (WebCore::Node::hasName): (WebCore::Node::setHasName): Cache whether we have a "name" attribute or not (1 bit on Node.) This is done in order to minimize the overhead added to Element's insertedIntoDocument() and removeFromDocument(). * dom/Element.cpp: (WebCore::Element::updateNamedItemRegistration): (WebCore::Element::updateExtraNamedItemRegistration): Added. Called when the "name" and "id" attributes are changed. Updates the document's named item maps accordingly. (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): Make sure updateName() is called in addition to updateId() when applicable. (WebCore::Element::attributeChanged): Update the Node's has-name flag as appropriate. * dom/Element.h: (WebCore::Element::shouldRegisterAsNamedItem): (WebCore::Element::shouldRegisterAsExtraNamedItem): Added. If an element returns true for these, it will be automatically registered with the document when the name/id attribute changes. (WebCore::Element::updateId): (WebCore::Element::updateName): Register/unregister from the document's named item maps as appropriate. (WebCore::Element::willModifyAttribute): Add updateName() hook in addition to the existing updateId() hook. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): Make sure updateName() is called when we're cloning the attributes from another element. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: Remove duplicated code that is now handled by Element. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): Use fastGetAttribute() since we no longer cache the name. 2011-12-21 Wyatt Carss Reviewed by Ryosuke Niwa. strong and b should be font-weight: bold, not bolder https://bugs.webkit.org/show_bug.cgi?id=56400 Test: fast/html/font-weight-bold-for-b-and-strong.html * css/html.css: (strong, b): 2011-12-21 Florin Malita Improper handling of foreignobjects nested in svg groups https://bugs.webkit.org/show_bug.cgi?id=69762 Reviewed by Nikolas Zimmermann. Tests: svg/foreignObject/repaint-rect-coordinates-expected.html svg/foreignObject/repaint-rect-coordinates.html * rendering/svg/RenderSVGForeignObject.h: (WebCore::RenderSVGForeignObject::objectBoundingBox): (WebCore::RenderSVGForeignObject::strokeBoundingBox): (WebCore::RenderSVGForeignObject::repaintRectInLocalCoordinates): Return local coordinates. 2011-12-21 Anders Carlsson Make it possible to use contents layers in scrollbars https://bugs.webkit.org/show_bug.cgi?id=75044 Reviewed by Simon Fraser. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange): (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange): Don't pass const GraphicsLayers to these member functions; we need to be able to mutate them. * platform/ScrollView.cpp: (positionScrollbarLayer): If the scrollbar layer has a contents layer, just update its contents rect. Otherwise, invalidate the scrollbar layer. 2011-12-21 Anders Carlsson Always reposition the scrollbar layers when the frame view size changes https://bugs.webkit.org/show_bug.cgi?id=75035 Reviewed by Darin Adler. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Remove the layersChanged check and unconditionally call positionScrollbarLayers(). This only worked by accident before because we were recreating horizontal and vertical scrollbars on every call. 2011-12-21 Michał Pakuła vel Rutka [EFL] Add 'Select All' option to context menus in WebKit-EFL. https://bugs.webkit.org/show_bug.cgi?id=74920 Reviewed by Eric Seidel. Enable 'Select All' option to context menus called on input fields in WebKit-EFL as it is enabled in GTK and QT ports. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): Add 'Select All' option. (WebCore::ContextMenuController::populate): Append 'Select All' item. (WebCore::ContextMenuController::checkOrEnableIfNeeded): Enable 'Select All' option. * platform/ContextMenuItem.h: Add 'Select All' option. * platform/LocalizationStrategy.h: Add constructor for 'Select All' option. * platform/LocalizedStrings.h: Add constructor for 'Select All' option. 2011-12-20 Adam Klein Make calls to willModifyAttribute and attributeChanged symmetrical https://bugs.webkit.org/show_bug.cgi?id=74987 Reviewed by Ryosuke Niwa. Previously, calls to Element::willModifyAttribute sometimes happened in one method while calls to Element::attributeChanged happened in another. This change makes them symmetrical for all the cases I know about: setAttribute, removeAttribute, setNamedItem, removeNamedItem. To accomplish this, NamedNodeMap::addAttribute, removeAttribute, and replaceAttribute have been reduced to their pure functionality of manipulating m_attributes, and their callers are left responsible for properly notifying the Element of the underlying changes. One other bit of refactoring was done: to simplify Element::setAttribute, it now dispatches to Element::removeAttributeInternal if the incoming value is null. No new tests, no change in behavior. * dom/Attribute.h: * dom/Element.cpp: (WebCore::Element::removeAttribute): (WebCore::Element::removeAttributeInternal): Added, sharing code between the two removeAttribute overloads. (WebCore::Element::setAttributeInternal): * dom/Element.h: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): (WebCore::NamedNodeMap::replaceAttribute): * svg/properties/SVGAnimatedPropertySynchronizer.h: Call Element::setAttribute unless the attribute is already present, and add a comment explaining why the code looks the way it does. 2011-12-21 Adrienne Walker Unreviewed, rolling out r103408. http://trac.webkit.org/changeset/103408 https://bugs.webkit.org/show_bug.cgi?id=75017 WorkerDevToolsSanityTest.InspectSharedWorker is failing (Requested by loislo_ on #webkit). * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.sources): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setCompilerSourceMapping): * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2011-12-21 Stephen White Fix CSS filters crash on zero-sized elements. https://bugs.webkit.org/show_bug.cgi?id=75020 Reviewed by Dean Jackson. Test: css3/filters/filter-empty-element-crash.html * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::inputContext): Protect against null ImageBuffer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): Protect against null GraphicsContext. 2011-12-21 Anders Carlsson Inform the scrolling coordinator when scrollbar layers come and go https://bugs.webkit.org/show_bug.cgi?id=75028 Reviewed by Andreas Kling and Simon Fraser. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer): (WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): 2011-12-20 Dmitry Lomov [Chromium] DatabaseTrackerChromium: iterating DatabaseSet races with Database disposal on worker thread https://bugs.webkit.org/show_bug.cgi?id=74554 Reviewed by David Levin. Covered by existing tests in fast/workers/storage. * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::NotifyDatabaseObserverOnCloseTask::create): (WebCore::NotifyDatabaseObserverOnCloseTask::performTask): (WebCore::NotifyDatabaseObserverOnCloseTask::isCleanupTask): (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask): (WebCore::DatabaseTracker::removeOpenDatabase): 2011-12-21 Eric Carlson HTMLMediaElement::configureTextTrackDisplay is unnecessary https://bugs.webkit.org/show_bug.cgi?id=74945 Reviewed by Darin Adler. Nothing to test, just removing redundant code. Correct behavior tested by media/track/track-cue-rendering.html and media/track/track-cue-nothing-to-render.html. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::configureTextTrackDisplay): Don't show and hide track, just call updateTextTrackDisplay and it will do the right thing. 2011-12-21 Anders Carlsson ScrollingCoordinator functions should take FrameView objects https://bugs.webkit.org/show_bug.cgi?id=75023 Reviewed by Sam Weinig. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::syncFrameViewGeometry): * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::setFrameViewScrollLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::updateRootLayerPosition): (WebCore::RenderLayerCompositor::ensureRootLayer): 2011-12-21 Anders Carlsson Get rid of ScrollableAreaClient https://bugs.webkit.org/show_bug.cgi?id=75021 Reviewed by Sam Weinig. The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects all the different responsibilities it currently has. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::FrameView): * page/ScrollingCoordinator.cpp: * page/ScrollingCoordinator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::ScrollableArea): * platform/ScrollableArea.h: * platform/ScrollableAreaClient.h: Removed. 2011-12-21 Anders Carlsson Don't recreate scrollbar layers whenever the frame view size changes https://bugs.webkit.org/show_bug.cgi?id=75018 Reviewed by Darin Adler and Simon Fraser. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): 2011-12-20 Andrey Kosyakov Web Inspector: [Extension API] refactor extension API build code, expose experimental APIs conditionally in chromium https://bugs.webkit.org/show_bug.cgi?id=74941 Reviewed by Pavel Feldman. * WebCore.gypi: * inspector/front-end/ExtensionAPI.js: (buildPlatformExtensionAPI.platformExtensionAPI): (buildPlatformExtensionAPI): (buildExtensionAPIInjectedScript): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): (window.addExtension): 2011-12-12 Pavel Podivilov Web Inspector: fix source map url resolving. https://bugs.webkit.org/show_bug.cgi?id=74305 Reviewed by Pavel Feldman. Also fix the bug with repeated source urls in mapping sections. * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.sources): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap): (WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping): * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2011-12-21 Renata Hodovan New renderer for SVGRectElement https://bugs.webkit.org/show_bug.cgi?id=65769 Rubber-stamped by Zoltan Herczeg. Change the return value of RenderSVGRect::renderName() from RenderSVGPath to RenderSVGRect. This is a follow-up patch of r101517 to correct the DRT output. * rendering/svg/RenderSVGRect.h: (WebCore::RenderSVGRect::renderName): 2011-12-21 Vsevolod Vlasov Web Inspector: TabbedPane should use tabElement width measuring to layout tab elements when width is too small to fit them. https://bugs.webkit.org/show_bug.cgi?id=75005 Reviewed by Pavel Feldman. Test: inspector/tabbed-pane-max-tab-width-calculation.html * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView.prototype.wasShown): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype._createTabElement): (WebInspector.TabbedPane.prototype.onResize): (WebInspector.TabbedPane.prototype._maybeMeasureAndUpdate): (WebInspector.TabbedPane.prototype._measureTab): (WebInspector.TabbedPane.prototype._updateWidths): (WebInspector.TabbedPane.prototype._calculateMaxWidth): (WebInspector.TabbedPaneTab): * inspector/front-end/inspector.css: (.tabbed-pane-header): (.tabbed-pane-header-tabs): (.tabbed-pane-header-tab): (.tabbed-pane-header-tab.measuring): (.tabbed-pane-header-tab.selected): * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tabbed-pane .tabbed-pane-header-tabs): 2011-12-09 Pavel Podivilov Web Inspector: auto detect source map url. https://bugs.webkit.org/show_bug.cgi?id=74088 Reviewed by Pavel Feldman. Check to see if "X-SourceMap" HTTP response header was sent with script resource. Header value will be used as auto suggestion for source map url in UI. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): 2011-12-21 Pierre Rossi [Qt] Mobile theme refinements https://bugs.webkit.org/show_bug.cgi?id=74727 Mostly to replace most of the rounded-rect-shaped controls with squircle-shaped ones. Reviewed by Kenneth Rohde Christiansen. No new tests needed. * platform/qt/RenderThemeQtMobile.cpp: (WebCore::drawControlBackground): (WebCore::painterScale): (WebCore::borderPen): (WebCore::StylePainterMobile::drawCheckableBackground): Toned down the gradient a bit. (WebCore::StylePainterMobile::findCheckBox): (WebCore::StylePainterMobile::drawRadio): (WebCore::StylePainterMobile::findRadio): (WebCore::StylePainterMobile::drawMultipleComboButton): increase spacing between the dots. (WebCore::StylePainterMobile::drawSimpleComboButton): attempt to improve readability. (WebCore::StylePainterMobile::getButtonImageSize): (WebCore::StylePainterMobile::findComboButton): (WebCore::StylePainterMobile::drawLineEdit): (WebCore::StylePainterMobile::findLineEdit): (WebCore::StylePainterMobile::drawPushButton): (WebCore::StylePainterMobile::findPushButton): (WebCore::StylePainterMobile::drawComboBox): (WebCore::StylePainterMobile::drawProgress): (WebCore::StylePainterMobile::drawSliderThumb): (WebCore::RenderThemeQtMobile::computeSizeBasedOnStyle): (WebCore::RenderThemeQtMobile::paintTextField): * platform/qt/RenderThemeQtMobile.h: 2011-12-21 Alexander Pavlov Web Inspector: CSSStyleSheet::cssRules can return 0 and InspectorStyleSheet dosen't check https://bugs.webkit.org/show_bug.cgi?id=74938 Prevent security checks when retrieving a just-added CSS rule from the "inspector stylesheet". Reviewed by Pavel Feldman. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::addRule): 2011-12-21 Renata Hodovan Fulfill FIXME in HTMLLinkElement.h. https://bugs.webkit.org/show_bug.cgi?id=74278 Rename isStyleSheetLoading() method to styleSheetIsLoading(). This new one has the correct grammar. Reviewed by Darin Adler. No new tests because the functionality remains the same. * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setDisabledState): (WebCore::HTMLLinkElement::styleSheetIsLoading): (WebCore::HTMLLinkElement::sheetLoaded): * html/HTMLLinkElement.h: 2011-12-21 Yosifumi Inoue [Forms] Add OVERRIDE to WebCore/html/*InputType.h https://bugs.webkit.org/show_bug.cgi?id=74996 Reviewed by Kent Tamura. No new tests. Changes are just for compilation. * html/BaseButtonInputType.h: Add OVERRIDE. * html/BaseCheckableInputType.h: Add OVERRIDE. * html/BaseDateAndTimeInputType.h: Add OVERRIDE. * html/BaseTextInputType.h: Add OVERRIDE. * html/ButtonInputType.h: Add OVERRIDE. * html/CheckboxInputType.h: Add OVERRIDE. * html/ColorInputType.h: Add OVERRIDE. * html/DateInputType.h: Add OVERRIDE. * html/DateTimeInputType.h: Add OVERRIDE. * html/DateTimeLocalInputType.h: Add OVERRIDE. * html/EmailInputType.h: Add OVERRIDE. * html/FileInputType.h: Add OVERRIDE. * html/HiddenInputType.h: Add OVERRIDE. * html/ImageInputType.h: Add OVERRIDE. * html/IsIndexInputType.h: Add OVERRIDE. * html/MonthInputType.h: Add OVERRIDE. * html/NumberInputType.h: Add OVERRIDE. * html/PasswordInputType.h: Add OVERRIDE. * html/RadioInputType.h: Add OVERRIDE. * html/RangeInputType.h: Add OVERRIDE. * html/ResetInputType.h: Add OVERRIDE. * html/SearchInputType.h: Add OVERRIDE. * html/SubmitInputType.h: Add OVERRIDE. * html/TelephoneInputType.h: Add OVERRIDE. * html/TextFieldInputType.h: Add OVERRIDE. * html/TextInputType.h: Add OVERRIDE. * html/TimeInputType.h: Add OVERRIDE. * html/URLInputType.h: Add OVERRIDE. * html/WeekInputType.h: Add OVERRIDE. 2011-12-21 Matt Falkenhagen Add all ICU languages to LocaleToScriptMappingDefault.cpp https://bugs.webkit.org/show_bug.cgi?id=67274 Reviewed by Kent Tamura. This better mimics the behavior of LocaleToScriptMappingICU.cpp. ICU languages from ICU 3.6 are added. Also, script suffix in locale is handled, so for example "fa_Latn" is mapped to Latin while "fa" is mapped to Arabic. No new tests, there is no visible effect until default per-script fonts are added to non-ICU ports (alternatively, we could extend DumpRenderTree to support overridePreference for per-script fonts as in bug 71110). * platform/text/LocaleToScriptMappingDefault.cpp: (WebCore::getScriptCode): add script name to script code mapping (WebCore::localeToScriptCodeForFontSelection): add ICU languages to map 2011-12-20 Mary Wu Upstream PageClientBlackBerry.h into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74169 Reviewed by Daniel Bates. Initial upstream, no new tests. * platform/blackberry/PageClientBlackBerry.h: Added. 2011-12-20 Mary Wu Upstream PlatformMouseEvent and LocalizedStrings into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74383 Reviewed by Daniel Bates. Other Main Contributors: Rob Buis Mike Fenton Initial upstream, no new tests. * PlatformBlackBerry.cmake: Modified to rename Localizations.cpp to LocalizedStringsBlackBerry.cpp * platform/blackberry/LocalizedStringsBlackBerry.cpp: Added. * platform/blackberry/PlatformMouseEventBlackBerry.cpp: Added. 2011-12-20 Peter Rybin Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type. https://bugs.webkit.org/show_bug.cgi?id=69366 Reviewed by Pavel Feldman. Generator fixed and all usages are changed manually. * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType): (RawTypes.BaseType.get_output_argument_prefix): (RawTypes.Object.get_output_argument_prefix): (RawTypes.Array.get_output_argument_prefix): (RawTypes): (Generator.process_command): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionLocation): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: 2011-12-20 Eric Penner [chromium] m_triggerIdlePaints not reset after a compositeAndReadback https://bugs.webkit.org/show_bug.cgi?id=74974 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::compositeAndReadback): 2011-12-20 David Levin Move misplaced assert in SQLiteStatement.cpp https://bugs.webkit.org/show_bug.cgi?id=74975 Reviewed by Dmitry Titov. The test is coming with bug 74666. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::step): If a database was interrupted before the prepare method was called, then m_isPrepared will be false, so I moved the assert to be after the check for interrupted. 2011-12-20 Eric Carlson WebVTT cues sometimes render when they should not https://bugs.webkit.org/show_bug.cgi?id=74873 Not reviewed: update Chromium to pass new test added in r103371. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::updateTextTrackDisplay): 2011-12-20 Andreas Kling HTMLOptionsCollection: Remove incorrect FIXME about having a base class. Reviewed by Alexey Proskuryakov. HTMLOptionsCollection should indeed inherit from HTMLCollection according to current HTML5, so remove the comment saying we should change that. Spec: http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection * html/HTMLOptionsCollection.idl: 2011-12-20 Florin Malita td element ignores zero width/height input element https://bugs.webkit.org/show_bug.cgi?id=74636 Reviewed by Kent Tamura. Test: fast/forms/input-zero-width.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::computePreferredLogicalWidths): Relax the attribute test to allow setting widths == 0. 2011-12-20 Adam Klein Avoid unnecessary work when removing attributes from an element https://bugs.webkit.org/show_bug.cgi?id=74953 Reviewed by Ryosuke Niwa. Various codepaths in Element and NamedNodeMap repeatedly search through the list of attributes during a single operation. To avoid this, I've added new getters to NamedNodeMap that return indices rather than Attribute*s (they return WTF::notFound if no match is found). These new methods are now used during removeAttribute operations, as well as setAttribute and NamedNodeMap::setNamedItem (along with a new replaceAttribute helper method). The other optimization here involves the creation/destruction of never-references Attr nodes. This is now avoided by calling NamedNodeMap::removeAttribute directly instead of going through NamedNodeMap::removeNamedItem. As a cleanup after the above changes, the ExceptionCode argument is gone from Element::removeAttribute and friends (it was never set previously). The bulk of the files mentioned below are simply updating callers to these methods. No new tests, no change in behavior expected. * dom/DatasetDOMStringMap.cpp: (WebCore::DatasetDOMStringMap::deleteItem): * dom/Element.cpp: (WebCore::Element::removeAttribute): (WebCore::Element::setBooleanAttribute): (WebCore::Element::removeAttributeNS): (WebCore::Element::setAttribute): (WebCore::Element::setAttributeInternal): * dom/Element.h: * dom/Element.idl: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::getAttributeItemIndexSlowCase): (WebCore::NamedNodeMap::replaceAttribute): (WebCore::NamedNodeMap::removeAttribute): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::getAttributeItem): (WebCore::NamedNodeMap::getAttributeItemIndex): (WebCore::NamedNodeMap::removeAttribute): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::executeApply): * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setType): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::removeAttribute): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): 2011-12-20 Eric Carlson WebVTT cues sometimes render when they should not https://bugs.webkit.org/show_bug.cgi?id=74873 Reviewed by Darin Adler. Test: media/track/track-cue-nothing-to-render.html * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::updateTextTrackDisplay): Don't return early if the current cue is empty so the previous cue is removed. 2011-12-20 Ami Fischman Don't crash on the second time VideoLayerChromium::createCCVideoLayer() is called https://bugs.webkit.org/show_bug.cgi?id=74963 Reviewed by James Robinson. Manually tested by force-dropping the layer tree in CCLayerTreeHost::didBecomeInvisibleOnImplThread(). Crashed before the fix, doesn't crash after. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::~VideoLayerChromium): (WebCore::VideoLayerChromium::createCCLayerImpl): * platform/graphics/chromium/VideoLayerChromium.h: 2011-12-20 Scott Graham wouldTaintOrigin m_cleanURLs cache grows very large when data urls used https://bugs.webkit.org/show_bug.cgi?id=74957 Reviewed by Kenneth Russell. No new tests, but memory usage of CanvasRenderingContext::m_cleanURLs is reduced. * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): 2011-12-20 Greg Billock Change adoptPtr(new ...) to ...::create in Page.cpp https://bugs.webkit.org/show_bug.cgi?id=74457 Reviewed by Darin Adler. * dom/DeviceMotionController.cpp: (WebCore::DeviceMotionController::create): * dom/DeviceMotionController.h: * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::create): * dom/DeviceOrientationController.h: * editing/FrameSelection.cpp: (WebCore::DragCaretController::create): * editing/FrameSelection.h: * history/BackForwardController.cpp: (WebCore::BackForwardController::create): * history/BackForwardController.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::create): * inspector/InspectorController.h: * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::create): * loader/ProgressTracker.h: * notifications/NotificationController.cpp: (WebCore::NotificationController::create): * notifications/NotificationController.h: * page/Chrome.cpp: (WebCore::Chrome::create): * page/Chrome.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::create): * page/ContextMenuController.h: * page/DragController.cpp: (WebCore::DragController::create): * page/DragController.h: * page/FocusController.cpp: (WebCore::FocusController::create): * page/FocusController.h: * page/GeolocationController.cpp: (WebCore::GeolocationController::create): * page/GeolocationController.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::initGroup): (WebCore::Page::speechInput): * page/PageGroup.cpp: (WebCore::PageGroup::create): * page/PageGroup.h: * page/Settings.cpp: (WebCore::Settings::create): * page/Settings.h: * page/SpeechInput.cpp: (WebCore::SpeechInput::create): * page/SpeechInput.h: 2011-12-20 Ryosuke Niwa Mac build fix after r103354. * platform/mac/ScrollAnimatorMac.mm: (systemUptime): 2011-12-20 Anders Carlsson Add ScrollableArea::contentsResized and have it call the scroll animator https://bugs.webkit.org/show_bug.cgi?id=74966 Reviewed by Sam Weinig. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): (WebCore::FrameView::contentsResized): * page/FrameView.h: * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::contentsResized): * platform/ScrollableArea.h: 2011-12-20 Simon Fraser requestAnimationFrame on Mac fires at 60fps even when drawing is much slower https://bugs.webkit.org/show_bug.cgi?id=74964 Reviewed by Chris Marrin. On Mac requestAnimationFrame uses a CVDisplayLink, sending notifications from the display link thread to the main thread that the display link fired. However, there was no throttling on these notifications; if processing an event took a long time, notifications would pile up, and then get handled after the slow event completed. This would cause JS animations which animate by changing style to report 60fps when their display framerate was much lower. Fix by throttling notifications from the display link thread to the web thread; if the previous event hasn't completed yet, don't send any new ones. No new tests, since testing this runtime behavior is hard. * platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread): (WebCore::DisplayRefreshMonitor::notifyClients): Factored out of the static refreshDisplayOnMainThread method so we can use 'this'. * platform/graphics/DisplayRefreshMonitor.h: * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): 2011-12-20 Greg Billock [Coverity] Fix leak in V8HTMLDocument https://bugs.webkit.org/show_bug.cgi?id=74943 Reviewed by Adam Barth. * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::openCallback): 2011-12-20 Sailesh Agrawal Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=61144 Reviewed by Beth Dakin. At a high level the main changes are: - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff. - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing No new tests. Just refactoring. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/chromium/ScrollAnimatorChromiumMac.h: Removed. * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarPainterPaintTrack): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/NSScrollerImpDetails.h: (WebCore::isScrollbarOverlayAPIAvailable): * platform/mac/NSScrollerImpDetails.mm: Added. (WebCore::isScrollbarOverlayAPIAvailable): (WebCore::recommendedScrollerStyle): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (scrollbarPainterForScrollbar): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer): (WebCore::ScrollbarThemeMac::ScrollbarThemeMac): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasButtons): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): 2011-12-20 Tony Chang sizeof(RenderStyle) is 64 instead of 56 on Windows (x86) https://bugs.webkit.org/show_bug.cgi?id=74876 Reviewed by Ryosuke Niwa. Move bit fields into a new class and use unsigned for all types so we align at 4 byte bounds. Also move the initializers into the header file (has the side benefit of not needing to duplicate the initializers in 3 places). Enable the compile assert on Windows. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::affectedByUncommonAttributeSelectors): (WebCore::RenderStyleBitfields::setAffectedByUncommonAttributeSelectors): (WebCore::RenderStyleBitfields::unique): (WebCore::RenderStyleBitfields::setUnique): (WebCore::RenderStyleBitfields::affectedByEmpty): (WebCore::RenderStyleBitfields::emptyState): (WebCore::RenderStyleBitfields::setEmptyState): (WebCore::RenderStyleBitfields::childrenAffectedByFirstChildRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByFirstChildRules): (WebCore::RenderStyleBitfields::childrenAffectedByLastChildRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByLastChildRules): (WebCore::RenderStyleBitfields::childrenAffectedByDirectAdjacentRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByDirectAdjacentRules): (WebCore::RenderStyleBitfields::childrenAffectedByForwardPositionalRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByForwardPositionalRules): (WebCore::RenderStyleBitfields::childrenAffectedByBackwardPositionalRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByBackwardPositionalRules): (WebCore::RenderStyleBitfields::firstChildState): (WebCore::RenderStyleBitfields::setFirstChildState): (WebCore::RenderStyleBitfields::lastChildState): (WebCore::RenderStyleBitfields::setLastChildState): (WebCore::RenderStyleBitfields::childIndex): (WebCore::RenderStyleBitfields::setChildIndex): (WebCore::RenderStyleBitfields::setHasExplicitlyInheritedProperties): (WebCore::RenderStyleBitfields::hasExplicitlyInheritedProperties): 2011-12-20 Tony Chang [chromium] enable WPO for WebCore libs in official builds https://bugs.webkit.org/show_bug.cgi?id=74947 Reviewed by James Robinson. Also move enable_wexit_time_destructors to the top level variables so we don't have to add it to all targets. * WebCore.gyp/WebCore.gyp: 2011-12-20 Anders Carlsson Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions https://bugs.webkit.org/show_bug.cgi?id=74951 Reviewed by Sam Weinig. * WebCore.exp.in: * page/EventHandler.cpp: (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::updateMouseEventTargetNode): * page/FocusController.cpp: (WebCore::FocusController::setActive): * page/FrameView.cpp: (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): (WebCore::FrameView::notifyPageThatContentAreaWillPaint): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::contentAreaWillPaint): (WebCore::ScrollableArea::mouseEnteredContentArea): (WebCore::ScrollableArea::mouseExitedContentArea): (WebCore::ScrollableArea::mouseMovedInContentArea): (WebCore::ScrollableArea::mouseEnteredScrollbar): (WebCore::ScrollableArea::mouseExitedScrollbar): (WebCore::ScrollableArea::contentAreaDidShow): (WebCore::ScrollableArea::contentAreaDidHide): * platform/ScrollableArea.h: * platform/ScrollableAreaClient.h: * platform/Scrollbar.cpp: (WebCore::Scrollbar::mouseEntered): (WebCore::Scrollbar::mouseExited): (WebCore::Scrollbar::mouseUp): 2011-12-20 Jarred Nicholls Perform case insensitive matching on MIME types in XHR https://bugs.webkit.org/show_bug.cgi?id=74800 Perform case insensitive matching on responseMIMEType() in didReceiveData(). Workaround case sensitive matching by DOMImplementation::isXMLMIMEType() in responseIsXML(). Reviewed by Darin Adler. Tests: http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case.html http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData): (WebCore::XMLHttpRequest::responseIsXML): 2011-12-20 Adam Klein Remove no-op DOMAttr* event dispatch methods from Element https://bugs.webkit.org/show_bug.cgi?id=74946 Reviewed by Darin Adler. The removed methods had their bodies #if 0'd out, so this should have no effect on anything. * dom/Element.cpp: * dom/Element.h: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): 2011-12-20 Anders Carlsson ScrollableArea should have an optional ScrollableAreaClient https://bugs.webkit.org/show_bug.cgi?id=74949 Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * page/FrameView.cpp: (WebCore::scrollableAreaClient): (WebCore::FrameView::FrameView): * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::scrollableAreaClientForFrame): * page/ScrollingCoordinator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::ScrollableArea): * platform/ScrollableArea.h: * platform/ScrollableAreaClient.h: Added. (WebCore::ScrollableAreaClient::~ScrollableAreaClient): (WebCore::ScrollableAreaClient::ScrollableAreaClient): 2011-12-19 Adam Klein Rename Element::setAttributeMap to parserSetAttributeMap and limit its use to the parser https://bugs.webkit.org/show_bug.cgi?id=74885 Reviewed by Ryosuke Niwa. Element::setAttributeMap is currently used by the parser in cases where a NamedNodeMap of attributes has already been allocated and transfers ownership to the Element. Other uses in WebCore don't have this ownership-transfer requirement, and so are more clearly expressed with normal setAttribute calls. Eliminating non-parser callers allows the code to make safe assumptions about the state of the Element it's called on: no need to worry about, e.g., updating the id in the document's cache or enqueueing mutation records. No new tests, no change in behavior expected. * dom/Element.cpp: (WebCore::Element::parserSetAttributeMap): Renamed, added assertions to make sure it's not called unexpectedly, update comments. * dom/Element.h: * html/HTMLViewSourceDocument.cpp: Use setAttribute instead of setAttributeMap. (WebCore::HTMLViewSourceDocument::createContainingTable): (WebCore::HTMLViewSourceDocument::addSpanWithClassName): (WebCore::HTMLViewSourceDocument::addLine): (WebCore::HTMLViewSourceDocument::addBase): (WebCore::HTMLViewSourceDocument::addLink): * html/parser/HTMLConstructionSite.cpp: Reference new name. (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): Use setAttribute instead of setAttributeMap. Also get rid of an unnecessary String -> AtomicString conversion. 2011-12-20 Iain Merrick Remove unused parameter from RenderLayerCompositor::rebuildCompositingLayerTree https://bugs.webkit.org/show_bug.cgi?id=74936 Reviewed by Simon Fraser. Pure refactoring, no change in functionality. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): * rendering/RenderLayerCompositor.h: 2011-12-20 Tony Chang RenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags members should be 4 byte aligned https://bugs.webkit.org/show_bug.cgi?id=74880 Reviewed by Ryosuke Niwa. Use unsigned for all types so we get 4 byte boundaries (unsigned char means we try to align to 1 byte boundaries) and add setters and getters for bool members. Move some members around to make sure we're aligned to 4 byte boundaries. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::copyNonInheritedFrom): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::NonInheritedFlags::affectedByHover): (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByHover): (WebCore::InheritedFlags::NonInheritedFlags::affectedByActive): (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByActive): (WebCore::InheritedFlags::NonInheritedFlags::affectedByDrag): (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByDrag): (WebCore::InheritedFlags::NonInheritedFlags::isLink): (WebCore::InheritedFlags::NonInheritedFlags::setIsLink): (WebCore::InheritedFlags::setBitDefaults): (WebCore::InheritedFlags::affectedByHoverRules): (WebCore::InheritedFlags::affectedByActiveRules): (WebCore::InheritedFlags::affectedByDragRules): (WebCore::InheritedFlags::setAffectedByHoverRules): (WebCore::InheritedFlags::setAffectedByActiveRules): (WebCore::InheritedFlags::setAffectedByDragRules): (WebCore::InheritedFlags::isLink): (WebCore::InheritedFlags::setIsLink): 2011-12-20 Julien Chaffraix Regression(99212): table rows get incorrect height after changing some cells' height https://bugs.webkit.org/show_bug.cgi?id=74303 Reviewed by Darin Adler. Tests: fast/table/resize-table-binding-cell.html fast/table/resize-table-cell.html fast/table/resize-table-row.html r99212 wrongly implemented the row's logicalHeight recalculation. The original code would use recalcCells which would properly recalculate a row logicalHeight by iterating over the table's cells but throwing out the existing result. Our approach is just to recompute our row's logicalHeight and leave the rest of the section untouched. * rendering/RenderTableSection.cpp: (WebCore::updateLogicalHeightForCell): Added this new helper function to update the RowStruct logicalHeight during |addCell| and |rowLogicalHeightChanged|. (WebCore::RenderTableSection::addCell): Replaced the old code with a call to updateLogicalHeightForCell. (WebCore::RenderTableSection::rowLogicalHeightChanged): Added a call to updateLogicalHeightForCell for each cells. 2011-12-20 Sheriff Bot Unreviewed, rolling out r103322. http://trac.webkit.org/changeset/103322 https://bugs.webkit.org/show_bug.cgi?id=74927 seven inspector's tests are crashing on qt (Requested by loislo on #webkit). * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType.is_event_param_check_optional): (RawTypes.Object.is_event_param_check_optional): (RawTypes.Array.is_event_param_check_optional): (RawTypes): (Generator.process_command): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionLocation): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: 2011-12-19 Andrey Kosyakov Web Inspector: [Extensions API] allow setting extension API per extension security origin https://bugs.webkit.org/show_bug.cgi?id=74868 Reviewed by Pavel Feldman. This replaces InspectorExtensionAPI string within InspectorFrontendHost with a map by extension security origin, so that we can have APIs customized by extension (in particular, this is needed to expose experimental APIs only to certain extensions). * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didClearWindowObjectInWorld): (WebCore::InspectorAgent::setInjectedScriptForOrigin): * inspector/InspectorAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::setInjectedScriptForOrigin): * inspector/InspectorController.h: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::setInjectedScriptForOrigin): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): 2011-12-20 Peter Rybin Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type. https://bugs.webkit.org/show_bug.cgi?id=69366 Reviewed by Pavel Feldman. Generator fixed and all usages are changed manually. * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType.is_event_param_check_optional): (RawTypes.BaseType): (RawTypes.BaseType.get_output_argument_prefix): (RawTypes.Object.get_output_argument_prefix): (RawTypes.Array.get_output_argument_prefix): (RawTypes): (Generator.process_command): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionLocation): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: 2011-12-20 Julien Chaffraix Crash in RenderTable::outerBorderAfter http://webkit.org/b/74026 Reviewed by Eric Seidel. Test: fast/table/computeLogicalWidth-table-needsSectionRecalc.html RenderBlock can call computeLogicalWidth() before calling layout(). The code in RenderTable::computeLogicalWidth would make the assumption that layout() was called as layout() is responsible for recomputing our sections. To prevent the issue, let's just recompute the section if it's needed as this situation shouldn't be an error. Also adding more knowledge of table in RenderBlock seems bad. * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): Make sure we recalculate our section if it's needed. 2011-12-20 Kentaro Hara [Refactoring] Replace imp with impl in CodeGeneratorJS.pm https://bugs.webkit.org/show_bug.cgi?id=74901 Reviewed by Adam Barth. As pointed out in bug 74837, the generated code by CodeGeneratorJS.pm includes both 'imp' and 'impl'. This patch unifies them into 'impl'. I confirmed that "perl -lne 'print if /imp[^a-z]/' CodeGeneratorJS.pm" outputs nothing. No new tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributeEventListenerCall): (GenerateEventListenerCall): (GenerateImplementation): (GenerateParametersCheck): (GenerateImplementationFunctionCall): (NativeToJSValue): * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results. (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::jsTestEventConstructorAttr1): (WebCore::jsTestEventConstructorAttr2): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfaceStr1): (WebCore::jsTestInterfaceStr2): (WebCore::jsTestInterfaceStr3): (WebCore::setJSTestInterfaceStr2): (WebCore::setJSTestInterfaceStr3): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjReadOnlyIntAttr): (WebCore::jsTestObjReadOnlyStringAttr): (WebCore::jsTestObjReadOnlyTestObjAttr): (WebCore::jsTestObjShortAttr): (WebCore::jsTestObjUnsignedShortAttr): (WebCore::jsTestObjIntAttr): (WebCore::jsTestObjLongLongAttr): (WebCore::jsTestObjUnsignedLongLongAttr): (WebCore::jsTestObjStringAttr): (WebCore::jsTestObjTestObjAttr): (WebCore::jsTestObjXMLObjAttr): (WebCore::jsTestObjCreate): (WebCore::jsTestObjReflectedStringAttr): (WebCore::jsTestObjReflectedIntegralAttr): (WebCore::jsTestObjReflectedUnsignedIntegralAttr): (WebCore::jsTestObjReflectedBooleanAttr): (WebCore::jsTestObjReflectedURLAttr): (WebCore::jsTestObjReflectedNonEmptyURLAttr): (WebCore::jsTestObjReflectedCustomIntegralAttr): (WebCore::jsTestObjReflectedCustomBooleanAttr): (WebCore::jsTestObjReflectedCustomURLAttr): (WebCore::jsTestObjReflectedCustomNonEmptyURLAttr): (WebCore::jsTestObjAttrWithGetterException): (WebCore::jsTestObjAttrWithSetterException): (WebCore::jsTestObjStringAttrWithGetterException): (WebCore::jsTestObjStringAttrWithSetterException): (WebCore::jsTestObjScriptStringAttr): (WebCore::jsTestObjConditionalAttr1): (WebCore::jsTestObjConditionalAttr2): (WebCore::jsTestObjConditionalAttr3): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::jsTestObjDescription): (WebCore::jsTestObjId): (WebCore::jsTestObjHash): (WebCore::setJSTestObjShortAttr): (WebCore::setJSTestObjUnsignedShortAttr): (WebCore::setJSTestObjIntAttr): (WebCore::setJSTestObjLongLongAttr): (WebCore::setJSTestObjUnsignedLongLongAttr): (WebCore::setJSTestObjStringAttr): (WebCore::setJSTestObjTestObjAttr): (WebCore::setJSTestObjXMLObjAttr): (WebCore::setJSTestObjCreate): (WebCore::setJSTestObjReflectedStringAttr): (WebCore::setJSTestObjReflectedIntegralAttr): (WebCore::setJSTestObjReflectedUnsignedIntegralAttr): (WebCore::setJSTestObjReflectedBooleanAttr): (WebCore::setJSTestObjReflectedURLAttr): (WebCore::setJSTestObjReflectedNonEmptyURLAttr): (WebCore::setJSTestObjReflectedCustomIntegralAttr): (WebCore::setJSTestObjReflectedCustomBooleanAttr): (WebCore::setJSTestObjReflectedCustomURLAttr): (WebCore::setJSTestObjReflectedCustomNonEmptyURLAttr): (WebCore::setJSTestObjAttrWithGetterException): (WebCore::setJSTestObjAttrWithSetterException): (WebCore::setJSTestObjStringAttrWithGetterException): (WebCore::setJSTestObjStringAttrWithSetterException): (WebCore::setJSTestObjConditionalAttr1): (WebCore::setJSTestObjConditionalAttr2): (WebCore::setJSTestObjConditionalAttr3): (WebCore::setJSTestObjId): (WebCore::jsTestObjPrototypeFunctionVoidMethod): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethod): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethod): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionMethodWithException): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionConditionalMethod1): (WebCore::jsTestObjPrototypeFunctionConditionalMethod2): (WebCore::jsTestObjPrototypeFunctionConditionalMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::jsTestSerializedScriptValueInterfaceValue): 2011-12-20 Alok Priyadarshi [chromium] compositing/shadows tests fail with accelerated painting https://bugs.webkit.org/show_bug.cgi?id=74871 Reviewed by James Robinson. Switched over to new API for creating accelerated canvas GrContext::createPlatformTexture. It correctly binds the stencil buffer to the FBO. Test: compositing/shadows/shadow-drawing.html (existing) * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::allocate): (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: 2011-12-20 Sheriff Bot Unreviewed, rolling out r103291. http://trac.webkit.org/changeset/103291 https://bugs.webkit.org/show_bug.cgi?id=74915 Looks like it broke fast/events/touch and fast/events/touch/gesture/gesture-scroll.html http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.5/builds/7010 (Requested by loislo on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/chromium/ScrollAnimatorChromiumMac.h: Copied from Source/WebCore/platform/mac/ScrollAnimatorMac.h. (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer): (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer): (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad): (WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate): (WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate): * platform/chromium/ScrollAnimatorChromiumMac.mm: Added. (-[NSProcessInfo systemUptime]): (abs): (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]): (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]): (-[ScrollAnimationHelperDelegate bounds]): (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]): (-[ScrollAnimationHelperDelegate convertSizeToBase:]): (-[ScrollAnimationHelperDelegate convertSizeFromBase:]): (-[ScrollAnimationHelperDelegate convertSizeToBacking:]): (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]): (-[ScrollAnimationHelperDelegate superview]): (-[ScrollAnimationHelperDelegate documentView]): (-[ScrollAnimationHelperDelegate window]): (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]): (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]): (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPartAnimation setCurrentProgress:]): (-[ScrollbarPartAnimation scrollAnimatorDestroyed]): (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterDelegate cancelAnimations]): (-[ScrollbarPainterDelegate convertRectToBacking:]): (-[ScrollbarPainterDelegate convertRectFromBacking:]): (-[ScrollbarPainterDelegate layer]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]): (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]): (WebCore::ScrollAnimator::create): (WebCore::chromiumScrollbarTheme): (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::scroll): (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation): (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged): (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint): (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentsResized): (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide): (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::cancelAnimations): (WebCore::elasticDeltaForTimeDelta): (WebCore::elasticDeltaForReboundDelta): (WebCore::reboundDeltaForElasticDelta): (WebCore::scrollWheelMultiplier): (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent): (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection): (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching): (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::endScrollGesture): (WebCore::ScrollAnimatorChromiumMac::snapRubberBand): (WebCore::roundTowardZero): (WebCore::roundToDevicePixelTowardZero): (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorChromiumMac::setIsActive): (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle): (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer): (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive): (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer): (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired): (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Added. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Added. (lookUpNSScrollerImpClass): (lookUpNSScrollerImpPairClass): (scrollbarControlSizeToNSControlSize): (preferredScrollerStyle): (wkScrollbarPainterUsesOverlayScrollers): (wkScrollbarPainterIsHorizontal): (wkScrollbarPainterKnobAlpha): (wkScrollbarPainterSetOverlayState): (wkScrollbarPainterPaint): (wkScrollbarPainterPaintTrack): (wkScrollbarPainterPaintKnob): (wkScrollbarMinimumThumbLength): (wkScrollbarPainterSetDelegate): (wkScrollbarPainterSetEnabled): (wkScrollbarPainterTrackAlpha): (wkMakeScrollbarPainter): (wkScrollbarThickness): (wkScrollbarMinimumTotalLengthNeededForThumb): (wkVerticalScrollbarPainterForController): (wkHorizontalScrollbarPainterForController): (wkScrollbarPainterControllerStyle): (wkMakeScrollbarReplacementPainter): (wkSetPainterForPainterController): (wkSetScrollbarPainterControllerStyle): (wkScrollbarPainterKnobRect): (wkSetScrollbarPainterKnobAlpha): (wkSetScrollbarPainterTrackAlpha): (wkSetScrollbarPainterKnobStyle): (wkMakeScrollbarPainterController): (wkContentAreaScrolled): (wkContentAreaWillPaint): (wkMouseEnteredContentArea): (wkMouseExitedContentArea): (wkMouseMovedInContentArea): (wkWillStartLiveResize): (wkContentAreaResized): (wkWillEndLiveResize): (wkContentAreaDidShow): (wkContentAreaDidHide): (wkDidBeginScrollGesture): (wkDidEndScrollGesture): (wkScrollbarPainterForceFlashScrollers): (isScrollbarOverlayAPIAvailable): * platform/chromium/ScrollbarThemeChromiumMac.h: (WebCore::ScrollbarThemeChromiumMac::supportsControlTints): (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::scrollbarMap): (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (+[ScrollbarPrefsObserver behaviorPrefsChanged:]): (+[ScrollbarPrefsObserver registerAsObserver]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::ScrollbarThemeChromiumMac::painterForScrollbar): (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::preferencesChanged): (WebCore::ScrollbarThemeChromiumMac::scrollbarThickness): (WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeChromiumMac::initialAutoscrollTimerDelay): (WebCore::ScrollbarThemeChromiumMac::autoscrollTimerDelay): (WebCore::ScrollbarThemeChromiumMac::buttonsPlacement): (WebCore::ScrollbarThemeChromiumMac::hasButtons): (WebCore::ScrollbarThemeChromiumMac::hasThumb): (WebCore::buttonRepaintRect): (WebCore::ScrollbarThemeChromiumMac::backButtonRect): (WebCore::ScrollbarThemeChromiumMac::forwardButtonRect): (WebCore::ScrollbarThemeChromiumMac::trackRect): (WebCore::ScrollbarThemeChromiumMac::minimumThumbLength): (WebCore::ScrollbarThemeChromiumMac::shouldCenterOnThumb): (WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb): (WebCore::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeChromiumMac::updateEnabledState): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/NSScrollerImpDetails.h: * platform/mac/NSScrollerImpDetails.mm: Removed. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate layer]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): (WebCore::ScrollbarTheme::nativeTheme): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::ScrollbarThemeMac): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasButtons): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::ScrollbarThemeMac::paint): 2011-12-19 Adam Klein Make all calls to NamedNodeMap::setAttributes go through Element https://bugs.webkit.org/show_bug.cgi?id=74895 Reviewed by Ryosuke Niwa. There are two reasons for this change. One is an optimization: some callers were previously always creating a NamedNodeMap even if the source didn't have any attributes. The other reason is forward-looking: setAttributes' behavior is subtly wrong in the presence of MutationObservers. This doesn't matter for most callers since the element on which setAttributesFromElement is called is newly-created. In the editing case, however, it could make a difference in behavior, which I hope to fix in a future change without sacrificing the performance of cloneNode() on an Element (which is what NamedNodeMap::setAttributes is designed for). No new tests, no change in behavior. * dom/Element.cpp: (WebCore::Element::cloneElementWithoutChildren): Call setAttributesFromElement. * dom/Element.h: (WebCore::Element::setAttributesFromElement): Create new inline helper method which conditionally forwards to NamedNodeMap::setAttribute. * dom/NamedNodeMap.h: Make setAttributes private (Element is already a friend). * editing/ReplaceNodeWithSpanCommand.cpp: (WebCore::swapInNodePreservingAttributesAndChildren): Call setAttributesFromElement. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setNodeName): Call setAttributesFromElement. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Call setAttributesFromElement. (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Call setAttributesFromElement and make use of ASSERT_NO_EXCEPTION to make code easier to read. 2011-12-19 Leo Yang [BlackBerry] Upstream the BlackBerry change to ResourceRequestBase.cpp https://bugs.webkit.org/show_bug.cgi?id=74910 Reviewed by Daniel Bates. No functionality change to the existing code, no new tests. * platform/network/ResourceRequestBase.cpp: The BlackBerry porting has its own initializeMaximumHTTPConnectionCountPerHost(). Exclude the default implementation. 2011-12-19 Leo Yang [BlackBerry] Upstream the BlackBerry change to NetworkStateNotifier.h https://bugs.webkit.org/show_bug.cgi?id=74904 Reviewed by Daniel Bates. No functionality change to existing code, no new tests. * platform/network/NetworkStateNotifier.h: 2011-12-19 Yael Aharon Update dropzone implementation per spec update https://bugs.webkit.org/show_bug.cgi?id=74834 Reviewed by Tony Chang. Update support for dropzone attribute to use file: and string: instead of f: and s:. http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute No new tests. Existing tests cover this and were updated. * dom/Clipboard.cpp: (WebCore::Clipboard::hasDropZoneType): 2011-12-19 Sam Weinig Add support for scrollLineDown: and scrollLineUp: NSResponder selectors https://bugs.webkit.org/show_bug.cgi?id=74907 Reviewed by Dan Bernstein. Added API test: WebKit2.ScrollByLineCommands * editing/EditorCommand.cpp: (WebCore::executeScrollLineUp): (WebCore::executeScrollLineDown): (WebCore::createCommandMap): Add implementations for scrollLineUp/Down. Do not expose these to execCommand 2011-12-19 Huang Dongsung [QT] WebGL can not make the frame buffer with the stencil buffer. https://bugs.webkit.org/show_bug.cgi?id=74783 When initializing a framebuffer in OpenGL ES 2, we need to initialize the depth and stencil buffers separately, as opposed to the combined depth-stencil buffer we initialize for desktop GL. This makes fast/canvas/webgl/context-attributes-depth-stencil-combination.html work in OpenGL ES 2. Reviewed by Noam Rosenthal. * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::reshape): 2011-12-19 Ami Fischman Teach VideoLayerChromium how to render native texture (to support HW video decode). https://bugs.webkit.org/show_bug.cgi?id=73043 Reviewed by James Robinson. Fix the life-cycle of video frames handled by VideoLayerChromium/CCVideoLayerImpl. VideoFrameProvider::{get,put}CurrentFrame provide lease semantics. Previously VideoLayerChromium would acquire the lease for the duration of copying the frame, even if that was only a texture ID, and immediately return the lease, while CCVideoLayerImpl::draw() would come along later and use the (no-longer locked) texture optimistically. This change makes it so that CCVideoLayerImpl holds the frame's lease for the duration of draw(), guaranteeing the frame is valid to read. Existing test coverage (compositing/video/, LayoutTests). HW render of HW-decoded textures is not yet tested explicitly. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::~VideoLayerChromium): (WebCore::VideoLayerChromium::createCCLayerImpl): (WebCore::VideoLayerChromium::releaseProvider): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::setProvider): (WebCore::convertVFCFormatToGC3DFormat): (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::copyFrameToTextures): (WebCore::CCVideoLayerImpl::copyPlaneToTexture): (WebCore::computeVisibleSize): (WebCore::CCVideoLayerImpl::reserveTextures): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawCommon): (WebCore::CCVideoLayerImpl::drawRGBA): (WebCore::CCVideoLayerImpl::drawNativeTexture): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-12-19 Sam Weinig More PlatformEvent cleanup https://bugs.webkit.org/show_bug.cgi?id=74831 Reviewed by Dan Bernstein. * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::position): Rename pos -> position(). Remove x() and y() accessors. (WebCore::PlatformMouseEvent::globalPosition): Added. Replaces globalX() and globalY() accessors. (WebCore::PlatformMouseEvent::movementDelta): Added. Replaces movementX() and movementY() accessors. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::position): Renamed pos -> position(). (WebCore::PlatformWheelEvent::globalPosition): Renamed globalPos -> globalPosition(). * dom/MouseEvent.cpp: (WebCore::MouseEvent::create): * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * page/DragController.cpp: (WebCore::DragController::startDrag): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::eventMayStartDrag): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::dispatchDragEvent): (WebCore::EventHandler::prepareMouseEvent): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::handleDrag): (WebCore::EventHandler::handleTouchEvent): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passMousePressEventToSubframe): * platform/Scrollbar.cpp: (WebCore::Scrollbar::mouseMoved): (WebCore::Scrollbar::mouseDown): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::hitTest): * platform/chromium/PopupContainer.cpp: (WebCore::constructRelativeMouseEvent): (WebCore::constructRelativeWheelEvent): * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::handleMouseDownEvent): (WebCore::PopupListBox::handleMouseMoveEvent): (WebCore::PopupListBox::handleMouseReleaseEvent): (WebCore::PopupListBox::handleWheelEvent): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin): * platform/qt/ScrollbarQt.cpp: (WebCore::Scrollbar::contextMenu): * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::hitTest): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): Update to use new names, access style. 2011-12-19 Adam Klein Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName) https://bugs.webkit.org/show_bug.cgi?id=74740 Reviewed by Ryosuke Niwa. Updated lots of callers to remove third argument. The list of changes below only lists things other than updating callers. * dom/Document.cpp: (WebCore::Document::importNode): * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::setAttributeNS): (WebCore::Element::setIntegralAttribute): (WebCore::Element::setUnsignedIntegralAttribute): * dom/Element.h: Removed third arg from method, removed old two-arg overload which now has an identical signature. * editing/mac/EditorMac.mm: Updated caller and used ASSERT_NO_EXCEPTION for nearby code. (WebCore::styleForSelectionStart): * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesAsText): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): * svg/SVGElement.idl: Removed 'setter raises(DOMException)' * svg/SVGGlyphRefElement.idl: ditto. * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::setType): (WebCore::SVGStyleElement::setMedia): (WebCore::SVGStyleElement::setTitle): * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processAttributes): 2011-12-19 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSFloat64Array.h: (WebCore::JSFloat64Array::create): (WebCore::JSFloat64ArrayPrototype::create): (WebCore::JSFloat64ArrayConstructor::create): * bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::create): (WebCore::JSTestEventConstructorPrototype::create): (WebCore::JSTestEventConstructorConstructor::create): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::create): (WebCore::JSTestInterfacePrototype::create): (WebCore::JSTestInterfaceConstructor::create): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): (WebCore::JSTestMediaQueryListListenerPrototype::create): (WebCore::JSTestMediaQueryListListenerConstructor::create): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::create): (WebCore::JSTestNamedConstructorPrototype::create): (WebCore::JSTestNamedConstructorConstructor::create): (WebCore::JSTestNamedConstructorNamedConstructor::create): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): (WebCore::JSTestObjPrototype::create): (WebCore::JSTestObjConstructor::create): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): 2011-12-19 James Robinson [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired https://bugs.webkit.org/show_bug.cgi?id=74376 Reviewed by Kenneth Russell. CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper scheduling decision. This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic. There is a large amount of unit test coverage for this change, largely in LayerChromiumTest * platform/graphics/chromium/GraphicsLayerChromium.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::insertChild): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCScopedThreadProxy.h: (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown): 2011-12-19 Sailesh Agrawal Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=61144 Reviewed by Beth Dakin. At a high level the main changes are: - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff. - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing No new tests. Just refactoring. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/chromium/ScrollAnimatorChromiumMac.h: Removed. * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarPainterPaintTrack): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/NSScrollerImpDetails.h: (WebCore::isScrollbarOverlayAPIAvailable): * platform/mac/NSScrollerImpDetails.mm: Added. (WebCore::isScrollbarOverlayAPIAvailable): (WebCore::recommendedScrollerStyle): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (scrollbarPainterForScrollbar): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer): (WebCore::ScrollbarThemeMac::ScrollbarThemeMac): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasButtons): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): 2011-12-19 James Robinson [chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly https://bugs.webkit.org/show_bug.cgi?id=74477 Reviewed by Kenneth Russell. This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of lazily setting it in the paintContents loop. There are two invariants: 1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer refers to that CCLayerTreeHost 2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its CCLayerTreeHost pointer is nil. Covered by several new layout tests in LayerChromiumTest * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::setParent): (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::createTile): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-12-19 Joshua Bell IndexedDB multiple calls to transaction.objectStore(name) should return the same instance https://bugs.webkit.org/show_bug.cgi?id=60208 Reviewed by Tony Chang. Ditto for calls to IDBObjectStore.index(). Calling these methods after the enclosing transaction has finished now consistently throws an error, which allows us to break reference cycles. Test: storage/indexeddb/mozilla/object-identity.html * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): (WebCore::IDBObjectStore::index): (WebCore::IDBObjectStore::transactionFinished): * storage/IDBObjectStore.h: * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::objectStoreCreated): (WebCore::IDBTransaction::dispatchEvent): * storage/IDBTransaction.h: 2011-12-19 Anders Carlsson Send gesture events through the event dispatcher and scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74879 Reviewed by Andreas Kling. * WebCore.exp.in: Export ScrollingCoordinator::handleGestureEvent. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleGestureEvent): * page/ScrollingCoordinator.h: Add handleGestureEvent stub. 2011-12-19 Kentaro Hara Move WebAudio and WebSocket getters from JSDOMWindowCustom.cpp to JSDOMWindow{WebAudio,WebSocket}Custom.cpp https://bugs.webkit.org/show_bug.cgi?id=74841 Reviewed by Adam Barth. This is the second step for bug 74599. We are planning to enable the [Supplemental] IDL and modularize WebAudio and WebSocket on AppleWebKit. This patch moves webkitAudioContext() and webSocket() from JSDOMWindowCustom.cpp to JSDOMWindowWebAudioCustom.cpp and JSDOMWindowWebSocketCustom.cpp, for modularization. Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.list.am: Added JSDOMWindowWebAudioCustom.cpp and JSDOMWindowWebSocketCustom.cpp. * Target.pri: Ditto. * UseJSC.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Ditto. * bindings/js/JSDOMWindowCustom.cpp: For now we do not remove settingsForWindow(), webkitAudioContext() and webSocket(), since other build systems are still using them. We will remove them after all build systems implement the [Supplemental] IDL. * bindings/js/JSDOMWindowWebAudioCustom.cpp: Added. (WebCore::settingsForWindowWebAudio): (WebCore::JSDOMWindow::webkitAudioContext): * bindings/js/JSDOMWindowWebSocketCustom.cpp: Added. (WebCore::settingsForWindowWebSocket): (WebCore::JSDOMWindow::webSocket): * bindings/scripts/CodeGeneratorJS.pm: Until we implement the [Supplemental] IDL on all build systems, we need to temporarily allow two kinds of webkitAudioContext() and webSocket(). (GenerateHeader): 2011-12-16 Zhenyao Mo Postpone deleteRenderbuffer/deleteTexture until all framebuffer attachment points are removed. https://bugs.webkit.org/show_bug.cgi?id=74741 Reviewed by Kenneth Russell. Use WebGLObject's attachment count mechanism to track if a renderbuffer/texture is still attached to framebuffers, and if its deletion should be delated or not. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): (WebCore::WebGLFramebuffer::getAttachment): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::isBound): * html/canvas/WebGLFramebuffer.h: 2011-12-19 Iain Merrick [chromium] Accelerated canvas broken in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=72738 We were flushing the Skia canvas in updateCompositorResources, which is illegal as it runs on the wrong thread. Moved to paintContentsIfDirty instead. For correct rendering on the compositor thread, we make a copy of the canvas texture in updateCompositorResources. Removed m_textureId and pushPropertiesTo from CanvasLayerChromium, as it's no longer common between Canvas2DLayerChromium and WebGLLayerChromium. WebGL changes do not change functionality. Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::create): (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::setTextureId): (WebCore::Canvas2DLayerChromium::contentChanged): (WebCore::Canvas2DLayerChromium::drawsContent): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setLayerTreeHost): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): (WebCore::WebGLLayerChromium::pushPropertiesTo): * platform/graphics/chromium/WebGLLayerChromium.h: (WebCore::WebGLLayerChromium::textureId): (WebCore::WebGLLayerChromium::setTextureId): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: (WebCore::CCCanvasLayerImpl::textureId): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::createAcceleratedCanvas): 2011-12-19 Mike Reed [skia] cache typeface in FontPlatformData https://bugs.webkit.org/show_bug.cgi?id=74415 Reviewed by Stephen White. No new tests. optimization only, existing tests in play * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::Font::drawGlyphs): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::CreateTypefaceFromHFont): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::operator=): (WebCore::FontPlatformData::~FontPlatformData): * platform/graphics/chromium/FontPlatformDataChromiumWin.h: (WebCore::FontPlatformData::typeface): (WebCore::FontPlatformData::lfQuality): (WebCore::FontPlatformData::hash): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: 2011-12-04 Robert Hogan CSS 2.1 failure: border-conflict-element-* https://bugs.webkit.org/show_bug.cgi?id=71244 Reviewed by Darin Adler. From http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution : "When two adjacent cells have the same border-width and the same border-style in a 'border-collapse: collapse' table, then the color of the border from the leftmost cell wins (if the table's 'direction' is 'ltr'; right, if it is 'rtl') and the color of the border from the topmost cell wins." RenderTable manages collapsed borders by first creating a list of unique border values sorted in ascending priority. A unique border value is determined by style, width and color and cell-type precedence. For each entry in this list RenderTableSection paints each cell in its section starting at the top-left. If a cell is using the border RenderTable is currently iterating for, the cell will paint that border. The problems with this approach are: 1. Painting cells from the top-left to the bottom-right means that borders further to the right and to the bottom of the table will paint over those further to the left and the top, breaking the precedence due to cell position. 2. It creates more unique borders in the list than necessary. Borders that differ only on color do not need to be painted in a separate iteration. Precedence in such cases is determined by cell position. So in order to respect cell position when painting collapsed borders: 1. RenderTableCell now treats borders with the same style, width and precedence as equal. This results in a performance improvement on tables where collapsed borders differ only in color, since RenderTable is no longer painting every cell in the table for each unique collapsed border color. It also allows color to be a function of cell position rather than border type. 2. RenderTableSection now paints collapsed borders separately from cells and from the bottom-right to the top-left instead of top-left to bottom-right. If a collapsed border has precedence due to style, width or cell-group-type it will still be respected but precedence due to color is enforced by painting cells nearer to the top and left *after* cells nearer to the bottom and right. The order in which collapsed borders paint over each other in the same cell has not changed. Unlike Firefox, WebKit does not attempt render them as diagonals or attempt to give borders on the edge of the table precedence so that grooved and ridged styles have a smooth edge all round the table. This fixes the following failing tests from the border-conflict-element-* set in the CSS 2.1 test suite: border-conflict-element-001d.htm border-conflict-element-0037.htm border-conflict-element-0038.htm One test in the suite is known to be wrong, so a corrected version has been landed outside the css2.1 folder: border-conflict-element-002.htm This change entails rebaselining quite a few tests, see the LayoutTests ChangeLog for a full explanation of the rebaselines. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paint): (WebCore::addBorderStyle): (WebCore::compareBorderValuesForQSort): (WebCore::RenderTableCell::paintCollapsedBorders): * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): (WebCore::RenderTableSection::paintObject): * rendering/style/CollapsedBorderValue.h: (WebCore::CollapsedBorderValue::isSameIgnoringColor): 2011-12-19 Jer Noble MediaController: cannot scrub while playing. https://bugs.webkit.org/show_bug.cgi?id=74870 rdar://problem/10602037 Reviewed by Eric Carlson. Updated media/media-controller-playback.html test. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setController): Change order of operations; set the controllers media element before passing controller to the controls. * html/MediaController.cpp: (MediaController::updatePlaybackState): Stop the playback clock when WAITING or ENDED. (MediaController::beginScrubbing): Stop the playback clock. (MediaController::endScrubbing): Restart (if necessary) the playback clock. (MediaController::canPlay): Return true if paused. * platform/mac/PlatformClockCA.cpp: (PlatformClockCA::setCurrentTime): Stop the CAClock before changing the current time. 2011-12-19 Adam Barth We don't pass all of the html5lib unsafe-text.dat tests https://bugs.webkit.org/show_bug.cgi?id=74825 Reviewed by Eric Seidel. This patch is actually three (tiny) related patches. Together these changes cause use to pass the plain-text-unsafe.dat tests from html5lib. Tests: html5lib/runner.html * html/parser/HTMLTokenizer.cpp: (WebCore::::shouldSkipNullCharacters): - We're not supposed to skip null characters in the PLAINTEXTState. This might cause compatibility problems with text/plain documents that contains NUL characters because we use the PLAINTEXTState to parse them. If we run into any trouble, it's easy to fix in TextDocumentParser. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::constructTreeFromToken): - Fix typo. (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken): - We're supposed to replace NUL characters if the next character token if we're in foreign content. The previous check didn't quite get this case correctly. (WebCore::HTMLTreeBuilder::processTokenInForeignContent): - Now that we replace NUL characters with the replacement character, we need to be more careful about the fact that replacement characters don't flip m_framesetOk to false. Note: This new check matches the check for non-foreign content. 2011-12-19 Adam Barth WebKit should support HTML entities that expand to more than one character https://bugs.webkit.org/show_bug.cgi?id=74826 Reviewed by Darin Adler. Tests: html5lib/runner.html * html/parser/HTMLEntityNames.in: - Add missing HTML entities from HTML5 spec. I'll sort this file in a followup patch. (It's not quite sorted perfectly and sorting in this patch would introduce noise into the patch.) * html/parser/HTMLEntityParser.cpp: (WebCore::decodeNamedEntity): - convertToUTF16 always returns true, so make it return void instead. - Teach the entity parse that some entities expand to two characters. * html/parser/HTMLEntityParser.h: - Add a warning that decodeNamedEntity is really a broken API. - This patch doesn't actually change any behavior of this API, but it does illustrate that the two callers of this API (the two XML parsers) really need to move a more sensible API. * html/parser/HTMLEntitySearch.cpp: (WebCore::HTMLEntitySearch::HTMLEntitySearch): (WebCore::HTMLEntitySearch::advance): * html/parser/HTMLEntitySearch.h: (WebCore::HTMLEntitySearch::fail): - Remove the concept of currentValue. This isn't really used for anything and conflicts with the idea that entities can expand to more than one character. * html/parser/HTMLEntityTable.h: - Add storage for two UChar32 values per entity. * html/parser/create-html-entity-table: (convert_value_to_int): - Teach this script to handle entities that expand to multiple Unicode characters. * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::consumeCharacterReference): - Update this function now that convertToUTF16 returns void. * xml/parser/XMLCharacterReferenceParser.cpp: - The XML version of convertToUTF16 also needs to return void to match the HTML signature. (It used to return true all the time as well.) * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processHTMLEntity): - Update this caller use leftValue instead of value. My sense is that this code is moderately broken today because it's using HTML entities in parsing XML. I've added a FIXME. This code is disabled in all builds, so I don't feel a big need to fix this issue in this patch. We should either finish this project or delete this complexity from the project. 2011-12-19 Andreas Kling Avoid instantiating ScrollAnimators when possible. Reviewed by Beth Dakin. Have RenderLayer::scrollToOffset() check if we're scrolling to the already current offset. In that case, don't call down to scrollToOffsetWithoutAnimation(), avoiding the instantiation of a ScrollAnimator. This reduces memory consumption by 400 kB (on 32-bit) when viewing the full HTML5 spec on , since we were creating a ScrollAnimator for every single RenderLayer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): 2011-12-19 Chris Guan [BlackBerry] remove one file related to multipart from the BlackBerry build system https://bugs.webkit.org/show_bug.cgi?id=74839 Reviewed by Daniel Bates. After refactored multipart, the code of MultipartResponseDelegate have been moved out of WebCore, we do not need to upstream MultipartResponseDelegate any more. So remove it from PlatformBlackBerry.cmake to update build system. * PlatformBlackBerry.cmake: 2011-12-15 Geoffrey Garen Placement new does an unnecessary NULL check https://bugs.webkit.org/show_bug.cgi?id=74676 Reviewed by Sam Weinig. * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::create): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateConstructorDeclaration): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.h: (JSC::RuntimeMethod::create): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): * dom/Document.h: (WebCore::FormElementKeyHashTraits::constructDeletedValue): Use NotNull placement new, as in JavaScriptCore. * platform/PODArena.h: (WebCore::PODArena::allocateObject): No need to check for NULL explicitly, since that's the built-in behavior of placement new. * platform/graphics/FontCache.cpp: (WebCore::FontDataCacheKeyTraits::constructDeletedValue): * platform/graphics/IntRectHash.h: * platform/graphics/IntSizeHash.h: More NotNull. * rendering/RenderObject.h: Declaring that we throw is the C++ way to say that operator new will not return NULL. 2011-12-19 Eric Carlson Render text tracks https://bugs.webkit.org/show_bug.cgi?id=62886 Reviewed by Sam Weinig. Test: media/track/track-cue-rendering.html * css/mediaControls.css: (video::-webkit-media-text-track-container): (video::-webkit-media-text-track-display): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_haveVisibleTextTrack. (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Trigger an update of the text track display. (WebCore::HTMLMediaElement::textTrackModeChanged): call configureTextTrackDisplay() so the text track display is hidden or shown when necessary. (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): Minor cleanup. (WebCore::HTMLMediaElement::createMediaControls): configureMediaControls() always called reset after creating the controls, do it here instead. (WebCore::HTMLMediaElement::configureMediaControls): Simplify and cleanup. (WebCore::HTMLMediaElement::configureTextTrackDisplay): Show and hide text track display. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::currentlyVisibleCues): * html/shadow/MediaControlElements.cpp: (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): New. (WebCore::RenderTextTrackContainerElement::layout): New. Call the display element so it can update the position and font size. (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): New. (WebCore::MediaControlTextTrackContainerElement::create): Ditto. (WebCore::MediaControlTextTrackContainerElement::createRenderer): Ditto. (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Ditto. (WebCore::MediaControlTextTrackContainerElement::updateSizes): Keep the cue display element positioned above the bottom of the video box, and size the font according to the video height. (WebCore::MediaControlTextTrackDisplayElement::MediaControlTextTrackDisplayElement): New. (WebCore::MediaControlTextTrackDisplayElement::create): Ditto. (WebCore::MediaControlTextTrackDisplayElement::shadowPseudoId): Ditto. * html/shadow/MediaControlElements.h: (WebCore::MediaControlTextTrackContainerElement::displayType): (WebCore::MediaControlTextTrackDisplayElement::displayType): * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::MediaControlRootElement): New. (WebCore::MediaControlRootElement::setMediaController): Ditto. (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto. * html/shadow/MediaControlRootElement.h: * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): New. (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto. * html/shadow/MediaControlRootElementChromium.h: * html/shadow/MediaControls.h: 2011-12-19 Eric Carlson Enable for Mac build https://bugs.webkit.org/show_bug.cgi?id=74838 Reviewed by Darin Adler. * Configurations/FeatureDefines.xcconfig: * bindings/generic/RuntimeEnabledFeatures.cpp: 2011-12-19 Kenneth Rohde Christiansen Make the Editor::setIgnoreCompositionSelectionChange public as it is needed by Qt Reviewed by Simon Hausmann. * editing/Editor.h: 2011-12-19 Alexander Pavlov Web Inspector: Implement CSS selector profiler backend https://bugs.webkit.org/show_bug.cgi?id=74603 Reviewed by Pavel Feldman. No new tests, as the changed code does not result in visible effects yet. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::RuleMatchingStats::RuleMatchingStats): (WebCore::SelectorProfile::SelectorProfile): (WebCore::SelectorProfile::~SelectorProfile): (WebCore::SelectorProfile::totalMatchingTimeMs): (WebCore::SelectorProfile::startSelector): (WebCore::SelectorProfile::commitSelector): (WebCore::SelectorProfile::commitSelectorTime): (WebCore::SelectorProfile::toInspectorObject): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::restore): (WebCore::InspectorCSSAgent::startSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::willMatchRule): (WebCore::InspectorCSSAgent::didMatchRule): (WebCore::InspectorCSSAgent::willProcessRule): (WebCore::InspectorCSSAgent::didProcessRule): * inspector/InspectorCSSAgent.h: 2011-12-19 Alexander Pavlov Web Inspector: Status bar button glyph for the "Record" buttons broken https://bugs.webkit.org/show_bug.cgi?id=74861 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: (.record-cpu-profile-status-bar-item .glyph, .record-profile-status-bar-item .glyph): (.record-cpu-profile-status-bar-item.toggled-on .glyph, .record-profile-status-bar-item.toggled-on .glyph): 2011-12-19 Pavel Feldman Web Inspector: only the first @rule is highlighted in CSS https://bugs.webkit.org/show_bug.cgi?id=74568 Reviewed by Timothy Hatcher. * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: 2011-12-19 Ilya Tikhonovsky Web Inspector: Feature Request: Able to remove all breakpoints. https://bugs.webkit.org/show_bug.cgi?id=63055 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.removeAllBreakpoints): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.removeAllBreakpoints): 2011-12-19 Benjamin Poulain Build fix for ScrollingCoordinatorMac.mm when building on a case sensitive system Unreviewed build fix for r103180. StdlibExtras.h->StdLibExtras.h to compile on case sensitive system. * page/mac/ScrollingCoordinatorMac.mm: 2011-12-19 Kentaro Hara Remove unnecessary [JSCCustomGetter] IDLs from DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=74829 Reviewed by Adam Barth. Now JSC has implemented the [Constructor] IDL and it generates getDOMConstructor() automatically. This patch removes hand-written unnecessary getDOMConstructor()s from JSDOMWindowCustom.cpp. No new tests. No change in behavior. * bindings/js/JSDOMWindowCustom.cpp: * page/DOMWindow.idl: 2011-12-19 Adam Barth The HTML parser doesn't enforce the "Noah's Ark condition" from the HTML5 spec https://bugs.webkit.org/show_bug.cgi?id=74828 Reviewed by Darin Adler. This patch implement the "Noah's Ark condition" from the HTML5 specification. This condition limits the number of identitical elements that can be in the list of active formatting elements. I'm not entirely sure that enforcing this condition is worth the complexity, but given that we've come this far in support of the HTML5 parsing algorithm, we might as well finish it. After this patch, we pass all but one of the html5lib parsing tests! Tests: html5lib/runner.html * html/parser/HTMLFormattingElementList.cpp: (WebCore::attributeCount): (WebCore::HTMLFormattingElementList::append): (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition): * html/parser/HTMLFormattingElementList.h: 2011-12-19 Benjamin Poulain Add support for 8 bits strings to Document::isValidName() https://bugs.webkit.org/show_bug.cgi?id=74784 Reviewed by Darin Adler. Avoid the conversion to 16bits when we are in the ASCII fast path, otherwise fallback to the Unicode testing in 16bits. * dom/Document.cpp: (WebCore::isValidNameASCII): (WebCore::Document::isValidName): 2011-12-18 Kentaro Hara REGRESSION(r101445): [JSC] Generated code for custom getters and setters with the [Supplemental] IDL is wrong https://bugs.webkit.org/show_bug.cgi?id=74837 Reviewed by Darin Adler. In bug 73162, we implemented the [Supplemental] IDL, but the generated code for custom getters and setters was wrong in JSC. This patch fixes CodeGeneratorJS.pm so that the result of WebCore/bindings/scripts/test/TestInterface.idl becomes as follows: Wrong: JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&) { JSTestInterface* castedThis = static_cast(asObject(slotBase)); return JSTestSupplemental::str3(castedThis, exec); } Correct: JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&) { JSTestInterface* castedThis = static_cast(asObject(slotBase)); TestInterface* imp = static_cast(castedThis->impl()); return castedThis->str3(imp, exec); } Tests: bindings/scripts/test/JS/TestInterface.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests result. (WebCore::jsTestInterfaceStr3): (WebCore::setJSTestInterfaceStr3): * bindings/scripts/test/JS/JSTestInterface.h: Ditto. 2011-12-18 Adam Barth Fix typo in comment. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-12-18 Keishi Hattori Implement UI WebKit chromium part https://bugs.webkit.org/show_bug.cgi?id=65897 Reviewed by Darin Fisher. * GNUmakefile.list.am: Removed ColorChooser.cpp and added ColorChooserClient.h * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h * WebCore.xcodeproj/project.pbxproj: Removed ColorChooser.cpp and added ColorChooserClient.h 2011-12-18 David Barton , , , and baseline positions are wrong https://bugs.webkit.org/show_bug.cgi?id=72821 Reviewed by Darin Adler. Tested by rebaselining 8 existing tests. (Pardon the pun.) * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::baselinePosition): Just using the base's (these puns are not my fault) baseline did not leave room for the exponent. * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::baselinePosition): Added a guard condition, and removed some bad lines apparently mistakenly copied from RenderMathMLSubSup.cpp. 2011-12-18 Luke Macpherson Implement CSS line-height property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74561 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isNumber): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyLineHeight::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-18 Luke Macpherson Implement CSS outline shorthand property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74467 Reviewed by Andreas Kling. No new tests / refactoring only. RenderStyle::resetOutline was removed in favor of explicity expanding to the initial values of the shorthand expansion. This improves consistency because the initial values to use are more clearly (and singularly) defined. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: 2011-12-18 Sheriff Bot Unreviewed, rolling out r103205. http://trac.webkit.org/changeset/103205 https://bugs.webkit.org/show_bug.cgi?id=74833 There are valid characters above 0x80 when the string is 8bits (Requested by benjaminp on #webkit). * dom/Document.cpp: (WebCore::isValidNameASCII): (WebCore::Document::isValidName): 2011-12-18 Luke Macpherson Separate box alignment and box pack values into separate enums. https://bugs.webkit.org/show_bug.cgi?id=74580 Reviewed by Andreas Kling. No new tests / refactoring only. Separating these types cleans up the code by removing several assertions that values are in the correct ranges, as this is ensured by the type system. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EBoxPack): (WebCore::CSSPrimitiveValue::operator EBoxAlignment): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::boxPack): (WebCore::InheritedFlags::setBoxAlign): (WebCore::InheritedFlags::setBoxPack): (WebCore::InheritedFlags::initialBoxPack): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleDeprecatedFlexibleBoxData.h: 2011-12-18 Luke Macpherson Implement CSS font-size property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74368 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyFontSize::largerFontSize): (WebCore::ApplyPropertyFontSize::smallerFontSize): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontSize::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::hasParentNode): 2011-12-18 Sheriff Bot Unreviewed, rolling out r103199. http://trac.webkit.org/changeset/103199 https://bugs.webkit.org/show_bug.cgi?id=74832 Caused a bot crashiness extravaganza! (Requested by kling on #webkit). * platform/KURL.cpp: (WebCore::isLetterMatchIgnoringCase): (WebCore::protocolIs): 2011-12-18 Dan Bernstein Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html https://bugs.webkit.org/show_bug.cgi?id=67759 Reviewed by Darin Adler. Test: fast/block/positioning/positioned-float-layout-after-image-load.html Positioned floats are both floating and positioned. Made the following functions treat them as positioned rather than as floats by reordering code. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace): (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-12-18 Benjamin Poulain Add support for 8 bits strings to Document::isValidName() https://bugs.webkit.org/show_bug.cgi?id=74784 Reviewed by Andreas Kling. The valid name has a fast path for ASCII, and a slow path taking Unicode characters into account. For 8-bit strings, we don't need to take the non-ASCII path as it could never succeed if the ASCII path didn't. * dom/Document.cpp: (WebCore::isValidNameASCII): (WebCore::Document::isValidName): 2011-12-18 Huang Dongsung [Qt] Remove redundant m_glWidget->makeCurrent() calls in GraphicsContext3DQt. https://bugs.webkit.org/show_bug.cgi?id=73814 It causes a performance hit. Moved the redundant function calls to makeContextCurrent(). Reviewed by Noam Rosenthal. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): (WebCore::GraphicsContext3DPrivate::paint): (WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::getAttachedShaders): (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::clearColor): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::clearDepth): (WebCore::GraphicsContext3D::clearStencil): (WebCore::GraphicsContext3D::colorMask): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::compressedTexImage2D): (WebCore::GraphicsContext3D::compressedTexSubImage2D): (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::getAttribLocation): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::getString): (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::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (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::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (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::getTexParameterfv): (WebCore::GraphicsContext3D::getTexParameteriv): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): (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): 2011-12-18 Andreas Kling Removing unrelated printf() that slipped into my last commit. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation): 2011-12-18 Andreas Kling KURL::protocolIs() should handle 8-bit strings. Reviewed by Antti Koivisto. * platform/KURL.cpp: (WebCore::isLetterMatchIgnoringCase): Turned this into a template method so it can be used for both UChar and LChar. (WebCore::charactersAreProtocol): (WebCore::protocolIs): Handle 8/16 bit strings separately to avoid conversion. 2011-12-18 Alice Boxhall Make AccessibilityObject::lineForPosition return the correct value for cases where the position is not within the current object. https://bugs.webkit.org/show_bug.cgi?id=71348 Reviewed by Chris Fleizach. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::lineForPosition): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-12-18 Sam Weinig Make EventHandler::handleWheelEvent take const PlatformWheelEvent& https://bugs.webkit.org/show_bug.cgi?id=74824 Reviewed by Anders Carlsson. * WebCore.exp.in: * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: * page/blackberry/EventHandlerBlackBerry.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/efl/EventHandlerEfl.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passWheelEventToWidget): * page/qt/EventHandlerQt.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/win/EventHandlerWin.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/wx/EventHandlerWx.cpp: (WebCore::EventHandler::passWheelEventToWidget): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::copyTurningVerticalTicksIntoHorizontalTicks): 2011-12-18 James Kozianski [chromium] Add worldId parameter to allowScriptExtension() https://bugs.webkit.org/show_bug.cgi?id=74214 Chromium uses the worldId to determine what extension is running in a v8 context and knowing that at the time allowScriptExtension() is called allows us to conditionally inject extension APIs. Reviewed by Darin Fisher. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): (WebCore::V8DOMWindowShell::createNewContext): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::allowScriptExtension): * loader/FrameLoaderClient.h: 2011-12-18 Adam Barth Adoption agency iteration limits in HTML parser don't match HTML5 spec https://bugs.webkit.org/show_bug.cgi?id=74822 Reviewed by Eric Seidel. Previously, we were using the iteration limits from the old tree builder. Now we use the iteration limits from the HTML5 specification. Tests: html5lib/runner.html * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-12-18 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=73954 REGRESSION (r97745): Transitions don't work on links Reviewed by Andreas Kling. Test: transitions/visited-link-color.html Since visited link colors are now part of the RenderStyle, they need to be transitioned along with the corresponding regular colors. * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::PropertyWrapperVisitedAffectedColor::equals): (WebCore::PropertyWrapperVisitedAffectedColor::blend): (WebCore::AnimationBase::ensurePropertyMap): Add new wrapper class that applies both regular and visited color. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::visitedLinkColor): (WebCore::InheritedFlags::visitedLinkBackgroundColor): (WebCore::InheritedFlags::visitedLinkBorderLeftColor): (WebCore::InheritedFlags::visitedLinkBorderRightColor): (WebCore::InheritedFlags::visitedLinkBorderBottomColor): (WebCore::InheritedFlags::visitedLinkBorderTopColor): (WebCore::InheritedFlags::visitedLinkOutlineColor): (WebCore::InheritedFlags::visitedLinkColumnRuleColor): (WebCore::InheritedFlags::visitedLinkTextEmphasisColor): (WebCore::InheritedFlags::visitedLinkTextFillColor): (WebCore::InheritedFlags::visitedLinkTextStrokeColor): Add accessors. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Opportunistic fix. Don't know how to test. 2011-12-18 Anders Carlsson Set the main frame view scroll position asynchronously https://bugs.webkit.org/show_bug.cgi?id=74823 Reviewed by Sam Weinig. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::ScrollingCoordinator): Initialize m_didDispatchDidUpdateMainFrameScrollPosition to false. (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition): Get the scroll position, reset m_didDispatchDidUpdateMainFrameScrollPosition to false and then call FrameView::setScrollOffset to update the scroll position. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::scrollByOnScrollingThread): Update the scroll position and dispatch ScrollingCoordinator::didUpdateMainFrameScrollPosition on the main thread if needed. 2011-12-18 Andreas Kling JSC/HTMLCollection: Optimize canGetItemsForName(). Reviewed by Sam Weinig. Add HTMLCollection::hasNamedItem(name) and use that in the JSC bindings' canGetItemsForName() instead of fetching the list of named items just to check if it's empty or not. * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::canGetItemsForName): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::canGetItemsForName): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::hasNamedItem): * html/HTMLCollection.h: 2011-12-18 Sam Weinig Spruce up PlatformWheelEvent a bit https://bugs.webkit.org/show_bug.cgi?id=74821 Reviewed by Dan Bernstein. * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::directionInvertedFromDevice): Remove x/y getters in favor of direct access to the IntPoints, and rename webkitDirectionInvertedFromDevice() to directionInvertedFromDevice() since it is not an exposed API. 2011-12-18 Anders Carlsson Scroll the main frame on the scrolling thread https://bugs.webkit.org/show_bug.cgi?id=74820 Reviewed by Andreas Kling. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleWheelEvent): Compute a scroll offset from the wheel event and tell the scrolling thread to scroll by the given offset. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::scrollByOnScrollingThread): Clamp the updated position to the minimum and maximum scrollable position. (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread): Actually reposition the layer. 2011-12-18 Andreas Kling HTMLAllCollection: Get rid of stateful namedItem traversal. Reviewed by Sam Weinig. Add a namedItemWithIndex() function to HTMLAllCollection to cover the document.all(name, index) use-case. This moves the collection traversal into WebCore and allows us to remove some complexity. This incidentally fixes a bug where the CollectionCache would point to the last node returned by document.all(name, index) without the correct associated node index (because info()->current was getting set without updating info()->position.) Added a layout test for that. Test: fast/dom/htmlallcollection-call-with-index-caching-bug.html * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: (WebCore::V8HTMLAllCollection::callAsFunctionCallback): Replace collection traversal by calls to namedItemWithIndex(). * html/HTMLCollection.h: Promoted updateNameCache() to protected (for HTMLAllCollection.) Demoted checkForNameMatch() to private. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): Added for document.all(name, index). Uses the name/id cache. * html/HTMLAllCollection.cpp: * html/HTMLAllCollection.h: (WebCore::HTMLAllCollection::HTMLAllCollection): Removed m_idsDone, HTMLAllCollection is now stateless. 2011-12-18 Anders Carlsson The scrolling coordinator should know about the main frame scroll layer https://bugs.webkit.org/show_bug.cgi?id=74817 Reviewed by Andreas Kling. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingThread::threadCallback): Move the * to where it belongs. (WebCore::ScrollingCoordinator::setFrameScrollLayer): Keep track of the underlying CALayer of the frame scroll layer. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::ensureRootLayer): Call ScrollingCoordinator::setFrameScrollLayer. 2011-12-18 Andreas Kling Interacting with GMail message lists is sluggish. Reviewed by Dan Bernstein. Add an argument to collapsed*Border() to control whether the border color is computed or not. This allows us to avoid expensive work when we're only interested in the metrics. RenderStyle::visitedDependentColor() was very hot (4.5%) when hit-testing on GMail and this removes its usage altogether. This should be an improvement for table rendering as well, since it was all happening below RenderBox::overflowClipRect(). * rendering/RenderTableCell.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::collapsedLeftBorder): (WebCore::RenderTableCell::collapsedRightBorder): (WebCore::RenderTableCell::collapsedTopBorder): (WebCore::RenderTableCell::collapsedBottomBorder): Add and propagate an IncludeBorderColorOrNot argument that decides whether we compute the CollapsedBorderValue's color. (WebCore::RenderTableCell::collapsedStartBorder): (WebCore::RenderTableCell::collapsedEndBorder): Renamed start & end to startColorProperty & endColorProperty for clarity. Also same modifications as the above functions. (WebCore::RenderTableCell::collapsedBeforeBorder): (WebCore::RenderTableCell::collapsedAfterBorder): Renamed before & after to beforeColorProperty & afterColorProperty for clarity. Also same modifications as the above functions. (WebCore::RenderTableCell::borderHalfStart): (WebCore::RenderTableCell::borderHalfEnd): (WebCore::RenderTableCell::borderHalfBefore): (WebCore::RenderTableCell::borderHalfAfter): Pass DoNotIncludeBorderColor to collapsed*Border() since we only care about the metrics here. 2011-12-18 Anders Carlsson The scrolling coordinator should keep track of the main frame geometry https://bugs.webkit.org/show_bug.cgi?id=74816 Reviewed by Andreas Kling. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::syncFrameGeometry): Update the frame geometry accordingly when it changes. * page/ScrollingCoordinator.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::updateRootLayerPosition): Call ScrollingCoordinator::syncFrameGeometry. (WebCore::RenderLayerCompositor::scrollingCoordinator): Add new getter. 2011-12-17 Sam Weinig Move timestamp down from PlatformEvent subclasses to the base class https://bugs.webkit.org/show_bug.cgi?id=74805 Reviewed by Anders Carlsson. * platform/PlatformEvent.h: (WebCore::PlatformEvent::type): (WebCore::PlatformEvent::timestamp): (WebCore::PlatformEvent::PlatformEvent): * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::PlatformMouseEvent): (WebCore::PlatformMouseEvent::clickCount): * platform/PlatformTouchEvent.h: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/efl/PlatformKeyboardEventEfl.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/efl/PlatformMouseEventEfl.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/efl/PlatformTouchEventEfl.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/efl/PlatformWheelEventEfl.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/mac/PlatformMouseEventMac.mm: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/win/KeyEventWin.cpp: (WebCore::singleCharacterString): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/win/PlatformMouseEventWin.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/wx/KeyboardEventWx.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/wx/MouseEventWx.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2011-12-18 Anders Carlsson Add a scrolling thread to the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74814 Reviewed by Andreas Kling. * WebCore.exp.in: Export ScrollingCoordinator::handleWheelEvent. * WebCore.xcodeproj/project.pbxproj: Add ScrollingCoordinatorMac.mm * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleWheelEvent): Add a stub function. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: Added. Add a ScrollingThread object which creates a thread and attaches a run loop source to it, allowing for functions to be dispatched and run on said thread. (WebCore::ScrollingCoordinator::isScrollingThread): Call ScrollingThread::isCurrentThread. (WebCore::ScrollingCoordinator::dispatchOnScrollingThread): Call ScrollingThread::dispatch. 2011-12-18 Anders Carlsson EventDispatcher should keep track of all scrolling coordinators https://bugs.webkit.org/show_bug.cgi?id=74810 Reviewed by Andreas Kling. Export symbols needed by WebKit2. * WebCore.exp.in: 2011-12-18 Raul Hudea Add transform function completion to web-inspector Web Inspector: Auto-complete transform functions for -webkit-transform https://bugs.webkit.org/show_bug.cgi?id=74730 Reviewed by Pavel Feldman. No new test. Trivial change. * inspector/front-end/CSSKeywordCompletions.js: 2011-12-18 Ilya Tikhonovsky Web Inspector: chromium profiler: change default root type for retaining paths from GC Roots to DOMWindow. https://bugs.webkit.org/show_bug.cgi?id=74697 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype.get isTracingToWindowObjects): 2011-12-18 Peter Rybin Web Inspector: Switch to type-safe JSON ConsoleMessage.cpp, InspectorDOMAgent.cpp, InspectorDebuggerAgent.cpp, ScriptCallFrame.cpp https://bugs.webkit.org/show_bug.cgi?id=74549 Reviewed by Pavel Feldman. Work with InspectorObject is replaced with type-safe generated API usage. Inspector.json and Inspector-0.1.json are also changed to better reflect data types that are actually being transmitted. * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): * inspector/Inspector-0.1.json: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::resolveBreakpoint): * inspector/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::buildInspectorObject): 2011-12-18 Peter Rybin Web Inspector: CodeGeneratorInspector.py: use generated types in method parameters https://bugs.webkit.org/show_bug.cgi?id=74661 Reviewed by Pavel Feldman. Type binding object is added to raw_type object. * inspector/CodeGeneratorInspector.py: (TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder): (TypeBindings.create_for_named_type_declaration.EnumBinding.get_in_c_type_text): (TypeBindings.create_for_named_type_declaration.EnumBinding): (TypeBindings.create_for_named_type_declaration.EnumBinding.reduce_to_raw_type): (TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder): (TypeBindings.create_for_named_type_declaration.PlainString.reduce_to_raw_type): (TypeBindings.create_for_named_type_declaration.PlainString): (TypeBindings.create_for_named_type_declaration.PlainString.get_in_c_type_text): (TypeBindings): (TypeBindings.create_for_named_type_declaration.ClassBinding): (get_in_c_type_text): (reduce_to_raw_type): (PlainObjectBinding.generate_type_builder): (PlainObjectBinding.get_in_c_type_text): (PlainObjectBinding): (PlainObjectBinding.reduce_to_raw_type): (RawTypesBinding.generate_type_builder): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding): (RawTypesBinding.reduce_to_raw_type): (resolve_param_type.RawTypeBinding.reduce_to_raw_type): (resolve_param_type.RawTypeBinding): (resolve_param_type.RawTypeBinding.get_in_c_type_text): (resolve_param_type): (Generator.process_event): 2011-12-18 Sheriff Bot Unreviewed, rolling out r103169. http://trac.webkit.org/changeset/103169 https://bugs.webkit.org/show_bug.cgi?id=74809 it broke compilation on many platforms (Requested by loislo_ on #webkit). * WebCore.gypi: * platform/ColorChooser.cpp: Renamed from Source/WebKit/chromium/src/ColorChooserProxy.h. (WebCore::ColorChooserClient::~ColorChooserClient): (WebCore::ColorChooserClient::newColorChooser): (WebCore::ColorChooserClient::discardChooser): (WebCore::ColorChooser::ColorChooser): (WebCore::ColorChooser::create): (WebCore::ColorChooser::~ColorChooser): (WebCore::ColorChooser::didChooseColor): (WebCore::ColorChooser::didCleanup): 2011-12-18 Alexandru Chiculita [CSS Shaders] Add FECustomFilter that renders custom filters https://bugs.webkit.org/show_bug.cgi?id=73317 Using a GraphicsContext3D to render the shaders in GPU, read the result back and use it in the software filters pipeline. Reviewed by Chris Marrin. Test: css3/filters/effect-custom.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/cache/CachedShader.cpp: (WebCore::CachedShader::CachedShader): (WebCore::CachedShader::shaderString): (WebCore::CachedShader::data): * loader/cache/CachedShader.h: * platform/graphics/filters/CustomFilterMesh.cpp: Added. (WebCore::MeshGenerator::MeshGenerator): (WebCore::MeshGenerator::vertices): (WebCore::MeshGenerator::indices): (WebCore::MeshGenerator::points): (WebCore::MeshGenerator::pointsCount): (WebCore::MeshGenerator::tiles): (WebCore::MeshGenerator::tilesCount): (WebCore::MeshGenerator::indicesCount): (WebCore::MeshGenerator::floatsPerVertex): (WebCore::MeshGenerator::vertexCount): (WebCore::MeshGenerator::addTile): (WebCore::MeshGenerator::addAttachedMeshIndex): (WebCore::MeshGenerator::generateAttachedMesh): (WebCore::MeshGenerator::addDetachedMeshVertexAndIndex): (WebCore::MeshGenerator::generateDetachedMesh): (WebCore::MeshGenerator::addPositionAttribute): (WebCore::MeshGenerator::addTexCoordAttribute): (WebCore::MeshGenerator::addMeshCoordAttribute): (WebCore::MeshGenerator::addTriangleCoordAttribute): (WebCore::MeshGenerator::addAttachedMeshVertexAttributes): (WebCore::MeshGenerator::addDetachedMeshVertexAttributes): (WebCore::MeshGenerator::dumpBuffers): (WebCore::CustomFilterMesh::CustomFilterMesh): (WebCore::CustomFilterMesh::~CustomFilterMesh): * platform/graphics/filters/CustomFilterMesh.h: Added. (WebCore::CustomFilterMesh::create): (WebCore::CustomFilterMesh::verticesBufferObject): (WebCore::CustomFilterMesh::bytesPerVertex): (WebCore::CustomFilterMesh::elementsBufferObject): (WebCore::CustomFilterMesh::indicesCount): (WebCore::CustomFilterMesh::meshBox): (WebCore::CustomFilterMesh::meshType): * platform/graphics/filters/CustomFilterShader.cpp: Added. (WebCore::CustomFilterShader::defaultVertexShaderString): (WebCore::CustomFilterShader::defaultFragmentShaderString): (WebCore::CustomFilterShader::CustomFilterShader): (WebCore::CustomFilterShader::~CustomFilterShader): * platform/graphics/filters/CustomFilterShader.h: Added. * platform/graphics/filters/FECustomFilter.cpp: Added. (WebCore::orthoMatrix): (WebCore::FECustomFilter::FECustomFilter): (WebCore::FECustomFilter::create): (WebCore::FECustomFilter::platformApplySoftware): (WebCore::FECustomFilter::dump): (WebCore::FECustomFilter::externalRepresentation): * platform/graphics/filters/FECustomFilter.h: Added. * platform/graphics/gpu/Texture.cpp: * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::toColumnMajorFloatArray): * platform/graphics/transforms/TransformationMatrix.h: * rendering/FilterEffectObserver.h: Copied from Source/WebCore/loader/cache/CachedShader.cpp. (WebCore::FilterEffectObserver::~FilterEffectObserver): * rendering/FilterEffectRenderer.cpp: (WebCore::isWebGLEnabled): (WebCore::FilterEffectRenderer::FilterEffectRenderer): (WebCore::FilterEffectRenderer::build): (WebCore::FilterEffectRenderer::notifyFinished): * rendering/FilterEffectRenderer.h: (WebCore::FilterEffectRenderer::create): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): (WebCore::RenderLayer::filterNeedsRepaint): * rendering/RenderLayer.h: * rendering/style/StyleCachedShader.h: (WebCore::StyleCachedShader::cachedShader): * rendering/style/StyleShader.h: (WebCore::StyleShader::cachedShader): 2011-12-18 Keishi Hattori Implement UI WebKit chromium part https://bugs.webkit.org/show_bug.cgi?id=65897 Reviewed by Darin Fisher. * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h 2011-12-17 Keishi Hattori Refactor input type color WebCore part https://bugs.webkit.org/show_bug.cgi?id=74591 Reviewed by Kent Tamura. Changing ColorChooser to address issues raised in Bug 65897. Chrome::createColorChooser will return a WebCore::ColorChooser instance so the WebCore side (ColorInputType) and call the WebKit side. We pass the ColorChooserClient as an argument to Chrome::createColorChooser so the WebKit side can call callbacks, didEndChooser and didChooseColor. * html/ColorInputType.cpp: (WebCore::ColorInputType::~ColorInputType): (WebCore::ColorInputType::setValue): (WebCore::ColorInputType::handleDOMActivateEvent): Calls createColorChooser to open the color chooser. (WebCore::ColorInputType::detach): (WebCore::ColorInputType::didEndChooser): Release the ColorChooser object. (WebCore::ColorInputType::endColorChooser): (WebCore::ColorInputType::updateColorSwatch): Added argument so it will compile again. * html/ColorInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::selectColorInColorChooser): * loader/EmptyClients.h: (WebCore::EmptyChromeClient::createColorChooser): * loader/FrameLoader.cpp: * page/Chrome.cpp: (WebCore::Chrome::createColorChooser): Opens the color chooser. Returns a ColorChooser PassOwnPtr. * page/Chrome.h: * page/ChromeClient.h: * platform/ColorChooser.h: (WebCore::ColorChooser::~ColorChooser): (WebCore::ColorChooser::setSelectedColor): (WebCore::ColorChooser::endChooser): * platform/ColorChooserClient.h: Added. 2011-12-17 Sam Weinig Make PlatformTouchEvent inherit from PlatformEvent https://bugs.webkit.org/show_bug.cgi?id=74777 Reviewed by Andreas Kling. * platform/PlatformEvent.h: Add TouchEvent types. * platform/PlatformTouchEvent.h: (WebCore::PlatformTouchEvent::PlatformTouchEvent): Make inherit from PlatformEvent. * platform/blackberry/PlatformTouchEventBlackBerry.cpp: (WebCore::touchEventType): (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/efl/PlatformTouchEventEfl.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/qt/PlatformTouchEventQt.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): Make necessary changes to work with new base class. 2011-12-17 Andreas Kling Cache and reuse the HTMLAllCollection returned by document.all. Reviewed by Antti Koivisto. Let Document cache the document.all collection, just like we do for the other collections (.links, .images, etc.) This is primarily a memory optimization, as repeated calls to document.all will no longer cause collection objects to stack up. Tests: fast/dom/document-collection-idempotence.html fast/dom/gc-9.html * dom/Document.h: * dom/Document.cpp: (WebCore::Document::all): Cache the HTMLAllCollection and reuse it across calls instead of creating a new one each time. * html/HTMLAllCollection.h: * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::create): (WebCore::HTMLAllCollection::HTMLAllCollection): Make the HTMLAllCollection constructor take a Document* to enforce the fact that it's the only way it should ever be created. * html/HTMLAllCollection.idl: * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Custom reachability code for JSC, same as HTMLCollection. 2011-12-17 Andreas Kling HTMLCollection: Simplify itemAfter(). Reviewed by Antti Koivisto. Whether to do deep traversal of children depends on m_type which doesn't change after construction, so move that decision there by caching it in a "m_includeChildren" bit. Also factored out the big switch statement in itemAfter() into an isAcceptableElement() function. Last and least, use fastHasAttribute() to check for itempropAttr since it's not SVG animatable. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): (WebCore::HTMLCollection::itemAfter): * html/HTMLCollection.h: 2011-12-17 Andreas Kling TagNodeList: Optimize nodeMatches() for the common case. Reviewed by Antti Koivisto. Reject based on tag name mismatch before comparing the namespaces, as this case is vastly more common. nodeMatches() is very hot on the DOM Query (Dojo) test on Dromaeo. This change takes it from 8.3% to 7.7% on my MBP. * dom/TagNodeList.cpp: (WebCore::TagNodeList::nodeMatches): 2011-12-17 Andreas Kling NameNodeList: Use fastGetAttribute() in nodeMatches(). Reviewed by Darin Adler. It's safe and slightly more efficient to use fastGetAttribute() for HTMLNames::nameAttr here. * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): 2011-12-17 Andreas Kling CSSPrimitiveValue: Inline getIdent(). Reviewed by Antti Koivisto. Inline the trivial getIdent(), the same as its getFoo() siblings. * css/CSSPrimitiveValue.cpp: * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getIdent): 2011-12-17 Andreas Kling CSSStyleSelector: Clean up matchRules(). Reviewed by Antti Koivisto. - Early return from the isCollectingRulesOnly() path to reduce nesting. - Move the creation of m_ruleList out of the loop that builds the list. - Removed some comments from the Captain Obvious department. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRules): 2011-12-17 Andreas Kling RuleSet: Remove style sheet null-check in addRulesFromSheet(). Reviewed by Antti Koivisto. Replace the "sheet" null-check in addRulesFromSheet() by an assertion. The only call-site where it could be null was when adding rules from an @import'ed sheet, so add a check there instead. * css/CSSStyleSelector.cpp: (WebCore::RuleSet::addRulesFromSheet): 2011-12-17 Andreas Kling CSSStyleSelector: Clean up getColorFromPrimitiveValue(). Reviewed by Antti Koivisto. Rename getColorFromPrimitiveValue() to colorFromPrimitiveValue() and rework it to be a bit more readable. * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::colorFromPrimitiveValue): (WebCore::CSSStyleSelector::createFilterOperations): * css/CSSStyleSelector.h: * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): 2011-12-17 Kenichi Ishibashi Text dispappear when SVG font has no latin character https://bugs.webkit.org/show_bug.cgi?id=71765 Reviewed by Nikolas Zimmermann. Initialize SVG font metrics even if the font doesn't contain latin characters. Test: svg/custom/svg-fonts-no-latin-glyph.html * svg/SVGFontData.cpp: (WebCore::SVGFontData::initializeFontData): Initializes metrics even if the zeroGlyphPage doesn't exist. 2011-12-17 David Barton Radical sign drawn incorrectly due to refactoring typo https://bugs.webkit.org/show_bug.cgi?id=74780 Reviewed by Dan Bernstein. LayoutTests/mathml/presentation/roots.xhtml shows the bug, but apparently its .png checksum is ok so run-webkit-tests can't detect the problem. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::paint): In revision 88250, one paintOffset should have been adjustedPaintOffset. 2011-12-17 Adrienne Walker [chromium] Reverting r103011, r103135 due to Aura test failures Unreviewed gardening. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::~ContentLayerChromium): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::notifySyncRequired): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::setParent): (WebCore::LayerChromium::setMaskLayer): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::setRootLayer): 2011-12-16 Chris Marrin Hardware acceleration of W3C Filter Effects https://bugs.webkit.org/show_bug.cgi?id=68479 Reviewed by Simon Fraser. Tests: css3/filters/effect-blur-hw.html css3/filters/effect-combined-hw.html css3/filters/effect-drop-shadow-hw.html css3/filters/effect-grayscale-hw.html css3/filters/effect-hue-rotate-hw.html css3/filters/effect-invert-hw.html css3/filters/effect-opacity-hw.html css3/filters/effect-saturate-hw.html css3/filters/effect-sepia-hw.html Implement hardware acceleration of filters. If a filter is on a RenderLayer and that layer has a GraphicsLayer, a test is done to see if the desired filter can be rendered in hardware. If so, skip rendering it when painting, and add the filters to the CALayer. Currently Mac only, using CoreImage. Animation is done in software, with the filters being recreated every frame. There are some fidelity issues with the software renderer, but those will be dealt with as bugs to be fixed. * platform/graphics/GraphicsLayer.h: Pass down FilterOperations (WebCore::GraphicsLayer::filter): (WebCore::GraphicsLayer::setFilter): * platform/graphics/ca/GraphicsLayerCA.cpp: Deferred passdown of FilterOperations to PlatformCALayer (WebCore::GraphicsLayerCA::setFilter): (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateFilter): (WebCore::GraphicsLayerCA::ensureStructuralLayer): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: Mac implementation using CI (PlatformCALayer::setFilter): (PlatformCALayer::filterCanBeComposited): Static function to tell GraphicsLayer if this Filter object can be rendered * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::operator=): * platform/graphics/filters/FilterOperations.h: (WebCore::FilterOperations::FilterOperations): * rendering/RenderLayer.cpp: Pass filter object to GraphicsLayer (WebCore::RenderLayer::rendersFilter): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::updateOrRemoveFilterEffect): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): (WebCore::RenderLayerBacking::updateLayerFilter): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerBacking.h: (WebCore::RenderLayerBacking::canCompositeFilter): 2011-12-17 Philippe Normand Unreviewed, GTK build fix after r103131. * GNUmakefile.list.am: Fix typo... s/.cop/.cpp 2011-12-16 Benjamin Poulain FEComposite does not build when you disable filters on ARMv7 https://bugs.webkit.org/show_bug.cgi?id=74772 Reviewed by David Kilzer. Add the missing ENABLE(FILTERS). * platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp: * platform/graphics/filters/arm/FECompositeArithmeticNEON.h: 2011-12-16 Ryosuke Niwa Mac build fix after r103104. * WebCore.xcodeproj/project.pbxproj: 2011-12-16 Adam Klein Consolidate before-advice regarding attribute modification into a single method https://bugs.webkit.org/show_bug.cgi?id=74752 Reviewed by Ryosuke Niwa. Adds a willModifyAttribute method to Element, meant to be called before an attribute on that Element is added/removed/changed. Replace most calls to Element::updateId and all calls to Element::enqueueAttributesMutationRecordIfRequested with calls to willModifyAttribute. Moreover, enqueueAttributesMutation... can now be private since its only caller is willModifyAttribute. The only remaining direct calls to updateId are in cases the entire NamedNodeMap is being replaced. These are implementation details of WebCore that shouldn't be exposed via MutationObservers. No new tests, no expected change in behavior. * dom/Attr.cpp: (WebCore::Attr::setValue): (WebCore::Attr::childrenChanged): Besides the above change, use a StringBuilder to build up value, and only do String -> AtomicString conversion once. * dom/Element.cpp: (WebCore::Element::setAttributeInternal): * dom/Element.h: (WebCore::Element::willModifyAttribute): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): 2011-12-16 James Robinson [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired https://bugs.webkit.org/show_bug.cgi?id=74376 Reviewed by Kenneth Russell. CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper scheduling decision. This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic. There is a large amount of unit test coverage for this change, largely in LayerChromiumTest * platform/graphics/chromium/GraphicsLayerChromium.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::insertChild): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCScopedThreadProxy.h: (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown): 2011-12-16 Adam Klein Fix typo in MarkupTokenBase: rename takeAtributes to takeAttributes https://bugs.webkit.org/show_bug.cgi?id=74766 Reviewed by Darin Adler. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::attributesForIsindexInput): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::takeAttributes): 2011-12-16 Adam Barth