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