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