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