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