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