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