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