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