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