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