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