2011-05-31 Abhishek Arya <inferno@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-05-31  Abhishek Arya  <inferno@chromium.org>
2
3         Reviewed by Dimitri Glazkov.
4
5         Convert raw ptr to RefPtr for documentElement.
6         https://bugs.webkit.org/show_bug.cgi?id=61688
7
8         Test: fast/dom/xml-parser-error-message-crash.svg
9
10         * dom/XMLDocumentParser.cpp:
11         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
12
13 2011-05-31  Andreas Kling  <kling@webkit.org>
14
15         Reviewed by Antti Koivisto.
16
17         Canvas/JSC: Auto-generate overloads for setShadow()
18         https://bugs.webkit.org/show_bug.cgi?id=61786
19
20         Move CanvasRenderingContext2D.setShadow() to auto-generated JSC bindings.
21
22         There is a subtle difference to the previous behavior: invalid numbers of
23         arguments now raise TypeError instead of SyntaxError. This is in accordance
24         with Web IDL, and matches the existing V8 bindings.
25
26         Test: fast/canvas/canvas-overloads-setShadow.html
27
28         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
29         * html/canvas/CanvasRenderingContext2D.idl:
30
31 2011-05-31  Andreas Kling  <kling@webkit.org>
32
33         Reviewed by Antti Koivisto.
34
35         Canvas/JSC: Auto-generate overloads for drawImageFromRect()
36         https://bugs.webkit.org/show_bug.cgi?id=61709
37
38         Move CanvasRenderingContext2D.drawImageFromRect() to auto-generated JSC bindings.
39         Make it [RequiresAllArguments=Raise] to match the old behavior.
40         Side effect: calling drawImageFromRect() with zero arguments will now raise
41         SyntaxError instead of TypeError.
42
43         Test: fast/canvas/canvas-overloads-drawImageFromRect.html
44
45         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
46         * html/canvas/CanvasRenderingContext2D.h:
47         * html/canvas/CanvasRenderingContext2D.idl:
48
49 2011-05-31  Andreas Kling  <kling@webkit.org>
50
51         Reviewed by Antti Koivisto.
52
53         Canvas/JSC: Auto-generate overloads for drawImage()
54         https://bugs.webkit.org/show_bug.cgi?id=61703
55
56         Move CanvasRenderingContext2D.drawImage() to auto-generated JSC bindings.
57
58         There is a subtle difference to the previous behavior: invalid numbers of
59         arguments now raise TypeError instead of SyntaxError. This is in accordance
60         with Web IDL, and matches the existing V8 bindings.
61
62         Test: fast/canvas/canvas-overloads-drawImage.html
63
64         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
65         * html/canvas/CanvasRenderingContext2D.idl:
66
67 2011-05-31  Andreas Kling  <kling@webkit.org>
68
69         Reviewed by Antti Koivisto.
70
71         Canvas/JSC: Auto-generate overloads for strokeRect()
72         https://bugs.webkit.org/show_bug.cgi?id=61641
73
74         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
75
76         No behavioral change.
77
78         Test: fast/canvas/canvas-overloads-strokeRect.html
79
80         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
81         * html/canvas/CanvasRenderingContext2D.idl:
82
83 2011-05-31  Andreas Kling  <kling@webkit.org>
84
85         Reviewed by Antti Koivisto.
86
87         Canvas/JSC: Auto-generate overloads for setFillColor()
88         https://bugs.webkit.org/show_bug.cgi?id=61635
89
90         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
91
92         There is a subtle difference to the previous behavior: invalid numbers of
93         arguments now raise TypeError instead of SyntaxError. This is in accordance
94         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
95
96         Test: fast/canvas/canvas-overloads-setFillColor.html
97
98         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
99         * html/canvas/CanvasRenderingContext2D.idl:
100
101 2011-05-31  Andreas Kling  <kling@webkit.org>
102
103         Reviewed by Antti Koivisto.
104
105         Canvas/JSC: Auto-generate overloads for setStrokeColor()
106         https://bugs.webkit.org/show_bug.cgi?id=61629
107
108         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
109
110         There is a subtle difference to the previous behavior: invalid numbers of
111         arguments now raise TypeError instead of SyntaxError. This is in accordance
112         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
113
114         Test: fast/canvas/canvas-overloads-setStrokeColor.html
115
116         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
117         * html/canvas/CanvasRenderingContext2D.idl:
118
119 2011-05-31  Andreas Kling  <kling@webkit.org>
120
121         Reviewed by Antti Koivisto.
122
123         Canvas/JSC: Auto-generate overloads for strokeText()
124         https://bugs.webkit.org/show_bug.cgi?id=61626
125
126         Move CanvasRenderingContext2D.strokeText() to auto-generated JSC bindings.
127         Make it [RequiresAllArguments=Raise] to match the old behavior.
128         This has the side-effect of aligning the behaviors of JSC and V8.
129
130         Test: fast/canvas/canvas-overloads-strokeText.html
131
132         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
133         * html/canvas/CanvasRenderingContext2D.idl:
134
135 2011-05-31  Andreas Kling  <kling@webkit.org>
136
137         Reviewed by Antti Koivisto.
138
139         Canvas/JSC: Auto-generate overloads for fillText()
140         https://bugs.webkit.org/show_bug.cgi?id=61623
141
142         Move CanvasRenderingContext2D.fillText() to auto-generated JSC bindings.
143         Make it [RequiresAllArguments=Raise] to match the old behavior.
144         This has the side-effect of aligning the behaviors of JSC and V8.
145
146         Test: fast/canvas/canvas-overloads-fillText.html
147
148         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
149         * html/canvas/CanvasRenderingContext2D.idl:
150
151 2011-05-31  Yael Aharon  <yael.aharon@nokia.com>
152
153         Reviewed by Kenneth Rohde Christiansen.
154
155         Frame flattening is broken with nested frames
156         https://bugs.webkit.org/show_bug.cgi?id=61491
157
158         After r77988, when frame flattening is enabled, performPostLayoutTasks() is called on a timer for iframes.
159         This causes layout of nested iframes to sometimes happen asynchronously, but WebCore expects layout to always finish synchronously.
160         Added a call to updateWidgetPosition() for cases that performPostLayoutTasks() is now happening asynchronously.
161
162         Test: fast/frames/flattening/iframe-flattening-nested.html
163
164         * page/FrameView.cpp:
165         (WebCore::FrameView::layout):
166
167 2011-05-31  Tommy Widenflycht  <tommyw@google.com>
168
169         Reviewed by Tony Gentilcore.
170
171         Fix getUserMedia callback bindings for JSC.
172         https://bugs.webkit.org/show_bug.cgi?id=60174
173
174         This patch initializes the exception code variable to 0.
175
176         Test: fast/dom/MediaStream/argument-types.html
177
178         * bindings/js/JSNavigatorCustom.cpp:
179         (WebCore::JSNavigator::webkitGetUserMedia):
180
181 2011-05-31  Oleg Romashin  <oleg.romashin@nokia.com>
182
183         Reviewed by Benjamin Poulain.
184
185         Fix compilation with debug enabled, m_lightSource.type is not valid anymore
186         https://bugs.webkit.org/show_bug.cgi?id=61719
187
188         * platform/graphics/filters/arm/FELightingNEON.h:
189         (WebCore::FELighting::platformApplyNeon):
190
191 2011-05-31  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
192
193         Reviewed by Nikolas Zimmermann.
194
195         Invalid color handling is broken for SVG
196         https://bugs.webkit.org/show_bug.cgi?id=58531
197
198         Fix invalid color fallback handling. If the fill/stroke attributes computed
199         value leads to a an invalid color, inherit the desired color from the parent
200         style instead. Matches Opera/FF and SVG 1.1 Second Edition (http://www.w3.org/TR/SVG/).
201
202         Tests: svg/custom/invalid-stroke-hex.svg
203                svg/custom/invalid-uri-stroke.svg
204
205         * rendering/svg/RenderSVGResource.cpp:
206         (WebCore::inheritColorFromParentStyleIfNeeded):
207         (WebCore::requestPaintingResource):
208
209 2011-05-31  Vangelis Kokkevis  <vangelis@chromium.org>
210
211         Reviewed by Kent Tamura.
212
213         [chromium] Avoid double deletion of DrawingBuffer's color buffer
214         texture.
215         https://bugs.webkit.org/show_bug.cgi?id=61761
216
217         Test: Verified that the DCHECK in GraphicsContext3D implementation
218         doesn't trigger.
219
220         * platform/graphics/chromium/DrawingBufferChromium.cpp:
221         (WebCore::DrawingBuffer::~DrawingBuffer):
222
223 2011-05-30  Hayato Ito  <hayato@chromium.org>
224
225         Reviewed by Ryosuke Niwa.
226
227         Add a utility function for dumping a tree for the Node, including a document of a frame.
228         https://bugs.webkit.org/show_bug.cgi?id=61727
229
230         No new tests since added functions are only available in debug builds.
231
232         * dom/Node.cpp:
233         (WebCore::parentOrHostOrFrameOwner):
234         (WebCore::traverseNextNodeAcrossFrame):
235         (WebCore::Node::showTreeForThisAcrossFrame):
236         * dom/Node.h:
237
238 2011-05-30  James Kozianski  <koz@chromium.org>
239
240         Reviewed by Kent Tamura.
241
242         [Chromium] Make isValidProtocol() accept protocols with '+'.
243         https://bugs.webkit.org/show_bug.cgi?id=61759
244
245         Also, detect syntax errors before security errors; some syntax errors
246         will also trigger a security error, but it's more helpful to the
247         programmer to know if they have a syntax error, which are well-defined
248         in the spec, rather than a security error, which aren't.
249
250         * page/Navigator.cpp:
251         (WebCore::Navigator::registerProtocolHandler):
252         Detect syntax errors before security errors.
253         * platform/KURLGoogle.cpp:
254         (WebCore::isSchemeChar):
255         Include '+' in the list of valid characters.
256
257 2011-05-30  Andrey Petrov  <andrey.petrov@gmail.com>
258
259         Reviewed by Hajime Morita.
260
261         Using jQuery to show/hide IMG elements crashes WebKit
262         https://bugs.webkit.org/show_bug.cgi?id=31721
263
264         For platform code, do not assert nodes always have renderer at
265         the time context menu action is invoked.
266         Renderer can actually be empty for a given node if it was hidden
267         or removed from domtree by some non-user generated event (e.g timeout) 
268         after the popup menu had been created.
269
270         Changing Chromium, Gtk, Mac, Qt, Win and WinCE.
271
272         Test: editing/pasteboard/copy-standalone-image-crash.html
273
274         * platform/chromium/PasteboardChromium.cpp:
275         (WebCore::Pasteboard::writeImage):
276         * platform/gtk/PasteboardGtk.cpp:
277         (WebCore::Pasteboard::writeImage):
278         * platform/mac/PasteboardMac.mm:
279         (WebCore::Pasteboard::writeImage):
280         * platform/qt/PasteboardQt.cpp:
281         (WebCore::Pasteboard::writeImage):
282         * platform/win/PasteboardWin.cpp:
283         (WebCore::Pasteboard::writeImage):
284         * platform/wince/PasteboardWinCE.cpp:
285         (WebCore::Pasteboard::writeImage):
286
287 2011-05-30  Daniel Bates  <dbates@webkit.org>
288
289         Reviewed by Adam Barth.
290
291         Rename XSSFilter to XSSAuditor
292         https://bugs.webkit.org/show_bug.cgi?id=61718
293
294         Currently we use the names XSSFilter and XSSAuditor throughout the project.
295         Instead, we should choose one name for consistency.
296
297         No functionality was changed. So, no new tests.
298
299         * CMakeLists.txt:
300         * GNUmakefile.list.am:
301         * WebCore.gypi:
302         * WebCore.pro:
303         * WebCore.vcproj/WebCore.vcproj:
304         * WebCore.xcodeproj/project.pbxproj:
305         * html/parser/HTMLDocumentParser.cpp:
306         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
307         (WebCore::HTMLDocumentParser::pumpTokenizer):
308         * html/parser/HTMLDocumentParser.h:
309         * html/parser/XSSAuditor.cpp: Copied from Source/WebCore/html/parser/XSSFilter.cpp.
310         (WebCore::XSSAuditor::XSSAuditor):
311         (WebCore::XSSAuditor::init):
312         (WebCore::XSSAuditor::filterToken):
313         (WebCore::XSSAuditor::filterTokenInitial):
314         (WebCore::XSSAuditor::filterTokenAfterScriptStartTag):
315         (WebCore::XSSAuditor::filterScriptToken):
316         (WebCore::XSSAuditor::filterObjectToken):
317         (WebCore::XSSAuditor::filterParamToken):
318         (WebCore::XSSAuditor::filterEmbedToken):
319         (WebCore::XSSAuditor::filterAppletToken):
320         (WebCore::XSSAuditor::filterIframeToken):
321         (WebCore::XSSAuditor::filterMetaToken):
322         (WebCore::XSSAuditor::filterBaseToken):
323         (WebCore::XSSAuditor::filterFormToken):
324         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
325         (WebCore::XSSAuditor::eraseAttributeIfInjected):
326         (WebCore::XSSAuditor::snippetForRange):
327         (WebCore::XSSAuditor::snippetForAttribute):
328         (WebCore::XSSAuditor::isContainedInRequest):
329         (WebCore::XSSAuditor::isSameOriginResource):
330         * html/parser/XSSAuditor.h: Copied from Source/WebCore/html/parser/XSSFilter.h.
331         * html/parser/XSSFilter.cpp: Removed.
332         * html/parser/XSSFilter.h: Removed.
333
334 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
335
336         Reviewed by Simon Hausmann.
337
338         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
339         https://bugs.webkit.org/show_bug.cgi?id=61694
340
341         Expose a public clearAll() function to reset WebCore::Animation.
342
343         No new functionality, so no new tests.
344
345         * platform/animation/Animation.h:
346         (WebCore::Animation::clearAll):
347
348 2011-05-30  Eric Carlson  <eric.carlson@apple.com>
349
350         Reviewed by Alexey Proskuryakov.
351
352         Audio and video files saved to the Application Cache should preserve the original file extension
353         https://bugs.webkit.org/show_bug.cgi?id=61750
354         <rdar://9524922>
355
356         No new tests, it isn't possible to check the name of the file in the cache from within
357         DRT. Changes verified manually.
358
359         * loader/appcache/ApplicationCacheStorage.cpp:
360         (WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache
361             file name.
362         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter.
363         * loader/appcache/ApplicationCacheStorage.h:
364
365 2011-05-30  Jer Noble  <jer.noble@apple.com>
366
367         Reviewed by Dan Bernstein.
368
369         Play/Pause button in wrong state when entering full screen on Vimeo
370         https://bugs.webkit.org/show_bug.cgi?id=61754
371
372         Update the play/pause button inside reset().  This ensures the button is in
373         the correct state when the controls are created after playback has already
374         started.
375
376         * html/shadow/MediaControlRootElement.cpp:
377         (WebCore::MediaControlRootElement::reset):
378
379 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
380
381         Reviewed by Simon Hausmann.
382
383         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
384         https://bugs.webkit.org/show_bug.cgi?id=61694
385
386         Added a public TimingFunction::type() method.
387
388         No new functionality, so no new tests.
389
390         * platform/animation/TimingFunction.h:
391         (WebCore::TimingFunction::type):
392
393 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
394
395         BUILD FIX for r87697 on Windows/Symbian
396
397         For now enabling TextureMapper for Mac/Linux only.
398
399         * WebCore.pri:
400
401 2011-05-30  David Kilzer  <ddkilzer@apple.com>
402
403         BUILD FIX for r87692 with !ENABLE(FULLSCREEN_API)
404
405         * dom/EventDispatcher.cpp:
406         (WebCore::EventDispatcher::determineDispatchBehavior): Mark
407         shadowRoot as an unused parameter with !ENABLE(FULLSCREEN_API).
408
409 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
410
411         Reviewed by Andreas Kling.
412
413         [Texmap][Qt] Enable TextureMapper by default
414         https://bugs.webkit.org/show_bug.cgi?id=61740
415
416         Make CONFIG+=texmap an opt-out instead of an opt-in.
417
418         No new functionality so no new tests.
419
420         * WebCore.pri:
421
422 2011-05-30  Martin Robinson  <mrobinson@igalia.com>
423
424         Reviewed by Xan Lopez.
425
426         [GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots
427         https://bugs.webkit.org/show_bug.cgi?id=61693
428
429         Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is
430         null. A recent change fixing 0-pixel-size fonts means that m_scaledFont
431         may now be null.
432
433         No new tests. This change should cause fast/css/font-face-zero-hash-key.html
434         to stop crashing.
435
436         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
437         (WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing
438         m_scaledFont.
439
440 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
441
442         Reviewed by Kenneth Rohde Christiansen.
443
444         [Texmap][Qt] Disable accelerated plugins/media until they're working.
445         https://bugs.webkit.org/show_bug.cgi?id=61687
446
447         Until this works properly, we should indicate that our media implementation
448         in texture mapper doesn't support accelerated compositing.
449
450         This makes LayoutTests/compositing/video/* work again.
451
452         * platform/graphics/qt/MediaPlayerPrivateQt.h:
453         (WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering):
454         (WebCore::MediaPlayerPrivateQt::platformLayer):
455
456 2011-05-30  Mikhail Naganov  <mnaganov@chromium.org>
457
458         Reviewed by Adam Barth.
459
460         [Chromium] Fix regression after r87628.
461         https://bugs.webkit.org/show_bug.cgi?id=61733
462
463         Having r87628 in place, Chrome reliability bot crashes in
464         WebCore::HTMLLinkElement::onloadTimerFired.
465
466         This is because the change makes WebCore::CachedResource::setRequest to
467         call checkNotify on request reset.  HTMLLinkElement registers itself as
468         CachedResource client via m_cachedSheet, which can happen even if
469         m_cachedLinkResource wasn't set.  As a result,
470         WebCore::HTMLLinkElement::notifyFinished is got called with unset
471         m_cachedLinkResource, which causes a crash in
472         HTMLLinkElement::onloadTimerFired
473
474         * html/HTMLLinkElement.cpp:
475         (WebCore::HTMLLinkElement::notifyFinished):
476
477 2011-05-30  Jer Noble  <jer.noble@apple.com>
478
479         Reviewed by Darin Adler and Simon Fraser.
480
481         REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again
482         https://bugs.webkit.org/show_bug.cgi?id=61717
483         rdar://problem/9522272
484
485         May be some good way to test this later. No immediate idea about the best way.
486
487         When a media element is taken into full-screen mode, stop events from propagating
488         outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior()
489         has been changed to take a shadow root node. In our full screen media element check,
490         we check to see if the passed shadow root is the shadow root of the full screen media
491         element, and if so, specify events should StayInsideShadowDOM. The end result is that
492         inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the
493         way from the SliderThumb to the video element's shadow root, but no further.
494
495         * dom/EventDispatcher.cpp:
496         (WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the
497         shadow DOM when showing a full screen video.
498
499         * html/HTMLMediaElement.cpp:
500         (WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls.
501         The events telling us about activity in the shadow DOM no longer bubble out so we need to
502         handle this inside the shadow DOM on the root element.
503         (WebCore::HTMLMediaElement::play): Ditto.
504         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
505         (WebCore::HTMLMediaElement::defaultEventHandler): Ditto.
506         (WebCore::HTMLMediaElement::enterFullscreen): Ditto.
507         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
508         * html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element.
509
510         * html/shadow/MediaControlElements.cpp:
511         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out
512         changes that tried to make special rules for events using preDispatchEventHandler and such.
513         This rolls out both r87622 and r87655.
514         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto.
515         (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto.
516         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto.
517         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
518         (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
519         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
520         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto.
521         (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
522         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
523         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto.
524         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
525         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
526         * html/shadow/MediaControlElements.h: Ditto.
527
528         * html/shadow/MediaControlRootElement.cpp:
529         (WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members.
530         (WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider
531         hiding the controls later.
532         (WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse
533         is no longer over the controls.
534         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide
535         automatically if we're playing.
536         (WebCore::MediaControlRootElement::enteredFullscreen): Start the timer.
537         (WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care
538         if we are full screen.
539         (WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function.
540         (WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions
541         as the mouse is moved in and out.
542         (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if
543         needed.
544         (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions
545         are met.
546         (WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer.
547
548         * html/shadow/MediaControlRootElement.h: Added new functions and data members.
549
550
551 2011-05-30  Gavin Peters  <gavinp@chromium.org>
552
553         Reviewed by Adam Barth.
554
555         prevent HTMLLinkElement from watching multiple CachedResources
556         https://bugs.webkit.org/show_bug.cgi?id=61686
557
558         If we modify an existing link element, stop listening to the previous
559         cached resource, to prevent double notifications (which crash).
560
561         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
562
563         * html/HTMLLinkElement.cpp:
564         (WebCore::HTMLLinkElement::process):
565
566 2011-05-30  Peter Varga  <pvarga@webkit.org>
567
568         Unreviewed build fix.
569
570         [Qt][V8] Fix debug build.
571
572         No new tests needed.
573
574         * css/CSSStyleDeclaration.cpp: Add missing header.
575         * dom/Text.cpp: Ditto.
576         * rendering/InlineTextBox.cpp: Ditto.
577
578 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
579
580         Unreviewed, rolling out r87683.
581         http://trac.webkit.org/changeset/87683
582         https://bugs.webkit.org/show_bug.cgi?id=61729
583
584         Breaks inspector tests on Chromium (Requested by apavlov on
585         #webkit).
586
587         * inspector/front-end/StylesSidebarPane.js:
588         (WebInspector.StylesSidebarPane.prototype.update):
589
590 2011-05-25  Alexander Pavlov  <apavlov@chromium.org>
591
592         Reviewed by Yury Semikhatsky.
593
594         Web Inspector: node selection is slow in the Elements panel.
595         https://bugs.webkit.org/show_bug.cgi?id=60813
596
597         Schedule full style updates rather than request all node styles from the backend up front.
598
599         * inspector/front-end/StylesSidebarPane.js:
600         (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles):
601         (WebInspector.StylesSidebarPane.prototype.update):
602
603 2011-05-30  Andrey Kosyakov  <caseq@chromium.org>
604
605         Reviewed by Pavel Feldman.
606
607         Web Inspector: do not issue frontendReused for reload or navigation.
608         https://bugs.webkit.org/show_bug.cgi?id=61192
609
610        - only issue frontendReused when inspector is attached after main resource committed load
611        - upon committing loading main resource, reset agents before sending FrameNavigated to page agent
612        - Ensure main resource is set early so that abbreviations of URLs in resource tree are consistent after reload
613        - do not enable agents explicitly in frontendReused (this is done by backend when resotring state from cookie)
614
615         * inspector/InspectorAgent.cpp:
616         (WebCore::InspectorAgent::InspectorAgent):
617         (WebCore::InspectorAgent::restore):
618         (WebCore::InspectorAgent::clearFrontend):
619         (WebCore::InspectorAgent::didCommitLoad):
620         * inspector/InspectorAgent.h:
621         * inspector/InspectorInstrumentation.cpp:
622         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
623         * inspector/front-end/NetworkManager.js:
624         * inspector/front-end/ResourceTreeModel.js:
625         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
626         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
627         (WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation):
628         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
629         * inspector/front-end/ResourcesPanel.js:
630         (WebInspector.ResourcesPanel.prototype.reset):
631         (WebInspector.ResourcesPanel.prototype._resetResourcesTree):
632         (WebInspector.DatabaseTreeElement.prototype.onpopulate):
633         (WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement):
634         * inspector/front-end/inspector.js:
635         (WebInspector.reset):
636         (WebInspector.frontendReused):
637
638 2011-05-30  Ryan Sleevi  <rsleevi@chromium.org>
639
640         Reviewed by Darin Adler.
641
642         FEConvolveMatrix::getPixelValue() fails to properly check if y is within bounds, causing it to fail to correctly apply the kernel and edge mode to the first targetY pixels
643         https://bugs.webkit.org/show_bug.cgi?id=61603
644
645         Test: svg/filters/feConvolveFilter-y-bounds.svg
646
647         * platform/graphics/filters/FEConvolveMatrix.cpp:
648         (WebCore::FEConvolveMatrix::getPixelValue):
649
650 2011-05-30  Nate Chapin  <japhet@chromium.org>
651
652         Reviewed by Antti Koivisto.
653
654         Refactor the CachedResourceLoader -> CachedResource -> CachedResourceRequest
655         flow so it's a little less circular.
656         https://bugs.webkit.org/show_bug.cgi?id=61666
657
658         * loader/cache/CachedFont.cpp:
659         (WebCore::CachedFont::beginLoadIfNeeded):
660         * loader/cache/CachedResource.cpp:
661         (WebCore::CachedResource::load):
662         * loader/cache/CachedResourceLoader.cpp:
663         (WebCore::CachedResourceLoader::requestImage):
664         (WebCore::CachedResourceLoader::setAutoLoadImages):
665         (WebCore::CachedResourceLoader::loadStarted):
666         * loader/cache/CachedResourceLoader.h:
667         * loader/cache/CachedResourceRequest.cpp:
668         (WebCore::CachedResourceRequest::load):
669
670 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
671
672         Unreviewed, rolling out r87618.
673         http://trac.webkit.org/changeset/87618
674         https://bugs.webkit.org/show_bug.cgi?id=61720
675
676         Causes BrowserFocusTest.FocusOnReload to fail (Requested by
677         abarth|gardener on #webkit).
678
679         * html/HTMLLinkElement.cpp:
680         (WebCore::HTMLLinkElement::process):
681
682 2011-05-29  Yuta Kitamura  <yutak@chromium.org>
683
684         Reviewed by Kent Tamura.
685
686         WebSocket closing handshake
687         https://bugs.webkit.org/show_bug.cgi?id=35721
688
689         Implement WebSocket closing handshake based on Ian Hickson's
690         WebSocket protocol draft 76.
691
692         Tests: http/tests/websocket/tests/client-close.html
693                http/tests/websocket/tests/server-close.html
694
695         * platform/network/SocketStreamHandleBase.cpp:
696         (WebCore::SocketStreamHandleBase::send):
697         Do not send a message if we are in Closing state.
698         (WebCore::SocketStreamHandleBase::close):
699         Do not disconnect if we have pending data which have not been sent yet.
700         In this case, the actual disconnection will happen in sendPendingData().
701         (WebCore::SocketStreamHandleBase::disconnect):
702         Renamed from close(). Disconnect the connection immediately.
703         (WebCore::SocketStreamHandleBase::sendPendingData):
704         * platform/network/SocketStreamHandleBase.h:
705         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
706         Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
707         to didClose().
708         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
709         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
710         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
711         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
712         * websockets/ThreadableWebSocketChannelClientWrapper.h:
713         * websockets/WebSocket.cpp:
714         (WebCore::WebSocket::send):
715         (WebCore::WebSocket::close):
716         Fail if close() is attempted before the connection is established.
717         Otherwise, set the state to CLOSING and start the closing handshake.
718         (WebCore::WebSocket::bufferedAmount):
719         If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
720         (WebCore::WebSocket::didConnect):
721         (WebCore::WebSocket::didReceiveMessage):
722         We need to invoke message event in CLOSING state as well as OPEN state.
723         (WebCore::WebSocket::didReceiveMessageError):
724         (WebCore::WebSocket::didStartClosingHandshake):
725         (WebCore::WebSocket::didClose):
726         * websockets/WebSocket.h:
727         * websockets/WebSocketChannel.cpp:
728         (WebCore::WebSocketChannel::WebSocketChannel):
729         (WebCore::WebSocketChannel::close):
730         Start the closing handshake.
731         (WebCore::WebSocketChannel::disconnect):
732         Disconnect the socket stream, instead of close.
733         (WebCore::WebSocketChannel::didClose):
734         (WebCore::WebSocketChannel::didReceiveData): Ditto.
735         (WebCore::WebSocketChannel::didFail): Ditto.
736         (WebCore::WebSocketChannel::processBuffer):
737         Ditto.
738         Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
739         (WebCore::WebSocketChannel::startClosingHandshake):
740         Send 0xFF 0x00 byte sequence.
741         (WebCore::WebSocketChannel::closingTimerFired):
742         Disconnect the socket stream if the closing handshake has timed out.
743         * websockets/WebSocketChannel.h:
744         m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
745         specification).
746         * websockets/WebSocketChannelClient.h:
747         (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
748         (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
749         * websockets/WorkerThreadableWebSocketChannel.cpp:
750         Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
751         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
752         (WebCore::workerContextDidStartClosingHandshake):
753         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
754         (WebCore::workerContextDidClose):
755         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
756         * websockets/WorkerThreadableWebSocketChannel.h:
757
758 2011-05-29  Adam Barth  <abarth@webkit.org>
759
760         Attempt to fix build by implementing pure virtual function.
761
762         * html/shadow/MediaControlRootElementChromium.cpp:
763         (WebCore::MediaControlRootElementChromium::shouldHideControls):
764         * html/shadow/MediaControlRootElementChromium.h:
765
766 2011-05-29  Brian Weinstein  <bweinstein@apple.com>
767
768         Reviewed by Darin Adler.
769
770         Controls never hide in full screen after user stops moving mouse
771         https://bugs.webkit.org/show_bug.cgi?id=61715
772         <rdar://problem/9522182>
773         
774         When we get a mouse move event in HTMLMediaElement::defaultEventHandler, and we are in full screen,
775         show the media controls, and then start a timer.
776         
777         The timer fires 3 seconds after the user's last mouse movement (timer is restarted on every mouse
778         move), and hides the controls.
779
780         * html/HTMLMediaElement.cpp:
781         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize our new timer.
782         (WebCore::HTMLMediaElement::play): If we are in full screen mode, start our timer to hide the full screen
783             controls. We don't want the user to have to move the mouse to hide them when they use the spacebar
784             to play.
785         (WebCore::HTMLMediaElement::startHideFullscreenControlsTimer): Starts a oneshot timer 3 seconds in the future
786             if we are in full screen.
787         (WebCore::HTMLMediaElement::hideFullscreenControlsTimerFired): Make sure that we are currently playing, and
788             we are in full screen, and hide the controls. We don't want to hide the controls if we are paused.
789         (WebCore::HTMLMediaElement::stopHideFullscreenControlsTimer): Stops the timer.
790         (WebCore::HTMLMediaElement::defaultEventHandler): If we get a mouse move event and are in full screen, show the
791             controls and start a timer to hide them.
792         (WebCore::HTMLMediaElement::enterFullscreen): Start a timer to hide the full screen controls. The user shouldn't
793             have the move the mouse once they enter full screen to hide the controls.
794         (WebCore::HTMLMediaElement::exitFullscreen): Stop the timer to hide the full screen controls.
795         * html/HTMLMediaElement.h:
796         * html/shadow/MediaControls.h: Added pure virtual shouldHideControls() method.
797         * html/shadow/MediaControlRootElement.cpp:
798         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer to hide the full screen controls.
799         (WebCore::MediaControlRootElement::shouldHideControls): Added, only report that
800             the caller should hide the controls if the panel is not hovered.
801         * html/shadow/MediaControlRootElement.h:
802
803 2011-05-29  Jer Noble  <jer.noble@apple.com>
804
805         Reviewed by Simon Fraser.
806
807         Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
808         https://bugs.webkit.org/show_bug.cgi?id=61712
809
810         Tests: fullscreen/full-screen-iframe-zIndex.html
811
812         Walk up the ancestor chain for the full-screen element, marking them as full-screen
813         ancestors. Then, we apply a pseudo-class to those elements, which disable all their
814         stacking-context-creating styles.  Set the z-index of all full-screen elements (and
815         the iframes which contain them) to a large value, ensuring they appear above other
816         sibling elements.
817
818         This new behavior replaces the previous "-webkit-full-screen-media-document" behavior
819         and pesudo-class, so remove it and replace it with the new pseudo-class.
820
821         * css/CSSSelector.cpp:
822         (WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove
823             -webkit-full-screen-media-document.
824         (WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove
825             PseudoFullScreenMediaDocument
826         (WebCore::CSSSelector::extractPseudoType): Ditto.
827         * css/CSSSelector.h: Ditto.
828         * css/CSSStyleSelector.cpp:
829         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the
830             PseudoFullScreenMediaDocument implementation and replace it with
831             PseudoFullScreenAncestor.
832         * css/fullscreen.css:
833         (:-webkit-full-screen): Add a z-index property.
834         (:-webkit-full-screen-ancestor:not(iframe)): Added.  Reset the z-index to
835             auto, and reset other stacking-context creating properties.
836         * dom/Document.cpp:
837         (WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element
838             instead of just the iframe elements.
839         (WebCore::Document::webkitWillEnterFullScreenForElement): Ditto.
840         * dom/Element.cpp:
841         (WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property.
842         (WebCore::Element::insertedIntoTree): Ditto.
843         (WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase.
844         (WebCore::Element::setContainsFullScreenElement): Ditto.
845         * dom/Element.h:
846         * dom/ElementRareData.h:
847         (WebCore::ElementRareData::ElementRareData): Added ivar and initializer for 
848             m_containsFullScreenElement.
849         * html/HTMLFrameElementBase.cpp:
850         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer.
851         (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element.
852         * html/HTMLFrameElementBase.h:
853         * rendering/style/RenderStyleConstants.h:
854
855 2011-05-29  Dan Bernstein  <mitz@apple.com>
856
857         Reviewed by Darin Adler.
858
859         <rdar://problem/9515650> 30 second rewind button obscured in fullscreen controller when video uses custom inline controls
860         https://bugs.webkit.org/show_bug.cgi?id=61714
861
862         * dom/Document.cpp:
863         (WebCore::Document::webkitDidEnterFullScreenForElement): Call didBecomeFullscreenElement() on the
864         new full screen element.
865         (WebCore::Document::webkitWillExitFullScreenForElement): Call willStopBeingFullscreenElement() on
866         the full screen element.
867         * dom/Element.h:
868         (WebCore::Element::didBecomeFullscreenElement): Added with a default implementation that does nothing.
869         (WebCore::Element::willStopBeingFullscreenElement): Ditto.
870         * html/HTMLMediaElement.cpp:
871         (WebCore::HTMLMediaElement::didBecomeFullscreenElement): Added this override, which calls
872         MediaControls::enteredFullscreen().
873         (WebCore::HTMLMediaElement::willStopBeingFullscreenElement): Added this override, which calls
874         MediaControls::exitedFullscreen().
875         * html/HTMLMediaElement.h:
876         * html/shadow/MediaControlElements.cpp:
877         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Removed calls to
878         enteredFullscreen() and exitedFullscreen() from here, since they are now called in response to
879         changes to the fullscreen-ness of the element.
880
881 2011-05-29  Darin Adler  <darin@apple.com>
882
883         Reviewed by Kevin Decker.
884
885         REGRESSION (r87622): In media documents, clicking the full screen button and the play button pauses the video
886         https://bugs.webkit.org/show_bug.cgi?id=61713
887
888         We need to come up with a way to regression-test these changes. Nothing at the moment.
889
890         The bug is that we removed calls to preventDefault, but we still do need to prevent
891         default handling of this event.
892
893         * html/shadow/MediaControlElements.cpp:
894         (WebCore::MediaControlElement::preDispatchEventHandler): Add back the preventDefault
895         that was in here before r87622 as well as the stopPropagation that was added in r87622.
896         (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
897         (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
898         (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
899         (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
900         (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
901         (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
902         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
903         (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
904         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
905
906 2011-05-29  Andreas Kling  <kling@webkit.org>
907
908         Reviewed by Kenneth Rohde Christiansen.
909
910         Element: Micro-cleanup of scroll methods.
911         https://bugs.webkit.org/show_bug.cgi?id=61705
912
913         Do an early return without calculating element boundaries when asked
914         to scroll an element without a renderer().
915
916         * dom/Element.cpp:
917         (WebCore::Element::scrollIntoView):
918         (WebCore::Element::scrollIntoViewIfNeeded):
919         (WebCore::Element::scrollByUnits):
920
921 2011-05-29  Darin Adler  <darin@apple.com>
922
923         Reviewed by Dan Bernstein.
924
925         Fix assertion seen when entering full screen mode for standalone video
926         https://bugs.webkit.org/show_bug.cgi?id=61708
927
928         We don't currently have a way to make a regression test for this.
929
930         * dom/Document.cpp:
931         (WebCore::Document::setAnimatingFullScreen): Call scheduleForcedStyleRecalc,
932         because scheduleStyleRecalc is intended to only be called when the style
933         system itself detects recalc is needed.
934
935 2011-05-27  Andreas Kling  <kling@webkit.org>
936
937         Reviewed by James Robinson.
938
939         [Qt] Add area check to ImageBufferData::getImageData()
940         https://bugs.webkit.org/show_bug.cgi?id=61375
941
942         No change in behavior, just a sanity check.
943
944         * platform/graphics/qt/ImageBufferQt.cpp:
945         (WebCore::getImageData):
946
947 2011-05-29  Beth Dakin  <bdakin@apple.com>
948
949         Reviewed by Darin Adler.
950
951         https://bugs.webkit.org/show_bug.cgi?id=61700
952         Need WebKit2 API to get the size of the render tree
953         -and corresponding-
954         <rdar://problem/9512733>
955
956         New member variable on RenderArena keeps track of the current amount of memory 
957         allocated in the arena. The new client function sends this piece of data to 
958         WebKit.
959         * page/ChromeClient.h:
960         (WebCore::ChromeClient::setRenderTreeSize):
961         * page/FrameView.cpp:
962         (WebCore::FrameView::performPostLayoutTasks):
963         * rendering/RenderArena.cpp:
964         (WebCore::RenderArena::RenderArena):
965         (WebCore::RenderArena::allocate):
966         (WebCore::RenderArena::free):
967         * rendering/RenderArena.h:
968         (WebCore::RenderArena::totalRenderArenaSize):
969
970 2011-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
971
972         Unreviewed, rolling out r87566.
973         http://trac.webkit.org/changeset/87566
974         https://bugs.webkit.org/show_bug.cgi?id=61702
975
976         It made all tests assert on Qt in debug mode (Requested by
977         Ossy_weekend on #webkit).
978
979         * WebCore.exp.in:
980         * bindings/ScriptControllerBase.cpp:
981         (WebCore::ScriptController::executeIfJavaScriptURL):
982         * dom/Document.cpp:
983         (WebCore::Document::Document):
984         (WebCore::Document::suggestedMIMEType):
985         (WebCore::Document::lastModified):
986         (WebCore::Document::initSecurityContext):
987         (WebCore::Document::updateURLForPushOrReplaceState):
988         * dom/Document.h:
989         (WebCore::Document::setDocumentLoader):
990         (WebCore::Document::loader):
991         * html/MediaDocument.cpp:
992         (WebCore::MediaDocument::replaceMediaElementTimerFired):
993         * html/PluginDocument.cpp:
994         (WebCore::PluginDocumentParser::createDocumentStructure):
995         * platform/mac/HTMLConverter.mm:
996         (fileWrapperForElement):
997
998 2011-05-28  Steve Falkenburg  <sfalken@apple.com>
999
1000         Reviewed by Dan Bernstein.
1001
1002         Don't add sub-frames to global history when navigating via back/forward
1003         https://bugs.webkit.org/show_bug.cgi?id=61701
1004         <rdar://problem/9521222>
1005
1006         Instead of just checking whether the load is the first in the frame, we also need to
1007         check to make sure we're loading in the main frame.
1008
1009         Not testable due to lack of global history infrastructure in DRT.
1010
1011         * loader/FrameLoader.cpp:
1012         (WebCore::FrameLoader::transitionToCommitted):
1013
1014 2011-05-28  Alexey Proskuryakov  <ap@apple.com>
1015
1016         Suggested by Simon Fraser.
1017
1018         REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
1019         https://bugs.webkit.org/show_bug.cgi?id=61692
1020         <rdar://problem/9488628>
1021
1022         * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): There was no need to use
1023         ASSERT_UNUSED here.
1024
1025 2011-05-28  Alexey Proskuryakov  <ap@apple.com>
1026
1027         Reviewed by Geoff Garen.
1028
1029         REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
1030         https://bugs.webkit.org/show_bug.cgi?id=61692
1031         <rdar://problem/9488628>
1032
1033         Test: fast/dom/gc-image-element-2.html
1034
1035         Manually verified that tests from bug 59604 and from bug 40926 still pass.
1036
1037         The problem here was that HTMLImageElement::hasPendingActivity() could return false when
1038         a load (or error) event was still expected to fire.
1039
1040         * loader/cache/CachedResource.cpp:
1041         (WebCore::CachedResource::setRequest):
1042         * loader/cache/CachedResource.h:
1043         (WebCore::CachedResource::wasCanceled):
1044         (WebCore::CachedResource::errorOccurred):
1045         Track whether the load was canceled. We want to always notify clients of load outcome,
1046         as that's the only way they could make intelligent decisions.
1047
1048         * dom/ScriptElement.cpp: (WebCore::ScriptElement::execute): Cached resource clients now
1049         get a notifyFinished call on cancellation. Handle this case, where we don't need the
1050         execute the script, but also don't need to fire an error event.
1051
1052         * html/HTMLImageElement.cpp: Moved hasPendingActivity() to header, since it's just a single
1053         function call now.
1054
1055         * html/HTMLImageElement.h: (WebCore::HTMLImageElement::hasPendingActivity): There is a large
1056         window between when CachedResource::isLoading() becomes false and events are queued.
1057         ImageLoader::haveFiredLoadEvent() is a much better indication of whether we are expecting
1058         an event to fire.
1059
1060         * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::onloadTimerFired): Again, don't do
1061         anything on cancellation.
1062
1063         * loader/ImageLoader.cpp:
1064         (WebCore::ImageEventSender::hasPendingEvents): Made it debug-only again, and fixed to
1065         give an accurate result while looping over the list of events to dispatch.
1066         (WebCore::ImageLoader::notifyFinished): Don't do anything when cancelled. We don't want to
1067         switch to a broken image icon, or to dispatch events.
1068         (WebCore::ImageEventSender::dispatchPendingEvents): Clear the current loader from dispatching
1069         list, as the event is no longer pending when it's being dispatched.
1070
1071         * loader/ImageLoader.h: Removed unnecessary hasPendingLoadEvent(). We don't care whether one
1072         is already pending, we only care if one is expected at some time in the future, and
1073         !haveFiredLoadEvent() is our best idea of that.
1074
1075         * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::notifyFinished): Another place to
1076         handle cancellation.
1077
1078 2011-05-28  Adam Barth  <abarth@webkit.org>
1079
1080         Reviewed by Alexey Proskuryakov.
1081
1082         Audit all uses of KURL::prettyURL
1083         https://bugs.webkit.org/show_bug.cgi?id=61201
1084
1085         As far as I can tell, all the callers of this API are confused.  There
1086         seems to be a cargo cult of using the "pretty" version of a URL, but in
1087         reality folks just want the URL itself.  The only case I'm unsure about
1088         is location.href, which could have some compatibility constraints.
1089         I've renamed prettyURL to deprecatedString to discourage folks from
1090         further cargo-culting.
1091
1092         * WebCore.exp.in:
1093         * page/Location.cpp:
1094         (WebCore::Location::href):
1095         (WebCore::Location::toString):
1096         * platform/KURL.cpp:
1097         (WebCore::KURL::deprecatedString):
1098         * platform/KURL.h:
1099         * platform/KURLGoogle.cpp:
1100         (WebCore::KURL::deprecatedString):
1101         * platform/network/soup/ResourceHandleSoup.cpp:
1102         (WebCore::ResourceHandle::prepareForURL):
1103         * workers/WorkerLocation.cpp:
1104         (WebCore::WorkerLocation::href):
1105         (WebCore::WorkerLocation::toString):
1106
1107 2011-05-28  Jer Noble  <jer.noble@apple.com>
1108
1109         Reviewed by Maciej Stachowiak.
1110
1111         Mouse clicks propagate outside full-screen media controls.
1112         https://bugs.webkit.org/show_bug.cgi?id=61689
1113
1114         Mouse click events are propagating out of the media controls, so mouse click
1115         listeners registered on the video element are getting fired when the user
1116         clicks on media controller buttons.  By default, block propagation of click 
1117         events from MediaControlElements by overriding preDispatchEventHandler, and
1118         convert all instances of defaultEventHandler -> preDispatchEventHandler.  Change
1119         all calls of event->setDefaultHandled() to event->stopPropagation().
1120
1121         * html/shadow/MediaControlElements.cpp:
1122         (WebCore::MediaControlElement::preDispatchEventHandler): Added.  Block 
1123             propagation of all mouse click events.
1124         (WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler):
1125             Renamed from setDefaultHandled.
1126         (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
1127         (WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto.
1128         (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
1129         (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
1130         (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
1131         (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
1132         (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
1133         (WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto.
1134         (WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto.
1135         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
1136         (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
1137         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
1138         * html/shadow/MediaControlElements.h:
1139
1140 2011-05-28  Gavin Peters  <gavinp@chromium.org>
1141
1142         Reviewed by Adam Barth.
1143
1144         prevent HTMLLinkElement from watching multiple CachedResources
1145         https://bugs.webkit.org/show_bug.cgi?id=61686
1146
1147         If we modify an existing link element, stop listening to the previous
1148         cached resource, to prevent double notifications (which crash).
1149
1150         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
1151
1152         * html/HTMLLinkElement.cpp:
1153         (WebCore::HTMLLinkElement::process):
1154
1155 2011-05-28  Tonis Tiigi  <tonistiigi@gmail.com>
1156
1157         Reviewed by Pavel Feldman.
1158
1159         Web Inspector: there is a problem with computed style properties with wrong values
1160         https://bugs.webkit.org/show_bug.cgi?id=60535
1161
1162         * inspector/front-end/StylesSidebarPane.js:
1163         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
1164         (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
1165
1166 2011-05-26  Antonio Gomes  <agomes@rim.com>
1167
1168         Reviewed by Andreas Kling.
1169
1170         Logic error in WebCore/Page/SpatialNavigation.cpp::areRectsPartiallyAligned
1171         https://bugs.webkit.org/show_bug.cgi?id=61606
1172
1173         Removed duplicated statement within if condition.
1174
1175         No new tests. Obvious clean up patch.
1176
1177         * page/SpatialNavigation.cpp:
1178         (WebCore::areRectsPartiallyAligned):
1179
1180 2011-05-27  Simon Fraser  <simon.fraser@apple.com>
1181
1182         Reviewed by Dan Bernstein.
1183
1184         CG BitmapImage needs to check for valid CGImage in a couple of places
1185         https://bugs.webkit.org/show_bug.cgi?id=61684
1186         <rdar://problem/9519348>
1187
1188         BitmapImage::getCGImageArray() can throw an exception if frameAtIndex()
1189         returns null, which it may do if the image is corrupted or still
1190         loading. Protect against that here and in getFirstCGImageRefOfSize().
1191
1192         * platform/graphics/cg/ImageCG.cpp:
1193         (WebCore::BitmapImage::getFirstCGImageRefOfSize):
1194         (WebCore::BitmapImage::getCGImageArray):
1195
1196 2011-05-27  Jochen Eisinger  <jochen@chromium.org>
1197
1198         Reviewed by Adam Barth.
1199
1200         Add Frame parameter to all StorageArea methods. The chromium
1201         embedder uses the Frame as context to decide whether or not
1202         to allow usage of the storage API.
1203         https://bugs.webkit.org/show_bug.cgi?id=61581
1204
1205         Test: platform/chromium/permissionclient/storage-permission.html
1206
1207         * storage/Storage.cpp:
1208         (WebCore::Storage::length):
1209         (WebCore::Storage::key):
1210         (WebCore::Storage::getItem):
1211         (WebCore::Storage::contains):
1212         * storage/StorageArea.h:
1213         * storage/StorageAreaImpl.cpp:
1214         (WebCore::StorageAreaImpl::length):
1215         (WebCore::StorageAreaImpl::key):
1216         (WebCore::StorageAreaImpl::getItem):
1217         (WebCore::StorageAreaImpl::contains):
1218         * storage/StorageAreaImpl.h:
1219
1220 2011-05-27  Nate Chapin  <japhet@chromium.org>
1221
1222         Reviewed by Jian Li.
1223
1224         Keep a reference to BlobResourceHandle before calling doNotifyFinish()
1225         asynchronously to ensure it's still safe in the main thread.
1226
1227         https://bugs.webkit.org/show_bug.cgi?id=61669
1228
1229         I triggered this crash in fast/files/file-reader-abort.html during a
1230         refactor that changed timings slightly.
1231
1232         * platform/network/BlobResourceHandle.cpp:
1233         (WebCore::doNotifyFinish):
1234         (WebCore::BlobResourceHandle::notifyFinish):
1235         * platform/network/BlobResourceHandle.h:
1236         (WebCore::BlobResourceHandle::aborted):
1237
1238 2011-05-27  Stephanie Lewis  <slewis@apple.com>
1239
1240         Unreviewed.
1241
1242         Fix a typo in the order_file flag.
1243
1244         * Configurations/Base.xcconfig:
1245
1246 2011-05-27  Anders Carlsson  <andersca@apple.com>
1247
1248         Reviewed by Sam Weinig.
1249
1250         Always use the default localization strategy
1251         https://bugs.webkit.org/show_bug.cgi?id=61670
1252         <rdar://problem/9516130>
1253
1254         Always use the default localization strategy when there's no platform strategy.
1255
1256         * platform/DefaultLocalizationStrategy.cpp:
1257         (WebCore::DefaultLocalizationStrategy::shared):
1258         * platform/DefaultLocalizationStrategy.h:
1259         * platform/LocalizedStrings.cpp:
1260         (WebCore::inputElementAltText):
1261         (WebCore::resetButtonDefaultLabel):
1262         (WebCore::searchableIndexIntroduction):
1263         (WebCore::submitButtonDefaultLabel):
1264         (WebCore::fileButtonChooseFileLabel):
1265         (WebCore::fileButtonNoFileSelectedLabel):
1266         (WebCore::defaultDetailsSummaryText):
1267         (WebCore::copyImageUnknownFileLabel):
1268         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1269         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1270         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1271         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1272         (WebCore::contextMenuItemTagDownloadImageToDisk):
1273         (WebCore::contextMenuItemTagCopyImageToClipboard):
1274         (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
1275         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1276         (WebCore::contextMenuItemTagCopy):
1277         (WebCore::contextMenuItemTagGoBack):
1278         (WebCore::contextMenuItemTagGoForward):
1279         (WebCore::contextMenuItemTagStop):
1280         (WebCore::contextMenuItemTagReload):
1281         (WebCore::contextMenuItemTagCut):
1282         (WebCore::contextMenuItemTagPaste):
1283         (WebCore::contextMenuItemTagSelectAll):
1284         (WebCore::contextMenuItemTagNoGuessesFound):
1285         (WebCore::contextMenuItemTagIgnoreSpelling):
1286         (WebCore::contextMenuItemTagLearnSpelling):
1287         (WebCore::contextMenuItemTagSearchInSpotlight):
1288         (WebCore::contextMenuItemTagSearchWeb):
1289         (WebCore::contextMenuItemTagLookUpInDictionary):
1290         (WebCore::contextMenuItemTagOpenLink):
1291         (WebCore::contextMenuItemTagIgnoreGrammar):
1292         (WebCore::contextMenuItemTagSpellingMenu):
1293         (WebCore::contextMenuItemTagShowSpellingPanel):
1294         (WebCore::contextMenuItemTagCheckSpelling):
1295         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1296         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1297         (WebCore::contextMenuItemTagFontMenu):
1298         (WebCore::contextMenuItemTagShowFonts):
1299         (WebCore::contextMenuItemTagBold):
1300         (WebCore::contextMenuItemTagItalic):
1301         (WebCore::contextMenuItemTagUnderline):
1302         (WebCore::contextMenuItemTagOutline):
1303         (WebCore::contextMenuItemTagStyles):
1304         (WebCore::contextMenuItemTagShowColors):
1305         (WebCore::contextMenuItemTagSpeechMenu):
1306         (WebCore::contextMenuItemTagStartSpeaking):
1307         (WebCore::contextMenuItemTagStopSpeaking):
1308         (WebCore::contextMenuItemTagWritingDirectionMenu):
1309         (WebCore::contextMenuItemTagTextDirectionMenu):
1310         (WebCore::contextMenuItemTagDefaultDirection):
1311         (WebCore::contextMenuItemTagLeftToRight):
1312         (WebCore::contextMenuItemTagRightToLeft):
1313         (WebCore::contextMenuItemTagCorrectSpellingAutomatically):
1314         (WebCore::contextMenuItemTagSubstitutionsMenu):
1315         (WebCore::contextMenuItemTagShowSubstitutions):
1316         (WebCore::contextMenuItemTagSmartCopyPaste):
1317         (WebCore::contextMenuItemTagSmartQuotes):
1318         (WebCore::contextMenuItemTagSmartDashes):
1319         (WebCore::contextMenuItemTagSmartLinks):
1320         (WebCore::contextMenuItemTagTextReplacement):
1321         (WebCore::contextMenuItemTagTransformationsMenu):
1322         (WebCore::contextMenuItemTagMakeUpperCase):
1323         (WebCore::contextMenuItemTagMakeLowerCase):
1324         (WebCore::contextMenuItemTagCapitalize):
1325         (WebCore::contextMenuItemTagChangeBack):
1326         (WebCore::contextMenuItemTagOpenVideoInNewWindow):
1327         (WebCore::contextMenuItemTagOpenAudioInNewWindow):
1328         (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
1329         (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
1330         (WebCore::contextMenuItemTagToggleMediaControls):
1331         (WebCore::contextMenuItemTagToggleMediaLoop):
1332         (WebCore::contextMenuItemTagEnterVideoFullscreen):
1333         (WebCore::contextMenuItemTagMediaPlay):
1334         (WebCore::contextMenuItemTagMediaPause):
1335         (WebCore::contextMenuItemTagMediaMute):
1336         (WebCore::contextMenuItemTagInspectElement):
1337         (WebCore::searchMenuNoRecentSearchesText):
1338         (WebCore::searchMenuRecentSearchesText):
1339         (WebCore::searchMenuClearRecentSearchesText):
1340         (WebCore::AXWebAreaText):
1341         (WebCore::AXLinkText):
1342         (WebCore::AXListMarkerText):
1343         (WebCore::AXImageMapText):
1344         (WebCore::AXHeadingText):
1345         (WebCore::AXDefinitionListTermText):
1346         (WebCore::AXDefinitionListDefinitionText):
1347         (WebCore::AXARIAContentGroupText):
1348         (WebCore::AXButtonActionVerb):
1349         (WebCore::AXRadioButtonActionVerb):
1350         (WebCore::AXTextFieldActionVerb):
1351         (WebCore::AXCheckedCheckBoxActionVerb):
1352         (WebCore::AXUncheckedCheckBoxActionVerb):
1353         (WebCore::AXLinkActionVerb):
1354         (WebCore::AXMenuListPopupActionVerb):
1355         (WebCore::AXMenuListActionVerb):
1356         (WebCore::missingPluginText):
1357         (WebCore::crashedPluginText):
1358         (WebCore::multipleFileUploadText):
1359         (WebCore::unknownFileSizeText):
1360         (WebCore::uploadFileText):
1361         (WebCore::allFilesText):
1362         (WebCore::keygenMenuItem512):
1363         (WebCore::keygenMenuItem1024):
1364         (WebCore::keygenMenuItem2048):
1365         (WebCore::keygenKeychainItemName):
1366         (WebCore::imageTitle):
1367         (WebCore::mediaElementLoadingStateText):
1368         (WebCore::mediaElementLiveBroadcastStateText):
1369         (WebCore::localizedMediaControlElementString):
1370         (WebCore::localizedMediaControlElementHelpText):
1371         (WebCore::localizedMediaTimeDescription):
1372         (WebCore::validationMessageValueMissingText):
1373         (WebCore::validationMessageValueMissingForCheckboxText):
1374         (WebCore::validationMessageValueMissingForFileText):
1375         (WebCore::validationMessageValueMissingForMultipleFileText):
1376         (WebCore::validationMessageValueMissingForRadioText):
1377         (WebCore::validationMessageValueMissingForSelectText):
1378         (WebCore::validationMessageTypeMismatchText):
1379         (WebCore::validationMessageTypeMismatchForEmailText):
1380         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
1381         (WebCore::validationMessageTypeMismatchForURLText):
1382         (WebCore::validationMessagePatternMismatchText):
1383         (WebCore::validationMessageTooLongText):
1384         (WebCore::validationMessageRangeUnderflowText):
1385         (WebCore::validationMessageRangeOverflowText):
1386         (WebCore::validationMessageStepMismatchText):
1387
1388 2011-05-27  Brady Eidson  <beidson@apple.com>
1389
1390         Reviewed by Darin Adler.
1391
1392         First swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
1393         
1394         Make the Document be intelligent about returning its DocumentLoader, including the possibility that
1395         the DocumentLoader will be null.
1396
1397         No new tests. No change in behavior.
1398
1399         Instead of storing the DocumentLoader at construction and never changing it,
1400         always calculate it based on the FrameLoader's current DocumentLoader:
1401         * dom/Document.cpp:
1402         (WebCore::Document::Document):
1403         (WebCore::Document::suggestedMIMEType):
1404         (WebCore::Document::lastModified):
1405         (WebCore::Document::initSecurityContext):
1406         (WebCore::Document::updateURLForPushOrReplaceState):
1407         (WebCore::Document::loader):
1408         * dom/Document.h:
1409
1410         Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
1411         * bindings/ScriptControllerBase.cpp:
1412         (WebCore::ScriptController::executeIfJavaScriptURL):
1413         * html/MediaDocument.cpp:
1414         (WebCore::MediaDocument::replaceMediaElementTimerFired):
1415         * html/PluginDocument.cpp:
1416         (WebCore::PluginDocumentParser::createDocumentStructure):
1417         * platform/mac/HTMLConverter.mm:
1418         (fileWrapperForElement):
1419
1420         * WebCore.exp.in:
1421
1422 2011-05-27  Jer Noble  <jer.noble@apple.com>
1423
1424         Reviewed by Maciej Stachowiak.
1425
1426         30 second rewind button obscured in fullscreen controller
1427         https://bugs.webkit.org/show_bug.cgi?id=61663
1428
1429         If reset() is called while in full-screen mode, make sure to show and hide
1430         the correct controls for that mode.
1431
1432         * html/shadow/MediaControlRootElement.cpp:
1433         (WebCore::MediaControlRootElement::reset):
1434
1435 2011-05-27  James Robinson  <jamesr@chromium.org>
1436
1437         Reviewed by Simon Fraser.
1438
1439         GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
1440         https://bugs.webkit.org/show_bug.cgi?id=61590
1441
1442         Adds overflow control layers to the compositor tree for layers without clipping layers regardless of whether the
1443         backing is parented.  This ensures that the scroll corner layer for an iframe without a clipping layer ends up
1444         in the final layer tree.  We don't currently render resizers for iframes, but we will soon and this keeps the
1445         graphics layer tree consistent.
1446
1447         Test: compositing/iframes/resizer.html
1448
1449         * rendering/RenderLayerCompositor.cpp:
1450         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1451
1452 2011-05-27  Adam Barth  <abarth@webkit.org>
1453
1454         Reviewed by Eric Seidel.
1455
1456         HTMLVideoElement::currentSrc() should return a KURL
1457         https://bugs.webkit.org/show_bug.cgi?id=61578
1458
1459         I suspect we got into this mess because the author of this code didn't
1460         know about the URL attribute in WebKit IDL, which is super useful!
1461
1462         Bad news: The line of code in question seems to have another bug, which
1463         I've documented in a FIXME.  Let the yak shaving continue!
1464
1465         * html/HTMLMediaElement.cpp:
1466         (WebCore::urlForLogging):
1467         (WebCore::HTMLMediaElement::loadResource):
1468         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1469         (WebCore::HTMLMediaElement::selectNextSourceChild):
1470         (WebCore::HTMLMediaElement::getPluginProxyParams):
1471         * html/HTMLMediaElement.h:
1472         (WebCore::HTMLMediaElement::currentSrc):
1473         (WebCore::HTMLMediaElement::currentURL):
1474         * html/canvas/CanvasRenderingContext.cpp:
1475         (WebCore::CanvasRenderingContext::checkOrigin):
1476         * rendering/HitTestResult.cpp:
1477         (WebCore::HitTestResult::absoluteMediaURL):
1478             - This complete URL call was unnecessary because currentSrc is
1479               already absolute.
1480
1481 2011-05-27  Mikhail Naganov  <mnaganov@chromium.org>
1482
1483         Reviewed by Pavel Feldman.
1484
1485         Web Inspector: [Chromium] Add support for showing URL of DOMWindow in heap profiles.
1486         https://bugs.webkit.org/show_bug.cgi?id=61177
1487
1488         * inspector/front-end/HeapSnapshot.js:
1489         (WebInspector.HeapSnapshotNode.prototype.get className):
1490
1491 2011-05-27  Nikolas Zimmermann  <nzimmermann@rim.com>
1492
1493         Rubber-stamped by Rob Buis.
1494
1495         embedded SVG object doesn't scale right
1496         https://bugs.webkit.org/show_bug.cgi?id=10526
1497
1498         Fixes crash in svg/custom/immutable-properties.html, seen on the bots.
1499
1500         * svg/SVGLength.cpp:
1501         (WebCore::SVGLength::determineViewport): Oops forgot to merge-in a null check before landing.
1502
1503 2011-05-27  Nikolas Zimmermann  <nzimmermann@rim.com>
1504
1505         Reviewed by Rob Buis.
1506
1507         embedded SVG object doesn't scale right
1508         https://bugs.webkit.org/show_bug.cgi?id=10526
1509
1510         <object> tags should treat width/height on a referenced SVG as intrinsic width/height
1511         https://bugs.webkit.org/show_bug.cgi?id=11976
1512
1513         Incorrect handling of percentage values for width/height on embedded elements
1514         https://bugs.webkit.org/show_bug.cgi?id=14793
1515
1516         WebKit fails some WICD 1.0 core test cases
1517         https://bugs.webkit.org/show_bug.cgi?id=15836 (partially fixed, all 'rightsizing' tests are fixed)
1518
1519         CSS 2.1: Support replaced elements with relative intrinsic sizes
1520         https://bugs.webkit.org/show_bug.cgai?id=15849 (partially fixed)
1521
1522         SVG embedded as <object> doesn't respect width/height attributes
1523         https://bugs.webkit.org/show_bug.cgi?id=34972
1524
1525         Explicit size of object tag ignored
1526         https://bugs.webkit.org/show_bug.cgi?id=37086
1527
1528         Add partial support of CSS 2.1 replaced elements with intrinsic size. The feature itself is complete but has only
1529         been implemented for RenderPart, to support SVG content document size negotiation. It serves as starting point for a generalization, in future.
1530         The changes in RenderPart are a 1:1 transliteration of the spec (http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width/height, see code).
1531
1532         SVG 1.1 says:
1533         The 'width' attribute on the outermost svg element establishes the viewport's width, unless the following conditions are met:
1534         ...
1535         and there are CSS-compatible positioning properties ([CSS2], section 9.3) specified on the referencing element (e.g., the 'object' element)
1536         or on the containing document's outermost svg element that are sufficient to establish the width of the viewport. Under these conditions,
1537         the positioning properties establish the viewport's width.
1538
1539         If an <object> carries width/height attributes, these specify the viewport size of the embedded SVG, instead of its own
1540         width/height or viewBox properties. If an <object> has no width/height information, its intrinsic size needs to be calculated depending
1541         on the intrinsic ratio (viewBox width divided by height ratio) and the width/height properties on the outermost referenced <svg> element.
1542         This requires a negotiation between the host document and the embedded document.
1543         (There are several more factors that need to be considered, the CSS spec covers this and the RenderPart::computeReplaced* code covers this.)
1544
1545         Fixes dozens of long-standing bug reports. The number one integration issue when using SVG through <object> is resolved: "right sizing".
1546
1547         Tests: http/tests/misc/object-embedding-svg-delayed-size-negotiation.xhtml
1548                svg/custom/object-no-size-attributes.xhtml (bug 11976, from Eric Seidel)
1549                svg/custom/object-sizing-explicit-height.xhtml (bug 10526, from Ryan Cannon)
1550                svg/custom/object-sizing-explicit-width-height.xhtml
1551                svg/custom/object-sizing-explicit-width.xhtml (bug 14793, from Oliver Hunt)
1552                svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml
1553                svg/custom/object-sizing-no-width-height.xhtml
1554                svg/custom/object-sizing.xhtml (bug 37086, from Jeff Schiller)
1555                svg/wicd/rightsizing-grid.xhtml (bug 15836, WICD rightsizing test now works)
1556                svg/wicd/test-rightsizing-a.xhtml (ditto)
1557                svg/wicd/test-rightsizing-b.xhtml (ditto)
1558                svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml
1559                svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml
1560                svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml
1561                svg/zoom/page/zoom-svg-through-object-with-override-size.html (bug 34972, from Andreas Kling)
1562                svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml
1563                svg/zoom/page/zoom-svg-through-object-with-text.xhtml
1564
1565         * platform/Length.h:
1566         (WebCore::Length::isSpecified):
1567         * rendering/RenderPart.cpp:
1568         (WebCore::RenderPart::embeddedSVGContentRenderer):
1569         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
1570         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
1571         (WebCore::RenderPart::computeReplacedLogicalWidth):
1572         (WebCore::RenderPart::computeReplacedLogicalHeight):
1573         (WebCore::RenderPart::layout):
1574         * rendering/RenderPart.h:
1575         * rendering/RenderReplaced.cpp:
1576         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1577         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1578         * rendering/svg/RenderSVGRoot.cpp:
1579         (WebCore::RenderSVGRoot::RenderSVGRoot):
1580         (WebCore::RenderSVGRoot::computeIntrinsicRatio):
1581         (WebCore::RenderSVGRoot::computeIntrinsicWidth):
1582         (WebCore::RenderSVGRoot::computeIntrinsicHeight):
1583         (WebCore::RenderSVGRoot::negotiateSizeWithHostDocumentIfNeeded):
1584         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
1585         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
1586         (WebCore::RenderSVGRoot::layout):
1587         * rendering/svg/RenderSVGRoot.h:
1588         * svg/SVGLength.cpp:
1589         (WebCore::SVGLength::determineViewport):
1590         * svg/SVGSVGElement.cpp:
1591         (WebCore::SVGSVGElement::currentScale):
1592         (WebCore::SVGSVGElement::setCurrentScale):
1593         (WebCore::SVGSVGElement::currentViewBoxRect):
1594         (WebCore::SVGSVGElement::viewBoxToViewTransform):
1595         * svg/SVGSVGElement.h:
1596
1597 2011-05-27  Michael Saboff  <msaboff@apple.com>
1598
1599         Reviewed by David Hyatt.
1600
1601         https://bugs.webkit.org/show_bug.cgi?id=61646
1602         Duplicate Fonts Put in Font Cache on Mac Due to Duplicate CGFontRefs for Same Font
1603
1604         Change the platformIsEqual to just compare the m_font members if
1605         either is not null.
1606
1607         No tests added - functionality unchanged, fixing memory abandonment.
1608
1609         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1610         (WebCore::FontPlatformData::platformIsEqual):
1611
1612 2011-05-25  Martin Robinson  <mrobinson@igalia.com>
1613
1614         Reviewed by Dirk Schulze.
1615
1616         [GTK][Cairo] Twitter rendering breaks
1617         https://bugs.webkit.org/show_bug.cgi?id=60917
1618
1619         When instantiating a cairo_scaled_font_t font would put the font in an error state,
1620         leave the m_scaledFont member of platform data as null. Rendering with scaled fonts
1621         in the error state can later lead to corrupted rendering.
1622
1623         Due to this change, we must always null check cairo_scaled_font_t and the platform
1624         data now carries the cairo_font_face_t object with it, so that it can be accessed later
1625         if there is no cairo_scaled_font_t.
1626
1627         Test: platform/gtk/fonts/zero-pixel-sized-fonts.html
1628
1629         * platform/graphics/cairo/FontCairo.cpp:
1630         (WebCore::Font::drawGlyphs): If the scaled font is null, do not render.
1631         * platform/graphics/freetype/FontPlatformData.h: Now include the cairo_font_face_t.
1632         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1633         (WebCore::FontPlatformData::FontPlatformData): Initialize the new member.
1634         (WebCore::FontPlatformData::operator=): Carry over the new member.
1635         (WebCore::FontPlatformData::operator==): Check equality with the new member.
1636         (WebCore::FontPlatformData::initializeWithFontFace): If the initialization of m_scaledFont
1637         put the font into an error state, then just free it and return.
1638         (WebCore::FontPlatformData::hasCompatibleCharmap): The font always has a compatible charmap
1639         when the scaled font is null, because rendering is always a no-op and the font data never
1640         needs to be read.
1641         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
1642         (WebCore::GlyphPage::fill): Don't read font data when the scaled font is null.
1643         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1644         (WebCore::SimpleFontData::platformInit): Return early when there's no scaled font.
1645         (WebCore::SimpleFontData::scaledFontData): Use the new m_font member.
1646         (WebCore::SimpleFontData::containsCharacters): Return early when there's no scaled font.
1647         (WebCore::SimpleFontData::platformWidthForGlyph): Ditto.
1648
1649 2011-05-27  David Levin  <levin@chromium.org>
1650
1651         Reviewed by Darin Fisher.
1652
1653         Need a callback for when the preferred rendered size may have changed.
1654         https://bugs.webkit.org/show_bug.cgi?id=61309
1655
1656         No new tests needed since no new functionality is exposed.
1657
1658         * page/Chrome.cpp:
1659         (WebCore::Chrome::layoutUpdated): Plumbed through the call.
1660         * page/Chrome.h: Added the new method.
1661         * page/ChromeClient.h:
1662         (WebCore::ChromeClient::layoutUpdated): Ditto.
1663         * page/FrameView.cpp:
1664         (WebCore::FrameView::layout): Added a callback for whem a layout has finished.
1665
1666 2011-05-27  Stephanie Lewis  <slewis@apple.com>
1667
1668         Rubber Stamped by Adam Roben.
1669
1670         Update Order Files.  Use -order_file flag since it can order more of the binary.
1671
1672         * Configurations/Base.xcconfig:
1673         * WebCore.order:
1674
1675 2011-05-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1676
1677         Unreviewed, rolling out r87464.
1678         http://trac.webkit.org/changeset/87464
1679         https://bugs.webkit.org/show_bug.cgi?id=61643
1680
1681         client-close/server-close tests are flaky on Chromium Mac and
1682         Windows (Requested by aklein on #webkit).
1683
1684         * platform/network/SocketStreamHandleBase.cpp:
1685         (WebCore::SocketStreamHandleBase::send):
1686         (WebCore::SocketStreamHandleBase::close):
1687         (WebCore::SocketStreamHandleBase::sendPendingData):
1688         * platform/network/SocketStreamHandleBase.h:
1689         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1690         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1691         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
1692         * websockets/ThreadableWebSocketChannelClientWrapper.h:
1693         * websockets/WebSocket.cpp:
1694         (WebCore::WebSocket::send):
1695         (WebCore::WebSocket::close):
1696         (WebCore::WebSocket::bufferedAmount):
1697         (WebCore::WebSocket::didConnect):
1698         (WebCore::WebSocket::didReceiveMessage):
1699         (WebCore::WebSocket::didReceiveMessageError):
1700         (WebCore::WebSocket::didClose):
1701         * websockets/WebSocket.h:
1702         * websockets/WebSocketChannel.cpp:
1703         (WebCore::WebSocketChannel::WebSocketChannel):
1704         (WebCore::WebSocketChannel::close):
1705         (WebCore::WebSocketChannel::disconnect):
1706         (WebCore::WebSocketChannel::didClose):
1707         (WebCore::WebSocketChannel::didReceiveData):
1708         (WebCore::WebSocketChannel::didFail):
1709         (WebCore::WebSocketChannel::processBuffer):
1710         * websockets/WebSocketChannel.h:
1711         * websockets/WebSocketChannelClient.h:
1712         (WebCore::WebSocketChannelClient::didClose):
1713         * websockets/WorkerThreadableWebSocketChannel.cpp:
1714         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
1715         (WebCore::workerContextDidClose):
1716         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
1717         * websockets/WorkerThreadableWebSocketChannel.h:
1718
1719 2011-05-27  Rob Buis  <rbuis@rim.com>
1720
1721         Reviewed by Nikolas Zimmermann.
1722
1723         https://bugs.webkit.org/show_bug.cgi?id=19995
1724         hixie.ch : anchor Link fails with fragment identifiers inside SVG fragments.
1725
1726         Only allow links to animation elements within the document.
1727
1728         Test: svg/hixie/links/003.xml
1729
1730         * svg/SVGAElement.cpp:
1731         (WebCore::SVGAElement::defaultEventHandler):
1732
1733 2011-05-27  Andreas Kling  <kling@webkit.org>
1734
1735         Reviewed by Benjamin Poulain.
1736
1737         Update RGBA color serialization to match HTML5.
1738         https://bugs.webkit.org/show_bug.cgi?id=61449
1739
1740         HTML5 now specifies that fully transparent colors should have their alpha value
1741         serialized to "0" rather than "0.0" (followed by any number of extra zeroes.)
1742
1743         The number of decimals for alpha values between 0 and 1 is not specified,
1744         so match Gecko and Presto by returning the lowest number of decimals needed
1745         to represent the number. (No more trailing zeroes.)
1746
1747         * platform/graphics/Color.cpp:
1748         (WebCore::Color::serialized):
1749
1750 2011-05-27  Hans Wennborg  <hans@chromium.org>
1751
1752         Reviewed by Tony Gentilcore.
1753
1754         IndexedDB: Support mutating cursors on top of LevelDB
1755         https://bugs.webkit.org/show_bug.cgi?id=61615
1756
1757         We need to support the case where a new node is added to the tree in a
1758         transaction after the TreeIterator has covered the whole tree.
1759
1760         Since this is done lazily, i.e. we set a flag that the tree might have
1761         changed, and act upon it later, some members need to be mutable,
1762         because we might need to re-seek the tree iterator in a const function.
1763
1764         Test: storage/indexeddb/mutating-cursor.html
1765               storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html (existing)
1766
1767         * platform/leveldb/LevelDBTransaction.cpp:
1768         (WebCore::LevelDBTransaction::set):
1769         (WebCore::LevelDBTransaction::TreeIterator::reset):
1770         (WebCore::LevelDBTransaction::TreeIterator::~TreeIterator):
1771         (WebCore::LevelDBTransaction::TreeIterator::TreeIterator):
1772         (WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
1773         (WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator):
1774         (WebCore::LevelDBTransaction::TransactionIterator::next):
1775         (WebCore::LevelDBTransaction::TransactionIterator::prev):
1776         (WebCore::LevelDBTransaction::TransactionIterator::key):
1777         (WebCore::LevelDBTransaction::TransactionIterator::value):
1778         (WebCore::LevelDBTransaction::TransactionIterator::treeChanged):
1779         (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator):
1780         (WebCore::LevelDBTransaction::registerIterator):
1781         (WebCore::LevelDBTransaction::unregisterIterator):
1782         (WebCore::LevelDBTransaction::notifyIteratorsOfTreeChange):
1783         * platform/leveldb/LevelDBTransaction.h:
1784         * storage/IDBFactoryBackendImpl.cpp:
1785         (WebCore::IDBFactoryBackendImpl::open):
1786         * storage/IDBLevelDBBackingStore.cpp:
1787         (WebCore::IDBLevelDBBackingStore::open):
1788
1789 2011-05-27  Sujin Park  <sujjin.park@gmail.com>
1790
1791         Unreviewed, buildfix if --no-javascript-debugger.
1792
1793         Regression(R84125): Broke GTK build
1794         https://bugs.webkit.org/show_bug.cgi?id=60698
1795
1796         No new tests since this doesn't change any behavior.
1797
1798         * inspector/WorkerInspectorController.h:
1799
1800 2011-05-26  Yael Aharon  <yael.aharon@nokia.com>
1801
1802         Reviewed by Tony Chang.
1803
1804         webkit should implement the dropzone attribute
1805         https://bugs.webkit.org/show_bug.cgi?id=58210
1806
1807         Add support for dropzone attribute.
1808         http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute
1809         If a drag event was not canceled by JavaScript, look for an element with a dropzone attribute.
1810         If there is such an element, and it matches the drag data store, set the action defined by that
1811         element and continue processing the drag and drop operation.
1812
1813         Tests: fast/events/dropzone-001.html
1814                fast/events/dropzone-002.html
1815                fast/events/dropzone-003.html
1816                fast/events/dropzone-004.html
1817
1818         * dom/Clipboard.cpp:
1819         (WebCore::Clipboard::hasFileOfType):
1820         (WebCore::Clipboard::hasStringOfType):
1821         (WebCore::convertDropZoneOperationToDragOperation):
1822         (WebCore::convertDragOperationToDropZoneOperation):
1823         (WebCore::Clipboard::processDropZoneKeyword):
1824         * dom/Clipboard.h:
1825         * html/HTMLAttributeNames.in:
1826         * html/HTMLElement.idl:
1827         * page/EventHandler.cpp:
1828         (WebCore::EventHandler::findDropZone):
1829         (WebCore::EventHandler::updateDragAndDrop):
1830         * page/EventHandler.h:
1831
1832 2011-05-27  Patrick Gansterer  <paroga@webkit.org>
1833
1834         Unreviewed WinCE build fix for r87467.
1835
1836         * page/wince/FrameWinCE.cpp:
1837
1838 2011-05-26  Hans Wennborg  <hans@chromium.org>
1839
1840         Reviewed by Tony Gentilcore.
1841
1842         IndexedDB: Support NO_DUPLICATE cursors on LevelDB back-end
1843         https://bugs.webkit.org/show_bug.cgi?id=61517
1844
1845         Support cursors where the direction is set to NEXT_NO_DUPLICATE,
1846         or PREV_NO_DUPLICATE, as specified here:
1847         http://www.w3.org/TR/IndexedDB/#widl-IDBCursor-NEXT_NO_DUPLICATE
1848
1849         This is tested by storage/indexeddb/mozilla/indexes.html
1850
1851         * storage/IDBLevelDBBackingStore.cpp:
1852         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
1853         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
1854         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
1855
1856 2011-05-26  Hans Wennborg  <hans@chromium.org>
1857
1858         Reviewed by Tony Gentilcore.
1859
1860         LevelDB: turn on paranoid checks and verify checksums, log errors
1861         https://bugs.webkit.org/show_bug.cgi?id=61516
1862
1863         This allows for detection of corrupted databases.
1864         Even if we can't recover from a corrupted database, discovering the
1865         problem is a step in the right direction.
1866
1867         No new functionality, no new tests.
1868
1869         * platform/leveldb/LevelDBDatabase.cpp:
1870         (WebCore::LevelDBDatabase::open):
1871         (WebCore::LevelDBDatabase::put):
1872         (WebCore::LevelDBDatabase::remove):
1873         (WebCore::LevelDBDatabase::get):
1874         (WebCore::LevelDBDatabase::write):
1875         (WebCore::IteratorImpl::checkStatus):
1876         (WebCore::IteratorImpl::seekToLast):
1877         (WebCore::IteratorImpl::seek):
1878         (WebCore::IteratorImpl::next):
1879         (WebCore::IteratorImpl::prev):
1880         (WebCore::LevelDBDatabase::createIterator):
1881
1882 2011-05-27  James Robinson  <jamesr@chromium.org>
1883
1884         Reviewed by Adam Barth.
1885
1886         CachedResourceLoader stores data: urls in validated URL set
1887         https://bugs.webkit.org/show_bug.cgi?id=61604
1888
1889         CachedResourceLoader maintains a set of URLs that have been validated to avoid validating the same resource
1890         multiple times for loads within the same document.  This doesn't make sense for data: URLs and just wastes
1891         memory.
1892
1893         * loader/cache/CachedResourceLoader.cpp:
1894         (WebCore::CachedResourceLoader::revalidateResource):
1895         (WebCore::CachedResourceLoader::loadResource):
1896
1897 2011-05-23  MORITA Hajime  <morrita@google.com>
1898
1899         Reviewed by Tony Chang.
1900
1901         [Refactoring] DocumentMarker should be carried around as a pointer, not value.
1902         https://bugs.webkit.org/show_bug.cgi?id=61262
1903
1904         - Changed return value of markersInRange() from Vector<DocumentMarker> to Vector<DocumentMarker*>.
1905         - Introduced markersFor() that returns Vector<DocumentMarker*>
1906         - Removed DocumentMarkerController::setRenderedRectForMarker() which now can be replaced by
1907           RenderedDocumentMarker::setRenderedRect().
1908         - This change didn't remove markersForNode() beucase there is patches on review which depends
1909           markersForNode(). I'll remove its call after these patches are landed.
1910         
1911         No new tests. No behavior change.
1912
1913         * WebCore.exp.in:
1914         * dom/DocumentMarkerController.cpp:
1915         (WebCore::DocumentMarkerController::addTextMatchMarker):
1916         (WebCore::DocumentMarkerController::markersFor):
1917         (WebCore::DocumentMarkerController::markersInRange):
1918         (WebCore::DocumentMarkerController::hasMarkers):
1919         * dom/DocumentMarkerController.h:
1920         * dom/RenderedDocumentMarker.h:
1921         (WebCore::toRenderedDocumentMarker):
1922         * editing/CompositeEditCommand.cpp:
1923         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1924         * editing/DeleteSelectionCommand.cpp:
1925         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
1926         * editing/Editor.cpp:
1927         (WebCore::Editor::selectionStartHasMarkerFor):
1928         * editing/SpellingCorrectionController.cpp:
1929         (WebCore::markersHaveIdenticalDescription):
1930         (WebCore::SpellingCorrectionController::respondToChangedSelection):
1931         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
1932         (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
1933         * editing/SpellingCorrectionController.h:
1934         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
1935         * rendering/InlineTextBox.cpp:
1936         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1937         (WebCore::InlineTextBox::paintTextMatchMarker):
1938         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1939         (WebCore::InlineTextBox::paintDocumentMarkers):
1940         * rendering/InlineTextBox.h:
1941         * rendering/svg/SVGInlineFlowBox.cpp:
1942         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1943
1944 2011-05-26  MORITA Hajime  <morrita@google.com>
1945
1946         Reviewed by Kent Tamura.
1947
1948         WebCore::HTMLSummaryElement::isMainSummary ReadAV@NULL
1949         https://bugs.webkit.org/show_bug.cgi?id=61511
1950
1951         Removed Unnecessary wrong cast to Elmement, which can be non-Element.
1952
1953         Test: fast/html/details-summary-document-child.html
1954
1955         * html/HTMLSummaryElement.cpp:
1956         (WebCore::HTMLSummaryElement::detailsElement):
1957
1958 2011-05-26  Adam Barth  <abarth@webkit.org>
1959
1960         Reviewed by Ryosuke Niwa.
1961
1962         FrameLoader cannot be null
1963         https://bugs.webkit.org/show_bug.cgi?id=61609
1964
1965         This code has a bunch of cargo-cult null checking.
1966
1967         * html/HTMLMediaElement.cpp:
1968         (WebCore::HTMLMediaElement::createRenderer):
1969         (WebCore::HTMLMediaElement::attach):
1970         (WebCore::HTMLMediaElement::loadResource):
1971         (WebCore::HTMLMediaElement::getPluginProxyParams):
1972         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
1973         (WebCore::HTMLMediaElement::updateWidget):
1974
1975 2011-05-26  Shane Stephens  <shanestephens@google.com>
1976
1977         Reviewed by James Robinson.
1978
1979         REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time
1980         https://bugs.webkit.org/show_bug.cgi?id=60689
1981
1982         When a transform is modified in a style, we were upgrading our understanding
1983         of the difference from PositionedMovementOnly to SimplifiedLayout.  However,
1984         if the position of the style is independently changed at the same time, both
1985         PositionedMovement and SimplifiedLayout passes are required.
1986
1987         Test: transforms/2d/set-transform-and-top.html
1988
1989         * rendering/RenderObject.cpp:
1990         Added checks for SimplifiedLayoutAndPositionedMovement - when encountered,
1991         set both PositionedMovement and SimplifiedLayout update flasgs. 
1992         * rendering/style/RenderStyleConstants.h:
1993         Added a new StyleDifference enum value (SimplifiedLayoutAndPositionedMovement) for 
1994         cases when both PositionedMovement and SimplifiedLayout are required.
1995
1996 2011-05-26  Luke Macpherson   <macpherson@chromium.org>
1997
1998         Reviewed by Eric Seidel.
1999
2000         Implement webkit margin collapse CSS properties in CSSStyleApplyProperty
2001         https://bugs.webkit.org/show_bug.cgi?id=61589
2002
2003         No new tests as no new functionality added.
2004
2005         * css/CSSStyleApplyProperty.cpp:
2006         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2007         Add handlers for:
2008           CSSPropertyWebkitMarginBeforeCollapse
2009           CSSPropertyWebkitMarginAfterCollapse
2010           CSSPropertyWebkitMarginTopCollapse
2011           CSSPropertyWebkitMarginBottomCollapse
2012           CSSPropertyWebkitMarginCollapse
2013         * css/CSSStyleSelector.cpp:
2014         (WebCore::CSSStyleSelector::applyProperty):
2015         Remove cases that are no longer required.
2016
2017 2011-05-26  Adam Barth  <abarth@webkit.org>
2018
2019         Reviewed by Eric Seidel.
2020
2021         Support cross-origin property for images
2022         https://bugs.webkit.org/show_bug.cgi?id=61015
2023
2024         This patch add support for the crossorigin attribute of images and
2025         teaches 2D canvas to respect that flag and not taint a canvas if the
2026         image drawn on the canvas is allowed by CORS.
2027
2028         While I was editing this code, I couldn't resist a couple touch-up
2029         changes.
2030
2031         Tests: http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials.html
2032                http/tests/security/canvas-remote-read-remote-image-allowed.html
2033                http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin.html
2034
2035         * html/HTMLAttributeNames.in:
2036         * html/HTMLCanvasElement.cpp:
2037         (WebCore::HTMLCanvasElement::securityOrigin):
2038         * html/HTMLCanvasElement.h:
2039         * html/HTMLImageElement.idl:
2040         * html/canvas/CanvasRenderingContext.cpp:
2041         (WebCore::CanvasRenderingContext::checkOrigin):
2042         * html/canvas/CanvasRenderingContext2D.cpp:
2043         (WebCore::CanvasRenderingContext2D::createPattern):
2044         * loader/ImageLoader.cpp:
2045         (WebCore::ImageLoader::updateFromElement):
2046         * loader/cache/CachedResource.cpp:
2047         (WebCore::CachedResource::passesAccessControlCheck):
2048         * loader/cache/CachedResource.h:
2049
2050 2011-05-26  Mihai Parparita  <mihaip@chromium.org>
2051
2052         Reviewed by Adam Barth.
2053
2054         Fix worldID and destinationDomain argument names
2055         https://bugs.webkit.org/show_bug.cgi?id=61571
2056
2057         As part of working on r87423, I noticed a couple of inconsistencies in
2058         argument names:
2059         - We would use worldId in .h files but worldID in .cpp files.
2060           Standardize on the latter
2061         - SecurityOrigin::addOriginAccessWhitelistEntry would take a
2062           destinationDomains argument, even though the actual parameter was for
2063           a single domain (renamed to be singular).
2064
2065         * bindings/v8/ScriptController.h:
2066         * bindings/v8/V8Proxy.h:
2067         * page/SecurityOrigin.cpp:
2068         (WebCore::SecurityOrigin::addOriginAccessWhitelistEntry):
2069         (WebCore::SecurityOrigin::removeOriginAccessWhitelistEntry):
2070         * page/SecurityOrigin.h:
2071
2072 2011-05-26  Emil A Eklund  <eae@chromium.org>
2073
2074         Reviewed by Eric Seidel.
2075
2076         Replace RenderLayer::x/y/width/height with location/size
2077         https://bugs.webkit.org/show_bug.cgi?id=61414
2078
2079         Covered by existing tests.
2080
2081         * dom/MouseRelatedEvent.cpp:
2082         (WebCore::MouseRelatedEvent::computeRelativePosition):
2083         * rendering/RenderBox.cpp:
2084         (WebCore::RenderBox::computeRectForRepaint):
2085         * rendering/RenderBox.h:
2086         (WebCore::RenderBox::maxLayoutOverflow):
2087         * rendering/RenderInline.cpp:
2088         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2089         (WebCore::RenderInline::computeRectForRepaint):
2090         * rendering/RenderLayer.cpp:
2091         (WebCore::RenderLayer::updateLayerPosition):
2092         (WebCore::RenderLayer::convertToLayerCoords):
2093         (WebCore::RenderLayer::offsetFromResizeCorner):
2094         (WebCore::RenderLayer::calculateRects):
2095         * rendering/RenderLayer.h:
2096         (WebCore::RenderLayer::location):
2097         (WebCore::RenderLayer::setSize):
2098         * rendering/RenderObject.cpp:
2099         (WebCore::RenderObject::computeRectForRepaint):
2100         * rendering/RenderTreeAsText.cpp:
2101         (WebCore::write):
2102         (WebCore::writeLayers):
2103         (WebCore::externalRepresentation):
2104         * rendering/RenderView.cpp:
2105         (WebCore::RenderView::absoluteRects):
2106         (WebCore::RenderView::absoluteQuads):
2107
2108 2011-05-26  Annie Sullivan  <sullivan@chromium.org>
2109
2110         Reviewed by Ryosuke Niwa.
2111
2112         Delete table in contentEditable/designMode produces odd contents
2113         https://bugs.webkit.org/show_bug.cgi?id=57148
2114
2115         Removes border-collapse, -webkit-border-horizontal-spacing, and
2116         -webkit-border-vertical-spacing from the list of properties which
2117         should be preserved during edit operations. Also renames this
2118         list to editingInheritableProperties to be more clear about what
2119         the list is for.
2120
2121         Test: editing/deleting/delete-last-char-in-table.html
2122
2123         * editing/EditingStyle.cpp: Removes border vertical/horizontal
2124         spacing from editingStyleProperties.
2125         * editing/EditingStyle.h: Renames OnlyInheritableProperties to
2126         OnlyEditingInheritableProperties.
2127         * editing/markup.cpp: Renames InheritablePropertiesAndBackgroundColorInEffect.
2128
2129 2011-05-26  Yuta Kitamura  <yutak@chromium.org>
2130
2131         Reviewed by Kent Tamura.
2132
2133         WebSocket closing handshake
2134         https://bugs.webkit.org/show_bug.cgi?id=35721
2135
2136         Implement WebSocket closing handshake based on Ian Hickson's
2137         WebSocket protocol draft 76.
2138
2139         Tests: http/tests/websocket/tests/client-close.html
2140                http/tests/websocket/tests/server-close.html
2141
2142         * platform/network/SocketStreamHandleBase.cpp:
2143         (WebCore::SocketStreamHandleBase::send):
2144         Do not send a message if we are in Closing state.
2145         (WebCore::SocketStreamHandleBase::close):
2146         Do not disconnect if we have pending data which have not been sent yet.
2147         In this case, the actual disconnection will happen in sendPendingData().
2148         (WebCore::SocketStreamHandleBase::disconnect):
2149         Renamed from close(). Disconnect the connection immediately.
2150         (WebCore::SocketStreamHandleBase::sendPendingData):
2151         * platform/network/SocketStreamHandleBase.h:
2152         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2153         Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
2154         to didClose().
2155         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
2156         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2157         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
2158         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
2159         * websockets/ThreadableWebSocketChannelClientWrapper.h:
2160         * websockets/WebSocket.cpp:
2161         (WebCore::WebSocket::send):
2162         (WebCore::WebSocket::close):
2163         Fail if close() is attempted before the connection is established.
2164         Otherwise, set the state to CLOSING and start the closing handshake.
2165         (WebCore::WebSocket::bufferedAmount):
2166         If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
2167         (WebCore::WebSocket::didConnect):
2168         (WebCore::WebSocket::didReceiveMessage):
2169         We need to invoke message event in CLOSING state as well as OPEN state.
2170         (WebCore::WebSocket::didReceiveMessageError):
2171         (WebCore::WebSocket::didStartClosingHandshake):
2172         (WebCore::WebSocket::didClose):
2173         * websockets/WebSocket.h:
2174         * websockets/WebSocketChannel.cpp:
2175         (WebCore::WebSocketChannel::WebSocketChannel):
2176         (WebCore::WebSocketChannel::close):
2177         Start the closing handshake.
2178         (WebCore::WebSocketChannel::disconnect):
2179         Disconnect the socket stream, instead of close.
2180         (WebCore::WebSocketChannel::didClose):
2181         (WebCore::WebSocketChannel::didReceiveData): Ditto.
2182         (WebCore::WebSocketChannel::didFail): Ditto.
2183         (WebCore::WebSocketChannel::processBuffer):
2184         Ditto.
2185         Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
2186         (WebCore::WebSocketChannel::startClosingHandshake):
2187         Send 0xFF 0x00 byte sequence.
2188         (WebCore::WebSocketChannel::closingTimerFired):
2189         Disconnect the socket stream if the closing handshake has timed out.
2190         * websockets/WebSocketChannel.h:
2191         m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
2192         specification).
2193         * websockets/WebSocketChannelClient.h:
2194         (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
2195         (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
2196         * websockets/WorkerThreadableWebSocketChannel.cpp:
2197         Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
2198         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
2199         (WebCore::workerContextDidStartClosingHandshake):
2200         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
2201         (WebCore::workerContextDidClose):
2202         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2203         * websockets/WorkerThreadableWebSocketChannel.h:
2204
2205 2011-05-26  David Levin  <levin@chromium.org>
2206
2207         Reviewed by Dmitry Titov.
2208
2209         WebKit's font notification has problems when the WebKit main thread != UI thread.
2210         https://bugs.webkit.org/show_bug.cgi?id=61391
2211
2212         This doesn't happen in DumpRenderTree, so it needs a unit test which is taking me
2213         some time to write correctly. In the meantime, this issues happens to be causing
2214         some crashes in Chrome so here's the fix alone for the time being.
2215
2216         * platform/graphics/mac/FontCacheMac.mm:
2217         (WebCore::invalidateFontCache): Ensure that FontCache::invalidate is only called on WebKit's main thread.
2218         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Call common function for font cache invalidation.
2219          Note that the call to fontCache() is fine since the singleton is initialized well before calling this function. Theoretically,
2220          there could be a problem due to a lack of a memory barrier but that is highly unlikely and this is debug only code.
2221         (WebCore::fontCacheATSNotificationCallback): Ditto.
2222
2223 2011-05-26  Stephanie Lewis  <slewis@apple.com>
2224
2225         Reviewed by Geoff Garen.
2226
2227         https://bugs.webkit.org/show_bug.cgi?id=61345
2228         part of <rdar://problem/8675177>
2229         Roll back in now that the Crashes are fixed.  ResourceResponseBase and ResourceResponse had two different definitions
2230         for m_isNull.  ResourceResponse treats m_isNull as meaning there isn't any platform ResourceResponse. 
2231         ResourceResponseBase treats m_isNull as meaning no fields have been initialized.  Consolidate calls into ResourceResponseBase meaning. 
2232
2233         Don't initialize ResourceResponse.m_suggestedFilename until we want to use it.  Initializing it requires reading in and parsing a plist.  
2234         Add new initialization state CommonAndUncommonFields to ResourceResponse.  This will be for all the header fields.
2235         Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it. 
2236         Add "Content-Type" to common headers since it is looked for by every CSS sheet load.
2237
2238         No new functionality so no new tests.
2239
2240         * platform/network/ResourceResponseBase.cpp:
2241         (WebCore::ResourceResponseBase::adopt):
2242         (WebCore::ResourceResponseBase::suggestedFilename):
2243         (WebCore::ResourceResponseBase::setSuggestedFilename):
2244         (WebCore::ResourceResponseBase::httpStatusText):
2245         (WebCore::ResourceResponseBase::setHTTPStatusText):
2246         (WebCore::ResourceResponseBase::httpHeaderField):
2247         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2248         (WebCore::ResourceResponseBase::httpHeaderFields):
2249         (WebCore::ResourceResponseBase::isAttachment):
2250         (WebCore::ResourceResponseBase::setLastModifiedDate):
2251         (WebCore::ResourceResponseBase::lastModifiedDate):
2252         (WebCore::ResourceResponseBase::wasCached):
2253         (WebCore::ResourceResponseBase::connectionReused):
2254         (WebCore::ResourceResponseBase::setConnectionReused):
2255         (WebCore::ResourceResponseBase::connectionID):
2256         (WebCore::ResourceResponseBase::setConnectionID):
2257         (WebCore::ResourceResponseBase::resourceLoadTiming):
2258         (WebCore::ResourceResponseBase::setResourceLoadTiming):
2259         (WebCore::ResourceResponseBase::resourceLoadInfo):
2260         (WebCore::ResourceResponseBase::setResourceLoadInfo):
2261         * platform/network/ResourceResponseBase.h:
2262         * platform/network/cf/ResourceResponse.h:
2263         (WebCore::ResourceResponse::ResourceResponse):
2264         * platform/network/cf/ResourceResponseCFNet.cpp:
2265         (WebCore::ResourceResponse::platformLazyInit):
2266         * platform/network/mac/ResourceResponseMac.mm:
2267
2268 2011-05-26  James Kozianski  <koz@chromium.org>
2269
2270         Reviewed by Eric Seidel.
2271
2272         Implement a whitelist for registerProtocolHandler
2273         https://bugs.webkit.org/show_bug.cgi?id=60322
2274
2275         * page/Navigator.cpp:
2276         (WebCore::initProtocolHandlerWhitelist):
2277         (WebCore::isProtocolWhitelisted):
2278         (WebCore::verifyProtocolHandlerScheme):
2279
2280 2011-05-26  Annie Sullivan  <sullivan@chromium.org>
2281
2282         Reviewed by Ryosuke Niwa.
2283
2284         [debug feature] CSSStyleDeclaration should have a way to print cssText
2285         https://bugs.webkit.org/show_bug.cgi?id=61570
2286
2287         Adds a method to print the cssText to stderr for debugging.
2288
2289         * css/CSSStyleDeclaration.cpp:
2290         (WebCore::CSSStyleDeclaration::showStyle): New method to print cssText to stderr
2291         * css/CSSStyleDeclaration.h: New method declaration
2292
2293 2011-05-26  Syed Idris Shah  <syed.idris-shah@nokia.com>
2294
2295         Reviewed by Andreas Kling.
2296
2297         [Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux
2298         https://bugs.webkit.org/show_bug.cgi?id=60377 
2299
2300         LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
2301
2302         For an array of active uniform, we should be careful while truncating the name of the uniform. 
2303         Currently we are truncating the last three characters of an array with out checking for [0]. 
2304         As a result we are truncating the the actual name of the active uniforms i.e. color to co. 
2305
2306         * html/canvas/WebGLRenderingContext.cpp:
2307         (WebCore::WebGLRenderingContext::getUniform): Strip "[0]" from the name if it's an array and is part of the name.
2308
2309 2011-05-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2310
2311         Unreviewed, rolling out r87444.
2312         http://trac.webkit.org/changeset/87444
2313         https://bugs.webkit.org/show_bug.cgi?id=61582
2314
2315         Layout test regressions in Chromium/WebKit: fast/css/first-
2316         letter-text-fragment-crash.html, fast/css/first-letter-
2317         visibility.html (Requested by aklein on #webkit).
2318
2319         * page/Chrome.cpp:
2320         * page/Chrome.h:
2321         * page/ChromeClient.h:
2322         * page/FrameView.cpp:
2323         (WebCore::FrameView::setContentsSize):
2324         * page/FrameView.h:
2325
2326 2011-05-26  David Levin  <levin@chromium.org>
2327
2328         Reviewed by Darin Fisher.
2329
2330         Need a callback for when the preferred rendered size changed.
2331         https://bugs.webkit.org/show_bug.cgi?id=61309
2332
2333         No new tests needed since no new functionality is exposed.
2334
2335         * page/Chrome.cpp:
2336         (WebCore::Chrome::contentsPreferredSizeChanged): Plumbed through the call.
2337         * page/Chrome.h: Added the new method.
2338         * page/ChromeClient.h: Ditto.
2339         * page/FrameView.cpp:
2340         (WebCore::FrameView::setContentsSize): Added calculations for the preferred size
2341         and the call to contentsPreferredSizeChanged.
2342
2343 2011-05-25  Levi Weintraub  <leviw@chromium.org>
2344
2345         Reviewed by Eric Seidel.
2346
2347         Switch controlClipRect to use IntPoint
2348         https://bugs.webkit.org/show_bug.cgi?id=60806
2349
2350         Switching controlClipRect to take an IntPoint representing the
2351         offset to be added instead of a pair of ints.
2352
2353         No new tests as this is just refactoring.
2354
2355         * WebCore.xcodeproj/project.pbxproj:
2356         * rendering/RenderBlock.cpp:
2357         (WebCore::RenderBlock::nodeAtPoint):
2358         * rendering/RenderBox.cpp:
2359         (WebCore::RenderBox::pushContentsClip):
2360         * rendering/RenderBox.h:
2361         (WebCore::RenderBox::controlClipRect):
2362         * rendering/RenderButton.cpp:
2363         (WebCore::RenderButton::controlClipRect):
2364         * rendering/RenderButton.h:
2365         * rendering/RenderListBox.cpp:
2366         (WebCore::RenderListBox::paintItemBackground):
2367         (WebCore::RenderListBox::controlClipRect):
2368         * rendering/RenderListBox.h:
2369         * rendering/RenderMenuList.cpp:
2370         (WebCore::RenderMenuList::controlClipRect):
2371         * rendering/RenderMenuList.h:
2372         * rendering/RenderTextControlSingleLine.cpp:
2373         (WebCore::RenderTextControlSingleLine::controlClipRect):
2374         * rendering/RenderTextControlSingleLine.h:
2375
2376 2011-05-25  Levi Weintraub  <leviw@chromium.org>
2377
2378         Reviewed by Eric Seidel.
2379
2380         Switch controlClipRect to use IntPoint
2381         https://bugs.webkit.org/show_bug.cgi?id=60806
2382
2383         Switching controlClipRect to take an IntPoint representing the
2384         offset to be added instead of a pair of ints.
2385
2386         No new tests as this is just refactoring.
2387
2388         * WebCore.xcodeproj/project.pbxproj:
2389         * rendering/RenderBlock.cpp:
2390         (WebCore::RenderBlock::nodeAtPoint):
2391         * rendering/RenderBox.cpp:
2392         (WebCore::RenderBox::pushContentsClip):
2393         * rendering/RenderBox.h:
2394         (WebCore::RenderBox::controlClipRect):
2395         * rendering/RenderButton.cpp:
2396         (WebCore::RenderButton::controlClipRect):
2397         * rendering/RenderButton.h:
2398         * rendering/RenderListBox.cpp:
2399         (WebCore::RenderListBox::paintItemBackground):
2400         (WebCore::RenderListBox::controlClipRect):
2401         * rendering/RenderListBox.h:
2402         * rendering/RenderMenuList.cpp:
2403         (WebCore::RenderMenuList::controlClipRect):
2404         * rendering/RenderMenuList.h:
2405         * rendering/RenderTextControlSingleLine.cpp:
2406         (WebCore::RenderTextControlSingleLine::controlClipRect):
2407         * rendering/RenderTextControlSingleLine.h:
2408
2409 2011-05-26  Jeff Miller  <jeffm@apple.com>
2410
2411         Reviewed by Steve Falkenburg.
2412
2413         Fullscreen content is sometimes obscured by taskbar (which even covers up the "exit fullscreen" button)
2414         https://bugs.webkit.org/show_bug.cgi?id=61569
2415         <rdar://problem/9454315>
2416
2417         Normally, when the background fullscreen window is animated in, the Windows taskbar will be hidden, but this doesn't always work for some reason.
2418         Workaround this issue by setting the real fullscreen window to be a topmost window.
2419
2420         * platform/graphics/win/FullScreenController.cpp:
2421         (FullScreenController::Private::fullscreenClientWndProc): Exit fullscreen when m_fullScreenWindow is deactivated.
2422         (FullScreenController::enterFullScreenRepaintCompleted): Make m_fullScreenWindow a topmost window before animating it in to ensure the taskbar is hidden.
2423
2424 2011-05-26  James Robinson  <jamesr@chromium.org>
2425
2426         Reviewed by Darin Fisher.
2427
2428         [skia] Add area check to ImageBufferData::getImageData
2429         https://bugs.webkit.org/show_bug.cgi?id=61375
2430
2431         No change in behavior, just a sanity check.
2432
2433         * platform/graphics/skia/ImageBufferSkia.cpp:
2434         (WebCore::getImageData):
2435
2436 2011-05-26  Levi Weintraub  <leviw@chromium.org>
2437
2438         Reviewed by Eric Seidel.
2439
2440         Switch positionOverflowControls to IntSize
2441         https://bugs.webkit.org/show_bug.cgi?id=61493
2442
2443         Switching positionOverflowControls to take a layerOffset IntSize
2444         as opposed to a pair of ints.
2445
2446         No new tests since this is just refactoring.
2447
2448         * rendering/RenderLayer.cpp:
2449         (WebCore::RenderLayer::updateLayerPositions):
2450         (WebCore::RenderLayer::positionOverflowControls):
2451         (WebCore::RenderLayer::paintOverflowControls):
2452         * rendering/RenderLayer.h:
2453
2454 2011-05-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2455
2456         Unreviewed, rolling out r87368.
2457         http://trac.webkit.org/changeset/87368
2458         https://bugs.webkit.org/show_bug.cgi?id=61564
2459
2460         Wrong approach, will do the wrong thing if the element needs
2461         simplified normal flow layout but is not positioned (Requested
2462         by jamesr on #webkit).
2463
2464         * rendering/RenderObject.h:
2465         (WebCore::RenderObject::needsPositionedMovementLayout):
2466
2467 2011-05-02  Robert Hogan  <robert@webkit.org>
2468
2469         Reviewed by Adam Roben.
2470
2471         [Qt] Allow popup windows from plugins when initiated by a user gesture
2472
2473         https://bugs.webkit.org/show_bug.cgi?id=41292
2474
2475         If the event is from a user gesture and the plugin doesn't support
2476         NPN_PushPopupsEnabledState() and NPN_PopPopupsEnabledState(), allow popups.
2477
2478         * plugins/qt/PluginViewQt.cpp:
2479         (WebCore::PluginView::dispatchNPEvent):
2480
2481 2011-05-26  Leandro Gracia Gil  <leandrogracia@chromium.org>
2482
2483         Reviewed by Dmitry Titov.
2484
2485         [V8] Add missing compile guards for WebWorkers in WebCore.
2486         https://bugs.webkit.org/show_bug.cgi?id=61535
2487
2488         No new tests - refactoring only.
2489
2490         * bindings/v8/V8AbstractEventListener.cpp:
2491         (WebCore::V8AbstractEventListener::invokeEventHandler):
2492         * bindings/v8/V8DOMWrapper.cpp:
2493         (WebCore::V8DOMWrapper::instantiateV8Object):
2494
2495 2011-05-26  Mihai Parparita  <mihaip@chromium.org>
2496
2497         Reviewed by Adam Barth.
2498
2499         Support cross-origin XMLHttpRequest in isolated worlds
2500         https://bugs.webkit.org/show_bug.cgi?id=59843
2501
2502         Allows isolated worlds to be associated with a different SecurityOrigin
2503         (exposed as a setIsolatedWorldSecurityOrigin function in
2504         ScriptController).
2505
2506         The XMLHttpRequest constructor can then check that it's being
2507         instantiated in an isolated world and use its security origin.
2508         XMLHttpRequest, ThreadableLoader and DocumentThreadableLoader had to be
2509         changed to use the copied SecurityOrigin instead of always grabbing the
2510         Document's.
2511
2512         Test: http/tests/security/isolatedWorld/cross-origin-xhr.html
2513
2514         * bindings/v8/ScriptController.cpp:
2515         (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
2516         * bindings/v8/ScriptController.h:
2517         * bindings/v8/V8IsolatedContext.cpp:
2518         (WebCore::V8IsolatedContext::setSecurityOrigin):
2519         * bindings/v8/V8IsolatedContext.h:
2520         (WebCore::V8IsolatedContext::securityOrigin):
2521         * bindings/v8/V8Proxy.cpp:
2522         (WebCore::V8Proxy::evaluateInIsolatedWorld):
2523         (WebCore::V8Proxy::setIsolatedWorldSecurityOrigin):
2524         (WebCore::V8Proxy::resetIsolatedWorlds):
2525         * bindings/v8/V8Proxy.h:
2526         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2527         (WebCore::V8XMLHttpRequest::constructorCallback):
2528         * loader/DocumentThreadableLoader.cpp:
2529         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2530         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2531         (WebCore::DocumentThreadableLoader::didReceiveResponse):
2532         (WebCore::DocumentThreadableLoader::preflightSuccess):
2533         (WebCore::DocumentThreadableLoader::isAllowedRedirect):
2534         (WebCore::DocumentThreadableLoader::securityOrigin):
2535         * loader/DocumentThreadableLoader.h:
2536         * loader/ThreadableLoader.h:
2537         * xml/XMLHttpRequest.cpp:
2538         (WebCore::XMLHttpRequest::create):
2539         (WebCore::XMLHttpRequest::XMLHttpRequest):
2540         (WebCore::XMLHttpRequest::securityOrigin):
2541         (WebCore::XMLHttpRequest::responseXML):
2542         (WebCore::XMLHttpRequest::createRequest):
2543         (WebCore::XMLHttpRequest::setRequestHeader):
2544         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2545         (WebCore::XMLHttpRequest::getResponseHeader):
2546         * xml/XMLHttpRequest.h:
2547
2548 2011-05-26  Michael Nordman  <michaeln@google.com>
2549
2550         Reviewed by Darin Fisher.
2551
2552         [Chromium] Use SecurityOrigin produced databaseIdentifier strings, instead of
2553         SecurityOrigin RefPtrs, as the top level key into the DatabaseTracker's
2554         collection of open databases. Otherwise we can fail to lookup databases when
2555         trying to forceably close them via  WebDatabase::closeDatabaseImmediately.
2556         https://bugs.webkit.org/show_bug.cgi?id=61417
2557
2558         New new functionality, no tests.
2559
2560         * storage/DatabaseTracker.h:
2561         * storage/chromium/DatabaseTrackerChromium.cpp:
2562         (WebCore::DatabaseTracker::addOpenDatabase):
2563         (WebCore::DatabaseTracker::removeOpenDatabase):
2564         (WebCore::DatabaseTracker::getOpenDatabases):
2565         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2566
2567 2011-05-25  Jer Noble  <jer.noble@apple.com>
2568
2569         Reviewed by Maciej Stachowiak.
2570
2571         Safari Web Content crashes while entering/exiting the full screen mode of the video content
2572         https://bugs.webkit.org/show_bug.cgi?id=61498
2573
2574         No new tests, as DRT does not currently animate the full screen transition.
2575
2576         To guard against m_fullScreenRenderer being called after it has been deleted, add
2577         code in RenderFullScreen which notifies the document when its full-screen renderer
2578         will be destroyed.
2579
2580         Also, add some sanity checks when accessing the full-screen renderer's layer backing.
2581
2582         * dom/Document.cpp:
2583         (WebCore::Document::webkitWillEnterFullScreenForElement): Guard against a missing
2584             full-screen renderer layer.
2585         (WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
2586         (WebCore::Document::setFullScreenRenderer): Added ASSERT.
2587         (WebCore::Document::fullScreenRendererDestroyed): Added.
2588         (WebCore::Document::setAnimatingFullScreen): Guard against the full-screen
2589             element having been removed from the document.
2590         * dom/Document.h:
2591         * rendering/RenderFullScreen.cpp:
2592         (RenderFullScreen::destroy): Added.  Tell the Document that it's full-screen
2593             renderer is about to be destroyed.
2594         * rendering/RenderFullScreen.h:
2595
2596 2011-05-26  Andreas Kling  <kling@webkit.org>
2597
2598         Reviewed by Geoffrey Garen.
2599
2600         Overload resolution in generated JSC bindings could be more efficient.
2601         https://bugs.webkit.org/show_bug.cgi?id=61544
2602
2603         Only fetch the arguments once, and not until they are needed (less work
2604         in the case of an early return.)
2605
2606         * bindings/scripts/CodeGeneratorJS.pm:
2607         * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
2608         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2609
2610 2011-05-26  Adrienne Walker  <enne@google.com>
2611
2612         Reviewed by James Robinson.
2613
2614         [chromium] Be robust to empty viewports in the compositor
2615         https://bugs.webkit.org/show_bug.cgi?id=61545
2616
2617         It's possible for a frame to be requested to be drawn before it is
2618         non-empty.  The compositor should be robust to that possibility.  The
2619         changes in LayerTilerChromium are the only required changes to handle
2620         this, but having an early out in LayerRendererChromium seemed like a
2621         good sanity check.
2622
2623         * platform/graphics/chromium/LayerRendererChromium.cpp:
2624         (WebCore::LayerRendererChromium::updateAndDrawLayers):
2625         (WebCore::LayerRendererChromium::drawLayers):
2626         * platform/graphics/chromium/LayerTilerChromium.cpp:
2627         (WebCore::LayerTilerChromium::prepareToUpdate):
2628         (WebCore::LayerTilerChromium::updateRect):
2629         (WebCore::LayerTilerChromium::draw):
2630
2631 2011-05-26  Emil A Eklund  <eae@chromium.org>
2632
2633         Reviewed by Eric Seidel.
2634
2635         Change RenderObject to use FloatPoint::scale and FloatQuad::scale
2636         https://bugs.webkit.org/show_bug.cgi?id=61497
2637
2638         Covered by existing test.
2639
2640         * platform/graphics/FloatQuad.h:
2641         (WebCore::FloatQuad::scale):
2642         * rendering/RenderObject.h:
2643         (WebCore::adjustFloatQuadForAbsoluteZoom):
2644         (WebCore::adjustFloatRectForAbsoluteZoom):
2645         (WebCore::adjustFloatQuadForPageScale):
2646         (WebCore::adjustFloatRectForPageScale):
2647
2648 2011-05-26  Alexis Menard  <alexis.menard@openbossa.org>
2649
2650         Unreviewed build fix for Qt and QuickTime backend.
2651
2652         r87328 added a new system interface, we need to add it too.
2653
2654         * platform/qt/WebCoreSystemInterface.h:
2655         * platform/qt/WebCoreSystemInterface.mm:
2656
2657 2011-05-26  Andrey Kosyakov  <caseq@chromium.org>
2658
2659         Unreviewed follow-up to r87395, added checks to avoid accessing undefined member for certain timeline events.
2660
2661         * inspector/front-end/TimelinePanel.js:
2662         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2663         (WebInspector.TimelinePanel.FormattedRecord):
2664
2665 2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>
2666
2667         Reviewed by Enrica Casucci.
2668
2669         WebKit duplicates styles from css rules on copy and paste
2670         https://bugs.webkit.org/show_bug.cgi?id=61466
2671
2672         Fixed the bug by removing duplicate properties from inline style declarations in ReplaceSelectionCommand.
2673         Also moved the code to obtain style from rules from markup.cpp to EditingStyle.cpp to share code.
2674
2675         Test: editing/pasteboard/style-from-rules.html
2676
2677         * editing/EditingStyle.cpp:
2678         (WebCore::EditingStyle::EditingStyle): Added a null check.
2679         (WebCore::EditingStyle::extractFontSizeDelta): Ditto.
2680         (WebCore::styleFromMatchedRulesForElement): Moved from markup.cpp.
2681         (WebCore::EditingStyle::mergeStyleFromRules): Extracted from StyledMarkupAccumulator::appendElement.
2682         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): Ditto.
2683         (WebCore::EditingStyle::removeStyleFromRules): Added.
2684         * editing/EditingStyle.h:
2685         * editing/ReplaceSelectionCommand.cpp:
2686         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Renamed from
2687         negateStyleRulesThatAffectAppearance; Calls removeStyleFromRules.
2688         * editing/markup.cpp:
2689         (WebCore::StyledMarkupAccumulator::appendElement): Calls mergeStyleFromRulesForSerialization.
2690         (WebCore::styleFromMatchedRulesAndInlineDecl): Calls mergeStyleFromRules; changed the return type
2691         from CSSMutableStyleDeclaration to EditingStyle.
2692         (WebCore::isElementPresentational): Calls styleFromMatchedRulesAndInlineDecl.
2693         (WebCore::shouldIncludeWrapperForFullySelectedRoot): Ditto.
2694         (WebCore::highestAncestorToWrapMarkup): Calls shouldIncludeWrapperForFullySelectedRoot.
2695         (WebCore::createMarkup): Calls styleFromMatchedRulesAndInlineDecl.
2696
2697 2011-05-26  Michael Schneider  <michschn@google.com>
2698
2699         Reviewed by Pavel Feldman.
2700
2701         WebInspector: Added API to access the timeline data in a inspector extension.
2702         https://bugs.webkit.org/show_bug.cgi?id=61098
2703
2704         * WebCore.gypi:
2705         * WebCore.vcproj/WebCore.vcproj:
2706         * inspector/front-end/ExtensionAPI.js:
2707         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
2708         (WebInspector.injectedExtensionAPI):
2709         * inspector/front-end/ExtensionServer.js:
2710         (WebInspector.ExtensionServer):
2711         (WebInspector.ExtensionServer.prototype._addRecordToTimeline):
2712         (WebInspector.ExtensionServer.prototype._onSubscribe):
2713         (WebInspector.ExtensionServer.prototype._onUnsubscribe):
2714         (WebInspector.ExtensionServer.prototype._registerHandler):
2715         (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
2716         * inspector/front-end/TimelineManager.js: Added.
2717         (WebInspector.TimelineManager):
2718         (WebInspector.TimelineManager.prototype.start):
2719         (WebInspector.TimelineManager.prototype.stop):
2720         (WebInspector.TimelineDispatcher):
2721         (WebInspector.TimelineDispatcher.prototype.started):
2722         (WebInspector.TimelineDispatcher.prototype.stopped):
2723         (WebInspector.TimelineDispatcher.prototype.eventRecorded):
2724         * inspector/front-end/TimelinePanel.js:
2725         (WebInspector.TimelinePanel):
2726         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
2727         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
2728         * inspector/front-end/WebKit.qrc:
2729         * inspector/front-end/inspector.html:
2730
2731 2011-05-26  Andrey Kosyakov  <caseq@chromium.org>
2732
2733         Reviewed by Yury Semikhatsky.
2734
2735         Web Inspector: TimelinePanel should not modify input timeline data when processing timeline event
2736         https://bugs.webkit.org/show_bug.cgi?id=61529
2737
2738         Do not modify input timeline data when processing timeline event.
2739
2740         * inspector/front-end/TimelinePanel.js:
2741         (WebInspector.TimelinePanel.prototype._addRecordToTimeline):
2742         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2743         (WebInspector.TimelinePanel.FormattedRecord):
2744         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
2745         (WebInspector.TimelinePanel.FormattedRecord.prototype._refreshDetails):
2746         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
2747
2748 2011-05-26  Rob Buis  <rbuis@rim.com>
2749
2750         Reviewed by Dirk Schulze.
2751
2752         Dynamically created <animate> elements do not animate upon document insertion as they should
2753         https://bugs.webkit.org/show_bug.cgi?id=20028
2754
2755         Tests: svg/animations/animate-insert-begin.html
2756                svg/animations/animate-insert-no-begin.html
2757
2758         Move animation initializing and rescheduling to insertedIntoDocument. This way animate elements
2759         dynamicaly inserted into the document using js start as well.
2760
2761         * svg/animation/SVGSMILElement.cpp:
2762         (WebCore::SVGSMILElement::insertedIntoDocument):
2763         * svg/animation/SVGSMILElement.h:
2764
2765 2011-05-26  Andreas Kling  <kling@webkit.org>
2766
2767         Reviewed by Benjamin Poulain.
2768
2769         JSC DOM bindings: ExecState::argumentCount() is size_t, not int.
2770         https://bugs.webkit.org/show_bug.cgi?id=61530
2771
2772         * bindings/scripts/CodeGeneratorJS.pm:
2773         * bindings/scripts/test/JS/JSTestObj.cpp:
2774         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
2775         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
2776         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
2777         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
2778         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
2779         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
2780         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2781         (WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional):
2782
2783 2011-05-26  Simon Fraser  <simon.fraser@apple.com>
2784
2785         Reviewed by Adam Roben.
2786
2787         Some repeating linear gradients look wrong
2788         https://bugs.webkit.org/show_bug.cgi?id=61371
2789
2790         Test: fast/gradients/css3-repeating-linear-gradients2.html
2791         
2792         Fix incorrect stop duplication code when filling forwards a repeating
2793         gradient. The "if (srcStopOrdinal < originalNumStops - 1)" test was wrong
2794         because srcStopOrdinal had been adjusted for stops added by start-filling,
2795         but originalNumStops had not. Fix by considering srcStopOrdinal as an index
2796         into the original stops, so comparing it with originalNumStops remains valid.
2797
2798         * css/CSSGradientValue.cpp:
2799         (WebCore::CSSGradientValue::addStops):
2800
2801 2011-05-26  Vsevolod Vlasov  <vsevik@chromium.org>
2802
2803         Reviewed by Yury Semikhatsky.
2804
2805         Web Inspector: In network panel, show transfer size in a first line of resource row.
2806         https://bugs.webkit.org/show_bug.cgi?id=61354
2807
2808         * English.lproj/localizedStrings.js:
2809         * inspector/front-end/NetworkPanel.js:
2810         (WebInspector.NetworkPanel.prototype._createTable):
2811         (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell):
2812
2813 2011-05-25  Simon Fraser  <simon.fraser@apple.com>
2814
2815         Reviewed by Dan Bernstein.
2816
2817         Always antialias borders, outlines and rules when scaling
2818         https://bugs.webkit.org/show_bug.cgi?id=61502
2819         
2820         r84273 changed the behavior of drawLineForBoxSide() to never antialias by default.
2821         This actually disabled antialiasing in some circumstances where it used to be enabled,
2822         for example collapsed table border drawing.
2823         
2824         Fix by allowing antialiasing for collapsed table borders, column rules and span
2825         outlines when the context is scaled.
2826
2827         Test: fast/borders/border-antialiasing.html
2828
2829         * rendering/RenderBlock.cpp:
2830         (WebCore::RenderBlock::paintColumnRules):
2831         * rendering/RenderInline.cpp:
2832         (WebCore::RenderInline::paintOutline):
2833         (WebCore::RenderInline::paintOutlineForLine):
2834         * rendering/RenderTableCell.cpp:
2835         (WebCore::RenderTableCell::paintCollapsedBorder):
2836
2837 2011-05-26  Vsevolod Vlasov  <vsevik@chromium.org>
2838
2839         Reviewed by Yury Semikhatsky.
2840
2841         Web Inspector: Use different SourceFrame instances for ResourcesPanel and NetworkPanel
2842         https://bugs.webkit.org/show_bug.cgi?id=59193
2843
2844         * inspector/front-end/NetworkItemView.js:
2845         (WebInspector.NetworkItemView):
2846         (WebInspector.NetworkItemView._contentViewForResource):
2847         * inspector/front-end/NetworkPanel.js:
2848         (WebInspector.NetworkPanel.prototype._refreshResource):
2849         * inspector/front-end/Resource.js:
2850         (WebInspector.Resource.prototype.get messages):
2851         (WebInspector.Resource.prototype.addMessage):
2852         (WebInspector.Resource.prototype.set errors):
2853         (WebInspector.Resource.prototype.set warnings):
2854         (WebInspector.Resource.prototype.clearErrorsAndWarnings):
2855         * inspector/front-end/ResourceTreeModel.js:
2856         (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded):
2857         * inspector/front-end/ResourceView.js:
2858         (WebInspector.ResourceView.hasTextContent):
2859         (WebInspector.ResourceView.nonSourceViewForResource):
2860         (WebInspector.ResourceSourceFrame):
2861         (WebInspector.ResourceSourceFrame.mimeTypeForResource):
2862         (WebInspector.ResourceSourceFrame.prototype.requestContent):
2863         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
2864         (WebInspector.EditableResourceSourceFrame):
2865         (WebInspector.EditableResourceSourceFrame.prototype.doubleClick):
2866         (WebInspector.EditableResourceSourceFrame.prototype.editContent):
2867         (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing):
2868         (WebInspector.EditableResourceSourceFrame.prototype.afterTextChanged):
2869         (WebInspector.EditableResourceSourceFrame.prototype._clearIncrementalUpdateTimer):
2870         (WebInspector.ResourceRevisionSourceFrame):
2871         (WebInspector.ResourceRevisionSourceFrame.prototype.requestContent):
2872         * inspector/front-end/ResourcesPanel.js:
2873         (WebInspector.ResourcesPanel.prototype.showResource):
2874         (WebInspector.ResourcesPanel.prototype._showResourceView):
2875         (WebInspector.ResourcesPanel.prototype._resourceViewForResource):
2876         (WebInspector.ResourcesPanel.prototype._showRevisionView):
2877         (WebInspector.ResourcesPanel.prototype._sourceViewForRevision):
2878         (WebInspector.ResourcesPanel.prototype.searchCanceled):
2879         (WebInspector.ResourcesPanel.prototype._findTreeElementForRevision):
2880         (WebInspector.ResourcesPanel.prototype._findTreeElementForRevision.getParent):
2881         (WebInspector.FrameResourceTreeElement):
2882         (WebInspector.FrameResourceTreeElement.prototype.onattach):
2883         (WebInspector.FrameResourceTreeElement.prototype._updateErrorsAndWarningsBubbles):
2884         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsCleared):
2885         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsMessageAdded):
2886         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
2887         (WebInspector.FrameResourceTreeElement.prototype.sourceView):
2888         (WebInspector.FrameResourceTreeElement.prototype._createSourceView):
2889         (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView):
2890         (WebInspector.ResourceRevisionTreeElement):
2891         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent):
2892         (WebInspector.ResourceRevisionTreeElement.prototype.sourceView):
2893
2894 2011-05-26  Andreas Kling  <kling@webkit.org>
2895
2896         Reviewed by Darin Adler.
2897
2898         JSC DOM bindings: Use isUndefinedOrNull() instead of (isNull() || isUndefined()).
2899         https://bugs.webkit.org/show_bug.cgi?id=61472
2900
2901         * bindings/scripts/CodeGeneratorJS.pm:
2902         * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
2903         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
2904         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2905
2906 2011-05-26  Keishi Hattori  <keishi@webkit.org>
2907
2908         Reviewed by Kent Tamura.
2909
2910         Add <input type=color> appearance.
2911         https://bugs.webkit.org/show_bug.cgi?id=61275
2912
2913         Test: fast/forms/color/input-appearance-color.html
2914
2915         * css/html.css:
2916         (input[type="color"]): Adds square-button appearance.
2917         (input[type="color"]::-webkit-color-swatch-wrapper):
2918         (input[type="color"]::-webkit-color-swatch):
2919         (input[type="color"][list]): Adds menulist appearance.
2920         (input[type="color"][list]::-webkit-color-swatch-wrapper):
2921         (input[type="color"][list]::-webkit-color-swatch):
2922         * html/ColorInputType.cpp:
2923         (WebCore::ColorInputType::createShadowSubtree): Creates -webkit-color-swatch inside -webkit-color-swatch-wrapper.
2924         (WebCore::ColorInputType::updateColorSwatch): Updates background color of shadowColorSwatch.
2925         (WebCore::ColorInputType::valueChanged): Calls updateColorSwatch.
2926         (WebCore::ColorInputType::shadowColorSwatch): Gets shadowColorSwatch element.
2927         * html/ColorInputType.h:
2928         (WebCore::ColorInputType::ColorInputType): Changed to inherit InputType.
2929
2930 2011-05-26  Kent Tamura  <tkent@chromium.org>
2931
2932         Reviewed by Dimitri Glazkov.
2933
2934         Fix a bug that <input type="number"> dispatches two blurs when tabbing
2935         from an invalid number
2936         https://bugs.webkit.org/show_bug.cgi?id=59071
2937
2938         NumberInputType::handleBlurEvent() dispatched an extra focus event
2939         and an extra blur event because
2940         SelectionController::textWillBeReplaced() called by
2941         RenderTextControlSingleLine::updateFromElement() focuses a node
2942         with the selection.
2943
2944         In order to avoid this problem,
2945          - Introduce Node::willBlur()
2946            It is called before any state changes by a blur event.
2947          - Call RenderTextControlSingleLine::updateFromElement() in willBlur()
2948            It avoids extra focus/blur events because Document::m_focusedNode is
2949            still the number input during willBlur().
2950
2951         Test: fast/forms/input-number-blur-twice.html
2952
2953         * dom/Document.cpp:
2954         (WebCore::Document::setFocusedNode): Calls Node::beforeBlueEvent().
2955         * dom/Node.cpp:
2956         (WebCore::Node::willBlur):
2957           Default empty implementation of willBlur().
2958         * dom/Node.h: Declare willBlur().
2959         * html/HTMLInputElement.cpp:
2960         (WebCore::HTMLInputElement::willBlur):
2961           Added.  It just calls InputType::willBlur().
2962         (WebCore::HTMLInputElement::handleBlurEvent):
2963           Removed InputType::handleBlurEvent() call.
2964         * html/HTMLInputElement.h: Declare willBlur().
2965         * html/InputType.cpp:
2966         (WebCore::InputType::willBlur): Default empty implementation.
2967         (WebCore::InputType::handleBlurEvent): Removed.
2968         * html/InputType.h: Declare willBlur(), remove handleBlurEvent().
2969         * html/NumberInputType.cpp:
2970         (WebCore::NumberInputType::willBlur):
2971           Move the code in handleBlurEvent() here.
2972         * html/NumberInputType.h: Declare willBlur().
2973
2974 2011-05-25  Hans Wennborg  <hans@chromium.org>
2975
2976         Reviewed by Steve Block.
2977
2978         IndexedDB: Support LevelDB transactions.
2979         https://bugs.webkit.org/show_bug.cgi?id=61270
2980
2981         Introduce LevelDBTransaction, which implements in-memory transaction
2982         support on top of LevelDB, and hook this up for IndexedDB to use.
2983
2984         This is all covered by existing tests.
2985
2986         * CMakeLists.txt:
2987         * GNUmakefile.list.am:
2988         * WebCore.gypi:
2989         * WebCore.pro:
2990         * WebCore.xcodeproj/project.pbxproj:
2991         * platform/leveldb/LevelDBDatabase.cpp:
2992         (WebCore::LevelDBDatabase::open):
2993         (WebCore::LevelDBDatabase::put):
2994         (WebCore::LevelDBDatabase::remove):
2995         (WebCore::LevelDBDatabase::write):
2996         (WebCore::IteratorImpl::IteratorImpl):
2997         (WebCore::IteratorImpl::isValid):
2998         (WebCore::IteratorImpl::seekToLast):
2999         (WebCore::IteratorImpl::seek):
3000         (WebCore::IteratorImpl::next):
3001         (WebCore::IteratorImpl::prev):
3002         (WebCore::IteratorImpl::key):
3003         (WebCore::IteratorImpl::value):
3004         (WebCore::LevelDBDatabase::createIterator):
3005         (WebCore::LevelDBDatabase::comparator):
3006         * platform/leveldb/LevelDBDatabase.h:
3007         * platform/leveldb/LevelDBIterator.h:
3008         (WebCore::LevelDBIterator::~LevelDBIterator):
3009         * platform/leveldb/LevelDBTransaction.cpp: Added.
3010         (WebCore::LevelDBTransaction::create):
3011         (WebCore::LevelDBTransaction::LevelDBTransaction):
3012         (WebCore::LevelDBTransaction::clearTree):
3013         (WebCore::LevelDBTransaction::~LevelDBTransaction):
3014         (WebCore::makeVector):
3015         (WebCore::LevelDBTransaction::set):
3016         (WebCore::LevelDBTransaction::put):
3017         (WebCore::LevelDBTransaction::remove):
3018         (WebCore::LevelDBTransaction::get):
3019         (WebCore::LevelDBTransaction::commit):
3020         (WebCore::LevelDBTransaction::rollback):
3021         (WebCore::LevelDBTransaction::createIterator):
3022         (WebCore::LevelDBTransaction::TreeIterator::create):
3023         (WebCore::LevelDBTransaction::TreeIterator::isValid):
3024         (WebCore::LevelDBTransaction::TreeIterator::seekToLast):
3025         (WebCore::LevelDBTransaction::TreeIterator::seek):
3026         (WebCore::LevelDBTransaction::TreeIterator::next):
3027         (WebCore::LevelDBTransaction::TreeIterator::prev):
3028         (WebCore::LevelDBTransaction::TreeIterator::key):
3029         (WebCore::LevelDBTransaction::TreeIterator::value):
3030         (WebCore::LevelDBTransaction::TreeIterator::isDeleted):
3031         (WebCore::LevelDBTransaction::TreeIterator::reset):
3032         (WebCore::LevelDBTransaction::TreeIterator::~TreeIterator):
3033         (WebCore::LevelDBTransaction::TreeIterator::TreeIterator):
3034         (WebCore::LevelDBTransaction::TransactionIterator::create):
3035         (WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
3036         (WebCore::LevelDBTransaction::TransactionIterator::isValid):
3037         (WebCore::LevelDBTransaction::TransactionIterator::seekToLast):
3038         (WebCore::LevelDBTransaction::TransactionIterator::seek):
3039         (WebCore::LevelDBTransaction::TransactionIterator::next):
3040         (WebCore::LevelDBTransaction::TransactionIterator::prev):
3041         (WebCore::LevelDBTransaction::TransactionIterator::key):
3042         (WebCore::LevelDBTransaction::TransactionIterator::value):
3043         (WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes):
3044         (WebCore::LevelDBTransaction::TransactionIterator::setCurrentIteratorToSmallestKey):
3045         (WebCore::LevelDBTransaction::TransactionIterator::setCurrentIteratorToLargestKey):
3046         (WebCore::LevelDBTransaction::registerIterator):
3047         (WebCore::LevelDBTransaction::unregisterIterator):
3048         (WebCore::LevelDBTransaction::resetIterators):
3049         * platform/leveldb/LevelDBTransaction.h: Added.
3050         (WebCore::LevelDBTransaction::AVLTreeAbstractor::get_less):
3051         (WebCore::LevelDBTransaction::AVLTreeAbstractor::set_less):
3052         (WebCore::LevelDBTransaction::AVLTreeAbstractor::get_greater):
3053         (WebCore::LevelDBTransaction::AVLTreeAbstractor::set_greater):
3054         (WebCore::LevelDBTransaction::AVLTreeAbstractor::get_balance_factor):
3055         (WebCore::LevelDBTransaction::AVLTreeAbstractor::set_balance_factor):
3056         (WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_key_key):
3057         (WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_key_node):
3058         (WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_node_node):
3059         (WebCore::LevelDBTransaction::AVLTreeAbstractor::null):
3060         (WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator):
3061         * platform/leveldb/LevelDBWriteBatch.cpp:
3062         (WebCore::LevelDBWriteBatch::create):
3063         (WebCore::LevelDBWriteBatch::LevelDBWriteBatch):
3064         (WebCore::LevelDBWriteBatch::~LevelDBWriteBatch):
3065         (WebCore::makeSlice):
3066         (WebCore::LevelDBWriteBatch::put):
3067         (WebCore::LevelDBWriteBatch::remove):
3068         (WebCore::LevelDBWriteBatch::clear):
3069         * storage/IDBLevelDBBackingStore.cpp:
3070         (WebCore::getInt):
3071         (WebCore::putInt):
3072         (WebCore::getString):
3073         (WebCore::putString):
3074         (WebCore::getNewObjectStoreId):
3075         (WebCore::IDBLevelDBBackingStore::createObjectStore):
3076         (WebCore::deleteRange):
3077         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
3078         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
3079         (WebCore::getNewVersionNumber):
3080         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
3081         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
3082         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
3083         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
3084         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
3085         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
3086         (WebCore::getNewIndexId):
3087         (WebCore::IDBLevelDBBackingStore::createIndex):
3088         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
3089         (WebCore::findGreatestKeyLessThan):
3090         (WebCore::versionExists):
3091         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
3092         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
3093         (WebCore::findLastIndexKeyEqualTo):
3094         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
3095         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
3096         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
3097         (WebCore::IDBLevelDBBackingStore::createTransaction):
3098         (WebCore::IDBLevelDBBackingStore::Transaction::create):
3099         (WebCore::IDBLevelDBBackingStore::Transaction::Transaction):
3100         (WebCore::IDBLevelDBBackingStore::Transaction::begin):
3101         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
3102         (WebCore::IDBLevelDBBackingStore::Transaction::rollback):
3103         * storage/IDBLevelDBBackingStore.h:
3104         * storage/IDBTransactionBackendImpl.cpp:
3105         (WebCore::IDBTransactionBackendImpl::abort):
3106
3107 2011-05-26  Shane Stephens  <shanestephens@google.com>
3108
3109         Reviewed by James Robinson.
3110
3111         REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time
3112         https://bugs.webkit.org/show_bug.cgi?id=60689
3113
3114         Test: transforms/2d/set-transform-and-top.html
3115
3116         * rendering/RenderBlock.cpp:
3117         (WebCore::RenderBlock::simplifiedLayout):
3118
3119 2011-05-26  Igor Oliveira  <igor.oliveira@openbossa.org>
3120
3121         Reviewed by Andreas Kling.
3122
3123         drag-not-loaded-image.html test crashes when WebKit is built with debug option
3124         https://bugs.webkit.org/show_bug.cgi?id=61480
3125
3126         Checks if image has content before starting to drag.
3127
3128         * page/DragController.cpp:
3129         (WebCore::DragController::startDrag):
3130
3131 2011-05-26  Alok Priyadarshi  <alokp@chromium.org>
3132
3133         Reviewed by James Robinson.
3134
3135         [chromium] Cannot create stencil render-buffer for accelerated drawing on desktop GL
3136         https://bugs.webkit.org/show_bug.cgi?id=61444
3137
3138         Used DEPTH24_STENCIL8 format for stencil buffer instead of STENCIL_INDEX8.
3139         Packed depth-stencil buffer is the most common format supported by graphics cards.
3140         It is not very robust to rely on just one format being supported,
3141         so long term the task of creating FBO should be delegated to SKIA,
3142         which has necessary code to iterate through all possible formats.
3143
3144         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
3145         (WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
3146         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
3147
3148 2011-05-25  Jer Noble  <jer.noble@apple.com>
3149
3150         Reviewed by Dan Bernstein.
3151
3152         30 second rewind button dysfunctional viewing trailers fullscreen.
3153         https://bugs.webkit.org/show_bug.cgi?id=61505
3154
3155         Add support for painting MediaReturnToRealtimeButton, as well as hide and show
3156         the correct default video control buttons when entering full-screen mode.
3157
3158         * css/fullscreenQuickTime.css:
3159         (video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
3160         * html/shadow/MediaControlRootElement.cpp:
3161         (WebCore::MediaControlRootElement::enteredFullscreen): Show the "Back 30s" and
3162             "Return to Realtime" buttons for Live Streams in full-screen mode.
3163         (WebCore::MediaControlRootElement::exitedFullscreen): Reset the styles of 
3164             all the buttons affected by enteredFullscreen().
3165         * rendering/RenderMediaControls.cpp:
3166         (WebCore::RenderMediaControls::paintMediaControlsPart): Add support for 
3167             MediaReturnToRealtimeButton.
3168
3169 2011-05-25  Luke Macpherson   <macpherson@chromium.org>
3170
3171         Reviewed by Dimitri Glazkov.
3172
3173         Implement various CSS font properties in CSSStyleApplyProperty.
3174         https://bugs.webkit.org/show_bug.cgi?id=60603
3175
3176         No new tests - refactoring only.
3177
3178         * css/CSSStyleApplyProperty.cpp:
3179         (WebCore::ApplyPropertyFont):
3180         Added templated class to handle font properties
3181         (WebCore::ApplyPropertyFontWeight):
3182         Added class to handle font weight calculation
3183         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3184         Instantiate ApplyPropertyFont/ApplyPropertyFontWeight for appropriate properties.
3185         * css/CSSStyleSelector.cpp:
3186         (WebCore::CSSStyleSelector::applyProperty):
3187         Remove properties that are now implemented in CSSStyleApplyProperty
3188         * css/CSSStyleSelector.h:
3189         (WebCore::CSSStyleSelector::fontDescription):
3190         Added getter for m_style->fontDescription()
3191         (WebCore::CSSStyleSelector::parentFontDescription):
3192         Added getter for m_parentStyle->fontDescription()
3193         (WebCore::CSSStyleSelector::setFontDescription):
3194         Added setter for m_style->setFontDescription() that automatically sets m_fontDirty
3195
3196 2011-05-25  James Simonsen  <simonjam@chromium.org>
3197
3198         Reviewed by Adam Barth.
3199
3200         Add site-specific hack for zipcar.com with old versions of requirejs.
3201         https://bugs.webkit.org/show_bug.cgi?id=61321
3202
3203         Old versions of requirejs (< 0.15.0) try to load scripts in parallel but execute them in
3204         order. This used to work in webkit by setting a bogus script type (script/cache), then
3205         changing the type to a valid one when they wanted to execute it. This hack translates the
3206         behavior into the new API (by disabling forceAsync).
3207
3208         * html/HTMLScriptElement.cpp:
3209         (WebCore::needsOldRequirejsQuirk): Added.
3210         (WebCore::HTMLScriptElement::insertedIntoDocument):
3211         If hack is needed, set a proper script type so script loads.
3212         If script isn't async, disable forceAsync so script executes in order.
3213
3214 2011-05-25  Andreas Kling  <kling@webkit.org>
3215
3216         Reviewed by David Levin.
3217
3218         Rebaseline run-bindings-tests.
3219         https://bugs.webkit.org/show_bug.cgi?id=61469
3220
3221         * bindings/scripts/test/JS/:
3222         * bindings/scripts/test/V8/:
3223
3224 2011-05-25  Levi Weintraub  <leviw@chromium.org>
3225
3226         Reviewed by Eric Seidel.
3227
3228         Switch itemBoundingBoxRect to use IntPoint
3229         https://bugs.webkit.org/show_bug.cgi?id=60789
3230
3231         Changing itemBoundingBoxRect to use an IntPoint representing the offset
3232         to be added tot he box rect instead of a pair of ints.
3233
3234         No new tests since this is just refactoring.
3235
3236         * accessibility/AccessibilityListBox.cpp:
3237         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
3238         * accessibility/AccessibilityListBoxOption.cpp:
3239         (WebCore::AccessibilityListBoxOption::elementRect):
3240         * rendering/RenderListBox.cpp:
3241         (WebCore::RenderListBox::itemBoundingBoxRect):
3242         (WebCore::RenderListBox::addFocusRingRects):
3243         (WebCore::RenderListBox::paintItemForeground):
3244         (WebCore::RenderListBox::paintItemBackground):
3245         (WebCore::RenderListBox::nodeAtPoint):
3246         * rendering/RenderListBox.h:
3247
3248 2011-05-24  MORITA Hajime  <morrita@google.com>
3249
3250         Reviewed by Dimitri Glazkov.
3251
3252         RenderText with empty text is not created inside ShadowContentElement 
3253         https://bugs.webkit.org/show_bug.cgi?id=61111        
3254
3255         - Changed Text::rendererIsNeeded() to be shadow-aware.
3256         - previousRenderer(), nextRenderer() and parentRenderer() on NodeRenderingContext is now
3257           safe even if it's used with an attached node, which was originally used only during attach().
3258           We need this change because these APIs are called inside CharacterData::updateRenderer() callstack.
3259         
3260         Tests: fast/html/details-replace-summary-child.html
3261                fast/html/details-replace-text.html
3262
3263         * dom/NodeRenderingContext.cpp:
3264         (WebCore::NodeRenderingContext::NodeRenderingContext):
3265         (WebCore::NodeRenderingContext::nextRenderer):
3266         (WebCore::NodeRenderingContext::previousRenderer):
3267         (WebCore::NodeRenderingContext::parentRenderer):
3268         (WebCore::NodeRenderingContext::shouldCreateRenderer):
3269         * dom/NodeRenderingContext.h:
3270         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
3271         * dom/Text.cpp:
3272         (WebCore::Text::rendererIsNeeded):
3273
3274 2011-05-25  Sailesh Agrawal  <sail@chromium.org>
3275
3276         Reviewed by Tony Chang.
3277
3278         Rename ScrollbarOverlayUtilitiesMac to ScrollbarOverlayUtilitiesChromiumMac
3279         https://bugs.webkit.org/show_bug.cgi?id=61401
3280
3281         ScrollbarOverlayUtilitiesMac.mm was being excluded from the WebCore project. Fix was to make sure the file name ended with ChromiumMac.
3282
3283         * WebCore.gypi:
3284         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Copied from Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesMac.h.
3285         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Copied from Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesMac.mm.
3286         * platform/chromium/ScrollbarOverlayUtilitiesMac.h: Removed.
3287         * platform/chromium/ScrollbarOverlayUtilitiesMac.mm: Removed.
3288
3289 2011-05-25  James Robinson  <jamesr@chromium.org>
3290
3291         Reviewed by Geoffrey Garen
3292
3293         CachedResource overhead size calculation ignores the actual size of the URL
3294         https://bugs.webkit.org/show_bug.cgi?id=61481
3295
3296         CachedResource::overheadSize is used to determine the size of an entry in the memory cache to know when to evict
3297         it.  When the resource is a large data: URL, for example representing image or audio data, the URL size itself
3298         can be significant.
3299
3300         This patch uses an estimate of actual number of bytes used by the URL that is valid for ASCII urls and close for
3301         other types of strings instead of a fixed number.
3302
3303         * loader/cache/CachedResource.cpp:
3304         (WebCore::CachedResource::overheadSize):
3305
3306 2011-05-25  Oliver Hunt  <oliver@apple.com>
3307
3308         Reviewed by Geoffrey Garen.
3309
3310         Make RegExp GC allocated
3311         https://bugs.webkit.org/show_bug.cgi?id=61490
3312
3313         RegExp is GC'd so we don't need the RefPtr shenanigans anymore.
3314
3315         * bindings/js/SerializedScriptValue.cpp:
3316         (WebCore::CloneDeserializer::readTerminal):
3317
3318 2011-05-25  Martin Robinson  <mrobinson@igalia.com>
3319
3320         Reviewed by Dirk Schulze.
3321
3322         [Cairo] Move the global alpha property from GraphicsContext to PlatformContextCairo
3323         https://bugs.webkit.org/show_bug.cgi?id=60185
3324
3325         Remove Cairo #ifdefs from GraphicsContext.h by pushing the global alpha
3326         state into PlatformContextCairo. Since Cairo is the only platform that needs
3327         to store this, this is the proper place for it. Change the image mask stack into
3328         a more generic state stack that can keep track of the multiple bits of platform
3329         specific state and properly handle save/restore pairs.
3330
3331         No new tests. This is just a code refactor.
3332
3333         * platform/graphics/GraphicsContext.h: Remove Cairo #ifdefs.
3334         (WebCore::GraphicsContextState::GraphicsContextState): Ditto.
3335         * platform/graphics/cairo/ContextShadowCairo.cpp: Access global alpha from PlatformContextCairo now.
3336         (WebCore::ContextShadow::drawRectShadow):
3337         * platform/graphics/cairo/FontCairo.cpp: Ditto.
3338         (WebCore::Font::drawGlyphs):
3339         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3340         (WebCore::setPlatformFill): Ditto.
3341         (WebCore::setPlatformStroke): Ditto.
3342         (WebCore::GraphicsContext::setAlpha): Ditto.
3343         * platform/graphics/cairo/PlatformContextCairo.cpp: Moved ImageMaskInformation class from the
3344         header file, since it can be private now. Abstract the image mask state and the global alpha
3345         in a generic State class.
3346         (WebCore::ImageMaskInformation::update): 
3347         (WebCore::ImageMaskInformation::isValid):
3348         (WebCore::ImageMaskInformation::maskSurface):
3349         (WebCore::ImageMaskInformation::maskRect):
3350         (WebCore::PlatformContextCairo::State::State): Added.
3351         (WebCore::PlatformContextCairo::PlatformContextCairo): Intialize the state
3352         class when this class is constructed.
3353         (WebCore::PlatformContextCairo::restore): Now pop the last state off the state stack.
3354         (WebCore::PlatformContextCairo::~PlatformContextCairo): Added this so that we can forward
3355         declare the State class in the header.
3356         (WebCore::PlatformContextCairo::save): Push a new state onto the stack.
3357         (WebCore::PlatformContextCairo::pushImageMask): Operate on the state stack now.
3358         (WebCore::PlatformContextCairo::globalAlpha): Added.
3359         (WebCore::PlatformContextCairo::setGlobalAlpha): Added.
3360         (WebCore::PlatformContextCairo::drawSurfaceToContext: Call globalAlpha().
3361         * platform/graphics/cairo/PlatformContextCairo.h: Changed the image mask stack
3362         into a more generic state stack, much like PlatformContextChromium.
3363
3364 2011-05-25  Mark Rowe  <mrowe@apple.com>
3365
3366         Reviewed by Sam Weinig.
3367
3368         <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
3369
3370         * WebCore.exp.in: Add an export that WebKit2 needs.
3371
3372 2011-05-25  Jer Noble  <jer.noble@apple.com>
3373
3374         Ureviewed; Build fix for Leopard and Snow Leopard.
3375
3376         Move _wkQTMovieResolvedURL outside of a #if check for Leopard and SL.
3377
3378         * WebCore.exp.in:
3379
3380 2011-05-25  Michael Saboff  <msaboff@apple.com>
3381
3382         Reviewed by Sam Weinig.
3383
3384         Cleanup of commented items from https://bugs.webkit.org/show_bug.cgi?id=61222
3385         https://bugs.webkit.org/show_bug.cgi?id=61478
3386
3387         Cleanup of further comments after patch was landed.  Changes include
3388         using /2 instead of >>1, adding a blank line after class include,
3389         making method names start with lower case and adding clarifying
3390         comments.
3391
3392         No new tests as the changes are stylistic and not functional.
3393
3394         * loader/cache/MemoryCache.cpp:
3395         (WebCore::MemoryCache::pruneLiveResourcesToPercentage):
3396         (WebCore::MemoryCache::pruneDeadResourcesToPercentage):
3397         * loader/cache/MemoryCache.h:
3398         (WebCore::MemoryCache::pruneToPercentage):
3399         * platform/mac/MemoryPressureHandlerMac.mm:
3400         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
3401
3402 2011-05-25  Stephanie Lewis  <slewis@apple.com>
3403
3404         Reviewed by Brady Eidson.
3405
3406         https://bugs.webkit.org/show_bug.cgi?id=61407
3407         part of <rdar://problem/8675177>
3408         Move Quicklook quirk down into WebCore so it can be caculated when the user
3409         starts a reload.  Restructure the conditions so it only called when absolutely 
3410         necessary.
3411   
3412         No change in functionality so no new tests.
3413
3414         * loader/FrameLoader.cpp:
3415         (WebCore::FrameLoader::subresourceCachePolicy):
3416         * page/Settings.cpp:
3417         (WebCore::Settings::Settings):
3418         * page/Settings.h:
3419         * platform/network/cf/ResourceRequest.h:
3420         * platform/network/mac/ResourceRequestMac.mm:
3421         (WebCore::initQuickLookResourceCachingQuirks):
3422         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
3423
3424 2011-05-24  Jer Noble  <jer.noble@apple.com>
3425
3426         Reviewed by Darin Adler.
3427
3428         Video fails to play on Vimeo
3429         https://bugs.webkit.org/show_bug.cgi?id=61403
3430
3431         No new tests; Covered by media/video-canvas-source.html.
3432
3433         Vimeo redirects their assets from player.vimeo.com to av.vimeo.com, which is rejected
3434         by AVFoundation and QTKit due to our setting a ForbidCrossSiteReference option when
3435         creating an AVAsset or QTMovie. Instead, we should just reject local->remote and
3436         remote->local and make our answer to hasSingleSecurityOrigin dynamic.
3437
3438         When checking whether a given request has a single security origin, use a 
3439         SecurityOrigin to check the host, port, and scheme.
3440
3441         * WebCore.exp.in:
3442         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3443         (WebCore::MediaPlayerPrivateAVFoundation::assetURL): Added.
3444         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
3445         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
3446         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Exchange ForbidCrossSiteReference
3447             for ForbidRemoteReferenceToLocal and ForbidLocalReferenceToRemote
3448         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check to see that the
3449             requested and resolved URLs have the same host and port.
3450         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3451         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): Exchange NoCrossSiteAttribute for 
3452             NoRemoteToLocalSiteAttribute and NoLocalToRemoteSiteAttribute.
3453    &nbs