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