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