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