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