2011-01-28 Martin Robinson <mrobinson@igalia.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-28  Martin Robinson  <mrobinson@igalia.com>
2
3         [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
4         https://bugs.webkit.org/show_bug.cgi?id=52889
5
6         Build fix for WebAudio. Include WebAudio source files on the source
7         list when WebAudio is enabled.
8
9         * GNUmakefile.am: Include missing source files.
10
11 2011-01-28  Sam Weinig  <sam@webkit.org>
12
13         Reviewed by Maciej Stachowiak.
14
15         Add basic rubber banding support
16         <rdar://problem/8219429>
17         https://bugs.webkit.org/show_bug.cgi?id=53277
18
19         * page/EventHandler.cpp:
20         (WebCore::EventHandler::handleGestureEvent):
21         Pass gesture events to the FrameView.
22
23         * platform/ScrollAnimator.cpp:
24         (WebCore::ScrollAnimator::handleGestureEvent):
25         * platform/ScrollAnimator.h:
26         Add stubbed out implementation.
27
28         * platform/ScrollView.cpp:
29         (WebCore::ScrollView::ScrollView):
30         (WebCore::ScrollView::overhangAmount):
31         (WebCore::ScrollView::wheelEvent):
32         * platform/ScrollView.h:
33         * platform/ScrollableArea.cpp:
34         (WebCore::ScrollableArea::ScrollableArea):
35         (WebCore::ScrollableArea::handleGestureEvent):
36         * platform/ScrollableArea.h:
37         (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
38         (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
39         Move constrains scrolling bit to ScrollableArea from ScrollView.
40
41         (WebCore::ScrollableArea::contentsSize):
42         (WebCore::ScrollableArea::overhangAmount):
43         Add additional virtual functions for information needed by the animator.
44
45         * platform/mac/ScrollAnimatorMac.h:
46         * platform/mac/ScrollAnimatorMac.mm:
47         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
48         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
49         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
50         (WebCore::elasticDeltaForTimeDelta):
51         (WebCore::elasticDeltaForReboundDelta):
52         (WebCore::reboundDeltaForElasticDelta):
53         (WebCore::scrollWheelMultiplier):
54         (WebCore::ScrollAnimatorMac::handleWheelEvent):
55         (WebCore::ScrollAnimatorMac::handleGestureEvent):
56         (WebCore::ScrollAnimatorMac::pinnedInDirection):
57         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
58         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
59         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
60         (WebCore::ScrollAnimatorMac::beginScrollGesture):
61         (WebCore::ScrollAnimatorMac::endScrollGesture):
62         (WebCore::ScrollAnimatorMac::snapRubberBand):
63         (WebCore::roundTowardZero):
64         (WebCore::roundToDevicePixelTowardZero):
65         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
66         Implement basic rubber banding.
67
68 2011-01-28  Dan Bernstein  <mitz@apple.com>
69
70         Reviewed by Anders Carlsson.
71
72         Changing unicode-bidi doesn’t force layout
73         https://bugs.webkit.org/show_bug.cgi?id=53311
74
75         Test: fast/dynamic/unicode-bidi.html
76
77         * rendering/style/RenderStyle.cpp:
78         (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
79
80 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
81
82         Reviewed by Kent Tamura.
83
84         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
85         https://bugs.webkit.org/show_bug.cgi?id=53122
86
87         This is the first step in converting HTMLMediaElement to the new shadow DOM.
88
89         Should not regress any existing tests. No observable change in behavior.
90
91         * css/CSSSelector.cpp:
92         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
93         (WebCore::nameToPseudoTypeMap): Ditto.
94         (WebCore::CSSSelector::extractPseudoType): Ditto.
95         * css/CSSSelector.h: Ditto.
96         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
97         * rendering/MediaControlElements.cpp:
98         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
99             which is now replaced with virtual shadowPseudoId on each corresponding class.
100         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
101         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
102             display type in constructor.
103         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
104             constructor argument.
105         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
106         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
107             to disambiguate from the MediaControlMuteButtonElement.
108         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
109         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
110         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
111             constructor argument.
112         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
113         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
114             constructor argument.
115         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
116         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
117         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
118         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
119         (WebCore::MediaControlSeekBackButtonElement::create): Added.
120         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
121         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
122         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
123         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
124             constructor argument.
125         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
126         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
127             constructor argument.
128         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
129         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
130             constructor argument.
131         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
132         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
133             constructor argument.
134         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
135         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
136             constructor argument.
137         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
138         * rendering/MediaControlElements.h:
139         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
140         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
141         * rendering/RenderMedia.cpp:
142         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
143         (WebCore::RenderMedia::createSeekBackButton): Ditto.
144         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
145         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
146         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
147
148 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
149
150         Reviewed by Eric Carlson.
151
152         Split MediaControls out of RenderMedia.
153         https://bugs.webkit.org/show_bug.cgi?id=53252
154
155         Near-mechanical moving of stuff, no change in behavior, thus no new tests.
156
157         * Android.mk: Added MediaControls to build system.
158         * CMakeLists.txt: Ditto.
159         * GNUmakefile.am: Ditto.
160         * WebCore.gypi: Ditto.
161         * WebCore.pro: Ditto.
162         * WebCore.vcproj/WebCore.vcproj: Ditto.
163         * WebCore.xcodeproj/project.pbxproj: Ditto.
164         * html/HTMLMediaElement.cpp:
165         (WebCore::HTMLMediaElement::defaultEventHandler): Changed to forward events to MediaControls.
166         * html/shadow/MediaControls.cpp: Copied all controls-related methods from
167             Source/WebCore/rendering/RenderMedia.cpp, pulled them into their own class called MediaControls. 
168         * html/shadow/MediaControls.h: Ditto from Source/WebCore/rendering/RenderMedia.h.
169         * rendering/MediaControlElements.cpp:
170         (WebCore::MediaControlTimelineElement::defaultEventHandler): Changed to use MediaControls.
171         * rendering/RenderMedia.cpp:
172         (WebCore::RenderMedia::RenderMedia): Moved relevant constructor initializers out to MediaControls.
173         (WebCore::RenderMedia::destroy): Changed to use MediaControls.
174         (WebCore::RenderMedia::styleDidChange): Ditto.
175         (WebCore::RenderMedia::layout): Ditto.
176         (WebCore::RenderMedia::updateFromElement): Ditto.
177         * rendering/RenderMedia.h: Updated defs accordingly and removed player() accessor, which
178             is only used by sub-class RenderVideo.
179         (WebCore::RenderMedia::controls): Added.
180         * rendering/RenderVideo.cpp:
181         (WebCore::RenderVideo::~RenderVideo): Changed to access MediaPlayer* directly from mediaElement().
182         (WebCore::RenderVideo::calculateIntrinsicSize): Ditto.
183         (WebCore::RenderVideo::paintReplaced): Ditto.
184         (WebCore::RenderVideo::updatePlayer): Ditto.
185         (WebCore::RenderVideo::supportsAcceleratedRendering): Ditto.
186         (WebCore::RenderVideo::acceleratedRenderingStateChanged): Ditto.
187
188 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
189
190         Reviewed by Yury Semikhatsky.
191
192         Web Inspector: allow remote debugging with front-end
193         served from the cloud.
194         https://bugs.webkit.org/show_bug.cgi?id=53303
195
196         * inspector/front-end/inspector.js:
197
198 2011-01-28  Aparna Nandyal  <aparna.nand@wipro.com>
199
200         Reviewed by Andreas Kling.
201
202         Setting value of m_PressedPos to make scrolling smooth
203
204         Page scroll popup menu "Scroll here" option not working when cliking above scroll slider/handler.
205         https://bugs.webkit.org/show_bug.cgi?id=51349
206
207         The value of m_PressedPos was getting set before moveThumb() call
208         in all other scenarios except when "Scroll Here" option is used.
209         Hence scrolling with this option was not as expected even in cases
210         where scrolling was happening. The thumb would move in unexpected
211         direction. m_PressedPos is now set to pressed position so delta is
212         calculated.
213         Unable to write a test case as the test needs to click on "Scroll
214         Here" option of context sensitive menu and QTest is unable to do it.
215         Besides no new functionality introduced.
216
217         * platform/qt/ScrollbarQt.cpp:
218         (WebCore::Scrollbar::contextMenu):
219
220 2011-01-28  Andrey Kosyakov  <caseq@chromium.org>
221
222         Reviewed by Pavel Feldman.
223
224         Web Inspector: [Extensions API] add JSON schema for extensions API
225         https://bugs.webkit.org/show_bug.cgi?id=53236
226
227         * inspector/front-end/ExtensionAPISchema.json: Added.
228
229 2011-01-27  Zhenyao Mo  <zmo@google.com>
230
231         Reviewed by Kenneth Russell.
232
233         Remove _LENGTH enumerants
234         https://bugs.webkit.org/show_bug.cgi?id=53259
235
236         * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
237         (WebCore::WebGLRenderingContext::getProgramParameter):
238         (WebCore::WebGLRenderingContext::getShaderParameter):
239         * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
240
241 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
242
243         Reviewed by Yury Semikhatsky.
244
245         Web Inspector: syntax highlight inline JS and CSS in HTML resources
246         https://bugs.webkit.org/show_bug.cgi?id=30831
247
248         * inspector/front-end/SourceHTMLTokenizer.js:
249         (WebInspector.SourceHTMLTokenizer):
250         (WebInspector.SourceHTMLTokenizer.prototype.set line):
251         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
252         * inspector/front-end/SourceHTMLTokenizer.re2js:
253
254 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
255
256         Reviewed by Yury Semikhatsky.
257
258         Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
259         https://bugs.webkit.org/show_bug.cgi?id=53295
260
261         Select the current word suffix before switching to the next suggestion.
262
263         * inspector/front-end/StylesSidebarPane.js:
264         ():
265
266 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
267
268         Reviewed by Xan Lopez.
269
270         [GTK] Fix dist compilation for the release
271         https://bugs.webkit.org/show_bug.cgi?id=53290
272
273         * GNUmakefile.am: Added inspector files to the extra dist.
274
275 2011-01-28  Ilya Sherman  <isherman@chromium.org>
276
277         Reviewed by Andreas Kling.
278
279         Const-correct HTMLSelectElement and WebSelectElement
280         https://bugs.webkit.org/show_bug.cgi?id=53293
281
282         * html/HTMLSelectElement.cpp:
283         (WebCore::HTMLSelectElement::value): const.
284         * html/HTMLSelectElement.h:
285
286 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
287
288         Unreviewed, rolling out r76893.
289         http://trac.webkit.org/changeset/76893
290         https://bugs.webkit.org/show_bug.cgi?id=53287
291
292         It made some tests crash on GTK and Qt debug bots (Requested
293         by Ossy on #webkit).
294
295         * bridge/runtime_root.cpp:
296         (JSC::Bindings::RootObject::invalidate):
297         (JSC::Bindings::RootObject::addRuntimeObject):
298         (JSC::Bindings::RootObject::removeRuntimeObject):
299         * bridge/runtime_root.h:
300
301 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
302
303         Reviewed by Laszlo Gombos.
304
305         Get rid of prefix header dependency for WebKit2 build system
306         https://bugs.webkit.org/show_bug.cgi?id=50174
307
308         Guard EmptyProtocalDefinitions.h to make sure it's not included twice.
309
310         * platform/mac/EmptyProtocolDefinitions.h:
311
312 2011-01-27  Abhishek Arya  <inferno@chromium.org>
313
314         Reviewed by Dan Bernstein.
315
316         Recalc table sections if needed before calculating the first line
317         box baseline.
318         https://bugs.webkit.org/show_bug.cgi?id=53265
319
320         When we try to calculate the baseline position of a table cell,
321         we recurse through all the child sibling boxes (when children are
322         non inline) and add their first linebox baseline values. If one of
323         the children is a table with pending section recalc, we will access
324         wrong table section values. We recalc table sections if it is needed.
325
326         Test: fast/table/recalc-section-first-body-crash-main.html
327
328         * rendering/RenderTable.cpp:
329         (WebCore::RenderTable::firstLineBoxBaseline):
330
331 2011-01-27  Adrienne Walker  <enne@google.com>
332
333         Reviewed by Kenneth Russell.
334
335         [chromium] Add CRASH calls to further debug tiled compositor memcpy crash.
336         https://bugs.webkit.org/show_bug.cgi?id=52379
337
338         Test: LayoutTests/compositing (to verify these weren't triggered)
339
340         * platform/graphics/chromium/LayerTilerChromium.cpp:
341         (WebCore::LayerTilerChromium::invalidateRect):
342         (WebCore::LayerTilerChromium::update):
343
344 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
345
346         Reviewed by Pavel Feldman.
347
348         Web Inspector: [STYLES] Cancelled suggestion of a property name results in a visual artifact
349         https://bugs.webkit.org/show_bug.cgi?id=53242
350
351         * inspector/front-end/StylesSidebarPane.js:
352         (WebInspector.StylePropertyTreeElement.prototype):
353
354 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
355
356         Unreviewed, rolling out r76891.
357         http://trac.webkit.org/changeset/76891
358         https://bugs.webkit.org/show_bug.cgi?id=53280
359
360         Makes every layout test crash (Requested by othermaciej on
361         #webkit).
362
363         * page/EventHandler.cpp:
364         * page/EventHandler.h:
365         * rendering/RenderObject.cpp:
366         (WebCore::RenderObject::styleDidChange):
367
368 2011-01-27  Ryosuke Niwa  <rniwa@webkit.org>
369
370         Unreviewed, rolling out r76839.
371         http://trac.webkit.org/changeset/76839
372         https://bugs.webkit.org/show_bug.cgi?id=49744
373
374         broke pixel tests
375
376         * rendering/RenderBox.cpp:
377         (WebCore::RenderBox::localCaretRect):
378
379 2011-01-27  Emil A Eklund  <eae@chromium.org>
380
381         Reviewed by Darin Adler.
382
383         contentEditable formatBlock crashes on divs with contenteditable="false"
384         https://bugs.webkit.org/show_bug.cgi?id=53263
385
386         Check if editableRootForPosition returns null for position.
387
388         Test: editing/execCommand/format-block-contenteditable-false.html
389
390         * editing/FormatBlockCommand.cpp:
391         (WebCore::FormatBlockCommand::formatRange):
392
393 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
394
395         Reviewed by Darin Adler.
396
397         Remove RenderMedia members that aren't used.
398         https://bugs.webkit.org/show_bug.cgi?id=53245
399
400         Refactoring, no change in behavior, so no new tests.
401
402         * rendering/RenderMedia.h: Removed unused member variables.
403
404 2011-01-27  Michael Saboff  <msaboff@apple.com>
405
406         Reviewed by Darin Adler.
407
408         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
409         https://bugs.webkit.org/show_bug.cgi?id=53271
410
411         Precautionary change.
412         Changed RootObject to use WeakGCMap instead of HashSet.
413         Found will looking for another issue, but can't produce a test case
414         that is problematic.  THerefore there aren't any new tests.
415
416         * bridge/runtime_root.cpp:
417         (JSC::Bindings::RootObject::invalidate):
418         (JSC::Bindings::RootObject::addRuntimeObject):
419         (JSC::Bindings::RootObject::removeRuntimeObject):
420         * bridge/runtime_root.h:
421
422 2011-01-27  Kenneth Russell  <kbr@google.com>
423
424         Reviewed by James Robinson.
425
426         Rename Typed Array slice() to subset()
427         https://bugs.webkit.org/show_bug.cgi?id=53273
428
429         * bindings/js/JSArrayBufferViewHelper.h:
430         (WebCore::constructArrayBufferView):
431         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
432         (WebCore::constructWebGLArray):
433         * html/canvas/Float32Array.cpp:
434         (WebCore::Float32Array::subset):
435         * html/canvas/Float32Array.h:
436         * html/canvas/Float32Array.idl:
437         * html/canvas/Int16Array.cpp:
438         (WebCore::Int16Array::subset):
439         * html/canvas/Int16Array.h:
440         * html/canvas/Int16Array.idl:
441         * html/canvas/Int32Array.cpp:
442         (WebCore::Int32Array::subset):
443         * html/canvas/Int32Array.h:
444         * html/canvas/Int32Array.idl:
445         * html/canvas/Int8Array.cpp:
446         (WebCore::Int8Array::subset):
447         * html/canvas/Int8Array.h:
448         * html/canvas/Int8Array.idl:
449         * html/canvas/TypedArrayBase.h:
450         (WebCore::TypedArrayBase::subsetImpl):
451         * html/canvas/Uint16Array.cpp:
452         (WebCore::Uint16Array::subset):
453         * html/canvas/Uint16Array.h:
454         * html/canvas/Uint16Array.idl:
455         * html/canvas/Uint32Array.cpp:
456         (WebCore::Uint32Array::subset):
457         * html/canvas/Uint32Array.h:
458         * html/canvas/Uint32Array.idl:
459         * html/canvas/Uint8Array.cpp:
460         (WebCore::Uint8Array::subset):
461         * html/canvas/Uint8Array.h:
462         * html/canvas/Uint8Array.idl:
463
464 2011-01-27  Darin Adler  <darin@apple.com>
465
466         Reviewed by Dan Bernstein.
467
468         Changing cursor style has no effect until the mouse moves
469         https://bugs.webkit.org/show_bug.cgi?id=14344
470         rdar://problem/7563712
471
472         No tests added because we don't have infrastructure for testing actual cursor
473         changes (as opposed to cursor style computation) at this time. We might add it later.
474
475         * page/EventHandler.cpp:
476         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
477         * page/EventHandler.h: Ditto.
478
479         * rendering/RenderObject.cpp:
480         (WebCore::areNonIdenticalCursorListsEqual): Added.
481         (WebCore::areCursorsEqual): Added.
482         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
483         cursor styles changed.
484
485 2011-01-27  Leo Yang  <leo.yang@torchmobile.com.cn>
486
487         Reviewed by Dirk Schulze.
488
489         SVG Use Cycle is not detected
490         https://bugs.webkit.org/show_bug.cgi?id=52544
491
492         We should check if SVGUseElement::buildInstanceTree finds problem
493         for every child node. If it finds problem for any children we must
494         return immediately because otherwise the foundProblem variable may
495         be rewritten to false.
496
497         Test: svg/custom/recursive-use2.svg
498
499         * svg/SVGUseElement.cpp:
500         (WebCore::SVGUseElement::buildInstanceTree):
501
502 2011-01-27  Zhenyao Mo  <zmo@google.com>
503
504         Reviewed by Kenneth Russell.
505
506         texSubImage2D's format/type needs to match the internalformat/type from the previous texImage2D call
507         https://bugs.webkit.org/show_bug.cgi?id=53054
508
509         Test: fast/canvas/webgl/tex-sub-image-2d-bad-args.html
510
511         * html/canvas/WebGLRenderingContext.cpp:
512         (WebCore::WebGLRenderingContext::texSubImage2DBase): Check format/type match.
513
514 2011-01-27  Yi Shen  <yi.4.shen@nokia.com>, Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
515
516         Reviewed by Andreas Kling.
517
518         [Qt] Add fullscreen media control button for html video
519         https://bugs.webkit.org/show_bug.cgi?id=51543
520
521         Implement media control fullscreen button for QtWebKit html5 video.
522
523         * css/mediaControlsQt.css:
524         (video::-webkit-media-controls-fullscreen-button):
525         * platform/qt/RenderThemeQt.cpp:
526         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
527
528 2011-01-27  Nate Chapin  <japhet@chromium.org>
529
530         Reviewed by Adam Barth.
531
532         Remove FrameLoader::url() and update callers to use
533         Document::url().
534         https://bugs.webkit.org/show_bug.cgi?id=41165
535
536         Refactor, no new tests.
537
538         * WebCore.exp.in:
539         * dom/Document.cpp:
540         (WebCore::Document::processHttpEquiv):
541         (WebCore::Document::removePendingSheet):
542         * history/CachedFrame.cpp:
543         (WebCore::CachedFrameBase::CachedFrameBase):
544         * history/PageCache.cpp:
545         (WebCore::logCanCacheFrameDecision):
546         (WebCore::PageCache::canCachePageContainingThisFrame):
547         * html/HTMLFrameElementBase.cpp:
548         (WebCore::HTMLFrameElementBase::isURLAllowed):
549         * html/HTMLPlugInImageElement.cpp:
550         (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
551         * inspector/InspectorAgent.cpp:
552         (WebCore::InspectorAgent::inspectedURL):
553         * inspector/InspectorResourceAgent.cpp:
554         (WebCore::buildObjectForFrame):
555         * loader/DocumentWriter.cpp:
556         (WebCore::DocumentWriter::replaceDocument):
557         (WebCore::DocumentWriter::deprecatedFrameEncoding):
558         * loader/FrameLoader.cpp:
559         * loader/FrameLoader.h:
560         * loader/HistoryController.cpp:
561         (WebCore::HistoryController::updateForStandardLoad):
562         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
563         (WebCore::HistoryController::updateForSameDocumentNavigation):
564         * loader/NavigationScheduler.cpp:
565         (WebCore::ScheduledHistoryNavigation::fire):
566         (WebCore::NavigationScheduler::scheduleLocationChange):
567         (WebCore::NavigationScheduler::scheduleRefresh):
568         * page/FrameView.cpp:
569         (WebCore::FrameView::updateControlTints):
570         * page/Location.cpp:
571         (WebCore::Location::url):
572         (WebCore::Location::setProtocol):
573         (WebCore::Location::setHost):
574         (WebCore::Location::setHostname):
575         (WebCore::Location::setPort):
576         (WebCore::Location::setPathname):
577         (WebCore::Location::setSearch):
578         (WebCore::Location::setHash):
579         (WebCore::Location::reload):
580         * page/Page.cpp:
581         (WebCore::Page::goToItem):
582
583 2011-01-27  Stephen White  <senorblanco@chromium.org>
584
585         Reviewed by Darin Adler.
586
587         Fix performance regression in ImageQualityController::objectDestroyed().
588         https://bugs.webkit.org/show_bug.cgi?id=52645
589
590         In r72282, I inadvertently introduced this regression by using a
591         linear search through the hash map on object destruction.  This was
592         because the hash key consisted of both object pointer and layer id,
593         but on object destruction we only know the object pointer, requiring
594         a search to find all the layers. 
595         By replacing the hash map with two nested hash maps, where the outer key
596         is the object and the inner key is the layer, we can find all the
597         relevant data for an object in one hash lookup.
598
599         * rendering/RenderBoxModelObject.cpp:
600         Replace the (object,layer)->size HashMap with object->layer and
601         layer->size HashMaps.
602         (WebCore::ImageQualityController::isEmpty):
603         Implement isEmpty() for the outer HashMap.
604         (WebCore::ImageQualityController::removeLayer):
605         When a layer is removed, remove it from the inner hash map.
606         (WebCore::ImageQualityController::set):
607         Implement set():  if the inner map exists, set the layer->size tuple
608         directly.  If not, create a new inner map, set the tuple, and insert
609         it in the outer map.
610         (WebCore::ImageQualityController::objectDestroyed):
611         Look up the object in the outer map only.
612         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
613         Cosmetic changes for the renamed now-outer hash map.
614         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
615         Do both outer and inner hash map lookups.  Call set() to add/update
616         entries to the hash maps.  keyDestroyed() is now removeLayer().
617         (WebCore::imageQualityController):
618         Make the ImageQualityController a file-static global, so it can be
619         created and destroyed on the fly.
620         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
621         If there is no ImageQualityController, don't call objectDestroyed().
622         If it's empty, delete it.
623         * rendering/RenderImage.cpp:
624         (WebCore::RenderImage::paintIntoRect):
625         Also pass the Image* as the (void*) layer, since 0 is not a valid
626         HashMap key.
627
628 2011-01-27  Adrienne Walker  <enne@google.com>
629
630         Reviewed by James Robinson.
631
632         [chromium] Tiled compositor crashes if compositing turned off mid-paint
633         https://bugs.webkit.org/show_bug.cgi?id=53198
634
635         * platform/graphics/chromium/LayerRendererChromium.cpp:
636         (WebCore::LayerRendererChromium::drawLayers):
637         * platform/graphics/chromium/LayerTilerChromium.cpp:
638         (WebCore::LayerTilerChromium::update):
639         (WebCore::LayerTilerChromium::draw):
640
641 2011-01-27  Carol Szabo <carol.szabo@nokia.com>
642
643         Reviewed by David Hyatt.
644
645         A corrupted counter tree is created when renderers are added to the
646         tree bypassing RenderObject::addChild
647         https://bugs.webkit.org/show_bug.cgi?id=51270
648
649         No new tests. This patch reimplements the fix for bugs 43812 and
650         51637 and hence all tests are already there as part of the original
651         fixes for those bugs.
652
653         * rendering/RenderCounter.cpp:
654         (WebCore::findPlaceForCounter):
655         Removed old workaround as this patch hopefully fixes the real
656         problem.
657         * rendering/RenderObject.cpp:
658         (WebCore::RenderObject::addChild):
659         Removed call to counter updater as it was moved to a lower level.
660         (WebCore::RenderObject::destroy):
661         Moved attached counter nodes destruction to after the node is
662         removed from the tree.
663         * rendering/RenderObjectChildList.cpp:
664         (WebCore::RenderObjectChildList::removeChildNode):
665         (WebCore::RenderObjectChildList::appendChildNode):
666         (WebCore::RenderObjectChildList::insertChildNode):
667         Added notifications to the Counter system such that the
668         CounterForest reflects the changes to the RendererTree.
669         * rendering/RenderWidget.cpp:
670         (WebCore::RenderWidget::destroy):
671         Applied the same changes as for RenderObject::destroy()
672         since RenderObject::destroy() is not called from here.
673
674 2011-01-27  Adam Roben  <aroben@apple.com>
675
676         Add WKCACFViewLayerTreeHost
677
678         This is a class that derives from CACFLayerTreeHost and uses a WKCACFView to render.
679
680         Fixes <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost should use
681         WKCACFView for rendering
682
683         * WebCore.vcproj/WebCore.vcproj: Added WKCACFViewLayerTreeHost.{cpp,h}.
684
685         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
686         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Make the test window have a
687         non-zero size. WKCACFView will always say it can't render if you pass it a 0-sized window,
688         so we need a non-empty window to perform a valid test.
689         (WebCore::CACFLayerTreeHost::create): First try to create a WKCACFViewLayerTreeHost, then
690         fall back to a LegacyCACFLayerTreeHost.
691         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to react to the
692         context flush from here...
693         (WebCore::CACFLayerTreeHost::contextDidChange): ...to here. Derived classes are required to
694         call this function whenever changes are flushed to the context.
695
696         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added contextDidChange.
697
698         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
699         (WebCore::LegacyCACFLayerTreeHost::createRenderer):
700         (WebCore::LegacyCACFLayerTreeHost::resize):
701         Changed to use flushContext instead of flushing the context manually so that we will always
702         notify the base class when the context gets flushed.
703
704         (WebCore::LegacyCACFLayerTreeHost::flushContext): Added a call to contextDidChange so the
705         base class will know what happened. Moved code to schedule a render from here...
706         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): ...to here.
707
708         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added contextDidChange.
709
710         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Added.
711         (WebCore::WKCACFViewLayerTreeHost::create): If WebKitQuartzCoreAdditions, which provides
712         WKCACFView, isn't present, bail. Otherwise allocate and return a new host.
713         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost): Initialize members.
714         (WebCore::WKCACFViewLayerTreeHost::updateViewIfNeeded): Update the view if we previously
715         marked that we needed to do so, and flush the context if our layer's bounds have changed.
716         (WebCore::WKCACFViewLayerTreeHost::contextDidChangeCallback): Call through to
717         contextDidChange.
718         (WebCore::WKCACFViewLayerTreeHost::contextDidChange): Tell the WKCACFView to start rendering
719         (if we didn't already), then call up to the base class.
720         (WebCore::WKCACFViewLayerTreeHost::initializeContext): Set the context's user data, the
721         view's layer, and hook up our "context did change" callback.
722         (WebCore::WKCACFViewLayerTreeHost::resize): Mark that the view needs to be updated the next
723         time we paint.
724         (WebCore::WKCACFViewLayerTreeHost::createRenderer): Update our view and return whether it is
725         able to render or not.
726         (WebCore::WKCACFViewLayerTreeHost::destroyRenderer): Clear out all the info we passed down
727         to the view.
728         (WebCore::WKCACFViewLayerTreeHost::lastCommitTime): Call through to the view.
729         (WebCore::WKCACFViewLayerTreeHost::flushContext): Ditto.
730         (WebCore::WKCACFViewLayerTreeHost::paint): Update the view so it will draw at the right
731         size, then call up to the base class.
732         (WebCore::WKCACFViewLayerTreeHost::render): Invalidate the view using the passed-in dirty
733         rects, then ask it to draw.
734
735         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/ca/win/LegacyCACFLayerTreeHost.h.
736
737 2011-01-27  Adam Roben  <aroben@apple.com>
738
739         Move LegacyCACFLayerTreeHost into its own files
740
741         More preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
742         should use WKCACFView for rendering
743
744         Reviewed by Simon Fraser.
745
746         * WebCore.vcproj/WebCore.vcproj: Added LegacyCACFLayerTreeHost.{cpp,h}.
747
748         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Moved code from here to new files.
749
750         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Added.
751         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added.
752
753 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
754
755         Unreviewed WinCE build fix for r76824.
756
757         * platform/wince/DragDataWinCE.cpp:
758         (WebCore::DragData::dragDataMap):
759
760 2011-01-27  Adam Roben  <aroben@apple.com>
761
762         Split CACFLayerTreeHost into base and derived classes
763
764         The derived class, LegacyCACFLayerTreeHost, contains all the D3D-related code. A later patch
765         will add a new derived class that replaces the D3D code with a different rendering API.
766
767         For now, LegacyCACFLayerTreeHost lives in CACFLayerTreeHost.cpp. This keeps the diff a
768         little smaller. A later patch will move it to its own source files.
769
770         Preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
771         should use WKCACFView for rendering
772
773         Reviewed by Simon Fraser.
774
775         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
776         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Clear the window before
777         destroying the host, as that is now the API contract that clients must fulfill.
778         (WebCore::LegacyCACFLayerTreeHost::create): Added. Simple creator.
779         (WebCore::CACFLayerTreeHost::create): Now instantiates a LegacyCACFLayerTreeHost. Calls the
780         new initialize function to perform initialization that has to happen after the vtable has
781         been set up.
782
783         (WebCore::LegacyCACFLayerTreeHost::LegacyCACFLayerTreeHost):
784         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost):
785         (WebCore::LegacyCACFLayerTreeHost::initializeContext):
786         (WebCore::CACFLayerTreeHost::initialize):
787         Moved some initialization code from the CACFLayerTreeHost constructor into these new
788         functions.
789
790         (WebCore::LegacyCACFLayerTreeHost::~LegacyCACFLayerTreeHost): Added. Moved code here from
791         ~CACFLayerTreeHost.
792         (WebCore::CACFLayerTreeHost::~CACFLayerTreeHost): Rather than clearing the window at this
793         point (which would be too late, since we won't be able to call into the derived class's
794         virtual functions), just assert that it has already been cleared (or was never set in the
795         first place).
796         (WebCore::LegacyCACFLayerTreeHost::createRenderer): Renamed from
797         CACFLayerTreeHost::createRenderer, and changed to use getters instead of accessing
798         CACFLayerTreeHost's data members directly.
799
800         (WebCore::LegacyCACFLayerTreeHost::destroyRenderer):
801         (WebCore::CACFLayerTreeHost::destroyRenderer):
802         Moved some code to the new LegacyCACFLayerTreeHost function.
803
804         (WebCore::LegacyCACFLayerTreeHost::resize):
805         (WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
806         Moved these functions to LegacyCACFLayerTreeHost.
807
808         (WebCore::LegacyCACFLayerTreeHost::paint):
809         (WebCore::CACFLayerTreeHost::paint):
810         Moved some code to the new LegacyCACFLayerTreeHost function.
811
812         (WebCore::LegacyCACFLayerTreeHost::render):
813         (WebCore::LegacyCACFLayerTreeHost::renderSoon):
814         Moved these functions to LegacyCACFLayerTreeHost.
815
816         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to flush the context
817         from here...
818         (WebCore::LegacyCACFLayerTreeHost::flushContext): ...to this new function.
819
820         (WebCore::LegacyCACFLayerTreeHost::lastCommitTime): Moved code to get the last commit time
821         to this new function...
822         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): ...from here.
823
824         (WebCore::LegacyCACFLayerTreeHost::initD3DGeometry):
825         (WebCore::LegacyCACFLayerTreeHost::resetDevice):
826         Moved these functions to LegacyCACFLayerTreeHost.
827
828         * platform/graphics/ca/win/CACFLayerTreeHost.h: Made some functions virtual, removed some
829         members that have moved to LegacyCACFLayerTreeHost, grouped remaining members more
830         logically, and added some getters used by LegacyCACFLayerTreeHost.
831
832 2011-01-27  Adam Roben  <aroben@apple.com>
833
834         Move CACFLayerTreeHostClient to its own header file
835
836         Rubber-stamped by Steve Falkenburg.
837
838         * WebCore.vcproj/WebCore.vcproj: Added CACFLayerTreeHostClient.h. Also let VS have its way
839         with the file.
840
841         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Added new #include.
842
843         * platform/graphics/ca/win/CACFLayerTreeHost.h: Removed CACFLayerTreeHostClient.
844
845         * platform/graphics/ca/win/CACFLayerTreeHostClient.h: Added.
846
847         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: Moved some #includes here
848         from the header file.
849
850         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Replaced broader #includes
851         with more specific ones, plus a forward-declaration.
852
853 2011-01-27  James Simonsen  <simonjam@chromium.org>
854
855         Reviewed by Tony Chang.
856
857         [Chromium] Simplify small caps logic in complex text on linux
858         https://bugs.webkit.org/show_bug.cgi?id=53207
859
860         Test: fast/text/atsui-multiple-renderers.html
861               fast/text/atsui-small-caps-punctuation-size.html
862
863         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
864         (WebCore::ComplexTextController::nextScriptRun): Remove redundant logic. Case changes in a text run imply FontData changes.
865         (WebCore::ComplexTextController::setupFontForScriptRun): Update comment to reflect above.
866
867 2011-01-27  Adam Barth  <abarth@webkit.org>
868
869         In which I attempt to fix the EFL build.
870
871         * CMakeLists.txt:
872
873 2011-01-25  Levi Weintraub  <leviw@chromium.org>
874
875         Reviewed by Darin Adler.
876
877         Adding border and padding to the calculation of the local caret rect for RenderBoxes.
878         Corrected for mistake in r76625
879
880         Undo moves caret to invalid position
881         https://bugs.webkit.org/show_bug.cgi?id=49744
882
883         Tests: editing/selection/caret-painting-after-paste-undo-rtl.html
884                editing/selection/caret-painting-after-paste-undo.html
885
886         * rendering/RenderBox.cpp:
887         (WebCore::RenderBox::localCaretRect):
888
889 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
890
891         Unreviewed, rolling out r76825.
892         http://trac.webkit.org/changeset/76825
893         https://bugs.webkit.org/show_bug.cgi?id=53256
894
895         "caused crashes on GTK and chromium" (Requested by rniwa on
896         #webkit).
897
898         * rendering/RenderBoxModelObject.cpp:
899         (WebCore::ImageQualityController::keyDestroyed):
900         (WebCore::ImageQualityController::objectDestroyed):
901         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
902         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
903         (WebCore::imageQualityController):
904         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
905
906 2011-01-27  Adam Barth  <abarth@webkit.org>
907
908         Reviewed by Eric Seidel.
909
910         Generalize the mechanism view-source uses to remember the source for an HTMLToken
911         https://bugs.webkit.org/show_bug.cgi?id=53200
912
913         Currently view-source tracks the source associated with each HTMLToken.
914         We want to re-use this mechanism for the new XSS auditor.  This patch
915         moves this code into its own class so it can be shared between the
916         view-source parser and the general HTML parser.  This patch also add
917         support for tracking the source of tokens that span document.write
918         boundaries.
919
920         No functional change.  This code change is somewhat tested by our
921         view-source layout tests.
922
923         * Android.mk:
924         * GNUmakefile.am:
925         * WebCore.gypi:
926         * WebCore.pro:
927         * WebCore.vcproj/WebCore.vcproj:
928         * WebCore.xcodeproj/project.pbxproj:
929             - Fun with updating build files.
930         * html/parser/HTMLDocumentParser.cpp:
931         (WebCore::HTMLDocumentParser::pumpTokenizer):
932             - Teach HTMLDocumentParser to track the source for HTMLTokens.
933               Currently, this information isn't used, but it will be shortly.
934               I ran the HTML parser benchmark and this change didn't have a
935               measurable effect.
936         * html/parser/HTMLDocumentParser.h:
937             - Composite in the HTMLSourceTracker.
938         * html/parser/HTMLSourceTracker.cpp: Added.
939         (WebCore::HTMLSourceTracker::HTMLSourceTracker):
940         (WebCore::HTMLSourceTracker::start):
941         (WebCore::HTMLSourceTracker::end):
942             - This function should eventualy be folded into HTMLTokenizer.
943         (WebCore::HTMLSourceTracker::sourceForToken):
944         * html/parser/HTMLSourceTracker.h: Added.
945         * html/parser/HTMLToken.h:
946             - Now HTMLTokens always have a start index of zero.  To do the job
947               of the old start index, this patch introduces the notion of a
948               baseOffset.  Unlike the start index (which was used as the base
949               offset for all the other indicies), the baseOffset can change
950               over the lifetime of the token.  We need the flexibility to
951               change the offset for tokens that span document.write boundaries.
952               Values are now normalized to zero-offset when stored.
953         (WebCore::HTMLToken::clear):
954         (WebCore::HTMLToken::setBaseOffset):
955         (WebCore::HTMLToken::end):
956         (WebCore::HTMLToken::beginAttributeName):
957         (WebCore::HTMLToken::endAttributeName):
958         (WebCore::HTMLToken::beginAttributeValue):
959         (WebCore::HTMLToken::endAttributeValue):
960         * html/parser/HTMLViewSourceParser.cpp:
961             - Updates the HTMLViewSourceParser to use the new
962               HTMLSourceTracker.
963         (WebCore::HTMLViewSourceParser::pumpTokenizer):
964         (WebCore::HTMLViewSourceParser::append):
965         (WebCore::HTMLViewSourceParser::sourceForToken):
966             - This function now just calls through to HTMLSourceTracker.
967         * html/parser/HTMLViewSourceParser.h:
968         * platform/text/SegmentedString.cpp:
969         (WebCore::SegmentedString::currentColumn):
970         (WebCore::SegmentedString::setCurrentPosition):
971         * platform/text/SegmentedString.h:
972         (WebCore::SegmentedString::numberOfCharactersConsumed):
973             - We need to handle the general case now.  The "slow" version
974               doesn't turn out to be any slower in practice anyway.
975
976 2011-01-27  Sam Weinig  <sam@webkit.org>
977
978         Fix all the builds.
979
980         * platform/ScrollView.cpp:
981         (WebCore::ScrollView::paintOverhangAreas): Add parameters.
982
983 2011-01-27  Sam Weinig  <sam@webkit.org>
984
985         Reviewed by Dave Hyatt.
986
987         Add ability to do an unconstrained scroll on a ScrollView
988         https://bugs.webkit.org/show_bug.cgi?id=53249
989
990         * platform/ScrollView.cpp:
991         (WebCore::ScrollView::ScrollView):
992         Initialize m_constrainsScrollingToContentEdge to true.
993
994         (WebCore::ScrollView::setScrollOffset):
995         Only constrain the offset if the m_constrainsScrollingToContentEdge is set.
996
997         (WebCore::ScrollView::updateScrollbars):
998         Simplify expression converting an IntSize to an IntPoint.
999         
1000         (WebCore::ScrollView::paint):
1001         Paint the overhang if there is any.
1002         
1003         (WebCore::ScrollView::calculateOverhangAreasForPainting):
1004         Calculate the overhang in viewport coordinates for painting.
1005
1006         * platform/ScrollView.h:
1007         (WebCore::ScrollView::constrainsScrollingToContentEdge):
1008         (WebCore::ScrollView::setConstrainsScrollingToContentEdge):
1009         Add bit to control whether the scroll position should be constrained
1010         to the content edge when set.
1011
1012         * platform/ScrollbarThemeComposite.cpp:
1013         (WebCore::usedTotalSize):
1014         (WebCore::ScrollbarThemeComposite::thumbPosition):
1015         (WebCore::ScrollbarThemeComposite::thumbLength):
1016         * platform/mac/ScrollbarThemeMac.mm:
1017         (WebCore::ScrollbarThemeMac::paint):
1018         Improve calculations of thumb size and position to take overhang into account.
1019
1020 2011-01-27  Dirk Schulze  <krit@webkit.org>
1021
1022         Reviewed by Nikolas Zimmermann.
1023
1024         SVG animation of Paths with segments of different coordinate modes on begin and end
1025         https://bugs.webkit.org/show_bug.cgi?id=52984
1026
1027         At the moment we just support SVG path animations, if the number of segments on the given start path
1028         is the same as the number of segments on the given end path. But a segment on a given position must be identical
1029         on both paths as well. Not only the segment type, also the coordinate mode of the segments must be identical.
1030         If MoveToRel is on the second position on the start path a MoveToRel must be on the second position
1031         of the end path too. According to the SVG spec, at least the coordinate mode can differ. Means, if we have MoveToRel
1032         in the start path, we can use MoveToAbs on the same position in the end path.
1033
1034         This patch fixes the blending code to follow the spec here. It was necessary to track the current position of
1035         both paths, transform coordinates to the same coordinate mode and transform the resulting animation coordinate back
1036         to the coordinate mode of either the start or the end path. Which mode is taken depends on the progress of the
1037         animation.
1038
1039         Tests: svg/animations/animate-path-animation-Cc-Ss.html
1040                svg/animations/animate-path-animation-Ll-Vv-Hh.html
1041                svg/animations/animate-path-animation-Qq-Tt.html
1042                svg/animations/animate-path-animation-cC-sS-inverse.html
1043                svg/animations/animate-path-animation-lL-vV-hH-inverse.html
1044                svg/animations/animate-path-animation-qQ-tT-inverse.html
1045
1046         * svg/SVGPathBlender.cpp:
1047         (WebCore::blendFloatPoint):
1048         (WebCore::blendAnimatedFloat):
1049         (WebCore::SVGPathBlender::blendAnimatedDimensionalFloat):
1050         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
1051         (WebCore::SVGPathBlender::blendMoveToSegment):
1052         (WebCore::SVGPathBlender::blendLineToSegment):
1053         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1054         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1055         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1056         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1057         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1058         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1059         (WebCore::SVGPathBlender::blendArcToSegment):
1060         (WebCore::coordinateModeOfCommand):
1061         (WebCore::isSegmentEqual):
1062         (WebCore::SVGPathBlender::blendAnimatedPath):
1063         (WebCore::SVGPathBlender::cleanup):
1064         * svg/SVGPathBlender.h:
1065
1066 2011-01-27  Cris Neckar  <cdn@chromium.org>
1067
1068         Reviewed by Dimitri Glazkov.
1069
1070         Clear the parent on a css keyframe's m_style when removing it from the stylesheet.
1071         https://bugs.webkit.org/show_bug.cgi?id=52320
1072
1073         Test: fast/css/css-keyframe-style-crash.html
1074
1075         * css/CSSRuleList.cpp:
1076         (WebCore::CSSRuleList::deleteRule):
1077         * css/WebKitCSSKeyframesRule.cpp:
1078         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1079
1080 2011-01-27  Rob Buis  <rwlbuis@gmail.com>
1081
1082         Reviewed by Kent Tamura.
1083
1084         Color changes to option elements in a select multiple aren't drawn immediately
1085         https://bugs.webkit.org/show_bug.cgi?id=49790
1086
1087         Redirect style changes on <option> element to the owner <select> element.
1088
1089         Test: fast/repaint/select-option-background-color.html
1090
1091         * html/HTMLOptionElement.cpp:
1092         (WebCore::HTMLOptionElement::setRenderStyle):
1093
1094 2011-01-19  Stephen White  <senorblanco@chromium.org>
1095
1096         Reviewed by Darin Adler.
1097
1098         Fix performance regression in ImageQualityController::objectDestroyed().
1099         https://bugs.webkit.org/show_bug.cgi?id=52645
1100
1101         In r72282, I inadvertently introduced this regression by using a
1102         linear search through the hash map on object destruction.  This was
1103         because the hash key consisted of both object pointer and layer id,
1104         but on object destruction we only know the object pointer, requiring
1105         a search to find all the layers. 
1106         By replacing the hash map with two nested hash maps, where the outer key
1107         is the object and the inner key is the layer, we can find all the
1108         relevant data for an object in one hash lookup.
1109
1110         * rendering/RenderBoxModelObject.cpp:
1111         Replace the (object,layer)->size HashMap with object->layer and
1112         layer->size HashMaps.
1113         (WebCore::ImageQualityController::isEmpty):
1114         Implement isEmpty() for the outer HashMap.
1115         (WebCore::ImageQualityController::removeLayer):
1116         When a layer is removed, remove it from the inner hash map.
1117         (WebCore::ImageQualityController::set):
1118         Implement set():  if the inner map exists, set the layer->size tuple
1119         directly.  If not, create a new inner map, set the tuple, and insert
1120         it in the outer map.
1121         (WebCore::ImageQualityController::objectDestroyed):
1122         Look up the object in the outer map only.
1123         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1124         Cosmetic changes for the renamed now-outer hash map.
1125         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1126         Do both outer and inner hash map lookups.  Call set() to add/update
1127         entries to the hash maps.  keyDestroyed() is now removeLayer().
1128         (WebCore::imageQualityController):
1129         Make the ImageQualityController a file-static global, so it can be
1130         created and destroyed on the fly.
1131         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
1132         If there is no ImageQualityController, don't call objectDestroyed().
1133         If it's empty, delete it.
1134
1135
1136 2011-01-26  Enrica Casucci  <enrica@apple.com>
1137
1138         Reviewed by Darin Adler and Adam Roben.
1139
1140         WebKit2: add support for drag and drop on Windows
1141         https://bugs.webkit.org/show_bug.cgi?id=52775
1142         <rdar://problem/8514409>
1143         
1144         On Windows the access to the content being dragged is
1145         provided via the IDataObject interface that is made available
1146         to the window that registers itself as drop target.
1147         Since this interface cannot be accessed from the WebProcess,
1148         in every call to one of the methods of the IDropTarget interface
1149         we serialize the content of the drag clipboard and send it over to
1150         the WebProcess.
1151         The bulk of this patch consists in the refactoring needed in DragData
1152         and ClipboardWin classes to extract the data from the serialized object.
1153         
1154         * platform/DragData.cpp:
1155         * platform/DragData.h:
1156         * platform/win/ClipboardUtilitiesWin.cpp:
1157         (WebCore::getWebLocData):
1158         (WebCore::getURL):
1159         (WebCore::getPlainText):
1160         (WebCore::getTextHTML):
1161         (WebCore::getCFHTML):
1162         (WebCore::fragmentFromFilenames):
1163         (WebCore::containsFilenames):
1164         (WebCore::fragmentFromHTML):
1165         (WebCore::containsHTML):
1166         (WebCore::getClipboardData):
1167         * platform/win/ClipboardUtilitiesWin.h:
1168         * platform/win/ClipboardWin.cpp:
1169         (WebCore::Clipboard::create):
1170         (WebCore::ClipboardWin::ClipboardWin):
1171         (WebCore::ClipboardWin::getData):
1172         (WebCore::ClipboardWin::types):
1173         (WebCore::ClipboardWin::files):
1174         (WebCore::ClipboardWin::hasData):
1175         * platform/win/ClipboardWin.h:
1176         (WebCore::ClipboardWin::create):
1177         * platform/win/DragDataWin.cpp:
1178         (WebCore::DragData::DragData):
1179         (WebCore::DragData::containsURL):
1180         (WebCore::DragData::dragDataMap):
1181         (WebCore::DragData::asURL):
1182         (WebCore::DragData::containsFiles):
1183         (WebCore::DragData::asFilenames):
1184         (WebCore::DragData::containsPlainText):
1185         (WebCore::DragData::asPlainText):
1186         (WebCore::DragData::canSmartReplace):
1187         (WebCore::DragData::containsCompatibleContent):
1188         (WebCore::DragData::asFragment):
1189
1190 2011-01-27  Mario Sanchez Prada  <msanchez@igalia.com>
1191
1192         Reviewed by Martin Robinson.
1193
1194         [GTK] Space characters in source document interfere with reported caret offset
1195         https://bugs.webkit.org/show_bug.cgi?id=53033
1196
1197         Calculate caret offset from rendered text instead of from node contents.
1198
1199         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1200         (objectAndOffsetUnignored): Calculate the caret offset based only
1201         on positions and ranges, instead of using the computed offset in
1202         the container node.
1203
1204 2011-01-26  Alexey Proskuryakov  <ap@apple.com>
1205
1206         Reviewed by Darin Adler.
1207
1208         https://bugs.webkit.org/show_bug.cgi?id=53197
1209         <rdar://problem/8895682> Make WebKit2 printing asynchronous
1210
1211         * WebCore.exp.in: Export more PrintContext methods that we didn't use on Mac before.
1212
1213         * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Changed to make the same
1214         transformation as spoolPages does for consistency.
1215
1216 2011-01-27  David Grogan  <dgrogan@google.com>
1217
1218         Reviewed by Jeremy Orlow.
1219
1220         initial support for close() in indexeddb backend
1221         https://bugs.webkit.org/show_bug.cgi?id=53150
1222
1223         Test: storage/indexeddb/transaction-after-close.html
1224
1225         * storage/IDBDatabase.cpp:
1226         (WebCore::IDBDatabase::IDBDatabase):
1227         (WebCore::IDBDatabase::transaction):
1228         (WebCore::IDBDatabase::close):
1229         * storage/IDBDatabase.h:
1230         * storage/IDBDatabase.idl:
1231         * storage/IDBDatabaseBackendImpl.cpp:
1232         (WebCore::IDBDatabaseBackendImpl::transaction):
1233         (WebCore::IDBDatabaseBackendImpl::close):
1234
1235 2011-01-27  Dirk Schulze  <krit@webkit.org>
1236
1237         Reviewed by Nikolas Zimmermann.
1238
1239         SVG animation doesn't support calcMode discrete for number and color values.
1240         https://bugs.webkit.org/show_bug.cgi?id=53189
1241
1242         Add support for calcMode discrete on number and color animation.
1243
1244         Tests: svg/animations/animate-color-calcMode-discrete.html
1245                svg/animations/animate-number-calcMode-discrete.html
1246
1247         * svg/SVGAnimateElement.cpp:
1248         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1249
1250 2011-01-26  Zhenyao Mo  <zmo@google.com>
1251
1252         Reviewed by Kenneth Russell.
1253
1254         shaderSource needs to preserve original source
1255         https://bugs.webkit.org/show_bug.cgi?id=52833
1256
1257         Test: fast/canvas/webgl/gl-getshadersource.html
1258
1259         * html/canvas/WebGLRenderingContext.cpp:
1260         (WebCore::WebGLRenderingContext::getShaderParameter): Intercept SHADER_SOURCE_LENGTH.
1261         (WebCore::WebGLRenderingContext::getShaderSource): Intercept the call.
1262         (WebCore::WebGLRenderingContext::shaderSource): Cache the source.
1263         * html/canvas/WebGLShader.cpp: Cache shader source.
1264         (WebCore::WebGLShader::WebGLShader):
1265         * html/canvas/WebGLShader.h: Ditto.
1266         (WebCore::WebGLShader::getSource):
1267         (WebCore::WebGLShader::setSource):
1268
1269 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
1270
1271         Unreviewed WinCE build fix for r76743.
1272
1273         * platform/graphics/wince/FontWinCE.cpp:
1274         (WebCore::TextRunComponent::TextRunComponent):
1275
1276 2011-01-27  Pavel Podivilov  <podivilov@chromium.org>
1277
1278         Reviewed by Pavel Feldman.
1279
1280         Web Inspector: Closure and Global variable details automatically collapsing on each step through JavaScript code.
1281         https://bugs.webkit.org/show_bug.cgi?id=53234
1282
1283         * inspector/front-end/ScopeChainSidebarPane.js:
1284         (WebInspector.ScopeChainSidebarPane):
1285         (WebInspector.ScopeChainSidebarPane.prototype.update):
1286
1287 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1288
1289         Unreviewed, rolling out r76789.
1290         http://trac.webkit.org/changeset/76789
1291         https://bugs.webkit.org/show_bug.cgi?id=53238
1292
1293         Broke GTK layout tests (Requested by podivilov on #webkit).
1294
1295         * inspector/front-end/ScopeChainSidebarPane.js:
1296         (WebInspector.ScopeChainSidebarPane):
1297         (WebInspector.ScopeChainSidebarPane.prototype.update):
1298
1299 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
1300
1301         Reviewed by Pavel Feldman.
1302
1303         Web Inspector: store all settings related to the agents on the frontend side
1304         https://bugs.webkit.org/show_bug.cgi?id=53174
1305
1306         * CMakeLists.txt:
1307         * GNUmakefile.am:
1308         * WebCore.exp.in:
1309         * WebCore.gypi:
1310         * WebCore.pro:
1311         * WebCore.vcproj/WebCore.vcproj:
1312         * WebCore.xcodeproj/project.pbxproj:
1313         * bindings/js/ScriptDebugServer.cpp:
1314         * bindings/js/ScriptDebugServer.h:
1315         * bindings/js/ScriptProfiler.cpp:
1316         * bindings/js/ScriptProfiler.h:
1317         * bindings/v8/ScriptDebugServer.cpp:
1318         * bindings/v8/ScriptDebugServer.h:
1319         * bindings/v8/ScriptProfiler.cpp:
1320         * bindings/v8/ScriptProfiler.h:
1321         * inspector/Inspector.idl:
1322         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
1323         on the front-end side and will be pushed to the backend when the frontend is loaded.
1324         (WebCore::InspectorAgent::InspectorAgent):
1325         (WebCore::InspectorAgent::disconnectFrontend):
1326         (WebCore::InspectorAgent::restoreDebugger):
1327         (WebCore::InspectorAgent::restoreProfiler):
1328         (WebCore::InspectorAgent::enableProfiler):
1329         (WebCore::InspectorAgent::disableProfiler):
1330         (WebCore::InspectorAgent::showAndEnableDebugger):
1331         (WebCore::InspectorAgent::enableDebugger):
1332         (WebCore::InspectorAgent::disableDebugger):
1333         * inspector/InspectorAgent.h:
1334         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
1335         if the front-end was opened during current browser session and XHR logging is turned on
1336         there.
1337         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
1338         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
1339         * inspector/InspectorDebuggerAgent.cpp:
1340         * inspector/InspectorDebuggerAgent.h:
1341         * inspector/InspectorInstrumentation.cpp:
1342         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
1343         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
1344         * inspector/InspectorProfilerAgent.cpp:
1345         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1346         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1347         * inspector/InspectorSettings.cpp: Removed.
1348         * inspector/InspectorSettings.h: Removed.
1349         * inspector/InspectorState.cpp:
1350         (WebCore::InspectorState::InspectorState):
1351         * inspector/InspectorState.h:
1352         * inspector/front-end/ConsoleView.js:
1353         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
1354         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
1355         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
1356         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
1357         * inspector/front-end/ProfilesPanel.js:
1358         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
1359         * inspector/front-end/ScriptsPanel.js:
1360         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
1361         * inspector/front-end/Settings.js:
1362         (WebInspector.Settings):
1363         * inspector/front-end/inspector.js:
1364
1365 2011-01-27  Pavel Podivilov  <podivilov@chromium.org>
1366
1367         Reviewed by Pavel Feldman.
1368
1369         Web Inspector: Closure and Global variable details automatically collapsing on each step through JavaScript code.
1370         https://bugs.webkit.org/show_bug.cgi?id=53234
1371
1372         * inspector/front-end/ScopeChainSidebarPane.js:
1373         (WebInspector.ScopeChainSidebarPane):
1374         (WebInspector.ScopeChainSidebarPane.prototype.update):
1375
1376 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
1377
1378         Reviewed by Pavel Feldman.
1379
1380         Web Inspector: [Elements panel] Tooltip for relative links incorrectly identifies current URL
1381         https://bugs.webkit.org/show_bug.cgi?id=53171
1382
1383         * inspector/front-end/inspector.js:
1384         (WebInspector.completeURL): Taught to understand partial href's that start with "?" (contain GET parameters only)
1385
1386 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
1387
1388         Reviewed by Pavel Feldman.
1389
1390         [V8] Crash in WebCore::addMessageToConsole
1391         https://bugs.webkit.org/show_bug.cgi?id=53227
1392
1393         * bindings/v8/V8Proxy.cpp: check that the Frame where the error
1394         occured still has a page before getting a console object from it.
1395         (WebCore::V8Proxy::reportUnsafeAccessTo):
1396
1397 2011-01-27  Hans Wennborg  <hans@chromium.org>
1398
1399         Reviewed by Jeremy Orlow.
1400
1401         IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
1402         https://bugs.webkit.org/show_bug.cgi?id=53178
1403
1404         Remove the IDBCallbacks::onSuccess() function that was used for
1405         null values, and replace such calls with calls to
1406         IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
1407         instead.
1408
1409         No new functionality, so no new tests.
1410
1411         * storage/IDBCallbacks.h:
1412         * storage/IDBCursorBackendImpl.cpp:
1413         (WebCore::IDBCursorBackendImpl::updateInternal):
1414         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
1415         * storage/IDBIndexBackendImpl.cpp:
1416         (WebCore::IDBIndexBackendImpl::openCursorInternal):
1417         * storage/IDBObjectStoreBackendImpl.cpp:
1418         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
1419         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
1420         * storage/IDBRequest.cpp:
1421         * storage/IDBRequest.h:
1422
1423 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1424
1425         Unreviewed, rolling out r76773.
1426         http://trac.webkit.org/changeset/76773
1427         https://bugs.webkit.org/show_bug.cgi?id=53230
1428
1429         breaks multiple GTK media tests (Requested by philn-tp on
1430         #webkit).
1431
1432         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1433         (WebCore::mimeTypeCache):
1434
1435 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1436
1437         Unreviewed, rolling out r76770.
1438         http://trac.webkit.org/changeset/76770
1439         https://bugs.webkit.org/show_bug.cgi?id=53229
1440
1441         Some inspector tests fail (Requested by yurys on #webkit).
1442
1443         * CMakeLists.txt:
1444         * GNUmakefile.am:
1445         * WebCore.exp.in:
1446         * WebCore.gypi:
1447         * WebCore.pro:
1448         * WebCore.vcproj/WebCore.vcproj:
1449         * WebCore.xcodeproj/project.pbxproj:
1450         * bindings/js/ScriptDebugServer.cpp:
1451         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
1452         * bindings/js/ScriptDebugServer.h:
1453         * bindings/js/ScriptProfiler.cpp:
1454         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
1455         * bindings/js/ScriptProfiler.h:
1456         * bindings/v8/ScriptDebugServer.cpp:
1457         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
1458         * bindings/v8/ScriptDebugServer.h:
1459         * bindings/v8/ScriptProfiler.cpp:
1460         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
1461         * bindings/v8/ScriptProfiler.h:
1462         * inspector/Inspector.idl:
1463         * inspector/InspectorAgent.cpp:
1464         (WebCore::InspectorAgent::InspectorAgent):
1465         (WebCore::InspectorAgent::disconnectFrontend):
1466         (WebCore::InspectorAgent::restoreDebugger):
1467         (WebCore::InspectorAgent::restoreProfiler):
1468         (WebCore::InspectorAgent::ensureSettingsLoaded):
1469         (WebCore::InspectorAgent::enableProfiler):
1470         (WebCore::InspectorAgent::disableProfiler):
1471         (WebCore::InspectorAgent::showAndEnableDebugger):
1472         (WebCore::InspectorAgent::enableDebugger):
1473         (WebCore::InspectorAgent::disableDebugger):
1474         * inspector/InspectorAgent.h:
1475         (WebCore::InspectorAgent::settings):
1476         * inspector/InspectorConsoleAgent.cpp:
1477         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
1478         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
1479         * inspector/InspectorDebuggerAgent.cpp:
1480         (WebCore::InspectorDebuggerAgent::isDebuggerAlwaysEnabled):
1481         * inspector/InspectorDebuggerAgent.h:
1482         * inspector/InspectorInstrumentation.cpp:
1483         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
1484         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
1485         * inspector/InspectorProfilerAgent.cpp:
1486         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1487         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1488         * inspector/InspectorSettings.cpp: Added.
1489         (WebCore::InspectorSettings::InspectorSettings):
1490         (WebCore::InspectorSettings::getBoolean):
1491         (WebCore::InspectorSettings::setBoolean):
1492         (WebCore::InspectorSettings::getLong):
1493         (WebCore::InspectorSettings::setLong):
1494         (WebCore::InspectorSettings::registerBoolean):
1495         (WebCore::InspectorSettings::registerLong):
1496         * inspector/InspectorSettings.h: Copied from Source/WebCore/bindings/v8/ScriptProfiler.h.
1497         * inspector/InspectorState.cpp:
1498         (WebCore::InspectorState::InspectorState):
1499         * inspector/InspectorState.h:
1500         * inspector/front-end/ConsoleView.js:
1501         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
1502         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
1503         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
1504         * inspector/front-end/ProfilesPanel.js:
1505         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
1506         * inspector/front-end/ScriptsPanel.js:
1507         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
1508         * inspector/front-end/Settings.js:
1509         (WebInspector.Settings):
1510         * inspector/front-end/inspector.js:
1511
1512 2011-01-26  Philippe Normand  <pnormand@igalia.com>
1513
1514         Reviewed by Martin Robinson.
1515
1516         [GTK] LayoutTests/media/audio-mpeg4-supported.html fails
1517         https://bugs.webkit.org/show_bug.cgi?id=53125
1518
1519         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1520         (WebCore::mimeTypeCache): Add audio/x-m4a mimetype in the cache.
1521
1522 2011-01-26  Yury Semikhatsky  <yurys@chromium.org>
1523
1524         Reviewed by Pavel Feldman.
1525
1526         Web Inspector: store all settings related to the agents on the frontend side
1527         https://bugs.webkit.org/show_bug.cgi?id=53174
1528
1529         * CMakeLists.txt:
1530         * GNUmakefile.am:
1531         * WebCore.exp.in:
1532         * WebCore.gypi:
1533         * WebCore.pro:
1534         * WebCore.vcproj/WebCore.vcproj:
1535         * WebCore.xcodeproj/project.pbxproj:
1536         * inspector/Inspector.idl:
1537         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
1538         on the front-end side and will be pushed to the backend when the frontend is loaded.
1539         (WebCore::InspectorAgent::InspectorAgent):
1540         (WebCore::InspectorAgent::disconnectFrontend):
1541         (WebCore::InspectorAgent::restoreDebugger):
1542         (WebCore::InspectorAgent::restoreProfiler):
1543         (WebCore::InspectorAgent::enableProfiler):
1544         (WebCore::InspectorAgent::disableProfiler):
1545         (WebCore::InspectorAgent::showAndEnableDebugger):
1546         (WebCore::InspectorAgent::enableDebugger):
1547         (WebCore::InspectorAgent::disableDebugger):
1548         * inspector/InspectorAgent.h:
1549         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
1550         if the front-end was opened during current browser session and XHR logging is turned on
1551         there.
1552         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
1553         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
1554         * inspector/InspectorInstrumentation.cpp:
1555         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
1556         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
1557         * inspector/InspectorProfilerAgent.cpp:
1558         (WebCore::InspectorProfilerAgent::enable):
1559         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1560         * inspector/InspectorProfilerAgent.h:
1561         * inspector/InspectorSettings.cpp: Removed.
1562         * inspector/InspectorSettings.h: Removed.
1563         * inspector/InspectorState.cpp:
1564         (WebCore::InspectorState::InspectorState):
1565         * inspector/InspectorState.h:
1566         * inspector/front-end/ConsoleView.js:
1567         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
1568         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
1569         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
1570         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
1571         * inspector/front-end/ProfilesPanel.js:
1572         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
1573         * inspector/front-end/ScriptsPanel.js:
1574         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
1575         * inspector/front-end/Settings.js:
1576         (WebInspector.Settings):
1577         * inspector/front-end/inspector.js:
1578
1579 2011-01-27  Dan Bernstein  <mitz@apple.com>
1580
1581         Reviewed by Sam Weinig.
1582
1583         REGRESSION (r76743): Uneven spacing in right-to-left justified text
1584         https://bugs.webkit.org/show_bug.cgi?id=53225
1585
1586         Fixes failure in fast/text/atsui-spacing-features.html
1587
1588         There was an inconsistency between rendering code and font code in the interpretation of
1589         'after expansion' and 'trailing expansion'. Changed all code to interpret these in terms of
1590         visual order rather than logical.
1591
1592         * platform/graphics/Font.cpp:
1593         (WebCore::Font::expansionOpportunityCount): Added a text direction parameter and changed to
1594         iterate in visual order accordingly.
1595         * platform/graphics/Font.h:
1596         * platform/graphics/WidthIterator.cpp:
1597         (WebCore::WidthIterator::WidthIterator): Pass the run direction to expansionOpportunityCount().
1598         (WebCore::WidthIterator::advance): For right-to-left runs, evaluate the trailing expansion
1599         condition with respect to the first character, which is the trailing character in visual order.
1600         * platform/graphics/mac/ComplexTextController.cpp:
1601         (WebCore::ComplexTextController::ComplexTextController): Pass the run direction to
1602         expansionOpportunityCount().
1603         * rendering/RenderBlockLineLayout.cpp:
1604         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
1605
1606 2011-01-26  Adam Roben  <aroben@apple.com>
1607
1608         Don't create the Direct3D device before it's first needed
1609
1610         We only need the device once we decide to render. There's no point in creating it before
1611         then.
1612
1613         Reviewed by Sam Weinig.
1614
1615         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1616         (WebCore::CACFLayerTreeHost::setWindow): Removed the call to createRenderer() from here.
1617         We already have code to create it when we first try to draw.
1618         (WebCore::CACFLayerTreeHost::createRenderer): Flush the context after we set our layer's
1619         bounds so that the bounds will take effect the next time we render (which could be just
1620         after this function returns).
1621
1622 2011-01-26  Adam Roben  <aroben@apple.com>
1623
1624         Add assertions that CACFLayerTreeHost gains and loses an HWND only once
1625
1626         CACFLayerTreeHost doesn't support any other use pattern.
1627
1628         Reviewed by Sam Weinig.
1629
1630         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1631         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Initialize new member.
1632         (WebCore::CACFLayerTreeHost::setWindow): Assert that we transition from not having a window,
1633         to having a window, to not having a window just once over the lifetime of this object.
1634
1635         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added m_state.
1636
1637 2011-01-26  Adam Roben  <aroben@apple.com>
1638
1639         Notify layers that their animations have started when we flush the context, not when we
1640         render
1641
1642         r76372 separated context flushing from rendering, but this bit of code got left behind.
1643
1644         Reviewed by Sam Weinig.
1645
1646         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1647         (WebCore::CACFLayerTreeHost::render): Moved code to notify the layers from here to
1648         notifyAnimationsStarted.
1649         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added a call to
1650         notifyAnimationsStarted after we flush the context.
1651         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): Added. Code came from render. Changed
1652         to call PlatformCALayer::animationStarted rather than calling through to the client
1653         directly.
1654
1655         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added notifyAniamtionsStarted.
1656
1657 2011-01-26  Adam Roben  <aroben@apple.com>
1658
1659         Small cleanup in MediaPlayerPrivateFullscreenWindow
1660
1661         Reviewed by Sam Weinig.
1662
1663         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
1664         (WebCore::MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow): Moved
1665         code here from close(), since this was the only place that called it after the following
1666         change to createWindow.
1667         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Replaced code that handled the
1668         case where we had already created the window with an assertion that we have not already done
1669         so. Our single caller (FullscreenVideoController) did not require this behavior.
1670
1671         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Removed layerView.
1672
1673 2011-01-26  Sam Weinig  <sam@webkit.org>
1674
1675         Reviewed by Adam Roben.
1676
1677         Move ScrollView scroll wheel code to ScrollAnimator.
1678
1679         * platform/ScrollAnimator.cpp:
1680         (WebCore::ScrollAnimator::handleWheelEvent):
1681         * platform/ScrollAnimator.h:
1682         Moved implementation of handleWheelEvent from ScrollView::wheelEvent.
1683
1684         * platform/ScrollView.cpp:
1685         (WebCore::ScrollView::wheelEvent):
1686         Call down to the ScrollableArea.
1687
1688         * platform/ScrollableArea.cpp:
1689         (WebCore::ScrollableArea::handleWheelEvent):
1690         Call down to the ScrollAnimator.
1691
1692         * platform/ScrollableArea.h:
1693         (WebCore::ScrollableArea::scrollPosition):
1694         (WebCore::ScrollableArea::minimumScrollPosition):
1695         (WebCore::ScrollableArea::maximumScrollPosition):
1696         (WebCore::ScrollableArea::visibleContentRect):
1697         (WebCore::ScrollableArea::visibleHeight):
1698         (WebCore::ScrollableArea::visibleWidth):
1699         Add functions needed to implement wheel event in the animator.
1700
1701 2011-01-26  David Kilzer  <ddkilzer@apple.com>
1702
1703         <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
1704         <rdar://problem/8821760>
1705
1706         Reviewed by Antti Koivisto.
1707
1708         This adds support for HTTP pipelining in CFNetwork, but does not
1709         enable it.  To enable it post-SnowLeopard, use this command:
1710
1711             defaults write BUNDLE.ID WebKitEnableHTTPPipelining -bool YES
1712
1713         Once enabled, it is possible to force the same load priority
1714         (high) to be sent to CFNetwork to allow WebCore to handle the
1715         scheduling:
1716
1717             defaults write BUNDLE.ID WebKitForceHTTPPipeliningPriorityHigh -bool YES
1718
1719         * WebCore.exp.in: Export _wkGetHTTPPipeliningPriority and
1720         _wkSetHTTPPipeliningPriority.
1721
1722         * loader/DocumentThreadableLoader.cpp:
1723         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
1724         Copy the priority to preflightRequest.
1725
1726         * loader/ResourceLoadScheduler.cpp:
1727         (WebCore::ResourceLoadScheduler::scheduleLoad): Refactored code
1728         at the end of the method to use an early return.
1729
1730         * loader/cache/CachedResourceRequest.cpp:
1731         (WebCore::CachedResourceRequest::load): Set the priority on the
1732         ResourceRequest object based on the priority of the
1733         CachedResourceRequest before calling
1734         ResourceLoadScheduler::scheduleSubresourceLoad().
1735
1736         * loader/icon/IconLoader.cpp:
1737         (WebCore::IconLoader::startLoading): Create a ResourceRequest
1738         object and set its priority to ResourceLoadPriorityLow before
1739         passing it to ResourceLoadScheduler::scheduleSubresourceLoad().
1740
1741         * platform/mac/WebCoreSystemInterface.h:
1742         (wkGetHTTPPipeliningPriority): Added.
1743         (wkSetHTTPPipeliningPriority): Added.
1744         * platform/mac/WebCoreSystemInterface.mm:
1745         (wkGetHTTPPipeliningPriority): Added.
1746         (wkSetHTTPPipeliningPriority): Added.
1747
1748         * platform/network/ResourceRequestBase.cpp:
1749         (WebCore::ResourceRequestBase::adopt): Set m_priority when
1750         adopting a CrossThreadResourceRequestData.
1751         (WebCore::ResourceRequestBase::copyData): Set m_priority when
1752         creating a CrossThreadResourceRequestData.
1753         (WebCore::ResourceRequestBase::priority): Added.
1754         (WebCore::ResourceRequestBase::setPriority): Added.
1755         (WebCore::equalIgnoringHeaderFields): Priorities must match when
1756         comparing two ResourceRequest objects.
1757
1758         * platform/network/ResourceRequestBase.h:
1759         (WebCore::ResourceRequestBase::ResourceRequestBase): Set default
1760         priority of new objects to ResourceLoadPriorityLow.
1761         (WebCore::ResourceRequestBase::priority): Added declaration.
1762         (WebCore::ResourceRequestBase::setPriority): Added declaration.
1763         (WebCore::isHTTPPipeliningEnabled): Added.
1764         (WebCore::shouldUseHTTPPipeliningPriority): Added.
1765
1766         * platform/network/cf/ResourceRequestCFNet.cpp: Updated so that
1767         Mac OS X and Windows share code.
1768         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Always
1769         set the HTTP connection count per host, but return an
1770         'unlimited' value when using HTTP pipelining.  This method used
1771         to be defined in ResourceRequestMac.mm for Mac OS X.
1772         (WebCore::readBooleanPreference): Added.  Helper method for
1773         reading boolean user defaults.
1774         (WebCore::isHTTPPipeliningEnabled): Returns value of user
1775         default key WebKitEnableHTTPPipelining, or false if not set.
1776         (WebCore::shouldUseHTTPPipeliningPriority): Returns value of
1777         user default key WebKitForceHTTPPipeliningPriorityHigh, or false
1778         if not set.
1779         * platform/network/cf/ResourceRequestCFNet.h: Updated so that
1780         Mac OS X and Windows share code.  Fixed indentation.
1781         (WebCore::mapHTTPPipeliningPriorityToResourceLoadPriority): Added.
1782         (WebCore::mapResourceLoadPriorityToHTTPPipeliningPriority): Added.
1783
1784         * platform/network/mac/ResourceRequestMac.mm:
1785         (WebCore::ResourceRequest::doUpdatePlatformRequest): Update
1786         HTTP pipelining priority on NSMutableFURLRequest object.
1787         (WebCore::ResourceRequest::doUpdateResourceRequest): Update
1788         m_priority from the NSURLRequest object.
1789         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Removed.
1790         Code is now shared with Windows in ResourceRequestCFNet.cpp.
1791
1792 2011-01-26  Beth Dakin  <bdakin@apple.com>
1793
1794         Reviewed by Darin Adler.
1795
1796         Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics 
1797         when using WKScrollbars.
1798
1799         New WebKitSystemInterface Functionality.
1800         * WebCore.exp.in:
1801         * platform/mac/WebCoreSystemInterface.h:
1802         * platform/mac/WebCoreSystemInterface.mm:
1803
1804         Some of the terrible static arrays are now only needed in the 
1805         old non-WK code, so they are if-def'd now.
1806         * platform/mac/ScrollbarThemeMac.mm:
1807         
1808         Just patching this function in a better way than I did
1809         before.
1810         (WebCore::updateArrowPlacement):
1811         
1812         Call into WK for the right values.
1813         (WebCore::ScrollbarThemeMac::scrollbarThickness):
1814         (WebCore::ScrollbarThemeMac::hasThumb):
1815         (WebCore::ScrollbarThemeMac::minimumThumbLength):
1816         
1817         Return false if there are no buttons.
1818         (WebCore::ScrollbarThemeMac::hasButtons):
1819
1820         Return an empty IntRect if there are not buttons.
1821         (WebCore::buttonRepaintRect):
1822
1823 2011-01-26  Sam Weinig  <sam@webkit.org>
1824
1825         Reviewed by Maciej Stachowiak.
1826
1827         Add events to represent the start/end of a gesture scroll
1828         https://bugs.webkit.org/show_bug.cgi?id=53215
1829
1830         * WebCore.exp.in: 
1831         Add new file.
1832
1833         * WebCore.xcodeproj/project.pbxproj:
1834         Add new file.
1835
1836         * page/EventHandler.cpp:
1837         (WebCore::EventHandler::handleGestureEvent):
1838         * page/EventHandler.h:
1839         Add entry point for handling gesture events.
1840
1841         * platform/PlatformGestureEvent.h: Added.
1842         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
1843         (WebCore::PlatformGestureEvent::type):
1844         (WebCore::PlatformGestureEvent::position):
1845         (WebCore::PlatformGestureEvent::globalPosition):
1846         (WebCore::PlatformGestureEvent::timestamp):
1847         Add platform agnostic representation of a gesture event.
1848
1849 2011-01-26  Dan Bernstein  <mitz@apple.com>
1850
1851         Reviewed by Dave Hyatt.
1852
1853         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
1854         https://bugs.webkit.org/show_bug.cgi?id=53184
1855
1856         Tests: fast/text/justify-ideograph-complex.html
1857                fast/text/justify-ideograph-simple.html
1858                fast/text/justify-ideograph-vertical.html
1859
1860         * html/canvas/CanvasRenderingContext2D.cpp:
1861         (WebCore::CanvasRenderingContext2D::drawTextInternal): Corrected the type of the third parameter
1862         passed to the TextRun constructor and added the trailingExpansionBehavior parameter.
1863         * platform/graphics/Font.cpp:
1864         (WebCore::Font::expansionOpportunityCount): Added. Returns the number of expansion opportunities
1865         for text justification. On entry, isAfterExpansion says whether an expansion opportunity exists
1866         before the first character. On return, isAfterExpansion says whether an expansion opportunity
1867         exists after the last character.
1868         * platform/graphics/Font.h: 
1869         * platform/graphics/GlyphBuffer.h:
1870         (WebCore::GlyphBuffer::expandLastAdvance): Added.
1871         * platform/graphics/TextRun.h:
1872         (WebCore::TextRun::TextRun): Added a TrailingExpansionBehavior parameter to the constructors.
1873         Renamed padding to expansion.
1874         (WebCore::TextRun::expansion): Renamed padding() to this.
1875         (WebCore::TextRun::allowsTrailingExpansion): Added this accessor.
1876         * platform/graphics/WidthIterator.cpp:
1877         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion. Use Font::expansionOpportunityCount()
1878         and adjust the count if it includes a trailing expansion opportunity but the run disallows trailing
1879         expansion.
1880         (WebCore::WidthIterator::advance): Apply expansion before and after CJK ideographs.
1881         (WebCore::WidthIterator::advanceOneCharacter): Changed to not clear the GlyphBuffer so that advance()
1882         can expand the last advance if it is followed by a CJK ideograph.
1883         * platform/graphics/WidthIterator.h: Renamed m_padding to m_expansion and m_padPerSpace
1884         to m_expansionPerOpportunity.
1885         * platform/graphics/chromium/FontChromiumWin.cpp:
1886         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1887         * platform/graphics/chromium/FontLinux.cpp:
1888         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1889         * platform/graphics/efl/FontEfl.cpp:
1890         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1891         * platform/graphics/gtk/FontGtk.cpp:
1892         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1893         * platform/graphics/haiku/FontHaiku.cpp:
1894         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1895         * platform/graphics/mac/ComplexTextController.cpp:
1896         (WebCore::ComplexTextController::ComplexTextController): Initialize m_isAfterExpansion. Use
1897         Font::expansionOpportunityCount() and adjust the count if it includes a trailing expansion
1898         opportunity but the run disallows trailing expansion.
1899         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Moved the definition and initialization
1900         of hasExtraSpacing outside the loop. Apply expansion before and after CJK ideographs.
1901         * platform/graphics/mac/ComplexTextController.h: Renamed m_padding to m_expansion and m_padPerSpace
1902         to m_expansionPerOpportunity.
1903         * platform/graphics/mac/FontMac.mm:
1904         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1905         * platform/graphics/qt/FontQt.cpp:
1906         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1907         * platform/graphics/win/FontWin.cpp:
1908         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1909         * platform/graphics/win/UniscribeController.cpp:
1910         (WebCore::UniscribeController::UniscribeController): Updated for rename.
1911         * platform/graphics/wince/FontWinCE.cpp:
1912         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1913         * platform/graphics/wx/FontWx.cpp:
1914         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
1915         * rendering/EllipsisBox.cpp:
1916         (WebCore::EllipsisBox::paint): Pass a TrailingExpansionBehavior to the TextRun constructor.
1917         (WebCore::EllipsisBox::selectionRect): Ditto.
1918         (WebCore::EllipsisBox::paintSelection): Ditto.
1919         * rendering/InlineBox.h:
1920         (WebCore::InlineBox::InlineBox): Renamed m_toAdd to m_expansion.
1921         (WebCore::InlineBox::expansion): Renamed toAdd() to this.
1922         * rendering/InlineTextBox.cpp:
1923         (WebCore::InlineTextBox::selectionRect): Pass a TrailingExpansionBehavior to the TextRun constructor.
1924         (WebCore::InlineTextBox::paint): Ditto.
1925         (WebCore::InlineTextBox::paintSelection): Ditto.
1926         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
1927         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
1928         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
1929         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
1930         (WebCore::InlineTextBox::offsetForPosition): Ditto.
1931         (WebCore::InlineTextBox::positionForOffset): Ditto.
1932         * rendering/InlineTextBox.h:
1933         (WebCore::InlineTextBox::setExpansion): Renamed setSpaceAdd() to this.
1934         (WebCore::InlineTextBox::trailingExpansionBehavior): Added. Trailing expansion is allowed if this
1935         is not the last leaf box on the line.
1936         * rendering/RenderBlockLineLayout.cpp:
1937         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Keep expansion opportunity counts
1938         in a vector instead of computing them twice. Discard the trailing expansion opportunity in the
1939         last text box.
1940         * rendering/RenderFileUploadControl.cpp:
1941         (WebCore::RenderFileUploadControl::paintObject): Pass a TrailingExpansionBehavior to the TextRun constructor.
1942         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): Ditto.
1943         * rendering/RenderListBox.cpp:
1944         (WebCore::RenderListBox::updateFromElement): Ditto.
1945         (WebCore::RenderListBox::paintItemForeground): Ditto. Also corrected the type of the second parameter.
1946         * rendering/RenderTextControl.cpp:
1947         (WebCore::RenderTextControl::getAvgCharWidth): Ditto.
1948         (WebCore::RenderTextControl::paintPlaceholder): Ditto.
1949         * rendering/svg/SVGInlineTextBox.cpp:
1950         (WebCore::SVGInlineTextBox::constructTextRun): Ditto.
1951
1952 2011-01-26  Andy Estes  <aestes@apple.com>
1953
1954         Rubber-stamped by Darin Adler.
1955
1956         Inline HTMLObjectElement::hasValidClassId().
1957
1958         * html/HTMLObjectElement.cpp:
1959         (WebCore::HTMLObjectElement::hasValidClassId):
1960
1961 2011-01-26  Evan Martin  <evan@chromium.org>
1962
1963         Reviewed by Tony Chang.
1964
1965         [chromium] crash on getBoundingClientRect in complex text
1966         https://bugs.webkit.org/show_bug.cgi?id=53199
1967
1968         Use the correct array bound; we want the number of characters processed by
1969         the shaper, not the longest continuous script run length.
1970
1971         Test: platform/chromium-linux/fast/text/international/complex-text-rectangle.html
1972
1973         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
1974         (WebCore::ComplexTextController::nextScriptRun):
1975         * platform/graphics/chromium/ComplexTextControllerLinux.h:
1976         (WebCore::ComplexTextController::numCodePoints):
1977
1978 2011-01-26  Emil A Eklund  <eae@chromium.org>
1979
1980         Reviewed by Alexey Proskuryakov.
1981
1982         Remove cached document reference from CSSStyleSheet and XSLStyleSheet.
1983         https://bugs.webkit.org/show_bug.cgi?id=52084
1984
1985         Test: fast/dom/css-delete-doc.html
1986
1987         * css/CSSMediaRule.cpp:
1988         (WebCore::CSSMediaRule::insertRule):
1989         (WebCore::CSSMediaRule::deleteRule):
1990         * css/CSSStyleSheet.cpp:
1991         (WebCore::CSSStyleSheet::CSSStyleSheet):
1992         (WebCore::CSSStyleSheet::document):
1993         * css/CSSStyleSheet.h:
1994         * xml/XSLStyleSheet.h:
1995         (WebCore::XSLStyleSheet::parentStyleSheet):
1996         * xml/XSLStyleSheetLibxslt.cpp:
1997         (WebCore::XSLStyleSheet::XSLStyleSheet):
1998         (WebCore::XSLStyleSheet::cachedResourceLoader):
1999         (WebCore::XSLStyleSheet::setParentStyleSheet):
2000         (WebCore::XSLStyleSheet::ownerDocument):
2001         * xml/XSLStyleSheetQt.cpp:
2002         (WebCore::XSLStyleSheet::XSLStyleSheet):
2003         (WebCore::XSLStyleSheet::cachedResourceLoader):
2004         (WebCore::XSLStyleSheet::ownerDocument):
2005
2006 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
2007
2008         Reviewed by Kent Tamura.
2009
2010         Reduce ref-count churn in shadowPseudoId.
2011         https://bugs.webkit.org/show_bug.cgi?id=53136
2012
2013         Refactoring, so no new tests.
2014
2015         * dom/Element.h:
2016         (WebCore::Element::shadowPseudoId): Changed signature to use const AtomicString&
2017         * html/ValidationMessage.cpp:
2018         (WebCore::ElementWithPseudoId::shadowPseudoId): Ditto.
2019         * html/shadow/SliderThumbElement.cpp:
2020         (WebCore::SliderThumbElement::shadowPseudoId): Ditto, plus moved from the header file.
2021         * html/shadow/SliderThumbElement.h: Ditto.
2022         * rendering/MediaControlElements.cpp:
2023         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Ditto.
2024         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Ditto.
2025         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Ditto.
2026         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Ditto.
2027         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Ditto.
2028         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Ditto.
2029         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Ditto.
2030         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Ditto.
2031         (WebCore::MediaControlTimelineElement::shadowPseudoId): Ditto.
2032         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Ditto.
2033         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Ditto.
2034         * rendering/MediaControlElements.h: Ditto.
2035
2036 2011-01-26  Dave Hyatt  <hyatt@apple.com>
2037
2038         Reviewed by Dan Bernstein.
2039
2040         https://bugs.webkit.org/show_bug.cgi?id=46421, make multi-column layout work with vertical text.
2041
2042         Added new tests in fast/multicol/vertical-lr and fast/multicol/vertical-rl.
2043
2044         * css/html.css:
2045         Update p, blockquote and h1-h6 to respect directionality so that column layout tests that use those
2046         elements work properly.
2047
2048         * rendering/InlineFlowBox.cpp:
2049         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2050         Fix a flipping bug with the computation of lineTopIncludingMargins where it could be incorrectly shrunk
2051         in some cases (causing lines to all stack on top of one another).
2052
2053         * rendering/InlineTextBox.h:
2054         (WebCore::InlineTextBox::calculateBoundaries):
2055         Fix calculateBoundaries to be physical rather than logical.
2056
2057         * rendering/LayoutState.cpp:
2058         (WebCore::LayoutState::addForcedColumnBreak):
2059         * rendering/LayoutState.h:
2060         Rename childY to childLogicalOffset.
2061
2062         * rendering/RenderBlock.cpp:
2063         (WebCore::RenderBlock::layoutBlock):
2064         (WebCore::RenderBlock::addOverflowFromChildren):
2065         (WebCore::RenderBlock::addOverflowFromFloats):
2066         (WebCore::RenderBlock::collapseMargins):
2067         (WebCore::RenderBlock::estimateLogicalTopPosition):
2068         (WebCore::RenderBlock::layoutBlockChild):
2069         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
2070         (WebCore::RenderBlock::paintColumnRules):
2071         (WebCore::RenderBlock::paintColumnContents):
2072         (WebCore::RenderBlock::paintFloats):
2073         (WebCore::RenderBlock::selectionGaps):
2074         (WebCore::RenderBlock::removeFloatingObjectsBelow):
2075         (WebCore::RenderBlock::addOverhangingFloats):
2076         (WebCore::RenderBlock::hitTestFloats):
2077         (WebCore::RenderBlock::hitTestColumns):
2078         (WebCore::RenderBlock::calcColumnWidth):
2079         (WebCore::RenderBlock::desiredColumnWidth):
2080         (WebCore::RenderBlock::columnRectAt):
2081         (WebCore::RenderBlock::layoutColumns):
2082         (WebCore::RenderBlock::adjustPointToColumnContents):
2083         (WebCore::RenderBlock::adjustRectForColumns):
2084         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
2085         (WebCore::RenderBlock::adjustForColumns):
2086         (WebCore::RenderBlock::adjustForBorderFit):
2087         (WebCore::RenderBlock::nextPageLogicalTop):
2088         (WebCore::RenderBlock::applyBeforeBreak):
2089         (WebCore::RenderBlock::applyAfterBreak):
2090         (WebCore::RenderBlock::adjustForUnsplittableChild):
2091         (WebCore::RenderBlock::adjustLinePositionForPagination):
2092         * rendering/RenderBlock.h:
2093         (WebCore::RenderBlock::logicalRightOffsetForContent):
2094         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2095         (WebCore::RenderBlock::leftForFloatIncludingMargin):
2096         (WebCore::RenderBlock::topForFloatIncludingMargin):
2097         * rendering/RenderBlockLineLayout.cpp:
2098         (WebCore::RenderBlock::layoutInlineChildren):
2099         (WebCore::RenderBlock::determineStartPosition):
2100         Reworking of all the RenderBlock column functions to support flipping and vertical modes.
2101
2102         * rendering/RenderBox.cpp:
2103         (WebCore::RenderBox::offsetFromContainer):
2104         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
2105         Patch offsetFromContainer to be aware of flipped block writing modes when dealing with column layouts.
2106
2107         * rendering/RenderBox.h:
2108         (WebCore::RenderBox::clientLogicalBottom):
2109         Fix a bug in clientLogicalBottom where it didn't add in the right border/padding.
2110         
2111         * rendering/RenderFlexibleBox.cpp:
2112         (WebCore::RenderFlexibleBox::layoutBlock):
2113         Better terminology for pagination.
2114
2115         * rendering/RenderInline.cpp:
2116         (WebCore::RenderInline::offsetFromContainer):
2117         (WebCore::RenderInline::mapLocalToContainer):
2118         * rendering/RenderLayer.cpp:
2119         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2120         (WebCore::RenderLayer::hitTestChildLayerColumns):
2121         (WebCore::RenderLayer::localBoundingBox):
2122         (WebCore::RenderLayer::boundingBox):
2123         Patch painting in RenderLayers to be vertical-text-aware.
2124     
2125         * rendering/RenderObject.cpp:
2126         (WebCore::RenderObject::mapLocalToContainer):
2127         Add code to be flipped block-aware with columns.
2128
2129         * rendering/RenderTable.cpp:
2130         (WebCore::RenderTable::layout):
2131         * rendering/RenderTableRow.cpp:
2132         (WebCore::RenderTableRow::layout):
2133         * rendering/RenderTableSection.cpp:
2134         (WebCore::RenderTableSection::layoutRows):
2135         Fix pagination to use better terminology.
2136         
2137         * rendering/RenderText.cpp:
2138         (WebCore::RenderText::absoluteQuads):
2139         (WebCore::RenderText::absoluteQuadsForRange):
2140         Fix a bug where vertical text wasn't taken into account.
2141
2142 2011-01-26  Dimitri Glazkov  <dglazkov@chromium.org>
2143
2144         Unreviewed, rolling out r76719.
2145         http://trac.webkit.org/changeset/76719
2146         https://bugs.webkit.org/show_bug.cgi?id=53122
2147
2148         Broke a bunch of media tests in Chromium/Qt/GTK.
2149
2150 2011-01-26  Tony Chang  <tony@chromium.org>
2151
2152         Reviewed by Ryosuke Niwa.
2153
2154         [gtk] strip NUL characters when copying text/html on GTK+
2155         https://bugs.webkit.org/show_bug.cgi?id=52508
2156
2157         Putting NUL characters in the text/html clipboard doesn't work in
2158         WebKit GTK+ (the pasted value is truncated at the NUL).  Since we're
2159         already stripping this character for plain text (for Windows), strip
2160         it in text/html too.
2161
2162         * editing/MarkupAccumulator.h: mark function as virtual
2163         * editing/markup.cpp:
2164         (WebCore::StyledMarkupAccumulator::appendString):
2165         (WebCore::StyledMarkupAccumulator::takeResults): strip nulls
2166
2167 2011-01-26  Mario Sanchez Prada  <msanchez@igalia.com>
2168
2169         Reviewed by Martin Robinson.
2170
2171         [GTK] Reliable crash with getTextAtOffset()
2172         https://bugs.webkit.org/show_bug.cgi?id=53131
2173
2174         Properly calculate length in bytes for a UTF8 substring.
2175
2176         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2177         (utf8Substr): Use character instead of bytes as units to
2178         calculate the length in bytes for the UTF8 string.
2179
2180 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
2181
2182         Reviewed by Kent Tamura.
2183
2184         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
2185         https://bugs.webkit.org/show_bug.cgi?id=53122
2186
2187         This is the first step in converting HTMLMediaElement to the new shadow DOM.
2188
2189         Should not regress any existing tests. No observable change in behavior.
2190
2191         * css/CSSSelector.cpp:
2192         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
2193         (WebCore::nameToPseudoTypeMap): Ditto.
2194         (WebCore::CSSSelector::extractPseudoType): Ditto.
2195         * css/CSSSelector.h: Ditto.
2196         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
2197         * rendering/MediaControlElements.cpp:
2198         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
2199             which is now replaced with virtual shadowPseudoId on each corresponding class.
2200         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
2201         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
2202             display type in constructor.
2203         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
2204             constructor argument.
2205         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
2206         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
2207             to disambiguate from the MediaControlMuteButtonElement.
2208         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
2209         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
2210         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
2211             constructor argument.
2212         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
2213         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
2214             constructor argument.
2215         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
2216         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
2217         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
2218         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
2219         (WebCore::MediaControlSeekBackButtonElement::create): Added.
2220         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
2221         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
2222         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
2223         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
2224             constructor argument.
2225         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
2226         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
2227             constructor argument.
2228         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
2229         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
2230             constructor argument.
2231         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
2232         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
2233             constructor argument.
2234         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
2235         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
2236             constructor argument.
2237         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
2238         * rendering/MediaControlElements.h:
2239         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
2240         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
2241         * rendering/RenderMedia.cpp:
2242         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
2243         (WebCore::RenderMedia::createSeekBackButton): Ditto.
2244         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
2245         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
2246         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
2247
2248 2011-01-26  Kenneth Russell  <kbr@google.com>
2249
2250         Reviewed by James Robinson.
2251
2252         Fix multisampling support in DrawingBuffer
2253         https://bugs.webkit.org/show_bug.cgi?id=53154
2254
2255         In DrawingBuffer's multisampling code path, fixed enum usage and a
2256         bug where it would incorrectly redefine the depth and stencil
2257         buffers. Hooked up multisampling code path in Chromium port.
2258
2259         Tested manually with some accelerated 2D canvas content.
2260         Multisampling isn't being switched on for the accelerated 2D
2261         canvas at the current time because it will increase fill rate
2262         requirements and cause a large number of rebaselines.
2263
2264         * platform/graphics/Extensions3D.h:
2265         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2266         (WebCore::DrawingBuffer::publishToPlatformLayer):
2267         * platform/graphics/chromium/Extensions3DChromium.h:
2268         * platform/graphics/gpu/DrawingBuffer.cpp:
2269         (WebCore::DrawingBuffer::create):
2270         (WebCore::DrawingBuffer::reset):
2271         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2272         (WebCore::Extensions3DOpenGL::supports):
2273
2274 2011-01-26  Tony Chang  <tony@chromium.org>
2275
2276         Unreviewed.
2277
2278         [chromium] revert r68310 because of race conditions detected by tsans
2279         https://bugs.webkit.org/show_bug.cgi?id=53185
2280
2281         Causes stability problems for Chromium, http://crbug.com/70589
2282
2283         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
2284         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
2285
2286 2011-01-26  Justin Schuh  <jschuh@chromium.org>
2287
2288         Reviewed by Adam Barth.
2289
2290         Make fireEventsAndUpdateStyle use stack local vectors. 
2291         https://bugs.webkit.org/show_bug.cgi?id=46760
2292
2293         Test: animations/animation-add-events-in-handler.html
2294
2295         * page/animation/AnimationController.cpp:
2296         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
2297
2298 2011-01-26  Nate Chapin  <japhet@chromium.org>
2299
2300         Reviewed by Adam Barth.
2301
2302         Remove m_URL from FrameLoader and depend on Document::url()
2303         instead. FrameLoader::url() will be removed in a followup patch.
2304         https://bugs.webkit.org/show_bug.cgi?id=41165
2305
2306         Refactor only, no new tests.
2307
2308         * WebCore.exp.in:
2309         * dom/Document.cpp:
2310         (WebCore::Document::Document):
2311         (WebCore::Document::updateURLForPushOrReplaceState):
2312         * loader/DocumentWriter.cpp:
2313         (WebCore::DocumentWriter::begin):
2314         * loader/FrameLoader.cpp:
2315         (WebCore::FrameLoader::iconURL):
2316         (WebCore::FrameLoader::didOpenURL):
2317         (WebCore::FrameLoader::didExplicitOpen):
2318         (WebCore::FrameLoader::receivedFirstData):
2319         (WebCore::FrameLoader::url):
2320         (WebCore::FrameLoader::setOutgoingReferrer):
2321         (WebCore::FrameLoader::startIconLoader):
2322         (WebCore::FrameLoader::commitIconURLToIconDatabase):
2323         (WebCore::FrameLoader::finishedParsing):
2324         (WebCore::FrameLoader::checkIfDisplayInsecureContent):
2325         (WebCore::FrameLoader::checkIfRunInsecureContent):
2326         (WebCore::FrameLoader::updateFirstPartyForCookies):
2327         (WebCore::FrameLoader::loadInSameDocument):
2328         (WebCore::FrameLoader::commitProvisionalLoad):
2329         (WebCore::FrameLoader::open):
2330         (WebCore::FrameLoader::shouldScrollToAnchor):
2331         * loader/FrameLoader.h: Rename setURL() to setOutgoingReferrer().
2332
2333 2011-01-25  Brian Weinstein  <bweinstein@apple.com>
2334
2335         Reviewed by Antti Koivisto.
2336
2337         Crashes loading pages when cancelling subresource loads through WebKit
2338         https://bugs.webkit.org/show_bug.cgi?id=53123
2339         <rdar://problem/8914361>
2340         
2341         Fix a crash that happened when cancelling subresource loads through WebKit.
2342         
2343         When a load is cancelled synchronously (via the WebKit client), CachedResourceLoader::requestResource 
2344         can be called recursively on the same function, either leading to infinite recursion, or deleting 
2345         an object when it is not done being used.
2346         
2347         The fix for this was to call checkForPendingPreloads and servePendingRequests asynchronously when 
2348         CachedResourceLoader::loadDone was called synchronously (due to the load being cancelled synchronously).
2349
2350         Test: fast/loader/willSendRequest-null-for-preload.html
2351
2352         * loader/DocumentLoader.cpp:
2353         (WebCore::DocumentLoader::setRequest): Only dispatch didReceiveServerRedirectForProvisionalLoadForFrame 
2354             if our new URL is non-null.
2355         * loader/cache/CachedResourceLoader.cpp:
2356         (WebCore::CachedResourceLoader::CachedResourceLoader): Initialize our timer.
2357         (WebCore::CachedResourceLoader::loadDone): If the CachedResource we were passed in was 0, that means this 
2358             function was called synchronously
2359             from CachedResourceRequest::load, and we don't want to call into checkForPendingPreloads synchronously, 
2360             so put it on a 0-delay timer to make the calls to checkForPendingPreloads and servePendingRequests asynchronous.
2361         (WebCore::CachedResourceLoader::loadDonePendingActionTimerFired): Call checkForPendingPreloads and servePendingRequests.
2362         (WebCore::CachedResourceLoader::checkForPendingPreloads): m_pendingPreloads is now a Deque instead of a Vector, 
2363             so use Deque methods.
2364         * loader/cache/CachedResourceLoader.h: Add the timer, the timer callback function, and make m_pendingPreloads a Deque.
2365
2366 2011-01-25  Pavel Podivilov  <podivilov@chromium.org>
2367
2368         Reviewed by Pavel Feldman.
2369
2370         Web Inspector: evaluate in console may not work when window.console is substituted or deleted.
2371         https://bugs.webkit.org/show_bug.cgi?id=53072
2372
2373         Test: inspector/console-substituted.html
2374
2375         * inspector/InjectedScriptSource.js:
2376         (.):
2377
2378 2011-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2379
2380         Reviewed by Martin Robinson.
2381
2382         [cairo] Use CAIRO_OPERATOR_DARKEN when available
2383         https://bugs.webkit.org/show_bug.cgi?id=53084
2384
2385         Use CAIRO_OPERATOR_DARKEN for CompositePlusDarker instead of
2386         CAIRO_OPERATOR_SATURATE when building with cairo version >= 1.10.
2387
2388         * platform/graphics/cairo/CairoUtilities.cpp:
2389         (WebCore::toCairoOperator):
2390
2391 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
2392
2393         Reviewed by Yury Semikhatsky.
2394
2395         Web Inspector: visualize \n in strings as unicode cr
2396         symbol in stack variables sidebar.
2397         https://bugs.webkit.org/show_bug.cgi?id=53162
2398
2399         * inspector/front-end/ObjectPropertiesSection.js:
2400         (WebInspector.ObjectPropertyTreeElement.prototype.update):
2401
2402 2011-01-26  Andrey Kosyakov  <caseq@chromium.org>
2403
2404         Reviewed by Pavel Feldman.
2405
2406         Web Inspector: size is wrong for cached resources in Network panel
2407         - Set the size for 304/not modified resources from cached resource.
2408         - Add response headers size to resource transfer size.
2409         https://bugs.webkit.org/show_bug.cgi?id=52886
2410
2411         * inspector/InspectorResourceAgent.cpp:
2412         (WebCore::InspectorResourceAgent::didReceiveResponse):
2413         * inspector/front-end/Resource.js:
2414         (WebInspector.Resource):
2415         (WebInspector.Resource.prototype.get transferSize):
2416         (WebInspector.Resource.prototype.set responseHeaders):
2417         (WebInspector.Resource.prototype._headersSize):
2418         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
2419
2420 2011-01-26  Carol Szabo  <carol.szabo@nokia.com>
2421
2422         Reviewed by Simon Hausmann.
2423
2424         Fixed TiledBacking store to take into account new dirty regions caused by
2425         paint time layouts.
2426
2427         Flawed rendering design for QtWebKit resulting in artifacts being displayed
2428         https://bugs.webkit.org/show_bug.cgi?id=49184
2429
2430         There are no new tests as this patch aims at fixing flicker that
2431         happen randomly, mostly on slow hardware, thus are hard to reproduce
2432         consistently in an automated test.
2433
2434         This patch does not fully address the said bug but it is a step in the
2435         right direction. A full solution to the bug, as currently perceived,
2436         requires either a Qt GUI API change, a performance hit for QtWebKit,
2437         or a hack, until a full solution is provided this patch is progress.
2438
2439         * platform/graphics/TiledBackingStore.cpp:
2440         (WebCore::TiledBackingStore::updateTileBuffers):
2441         Changed to take into account newly dirtied areas created during
2442         tile update initiated layouts during the same update.
2443
2444 2011-01-26  Patrick Gansterer  <paroga@webkit.org>
2445
2446         Reviewed by Andreas Kling.
2447
2448         [SKIA] Remove "current path" of GraphicsContext
2449         https://bugs.webkit.org/show_bug.cgi?id=53124
2450
2451         * platform/graphics/GraphicsContext.h:
2452         * platform/graphics/skia/GraphicsContextSkia.cpp:
2453         (WebCore::GraphicsContext::clipPath):
2454         (WebCore::GraphicsContext::fillPath):
2455         (WebCore::GraphicsContext::strokePath):
2456         * platform/graphics/skia/PathSkia.cpp:
2457         (WebCore::Path::strokeBoundingRect):
2458         * platform/graphics/skia/PlatformContextSkia.cpp:
2459         * platform/graphics/skia/PlatformContextSkia.h:
2460
2461 2011-01-26  Zalan Bujtas <zbujtas@gmail.com>
2462
2463         Reviewed by Andreas Kling.
2464
2465         [Qt] Path::normalAngleAtLength() returns incorrect value on ACID3.
2466
2467         QPainterPath returns angle values with the origo being at the top left corner,
2468         we need to account for this in normalAngleAtLength().
2469         This Regressed with r66979.
2470
2471         No new tests as this is already covered by ACID3.
2472
2473         * platform/graphics/qt/PathQt.cpp:
2474         (WebCore::Path::normalAngleAtLength):
2475
2476 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
2477
2478         Reviewed by Yury Semikhatsky.
2479
2480         Web Inspector: live edit does not update source snippet.
2481         https://bugs.webkit.org/show_bug.cgi?id=53097
2482
2483         * inspector/front-end/ScriptsPanel.js:
2484         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
2485
2486 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
2487
2488         Reviewed by Yury Semikhatsky.
2489
2490         Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'.
2491         https://bugs.webkit.org/show_bug.cgi?id=53018
2492
2493         * inspector/InjectedScript.cpp:
2494         (WebCore::InjectedScript::evaluate):
2495         (WebCore::InjectedScript::evaluateOnCallFrame):
2496         (WebCore::InjectedScript::getCompletions):
2497         (WebCore::InjectedScript::getCompletionsOnCallFrame):
2498         * inspector/InjectedScript.h:
2499         * inspector/InjectedScriptSource.js:
2500         (.):
2501         * inspector/Inspector.idl:
2502         * inspector/InspectorDebuggerAgent.cpp:
2503         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
2504         (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
2505         * inspector/InspectorDebuggerAgent.h:
2506         * inspector/InspectorRuntimeAgent.cpp:
2507         (WebCore::InspectorRuntimeAgent::evaluate):
2508         (WebCore::InspectorRuntimeAgent::getCompletions):
2509         * inspector/InspectorRuntimeAgent.h:
2510         * inspector/front-end/ConsoleView.js:
2511         (WebInspector.ConsoleView.prototype.completions):
2512         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
2513         (WebInspector.ConsoleView.prototype._enterKeyPressed):
2514         * inspector/front-end/ScriptsPanel.js:
2515         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper):
2516         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
2517         * inspector/front-end/SourceFrame.js:
2518         (WebInspector.SourceFrame.prototype._showPopup):
2519         * inspector/front-end/WatchExpressionsSidebarPane.js:
2520         (WebInspector.WatchExpressionsSection.prototype.update):
2521
2522 2011-01-26  Hironori Bono  <hbono@chromium.org>
2523
2524         Reviewed by Kent Tamura.
2525
2526         A speculative fix for Bug 52422 - [chromium] More crash in
2527         FontFallbackList::determinePitch(const Font* font)
2528         https://bugs.webkit.org/show_bug.cgi?id=52422
2529
2530         My previous change may not work on non-US Windows whose system fonts
2531         have localized aliases matching to the system locale because of a
2532         font-name mismatch in createFontIndirectAndGetWinName(). This change
2533         tries all the fonts installed in a PC and returns the first font that we
2534         can create without errors.
2535
2536         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2537         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
2538         Added a struct used for getLastResortFallbackFontProc().
2539         (WebCore::getLastResortFallbackFontProc): Added a callback for EnumFontFamilies().
2540         (WebCore::FontCache::getLastResortFallbackFont): Use EnumFontFamilies() to find a last-resort font.
2541
2542 2011-01-26  James Robinson  <jamesr@chromium.org>
2543
2544         Reviewed by Nate Chapin.
2545
2546         Add a DOMTimeStamp parameter to the requestAnimationFrame callback
2547         https://bugs.webkit.org/show_bug.cgi?id=53142
2548
2549         This adds a DOMTimeStamp parameter to the requestAnimationFrame callback to more
2550         closely match mozilla's proposal.  This is useful if the page has multiple imperative animations
2551         and wants to ensure that they all remain synchronized.  If each callback used Date.now() to
2552         update its animation state, they would potentially be out of sync with each other.  If they use
2553         the timestamp then all callbacks for the same "frame" will update to the same state.
2554
2555         Test: fast/animation/request-animation-frame-timestamps.html
2556
2557         * bindings/scripts/CodeGeneratorV8.pm:
2558         * bindings/scripts/test/V8/V8TestCallback.cpp:
2559         (WebCore::V8TestCallback::callbackWithClass2Param):
2560         * dom/Document.cpp:
2561         (WebCore::Document::serviceScriptedAnimations):
2562         * dom/Document.h:
2563         * dom/RequestAnimationFrameCallback.h:
2564         * dom/RequestAnimationFrameCallback.idl:
2565         * page/FrameView.cpp:
2566         (WebCore::FrameView::serviceScriptedAnimations):
2567         * page/FrameView.h:
2568
2569 2011-01-25  Yuzo Fujishima  <yuzo@google.com>
2570
2571         Unreviewed attempt to fix compilation error for Chromium Clang.
2572
2573         * platform/graphics/mac/ComplexTextController.cpp:
2574         (WebCore::ComplexTextController::advance):
2575
2576 2011-01-25  Ned Holbrook  <nholbrook@apple.com>
2577
2578         Reviewed by Dan Bernstein.
2579
2580         ComplexTextController incorrectly conflates string length and range of indexes
2581         https://bugs.webkit.org/show_bug.cgi?id=52760
2582
2583         Test: fast/text/offsetForPosition-complex-fallback.html
2584
2585         * platform/graphics/mac/ComplexTextController.cpp:
2586         (WebCore::ComplexTextController::offsetForPosition):
2587         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2588         (WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic):
2589         (WebCore::ComplexTextController::advance):
2590         * platform/graphics/mac/ComplexTextController.h:
2591         (WebCore::ComplexTextController::ComplexTextRun::create):
2592         (WebCore::ComplexTextController::ComplexTextRun::indexEnd):
2593         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
2594         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2595         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
2596         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2597         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
2598
2599 2011-01-25  Sam Weinig  <sam@webkit.org>
2600
2601         Reviewed by David Hyatt.
2602
2603         Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area
2604         https://bugs.webkit.org/show_bug.cgi?id=53048
2605
2606         Test: fast/overflow/overflow-rtl-vertical-origin.html
2607
2608         * rendering/RenderLayer.cpp:
2609         (WebCore::RenderLayer::scrollPosition):
2610         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2611         Take the scroll origin into account when calculating scrollbars in more places.
2612
2613 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
2614
2615         Windows production build fix.
2616         Use correct configuration-specific path in makefile.
2617
2618         * WebCore.vcproj/WebCore.make:
2619
2620 2011-01-25  Kent Tamura  <tkent@chromium.org>
2621
2622         Reviewed by Dimitri Glazkov.
2623
2624         Radio button group state is not restored correctly
2625         https://bugs.webkit.org/show_bug.cgi?id=50442
2626
2627         Fixes a bug that radio button states are not restored correctly in
2628         a case that non-first radio button in a group is checked.
2629
2630         If "checked" attribute is present, the radio button is checked and
2631         other radio buttons in the group are unchecked. This behavior
2632         disturbs form state restoring. This patch changes this behavior so
2633         that the "checked" attribute handling is delayed after form state
2634         restoring.
2635
2636         Test: fast/forms/state-restore-radio-group.html
2637
2638         * html/HTMLFormControlElement.h:
2639          Make finishParsingChildren() protected so that HTMLInpuElement can call it.
2640         * html/HTMLInputElement.cpp:
2641         (WebCore::HTMLInputElement::HTMLInputElement):
2642          - Add createdByParser parameter.
2643          - Initialize m_stateRestored and m_parsingInProgress.
2644         (WebCore::HTMLInputElement::create): Sync with the constructor.
2645         (WebCore::HTMLInputElement::restoreFormControlState):
2646          Set m_stateRestored in order to refer it in finishParsingChildren().
2647         (WebCore::HTMLInputElement::parseMappedAttribute):
2648          Don't call setChecked() during parsing. Move setNeedsValidityCheck()
2649          to setChecked().
2650         (WebCore::HTMLInputElement::finishParsingChildren):
2651          Call setChecked() if form state is not restored.
2652         (WebCore::HTMLInputElement::setChecked):
2653          Move setNeedsValidityCheck() from parseMappedAttribute() because
2654          finishParsingChildren() also needs to call setNeedsValidityCheck().
2655         * html/HTMLInputElement.h:
2656          - Remove the default value of HTMLFormElement* of the HTMLInputElement
2657            constructor, and add createdByParser parameter.
2658          - Introduce m_parsingInProgress and m_stateRestored.
2659         * html/HTMLIsIndexElement.cpp:
2660         (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
2661          Sync with the HTMLInputElement constructor change.
2662         * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser flag.
2663         * rendering/MediaControlElements.cpp:
2664         (WebCore::MediaControlInputElement::MediaControlInputElement):
2665          Sync with the HTMLInputElement constructor change.
2666         * rendering/ShadowElement.cpp:
2667         (WebCore::ShadowInputElement::ShadowInputElement): ditto.
2668         * rendering/ShadowElement.h:
2669         (WebCore::ShadowElement::ShadowElement): ditto.
2670
2671 2011-01-25  Kent Tamura  <tkent@chromium.org>
2672
2673         Reviewed by Dimitri Glazkov.
2674
2675         HTMLFormElement::checkValidity() returns incorrect result if 'invalid' events are canceled.
2676         https://bugs.webkit.org/show_bug.cgi?id=52565
2677
2678         * html/HTMLFormElement.cpp:
2679         (WebCore::HTMLFormElement::validateInteractively):
2680           Check checkInvalidControlsAndCollectUnhandled() result instead of
2681           checking emptiness of unhandled invalid controls list.
2682         (WebCore::HTMLFormElement::checkValidity): ditto.
2683         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
2684           Renamed from collectUnhandledInvalidControls().
2685           Returns true if there is any invalid control regardless of event canceling.
2686         * html/HTMLFormElement.h: Rename collectUnhandledInvalidControls() to
2687           checkInvalidControlsAndCollectUnhandled().
2688
2689 2011-01-25  Kent Tamura  <tkent@chromium.org>
2690
2691         Reviewed by Dimitri Glazkov.
2692
2693         Range and number inputs should reject increment and decrement by
2694         keyboard or mouse wheel if they are disabled or read-only
2695         https://bugs.webkit.org/show_bug.cgi?id=53151
2696
2697         * html/RangeInputType.cpp:
2698         (WebCore::RangeInputType::handleKeydownEvent): Check disabled() and readOnly().
2699         * html/TextFieldInputType.cpp:
2700         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): ditto.
2701         (WebCore::TextFieldInputType::handleWheelEventForSpinButton): ditto.
2702
2703 2011-01-25  Kent Tamura  <tkent@chromium.org>
2704
2705         Reviewed by Dimitri Glazkov.
2706
2707         API to support localized numbers for <input type=number>
2708         https://bugs.webkit.org/show_bug.cgi?id=45730
2709
2710         Introduce platform/text/LocalizedNumber.h, and
2711         LocalizedNumberNone.cpp, which is an empty implementation of the
2712         functions in LocalizedNumber.h.  We use LocalizedNumberNone.cpp in
2713         all platforms for now.
2714
2715         A string in a type=number field is parsed as a localized number
2716         first. If the parsing fails, it is parsed as the HTML5 number.
2717
2718         We introduce HTMLInputElement::visibleValue(). It represents a value
2719         which should be drawn by a renderer. HTMLInputElement::value() always
2720         returns a number formatted for HTML5, and visibleValue() may return a
2721         localized number.
2722
2723         No new tests because this doesn't change any behavior.
2724
2725         * Android.mk: Add LocalizedNumber.h and/or LocalizedNumberNone.cpp.
2726         * CMakeLists.txt: ditto.
2727         * GNUmakefile.am: ditto.
2728         * WebCore.gypi: ditto.
2729         * WebCore.pro: ditto.
2730         * WebCore.vcproj/WebCore.vcproj: ditto.
2731         * WebCore.xcodeproj/project.pbxproj: ditto.
2732         * dom/InputElement.h: Add visibleValue().
2733         * html/HTMLInputElement.cpp:
2734         (WebCore::HTMLInputElement::visibleValue): Added.  Just call InputType::visibleValue().
2735         * html/HTMLInputElement.h: Declare visibleValue().
2736         * html/InputType.cpp:
2737         (WebCore::InputType::visibleValue): Add the default implementation of
2738           visibleValue(), which returns HTMLInputElement::value().
2739         * html/InputType.h: Add declarations.
2740         * html/NumberInputType.cpp:
2741         (WebCore::isHTMLNumberCharacter): Renamed from isNumberCharacter().
2742         (WebCore::isNumberCharacter): Calls isLocalizedNumberCharacter() and isHTMLNumberCharacter().
2743         (WebCore::NumberInputType::visibleValue):
2744           Returns a localized number string produced by formatLocalizedNumber().
2745         (WebCore::NumberInputType::isAcceptableValue): Calls parseLocalizedNumber().
2746         (WebCore::NumberInputType::sanitizeValue): Calls parseLocalizedNumber().
2747         * html/NumberInputType.h: Add declarations.
2748         * platform/text/LocalizedNumber.h: Added.
2749         * platform/text/LocalizedNumberNone.cpp: Added.
2750         (WebCore::parseLocalizedNumber):
2751         (WebCore::formatLocalizedNumber):
2752         (WebCore::isLocalizedNumberCharacter):
2753         * rendering/RenderTextControlSingleLine.cpp:
2754         (WebCore::RenderTextControlSingleLine::updateFromElement):
2755           Calls InputElement::visibleValue() instead of value().
2756         * wml/WMLInputElement.h:
2757         (WebCore::WMLInputElement::visibleValue): Added. It just calls value().
2758
2759 2011-01-25  Alexey Proskuryakov  <ap@apple.com>
2760
2761         Reviewed by Darin Adler.
2762
2763         https://bugs.webkit.org/show_bug.cgi?id=53143
2764         Add IntRectHash
2765
2766         * WebCore.xcodeproj/project.pbxproj:
2767         * platform/graphics/IntRectHash.h: Added.
2768
2769         * platform/graphics/IntSizeHash.h: Don't do "using WebCore::IntSize"!
2770
2771 2011-01-25  Ilya Sherman  <isherman@chromium.org>
2772
2773         Reviewed by Ryosuke Niwa.
2774
2775         Remove trailing whitespace in HTMLInputElement.cpp
2776         https://bugs.webkit.org/show_bug.cgi?id=53152
2777
2778         * html/HTMLInputElement.cpp:
2779         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
2780         (WebCore::HTMLInputElement::applyStep):
2781         (WebCore::HTMLInputElement::updateFocusAppearance):
2782         (WebCore::HTMLInputElement::mapToEntry):
2783         (WebCore::HTMLInputElement::setAutofilled):
2784         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
2785         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
2786
2787 2011-01-25  Mike Reed  <reed@google.com>
2788
2789         Reviewed by James Robinson.
2790
2791         DrawingBufer::reset() today checks if the new size is the same as its
2792         m_size, and if so, returns immediately. This does not match the
2793         semantics of <canvas>, which wants to clear its contents anytime the
2794         size is specified.
2795         https://bugs.webkit.org/show_bug.cgi?id=53149
2796
2797         Test: Covered by existing <canvas> tests using gpu.
2798
2799         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2800         (WebCore::DrawingBuffer::DrawingBuffer):
2801         * platform/graphics/gpu/DrawingBuffer.cpp:
2802         (WebCore::DrawingBuffer::reset):
2803
2804 2011-01-25  Cris Neckar  <cdn@chromium.org>
2805
2806         Reviewed by Adam Barth.
2807
2808         Add a hashset of DOMURLs to ScriptExecutionContext to track back references.
2809         https://bugs.webkit.org/show_bug.cgi?id=53038
2810
2811         Test: fast/dom/window-domurl-crash.html
2812
2813         * dom/ScriptExecutionContext.cpp:
2814         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
2815         (WebCore::ScriptExecutionContext::createdDomUrl):
2816         (WebCore::ScriptExecutionContext::destroyedDomUrl):
2817         * dom/ScriptExecutionContext.h:
2818         (WebCore::ScriptExecutionContext::domUrls):
2819         * html/DOMURL.cpp:
2820         (WebCore::DOMURL::DOMURL):
2821         (WebCore::DOMURL::~DOMURL):
2822         (WebCore::DOMURL::contextDestroyed):
2823         * html/DOMURL.h:
2824         (WebCore::DOMURL::scriptExecutionContext):
2825
2826 2011-01-23  Antti Koivisto  <antti@apple.com>
2827
2828         Reviewed by Darin Adler.
2829
2830         https://bugs.webkit.org/show_bug.cgi?id=52983
2831         Eliminate m_tagHistory pointer from CSSSelector
2832
2833         Keep the component selectors in the array in CSSSelectorList instead
2834         of maintaining a linked list between them. This allows eliminating
2835         m_tagHistory pointer, shrinking CSSSelector by 25% (selection performance
2836         seems to improve some too due to better locality).
2837
2838         * WebCore.xcodeproj/project.pbxproj:
2839         
2840             Make CSSSelector.h a private header.
2841         
2842         * css/CSSGrammar.y:
2843         
2844             Use CSSParserSelector during parsing to keep the tag history in 
2845             a linked list. This is flattened to an array after parsing.
2846             Use accessors for setting selector values.
2847             Use OwnPtr in selector vector.
2848             
2849         * css/CSSPageRule.cpp:
2850         (WebCore::CSSPageRule::CSSPageRule):
2851         * css/CSSPageRule.h:
2852         (WebCore::CSSPageRule::create):
2853         
2854             Simplify.
2855     
2856         * css/CSSParser.cpp:
2857         (WebCore::CSSParser::~CSSParser):
2858         (WebCore::CSSParser::createFloatingSelector):
2859         (WebCore::CSSParser::sinkFloatingSelector):
2860         (WebCore::CSSParser::createStyleRule):
2861         (WebCore::CSSParser::updateSpecifiersWithElementName):
2862         (WebCore::CSSParser::createPageRule):
2863         * css/CSSParser.h:
2864         (WebCore::CSSParser::reusableSelectorVector):
2865         
2866             CSSSelector -> CSSParserSelector.
2867             Use OwnPtr in selector vector.
2868             
2869         * css/CSSParserValues.cpp:
2870         (WebCore::CSSParserSelector::CSSParserSelector):
2871         (WebCore::CSSParserSelector::~CSSParserSelector):
2872         * css/CSSParserValues.h:
2873         (WebCore::CSSParserSelector::releaseSelector):
2874         (WebCore::CSSParserSelector::setTag):
2875         (WebCore::CSSParserSelector::setValue):
2876         (WebCore::CSSParserSelector::setAttribute):
2877         (WebCore::CSSParserSelector::setArgument):
2878         (WebCore::CSSParserSelector::setSimpleSelector):
2879         (WebCore::CSSParserSelector::setMatch):
2880         (WebCore::CSSParserSelector::setRelation):
2881         (WebCore::CSSParserSelector::setForPage):
2882         (WebCore::CSSParserSelector::pseudoType):
2883         (WebCore::CSSParserSelector::isUnknownPseudoElement):
2884         (WebCore::CSSParserSelector::isSimple):
2885         (WebCore::CSSParserSelector::tagHistory):
2886         (WebCore::CSSParserSelector::setTagHistory):
2887         
2888             Linked list used during parsing.
2889             Avoid recursive destruction.
2890
2891         * css/CSSSelector.cpp:
2892         (WebCore::CSSSelector::extractPseudoType):
2893         (WebCore::CSSSelector::operator==):
2894         (WebCore::CSSSelector::selectorText):
2895         (WebCore::CSSSelector::setSimpleSelector):
2896         * css/CSSSelector.h:
2897         (WebCore::CSSSelector::CSSSelector):
2898         (WebCore::CSSSelector::~CSSSelector):
2899         (WebCore::CSSSelector::tagHistory):
2900         (WebCore::CSSSelector::tag):
2901         (WebCore::CSSSelector::value):
2902         (WebCore::CSSSelector::setTag):
2903         (WebCore::CSSSelector::isLastInTagHistory):
2904         (WebCore::CSSSelector::setNotLastInTagHistory):
2905         (WebCore::CSSSelector::RareData::RareData):
2906         (WebCore::CSSSelector::RareData::~RareData):
2907         (WebCore::CSSSelector::createRareData):
2908         (WebCore::CSSSelector::setValue):
2909         
2910             Remove m_tagHistory.
2911             Keep m_value in the union with the rare data pointer instead.
2912             Make m_value and m_tag private, implement accessors.
2913             Add a new bit to indicate end of the tag history (multipart selector).
2914             Eliminate complex destruction. Selectors are now deleted as an array or by a CSSParserSelector chain.
2915             
2916         * css/CSSSelectorList.cpp:
2917         (WebCore::CSSSelectorList::adoptSelectorVector):
2918         
2919             Flatten everything to an array.
2920         
2921         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2922         * css/CSSSelectorList.h:
2923         (WebCore::CSSSelectorList::hasOneSelector):
2924         (WebCore::CSSSelectorList::next):
2925         
2926             Skip over the subparts of multipart selectors to find the next selector.
2927     
2928         * css/CSSStyleRule.h:
2929         (WebCore::CSSStyleRule::adoptSelectorVector):
2930         
2931             CSSSelector -> CSSParserSelector.
2932             
2933         * css/CSSStyleSelector.cpp:
2934         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2935         (WebCore::CSSRuleSet::addRule):
2936         (WebCore::collectIdsAndSiblingRulesFromList):
2937         (WebCore::CSSStyleSelector::matchPageRulesForList):
2938         * dom/Node.cpp:
2939         (WebCore::Node::querySelector):
2940         * dom/SelectorNodeList.cpp:
2941         (WebCore::createSelectorNodeList):
2942         
2943             Use accessors.
2944
2945 2011-01-25  James Simonsen  <simonjam@chromium.org>
2946
2947         Reviewed by Tony Chang.
2948
2949         [Chromium] Support small caps in complex text on linux
2950         https://bugs.webkit.org/show_bug.cgi?id=53051
2951
2952         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2953         (WebCore::ComplexTextController::nextScriptRun): Break runs at small caps boundaries.
2954         (WebCore::ComplexTextController::setupFontForScriptRun): Setup small caps font data if needed.
2955         * platform/graphics/chromium/ComplexTextControllerLinux.h: Store small caps text in separate string.
2956
2957 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
2958
2959         Rubber-stamped by Adam Roben.
2960
2961         Windows production build fix.
2962         Use correct environment variable escaping
2963
2964         * WebCore.vcproj/WebCore.make:
2965
2966 2011-01-25  Adam Barth  <abarth@webkit.org>
2967
2968         Reviewed by Eric Seidel.
2969
2970         Empty URLs are never display isolated
2971         https://bugs.webkit.org/show_bug.cgi?id=53053
2972
2973         This check mirrors the check in the local case.  There isn't a good way
2974         to test this with a LayoutTest, but it is tested in Chromium (where
2975         this registry is used).
2976
2977         * platform/SchemeRegistry.cpp:
2978         (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated):
2979
2980 2011-01-25  Sam Weinig  <sam@webkit.org>
2981
2982         Reviewed by Anders Carlsson.
2983
2984         Pipe a timestamp down into the PlatformWheelEvent for the Mac.
2985         https://bugs.webkit.org/show_bug.cgi?id=53111
2986
2987         * platform/PlatformWheelEvent.h:
2988         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2989         (WebCore::PlatformWheelEvent::timestamp):
2990         Add timestamp member.
2991
2992         * platform/mac/WheelEventMac.mm:
2993         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2994         Initialize the timestamp from the event.
2995
2996 2011-01-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2997
2998         Unreviewed, rolling out r76625.
2999         http://trac.webkit.org/changeset/76625
3000         https://bugs.webkit.org/show_bug.cgi?id=53119
3001
3002         "incorrect pixel test results" (Requested by rniwa on
3003         #webkit).
3004
3005         * rendering/RenderBox.cpp:
3006         (WebCore::RenderBox::localCaretRect):
3007
3008 2011-01-25  Patrick Gansterer  <paroga@webkit.org>
3009
3010         Unreviewed WinCE build fix for r76614.
3011
3012         * platform/FileSystem.h:
3013
3014 2011-01-21  Levi Weintraub  <leviw@chromium.org>
3015
3016         Reviewed by Darin Adler.
3017
3018         Adding border and padding to the calculation of the local caret rect for RenderBoxes.
3019
3020         Undo moves caret to invalid position
3021         https://bugs.webkit.org/show_bug.cgi?id=49744
3022
3023         Tests: editing/selection/caret-painting-after-paste-undo-rtl.html
3024                editing/selection/caret-painting-after-paste-undo.html
3025
3026         * rendering/RenderBox.cpp:
3027         (WebCore::RenderBox::localCaretRect):
3028
3029 2011-01-25  Sam Weinig  <sam@webkit.org>
3030
3031         Reviewed by Anders Carlsson.
3032
3033         Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
3034         https://bugs.webkit.org/show_bug.cgi?id=53107
3035
3036         * platform/PlatformWheelEvent.h:
3037         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3038         (WebCore::PlatformWheelEvent::hasPreciseScrollingDeltas):
3039         * platform/mac/WheelEventMac.mm:
3040         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3041
3042 2011-01-20  Jer Noble  <jer.noble@apple.com>
3043
3044         Reviewed by Eric Carlson.
3045
3046         REGRESSION (r72119): Audio never plays on Star Wars intro animation
3047         https://bugs.webkit.org/show_bug.cgi?id=52467
3048         
3049         QuickTime's eat/m4a movie importer compontent doesn't list audio/m4a as a mime
3050         type which it supports, though it handles .m4a files just fine.  Change the way
3051         we build the list of supported MIME Types through a new WebKitSystemInterface
3052         function.
3053         
3054         Caused by r72119, which adds system-specific extension->MIME entries to the cache
3055         before global entries, and the system-specific entries include QuickTime's registry 
3056         entries which contain the audio/m4a MIME type, while its components do not.
3057
3058         Test: media/audio-mpeg4-supported.html
3059
3060         * WebCore.vcproj/QTMovieWinCommon.vsprops:
3061         * platform/graphics/win/QTMovie.cpp:
3062         (getMIMETypeCallBack):
3063         (initializeSupportedTypes):
3064         (QTMovie::countSupportedTypes): gSupportedTypes is now a CFArrayRef.
3065         (QTMovie::getSupportedType): Ditto.
3066
3067 2011-01-25  Hans Wennborg  <hans@chromium.org>
3068
3069         Reviewed by Jeremy Orlow.
3070
3071         IndexedDB: Remove PlatformBridge::idbShutdown()
3072         https://bugs.webkit.org/show_bug.cgi?id=53077
3073
3074         Since Chromium r72157, this is not used anymore. The previous use was
3075         to signal to the embedder that IndexedDB was shutting down, but we
3076         agreed it is better if the embedder keeps track of that itself.
3077
3078         No new tests: this does not change any functionality.
3079
3080         * platform/chromium/PlatformBridge.h:
3081         * storage/IDBFactoryBackendInterface.cpp:
3082         * storage/IDBFactoryBackendInterface.h:
3083         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
3084         * storage/chromium/IDBFactoryBackendInterface.cpp:
3085
3086 2011-01-25  Darin Adler  <darin@apple.com>
3087
3088         Reviewed by Anders Carlsson.
3089
3090         WebKit is using CSBackupSetItemExcluded incorrectly
3091         https://bugs.webkit.org/show_bug.cgi?id=53095
3092         rdar://problem/8790540
3093
3094         * loader/icon/IconDatabase.cpp:
3095         (WebCore::IconDatabase::performOpenInitialization): Added code to
3096         exclude the database from backup one time, and record inside the
3097         database that this has been done.
3098         (WebCore::IconDatabase::wasExcludedFromBackup): Added.
3099         (WebCore::IconDatabase::setWasExcludedFromBackup): Added.
3100         * loader/icon/IconDatabase.h: Added new functions above.
3101
3102         * platform/FileSystem.cpp:
3103         (WebCore::canExcludeFromBackup): Added.
3104         (WebCore::excludeFromBackup): Added.
3105
3106         * platform/FileSystem.h: Added canExcludeFromBackup, excludeFromBackup,
3107         and pathAsURL functions. Cleaned up ifdefs and comments a bit and sorted
3108         things alphabetically, particularly platform-specific sections.
3109
3110         * platform/cf/FileSystemCF.cpp:
3111         (WebCore::pathAsURL): Added.
3112
3113         * platform/mac/FileSystemMac.mm:
3114         (WebCore::canExcludeFromBackup): Added.
3115         (WebCore::excludeFromBackup): Added.
3116
3117         * platform/network/cf/FormDataStreamCFNet.cpp:
3118         (WebCore::advanceCurrentStream): Changed to call pathAsURL.
3119         * platform/network/mac/FormDataStreamMac.mm:
3120         (WebCore::advanceCurrentStream): Ditto.
3121
3122 2011-01-25  Helder Correia  <helder@sencha.com>
3123
3124         Reviewed by Dirk Schulze.
3125
3126         REGRESSION(75139): SVG gradients are not applied to texts
3127         https://bugs.webkit.org/show_bug.cgi?id=52531
3128
3129         CGContextConcatCTM should use the CGLayer context, not the
3130         GraphicsContext. Also, the CTM needs to be adjusted (translated).
3131         This fixes SVG text gradient fill.
3132
3133         Test: svg/css/composite-shadow-text.svg
3134
3135         * platform/graphics/cg/GraphicsContextCG.cpp:
3136         (WebCore::GraphicsContext::fillRect):
3137
3138 2011-01-25  Benjamin Kalman  <kalman@chromium.org>
3139
3140         Reviewed by Ryosuke Niwa.
3141
3142         Cannot extend or modify forward by word over a non-contenteditable region
3143         https://bugs.webkit.org/show_bug.cgi?id=53070
3144
3145         Test: editing/selection/extend-forward-by-word-over-non-editable.html
3146
3147         Change all instances of honorEditableBoundaryAtOrAfter to honorEditableBoundaryAtOrBefore and vice versa in the
3148         functions which determine the end/start of words/lines/sentences in visible_units.cpp.
3149
3150         This fixes the bug where moving forwards by a word over a non-contenteditable region would place the cursor
3151         inside that region, and then get moved back to the start of the word due to honorEditableBoundaryAtOrBefore.
3152         The cursor is now moved to the end of the region (which is effectively a noop in this case).
3153
3154         * editing/visible_units.cpp: Change all instances of honorEditableBoundaryAtOrAfter to
3155         honorEditableBoundaryAtOrBefore and vice versa.
3156         (WebCore::previousWordPosition):
3157         (WebCore::nextWordPosition):
3158         (WebCore::startOfLine):
3159         (WebCore::endOfLine):
3160         (WebCore::previousSentencePosition):
3161         (WebCore::nextSentencePosition):
3162         (WebCore::logicalStartOfLine):
3163         (WebCore::logicalEndOfLine):
3164
3165 2011-01-25  Yael Aharon  <yael.aharon@nokia.com>
3166
3167         Unreviewed build fix.
3168         After r76466, efsrv.lib is used unconditionally.
3169         Don't guard it with ENABLE_NETSCAPE_PLUGIN_API.
3170
3171         * WebCore.pro:
3172
3173 2011-01-24  Zhenyao Mo  <zmo@google.com>
3174
3175         Reviewed by Kenneth Russell.
3176
3177         Style cleanup for WebGLRenderingContext
3178         https://bugs.webkit.org/show_bug.cgi?id=52352
3179
3180         * html/canvas/WebGLBuffer.cpp:
3181         * html/canvas/WebGLBuffer.h:
3182         * html/canvas/WebGLObject.cpp:
3183         * html/canvas/WebGLProgram.cpp:
3184         * html/canvas/WebGLRenderbuffer.cpp:
3185         * html/canvas/WebGLRenderingContext.cpp:
3186         (WebCore::WebGLRenderingContext::create):
3187         (WebCore::WebGLRenderingContext::blendFunc):
3188         (WebCore::WebGLRenderingContext::createShader):
3189         (WebCore::WebGLRenderingContext::deleteBuffer):
3190         (WebCore::WebGLRenderingContext::deleteShader):
3191         (WebCore::WebGLRenderingContext::deleteTexture):
3192         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
3193         (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
3194         (WebCore::WebGLRenderingContext::validateRenderingState):
3195         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
3196         (WebCore::WebGLRenderingContext::getUniform):
3197         (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
3198         * html/canvas/WebGLRenderingContext.h:
3199         * html/canvas/WebGLShader.cpp:
3200         * html/canvas/WebGLTexture.cpp:
3201         * html/canvas/WebGLUniformLocation.cpp:
3202         * html/canvas/WebGLUniformLocation.h:
3203
3204 2011-01-24  Chris Marrin  <cmarrin@apple.com>
3205
3206         Reviewed by Eric Seidel.
3207
3208         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
3209         https://bugs.webkit.org/show_bug.cgi?id=53041
3210
3211         * Configurations/FeatureDefines.xcconfig:
3212         * DerivedSources.cpp:
3213         * GNUmakefile.am:
3214         * WebCore.pro:
3215         * bindings/generic/RuntimeEnabledFeatures.h:
3216         * bindings/js/JSArrayBufferCustom.cpp:
3217         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3218         (WebCore::toJS):
3219         * bindings/js/JSDOMWindowCustom.cpp:
3220         * bindings/js/JSDataViewCustom.cpp:
3221         * bindings/js/JSDocumentCustom.cpp:
3222         * bindings/js/JSFloat32ArrayCustom.cpp:
3223         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3224         (WebCore::JSHTMLCanvasElement::getContext):
3225         * bindings/js/JSInt16ArrayCustom.cpp:
3226         * bindings/js/JSInt32ArrayCustom.cpp:
3227         * bindings/js/JSInt8ArrayCustom.cpp:
3228         * bindings/js/JSUint16ArrayCustom.cpp:
3229         * bindings/js/JSUint32ArrayCustom.cpp:
3230         * bindings/js/JSUint8ArrayCustom.cpp:
3231         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3232         * bindings/js/JSXMLHttpRequestCustom.cpp:
3233         (WebCore::JSXMLHttpRequest::markChildren):
3234         (WebCore::JSXMLHttpRequest::send):
3235         (WebCore::JSXMLHttpRequest::response):
3236         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
3237         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3238         * bindings/v8/custom/V8DataViewCustom.cpp:
3239         * bindings/v8/custom/V8DocumentCustom.cpp:
3240         (WebCore::V8Document::getCSSCanvasContextCallback):
3241         * bindings/v8/custom/V8Float32ArrayCustom.cpp:
3242         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3243         (WebCore::V8HTMLCanvasElement::getContextCallback):
3244         * bindings/v8/custom/V8Int16ArrayCustom.cpp:
3245         * bindings/v8/custom/V8Int32ArrayCustom.cpp:
3246         * bindings/v8/custom/V8Int8ArrayCustom.cpp:
3247         * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
3248         * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
3249         * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
3250         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3251         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3252         (WebCore::V8XMLHttpRequest::responseAccessorGetter):
3253         (WebCore::V8XMLHttpRequest::sendCallback):
3254         * features.pri:
3255         * html/HTMLCanvasElement.cpp:
3256         (WebCore::HTMLCanvasElement::getContext):
3257         (WebCore::HTMLCanvasElement::reset):
3258         * html/HTMLCanvasElement.h:
3259         * html/canvas/ArrayBuffer.cpp:
3260         * html/canvas/ArrayBuffer.idl:
3261         * html/canvas/ArrayBufferView.cpp:
3262         * html/canvas/ArrayBufferView.idl:
3263         * html/canvas/DataView.cpp:
3264         * html/canvas/DataView.idl:
3265         * html/canvas/Float32Array.cpp:
3266         * html/canvas/Float32Array.idl:
3267         * html/canvas/Int16Array.cpp:
3268         * html/canvas/Int16Array.idl:
3269         * html/canvas/Int32Array.cpp:
3270         * html/canvas/Int32Array.idl:
3271         * html/canvas/Int8Array.cpp:
3272         * html/canvas/Int8Array.idl:
3273         * html/canvas/OESStandardDerivatives.cpp:
3274         * html/canvas/OESStandardDerivatives.idl:
3275         * html/canvas/OESTextureFloat.cpp:
3276         * html/canvas/OESTextureFloat.idl:
3277         * html/canvas/Uint16Array.cpp:
3278         * html/canvas/Uint16Array.idl:
3279         * html/canvas/Uint32Array.cpp:
3280         * html/canvas/Uint32Array.idl:
3281         * html/canvas/Uint8Array.cpp:
3282         * html/canvas/Uint8Array.idl:
3283         * html/canvas/WebGLActiveInfo.idl:
3284         * html/canvas/WebGLBuffer.cpp:
3285         * html/canvas/WebGLBuffer.idl:
3286         * html/canvas/WebGLContextAttributes.cpp:
3287         * html/canvas/WebGLContextAttributes.idl:
3288         * html/canvas/WebGLContextEvent.idl:
3289         * html/canvas/WebGLExtension.cpp:
3290         * html/canvas/WebGLFramebuffer.cpp:
3291         * html/canvas/WebGLFramebuffer.idl:
3292         * html/canvas/WebGLGetInfo.cpp:
3293         * html/canvas/WebGLObject.cpp:
3294         * html/canvas/WebGLProgram.cpp:
3295         * html/canvas/WebGLProgram.idl:
3296         * html/canvas/WebGLRenderbuffer.cpp:
3297         * html/canvas/WebGLRenderbuffer.idl:
3298         * html/canvas/WebGLRenderingContext.cpp:
3299         * html/canvas/WebGLRenderingContext.idl:
3300         * html/canvas/WebGLShader.cpp:
3301         * html/canvas/WebGLShader.idl:
3302         * html/canvas/WebGLTexture.cpp:
3303         * html/canvas/WebGLTexture.idl:
3304         * html/canvas/WebGLUniformLocation.cpp:
3305         * html/canvas/WebGLUniformLocation.idl:
3306         * html/canvas/WebKitLoseContext.cpp:
3307         * html/canvas/WebKitLoseContext.idl:
3308         * page/DOMWindow.idl:
3309         * platform/graphics/ANGLEWebKitBridge.cpp:
3310         * platform/graphics/GraphicsContext3D.cpp:
3311         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3312         * platform/graphics/gpu/DrawingBuffer.cpp:
3313         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
3314         * platform/graphics/mac/GraphicsContext3DMac.mm:
3315         * platform/graphics/mac/WebGLLayer.mm:
3316         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3317         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3318         * platform/graphics/qt/Extensions3DQt.cpp:
3319         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3320         * platform/graphics/qt/GraphicsLayerQt.cpp:
3321         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
3322         (WebCore::GraphicsLayerQtImpl::paint):
3323         (WebCore::GraphicsLayerQtImpl::flushChanges):
3324         * platform/graphics/qt/GraphicsLayerQt.h:
3325         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3326         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3327         * rendering/RenderLayerBacking.cpp:
3328         (WebCore::isAcceleratedCanvas):
3329         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
3330         (WebCore::RenderLayerBacking::containsPaintedContent):
3331         (WebCore::RenderLayerBacking::contentChanged):
3332         * webaudio/AudioBuffer.cpp:
3333         * webaudio/AudioBuffer.idl:
3334         * webaudio/RealtimeAnalyser.cpp:
3335         * webaudio/RealtimeAnalyser.h:
3336         * webaudio/RealtimeAnalyserNode.h:
3337         * webaudio/RealtimeAnalyserNode.idl:
3338         * xml/XMLHttpRequest.cpp:
3339         (WebCore::XMLHttpRequest::setResponseType):
3340         (WebCore::XMLHttpRequest::clearResponse):
3341         (WebCore::XMLHttpRequest::didReceiveData):
3342         * xml/XMLHttpRequest.h:
3343
3344 2011-01-25  Mikhail Naganov  <mnaganov@chromium.org>
3345
3346         Reviewed by Pavel Feldman.
3347
3348         Web Inspector: [Chromium] Prepare for landing of detailed heap snapshots.
3349
3350         - Introduce Preferences.detailedHeapProfiles flag for controlling
3351           querying of detailed heap snapshots.
3352         - Add boilerplate code for the new view.
3353         - Factor out common code.
3354
3355         https://bugs.webkit.org/show_bug.cgi?id=52624
3356
3357         * WebCore.gypi:
3358         * WebCore.vcproj/WebCore.vcproj:
3359         * bindings/js/ScriptProfiler.h:
3360         (WebCore::ScriptProfiler::HeapSnapshotControl::~HeapSnapshotControl):
3361         (WebCore::ScriptProfiler::takeHeapSnapshot):
3362         * bindings/v8/ScriptProfiler.cpp:
3363         (WebCore::ScriptProfiler::takeHeapSnapshot):
3364         * bindings/v8/ScriptProfiler.h:
3365         (WebCore::ScriptProfiler::HeapSnapshotControl::~HeapSnapshotControl):
3366         * inspector/Inspector.idl:
3367         * inspector/InspectorProfilerAgent.cpp:
3368         (WebCore::InspectorProfilerAgent::takeHeapSnapshot):
3369         * inspector/InspectorProfilerAgent.h:
3370         * inspector/front-end/DetailedHeapshotView.js: Added.
3371         (WebInspector.DetailedHeapshotView):
3372         (WebInspector.DetailedHeapshotView.prototype.get statusBarItems):
3373         (WebInspector.DetailedHeapshotView.prototype.get profile):
3374         (WebInspector.DetailedHeapshotView.prototype.set profile):
3375         (WebInspector.DetailedHeapshotView.prototype.show):
3376         (WebInspector.DetailedHeapshotView.prototype.hide):
3377         (WebInspector.DetailedHeapshotProfileType):
3378         (WebInspector.DetailedHeapshotProfileType.prototype.get buttonTooltip):
3379         (WebInspector.DetailedHeapshotProfileType.prototype.get buttonStyle):
3380         (WebInspector.DetailedHeapshotProfileType.prototype.buttonClicked):
3381         (WebInspector.DetailedHeapshotProfileType.prototype.get welcomeMessage):
3382         (WebInspector.DetailedHeapshotProfileType.prototype.createSidebarTreeElementForProfile):
3383         (WebInspector.DetailedHeapshotProfileType.prototype.createView):
3384         * inspector/front-end/HeapSnapshot.js: Added.
3385         (WebInspector.HeapSnapshotEdgesIterator):
3386         (WebInspector.HeapSnapshotEdgesIterator.prototype.get done):
3387         (WebInspector.HeapSnapshotEdgesIterator.prototype.get isElement):
3388         (WebInspector.HeapSnapshotEdgesIterator.prototype.get isHidden):
3389         (WebInspector.HeapSnapshotEdgesIterator.prototype.get name):
3390         (WebInspector.HeapSnapshotEdgesIterator.prototype.next):
3391         (WebInspector.HeapSnapshotEdgesIterator.prototype.get node):
3392         (WebInspector.HeapSnapshotEdgesIterator.prototype.get nodeIndex):
3393         (WebInspector.HeapSnapshotEdgesIterator.prototype._getNameOrIndex):
3394         (WebInspector.HeapSnapshotEdgesIterator.prototype._getType):
3395         (WebInspector.HeapSnapshotNodeWrapper):
3396         (WebInspector.HeapSnapshotNodeWrapper.prototype.get edges):
3397         (WebInspector.HeapSnapshotNodeWrapper.prototype.get edgesCount):
3398         (WebInspector.HeapSnapshotNodeWrapper.prototype.get instancesCount):
3399         (WebInspector.HeapSnapshotNodeWrapper.prototype.get isHidden):
3400         (WebInspector.HeapSnapshotNodeWrapper.prototype.get name):
3401         (WebInspector.HeapSnapshotNodeWrapper.prototype.get selfSize):
3402         (WebInspector.HeapSnapshotNodeWrapper.prototype._getName):
3403         (WebInspector.HeapSnapshotNodeWrapper.prototype._getEdges):
3404         (WebInspector.HeapSnapshotNodeWrapper.prototype._getType):
3405         (WebInspector.HeapSnapshot):
3406         (WebInspector.HeapSnapshot.prototype._init):
3407         (WebInspector.HeapSnapshot.prototype.get rootEdges):
3408         * inspector/front-end/HeapSnapshotView.js:
3409         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
3410         * inspector/front-end/ProfilesPanel.js:
3411         (WebInspector.ProfilesPanel.prototype._setRecordingProfile):
3412         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
3413         (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile):
3414         (WebInspector.ProfilerDispatcher.prototype.reportHeapSnapshotProgress):
3415         * inspector/front-end/Settings.js:
3416         * inspector/front-end/WebKit.qrc:
3417         * inspector/front-end/inspector.html:
3418         * inspector/front-end/inspector.js:
3419         (WebInspector._createPanels):
3420
3421 2011-01-25  Yury Semikhatsky  <yurys@chromium.org>
3422
3423         Reviewed by Pavel Feldman.
3424
3425         Web Inspector: remove "attached" state related methods from InspectorAgent
3426         https://bugs.webkit.org/show_bug.cgi?id=53086
3427
3428         * WebCore.exp.in:
3429         * inspector/InspectorAgent.cpp:
3430         * inspector/InspectorAgent.h:
3431         * inspector/InspectorFrontendClientLocal.cpp:
3432         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
3433         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
3434         * inspector/InspectorSettings.cpp:
3435         (WebCore::InspectorSettings::InspectorSettings):
3436         * inspector/InspectorSettings.h:
3437
3438 2011-01-25  Qi Zhang  <qi.2.zhang@nokia.com>
3439
3440         Reviewed by Laszlo Gombos.
3441
3442         [Symbian] RVCT fails to compile [U|I]nt[8|16|32]Array.h
3443         https://bugs.webkit.org/show_bug.cgi?id=51873
3444         
3445         Replace the using declaration, because it doesn't compile on RVCT, and WINSCW has the same issue.
3446         No new functionality so no new tests.
3447
3448         * html/canvas/Int32Array.h:
3449         (WebCore::Int32Array::set):
3450         * html/canvas/Int8Array.h:
3451         (WebCore::Int8Array::set):
3452         * html/canvas/Uint16Array.h:
3453         (WebCore::Uint16Array::set):
3454         * html/canvas/Uint32Array.h:
3455         (WebCore::Uint32Array::set):
3456         * html/canvas/Uint8Array.h:
3457         (WebCore::Uint8Array::set):
3458
3459 2011-01-25  Zoltan Herczeg  <zherczeg@webkit.org>
3460
3461         Reviewed by Dirk Schulze.
3462
3463         Repaint SVG elements with filter instead of relayout where possible
3464         https://bugs.webkit.org/show_bug.cgi?id=52200
3465
3466         This patch allows repainting of filters, when their
3467         attribute changes does not require relayout.
3468
3469         Existing dynamic-update tests cover this feature.
3470
3471         * platform/graphics/filters/FilterEffect.cpp:
3472         (WebCore::FilterEffect::clearResult): Clearing the currently stored image
3473         before repainting.
3474         * platform/graphics/filters/FilterEffect.h:
3475         * rendering/RenderObject.h:
3476         (WebCore::RenderObject::isSVGResourceFilter): Not only the filter primitives,
3477         but filters should also be detected to allow safe testing and casting.
3478         * rendering/svg/RenderSVGResourceFilter.cpp:
3479         (WebCore::RenderSVGResourceFilter::buildPrimitives): Passing the renderer.
3480         (WebCore::RenderSVGResourceFilter::applyResource):
3481         determineFilterPrimitiveSubregion does not require the filter anymore.
3482         (WebCore::RenderSVGResourceFilter::postApplyResource): Repaint
3483         if lastEffect->hasResult() is false.
3484         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
3485         Searching for all FilterEffects, whose created by the current FilterElement,
3486         and clearing all resulting images depending on those FilterEffects.
3487         * rendering/svg/RenderSVGResourceFilter.h:
3488         (WebCore::RenderSVGResourceFilter::isSVGResourceFilter):
3489         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3490         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
3491         The filter argument is unnecessary anymore. But is is still kept as a static
3492         member, since the primitive renderer still does not know about the
3493         FilterEffect objects.
3494         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
3495         (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
3496         (WebCore::RenderSVGResourceFilterPrimitive::primitiveAttributeChanged):
3497         Calls RenderSVGResourceFilter::primitiveAttributeChanged.
3498         * svg/SVGFEDiffuseLightingElement.cpp:
3499         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
3500         Setting the new attribute value for each FilterEffect.
3501         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
3502         * svg/SVGFEDiffuseLightingElement.h:
3503         Calling primitiveAttributeChanged.
3504         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3505         (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute):
3506         This function will be removed when all FilterElement implements
3507         their setFilterEffectAttribute
3508         * svg/SVGFilterPrimitiveStandardAttributes.h:
3509         (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged):
3510         * svg/graphics/filters/SVGFilterBuilder.cpp:
3511         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences): The
3512         renderers are assigned to the filter effects.
3513         (WebCore::SVGFilterBuilder::clearEffects):
3514         (WebCore::SVGFilterBuilder::clearResultsRecursive): Recursively
3515         clearing the result images for those filters, whose depend on
3516         the starting filter.
3517         * svg/graphics/filters/SVGFilterBuilder.h:
3518         (WebCore::SVGFilterBuilder::effectReferences): 'get' is unnecessary
3519         (WebCore::SVGFilterBuilder::effectByRenderer): returns the
3520         FilterEffect belongs to this RenderObject.
3521
3522 2011-01-25  Dirk Schulze  <krit@webkit.org>
3523
3524         Reviewed by Nikolas Zimmermann.
3525
3526         SVG is missing to-animation support for Path
3527         https://bugs.webkit.org/show_bug.cgi?id=52982
3528
3529         SVG was missing 'to' animation support for SVG paths. Even the fallback to discrete
3530         animation did not work and an assert was thrown, because of the missing m_fromPath.
3531         This also influences a test of the W3C test suite. Subtest 2 of animate-elem-83-t.svg passes now.
3532
3533         Test: svg/animations/animate-path-to-animation.html
3534
3535         * svg/SVGAnimateElement.cpp:
3536         (WebCore::SVGAnimateElement::calculateAnimatedValue): Take the value of the last SVGAnimateElement for
3537         m_fromPath, since 'to' animations are accumulative.
3538         (WebCore::SVGAnimateElement::calculateFromAndToValues): Added support for 'to' animations.
3539         (WebCore::SVGAnimateElement::resetToBaseValue): Set m_animatedPath on the first animation element to baseVal.
3540         * svg/SVGPathByteStream.h:
3541         (WebCore::SVGPathByteStream::copySVGPathByteStream): Return copy of current byte stream.
3542
3543 2011-01-25  Pavel Feldman  <pfeldman@chromium.org>
3544
3545         Reviewed by Yury Semikhatsky.
3546
3547         Web Inspector: bind resources to URLs upon adding them into the tree.
3548         https://bugs.webkit.org/show_bug.cgi?id=53013
3549
3550         * inspector/front-end/AuditRules.js:
3551         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
3552         * inspector/front-end/CSSStyleModel.js:
3553         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
3554         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
3555         * inspector/front-end/DebuggerModel.js:
3556         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
3557         * inspector/front-end/NetworkManager.js:
3558         (WebInspector.NetworkManager.prototype._processCachedResources):
3559         (WebInspector.NetworkManager.prototype.inflightResourceForURL):
3560         (WebInspector.NetworkDispatcher):
3561         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
3562         (WebInspector.NetworkDispatcher.prototype.markResourceAsCached):
3563         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
3564         (WebInspector.NetworkDispatcher.prototype.didReceiveContentLength):
3565         (WebInspector.NetworkDispatcher.prototype.didFinishLoading):
3566         (WebInspector.NetworkDispatcher.prototype.didFailLoading):
3567         (WebInspector.NetworkDispatcher.prototype.willSendWebSocketHandshakeRequest):
3568         (WebInspector.NetworkDispatcher.prototype.didReceiveWebSocketHandshakeResponse):
3569         (WebInspector.NetworkDispatcher.prototype.didCloseWebSocket):
3570         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
3571         (WebInspector.NetworkDispatcher.prototype._startResource):
3572         (WebInspector.NetworkDispatcher.prototype._finishResource):
3573         (WebInspector.NetworkDispatcher.prototype._createResource):
3574         * inspector/front-end/ResourceTreeModel.js:
3575         (WebInspector.ResourceTreeModel.prototype.addResourceToFrame):
3576         (WebInspector.ResourceTreeModel.prototype._bindResourceURL):
3577         (WebInspector.ResourceTreeModel.prototype._clearResources):
3578         (WebInspector.ResourceTreeModel.prototype._unbindResourceURL):
3579         * inspector/front-end/ResourcesPanel.js:
3580         (WebInspector.ResourcesPanel.prototype.canShowSourceLine):
3581         (WebInspector.ResourcesPanel.prototype.showSourceLine):
3582         * inspector/front-end/ScriptsPanel.js:
3583         (WebInspector.ScriptsPanel.prototype._parsedScriptSource):
3584         (WebInspector.ScriptsPanel.prototype._addScript):
3585
3586 2011-01-25  Nikolas Zimmermann  <nzimmermann@rim.com>
3587
3588         Reviewed by Dirk Schulze.
3589
3590         Introduce FontMetrics abstraction
3591         https://bugs.webkit.org/show_bug.cgi?id=51456
3592
3593         Use accurate floating-point metrics for SVG Font calculations instead of casting float -> integer.
3594         This hopefully fixes differences between 32/64 bit bots.
3595
3596         Needs new layout test results for several platforms, which need to be taken from the bots landing afterwards.
3597
3598         * platform/graphics/SimpleFontData.cpp:
3599         (WebCore::SimpleFontData::SimpleFontData):
3600         (WebCore::SimpleFontData::initCharWidths):
3601
3602 2011-01-24  Pavel Podivilov  <podivilov@chromium.org>
3603
3604         Reviewed by Pavel Feldman.
3605
3606         Web Inspector: debugger and browser debugger agents should manage sticky breakpoints independently.
3607         https://bugs.webkit.org/show_bug.cgi?id=52999
3608
3609         * inspector/Inspector.idl:
3610         * inspector/InspectorAgent.cpp:
3611         (WebCore::InspectorAgent::didCommitLoad):
3612         (WebCore::InspectorAgent::enableDebugger):
3613         (WebCore::InspectorAgent::inspectedURLWithoutFragment):
3614         * inspector/InspectorAgent.h:
3615         * inspector/InspectorBrowserDebuggerAgent.cpp:
3616         (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints):
3617         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
3618         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
3619         * inspector/InspectorBrowserDebuggerAgent.h:
3620         * inspector/InspectorDebuggerAgent.cpp:
3621         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3622         (WebCore::InspectorDebuggerAgent::setAllJavaScriptBreakpoints):
3623         (WebCore::InspectorDebuggerAgent::inspectedURLChanged):
3624         (WebCore::InspectorDebuggerAgent::restoreBreakpoints):
3625         * inspector/InspectorDebuggerAgent.h:
3626         * inspector/InspectorState.cpp:
3627         (WebCore::InspectorState::InspectorState):
3628         * inspector/InspectorState.h:
3629         * inspector/front-end/BreakpointManager.js:
3630         (WebInspector.BreakpointManager):
3631         (WebInspector.BreakpointManager.prototype._projectChanged):
3632         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
3633         (WebInspector.BreakpointManager.prototype._pushBreakpointsToBackend):
3634
3635 2011-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3636
3637         Reviewed by Martin Robinson.
3638
3639         [GTK] Crash in some pages containing flash
3640         https://bugs.webkit.org/show_bug.cgi?id=53016
3641
3642         Flash plugin can produce X errors that are handled by the GDK X
3643         error handler, which exits the process. Since we don't want to
3644         crash due to flash bugs, we install a custom error handler to show
3645         a warning when a X error happens without aborting.
3646
3647         * plugins/gtk/PluginPackageGtk.cpp:
3648         (WebCore::webkitgtkXError):
3649         (WebCore::PluginPackage::load):
3650
3651 2011-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3652
3653         Reviewed by Martin Robinson.
3654
3655         [GTK] Implement spin buttons in RenderThemeGtk
3656         https://bugs.webkit.org/show_bug.cgi?id=51454
3657
3658         Paint inner up/down buttons for spin button elements when building
3659         with GTK+ 3.x.
3660
3661         Test results will land with the GTK+ 2.x version of this patch.
3662
3663         * platform/gtk/RenderThemeGtk.h:
3664         * platform/gtk/RenderThemeGtk2.cpp:
3665         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
3666         (WebCore::RenderThemeGtk::paintInnerSpinButton):
3667         * platform/gtk/RenderThemeGtk3.cpp:
3668         (WebCore::spinButtonArrowSize):
3669         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
3670         (WebCore::paintSpinArrowButton):
3671         (WebCore::RenderThemeGtk::paintInnerSpinButton):
3672
3673 2011-01-24  Mihai Parparita  <mihaip@chromium.org>
3674
3675         Unreviewed. Missed move of one m_deleted use to be outside NDEBUG block
3676         in r76575.
3677
3678         * loader/cache/CachedResource.cpp:
3679         (WebCore::CachedResource::~CachedResource):
3680
3681 2011-01-24  Mihai Parparita  <mihaip@chromium.org>
3682
3683         Reviewed by Tony Chang.
3684
3685         Add runtime checks for invariants in memory cache
3686         https://bugs.webkit.org/show_bug.cgi?id=53059
3687         
3688         To help track down bug 53045, add some CRASH calls in addition to
3689         ASSERTs, so that we can track down failures in reliability bots.
3690
3691         Just some checks, no new tests necessary.
3692         
3693         * css/CSSImageValue.cpp:
3694         (WebCore::CSSImageValue::cachedImage):
3695         * loader/cache/CachedResource.h:
3696         * loader/cache/CachedResource.cpp:
3697         (WebCore::CachedResource::~CachedResource):
3698
3699 2011-01-24  Simon Fraser  <simon.fraser@apple.com>
3700
3701         Reviewed by Dan Bernstein.
3702
3703         Leaking CSSRuleDataList objects
3704         https://bugs.webkit.org/show_bug.cgi?id=53062
3705
3706         Fix leaked CSSRuleDataLists added to the m_pseudoRules hash.
3707
3708         * css/CSSStyleSelector.cpp:
3709         (WebCore::CSSRuleSet::~CSSRuleSet):
3710
3711 2011-01-24  Simon Fraser  <simon.fraser@apple.com>
3712
3713         Reviewed by Eric Seidel.
3714
3715         Refcount Images used in rendering code
3716         https://bugs.webkit.org/show_bug.cgi?id=52701
3717
3718         Change StyleImage::image(RenderObject*, const IntSize&) and
3719         CSSImageGeneratorValue::image(RenderObject*, const IntSize&) to
3720         return PassRefPtr<Image>, and adjust other code accordingly.
3721         
3722         This allows us to return one-time images, for example for CSS gradients
3723         whose appearance may change depending on factors other than the renderer
3724         and the destination size.
3725
3726         * css/CSSCanvasValue.cpp:
3727         (WebCore::CSSCanvasValue::image):
3728         * css/CSSCanvasValue.h:
3729         * css/CSSGradientValue.cpp:
3730         (WebCore::CSSGradientValue::image):
3731         * css/CSSGradientValue.h:
3732         * css/CSSImageGeneratorValue.h:
3733         * rendering/RenderBoxModelObject.cpp:
3734         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3735         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3736         * rendering/RenderImage.cpp:
3737         (WebCore::RenderImage::paintReplaced):
3738         (WebCore::RenderImage::paintIntoRect):
3739         * rendering/RenderImageResource.h:
3740         (WebCore::RenderImageResource::image):
3741         * rendering/RenderImageResourceStyleImage.h:
3742         (WebCore::RenderImageResourceStyleImage::image):
3743         * rendering/RenderListMarker.cpp:
3744         (WebCore::RenderListMarker::paint):
3745         * rendering/style/StyleCachedImage.cpp:
3746         (WebCore::StyleCachedImage::image):
3747         * rendering/style/StyleCachedImage.h:
3748         * rendering/style/StyleGeneratedImage.cpp:
3749         (WebCore::StyleGeneratedImage::image):
3750         * rendering/style/StyleGeneratedImage.h:
3751         * rendering/style/StyleImage.h:
3752         * rendering/style/StylePendingImage.h:
3753         (WebCore::StylePendingImage::image):
3754         * rendering/svg/RenderSVGImage.cpp:
3755         (WebCore::RenderSVGImage::paint):
3756
3757 2011-01-24  Tony Chang  <tony@chromium.org>
3758
3759         Unreviewed, round ascent and descent to match old code.
3760
3761         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
3762         (WebCore::SimpleFontData::platformInit):
3763
3764 2011-01-24  Simon Fraser  <simon.fraser@apple.com>
3765
3766         Reviewed by Chris Marrin.
3767
3768         perspective() transform function should take lengths
3769         https://bugs.webkit.org/show_bug.cgi?id=52683
3770         
3771         The argument to the perspective() transform function should
3772         be a Length, rather than a bare number. Bare numbers are still
3773         accepted (and treated as px), but this behavior is deprecated.
3774
3775         Test: animations/3d/transform-perspective.html
3776               transforms/3d/general/3dtransform-values.html
3777
3778         * css/CSSParser.cpp:
3779         (WebCore::CSSParser::parseTransform): Check the units for the perspective()
3780         function. Allow bare numbers for backwards compatibility.
3781         * css/CSSStyleSelector.cpp:
3782         (WebCore::CSSStyleSelector::createTransformOperations): Convert
3783         value to Length.
3784         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
3785         (WebCore::clampToPostiveInteger): Helper.
3786         (WebCore::PerspectiveTransformOperation::blend): Blend via Lengths.
3787         * platform/graphics/transforms/PerspectiveTransformOperation.h:
3788         (WebCore::PerspectiveTransformOperation::create): double -> Length.
3789         (WebCore::PerspectiveTransformOperation::perspective): Ditto.
3790         (WebCore::PerspectiveTransformOperation::isIdentity): Ditto.
3791         (WebCore::PerspectiveTransformOperation::apply): Ditto.
3792         (WebCore::PerspectiveTransformOperation::PerspectiveTransformOperation): Assert
3793         that the Length is a fixed type.
3794
3795 2011-01-24  Kent Tamura  <tkent@chromium.org>
3796
3797         Reviewed by Dimitri Glazkov.
3798
3799         [Windows] Textfield <input>s have different widths.
3800         https://bugs.webkit.org/show_bug.cgi?id=48405
3801
3802         - Apply the padding override for type=text to other textfield types too.
3803         - Reset margin value of outer spin button, which is not used in Windows.
3804         - Don't add inner spin button width to the preferred text field width.
3805           Text fields should have the identical widths regardless of the
3806           existence of spin buttons.
3807
3808         Test: fast/forms/input-widths.html
3809
3810         * css/themeWin.css:
3811         (input[type="week"]):
3812         (input[type="week"]:disabled):
3813         (input[type="search"]::-webkit-search-cancel-button):
3814         (input::-webkit-outer-spin-button):
3815         * rendering/RenderTextControlSingleLine.cpp:
3816         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
3817         Don't add inner spin button width to the preferred width.
3818
3819 2011-01-24  Kent Tamura  <tkent@chromium.org>
3820
3821         Reviewed by Dimitri Glazkov.
3822
3823         Some bugs of search cancel button and spin button about state change in
3824         an event handler.
3825         https://bugs.webkit.org/show_bug.cgi?id=46950
3826
3827         Fix the following problems:
3828          * Type=search field didn't release event capturing
3829          * Assertion failure when an input field with spin buttons was changed
3830            to another type on focus event.
3831          * A input field with spin button didn't release event capturing when it
3832            was changed to another type on focus event.
3833
3834         Tests: fast/forms/input-number-change-type-on-focus.html
3835                fast/forms/search-hide-cancel-on-cancel.html
3836
3837         * rendering/TextControlInnerElements.cpp:
3838         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
3839          - Make the variable 'input' RefPtr.  It makes the code simpler.
3840          - Remove visibility check on mouseup event. We should release capturing
3841            anyway because the cancel button may be invisible if JavaScript code
3842            called by the focus event removes the input value.
3843         (WebCore::SpinButtonElement::detach):
3844          - Release capturing on detach because it is possible that a spin button
3845            node is detached while it is capturing events.
3846         (WebCore::SpinButtonElement::defaultEventHandler):
3847           Take a reference to this and check renderer() after some functions which
3848           may run JavaScript code.
3849         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
3850           Make the variable 'input' RefPtr to align other functions in this file.
3851         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): ditto.
3852         * rendering/TextControlInnerElements.h: Declare SpinButtonElement::detach().
3853
3854 2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
3855
3856         Reviewed by Ojan Vafai.
3857
3858         Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace.
3859         https://bugs.webkit.org/show_bug.cgi?id=52781
3860
3861         The bug was caused by stringWithRebalancedWhitespace's replacing the space at the beginning of a paragraph
3862         and the end of a paragraph by a non-breaking space after it replaced two consecutive spaces by a space and
3863         non-breaking space pattern, thereby replacing more spaces by non-breaking spaces than needed.
3864
3865         Rewrote the function using Vector<UChar> to fix the bug. New function no longer calls String::replace
3866         multiple times but instead it traverses through the string and replaces a space that immediately follows
3867         another space or appears at the beginning of a paragraph or at the end of a paragraph by a non-break space.
3868
3869         * editing/CompositeEditCommand.cpp:
3870         * editing/htmlediting.cpp:
3871         (WebCore::stringWithRebalancedWhitespace): Written.
3872         * editing/htmlediting.h:
3873         (WebCore::isWhitespace): Removed from CompositeEditCommand.cpp
3874
3875 2011-01-24  Kenneth Russell  <kbr@google.com>
3876
3877         Reviewed by James Robinson.
3878
3879         Web Audio API: port FFTFrame to FFTW
3880         https://bugs.webkit.org/show_bug.cgi?id=52989
3881
3882         Ported FFTFrame class to the open-source FFTW library. Tested with
3883         unit tests from Chris Rogers. Made preliminary changes to GYP
3884         files for conditional compilation of these files; will need to be
3885         adjusted once FFTW is integrated as third-party source.
3886
3887         * WebCore.gyp/WebCore.gyp:
3888         * WebCore.gypi:
3889         * platform/audio/FFTFrame.h:
3890         * platform/audio/fftw: Added.
3891         * platform/audio/fftw/FFTFrameFFTW.cpp: Added.
3892         (WebCore::FFTFrame::FFTFrame):
3893         (WebCore::FFTFrame::~FFTFrame):
3894         (WebCore::FFTFrame::multiply):
3895         (WebCore::FFTFrame::doFFT):
3896         (WebCore::FFTFrame::doInverseFFT):
3897         (WebCore::FFTFrame::cleanup):
3898         (WebCore::FFTFrame::realData):
3899         (WebCore::FFTFrame::imagData):
3900         (WebCore::FFTFrame::fftwPlanForSize):
3901
3902 2011-01-24  Anders Carlsson  <andersca@apple.com>
3903
3904         Reviewed by Dan Bernstein.
3905
3906         Reset the page scale factor on standard frame loads
3907         https://bugs.webkit.org/show_bug.cgi?id=53058
3908         <rdar://problem/8908844>
3909
3910         Add a symbol needed by WebKit2.
3911
3912         * WebCore.exp.in:
3913
3914 2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
3915
3916         Reviewed by Eric Seidel.
3917
3918         Stop instantiating legacy editing positions in InsertTextCommand, MoveSelectionCommand,
3919         ReplaceSelectionCommand, SelectionController, SpellChecker, TypingCommand, and markup.cpp
3920         https://bugs.webkit.org/show_bug.cgi?id=52676
3921
3922         Stop instantiating legacy editing positions in the following files.
3923
3924         * editing/InsertTextCommand.cpp:
3925         (WebCore::InsertTextCommand::prepareForTextInsertion):
3926         (WebCore::InsertTextCommand::performTrivialReplace):
3927         (WebCore::InsertTextCommand::input):
3928         (WebCore::InsertTextCommand::insertTab):
3929         * editing/MoveSelectionCommand.cpp:
3930         (WebCore::MoveSelectionCommand::doApply):
3931         * editing/ReplaceSelectionCommand.cpp:
3932         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
3933         (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):
3934         (WebCore::ReplaceSelectionCommand::doApply):
3935         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR):
3936         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
3937         * editing/SelectionController.cpp:
3938         (WebCore::SelectionController::setSelectionFromNone):
3939         * editing/SpellChecker.cpp:
3940         (WebCore::SpellChecker::didCheck):
3941         * editing/TypingCommand.cpp:
3942         (WebCore::TypingCommand::makeEditableRootEmpty):
3943         (WebCore::TypingCommand::deleteKeyPressed):
3944         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3945         * editing/markup.cpp:
3946         (WebCore::StyledMarkupAccumulator::appendText):
3947         (WebCore::StyledMarkupAccumulator::serializeNodes):
3948         (WebCore::highestAncestorToWrapMarkup):
3949         (WebCore::createMarkup):
3950
3951 2011-01-24  Peter Kasting  <pkasting@google.com>
3952
3953         Reviewed by Darin Adler.
3954
3955         Roll back r67261 ("Don't fire onclick on middle clicks") due to
3956         regressions.
3957         https://bugs.webkit.org/show_bug.cgi?id=46733
3958
3959         * html/HTMLAnchorElement.cpp:
3960         (WebCore::isLinkClick):
3961         * html/HTMLInputElement.cpp:
3962         (WebCore::HTMLInputElement::preDispatchEventHandler):
3963         (WebCore::HTMLInputElement::postDispatchEventHandler):
3964         (WebCore::HTMLInputElement::defaultEventHandler):
3965         * page/EventHandler.cpp:
3966         (WebCore::EventHandler::handleMouseDoubleClickEvent):
3967         (WebCore::EventHandler::handleMouseReleaseEvent):
3968
3969 2011-01-24  Martin Robinson  <mrobinson@igalia.com>
3970
3971         Reviewed by Eric Seidel.
3972
3973         [GTK] Many DOM XHTML tests time out
3974         https://bugs.webkit.org/show_bug.cgi?id=52553
3975
3976         Properly handle the situation where a synchronous load fails before the inner
3977         event loop has started. In this case, we simply do not run the inner event loop,
3978         or else it will block indefinitely (since no GIO or libsoup callbacks will fire).
3979
3980         * platform/network/soup/ResourceHandleSoup.cpp:
3981         (WebCore::ResourceHandle::loadResourceSynchronously): Bail out of a synchronous
3982         load if it fails up front.
3983
3984 2011-01-24  Zhenyao Mo  <zmo@google.com>
3985
3986         Reviewed by Eric Seidel.
3987
3988         Cleanup WebGLGetInfo and related get*Parameter helpers in WebGLRenderingContext
3989         https://bugs.webkit.org/show_bug.cgi?id=52338
3990
3991         Removed the long/unsigned long types and corresponding get functions
3992         and use int/unsigned int instead.
3993
3994         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3995         (WebCore::toJS):
3996         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3997         (WebCore::toV8Object):
3998         * html/canvas/WebGLGetInfo.cpp:
3999         (WebCore::WebGLGetInfo::WebGLGetInfo):
4000         (WebCore::WebGLGetInfo::getInt):
4001         (WebCore::WebGLGetInfo::getUnsignedInt):
4002         * html/canvas/WebGLGetInfo.h:
4003         * html/canvas/WebGLRenderingContext.cpp:
4004         (WebCore::WebGLRenderingContext::getBufferParameter):
4005         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
4006         (WebCore::WebGLRenderingContext::getParameter):
4007         (WebCore::WebGLRenderingContext::getProgramParameter):
4008         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
4009         (WebCore::WebGLRenderingContext::getShaderParameter):
4010         (WebCore::WebGLRenderingContext::getTexParameter):
4011         (WebCore::WebGLRenderingContext::getUniform):
4012         (WebCore::WebGLRenderingContext::getVertexAttrib):
4013         (WebCore::WebGLRenderingContext::getIntParameter