Send delayed Ad Click Attribution conversion requests to the click source
[WebKit-https.git] / Source / WebCore / ChangeLog-2011-02-16
1 2011-02-15  Gavin Barraclough  <barraclough@apple.com>
2
3         Reviewed by Geoff Garen.
4
5         Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
6
7         Currently JSObject is both directly instantiated for regular JS objects, and
8         derived to implement subtypes. A consequence of this is that we need to ensure
9         that sufficient space from the cell is left unused and available for any data
10         members that will be introduced by subclasses of JSObject. By restructuring
11         the internal storage array out of JSObject we can increase the size in the
12         internal storage for regular objects.
13
14         Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
15         much additional capacity as is currently available to allow for data members
16         in subclasses. JSFinalObject utilizes all available space for internal storage,
17         and only allows construction through JSFinalObject::create().
18
19         * bindings/js/JSDOMWindowShell.h:
20             Update JSObject -> JSNonFinalObject.
21
22 2011-02-16  Carol Szabo  <carol.szabo@nokia.com>
23
24         Reviewed by David Hyatt.
25
26         REGRESSION: Use after free in WebCore::RenderCounter::destroyCounterNode
27         https://bugs.webkit.org/show_bug.cgi?id=54478
28
29         Test: fast/css/counters/render-tree-reorg-crash.html
30
31         * rendering/RenderCounter.cpp:
32         (WebCore::findPlaceForCounter):
33         Fixed typo. The code was still walking sometimes the renderer tree
34         instead of the element tree as intended.
35
36 2011-02-16  Hans Wennborg  <hans@chromium.org>
37
38         Reviewed by Jeremy Orlow.
39
40         IndexedDB: Inject auto increment keys via key path on insertion
41         https://bugs.webkit.org/show_bug.cgi?id=54457
42
43         Inject auto increment keys via key path for object stores using key
44         path and auto increment.
45
46         * bindings/v8/IDBBindingUtilities.cpp:
47         (WebCore::LocalContext::getNthValueOnKeyPath):
48         (WebCore::createIDBKeyFromSerializedValueAndKeyPath):
49         (WebCore::injectIDBKeyIntoSerializedValue):
50         * bindings/v8/IDBBindingUtilities.h:
51         * platform/chromium/PlatformBridge.h:
52         * storage/IDBKeyPathBackendImpl.cpp:
53         (IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
54         * storage/IDBKeyPathBackendImpl.h:
55         * storage/IDBObjectStoreBackendImpl.cpp:
56         (WebCore::injectKeyIntoKeyPath):
57         (WebCore::IDBObjectStoreBackendImpl::selectKeyForPut):
58         (WebCore::IDBObjectStoreBackendImpl::putInternal):
59         * storage/IDBObjectStoreBackendImpl.h:
60         * storage/chromium/IDBKeyPathBackendImpl.cpp:
61         (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
62
63 2011-02-16  Sergio Villar Senin  <svillar@igalia.com>
64
65         Reviewed by Martin Robinson.
66
67         [Gtk] Add support for layoutTestController.setWillSendRequestClearHeader
68         https://bugs.webkit.org/show_bug.cgi?id=54537
69
70         Headers removed from the SoupMessage should be also removed from
71         the ResourceRequest when updating the latter from the former.
72
73         * platform/network/soup/ResourceRequestSoup.cpp:
74         (WebCore::ResourceRequest::updateFromSoupMessage):
75
76 2011-02-16  Ilya Tikhonovsky  <loislo@chromium.org>
77
78         Reviewed by Yury Semikhatsky.
79
80         Web Inspector: split all the functions of Inspector backend API by domain.
81         https://bugs.webkit.org/show_bug.cgi?id=54558
82
83         We have a number of functions from different domains in single instance of InspectorBackend.
84         It'd be better to split the functions by their domains.
85         As example 'evaluate' will be moved from InspectorBackend to RuntimeAgent container.
86
87         * inspector/CodeGeneratorInspector.pm:
88         * inspector/front-end/AuditRules.js:
89         (WebInspector.AuditRules.evaluateInTargetWindow):
90         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
91         * inspector/front-end/AuditsPanel.js:
92         (WebInspector.AuditsPanel.prototype._reloadResources):
93         * inspector/front-end/BreakpointManager.js:
94         (WebInspector.BreakpointManager.prototype._projectChanged):
95         (WebInspector.BreakpointManager.prototype.restoreDOMBreakpoints):
96         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
97         (WebInspector.DOMBreakpoint.prototype._enable):
98         (WebInspector.DOMBreakpoint.prototype._disable):
99         (WebInspector.EventListenerBreakpoint.prototype._enable):
100         (WebInspector.EventListenerBreakpoint.prototype._disable):
101         (WebInspector.XHRBreakpoint.prototype._enable):
102         (WebInspector.XHRBreakpoint.prototype._disable):
103         * inspector/front-end/CSSStyleModel.js:
104         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
105         (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
106         (WebInspector.CSSStyleModel.prototype.getInlineStyleAsync):
107         (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
108         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
109         (WebInspector.CSSStyleModel.prototype.addRule.callback):
110         (WebInspector.CSSStyleModel.prototype.addRule):
111         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
112         (WebInspector.CSSStyleModel.prototype._onRevert):
113         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
114         (WebInspector.CSSProperty.prototype.setText):
115         (WebInspector.CSSProperty.prototype.setDisabled):
116         (WebInspector.CSSStyleSheet.createForId):
117         (WebInspector.CSSStyleSheet.prototype.setText):
118         * inspector/front-end/ConsoleView.js:
119         (WebInspector.ConsoleView.prototype.requestClearMessages):
120         (WebInspector.ConsoleView.prototype.completions):
121         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
122         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
123         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
124         * inspector/front-end/CookieItemsView.js:
125         (WebInspector.CookieItemsView.prototype._deleteCookie):
126         * inspector/front-end/DOMAgent.js:
127         (WebInspector.DOMAgent.prototype.getChildNodesAsync):
128         (WebInspector.DOMAgent.prototype.setAttributeAsync):
129         (WebInspector.DOMAgent.prototype.removeAttributeAsync):
130         (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
131         (WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync):
132         (WebInspector.Cookies.getCookiesAsync):
133         (WebInspector.EventListeners.getEventListenersForNodeAsync):
134         * inspector/front-end/DOMStorage.js:
135         (WebInspector.DOMStorage.prototype.getEntries):
136         (WebInspector.DOMStorage.prototype.setItem):
137         (WebInspector.DOMStorage.prototype.removeItem):
138         * inspector/front-end/Database.js:
139         (WebInspector.Database.prototype.getTableNames):
140         (WebInspector.Database.prototype.executeSql):
141         * inspector/front-end/DebuggerModel.js:
142         (WebInspector.DebuggerModel.prototype.enableDebugger):
143         (WebInspector.DebuggerModel.prototype.disableDebugger):
144         (WebInspector.DebuggerModel.prototype.continueToLocation):
145         (WebInspector.DebuggerModel.prototype.setBreakpoint):
146         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
147         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
148         (WebInspector.DebuggerModel.prototype.editScriptSource):
149         * inspector/front-end/ElementsPanel.js:
150         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
151         (WebInspector.ElementsPanel):
152         (WebInspector.ElementsPanel.prototype.setDocument):
153         (WebInspector.ElementsPanel.prototype.searchCanceled):
154         (WebInspector.ElementsPanel.prototype.performSearch):
155         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
156         (WebInspector.ElementsPanel.prototype.setSearchingForNode):
157         * inspector/front-end/ElementsTreeOutline.js:
158         (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
159         (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
160         ():
161         * inspector/front-end/ExtensionPanel.js:
162         (WebInspector.ExtensionWatchSidebarPane.prototype.setExpression):
163         * inspector/front-end/ExtensionServer.js:
164         (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
165         (WebInspector.ExtensionServer.prototype._onReload):
166         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
167         * inspector/front-end/HeapSnapshotView.js:
168         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
169         * inspector/front-end/NetworkManager.js:
170         (WebInspector.NetworkManager):
171         (WebInspector.NetworkManager.prototype.reset):
172         (WebInspector.NetworkManager.prototype.requestContent):
173         * inspector/front-end/NetworkPanel.js:
174         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
175         * inspector/front-end/ProfileView.js:
176         (WebInspector.CPUProfileView):
177         (WebInspector.CPUProfileType.prototype.buttonClicked):
178         * inspector/front-end/ProfilesPanel.js:
179         (WebInspector.ProfilesPanel.prototype._clearProfiles):
180         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
181         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
182         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
183         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
184         * inspector/front-end/PropertiesSidebarPane.js:
185         (WebInspector.PropertiesSidebarPane.prototype.update):
186         * inspector/front-end/RemoteObject.js:
187         (WebInspector.RemoteObject.resolveNode):
188         (WebInspector.RemoteObject.prototype.getProperties):
189         (WebInspector.RemoteObject.prototype.setPropertyValue):
190         (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
191         * inspector/front-end/ResourcesPanel.js:
192         (WebInspector.FrameTreeElement.prototype.onselect):
193         (WebInspector.FrameTreeElement.prototype.set hovered):
194         (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
195         * inspector/front-end/Script.js:
196         (WebInspector.Script.prototype.requestSource):
197         * inspector/front-end/ScriptsPanel.js:
198         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
199         (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
200         (WebInspector.ScriptsPanel.prototype._togglePause):
201         (WebInspector.ScriptsPanel.prototype._stepOverClicked):
202         (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
203         (WebInspector.ScriptsPanel.prototype._stepOutClicked):
204         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
205         * inspector/front-end/SourceFrame.js:
206         (WebInspector.SourceFrame.prototype._hidePopup):
207         * inspector/front-end/TestController.js:
208         (WebInspector.TestController.prototype.notifyDone):
209         * inspector/front-end/TimelinePanel.js:
210         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
211         * inspector/front-end/WatchExpressionsSidebarPane.js:
212         (WebInspector.WatchExpressionsSection.prototype.update):
213         * inspector/front-end/WorkersSidebarPane.js:
214         (WebInspector.WorkersSidebarPane.prototype.setInstrumentation):
215         * inspector/front-end/inspector.js:
216         (WebInspector.highlightDOMNode):
217         (WebInspector.doLoadedDone):
218         (WebInspector.openResource):
219         (WebInspector.documentKeyDown):
220
221 2011-02-16  Mario Sanchez Prada  <msanchez@igalia.com>
222
223         Reviewed by Martin Robinson.
224
225         [GTK] events missing when a document is (re)loaded
226         https://bugs.webkit.org/show_bug.cgi?id=25831
227
228         Make sure webArea returns a proper name and that a signal
229         'state-change::defunct' is emitted when detaching the wrapper.
230
231         Test: platform/gtk/accessibility/document-reload-events.html
232
233         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
234         (webkit_accessible_get_name): Returns the current document's title
235         as fallback mechanism for webArea objects.
236         (webkit_accessible_detach): Emit 'state-change::defunct' function
237         as soon as the wrapper is detached from the related core object.
238
239 2011-02-15  Nikolas Zimmermann  <nzimmermann@rim.com>
240
241         Reviewed by Dirk Schulze.
242
243         Pixel tests differences on 10.6.6 32bit vs. 64bit
244         https://bugs.webkit.org/show_bug.cgi?id=54474
245
246         When generating a SVG pixel test baseline with a vanilla 10.6.6 installation on a 32bit machine (Core Duo MBP)
247         and comparing the run with a software-identical 64bit machine (Core 2 Duo MBP), there are about 250 differences.
248
249         These fall in two categories:
250         a) 1px differences in text AA, or when drawing circles (all _below_ a tolerance of 0.01). Only visible in the subtracted difference image.
251            The reason is probably CGFloat being typedefed to double on 64bit machines, and float on 32bit machines.
252            AffineTransform stores doubles, so on 32bit machines we loose precision from AffineTransform -> CGAffineTransform.
253
254         b) Failures >0.1% (text origin/scale is slightly different, user-visible).
255            Caused by several sources of numerical instabilities within the SVG rendering code.
256
257            -> SVGPreserveAspectRatio::getCTM() computes an AffineTransform using doubles as input parameters, but floats are passed (like everywhere else in SVG).
258               This method is used to compute the viewBox AffineTransform, that affects the rendering of every content in the document. RenderSVGRoot concats
259               this transformation matrix to the GraphicsContext CTM, resulting in a source of numerical imprecision.
260
261            -> SVGInlineTextBox::paintTextWithShadows() calculates a scaling factor for text, to scale up the specified font size, to the actual on-screen size.
262               SVGInlineTextBox uses the scaled Font object, to draw in an unscaled context, that gets scaled up again afterwards.
263               context->scale(1 / scalingFactor); scaledFont.drawText(); context->scale(scalingFactor);
264
265               To remove the scale from the current GraphicsContext CTM, "context->scale(FloatSize(1 / scalingFactor, ...)" is used. As AffineTransform stores
266               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.
267               Using "context->concatCTM(AffineTransform().scale(1 / ctm.a(), ..." could be used as workaround, to preserve double precision.
268               Fixing that brings us down to just a few pixel tests that differ between 32 & 64bit. There is still numerical imprecision, as floating-point
269               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.
270               Fortunately CGContextSetCTM() is available, as private method, that allows me to switch the context CTM to any arbitary CGAffineTransform.
271
272               -> Add GraphicsContext::setCTM(const AffineTransform&) and implement it for all platforms (each explicitely exposes a 'setCTM' concept, except CG)
273                  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!
274
275               -> Instead of scaling the GraphicsContext before drawing text, grab the current CTM using context->getCTM(), scale it by '1 / scalingFactor'
276                  normalize the transform (look for values close to 0/1 using float precision, and round!), and assign it using context->setCTM(normalizedTransform).
277                  After drawing, just switch back to the preserved original CTM, both operations need GraphicsContext::setCTM.
278                  This fixes all pixel test differences between 32/64 bit machines that fall into category b).
279                  The use of GraphicsContext::setCTM() allows to switch between arbitary context transformations _without_ inducing accumulated rounding imprecision.
280
281         These combined patches fix the pixel test baseline changes.
282
283         Updated existing Snow Leopard pixel test baseline with a 32bit machine, passes here with tolerance 0.
284         The 64bit machine passes the baseline with tolerance 0.01.
285
286         * platform/graphics/GraphicsContext.h: Add setCTM(const AffineTransform&) method.
287         * platform/graphics/cairo/GraphicsContextCairo.cpp:
288         (WebCore::GraphicsContext::setCTM): Implement setCTM.
289         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
290         (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
291         * platform/graphics/cg/GraphicsContextCG.cpp:
292         (WebCore::GraphicsContext::setCTM): Ditto.
293         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
294         (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
295         * platform/graphics/chromium/GLES2Canvas.cpp:
296         (WebCore::GLES2Canvas::setCTM): Ditto.
297         * platform/graphics/chromium/GLES2Canvas.h:
298         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
299         (WebCore::GraphicsContext::setCTM): Ditto.
300         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
301         (WebCore::GraphicsContext::setCTM): Ditto.
302         * platform/graphics/qt/GraphicsContextQt.cpp:
303         (WebCore::GraphicsContext::setCTM): Ditto.
304         * platform/graphics/skia/GraphicsContextSkia.cpp:
305         (WebCore::GraphicsContext::setCTM): Ditto.
306         * platform/graphics/win/GraphicsContextWin.cpp:
307         (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
308         * platform/graphics/wince/GraphicsContextWinCE.cpp:
309         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
310         (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
311         (WebCore::GraphicsContext::setCTM):
312         * platform/graphics/wx/GraphicsContextWx.cpp:
313         (WebCore::GraphicsContext::setCTM): Ditto.
314         * 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.
315         (WebCore::normalizeTransform):
316         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
317         (WebCore::SVGInlineTextBox::paintTextWithShadows):
318         * svg/SVGPreserveAspectRatio.cpp: s/double/float/.
319         (WebCore::SVGPreserveAspectRatio::getCTM):
320         * svg/SVGPreserveAspectRatio.h:
321         * svg/SVGSVGElement.cpp: Simplify viewport() code, avoid using doubles.
322         (WebCore::SVGSVGElement::viewport):
323
324 2011-02-16  Andreas Kling  <kling@webkit.org>
325
326         Reviewed by Dirk Schulze.
327
328         SVGAnimateElement incorrectly uses Color::nameForRenderTreeAsText()
329         https://bugs.webkit.org/show_bug.cgi?id=54547
330
331         * svg/SVGAnimateElement.cpp:
332         (WebCore::SVGAnimateElement::applyResultsToTarget):
333
334 2011-02-14  Mikhail Naganov  <mnaganov@chromium.org>
335
336         Reviewed by Pavel Feldman.
337
338         Web Inspector: [Chromium] Landing detailed heap snapshots, part 3.
339         https://bugs.webkit.org/show_bug.cgi?id=54385
340
341         Provide node classes for data grid views:
342          - summary -- list of objects by constuctor;
343          - diff -- summaries btw two snapshots;
344          - explorer -- explore heap graph;
345          - dominators tree;
346
347         * WebCore.gypi:
348         * WebCore.vcproj/WebCore.vcproj:
349         * inspector/front-end/DetailedHeapshotGridNodes.js: Added.
350         * inspector/front-end/HeapSnapshot.js:
351         (WebInspector.HeapSnapshotFilteredOrderedIterator):
352         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.incInstancesCount):
353         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get instancesCount):
354         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
355         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.resetInstancesCount):
356         (WebInspector.HeapSnapshotEdgesProvider):
357         (WebInspector.HeapSnapshotNodesProvider):
358         * inspector/front-end/PleaseWaitMessage.js:
359         (WebInspector.PleaseWaitMessage.prototype.get instance):
360         * inspector/front-end/WebKit.qrc:
361         * inspector/front-end/inspector.html:
362
363 2011-02-16  Sheriff Bot  <webkit.review.bot@gmail.com>
364
365         Unreviewed, rolling out r78655.
366         http://trac.webkit.org/changeset/78655
367         https://bugs.webkit.org/show_bug.cgi?id=54543
368
369         Causes too many test failures in chromium (Requested by
370         mnaganov on #webkit).
371
372         * bindings/js/JSEventListener.cpp:
373         (WebCore::JSEventListener::handleEvent):
374         * bindings/js/JSEventTarget.cpp:
375         (WebCore::toJS):
376         * bindings/v8/V8AbstractEventListener.cpp:
377         (WebCore::V8AbstractEventListener::invokeEventHandler):
378         * dom/EventTarget.cpp:
379         * dom/EventTarget.h:
380         * storage/IDBRequest.cpp:
381         * storage/IDBRequest.h:
382
383 2011-02-16  Ilya Tikhonovsky  <loislo@chromium.org>
384
385         Reviewed by Yury Semikhatsky.
386
387         Web Inspector: move Database and DOMStorage related things from InspectorAgent to the corresponding agents.
388
389         https://bugs.webkit.org/show_bug.cgi?id=54455
390
391         Some set of instrumentation calls should work even if we have no InspectorFrontend instance and corresponding agents.
392         At the moment we are using InspectorAgent instance for such calls.
393
394         * inspector/InspectorAgent.cpp:
395         (WebCore::InspectorAgent::InspectorAgent):
396         (WebCore::InspectorAgent::createFrontendLifetimeAgents):
397         (WebCore::InspectorAgent::pushDataCollectedOffline):
398         (WebCore::InspectorAgent::didCommitLoad):
399         * inspector/InspectorAgent.h:
400         (WebCore::InspectorOfflineResourcesBase::~InspectorOfflineResourcesBase):
401         (WebCore::InspectorOfflineResourcesBase::InspectorOfflineResourcesBase):
402         (WebCore::InspectorAgent::databaseAgentResources):
403         (WebCore::InspectorAgent::domStorageAgentResources):
404         * inspector/InspectorDOMStorageAgent.cpp:
405         (WebCore::InspectorDOMStorageAgent::Resources::clear):
406         (WebCore::InspectorDOMStorageAgent::Resources::pushDataCollectedOffline):
407         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
408         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
409         (WebCore::InspectorDOMStorageAgent::createOfflineStorage):
410         (WebCore::InspectorDOMStorageAgent::selectDOMStorage):
411         (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
412         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
413         * inspector/InspectorDOMStorageAgent.h:
414         (WebCore::InspectorDOMStorageAgent::create):
415         * inspector/InspectorDatabaseAgent.cpp:
416         (WebCore::InspectorDatabaseAgent::Resources::clear):
417         (WebCore::InspectorDatabaseAgent::Resources::pushDataCollectedOffline):
418         (WebCore::InspectorDatabaseAgent::didOpenDatabase):
419         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
420         (WebCore::InspectorDatabaseAgent::createOfflineStorage):
421         (WebCore::InspectorDatabaseAgent::databaseForId):
422         (WebCore::InspectorDatabaseAgent::selectDatabase):
423         * inspector/InspectorDatabaseAgent.h:
424         (WebCore::InspectorDatabaseAgent::create):
425         * inspector/InspectorInstrumentation.cpp:
426         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
427         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
428
429 2011-02-15  John Sullivan  <sullivan@apple.com>
430
431         Reviewed by Antti Koivisto.
432
433         Dan Bernstein came up with this fix while we debugged it. I just typed.
434
435         https://bugs.webkit.org/show_bug.cgi?id=54532
436         On platforms without platformWidgets, going Back to a scrolled page 
437         draws at the top-left before drawing at the restored scroll position
438         
439         <rdar://problem/8998838>
440         
441         * page/FrameView.cpp:
442         (WebCore::FrameView::performPostLayoutTasks):
443         Don't send the didFirstLayout and didFirstVisuallyNonEmptyLayout callbacks
444         for nested layouts. Doing so was causing ScrollView::setScrollPosition()
445         to short-circuit.
446
447 2011-02-15  Csaba Osztrogonác  <ossy@webkit.org>
448
449         Unreviewed.
450
451         [Qt][V8] Buildfix. Add missing USE(JSC) guard.
452
453         * plugins/qt/PluginViewQt.cpp:
454
455 2011-02-15  Ami Fischman  <fischman@chromium.org>
456
457         Reviewed by David Levin.
458
459         Remove the artificial -32px shift for media controls in mediaDocuments
460         so that they overlap the canvas as they do in non-mediaDocuments.
461         This also fixes test_shell failing to update the media slider (see
462         linked crbug below).
463
464         https://bugs.webkit.org/show_bug.cgi?id=27798
465         http://crbug.com/72623
466
467         Test: media/video-controls-in-media-document.html
468         Added a render test that asserts that the controls show up in the
469         expected spot (0,208) instead of below the canvas (0,240).
470
471         * css/mediaControlsChromium.css:
472
473 2011-02-15  Ryosuke Niwa  <rniwa@webkit.org>
474
475         Reviewed by Darin Adler.
476
477         Extract a function to process ancestor and their sibling nodes from processContents
478         https://bugs.webkit.org/show_bug.cgi?id=54425
479
480         Extracted processAncestorsAndTheirSiblings.
481
482         * dom/Range.cpp:
483         (WebCore::Range::processContents): Calls processContents.
484         (WebCore::Range::processAncestorsAndTheirSiblings): Extracted from processContents.
485         * dom/Range.h:
486
487 2011-02-15  Kent Tamura  <tkent@chromium.org>
488
489         Reviewed by Darin Fisher.
490
491         [Chromium] Rendering error of spin buttons on layers
492         https://bugs.webkit.org/show_bug.cgi?id=54427
493
494         Test: fast/forms/input-appearance-spinbutton-layer.html
495
496         * rendering/RenderThemeChromiumWin.cpp:
497           Add checks for multiple ThemePainter instances.
498         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
499           Avoid to create multiple ThemePainter instances.
500
501 2011-02-15  Chris Rogers  <crogers@google.com>
502
503         Reviewed by Kenneth Russell.
504
505         Fix race condition in JavaScriptAudioNode
506         https://bugs.webkit.org/show_bug.cgi?id=54518
507
508         No new tests since audio API is not yet implemented.
509
510         * webaudio/JavaScriptAudioNode.cpp:
511         (WebCore::JavaScriptAudioNode::process):
512
513 2011-02-10  Jeremy Orlow  <jorlow@chromium.org>
514
515         Reviewed by Nate Chapin.
516
517         Throwing in an IndexedDB error or success event should lead to the transaction aborting
518         https://bugs.webkit.org/show_bug.cgi?id=54249
519
520         When an exception is thrown but not handled  within an IDBRequests success/error event,
521         we should abort the transaction.
522
523         Test: storage/indexeddb/exception-in-event-aborts.html
524
525         * bindings/js/JSEventListener.cpp:
526         (WebCore::JSEventListener::handleEvent):
527         * bindings/js/JSEventTarget.cpp:
528         (WebCore::toJS):
529         * bindings/v8/V8AbstractEventListener.cpp:
530         (WebCore::V8AbstractEventListener::invokeEventHandler):
531         * dom/EventTarget.cpp:
532         (WebCore::EventTarget::uncaughtExceptionInEventHandler):
533         * dom/EventTarget.h:
534         * storage/IDBRequest.cpp:
535         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
536         * storage/IDBRequest.h:
537
538 2011-02-15  Ian Henderson  <ianh@apple.com>
539
540         Reviewed by Darin Adler.
541
542         To determine image properties, CG allocates memory which isn't included in CachedImage's decoded size
543         https://bugs.webkit.org/show_bug.cgi?id=53281
544
545         When determining properties of an image (such as its size), CG ends up
546         decoding part of the image.  This patch adds accounting for this extra
547         decoded size so a cache prune can clean up the allocations.
548
549         * platform/graphics/BitmapImage.cpp:
550         (WebCore::BitmapImage::BitmapImage):
551         (WebCore::BitmapImage::destroyMetadataAndNotify):
552         Clearing the source destroys the extra decoded data.  Report this
553         change in decoded size to the image observer.
554         (WebCore::BitmapImage::cacheFrame):
555         The first decoded frame subsumes the data decoded when determining
556         image properties, so we subtract it out here.
557         (WebCore::BitmapImage::didDecodeProperties):
558         Reports the extra decoded size to the image's observer.
559         (WebCore::BitmapImage::size):
560         (WebCore::BitmapImage::currentFrameSize):
561         (WebCore::BitmapImage::getHotSpot):
562         (WebCore::BitmapImage::frameCount):
563         (WebCore::BitmapImage::isSizeAvailable):
564         (WebCore::BitmapImage::repetitionCount):
565         * platform/graphics/BitmapImage.h:
566         * platform/graphics/ImageSource.cpp:
567         (WebCore::ImageSource::bytesDecodedToDetermineProperties):
568         The default value is 0 to match the current behavior on other
569         platforms.
570         * platform/graphics/ImageSource.h:
571         * platform/graphics/cg/ImageSourceCG.cpp:
572         (WebCore::ImageSource::bytesDecodedToDetermineProperties):
573         Add a constant value for bytesDecodedToDetermineProperties(), measured
574         by tracing malloc/calloc calls while asking an image source for its
575         properties.
576
577 2011-02-15  James Robinson  <jamesr@chromium.org>
578
579         Reviewed by Alexey Proskuryakov.
580
581         requestAnimationFrame callbacks should not fire within a modal dialog
582         https://bugs.webkit.org/show_bug.cgi?id=53188
583
584         requestAnimationFrame callbacks shouldn't fire while a modal dialog is up (like a window.alert()).
585         This matches Firefox and other async APIs.  This patch moves the callback servicing into its own
586         controller class which receives notifications on suspend/resume.
587
588         Test: fast/animation/request-animation-frame-during-modal.html
589
590         * WebCore.gypi:
591         * bindings/js/ScriptDebugServer.cpp:
592         (WebCore::ScriptDebugServer::setJavaScriptPaused):
593         * dom/Document.cpp:
594         (WebCore::Document::Document):
595         (WebCore::Document::suspendScriptedAnimationControllerCallbacks):
596         (WebCore::Document::resumeScriptedAnimationControllerCallbacks):
597         (WebCore::Document::webkitRequestAnimationFrame):
598         (WebCore::Document::webkitCancelRequestAnimationFrame):
599         (WebCore::Document::serviceScriptedAnimations):
600         * dom/Document.h:
601         * dom/ScriptExecutionContext.h:
602         (WebCore::ScriptExecutionContext::suspendScriptedAnimationControllerCallbacks):
603         (WebCore::ScriptExecutionContext::resumeScriptedAnimationControllerCallbacks):
604         * dom/ScriptedAnimationController.cpp: Added.
605         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
606         (WebCore::ScriptedAnimationController::suspend):
607         (WebCore::ScriptedAnimationController::resume):
608         (WebCore::ScriptedAnimationController::registerCallback):
609         (WebCore::ScriptedAnimationController::cancelCallback):
610         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
611         * dom/ScriptedAnimationController.h: Added.
612         (WebCore::ScriptedAnimationController::create):
613         * history/CachedFrame.cpp:
614         (WebCore::CachedFrameBase::restore):
615         (WebCore::CachedFrame::CachedFrame):
616         * page/PageGroupLoadDeferrer.cpp:
617         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
618         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
619
620 2011-02-14  Jeremy Orlow  <jorlow@chromium.org>
621
622         Reviewed by Darin Fisher.
623
624         Add initial support for per-origin quotas to IndexedDB
625         https://bugs.webkit.org/show_bug.cgi?id=54421
626
627         Add support for non-persistent per-origin quotas. If one is
628         specified, it overrides the default.
629
630         No tests as this is only exposed via the Chromium webkit API.
631
632         * storage/IDBFactoryBackendImpl.cpp:
633         (WebCore::IDBFactoryBackendImpl::open):
634         (WebCore::IDBFactoryBackendImpl::setQuota):
635         * storage/IDBFactoryBackendImpl.h:
636         * storage/IDBFactoryBackendInterface.h:
637
638 2011-02-15  Adam Barth  <abarth@webkit.org>
639
640         Reviewed by Darin Adler.
641
642         XSLT with output method HTML and images crashes in debug mode
643         https://bugs.webkit.org/show_bug.cgi?id=54462
644
645         http://trac.webkit.org/changeset/75577 created Document::setContent but
646         didn't notice that the code paths combined into Document::setContent
647         were subtly different.  In particular, some of the code paths called
648         parser->finish() whereas other did not.
649
650         The difference is that an explicit call to parser->finish() is required
651         in the case where there is no frame because explicitClose doesn't call
652         endIfNotLoadingMainResource if there is no frame.  This patch moves
653         that logic inside explicitClose, which is more natural.
654
655         This patch also removes removeAllChildren, which has not effect in this
656         situation and should never have been added in the first place.
657
658         Test: fast/parser/xslt-with-html.xml
659
660         * dom/Document.cpp:
661         (WebCore::Document::setContent):
662         (WebCore::Document::explicitClose):
663
664 2011-02-15  Oliver Hunt  <oliver@apple.com>
665
666         Fix EFL build for
667         https://bugs.webkit.org/show_bug.cgi?id=54415
668
669         * CMakeLists.txt:
670
671 2011-02-15  David Kilzer  <ddkilzer@apple.com>
672
673         <http://webkit.org/b/54487> Minor header clean up in RenderLayerBacking.cpp
674
675         Reviewed by Darin Adler.
676
677         * rendering/RenderLayerBacking.cpp: Remove unused
678         WebGLRenderingContext.h header, and move GraphicsContext3D.h
679         into a #if ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)/#endif
680         block.
681
682 2011-02-14  Oliver Hunt  <oliver@apple.com>
683
684         Reviewed by Gavin Barraclough and Geoff Garen.
685
686         Refactor handles and weak pointers to become nicer and more automatic
687         https://bugs.webkit.org/show_bug.cgi?id=54415
688
689         Update WebCore to use the new Global<> type rather than ProtectedJSValue
690         and gc[Un]Protect.  Also update to use new WeakGCPtr APIs, and remove now
691         unnecessary destructors.
692
693         * ForwardingHeaders/collector/handles/Global.h: Added.
694         * WebCore.vcproj/WebCore.vcproj:
695         * WebCore.vcproj/copyForwardingHeaders.cmd:
696         * bindings/js/JSCallbackData.h:
697         (WebCore::JSCallbackData::JSCallbackData):
698         * bindings/js/JSCustomVoidCallback.h:
699         * bindings/js/JSDOMBinding.cpp:
700         (WebCore::forgetDOMNode):
701         (WebCore::cacheDOMNodeWrapper):
702         * bindings/js/JSDOMWindowBase.h:
703         * bindings/js/JSDOMWindowShell.cpp:
704         (WebCore::JSDOMWindowShell::setWindow):
705         * bindings/js/JSDataGridDataSource.h:
706         * bindings/js/JSEventListener.cpp:
707         (WebCore::JSEventListener::JSEventListener):
708         * bindings/js/JSEventListener.h:
709         (WebCore::JSEventListener::setWrapper):
710         * bindings/js/JSLazyEventListener.cpp:
711         (WebCore::JSLazyEventListener::initializeJSFunction):
712         * bindings/js/ScheduledAction.cpp:
713         (WebCore::ScheduledAction::ScheduledAction):
714         (WebCore::ScheduledAction::executeFunctionInContext):
715         * bindings/js/ScheduledAction.h:
716         (WebCore::ScheduledAction::ScheduledAction):
717         * bindings/js/ScriptCachedFrameData.cpp:
718         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
719         (WebCore::ScriptCachedFrameData::restore):
720         * bindings/js/ScriptCachedFrameData.h:
721         * bindings/js/ScriptCallStackFactory.cpp:
722         (WebCore::createScriptArguments):
723         * bindings/js/ScriptController.cpp:
724         (WebCore::ScriptController::createWindowShell):
725         (WebCore::ScriptController::evaluateInWorld):
726         (WebCore::ScriptController::clearWindowShell):
727         (WebCore::ScriptController::attachDebugger):
728         * bindings/js/ScriptController.h:
729         * bindings/js/ScriptFunctionCall.cpp:
730         (WebCore::ScriptFunctionCall::call):
731         (WebCore::ScriptCallback::call):
732         * bindings/js/ScriptObject.cpp:
733         (WebCore::ScriptObject::ScriptObject):
734         * bindings/js/ScriptObject.h:
735         * bindings/js/ScriptState.cpp:
736         (WebCore::ScriptStateProtectedPtr::ScriptStateProtectedPtr):
737         (WebCore::ScriptStateProtectedPtr::get):
738         * bindings/js/ScriptState.h:
739         * bindings/js/ScriptValue.cpp:
740         (WebCore::ScriptValue::isFunction):
741         (WebCore::ScriptValue::deserialize):
742         * bindings/js/ScriptValue.h:
743         (WebCore::ScriptValue::ScriptValue):
744         (WebCore::ScriptValue::hasNoValue):
745         * bindings/js/ScriptWrappable.h:
746         (WebCore::ScriptWrappable::ScriptWrappable):
747         (WebCore::ScriptWrappable::setWrapper):
748         * bindings/js/WorkerScriptController.cpp:
749         (WebCore::WorkerScriptController::WorkerScriptController):
750         (WebCore::WorkerScriptController::~WorkerScriptController):
751         (WebCore::WorkerScriptController::initScript):
752         (WebCore::WorkerScriptController::evaluate):
753         * bindings/js/WorkerScriptController.h:
754         (WebCore::WorkerScriptController::workerContextWrapper):
755         * bindings/scripts/CodeGeneratorJS.pm:
756         * bridge/NP_jsobject.cpp:
757         (_NPN_InvokeDefault):
758         (_NPN_Invoke):
759         (_NPN_Evaluate):
760         (_NPN_Construct):
761         * bridge/jsc/BridgeJSC.cpp:
762         (JSC::Bindings::Instance::Instance):
763         (JSC::Bindings::Instance::~Instance):
764         (JSC::Bindings::Instance::willDestroyRuntimeObject):
765         (JSC::Bindings::Instance::willInvalidateRuntimeObject):
766         * bridge/jsc/BridgeJSC.h:
767         * bridge/runtime_object.cpp:
768         (JSC::Bindings::RuntimeObject::invalidate):
769         * bridge/runtime_root.cpp:
770         (JSC::Bindings::RootObject::RootObject):
771         (JSC::Bindings::RootObject::invalidate):
772         (JSC::Bindings::RootObject::globalObject):
773         (JSC::Bindings::RootObject::updateGlobalObject):
774         * bridge/runtime_root.h:
775         * dom/EventListener.h:
776         * dom/EventTarget.h:
777         (WebCore::EventTarget::markJSEventListeners):
778         * xml/XMLHttpRequest.cpp:
779         
780         Qt bindings courtesy of Csaba Osztrogonác
781         * bridge/qt/qt_runtime.cpp:
782         (JSC::Bindings::QtRuntimeConnectionMethod::call):
783         (JSC::Bindings::QtConnectionObject::QtConnectionObject):
784         (JSC::Bindings::QtConnectionObject::execute):
785         (JSC::Bindings::QtConnectionObject::match):
786         * bridge/qt/qt_runtime.h:
787
788 2011-02-15  Jia Pu  <jpu@apple.com>
789
790         Reviewed by Darin Adler.
791
792         Autocorrection should respect undo.
793         https://bugs.webkit.org/show_bug.cgi?id=52221
794         <rdar://problem/8663399>
795
796         Manual test: manual-tests/autocorrection/undo-autocorrection.html
797
798         When user undoes an autocorrection, we need to do four things:
799         1. Revert the change in text that has been made by correction.
800         2. Revert the selection to pre-correction state so that user can immediately continue typing.
801         3. Add appropriate markers to reverted text so that it won't be corrected again and/or shown
802            as misspelled.
803         4. If applicable, notify spell checking service to record this reversion.
804
805         To achieve these, this patch introduces following changes:
806         1. Created SpellingCorrectionCommand so that correction can be undone in similar way as any
807            other editing command. SpellingCorrectionCommand is a composition of SetSelectionCommand,
808            SpellingCorrectionRecordUndoCommand and ReplaceSelectionCommand.
809         2. Created SetSelectionCommand so that undo command can restore selection state.
810         3. Added member function recordAutocorrectionResponse() to editor client.
811
812         To improve readability, this patch also consolidates various boolean arguments in SelectionController::setSelection()
813         and ReplaceSelectionCommand::ReplaceSelectionCommand(). These boolean arguments have been
814         replaced by enum variable.
815
816         * WebCore.exp.in: Updated for changes in Editor and ReplaceSelectionCommand.
817
818         * WebCore.xcodeproj/project.pbxproj: Updated for new source files.
819
820         * editing/CompositeEditCommand.cpp:
821         (WebCore::CompositeEditCommand::moveParagraphs): Adopted new signature of ReplaceSelectionCommand::create().
822
823         * editing/Editor.cpp:
824         (WebCore::Editor::replaceSelectionWithFragment): Ditto.
825         (WebCore::Editor::unappliedEditing): Cleaned up trailing whitespace.
826         (WebCore::Editor::reappliedEditing): Ditto.
827         (WebCore::Editor::selectComposition): Adopted new signature of SelectionController::setSelection().
828         (WebCore::Editor::confirmComposition): Ditto.
829         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Rearranged code to reduce the
830             level of deeply nested if statement. Adopted SpellingCorrectionCommand.
831         (WebCore::Editor::applyCorrectionPanelInfo): Adopted SpellingCorrectionCommand.
832         (WebCore::Editor::unappliedSpellCorrection): Function for adding markers to reverted text and
833             for notifiying editor client about undone correction.
834         (WebCore::Editor::changeSelectionAfterCommand): Adopted new signature of SelectionController::setSelection().
835         (WebCore::Editor::respondToChangedSelection): Use SelectionController::SetSelectionOptions
836             instead of boolean variables.
837
838         * editing/Editor.h: Added Editor::unappliedSpellCorrection().
839
840         * editing/EditorCommand.cpp:
841         (WebCore::executeInsertFragment): Adopted new signature of ReplaceSelectionCommand::create().
842
843         * editing/MoveSelectionCommand.cpp:
844         (WebCore::MoveSelectionCommand::doApply): Ditto.
845
846         * editing/ReplaceSelectionCommand.cpp:
847         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Replaced all boolean arguments
848             with an enum value.
849
850         * editing/ReplaceSelectionCommand.h:
851         (WebCore::ReplaceSelectionCommand::create): Ditto.
852
853         * editing/SelectionController.cpp: Adopted new signature of SelectionController::setSelection().
854         (WebCore::SelectionController::moveTo):
855         (WebCore::SelectionController::setSelection):
856         (WebCore::SelectionController::respondToNodeModification):
857         (WebCore::SelectionController::setBase):
858         (WebCore::SelectionController::setExtent):
859         (WebCore::SelectionController::setSelectedRange):
860
861         * editing/SelectionController.h:
862         (WebCore::SelectionController::setSelection): Replaced all boolean arguments with an enum value.
863
864         * editing/SetSelectionCommand.cpp: Added.
865         (WebCore::SetSelectionCommand::SetSelectionCommand):
866         (WebCore::SetSelectionCommand::doApply):
867         (WebCore::SetSelectionCommand::doUnapply):
868
869         * editing/SetSelectionCommand.h: Added.
870         (WebCore::SetSelectionCommand::create):
871
872         * editing/mac/SpellingCorrectionCommand.cpp: Added.
873         (WebCore::SpellingCorrectionRecordUndoCommand::create):
874         (WebCore::SpellingCorrectionRecordUndoCommand::SpellingCorrectionRecordUndoCommand):
875         (WebCore::SpellingCorrectionRecordUndoCommand::doApply):
876         (WebCore::SpellingCorrectionRecordUndoCommand::doUnapply):
877         (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
878         (WebCore::SpellingCorrectionCommand::doApply):
879
880         * editing/mac/SpellingCorrectionCommand.h: Added.
881         (WebCore::SpellingCorrectionCommand::create):
882
883         * loader/EmptyClients.h: Updated for the new function declared in EditorClient.
884         (WebCore::EmptyEditorClient::recordAutocorrectionResponse):
885
886         * manual-tests/autocorrection/undo-autocorrection.html: Added.
887
888         * page/ContextMenuController.cpp:
889         (WebCore::ContextMenuController::contextMenuItemSelected): Adopted new signature of ReplaceSelectionCommand::create().
890
891         * page/DragController.cpp:
892         (WebCore::DragController::concludeEditDrag): Ditto.
893
894         * page/EditorClient.h: Added EditorClient::recordAutocorrectionResponse().
895
896 2011-02-15  Beth Dakin  <bdakin@apple.com>
897
898         Reviewed by Darin Adler.
899
900         Speculative fix for <rdar://problem/8998498> CrashTracer: [USER] 
901         8 crashes in WebProcess calling setOverlayScrollerState:forceImmediately:
902
903         My best guess is that this is crashing because 
904         willRemoveVerticalScrollbar()/Horizontal was not being called
905         properly from the RenderLayer destructor. 
906         
907         Call willRemoveVerticalScrollbar()/Horizontal from destroyScrollbar()
908         so that all current and future scrollbar-destroyers will properly 
909         call this function. And only do it for native scrollers.
910         (WebCore::RenderLayer::destroyScrollbar):
911         (WebCore::RenderListBox::destroyScrollbar):
912
913         For consistency's sake, I also moved didAddVerticalScrollbar()
914         /Horizontal to createScrollbar(). Again, only call for native 
915         scrollers.
916         * rendering/RenderLayer.cpp:
917         (WebCore::RenderLayer::createScrollbar):
918         (WebCore::RenderListBox::createScrollbar):
919
920         These functions no longer call didAdd/willRemove.
921         (WebCore::RenderLayer::setHasHorizontalScrollbar):
922         (WebCore::RenderLayer::setHasVerticalScrollbar):
923         * rendering/RenderListBox.cpp:
924         (WebCore::RenderListBox::setHasVerticalScrollbar):
925         
926         Remove unnecessary ScrollableArea::-prefix
927         * platform/ScrollView.cpp:
928         (WebCore::ScrollView::setHasHorizontalScrollbar):
929         (WebCore::ScrollView::setHasVerticalScrollbar):
930
931 2011-02-15  Joseph Pecoraro  <joepeck@webkit.org>
932
933         Reviewed by David Kilzer.
934
935         Cleanup Some Potential ENABLE(INSPECTOR) Related Building Issues
936         https://bugs.webkit.org/show_bug.cgi?id=54048
937
938         * WebCore.exp.in: moved inspector only export into ENABLE(INSPECTOR) block.
939         * bindings/js/ScriptHeapSnapshot.h: include no longer needed.
940
941 2011-02-15  Stephen White  <senorblanco@chromium.org>
942
943         Reviewed by James Robinson.
944  
945         [chromium] clearRect() is incorrect in accelerated 2D canvas.
946         https://bugs.webkit.org/show_bug.cgi?id=54497
947
948         When doing GPU-Canvas2D clearRect() using the fast path (glClear()),
949         we were not correctly converting from canvas to screen coordinates. 
950         Fixed by inverting the rectangle in Y, and changing
951         SharedGraphicsContext3D::scissor to take glScissor-like parameters.
952
953         Covered by fast/canvas/canvas-strokeRect.html.
954
955         * platform/graphics/chromium/GLES2Canvas.cpp:
956         (WebCore::GLES2Canvas::clearRect):
957         Flip the Y coord of the rectangle passed to scissor().
958         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
959         (WebCore::SharedGraphicsContext3D::scissor):
960         * platform/graphics/gpu/SharedGraphicsContext3D.h:
961         Give scissor() the same param types as GraphicsContext3D::scissor().
962
963 2011-02-15  Pratik Solanki  <psolanki@apple.com>
964
965         Move WTF_USE_CFNETWORK to Platform.h
966         https://bugs.webkit.org/show_bug.cgi?id=54168
967
968         Reviewed by Darin Adler.
969
970         * config.h: Remove WTF_USE_CFNETWORK.
971
972 2011-02-15  Kenneth Russell  <kbr@google.com>
973
974         Reviewed by Darin Fisher.
975
976         Allow controlling minimum DOMTimer interval on a per-page basis
977         https://bugs.webkit.org/show_bug.cgi?id=54312
978
979         Renamed DOMTimer::minTimerInterval and setMinTimerInterval to
980         defaultMinTimerInterval and setDefaultMinTimerInterval, made them
981         private and exposed them via Settings::defaultMinDOMTimerInterval
982         and setDefaultMinDOMTimerInterval. Added new
983         Settings::setMinDOMTimerInterval and minDOMTimerInterval.
984
985         The storage for the minimum timer interval currently lives in the
986         Page, though this could be moved to the Settings object if
987         desired. The accessor methods on the Page are private and exposed
988         to Settings by making Settings a friend, so the abstraction
989         barrier is clear at the API level.
990
991         Adjusting the interval both upward and downward may cause the fire
992         times of the active timers on the page to be adjusted, if they
993         would be affected by the clamping value. This is needed to reduce
994         latency when bringing a tab to the foreground, in particular if
995         the minimum timer interval was decreased from a very high value to
996         a very low value.
997
998         A new method, setMinimumTimerInterval, has been added to
999         LayoutTestController, implemented in all ports of DumpRenderTree,
1000         and used in new layout tests.
1001
1002         Ideally changing the page's minimum timer interval would affect
1003         dedicated workers, but this is too much to do in an initial patch,
1004         so a FIXME has been added.
1005
1006         Tested with:
1007           - The new layout tests on the WebKit Mac and Chromium (Mac,
1008             Linux) DRT ports.
1009           - Hooked up the new API in Chromium and ran some simple manual
1010             tests.
1011
1012         Tests: fast/dom/timer-increase-min-interval-and-reset-part-1.html
1013                fast/dom/timer-increase-min-interval-and-reset-part-2.html
1014                fast/dom/timer-increase-min-interval.html
1015                fast/dom/timer-increase-then-decrease-min-interval.html
1016
1017         * WebCore.exp.in:
1018         * dom/Document.cpp:
1019         (WebCore::Document::minimumTimerInterval):
1020         * dom/Document.h:
1021         * dom/ScriptExecutionContext.cpp:
1022         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
1023         (WebCore::ScriptExecutionContext::minimumTimerInterval):
1024         * dom/ScriptExecutionContext.h:
1025         * page/DOMTimer.cpp:
1026         (WebCore::DOMTimer::DOMTimer):
1027         (WebCore::DOMTimer::fired):
1028         (WebCore::DOMTimer::adjustMinimumTimerInterval):
1029         (WebCore::DOMTimer::intervalClampedToMinimum):
1030         * page/DOMTimer.h:
1031         (WebCore::DOMTimer::defaultMinTimerInterval):
1032         (WebCore::DOMTimer::setDefaultMinTimerInterval):
1033         * page/Page.cpp:
1034         (WebCore::Page::Page):
1035         (WebCore::Page::setMinimumTimerInterval):
1036         (WebCore::Page::minimumTimerInterval):
1037         * page/Page.h:
1038         * page/Settings.cpp:
1039         (WebCore::Settings::setDefaultMinDOMTimerInterval):
1040         (WebCore::Settings::defaultMinDOMTimerInterval):
1041         (WebCore::Settings::setMinDOMTimerInterval):
1042         (WebCore::Settings::minDOMTimerInterval):
1043         * page/Settings.h:
1044         * platform/Timer.h:
1045         (WebCore::TimerBase::augmentFireInterval):
1046         (WebCore::TimerBase::augmentRepeatInterval):
1047
1048 2011-02-15  Simon Fraser  <simon.fraser@apple.com>
1049
1050         Reviewed by Beth Dakin.
1051
1052         Fix scrollbar rendering crash when rendered into a layer
1053         https://bugs.webkit.org/show_bug.cgi?id=54494
1054
1055         Remove code added in r78394 which was intended to find out whether
1056         a scrollbar was being rendered into a compositing layer. r78612 
1057         obviated the need for this code.
1058
1059         * page/FrameView.h:
1060         * platform/ScrollableArea.h:
1061         * rendering/RenderLayer.cpp:
1062         * rendering/RenderLayer.h:
1063         * rendering/RenderListBox.cpp:
1064         * rendering/RenderListBox.h:
1065
1066 2011-02-15  Simon Fraser  <simon.fraser@apple.com>
1067
1068         Let Xcode have its way with the project.
1069         
1070         * WebCore.xcodeproj/project.pbxproj:
1071
1072 2011-02-15  Simon Fraser  <simon.fraser@apple.com>
1073
1074         Fix Mac builds that don't use rubber-band scrolling
1075         by moving m_drawingIntoLayer out of the #ifdef.
1076
1077         * platform/mac/ScrollAnimatorMac.h:
1078         * platform/mac/ScrollAnimatorMac.mm:
1079         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1080
1081 2011-02-15  Martin Robinson  <mrobinson@igalia.com>
1082
1083         Reviewed by Xan Lopez.
1084
1085         [Freetype] Better map CSS font weight to Fontconfig font weight
1086         https://bugs.webkit.org/show_bug.cgi?id=54323
1087
1088         * platform/graphics/freetype/FontCacheFreeType.cpp:
1089         (WebCore::fontWeightToFontconfigWeight): Added this helper to map between CSS and
1090         Fontconfig font weights.
1091         (WebCore::FontCache::createFontPlatformData): Use the new helper instead of just
1092         deciding between bold and regular.
1093
1094 2011-02-15  Simon Fraser  <simon.fraser@apple.com>
1095
1096         Reviewed by Sam Weinig.
1097
1098         Fix scrollbar rendering crash when rendered into a layer
1099         https://bugs.webkit.org/show_bug.cgi?id=54494
1100         
1101         The scroller delegate was failing to return a layer in a case
1102         where the scroller was still rendering into a GraphicsLayer, because
1103         even though WebCore had switched out of compositing mode, the
1104         DrawingAreaImpl was still rendering into its nonCompositedContent
1105         layer. This happens when the m_exitCompositingTimer timer hasn't fired
1106         yet.
1107         
1108         The fix is to track whether we're drawing into a layer via the
1109         GraphicsContext, rather than asking about compositing layers.
1110
1111         * platform/graphics/GraphicsContext.h:
1112         * platform/graphics/cg/GraphicsContextCG.cpp:
1113         (WebCore::GraphicsContext::setIsCALayerContext):
1114         (WebCore::GraphicsContext::isCALayerContext):
1115         Getter and setter for the bit that says if we're rendering into a CALayer.
1116
1117         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1118         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1119         Store a bool for whether this context targets a layer.
1120
1121         * platform/graphics/mac/WebLayer.mm:
1122         (drawLayerContents): Call setIsCALayerContext(true).
1123         
1124         * platform/mac/ScrollAnimatorMac.h:
1125         (WebCore::ScrollAnimatorMac::setIsDrawingIntoLayer):
1126         (WebCore::ScrollAnimatorMac::isDrawingIntoLayer):
1127         New methods to get and set a flag that says when we're
1128         drawing into a layer, so that the delegate can get at this state.
1129
1130         * platform/mac/ScrollAnimatorMac.mm:
1131         (-[ScrollbarPainterDelegate layer]): Use isDrawingIntoLayer()
1132         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Init the flag.
1133
1134         * platform/mac/ScrollbarThemeMac.mm:
1135         (WebCore::ScrollbarThemeMac::unregisterScrollbar): Whitespace.
1136         (WebCore::ScrollbarThemeMac::paint): Push the "isDrawingIntoLayer"
1137         state down onto ScrollAnimatorMac, getting it from the GraphicsContext.
1138
1139 2011-02-15  Anders Carlsson  <andersca@apple.com>
1140
1141         Reviewed by Darin Adler.
1142
1143         Add NPP_GetSitesWithData and NPP_URLRedirectNotify to the NPAPI headers
1144         https://bugs.webkit.org/show_bug.cgi?id=54481
1145
1146         We should really sync all headers with the NPAPI repository, but doing that
1147         lead to build errors so I just added what was needed.
1148
1149         * bridge/npapi.h:
1150         Add new functions.
1151
1152         * bridge/nptypes.h:
1153         Sync with the official NPAPI repository, adding 64-bit integer types and
1154         removing a duplicate license header.
1155
1156         * plugins/npfunctions.h:
1157         Add new functions.
1158
1159 2011-02-15  Antti Koivisto  <antti@apple.com>
1160
1161         Reviewed by Darin Adler.
1162
1163         https://bugs.webkit.org/show_bug.cgi?id=54486
1164         Crashes under CachedResourceLoader::revalidateResource
1165         
1166         CachedResourceLoader might get deleted from under one of its methods.
1167         Try to catch a more informative crash stack.
1168
1169         * loader/cache/CachedResourceLoader.cpp:
1170         (WebCore::CachedResourceLoader::CachedResourceLoader):
1171         (WebCore::CachedResourceLoader::~CachedResourceLoader):
1172         (WebCore::CachedResourceLoader::requestImage):
1173         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1174         (WebCore::CachedResourceLoader::requestResource):
1175         (WebCore::CachedResourceLoader::setAutoLoadImages):
1176         (WebCore::CachedResourceLoader::load):
1177         (WebCore::CachedResourceLoader::loadDone):
1178         (WebCore::CachedResourceLoader::preload):
1179         (WebCore::CachedResourceLoader::requestPreload):
1180         * loader/cache/CachedResourceLoader.h:
1181
1182 2011-02-15  Andreas Kling  <kling@webkit.org>
1183
1184         Reviewed by Darin Adler.
1185
1186         Optimize Color::serialized()
1187         https://bugs.webkit.org/show_bug.cgi?id=54452
1188
1189         Apply the optimizations from CSSPrimitiveValue::cssText() [CSS_RGBCOLOR]
1190         to Color::serialized() - build the serialized color strings manually
1191         instead of using String::format().
1192
1193         * platform/graphics/Color.cpp:
1194         (WebCore::appendHexNumber):
1195         (WebCore::Color::serialized):
1196
1197 2011-02-15  Jarred Nicholls  <jarred@sencha.com>
1198
1199         Reviewed by Alexey Proskuryakov.
1200
1201         XMLHttpRequest::abort() doesn't clear response data
1202         https://bugs.webkit.org/show_bug.cgi?id=54118
1203
1204         Properly clear all buffer data on abort, so no memory hangs around unnecessarily.
1205
1206         No new tests because there is no observable effect except for less memory used.
1207
1208         * xml/XMLHttpRequest.cpp:
1209         (WebCore::XMLHttpRequest::abort):
1210
1211 2011-02-15  Andreas Kling  <kling@webkit.org>
1212
1213         Reviewed by Darin Adler.
1214
1215         Rename Color::name() to Color::nameForRenderTreeAsText()
1216         https://bugs.webkit.org/show_bug.cgi?id=54464
1217
1218         Color::name() returns the color as either #RRGGBB or #RRGGBBAA.
1219         Since the latter is not a valid CSS color, it can't be re-parsed
1220         by WebKit, and should only be used in DRT dumps.
1221
1222         * editing/ApplyStyleCommand.cpp:
1223         (WebCore::StyleChange::extractTextStyles):
1224         * page/DragController.cpp:
1225         (WebCore::DragController::concludeEditDrag):
1226         * platform/graphics/Color.cpp:
1227         (WebCore::Color::nameForRenderTreeAsText):
1228         * platform/graphics/Color.h:
1229         * platform/graphics/GraphicsLayer.cpp:
1230         (WebCore::GraphicsLayer::dumpProperties):
1231         * platform/graphics/filters/FEFlood.cpp:
1232         (WebCore::FEFlood::externalRepresentation):
1233         * rendering/RenderTreeAsText.cpp:
1234         (WebCore::RenderTreeAsText::writeRenderObject):
1235         * rendering/svg/SVGRenderTreeAsText.cpp:
1236         (WebCore::operator<<):
1237         (WebCore::writeRenderSVGTextBox):
1238         * svg/SVGAnimateElement.cpp:
1239         (WebCore::SVGAnimateElement::applyResultsToTarget):
1240         * svg/SVGColor.cpp:
1241         (WebCore::SVGColor::cssText):
1242
1243 2011-02-15  Andras Becsi  <abecsi@webkit.org>
1244
1245         Rubber-stamped by Andreas Kling.
1246
1247         [Qt] Typo fix.
1248
1249         No new tests needed.
1250
1251         * WebCore.pro: add missing ASCII to header name.
1252
1253 2011-02-15  Pavel Feldman  <pfeldman@chromium.org>
1254
1255         Reviewed by Yury Semikhatsky.
1256
1257         Web Inspector: test whether inspector gets populated with databases and storages upon opening.
1258         https://bugs.webkit.org/show_bug.cgi?id=54469
1259
1260         Tests: http/tests/inspector-enabled/database-open.html
1261                http/tests/inspector-enabled/dom-storage-open.html
1262
1263         * inspector/front-end/DOMStorage.js:
1264         * inspector/front-end/Database.js:
1265         (WebInspector.DatabaseDispatcher.prototype.addDatabase):
1266
1267 2011-02-15  Andreas Kling  <kling@webkit.org>
1268
1269         Reviewed by Darin Adler.
1270
1271         Share the helper functions used by Latin-1 and UTF-8 text codecs
1272         https://bugs.webkit.org/show_bug.cgi?id=54446
1273
1274         Move MachineWord, UCharByteFiller and the other helper functions
1275         into TextCodecASCIIFastPath.h where they can be used by both
1276         TextCodecUTF8 and TextCodecLatin1.
1277
1278         * GNUmakefile.am:
1279         * WebCore.gypi:
1280         * WebCore.pro:
1281         * WebCore.vcproj/WebCore.vcproj:
1282         * WebCore.xcodeproj/project.pbxproj:
1283         * platform/text/TextCodecASCIIFastPath.h: Added.
1284         (WebCore::isAllASCII):
1285         (WebCore::copyASCIIMachineWord):
1286         (WebCore::isAlignedToMachineWord):
1287         (WebCore::alignToMachineWord):
1288         * platform/text/TextCodecLatin1.cpp:
1289         (WebCore::TextCodecLatin1::decode):
1290         * platform/text/TextCodecUTF8.cpp:
1291         (WebCore::TextCodecUTF8::decode):
1292
1293 2011-02-15  Leo Yang  <leo.yang@torchmobile.com.cn>
1294
1295         Reviewed by Kent Tamura.
1296
1297         Code style issue in WebCore/dom/InputElement.cpp
1298         https://bugs.webkit.org/show_bug.cgi?id=54428
1299
1300         Remove 2 extra spaces in InputElement.cpp line 221.
1301
1302         Code style fix, No new tests.
1303
1304         * dom/InputElement.cpp:
1305         (WebCore::InputElement::handleBeforeTextInsertedEvent):
1306
1307 2011-02-15  Philippe Normand  <pnormand@igalia.com>
1308
1309         Reviewed by Martin Robinson.
1310
1311         [GStreamer] Video player sets system volume to 100%
1312         https://bugs.webkit.org/show_bug.cgi?id=54140
1313
1314         Don't explicitely set volume at startup and use the
1315         GstStreamVolume interface with cubic volume scale when
1316         updating/retrieving the volume value. This gives a much better
1317         user-experience.
1318
1319         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1320         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1321
1322 2011-02-15  Adam Barth  <abarth@webkit.org>
1323
1324         Reviewed by Eric Seidel.
1325
1326         Sketch script-src for Content Security Policy
1327         https://bugs.webkit.org/show_bug.cgi?id=54381
1328
1329         This patch provides a sketch of the script-src directive.  We still do
1330         not parse the value of the directive, and the wiring into the rest of
1331         WebCore is incorrect, but those are things we can fix in future
1332         patches.  For the momemnt, this patch lets us test what we're doing.
1333
1334         Test: http/tests/security/contentSecurityPolicy/script-loads-with-img-src.html
1335
1336         * page/ContentSecurityPolicy.cpp:
1337         (WebCore::CSPDirective::CSPDirective):
1338         (WebCore::CSPDirective::allows):
1339         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1340         (WebCore::ContentSecurityPolicy::canLoadExternalScriptFromSrc):
1341         (WebCore::ContentSecurityPolicy::parse):
1342         (WebCore::ContentSecurityPolicy::emitDirective):
1343         * page/ContentSecurityPolicy.h:
1344
1345 2011-02-15  Antti Koivisto  <antti@apple.com>
1346
1347         Reviewed by Andreas Kling.
1348
1349         svg/custom/use-css-no-effect-on-shadow-tree.svg produces empty image on Chromium Linux after r58556
1350         https://bugs.webkit.org/show_bug.cgi?id=54460
1351         
1352         Don't use fast path for SVG. There are some additional rules for shadow trees that are not
1353         implemented on fast path.
1354         
1355         * css/CSSStyleSelector.cpp:
1356         (WebCore::CSSStyleSelector::checkSelector):
1357
1358 2011-02-15  Andras Becsi  <abecsi@webkit.org>
1359
1360         Reviewed by Csaba Osztrogonác.
1361
1362         [Qt] Redesign the build system
1363         https://bugs.webkit.org/show_bug.cgi?id=51339
1364
1365         Part 1.
1366
1367         Introduce CodeGenerators.pri and add common includepaths to WebCore.pri,
1368         thus unnecessary duplications can be removed from project files.
1369
1370         No new tests needed.
1371
1372         * CodeGenerators.pri: Copied from Source/WebCore/WebCore.pri.
1373         Don't add non-source generated files to SOURCES.
1374         * DerivedSources.pro: Change WebCore.pri to CodeGenerators.pri.
1375         * WebCore.pri: Move code generation rules to CodeGenerators.pri.
1376         * WebCore.pro: Move common options to WebCore.pri.
1377
1378 2011-02-15  Charlie Reis  <creis@chromium.org>
1379
1380         Reviewed by Mihai Parparita.
1381
1382         Crash in WebCore::FrameLoader::continueLoadAfterNavigationPolicy
1383         https://bugs.webkit.org/show_bug.cgi?id=54219
1384
1385         Ensures we do not start a new navigation while we are in the process of
1386         stopping a navigation.  Also adds a manual test, since the crash can
1387         only be reproduced using the back button and not history.back().
1388
1389         * loader/FrameLoader.cpp:
1390         * manual-tests/navigation-during-onload-triggered-by-back.html: Added.
1391         * manual-tests/resources/navigation-during-onload-container.html: Added.
1392
1393 2011-02-15  Bill Budge  <bbudge@chromium.org>
1394
1395         Reviewed by David Levin.
1396
1397         SubresourceLoader should expose finish time
1398         https://bugs.webkit.org/show_bug.cgi?id=54287
1399
1400         No tests needed, exposes no new functionality
1401
1402         * loader/DocumentThreadableLoader.cpp:
1403         (WebCore::DocumentThreadableLoader::didFinishLoading):
1404         * loader/DocumentThreadableLoader.h:
1405         * loader/SubresourceLoader.cpp:
1406         (WebCore::SubresourceLoader::didFinishLoading):
1407         * loader/SubresourceLoaderClient.h:
1408         (WebCore::SubresourceLoaderClient::didFinishLoading):
1409         * loader/cache/CachedResourceRequest.cpp:
1410         (WebCore::CachedResourceRequest::didFinishLoading):
1411         * loader/cache/CachedResourceRequest.h:
1412         * loader/icon/IconLoader.cpp:
1413         (WebCore::IconLoader::didFinishLoading):
1414         * loader/icon/IconLoader.h:
1415
1416 2011-02-15  Antti Koivisto  <antti@apple.com>
1417
1418         Reviewed by Darin Adler.
1419
1420         Enable fast path selector checking for child and subselector combinators
1421         https://bugs.webkit.org/show_bug.cgi?id=54360
1422
1423         * css/CSSStyleSelector.cpp:
1424         (WebCore::isFastCheckableSelector):
1425         (WebCore::fastCheckSingleSelector):
1426         (WebCore::checkClassValue):
1427         (WebCore::checkIdValue):
1428         (WebCore::checkTagValue):
1429         (WebCore::CSSStyleSelector::SelectorChecker::fastCheckSelector):
1430
1431 2011-02-15  Yury Semikhatsky  <yurys@chromium.org>
1432
1433         Reviewed by Pavel Feldman.
1434
1435         Web Inspector: console auto-scroll is broken when there are both scrollers.
1436         https://bugs.webkit.org/show_bug.cgi?id=54273
1437
1438         * inspector/front-end/utilities.js:
1439         (Element.prototype.isScrolledToBottom): use clientHeight instead of offsetHeight to determine
1440         whether the element is scrolled to the bottom.
1441
1442 2011-02-14  Alexander Pavlov  <apavlov@chromium.org>
1443
1444         Reviewed by Yury Semikhatsky.
1445
1446         Web Inspector: highlighter works incorrect at build.chromium.org WebKit cells
1447         https://bugs.webkit.org/show_bug.cgi?id=53910
1448
1449         Use enclosingBoundingBox for the absolute margin quad as the reference box for a tooltip.
1450
1451         * inspector/InspectorAgent.cpp:
1452         (WebCore::InspectorAgent::drawNodeHighlight):
1453
1454 2011-02-15  Dirk Schulze  <krit@webkit.org>
1455
1456         Rubber-stamped by Nikolas Zimmermann.
1457
1458         SVG animation doesn't support attribute value 'inherit'
1459         https://bugs.webkit.org/show_bug.cgi?id=54410
1460
1461         Accidently replaced start value RegularPropertyValue for m_fromPropertyValueType
1462         and m_toPropertyValueType by CurrentColorValue before landing. Check for property
1463         value type 'inherit' on color validation was missing.
1464
1465         * svg/SVGAnimateElement.cpp:
1466         (WebCore::SVGAnimateElement::calculateFromAndToValues):
1467         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1468
1469 2011-02-15  Adam Roben  <aroben@apple.com>
1470
1471         Windows build fix after r78533
1472
1473         * WebCore.vcproj/WebCore.vcproj: Fix bad XML syntax.
1474
1475 2011-02-15  Gavin Peters  <gavinp@chromium.org>
1476
1477         Reviewed by Antti Koivisto.
1478
1479         SharedBuffer::buffer() does not do what you think.
1480         https://bugs.webkit.org/show_bug.cgi?id=54420
1481
1482         No new tests.
1483
1484         * inspector/InspectorResourceAgent.cpp:
1485         (WebCore::InspectorResourceAgent::resourceContentBase64):
1486         * platform/SharedBuffer.h:
1487         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1488         (WebCore::JPEGImageReader::decode):
1489         (WebCore::JPEGImageDecoder::decode):
1490         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1491         (WebCore::WEBPImageDecoder::decode):
1492
1493 2011-02-15  Dirk Schulze  <krit@webkit.org>
1494
1495         Reviewed by Nikolas Zimmermann.
1496
1497         SVG animation doesn't support attribute value 'inherit'
1498         https://bugs.webkit.org/show_bug.cgi?id=54410
1499
1500         SVG animation does not support 'inherit' as value for CSS property animations. With the patch, SVG determines
1501         if the attribute of the target element is an animatable CSS Property and computes the style during the
1502         animation.
1503
1504         This fixes the following tests on the W3C test suite:
1505         * animate-elem-84-t.svg
1506         * animate-elem-85-t.svg
1507
1508         Tests: svg/animations/animate-currentColor.html
1509                svg/animations/animate-inherit-css-property.html
1510
1511         * svg/SVGAnimateElement.cpp:
1512         (WebCore::adjustForCurrentColor):
1513         (WebCore::adjustForInheritance):
1514         (WebCore::SVGAnimateElement::calculateAnimatedValue): When a property value is 'inherit' or 'currentColor'
1515         during the animation, get the computed style of the property since the values could be animated themselves.
1516         (WebCore::inheritsFromProperty):
1517         (WebCore::attributeValueIsCurrentColor):
1518         (WebCore::SVGAnimateElement::calculateFromAndToValues): Check if 'from', 'by' or 'to' value has the
1519         string 'inherit' or 'currentColor' and if the attribute supports one of these values.
1520         (WebCore::SVGAnimateElement::calculateFromAndByValues): Ditto.
1521         * svg/SVGAnimateElement.h:
1522         * svg/SVGAnimationElement.cpp:
1523         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Check if target element is stylable and
1524         the attribute is an animatable CSS property by using the CSS property map in SVGStyledElement.
1525         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): s/target/targetElement/ for consistency.
1526         * svg/SVGAnimationElement.h:
1527         * svg/SVGStyledElement.cpp: 
1528         (WebCore::SVGStyledElement::isAnimatableCSSProperty): Checks if the CSS property is animatable.
1529         * svg/SVGStyledElement.h:
1530         * svg/animation/SMILTimeContainer.cpp: Use the new function isTargetAttributeCSSProperty to determine
1531         if the target element is stylable and the attribute is an animatable CSS property.
1532         (WebCore::SMILTimeContainer::baseValueFor):
1533
1534 2011-02-15  Antti Koivisto  <antti@apple.com>
1535
1536         Reviewed by Andreas Kling.
1537
1538         r78499 causes assertion failure in http/tests/xmlhttprequest/cache-override.html
1539         https://bugs.webkit.org/show_bug.cgi?id=54418
1540         
1541         Check for zero buffer length.
1542
1543         * platform/text/TextCodecUTF8.cpp:
1544         (WebCore::TextCodecUTF8::decode):
1545
1546 2011-02-15  MORITA Hajime  <morrita@google.com>
1547
1548         Unreviewed build fix.
1549
1550         * page/EditorClient.h: Changed GrammarDetail forward declaration from class to struct.
1551
1552 2011-01-26  MORITA Hajime  <morrita@google.com>
1553
1554         Reviewed by Ryosuke Niwa.
1555
1556         Refactoring: Extract TextCheckerClient from EditorClient
1557         https://bugs.webkit.org/show_bug.cgi?id=53213
1558         
1559         Created new abstract class TextCheckerClient. The class has
1560         spellcheck related API which is split.
1561         This is the first step for sharing spell-checking codebase
1562         between ports. A standalone TextCheckerClient implementation
1563         should be done in future changes.
1564
1565         No new tests. No behavioral change.
1566
1567         * GNUmakefile.am:
1568         * WebCore.gypi:
1569         * WebCore.pro:
1570         * WebCore.vcproj/WebCore.vcproj:
1571         * WebCore.xcodeproj/project.pbxproj:
1572         * accessibility/mac/AccessibilityObjectWrapper.mm:
1573         (AXAttributeStringSetSpelling):
1574         * editing/Editor.cpp: Replacing some client() call with textChecker().
1575         (WebCore::Editor::textChecker): Added.
1576         (WebCore::Editor::ignoreSpelling):
1577         (WebCore::Editor::learnSpelling):
1578         (WebCore::Editor::isSelectionMisspelled):
1579         (WebCore::Editor::guessesForMisspelledSelection):
1580         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1581         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1582         (WebCore::Editor::correctionPanelTimerFired):
1583         * editing/Editor.h:
1584         * editing/SpellChecker.cpp:
1585         (WebCore::SpellChecker::SpellChecker):
1586         * editing/TextCheckingHelper.cpp: Replacing some client() call with textChecker().
1587         (WebCore::TextCheckingHelper::findFirstMisspelling):
1588         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1589         (WebCore::TextCheckingHelper::findFirstBadGrammar):
1590         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
1591         * loader/EmptyClients.h: Added EmptyTextCheckerClient.
1592         (WebCore::EmptyTextCheckerClient::ignoreWordInSpellDocument):
1593         (WebCore::EmptyTextCheckerClient::learnWord):
1594         (WebCore::EmptyTextCheckerClient::checkSpellingOfString):
1595         (WebCore::EmptyTextCheckerClient::getAutoCorrectSuggestionForMisspelledWord):
1596         (WebCore::EmptyTextCheckerClient::checkGrammarOfString):
1597         (WebCore::EmptyTextCheckerClient::checkTextOfParagraph):
1598         (WebCore::EmptyTextCheckerClient::getGuessesForWord):
1599         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
1600         (WebCore::EmptyEditorClient::textChecker):
1601         * page/EditorClient.h: Extracted TextCheckerClient.
1602         * page/Page.h:
1603         * platform/text/TextCheckerClient.h: Added.
1604         (WebCore::TextCheckerClient::~TextCheckerClient):
1605
1606 2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
1607
1608         Reviewed by Adam Barth.
1609
1610         Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
1611         https://bugs.webkit.org/show_bug.cgi?id=52417
1612
1613         Added two callback functions, canCopyCut and canPaste to EditorClient. These functions
1614         returns true iff the current frame should be able to copy/cut and paste respectively.
1615         They take the default value determined by isDOMPasteAllowed and javaScriptCanAccessClipboard.
1616
1617         These callbacks allows embedders to decide whether or not copy/cut/paste should be enabled
1618         per frame and thus per origin rather than per page.
1619
1620         No new tests are added since this is a WebKit/WebCore interface change.
1621
1622         * editing/EditorCommand.cpp:
1623         (WebCore::supportedCopyCut): Calls canCopyCut.
1624         (WebCore::supportedPaste): Calls canPaste.
1625         * loader/EmptyClients.h:
1626         (WebCore::EmptyEditorClient::canCopyCut): Added.
1627         (WebCore::EmptyEditorClient::canPaste): Added.
1628         * page/EditorClient.h:
1629
1630 2011-02-14  Jeremy Orlow  <jorlow@chromium.org>
1631
1632         efl build fix
1633
1634         * CMakeLists.txt:
1635
1636 2011-02-11  Jeremy Orlow  <jorlow@chromium.org>
1637
1638         Reviewed by Nate Chapin.
1639
1640         Finish up implementing the new event model in IndexedDB
1641         https://bugs.webkit.org/show_bug.cgi?id=54331
1642
1643         We shouldn't have our own event subclasses. Instead, we
1644         should just fire Event's with the proper type and bubble
1645         settings. All the attributes on the events before should
1646         just be on the request. IDBRequest should throw if they're
1647         accessed before the success event fires.
1648
1649         * WebCore.gypi:
1650         * bindings/generic/RuntimeEnabledFeatures.h:
1651         * bindings/js/JSEventCustom.cpp:
1652         (WebCore::toJS):
1653         * bindings/v8/custom/V8EventCustom.cpp:
1654         (WebCore::toV8):
1655         * dom/Event.cpp:
1656         * dom/Event.h:
1657         * page/DOMWindow.idl:
1658         * storage/IDBAbortEvent.h: Removed.
1659         * storage/IDBCompleteEvent.cpp: Removed.
1660         * storage/IDBCompleteEvent.h: Removed.
1661         * storage/IDBDatabase.cpp:
1662         (WebCore::IDBDatabase::~IDBDatabase):
1663         * storage/IDBDatabaseException.h:
1664         * storage/IDBDatabaseException.idl:
1665         * storage/IDBErrorEvent.cpp: Removed.
1666         * storage/IDBErrorEvent.h: Removed.
1667         * storage/IDBErrorEvent.idl: Removed.
1668         * storage/IDBEvent.h: Removed.
1669         * storage/IDBEvent.idl: Removed.
1670         * storage/IDBEventDispatcher.cpp:
1671         (WebCore::IDBEventDispatcher::dispatch):
1672         * storage/IDBRequest.cpp:
1673         (WebCore::IDBRequest::IDBRequest):
1674         (WebCore::IDBRequest::result):
1675         (WebCore::IDBRequest::errorCode):
1676         (WebCore::IDBRequest::webkitErrorMessage):
1677         (WebCore::IDBRequest::source):
1678         (WebCore::IDBRequest::transaction):
1679         (WebCore::IDBRequest::readyState):
1680         (WebCore::IDBRequest::resetReadyState):
1681         (WebCore::IDBRequest::onError):
1682         (WebCore::createSuccessEvent):
1683         (WebCore::IDBRequest::onSuccess):
1684         (WebCore::IDBRequest::dispatchEvent):
1685         * storage/IDBRequest.h:
1686         * storage/IDBRequest.idl:
1687         * storage/IDBSuccessEvent.cpp: Removed.
1688         * storage/IDBSuccessEvent.h: Removed.
1689         * storage/IDBSuccessEvent.idl: Removed.
1690         * storage/IDBTransaction.cpp:
1691         (WebCore::IDBTransaction::onAbort):
1692         (WebCore::IDBTransaction::onComplete):
1693         (WebCore::IDBTransaction::dispatchEvent):
1694
1695 2011-02-14  Enrica Casucci  <enrica@apple.com>
1696
1697         Copy/paste from a WebKit window to a TextEdit window loses fonts.
1698         <rdar://problem/8623090>
1699         https://bugs.webkit.org/show_bug.cgi?id=54416
1700         
1701         Reviewed by Dan Bernstein.
1702         
1703         We don't have the complete solution that fixes this problem for WebKit2 yet.
1704         This patch fixes the regression in WebKit.
1705
1706         * platform/mac/PasteboardMac.mm:
1707         (WebCore::Pasteboard::writeSelection): For WebKit2 use only plain text,
1708         for WebKit use the original API to create the NSAttributedString.
1709
1710 2011-02-14  Levi Weintraub  <leviw@chromium.org>
1711
1712         Reviewed by Alexey Proskuryakov.
1713
1714         Strikethrough disappears when posting a message on odnoklassniki.ru
1715         https://bugs.webkit.org/show_bug.cgi?id=53475
1716
1717         Changing the behavior of the strikethrough execCommand when styleWithCSS
1718         is false. We formerly created <s> tags, which was different than both IE
1719         and FF and caused problems with some rich text editors that would strip
1720         out unexpected tags such as <s>.
1721
1722         Test: editing/execCommand/strikethrough-uses-strike-tag.html
1723
1724         * editing/ApplyStyleCommand.cpp:
1725         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1726
1727 2011-02-14  Pratik Solanki  <psolanki@apple.com>
1728
1729         Remove dead code in FormDataStreamCFNet.cpp
1730         https://bugs.webkit.org/show_bug.cgi?id=54401
1731
1732         Reviewed by Darin Adler.
1733
1734         The static functions in this file are no longer reachable. We added a conditional branch to
1735         use new CFNetwork functions in r30329 and later made that code path permanent in r41517
1736         which made these functions unreachable.
1737
1738         * platform/network/cf/FormDataStreamCFNet.cpp:
1739
1740 2011-02-14  Andreas Kling  <kling@webkit.org>
1741
1742         Reviewed by Darin Adler.
1743
1744         GraphicsContext: Add clip(IntRect) overload for Qt
1745         https://bugs.webkit.org/show_bug.cgi?id=54365
1746
1747         Qt has special code paths for clipping to integer rectangles.
1748         Add a GraphicsContext::clip() overload to allow us to take
1749         advantage of the optimized code.
1750
1751         * platform/graphics/GraphicsContext.cpp:
1752         (WebCore::GraphicsContext::clip):
1753         * platform/graphics/GraphicsContext.h:
1754         * platform/graphics/qt/GraphicsContextQt.cpp:
1755         (WebCore::GraphicsContext::clip):
1756
1757 2011-02-14  Darin Adler  <darin@apple.com>
1758
1759         Reviewed by Alexey Proskuryakov.
1760
1761         Add built-in decoder for UTF-8 for improved performance
1762         https://bugs.webkit.org/show_bug.cgi?id=53898
1763
1764         Covered by existing tests; not adding new tests at this time.
1765
1766         This patch now handles errors in the same way the existing codecs do,
1767         and so passes our tests. The first version failed some tests because
1768         of incorrect error handling. The second version was missing one line
1769         of code that made it decode incomplete sequences at the end of the
1770         buffer twice.
1771
1772         * platform/text/TextCodecICU.cpp:
1773         (WebCore::create): Renamed from newTextCodecICU, made a static member
1774         function, and added a call to adoptPtr.
1775         (WebCore::TextCodecICU::registerEncodingNames): Renamed from
1776         registerExtendedEncodingNames since this class is no longer used for
1777         base codecs. Removed aliases for UTF-8; now handled by TextCodecUTF8.
1778         (WebCore::TextCodecICU::registerCodecs): Renamed.
1779         (WebCore::fallbackForGBK): Renamed to conform to our current style.
1780
1781         * platform/text/TextCodecICU.h: Updated for above changes. Changed
1782         indentation. Made most functions private, including virtual function
1783         overrides. Marked ICUConverterWrapper noncopyable.
1784
1785         * platform/text/TextCodecUTF8.cpp:
1786         (WebCore::TextCodecUTF8::registerEncodingNames): Added the UTF-8 aliases
1787         that were formerly added by TextCodecICU.
1788         (WebCore::nonASCIISequenceLength): Fixed bug where this would return 4 for
1789         bytes F5-FF instead of failing.
1790         (WebCore::decodeNonASCIISequence): Tweaked coding style.
1791         (WebCore::appendCharacter): Added. Makes it easier to share code between
1792         the partial-character handling and main loop.
1793         (WebCore::TextCodecUTF8::decode): Fixed buffer size computation for case
1794         where there is a partial sequence. Fixed partial sequence handling so that
1795         goto is no longer needed, since compilers sometimes make poor code when
1796         goto is involved. Added a loop for partial sequences since we consume only
1797         one byte when a partial sequence is invalid. Fixed logic in main decoding
1798         loop so goto is not needed. Used early-exit style in both loops so the main
1799         flow is not nested inside if statements. Added correct error handling for
1800         flush when a partial sequence remains, which involved wrapping the function
1801         in yet another loop.
1802
1803         * platform/text/TextCodecUTF8.h: Made virtual function overrides private.
1804
1805         * platform/text/TextEncodingRegistry.cpp:
1806         (WebCore::buildBaseTextCodecMaps): Added calls to TextCodecUTF8. Removed
1807         calls to TextCodecICU. Added FIXMEs for other codecs that no longer need
1808         to be included here.
1809         (WebCore::extendTextCodecMaps): Updated for the name change of the
1810         TextCodecICU functions.
1811
1812 2011-02-14  Adam Barth  <abarth@webkit.org>
1813
1814         Reviewed by Eric Seidel.
1815
1816         Add basic parser for Content Security Policy
1817         https://bugs.webkit.org/show_bug.cgi?id=54379
1818
1819         The parser in this patch is very basic.  It just segments the CSP
1820         header into directives.  The exactly syntax will likely change a bit as
1821         we discuss the details in public-web-security, but this parser will
1822         allow us to make progress.
1823
1824         Sadly, this patch does not contain any tests.  That's because CSP
1825         policies do not have any observable effects yet.  Hopefully we'll get
1826         enough sketched out in the next couple patches to begin writing tests.
1827
1828         * page/ContentSecurityPolicy.cpp:
1829         (WebCore::CSPDirective::CSPDirective):
1830         (WebCore::CSPDirective::name):
1831         (WebCore::CSPDirective::value):
1832         (WebCore::ContentSecurityPolicy::~ContentSecurityPolicy):
1833         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1834         (WebCore::ContentSecurityPolicy::parse):
1835         * page/ContentSecurityPolicy.h:
1836
1837 2011-02-14  Andrew Wason  <rectalogic@rectalogic.com>
1838
1839         Reviewed by Kenneth Russell.
1840
1841         [Qt] WebKit fails to compile for Qt when WebGL enabled
1842         https://bugs.webkit.org/show_bug.cgi?id=53431
1843
1844         No new tests.
1845
1846         * WebCore.pro:
1847           Add source and header files and include directory to Qt project.
1848         * html/canvas/WebGLRenderingContext.cpp:
1849           File uses 'emit' which is a Qt keyword - #undef emit.
1850         * platform/graphics/gpu/qt: Added.
1851         * platform/graphics/gpu/qt/DrawingBufferQt.cpp: Added.
1852           Partial implementation of DrawingBuffer for Qt.
1853         (WebCore::DrawingBuffer::DrawingBuffer):
1854         (WebCore::DrawingBuffer::~DrawingBuffer):
1855         (WebCore::DrawingBuffer::didReset):
1856         (WebCore::DrawingBuffer::platformLayer):
1857         (WebCore::DrawingBuffer::platformColorBuffer):
1858         * platform/graphics/qt/Extensions3DQt.cpp:
1859           Noop implementation for pure virtual methods added to Extensions3D.h
1860         (WebCore::Extensions3DQt::blitFramebuffer):
1861         (WebCore::Extensions3DQt::renderbufferStorageMultisample):
1862         * platform/graphics/qt/Extensions3DQt.h:
1863           Declare new methods added to Extensions3D.h
1864         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1865           Remove method implementations no longer in GraphicsContext3D.h.
1866           Change m_syntheticErrors to use unsigned int to match new
1867           GC3Denum type.
1868         (WebCore::GraphicsContext3D::create):
1869          Change return type to match GraphicsContext3D.h
1870         (WebCore::GraphicsContext3D::lineWidth):
1871          Change argument type to GC3Dfloat to match GraphicsContext3D.h
1872         (WebCore::GraphicsContext3D::getUniformLocation):
1873          Change return type to GC3Dfloat to match GraphicsContext3D.h
1874         (WebCore::GraphicsContext3D::getExtensions):
1875          Need to call get() on OwnPtr.
1876         (WebCore::GraphicsContext3D::getImageData):
1877          Rename enum values to match declarations in GraphicsContext3D.h
1878
1879 2011-02-14  Tony Chang  <tony@chromium.org>
1880
1881         Reviewed by Dimitri Glazkov.
1882
1883         <select> elements don't honor border:0px in chromium-linux
1884         https://bugs.webkit.org/show_bug.cgi?id=51152
1885
1886         No new tests, covered by existing pixel results (fast/forms/basic-selects.html
1887         convers lots of cases).
1888
1889         * css/themeChromiumLinux.css:
1890         (select):
1891         * platform/chromium/PlatformBridge.h:
1892         * rendering/RenderThemeChromiumLinux.cpp:
1893         (WebCore::RenderThemeChromiumLinux::paintButton):
1894         (WebCore::RenderThemeChromiumLinux::paintMenuList):
1895           match border logic in RenderThemeChromiumWin.cpp:
1896           http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp#L463
1897
1898 2011-02-14  Xiaomei Ji  <xji@chromium.org>
1899
1900         Reviewed by Dan Bernstein.
1901
1902         Fix rendering of ISO-8859-8 when dir="rtl".
1903         https://bugs.webkit.org/show_bug.cgi?id=52128
1904
1905         Test: fast/text/international/iso-8859-8.html
1906
1907         * platform/text/BidiResolver.h: Add VisualDirectionOverride enum.
1908         (WebCore::::createBidiRunsForLine): For lines with visual direction override,
1909         create bidi runs without resolving bidi levels (one run per render object), 
1910         set bidi level as 0 or 1 depending on LTR or RTL override, 
1911         and reverse runs for RTL override.
1912         * rendering/RenderBlockLineLayout.cpp:
1913         (WebCore::RenderBlock::constructLine): Set inline box bidi level the same as
1914         BidiRun's bidi level without special handling of VisualDirectionOverride.
1915         (WebCore::RenderBlock::layoutInlineChildren): Pass in VisualDirectionOverride 
1916         to createBidiRunsForLine().
1917
1918 2011-02-14  Alexis Menard  <alexis.menard@nokia.com>
1919
1920         Reviewed by Andreas Kling.
1921
1922         [Qt] Crash on application exit after constructing and destroying a QWebView twice
1923         https://bugs.webkit.org/show_bug.cgi?id=54000
1924
1925         Check the value is valid before use it.
1926
1927         * platform/qt/SharedTimerQt.cpp:
1928         (WebCore::SharedTimerQt::~SharedTimerQt):
1929
1930 2011-02-14  Alexander Pavlov  <apavlov@chromium.org>
1931
1932         Reviewed by Yury Semikhatsky.
1933
1934         Web Inspector: 304 Not Modified responses have a yellow icon in Web Inspector Resources panel
1935         https://bugs.webkit.org/show_bug.cgi?id=33220
1936
1937         * inspector/front-end/ResourceHeadersView.js:
1938         (WebInspector.ResourceHeadersView.prototype._refreshHTTPInformation):
1939
1940 2011-02-14  Adrienne Walker  <enne@google.com>
1941
1942         Reviewed by James Robinson.
1943
1944         [chromium] Modify LayerTilerChromium to use TilingData.
1945         https://bugs.webkit.org/show_bug.cgi?id=54143
1946
1947         Most of the previous data in LayerTilerChromium is now calculated
1948         from TilingData.  TilingData was modified to allow for a dynamic
1949         tile size and page size.  LayerTilerChromium also gets its own
1950         shader with a texture transform to handle drawing from a texture
1951         that is larger than a tile.
1952
1953         * platform/graphics/chromium/LayerChromium.h:
1954         * platform/graphics/chromium/LayerRendererChromium.cpp:
1955         (WebCore::LayerRendererChromium::LayerRendererChromium):
1956         (WebCore::LayerRendererChromium::updateAndDrawRootLayer):
1957         (WebCore::LayerRendererChromium::initializeSharedObjects):
1958         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1959         * platform/graphics/chromium/LayerRendererChromium.h:
1960         (WebCore::LayerRendererChromium::tilerSharedValues):
1961         * platform/graphics/chromium/LayerTilerChromium.cpp:
1962         (WebCore::LayerTilerChromium::create):
1963         (WebCore::LayerTilerChromium::LayerTilerChromium):
1964         (WebCore::LayerTilerChromium::setTileSize):
1965         (WebCore::LayerTilerChromium::reset):
1966         (WebCore::LayerTilerChromium::contentRectToTileIndices):
1967         (WebCore::LayerTilerChromium::tileIndex):
1968         (WebCore::LayerTilerChromium::tileContentRect):
1969         (WebCore::LayerTilerChromium::tileLayerRect):
1970         (WebCore::LayerTilerChromium::layerSize):
1971         (WebCore::LayerTilerChromium::layerTileSize):
1972         (WebCore::LayerTilerChromium::invalidateEntireLayer):
1973         (WebCore::LayerTilerChromium::draw):
1974         (WebCore::LayerTilerChromium::resizeLayer):
1975         (WebCore::LayerTilerChromium::growLayerToContain):
1976         (WebCore::LayerTilerChromium::drawTexturedQuad):
1977         (WebCore::LayerTilerChromium::SharedValues::SharedValues):
1978         (WebCore::LayerTilerChromium::SharedValues::~SharedValues):
1979         * platform/graphics/chromium/LayerTilerChromium.h:
1980         (WebCore::LayerTilerChromium::SharedValues::tilerShaderProgram):
1981         (WebCore::LayerTilerChromium::SharedValues::shaderSamplerLocation):
1982         (WebCore::LayerTilerChromium::SharedValues::shaderMatrixLocation):
1983         (WebCore::LayerTilerChromium::SharedValues::shaderAlphaLocation):
1984         (WebCore::LayerTilerChromium::SharedValues::shaderTexTransformLocation):
1985         (WebCore::LayerTilerChromium::SharedValues::initialized):
1986         * platform/graphics/gpu/TilingData.cpp:
1987         (WebCore::computeNumTiles):
1988         (WebCore::TilingData::TilingData):
1989         (WebCore::TilingData::setTotalSize):
1990         (WebCore::TilingData::setMaxTextureSize):
1991         (WebCore::TilingData::tileSizeX):
1992         (WebCore::TilingData::tileSizeY):
1993         (WebCore::TilingData::textureOffset):
1994         (WebCore::TilingData::recomputeNumTiles):
1995         * platform/graphics/gpu/TilingData.h:
1996
1997 2011-02-14  Andrey Adaikin  <aandrey@google.com>
1998
1999         Reviewed by Pavel Feldman.
2000
2001         Web Inspector: [Text editor] First implementation of the editable TextViewer without optimization
2002         https://bugs.webkit.org/show_bug.cgi?id=54388
2003
2004         * inspector/front-end/TextViewer.js:
2005         (WebInspector.TextViewer.prototype.set readOnly):
2006         (WebInspector.TextEditorChunkedPanel):
2007         (WebInspector.TextEditorChunkedPanel.prototype._buildChunks):
2008         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
2009         (WebInspector.TextEditorChunkedPanel.prototype.beginDomUpdates):
2010         (WebInspector.TextEditorChunkedPanel.prototype.endDomUpdates):
2011         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
2012         (WebInspector.TextEditorGutterChunk.prototype.set expanded):
2013         (WebInspector.TextEditorMainPanel):
2014         (WebInspector.TextEditorMainPanel.prototype.set readOnly):
2015         (WebInspector.TextEditorMainPanel.prototype._buildChunks):
2016         (WebInspector.TextEditorMainPanel.prototype._highlightDataReady):
2017         (WebInspector.TextEditorMainPanel.prototype._paintLine):
2018         (WebInspector.TextEditorMainPanel.prototype.textChanged):
2019         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates.return):
2020         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
2021         (WebInspector.TextEditorMainPanel.prototype._handleDOMSubtreeModified):
2022         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2023         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
2024         (WebInspector.TextEditorMainChunk.prototype.addDecoration):
2025         (WebInspector.TextEditorMainChunk.prototype.removeDecoration):
2026         (WebInspector.TextEditorMainChunk.prototype.set expanded):
2027
2028 2011-02-14  Pavel Podivilov  <podivilov@chromium.org>
2029
2030         Reviewed by Yury Semikhatsky.
2031
2032         Web Inspector: use call frame column to determine execution line in source frame.
2033         https://bugs.webkit.org/show_bug.cgi?id=54001
2034
2035         - Make call frame line and column zero based
2036         - Set execution line in source frame based on call frame line:column
2037         - Determine currently hit breakpoint based on call frame line:column
2038
2039         * bindings/js/JavaScriptCallFrame.cpp:
2040         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
2041         * bindings/js/JavaScriptCallFrame.h:
2042         (WebCore::JavaScriptCallFrame::create):
2043         (WebCore::JavaScriptCallFrame::line):
2044         (WebCore::JavaScriptCallFrame::column):
2045         (WebCore::JavaScriptCallFrame::update):
2046         * bindings/js/ScriptDebugServer.cpp:
2047         (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
2048         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
2049         * bindings/v8/DebuggerScript.js:
2050         ():
2051         * inspector/front-end/BreakpointsSidebarPane.js:
2052         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerPaused):
2053         * inspector/front-end/CallStackSidebarPane.js:
2054         (WebInspector.CallStackSidebarPane.prototype.update):
2055         * inspector/front-end/DebuggerModel.js:
2056         (WebInspector.DebuggerModel.prototype.continueToLocation):
2057         (WebInspector.DebuggerModel.prototype._pausedScript):
2058         (WebInspector.DebuggerModel.prototype._breakpointForCallFrame):
2059         * inspector/front-end/ScriptsPanel.js:
2060         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
2061         (WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine):
2062         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
2063         * inspector/front-end/SourceFrame.js:
2064         (WebInspector.SourceFrame.prototype._setTextViewerDecorations):
2065         (WebInspector.SourceFrame.prototype.setExecutionLocation):
2066         (WebInspector.SourceFrame.prototype.clearExecutionLocation):
2067         (WebInspector.SourceFrame.prototype._setExecutionLocation):
2068         (WebInspector.SourceFrame.prototype._breakpointAdded):
2069         (WebInspector.SourceFrame.prototype._continueToLine):
2070         (WebInspector.SourceFrame.prototype._originalLocationToTextViewerLineNumber):
2071
2072 2011-02-14  Christian Dywan  <christian@lanedo.com>
2073
2074         Reviewed by Gustavo Noronha Silva.
2075
2076         Regression: Back, Forward, Reload hidden in context menu
2077         https://bugs.webkit.org/show_bug.cgi?id=54393
2078
2079         * page/ContextMenuController.cpp: Always show Back, Forward,
2080             Reload and Stop context menu items for the GTK+ port.
2081
2082 2011-02-14  Johnny Ding  <jnd@chromium.org>
2083
2084         Reviewed by Andreas Kling.
2085
2086         Move the finiteness check into common code.
2087
2088         Test covered by canvas/philip/tests/2d.path.isPointInPath.nonfinite.html
2089
2090         * html/canvas/CanvasRenderingContext2D.cpp:
2091         (WebCore::CanvasRenderingContext2D::isPointInPath):
2092
2093 2011-02-14  Roland Steiner  <rolandsteiner@chromium.org>
2094
2095         Reviewed by Kent Tamura.
2096
2097         Bug 54377 - Clean up RenderTextControlSingleLine::createSubtreeIfNeeded()
2098         https://bugs.webkit.org/show_bug.cgi?id=54377
2099
2100         Rearranged the condition blocks, removed superfluous conditions:
2101         .) if-statements where it's already clear that a search field is being generated
2102         .) testing for spin-buttons on field types that can never have them.
2103
2104         createInnerBlockStyle(): only search fields create an inner block, and
2105         these can never have spin buttons.
2106
2107         No new tests. (Refactoring - covered by existing tests)
2108
2109         * rendering/RenderTextControlSingleLine.cpp:
2110         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
2111         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
2112
2113 2011-02-10  Pavel Podivilov  <podivilov@chromium.org>
2114
2115         Reviewed by Yury Semikhatsky.
2116
2117         Web Inspector: refactoring, extract SourceMapping from SourceFrameContent.
2118         https://bugs.webkit.org/show_bug.cgi?id=54195
2119
2120         Add SourceMapping interface with two implementations - IdenticalSourceMapping and SourceMappingForFormattedScript.
2121         Rewrite SourceFrameContent based on SourceMapping. Make SourceFrame unaware of source mapping details.
2122
2123         * inspector/front-end/ResourceView.js:
2124         (WebInspector.SourceFrameContentProviderForResource.prototype.requestContent):
2125         * inspector/front-end/ScriptFormatter.js:
2126         (WebInspector.ScriptFormatter.locationToPosition):
2127         (WebInspector.ScriptFormatter.positionToLocation):
2128         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
2129         (WebInspector.ScriptFormatter.prototype.formatContent):
2130         (WebInspector.ScriptFormatter.prototype._splitContentIntoChunks):
2131         (WebInspector.SourceMappingForFormattedScript):
2132         (WebInspector.SourceMappingForFormattedScript.prototype.fromScriptLocation):
2133         (WebInspector.SourceMappingForFormattedScript.prototype.toScriptLocation):
2134         (WebInspector.SourceMappingForFormattedScript.prototype.originalPositionToFormattedLocation):
2135         (WebInspector.SourceMappingForFormattedScript.prototype._convertPosition):
2136         * inspector/front-end/ScriptsPanel.js:
2137         (WebInspector.SourceFrameContentProviderForScript.prototype.requestContent):
2138         * inspector/front-end/SourceFrame.js:
2139         (WebInspector.SourceFrame.prototype._createTextViewer):
2140         (WebInspector.SourceFrame.prototype._shouldDisplayBreakpoint):
2141         (WebInspector.SourceFrame.prototype.setExecutionLine):
2142         (WebInspector.SourceFrame.prototype.clearExecutionLine):
2143         (WebInspector.SourceFrame.prototype._breakpointAdded):
2144         (WebInspector.SourceFrame.prototype.formatSource.didFormat):
2145         (WebInspector.SourceFrame.prototype.formatSource):
2146         (WebInspector.SourceFrame.prototype._continueToLine):
2147         (WebInspector.SourceFrame.prototype._setBreakpoint):
2148         (WebInspector.SourceFrame.prototype._findBreakpoint):
2149         (WebInspector.SourceFrameContentProvider.prototype.requestContent):
2150         * inspector/front-end/SourceFrameContent.js:
2151         (WebInspector.SourceFrameContent):
2152         (WebInspector.SourceFrameContent.prototype.sourceFrameLineNumberToScriptLocation):
2153         (WebInspector.SourceFrameContent.prototype.scriptLocationToSourceFrameLineNumber):
2154         (WebInspector.SourceFrameContent.prototype._sourceIDForSourceFrameLineNumber):
2155         (WebInspector.SourceMapping):
2156         (WebInspector.SourceMapping.prototype.fromScriptLocation):
2157         (WebInspector.SourceMapping.prototype.toScriptLocation):
2158         (WebInspector.IdenticalSourceMapping):
2159         (WebInspector.IdenticalSourceMapping.prototype.fromScriptLocation):
2160         (WebInspector.IdenticalSourceMapping.prototype.toScriptLocation):
2161         * inspector/front-end/utilities.js:
2162         (String.prototype.lineEndings):
2163
2164 2011-02-14  Pavel Feldman  <pfeldman@chromium.org>
2165
2166         Reviewed by Yury Semikhatsky.
2167
2168         Web Inspector: [REGRESSION introduced in r77950] Develop -> Start Debugging JavaScript does not open Web Inspector.
2169         https://bugs.webkit.org/show_bug.cgi?id=54277
2170
2171         * inspector/InspectorAgent.cpp:
2172         (WebCore::InspectorAgent::populateScriptObjects):
2173         (WebCore::InspectorAgent::stopUserInitiatedProfiling):
2174         (WebCore::InspectorAgent::showAndEnableDebugger):
2175         (WebCore::InspectorAgent::showPanel):
2176         * inspector/InspectorAgent.h:
2177         * inspector/InspectorController.cpp:
2178         (WebCore::InspectorController::showAndEnableDebugger):
2179         (WebCore::InspectorController::stopUserInitiatedProfiling):
2180
2181 2011-02-14  Kenichi Ishibashi  <bashi@chromium.org>
2182
2183         Reviewed by Andreas Kling.
2184
2185         css style="max-width:none" works wrong
2186         https://bugs.webkit.org/show_bug.cgi?id=53743
2187
2188         Fix a bug that "max-width:none" works wrong.
2189         See also: http://trac.webkit.org/changeset/13462
2190
2191         Test: fast/css/max-width-none.html
2192
2193         * css/CSSStyleSelector.cpp:
2194         (WebCore::CSSStyleSelector::applyProperty): For max-width of none,
2195         set it to Length(undefinedLength, Fixed), which is the correct
2196         value.
2197
2198 2011-02-14  Antti Koivisto  <antti@apple.com>
2199
2200         Reviewed by Andreas Kling.
2201
2202         REGRESSION (r77834): Assertion failing in svg/custom/use-multiple-on-nested-disallowed-font.svg
2203         https://bugs.webkit.org/show_bug.cgi?id=54344
2204         
2205         Intead of recomputing, just mark style selector dirty if it is invalidated in the middle of a style recalc.
2206
2207         * dom/Document.cpp:
2208         (WebCore::Document::Document):
2209         (WebCore::Document::recalcStyle):
2210         (WebCore::Document::recalcStyleSelector):
2211         * dom/Document.h:
2212
2213 2011-02-14  Naoki Takano  <takano.naoki@gmail.com>
2214
2215         Reviewed by Kent Tamura.
2216
2217         [Chromium] Fix wrong popup position for RTL(again)
2218         https://bugs.webkit.org/show_bug.cgi?id=54375
2219
2220         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.
2221
2222         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
2223
2224         * platform/chromium/PopupMenuChromium.cpp:
2225         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Change the input parameter to take popupInitialCoordinate again. And calculate correct right position with returned right offset from layoutAndGetRightOffset().
2226         (WebCore::PopupContainer::showPopup): Change the passing parameter to layoutAndCalculateWidgetRect().
2227         (WebCore::PopupContainer::layoutAndGetRightOffset): Change the name from layout() and to return rightOffset value.
2228         (WebCore::PopupContainer::refresh): Change the passing parameter to layoutAndCalculateWidgetRect().
2229         * platform/chromium/PopupMenuChromium.h: Change the function name and parameters.
2230
2231 2011-02-14  Alejandro G. Castro  <alex@igalia.com>
2232
2233         Unreviewed, rolling out r78451.
2234         http://trac.webkit.org/changeset/78451
2235         https://bugs.webkit.org/show_bug.cgi?id=53898
2236
2237         It is causing crashes in some bots
2238
2239         * platform/text/TextCodecICU.cpp:
2240         (WebCore::newTextCodecICU):
2241         (WebCore::TextCodecICU::registerBaseEncodingNames):
2242         (WebCore::TextCodecICU::registerBaseCodecs):
2243         (WebCore::TextCodecICU::registerExtendedEncodingNames):
2244         (WebCore::TextCodecICU::registerExtendedCodecs):
2245         (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
2246         (WebCore::getGbkEscape):
2247         (WebCore::urlEscapedEntityCallback):
2248         (WebCore::gbkCallbackEscape):
2249         (WebCore::gbkUrlEscapedEntityCallack):
2250         (WebCore::gbkCallbackSubstitute):
2251         * platform/text/TextCodecICU.h:
2252         (WebCore::ICUConverterWrapper::ICUConverterWrapper):
2253         * platform/text/TextCodecUTF8.cpp:
2254         (WebCore::TextCodecUTF8::registerEncodingNames):
2255         (WebCore::nonASCIISequenceLength):
2256         (WebCore::decodeNonASCIISequence):
2257         (WebCore::TextCodecUTF8::decode):
2258         * platform/text/TextCodecUTF8.h:
2259         * platform/text/TextEncodingRegistry.cpp:
2260         (WebCore::buildBaseTextCodecMaps):
2261         (WebCore::extendTextCodecMaps):
2262
2263 2011-02-13  Antti Koivisto  <antti@apple.com>
2264
2265         Reviewed by Dan Bernstein.
2266
2267         https://bugs.webkit.org/show_bug.cgi?id=54376
2268         Make sorting of matched rules faster
2269         
2270         - use std::sort
2271         - cache specificity, it is slow to compute
2272         - inline compare function
2273
2274         * css/CSSStyleSelector.cpp:
2275         (WebCore::RuleData::specificity):
2276         (WebCore::CSSStyleSelector::matchRules):
2277         (WebCore::compareRules):
2278         (WebCore::CSSStyleSelector::sortMatchedRules):
2279         (WebCore::RuleData::RuleData):
2280         (WebCore::CSSStyleSelector::matchPageRules):
2281         * css/CSSStyleSelector.h:
2282
2283 2011-02-12  Darin Adler  <darin@apple.com>
2284
2285         Reviewed by Alexey Proskuryakov.
2286
2287         Add built-in decoder for UTF-8 for improved performance
2288         https://bugs.webkit.org/show_bug.cgi?id=53898
2289
2290         Covered by existing tests; not adding new tests at this time.
2291
2292         This patch now handles errors in the same way the existing codecs do,
2293         and so passes our tests. The previous version failed some tests because
2294         of incorrect error handling.
2295
2296         * platform/text/TextCodecICU.cpp:
2297         (WebCore::create): Renamed from newTextCodecICU, made a static member
2298         function, and added a call to adoptPtr.
2299         (WebCore::TextCodecICU::registerEncodingNames): Renamed from
2300         registerExtendedEncodingNames since this class is no longer used for
2301         base codecs. Removed aliases for UTF-8; now handled by TextCodecUTF8.
2302         (WebCore::TextCodecICU::registerCodecs): Renamed.
2303         (WebCore::fallbackForGBK): Renamed to conform to our current style.
2304
2305         * platform/text/TextCodecICU.h: Updated for above changes. Changed
2306         indentation. Made most functions private, including virtual function
2307         overrides. Marked ICUConverterWrapper noncopyable.
2308
2309         * platform/text/TextCodecUTF8.cpp:
2310         (WebCore::TextCodecUTF8::registerEncodingNames): Added the UTF-8 aliases
2311         that were formerly added by TextCodecICU.
2312         (WebCore::nonASCIISequenceLength): Fixed bug where this would return 4 for
2313         bytes F5-FF instead of failing.
2314         (WebCore::decodeNonASCIISequence): Tweaked coding style.
2315         (WebCore::appendCharacter): Added. Makes it easier to share code between
2316         the partial-character handling and main loop.
2317         (WebCore::TextCodecUTF8::decode): Fixed buffer size computation for case
2318         where there is a partial sequence. Fixed partial sequence handling so that
2319         goto is no longer needed, since compilers sometimes make poor code when
2320         goto is involved. Added a loop for partial sequences since we consume only
2321         one byte when a partial sequence is invalid. Fixed logic in main decoding
2322         loop so goto is not needed. Used early-exit style in both loops so the main
2323         flow is not nested inside if statements. Added correct error handling for
2324         flush when a partial sequence remains, which involved wrapping the function
2325         in yet another loop.
2326
2327         * platform/text/TextCodecUTF8.h: Made virtual function overrides private.
2328
2329         * platform/text/TextEncodingRegistry.cpp:
2330         (WebCore::buildBaseTextCodecMaps): Added calls to TextCodecUTF8. Removed
2331         calls to TextCodecICU. Added FIXMEs for other codecs that no longer need
2332         to be included here.
2333         (WebCore::extendTextCodecMaps): Updated for the name change of the
2334         TextCodecICU functions.
2335
2336 2011-02-13  Mark Rowe  <mrowe@apple.com>
2337
2338         Reviewed by Maciej Stachowiak.
2339
2340         <rdar://problem/8995490> WebCoreAuthenticationClientAsChallengeSender doesn't implement some necessary methods.
2341
2342         * platform/network/mac/AuthenticationMac.mm:
2343         (-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
2344         (-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
2345
2346 2011-02-13  Simon Fraser  <simon.fraser@apple.com>
2347
2348         Reviewed by Andreas Kling.
2349
2350         Repeating gradients drawn incorrectly
2351         https://bugs.webkit.org/show_bug.cgi?id=53502
2352         
2353         The 'forward-fill' logic for repeating gradients used the wrong
2354         starting stop index (0 rather than the original first index), which
2355         resulted in incorrect gradients if backwards-fill had already been
2356         applied.
2357
2358         Test: fast/gradients/css3-repeating-end-fill.html
2359
2360         * css/CSSGradientValue.cpp:
2361         (WebCore::CSSGradientValue::addStops):
2362
2363 2011-02-13  Benjamin Poulain  <benjamin.poulain@nokia.com>
2364
2365         Reviewed by Andreas Kling.
2366
2367         Unused variable result in RenderBlock::addOverflowFromFloats()
2368         https://bugs.webkit.org/show_bug.cgi?id=54363
2369
2370         Remove the unused variable.
2371
2372         * rendering/RenderBlock.cpp:
2373         (WebCore::RenderBlock::addOverflowFromFloats):
2374
2375 2011-02-13  Cameron Zwarich  <zwarich@apple.com>
2376
2377         Reviewed by Anders Carlsson.
2378
2379         WebCore fails to build with Clang's -Woverloaded-virtual
2380         https://bugs.webkit.org/show_bug.cgi?id=54367
2381
2382         * loader/PingLoader.h:
2383         (WebCore::PingLoader::didReceiveData): Change the method signature to match the signature
2384         in the base class.
2385
2386 2011-02-13  Nico Weber  <thakis@chromium.org>
2387
2388         Reviewed by Anders Carlsson.
2389
2390         RenderBR::width() tries but fails to override RenderText::width()
2391         https://bugs.webkit.org/show_bug.cgi?id=54301
2392
2393         The superclass method's signature changed, e.g. in
2394         http://trac.webkit.org/changeset/57215, but the subclass was not
2395         updated.
2396
2397         * rendering/RenderBR.h:
2398         (WebCore::RenderBR::width):
2399
2400 2011-02-13  Andreas Kling  <kling@webkit.org>
2401
2402         Reviewed by Dirk Schulze.
2403
2404         Canvas: 2d.fillStyle.parse.system.html fails
2405         https://bugs.webkit.org/show_bug.cgi?id=39168
2406
2407         Based on previous work by Julien Chaffraix <jchaffraix@codeaurora.org>
2408         and Jan Erik Hanssen <jhanssen@sencha.com>
2409
2410         * css/CSSParser.cpp:
2411         (WebCore::CSSParser::parseColor): Changed the function to better match our
2412         early return policy. Also we now return false when we don't parse the color.
2413         This is needed for createFromString to fallback to using parseSystemColor.
2414
2415         (WebCore::CSSParser::parseSystemColor): Made use of the RenderTheme to get
2416         the system colors.
2417
2418         * css/CSSParser.h: Added the new parseSystemColor method.
2419
2420         * html/canvas/CanvasRenderingContext2D.cpp:
2421         (WebCore::CanvasRenderingContext2D::setStrokeColor): Pass the document to createFromString.
2422         (WebCore::CanvasRenderingContext2D::setFillColor): Ditto.
2423
2424         * html/canvas/CanvasStyle.cpp:
2425         (WebCore::parseColor):
2426         (WebCore::parseColorOrCurrentColor):
2427         (WebCore::CanvasStyle::createFromString): Try to parse the color using CSSParser::parseColor
2428         and fall back to parseSystemColor if it did not work.
2429
2430         * html/canvas/CanvasStyle.h: Added the new Document* parameter to createFromString.
2431
2432 2011-02-13  Jeremy Moskovich  <jeremy@chromium.org>
2433
2434         Reviewed by Adam Barth.
2435
2436         Add a compile-time option to completely disable WebArchive support.
2437         https://bugs.webkit.org/show_bug.cgi?id=52712
2438
2439         Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
2440
2441         ArchiveResource and ArchiveResourceCollection are notably still compiled in. They are used
2442         in Safari for functionality such as "Save Image As" and Image copy & paste independent of
2443         WebArchive support.
2444
2445         Ports Affected:
2446             WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
2447             This patch preserves this behavior except that it also disables support in the Chromium port.
2448
2449         No behavior changes so no new tests.
2450
2451         * WebCore.gyp/WebCore.gyp: Don't compile LegacyWebArchive.cpp and friends.
2452         * WebCore.pro: Don't compile ArchiveFactory.cpp in Qt port.
2453         * loader/DocumentLoader.cpp: Surround WebArchive code with #ifdef.
2454         (WebCore::DocumentLoader::commitLoad):
2455         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
2456         (WebCore::DocumentLoader::archiveResourceForURL):
2457         * loader/DocumentLoader.h:
2458         * loader/FrameLoader.cpp:
2459         (WebCore::FrameLoader::loadURLIntoChildFrame):
2460         (WebCore::FrameLoader::stopAllLoaders):
2461         (WebCore::FrameLoader::finishedLoadingDocument):
2462         * loader/FrameLoader.h:
2463         * loader/ResourceLoader.cpp:
2464         (WebCore::ResourceLoader::start):
2465         * loader/archive/ArchiveFactory.cpp: Remove #ifdef since feature is now enabled/disabled wholesale.
2466         (WebCore::archiveMIMETypes):
2467         * page/Settings.cpp:
2468         * page/Settings.h:
2469         * platform/MIMETypeRegistry.cpp:
2470         (WebCore::initializeSupportedNonImageMimeTypes):
2471
2472 2011-02-13  Aparna Nandyal  <aparna.nand@wipro.com>
2473
2474         Reviewed by Andreas Kling.
2475
2476         [Qt] QtWebKit does not properly handle D&D of a percent-encoded URL.
2477         https://bugs.webkit.org/show_bug.cgi?id=53320
2478
2479         The encoding that was done is corrected in the fix.  
2480         Replaced the KURL encoding function with QUrl API.
2481
2482         * platform/qt/DragDataQt.cpp:
2483         (WebCore::DragData::asURL):
2484
2485 2011-02-13  Leo Yang  <leo.yang.c@gmail.com>
2486
2487         Reviewed by Andreas Kling.
2488
2489         Unnecessary call of containingBlock() in RenderBoxModelObject::relativePositionOffsetX()
2490         https://bugs.webkit.org/show_bug.cgi?id=54351
2491
2492         We were calling containingBlock() twice if the left is not auto. We only need to call it
2493         once because we can use 'cb' variable in the following line.
2494
2495         No functionality change, no new tests.
2496
2497         * rendering/RenderBoxModelObject.cpp:
2498         (WebCore::RenderBoxModelObject::relativePositionOffsetX):
2499
2500 2011-02-13  Jarred Nicholls  <jarred@sencha.com>
2501
2502         Reviewed by Simon Fraser.
2503
2504         getComputedStyle returns wrong value for margin-right
2505         https://bugs.webkit.org/show_bug.cgi?id=13343
2506         
2507         Matching IE, Firefox, and Opera behavior by returning the computed margin
2508         values as specified, rather than the used/auto values (calculated via RenderBox).
2509         Also CSS 2.1+ compliant by returning margin percentage as specified, if applicable.
2510         Note: Firefox and Opera return calculated fixed lengths for percentage margins, IE
2511         returns the specified percentage.
2512
2513         Tests: fast/css/getComputedStyle/getComputedStyle-margin-auto.html
2514                fast/css/getComputedStyle/getComputedStyle-margin-length.html
2515                fast/css/getComputedStyle/getComputedStyle-margin-percentage.html
2516
2517         * css/CSSComputedStyleDeclaration.cpp:
2518         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2519
2520 2011-02-13  Adam Barth  <abarth@webkit.org>
2521
2522         Reviewed by Sam Weinig.
2523
2524         crypto.getRandomValues should throw TYPE_MISMATCH_ERR
2525         https://bugs.webkit.org/show_bug.cgi?id=54346
2526
2527         As requested by Sam.
2528
2529         * page/Crypto.cpp:
2530         (WebCore::Crypto::getRandomValues):
2531
2532 2011-02-13  Alexey Proskuryakov  <ap@apple.com>
2533
2534         Reviewed by Dan Bernstein.
2535
2536         https://bugs.webkit.org/show_bug.cgi?id=54349
2537         Inline some accessors in PrintContext
2538
2539         No change in behavior, so no tests.
2540
2541         * WebCore.exp.in:
2542         * page/PrintContext.cpp:
2543         * page/PrintContext.h:
2544         (WebCore::PrintContext::pageCount):
2545         (WebCore::PrintContext::pageRect):
2546         Inline pageCount() and pageRect() to match pageRects().
2547
2548 2011-02-13  Sam Weinig  <sam@webkit.org>
2549
2550         Roll r78424 [Extra scrolling required when scrolling with a scroll wheel (Mighty Mouse)] back
2551         in with fixes to make it work with render layers.
2552
2553         * platform/mac/ScrollAnimatorMac.h:
2554         * platform/mac/ScrollAnimatorMac.mm:
2555         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
2556         (WebCore::ScrollAnimatorMac::adjustScrollXPositionIfNecessary):
2557         (WebCore::ScrollAnimatorMac::adjustScrollYPositionIfNecessary):
2558         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
2559         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
2560         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
2561         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
2562         * rendering/RenderLayer.cpp:
2563         (WebCore::RenderLayer::RenderLayer):
2564         (WebCore::RenderLayer::contentsSize):
2565         (WebCore::RenderLayer::visibleHeight):
2566         (WebCore::RenderLayer::visibleWidth):
2567         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2568         * rendering/RenderLayer.h:
2569         * rendering/RenderListBox.cpp:
2570         (WebCore::RenderListBox::visibleHeight):
2571         (WebCore::RenderListBox::visibleWidth):
2572         * rendering/RenderListBox.h:
2573
2574 2011-02-13  Sam Weinig  <sam@webkit.org>
2575
2576         Reviewed by Dan Bernstein.
2577
2578         Some Scrollbar functions assume an attached ScrollableArea but can be called without one
2579         https://bugs.webkit.org/show_bug.cgi?id=54262
2580
2581         Make sure that all calls to the scrollable area are null checked.
2582
2583         * platform/Scrollbar.cpp:
2584         (WebCore::Scrollbar::autoscrollPressedPart):
2585         (WebCore::Scrollbar::moveThumb):
2586         (WebCore::Scrollbar::mouseMoved):
2587
2588 2011-02-13  Sam Weinig  <sam@webkit.org>
2589
2590         Roll out r78424. It broke a bunch of tests.
2591
2592         * platform/mac/ScrollAnimatorMac.h:
2593         * platform/mac/ScrollAnimatorMac.mm:
2594         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
2595         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
2596         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
2597         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
2598         * rendering/RenderLayer.cpp:
2599         * rendering/RenderLayer.h:
2600         (WebCore::RenderLayer::contentsSize):
2601         * rendering/RenderListBox.cpp:
2602         * rendering/RenderListBox.h:
2603
2604 2011-02-12  Sam Weinig  <sam@webkit.org>
2605
2606         Reviewed by Dan Bernstein.
2607
2608         WK2: Extra scrolling required when scrolling with a scroll wheel (Mighty Mouse)
2609         <rdar://problem/8984760> 
2610
2611         When going down the smooth scroll path, constrained scrolls (such as those from a
2612         Mighty Mouse) were being correctly constrained at the ScrollView level, but the 
2613         duplicate values being stored by the animator were not being constrained correctly.
2614
2615         In order to implement the constraint at this level, more of the ScrollableArea's API
2616         needed to be filled in for RenderLayer and RenderListBox.
2617
2618         * platform/mac/ScrollAnimatorMac.h:
2619         * platform/mac/ScrollAnimatorMac.mm:
2620         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation): Call immediateScrollToPoint to stay
2621         consistent and get the desired behavior.
2622
2623         (WebCore::ScrollAnimatorMac::adjustScrollXPositionIfNecessary):
2624         (WebCore::ScrollAnimatorMac::adjustScrollYPositionIfNecessary):
2625         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
2626         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
2627         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
2628         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
2629         Ensure that the scroll animators view of the current scroll position is the
2630         same as the scrollable areas by correctly clamping the value.
2631
2632         * rendering/RenderLayer.cpp:
2633         (WebCore::RenderLayer::contentsSize): Correct implementation
2634         to use the scroll size, not the visible size.
2635         (WebCore::RenderLayer::visibleHeight):
2636         (WebCore::RenderLayer::visibleWidth):
2637         * rendering/RenderLayer.h:
2638         * rendering/RenderListBox.cpp:
2639         (WebCore::RenderListBox::visibleHeight):
2640         (WebCore::RenderListBox::visibleWidth):
2641         * rendering/RenderListBox.h:
2642         Add implementations for visibleHeight/visibleWidth.
2643
2644 2011-02-12  Adam Barth  <abarth@webkit.org>
2645
2646         Reviewed by Sam Weinig.
2647
2648         crypto.getRandomValues should support all integer array types
2649         https://bugs.webkit.org/show_bug.cgi?id=54342
2650
2651         As discussed on whatwg, we should support all the integer array types.
2652
2653         Test: security/crypto-random-values-types.html
2654
2655         * page/Crypto.cpp:
2656         (WebCore::Crypto::getRandomValues):
2657
2658 2011-02-12  Adam Barth  <abarth@webkit.org>
2659
2660         Reviewed by Mark Rowe.
2661
2662         Use /dev/urandom as the OSRandomSource on OS(DARWIN)
2663         https://bugs.webkit.org/show_bug.cgi?id=54279
2664
2665         Update the ifdef.  OS(UNIX) includes OS(DARWIN), so this change is
2666         should be a NOP.
2667
2668         * config.h:
2669
2670 2011-02-11  Zhenyao Mo  <zmo@google.com>
2671
2672         Reviewed by Kenneth Russell.
2673
2674         [chromium] Allow turning off multisampling through web preference settings
2675         https://bugs.webkit.org/show_bug.cgi?id=54321
2676
2677         * html/canvas/WebGLRenderingContext.cpp:
2678         (WebCore::WebGLRenderingContext::create): Disable multisampling in WebGL if web reference says so.
2679         * page/Settings.cpp: Add a flag for multisampling preference.
2680         (WebCore::Settings::Settings):
2681         (WebCore::Settings::setOpenGLMultisamplingEnabled):
2682         * page/Settings.h: Ditto.
2683         (WebCore::Settings::openGLMultisamplingEnabled):
2684
2685 2011-02-12  Ryosuke Niwa  <rniwa@webkit.org>
2686
2687         Reviewed by Tony Chang.
2688
2689         Deploy EditingStyle in applyBlockStyle and applyInlineStyle
2690         https://bugs.webkit.org/show_bug.cgi?id=53911
2691
2692         Deployed EditingStyle in ApplyStyleCommand::applyBlockStyle and ApplyStyleCommand::applyInlineStyle.
2693         Extracted EditingStyle::extractAndRemoveTextDirection from applyInlineStyle.
2694         Also added propertiesToInclude to the argument list of EditingStyle's constructor that takes Node*
2695         so that splitAncestorsWithUnicodeBidi can call EditingStyle::textDirection to obtain the text direction.
2696
2697         No new tests are added since this is a refactoring.
2698
2699         * editing/ApplyStyleCommand.cpp:
2700         (WebCore::ApplyStyleCommand::doApply): Passes EditingStyle* to applyBlockStyle and applyInlineStyle.
2701         (WebCore::ApplyStyleCommand::applyBlockStyle): Takes EditingStyle*.
2702         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Changed the type of allowedDirection
2703         from int to WritingDirection. Uses EditingStyle's textDirection to obtain the writing direction.
2704         (WebCore::ApplyStyleCommand::applyInlineStyle): Takes EditingStyle*.
2705         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Allows style to be null; exit early instead.
2706         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Asserts that style is not null.
2707         (WebCore::ApplyStyleCommand::removeInlineStyle): Allows style to be null.
2708         * editing/ApplyStyleCommand.h: Includes WritingDirection.h; prototype changes.
2709         * editing/EditingStyle.cpp:
2710         (WebCore::EditingStyle::EditingStyle): Added PropertiesToInclude to the argument.
2711         (WebCore::EditingStyle::init): Supports PropertiesToInclude.
2712         (WebCore::EditingStyle::extractAndRemoveTextDirection): Extracted from applyInlineStyle.
2713         * editing/EditingStyle.h:
2714         (WebCore::EditingStyle::create): Supports PropertiesToInclude.
2715
2716 2011-02-12  Jochen Eisinger  <jochen@chromium.org>
2717
2718         Reviewed by Jeremy Orlow.
2719
2720         Implement IDBObjectStore::clear
2721         https://bugs.webkit.org/show_bug.cgi?id=54193
2722
2723         Test: storage/indexeddb/objectstore-clear.html
2724
2725         * storage/IDBObjectStore.cpp:
2726         (WebCore::IDBObjectStore::clear):
2727         * storage/IDBObjectStore.h:
2728         * storage/IDBObjectStore.idl:
2729         * storage/IDBObjectStoreBackendImpl.cpp:
2730         (WebCore::IDBObjectStoreBackendImpl::clear):
2731         (WebCore::doDelete):
2732         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
2733         * storage/IDBObjectStoreBackendImpl.h:
2734         * storage/IDBObjectStoreBackendInterface.h:
2735
2736 2011-02-12  Adam Barth  <abarth@webkit.org>
2737
2738         Another attempt to fix the EFL build.  Looks like we're missing one
2739         more file.
2740
2741         * CMakeLists.txt:
2742
2743 2011-02-12  Adam Barth  <abarth@webkit.org>
2744
2745         Attempt to fix the EFL build.  Apparently the CMake build had no
2746         concept of ArrayBuffers.
2747
2748         * CMakeLists.txt:
2749
2750 2011-02-12  Ryosuke Niwa  <rniwa@webkit.org>
2751
2752         Unreviewed build fix.
2753
2754         * dom/Range.cpp:
2755         (WebCore::lengthOfContentsInNode): Replaced static const unsigned LengthOfContentsInNode.
2756         (WebCore::Range::processContents):
2757         (WebCore::Range::processContentsBetweenOffsets):
2758
2759 2011-02-12  Adam Barth  <abarth@webkit.org>
2760
2761         CPP files belong in SOURCES not in HEADERS.  There are more errors like
2762         this for other disabled features, but I'm not fixing them in this
2763         patch.
2764
2765         * WebCore.pro:
2766
2767 2011-02-12  Adam Barth  <abarth@webkit.org>
2768
2769         Apparently lines in .pro files need to be \-terminated.
2770
2771         * WebCore.pro:
2772
2773 2011-02-11  Ryosuke Niwa  <rniwa@webkit.org>
2774
2775         Reviewed by Darin Adler.
2776
2777         Extract a function to process contents for one node from Range::processContents
2778         https://bugs.webkit.org/show_bug.cgi?id=54282
2779
2780         Extracted Range::processContentsBetweenOffsets, which process contents of a node
2781         between two offsets. This function is used for the simple case where the start
2782         and the end containers are of the same node, and to process start and end containers
2783         in the complex case.
2784
2785         When the function takes a non-null fragment (simple case), it appends the processed
2786         contents to the fragment; character data and processing instruction's contents are copied
2787         between the offsets, and descendants are copied for node of other types (not node itself).
2788
2789         When the fragment is null (complex case), the function copies contents of character data,
2790         processing instruction, and node of other types (including node itself).
2791
2792         No new tests are added since this is a refactoring.
2793
2794         * dom/Range.cpp:
2795         (WebCore::highestAncestorUnderCommonRoot): Added.
2796         (WebCore::Range::processContents): Calls highestAncestorUnderCommonRoot and
2797         processContentsBetweenOffsets.
2798         (WebCore::Range::processContentsBetweenOffsets): Added.
2799         * dom/Range.h:
2800
2801 2011-02-12  Adam Barth  <abarth@webkit.org>
2802
2803         Attempt to fix the Qt Windows build.
2804
2805         * WebCore.pro:
2806
2807 2011-02-12  Adam Barth  <abarth@webkit.org>
2808
2809         Reviewed by Kenneth Russell.
2810
2811         Enable ArrayBuffers by default
2812         https://bugs.webkit.org/show_bug.cgi?id=54310
2813
2814         As discussed on webkit-dev, ArrayBuffers are used by a bunch of
2815         different APIs, implemented by Firefox, and appear to be stable.
2816         Keeping them conditional is a large mantainance burden than it's worth.
2817
2818         * DerivedSources.cpp:
2819         * WebCore.vcproj/WebCore.vcproj:
2820         * bindings/generic/RuntimeEnabledFeatures.h:
2821         (WebCore::RuntimeEnabledFeatures::setWebGLEnabled):
2822         * bindings/js/JSArrayBufferCustom.cpp:
2823         * bindings/js/JSBindingsAllInOne.cpp:
2824         * bindings/js/JSDOMWindowCustom.cpp:
2825         * bindings/js/JSDataViewCustom.cpp:
2826         * bindings/js/JSFloat32ArrayCustom.cpp:
2827         * bindings/js/JSInt16ArrayCustom.cpp:
2828         * bindings/js/JSInt32ArrayCustom.cpp:
2829         * bindings/js/JSInt8ArrayCustom.cpp:
2830         * bindings/js/JSUint16ArrayCustom.cpp:
2831         * bindings/js/JSUint32ArrayCustom.cpp:
2832         * bindings/js/JSUint8ArrayCustom.cpp:
2833         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
2834         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2835         * bindings/v8/custom/V8DataViewCustom.cpp:
2836         * bindings/v8/custom/V8Float32ArrayCustom.cpp:
2837         * bindings/v8/custom/V8Int16ArrayCustom.cpp:
2838         * bindings/v8/custom/V8Int32ArrayCustom.cpp:
2839         * bindings/v8/custom/V8Int8ArrayCustom.cpp:
2840         * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
2841         * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
2842         * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
2843         * html/canvas/ArrayBuffer.cpp:
2844         * html/canvas/ArrayBuffer.idl:
2845         * html/canvas/ArrayBufferView.cpp:
2846         * html/canvas/ArrayBufferView.idl:
2847         * html/canvas/DataView.cpp:
2848         * html/canvas/DataView.idl:
2849         * html/canvas/Float32Array.cpp:
2850         * html/canvas/Float32Array.idl:
2851         * html/canvas/Int16Array.cpp:
2852         * html/canvas/Int16Array.idl:
2853         * html/canvas/Int32Array.cpp:
2854         * html/canvas/Int32Array.idl:
2855         * html/canvas/Int8Array.cpp:
2856         * html/canvas/Int8Array.idl:
2857         * html/canvas/Uint16Array.cpp:
2858         * html/canvas/Uint16Array.idl:
2859         * html/canvas/Uint32Array.cpp:
2860         * html/canvas/Uint32Array.idl:
2861         * html/canvas/Uint8Array.cpp:
2862         * html/canvas/Uint8Array.idl:
2863         * page/Crypto.cpp:
2864         (WebCore::Crypto::getRandomValues):
2865         * page/Crypto.h:
2866         * page/Crypto.idl:
2867         * page/DOMWindow.idl:
2868         * workers/WorkerContext.idl:
2869
2870 2011-02-11  Yael Aharon  <yael.aharon@nokia.com>
2871
2872         Reviewed by Darin Adler.
2873
2874         Background image positioning on RTL text
2875         https://bugs.webkit.org/show_bug.cgi?id=32862
2876
2877         When the style of InlineFlowBox is right-to-left, the strips should be rearranged in reverse order.
2878
2879         Tests: fast/inline/inline-box-background-long-image.html
2880                fast/inline/inline-box-background-repeat-x.html
2881                fast/inline/inline-box-background-repeat-y.html
2882                fast/inline/inline-box-background.html
2883
2884         * rendering/InlineFlowBox.cpp:
2885         (WebCore::InlineFlowBox::paintFillLayer):
2886
2887 2011-02-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2888
2889         Unreviewed, rolling out r78044.
2890         http://trac.webkit.org/changeset/78044
2891         https://bugs.webkit.org/show_bug.cgi?id=54318
2892
2893         Broke Safari extensions (Requested by eseidel on #webkit).
2894
2895         * platform/KURL.cpp:
2896         (WebCore::KURL::parse):
2897
2898 2011-02-11  Beth Dakin  <bdakin@apple.com>
2899
2900         Reviewed by Sam Weinig.
2901
2902         Fix for <rdar://problem/8976456> Scrollbars for overflow
2903         areas never appear for WKScrollbarPainter scrollers
2904
2905         Call ScrollableArea::didAddVerticalScrollbar() and 
2906         ScrollableArea::willRemoveVerticalScrollbar() when
2907         appropriate for RenderLayers.
2908         * rendering/RenderLayer.cpp:
2909         (WebCore::RenderLayer::setHasHorizontalScrollbar):
2910         (WebCore::RenderLayer::setHasVerticalScrollbar):
2911
2912 2011-02-11  Eric Seidel  <eric@webkit.org>
2913
2914         Reviewed by Adam Barth.
2915
2916         KURL should remove default port numbers when cannonicalizing urls (to match every other browser)
2917         https://bugs.webkit.org/show_bug.cgi?id=54090
2918
2919         * platform/KURL.cpp:
2920         (WebCore::isDefaultPortForScheme):
2921         (WebCore::KURL::parse):
2922
2923 2011-02-11  Mike Reed  <reed@google.com>
2924
2925         Reviewed by James Robinson.
2926
2927         Need makeContextCurrent() called in prepareForSoftwareDraw(), in the case that skia's backend
2928         is the gpu. This matches the pattern in GraphicsContext3DOpenGL.cpp
2929
2930         No new tests. All existing canvas layouttests exercise this code path
2931
2932         * platform/graphics/skia/PlatformContextSkia.cpp:
2933         (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
2934
2935 2011-02-11  Adam Klein  <adamk@chromium.org>
2936
2937         Reviewed by Darin Adler.
2938
2939         Check for empty scheme before accessing URLSchemeMaps in SchemeRegistry
2940         https://bugs.webkit.org/show_bug.cgi?id=54304
2941
2942         This avoids potential crashes in HashMap, as WTF's StringHash doesn't
2943         accept empty Strings.
2944
2945         * platform/SchemeRegistry.cpp:
2946         (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess):
2947         (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure):
2948         (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument):
2949
2950 2011-02-11  Adam Klein  <adamk@chromium.org>
2951
2952         Reviewed by Darin Fisher.
2953
2954         [fileapi] Add support for filesystem: URI handling
2955         https://bugs.webkit.org/show_bug.cgi?id=53529
2956
2957         There are two major parts to this patch: one is to add an
2958         implementation of Entry.toURI to the FileSystem API.
2959         The other is to implement security origin checking for this
2960         new scheme.
2961
2962         All changes are guarded by the FILE_SYSTEM feature. An accompanying
2963         Chromium change, to support loading of filesystem: URIs, has recently
2964         been submitted as Chromium r74082.
2965
2966         Spec:
2967           http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#methods-2
2968         Proposed URI format, and discussion of security origin issues:
2969           http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0218.html
2970
2971         Tests: fast/filesystem/directory-entry-to-uri.html
2972                fast/filesystem/file-entry-to-uri.html
2973                fast/filesystem/filesystem-uri-origin.html
2974                http/tests/security/filesystem-iframe-from-remote.html
2975
2976         * fileapi/Entry.cpp:
2977         (WebCore::Entry::toURI):
2978         * fileapi/Entry.h:
2979         * fileapi/Entry.idl:
2980         - Added toURI method to the IDL, omitting the MIME type argument
2981           specified in the spec as it will soon be removed.
2982         * page/SecurityOrigin.cpp:
2983         (WebCore::SecurityOrigin::SecurityOrigin):
2984         - crack the filesystem: URI to get at the origin of the site
2985         (WebCore::SecurityOrigin::canDisplay):
2986         - canDisplay for filesystem: URIs is equivalent to canRequest
2987         * platform/AsyncFileSystem.cpp:
2988         (WebCore::AsyncFileSystem::create):
2989         (WebCore::AsyncFileSystem::openFileSystem):
2990         * platform/AsyncFileSystem.h:
2991         (WebCore::AsyncFileSystem::type):
2992         - Exposed filesystem type to allow toURI to use it as part of the
2993           path.
2994         (WebCore::AsyncFileSystem::AsyncFileSystem):
2995         * platform/SchemeRegistry.cpp:
2996         (WebCore::canDisplayOnlyIfCanRequestSchemes):
2997         (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest):
2998         (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
2999         - Generalized canDisplayOnlyIfCanRequest as it applies to both
3000           filesystem: and blob: URIs.
3001         * platform/SchemeRegistry.h:
3002
3003 2011-02-11  Beth Dakin  <bdakin@apple.com>
3004
3005         Reviewed by Darin Adler.
3006
3007         Fix for <rdar://problem/8961061> CrashTracer: [USER] 
3008         1 crash at com.apple.WebCore: 
3009         -[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:] + 62
3010
3011         Must check for null _animator.
3012         * platform/mac/ScrollAnimatorMac.mm:
3013         (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
3014         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
3015         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
3016         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
3017         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
3018         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
3019         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
3020
3021 2011-02-11  Chris Rogers  <crogers@google.com>
3022
3023         Reviewed by Kenneth Russell.
3024
3025         Throw exception when AudioContext's createBuffer() fails to properly decode audio file data
3026         https://bugs.webkit.org/show_bug.cgi?id=54158
3027
3028         No new tests since audio API is not yet implemented.
3029
3030         * bindings/js/JSAudioContextCustom.cpp:
3031         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
3032         (WebCore::JSAudioContext::createBuffer):
3033         * bindings/v8/custom/V8AudioContextCustom.cpp:
3034         (WebCore::V8AudioContext::createBufferCallback):
3035         * platform/audio/chromium/AudioBusChromium.cpp:
3036         (WebCore::createBusFromInMemoryAudioFile):
3037         * webaudio/AudioContext.idl:
3038
3039 2011-02-11  Mike Reed  <reed@google.com>
3040
3041         Reviewed by James Robinson.
3042
3043         Fix toDataURL() to use device->readPixels() if need be, rather than always dereferencing
3044         the address returned by getPixels() (as the device may not be backed by a CPU bitmap)
3045         https://bugs.webkit.org/show_bug.cgi?id=54224
3046
3047         No new tests. Existing canvas tests exercise this...
3048         fast/canvas/script-tests/canvas-createPattern-fillRect-shadow.html
3049
3050         * platform/graphics/skia/ImageBufferSkia.cpp:
3051         (WebCore::ImageBuffer::toDataURL):
3052
3053 2011-02-11  Andrew Wason  <rectalogic@rectalogic.com>
3054
3055         Reviewed by David Levin.
3056
3057         Files missing ENABLE_VIDEO #ifdef
3058         https://bugs.webkit.org/show_bug.cgi?id=53390
3059
3060         No new tests.
3061
3062         * html/canvas/WebGLRenderingContext.cpp:
3063         * html/canvas/WebGLRenderingContext.h:
3064         * html/canvas/WebGLRenderingContext.idl:
3065           Wrap methods and declarations that use HTMLVideoElement
3066           with #if ENABLE(VIDEO).
3067
3068 2011-02-11  Sheriff Bot  <webkit.review.bot@gmail.com>
3069
3070         Unreviewed, rolling out r78331.
3071         http://trac.webkit.org/changeset/78331
3072         https://bugs.webkit.org/show_bug.cgi?id=54295
3073
3074         This patch broke 11 tests in GTK bots (Requested by svillar on
3075         #webkit).
3076
3077         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3078         (webkit_accessible_get_name):
3079         (webkit_accessible_detach):
3080
3081 2011-02-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3082
3083         Reviewed by Xan Lopez.
3084
3085         [GDOM] Video element needs proper wrapping
3086         https://bugs.webkit.org/show_bug.cgi?id=54231
3087
3088         Use the same strategy as the one used for the audio tag to wrap
3089         video as well. No layout tests because this only adds API.
3090
3091         * bindings/gobject/GNUmakefile.am:
3092         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
3093         (WebKit::createVideoWrapper):
3094         (WebKit::createHTMLElementWrapper):
3095
3096 2011-02-11  Dirk Schulze  <krit@webkit.org>
3097
3098         Reviewed by Andreas Kling.
3099
3100         SVGStyledElement::fillAttributeToPropertyTypeMap triggers a clang warning (-Woverloaded-virtual)
3101         https://bugs.webkit.org/show_bug.cgi?id=54259
3102
3103         Renamed fillAttributeToPropertyTypeMap with passed map to fillPassedAttributeToPropertyTypeMap to
3104         avoid overloading a virtual function.
3105
3106         No change of functionality. Just fixing a build warning, so no new tests.
3107
3108         * svg/SVGAElement.cpp:
3109         (WebCore::SVGAElement::fillAttributeToPropertyTypeMap):
3110         * svg/SVGAltGlyphElement.cpp:
3111         (WebCore::SVGAltGlyphElement::fillAttributeToPropertyTypeMap):
3112         * svg/SVGCircleElement.cpp:
3113         (WebCore::SVGCircleElement::fillAttributeToPropertyTypeMap):
3114         * svg/SVGClipPathElement.cpp:
3115         (WebCore::SVGClipPathElement::fillAttributeToPropertyTypeMap):
3116         * svg/SVGEllipseElement.cpp:
3117         (WebCore::SVGEllipseElement::fillAttributeToPropertyTypeMap):
3118         * svg/SVGFEBlendElement.cpp:
3119         (WebCore::SVGFEBlendElement::fillAttributeToPropertyTypeMap):
3120         * svg/SVGFEColorMatrixElement.cpp:
3121         (WebCore::SVGFEColorMatrixElement::fillAttributeToPropertyTypeMap):
3122         * svg/SVGFEComponentTransferElement.cpp:
3123         (WebCore::SVGFEComponentTransferElement::fillAttributeToPropertyTypeMap):
3124         * svg/SVGFECompositeElement.cpp:
3125         (WebCore::SVGFECompositeElement::fillAttributeToPropertyTypeMap):
3126         * svg/SVGFEConvolveMatrixElement.cpp:
3127         (WebCore::SVGFEConvolveMatrixElement::fillAttributeToPropertyTypeMap):
3128         * svg/SVGFEDiffuseLightingElement.cpp:
3129         (WebCore::SVGFEDiffuseLightingElement::fillAttributeToPropertyTypeMap):
3130         * svg/SVGFEDisplacementMapElement.cpp:
3131         (WebCore::SVGFEDisplacementMapElement::fillAttributeToPropertyTypeMap):
3132         * svg/SVGFEFloodElement.cpp:
3133         (WebCore::SVGFEFloodElement::fillAttributeToPropertyTypeMap):
3134         * svg/SVGFEGaussianBlurElement.cpp:
3135         (WebCore::SVGFEGaussianBlurElement::fillAttributeToPropertyTypeMap):
3136         * svg/SVGFEImageElement.cpp:
3137         (WebCore::SVGFEImageElement::fillAttributeToPropertyTypeMap):
3138         * svg/SVGFEMergeElement.cpp:
3139         (WebCore::SVGFEMergeElement::fillAttributeToPropertyTypeMap):
3140         * svg/SVGFEMorphologyElement.cpp:
3141         (WebCore::SVGFEMorphologyElement::fillAttributeToPropertyTypeMap):
3142         * svg/SVGFEOffsetElement.cpp:
3143         (WebCore::SVGFEOffsetElement::fillAttributeToPropertyTypeMap):
3144         * svg/SVGFESpecularLightingElement.cpp:
3145         (WebCore::SVGFESpecularLightingElement::fillAttributeToPropertyTypeMap):
3146         * svg/SVGFETileElement.cpp:
3147         (WebCore::SVGFETileElement::fillAttributeToPropertyTypeMap):
3148         * svg/SVGFETurbulenceElement.cpp:
3149         (WebCore::SVGFETurbulenceElement::fillAttributeToPropertyTypeMap):
3150         * svg/SVGFilterElement.cpp:
3151         (WebCore::SVGFilterElement::fillAttributeToPropertyTypeMap):
3152         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3153         (WebCore::SVGFilterPrimitiveStandardAttributes::fillPassedAttributeToPropertyTypeMap):
3154         * svg/SVGFilterPrimitiveStandardAttributes.h:
3155         * svg/SVGFontElement.cpp:
3156         (WebCore::SVGFontElement::fillAttributeToPropertyTypeMap):
3157         * svg/SVGForeignObjectElement.cpp:
3158         (WebCore::SVGForeignObjectElement::fillAttributeToPropertyTypeMap):
3159         * svg/SVGGlyphElement.cpp:
3160         (WebCore::SVGGlyphElement::fillAttributeToPropertyTypeMap):
3161         * svg/SVGGradientElement.cpp:
3162         (WebCore::SVGGradientElement::fillPassedAttributeToPropertyTypeMap):
3163         * svg/SVGGradientElement.h:
3164         * svg/SVGImageElement.cpp:
3165         (WebCore::SVGImageElement::fillAttributeToPropertyTypeMap):
3166         * svg/SVGLineElement.cpp:
3167         (WebCore::SVGLineElement::fillAttributeToPropertyTypeMap):
3168         * svg/SVGLinearGradientElement.cpp:
3169         (WebCore::SVGLinearGradientElement::fillAttributeToPropertyTypeMap):
3170         * svg/SVGMarkerElement.cpp:
3171         (WebCore::SVGMarkerElement::fillAttributeToPropertyTypeMap):
3172         * svg/SVGMaskElement.cpp:
3173         (WebCore::SVGMaskElement::fillAttributeToPropertyTypeMap):
3174         * svg/SVGMissingGlyphElement.cpp:
3175         (WebCore::SVGMissingGlyphElement::fillAttributeToPropertyTypeMap):
3176         * svg/SVGPathElement.cpp:
3177         (WebCore::SVGPathElement::fillAttributeToPropertyTypeMap):
3178         * svg/SVGPatternElement.cpp:
3179         (WebCore::SVGPatternElement::fillAttributeToPropertyTypeMap):
3180         * svg/SVGPolyElement.cpp:
3181         (WebCore::SVGPolyElement::fillAttributeToPropertyTypeMap):
3182         * svg/SVGRadialGradientElement.cpp:
3183         (WebCore::SVGRadialGradientElement::fillAttributeToPropertyTypeMap):
3184         * svg/SVGRectElement.cpp:
3185         (WebCore::SVGRectElement::fillAttributeToPropertyTypeMap):
3186         * svg/SVGStopElement.cpp:
3187         (WebCore::SVGStopElement::fillAttributeToPropertyTypeMap):
3188         * svg/SVGStyledElement.cpp:
3189         (WebCore::SVGStyledElement::fillPassedAttributeToPropertyTypeMap):
3190         * svg/SVGStyledElement.h:
3191         * svg/SVGStyledTransformableElement.cpp:
3192         (WebCore::SVGStyledTransformableElement::fillPassedAttributeToPropertyTypeMap):
3193         * svg/SVGStyledTransformableElement.h:
3194         * svg/SVGSwitchElement.cpp:
3195         (WebCore::SVGSwitchElement::fillAttributeToPropertyTypeMap):
3196         * svg/SVGSymbolElement.cpp:
3197         (WebCore::SVGSymbolElement::fillAttributeToPropertyTypeMap):
3198         * svg/SVGTRefElement.cpp:
3199         (WebCore::SVGTRefElement::fillAttributeToPropertyTypeMap):
3200         * svg/SVGTSpanElement.cpp:
3201         (WebCore::SVGTSpanElement::fillAttributeToPropertyTypeMap):
3202         * svg/SVGTextContentElement.cpp:
3203         (WebCore::SVGTextContentElement::fillPassedAttributeToPropertyTypeMap):
3204         * svg/SVGTextContentElement.h:
3205         * svg/SVGTextElement.cpp:
3206         (WebCore::SVGTextElement::fillAttributeToPropertyTypeMap):
3207         * svg/SVGTextPathElement.cpp:
3208         (WebCore::SVGTextPathElement::fillAttributeToPropertyTypeMap):
3209         * svg/SVGTextPositioningElement.cpp:
3210         (WebCore::SVGTextPositioningElement::fillPassedAttributeToPropertyTypeMap):
3211         * svg/SVGTextPositioningElement.h:
3212         * svg/SVGTitleElement.cpp:
3213         (WebCore::SVGTitleElement::fillAttributeToPropertyTypeMap):
3214         * svg/SVGUseElement.cpp:
3215         (WebCore::SVGUseElement::fillAttributeToPropertyTypeMap):
3216         * svg/SVGViewElement.cpp:
3217         (WebCore::SVGViewElement::fillAttributeToPropertyTypeMap):
3218
3219 2011-02-11  Andrey Adaikin  <aandrey@google.com>
3220
3221         Reviewed by Pavel Feldman.
3222
3223         Web Inspector: [REGRESSION] click on error message in console doesn't scroll into view
3224         https://bugs.webkit.org/show_bug.cgi?id=54089
3225
3226         * inspector/front-end/Drawer.js:
3227         (WebInspector.Drawer.prototype.show.animationFinished):
3228         (WebInspector.Drawer.prototype.show):
3229         (WebInspector.Drawer.prototype.hide):
3230         (WebInspector.Drawer.prototype.resize):
3231         (WebInspector.Drawer.prototype.immediatelyFinishAnimation):
3232         (WebInspector.Drawer.prototype._cancelAnimationIfNeeded):
3233         (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
3234         (WebInspector.Drawer.prototype._animateDrawerHeight):
3235         (WebInspector.Drawer.prototype._statusBarDragging):
3236         * inspector/front-end/inspector.js:
3237         (WebInspector.animateStyle):
3238         (WebInspector.animateStyle.forceComplete):
3239         (WebInspector.animateStyle.cancel):
3240         (WebInspector.showSourceLine):
3241
3242 2011-02-10  Nate Chapin  <japhet@chromium.org>
3243
3244         Reviewed by Adam Barth.
3245
3246         Make DocumentWriter a member of DocumentLoader
3247         instead of FrameLoader.
3248         https://bugs.webkit.org/show_bug.cgi?id=50489
3249
3250         Refactor, no new tests.
3251
3252         * bindings/ScriptControllerBase.cpp:
3253         (WebCore::ScriptController::executeIfJavaScriptURL):
3254         * dom/Document.cpp:
3255         (WebCore::Document::Document):
3256         (WebCore::Document::explicitClose):
3257         (WebCore::Document::lastModified):
3258         (WebCore::Document::initSecurityContext):
3259         (WebCore::Document::updateURLForPushOrReplaceState):
3260         * dom/Document.h:
3261         (WebCore::Document::setDocumentLoader):
3262         (WebCore::Document::loader):
3263         * html/MediaDocument.cpp:
3264         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3265         * html/PluginDocument.cpp:
3266         (WebCore::PluginDocumentParser::createDocumentStructure):
3267         * loader/DocumentLoader.cpp:
3268         (WebCore::DocumentLoader::DocumentLoader):
3269         (WebCore::DocumentLoader::finishedLoading):
3270         (WebCore::DocumentLoader::commitData):
3271         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
3272         (WebCore::DocumentLoader::setFrame):
3273         * loader/DocumentLoader.h:
3274         (WebCore::DocumentLoader::writer):
3275         * loader/DocumentWriter.cpp:
3276         (WebCore::DocumentWriter::begin):
3277         * loader/DocumentWriter.h:
3278         (WebCore::DocumentWriter::setFrame):
3279         * loader/FrameLoader.cpp:
3280         (WebCore::FrameLoader::FrameLoader):
3281         (WebCore::FrameLoader::init):
3282         (WebCore::FrameLoader::clear):
3283         (WebCore::FrameLoader::receivedFirstData):
3284         (WebCore::FrameLoader::transitionToCommitted):
3285         (WebCore::FrameLoader::open):
3286         (WebCore::FrameLoader::finishedLoadingDocument):
3287         (WebCore::FrameLoader::addExtraFieldsToRequest):
3288         * loader/FrameLoader.h:
3289         (WebCore::FrameLoader::notifier):
3290         * svg/graphics/SVGImage.cpp:
3291         (WebCore::SVGImage::dataChanged):
3292
3293 2011-02-10  Pavel Feldman  <pfeldman@chromium.org>
3294
3295         Reviewed by Yury Semikhatsky.
3296
3297         Web Inspector: make InspectorAgent own sub-agents, align agent creation/deletion routines.
3298         https://bugs.webkit.org/show_bug.cgi?id=54227
3299
3300         * dom/Document.cpp:
3301         (WebCore::Document::finishedParsing):
3302         * inspector/InspectorAgent.cpp:
3303         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
3304         (WebCore::InspectorAgent::setFrontend):
3305         (WebCore::InspectorAgent::disconnectFrontend):
3306         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
3307         (WebCore::InspectorAgent::didCommitLoad):
3308         (WebCore::InspectorAgent::domContentLoadedEventFired):
3309         (WebCore::InspectorAgent::loadEventFired):
3310         (WebCore::InspectorAgent::startTimelineProfiler):
3311         (WebCore::InspectorAgent::stopTimelineProfiler):
3312         * inspector/InspectorAgent.h:
3313         * inspector/InspectorCSSAgent.cpp:
3314         * inspector/InspectorDOMAgent.cpp:
3315         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
3316         (WebCore::InspectorDOMAgent::startListening):
3317         (WebCore::InspectorDOMAgent::stopListening):
3318         (WebCore::InspectorDOMAgent::mainDOMContentLoaded):
3319         (WebCore::InspectorDOMAgent::loadEventFired):
3320         * inspector/InspectorDOMAgent.h:
3321         (WebCore::InspectorDOMAgent::create):
3322         * inspector/InspectorDOMStorageAgent.cpp:
3323         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
3324         * inspector/InspectorDOMStorageAgent.h:
3325         (WebCore::InspectorDOMStorageAgent::create):
3326         * inspector/InspectorDOMStorageResource.h:
3327         * inspector/InspectorDatabaseAgent.cpp:
3328         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
3329         (WebCore::InspectorDatabaseAgent::executeSQL):
3330         (WebCore::InspectorDatabaseAgent::selectDatabase):
3331         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
3332         * inspector/InspectorDatabaseAgent.h:
3333         (WebCore::InspectorDatabaseAgent::FrontendProvider::create):
3334         (WebCore::InspectorDatabaseAgent::FrontendProvider::~FrontendProvider):
3335         (WebCore::InspectorDatabaseAgent::FrontendProvider::frontend):