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