blob: f9c333c6f71ffe30b0bc5f9e5918547a4b653357 [file] [log] [blame]
2011-02-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
Currently JSObject is both directly instantiated for regular JS objects, and
derived to implement subtypes. A consequence of this is that we need to ensure
that sufficient space from the cell is left unused and available for any data
members that will be introduced by subclasses of JSObject. By restructuring
the internal storage array out of JSObject we can increase the size in the
internal storage for regular objects.
Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
much additional capacity as is currently available to allow for data members
in subclasses. JSFinalObject utilizes all available space for internal storage,
and only allows construction through JSFinalObject::create().
* bindings/js/JSDOMWindowShell.h:
Update JSObject -> JSNonFinalObject.
2011-02-16 Carol Szabo <carol.szabo@nokia.com>
Reviewed by David Hyatt.
REGRESSION: Use after free in WebCore::RenderCounter::destroyCounterNode
https://bugs.webkit.org/show_bug.cgi?id=54478
Test: fast/css/counters/render-tree-reorg-crash.html
* rendering/RenderCounter.cpp:
(WebCore::findPlaceForCounter):
Fixed typo. The code was still walking sometimes the renderer tree
instead of the element tree as intended.
2011-02-16 Hans Wennborg <hans@chromium.org>
Reviewed by Jeremy Orlow.
IndexedDB: Inject auto increment keys via key path on insertion
https://bugs.webkit.org/show_bug.cgi?id=54457
Inject auto increment keys via key path for object stores using key
path and auto increment.
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::LocalContext::getNthValueOnKeyPath):
(WebCore::createIDBKeyFromSerializedValueAndKeyPath):
(WebCore::injectIDBKeyIntoSerializedValue):
* bindings/v8/IDBBindingUtilities.h:
* platform/chromium/PlatformBridge.h:
* storage/IDBKeyPathBackendImpl.cpp:
(IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
* storage/IDBKeyPathBackendImpl.h:
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::injectKeyIntoKeyPath):
(WebCore::IDBObjectStoreBackendImpl::selectKeyForPut):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
* storage/IDBObjectStoreBackendImpl.h:
* storage/chromium/IDBKeyPathBackendImpl.cpp:
(WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
2011-02-16 Sergio Villar Senin <svillar@igalia.com>
Reviewed by Martin Robinson.
[Gtk] Add support for layoutTestController.setWillSendRequestClearHeader
https://bugs.webkit.org/show_bug.cgi?id=54537
Headers removed from the SoupMessage should be also removed from
the ResourceRequest when updating the latter from the former.
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateFromSoupMessage):
2011-02-16 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: split all the functions of Inspector backend API by domain.
https://bugs.webkit.org/show_bug.cgi?id=54558
We have a number of functions from different domains in single instance of InspectorBackend.
It'd be better to split the functions by their domains.
As example 'evaluate' will be moved from InspectorBackend to RuntimeAgent container.
* inspector/CodeGeneratorInspector.pm:
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.evaluateInTargetWindow):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel.prototype._reloadResources):
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype._projectChanged):
(WebInspector.BreakpointManager.prototype.restoreDOMBreakpoints):
(WebInspector.BreakpointManager.prototype._saveBreakpoints):
(WebInspector.DOMBreakpoint.prototype._enable):
(WebInspector.DOMBreakpoint.prototype._disable):
(WebInspector.EventListenerBreakpoint.prototype._enable):
(WebInspector.EventListenerBreakpoint.prototype._disable):
(WebInspector.XHRBreakpoint.prototype._enable):
(WebInspector.XHRBreakpoint.prototype._disable):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype.getStylesAsync):
(WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
(WebInspector.CSSStyleModel.prototype.getInlineStyleAsync):
(WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
(WebInspector.CSSStyleModel.prototype.setRuleSelector):
(WebInspector.CSSStyleModel.prototype.addRule.callback):
(WebInspector.CSSStyleModel.prototype.addRule):
(WebInspector.CSSStyleModel.prototype._styleSheetChanged):
(WebInspector.CSSStyleModel.prototype._onRevert):
(WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
(WebInspector.CSSProperty.prototype.setText):
(WebInspector.CSSProperty.prototype.setDisabled):
(WebInspector.CSSStyleSheet.createForId):
(WebInspector.CSSStyleSheet.prototype.setText):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.requestClearMessages):
(WebInspector.ConsoleView.prototype.completions):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent):
(WebInspector.ConsoleView.prototype.evalInInspectedWindow):
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView.prototype._deleteCookie):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype.getChildNodesAsync):
(WebInspector.DOMAgent.prototype.setAttributeAsync):
(WebInspector.DOMAgent.prototype.removeAttributeAsync):
(WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
(WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync):
(WebInspector.Cookies.getCookiesAsync):
(WebInspector.EventListeners.getEventListenersForNodeAsync):
* inspector/front-end/DOMStorage.js:
(WebInspector.DOMStorage.prototype.getEntries):
(WebInspector.DOMStorage.prototype.setItem):
(WebInspector.DOMStorage.prototype.removeItem):
* inspector/front-end/Database.js:
(WebInspector.Database.prototype.getTableNames):
(WebInspector.Database.prototype.executeSql):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.enableDebugger):
(WebInspector.DebuggerModel.prototype.disableDebugger):
(WebInspector.DebuggerModel.prototype.continueToLocation):
(WebInspector.DebuggerModel.prototype.setBreakpoint):
(WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
(WebInspector.DebuggerModel.prototype.removeBreakpoint):
(WebInspector.DebuggerModel.prototype.editScriptSource):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype.setDocument):
(WebInspector.ElementsPanel.prototype.searchCanceled):
(WebInspector.ElementsPanel.prototype.performSearch):
(WebInspector.ElementsPanel.prototype.handleCopyEvent):
(WebInspector.ElementsPanel.prototype.setSearchingForNode):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
(WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
():
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionWatchSidebarPane.prototype.setExpression):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
(WebInspector.ExtensionServer.prototype._onReload):
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager):
(WebInspector.NetworkManager.prototype.reset):
(WebInspector.NetworkManager.prototype.requestContent):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkDataGridNode.prototype._openInNewTab):
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileView):
(WebInspector.CPUProfileType.prototype.buttonClicked):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._clearProfiles):
(WebInspector.ProfilesPanel.prototype._removeProfileHeader):
(WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
(WebInspector.ProfilesPanel.prototype._toggleProfiling):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
* inspector/front-end/PropertiesSidebarPane.js:
(WebInspector.PropertiesSidebarPane.prototype.update):
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.resolveNode):
(WebInspector.RemoteObject.prototype.getProperties):
(WebInspector.RemoteObject.prototype.setPropertyValue):
(WebInspector.RemoteObject.prototype.pushNodeToFrontend):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameTreeElement.prototype.onselect):
(WebInspector.FrameTreeElement.prototype.set hovered):
(WebInspector.FrameResourceTreeElement.prototype.ondblclick):
* inspector/front-end/Script.js:
(WebInspector.Script.prototype.requestSource):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
(WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
(WebInspector.ScriptsPanel.prototype._togglePause):
(WebInspector.ScriptsPanel.prototype._stepOverClicked):
(WebInspector.ScriptsPanel.prototype._stepIntoClicked):
(WebInspector.ScriptsPanel.prototype._stepOutClicked):
(WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._hidePopup):
* inspector/front-end/TestController.js:
(WebInspector.TestController.prototype.notifyDone):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype.update):
* inspector/front-end/WorkersSidebarPane.js:
(WebInspector.WorkersSidebarPane.prototype.setInstrumentation):
* inspector/front-end/inspector.js:
(WebInspector.highlightDOMNode):
(WebInspector.doLoadedDone):
(WebInspector.openResource):
(WebInspector.documentKeyDown):
2011-02-16 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Martin Robinson.
[GTK] events missing when a document is (re)loaded
https://bugs.webkit.org/show_bug.cgi?id=25831
Make sure webArea returns a proper name and that a signal
'state-change::defunct' is emitted when detaching the wrapper.
Test: platform/gtk/accessibility/document-reload-events.html
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_get_name): Returns the current document's title
as fallback mechanism for webArea objects.
(webkit_accessible_detach): Emit 'state-change::defunct' function
as soon as the wrapper is detached from the related core object.
2011-02-15 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Pixel tests differences on 10.6.6 32bit vs. 64bit
https://bugs.webkit.org/show_bug.cgi?id=54474
When generating a SVG pixel test baseline with a vanilla 10.6.6 installation on a 32bit machine (Core Duo MBP)
and comparing the run with a software-identical 64bit machine (Core 2 Duo MBP), there are about 250 differences.
These fall in two categories:
a) 1px differences in text AA, or when drawing circles (all _below_ a tolerance of 0.01). Only visible in the subtracted difference image.
The reason is probably CGFloat being typedefed to double on 64bit machines, and float on 32bit machines.
AffineTransform stores doubles, so on 32bit machines we loose precision from AffineTransform -> CGAffineTransform.
b) Failures >0.1% (text origin/scale is slightly different, user-visible).
Caused by several sources of numerical instabilities within the SVG rendering code.
-> SVGPreserveAspectRatio::getCTM() computes an AffineTransform using doubles as input parameters, but floats are passed (like everywhere else in SVG).
This method is used to compute the viewBox AffineTransform, that affects the rendering of every content in the document. RenderSVGRoot concats
this transformation matrix to the GraphicsContext CTM, resulting in a source of numerical imprecision.
-> SVGInlineTextBox::paintTextWithShadows() calculates a scaling factor for text, to scale up the specified font size, to the actual on-screen size.
SVGInlineTextBox uses the scaled Font object, to draw in an unscaled context, that gets scaled up again afterwards.
context->scale(1 / scalingFactor); scaledFont.drawText(); context->scale(scalingFactor);
To remove the scale from the current GraphicsContext CTM, "context->scale(FloatSize(1 / scalingFactor, ...)" is used. As AffineTransform stores
doubles internally, it's likely that "context->scale(FloatSize(1 / ctm.a(), .." doesn't give you a matrix with a=1, but something close to 1.
Using "context->concatCTM(AffineTransform().scale(1 / ctm.a(), ..." could be used as workaround, to preserve double precision.
Fixing that brings us down to just a few pixel tests that differ between 32 & 64bit. There is still numerical imprecision, as floating-point
number representations aren't always precise. Unfortunately CoreGraphics doesn't provide a public way to just set a CTM, it only allows to concat them.
Fortunately CGContextSetCTM() is available, as private method, that allows me to switch the context CTM to any arbitary CGAffineTransform.
-> Add GraphicsContext::setCTM(const AffineTransform&) and implement it for all platforms (each explicitely exposes a 'setCTM' concept, except CG)
Use CGContextSetCTM() for CG, which appears to be present since at least 10.4, Cairo is using it for the same purpose since some years!
-> Instead of scaling the GraphicsContext before drawing text, grab the current CTM using context->getCTM(), scale it by '1 / scalingFactor'
normalize the transform (look for values close to 0/1 using float precision, and round!), and assign it using context->setCTM(normalizedTransform).
After drawing, just switch back to the preserved original CTM, both operations need GraphicsContext::setCTM.
This fixes all pixel test differences between 32/64 bit machines that fall into category b).
The use of GraphicsContext::setCTM() allows to switch between arbitary context transformations _without_ inducing accumulated rounding imprecision.
These combined patches fix the pixel test baseline changes.
Updated existing Snow Leopard pixel test baseline with a 32bit machine, passes here with tolerance 0.
The 64bit machine passes the baseline with tolerance 0.01.
* platform/graphics/GraphicsContext.h: Add setCTM(const AffineTransform&) method.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setCTM): Implement setCTM.
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
(WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setCTM): Ditto.
* platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
(WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
* platform/graphics/chromium/GLES2Canvas.cpp:
(WebCore::GLES2Canvas::setCTM): Ditto.
* platform/graphics/chromium/GLES2Canvas.h:
* platform/graphics/haiku/GraphicsContextHaiku.cpp:
(WebCore::GraphicsContext::setCTM): Ditto.
* platform/graphics/openvg/GraphicsContextOpenVG.cpp:
(WebCore::GraphicsContext::setCTM): Ditto.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::setCTM): Ditto.
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::setCTM): Ditto.
* platform/graphics/win/GraphicsContextWin.cpp:
(WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContextPlatformPrivate::concatCTM):
(WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
(WebCore::GraphicsContext::setCTM):
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::setCTM): Ditto.
* rendering/svg/SVGInlineTextBox.cpp: Use setCTM() to switch to a scale-free AffineTransform, and also to switch back to the original CTM after rendering text.
(WebCore::normalizeTransform):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
* svg/SVGPreserveAspectRatio.cpp: s/double/float/.
(WebCore::SVGPreserveAspectRatio::getCTM):
* svg/SVGPreserveAspectRatio.h:
* svg/SVGSVGElement.cpp: Simplify viewport() code, avoid using doubles.
(WebCore::SVGSVGElement::viewport):
2011-02-16 Andreas Kling <kling@webkit.org>
Reviewed by Dirk Schulze.
SVGAnimateElement incorrectly uses Color::nameForRenderTreeAsText()
https://bugs.webkit.org/show_bug.cgi?id=54547
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::applyResultsToTarget):
2011-02-14 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Landing detailed heap snapshots, part 3.
https://bugs.webkit.org/show_bug.cgi?id=54385
Provide node classes for data grid views:
- summary -- list of objects by constuctor;
- diff -- summaries btw two snapshots;
- explorer -- explore heap graph;
- dominators tree;
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/DetailedHeapshotGridNodes.js: Added.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotFilteredOrderedIterator):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.incInstancesCount):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get instancesCount):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.resetInstancesCount):
(WebInspector.HeapSnapshotEdgesProvider):
(WebInspector.HeapSnapshotNodesProvider):
* inspector/front-end/PleaseWaitMessage.js:
(WebInspector.PleaseWaitMessage.prototype.get instance):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
2011-02-16 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r78655.
http://trac.webkit.org/changeset/78655
https://bugs.webkit.org/show_bug.cgi?id=54543
Causes too many test failures in chromium (Requested by
mnaganov on #webkit).
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventTarget.cpp:
(WebCore::toJS):
* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::V8AbstractEventListener::invokeEventHandler):
* dom/EventTarget.cpp:
* dom/EventTarget.h:
* storage/IDBRequest.cpp:
* storage/IDBRequest.h:
2011-02-16 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: move Database and DOMStorage related things from InspectorAgent to the corresponding agents.
https://bugs.webkit.org/show_bug.cgi?id=54455
Some set of instrumentation calls should work even if we have no InspectorFrontend instance and corresponding agents.
At the moment we are using InspectorAgent instance for such calls.
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::createFrontendLifetimeAgents):
(WebCore::InspectorAgent::pushDataCollectedOffline):
(WebCore::InspectorAgent::didCommitLoad):
* inspector/InspectorAgent.h:
(WebCore::InspectorOfflineResourcesBase::~InspectorOfflineResourcesBase):
(WebCore::InspectorOfflineResourcesBase::InspectorOfflineResourcesBase):
(WebCore::InspectorAgent::databaseAgentResources):
(WebCore::InspectorAgent::domStorageAgentResources):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::Resources::clear):
(WebCore::InspectorDOMStorageAgent::Resources::pushDataCollectedOffline):
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::createOfflineStorage):
(WebCore::InspectorDOMStorageAgent::selectDOMStorage):
(WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
(WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
* inspector/InspectorDOMStorageAgent.h:
(WebCore::InspectorDOMStorageAgent::create):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::Resources::clear):
(WebCore::InspectorDatabaseAgent::Resources::pushDataCollectedOffline):
(WebCore::InspectorDatabaseAgent::didOpenDatabase):
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
(WebCore::InspectorDatabaseAgent::createOfflineStorage):
(WebCore::InspectorDatabaseAgent::databaseForId):
(WebCore::InspectorDatabaseAgent::selectDatabase):
* inspector/InspectorDatabaseAgent.h:
(WebCore::InspectorDatabaseAgent::create):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
2011-02-15 John Sullivan <sullivan@apple.com>
Reviewed by Antti Koivisto.
Dan Bernstein came up with this fix while we debugged it. I just typed.
https://bugs.webkit.org/show_bug.cgi?id=54532
On platforms without platformWidgets, going Back to a scrolled page
draws at the top-left before drawing at the restored scroll position
<rdar://problem/8998838>
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
Don't send the didFirstLayout and didFirstVisuallyNonEmptyLayout callbacks
for nested layouts. Doing so was causing ScrollView::setScrollPosition()
to short-circuit.
2011-02-15 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed.
[Qt][V8] Buildfix. Add missing USE(JSC) guard.
* plugins/qt/PluginViewQt.cpp:
2011-02-15 Ami Fischman <fischman@chromium.org>
Reviewed by David Levin.
Remove the artificial -32px shift for media controls in mediaDocuments
so that they overlap the canvas as they do in non-mediaDocuments.
This also fixes test_shell failing to update the media slider (see
linked crbug below).
https://bugs.webkit.org/show_bug.cgi?id=27798
http://crbug.com/72623
Test: media/video-controls-in-media-document.html
Added a render test that asserts that the controls show up in the
expected spot (0,208) instead of below the canvas (0,240).
* css/mediaControlsChromium.css:
2011-02-15 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
Extract a function to process ancestor and their sibling nodes from processContents
https://bugs.webkit.org/show_bug.cgi?id=54425
Extracted processAncestorsAndTheirSiblings.
* dom/Range.cpp:
(WebCore::Range::processContents): Calls processContents.
(WebCore::Range::processAncestorsAndTheirSiblings): Extracted from processContents.
* dom/Range.h:
2011-02-15 Kent Tamura <tkent@chromium.org>
Reviewed by Darin Fisher.
[Chromium] Rendering error of spin buttons on layers
https://bugs.webkit.org/show_bug.cgi?id=54427
Test: fast/forms/input-appearance-spinbutton-layer.html
* rendering/RenderThemeChromiumWin.cpp:
Add checks for multiple ThemePainter instances.
(WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
Avoid to create multiple ThemePainter instances.
2011-02-15 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Fix race condition in JavaScriptAudioNode
https://bugs.webkit.org/show_bug.cgi?id=54518
No new tests since audio API is not yet implemented.
* webaudio/JavaScriptAudioNode.cpp:
(WebCore::JavaScriptAudioNode::process):
2011-02-10 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Nate Chapin.
Throwing in an IndexedDB error or success event should lead to the transaction aborting
https://bugs.webkit.org/show_bug.cgi?id=54249
When an exception is thrown but not handled within an IDBRequests success/error event,
we should abort the transaction.
Test: storage/indexeddb/exception-in-event-aborts.html
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventTarget.cpp:
(WebCore::toJS):
* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::V8AbstractEventListener::invokeEventHandler):
* dom/EventTarget.cpp:
(WebCore::EventTarget::uncaughtExceptionInEventHandler):
* dom/EventTarget.h:
* storage/IDBRequest.cpp:
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
* storage/IDBRequest.h:
2011-02-15 Ian Henderson <ianh@apple.com>
Reviewed by Darin Adler.
To determine image properties, CG allocates memory which isn't included in CachedImage's decoded size
https://bugs.webkit.org/show_bug.cgi?id=53281
When determining properties of an image (such as its size), CG ends up
decoding part of the image. This patch adds accounting for this extra
decoded size so a cache prune can clean up the allocations.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::destroyMetadataAndNotify):
Clearing the source destroys the extra decoded data. Report this
change in decoded size to the image observer.
(WebCore::BitmapImage::cacheFrame):
The first decoded frame subsumes the data decoded when determining
image properties, so we subtract it out here.
(WebCore::BitmapImage::didDecodeProperties):
Reports the extra decoded size to the image's observer.
(WebCore::BitmapImage::size):
(WebCore::BitmapImage::currentFrameSize):
(WebCore::BitmapImage::getHotSpot):
(WebCore::BitmapImage::frameCount):
(WebCore::BitmapImage::isSizeAvailable):
(WebCore::BitmapImage::repetitionCount):
* platform/graphics/BitmapImage.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::bytesDecodedToDetermineProperties):
The default value is 0 to match the current behavior on other
platforms.
* platform/graphics/ImageSource.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::bytesDecodedToDetermineProperties):
Add a constant value for bytesDecodedToDetermineProperties(), measured
by tracing malloc/calloc calls while asking an image source for its
properties.
2011-02-15 James Robinson <jamesr@chromium.org>
Reviewed by Alexey Proskuryakov.
requestAnimationFrame callbacks should not fire within a modal dialog
https://bugs.webkit.org/show_bug.cgi?id=53188
requestAnimationFrame callbacks shouldn't fire while a modal dialog is up (like a window.alert()).
This matches Firefox and other async APIs. This patch moves the callback servicing into its own
controller class which receives notifications on suspend/resume.
Test: fast/animation/request-animation-frame-during-modal.html
* WebCore.gypi:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setJavaScriptPaused):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::suspendScriptedAnimationControllerCallbacks):
(WebCore::Document::resumeScriptedAnimationControllerCallbacks):
(WebCore::Document::webkitRequestAnimationFrame):
(WebCore::Document::webkitCancelRequestAnimationFrame):
(WebCore::Document::serviceScriptedAnimations):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::suspendScriptedAnimationControllerCallbacks):
(WebCore::ScriptExecutionContext::resumeScriptedAnimationControllerCallbacks):
* dom/ScriptedAnimationController.cpp: Added.
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::suspend):
(WebCore::ScriptedAnimationController::resume):
(WebCore::ScriptedAnimationController::registerCallback):
(WebCore::ScriptedAnimationController::cancelCallback):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
* dom/ScriptedAnimationController.h: Added.
(WebCore::ScriptedAnimationController::create):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2011-02-14 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Darin Fisher.
Add initial support for per-origin quotas to IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=54421
Add support for non-persistent per-origin quotas. If one is
specified, it overrides the default.
No tests as this is only exposed via the Chromium webkit API.
* storage/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::open):
(WebCore::IDBFactoryBackendImpl::setQuota):
* storage/IDBFactoryBackendImpl.h:
* storage/IDBFactoryBackendInterface.h:
2011-02-15 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
XSLT with output method HTML and images crashes in debug mode
https://bugs.webkit.org/show_bug.cgi?id=54462
http://trac.webkit.org/changeset/75577 created Document::setContent but
didn't notice that the code paths combined into Document::setContent
were subtly different. In particular, some of the code paths called
parser->finish() whereas other did not.
The difference is that an explicit call to parser->finish() is required
in the case where there is no frame because explicitClose doesn't call
endIfNotLoadingMainResource if there is no frame. This patch moves
that logic inside explicitClose, which is more natural.
This patch also removes removeAllChildren, which has not effect in this
situation and should never have been added in the first place.
Test: fast/parser/xslt-with-html.xml
* dom/Document.cpp:
(WebCore::Document::setContent):
(WebCore::Document::explicitClose):
2011-02-15 Oliver Hunt <oliver@apple.com>
Fix EFL build for
https://bugs.webkit.org/show_bug.cgi?id=54415
* CMakeLists.txt:
2011-02-15 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/54487> Minor header clean up in RenderLayerBacking.cpp
Reviewed by Darin Adler.
* rendering/RenderLayerBacking.cpp: Remove unused
WebGLRenderingContext.h header, and move GraphicsContext3D.h
into a #if ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)/#endif
block.
2011-02-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough and Geoff Garen.
Refactor handles and weak pointers to become nicer and more automatic
https://bugs.webkit.org/show_bug.cgi?id=54415
Update WebCore to use the new Global<> type rather than ProtectedJSValue
and gc[Un]Protect. Also update to use new WeakGCPtr APIs, and remove now
unnecessary destructors.
* ForwardingHeaders/collector/handles/Global.h: Added.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcproj/copyForwardingHeaders.cmd:
* bindings/js/JSCallbackData.h:
(WebCore::JSCallbackData::JSCallbackData):
* bindings/js/JSCustomVoidCallback.h:
* bindings/js/JSDOMBinding.cpp:
(WebCore::forgetDOMNode):
(WebCore::cacheDOMNodeWrapper):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::setWindow):
* bindings/js/JSDataGridDataSource.h:
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::setWrapper):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScheduledAction.h:
(WebCore::ScheduledAction::ScheduledAction):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptCachedFrameData.h:
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptArguments):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createWindowShell):
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::attachDebugger):
* bindings/js/ScriptController.h:
* bindings/js/ScriptFunctionCall.cpp:
(WebCore::ScriptFunctionCall::call):
(WebCore::ScriptCallback::call):
* bindings/js/ScriptObject.cpp:
(WebCore::ScriptObject::ScriptObject):
* bindings/js/ScriptObject.h:
* bindings/js/ScriptState.cpp:
(WebCore::ScriptStateProtectedPtr::ScriptStateProtectedPtr):
(WebCore::ScriptStateProtectedPtr::get):
* bindings/js/ScriptState.h:
* bindings/js/ScriptValue.cpp:
(WebCore::ScriptValue::isFunction):
(WebCore::ScriptValue::deserialize):
* bindings/js/ScriptValue.h:
(WebCore::ScriptValue::ScriptValue):
(WebCore::ScriptValue::hasNoValue):
* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::ScriptWrappable):
(WebCore::ScriptWrappable::setWrapper):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):
(WebCore::WorkerScriptController::~WorkerScriptController):
(WebCore::WorkerScriptController::initScript):
(WebCore::WorkerScriptController::evaluate):
* bindings/js/WorkerScriptController.h:
(WebCore::WorkerScriptController::workerContextWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
* bridge/NP_jsobject.cpp:
(_NPN_InvokeDefault):
(_NPN_Invoke):
(_NPN_Evaluate):
(_NPN_Construct):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::Instance):
(JSC::Bindings::Instance::~Instance):
(JSC::Bindings::Instance::willDestroyRuntimeObject):
(JSC::Bindings::Instance::willInvalidateRuntimeObject):
* bridge/jsc/BridgeJSC.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::invalidate):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::RootObject):
(JSC::Bindings::RootObject::invalidate):
(JSC::Bindings::RootObject::globalObject):
(JSC::Bindings::RootObject::updateGlobalObject):
* bridge/runtime_root.h:
* dom/EventListener.h:
* dom/EventTarget.h:
(WebCore::EventTarget::markJSEventListeners):
* xml/XMLHttpRequest.cpp:
Qt bindings courtesy of Csaba Osztrogonác
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeConnectionMethod::call):
(JSC::Bindings::QtConnectionObject::QtConnectionObject):
(JSC::Bindings::QtConnectionObject::execute):
(JSC::Bindings::QtConnectionObject::match):
* bridge/qt/qt_runtime.h:
2011-02-15 Jia Pu <jpu@apple.com>
Reviewed by Darin Adler.
Autocorrection should respect undo.
https://bugs.webkit.org/show_bug.cgi?id=52221
<rdar://problem/8663399>
Manual test: manual-tests/autocorrection/undo-autocorrection.html
When user undoes an autocorrection, we need to do four things:
1. Revert the change in text that has been made by correction.
2. Revert the selection to pre-correction state so that user can immediately continue typing.
3. Add appropriate markers to reverted text so that it won't be corrected again and/or shown
as misspelled.
4. If applicable, notify spell checking service to record this reversion.
To achieve these, this patch introduces following changes:
1. Created SpellingCorrectionCommand so that correction can be undone in similar way as any
other editing command. SpellingCorrectionCommand is a composition of SetSelectionCommand,
SpellingCorrectionRecordUndoCommand and ReplaceSelectionCommand.
2. Created SetSelectionCommand so that undo command can restore selection state.
3. Added member function recordAutocorrectionResponse() to editor client.
To improve readability, this patch also consolidates various boolean arguments in SelectionController::setSelection()
and ReplaceSelectionCommand::ReplaceSelectionCommand(). These boolean arguments have been
replaced by enum variable.
* WebCore.exp.in: Updated for changes in Editor and ReplaceSelectionCommand.
* WebCore.xcodeproj/project.pbxproj: Updated for new source files.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs): Adopted new signature of ReplaceSelectionCommand::create().
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment): Ditto.
(WebCore::Editor::unappliedEditing): Cleaned up trailing whitespace.
(WebCore::Editor::reappliedEditing): Ditto.
(WebCore::Editor::selectComposition): Adopted new signature of SelectionController::setSelection().
(WebCore::Editor::confirmComposition): Ditto.
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Rearranged code to reduce the
level of deeply nested if statement. Adopted SpellingCorrectionCommand.
(WebCore::Editor::applyCorrectionPanelInfo): Adopted SpellingCorrectionCommand.
(WebCore::Editor::unappliedSpellCorrection): Function for adding markers to reverted text and
for notifiying editor client about undone correction.
(WebCore::Editor::changeSelectionAfterCommand): Adopted new signature of SelectionController::setSelection().
(WebCore::Editor::respondToChangedSelection): Use SelectionController::SetSelectionOptions
instead of boolean variables.
* editing/Editor.h: Added Editor::unappliedSpellCorrection().
* editing/EditorCommand.cpp:
(WebCore::executeInsertFragment): Adopted new signature of ReplaceSelectionCommand::create().
* editing/MoveSelectionCommand.cpp:
(WebCore::MoveSelectionCommand::doApply): Ditto.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Replaced all boolean arguments
with an enum value.
* editing/ReplaceSelectionCommand.h:
(WebCore::ReplaceSelectionCommand::create): Ditto.
* editing/SelectionController.cpp: Adopted new signature of SelectionController::setSelection().
(WebCore::SelectionController::moveTo):
(WebCore::SelectionController::setSelection):
(WebCore::SelectionController::respondToNodeModification):
(WebCore::SelectionController::setBase):
(WebCore::SelectionController::setExtent):
(WebCore::SelectionController::setSelectedRange):
* editing/SelectionController.h:
(WebCore::SelectionController::setSelection): Replaced all boolean arguments with an enum value.
* editing/SetSelectionCommand.cpp: Added.
(WebCore::SetSelectionCommand::SetSelectionCommand):
(WebCore::SetSelectionCommand::doApply):
(WebCore::SetSelectionCommand::doUnapply):
* editing/SetSelectionCommand.h: Added.
(WebCore::SetSelectionCommand::create):
* editing/mac/SpellingCorrectionCommand.cpp: Added.
(WebCore::SpellingCorrectionRecordUndoCommand::create):
(WebCore::SpellingCorrectionRecordUndoCommand::SpellingCorrectionRecordUndoCommand):
(WebCore::SpellingCorrectionRecordUndoCommand::doApply):
(WebCore::SpellingCorrectionRecordUndoCommand::doUnapply):
(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
(WebCore::SpellingCorrectionCommand::doApply):
* editing/mac/SpellingCorrectionCommand.h: Added.
(WebCore::SpellingCorrectionCommand::create):
* loader/EmptyClients.h: Updated for the new function declared in EditorClient.
(WebCore::EmptyEditorClient::recordAutocorrectionResponse):
* manual-tests/autocorrection/undo-autocorrection.html: Added.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected): Adopted new signature of ReplaceSelectionCommand::create().
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag): Ditto.
* page/EditorClient.h: Added EditorClient::recordAutocorrectionResponse().
2011-02-15 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
Speculative fix for <rdar://problem/8998498> CrashTracer: [USER]
8 crashes in WebProcess calling setOverlayScrollerState:forceImmediately:
My best guess is that this is crashing because
willRemoveVerticalScrollbar()/Horizontal was not being called
properly from the RenderLayer destructor.
Call willRemoveVerticalScrollbar()/Horizontal from destroyScrollbar()
so that all current and future scrollbar-destroyers will properly
call this function. And only do it for native scrollers.
(WebCore::RenderLayer::destroyScrollbar):
(WebCore::RenderListBox::destroyScrollbar):
For consistency's sake, I also moved didAddVerticalScrollbar()
/Horizontal to createScrollbar(). Again, only call for native
scrollers.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderListBox::createScrollbar):
These functions no longer call didAdd/willRemove.
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::setHasVerticalScrollbar):
Remove unnecessary ScrollableArea::-prefix
* platform/ScrollView.cpp:
(WebCore::ScrollView::setHasHorizontalScrollbar):
(WebCore::ScrollView::setHasVerticalScrollbar):
2011-02-15 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by David Kilzer.
Cleanup Some Potential ENABLE(INSPECTOR) Related Building Issues
https://bugs.webkit.org/show_bug.cgi?id=54048
* WebCore.exp.in: moved inspector only export into ENABLE(INSPECTOR) block.
* bindings/js/ScriptHeapSnapshot.h: include no longer needed.
2011-02-15 Stephen White <senorblanco@chromium.org>
Reviewed by James Robinson.
[chromium] clearRect() is incorrect in accelerated 2D canvas.
https://bugs.webkit.org/show_bug.cgi?id=54497
When doing GPU-Canvas2D clearRect() using the fast path (glClear()),
we were not correctly converting from canvas to screen coordinates.
Fixed by inverting the rectangle in Y, and changing
SharedGraphicsContext3D::scissor to take glScissor-like parameters.
Covered by fast/canvas/canvas-strokeRect.html.
* platform/graphics/chromium/GLES2Canvas.cpp:
(WebCore::GLES2Canvas::clearRect):
Flip the Y coord of the rectangle passed to scissor().
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3D::scissor):
* platform/graphics/gpu/SharedGraphicsContext3D.h:
Give scissor() the same param types as GraphicsContext3D::scissor().
2011-02-15 Pratik Solanki <psolanki@apple.com>
Move WTF_USE_CFNETWORK to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=54168
Reviewed by Darin Adler.
* config.h: Remove WTF_USE_CFNETWORK.
2011-02-15 Kenneth Russell <kbr@google.com>
Reviewed by Darin Fisher.
Allow controlling minimum DOMTimer interval on a per-page basis
https://bugs.webkit.org/show_bug.cgi?id=54312
Renamed DOMTimer::minTimerInterval and setMinTimerInterval to
defaultMinTimerInterval and setDefaultMinTimerInterval, made them
private and exposed them via Settings::defaultMinDOMTimerInterval
and setDefaultMinDOMTimerInterval. Added new
Settings::setMinDOMTimerInterval and minDOMTimerInterval.
The storage for the minimum timer interval currently lives in the
Page, though this could be moved to the Settings object if
desired. The accessor methods on the Page are private and exposed
to Settings by making Settings a friend, so the abstraction
barrier is clear at the API level.
Adjusting the interval both upward and downward may cause the fire
times of the active timers on the page to be adjusted, if they
would be affected by the clamping value. This is needed to reduce
latency when bringing a tab to the foreground, in particular if
the minimum timer interval was decreased from a very high value to
a very low value.
A new method, setMinimumTimerInterval, has been added to
LayoutTestController, implemented in all ports of DumpRenderTree,
and used in new layout tests.
Ideally changing the page's minimum timer interval would affect
dedicated workers, but this is too much to do in an initial patch,
so a FIXME has been added.
Tested with:
- The new layout tests on the WebKit Mac and Chromium (Mac,
Linux) DRT ports.
- Hooked up the new API in Chromium and ran some simple manual
tests.
Tests: fast/dom/timer-increase-min-interval-and-reset-part-1.html
fast/dom/timer-increase-min-interval-and-reset-part-2.html
fast/dom/timer-increase-min-interval.html
fast/dom/timer-increase-then-decrease-min-interval.html
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::minimumTimerInterval):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
(WebCore::ScriptExecutionContext::minimumTimerInterval):
* dom/ScriptExecutionContext.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::adjustMinimumTimerInterval):
(WebCore::DOMTimer::intervalClampedToMinimum):
* page/DOMTimer.h:
(WebCore::DOMTimer::defaultMinTimerInterval):
(WebCore::DOMTimer::setDefaultMinTimerInterval):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setMinimumTimerInterval):
(WebCore::Page::minimumTimerInterval):
* page/Page.h:
* page/Settings.cpp:
(WebCore::Settings::setDefaultMinDOMTimerInterval):
(WebCore::Settings::defaultMinDOMTimerInterval):
(WebCore::Settings::setMinDOMTimerInterval):
(WebCore::Settings::minDOMTimerInterval):
* page/Settings.h:
* platform/Timer.h:
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::augmentRepeatInterval):
2011-02-15 Simon Fraser <simon.fraser@apple.com>
Reviewed by Beth Dakin.
Fix scrollbar rendering crash when rendered into a layer
https://bugs.webkit.org/show_bug.cgi?id=54494
Remove code added in r78394 which was intended to find out whether
a scrollbar was being rendered into a compositing layer. r78612
obviated the need for this code.
* page/FrameView.h:
* platform/ScrollableArea.h:
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
2011-02-15 Simon Fraser <simon.fraser@apple.com>
Let Xcode have its way with the project.
* WebCore.xcodeproj/project.pbxproj:
2011-02-15 Simon Fraser <simon.fraser@apple.com>
Fix Mac builds that don't use rubber-band scrolling
by moving m_drawingIntoLayer out of the #ifdef.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2011-02-15 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[Freetype] Better map CSS font weight to Fontconfig font weight
https://bugs.webkit.org/show_bug.cgi?id=54323
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::fontWeightToFontconfigWeight): Added this helper to map between CSS and
Fontconfig font weights.
(WebCore::FontCache::createFontPlatformData): Use the new helper instead of just
deciding between bold and regular.
2011-02-15 Simon Fraser <simon.fraser@apple.com>
Reviewed by Sam Weinig.
Fix scrollbar rendering crash when rendered into a layer
https://bugs.webkit.org/show_bug.cgi?id=54494
The scroller delegate was failing to return a layer in a case
where the scroller was still rendering into a GraphicsLayer, because
even though WebCore had switched out of compositing mode, the
DrawingAreaImpl was still rendering into its nonCompositedContent
layer. This happens when the m_exitCompositingTimer timer hasn't fired
yet.
The fix is to track whether we're drawing into a layer via the
GraphicsContext, rather than asking about compositing layers.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setIsCALayerContext):
(WebCore::GraphicsContext::isCALayerContext):
Getter and setter for the bit that says if we're rendering into a CALayer.
* platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
Store a bool for whether this context targets a layer.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents): Call setIsCALayerContext(true).
* platform/mac/ScrollAnimatorMac.h:
(WebCore::ScrollAnimatorMac::setIsDrawingIntoLayer):
(WebCore::ScrollAnimatorMac::isDrawingIntoLayer):
New methods to get and set a flag that says when we're
drawing into a layer, so that the delegate can get at this state.
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollbarPainterDelegate layer]): Use isDrawingIntoLayer()
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Init the flag.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::unregisterScrollbar): Whitespace.
(WebCore::ScrollbarThemeMac::paint): Push the "isDrawingIntoLayer"
state down onto ScrollAnimatorMac, getting it from the GraphicsContext.
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Add NPP_GetSitesWithData and NPP_URLRedirectNotify to the NPAPI headers
https://bugs.webkit.org/show_bug.cgi?id=54481
We should really sync all headers with the NPAPI repository, but doing that
lead to build errors so I just added what was needed.
* bridge/npapi.h:
Add new functions.
* bridge/nptypes.h:
Sync with the official NPAPI repository, adding 64-bit integer types and
removing a duplicate license header.
* plugins/npfunctions.h:
Add new functions.
2011-02-15 Antti Koivisto <antti@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=54486
Crashes under CachedResourceLoader::revalidateResource
CachedResourceLoader might get deleted from under one of its methods.
Try to catch a more informative crash stack.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::setAutoLoadImages):
(WebCore::CachedResourceLoader::load):
(WebCore::CachedResourceLoader::loadDone):
(WebCore::CachedResourceLoader::preload):
(WebCore::CachedResourceLoader::requestPreload):
* loader/cache/CachedResourceLoader.h:
2011-02-15 Andreas Kling <kling@webkit.org>
Reviewed by Darin Adler.
Optimize Color::serialized()
https://bugs.webkit.org/show_bug.cgi?id=54452
Apply the optimizations from CSSPrimitiveValue::cssText() [CSS_RGBCOLOR]
to Color::serialized() - build the serialized color strings manually
instead of using String::format().
* platform/graphics/Color.cpp:
(WebCore::appendHexNumber):
(WebCore::Color::serialized):
2011-02-15 Jarred Nicholls <jarred@sencha.com>
Reviewed by Alexey Proskuryakov.
XMLHttpRequest::abort() doesn't clear response data
https://bugs.webkit.org/show_bug.cgi?id=54118
Properly clear all buffer data on abort, so no memory hangs around unnecessarily.
No new tests because there is no observable effect except for less memory used.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::abort):
2011-02-15 Andreas Kling <kling@webkit.org>
Reviewed by Darin Adler.
Rename Color::name() to Color::nameForRenderTreeAsText()
https://bugs.webkit.org/show_bug.cgi?id=54464
Color::name() returns the color as either #RRGGBB or #RRGGBBAA.
Since the latter is not a valid CSS color, it can't be re-parsed
by WebKit, and should only be used in DRT dumps.
* editing/ApplyStyleCommand.cpp:
(WebCore::StyleChange::extractTextStyles):
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* platform/graphics/Color.cpp:
(WebCore::Color::nameForRenderTreeAsText):
* platform/graphics/Color.h:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::externalRepresentation):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
(WebCore::writeRenderSVGTextBox):
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::applyResultsToTarget):
* svg/SVGColor.cpp:
(WebCore::SVGColor::cssText):
2011-02-15 Andras Becsi <abecsi@webkit.org>
Rubber-stamped by Andreas Kling.
[Qt] Typo fix.
No new tests needed.
* WebCore.pro: add missing ASCII to header name.
2011-02-15 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: test whether inspector gets populated with databases and storages upon opening.
https://bugs.webkit.org/show_bug.cgi?id=54469
Tests: http/tests/inspector-enabled/database-open.html
http/tests/inspector-enabled/dom-storage-open.html
* inspector/front-end/DOMStorage.js:
* inspector/front-end/Database.js:
(WebInspector.DatabaseDispatcher.prototype.addDatabase):
2011-02-15 Andreas Kling <kling@webkit.org>
Reviewed by Darin Adler.
Share the helper functions used by Latin-1 and UTF-8 text codecs
https://bugs.webkit.org/show_bug.cgi?id=54446
Move MachineWord, UCharByteFiller and the other helper functions
into TextCodecASCIIFastPath.h where they can be used by both
TextCodecUTF8 and TextCodecLatin1.
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/text/TextCodecASCIIFastPath.h: Added.
(WebCore::isAllASCII):
(WebCore::copyASCIIMachineWord):
(WebCore::isAlignedToMachineWord):
(WebCore::alignToMachineWord):
* platform/text/TextCodecLatin1.cpp:
(WebCore::TextCodecLatin1::decode):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::decode):
2011-02-15 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Kent Tamura.
Code style issue in WebCore/dom/InputElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=54428
Remove 2 extra spaces in InputElement.cpp line 221.
Code style fix, No new tests.
* dom/InputElement.cpp:
(WebCore::InputElement::handleBeforeTextInsertedEvent):
2011-02-15 Philippe Normand <pnormand@igalia.com>
Reviewed by Martin Robinson.
[GStreamer] Video player sets system volume to 100%
https://bugs.webkit.org/show_bug.cgi?id=54140
Don't explicitely set volume at startup and use the
GstStreamVolume interface with cubic volume scale when
updating/retrieving the volume value. This gives a much better
user-experience.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2011-02-15 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Sketch script-src for Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=54381
This patch provides a sketch of the script-src directive. We still do
not parse the value of the directive, and the wiring into the rest of
WebCore is incorrect, but those are things we can fix in future
patches. For the momemnt, this patch lets us test what we're doing.
Test: http/tests/security/contentSecurityPolicy/script-loads-with-img-src.html
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirective::CSPDirective):
(WebCore::CSPDirective::allows):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
(WebCore::ContentSecurityPolicy::canLoadExternalScriptFromSrc):
(WebCore::ContentSecurityPolicy::parse):
(WebCore::ContentSecurityPolicy::emitDirective):
* page/ContentSecurityPolicy.h:
2011-02-15 Antti Koivisto <antti@apple.com>
Reviewed by Andreas Kling.
svg/custom/use-css-no-effect-on-shadow-tree.svg produces empty image on Chromium Linux after r58556
https://bugs.webkit.org/show_bug.cgi?id=54460
Don't use fast path for SVG. There are some additional rules for shadow trees that are not
implemented on fast path.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::checkSelector):
2011-02-15 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Redesign the build system
https://bugs.webkit.org/show_bug.cgi?id=51339
Part 1.
Introduce CodeGenerators.pri and add common includepaths to WebCore.pri,
thus unnecessary duplications can be removed from project files.
No new tests needed.
* CodeGenerators.pri: Copied from Source/WebCore/WebCore.pri.
Don't add non-source generated files to SOURCES.
* DerivedSources.pro: Change WebCore.pri to CodeGenerators.pri.
* WebCore.pri: Move code generation rules to CodeGenerators.pri.
* WebCore.pro: Move common options to WebCore.pri.
2011-02-15 Charlie Reis <creis@chromium.org>
Reviewed by Mihai Parparita.
Crash in WebCore::FrameLoader::continueLoadAfterNavigationPolicy
https://bugs.webkit.org/show_bug.cgi?id=54219
Ensures we do not start a new navigation while we are in the process of
stopping a navigation. Also adds a manual test, since the crash can
only be reproduced using the back button and not history.back().
* loader/FrameLoader.cpp:
* manual-tests/navigation-during-onload-triggered-by-back.html: Added.
* manual-tests/resources/navigation-during-onload-container.html: Added.
2011-02-15 Bill Budge <bbudge@chromium.org>
Reviewed by David Levin.
SubresourceLoader should expose finish time
https://bugs.webkit.org/show_bug.cgi?id=54287
No tests needed, exposes no new functionality
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didFinishLoading):
* loader/DocumentThreadableLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):
* loader/SubresourceLoaderClient.h:
(WebCore::SubresourceLoaderClient::didFinishLoading):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didFinishLoading):
* loader/cache/CachedResourceRequest.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::didFinishLoading):
* loader/icon/IconLoader.h:
2011-02-15 Antti Koivisto <antti@apple.com>
Reviewed by Darin Adler.
Enable fast path selector checking for child and subselector combinators
https://bugs.webkit.org/show_bug.cgi?id=54360
* css/CSSStyleSelector.cpp:
(WebCore::isFastCheckableSelector):
(WebCore::fastCheckSingleSelector):
(WebCore::checkClassValue):
(WebCore::checkIdValue):
(WebCore::checkTagValue):
(WebCore::CSSStyleSelector::SelectorChecker::fastCheckSelector):
2011-02-15 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: console auto-scroll is broken when there are both scrollers.
https://bugs.webkit.org/show_bug.cgi?id=54273
* inspector/front-end/utilities.js:
(Element.prototype.isScrolledToBottom): use clientHeight instead of offsetHeight to determine
whether the element is scrolled to the bottom.
2011-02-14 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: highlighter works incorrect at build.chromium.org WebKit cells
https://bugs.webkit.org/show_bug.cgi?id=53910
Use enclosingBoundingBox for the absolute margin quad as the reference box for a tooltip.
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::drawNodeHighlight):
2011-02-15 Dirk Schulze <krit@webkit.org>
Rubber-stamped by Nikolas Zimmermann.
SVG animation doesn't support attribute value 'inherit'
https://bugs.webkit.org/show_bug.cgi?id=54410
Accidently replaced start value RegularPropertyValue for m_fromPropertyValueType
and m_toPropertyValueType by CurrentColorValue before landing. Check for property
value type 'inherit' on color validation was missing.
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndToValues):
(WebCore::SVGAnimateElement::calculateFromAndByValues):
2011-02-15 Adam Roben <aroben@apple.com>
Windows build fix after r78533
* WebCore.vcproj/WebCore.vcproj: Fix bad XML syntax.
2011-02-15 Gavin Peters <gavinp@chromium.org>
Reviewed by Antti Koivisto.
SharedBuffer::buffer() does not do what you think.
https://bugs.webkit.org/show_bug.cgi?id=54420
No new tests.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::resourceContentBase64):
* platform/SharedBuffer.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode):
(WebCore::JPEGImageDecoder::decode):
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode):
2011-02-15 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
SVG animation doesn't support attribute value 'inherit'
https://bugs.webkit.org/show_bug.cgi?id=54410
SVG animation does not support 'inherit' as value for CSS property animations. With the patch, SVG determines
if the attribute of the target element is an animatable CSS Property and computes the style during the
animation.
This fixes the following tests on the W3C test suite:
* animate-elem-84-t.svg
* animate-elem-85-t.svg
Tests: svg/animations/animate-currentColor.html
svg/animations/animate-inherit-css-property.html
* svg/SVGAnimateElement.cpp:
(WebCore::adjustForCurrentColor):
(WebCore::adjustForInheritance):
(WebCore::SVGAnimateElement::calculateAnimatedValue): When a property value is 'inherit' or 'currentColor'
during the animation, get the computed style of the property since the values could be animated themselves.
(WebCore::inheritsFromProperty):
(WebCore::attributeValueIsCurrentColor):
(WebCore::SVGAnimateElement::calculateFromAndToValues): Check if 'from', 'by' or 'to' value has the
string 'inherit' or 'currentColor' and if the attribute supports one of these values.
(WebCore::SVGAnimateElement::calculateFromAndByValues): Ditto.
* svg/SVGAnimateElement.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Check if target element is stylable and
the attribute is an animatable CSS property by using the CSS property map in SVGStyledElement.
(WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): s/target/targetElement/ for consistency.
* svg/SVGAnimationElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::isAnimatableCSSProperty): Checks if the CSS property is animatable.
* svg/SVGStyledElement.h:
* svg/animation/SMILTimeContainer.cpp: Use the new function isTargetAttributeCSSProperty to determine
if the target element is stylable and the attribute is an animatable CSS property.
(WebCore::SMILTimeContainer::baseValueFor):
2011-02-15 Antti Koivisto <antti@apple.com>
Reviewed by Andreas Kling.
r78499 causes assertion failure in http/tests/xmlhttprequest/cache-override.html
https://bugs.webkit.org/show_bug.cgi?id=54418
Check for zero buffer length.
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::decode):
2011-02-15 MORITA Hajime <morrita@google.com>
Unreviewed build fix.
* page/EditorClient.h: Changed GrammarDetail forward declaration from class to struct.
2011-01-26 MORITA Hajime <morrita@google.com>
Reviewed by Ryosuke Niwa.
Refactoring: Extract TextCheckerClient from EditorClient
https://bugs.webkit.org/show_bug.cgi?id=53213
Created new abstract class TextCheckerClient. The class has
spellcheck related API which is split.
This is the first step for sharing spell-checking codebase
between ports. A standalone TextCheckerClient implementation
should be done in future changes.
No new tests. No behavioral change.
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/mac/AccessibilityObjectWrapper.mm:
(AXAttributeStringSetSpelling):
* editing/Editor.cpp: Replacing some client() call with textChecker().
(WebCore::Editor::textChecker): Added.
(WebCore::Editor::ignoreSpelling):
(WebCore::Editor::learnSpelling):
(WebCore::Editor::isSelectionMisspelled):
(WebCore::Editor::guessesForMisspelledSelection):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::Editor::correctionPanelTimerFired):
* editing/Editor.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
* editing/TextCheckingHelper.cpp: Replacing some client() call with textChecker().
(WebCore::TextCheckingHelper::findFirstMisspelling):
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
(WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
* loader/EmptyClients.h: Added EmptyTextCheckerClient.
(WebCore::EmptyTextCheckerClient::ignoreWordInSpellDocument):
(WebCore::EmptyTextCheckerClient::learnWord):
(WebCore::EmptyTextCheckerClient::checkSpellingOfString):
(WebCore::EmptyTextCheckerClient::getAutoCorrectSuggestionForMisspelledWord):
(WebCore::EmptyTextCheckerClient::checkGrammarOfString):
(WebCore::EmptyTextCheckerClient::checkTextOfParagraph):
(WebCore::EmptyTextCheckerClient::getGuessesForWord):
(WebCore::EmptyTextCheckerClient::requestCheckingOfString):
(WebCore::EmptyEditorClient::textChecker):
* page/EditorClient.h: Extracted TextCheckerClient.
* page/Page.h:
* platform/text/TextCheckerClient.h: Added.
(WebCore::TextCheckerClient::~TextCheckerClient):
2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Adam Barth.
Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
https://bugs.webkit.org/show_bug.cgi?id=52417
Added two callback functions, canCopyCut and canPaste to EditorClient. These functions
returns true iff the current frame should be able to copy/cut and paste respectively.
They take the default value determined by isDOMPasteAllowed and javaScriptCanAccessClipboard.
These callbacks allows embedders to decide whether or not copy/cut/paste should be enabled
per frame and thus per origin rather than per page.
No new tests are added since this is a WebKit/WebCore interface change.
* editing/EditorCommand.cpp:
(WebCore::supportedCopyCut): Calls canCopyCut.
(WebCore::supportedPaste): Calls canPaste.
* loader/EmptyClients.h:
(WebCore::EmptyEditorClient::canCopyCut): Added.
(WebCore::EmptyEditorClient::canPaste): Added.
* page/EditorClient.h:
2011-02-14 Jeremy Orlow <jorlow@chromium.org>
efl build fix
* CMakeLists.txt:
2011-02-11 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Nate Chapin.
Finish up implementing the new event model in IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=54331
We shouldn't have our own event subclasses. Instead, we
should just fire Event's with the proper type and bubble
settings. All the attributes on the events before should
just be on the request. IDBRequest should throw if they're
accessed before the success event fires.
* WebCore.gypi:
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* dom/Event.cpp:
* dom/Event.h:
* page/DOMWindow.idl:
* storage/IDBAbortEvent.h: Removed.
* storage/IDBCompleteEvent.cpp: Removed.
* storage/IDBCompleteEvent.h: Removed.
* storage/IDBDatabase.cpp:
(WebCore::IDBDatabase::~IDBDatabase):
* storage/IDBDatabaseException.h:
* storage/IDBDatabaseException.idl:
* storage/IDBErrorEvent.cpp: Removed.
* storage/IDBErrorEvent.h: Removed.
* storage/IDBErrorEvent.idl: Removed.
* storage/IDBEvent.h: Removed.
* storage/IDBEvent.idl: Removed.
* storage/IDBEventDispatcher.cpp:
(WebCore::IDBEventDispatcher::dispatch):
* storage/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::result):
(WebCore::IDBRequest::errorCode):
(WebCore::IDBRequest::webkitErrorMessage):
(WebCore::IDBRequest::source):
(WebCore::IDBRequest::transaction):
(WebCore::IDBRequest::readyState):
(WebCore::IDBRequest::resetReadyState):
(WebCore::IDBRequest::onError):
(WebCore::createSuccessEvent):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::dispatchEvent):
* storage/IDBRequest.h:
* storage/IDBRequest.idl:
* storage/IDBSuccessEvent.cpp: Removed.
* storage/IDBSuccessEvent.h: Removed.
* storage/IDBSuccessEvent.idl: Removed.
* storage/IDBTransaction.cpp:
(WebCore::IDBTransaction::onAbort):
(WebCore::IDBTransaction::onComplete):
(WebCore::IDBTransaction::dispatchEvent):
2011-02-14 Enrica Casucci <enrica@apple.com>
Copy/paste from a WebKit window to a TextEdit window loses fonts.
<rdar://problem/8623090>
https://bugs.webkit.org/show_bug.cgi?id=54416
Reviewed by Dan Bernstein.
We don't have the complete solution that fixes this problem for WebKit2 yet.
This patch fixes the regression in WebKit.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::writeSelection): For WebKit2 use only plain text,
for WebKit use the original API to create the NSAttributedString.
2011-02-14 Levi Weintraub <leviw@chromium.org>
Reviewed by Alexey Proskuryakov.
Strikethrough disappears when posting a message on odnoklassniki.ru
https://bugs.webkit.org/show_bug.cgi?id=53475
Changing the behavior of the strikethrough execCommand when styleWithCSS
is false. We formerly created <s> tags, which was different than both IE
and FF and caused problems with some rich text editors that would strip
out unexpected tags such as <s>.
Test: editing/execCommand/strikethrough-uses-strike-tag.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
2011-02-14 Pratik Solanki <psolanki@apple.com>
Remove dead code in FormDataStreamCFNet.cpp
https://bugs.webkit.org/show_bug.cgi?id=54401
Reviewed by Darin Adler.
The static functions in this file are no longer reachable. We added a conditional branch to
use new CFNetwork functions in r30329 and later made that code path permanent in r41517
which made these functions unreachable.
* platform/network/cf/FormDataStreamCFNet.cpp:
2011-02-14 Andreas Kling <kling@webkit.org>
Reviewed by Darin Adler.
GraphicsContext: Add clip(IntRect) overload for Qt
https://bugs.webkit.org/show_bug.cgi?id=54365
Qt has special code paths for clipping to integer rectangles.
Add a GraphicsContext::clip() overload to allow us to take
advantage of the optimized code.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clip):
* platform/graphics/GraphicsContext.h:
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::clip):
2011-02-14 Darin Adler <darin@apple.com>
Reviewed by Alexey Proskuryakov.
Add built-in decoder for UTF-8 for improved performance
https://bugs.webkit.org/show_bug.cgi?id=53898
Covered by existing tests; not adding new tests at this time.
This patch now handles errors in the same way the existing codecs do,
and so passes our tests. The first version failed some tests because
of incorrect error handling. The second version was missing one line
of code that made it decode incomplete sequences at the end of the
buffer twice.
* platform/text/TextCodecICU.cpp:
(WebCore::create): Renamed from newTextCodecICU, made a static member
function, and added a call to adoptPtr.
(WebCore::TextCodecICU::registerEncodingNames): Renamed from
registerExtendedEncodingNames since this class is no longer used for
base codecs. Removed aliases for UTF-8; now handled by TextCodecUTF8.
(WebCore::TextCodecICU::registerCodecs): Renamed.
(WebCore::fallbackForGBK): Renamed to conform to our current style.
* platform/text/TextCodecICU.h: Updated for above changes. Changed
indentation. Made most functions private, including virtual function
overrides. Marked ICUConverterWrapper noncopyable.
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::registerEncodingNames): Added the UTF-8 aliases
that were formerly added by TextCodecICU.
(WebCore::nonASCIISequenceLength): Fixed bug where this would return 4 for
bytes F5-FF instead of failing.
(WebCore::decodeNonASCIISequence): Tweaked coding style.
(WebCore::appendCharacter): Added. Makes it easier to share code between
the partial-character handling and main loop.
(WebCore::TextCodecUTF8::decode): Fixed buffer size computation for case
where there is a partial sequence. Fixed partial sequence handling so that
goto is no longer needed, since compilers sometimes make poor code when
goto is involved. Added a loop for partial sequences since we consume only
one byte when a partial sequence is invalid. Fixed logic in main decoding
loop so goto is not needed. Used early-exit style in both loops so the main
flow is not nested inside if statements. Added correct error handling for
flush when a partial sequence remains, which involved wrapping the function
in yet another loop.
* platform/text/TextCodecUTF8.h: Made virtual function overrides private.
* platform/text/TextEncodingRegistry.cpp:
(WebCore::buildBaseTextCodecMaps): Added calls to TextCodecUTF8. Removed
calls to TextCodecICU. Added FIXMEs for other codecs that no longer need
to be included here.
(WebCore::extendTextCodecMaps): Updated for the name change of the
TextCodecICU functions.
2011-02-14 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add basic parser for Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=54379
The parser in this patch is very basic. It just segments the CSP
header into directives. The exactly syntax will likely change a bit as
we discuss the details in public-web-security, but this parser will
allow us to make progress.
Sadly, this patch does not contain any tests. That's because CSP
policies do not have any observable effects yet. Hopefully we'll get
enough sketched out in the next couple patches to begin writing tests.
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirective::CSPDirective):
(WebCore::CSPDirective::name):
(WebCore::CSPDirective::value):
(WebCore::ContentSecurityPolicy::~ContentSecurityPolicy):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
(WebCore::ContentSecurityPolicy::parse):
* page/ContentSecurityPolicy.h:
2011-02-14 Andrew Wason <rectalogic@rectalogic.com>
Reviewed by Kenneth Russell.
[Qt] WebKit fails to compile for Qt when WebGL enabled
https://bugs.webkit.org/show_bug.cgi?id=53431
No new tests.
* WebCore.pro:
Add source and header files and include directory to Qt project.
* html/canvas/WebGLRenderingContext.cpp:
File uses 'emit' which is a Qt keyword - #undef emit.
* platform/graphics/gpu/qt: Added.
* platform/graphics/gpu/qt/DrawingBufferQt.cpp: Added.
Partial implementation of DrawingBuffer for Qt.
(WebCore::DrawingBuffer::DrawingBuffer):
(WebCore::DrawingBuffer::~DrawingBuffer):
(WebCore::DrawingBuffer::didReset):
(WebCore::DrawingBuffer::platformLayer):
(WebCore::DrawingBuffer::platformColorBuffer):
* platform/graphics/qt/Extensions3DQt.cpp:
Noop implementation for pure virtual methods added to Extensions3D.h
(WebCore::Extensions3DQt::blitFramebuffer):
(WebCore::Extensions3DQt::renderbufferStorageMultisample):
* platform/graphics/qt/Extensions3DQt.h:
Declare new methods added to Extensions3D.h
* platform/graphics/qt/GraphicsContext3DQt.cpp:
Remove method implementations no longer in GraphicsContext3D.h.
Change m_syntheticErrors to use unsigned int to match new
GC3Denum type.
(WebCore::GraphicsContext3D::create):
Change return type to match GraphicsContext3D.h
(WebCore::GraphicsContext3D::lineWidth):
Change argument type to GC3Dfloat to match GraphicsContext3D.h
(WebCore::GraphicsContext3D::getUniformLocation):
Change return type to GC3Dfloat to match GraphicsContext3D.h
(WebCore::GraphicsContext3D::getExtensions):
Need to call get() on OwnPtr.
(WebCore::GraphicsContext3D::getImageData):
Rename enum values to match declarations in GraphicsContext3D.h
2011-02-14 Tony Chang <tony@chromium.org>
Reviewed by Dimitri Glazkov.
<select> elements don't honor border:0px in chromium-linux
https://bugs.webkit.org/show_bug.cgi?id=51152
No new tests, covered by existing pixel results (fast/forms/basic-selects.html
convers lots of cases).
* css/themeChromiumLinux.css:
(select):
* platform/chromium/PlatformBridge.h:
* rendering/RenderThemeChromiumLinux.cpp:
(WebCore::RenderThemeChromiumLinux::paintButton):
(WebCore::RenderThemeChromiumLinux::paintMenuList):
match border logic in RenderThemeChromiumWin.cpp:
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp#L463
2011-02-14 Xiaomei Ji <xji@chromium.org>
Reviewed by Dan Bernstein.
Fix rendering of ISO-8859-8 when dir="rtl".
https://bugs.webkit.org/show_bug.cgi?id=52128
Test: fast/text/international/iso-8859-8.html
* platform/text/BidiResolver.h: Add VisualDirectionOverride enum.
(WebCore::::createBidiRunsForLine): For lines with visual direction override,
create bidi runs without resolving bidi levels (one run per render object),
set bidi level as 0 or 1 depending on LTR or RTL override,
and reverse runs for RTL override.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::constructLine): Set inline box bidi level the same as
BidiRun's bidi level without special handling of VisualDirectionOverride.
(WebCore::RenderBlock::layoutInlineChildren): Pass in VisualDirectionOverride
to createBidiRunsForLine().
2011-02-14 Alexis Menard <alexis.menard@nokia.com>
Reviewed by Andreas Kling.
[Qt] Crash on application exit after constructing and destroying a QWebView twice
https://bugs.webkit.org/show_bug.cgi?id=54000
Check the value is valid before use it.
* platform/qt/SharedTimerQt.cpp:
(WebCore::SharedTimerQt::~SharedTimerQt):
2011-02-14 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: 304 Not Modified responses have a yellow icon in Web Inspector Resources panel
https://bugs.webkit.org/show_bug.cgi?id=33220
* inspector/front-end/ResourceHeadersView.js:
(WebInspector.ResourceHeadersView.prototype._refreshHTTPInformation):
2011-02-14 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Modify LayerTilerChromium to use TilingData.
https://bugs.webkit.org/show_bug.cgi?id=54143
Most of the previous data in LayerTilerChromium is now calculated
from TilingData. TilingData was modified to allow for a dynamic
tile size and page size. LayerTilerChromium also gets its own
shader with a texture transform to handle drawing from a texture
that is larger than a tile.
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::updateAndDrawRootLayer):
(WebCore::LayerRendererChromium::initializeSharedObjects):
(WebCore::LayerRendererChromium::cleanupSharedObjects):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore::LayerRendererChromium::tilerSharedValues):
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::create):
(WebCore::LayerTilerChromium::LayerTilerChromium):
(WebCore::LayerTilerChromium::setTileSize):
(WebCore::LayerTilerChromium::reset):
(WebCore::LayerTilerChromium::contentRectToTileIndices):
(WebCore::LayerTilerChromium::tileIndex):
(WebCore::LayerTilerChromium::tileContentRect):
(WebCore::LayerTilerChromium::tileLayerRect):
(WebCore::LayerTilerChromium::layerSize):
(WebCore::LayerTilerChromium::layerTileSize):
(WebCore::LayerTilerChromium::invalidateEntireLayer):
(WebCore::LayerTilerChromium::draw):
(WebCore::LayerTilerChromium::resizeLayer):
(WebCore::LayerTilerChromium::growLayerToContain):
(WebCore::LayerTilerChromium::drawTexturedQuad):
(WebCore::LayerTilerChromium::SharedValues::SharedValues):
(WebCore::LayerTilerChromium::SharedValues::~SharedValues):
* platform/graphics/chromium/LayerTilerChromium.h:
(WebCore::LayerTilerChromium::SharedValues::tilerShaderProgram):
(WebCore::LayerTilerChromium::SharedValues::shaderSamplerLocation):
(WebCore::LayerTilerChromium::SharedValues::shaderMatrixLocation):
(WebCore::LayerTilerChromium::SharedValues::shaderAlphaLocation):
(WebCore::LayerTilerChromium::SharedValues::shaderTexTransformLocation):
(WebCore::LayerTilerChromium::SharedValues::initialized):
* platform/graphics/gpu/TilingData.cpp:
(WebCore::computeNumTiles):
(WebCore::TilingData::TilingData):
(WebCore::TilingData::setTotalSize):
(WebCore::TilingData::setMaxTextureSize):
(WebCore::TilingData::tileSizeX):
(WebCore::TilingData::tileSizeY):
(WebCore::TilingData::textureOffset):
(WebCore::TilingData::recomputeNumTiles):
* platform/graphics/gpu/TilingData.h:
2011-02-14 Andrey Adaikin <aandrey@google.com>
Reviewed by Pavel Feldman.
Web Inspector: [Text editor] First implementation of the editable TextViewer without optimization
https://bugs.webkit.org/show_bug.cgi?id=54388
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype.set readOnly):
(WebInspector.TextEditorChunkedPanel):
(WebInspector.TextEditorChunkedPanel.prototype._buildChunks):
(WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
(WebInspector.TextEditorChunkedPanel.prototype.beginDomUpdates):
(WebInspector.TextEditorChunkedPanel.prototype.endDomUpdates):
(WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
(WebInspector.TextEditorGutterChunk.prototype.set expanded):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype.set readOnly):
(WebInspector.TextEditorMainPanel.prototype._buildChunks):
(WebInspector.TextEditorMainPanel.prototype._highlightDataReady):
(WebInspector.TextEditorMainPanel.prototype._paintLine):
(WebInspector.TextEditorMainPanel.prototype.textChanged):
(WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates.return):
(WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
(WebInspector.TextEditorMainPanel.prototype._handleDOMSubtreeModified):
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
(WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
(WebInspector.TextEditorMainChunk.prototype.addDecoration):
(WebInspector.TextEditorMainChunk.prototype.removeDecoration):
(WebInspector.TextEditorMainChunk.prototype.set expanded):
2011-02-14 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: use call frame column to determine execution line in source frame.
https://bugs.webkit.org/show_bug.cgi?id=54001
- Make call frame line and column zero based
- Set execution line in source frame based on call frame line:column
- Determine currently hit breakpoint based on call frame line:column
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::update):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
* bindings/v8/DebuggerScript.js:
():
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerPaused):
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.prototype.update):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.continueToLocation):
(WebInspector.DebuggerModel.prototype._pausedScript):
(WebInspector.DebuggerModel.prototype._breakpointForCallFrame):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._debuggerPaused):
(WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine):
(WebInspector.ScriptsPanel.prototype._callFrameSelected):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._setTextViewerDecorations):
(WebInspector.SourceFrame.prototype.setExecutionLocation):
(WebInspector.SourceFrame.prototype.clearExecutionLocation):
(WebInspector.SourceFrame.prototype._setExecutionLocation):
(WebInspector.SourceFrame.prototype._breakpointAdded):
(WebInspector.SourceFrame.prototype._continueToLine):
(WebInspector.SourceFrame.prototype._originalLocationToTextViewerLineNumber):
2011-02-14 Christian Dywan <christian@lanedo.com>
Reviewed by Gustavo Noronha Silva.
Regression: Back, Forward, Reload hidden in context menu
https://bugs.webkit.org/show_bug.cgi?id=54393
* page/ContextMenuController.cpp: Always show Back, Forward,
Reload and Stop context menu items for the GTK+ port.
2011-02-14 Johnny Ding <jnd@chromium.org>
Reviewed by Andreas Kling.
Move the finiteness check into common code.
Test covered by canvas/philip/tests/2d.path.isPointInPath.nonfinite.html
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::isPointInPath):
2011-02-14 Roland Steiner <rolandsteiner@chromium.org>
Reviewed by Kent Tamura.
Bug 54377 - Clean up RenderTextControlSingleLine::createSubtreeIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=54377
Rearranged the condition blocks, removed superfluous conditions:
.) if-statements where it's already clear that a search field is being generated
.) testing for spin-buttons on field types that can never have them.
createInnerBlockStyle(): only search fields create an inner block, and
these can never have spin buttons.
No new tests. (Refactoring - covered by existing tests)
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
(WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
2011-02-10 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: refactoring, extract SourceMapping from SourceFrameContent.
https://bugs.webkit.org/show_bug.cgi?id=54195
Add SourceMapping interface with two implementations - IdenticalSourceMapping and SourceMappingForFormattedScript.
Rewrite SourceFrameContent based on SourceMapping. Make SourceFrame unaware of source mapping details.
* inspector/front-end/ResourceView.js:
(WebInspector.SourceFrameContentProviderForResource.prototype.requestContent):
* inspector/front-end/ScriptFormatter.js:
(WebInspector.ScriptFormatter.locationToPosition):
(WebInspector.ScriptFormatter.positionToLocation):
(WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
(WebInspector.ScriptFormatter.prototype.formatContent):
(WebInspector.ScriptFormatter.prototype._splitContentIntoChunks):
(WebInspector.SourceMappingForFormattedScript):
(WebInspector.SourceMappingForFormattedScript.prototype.fromScriptLocation):
(WebInspector.SourceMappingForFormattedScript.prototype.toScriptLocation):
(WebInspector.SourceMappingForFormattedScript.prototype.originalPositionToFormattedLocation):
(WebInspector.SourceMappingForFormattedScript.prototype._convertPosition):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.SourceFrameContentProviderForScript.prototype.requestContent):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._createTextViewer):
(WebInspector.SourceFrame.prototype._shouldDisplayBreakpoint):
(WebInspector.SourceFrame.prototype.setExecutionLine):
(WebInspector.SourceFrame.prototype.clearExecutionLine):
(WebInspector.SourceFrame.prototype._breakpointAdded):
(WebInspector.SourceFrame.prototype.formatSource.didFormat):
(WebInspector.SourceFrame.prototype.formatSource):
(WebInspector.SourceFrame.prototype._continueToLine):
(WebInspector.SourceFrame.prototype._setBreakpoint):
(WebInspector.SourceFrame.prototype._findBreakpoint):
(WebInspector.SourceFrameContentProvider.prototype.requestContent):
* inspector/front-end/SourceFrameContent.js:
(WebInspector.SourceFrameContent):
(WebInspector.SourceFrameContent.prototype.sourceFrameLineNumberToScriptLocation):
(WebInspector.SourceFrameContent.prototype.scriptLocationToSourceFrameLineNumber):
(WebInspector.SourceFrameContent.prototype._sourceIDForSourceFrameLineNumber):
(WebInspector.SourceMapping):
(WebInspector.SourceMapping.prototype.fromScriptLocation):
(WebInspector.SourceMapping.prototype.toScriptLocation):
(WebInspector.IdenticalSourceMapping):
(WebInspector.IdenticalSourceMapping.prototype.fromScriptLocation):
(WebInspector.IdenticalSourceMapping.prototype.toScriptLocation):
* inspector/front-end/utilities.js:
(String.prototype.lineEndings):
2011-02-14 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [REGRESSION introduced in r77950] Develop -> Start Debugging JavaScript does not open Web Inspector.
https://bugs.webkit.org/show_bug.cgi?id=54277
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::populateScriptObjects):
(WebCore::InspectorAgent::stopUserInitiatedProfiling):
(WebCore::InspectorAgent::showAndEnableDebugger):
(WebCore::InspectorAgent::showPanel):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::showAndEnableDebugger):
(WebCore::InspectorController::stopUserInitiatedProfiling):
2011-02-14 Kenichi Ishibashi <bashi@chromium.org>
Reviewed by Andreas Kling.
css style="max-width:none" works wrong
https://bugs.webkit.org/show_bug.cgi?id=53743
Fix a bug that "max-width:none" works wrong.
See also: http://trac.webkit.org/changeset/13462
Test: fast/css/max-width-none.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty): For max-width of none,
set it to Length(undefinedLength, Fixed), which is the correct
value.
2011-02-14 Antti Koivisto <antti@apple.com>
Reviewed by Andreas Kling.
REGRESSION (r77834): Assertion failing in svg/custom/use-multiple-on-nested-disallowed-font.svg
https://bugs.webkit.org/show_bug.cgi?id=54344
Intead of recomputing, just mark style selector dirty if it is invalidated in the middle of a style recalc.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::recalcStyleSelector):
* dom/Document.h:
2011-02-14 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
[Chromium] Fix wrong popup position for RTL(again)
https://bugs.webkit.org/show_bug.cgi?id=54375
Fix right position bug introduce by https://bugs.webkit.org/show_bug.cgi?id=53567, because the previous fix was correct for the current behaviour, but not good for http://crbug.com/60427. To calculate the correct right offset value and apply to the position, change WebCore::PopupContainer::layout() to return right offset value and use the returned value to calculate position.
No new tests. However we can check manually with select_dropdown_box_alignment.html, autofill_alignment.html, select_alignment.html, select_dropdown_box_alignment.html, autofill-popup-width-and-item-direction.html
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupContainer::layoutAndCalculateWidgetRect): Change the input parameter to take popupInitialCoordinate again. And calculate correct right position with returned right offset from layoutAndGetRightOffset().
(WebCore::PopupContainer::showPopup): Change the passing parameter to layoutAndCalculateWidgetRect().
(WebCore::PopupContainer::layoutAndGetRightOffset): Change the name from layout() and to return rightOffset value.
(WebCore::PopupContainer::refresh): Change the passing parameter to layoutAndCalculateWidgetRect().
* platform/chromium/PopupMenuChromium.h: Change the function name and parameters.
2011-02-14 Alejandro G. Castro <alex@igalia.com>
Unreviewed, rolling out r78451.
http://trac.webkit.org/changeset/78451
https://bugs.webkit.org/show_bug.cgi?id=53898
It is causing crashes in some bots
* platform/text/TextCodecICU.cpp:
(WebCore::newTextCodecICU):
(WebCore::TextCodecICU::registerBaseEncodingNames):
(WebCore::TextCodecICU::registerBaseCodecs):
(WebCore::TextCodecICU::registerExtendedEncodingNames):
(WebCore::TextCodecICU::registerExtendedCodecs):
(WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
(WebCore::getGbkEscape):
(WebCore::urlEscapedEntityCallback):
(WebCore::gbkCallbackEscape):
(WebCore::gbkUrlEscapedEntityCallack):
(WebCore::gbkCallbackSubstitute):
* platform/text/TextCodecICU.h:
(WebCore::ICUConverterWrapper::ICUConverterWrapper):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::registerEncodingNames):
(WebCore::nonASCIISequenceLength):
(WebCore::decodeNonASCIISequence):
(WebCore::TextCodecUTF8::decode):
* platform/text/TextCodecUTF8.h:
* platform/text/TextEncodingRegistry.cpp:
(WebCore::buildBaseTextCodecMaps):
(WebCore::extendTextCodecMaps):
2011-02-13 Antti Koivisto <antti@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=54376
Make sorting of matched rules faster
- use std::sort
- cache specificity, it is slow to compute
- inline compare function
* css/CSSStyleSelector.cpp:
(WebCore::RuleData::specificity):
(WebCore::CSSStyleSelector::matchRules):
(WebCore::compareRules):
(WebCore::CSSStyleSelector::sortMatchedRules):
(WebCore::RuleData::RuleData):
(WebCore::CSSStyleSelector::matchPageRules):
* css/CSSStyleSelector.h:
2011-02-12 Darin Adler <darin@apple.com>
Reviewed by Alexey Proskuryakov.
Add built-in decoder for UTF-8 for improved performance
https://bugs.webkit.org/show_bug.cgi?id=53898
Covered by existing tests; not adding new tests at this time.
This patch now handles errors in the same way the existing codecs do,
and so passes our tests. The previous version failed some tests because
of incorrect error handling.
* platform/text/TextCodecICU.cpp:
(WebCore::create): Renamed from newTextCodecICU, made a static member
function, and added a call to adoptPtr.
(WebCore::TextCodecICU::registerEncodingNames): Renamed from
registerExtendedEncodingNames since this class is no longer used for
base codecs. Removed aliases for UTF-8; now handled by TextCodecUTF8.
(WebCore::TextCodecICU::registerCodecs): Renamed.
(WebCore::fallbackForGBK): Renamed to conform to our current style.
* platform/text/TextCodecICU.h: Updated for above changes. Changed
indentation. Made most functions private, including virtual function
overrides. Marked ICUConverterWrapper noncopyable.
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::registerEncodingNames): Added the UTF-8 aliases
that were formerly added by TextCodecICU.
(WebCore::nonASCIISequenceLength): Fixed bug where this would return 4 for
bytes F5-FF instead of failing.
(WebCore::decodeNonASCIISequence): Tweaked coding style.
(WebCore::appendCharacter): Added. Makes it easier to share code between
the partial-character handling and main loop.
(WebCore::TextCodecUTF8::decode): Fixed buffer size computation for case
where there is a partial sequence. Fixed partial sequence handling so that
goto is no longer needed, since compilers sometimes make poor code when
goto is involved. Added a loop for partial sequences since we consume only
one byte when a partial sequence is invalid. Fixed logic in main decoding
loop so goto is not needed. Used early-exit style in both loops so the main
flow is not nested inside if statements. Added correct error handling for
flush when a partial sequence remains, which involved wrapping the function
in yet another loop.
* platform/text/TextCodecUTF8.h: Made virtual function overrides private.
* platform/text/TextEncodingRegistry.cpp:
(WebCore::buildBaseTextCodecMaps): Added calls to TextCodecUTF8. Removed
calls to TextCodecICU. Added FIXMEs for other codecs that no longer need
to be included here.
(WebCore::extendTextCodecMaps): Updated for the name change of the
TextCodecICU functions.
2011-02-13 Mark Rowe <mrowe@apple.com>
Reviewed by Maciej Stachowiak.
<rdar://problem/8995490> WebCoreAuthenticationClientAsChallengeSender doesn't implement some necessary methods.
* platform/network/mac/AuthenticationMac.mm:
(-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
(-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
2011-02-13 Simon Fraser <simon.fraser@apple.com>
Reviewed by Andreas Kling.
Repeating gradients drawn incorrectly
https://bugs.webkit.org/show_bug.cgi?id=53502
The 'forward-fill' logic for repeating gradients used the wrong
starting stop index (0 rather than the original first index), which
resulted in incorrect gradients if backwards-fill had already been
applied.
Test: fast/gradients/css3-repeating-end-fill.html
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
2011-02-13 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Andreas Kling.
Unused variable result in RenderBlock::addOverflowFromFloats()
https://bugs.webkit.org/show_bug.cgi?id=54363
Remove the unused variable.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromFloats):
2011-02-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Anders Carlsson.
WebCore fails to build with Clang's -Woverloaded-virtual
https://bugs.webkit.org/show_bug.cgi?id=54367
* loader/PingLoader.h:
(WebCore::PingLoader::didReceiveData): Change the method signature to match the signature
in the base class.
2011-02-13 Nico Weber <thakis@chromium.org>
Reviewed by Anders Carlsson.
RenderBR::width() tries but fails to override RenderText::width()
https://bugs.webkit.org/show_bug.cgi?id=54301
The superclass method's signature changed, e.g. in
http://trac.webkit.org/changeset/57215, but the subclass was not
updated.
* rendering/RenderBR.h:
(WebCore::RenderBR::width):
2011-02-13 Andreas Kling <kling@webkit.org>
Reviewed by Dirk Schulze.
Canvas: 2d.fillStyle.parse.system.html fails
https://bugs.webkit.org/show_bug.cgi?id=39168
Based on previous work by Julien Chaffraix <jchaffraix@codeaurora.org>
and Jan Erik Hanssen <jhanssen@sencha.com>
* css/CSSParser.cpp:
(WebCore::CSSParser::parseColor): Changed the function to better match our
early return policy. Also we now return false when we don't parse the color.
This is needed for createFromString to fallback to using parseSystemColor.
(WebCore::CSSParser::parseSystemColor): Made use of the RenderTheme to get
the system colors.
* css/CSSParser.h: Added the new parseSystemColor method.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setStrokeColor): Pass the document to createFromString.
(WebCore::CanvasRenderingContext2D::setFillColor): Ditto.
* html/canvas/CanvasStyle.cpp:
(WebCore::parseColor):
(WebCore::parseColorOrCurrentColor):
(WebCore::CanvasStyle::createFromString): Try to parse the color using CSSParser::parseColor
and fall back to parseSystemColor if it did not work.
* html/canvas/CanvasStyle.h: Added the new Document* parameter to createFromString.
2011-02-13 Jeremy Moskovich <jeremy@chromium.org>
Reviewed by Adam Barth.
Add a compile-time option to completely disable WebArchive support.
https://bugs.webkit.org/show_bug.cgi?id=52712
Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
ArchiveResource and ArchiveResourceCollection are notably still compiled in. They are used
in Safari for functionality such as "Save Image As" and Image copy & paste independent of
WebArchive support.
Ports Affected:
WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
This patch preserves this behavior except that it also disables support in the Chromium port.
No behavior changes so no new tests.
* WebCore.gyp/WebCore.gyp: Don't compile LegacyWebArchive.cpp and friends.
* WebCore.pro: Don't compile ArchiveFactory.cpp in Qt port.
* loader/DocumentLoader.cpp: Surround WebArchive code with #ifdef.
(WebCore::DocumentLoader::commitLoad):
(WebCore::DocumentLoader::setupForReplaceByMIMEType):
(WebCore::DocumentLoader::archiveResourceForURL):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::finishedLoadingDocument):
* loader/FrameLoader.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::start):
* loader/archive/ArchiveFactory.cpp: Remove #ifdef since feature is now enabled/disabled wholesale.
(WebCore::archiveMIMETypes):
* page/Settings.cpp:
* page/Settings.h:
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedNonImageMimeTypes):
2011-02-13 Aparna Nandyal <aparna.nand@wipro.com>
Reviewed by Andreas Kling.
[Qt] QtWebKit does not properly handle D&D of a percent-encoded URL.
https://bugs.webkit.org/show_bug.cgi?id=53320
The encoding that was done is corrected in the fix.
Replaced the KURL encoding function with QUrl API.
* platform/qt/DragDataQt.cpp:
(WebCore::DragData::asURL):
2011-02-13 Leo Yang <leo.yang.c@gmail.com>
Reviewed by Andreas Kling.
Unnecessary call of containingBlock() in RenderBoxModelObject::relativePositionOffsetX()
https://bugs.webkit.org/show_bug.cgi?id=54351
We were calling containingBlock() twice if the left is not auto. We only need to call it
once because we can use 'cb' variable in the following line.
No functionality change, no new tests.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::relativePositionOffsetX):
2011-02-13 Jarred Nicholls <jarred@sencha.com>
Reviewed by Simon Fraser.
getComputedStyle returns wrong value for margin-right
https://bugs.webkit.org/show_bug.cgi?id=13343
Matching IE, Firefox, and Opera behavior by returning the computed margin
values as specified, rather than the used/auto values (calculated via RenderBox).
Also CSS 2.1+ compliant by returning margin percentage as specified, if applicable.
Note: Firefox and Opera return calculated fixed lengths for percentage margins, IE
returns the specified percentage.
Tests: fast/css/getComputedStyle/getComputedStyle-margin-auto.html
fast/css/getComputedStyle/getComputedStyle-margin-length.html
fast/css/getComputedStyle/getComputedStyle-margin-percentage.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-02-13 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
crypto.getRandomValues should throw TYPE_MISMATCH_ERR
https://bugs.webkit.org/show_bug.cgi?id=54346
As requested by Sam.
* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
2011-02-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=54349
Inline some accessors in PrintContext
No change in behavior, so no tests.
* WebCore.exp.in:
* page/PrintContext.cpp:
* page/PrintContext.h:
(WebCore::PrintContext::pageCount):
(WebCore::PrintContext::pageRect):
Inline pageCount() and pageRect() to match pageRects().
2011-02-13 Sam Weinig <sam@webkit.org>
Roll r78424 [Extra scrolling required when scrolling with a scroll wheel (Mighty Mouse)] back
in with fixes to make it work with render layers.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorMac::adjustScrollXPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollYPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):
(WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
(WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::contentsSize):
(WebCore::RenderLayer::visibleHeight):
(WebCore::RenderLayer::visibleWidth):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::visibleHeight):
(WebCore::RenderListBox::visibleWidth):
* rendering/RenderListBox.h:
2011-02-13 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Some Scrollbar functions assume an attached ScrollableArea but can be called without one
https://bugs.webkit.org/show_bug.cgi?id=54262
Make sure that all calls to the scrollable area are null checked.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::autoscrollPressedPart):
(WebCore::Scrollbar::moveThumb):
(WebCore::Scrollbar::mouseMoved):
2011-02-13 Sam Weinig <sam@webkit.org>
Roll out r78424. It broke a bunch of tests.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):
(WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
(WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
(WebCore::RenderLayer::contentsSize):
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
2011-02-12 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
WK2: Extra scrolling required when scrolling with a scroll wheel (Mighty Mouse)
<rdar://problem/8984760>
When going down the smooth scroll path, constrained scrolls (such as those from a
Mighty Mouse) were being correctly constrained at the ScrollView level, but the
duplicate values being stored by the animator were not being constrained correctly.
In order to implement the constraint at this level, more of the ScrollableArea's API
needed to be filled in for RenderLayer and RenderListBox.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation): Call immediateScrollToPoint to stay
consistent and get the desired behavior.
(WebCore::ScrollAnimatorMac::adjustScrollXPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollYPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):
(WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
(WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
Ensure that the scroll animators view of the current scroll position is the
same as the scrollable areas by correctly clamping the value.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::contentsSize): Correct implementation
to use the scroll size, not the visible size.
(WebCore::RenderLayer::visibleHeight):
(WebCore::RenderLayer::visibleWidth):
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::visibleHeight):
(WebCore::RenderListBox::visibleWidth):
* rendering/RenderListBox.h:
Add implementations for visibleHeight/visibleWidth.
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
crypto.getRandomValues should support all integer array types
https://bugs.webkit.org/show_bug.cgi?id=54342
As discussed on whatwg, we should support all the integer array types.
Test: security/crypto-random-values-types.html
* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Mark Rowe.
Use /dev/urandom as the OSRandomSource on OS(DARWIN)
https://bugs.webkit.org/show_bug.cgi?id=54279
Update the ifdef. OS(UNIX) includes OS(DARWIN), so this change is
should be a NOP.
* config.h:
2011-02-11 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
[chromium] Allow turning off multisampling through web preference settings
https://bugs.webkit.org/show_bug.cgi?id=54321
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create): Disable multisampling in WebGL if web reference says so.
* page/Settings.cpp: Add a flag for multisampling preference.
(WebCore::Settings::Settings):
(WebCore::Settings::setOpenGLMultisamplingEnabled):
* page/Settings.h: Ditto.
(WebCore::Settings::openGLMultisamplingEnabled):
2011-02-12 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Tony Chang.
Deploy EditingStyle in applyBlockStyle and applyInlineStyle
https://bugs.webkit.org/show_bug.cgi?id=53911
Deployed EditingStyle in ApplyStyleCommand::applyBlockStyle and ApplyStyleCommand::applyInlineStyle.
Extracted EditingStyle::extractAndRemoveTextDirection from applyInlineStyle.
Also added propertiesToInclude to the argument list of EditingStyle's constructor that takes Node*
so that splitAncestorsWithUnicodeBidi can call EditingStyle::textDirection to obtain the text direction.
No new tests are added since this is a refactoring.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::doApply): Passes EditingStyle* to applyBlockStyle and applyInlineStyle.
(WebCore::ApplyStyleCommand::applyBlockStyle): Takes EditingStyle*.
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Changed the type of allowedDirection
from int to WritingDirection. Uses EditingStyle's textDirection to obtain the writing direction.
(WebCore::ApplyStyleCommand::applyInlineStyle): Takes EditingStyle*.
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Allows style to be null; exit early instead.
(WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Asserts that style is not null.
(WebCore::ApplyStyleCommand::removeInlineStyle): Allows style to be null.
* editing/ApplyStyleCommand.h: Includes WritingDirection.h; prototype changes.
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::EditingStyle): Added PropertiesToInclude to the argument.
(WebCore::EditingStyle::init): Supports PropertiesToInclude.
(WebCore::EditingStyle::extractAndRemoveTextDirection): Extracted from applyInlineStyle.
* editing/EditingStyle.h:
(WebCore::EditingStyle::create): Supports PropertiesToInclude.
2011-02-12 Jochen Eisinger <jochen@chromium.org>
Reviewed by Jeremy Orlow.
Implement IDBObjectStore::clear
https://bugs.webkit.org/show_bug.cgi?id=54193
Test: storage/indexeddb/objectstore-clear.html
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::clear):
* storage/IDBObjectStore.h:
* storage/IDBObjectStore.idl:
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::clear):
(WebCore::doDelete):
(WebCore::IDBObjectStoreBackendImpl::clearInternal):
* storage/IDBObjectStoreBackendImpl.h:
* storage/IDBObjectStoreBackendInterface.h:
2011-02-12 Adam Barth <abarth@webkit.org>
Another attempt to fix the EFL build. Looks like we're missing one
more file.
* CMakeLists.txt:
2011-02-12 Adam Barth <abarth@webkit.org>
Attempt to fix the EFL build. Apparently the CMake build had no
concept of ArrayBuffers.
* CMakeLists.txt:
2011-02-12 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed build fix.
* dom/Range.cpp:
(WebCore::lengthOfContentsInNode): Replaced static const unsigned LengthOfContentsInNode.
(WebCore::Range::processContents):
(WebCore::Range::processContentsBetweenOffsets):
2011-02-12 Adam Barth <abarth@webkit.org>
CPP files belong in SOURCES not in HEADERS. There are more errors like
this for other disabled features, but I'm not fixing them in this
patch.
* WebCore.pro:
2011-02-12 Adam Barth <abarth@webkit.org>
Apparently lines in .pro files need to be \-terminated.
* WebCore.pro:
2011-02-11 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
Extract a function to process contents for one node from Range::processContents
https://bugs.webkit.org/show_bug.cgi?id=54282
Extracted Range::processContentsBetweenOffsets, which process contents of a node
between two offsets. This function is used for the simple case where the start
and the end containers are of the same node, and to process start and end containers
in the complex case.
When the function takes a non-null fragment (simple case), it appends the processed
contents to the fragment; character data and processing instruction's contents are copied
between the offsets, and descendants are copied for node of other types (not node itself).
When the fragment is null (complex case), the function copies contents of character data,
processing instruction, and node of other types (including node itself).
No new tests are added since this is a refactoring.
* dom/Range.cpp:
(WebCore::highestAncestorUnderCommonRoot): Added.
(WebCore::Range::processContents): Calls highestAncestorUnderCommonRoot and
processContentsBetweenOffsets.
(WebCore::Range::processContentsBetweenOffsets): Added.
* dom/Range.h:
2011-02-12 Adam Barth <abarth@webkit.org>
Attempt to fix the Qt Windows build.
* WebCore.pro:
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Kenneth Russell.
Enable ArrayBuffers by default
https://bugs.webkit.org/show_bug.cgi?id=54310
As discussed on webkit-dev, ArrayBuffers are used by a bunch of
different APIs, implemented by Firefox, and appear to be stable.
Keeping them conditional is a large mantainance burden than it's worth.
* DerivedSources.cpp:
* WebCore.vcproj/WebCore.vcproj:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebGLEnabled):
* bindings/js/JSArrayBufferCustom.cpp:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDataViewCustom.cpp:
* bindings/js/JSFloat32ArrayCustom.cpp:
* bindings/js/JSInt16ArrayCustom.cpp:
* bindings/js/JSInt32ArrayCustom.cpp:
* bindings/js/JSInt8ArrayCustom.cpp:
* bindings/js/JSUint16ArrayCustom.cpp:
* bindings/js/JSUint32ArrayCustom.cpp:
* bindings/js/JSUint8ArrayCustom.cpp:
* bindings/v8/custom/V8ArrayBufferCustom.cpp:
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
* bindings/v8/custom/V8DataViewCustom.cpp:
* bindings/v8/custom/V8Float32ArrayCustom.cpp:
* bindings/v8/custom/V8Int16ArrayCustom.cpp:
* bindings/v8/custom/V8Int32ArrayCustom.cpp:
* bindings/v8/custom/V8Int8ArrayCustom.cpp:
* bindings/v8/custom/V8Uint16ArrayCustom.cpp:
* bindings/v8/custom/V8Uint32ArrayCustom.cpp:
* bindings/v8/custom/V8Uint8ArrayCustom.cpp:
* html/canvas/ArrayBuffer.cpp:
* html/canvas/ArrayBuffer.idl:
* html/canvas/ArrayBufferView.cpp:
* html/canvas/ArrayBufferView.idl:
* html/canvas/DataView.cpp:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.cpp:
* html/canvas/Float32Array.idl:
* html/canvas/Int16Array.cpp:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.cpp:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.cpp:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.cpp:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.cpp:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.cpp:
* html/canvas/Uint8Array.idl:
* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
* page/Crypto.h:
* page/Crypto.idl:
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
2011-02-11 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Darin Adler.
Background image positioning on RTL text
https://bugs.webkit.org/show_bug.cgi?id=32862
When the style of InlineFlowBox is right-to-left, the strips should be rearranged in reverse order.
Tests: fast/inline/inline-box-background-long-image.html
fast/inline/inline-box-background-repeat-x.html
fast/inline/inline-box-background-repeat-y.html
fast/inline/inline-box-background.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintFillLayer):
2011-02-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r78044.
http://trac.webkit.org/changeset/78044
https://bugs.webkit.org/show_bug.cgi?id=54318
Broke Safari extensions (Requested by eseidel on #webkit).
* platform/KURL.cpp:
(WebCore::KURL::parse):
2011-02-11 Beth Dakin <bdakin@apple.com>
Reviewed by Sam Weinig.
Fix for <rdar://problem/8976456> Scrollbars for overflow
areas never appear for WKScrollbarPainter scrollers
Call ScrollableArea::didAddVerticalScrollbar() and
ScrollableArea::willRemoveVerticalScrollbar() when
appropriate for RenderLayers.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
2011-02-11 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
KURL should remove default port numbers when cannonicalizing urls (to match every other browser)
https://bugs.webkit.org/show_bug.cgi?id=54090
* platform/KURL.cpp:
(WebCore::isDefaultPortForScheme):
(WebCore::KURL::parse):
2011-02-11 Mike Reed <reed@google.com>
Reviewed by James Robinson.
Need makeContextCurrent() called in prepareForSoftwareDraw(), in the case that skia's backend
is the gpu. This matches the pattern in GraphicsContext3DOpenGL.cpp
No new tests. All existing canvas layouttests exercise this code path
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::prepareForSoftwareDraw):
2011-02-11 Adam Klein <adamk@chromium.org>
Reviewed by Darin Adler.
Check for empty scheme before accessing URLSchemeMaps in SchemeRegistry
https://bugs.webkit.org/show_bug.cgi?id=54304
This avoids potential crashes in HashMap, as WTF's StringHash doesn't
accept empty Strings.
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure):
(WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument):
2011-02-11 Adam Klein <adamk@chromium.org>
Reviewed by Darin Fisher.
[fileapi] Add support for filesystem: URI handling
https://bugs.webkit.org/show_bug.cgi?id=53529
There are two major parts to this patch: one is to add an
implementation of Entry.toURI to the FileSystem API.
The other is to implement security origin checking for this
new scheme.
All changes are guarded by the FILE_SYSTEM feature. An accompanying
Chromium change, to support loading of filesystem: URIs, has recently
been submitted as Chromium r74082.
Spec:
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#methods-2
Proposed URI format, and discussion of security origin issues:
http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0218.html
Tests: fast/filesystem/directory-entry-to-uri.html
fast/filesystem/file-entry-to-uri.html
fast/filesystem/filesystem-uri-origin.html
http/tests/security/filesystem-iframe-from-remote.html
* fileapi/Entry.cpp:
(WebCore::Entry::toURI):
* fileapi/Entry.h:
* fileapi/Entry.idl:
- Added toURI method to the IDL, omitting the MIME type argument
specified in the spec as it will soon be removed.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
- crack the filesystem: URI to get at the origin of the site
(WebCore::SecurityOrigin::canDisplay):
- canDisplay for filesystem: URIs is equivalent to canRequest
* platform/AsyncFileSystem.cpp:
(WebCore::AsyncFileSystem::create):
(WebCore::AsyncFileSystem::openFileSystem):
* platform/AsyncFileSystem.h:
(WebCore::AsyncFileSystem::type):
- Exposed filesystem type to allow toURI to use it as part of the
path.
(WebCore::AsyncFileSystem::AsyncFileSystem):
* platform/SchemeRegistry.cpp:
(WebCore::canDisplayOnlyIfCanRequestSchemes):
(WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest):
(WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
- Generalized canDisplayOnlyIfCanRequest as it applies to both
filesystem: and blob: URIs.
* platform/SchemeRegistry.h:
2011-02-11 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
Fix for <rdar://problem/8961061> CrashTracer: [USER]
1 crash at com.apple.WebCore:
-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:] + 62
Must check for null _animator.
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
(-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2011-02-11 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Throw exception when AudioContext's createBuffer() fails to properly decode audio file data
https://bugs.webkit.org/show_bug.cgi?id=54158
No new tests since audio API is not yet implemented.
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
(WebCore::JSAudioContext::createBuffer):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::createBufferCallback):
* platform/audio/chromium/AudioBusChromium.cpp:
(WebCore::createBusFromInMemoryAudioFile):
* webaudio/AudioContext.idl:
2011-02-11 Mike Reed <reed@google.com>
Reviewed by James Robinson.
Fix toDataURL() to use device->readPixels() if need be, rather than always dereferencing
the address returned by getPixels() (as the device may not be backed by a CPU bitmap)
https://bugs.webkit.org/show_bug.cgi?id=54224
No new tests. Existing canvas tests exercise this...
fast/canvas/script-tests/canvas-createPattern-fillRect-shadow.html
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::toDataURL):
2011-02-11 Andrew Wason <rectalogic@rectalogic.com>
Reviewed by David Levin.
Files missing ENABLE_VIDEO #ifdef
https://bugs.webkit.org/show_bug.cgi?id=53390
No new tests.
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContext.idl:
Wrap methods and declarations that use HTMLVideoElement
with #if ENABLE(VIDEO).
2011-02-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r78331.
http://trac.webkit.org/changeset/78331
https://bugs.webkit.org/show_bug.cgi?id=54295
This patch broke 11 tests in GTK bots (Requested by svillar on
#webkit).
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_get_name):
(webkit_accessible_detach):
2011-02-11 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Xan Lopez.
[GDOM] Video element needs proper wrapping
https://bugs.webkit.org/show_bug.cgi?id=54231
Use the same strategy as the one used for the audio tag to wrap
video as well. No layout tests because this only adds API.
* bindings/gobject/GNUmakefile.am:
* bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
(WebKit::createVideoWrapper):
(WebKit::createHTMLElementWrapper):
2011-02-11 Dirk Schulze <krit@webkit.org>
Reviewed by Andreas Kling.
SVGStyledElement::fillAttributeToPropertyTypeMap triggers a clang warning (-Woverloaded-virtual)
https://bugs.webkit.org/show_bug.cgi?id=54259
Renamed fillAttributeToPropertyTypeMap with passed map to fillPassedAttributeToPropertyTypeMap to
avoid overloading a virtual function.
No change of functionality. Just fixing a build warning, so no new tests.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::fillAttributeToPropertyTypeMap):
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::fillAttributeToPropertyTypeMap):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::fillAttributeToPropertyTypeMap):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::fillAttributeToPropertyTypeMap):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::fillAttributeToPropertyTypeMap):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::fillAttributeToPropertyTypeMap):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::fillAttributeToPropertyTypeMap):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::fillAttributeToPropertyTypeMap):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::fillAttributeToPropertyTypeMap):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::fillAttributeToPropertyTypeMap):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::fillPassedAttributeToPropertyTypeMap):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::fillAttributeToPropertyTypeMap):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::fillAttributeToPropertyTypeMap):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::fillAttributeToPropertyTypeMap):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::fillPassedAttributeToPropertyTypeMap):
* svg/SVGGradientElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::fillAttributeToPropertyTypeMap):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::fillAttributeToPropertyTypeMap):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::fillAttributeToPropertyTypeMap):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::fillAttributeToPropertyTypeMap):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::fillAttributeToPropertyTypeMap):
* svg/SVGMissingGlyphElement.cpp:
(WebCore::SVGMissingGlyphElement::fillAttributeToPropertyTypeMap):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::fillAttributeToPropertyTypeMap):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::fillAttributeToPropertyTypeMap):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::fillAttributeToPropertyTypeMap):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::fillAttributeToPropertyTypeMap):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::fillAttributeToPropertyTypeMap):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::fillAttributeToPropertyTypeMap):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::fillPassedAttributeToPropertyTypeMap):
* svg/SVGStyledElement.h:
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::fillPassedAttributeToPropertyTypeMap):
* svg/SVGStyledTransformableElement.h:
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::fillAttributeToPropertyTypeMap):
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::fillAttributeToPropertyTypeMap):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::fillAttributeToPropertyTypeMap):
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::fillAttributeToPropertyTypeMap):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::fillPassedAttributeToPropertyTypeMap):
* svg/SVGTextContentElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::fillAttributeToPropertyTypeMap):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::fillAttributeToPropertyTypeMap):
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::fillPassedAttributeToPropertyTypeMap):
* svg/SVGTextPositioningElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::fillAttributeToPropertyTypeMap):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::fillAttributeToPropertyTypeMap):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::fillAttributeToPropertyTypeMap):
2011-02-11 Andrey Adaikin <aandrey@google.com>
Reviewed by Pavel Feldman.
Web Inspector: [REGRESSION] click on error message in console doesn't scroll into view
https://bugs.webkit.org/show_bug.cgi?id=54089
* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
(WebInspector.Drawer.prototype.hide):
(WebInspector.Drawer.prototype.resize):
(WebInspector.Drawer.prototype.immediatelyFinishAnimation):
(WebInspector.Drawer.prototype._cancelAnimationIfNeeded):
(WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
(WebInspector.Drawer.prototype._animateDrawerHeight):
(WebInspector.Drawer.prototype._statusBarDragging):
* inspector/front-end/inspector.js:
(WebInspector.animateStyle):
(WebInspector.animateStyle.forceComplete):
(WebInspector.animateStyle.cancel):
(WebInspector.showSourceLine):
2011-02-10 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Make DocumentWriter a member of DocumentLoader
instead of FrameLoader.
https://bugs.webkit.org/show_bug.cgi?id=50489
Refactor, no new tests.
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::explicitClose):
(WebCore::Document::lastModified):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
* dom/Document.h:
(WebCore::Document::setDocumentLoader):
(WebCore::Document::loader):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::setupForReplaceByMIMEType):
(WebCore::DocumentLoader::setFrame):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::writer):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* loader/DocumentWriter.h:
(WebCore::DocumentWriter::setFrame):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::transitionToCommitted):
(WebCore::FrameLoader::open):
(WebCore::FrameLoader::finishedLoadingDocument):
(WebCore::FrameLoader::addExtraFieldsToRequest):
* loader/FrameLoader.h:
(WebCore::FrameLoader::notifier):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
2011-02-10 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: make InspectorAgent own sub-agents, align agent creation/deletion routines.
https://bugs.webkit.org/show_bug.cgi?id=54227
* dom/Document.cpp:
(WebCore::Document::finishedParsing):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::restoreInspectorStateFromCookie):
(WebCore::InspectorAgent::setFrontend):
(WebCore::InspectorAgent::disconnectFrontend):
(WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
(WebCore::InspectorAgent::didCommitLoad):
(WebCore::InspectorAgent::domContentLoadedEventFired):
(WebCore::InspectorAgent::loadEventFired):
(WebCore::InspectorAgent::startTimelineProfiler):
(WebCore::InspectorAgent::stopTimelineProfiler):
* inspector/InspectorAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::startListening):
(WebCore::InspectorDOMAgent::stopListening):
(WebCore::InspectorDOMAgent::mainDOMContentLoaded):
(WebCore::InspectorDOMAgent::loadEventFired):
* inspector/InspectorDOMAgent.h:
(WebCore::InspectorDOMAgent::create):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
* inspector/InspectorDOMStorageAgent.h:
(WebCore::InspectorDOMStorageAgent::create):
* inspector/InspectorDOMStorageResource.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
(WebCore::InspectorDatabaseAgent::executeSQL):
(WebCore::InspectorDatabaseAgent::selectDatabase):
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
* inspector/InspectorDatabaseAgent.h:
(WebCore::InspectorDatabaseAgent::FrontendProvider::create):
(WebCore::InspectorDatabaseAgent::FrontendProvider::~FrontendProvider):
(WebCore::InspectorDatabaseAgent::FrontendProvider::frontend):
(WebCore::InspectorDatabaseAgent::FrontendProvider::clearFrontend):
(WebCore::InspectorDatabaseAgent::FrontendProvider::FrontendProvider):
(WebCore::InspectorDatabaseAgent::create):
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
(WebCore::InspectorInstrumentation::loadEventFiredImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::domContentLoadedEventFired):
(WebCore::InspectorInstrumentation::loadEventFired):
* inspector/InspectorState.cpp:
(WebCore::InspectorState::InspectorState):
(WebCore::InspectorState::mute):
(WebCore::InspectorState::updateCookie):
* inspector/InspectorState.h:
(WebCore::InspectorState::~InspectorState):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::restore):
(WebCore::InspectorTimelineAgent::~InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::didCommitLoad):
(WebCore::InspectorTimelineAgent::setFrontend):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::create):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
2011-02-11 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: command line API $0 regressed.
https://bugs.webkit.org/show_bug.cgi?id=54283
* inspector/InjectedScriptSource.js:
2011-02-11 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Andreas Kling.
[Qt][S60] Vertical borders of buttons and frames are misaligned
https://bugs.webkit.org/show_bug.cgi?id=51169
Force anti-aliasing for lines and rects when using OpenVG backend on Symbian.
OpenVG cannot guarantee rendering to be on pixel in floating point co-ordinates
without anti-aliasing. Patch idea by Laszlo Agocs.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2011-02-11 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Xan Lopez.
[GTK] events missing when a document is (re)loaded
https://bugs.webkit.org/show_bug.cgi?id=25831
Make sure webArea returns a proper name and that a signal
'state-change::defunct' is emitted when detaching the wrapper.
Test: platform/gtk/accessibility/document-reload-events.html
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_get_name): Returns the current document's title
as fallback mechanism for webArea objects.
(webkit_accessible_detach): Emit 'state-change::defunct' function
as soon as the wrapper is detached from the related core object.
2011-02-11 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: command line's API inspect() is broken.
https://bugs.webkit.org/show_bug.cgi?id=54275
Test: inspector/command-line-api.html
* inspector/InjectedScriptSource.js:
2011-02-11 Adam Barth <abarth@webkit.org>
Turns out window.crypto is supposed to be readonly.
* page/DOMWindow.idl:
2011-02-11 Adam Barth <abarth@webkit.org>
Actually add Crypto.cpp to the Windows build. I'm terrible.
* WebCore.vcproj/WebCore.vcproj:
2011-02-11 Adam Barth <abarth@webkit.org>
Attempt to fix the Windows build. Apparently we don't support
conditional attributes on functions. This patch makes the whole Crypto
interface conditional on ArrayBuffer support.
* page/DOMWindow.idl:
* page/Crypto.cpp:
* page/Crypto.h:
* page/Crypto.idl:
2011-02-10 Antti Koivisto <antti@apple.com>
Reviewed by Dave Hyatt.
Enable ancestor identifier filtering for tree building
https://bugs.webkit.org/show_bug.cgi?id=54241
Call CSSStyleSelector::push/popParent() during tree building too, fix up the parent
element stack as needed.
This roughly halves the remaining time in style matching over a typical page load.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::pushParentStackFrame):
(WebCore::CSSStyleSelector::popParentStackFrame):
(WebCore::CSSStyleSelector::pushParent):
(WebCore::CSSStyleSelector::popParent):
* css/CSSStyleSelector.h:
(WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
* dom/Document.h:
(WebCore::Document::styleSelectorIfExists):
* dom/Element.cpp:
(WebCore::Element::beginParsingChildren):
(WebCore::Element::finishParsingChildren):
* dom/Element.h:
2011-02-10 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
WebKit should have a cryptographic RNG
https://bugs.webkit.org/show_bug.cgi?id=22049
Add crypto.getRandomValues. Yes, all these diffs are required to
expose a single function to the DOM.
Test: security/crypto-random-values.html
* Android.mk:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* ForwardingHeaders/wtf/CryptographicallyRandomNumber.h: Added.
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pri:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/v8/custom/V8DOMWindowCustom.cpp:
* config.h:
* page/Crypto.cpp: Added.
(WebCore::Crypto::Crypto):
(WebCore::Crypto::getRandomValues):
* page/Crypto.h: Added.
(WebCore::Crypto::create):
* page/Crypto.idl: Added.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::clear):
(WebCore::DOMWindow::crypto):
* page/DOMWindow.h:
(WebCore::DOMWindow::optionalCrypto):
* page/DOMWindow.idl:
2011-02-11 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix.
[GTK] Build break with 2.18.3
https://bugs.webkit.org/show_bug.cgi?id=54057
* platform/gtk/ScrollbarThemeGtk2.cpp: Include GtkVersioning.h
2011-02-11 Cosmin Truta <ctruta@chromium.org>
Reviewed by Adam Barth.
Templatize KURLGooglePrivate::init
https://bugs.webkit.org/show_bug.cgi?id=53749
No new tests. Refactoring.
* platform/KURLGoogle.cpp:
(WebCore::KURLGooglePrivate::init):
* platform/KURLGooglePrivate.h:
2011-02-10 Andy Estes <aestes@apple.com>
Reviewed by Eric Seidel.
Convert ContainerNode::firstElementChild() to a free function.
https://bugs.webkit.org/show_bug.cgi?id=54269
No new tests. No change in behavior.
It seemed incorrect to have a method on ContainerNode that had the
concept of an Element but couldn't return an Element*, but a method on
Element could not be called by holders of ContainerNodes or other
non-Element ContainerNode subclasses. A free function can both return
an Element* and be called by anyone with a ContainerNode*.
* dom/ContainerNode.h:
(WebCore::ContainerNode::lastChild):
(WebCore::Node::lastChild):
* dom/Document.cpp:
(WebCore::Document::cacheDocumentElement):
* dom/Element.cpp:
(WebCore::Element::firstElementChild):
* dom/Element.h:
(WebCore::firstElementChild):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2011-02-10 Mads Ager <ager@chromium.org>
Reviewed by Nate Chapin.
[V8] Don't crash on exception getting event handler function
https://bugs.webkit.org/show_bug.cgi?id=54216
Check for exceptions when attempting to get the handleEvent property
of an event-handler object.
Test: fast/dom/exception-getting-event-handler.html
* bindings/v8/V8EventListener.cpp:
(WebCore::V8EventListener::getListenerFunction):
2011-02-10 Naoki Takano <takano.naoki@gmail.com>
Reviewed by James Robinson.
[Chromium] Layout Test canvas/philip/tests/2d.composite.globalAlpha.fill.html with --accelerated-2d-canvas.
https://bugs.webkit.org/show_bug.cgi?id=53857
globalAlpha is not applied to fillPath() and fillRect().
Test: fast/canvas/2d.composite.globalAlpha.fillPath.html and canvas/philip/tests/2d.composite.globalAlpha.fill.html with --accelerated-2d-canvas.
* platform/graphics/chromium/GLES2Canvas.cpp:
(WebCore::GLES2Canvas::State::applyAlpha): Append a new function to apply global alpha when fillRect() and fillPath() are called.
(WebCore::GLES2Canvas::fillRect): Global alpha is applied to m_fillColor.
(WebCore::GLES2Canvas::fillPath): Global alpha is applied to m_fillColor.
2011-02-10 Andy Estes <aestes@apple.com>
Reviewed by Adam Barth.
Remove an unneeded argument from HTMLDocument::create().
https://bugs.webkit.org/show_bug.cgi?id=54268
Now that HTMLTreeBuilder no longer uses a dummy HTMLDocument for
fragment parsing, there isn't a need to explicitly specify a baseURL
when constructing an HTMLDocument. We can remove the unneeded argument.
Also fix some style issues in Document.h and HTMLDocument.h caught by
check-webkit-style.
No new tests. No change in behavior.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::HTMLDocument):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::create):
2011-02-10 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Cached JavaScript Parser Data Being Left in Memory Cache
https://bugs.webkit.org/show_bug.cgi?id=54245
Added logic in CachedScript to clear SourceProviderCache data in
destroyDecodedData(). Added and changed CachedScript timeout to
act similar to CachedImage. Changed didAddClient to call super
class method instead of duplicating the logic in the derived
classes.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::didAddClient):
(WebCore::CachedScript::allClientsRemoved):
(WebCore::CachedScript::script):
(WebCore::CachedScript::destroyDecodedData):
* loader/cache/CachedScript.h:
2011-02-10 Cosmin Truta <ctruta@chromium.org>
Reviewed by David Levin.
Fix style in KURLGooglePrivate
https://bugs.webkit.org/show_bug.cgi?id=54228
Replace occurrences of NULL with 0, '\0' or null (as applicable),
to appease check-webkit-style.
No new tests. This is a style fix.
* platform/KURLGoogle.cpp:
* platform/KURLGooglePrivate.h:
2011-02-10 Andy Estes <aestes@apple.com>
Reviewed by Darin Adler.
HTML5 TreeBuilder regressed a Peacekeeper DOM test by 40%
https://bugs.webkit.org/show_bug.cgi?id=48719
The HTML5 fragment parsing algorithm specifies that a new Document
should be created to serve as the temporary parent of fragment nodes
during parsing. Document creation is expensive and accounts for ~38% of
the Peacekeeper DOM performance regression. Avoid the cost of creating
a dummy document by using the already-created DocumentFragment as the
root node during fragment parsing.
With this patch, the regression in Peacekeeper from Safari 5.0.3 to ToT
is ~24%.
Test: fast/parser/fragment-parser-doctype.html
* dom/ContainerNode.h:
(WebCore::ContainerNode::firstElementChild): Add a method that returns
the first element-typed child from a ContainerNode.
* dom/Document.cpp:
(WebCore::Document::cacheDocumentElement): Call
ContainerNode::firstElementChild() to retrieve and cache the document
element.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::HTMLConstructionSite): Initialize the
root ContainerNode.
(WebCore::HTMLConstructionSite::detach): Clear the reference to the
root ContainerNode.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
Attach the new element to the root ContainerNode.
(WebCore::HTMLConstructionSite::insertDoctype): Ditto.
(WebCore::HTMLConstructionSite::insertCommentOnDocument): Ditto.
* html/parser/HTMLConstructionSite.h: Store a pointer to a
ContainerNode that will be used as the root node for document parsing.
This node might or might not be the same as m_document.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Initialize the
HTMLConstructionSite with the correct root ContainerNode based on
whether or not we're parsing a fragment.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
Remove m_dummyDocumentForFragmentParsing.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::finished): If the
fragment has a context element, store only the children of the root
element (HTML5 Section 10.4, Step 7).
* html/parser/HTMLTreeBuilder.h:
2011-02-10 Beth Dakin <bdakin@apple.com>
Reviewed by Oliver Hunt.
Speculative fix for <rdar://problem/8971107> CrashTracer: 6 crashes
in WebProcess at com.apple.AppKit:
-[NSAnimation(NSInternal) _advanceTimeWithTimer:] + 154
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
2011-02-09 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Nate Chapin.
IndexedDB event targets need to ensure their wrappers aren't garbage collected
https://bugs.webkit.org/show_bug.cgi?id=54144
hasActivityPending should return true as long as it's possible that we'll
fire more event listeners on our event targets. It is still possible for
user generated events to run into problems, but I'm not sure how to address
that yet (or how big of a deal it is).
There's really no way to test this deterministically. Testing by hand makes
it seem like this patch works as expected though.
* storage/IDBCursorBackendImpl.cpp:
* storage/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::~IDBDatabase):
(WebCore::IDBDatabase::hasPendingActivity):
(WebCore::IDBDatabase::stop):
* storage/IDBDatabase.h:
* storage/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::hasPendingActivity):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::enqueueEvent):
* storage/IDBRequest.h:
* storage/IDBTransaction.cpp:
(WebCore::IDBTransaction::finished):
(WebCore::IDBTransaction::hasPendingActivity):
(WebCore::IDBTransaction::dispatchEvent):
(WebCore::IDBTransaction::canSuspend):
(WebCore::IDBTransaction::contextDestroyed):
(WebCore::IDBTransaction::enqueueEvent):
* storage/IDBTransaction.h:
2011-02-10 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
Reviewed by Andreas Kling.
[Qt] create pkg-config files for mingw
https://bugs.webkit.org/show_bug.cgi?id=54238
(mingw is mostly the same as unix)
This change was applied in the Qt repository (qt/src/3rdparty/webkit),
so we should do the same here in QtWebKit.
Patch by Mark Brand <mabrand@mabrand.nl>, reviewed (there) by
Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
45fe2dddc3a0677b9ec9fce09f07cd4129e37afa
* WebCore.pro:
2011-02-10 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
RenderStyle: Remove duplicate comparison of InheritedFlags::_text_transform
https://bugs.webkit.org/show_bug.cgi?id=54246
* rendering/style/RenderStyle.h:
2011-02-10 Dirk Schulze <krit@webkit.org>
Reviewed by Andreas Kling.
SVG animation avoid unnecessary adjust for currentColor
https://bugs.webkit.org/show_bug.cgi?id=54243
At the moment we try to adjust every animation value for currentColor - independent of the animation type.
Since the value is a string and the target element may needs to get called by getElementById, this could
be an expensive and unnecessary operation. Also after we adjust for currentColor, we save the result back
as a string and parse it to Color afterwards again.
With the patch we just adjust an animation value, if we use color animation. The color won't get saved and
parsed as a string again.
No change of functionality, no new tests.
* svg/SVGAnimateElement.cpp:
(WebCore::adjustForCurrentColor):
(WebCore::SVGAnimateElement::calculateFromAndToValues):
(WebCore::SVGAnimateElement::calculateFromAndByValues):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
(WebCore::SVGAnimationElement::startedActiveInterval):
2011-02-10 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
Reviewed by Andreas Kling.
[Qt] Remove the use of deprecated qFindChildren()
https://bugs.webkit.org/show_bug.cgi?id=54232
This was applied on the Qt repository and affects QtWebKit there.
(13833beb641289c45faed337848d37280195aadc)
The side effect of this change is that we won't be able to build
QtWebKit with MSVC 6, as it doesn't support member template functions
(not sure if that's possible today anyway).
Original patch from Olivier Goffart <olivier.goffart@nokia.com>, with
review reported as being from the mailing list.
The changes are result of the following commands:
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(this,* */f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(&\([^\(),]*\),* */\\2.f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*()\),* */\\2->f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\):\([^\(),]*\),* */(\\2:\\3)->f\\1(/'" qFindChild
git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\),* */\\2->f\\1(/'" qFindChild
* platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
(WebCore::MediaPlayerPrivatePhonon::MediaPlayerPrivatePhonon):
2011-02-10 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
Reviewed by Andreas Kling.
[Qt] Rename build target from "embedded" to "qpa"
https://bugs.webkit.org/show_bug.cgi?id=54233
This flag is used by Qt's configure script to enable a QPA build
("QPA is a window system agnostic implementation of Qt" --
previously known as lighthouse).
On the Qt repository, this was changed by two commits:
13a0b4935900093607f2b3b7688e1452d22770fd
(from embedded to embedded_lite)
9716e12e0f5590ebc23ad9fb7ba75c6a3c5aadab
(from embedded_lite to qpa)
* WebCore.pro:
2011-02-10 Kenneth Russell <kbr@google.com>
Reviewed by James Robinson.
Incorporate algorithm for processing paths into GPU-renderable triangle meshes
https://bugs.webkit.org/show_bug.cgi?id=45521
Adding an implementation of Loop and Blinn's GPU accelerated path
rendering algorithm from GPU Gems 3. This implementation pays
particular attention to the efficiency of the curve subdivision
phase needed for correct rendering. It utilizes the OpenGL utility
library tessellator for triangulation of the interior of the
shape. The regions handled by Loop and Blinn's algorithm are
handled by the local triangulator previously incorporated.
No tests yet; pixel tests will eventually be used to verify this
algorithm and prevent regressions.
* platform/graphics/gpu/LoopBlinnPathProcessor.cpp: Added.
(WebCore::LoopBlinnPathProcessorImplementation::Segment::Segment):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::setup):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::kind):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::getPoint):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::next):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::prev):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::setNext):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::setPrev):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::contour):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::subdivide):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::boundingBox):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::numCrossingsForXRay):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::numberOfTriangles):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::getTriangle):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::numberOfInteriorVertices):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::getInteriorVertex):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::markedForSubdivision):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::setMarkedForSubdivision):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::toString):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::computeBoundingBox):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::Contour):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::add):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::subdivide):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::begin):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::end):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::isOrientedCounterClockwise):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::setIsOrientedCounterClockwise):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::boundingBox):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::fillSide):
(WebCore::LoopBlinnPathProcessorImplementation::Contour::setFillSide):
(WebCore::LoopBlinnPathProcessorImplementation::Segment::triangulate):
(WebCore::LoopBlinnPathProcessor::LoopBlinnPathProcessor):
(WebCore::LoopBlinnPathProcessor::~LoopBlinnPathProcessor):
(WebCore::LoopBlinnPathProcessor::process):
(WebCore::LoopBlinnPathProcessor::buildContours):
(WebCore::LoopBlinnPathProcessor::allSegmentsOverlappingY):
(WebCore::LoopBlinnPathProcessor::determineSidesToFill):
(WebCore::LoopBlinnPathProcessor::determineOrientation):
(WebCore::SweepData::SweepEvent::SweepEvent):
(WebCore::SweepData::SweepEvent::setup):
(WebCore::SweepData::SweepEvent::x):
(WebCore::SweepData::SweepEvent::entry):
(WebCore::SweepData::SweepEvent::interval):
(WebCore::SweepData::SweepEvent::operator<):
(WebCore::SweepData::trianglesOverlap):
(WebCore::LoopBlinnPathProcessor::subdivideCurves):
(WebCore::LoopBlinnPathProcessor::conditionallySubdivide):
(WebCore::LoopBlinnPathProcessor::subdivideCurvesSlow):
(WebCore::TessellationState::vertexCallback):
(WebCore::TessellationState::combineCallback):
(WebCore::TessellationState::edgeFlagCallback):
(WebCore::LoopBlinnPathProcessor::tessellateInterior):
* platform/graphics/gpu/LoopBlinnPathProcessor.h: Added.
2011-02-10 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
Reviewed by Andreas Kling.
[Qt] Remove the use of deprecated qVariant*
https://bugs.webkit.org/show_bug.cgi?id=54229
This was applied on the Qt repository and affects QtWebKit there.
(633f3f45e5420663cf4ceadea79e62fea44cd2eb)
The side effect of this change is that we won't be able to build
QtWebKit with MSVC 6, as it doesn't support member template functions
(not sure if it's possible today anyway).
Original patch from Olivier Goffart <olivier.goffart@nokia.com>, with
review reported as being from the mailing list.
The changes are result of the following commands:
git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue
git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):
2011-02-10 Nico Weber <thakis@chromium.org>
Reviewed by Darin Adler.
Fix clang warning "WebCore::HTMLAreaElement::getRect' hides overloaded virtual function [-Woverloaded-virtual]"
https://bugs.webkit.org/show_bug.cgi?id=54221
The method name conflicts with ContainerNode::getRect() so rename it to
computeRect(). Rename getPath() to computePath() for consistency as
well.
No intended functionality change, covered by existing tests.
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::elementRect):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::computePath):
(WebCore::HTMLAreaElement::computeRect):
* html/HTMLAreaElement.h:
* page/SpatialNavigation.cpp:
(WebCore::virtualRectForAreaElementAndDirection):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintFocusRing):
2011-02-10 Alexis Menard <alexis.menard@nokia.com>
Reviewed by Andreas Kling.
[Qt] Default focus ring is too wide
https://bugs.webkit.org/show_bug.cgi?id=51854
We now respect the outline property and html.css defines the outline of the focus
ring to be 5px. This is propagated until GraphicsContext::drawFocusRing which uses
it as the pen size. We should ignore the size and keep a default one. I also
reverted the SolidLine to DotLine so that the selection looks nicer. Chromium Skia,
CG Win, Haiku, WinCE ports also ignore the width.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::drawFocusRingForPath):
(WebCore::GraphicsContext::drawFocusRing):
2011-02-10 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[Soup] ResourceHandleSoup does not ever call didSendData for file uploads
https://bugs.webkit.org/show_bug.cgi?id=52090
Call didSendData as body data is uploaded to the server. This is necessary
for XHR upload events to function properly.
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal): Add two new members.
One to track the total amount of body data and one to track the total amount of
body data sent so far.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::wroteBodyDataCallback): Added.
(WebCore::addFormElementsToSoupMessage): Split this out into a helper function.
Will now now sum the total amount of body data.
(WebCore::startHttp): Attach a wrote-body-data signal handler.
2011-02-10 Bill Budge <bbudge@chromium.org>
Reviewed by David Levin.
Add fields to ResourceRequest and ResourceResponse in preparation for adding CORS support to AssociatedURLLoader.
https://bugs.webkit.org/show_bug.cgi?id=53925
* platform/network/chromium/ResourceRequest.cpp:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/chromium/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::downloadToFile):
(WebCore::ResourceRequest::setDownloadToFile):
* platform/network/chromium/ResourceResponse.cpp:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/chromium/ResourceResponse.h:
(WebCore::ResourceResponse::downloadFilePath):
(WebCore::ResourceResponse::setDownloadFilePath):
2011-02-10 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
SVGAnimateElement needs information about the animated attribute type
https://bugs.webkit.org/show_bug.cgi?id=53442
For animations, we need to know the SVG property type for a XML attribute. A global static mapping between
attribute name and a type is not possible, since one attribute name can be bound to different property types:
x can be a SVGNumberList, a SVGNumber or a SVGLength. So we have to ask every target element, if it supports
the animated attribute and of which type it is. Just for CSS properties we can share an explicit mapping between
the name and the type. This is done in a static map in SVGStyledElement. All other mappings are stored in local static
HashMaps for all SVG elements with animated properties. These maps get filled once with the fillAttributeToPropertyTypeMap function
that needs to be included in every SVG element. The function is not virtual in base classes for performance reasons.
No change of functionality, so no new test cases.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::attributeToPropertyTypeMap):
(WebCore::SVGAElement::fillAttributeToPropertyTypeMap):
* svg/SVGAElement.h:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::attributeToPropertyTypeMap):
(WebCore::SVGAltGlyphElement::fillAttributeToPropertyTypeMap):
* svg/SVGAltGlyphElement.h:
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::determinePropertyType):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::attributeToPropertyTypeMap):
(WebCore::SVGCircleElement::fillAttributeToPropertyTypeMap):
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::attributeToPropertyTypeMap):
(WebCore::SVGClipPathElement::fillAttributeToPropertyTypeMap):
* svg/SVGClipPathElement.h:
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::attributeToPropertyTypeMap):
(WebCore::SVGComponentTransferFunctionElement::fillAttributeToPropertyTypeMap):
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::attributeToPropertyTypeMap):
(WebCore::SVGCursorElement::fillAttributeToPropertyTypeMap):
* svg/SVGCursorElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeToPropertyTypeMap):
(WebCore::SVGElement::animatedPropertyTypeForAttribute):
* svg/SVGElement.h:
(WebCore::SVGElement::fillAttributeToPropertyTypeMap):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::attributeToPropertyTypeMap):
(WebCore::SVGEllipseElement::fillAttributeToPropertyTypeMap):
* svg/SVGEllipseElement.h:
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::attributeToPropertyTypeMap):
(WebCore::SVGFEBlendElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEBlendElement.h:
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::attributeToPropertyTypeMap):
(WebCore::SVGFEColorMatrixElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEColorMatrixElement.h:
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::attributeToPropertyTypeMap):
(WebCore::SVGFEComponentTransferElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEComponentTransferElement.h:
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::attributeToPropertyTypeMap):
(WebCore::SVGFECompositeElement::fillAttributeToPropertyTypeMap):
* svg/SVGFECompositeElement.h:
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::attributeToPropertyTypeMap):
(WebCore::SVGFEConvolveMatrixElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::attributeToPropertyTypeMap):
(WebCore::SVGFEDiffuseLightingElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEDiffuseLightingElement.h:
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::attributeToPropertyTypeMap):
(WebCore::SVGFEDisplacementMapElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEDisplacementMapElement.h:
* svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::attributeToPropertyTypeMap):
(WebCore::SVGFEFloodElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEFloodElement.h:
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::attributeToPropertyTypeMap):
(WebCore::SVGFEGaussianBlurElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::attributeToPropertyTypeMap):
(WebCore::SVGFEImageElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEImageElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::attributeToPropertyTypeMap):
(WebCore::SVGFELightElement::fillAttributeToPropertyTypeMap):
* svg/SVGFELightElement.h:
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::attributeToPropertyTypeMap):
(WebCore::SVGFEMergeElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEMergeElement.h:
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::attributeToPropertyTypeMap):
(WebCore::SVGFEMergeNodeElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::attributeToPropertyTypeMap):
(WebCore::SVGFEMorphologyElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::attributeToPropertyTypeMap):
(WebCore::SVGFEOffsetElement::fillAttributeToPropertyTypeMap):
* svg/SVGFEOffsetElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::attributeToPropertyTypeMap):