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