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