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