5de637b44f33edd3af677ca53139a02d0ca1a0bc
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-01-24  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         Reset the page scale factor on standard frame loads
6         https://bugs.webkit.org/show_bug.cgi?id=53058
7         <rdar://problem/8908844>
8
9         Add a symbol needed by WebKit2.
10
11         * WebCore.exp.in:
12
13 2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
14
15         Reviewed by Eric Seidel.
16
17         Stop instantiating legacy editing positions in InsertTextCommand, MoveSelectionCommand,
18         ReplaceSelectionCommand, SelectionController, SpellChecker, TypingCommand, and markup.cpp
19         https://bugs.webkit.org/show_bug.cgi?id=52676
20
21         Stop instantiating legacy editing positions in the following files.
22
23         * editing/InsertTextCommand.cpp:
24         (WebCore::InsertTextCommand::prepareForTextInsertion):
25         (WebCore::InsertTextCommand::performTrivialReplace):
26         (WebCore::InsertTextCommand::input):
27         (WebCore::InsertTextCommand::insertTab):
28         * editing/MoveSelectionCommand.cpp:
29         (WebCore::MoveSelectionCommand::doApply):
30         * editing/ReplaceSelectionCommand.cpp:
31         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
32         (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):
33         (WebCore::ReplaceSelectionCommand::doApply):
34         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR):
35         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
36         * editing/SelectionController.cpp:
37         (WebCore::SelectionController::setSelectionFromNone):
38         * editing/SpellChecker.cpp:
39         (WebCore::SpellChecker::didCheck):
40         * editing/TypingCommand.cpp:
41         (WebCore::TypingCommand::makeEditableRootEmpty):
42         (WebCore::TypingCommand::deleteKeyPressed):
43         (WebCore::TypingCommand::forwardDeleteKeyPressed):
44         * editing/markup.cpp:
45         (WebCore::StyledMarkupAccumulator::appendText):
46         (WebCore::StyledMarkupAccumulator::serializeNodes):
47         (WebCore::highestAncestorToWrapMarkup):
48         (WebCore::createMarkup):
49
50 2011-01-24  Peter Kasting  <pkasting@google.com>
51
52         Reviewed by Darin Adler.
53
54         Roll back r67261 ("Don't fire onclick on middle clicks") due to
55         regressions.
56         https://bugs.webkit.org/show_bug.cgi?id=46733
57
58         * html/HTMLAnchorElement.cpp:
59         (WebCore::isLinkClick):
60         * html/HTMLInputElement.cpp:
61         (WebCore::HTMLInputElement::preDispatchEventHandler):
62         (WebCore::HTMLInputElement::postDispatchEventHandler):
63         (WebCore::HTMLInputElement::defaultEventHandler):
64         * page/EventHandler.cpp:
65         (WebCore::EventHandler::handleMouseDoubleClickEvent):
66         (WebCore::EventHandler::handleMouseReleaseEvent):
67
68 2011-01-24  Martin Robinson  <mrobinson@igalia.com>
69
70         Reviewed by Eric Seidel.
71
72         [GTK] Many DOM XHTML tests time out
73         https://bugs.webkit.org/show_bug.cgi?id=52553
74
75         Properly handle the situation where a synchronous load fails before the inner
76         event loop has started. In this case, we simply do not run the inner event loop,
77         or else it will block indefinitely (since no GIO or libsoup callbacks will fire).
78
79         * platform/network/soup/ResourceHandleSoup.cpp:
80         (WebCore::ResourceHandle::loadResourceSynchronously): Bail out of a synchronous
81         load if it fails up front.
82
83 2011-01-24  Zhenyao Mo  <zmo@google.com>
84
85         Reviewed by Darin Adler.
86
87         Remove sizeInBytes from GraphicsContext3D's various implementations
88         https://bugs.webkit.org/show_bug.cgi?id=52339
89
90         * html/canvas/WebGLRenderingContext.cpp:
91         (WebCore::WebGLRenderingContext::sizeInBytes):
92         * platform/graphics/GraphicsContext3D.h:
93         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
94         * platform/graphics/qt/GraphicsContext3DQt.cpp:
95
96 2011-01-24  Adam Roben  <aroben@apple.com>
97
98         Windows Production build fix
99
100         * WebCore.vcproj/WebCore.make: Update for move of WebCore into Source.
101
102 2011-01-24  Anton Muhin  <antonm@chromium.org>
103
104         Reviewed by Nate Chapin.
105
106         [v8] Refactoring: extract IntrusiveDOMWrapperMap into a seprate class and files.
107         https://bugs.webkit.org/show_bug.cgi?id=52911
108
109         Plain refactoring, covered by the existing tests.
110
111         * WebCore.gypi: IntrusiveDOMWrapperMap.h added.
112         * bindings/v8/DOMDataStore.cpp: IntrusiveDOMWrapperMap is moved out of DOMDataStore class.
113         * bindings/v8/DOMDataStore.h: IntrusiveDOMWrapperMap is moved out of DOMDataStore class.
114         * bindings/v8/IntrusiveDOMWrapperMap.h: Added.
115         (WebCore::ChunkedTable::ChunkedTable):
116         (WebCore::ChunkedTable::add):
117         (WebCore::ChunkedTable::remove):
118         (WebCore::ChunkedTable::clear):
119         (WebCore::ChunkedTable::visit):
120         (WebCore::ChunkedTable::Chunk::Chunk):
121         (WebCore::ChunkedTable::clearEntries):
122         (WebCore::ChunkedTable::visitEntries):
123         (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
124         (WebCore::IntrusiveDOMWrapperMap::get):
125         (WebCore::IntrusiveDOMWrapperMap::set):
126         (WebCore::IntrusiveDOMWrapperMap::contains):
127         (WebCore::IntrusiveDOMWrapperMap::visit):
128         (WebCore::IntrusiveDOMWrapperMap::removeIfPresent):
129         (WebCore::IntrusiveDOMWrapperMap::clear):
130         (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::move):
131         (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::clear):
132         (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::visit):
133         * bindings/v8/StaticDOMDataStore.h: include added.
134
135 2011-01-24  Shane Stephens  <shanestephens@google.com>
136
137         Reviewed by Chris Marrin.
138
139         TransformationMatrix multiply operations apply operands in wrong order.
140         https://bugs.webkit.org/show_bug.cgi?id=52780
141
142         Rename TranformationMatrix::multLeft into multiply (the method does a multRight,
143         not a multLeft).
144
145         Remove TransformationMatrix::multiply, which was actually doing a multLeft.
146
147         Fix TransformationMatrix::operator* and operator*= such that the operand is
148         applied to the right-hand side of the matrix that the method is called on.
149         i.e., previously "a * b" used to compute "b * a", and "a *= b" used to store
150         "b * a" in "a".  This has now been fixed so "a * b" computes "a * b" and
151         "a *= b" stores "a * b" in "a".
152
153         Convert all call sites for these methods to provide operands in the correct order.
154
155         No new tests as patch adds no new functionality.
156
157         * css/WebKitCSSMatrix.cpp:
158         (WebCore::WebKitCSSMatrix::multiply):
159         * platform/graphics/transforms/Matrix3DTransformOperation.h:
160         (WebCore::Matrix3DTransformOperation::apply):
161         * platform/graphics/transforms/MatrixTransformOperation.h:
162         (WebCore::MatrixTransformOperation::apply):
163         * platform/graphics/transforms/TransformationMatrix.cpp:
164         (WebCore::TransformationMatrix::scaleNonUniform):
165         (WebCore::TransformationMatrix::scale3d):
166         (WebCore::TransformationMatrix::rotate3d):
167         (WebCore::TransformationMatrix::skew):
168         (WebCore::TransformationMatrix::applyPerspective):
169         (WebCore::TransformationMatrix::multiply):
170         (WebCore::TransformationMatrix::recompose):
171         * platform/graphics/transforms/TransformationMatrix.h:
172         (WebCore::TransformationMatrix::operator*=):
173         (WebCore::TransformationMatrix::operator*):
174         * rendering/RenderLayer.cpp:
175         (WebCore::transparencyClipBox):
176         * rendering/RenderObject.cpp:
177         (WebCore::RenderObject::getTransformFromContainer):
178         * rendering/TransformState.cpp:
179         (WebCore::TransformState::applyTransform):
180         (WebCore::HitTestingTransformState::applyTransform):
181
182 2011-01-24  Andrei Popescu  <andreip@google.com>
183
184         Reviewed by Nate Chapin.
185
186         IndexedDatabase methods should not take arguments of type OptionsObject
187         https://bugs.webkit.org/show_bug.cgi?id=53012
188
189         This patch reverts all IDB methods, except IDBDatabase::createObjectStore and
190         IDBObjectStore::createIndex, to using a plain list of arguments instead of
191         grouping the various parameters inside a single OptionsObject argument.
192         This decision was made on public-webapps@w3.org mailing list.
193
194         We also add support (v8 only for now) for passing DOMStringList objects as arguments to native
195         methods. The code for obtaining a DOMStringList object from a JS array of strings existed already
196         in OptionsObject.cpp, I just copied it to V8Bindings.cpp and taught the v8 code generator how to
197         use it.
198
199         * bindings/scripts/CodeGeneratorV8.pm:
200         * bindings/v8/V8Binding.cpp:
201         (WebCore::v8ValueToWebCoreDOMStringList):
202         * bindings/v8/V8Binding.h:
203         * storage/IDBDatabase.cpp:
204         (WebCore::IDBDatabase::transaction):
205         * storage/IDBDatabase.h:
206         (WebCore::IDBDatabase::transaction):
207         * storage/IDBDatabase.idl:
208         * storage/IDBIndex.cpp:
209         (WebCore::IDBIndex::openCursor):
210         (WebCore::IDBIndex::openKeyCursor):
211         * storage/IDBIndex.h:
212         (WebCore::IDBIndex::openCursor):
213         (WebCore::IDBIndex::openKeyCursor):
214         * storage/IDBIndex.idl:
215         * storage/IDBObjectStore.cpp:
216         (WebCore::IDBObjectStore::openCursor):
217         * storage/IDBObjectStore.h:
218         (WebCore::IDBObjectStore::openCursor):
219         * storage/IDBObjectStore.idl:
220
221 2011-01-24  Pavel Feldman  <pfeldman@chromium.org>
222
223         Reviewed by Yury Semikhatsky.
224
225         Web Inspector: extract dispatch API from network manager.
226         https://bugs.webkit.org/show_bug.cgi?id=53009
227
228         * WebCore.xcodeproj/project.pbxproj:
229         * inspector/front-end/NetworkManager.js:
230         (WebInspector.NetworkManager):
231         (WebInspector.NetworkManager.prototype.reset):
232         (WebInspector.NetworkManager.prototype.requestContent):
233         (WebInspector.NetworkManager.prototype._processCachedResources):
234         (WebInspector.NetworkDispatcher):
235         (WebInspector.NetworkDispatcher.prototype._updateResourceWithRequest):
236         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
237         (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource):
238         (WebInspector.NetworkDispatcher.prototype.identifierForInitialRequest):
239         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
240         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
241         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
242         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
243         (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket):
244         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
245         (WebInspector.NetworkDispatcher.prototype._startResource):
246         (WebInspector.NetworkDispatcher.prototype._updateResource):
247         (WebInspector.NetworkDispatcher.prototype._finishResource):
248         (WebInspector.NetworkDispatcher.prototype._addFramesRecursively):
249         (WebInspector.NetworkDispatcher.prototype._dispatchEventToListeners):
250         (WebInspector.NetworkDispatcher.prototype._createResource):
251         * inspector/front-end/Resource.js:
252         (WebInspector.Resource.prototype._innerRequestContent):
253         * inspector/front-end/ResourceTreeModel.js:
254         (WebInspector.ResourceTreeModel):
255         (WebInspector.ResourceTreeModel.prototype.reset):
256         (WebInspector.ResourceTreeModel.prototype.unbindResourceURL):
257
258 2011-01-24  Yury Semikhatsky  <yurys@chromium.org>
259
260         Reviewed by Pavel Feldman.
261
262         Web Inspector: [JSC] remove ScriptDebugServer::pageCreated
263         https://bugs.webkit.org/show_bug.cgi?id=53007
264
265         It's impossible to create "provisional" inspector for pages which are
266         not yet created so there is no need to listen for page creation in ScriptDebugServer.
267
268         * bindings/js/ScriptDebugServer.cpp:
269         * bindings/js/ScriptDebugServer.h:
270         * page/Page.cpp:
271         (WebCore::Page::Page):
272
273 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
274
275         Reviewed by Pavel Feldman.
276
277         Web Inspector: [REGRESSION] AppCache view on resources panel is broken.
278         https://bugs.webkit.org/show_bug.cgi?id=53002
279
280
281         * inspector/front-end/ApplicationCacheItemsView.js:
282         (WebInspector.ApplicationCacheItemsView.prototype._update):
283         * inspector/front-end/DOMAgent.js:
284         (WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync):
285
286 2011-01-24  Andreas Kling  <kling@webkit.org>
287
288         Reviewed by Kenneth Rohde Christiansen.
289
290         [Qt] Fix warnings about unregistering an invalid timer
291         https://bugs.webkit.org/show_bug.cgi?id=53006
292
293         The ShadowBuffer's purge timer ID was initialized with 0 which lead
294         to us calling QObject::killTimer(0), causing some qWarnings.
295
296         * platform/graphics/qt/ContextShadowQt.cpp:
297         (WebCore::ShadowBuffer::ShadowBuffer):
298         (WebCore::ShadowBuffer::schedulePurge):
299
300 2011-01-21  Mikhail Naganov  <mnaganov@chromium.org>
301
302         Reviewed by Pavel Feldman.
303
304         Web Inspector: [Chromium] Fix heap snapshot table sorting.
305
306         Fix table sorting to avoid qsort instability artefacts.
307
308         https://bugs.webkit.org/show_bug.cgi?id=52914
309
310         * inspector/front-end/HeapSnapshotView.js:
311         (WebInspector.HeapSnapshotView.prototype._sortData):
312         (WebInspector.HeapSnapshotDataGridList.propertyComparator.comparator):
313         (WebInspector.HeapSnapshotDataGridList.propertyComparator):
314
315 2011-01-24  Mikhail Naganov  <mnaganov@chromium.org>
316
317         Reviewed by Yury Semikhatsky.
318
319         Web Inspector: Find duplicate strings in localizedStrings.js, update it.
320
321         https://bugs.webkit.org/show_bug.cgi?id=53005
322
323         * English.lproj/localizedStrings.js:
324
325 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
326
327         Unreviewed, build fix  for r76509.
328
329         * inspector/InspectorDebuggerAgent.cpp:
330         (WebCore::InspectorDebuggerAgent::setBreakpoint):
331
332 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
333
334         Unreviewed, build fix  for r76509.
335
336         * bindings/js/ScriptDebugServer.h:
337
338 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
339
340         Reviewed by Yury Semikhatsky.
341
342         Web Inspector: set breakpoints by line:column.
343         https://bugs.webkit.org/show_bug.cgi?id=52615
344
345         * CMakeLists.txt:
346         * GNUmakefile.am:
347         * WebCore.gypi:
348         * WebCore.pro:
349         * WebCore.vcproj/WebCore.vcproj:
350         * WebCore.xcodeproj/project.pbxproj:
351         * bindings/js/ScriptDebugServer.cpp:
352         (WebCore::ScriptDebugServer::setBreakpoint):
353         (WebCore::ScriptDebugServer::removeBreakpoint):
354         (WebCore::ScriptDebugServer::hasBreakpoint):
355         (WebCore::ScriptDebugServer::clearBreakpoints):
356         * bindings/js/ScriptDebugServer.h:
357         * bindings/v8/DebuggerScript.js:
358         ():
359         * bindings/v8/ScriptDebugServer.cpp:
360         (WebCore::ScriptDebugServer::setBreakpoint):
361         * bindings/v8/ScriptDebugServer.h:
362         * inspector/Inspector.idl:
363         * inspector/InspectorBrowserDebuggerAgent.cpp:
364         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
365         * inspector/InspectorDebuggerAgent.cpp:
366         (WebCore::InspectorDebuggerAgent::setStickyBreakpoint):
367         (WebCore::InspectorDebuggerAgent::setBreakpoint):
368         (WebCore::InspectorDebuggerAgent::restoreBreakpoint):
369         (WebCore::InspectorDebuggerAgent::didParseSource):
370         * inspector/InspectorDebuggerAgent.h:
371         * inspector/ScriptBreakpoint.cpp: Removed.
372         * inspector/ScriptBreakpoint.h:
373         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
374         * inspector/front-end/Breakpoint.js:
375         (WebInspector.Breakpoint):
376         (WebInspector.Breakpoint.prototype.get url):
377         * inspector/front-end/BreakpointManager.js:
378         (WebInspector.JavaScriptBreakpoint.prototype._serializeToJSON):
379         * inspector/front-end/DebuggerModel.js:
380         (WebInspector.DebuggerModel.prototype.continueToLine):
381         (WebInspector.DebuggerModel.prototype.setBreakpoint):
382         (WebInspector.DebuggerModel.prototype._breakpointSetOnBackend):
383         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
384
385 2011-01-24  Peter Beverloo  <peter@chromium.org>
386
387         Reviewed by Pavel Feldman.
388
389         Web Inspector: recognize application/x-font-woff as a valid mime-type.
390         https://bugs.webkit.org/show_bug.cgi?id=52977
391
392         No new tests.
393
394         * inspector/front-end/inspector.js:
395
396 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
397
398         Unreviewed, fix for r76497.
399
400         * inspector/front-end/ResourcesPanel.js:
401         (WebInspector.ResourcesPanel.prototype.show):
402
403 2011-01-24  Andreas Kling  <kling@webkit.org>
404
405         Reviewed by Tor Arne Vestbø.
406
407         [Qt] Use rad2deg() from WTF instead of rolling our own.
408         https://bugs.webkit.org/show_bug.cgi?id=52993
409
410         * platform/graphics/qt/GraphicsContextQt.cpp:
411         (WebCore::GraphicsContext::rotate):
412         * platform/graphics/qt/PathQt.cpp:
413         (WebCore::Path::addArc):
414
415 2011-01-24  Sergio Villar Senin  <svillar@igalia.com>
416
417         Reviewed by Martin Robinson.
418
419         [Gtk] ResourceHandleSoup: do not wait for streams to close to issue didFinishLoading
420         https://bugs.webkit.org/show_bug.cgi?id=52885
421
422         No new tests as it does not change functionality. We will not wait for
423         the the input stream to close to issue didFinishLoading to
424         WebCore. We expect a subtle performance improvement with this
425         patch when loading complex web pages, as we wouldn't have to wait
426         for the stream to close (which involves creating a thread among
427         other things).
428
429         * platform/network/soup/ResourceHandleSoup.cpp:
430         (WebCore::closeCallback):
431         (WebCore::readCallback):
432
433 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
434
435         Reviewed by Pavel Feldman.
436
437         Web Inspector: eliminate SourceView and ScriptView classes.
438         https://bugs.webkit.org/show_bug.cgi?id=52896
439
440         SourceView and ScriptView delegate everything to SourceFrame and should be eliminated.
441
442         * WebCore.gypi:
443         * WebCore.vcproj/WebCore.vcproj:
444         * inspector/front-end/GoToLineDialog.js:
445         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
446         * inspector/front-end/ResourceView.js:
447         (WebInspector.ResourceView.createResourceView):
448         (WebInspector.ResourceView.resourceViewTypeMatchesResource):
449         (WebInspector.SourceFrameContentProviderForResource):  Moved from SourceView.
450         * inspector/front-end/ResourcesPanel.js:
451         (WebInspector.ResourcesPanel.prototype.show):
452         (WebInspector.ResourcesPanel.prototype._applyDiffMarkup):
453         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsUpdated):
454         * inspector/front-end/ScriptView.js: Removed.
455         * inspector/front-end/ScriptsPanel.js:
456         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
457         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
458         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
459         (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
460         (WebInspector.ScriptsPanel.prototype._formatScript):
461         (WebInspector.SourceFrameContentProviderForScript): Moved from ScriptView.
462         * inspector/front-end/SourceFrame.js:
463         (WebInspector.SourceFrame):
464         (WebInspector.SourceFrame.prototype.show):
465         (WebInspector.SourceFrame.prototype.hide):
466         (WebInspector.SourceFrame.prototype.hasContent):
467         (WebInspector.SourceFrame.prototype._createTextViewer):
468         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
469         (WebInspector.SourceFrame.prototype.performSearch):
470         * inspector/front-end/SourceView.js: Removed.
471         * inspector/front-end/WebKit.qrc:
472         * inspector/front-end/inspector.html:
473
474 2011-01-24  Andras Becsi  <abecsi@webkit.org>
475
476         Reviewed by Csaba Osztrogonác.
477
478         [Qt] Move project files into Source
479         https://bugs.webkit.org/show_bug.cgi?id=52891
480
481         No new tests needed.
482
483         * WebCore.pri:
484         * WebCore.pro:
485
486 2011-01-24  Kent Tamura  <tkent@chromium.org>
487
488         Unreviewed, trivial fix.
489
490         Fix a Chromium-only assertion failure by r76491.
491         https://bugs.webkit.org/show_bug.cgi?id=38982
492
493         Separate icon loading from the FileChooser constructor in order to avoid
494         ref() before adoptRef().
495
496         * platform/FileChooser.cpp:
497         (WebCore::FileChooser::FileChooser):
498         (WebCore::FileChooser::initialize):
499         (WebCore::FileChooser::create):
500         * platform/FileChooser.h:
501
502 2011-01-24  MORITA Hajime  <morrita@google.com>
503
504         Reviewed by Kent Tamura.
505
506         TextControlInnerElement::m_shadowParent should be removed.
507         https://bugs.webkit.org/show_bug.cgi?id=52998
508
509         No new tests. No behavioral change.
510
511         * rendering/TextControlInnerElements.cpp:
512         (WebCore::TextControlInnerElement::TextControlInnerElement):
513         * rendering/TextControlInnerElements.h:
514
515 2011-01-24  Yury Semikhatsky  <yurys@chromium.org>
516
517         Reviewed by Pavel Feldman.
518
519         REGRESSION (r72895): console.trace crashes
520         https://bugs.webkit.org/show_bug.cgi?id=52981
521
522         - Use local RefPtr variable for accessing PassRefPtr arguments to make sure the PassRefPtr has
523         non-null value.
524         - Use PassRefPtr for objects whos ownership is passed to the inspector.
525
526         * GNUmakefile.am:
527         * WebCore.gypi:
528         * WebCore.pro:
529         * WebCore.vcproj/WebCore.vcproj:
530         * WebCore.xcodeproj/project.pbxproj:
531         * inspector/InspectorConsoleInstrumentation.h: Added. Extract inline methods called from the console into their
532         own header to reduce compilation time of other classes that depend on the inspector instrumentation.
533         (WebCore::InspectorInstrumentation::addMessageToConsole):
534         (WebCore::InspectorInstrumentation::consoleCount):
535         (WebCore::InspectorInstrumentation::startConsoleTiming):
536         (WebCore::InspectorInstrumentation::stopConsoleTiming):
537         (WebCore::InspectorInstrumentation::consoleMarkTimeline):
538         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
539         (WebCore::InspectorInstrumentation::addProfile):
540         (WebCore::InspectorInstrumentation::profilerEnabled):
541         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
542         * inspector/InspectorDatabaseInstrumentation.h: Added. Extract inline methods called from the datanase code into their
543         own header to reduce compilation time of other classes that depend on the inspector instrumentation.
544         (WebCore::InspectorInstrumentation::didOpenDatabase):
545         * inspector/InspectorInstrumentation.cpp:
546         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
547         (WebCore::InspectorInstrumentation::consoleCountImpl):
548         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
549         (WebCore::InspectorInstrumentation::consoleMarkTimelineImpl):
550         (WebCore::InspectorInstrumentation::addProfileImpl):
551         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
552         * inspector/InspectorInstrumentation.h:
553         * page/Console.cpp: use RefPtr local variable instead of accessing PassRefPtr argument directly.
554         (WebCore::Console::addMessage):
555         (WebCore::Console::trace):
556         (WebCore::Console::count):
557         (WebCore::Console::markTimeline):
558         (WebCore::Console::profileEnd):
559         (WebCore::Console::timeEnd):
560         (WebCore::Console::group):
561         (WebCore::Console::groupCollapsed):
562         * storage/Database.cpp:
563         (WebCore::Database::openDatabase):
564
565 2010-01-24  Kent Tamura  <tkent@chromium.org>
566
567         Reviewed by Darin Fisher.
568
569         [Chromium] Support icon loading for <input type=file>
570         https://bugs.webkit.org/show_bug.cgi?id=38982
571
572         An icon data in Chromium port is represented as WebCore::Image. We
573         don't need OS-specific code anymore.
574
575         * WebCore.gypi:
576         * platform/graphics/Icon.h:
577         (WebCore::Icon::create): Add Chromium-specific factory.
578         * platform/graphics/chromium/IconChromium.cpp: Added.
579         * platform/graphics/chromium/IconChromiumLinux.cpp: Removed.
580         * platform/graphics/chromium/IconChromiumMac.cpp: Removed.
581         * platform/graphics/chromium/IconChromiumWin.cpp: Removed.
582         * platform/graphics/chromium/PlatformIcon.h:
583
584 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
585
586         Reviewed by Pavel Feldman.
587
588         Web Inspector: move search functions from SourceView to SourceFrame.
589         https://bugs.webkit.org/show_bug.cgi?id=52895
590
591         This is the last step before eliminating SourceView and ScriptView since
592         this classes just delegate everything to SourceFrame.
593
594         * inspector/front-end/SourceFrame.js:
595         (WebInspector.SourceFrame.prototype.set visible):
596         (WebInspector.SourceFrame.prototype._clearLineHighlight):
597         (WebInspector.SourceFrame.prototype._createTextViewer):
598         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
599         (WebInspector.SourceFrame.prototype.performSearch):
600         (WebInspector.SourceFrame.prototype.searchCanceled):
601         (WebInspector.SourceFrame.prototype.jumpToFirstSearchResult):
602         (WebInspector.SourceFrame.prototype.jumpToLastSearchResult):
603         (WebInspector.SourceFrame.prototype.jumpToNextSearchResult):
604         (WebInspector.SourceFrame.prototype.jumpToPreviousSearchResult):
605         (WebInspector.SourceFrame.prototype.showingFirstSearchResult):
606         (WebInspector.SourceFrame.prototype.showingLastSearchResult):
607         (WebInspector.SourceFrame.prototype._jumpToSearchResult):
608         * inspector/front-end/SourceView.js:
609         (WebInspector.SourceView.prototype.hide):
610         (WebInspector.SourceView.prototype.searchCanceled):
611         (WebInspector.SourceView.prototype.performSearch):
612         (WebInspector.SourceView.prototype.jumpToFirstSearchResult):
613         (WebInspector.SourceView.prototype.jumpToLastSearchResult):
614         (WebInspector.SourceView.prototype.jumpToNextSearchResult):
615         (WebInspector.SourceView.prototype.jumpToPreviousSearchResult):
616         (WebInspector.SourceView.prototype.showingFirstSearchResult):
617         (WebInspector.SourceView.prototype.showingLastSearchResult):
618         (WebInspector.SourceView.prototype.clearMessages):
619
620 2011-01-24  Sheriff Bot  <webkit.review.bot@gmail.com>
621
622         Unreviewed, rolling out r76463.
623         http://trac.webkit.org/changeset/76463
624         https://bugs.webkit.org/show_bug.cgi?id=52993
625
626         It broke canvas/philip/tests/2d.path.stroke.skew.html
627         (Requested by Ossy on #webkit).
628
629         * platform/graphics/qt/GraphicsContextQt.cpp:
630         (WebCore::GraphicsContext::rotate):
631         * platform/graphics/qt/PathQt.cpp:
632         (WebCore::Path::addArc):
633
634 2011-01-23  Andrey Kosyakov  <caseq@chromium.org>
635
636         Reviewed by Pavel Feldman.
637
638         Web Inspector: summary bar is not resized properly with the rest of network panel
639         https://bugs.webkit.org/show_bug.cgi?id=52881
640
641         * inspector/front-end/NetworkPanel.js:
642         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
643         (WebInspector.NetworkPanel.prototype._positionSummaryBar):
644         (WebInspector.NetworkPanel.prototype._toggleGridMode):
645
646 2011-01-19  MORITA Hajime  <morrita@google.com>
647
648         Reviewed by Ryosuke Niwa.
649
650         Space and tab characters "sent" by an input method give totally different results than typing them directly
651         https://bugs.webkit.org/show_bug.cgi?id=5241
652         
653         * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to 
654           distinguish text input which is originated by composition.
655         * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing 
656           range of string on text node, instead of surrounding part of that.
657
658         Test: editing/inserting/insert-composition-whitespace.html
659
660         * dom/TextEvent.h:
661         (WebCore::TextEvent::isComposition):
662         * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType
663         * editing/CompositeEditCommand.cpp:
664         (WebCore::containsOnlyWhitespace):
665         (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor):
666         (WebCore::CompositeEditCommand::canRebalance):
667         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
668         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string.
669         * editing/CompositeEditCommand.h:
670         * editing/Editor.cpp:
671         (WebCore::Editor::insertTextForConfirmedComposition): Added.
672         (WebCore::Editor::insertTextWithoutSendingTextEvent):
673         (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition().
674         (WebCore::Editor::setComposition):
675         * editing/Editor.h:
676         * editing/InsertTextCommand.cpp:
677         (WebCore::InsertTextCommand::input):
678         * editing/InsertTextCommand.h:
679         * editing/TypingCommand.cpp:
680         (WebCore::TypingCommand::TypingCommand):
681         (WebCore::TypingCommand::insertText):
682         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
683         * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType
684         (WebCore::TypingCommand::setCompositionType): Added.
685         (WebCore::TypingCommand::create):
686
687 2011-01-23  Mark Rowe  <mrowe@apple.com>
688
689         Follow-up to r76477.
690
691         Fix the scripts that detect problematic code such as static initializers
692         and destructors, weak vtables, inappropriate files in the framework wrappers,
693         and public headers including private headers. These had all been broken
694         since the projects were moved in to the Source directory as the paths to the
695         scripts were not updated at that time.
696
697         Stop copying an IDL file in to the framework wrapper. Doing that doesn't even make sense.
698
699         * WebCore.xcodeproj/project.pbxproj:
700
701 2011-01-23  Mark Rowe  <mrowe@apple.com>
702
703         Build fix after r76459.
704
705         Static member variables or globals of types that have constructors or destructors are bad as
706         they generate static initializers and destructors. This is code that is run either at link time
707         when the library is loaded in to memory or at application termination time. Both of these are
708         terrible for performance and are thus outlawed in WebKit code.
709
710         The typical solution is to replace the static member or global with a function that allocates
711         the necessary variable on the heap. The variable is leaked to prevent it from being destroyed
712         at application termination time. The DEFINE_STATIC_LOCAL macro wraps this in to a concise little
713         package, but sadly fails to work in this case due to the type containing multiple template
714         parameters.
715         
716         * inspector/InspectorInstrumentation.cpp:
717         (WebCore::InspectorInstrumentation::inspectorAgents):
718         * inspector/InspectorInstrumentation.h:
719         (WebCore::InspectorInstrumentation::bindInspectorAgent):
720         (WebCore::InspectorInstrumentation::unbindInspectorAgent):
721         (WebCore::InspectorInstrumentation::inspectorAgentForPage):
722
723 2011-01-21  Vangelis Kokkevis  <vangelis@chromium.org>
724
725         Reviewed by Kenneth Russell.
726
727         [chromium] Add support for -webkit-mask properties to the
728         accelerated compositing path.
729         https://bugs.webkit.org/show_bug.cgi?id=49780
730          
731         Tests: Existing tests in LayoutTests/compositing/masks
732
733         * platform/graphics/chromium/ContentLayerChromium.cpp:
734         (WebCore::ContentLayerChromium::draw):
735         (WebCore::ContentLayerChromium::unreserveContentsTexture):
736         (WebCore::ContentLayerChromium::bindContentsTexture):
737         * platform/graphics/chromium/ContentLayerChromium.h:
738         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
739         (WebCore::GraphicsLayerChromium::setMaskLayer):
740         * platform/graphics/chromium/GraphicsLayerChromium.h:
741         * platform/graphics/chromium/LayerChromium.cpp:
742         (WebCore::LayerChromium::LayerChromium):
743         * platform/graphics/chromium/LayerChromium.h:
744         (WebCore::LayerChromium::setMaskLayer):
745         (WebCore::LayerChromium::maskLayer):
746         (WebCore::LayerChromium::unreserveContentsTexture):
747         (WebCore::LayerChromium::bindContentsTexture):
748         * platform/graphics/chromium/LayerRendererChromium.cpp:
749         (WebCore::LayerRendererChromium::updateLayersRecursive):
750         * platform/graphics/chromium/LayerTexture.cpp:
751         (WebCore::LayerTexture::bindTexture):
752         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
753         (WebCore::RenderSurfaceChromium::SharedValues::SharedValues):
754         (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues):
755         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
756         (WebCore::RenderSurfaceChromium::draw):
757         * platform/graphics/chromium/RenderSurfaceChromium.h:
758         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderProgram):
759         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderSamplerLocation):
760         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderMaskSamplerLocation):
761         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderMatrixLocation):
762         (WebCore::RenderSurfaceChromium::SharedValues::maskShaderAlphaLocation):
763
764 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
765
766         Reviewed by Darin Adler.
767
768         Use WTF::StringHasher in WebCore
769         https://bugs.webkit.org/show_bug.cgi?id=52934
770
771         * loader/appcache/ApplicationCacheStorage.cpp:
772         (WebCore::urlHostHash):
773         * platform/LinkHash.cpp:
774         (WebCore::visitedLinkHashInline):
775         * platform/cf/BinaryPropertyList.cpp:
776         (WebCore::IntegerArrayHash::hash):
777         * platform/graphics/wx/FontPlatformDataWx.cpp:
778         (WebCore::FontPlatformData::computeHash):
779         * platform/network/ProtectionSpaceHash.h:
780         (WebCore::ProtectionSpaceHash::hash):
781
782 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
783
784         Reviewed by David Kilzer.
785
786         Add an overload to base64Encode with String output
787         https://bugs.webkit.org/show_bug.cgi?id=50122
788
789         This change removes duplicated code.
790
791         * inspector/InspectorResourceAgent.cpp:
792         (WebCore::InspectorResourceAgent::resourceContentBase64):
793         * page/DOMWindow.cpp:
794         (WebCore::DOMWindow::btoa):
795         * platform/graphics/skia/FontCustomPlatformData.cpp:
796         (WebCore::createUniqueFontName):
797         * platform/graphics/win/FontCustomPlatformData.cpp:
798         (WebCore::createUniqueFontName):
799         * platform/graphics/wince/FontCustomPlatformData.cpp:
800         (WebCore::createUniqueFontName):
801         * platform/network/cf/ResourceHandleCFNet.cpp:
802         (WebCore::encodeBasicAuthorization):
803         * platform/network/mac/ResourceHandleMac.mm:
804         (WebCore::encodeBasicAuthorization):
805         * platform/text/Base64.cpp:
806         (WebCore::base64Encode):
807         * platform/text/Base64.h:
808         (WebCore::base64Encode):
809         * platform/wince/KeygenWinCE.cpp:
810         (WebCore::WebCore::signedPublicKeyAndChallengeString):
811
812 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
813
814         Reviewed by David Kilzer.
815
816         Add String::containsOnlyLatin1()
817         https://bugs.webkit.org/show_bug.cgi?id=52979
818
819         Use String::containsOnlyLatin1() instead of isSafeToConvertCharList().
820
821         * page/DOMWindow.cpp:
822         (WebCore::DOMWindow::btoa):
823         (WebCore::DOMWindow::atob):
824
825 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
826
827         Reviewed by Andreas Kling.
828
829         [CMake] Add missing CodeGenerator dependencies
830         https://bugs.webkit.org/show_bug.cgi?id=52976
831
832         * CMakeLists.txt:
833
834 2011-01-23  Yael Aharon  <yael.aharon@nokia.com>
835
836         Reviewed by Kenneth Rohde Christiansen.
837
838         [Qt][Symbian] Fix --minimal build
839         https://bugs.webkit.org/show_bug.cgi?id=52839
840
841         Some of the plugins' functionality is reimplemented in
842         Symbian specific files.
843         Some of this functionality should be compiled in even if 
844         the guard NETSCAPE_PLUGIN_API is turned off.
845         This patch moves that functionality out of the
846         NETSCAPE_PLUGIN_API guard.
847
848         Build fix so no new tests.
849
850         * WebCore.pro:
851         * plugins/symbian/PluginPackageSymbian.cpp:
852
853 2011-01-23  Andreas Kling  <kling@webkit.org>
854
855         Reviewed by Tor Arne Vestbø.
856
857         [Qt] Use rad2deg() from WTF instead of rolling our own.
858
859         * platform/graphics/qt/GraphicsContextQt.cpp:
860         (WebCore::GraphicsContext::rotate):
861         * platform/graphics/qt/PathQt.cpp:
862         (WebCore::Path::addArc):
863
864 2011-01-23  Kenneth Rohde Christiansen <kenneth@webkit.org>
865
866         Reviewed by Andreas Kling.
867
868         Viewport meta: Always adjust device dimensions to the device pixel ratio.
869
870         * dom/ViewportArguments.cpp:
871         (WebCore::computeViewportAttributes):
872
873 2011-01-23  Andreas Kling  <kling@webkit.org>
874
875         Reviewed by Kenneth Rohde Christiansen.
876
877         Don't scale absolute geometry specified by viewport meta tag.
878
879         * dom/ViewportArguments.cpp:
880         (WebCore::computeViewportAttributes):
881
882 2011-01-23  Ilya Tikhonovsky  <loislo@chromium.org>
883
884         Unreviewed build fix.
885
886         Web Inspector: looks like efl doesn't regenerate InspectorBackendDispatcher.
887
888         Touch Inspector.idl.
889
890         * inspector/Inspector.idl:
891
892 2011-01-22  Ilya Tikhonovsky  <loislo@chromium.org>
893
894         Reviewed by Pavel Feldman.
895
896         Web Inspector: next step in splitting InspectorController.
897
898         Splitting InspectorController is a bit tricky process.
899
900         As a first step I'll do the next things:
901         1) rename existing InspectorController to InspectorAgent;
902         2) s/nspectorController/nspectorAgent/g everywhere in WebCore/inspector but InspectorInstrumentation;
903         3) create a fake InspectorController derived from the InspectorAgent for the rest of WebCore and WebKit;
904
905         The second step is a migration of a small set of functions described in bug 52510 from InspectorAgent to InspectorController.
906
907         As far as the second step will have significant changes in the functions' implementation I'll do it as a separate patch.
908
909         https://bugs.webkit.org/show_bug.cgi?id=52955
910
911         * CMakeLists.txt:
912         * GNUmakefile.am:
913         * WebCore.exp.in:
914         * WebCore.gypi:
915         * WebCore.pro:
916         * WebCore.vcproj/WebCore.vcproj:
917         * WebCore.xcodeproj/project.pbxproj:
918         * bindings/js/JSInjectedScriptHostCustom.cpp:
919         (WebCore::JSInjectedScriptHost::nodeForId):
920         (WebCore::JSInjectedScriptHost::selectDOMStorage):
921         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
922         (WebCore::V8InjectedScriptHost::nodeForIdCallback):
923         * inspector/CodeGeneratorInspector.pm:
924         * inspector/InjectedScriptHost.cpp:
925         (WebCore::InjectedScriptHost::InjectedScriptHost):
926         (WebCore::InjectedScriptHost::clearConsoleMessages):
927         (WebCore::InjectedScriptHost::databaseForId):
928         (WebCore::InjectedScriptHost::selectDatabase):
929         (WebCore::InjectedScriptHost::selectDOMStorage):
930         (WebCore::InjectedScriptHost::injectedScriptForMainFrame):
931         (WebCore::InjectedScriptHost::inspectorDOMAgent):
932         (WebCore::InjectedScriptHost::frontend):
933         (WebCore::InjectedScriptHost::didCreateWorker):
934         (WebCore::InjectedScriptHost::didDestroyWorker):
935         * inspector/InjectedScriptHost.h:
936         (WebCore::InjectedScriptHost::create):
937         (WebCore::InjectedScriptHost::inspectorAgent):
938         (WebCore::InjectedScriptHost::disconnectController):
939         * inspector/InspectorAgent.cpp: Copied from Source/WebCore/inspector/InspectorController.cpp.
940         (WebCore::InspectorAgent::InspectorAgent):
941         (WebCore::InspectorAgent::~InspectorAgent):
942         (WebCore::InspectorAgent::inspectedPageDestroyed):
943         (WebCore::InspectorAgent::enabled):
944         (WebCore::InspectorAgent::inspectorStartsAttached):
945         (WebCore::InspectorAgent::setInspectorStartsAttached):
946         (WebCore::InspectorAgent::setInspectorAttachedHeight):
947         (WebCore::InspectorAgent::inspectorAttachedHeight):
948         (WebCore::InspectorAgent::searchingForNodeInPage):
949         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
950         (WebCore::InspectorAgent::inspect):
951         (WebCore::InspectorAgent::focusNode):
952         (WebCore::InspectorAgent::highlight):
953         (WebCore::InspectorAgent::highlightDOMNode):
954         (WebCore::InspectorAgent::highlightFrame):
955         (WebCore::InspectorAgent::hideHighlight):
956         (WebCore::InspectorAgent::mouseDidMoveOverElement):
957         (WebCore::InspectorAgent::handleMousePress):
958         (WebCore::InspectorAgent::setInspectorFrontendClient):
959         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
960         (WebCore::InspectorAgent::setSearchingForNode):
961         (WebCore::InspectorAgent::connectFrontend):
962         (WebCore::InspectorAgent::show):
963         (WebCore::InspectorAgent::showPanel):
964         (WebCore::InspectorAgent::close):
965         (WebCore::InspectorAgent::disconnectFrontend):
966         (WebCore::InspectorAgent::resourceAgent):
967         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
968         (WebCore::InspectorAgent::populateScriptObjects):
969         (WebCore::InspectorAgent::pushDataCollectedOffline):
970         (WebCore::InspectorAgent::restoreDebugger):
971         (WebCore::InspectorAgent::restoreProfiler):
972         (WebCore::InspectorAgent::unbindAllResources):
973         (WebCore::InspectorAgent::didCommitLoad):
974         (WebCore::InspectorAgent::mainResourceFiredDOMContentEvent):
975         (WebCore::InspectorAgent::mainResourceFiredLoadEvent):
976         (WebCore::InspectorAgent::isMainResourceLoader):
977         (WebCore::InspectorAgent::willSendRequest):
978         (WebCore::InspectorAgent::ensureSettingsLoaded):
979         (WebCore::InspectorAgent::startTimelineProfiler):
980         (WebCore::InspectorAgent::stopTimelineProfiler):
981         (WebCore::PostWorkerNotificationToFrontendTask::create):
982         (WebCore::PostWorkerNotificationToFrontendTask::PostWorkerNotificationToFrontendTask):
983         (WebCore::PostWorkerNotificationToFrontendTask::performTask):
984         (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
985         (WebCore::InspectorAgent::didCreateWorker):
986         (WebCore::InspectorAgent::didDestroyWorker):
987         (WebCore::InspectorAgent::didOpenDatabase):
988         (WebCore::InspectorAgent::getCookies):
989         (WebCore::InspectorAgent::buildArrayForCookies):
990         (WebCore::InspectorAgent::buildObjectForCookie):
991         (WebCore::InspectorAgent::deleteCookie):
992         (WebCore::InspectorAgent::didUseDOMStorage):
993         (WebCore::InspectorAgent::didCreateWebSocket):
994         (WebCore::InspectorAgent::willSendWebSocketHandshakeRequest):
995         (WebCore::InspectorAgent::didReceiveWebSocketHandshakeResponse):
996         (WebCore::InspectorAgent::didCloseWebSocket):
997         (WebCore::InspectorAgent::isRecordingUserInitiatedProfile):
998         (WebCore::InspectorAgent::startUserInitiatedProfiling):
999         (WebCore::InspectorAgent::stopUserInitiatedProfiling):
1000         (WebCore::InspectorAgent::profilerEnabled):
1001         (WebCore::InspectorAgent::enableProfiler):
1002         (WebCore::InspectorAgent::disableProfiler):
1003         (WebCore::InspectorAgent::showAndEnableDebugger):
1004         (WebCore::InspectorAgent::enableDebugger):
1005         (WebCore::InspectorAgent::disableDebugger):
1006         (WebCore::InspectorAgent::resume):
1007         (WebCore::InspectorAgent::setAllBrowserBreakpoints):
1008         (WebCore::InspectorAgent::evaluateForTestInFrontend):
1009         (WebCore::InspectorAgent::didEvaluateForTestInFrontend):
1010         (WebCore::quadToPath):
1011         (WebCore::drawOutlinedQuad):
1012         (WebCore::drawOutlinedQuadWithClip):
1013         (WebCore::drawHighlightForBox):
1014         (WebCore::drawHighlightForLineBoxesOrSVGRenderer):
1015         (WebCore::convertFromFrameToMainFrame):
1016         (WebCore::frameToMainFrameOffset):
1017         (WebCore::InspectorAgent::drawNodeHighlight):
1018         (WebCore::InspectorAgent::drawElementTitle):
1019         (WebCore::InspectorAgent::openInInspectedWindow):
1020         (WebCore::InspectorAgent::addScriptToEvaluateOnLoad):
1021         (WebCore::InspectorAgent::removeAllScriptsToEvaluateOnLoad):
1022         (WebCore::InspectorAgent::setInspectorExtensionAPI):
1023         (WebCore::InspectorAgent::inspectedURL):
1024         (WebCore::InspectorAgent::reloadPage):
1025         (WebCore::InspectorAgent::setExtraHeaders):
1026         * inspector/InspectorAgent.h: Copied from Source/WebCore/inspector/InspectorController.h.
1027         (WebCore::InspectorAgent::inspectorBackendDispatcher):
1028         (WebCore::InspectorAgent::inspectorClient):
1029         (WebCore::InspectorAgent::injectedScriptHost):
1030         (WebCore::InspectorAgent::inspectedPage):
1031         (WebCore::InspectorAgent::hideDOMNodeHighlight):
1032         (WebCore::InspectorAgent::hideFrameHighlight):
1033         (WebCore::InspectorAgent::frontend):
1034         (WebCore::InspectorAgent::inspectorController):
1035         (WebCore::InspectorAgent::inspectorAgent):
1036         (WebCore::InspectorAgent::consoleAgent):
1037         (WebCore::InspectorAgent::cssAgent):
1038         (WebCore::InspectorAgent::domAgent):
1039         (WebCore::InspectorAgent::injectedScriptAgent):
1040         (WebCore::InspectorAgent::runtimeAgent):
1041         (WebCore::InspectorAgent::timelineAgent):
1042         (WebCore::InspectorAgent::databaseAgent):
1043         (WebCore::InspectorAgent::domStorageAgent):
1044         (WebCore::InspectorAgent::fileSystemAgent):
1045         (WebCore::InspectorAgent::browserDebuggerAgent):
1046         (WebCore::InspectorAgent::debuggerAgent):
1047         (WebCore::InspectorAgent::profilerAgent):
1048         (WebCore::InspectorAgent::applicationCacheAgent):
1049         (WebCore::InspectorAgent::hasInspectorFrontendClient):
1050         (WebCore::InspectorAgent::hasFrontend):
1051         (WebCore::InspectorAgent::startProfiling):
1052         (WebCore::InspectorAgent::stopProfiling):
1053         (WebCore::InspectorAgent::debuggerEnabled):
1054         (WebCore::InspectorAgent::state):
1055         (WebCore::InspectorAgent::settings):
1056         * inspector/InspectorApplicationCacheAgent.cpp:
1057         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
1058         (WebCore::InspectorApplicationCacheAgent::getApplicationCaches):
1059         * inspector/InspectorApplicationCacheAgent.h:
1060         * inspector/InspectorBrowserDebuggerAgent.cpp:
1061         (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
1062         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
1063         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
1064         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
1065         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
1066         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
1067         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
1068         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
1069         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
1070         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
1071         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
1072         * inspector/InspectorBrowserDebuggerAgent.h:
1073         (WebCore::InspectorBrowserDebuggerAgent::create):
1074         * inspector/InspectorConsoleAgent.cpp:
1075         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1076         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
1077         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
1078         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1079         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
1080         (WebCore::InspectorConsoleAgent::didReceiveResponse):
1081         (WebCore::InspectorConsoleAgent::didFailLoading):
1082         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
1083         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
1084         (WebCore::InspectorConsoleAgent::addConsoleMessage):
1085         * inspector/InspectorConsoleAgent.h:
1086         * inspector/InspectorController.cpp:
1087         (WebCore::InspectorController::InspectorController):
1088         * inspector/InspectorController.h:
1089         * inspector/InspectorDatabaseAgent.cpp:
1090         * inspector/InspectorDebuggerAgent.cpp:
1091         (WebCore::InspectorDebuggerAgent::create):
1092         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1093         (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent):
1094         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
1095         (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
1096         (WebCore::InspectorDebuggerAgent::currentCallFrames):
1097         * inspector/InspectorDebuggerAgent.h:
1098         * inspector/InspectorFileSystemAgent.cpp:
1099         (WebCore::InspectorFileSystemAgentCallbacks::didOpenFileSystem):
1100         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
1101         (WebCore::InspectorFileSystemAgent::stop):
1102         (WebCore::InspectorFileSystemAgent::getFileSystemPathAsync):
1103         (WebCore::InspectorFileSystemAgent::didGetFileSystemPath):
1104         (WebCore::InspectorFileSystemAgent::didGetFileSystemError):
1105         * inspector/InspectorFileSystemAgent.h:
1106         (WebCore::InspectorFileSystemAgent::create):
1107         * inspector/InspectorFrontendHost.cpp:
1108         (WebCore::InspectorFrontendHost::setExtensionAPI):
1109         * inspector/InspectorProfilerAgent.cpp:
1110         (WebCore::InspectorProfilerAgent::create):
1111         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1112         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
1113         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
1114         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1115         (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling):
1116         * inspector/InspectorProfilerAgent.h:
1117
1118 2011-01-22  Chris Rogers  <crogers@google.com>
1119
1120         Rubber-stamped by Anders Carlsson.
1121
1122         Fix FFTFrameStub to compile properly
1123         https://bugs.webkit.org/show_bug.cgi?id=52969
1124
1125         No new tests since this is a build fix.
1126
1127         * platform/audio/FFTFrameStub.cpp:
1128         (WebCore::FFTFrame::FFTFrame):
1129
1130 2011-01-22  Andrei Popescu  <andreip@google.com>
1131
1132         Reviewed by Jeremy Orlow.
1133
1134         IndexedDB corrupts data on disk
1135         https://bugs.webkit.org/show_bug.cgi?id=52890
1136
1137         We need to store the SerializedScriptValues on disk in a BLOB column rather than TEXT.
1138         Test: storage/indexeddb/data-corruption.html
1139
1140         * platform/sql/SQLiteStatement.cpp:
1141         (WebCore::SQLiteStatement::bindBlob):
1142         (WebCore::SQLiteStatement::getColumnBlobAsString):
1143         (WebCore::SQLiteStatement::getColumnBlobAsVector):
1144         * platform/sql/SQLiteStatement.h:
1145         * storage/IDBCursorBackendImpl.cpp:
1146         (WebCore::IDBCursorBackendImpl::loadCurrentRow):
1147         * storage/IDBFactoryBackendImpl.cpp:
1148         (WebCore::runCommands):
1149         (WebCore::createTables):
1150         (WebCore::createMetaDataTable):
1151         (WebCore::migrateDatabase):
1152         * storage/IDBObjectStoreBackendImpl.cpp:
1153         (WebCore::IDBObjectStoreBackendImpl::getInternal):
1154         (WebCore::putObjectStoreData):
1155
1156 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
1157
1158         Not reviewed. Fix WinCE build.
1159
1160         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1161         (WebCore::GraphicsContext::drawText):
1162         * rendering/RenderThemeWinCE.cpp:
1163         (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
1164
1165 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
1166
1167         Reviewed by Dirk Schulze.
1168
1169         REGRESSION: Vertical line metrics incorrect
1170         https://bugs.webkit.org/show_bug.cgi?id=52960
1171
1172         SimpleFontDataMac.mm contains a hack to modifiy lineGap/descent for the 'Hiragino' font.
1173         That didn't influence the lineSpacing so far, but does now, causing regressions.
1174
1175         Restore old line spacing behaviour to fix the regression.
1176         Covered by existing fast/blockflow, fast/repaint and fast/text/international test cases.
1177
1178         * platform/graphics/FontMetrics.h:
1179         (WebCore::FontMetrics::FontMetrics):
1180         (WebCore::FontMetrics::floatLineSpacing):
1181         (WebCore::FontMetrics::setLineSpacing):
1182         (WebCore::FontMetrics::lineSpacing):
1183         (WebCore::FontMetrics::reset):
1184         * platform/graphics/SimpleFontData.cpp:
1185         (WebCore::SimpleFontData::SimpleFontData):
1186         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
1187         (WebCore::SimpleFontData::platformInit):
1188         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1189         (WebCore::SimpleFontData::platformInit):
1190         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1191         (WebCore::SimpleFontData::platformInit):
1192         * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
1193         (WebCore::SimpleFontData::platformInit):
1194         * platform/graphics/mac/SimpleFontDataMac.mm:
1195         (WebCore::SimpleFontData::platformInit):
1196         * platform/graphics/pango/SimpleFontDataPango.cpp:
1197         (WebCore::SimpleFontData::platformInit):
1198         * platform/graphics/qt/SimpleFontDataQt.cpp:
1199         (WebCore::SimpleFontData::platformInit):
1200         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1201         (WebCore::SimpleFontData::platformInit):
1202         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1203         (WebCore::SimpleFontData::platformInit):
1204         * platform/graphics/win/SimpleFontDataWin.cpp:
1205         (WebCore::SimpleFontData::initGDIFont):
1206         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1207         (WebCore::SimpleFontData::platformInit):
1208         * platform/graphics/wx/SimpleFontDataWx.cpp:
1209         (WebCore::SimpleFontData::platformInit):
1210
1211 2011-01-22  Andreas Kling  <kling@webkit.org>
1212
1213         Reviewed by Kenneth Rohde Christiansen.
1214
1215         [Qt] fast/backgrounds/svg-as-mask.html fails
1216         https://bugs.webkit.org/show_bug.cgi?id=52906
1217
1218         Transparency layers should start out with in SourceOver mode with
1219         alpha 1.0 (modeled after CGContextBeginTransparencyLayer.)
1220
1221         * platform/graphics/qt/TransparencyLayer.h:
1222         (WebCore::TransparencyLayer::TransparencyLayer):
1223
1224 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
1225
1226         Not reviewed.
1227
1228         Introduce FontMetrics abstraction
1229         https://bugs.webkit.org/show_bug.cgi?id=51456
1230
1231         Fix Chromium/Win build.
1232
1233         * platform/graphics/chromium/UniscribeHelperTextRun.cpp: s/->/./
1234         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
1235
1236 2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1237
1238         Reviewed by Dirk Schulze.
1239
1240         Introduce FontMetrics abstraction
1241         https://bugs.webkit.org/show_bug.cgi?id=51456
1242
1243         Encapsulate ascent/descent/lineHeight/lineGap methods in a single FontMetrics class, instead of
1244         having to define them in both Font & SimpleFontData. Changed to store floating point values
1245         as default, in order to get accurate information for small sized fonts. All these methods
1246         now have floating-point and integer versions. Whenever an integer variant of these functions
1247         is called, lroundf() is used to round the value.
1248
1249         This makes it possible to support small font-sizes for SVG in a follow-up patch, as well
1250         as fixing rounding issues when using SVG Fonts.
1251         
1252         Shouldn't affect existing tests.
1253
1254         * GNUmakefile.am: Add FontMetrics.h to build. 
1255         * WebCore.gypi: Ditto.
1256         * WebCore.pro: Ditto.
1257         * WebCore.vcproj/WebCore.vcproj: Ditto.
1258         * WebCore.xcodeproj/project.pbxproj: Ditto.
1259         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
1260         (baselinePositionForAccessibilityRenderObject):
1261         * css/CSSPrimitiveValue.cpp:         
1262         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1263         * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
1264         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1265         * inspector/InspectorController.cpp: Ditto.
1266         (WebCore::InspectorController::drawElementTitle):
1267         * platform/chromium/PopupMenuChromium.cpp: Ditto.
1268         (WebCore::PopupListBox::paintRow):
1269         (WebCore::PopupListBox::getRowHeight):
1270         * platform/graphics/Font.h: Remove ascent/descent/height/lineGap/lineSpacing/xHeight/unitsPerEm accessor...
1271         (WebCore::Font::fontMetrics): ... and only expose a single FontMetrics object here.
1272         * platform/graphics/FontFastPath.cpp: Use fontMetrics() to query metrics information.
1273         (WebCore::Font::emphasisMarkAscent):
1274         (WebCore::Font::emphasisMarkDescent):
1275         (WebCore::Font::emphasisMarkHeight):
1276         (WebCore::Font::floatWidthForSimpleText):
1277         * platform/graphics/FontMetrics.h: Added.
1278         (WebCore::FontMetrics::FontMetrics): Creates a FontMetrics object, stored in SimpleFontData.
1279         (WebCore::FontMetrics::unitsPerEm): Returns an unsigned describing the unitsPerEm.
1280         (WebCore::FontMetrics::setUnitsPerEm): Sets the unitsPerEm value.
1281         (WebCore::FontMetrics::floatAscent): Returns the stored m_ascent float.
1282         (WebCore::FontMetrics::setAscent): Sets the stored m_ascent float.
1283         (WebCore::FontMetrics::floatDescent): Returns the stored m_descent float.
1284         (WebCore::FontMetrics::setDescent): Sets the stored m_descent float.
1285         (WebCore::FontMetrics::floatHeight): Returns floatAscent() + floatDescent().
1286         (WebCore::FontMetrics::floatLineGap): Returns the stored m_lineGap float.
1287         (WebCore::FontMetrics::setLineGap): Sets the stored m_lineGap float.
1288         (WebCore::FontMetrics::floatLineSpacing): Returns the stored m_lineSpacing float.
1289         (WebCore::FontMetrics::setLineSpacing): Sets the stored m_lineSpacing float.
1290         (WebCore::FontMetrics::xHeight): Returns the stored m_xHeight float (no integer version available, hence no 'float' prefix).
1291         (WebCore::FontMetrics::setXHeight): Sets the stored m_xHeight float.
1292         (WebCore::FontMetrics::ascent): Returns a rounded version of ascent().
1293         (WebCore::FontMetrics::descent): Ditto (for descent).
1294         (WebCore::FontMetrics::height): Returns ascent() + descent().
1295         (WebCore::FontMetrics::lineGap): Returns a rounded version of lineGap().
1296         (WebCore::FontMetrics::lineSpacing): Ditto (for lineSpacing).
1297         (WebCore::FontMetrics::reset): Nulls all members, used only by the platform variants of SimpleFontData.
1298         * platform/graphics/SimpleFontData.cpp: Adapt SVG Fonts code, to initialize the FontMetrics object, as the m_ascent/etc.. members are gone.
1299         (WebCore::SimpleFontData::SimpleFontData):
1300         (WebCore::SimpleFontData::initCharWidths):
1301         * platform/graphics/SimpleFontData.h: Remove ascent/descent/height/lineSpacing/lineGap/xHeight/unitsPerEm accessors, and members, just store a FontMetrics object and expose it.
1302         (WebCore::SimpleFontData::fontMetrics):
1303         (WebCore::SimpleFontData::avgCharWidth):
1304         * platform/graphics/chromium/FontChromiumWin.cpp: Use fontMetrics() to query font metrics.
1305         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
1306         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1307         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
1308         (WebCore::Font::drawComplexText):
1309         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Adapt platform code, to initialize the FontMetrics object.
1310         (WebCore::SimpleFontData::platformInit):
1311         * platform/graphics/chromium/SimpleFontDataLinux.cpp: Ditto.
1312         (WebCore::SimpleFontData::platformInit):
1313         * platform/graphics/chromium/UniscribeHelperTextRun.cpp: Use fontMetrics() to query font metrics.
1314         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
1315         (WebCore::UniscribeHelperTextRun::nextWinFontData):
1316         * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Adapt platform code, to initialize the FontMetrics object.
1317         (WebCore::SimpleFontData::platformInit):
1318         * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Ditto.
1319         (WebCore::SimpleFontData::platformInit):
1320         * platform/graphics/mac/FontComplexTextMac.cpp: Use fontMetrics() to query font metrics.
1321         (WebCore::Font::floatWidthForComplexText):
1322         * platform/graphics/mac/FontMac.mm: Ditto.
1323         (WebCore::showGlyphsWithAdvances):
1324         * platform/graphics/mac/SimpleFontDataMac.mm: Adapt platform code, to initialize the FontMetrics object.
1325         (WebCore::SimpleFontData::platformInit):
1326         (WebCore::SimpleFontData::platformCharWidthInit):
1327         * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
1328         (WebCore::SimpleFontData::platformInit):
1329         * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto. (+ Switch to QFontMetricsF to get floating-point accurancy.)
1330         (WebCore::SimpleFontData::platformInit):
1331         * platform/graphics/win/FontCGWin.cpp: Use fontMetrics() to query font metrics.
1332         (WebCore::drawGDIGlyphs):
1333         * platform/graphics/win/FontWin.cpp: Ditto.
1334         (WebCore::Font::floatWidthForComplexText):
1335         * platform/graphics/win/SimpleFontDataCGWin.cpp: Adapt platform code, to initialize the FontMetrics object.
1336         (WebCore::SimpleFontData::platformInit):
1337         (WebCore::SimpleFontData::platformBoundsForGlyph):
1338         * platform/graphics/win/SimpleFontDataCairoWin.cpp: Ditto.
1339         (WebCore::SimpleFontData::platformInit):
1340         * platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
1341         (WebCore::SimpleFontData::initGDIFont):
1342         * platform/graphics/wince/GraphicsContextWinCE.cpp: Use fontMetrics() to query font metrics.
1343         (WebCore::GraphicsContext::drawText):
1344         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Adapt platform code, to initialize the FontMetrics object.
1345         (WebCore::SimpleFontData::platformInit):
1346         * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
1347         (WebCore::SimpleFontData::platformInit):
1348         * platform/win/PopupMenuWin.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
1349         (WebCore::PopupMenuWin::calculatePositionAndSize): 
1350         (WebCore::PopupMenuWin::paint):
1351         * rendering/EllipsisBox.cpp: Ditto.
1352         (WebCore::EllipsisBox::paint):
1353         (WebCore::EllipsisBox::nodeAtPoint):
1354         * rendering/InlineBox.cpp: Ditto.
1355         (WebCore::InlineBox::logicalHeight):
1356         * rendering/InlineFlowBox.cpp: Ditto.
1357         (WebCore::verticalPositionForBox):
1358         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1359         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1360         * rendering/InlineTextBox.cpp: Ditto.
1361         (WebCore::InlineTextBox::paint):
1362         (WebCore::InlineTextBox::paintDecoration):
1363         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1364         (WebCore::InlineTextBox::paintCompositionUnderline):
1365         * rendering/RenderBlock.cpp: Ditto.
1366         (WebCore::RenderBlock::baselinePosition):
1367         (WebCore::RenderBlock::firstLineBoxBaseline):
1368         (WebCore::RenderBlock::lastLineBoxBaseline):
1369         * rendering/RenderBox.cpp: Ditto.
1370         (WebCore::RenderBox::localCaretRect):
1371         * rendering/RenderEmbeddedObject.cpp: Ditto.
1372         (WebCore::RenderEmbeddedObject::paintReplaced):
1373         * rendering/RenderImage.cpp: Ditto.
1374         (WebCore::RenderImage::setImageSizeForAltText):
1375         (WebCore::RenderImage::paintReplaced):
1376         * rendering/RenderInline.cpp: Ditto.
1377         (WebCore::RenderInline::baselinePosition):
1378         * rendering/RenderListBox.cpp: Ditto.
1379         (WebCore::RenderListBox::paintItemForeground):
1380         (WebCore::RenderListBox::itemHeight):
1381         * rendering/RenderListMarker.cpp: Ditto.
1382         (WebCore::RenderListMarker::paint):
1383         (WebCore::RenderListMarker::layout):
1384         (WebCore::RenderListMarker::computePreferredLogicalWidths):
1385         (WebCore::RenderListMarker::updateMargins):
1386         (WebCore::RenderListMarker::getRelativeMarkerRect):
1387         * rendering/RenderTextControl.cpp: Ditto.
1388         (WebCore::RenderTextControl::paintPlaceholder):
1389         * rendering/RenderTextControlSingleLine.cpp: Ditto.
1390         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
1391         * rendering/RenderThemeWin.cpp: Ditto.
1392         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
1393         * rendering/mathml/RenderMathMLFraction.cpp: Ditto.
1394         (WebCore::RenderMathMLFraction::baselinePosition):
1395         * rendering/style/RenderStyle.h: Add "const FontMetrics& fontMetrics() const" accessor.
1396         (WebCore::InheritedFlags::fontMetrics):
1397         (WebCore::InheritedFlags::computedLineHeight):
1398         * rendering/svg/RenderSVGInlineText.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
1399         (WebCore::RenderSVGInlineText::positionForPoint):
1400         * rendering/svg/SVGInlineTextBox.cpp: Ditto.
1401         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
1402         (WebCore::positionOffsetForDecoration):
1403         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
1404         (WebCore::SVGInlineTextBox::paintTextWithShadows):
1405         (WebCore::SVGInlineTextBox::calculateBoundaries):
1406         * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Ditto.
1407         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift):
1408         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift):
1409         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation):
1410         * rendering/svg/SVGTextLayoutEngineSpacing.cpp: Ditto.
1411         (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
1412         * rendering/svg/SVGTextMetrics.cpp: Ditto.
1413         (WebCore::SVGTextMetrics::SVGTextMetrics):
1414         * rendering/svg/SVGTextQuery.cpp: Ditto.
1415         (WebCore::calculateGlyphBoundaries):
1416         * svg/SVGFontFaceElement.cpp: 
1417         (WebCore::SVGFontFaceElement::unitsPerEm): Rename defaultUnitsPerEm global to gDefaultUnitsPerEm.
1418         * svg/SVGLength.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
1419         (WebCore::SVGLength::convertValueFromUserUnitsToEXS):
1420         (WebCore::SVGLength::convertValueFromEXSToUserUnits):
1421
1422 2011-01-22  Ryosuke Niwa  <rniwa@webkit.org>
1423
1424         Reviewed by Eric Seidel.
1425
1426         Stop instantiating legacy editing positions in VisibleSelection, visible_units.cpp, Frame, and RenderBlock
1427         https://bugs.webkit.org/show_bug.cgi?id=52759
1428
1429         Stopped instantiating legacy editing positions in the following files.
1430
1431         * editing/VisibleSelection.cpp:
1432         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
1433         * editing/visible_units.cpp:
1434         (WebCore::previousBoundary):
1435         (WebCore::previousLinePosition):
1436         (WebCore::nextLinePosition):
1437         (WebCore::startOfBlock):
1438         * page/Frame.cpp:
1439         (WebCore::Frame::visiblePositionForPoint):
1440         * rendering/RenderBlock.cpp: Removed RenderBlock::positionForRenderer because it was not called anywhere.
1441         * rendering/RenderBlock.h: Ditto.
1442
1443 2011-01-22  Adrienne Walker  <enne@google.com>
1444
1445         Reviewed by James Robinson.
1446
1447         [chromium] Fix compositor repaints for offscreen fixed elements
1448         https://bugs.webkit.org/show_bug.cgi?id=52681
1449
1450         The fast path scrolling was clipping offscreen invalidations.
1451         Additionally, the compositor was ignoring all invalidations that were
1452         entirely out of the content rect.
1453
1454         Test: compositing/ to verify this caused no regressions.
1455         Tested fix manually in browser as I could not generate a LayoutTest that reproduced the bug in run-webkit-tests.
1456
1457         * page/FrameView.cpp:
1458         (WebCore::FrameView::scrollContentsFastPath):
1459         * platform/graphics/chromium/LayerRendererChromium.cpp:
1460         (WebCore::LayerRendererChromium::invalidateRootLayerRect):
1461
1462 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
1463
1464         Reviewed by Dan Bernstein.
1465
1466         https://bugs.webkit.org/show_bug.cgi?id=52951
1467         WebKit2 generates a bad PDF for cross process messaging
1468
1469         * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Use a correct offset to actually
1470         draw inside the requested rectangle.
1471
1472 2011-01-21  Yury Semikhatsky  <yurys@chromium.org>
1473
1474         Reviewed by Adam Barth.
1475
1476         Regression: new window.onerror() implementation leaks cross-origin Javascript errors
1477         https://bugs.webkit.org/show_bug.cgi?id=52903
1478
1479         In case of an exception in a script from different domain only generic message
1480         will be passed to window.onerror hander.
1481
1482         Tests: http/tests/security/cross-origin-script-window-onerror-redirected.html
1483                http/tests/security/cross-origin-script-window-onerror.html
1484
1485         * bindings/js/CachedScriptSourceProvider.h: use URL from the resource response to make sure we do all
1486         cross origin checks agains real script URL, not the original URL which may have resulted in a sequence
1487         of redirects to different domains.
1488         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1489         * bindings/v8/ScriptSourceCode.h: same for v8.
1490         (WebCore::ScriptSourceCode::url):
1491         * dom/ScriptExecutionContext.cpp:
1492         (WebCore::ScriptExecutionContext::dispatchErrorEvent): in case the error occurred in a script we cannot
1493         access provide concise "Script error." message without any information about the error source. This is
1494         what Firefox does in this case.
1495
1496 2011-01-21  Andreas Kling  <kling@webkit.org>
1497
1498         Reviewed by Kenneth Rohde Christiansen.
1499
1500         [Qt] Always set composition mode through GraphicsContext
1501         https://bugs.webkit.org/show_bug.cgi?id=52940
1502
1503         GraphicsContext tracks the current composition mode so we should
1504         never call through to the QPainter directly.
1505
1506         * platform/graphics/GraphicsContext.h:
1507         * platform/graphics/qt/GraphicsContextQt.cpp:
1508         (WebCore::toQtCompositionMode): Changed this method to a static inline
1509         since it's only used by GraphicsContextQt.cpp now.
1510
1511         * platform/graphics/qt/ImageQt.cpp:
1512         (WebCore::Image::drawPattern):
1513         (WebCore::BitmapImage::draw):
1514
1515 2011-01-21  Dan Bernstein  <mitz@apple.com>
1516
1517         Reviewed by Adele Peterson.
1518
1519         Inconsistent handling of no-break space in justification logic
1520         https://bugs.webkit.org/show_bug.cgi?id=52938
1521
1522         Test: fast/text/justify-nbsp.html
1523
1524         * rendering/RenderBlockLineLayout.cpp:
1525         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Count no-break space as a
1526         space when computing the distribution of space between text boxes on the line.
1527
1528 2011-01-21  Charlie Reis  <creis@chromium.org>
1529
1530         Reviewed by Darin Fisher.
1531
1532         Crash in WebCore::HistoryController::itemsAreClones
1533         https://bugs.webkit.org/show_bug.cgi?id=52819
1534
1535         Adds sanity checks to help diagnose the crash.
1536
1537         * loader/HistoryController.cpp:
1538
1539 2011-01-21  Andreas Kling  <kling@webkit.org>
1540
1541         Reviewed by Ariya Hidayat.
1542
1543         [Qt] Let QPainter decide whether a composition mode is supported or not
1544
1545         Lacking Porter-Duff support in the paint engine shouldn't exclude the
1546         Source and Source-Over modes (and has nothing to do with the blend
1547         and raster-op modes.)
1548
1549         Delegate this decision to QPainter instead (this will cause warnings
1550         if an unsupported mode is used, but that's a good thing.)
1551
1552         * platform/graphics/qt/GraphicsContextQt.cpp:
1553         (WebCore::GraphicsContext::clearRect):
1554         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1555         * platform/graphics/qt/TransparencyLayer.h:
1556         (WebCore::TransparencyLayer::TransparencyLayer):
1557
1558 2011-01-21  Chris Rogers  <crogers@google.com>
1559
1560         Reviewed by Kenneth Russell.
1561
1562         fix audio build: header file should be "Noncopyable.h" and not "NonCopyable.h"
1563         https://bugs.webkit.org/show_bug.cgi?id=52933
1564
1565         No new tests since this just fixes the build
1566
1567         * webaudio/RealtimeAnalyser.h:
1568
1569 2011-01-21  Chris Rogers  <crogers@google.com>
1570
1571         Reviewed by Kenneth Russell.
1572
1573         Fix audio build: change ChromiumBridge to PlatformBridge
1574         https://bugs.webkit.org/show_bug.cgi?id=52928
1575
1576         No new tests since audio API is not yet implemented.
1577
1578         * platform/audio/chromium/AudioBusChromium.cpp:
1579         (WebCore::AudioBus::loadPlatformResource):
1580
1581 2011-01-21  Chris Rogers  <crogers@google.com>
1582
1583         Reviewed by Kenneth Russell.
1584
1585         Add FFTFrameStub to avoid link errors during bringup on platforms without an FFT implementation
1586         https://bugs.webkit.org/show_bug.cgi?id=52922
1587
1588         No new tests since audio API is not yet implemented.
1589
1590         * WebCore.gypi:
1591         * platform/audio/FFTFrameStub.cpp: Added.
1592         (WebCore::FFTFrame::FFTFrame):
1593         (WebCore::FFTFrame::~FFTFrame):
1594         (WebCore::FFTFrame::multiply):
1595         (WebCore::FFTFrame::doFFT):
1596         (WebCore::FFTFrame::doInverseFFT):
1597         (WebCore::FFTFrame::cleanup):
1598         (WebCore::FFTFrame::realData):
1599         (WebCore::FFTFrame::imagData):
1600
1601 2011-01-21  Tony Chang  <tony@chromium.org>
1602
1603         Reviewed by Sam Weinig.
1604
1605         reduce number of FrameLoaderClient::didChangeScrollOffset calls
1606         https://bugs.webkit.org/show_bug.cgi?id=52915
1607
1608         Only notify of changes in scroll offset when there actually is a change.
1609         This regressed in r76291.
1610
1611         Covered by Chromium browser_tests.
1612
1613         * platform/ScrollAnimator.cpp:
1614         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
1615
1616 2011-01-21  Pavel Feldman  <pfeldman@chromium.org>
1617
1618         Reviewed by Yury Semikhatsky.
1619
1620         Web Inspector: ~InspectorResourceAgent crashes on closing inspected page.
1621         https://bugs.webkit.org/show_bug.cgi?id=52900
1622
1623         * inspector/InspectorController.cpp:
1624         (WebCore::InspectorController::~InspectorController):
1625         (WebCore::InspectorController::inspectedPageDestroyed):
1626
1627 2011-01-21  Chris Rogers  <crogers@google.com>
1628
1629         Reviewed by Darin Fisher.
1630
1631         Add run-time enable support for the web audio API
1632         https://bugs.webkit.org/show_bug.cgi?id=52741
1633
1634         No new tests since audio API is not yet implemented.
1635
1636         * WebCore.exp.in:
1637         * bindings/generic/RuntimeEnabledFeatures.cpp:
1638         * bindings/generic/RuntimeEnabledFeatures.h:
1639         (WebCore::RuntimeEnabledFeatures::setWebkitAudioContextEnabled):
1640         (WebCore::RuntimeEnabledFeatures::webkitAudioContextEnabled):
1641         * page/DOMWindow.idl:
1642         * page/Settings.cpp:
1643         (WebCore::Settings::Settings):
1644         (WebCore::Settings::setWebAudioEnabled):
1645         * page/Settings.h:
1646         (WebCore::Settings::webAudioEnabled):
1647
1648 2011-01-21  Martin Robinson  <mrobinson@igalia.com>
1649
1650         Reviewed by Xan Lopez.
1651
1652         [GTK] Menulist text often collides with separator
1653         https://bugs.webkit.org/show_bug.cgi?id=51155
1654
1655         Move menulist rendering to RenderThemeGtk and correct padding code
1656         for separators in menulists.
1657
1658         * platform/gtk/RenderThemeGtk.cpp:
1659         (WebCore::RenderThemeGtk::RenderThemeGtk): Initialize new widget members.
1660         (WebCore::RenderThemeGtk::getComboBoxSeparatorWidth): Added.
1661         (WebCore::RenderThemeGtk::comboBoxArrowSize): Added.
1662         (WebCore::getButtonInnerBorder): Added.
1663         (WebCore::RenderThemeGtk::getComboBoxPadding): Do this manually instead of using
1664         Mozilla code.
1665         (WebCore::RenderThemeGtk::paintMenuList): Ditto.
1666         (WebCore::setupWidget): Abstracted this part of the setupWidgetAndAddToContainer
1667         out to handle child widgets of comboboxes.
1668         (WebCore::RenderThemeGtk::setupWidgetAndAddToContainer): Abstracted out setupWidget.
1669         (WebCore::RenderThemeGtk::gtkContainer): Added.
1670         (WebCore::getGtkComboBoxButton): Added.
1671         (WebCore::getGtkComboBoxPieces): Added.
1672         (WebCore::RenderThemeGtk::gtkComboBox): Call setupWidget here.
1673         (WebCore::RenderThemeGtk::refreshComboBoxChildren): Added.
1674         (WebCore::RenderThemeGtk::gtkComboBoxButton): Added.
1675         (WebCore::RenderThemeGtk::gtkComboBoxArrow): Added.
1676         (WebCore::RenderThemeGtk::gtkComboBoxSeparator): Added.
1677         * platform/gtk/RenderThemeGtk.h: Added new members and methods.
1678         * platform/gtk/WidgetRenderingContext.h: Added new members and methods.
1679         * platform/gtk/WidgetRenderingContextGtk2.cpp:
1680         (WebCore::WidgetRenderingContext::gtkPaintArrow):
1681         (WebCore::WidgetRenderingContext::gtkPaintVLine):
1682         * platform/gtk/WidgetRenderingContextGtk3.cpp:
1683         (WebCore::WidgetRenderingContext::gtkPaintArrow):
1684         (WebCore::WidgetRenderingContext::gtkPaintVLine):
1685         * platform/gtk/gtk2drawing.c: Removed code for drawing menulists and buttons.
1686         (moz_gtk_init):
1687         (moz_gtk_get_widget_border):
1688         (moz_gtk_widget_paint):
1689         * platform/gtk/gtk3drawing.c:
1690         (moz_gtk_init):
1691         (moz_gtk_get_widget_border):
1692         (moz_gtk_widget_paint):
1693         * platform/gtk/gtkdrawing.h:
1694
1695 2011-01-21  Sam Weinig  <sam@webkit.org>
1696
1697         Fix chromium mac build.
1698
1699         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1700         (WebCore::scrollbarStateToThemeState):
1701         (WebCore::ScrollbarThemeChromiumMac::paint):
1702
1703 2011-01-21  Sam Weinig  <sam@webkit.org>
1704
1705         Fix the windows build.
1706
1707         * platform/ScrollbarThemeComposite.cpp:
1708         (WebCore::ScrollbarThemeComposite::paint):
1709
1710 2011-01-21  Chris Rogers  <crogers@google.com>
1711
1712         Reviewed by Kenneth Russell.
1713
1714         Add chromium bundled audio spatialization resources to WebAudio.grd
1715         https://bugs.webkit.org/show_bug.cgi?id=52651
1716
1717         No new tests since audio API is not yet implemented.
1718
1719         * WebCore.gyp/WebCore.gyp:
1720         * platform/audio/chromium/AudioBusChromium.cpp:
1721         (WebCore::AudioBus::loadPlatformResource):
1722
1723 2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>
1724
1725         Reviewed by Tony Chang.
1726
1727         Use WebThemeEngine for relevant RenderTheme parts for chromium/linux.
1728         https://bugs.webkit.org/show_bug.cgi?id=52826
1729
1730         * platform/chromium/ChromiumBridge.h:
1731         * rendering/RenderThemeChromiumLinux.cpp:
1732         (WebCore::getWebThemeState):
1733         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
1734         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
1735         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
1736         (WebCore::RenderThemeChromiumLinux::paintRadio):
1737         (WebCore::RenderThemeChromiumLinux::setRadioSize):
1738         (WebCore::RenderThemeChromiumLinux::paintButton):
1739         (WebCore::RenderThemeChromiumLinux::paintTextField):
1740         (WebCore::RenderThemeChromiumLinux::paintMenuList):
1741         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
1742         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
1743         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
1744         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
1745         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
1746         * rendering/RenderThemeChromiumLinux.h:
1747         * rendering/RenderThemeChromiumSkia.cpp:
1748         (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
1749         (WebCore::RenderThemeChromiumSkia::setSizeIfAuto):
1750         (WebCore::RenderThemeChromiumSkia::indeterminateProgressValueRectFor):
1751         * rendering/RenderThemeChromiumSkia.h:
1752
1753 2011-01-21  Sam Weinig  <sam@webkit.org>
1754
1755         Reviewed by Anders Carlsson.
1756
1757         Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
1758         https://bugs.webkit.org/show_bug.cgi?id=52779
1759
1760         Rename ScrollbarClient -> ScrollableArea.
1761
1762         - Also replaces Scrollbar::setClient with Scrollbar::disconnectFromScrollableArea
1763           since that was its only use case.
1764
1765         * CMakeLists.txt:
1766         * GNUmakefile.am:
1767         * WebCore.gypi:
1768         * WebCore.pro:
1769         * WebCore.vcproj/WebCore.vcproj:
1770         * WebCore.xcodeproj/project.pbxproj:
1771         * accessibility/AccessibilityScrollbar.cpp:
1772         (WebCore::AccessibilityScrollbar::setValue):
1773         * css/CSSStyleSelector.cpp:
1774         (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass):
1775         * page/FrameView.h:
1776         * platform/PopupMenuClient.h:
1777         * platform/ScrollAnimator.cpp:
1778         (WebCore::ScrollAnimator::create):
1779         (WebCore::ScrollAnimator::ScrollAnimator):
1780         (WebCore::ScrollAnimator::scroll):
1781         (WebCore::ScrollAnimator::notityPositionChanged):
1782         * platform/ScrollAnimator.h:
1783         * platform/ScrollAnimatorWin.cpp:
1784         (WebCore::ScrollAnimator::create):
1785         (WebCore::ScrollAnimatorWin::ScrollAnimatorWin):
1786         (WebCore::ScrollAnimatorWin::scroll):
1787         * platform/ScrollAnimatorWin.h:
1788         * platform/ScrollView.cpp:
1789         (WebCore::ScrollView::scroll):
1790         (WebCore::ScrollView::updateScrollbars):
1791         (WebCore::ScrollView::wheelEvent):
1792         * platform/ScrollView.h:
1793         * platform/ScrollableArea.cpp: Copied from WebCore/platform/ScrollbarClient.cpp.
1794         (WebCore::ScrollableArea::ScrollableArea):
1795         (WebCore::ScrollableArea::~ScrollableArea):
1796         (WebCore::ScrollableArea::scroll):
1797         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
1798         (WebCore::ScrollableArea::scrollToXOffsetWithoutAnimation):
1799         (WebCore::ScrollableArea::scrollToYOffsetWithoutAnimation):
1800         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
1801         * platform/ScrollableArea.h: Copied from WebCore/platform/ScrollbarClient.h.
1802         * platform/Scrollbar.cpp:
1803         (WebCore::Scrollbar::createNativeScrollbar):
1804         (WebCore::Scrollbar::Scrollbar):
1805         (WebCore::Scrollbar::offsetDidChange):
1806         (WebCore::Scrollbar::autoscrollPressedPart):
1807         (WebCore::Scrollbar::moveThumb):
1808         (WebCore::Scrollbar::mouseMoved):
1809         (WebCore::Scrollbar::isWindowActive):
1810         (WebCore::Scrollbar::invalidateRect):
1811         (WebCore::Scrollbar::convertToContainingView):
1812         (WebCore::Scrollbar::convertFromContainingView):
1813         * platform/Scrollbar.h:
1814         (WebCore::Scrollbar::disconnectFromScrollableArea):
1815         (WebCore::Scrollbar::scrollableArea):
1816         * platform/ScrollbarClient.cpp: Removed.
1817         * platform/ScrollbarClient.h: Removed.
1818         * platform/ScrollbarThemeComposite.cpp:
1819         * platform/chromium/FramelessScrollView.h:
1820         * platform/chromium/ScrollbarThemeChromium.cpp:
1821         (WebCore::ScrollbarThemeChromium::paintTickmarks):
1822         * platform/efl/ScrollbarEfl.cpp:
1823         (Scrollbar::createNativeScrollbar):
1824         (ScrollbarEfl::ScrollbarEfl):
1825         (scrollbarEflEdjeMessage):
1826         * platform/efl/ScrollbarEfl.h:
1827         * platform/gtk/MainFrameScrollbarGtk.cpp:
1828         (MainFrameScrollbarGtk::create):
1829         (MainFrameScrollbarGtk::MainFrameScrollbarGtk):
1830         (MainFrameScrollbarGtk::gtkValueChanged):
1831         * platform/gtk/MainFrameScrollbarGtk.h:
1832         * platform/mac/ScrollAnimatorMac.h:
1833         * platform/mac/ScrollAnimatorMac.mm:
1834         (WebCore::ScrollAnimator::create):
1835         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1836         (WebCore::ScrollAnimatorMac::scroll):
1837         * platform/mac/ScrollbarThemeMac.mm:
1838         (WebCore::ScrollbarThemeMac::paint):
1839         * platform/qt/ScrollbarQt.cpp:
1840         (WebCore::Scrollbar::contextMenu):
1841         * platform/win/PopupMenuWin.cpp:
1842         (WebCore::PopupMenuWin::scrollToRevealSelection):
1843         (WebCore::PopupMenuWin::wndProc):
1844         * platform/win/PopupMenuWin.h:
1845         * platform/win/ScrollbarThemeSafari.cpp:
1846         (WebCore::ScrollbarThemeSafari::paintTrackBackground):
1847         (WebCore::ScrollbarThemeSafari::paintButton):
1848         (WebCore::ScrollbarThemeSafari::paintThumb):
1849         * platform/wx/ScrollbarThemeWx.cpp:
1850         (WebCore::ScrollbarThemeWx::paint):
1851         * rendering/RenderDataGrid.h:
1852         * rendering/RenderLayer.cpp:
1853         (WebCore::RenderLayer::scrollToOffset):
1854         (WebCore::RenderLayer::destroyScrollbar):
1855         (WebCore::RenderLayer::scroll):
1856         * rendering/RenderLayer.h:
1857         * rendering/RenderListBox.cpp:
1858         (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
1859         (WebCore::RenderListBox::scroll):
1860         (WebCore::RenderListBox::logicalScroll):
1861         (WebCore::RenderListBox::setScrollTop):
1862         (WebCore::RenderListBox::destroyScrollbar):
1863         * rendering/RenderListBox.h:
1864         * rendering/RenderMenuList.cpp:
1865         (WebCore::RenderMenuList::createScrollbar):
1866         * rendering/RenderMenuList.h:
1867         * rendering/RenderScrollbar.cpp:
1868         (WebCore::RenderScrollbar::createCustomScrollbar):
1869         (WebCore::RenderScrollbar::RenderScrollbar):
1870         * rendering/RenderScrollbar.h:
1871         * rendering/RenderTextControlSingleLine.cpp:
1872         (WebCore::RenderTextControlSingleLine::createScrollbar):
1873         * rendering/RenderTextControlSingleLine.h:
1874
1875 2011-01-21  Darin Adler  <darin@apple.com>
1876
1877         Fix Leopard build.
1878
1879         * rendering/mathml/RenderMathMLFraction.cpp:
1880         (WebCore::RenderMathMLFraction::layout): Use ceilf instead of ceil.
1881
1882 2011-01-21  Anton Muhin  <antonm@chromium.org>
1883
1884         Reviewed by Nate Chapin.
1885
1886         [v8] Properly deal with the case when conversion to string throws an exception for HTMLCollection accessors
1887         https://bugs.webkit.org/show_bug.cgi?id=52901
1888
1889         Test: fast/dom/htmlcollection-conversion-throws-exception.html
1890
1891         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1892         (WebCore::getItem):
1893
1894 2011-01-21  Adam Roben  <aroben@apple.com>
1895
1896         Separate flushing layer changes from rendering in CACFLayerTreeHost
1897
1898         Old model:
1899           1) A change is made to a GraphicsLayer.
1900           2) CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon is called, which schedules the
1901              render timer.
1902           3) The timer fires, which calls through to CACFLayerTreeHost::render, which performs the
1903              flush and then renders.
1904
1905         New model:
1906           1) A change is made to a GraphicsLayer.
1907           2) CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon is called, which tells the new
1908              LayerChangesFlusher singleton that this host has changes that need to be flushed.
1909           3) LayerChangesFlusher sets up a Windows hook that will get called on the next iteration
1910              of the message loop.
1911           4) LayerChangesFlusher's hook is called, which calls through to
1912              CACFLayerTreeHost::flushPendingLayerChangesNow.
1913           5) CACFLayerTreeHost::flushPendingLayerChangesNow schedules the render timer so the changes
1914              that were just flushed to the context will be rendered.
1915
1916         When a change is made to a PlatformCALayer that doesn't have a corresponding GraphicsLayer
1917         (e.g., for rendering <video>), CACFLayerTreeHost::layerTreeDidChange takes care of
1918         scheduling the flush.
1919
1920         This change has three advantages:
1921           1) Whenever we flush layer changes, we first update layout. This can cause the page to
1922              leave compositing mode, which in turn can cause all references to the CACFLayerTreeHost
1923              to be dropped. By separating flushing (and thus updating layout) from rendering, we no
1924              longer have to worry about this happen during rendering.
1925           2) The new model is much more similar to how things work on the Mac, so will hopefully
1926              reduce the number of platform-specific bugs.
1927           3) CACFLayerTreeHost::shouldRender, which was used to make sure we didn't render while a
1928              layout was pending, is no longer needed. It actually hasn't been needed since at least
1929              r75987, but removing it before now would have resulted in a crash whenever a page came
1930              out of compositing mode due to (1).
1931
1932         Fixes <http://webkit.org/b/52852> Flushing layer changes and rendering are intertwined in
1933         CACFLayerTreeHost, but shouldn't be
1934
1935         Reviewed by Simon Fraser.
1936
1937         * WebCore.vcproj/WebCore.vcproj: Added LayerChangesFlusher.
1938
1939         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Added new #include, sorted existing
1940         #includes.
1941         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Initialize new member.
1942         (WebCore::CACFLayerTreeHost::layerTreeDidChange): If we aren't already flushing changes,
1943         schedule a flush. Removed the call to renderSoon(), which now happens when the flush is
1944         finished.
1945         (WebCore::CACFLayerTreeHost::destroyRenderer): Cancel any pending flush we had scheduled. Also
1946         fixed a bug where we'd fail to clear the context's layer.
1947         (WebCore::CACFLayerTreeHost::render): Removed code to ask the client if we should render, which
1948         is no longer needed. Moved code to flush layer changes from here to
1949         flushPendingLayerChangesNow, which is called via the above-described mechanism.
1950         (WebCore::CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon): Schedule a flush. Removed
1951         code to schedule a render, which now happens after we've flushed.
1952         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added. Some of this code came from
1953         render(). First we flush GraphicsLayer changes from GraphicsLayers to their underlying
1954         PlatformCALayers, then we flush changes from PlatformCALayers to the context, then we
1955         schedule a render so that the changes will be rendered to the screen.
1956
1957         * platform/graphics/ca/win/CACFLayerTreeHost.h: Removed
1958         CACFLayerTreeHostClient::shouldRender. Added flushPendingLayerChangesNow and
1959         m_isFlushingLayerChanges.
1960
1961         * platform/graphics/ca/win/LayerChangesFlusher.cpp: Added.
1962         (WebCore::LayerChangesFlusher::shared):
1963         (WebCore::LayerChangesFlusher::LayerChangesFlusher):
1964         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
1965         (WebCore::LayerChangesFlusher::cancelPendingFlush):
1966         (WebCore::LayerChangesFlusher::hookCallback):
1967         (WebCore::LayerChangesFlusher::hookFired):
1968         (WebCore::LayerChangesFlusher::setHook):
1969         (WebCore::LayerChangesFlusher::removeHook):
1970
1971         * platform/graphics/ca/win/LayerChangesFlusher.cpp: Added.
1972         (WebCore::LayerChangesFlusher::shared): Returns the singleton.
1973         (WebCore::LayerChangesFlusher::LayerChangesFlusher): Initialize our members.
1974         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon): Add the host to the set of
1975         hosts with changes that need to be flushed, and set up our hook if we haven't already.
1976         (WebCore::LayerChangesFlusher::cancelPendingFlush): Remove the host from the set of hosts
1977         with changes that need to be flushed. If we have no more such hosts, remove our hook, unless
1978         we're currently in the process of calling out to our hosts, in which case we'll take care of
1979         the hook once we're done calling out.
1980         (WebCore::LayerChangesFlusher::hookCallback): This is the function that Windows calls when
1981         our hook fires. Just calls through to hookFired on the singleton.
1982         (WebCore::LayerChangesFlusher::hookFired): Tell all the hosts with changes that needed to be
1983         flushed that it's time to flush. If no hosts re-added themselves to our set during this
1984         process, remove our hook.
1985         (WebCore::LayerChangesFlusher::setHook): Calls through to ::SetWindowsHookExW.
1986         (WebCore::LayerChangesFlusher::removeHook): Calls through to ::UnhookWindowsHookEx.
1987
1988         * platform/graphics/ca/win/LayerChangesFlusher.h: Added.
1989
1990 2011-01-21  Simon Fraser  <simon.fraser@apple.com>
1991
1992         Reviewed by Sam Weinig.
1993
1994         GraphicsLayer should be non-copyable
1995         https://bugs.webkit.org/show_bug.cgi?id=52909
1996
1997         Use WTF_MAKE_NONCOPYABLE on GraphicsLayer, and WTF_MAKE_FAST_ALLOCATED
1998         on that and KeyframeValueList.
1999         
2000         * platform/graphics/GraphicsLayer.h:
2001
2002 2011-01-21  Simon Fraser  <simon.fraser@apple.com>
2003
2004         Reviewed by Sam Weinig.
2005
2006         Report the sized used by canvases and types arrays
2007         https://bugs.webkit.org/show_bug.cgi?id=52856
2008
2009         Report the memory cost associated with canvas elements,
2010         and typed arrays to JavaScript as extraCost, so that it
2011         can figure this into its GC behavior.
2012
2013         * bindings/js/JSArrayBufferViewHelper.h:
2014         (WebCore::toJSArrayBufferView): New templatized function, similar
2015         to getDOMObjectWrapper() but calls reportExtraMemoryCost() with
2016         the byteLength of the array.
2017         
2018         * bindings/js/JSFloat32ArrayCustom.cpp:
2019         (WebCore::toJS): Use toJSArrayBufferView.
2020         * bindings/js/JSInt16ArrayCustom.cpp:
2021         (WebCore::toJS): Use toJSArrayBufferView.
2022         * bindings/js/JSInt32ArrayCustom.cpp:
2023         (WebCore::toJS): Use toJSArrayBufferView.
2024         * bindings/js/JSInt8ArrayCustom.cpp:
2025         (WebCore::toJS): Use toJSArrayBufferView.
2026         * bindings/js/JSUint16ArrayCustom.cpp:
2027         (WebCore::toJS): Use toJSArrayBufferView.
2028         * bindings/js/JSUint32ArrayCustom.cpp:
2029         (WebCore::toJS): Use toJSArrayBufferView.
2030         * bindings/js/JSUint8ArrayCustom.cpp:
2031         (WebCore::toJS): Use toJSArrayBufferView.
2032
2033         * html/HTMLCanvasElement.cpp:
2034         (WebCore::HTMLCanvasElement::createImageBuffer): Call heap.reportExtraMemoryCost()
2035         with the size of the canvas backing store.
2036         
2037         * html/canvas/TypedArrayBase.h:
2038         (WebCore::TypedArrayBase::byteLength): byteLength needs to
2039         be public.
2040         
2041         * platform/graphics/ImageBuffer.h: Add dataSize() method.
2042         
2043         * platform/graphics/cairo/ImageBufferCairo.cpp:
2044         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2045         * platform/graphics/cg/ImageBufferCG.cpp:
2046         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2047         * platform/graphics/haiku/ImageBufferHaiku.cpp:
2048         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2049         * platform/graphics/qt/ImageBufferQt.cpp:
2050         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2051         * platform/graphics/skia/ImageBufferSkia.cpp:
2052         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2053         * platform/graphics/wince/ImageBufferWinCE.cpp:
2054         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2055         * platform/graphics/wx/ImageBufferWx.cpp:
2056         (WebCore::ImageBuffer::dataSize): Implement dataSize().
2057
2058 2011-01-21  Adam Roben  <aroben@apple.com>
2059
2060         Rename WKCACFLayerRenderer[Client] to CACFLayerTreeHost[Client]
2061
2062         Also renamed a few functions and data members to match.
2063
2064         Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
2065
2066         Reviewed by Simon Fraser.
2067
2068         * WebCore.vcproj/WebCore.vcproj: Updated files' names and paths.
2069
2070         * WebCore.vcproj/WebCoreQuartzCore.vsprops: Added platform/graphics/ca/win to the include
2071         path.
2072
2073         * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from platform/graphics/ca/win, too.
2074
2075         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp.
2076         * platform/graphics/ca/win/CACFLayerTreeHost.h: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.h.
2077
2078         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2079         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2080         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
2081         Updated for renames.
2082
2083 2011-01-21  Patrick Gansterer  <paroga@paroga.com>
2084
2085         Original patch from François Sausset  <sausset@gmail.com>
2086
2087         Reviewed by Darin Adler.
2088
2089         Code cleaning in rendering/mathml/RenderMathMLFraction.cpp
2090         https://bugs.webkit.org/show_bug.cgi?id=52201
2091
2092         Replace unneeded doubles by floats and remove unneeded casts.
2093
2094         * rendering/mathml/RenderMathMLFraction.cpp:
2095         (WebCore::RenderMathMLFraction::paint):
2096         * rendering/mathml/RenderMathMLFraction.h:
2097
2098 2011-01-21  Dimitri Glazkov  <dglazkov@chromium.org>
2099
2100         Reviewed by Darin Adler.
2101
2102         REGRESSION(r73618): Clicking on a search input causes a crash.
2103         https://bugs.webkit.org/show_bug.cgi?id=52905
2104
2105         The problem is caused by TextControlInnerElement being used both as
2106         shadow root and an element in a shadow subtree. The code assumed it is
2107         only used as a shadow root.
2108
2109         Since this code is all just workaround for in-progress conversion to
2110         new shadow DOM, I am just adding a check. This code will disappear
2111         completely once bug 52788 is fixed.
2112
2113         Test: fast/dom/search-shadow-host-crash.html
2114
2115         * dom/Node.cpp:
2116         (WebCore::Node::setShadowHost): Added an ASSERT for early detection
2117             of attempting to stomp on the parentNode.
2118         * rendering/TextControlInnerElements.cpp:
2119         (WebCore::TextControlInnerElement::detach): Added a check to only
2120             clear shadow host if we have one.
2121
2122 2011-01-21  Adam Roben  <aroben@apple.com>
2123
2124         Replace some "sync compositing state" terminology with "flush pending GraphicsLayer changes"
2125
2126         This seems to be the direction in which our code is moving. I chose "GraphicsLayer" as
2127         opposed to just "layer" because there are cases where we flush changes to CACFLayers that
2128         don't have a corresponding GraphicsLayer.
2129
2130         Fixes <http://webkit.org/b/52894> "Sync compositing state" terminology in
2131         WKCACFLayerRenderer and friends is confusing
2132
2133         Reviewed by Simon Fraser.
2134
2135         * platform/graphics/win/WKCACFLayerRenderer.cpp:
2136         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
2137         (WebCore::WKCACFLayerRenderer::render):
2138         Updated for renames.
2139
2140         (WebCore::WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon): Renamed from
2141         syncCompositingStateSoon, and updated for other renames.
2142
2143         * platform/graphics/win/WKCACFLayerRenderer.h: Renamed m_syncLayerChanges to
2144         * m_shouldFlushPendingGraphicsLayerChanges.
2145         (WebCore::WKCACFLayerRendererClient::flushPendingGraphicsLayerChanges): Renamed from
2146         syncCompositingState.
2147
2148 2011-01-21  Adam Roben  <aroben@apple.com>
2149
2150         Clean up PlatformCAAnimationWin
2151
2152         Fixes <http://webkit.org/b/52904> PlatformCAAnimationWin is leaky and inefficient
2153
2154         Reviewed by Simon Fraser.
2155
2156         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2157         (toCACFFillModeType):
2158         (fromCACFFillModeType):
2159         (toCACFValueFunctionType):
2160         (fromCACFValueFunctionType):
2161         Changed to take and return CFStringRefs. There's no need to convert to WebCore::String just
2162         so we can later convert back to CFStringRef.
2163
2164         (toCACFTimingFunction): Fixed leaks by changing this to return a RetainPtr and adopting the
2165         results of CACFTimingFunctionCreate.
2166         (PlatformCAAnimation::PlatformCAAnimation): Changed not to needlessly roundtrip through
2167         WebCore::String. Also changed an ASSERT(0) to ASSERT_NOT_REACHED().
2168
2169         (PlatformCAAnimation::setFillMode):
2170         (PlatformCAAnimation::setTimingFunction):
2171         (PlatformCAAnimation::setValueFunction):
2172         (PlatformCAAnimation::setTimingFunctions):
2173         Updated for changes to the above conversion functions.
2174
2175 2011-01-21  Charlie Reis  <creis@chromium.org>
2176
2177         Reviewed by Darin Fisher.
2178
2179         FrameLoader::checkLoadCompleteForThisFrame uses wrong history item
2180         https://bugs.webkit.org/show_bug.cgi?id=48812
2181
2182         Most calls to stopAllLoaders now clear the history's provisional item(s).
2183         We can now avoid resetting the back/forward state if a new navigation
2184         is in progress.
2185
2186         Test: http/tests/navigation/back-twice-without-commit.html
2187         Test: http/tests/navigation/forward-and-cancel.html
2188
2189         * loader/FrameLoader.cpp:
2190         * loader/FrameLoader.h:
2191         * loader/FrameLoaderTypes.h:
2192         * WebCore.exp.in: Update stopAllLoaders signature.
2193
2194 2011-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2195
2196         Reviewed by Martin Robinson.
2197
2198         [GTK] Show caps lock indicator in password fields
2199         https://bugs.webkit.org/show_bug.cgi?id=52878
2200
2201         Test: manual-tests/password-caps-lock.html
2202
2203         * platform/gtk/KeyEventGtk.cpp:
2204         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Implement
2205         currentCapsLockState() using GDK API.
2206         * platform/gtk/RenderThemeGtk.cpp:
2207         (WebCore::RenderThemeGtk::paintCapsLockIndicator): Paint an icon
2208         in the password field when the caps lock modifier is locked.
2209         * platform/gtk/RenderThemeGtk.h:
2210
2211 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
2212
2213         Reviewed by Pavel Feldman.
2214
2215         Web Inspector: move sticky breakpoints management from InspectorController to InspectorBrowserDebuggerAgent.
2216         https://bugs.webkit.org/show_bug.cgi?id=52874
2217
2218         This is the first step of debugger api refactoring (see bug 52879).
2219         JavaScript breakpoints are still in the same list as native breakpoints and are restored by InspectorBrowserDebuggerAgent.
2220         The second step will be to move sticky JavaScript breakpoints to InspectorDebuggerAgent.
2221
2222         * inspector/Inspector.idl:
2223         * inspector/InspectorBrowserDebuggerAgent.cpp:
2224         (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints):
2225         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
2226         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
2227         (WebCore::InspectorBrowserDebuggerAgent::discardBindings):
2228         (WebCore::InspectorBrowserDebuggerAgent::didInsertDOMNode):
2229         (WebCore::InspectorBrowserDebuggerAgent::didRemoveDOMNode):
2230         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
2231         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
2232         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
2233         (WebCore::InspectorBrowserDebuggerAgent::hasBreakpoint):
2234         (WebCore::InspectorBrowserDebuggerAgent::updateSubtreeBreakpoints):
2235         * inspector/InspectorBrowserDebuggerAgent.h:
2236         * inspector/InspectorController.cpp:
2237         (WebCore::InspectorController::restoreInspectorStateFromCookie):
2238         (WebCore::InspectorController::connectFrontend):
2239         (WebCore::InspectorController::didCommitLoad):
2240         (WebCore::InspectorController::enableDebugger):
2241         (WebCore::InspectorController::resume):
2242         (WebCore::InspectorController::inspectedURL):
2243         * inspector/InspectorController.h:
2244         * inspector/InspectorState.cpp:
2245         (WebCore::InspectorState::InspectorState):
2246         * inspector/InspectorState.h:
2247         * inspector/front-end/BreakpointManager.js:
2248         (WebInspector.BreakpointManager):
2249         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
2250
2251 2011-01-21  John Knottenbelt  <jknotten@chromium.org>
2252
2253         Reviewed by Jeremy Orlow.
2254
2255         Turn off uninitialized errors for ARM linux build.
2256         https://bugs.webkit.org/show_bug.cgi?id=52893
2257
2258         Fix ARM compiler breakage.
2259
2260         * WebCore.gyp/WebCore.gyp:
2261
2262 2011-01-21  Mikhail Naganov  <mnaganov@chromium.org>
2263
2264         Reviewed by Yury Semikhatsky.
2265
2266         Web Inspector: [Chromium] REGRESSION: Using the "Back" button
2267         while profiling causes renderer crash.
2268
2269         https://bugs.webkit.org/show_bug.cgi?id=52808
2270
2271         * inspector/InspectorProfilerAgent.cpp:
2272         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
2273         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
2274
2275 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
2276
2277         Reviewed by Pavel Feldman.
2278
2279         Web Inspector: switch page/Console implementation from InspectorController to InspectorInstrumentation.
2280
2281         There are some places in WebCore where we still using direct InspectorController calls.
2282         The idea is to pass all the Inspector related calls via InspectorInstrumentaion which is the
2283         Inspector facade for WebCore.
2284
2285         https://bugs.webkit.org/show_bug.cgi?id=52869
2286
2287         * inspector/InspectorController.cpp:
2288         * inspector/InspectorController.h:
2289         * inspector/InspectorInstrumentation.cpp:
2290         (WebCore::InspectorInstrumentation::addProfileImpl):
2291         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
2292         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
2293         * inspector/InspectorInstrumentation.h:
2294         (WebCore::InspectorInstrumentation::addProfile):
2295         (WebCore::InspectorInstrumentation::profilerEnabled):
2296         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
2297         * page/Console.cpp:
2298         (WebCore::Console::profile):
2299         (WebCore::Console::profileEnd):
2300
2301 2011-01-12  Pavel Podivilov  <podivilov@chromium.org>
2302
2303         Reviewed by Pavel Feldman.
2304
2305         Web Inspector: breakpoints are restored incorrectly when reverting live edit.
2306         https://bugs.webkit.org/show_bug.cgi?id=52300
2307
2308         Fix breakpoints restoring when reverting to old revision by using text diff.
2309         Move live edit logic from ScriptsPanel to DebuggerModel.
2310         Eliminate unnecessary editLine delegate in TextViewer.
2311
2312         * inspector/front-end/DebuggerModel.js:
2313         (WebInspector.DebuggerModel):
2314         (WebInspector.DebuggerModel.prototype.reset):
2315         (WebInspector.DebuggerModel.prototype.editScriptSource):
2316         (WebInspector.DebuggerModel.prototype._updateScriptSource):
2317         (WebInspector.DebuggerModel.prototype.get callFrames):
2318         (WebInspector.DebuggerModel.prototype.pausedScript):
2319         (WebInspector.DebuggerModel.prototype.resumedScript):
2320         * inspector/front-end/Script.js:
2321         (WebInspector.Script.prototype.get source):
2322         * inspector/front-end/ScriptView.js:
2323         (WebInspector.ScriptView):
2324         * inspector/front-end/ScriptsPanel.js:
2325         (WebInspector.ScriptsPanel):
2326         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
2327         * inspector/front-end/SourceFrame.js:
2328         (WebInspector.SourceFrame):
2329         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
2330         (WebInspector.SourceFrame.prototype._doubleClick.didEditLine):
2331         (WebInspector.SourceFrame.prototype._doubleClick):
2332         * inspector/front-end/SourceView.js:
2333         (WebInspector.SourceView):
2334         * inspector/front-end/TextViewer.js:
2335         (WebInspector.TextViewer):
2336         (WebInspector.TextViewer.prototype._handleKeyDown):
2337         (WebInspector.TextViewer.prototype.editLine.finishEditing):
2338         (WebInspector.TextViewer.prototype.editLine):
2339         (WebInspector.TextChunk.prototype._createRow):
2340
2341 2011-01-21  Adam Klein  <adamk@chromium.org>
2342
2343         Reviewed by Eric Seidel.
2344
2345         [chromium] Rename ChromiumBridge to PlatformBridge
2346         https://bugs.webkit.org/show_bug.cgi?id=52471
2347
2348         No tests added as this is a rename; no change in behavior.
2349
2350         * WebCore.gypi:
2351         * bindings/v8/V8DOMWindowShell.cpp:
2352         (WebCore::reportFatalErrorInV8):
2353         * page/PageGroup.cpp:
2354         (WebCore::PageGroup::isLinkVisited):
2355         * platform/android/PlatformBridge.h:
2356         * platform/audio/chromium/AudioBusChromium.cpp:
2357         (WebCore::createBusFromInMemoryAudioFile):
2358         * platform/chromium/ChromiumBridge.h: Removed.
2359         * platform/chromium/ChromiumDataObjectLegacy.cpp:
2360         (WebCore::ChromiumDataObjectLegacy::getData):
2361         * platform/chromium/DragDataChromium.cpp:
2362         (WebCore::DragData::asURL):
2363         * platform/chromium/FileSystemChromium.cpp:
2364         (WebCore::deleteFile):
2365         (WebCore::deleteEmptyDirectory):
2366         (WebCore::getFileSize):
2367         (WebCore::getFileModificationTime):
2368         (WebCore::revealFolderInOS):
2369         (WebCore::directoryName):
2370         (WebCore::pathByAppendingComponent):
2371         (WebCore::makeAllDirectories):
2372         (WebCore::fileExists):
2373         (WebCore::openFile):
2374         (WebCore::closeFile):
2375         (WebCore::seekFile):
2376         (WebCore::truncateFile):
2377         (WebCore::readFromFile):
2378         (WebCore::writeToFile):
2379         * platform/chromium/LanguageChromium.cpp:
2380         (WebCore::platformDefaultLanguage):
2381         * platform/chromium/LinkHashChromium.cpp:
2382         (WebCore::visitedLinkHash):
2383         * platform/chromium/MIMETypeRegistryChromium.cpp:
2384         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2385         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2386         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2387         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
2388         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2389         * platform/chromium/PasteboardChromium.cpp:
2390         (WebCore::Pasteboard::writeSelection):
2391         (WebCore::Pasteboard::writePlainText):
2392         (WebCore::Pasteboard::writeURL):
2393         (WebCore::Pasteboard::writeImage):
2394         (WebCore::Pasteboard::canSmartReplace):
2395         (WebCore::Pasteboard::plainText):
2396         (WebCore::Pasteboard::documentFragment):
2397         * platform/chromium/PlatformBridge.h:
2398         * platform/chromium/PlatformScreenChromium.cpp:
2399         (WebCore::screenDepth):
2400         (WebCore::screenDepthPerComponent):
2401         (WebCore::screenIsMonochrome):
2402         (WebCore::screenRect):
2403         (WebCore::screenAvailableRect):
2404         * platform/chromium/ReadableDataObject.cpp:
2405         (WebCore::ReadableDataObject::getData):
2406         (WebCore::ReadableDataObject::urlTitle):
2407         (WebCore::ReadableDataObject::htmlBaseUrl):
2408         (WebCore::ReadableDataObject::filenames):
2409         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
2410         * platform/chromium/SSLKeyGeneratorChromium.cpp:
2411         (WebCore::signedPublicKeyAndChallengeString):
2412         * platform/chromium/ScrollbarThemeChromium.cpp:
2413         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2414         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
2415         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
2416         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
2417         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
2418         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
2419         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
2420         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2421         (WebCore::scrollbarStateToThemeState):
2422         (WebCore::ScrollbarThemeChromiumMac::paint):
2423         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2424         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
2425         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2426         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2427         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
2428         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
2429         * platform/chromium/SharedTimerChromium.cpp:
2430         (WebCore::setSharedTimerFiredFunction):
2431         (WebCore::setSharedTimerFireTime):
2432         (WebCore::stopSharedTimer):
2433         * platform/chromium/SuddenTerminationChromium.cpp:
2434         (WebCore::disableSuddenTermination):
2435         (WebCore::enableSuddenTermination):
2436         * platform/chromium/SystemTimeChromium.cpp:
2437         (WebCore::currentTime):
2438         * platform/chromium/WritableDataObject.cpp:
2439         (WebCore::WritableDataObject::setData):
2440         * platform/graphics/chromium/CrossProcessFontLoading.mm:
2441         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2442         (WebCore::fontContainsCharacter):
2443         (WebCore::FillLogFont):
2444         * platform/graphics/chromium/FontCacheLinux.cpp:
2445         (WebCore::FontCache::getFontDataForCharacters):
2446         * platform/graphics/chromium/FontChromiumWin.cpp:
2447         (WebCore::Font::drawGlyphs):
2448         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2449         (WebCore::FontPlatformData::scriptFontProperties):
2450         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2451         (WebCore::FontPlatformData::querySystemForRenderStyle):
2452         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
2453         (WebCore::fillBMPGlyphs):
2454         * platform/graphics/chromium/ImageChromium.cpp:
2455         (WebCore::Image::loadPlatformResource):
2456         * platform/graphics/chromium/ImageChromiumMac.mm:
2457         (WebCore::Image::loadPlatformResource):
2458         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
2459         (WebCore::SimpleFontData::platformInit):
2460         (WebCore::SimpleFontData::determinePitch):
2461         (WebCore::SimpleFontData::platformWidthForGlyph):
2462         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
2463         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
2464         * platform/graphics/skia/FontCustomPlatformData.cpp:
2465         (WebCore::FontCustomPlatformData::fontPlatformData):
2466         * platform/network/chromium/CookieJarChromium.cpp:
2467         (WebCore::setCookies):
2468         (WebCore::cookies):
2469         (WebCore::cookieRequestHeaderFieldValue):
2470         (WebCore::cookiesEnabled):
2471         (WebCore::getRawCookies):
2472         (WebCore::deleteCookie):
2473         * platform/network/chromium/DNSChromium.cpp:
2474         (WebCore::prefetchDNS):
2475         * platform/qt/PlatformBridge.h:
2476         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
2477         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
2478         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
2479         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
2480         (chromiumOpen):
2481         (chromiumDelete):
2482         (chromiumAccess):
2483         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
2484         * plugins/chromium/PluginDataChromium.cpp:
2485         (WebCore::PluginCache::plugins):
2486         * rendering/RenderThemeChromiumMac.mm:
2487         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
2488         * rendering/RenderThemeChromiumSkia.cpp:
2489         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
2490         * rendering/RenderThemeChromiumWin.cpp:
2491         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
2492         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
2493         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
2494         (WebCore::RenderThemeChromiumWin::systemColor):
2495         (WebCore::RenderThemeChromiumWin::paintButton):
2496         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2497         (WebCore::menuListButtonWidth):
2498         (WebCore::RenderThemeChromiumWin::paintMenuList):
2499         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2500         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2501         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2502         * storage/chromium/IDBFactoryBackendInterface.cpp:
2503         (WebCore::IDBFactoryBackendInterface::create):
2504         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
2505         * storage/chromium/IDBKeyPathBackendImpl.cpp:
2506         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
2507
2508 2011-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2509
2510         Unreviewed, rolling out r76335.
2511         http://trac.webkit.org/changeset/76335
2512         https://bugs.webkit.org/show_bug.cgi?id=52875
2513
2514         profiler tests were broken (Requested by loislo on #webkit).
2515
2516         * inspector/InspectorController.cpp:
2517         (WebCore::InspectorController::addProfile):
2518         (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
2519         * inspector/InspectorController.h:
2520         * inspector/InspectorInstrumentation.cpp:
2521         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
2522         * inspector/InspectorInstrumentation.h:
2523         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
2524         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForPage):
2525         * page/Console.cpp:
2526         (WebCore::Console::profile):
2527         (WebCore::Console::profileEnd):
2528
2529 2011-01-21  Ilya Tikhonovsky  <loislo@chromium.org>
2530
2531         Reviewed by Yury Semikhatsky.
2532
2533         Web Inspector: switch page/Console implementation from InspectorController to InspectorInstrumentation.
2534
2535         There are some places in WebCore where we still using direct InspectorController calls.
2536         The idea is to pass all the Inspector related calls via InspectorInstrumentaion which is the
2537         Inspector facade for WebCore.
2538
2539         https://bugs.webkit.org/show_bug.cgi?id=52869
2540
2541         * inspector/InspectorController.cpp:
2542         * inspector/InspectorController.h:
2543         * inspector/InspectorInstrumentation.cpp:
2544         (WebCore::InspectorInstrumentation::addProfileImpl):
2545         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
2546         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
2547         * inspector/InspectorInstrumentation.h:
2548         (WebCore::InspectorInstrumentation::addProfile):
2549         (WebCore::InspectorInstrumentation::profilerEnabled):
2550         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
2551         * page/Console.cpp:
2552         (WebCore::Console::profile):
2553         (WebCore::Console::profileEnd):
2554
2555 2011-01-20  Sam Weinig  <sam@webkit.org>
2556
2557         Reviewed by Gavin Barraclough.
2558
2559         Fix failing tests from r76291.
2560
2561         * platform/ScrollView.cpp:
2562         (WebCore::ScrollView::scrollPosition):
2563         (WebCore::ScrollView::updateScrollbars):
2564         Take the scroll origin into account in more places.
2565
2566 2011-01-20  Kent Tamura  <tkent@chromium.org>
2567
2568         Unreviewed, sorting an Xcode project file.
2569
2570         * WebCore.xcodeproj/project.pbxproj:
2571
2572 2011-01-20  Ben Vanik  <ben.vanik@gmail.com>
2573
2574         Reviewed by Kenneth Russell.
2575
2576         Implementation of the OES_standard_derivatives WebGL extension.
2577         https://bugs.webkit.org/show_bug.cgi?id=51678
2578
2579         Changes are modeled off of the existing OESTextureFloat extension. New files,
2580         extension retrieval, etc all match the existing code.
2581
2582         Changed ANGLEWebKitBridge to allow for multiple sets of the ANGLE shader compiler
2583         options. This supports the enabling of the standard derivatives flag when the
2584         extension is enabled. Refactored the cleanup code to make the destruction of the
2585         compilers (if they had been created) cleaner.
2586
2587         Tested with the WebGL conformance test:
2588         https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/oes-standard-derivatives.html
2589         Passes on WebKit/OSX, Chromium/OSX, and Chromium/Windows.
2590
2591         * CMakeLists.txt:
2592         * DerivedSources.make:
2593         * GNUmakefile.am:
2594         * WebCore.gypi:
2595         * WebCore.pri:
2596         * WebCore.pro:
2597         * WebCore.xcodeproj/project.pbxproj:
2598         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2599         (WebCore::toJS):
2600         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2601         (WebCore::toV8Object):
2602         * html/canvas/OESStandardDerivatives.cpp: Added.
2603         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
2604         (WebCore::OESStandardDerivatives::~OESStandardDerivatives):
2605         (WebCore::OESStandardDerivatives::getName):
2606         (WebCore::OESStandardDerivatives::create):
2607         * html/canvas/OESStandardDerivatives.h: Added.
2608         * html/canvas/OESStandardDerivatives.idl: Added.
2609         * html/canvas/WebGLExtension.h:
2610         * html/canvas/WebGLRenderingContext.cpp:
2611         (WebCore::WebGLRenderingContext::getExtension): Enable and return the new extension.
2612         (WebCore::WebGLRenderingContext::getParameter): Support extension enum when enabled.
2613         (WebCore::WebGLRenderingContext::getSupportedExtensions): 
2614         (WebCore::WebGLRenderingContext::hint): Validate extension enum when enabled.
2615         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
2616         (WebCore::WebGLRenderingContext::getExtensionNumber):
2617         * html/canvas/WebGLRenderingContext.h:
2618         * platform/graphics/ANGLEWebKitBridge.cpp:
2619         (WebCore::ANGLEWebKitBridge::~ANGLEWebKitBridge): Cleaned up compiler cleanup.
2620         (WebCore::ANGLEWebKitBridge::cleanupCompilers): Destruct compilers.
2621         (WebCore::ANGLEWebKitBridge::setResources): Cleanup existing compilers when changing
2622         ANGLE settings.
2623         (WebCore::ANGLEWebKitBridge::validateShaderSource): Cleaned up compiler cleanup on error.
2624         * platform/graphics/ANGLEWebKitBridge.h:
2625         (WebCore::ANGLEWebKitBridge::getResources):
2626         * platform/graphics/Extensions3D.h: Added enumeration for the extension.
2627         * platform/graphics/GraphicsContext3D.h: lumbing for GraphicsContext3D.
2628         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2629         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Plumbed through a pointer to the
2630         GraphicsContext3D to handle resetting the shader compilers.
2631         (WebCore::Extensions3DOpenGL::supports): Desktop GL always supports this extension,
2632         so always return true.
2633         (WebCore::Extensions3DOpenGL::ensureEnabled): Reset shader compilers as required.
2634         * platform/graphics/opengl/Extensions3DOpenGL.h: Plumbing for GraphicsContext3D.
2635         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2636         (WebCore::GraphicsContext3D::getExtensions): Plumbing for GraphicsContext3D to
2637         Extensions3DOpenGL.
2638
2639 2011-01-20  Xiaomei Ji  <xji@chromium.org>
2640
2641         Reviewed by Dan Bernstein.
2642
2643         Fix regression(r71566): PDF in RTL block might messes up text directionality.
2644         https://bugs.webkit.org/show_bug.cgi?id=52776
2645
2646         Test: fast/dom/52776.html
2647
2648         * platform/text/BidiResolver.h:
2649         (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
2650         (WebCore::::lowerExplicitEmbeddingLevel):
2651         (WebCore::::raiseExplicitEmbeddingLevel):
2652         (WebCore::::createBidiRunsForLine):
2653
2654 2011-01-20  Beth Dakin  <bdakin@apple.com>
2655
2656         Reviewed by Anders Carlsson.
2657
2658         Follow-on for <rdar://problem/8890255>
2659
2660         This fixes a painting error with ScrollbarPainter scrollers
2661         and the new drawing area code path.
2662         * platform/mac/ScrollbarThemeMac.mm:
2663         (WebCore::updateArrowPlacement):
2664
2665 2011-01-20  Levi Weintraub  <leviw@chromium.org>
2666
2667         Unreviewed.
2668
2669         Fixing build breakage.
2670
2671         * editing/SelectionController.cpp:
2672         (WebCore::SelectionController::willBeModified):
2673
2674 2011-01-20  Levi Weintraub  <leviw@chromium.org>
2675
2676         Reviewed by Ryosuke Niwa.
2677
2678         RTL: Caret goes to the opposite direction when pressing an arrow key after selection is made
2679         https://bugs.webkit.org/show_bug.cgi?id=49511
2680
2681         Test: editing/selection/rtl-move-selection-right-left.html
2682
2683         * editing/SelectionController.cpp:
2684         (WebCore::SelectionController::willBeModified):
2685         Respecting the direction of the containing block when switching selection base and extent in
2686         RTL content.
2687
2688         (WebCore::SelectionController::modifyMovingRight):
2689         (WebCore::SelectionController::modifyMovingLeft):
2690         Using directionOfEnclosingBlock when deciding to use the selection start or end to do the
2691         correct thing for RTL.
2692
2693 2011-01-20  Nate Chapin  <japhet@chromium.org>
2694
2695         Reviewed by Adam Barth.
2696
2697         Null-check m_frame in DOMWindow::setLocation(), since it's
2698         possible to reach this point without it having been checked
2699         already.
2700         https://bugs.webkit.org/show_bug.cgi?id=52769
2701
2702         Test: fast/dom/Window/Location/set-location-after-close.html
2703
2704         * page/DOMWindow.cpp:
2705         (WebCore::DOMWindow::setLocation):
2706
2707 2011-01-20  Chang Shu  <chang.shu@nokia.com>
2708
2709         Reviewed by Darin Adler.
2710
2711         setContentEditable with invalid string should throw exception.
2712         https://bugs.webkit.org/show_bug.cgi?id=52057
2713
2714         Implemented exception throwing for setContentEditable according to the following spec:
2715         http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#attr-contenteditable
2716         Related quotas: "On setting, if the new value is an ASCII case-insensitive match for the 
2717         string 'inherit' then the content attribute must be removed, if the new value is an ASCII 
2718         case-insensitive match for the string 'true' then the content attribute must be set to the 
2719         string 'true', if the new value is an ASCII case-insensitive match for the string 'false' 
2720         then the content attribute must be set to the string 'false', and otherwise the attribute 
2721         setter must raise a SYNTAX_ERR exception."
2722
2723         * html/HTMLElement.cpp:
2724         (WebCore::HTMLElement::setContentEditable): Throw exception on invalid input strings; Make setting values case-insensitive and also convert them to lower cases according to the spec.
2725         * html/HTMLElement.h: Add additional parameter ExceptionCode& for function setContentEditable.
2726         * html/HTMLElement.idl: Add exception throwing support for contentEditable setter.
2727
2728 2011-01-19  Adrienne Walker  <enne@google.com>
2729
2730         Reviewed by James Robinson.
2731
2732         [chromium] Composited render surfaces should allow writes to alpha channel.
2733         https://bugs.webkit.org/show_bug.cgi?id=52766
2734
2735         Test: LayoutTests/platform/chromium/compositing
2736
2737         * platform/graphics/chromium/LayerRendererChromium.cpp:
2738         (WebCore::LayerRendererChromium::drawLayers):
2739
2740 2011-01-14  Jer Noble  <jer.noble@apple.com>
2741
2742         Reviewed by Eric Carlson.
2743
2744         REGRESSION (r71842): Compass video is not playing in Safari welcome page
2745         https://bugs.webkit.org/show_bug.cgi?id=52506
2746
2747         New test: LayoutTests/media/video-currentTime-delay.html
2748
2749         Call invalidateCachedTime() every time one of the cached property dependencies changes,
2750         i.e. m_paused and m_playbackRate.
2751
2752         * html/HTMLMediaElement.cpp:
2753         (WebCore::HTMLMediaElement::prepareForLoad):
2754         (WebCore::HTMLMediaElement::setReadyState):
2755         (WebCore::HTMLMediaElement::setPlaybackRate):
2756         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
2757
2758 2011-01-20  Beth Dakin  <bdakin@apple.com>
2759
2760         Reviewed by Geoffrey Garen.
2761
2762         Fix for <rdar://problem/8890255>
2763
2764         Allow WebKitSystemInterface to draw scrollbars 
2765         when appropriate.
2766         * WebCore.exp.in:
2767         * platform/mac/ScrollbarThemeMac.mm:
2768         (WebCore::scrollbarMap):
2769         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
2770         (WebCore::ScrollbarThemeMac::registerScrollbar):
2771         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
2772         (WebCore::ScrollbarThemeMac::paint):
2773         * platform/mac/WebCoreSystemInterface.h:
2774         * platform/mac/WebCoreSystemInterface.mm:
2775
2776 2011-01-20  Sam Weinig  <sam@webkit.org>
2777
2778         Reviewed by Dave Hyatt.
2779
2780         Cleanup Scrollbar/ScrollbarClient relationship
2781         https://bugs.webkit.org/show_bug.cgi?id=52779
2782
2783         Pipe all scrolling through the ScrollbarClient/ScrollAnimator
2784         rather than through the Scrollbar. The Scrollbar now is just
2785         a "view" on the scroll position of the scrollable area it is
2786         attached to.
2787
2788         There are now two ways to scroll a scrollable area:
2789         - ScrollbarClient::scroll()
2790         - ScrollbarClient::scrollToOffsetWithoutAnimation()
2791
2792         Both of these go through the ScrollAnimator (updating its state
2793         or starting an animation). The ScrollAnimator, in turn, now calls
2794         ScrollbarClient::setScrollOffsetFromAnimation, which tells the
2795         Scrollbars to pull a new offset (via Scrollbar::offsetDidChange)
2796         and tells the class that derives from ScrollbarClient to scroll
2797         its contents (via ScrollbarClient::setScrollOffset).
2798
2799         * WebCore.xcodeproj/project.pbxproj:
2800         Move Scrollbar.cpp to the right place.
2801
2802         * accessibility/AccessibilityScrollbar.cpp:
2803         (WebCore::AccessibilityScrollbar::setValue):
2804         Initiate the scroll through the scrollbar client, rather than the
2805         scrollbar itself.
2806
2807         * page/FrameView.cpp:
2808         (WebCore::FrameView::scrollTo):
2809         * page/FrameView.h:
2810         Condense the two valueChanged overrides to a single override of the
2811         scrollTo function.
2812
2813         * platform/ScrollAnimator.cpp:
2814         (WebCore::ScrollAnimator::scroll):
2815         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
2816         (WebCore::ScrollAnimator::currentPosition):
2817         (WebCore::ScrollAnimator::notityPositionChanged):
2818         * platform/ScrollAnimator.h:
2819         * platform/ScrollAnimatorWin.cpp:
2820         (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
2821         (WebCore::ScrollAnimatorWin::animateScroll):
2822         * platform/ScrollAnimatorWin.h:
2823         * platform/mac/ScrollAnimatorMac.h:
2824         * platform/mac/ScrollAnimatorMac.mm:
2825         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
2826         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
2827         Change setScrollPositionAndStopAnimation to scrollToOffsetWithoutAnimation
2828         and bottleneck all client notification of changed position through a new
2829         notityPositionChanged() function.
2830
2831         * platform/ScrollView.cpp:
2832         (WebCore::ScrollView::setScrollOffset):
2833         (WebCore::ScrollView::scrollTo):
2834         (WebCore::ScrollView::scrollPosition):
2835         (WebCore::ScrollView::scroll):
2836         (WebCore::ScrollView::updateScrollbars):
2837         (WebCore::ScrollView::wheelEvent):
2838         * platform/ScrollView.h:
2839         (WebCore::ScrollView::horizontalScrollbar):
2840         (WebCore::ScrollView::verticalScrollbar):
2841         Update to scroll via the ScrollbarClient rather than the Scrollbar.
2842
2843         * platform/Scrollbar.cpp:
2844         (WebCore::Scrollbar::offsetDidChange):
2845         (WebCore::Scrollbar::autoscrollPressedPart):
2846         (WebCore::Scrollbar::moveThumb):
2847         (WebCore::Scrollbar::mouseMoved):
2848         * platform/Scrollbar.h:
2849         (WebCore::Scrollbar::setPressedPos):
2850         Change the scrollbar to only updates its offset in response to
2851         an offsetDidChange call.
2852
2853         * platform/ScrollbarClient.cpp:
2854         (WebCore::ScrollbarClient::scroll):
2855         (WebCore::ScrollbarClient::scrollToOffsetWithoutAnimation):
2856         (WebCore::ScrollbarClient::scrollToXOffsetWithoutAnimation):
2857         (WebCore::ScrollbarClient::scrollToYOffsetWithoutAnimation):
2858         (WebCore::ScrollbarClient::setScrollOffsetFromAnimation):
2859         * platform/ScrollbarClient.h:
2860         (WebCore::ScrollbarClient::horizontalScrollbar):
2861         (WebCore::ScrollbarClient::verticalScrollbar):
2862         Make the increasingly misnamed ScrollbarClient responsible for
2863         scrolling.
2864
2865         * platform/efl/ScrollbarEfl.cpp:
2866         (scrollbarEflEdjeMessage):
2867         * platform/gtk/MainFrameScrollbarGtk.cpp:
2868         (MainFrameScrollbarGtk::gtkValueChanged):
2869         * platform/qt/ScrollbarQt.cpp:
2870         (WebCore::Scrollbar::contextMenu):
2871         Update to move scrolling through the client.
2872
2873         * platform/win/PopupMenuWin.cpp:
2874         (WebCore::PopupMenuWin::scrollToRevealSelection):
2875         (WebCore::PopupMenuWin::scrollPosition):
2876         (WebCore::PopupMenuWin::setScrollOffset):
2877         (WebCore::PopupMenuWin::scrollTo):
2878         (WebCore::PopupMenuWin::wndProc):
2879         * platform/win/PopupMenuWin.h:
2880         (WebCore::PopupMenuWin::verticalScrollbar):
2881         * rendering/RenderLayer.cpp:
2882         (WebCore::RenderLayer::scrollToOffset):
2883         (WebCore::RenderLayer::scrollTo):
2884         (WebCore::RenderLayer::setScrollOffset):
2885         (WebCore::RenderLayer::scrollPosition):
2886         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2887         (WebCore::RenderLayer::scroll):
2888         * rendering/RenderLayer.h:
2889         * rendering/RenderListBox.cpp:
2890         (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
2891         (WebCore::RenderListBox::scroll):
2892         (WebCore::RenderListBox::logicalScroll):
2893         (WebCore::RenderListBox::scrollPosition):
2894         (WebCore::RenderListBox::setScrollOffset):
2895         (WebCore::RenderListBox::scrollTo):
2896         (WebCore::RenderListBox::setScrollTop):
2897         * rendering/RenderListBox.h:
2898         (WebCore::RenderListBox::verticalScrollbar):
2899         Update to scroll via the ScrollbarClient rather than the Scrollbar.
2900
2901         * rendering/RenderMarquee.cpp:
2902         (WebCore::RenderMarquee::start):
2903         Simplify initial paint to just do an immediate scroll to the position.
2904
2905 2011-01-20  Patrick Gansterer  <paroga@webkit.org>
2906
2907         Unreviewed WinCE build fix for r76170.
2908
2909         * platform/graphics/wince/FontWinCE.cpp: Added a missing include.
2910         * platform/graphics/wince/ImageBufferData.h: Added a missing include and fixed style.
2911
2912 2011-01-20  James Robinson  <jamesr@chromium.org>
2913
2914         Reviewed by Darin Fisher.
2915
2916         Implement mozilla's requestAnimationFrame API
2917         https://bugs.webkit.org/show_bug.cgi?id=51218
2918
2919         This implements mozilla's proposed requestAnimationFrame API.  The idea with this API is that
2920         an author driving an animation from script could use window.requestAnimationFrame(callback)
2921         instead of window.setTimeout(callback, 0) to schedule their update logic and let the browser
2922         decide when to update the animations.  This avoids doing unnecessary work when the page content
2923         is offscreen or is being displayed at a different framerate than what the page author expects.
2924
2925         Mozilla's proposal is here: https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame
2926         This implements window.mozRequestAnimationFrame as window.webkitRequestAnimationFrame with the
2927         following changes:
2928         *) Only the callback syntax is supported, there is no before paint event
2929         *) webkitRequestAnimationFrame supports a second parameter Element to let the author indicate
2930             what content they intend to animate.  That way if the page is being displayed but the element
2931             in question is offscreen, we can avoid invoking the callback.
2932         *) No timestamp is provided to the caller and there is no window.animationStartTime property
2933             (see https://bugs.webkit.org/show_bug.cgi?id=51952 for discussion of this property)
2934         *) window.webkitRequestAnimationFrame returns a numerical id that can be used to cancel the callback
2935             using window.cancelWebkitRequestAnimationFrame, to parallel window.setTimeout()/window.clearTime().
2936
2937         The implementation depends on the embedder scheduling the callbacks since the callback invocation
2938         depends on the page's visibility and the embedder's paint scheduling, neither of which are exposed
2939         to WebCore.  The expectation for the embedder is that at some point Chrome::scheduleAnimation() is
2940         called FrameView::serviceScriptedAnimations() should be called for the associated Page's main frame.
2941         Ideally serviceScriptedAnimations() would be called prior to rendering - although in practice the
2942         embedder has to rate limit callbacks and may not be able to tie the callback directly to the
2943         rendering loop.
2944
2945         Tests: fast/animation/request-animation-frame-cancel.html
2946                fast/animation/request-animation-frame-cancel2.html
2947                fast/animation/request-animation-frame-display.html
2948                fast/animation/request-animation-frame-within-callback.html
2949                fast/animation/request-animation-frame.html
2950
2951         * WebCore.gypi:
2952         * dom/Document.cpp:
2953         (WebCore::Document::Document):
2954         (WebCore::Document::webkitRequestAnimationFrame):
2955         (WebCore::Document::webkitCancelRequestAnimationFrame):
2956         (WebCore::Document::serviceScriptedAnimations):
2957         * dom/Document.h:
2958         * dom/RequestAnimationFrameCallback.h: Added.
2959         (WebCore::RequestAnimationFrameCallback::~RequestAnimationFrameCallback):
2960         * dom/RequestAnimationFrameCallback.idl: Added.
2961         * loader/EmptyClients.h:
2962         (WebCore::EmptyChromeClient::scheduleAnimation):
2963         * page/Chrome.cpp:
2964         (WebCore::Chrome::scheduleAnimation):
2965         * page/Chrome.h:
2966         * page/ChromeClient.h:
2967         * page/DOMWindow.cpp:
2968         (WebCore::DOMWindow::webkitRequestAnimationFrame):
2969         (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
2970         * page/DOMWindow.h:
2971         * page/DOMWindow.idl:
2972         * page/FrameView.cpp:
2973         (WebCore::FrameView::scheduleAnimation):
2974         (WebCore::FrameView::serviceScriptedAnimations):
2975         * page/FrameView.h:
2976         * platform/HostWindow.h:
2977
2978 2011-01-20  James Robinson  <jamesr@chromium.org>
2979
2980         Reviewed by Nate Chapin.
2981
2982         [v8] CodeGeneratorV8 generates incorrect code for callbacks with no parameters
2983         https://bugs.webkit.org/show_bug.cgi?id=52837
2984
2985         When generating code to invoke a callback with no parameters CodeGeneratorV8.pm was generating the following:
2986         v8::Handle<v8::Value> argv[] = {}; which does not compile in visual studio.  Instead, if the argument count
2987         is 0, we can just pass a NULL pointer for the argv parameter.
2988
2989         Test added to bindings/scripts/test/TestCallback.idl and covered by run-bindings-tests.  This
2990         patch also includes some spurious changes to the bindings tests golden files (mostly GObject)
2991         because the old golden files were out of date.
2992
2993         * bindings/scripts/CodeGeneratorV8.pm:
2994         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
2995         (WebDOMTestCallback::callbackWithNoParam):
2996         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
2997         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2998         (webkit_dom_test_callback_callback_with_no_param):
2999         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
3000         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
3001         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
3002         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3003         * bindings/scripts/test/JS/JSTestCallback.cpp:
3004         (WebCore::JSTestCallback::callbackWithNoParam):
3005         * bindings/scripts/test/JS/JSTestCallback.h:
3006         * bindings/scripts/test/JS/JSTestInterface.cpp:
3007         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3008         * bindings/scripts/test/JS/JSTestObj.cpp:
3009         * bindings/scripts/test/ObjC/DOMTestCallback.h:
3010         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
3011         (-[DOMTestCallback callbackWithNoParam]):
3012         * bindings/scripts/test/TestCallback.idl:
3013         * bindings/scripts/test/V8/V8TestCallback.cpp:
3014         (WebCore::V8TestCallback::callbackWithNoParam):
3015         * bindings/scripts/test/V8/V8TestCallback.h:
3016         * bindings/scripts/test/V8/V8TestObj.cpp:
3017         (WebCore::TestObjInternal::reflectedUnsignedIntegralAttrAttrGetter):
3018
3019 2011-01-20  James Robinson  <jamesr@chromium.org>
3020
3021         Reviewed by Eric "Baller" Seidel.
3022
3023         RenderTableSection's setNeedsCellRecalc needs to null check table()
3024         https://bugs.webkit.org/show_bug.cgi?id=52770
3025
3026         Null checks table() before deferencing it in RenderTableSection::setNeedsCellRecalc.
3027         This can be null during detach().  Test constructed by Eric Seidel.
3028
3029         Test: fast/css-generated-content/table-with-scrollbar-corner.html
3030
3031         * rendering/RenderTableSection.cpp:
3032         (WebCore::RenderTableSection::setNeedsCellRecalc):
3033         * rendering/RenderTableSection.h:
3034
3035 2011-01-20  Dirk Schulze  <krit@webkit.org>
3036
3037         Reviewed by Rob Buis.
3038
3039         SVG Pattern doesn't take preserveAspectRatio of references Pattern
3040         https://bugs.webkit.org/show_bug.cgi?id=52802
3041
3042         SVGPattern didn't take preserveAspectRatio of a referenced SVGPattern into account. Store preserveAspectRatio
3043         in PatternAttributes as well, if the attribute was set on the referenced SVGPattern element.
3044
3045         Test: svg/custom/pattern-referencing-preserve-aspect-ratio.svg
3046
3047         * rendering/svg/RenderSVGResourcePattern.cpp:
3048         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
3049         * svg/PatternAttributes.h:
3050         (WebCore::PatternAttributes::PatternAttributes):
3051         (WebCore::PatternAttributes::preserveAspectRatio):
3052         (WebCore::PatternAttributes::setPreserveAspectRatio):
3053         (WebCore::PatternAttributes::hasPreserveAspectRatio):
3054         * svg/SVGPatternElement.cpp:
3055         (WebCore::SVGPatternElement::collectPatternAttributes):
3056
3057 2011-01-20  Dan Bernstein  <mitz@apple.com>
3058
3059         Reviewed by Adele Peterson.
3060
3061         <rdar://problem/8765498> REGRESSION (r72141): Cannot order prints with Aperture 3.1
3062
3063         <rdar://problem/8884648> REGRESSION (r72141): Safari hangs when visiting a page on www.bfmtv.com
3064         https://bugs.webkit.org/show_bug.cgi?id=52765
3065
3066         <rdar://problem/8890909> REGRESSION (r72141): Very Slow Rendering With Certain Markup
3067         https://bugs.webkit.org/show_bug.cgi?id=52265
3068
3069         Test: fast/block/line-layout/negative-max-height.html
3070
3071         Integer overflow detection led to a block having a huge height. This manifested as broken layout
3072         in the first bug and as extreme slowness in the latter bugs because of
3073         https://bugs.webkit.org/show_bug.cgi?id=52832
3074
3075         * rendering/RootInlineBox.cpp:
3076         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Clamp maxHeight to 0 so the next line
3077         cannot start above this line. The negative maxHeight also caused the integer overflow detection
3078         logic to give the block a huge height.
3079
3080 2011-01-20  Yi Shen  <yi.4.shen@nokia.com>
3081
3082         Reviewed by Eric Carlson.
3083
3084         Clean up the Media Controls CSS for Qt
3085         https://bugs.webkit.org/show_bug.cgi?id=52822
3086
3087         Split the audio::-webkit-media-xxx and video::-webkit-media-xxx rules 
3088         in mediaControlsQt.css, and remove the duplicate audio::-webkit-media-xxx
3089         rules from mediaControlsQtFullscreen.css.
3090
3091         * css/mediaControlsQt.css:
3092         (audio::-webkit-media-controls-panel):
3093         (video::-webkit-media-controls-panel):
3094         (audio::-webkit-media-controls-mute-button):
3095         (video::-webkit-media-controls-mute-button):
3096         (audio::-webkit-media-controls-play-button):
3097         (video::-webkit-media-controls-play-button):
3098         (audio::-webkit-media-controls-timeline-container):
3099         (video::-webkit-media-controls-timeline-container):
3100         (audio::-webkit-media-controls-current-time-display):
3101         (video::-webkit-media-controls-current-time-display):
3102         (audio::-webkit-media-controls-time-remaining-display):
3103         (video::-webkit-media-controls-time-remaining-display):
3104         (audio::-webkit-media-controls-timeline):
3105         (video::-webkit-media-controls-timeline):
3106         (audio::-webkit-media-controls-volume-slider-container):
3107         (video::-webkit-media-controls-volume-slider-container):
3108         (audio::-webkit-media-controls-volume-slider):
3109         (video::-webkit-media-controls-volume-slider):
3110         (audio::-webkit-media-controls-seek-back-button):
3111         (video::-webkit-media-controls-seek-back-button):
3112         (audio::-webkit-media-controls-seek-forward-button):
3113         (video::-webkit-media-controls-seek-forward-button):
3114         (audio::-webkit-media-controls-fullscreen-button):
3115         (video::-webkit-media-controls-fullscreen-button):
3116         (audio::-webkit-media-controls-rewind-button):
3117         (video::-webkit-media-controls-rewind-button):
3118         (audio::-webkit-media-controls-return-to-realtime-button):
3119         (video::-webkit-media-controls-return-to-realtime-button):
3120         (audio::-webkit-media-controls-toggle-closed-captions-button):
3121         (video::-webkit-media-controls-toggle-closed-captions-button):
3122         * css/mediaControlsQtFullscreen.css:
3123         (video::-webkit-media-controls-time-remaining-display):
3124         (video::-webkit-media-controls-seek-back-button):
3125         (video::-webkit-media-controls-seek-forward-button):
3126         (video::-webkit-media-controls-rewind-button):
3127         (video::-webkit-media-controls-return-to-realtime-button):
3128         (video::-webkit-media-controls-toggle-closed-captions-button):
3129
3130 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
3131
3132         Reviewed by Pavel Feldman.
3133
3134         Web Inspector: [REGRESSION] Canceling of CSS numeric values increment/decrement is broken
3135         https://bugs.webkit.org/show_bug.cgi?id=52816
3136
3137         * inspector/front-end/StylesSidebarPane.js:
3138         (WebInspector.StylePropertyTreeElement.prototype):
3139
3140 2011-01-20  Dawit Alemayehu  <adawit@kde.org>
3141
3142         Reviewed by Andreas Kling.
3143
3144         [Qt] Fix Layering violation in MediaPlayerPrivateQt.
3145         https://bugs.webkit.org/show_bug.cgi?id=52733
3146
3147         No new tests. no behavioral change.
3148
3149        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3150         (WebCore::MediaPlayerPrivateQt::commitLoad):
3151
3152 2011-01-20  Nate Chapin  <japhet@chromium.org>
3153
3154         Reviewed by Darin Fisher.
3155
3156         [V8] Call malloc and memcpy directly instead of
3157         of strdup in convertV8ObjectToNPVariant() when
3158         converting strings. If there is a null character
3159         in the string, our use of strdup causes us to allocate
3160         too little memory, leading to out of bounds reads.
3161
3162         https://bugs.webkit.org/show_bug.cgi?id=52631
3163
3164         * bindings/v8/V8NPUtils.cpp:
3165         (WebCore::convertV8ObjectToNPVariant):
3166
3167 2011-01-20  Andreas Kling  <kling@webkit.org>
3168
3169         Reviewed by Ariya Hidayat.
3170
3171         [Qt] Fill shadow scratch buffer with proper transparent pixels
3172
3173         QImage::fill() has no Qt::GlobalColor overload in Qt 4.7 (coming in 4.8)
3174         so doing QImage::fill(Qt::transparent) will actually fill all pixels with
3175         the RGBA value 0x00000013.
3176
3177         * platform/graphics/qt/ContextShadowQt.cpp:
3178         (WebCore::ShadowBuffer::scratchImage):
3179
3180 2011-01-19  Adam Roben  <aroben@apple.com>
3181
3182         Remove WKCACFContextFlusher
3183
3184         It wasn't doing anything.
3185
3186         Fixes <http://webkit.org/b/52752> WKCACFContextFlusher is unused
3187
3188         Reviewed by Simon Fraser.
3189
3190         * WebCore.vcproj/WebCore.vcproj: Removed WKCACFContextFlusher. Also let VS have its way with
3191         the file.
3192
3193         * platform/graphics/win/WKCACFContextFlusher.cpp: Removed.
3194         * platform/graphics/win/WKCACFContextFlusher.h: Removed.
3195
3196         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3197         (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
3198         (WebCore::WKCACFLayerRenderer::layerTreeDidChange):
3199         Stop telling WKCACFContextFlusher about our context, since it never did anything with it.
3200
3201 2011-01-19  Adam Roben  <aroben@apple.com>
3202
3203         Only flush our own context when we get resized
3204
3205         Fixes <http://webkit.org/b/52751> All WKCACFContexts with uncommitted
3206         changes get flushed whenever any composited page is resized
3207
3208         Reviewed by Simon Fraser.
3209
3210         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3211         (WebCore::WKCACFLayerRenderer::resize): Just flush our own context, not all contexts
3212         WKCACFContextFlusher knows about. After all, ours is the only one that just got resized!
3213
3214 2011-01-19  Adam Roben  <aroben@apple.com>
3215
3216         Make WKCACFLayerRenderer ref-counted
3217
3218         This will be needed to handle cases where the client might release its reference to us while
3219         we're calling out to it.
3220
3221         WKCACFLayerRenderer now has a setClient function, which is used rather than passing the
3222         client to create(). This allows clients to null out the client pointer when they're done
3223         with the renderer.
3224
3225         Fixes <http://webkit.org/b/52749> WKCACFLayerRenderer should be
3226         ref-counted
3227
3228         Reviewed by Simon Fraser.
3229
3230         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
3231         (WebCore::MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow):
3232         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
3233         Updated for WKCACFLayerRenderer changes.
3234
3235         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3236         (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable): Updated for changes to
3237         create().
3238         (WebCore::WKCACFLayerRenderer::create): No longer takes a WKCACFLayerRendererClient. Now
3239         returns a PassOwnPtr.
3240         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): No longer takes a
3241         WKCACFLayerRendererClient.
3242
3243         * platform/graphics/win/WKCACFLayerRenderer.h: Made WKCACFLayerRenderer inherit from
3244         RefCounted.
3245         (WebCore::WKCACFLayerRenderer::setClient): Added this simple setter.
3246
3247 2011-01-20  Csaba Osztrogonác  <ossy@webkit.org>
3248
3249         [Qt][V8] Unreviewed buildfix after r76248.
3250
3251         * bindings/v8/ScriptCachedFrameData.h: Add missing include.
3252
3253 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
3254
3255         Reviewed by Yury Semikhatsky.
3256
3257         Web Inspector: enable resource agent upon request.
3258         https://bugs.webkit.org/show_bug.cgi?id=52815
3259
3260         We should not send network-related notifications unless front-end
3261         is interested.
3262
3263         * inspector/Inspector.idl:
3264         * inspector/InspectorController.cpp:
3265         (WebCore::InspectorController::restoreInspectorStateFromCookie):
3266         (WebCore::InspectorController::connectFrontend):
3267         (WebCore::InspectorController::resourceAgent):
3268         * inspector/InspectorController.h:
3269         (WebCore::InspectorController::consoleAgent):
3270         (WebCore::InspectorController::cssAgent):
3271         (WebCore::InspectorController::domAgent):
3272         (WebCore::InspectorController::injectedScriptAgent):
3273         (WebCore::InspectorController::runtimeAgent):
3274         (WebCore::InspectorController::databaseAgent):
3275         (WebCore::InspectorController::domStorageAgent):
3276         (WebCore::InspectorController::fileSystemAgent):
3277         * inspector/InspectorInstrumentation.cpp:
3278         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
3279         * inspector/InspectorResourceAgent.cpp:
3280         (WebCore::InspectorResourceAgent::restore):
3281         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
3282         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
3283         * inspector/InspectorResourceAgent.h:
3284         (WebCore::InspectorResourceAgent::create):
3285         * inspector/InspectorState.cpp:
3286         (WebCore::InspectorState::InspectorState):
3287         * inspector/InspectorState.h:
3288
3289 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
3290
3291         Reviewed by Csaba Osztrogonác.
3292
3293         Refactoring of the custom allocation framework
3294         https://bugs.webkit.org/show_bug.cgi?id=49897
3295
3296         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
3297         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
3298         equivalent macro implementation at the necessary places.
3299
3300 2011-01-20  Mikhail Naganov  <mnaganov@chromium.org>
3301
3302         Reviewed by Pavel Feldman.
3303
3304         Web Inspector: [Chromium] CPU Profiles are cleared when navigating back and forth.
3305
3306         Profiles are now not cleared unless renderer instance was changed.
3307
3308         https://bugs.webkit.org/show_bug.cgi?id=52807
3309
3310         * inspector/InspectorController.cpp:
3311         (WebCore::InspectorController::restoreProfiler):
3312         * inspector/InspectorProfilerAgent.cpp:
3313         (WebCore::InspectorProfilerAgent::resetState):
3314         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
3315         * inspector/InspectorProfilerAgent.h:
3316
3317 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
3318
3319         Unreviewed, add new JS file refs missing from r76116.
3320
3321         * WebCore.gypi:
3322         * WebCore.vcproj/WebCore.vcproj:
3323         * inspector/front-end/WebKit.qrc:
3324
3325 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
3326
3327         Reviewed by Pavel Feldman.
3328
3329         Web Inspector: Crash when adding a rule for an ImageDocument
3330         https://bugs.webkit.org/show_bug.cgi?id=52811
3331
3332         * inspector/InspectorCSSAgent.cpp:
3333         (WebCore::InspectorCSSAgent::addRule2):
3334         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3335
3336 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
3337
3338         Reviewed by Pavel Feldman.
3339
3340         Web Inspector: cleanup InspectorController's friends list.
3341         We have a plan to extract InspectorAgent from InspectorController.
3342         InspectorAgent will be accessible only from InspectorController.
3343         As result we can simply made some methods public and remove long
3344         friends list.
3345
3346         https://bugs.webkit.org/show_bug.cgi?id=52806
3347
3348         * inspector/InjectedScriptHost.cpp:
3349         (WebCore::InjectedScriptHost::databaseForId):
3350         (WebCore::InjectedScriptHost::selectDatabase):
3351         (WebCore::InjectedScriptHost::selectDOMStorage):
3352         (WebCore::InjectedScriptHost::inspectorDOMAgent):
3353         (WebCore::InjectedScriptHost::frontend):
3354         * inspector/InspectorBrowserDebuggerAgent.cpp:
3355         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
3356         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
3357         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
3358         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
3359         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
3360         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
3361         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
3362         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
3363         * inspector/InspectorController.h:
3364         (WebCore::InspectorController::frontend):
3365         * inspector/InspectorInstrumentation.cpp:
3366         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
3367         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
3368         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
3369         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
3370         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
3371         (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
3372         (WebCore::InspectorInstrumentation::characterDataModifiedImpl):
3373         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
3374         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
3375         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
3376         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
3377         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
3378         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
3379         (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
3380         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
3381         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
3382
3383 2011-01-19  Pavel Podivilov  <podivilov@chromium.org>
3384
3385         Reviewed by Yury Semikhatsky.
3386
3387         Web Inspector: implement JavaScriptBreakpointsSidebarPane based on events from debugger model.
3388         https://bugs.webkit.org/show_bug.cgi?id=52723
3389
3390         Extract all breakpoints-related presentation code from debugger model to JavaScriptBreakpointSidebarPane.
3391
3392         * inspector/front-end/Breakpoint.js:
3393         (WebInspector.Breakpoint):
3394         (WebInspector.Breakpoint.prototype.get data):
3395         (WebInspector.Breakpoint.prototype.remove):
3396         * inspector/front-end/BreakpointsSidebarPane.js:
3397         (WebInspector.JavaScriptBreakpointsSidebarPane):
3398         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):
3399         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointRemoved):
3400         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointEnableChanged):
3401         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointItemCheckboxClicked):
3402         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenuEventFired):
3403         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerPaused):
3404         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerResumed):
3405         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._addListElement):
3406         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._removeListElement):
3407         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._projectChanged):
3408         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compare):
3409         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
3410         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement.didGetSourceLine):
3411         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement):
3412         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointIdForDebuggerPausedEvent):
3413         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setBreakpointEnabled):
3414         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._removeBreakpoint):
3415         (WebInspector.NativeBreakpointsSidebarPane):
3416         (WebInspector.XHRBreakpointsSidebarPane.prototype.addBreakpointItem):
3417         * inspector/front-end/DebuggerModel.js:
3418         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
3419         (WebInspector.DebuggerModel.prototype.breakpointForId):
3420         (WebInspector.DebuggerModel.prototype._pausedScript):
3421         (WebInspector.DebuggerModel.prototype._resumedScript):
3422         * inspector/front-end/ScriptsPanel.js:
3423         (WebInspector.ScriptsPanel):
3424         * inspector/front-end/inspector.js:
3425
3426 2011-01-20  Dirk Schulze  <krit@webkit.org>
3427
3428         Reviewed by Andreas Kling.
3429
3430         SVG Pattern doesn't take the viewBox of a referenced Pattern
3431         https://bugs.webkit.org/show_bug.cgi?id=52804
3432         
3433         SVGPattern element didn't use the viewBox of another SVGPattern element, referenced
3434         by xlink:href. Modified PatternAttributes, to take the value of the viewBox of the
3435         SVGPattern element as well, if the attribute was set.
3436         This gets checked by a W3C SVG test case.        
3437
3438         Test: svg/W3C-SVG-1.1-SE/pservers-pattern-04-f.svg
3439
3440         * rendering/svg/RenderSVGResourcePattern.cpp:
3441         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
3442         * svg/PatternAttributes.h:
3443         (WebCore::PatternAttributes::PatternAttributes):
3444         (WebCore::PatternAttributes::viewBox):
3445         (WebCore::PatternAttributes::setViewBox):
3446         (WebCore::PatternAttributes::hasViewBox):
3447         * svg/SVGPatternElement.cpp:
3448         (WebCore::SVGPatternElement::collectPatternAttributes):
3449
3450 2011-01-19  Stephen White  <senorblanco@chromium.org>
3451
3452         [Re-land of r76159 with a compile fix for the Chromium linux shlib
3453         build.]
3454
3455         Reviewed by James Robinson.
3456
3457         Implement accelerated path drawing and clipping for the Canvas2D GPU
3458         path.
3459         https://bugs.webkit.org/show_bug.cgi?id=52627
3460         
3461         This is done with a simple curve interpolator and the GLU tesselator,
3462         which is good enough for a 3-5X speedup on
3463         http://ie.microsoft.com/testdrive/Performance/Galactic/Default.html.
3464
3465         Covered by canvas/philip/2d.path.clip.basic.html, and many, many more.
3466         All tests canvas/philip and fast/canvas paths pass with no
3467         regressions, although two have minor pixel differences which require
3468         rebaselining.
3469
3470         * WebCore.gyp/WebCore.gyp:
3471         Add internal_glu include path to chromium build.
3472         * WebCore.gypi:
3473         Add internal_glu files to chromium build.
3474         * html/canvas/CanvasRenderingContext2D.cpp:
3475         (WebCore::CanvasRenderingContext2D::reset):
3476         (WebCore::CanvasRenderingContext2D::platformLayer):
3477         Make CanvasRenderingContext2D more robust against failure to create
3478         a DrawingBuffer.
3479         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3480         (WebCore::DrawingBuffer::DrawingBuffer):
3481         As in DrawingBufferMac.cpp, call reset() from the constructor.
3482         Also initialize size to (-1, -1), so reset() doesn't early-out.
3483         Add initializers for depthBuffer and stencilBuffer, and remove
3484         multisampleDepthStencilBuffer.
3485         * platform/graphics/chromium/GLES2Canvas.cpp:
3486         Remove some unused #includes.
3487         (WebCore::GLES2Canvas::State::State):
3488         Add clipping state, and implement save/restore via the copy constructor.
3489         (WebCore::operator*):
3490         (WebCore::Quadratic::Quadratic):
3491         (WebCore::Quadratic::fromBezier):
3492         (WebCore::Quadratic::evaluate):
3493         Quadratic Bezier curve class.
3494         (WebCore::Cubic::Cubic):
3495         (WebCore::Cubic::fromBezier):
3496         (WebCore::Cubic::evaluate):
3497         Cubic Bezier curve class.
3498         (WebCore::GLES2Canvas::clearRect):
3499         Add clipping support to clearRect().
3500         (WebCore::GLES2Canvas::fillPath):
3501         Implement fillPath().
3502         (WebCore::GLES2Canvas::fillRect):
3503         Add clipping support to fillRect().
3504         (WebCore::GLES2Canvas::clipPath):
3505         Implement clipPath().
3506         (WebCore::GLES2Canvas::clipOut):
3507         Stub out clipOut() (not called by Canvas 2D).
3508         (WebCore::GLES2Canvas::restore):
3509         When restoring, draw any remaining clipping paths to the stencil buffer.
3510         (WebCore::GLES2Canvas::drawTexturedRect):
3511         Add clipping support.
3512         (WebCore::interpolateQuadratic):
3513         (WebCore::interpolateCubic):
3514         Simple curve interpolation, using the Cubic and Quadratic classes.
3515         (WebCore::PolygonData::PolygonData):
3516         A struct to hold the tesselation data for callbacks.
3517         (WebCore::beginData):
3518         (WebCore::edgeFlagData):
3519         (WebCore::vertexData):
3520         (WebCore::endData):
3521         (WebCore::combineData):
3522         internal_glu tesselation callbacks.
3523         (WebCore::GLES2Canvas::createVertexBufferFromPath):
3524         Build an interpolated, tesselated vertex buffer and e