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