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