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