d9cc4babbd72e16568e85656bd9f2e1c4a53d715
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
4         https://bugs.webkit.org/show_bug.cgi?id=116290
5
6         Follow an update to the spec and support the new and old syntax.
7
8         Reviewed by Timothy Hatcher.
9
10         * inspector/ContentSearchUtils.cpp:
11         (WebCore::ContentSearchUtils::scriptCommentPattern):
12         (WebCore::ContentSearchUtils::stylesheetCommentPattern):
13         * inspector/front-end/SASSSourceMapping.js:
14         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
15
16 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
17
18         Remove custom code for MessageEvent.ports getter
19         https://bugs.webkit.org/show_bug.cgi?id=116304
20
21         Reviewed by Kentaro Hara.
22
23         Remove Custom code for the "ports" attribute getter in MessageEvent
24         IDL interface. The JSC bindings generator already supports attributes
25         of type MessagePortArray.
26
27         No new tests, already covered by existing layout tests and bindings
28         tests.
29
30         * bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
31         * bindings/scripts/CodeGeneratorJS.pm:
32         (NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
33         returns NULL and avoid crashing in this case.
34         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
35         to bindings generator tweak.
36         * dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
37         and switch to MessagePortArray type.
38
39 2013-05-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
40
41         Add stubs for ContextMenu and ContextMenuItem
42         https://bugs.webkit.org/show_bug.cgi?id=116235
43
44         Reviewed by Antonio Gomes.
45
46         No new tests needed, only a refactor.
47
48         Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
49         so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
50         need to replicate these stubs.
51
52         * PlatformEfl.cmake:
53         * Target.pri:
54         * platform/ContextMenuNone.cpp: Added.
55         (WebCore):
56         (WebCore::ContextMenu::ContextMenu):
57         (WebCore::ContextMenu::getContextMenuItems):
58         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
59         (WebCore::ContextMenu::platformContextMenu):
60         * platform/ContextMenuItemNone.cpp: Added.
61         (WebCore):
62         (WebCore::ContextMenuItem::platformContextMenuItem):
63         * platform/efl/ContextMenuEfl.cpp: Removed.
64         * platform/efl/ContextMenuItemEfl.cpp: Removed.
65         * platform/qt/ContextMenuQt.cpp: Removed.
66         * platform/qt/ContextMenuItemQt.cpp: Removed.
67
68 2013-05-16  Alexis Menard  <alexis@webkit.org>
69
70         Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
71         https://bugs.webkit.org/show_bug.cgi?id=115656
72
73         Reviewed by Darin Adler.
74
75         If we create a prefixed event to dispatch it (in the case we have only
76         prefixed event listeners in client's code) then we need to make sure to
77         keep it in sync with the original unprefixed event after it has been
78         dispatched. While being dispatched the event can be modified by
79         client's code and when propagated back to outer elements, attributes were
80         not updated. This patch changes the old design of creating a separate event
81         for the prefixed case and now change the type of the event (so the name) before
82         dispatching it, keeping the attributes if changed and then rename it
83         back to unprefixed when the dispatching is finished.
84
85         Tests: transitions/transition-end-event-prefixed-01.html
86                transitions/transition-end-event-prefixed-02.html
87                transitions/transition-end-event-prefixed-03.html
88
89         * dom/Event.h:
90         (WebCore::Event::setType):
91         * dom/EventTarget.cpp:
92         (WebCore::EventTarget::fireEventListeners):
93
94 2013-05-16  Mike Fenton  <mifenton@rim.com>
95
96         [BlackBerry] Strip invoke URLs when writing to the clipboard.
97         https://bugs.webkit.org/show_bug.cgi?id=116226
98
99         Reviewed by Rob Buis.
100
101         PR 333516.
102
103         Invoke URLs should not be included in the paste data.
104
105         Internally Reviewed by Gen Mak.
106
107         * platform/blackberry/PasteboardBlackBerry.cpp:
108         (WebCore::Pasteboard::writeSelection):
109
110 2013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
111
112         Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
113         https://bugs.webkit.org/show_bug.cgi?id=116230
114
115         Reviewed by Chris Fleizach.
116
117         No new functionality, no new tests.
118
119         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
120         (webkitAccessibleTextGetTextForOffset): List textPosition argument as
121         unused parameter for all platforms except GTK.
122
123 2013-05-16  Jaehun Lim  <ljaehun.lim@samsung.com>
124
125         Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
126         https://bugs.webkit.org/show_bug.cgi?id=115884
127         
128         Reviewed by Antonio Gomes.
129
130         Frame flattening should be applied when the frame owner is frame or iframe. But when
131         the frame owner is object element, frame flattening prevents it from having scrollbars.
132         In this situation, we can't scroll the html document in object element.
133
134         This patch adds two helper functions to verify flattening conditions.
135         
136         Test: fast/frames/flattening/scrolling-in-object.html
137
138         * page/FrameView.cpp:
139         (WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
140         (WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
141         (WebCore::FrameView::avoidScrollbarCreation):
142         (WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
143         (WebCore::FrameView::layout): Use frameFlatteningEnabled().
144         (WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
145
146 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
147
148         Port functions for pathhandling to Windows CE in FileSystemWin
149         https://bugs.webkit.org/show_bug.cgi?id=116208
150
151         Reviewed by Darin Adler.
152
153         This will allow us to remove FileSystemWinCE in a next step.
154
155         * platform/win/FileSystemWin.cpp:
156         (WebCore::pathByAppendingComponent):
157         (WebCore::pathGetFileName):
158
159 2013-05-16  Tim Horton  <timothy_horton@apple.com>
160
161         PDFPlugins don't load when plugins are disabled, but they should
162         https://bugs.webkit.org/show_bug.cgi?id=75790
163         <rdar://problem/11650197>
164
165         Reviewed by Anders Carlsson.
166
167         Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
168         say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
169         functionality which happens to use the plug-in infrastructure, and which also doesn't
170         unexpectedly disappear for users with plug-ins off.
171
172         * WebCore.exp.in:
173         Export SubframeLoader::allowPlugins().
174         Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
175
176         * dom/DOMImplementation.cpp:
177         (WebCore::DOMImplementation::createDocument):
178         Load PluginData even if plug-ins are disabled, but if that is the case, only
179         create a PluginDocument for application plug-ins.
180
181         * html/PluginDocument.cpp:
182         (WebCore::PluginDocumentParser::appendBytes):
183         Don't bail if plug-ins are disabled, because we could still be a PluginDocument
184         for an application plug-in.
185
186         * page/Page.cpp:
187         (WebCore::Page::pluginData):
188         Allow PluginData to be constructed even if plug-ins are disabled, as there might
189         be application plug-ins that we want to load anyway.
190
191         * platform/mac/MIMETypeRegistryMac.mm:
192         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
193         On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
194
195         * plugins/PluginData.cpp:
196         (WebCore::PluginData::supportsMimeType):
197         Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
198         whether they are looking for any plug-in, or are looking only for application plug-ins.
199
200         * plugins/PluginData.h:
201         (PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
202         (PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
203
204 2013-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
205
206         [BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
207         https://bugs.webkit.org/show_bug.cgi?id=114944
208
209         Reviewed by Rob Buis.
210
211         It crashes in network platform code when trying to save an
212         invalid URL in the disk cache. That test contains references to
213         empty URLs like http://. Those empty URLs, are parsed as http:/ by
214         KURL and considered valid. BlackBerry network platform uses GURL
215         which considers those URLs invalid. We needed to check that the
216         URLs are valid for our platform before starting the network
217         operation.
218
219         Fixes a crash running test
220         editing/execCommand/indent-paragraphs.html.
221
222         * platform/network/blackberry/NetworkManager.cpp:
223         (WebCore::NetworkManager::startJob): Check if the request URL is
224         valid from the platform point of view right after creating the
225         platform network request and return early if the URL is invalid
226         with StatusErrorInvalidUrl error.
227
228 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
229
230         Remove unused function safeCreateFile() from WebCore
231         https://bugs.webkit.org/show_bug.cgi?id=116211
232
233         Reviewed by Anders Carlsson.
234
235         * platform/FileSystem.h:
236         * platform/win/FileSystemWin.cpp:
237
238 2013-05-16  Peter Gal  <galpeter@inf.u-szeged.hu>
239
240         [curl] MIME type should be in lowercase
241         https://bugs.webkit.org/show_bug.cgi?id=116218
242
243         Reviewed by Benjamin Poulain.
244
245         Existing testcase: http/tests/mime/uppercase-mime-type.html
246
247         * platform/network/curl/ResourceHandleManager.cpp:
248         (WebCore::headerCallback): Convert the MIME type to lowercase.
249
250 2013-05-16  Seokju Kwon  <seokju.kwon@gmail.com>
251
252         Web Inspector: Fix optional value of promptText in Inspector.json
253         https://bugs.webkit.org/show_bug.cgi?id=116203
254
255         Reviewed by Joseph Pecoraro.
256
257         Merge from https://chromiumcodereview.appspot.com/14672031.
258
259         No new tests needed.
260
261         * inspector/Inspector.json:
262
263 2013-05-16  Mary Wu  <mary.wu@torchmobile.com.cn>
264
265         [BlackBerry] Unable to download blob resource
266         https://bugs.webkit.org/show_bug.cgi?id=115888
267
268         Reviewed by Benjamin Poulain.
269
270         Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
271         RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
272
273         * PlatformBlackBerry.cmake:
274         * platform/network/blackberry/BlobStream.cpp: Added.
275         (WebCore):
276         (WebCore::BlobStream::BlobStream):
277         (WebCore::BlobStream::~BlobStream):
278         (WebCore::BlobStream::didReceiveData):
279         (WebCore::BlobStream::didFinishLoading):
280         (WebCore::BlobStream::didFail):
281         (WebCore::BlobStream::url):
282         (WebCore::BlobStream::mimeType):
283         * platform/network/blackberry/BlobStream.h: Added.
284         (WebCore):
285         (BlobStream):
286
287 2013-05-16  Anders Carlsson  <andersca@apple.com>
288
289         Remove SystemTime header and implementations
290         https://bugs.webkit.org/show_bug.cgi?id=116200
291
292         Reviewed by Alexey Proskuryakov.
293
294         SystemTim just had a single function that's not called anymore. Remove it.
295
296         * GNUmakefile.list.am:
297         * PlatformBlackBerry.cmake:
298         * PlatformEfl.cmake:
299         * PlatformWinCE.cmake:
300         * Target.pri:
301         * WebCore.vcproj/WebCore.vcproj:
302         * WebCore.vcxproj/WebCore.vcxproj:
303         * WebCore.vcxproj/WebCore.vcxproj.filters:
304         * WebCore.xcodeproj/project.pbxproj:
305         * history/PageCache.cpp:
306         * platform/SystemTime.h: Removed.
307         * platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
308         * platform/efl/SystemTimeEfl.cpp: Removed.
309         * platform/graphics/ca/GraphicsLayerCA.cpp:
310         * platform/mac/SystemTimeMac.cpp: Removed.
311         * platform/qt/TemporaryLinkStubsQt.cpp:
312         * platform/win/SystemTimeWin.cpp: Removed.
313
314 2013-05-16  Glenn Adams  <glenn@skynav.com>
315
316         [Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
317         https://bugs.webkit.org/show_bug.cgi?id=116196
318
319         Reviewed by Benjamin Poulain.
320
321         * inspector/InspectorConsoleAgent.cpp:
322         (WebCore::InspectorConsoleAgent::addMessageToConsole):
323             - Remove questionable IE7 related error filtering
324
325 2013-05-16  Andreas Kling  <akling@apple.com>
326
327         Page::chrome() should return a reference.
328         <http://webkit.org/b/116185>
329
330         Reviewed by Anders Carlsson.
331
332         A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
333         Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
334
335 2013-05-16  Simon Fraser  <simon.fraser@apple.com>
336
337         Content disappears when scrolling http://www.childrenscancer.org/zach/
338         https://bugs.webkit.org/show_bug.cgi?id=116206
339
340         Reviewed by Darin Adler.
341         
342         When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
343         we need to repaint the primary layer, since what paints into that primary
344         layer will change.
345         
346         On the page in question, we gained/lost a foreground layer when scrolling because
347         the page popped an element into position:fixed.
348
349         Test: compositing/repaint/foreground-layer-change.html
350
351         * rendering/RenderLayerBacking.cpp:
352         (WebCore::RenderLayerBacking::updateForegroundLayer):
353         (WebCore::RenderLayerBacking::updateBackgroundLayer):
354
355 2013-05-16  Andy Estes  <aestes@apple.com>
356
357         Do not indefinitely cache resources from blob URLs.
358
359         Reviewed by Alexey Proskuryakov.
360
361         Alexey pointed out after I landed r150169 that blob URLs backed by
362         files should return an error if the file changed after the URL was
363         created. By indefinitely caching them in memory, we don't give the
364         loader a chance to check for modification. Remove "blob" from the list
365         of schemes that should be indefinitely cached.
366
367         * platform/SchemeRegistry.cpp:
368         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
369
370 2013-05-16  Claudio Saavedra  <csaavedra@igalia.com>
371
372         [CSS] CSS Variables are case-sensitive
373         https://bugs.webkit.org/show_bug.cgi?id=116239
374
375         Reviewed by Ryosuke Niwa.
376
377         The CSS Variables specification states that variables are
378         case-sensitive, unlike other CSS properties.
379
380         Test: fast/css/variables/case-sensitive.html
381
382         * css/CSSParser.cpp:
383         (WebCore::CSSParserString::substring): Replace
384         the now unnecessary lowerSubstring() with this method.
385         Also, since the method is only used by the CSS variables
386         implementation, #ifdef it.
387         (WebCore::CSSParser::createPrimitiveVariableNameValue):
388         (WebCore::CSSParser::storeVariableDeclaration):
389         Do not normalize variable declarations to lowercase.
390         * css/CSSParserValues.h:
391         (CSSParserString): Replace the lowerSubstring() declaration
392         and wrap with #if/#endif.
393
394 2013-05-16  Brady Eidson  <beidson@apple.com>
395
396         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
397         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
398
399         Reviewed by Sam Weinig.
400
401         Give WebKit2 the ability to not mis-cast.
402
403         * loader/FrameLoaderClient.h:
404         (WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
405           to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
406
407         * loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
408
409 2013-05-14  Martin Robinson  <mrobinson@igalia.com>
410
411         [GTK] Add support for building WebCore to the cmake build
412         https://bugs.webkit.org/show_bug.cgi?id=116128
413
414         Reviewed by Gustavo Noronha Silva.
415
416         * PlatformGTK.cmake: Added.
417         * platform/gtk/GtkVersioning.c: Include "config.h" because we removed
418         the autotoolsconfig.h include from the header.
419         * platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
420         non-autotools build systems.
421
422 2013-05-15  Ryosuke Niwa  <rniwa@webkit.org>
423
424         DocumentOrderedMap doesn't need to have two HashMaps
425         https://bugs.webkit.org/show_bug.cgi?id=116167
426
427         Reviewed by Geoffrey Garen.
428
429         Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
430         of the first element and the number of duplicates for a given name. This patch simplifies this structure
431         by having a single hash map that contains both the pointer and the number of duplicates.
432
433         In addition, this patch fixes a regression introduced in r149652 that window and document name maps
434         were not updated for some elements inside a SVG use element, and makes use of the newly added list of
435         the matching elements in SelectorQuery.
436
437         * dom/DocumentOrderedMap.cpp:
438         (WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
439         (WebCore::DocumentOrderedMap::add): Ditto.
440         (WebCore::DocumentOrderedMap::remove): Ditto.
441         (WebCore::DocumentOrderedMap::get): Ditto.
442         (WebCore::DocumentOrderedMap::getAllElementsById): Added.
443
444         * dom/DocumentOrderedMap.h:
445
446         (WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
447         (WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
448         (WebCore::DocumentOrderedMap::contains): Ditto.
449         (WebCore::DocumentOrderedMap::containsMultiple): Ditto.
450
451         * dom/Element.cpp:
452         (WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
453         if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
454         of the tree scope into the document. We were exiting early per scope != treeScope().
455
456         Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
457         The former is called when this element is inserted into a new tree scope, and the latter is called when
458         this element is inserted into a HTML document even if it had already been inside some tree scope.
459
460         (WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
461         the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
462         current tree scope.
463         (WebCore::Element::updateName):
464         (WebCore::Element::updateNameForTreeScope): Renamed from updateName.
465         (WebCore::Element::updateNameForDocument): Extracted from updateName.
466         (WebCore::Element::updateId):
467         (WebCore::Element::updateIdForTreeScope): Renamed from updateId.
468         (WebCore::Element::updateIdForDocument): Extracted from updateId.
469
470         * dom/Element.h:
471
472         * dom/SelectorQuery.cpp:
473         (WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
474         the first subselector happens to be matching an id.
475         (WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
476         added getAllElementsById when there are multiple matching elements for a given id.
477
478         * dom/SelectorQuery.h:
479
480         * dom/TreeScope.cpp:
481         (WebCore::TreeScope::getAllElementsById): Added.
482
483         * dom/TreeScope.h:
484
485 2013-05-15  Darin Adler  <darin@apple.com>
486
487         [Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
488         https://bugs.webkit.org/show_bug.cgi?id=116179
489
490         Reviewed by Andreas Kling.
491
492         * dom/Clipboard.cpp:
493         (WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
494         ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
495         (WebCore::Clipboard::create): Ditto.
496         (WebCore::Clipboard::createForDragAndDrop): Ditto.
497
498         * platform/DragData.h:
499         (WebCore::DragData::pasteboardName): Made this const.
500
501         * platform/Pasteboard.h: Added new create functions, used by the clipboard
502         create functions above.
503
504         * platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
505         Clipboard.cpp file.
506
507         * platform/mac/PasteboardMac.mm:
508         (WebCore::Pasteboard::createForCopyAndPaste): Added.
509         (WebCore::Pasteboard::createPrivate): Added.
510         (WebCore::Pasteboard::createForDragAndDrop): Added.
511
512 2013-05-15  Anders Carlsson  <andersca@apple.com>
513
514         Fix a thinko.
515
516         We want to invalidate the file icon loader if it exists, not create it!
517
518         * html/FileInputType.cpp:
519         (WebCore::FileInputType::requestIcon):
520
521 2013-05-15  Darin Adler  <darin@apple.com>
522
523         Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
524         https://bugs.webkit.org/show_bug.cgi?id=116176
525
526         Reviewed by Andreas Kling.
527
528         * dom/Clipboard.cpp:
529         (WebCore::Clipboard::writeRange):
530         (WebCore::Clipboard::writePlainText):
531         (WebCore::Clipboard::writeURL):
532         Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
533         not make it obvious, these are here only for use by dragging code. Later we may
534         refactor them away entirely, but for now it's good not to compile them in on any
535         platform that does not support dragging.
536
537 2013-05-15  Andy Estes  <aestes@apple.com>
538
539         Resources from non-HTTP schemes should not be cached indefinitely
540         https://bugs.webkit.org/show_bug.cgi?id=113626
541
542         Reviewed by Ryosuke Niwa.
543
544         With the exception of schemes that we know will always return the same
545         result for a given URL, we should not indefinitely cache non-HTTP
546         resources when their freshness cannot be verified.
547
548         Writing a test for this is blocked on https://webkit.org/b/116199.
549
550         The following two existing tests of memory cache behavior were
551         converted to HTTP tests so that they continue to function as expected:
552
553         Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
554                http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
555
556         * loader/cache/CachedResource.cpp:
557         (WebCore::CachedResource::freshnessLifetime): Returned a freshness
558         lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
559         * platform/SchemeRegistry.cpp:
560         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
561         Checked whether the scheme is blob:, data:, or applewebdata:.
562         * platform/SchemeRegistry.h:
563
564 2013-05-15  Tim Horton  <timothy_horton@apple.com>
565
566         makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
567         https://bugs.webkit.org/show_bug.cgi?id=116198
568         <rdar://problem/13904395>
569
570         Reviewed by Simon Fraser.
571
572         Block Objective-C exceptions in makeRGBAFromNSColor.
573         Remove a comment saying that they're impossible.
574
575         Convert the incoming color to the DeviceRGB colorspace to match
576         existing color sources. Some rare cases (attributed strings that come
577         from PDFKit) can have DeviceGrayscale color spaces, which would
578         previously throw an exception here.
579
580         * platform/graphics/mac/ColorMac.mm:
581         (WebCore::makeRGBAFromNSColor):
582
583 2013-05-15  David Kilzer  <ddkilzer@apple.com>
584
585         BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
586
587         * platform/ios/ClipboardIOS.mm:
588         (WebCore::ClipboardIOS::ClipboardIOS):
589         (WebCore::ClipboardIOS::hasData):
590         (WebCore::ClipboardIOS::clearData):
591         (WebCore::ClipboardIOS::clearAllData):
592         (WebCore::ClipboardIOS::getData):
593         (WebCore::ClipboardIOS::setData):
594         (WebCore::ClipboardIOS::types):
595         (WebCore::ClipboardIOS::writeRange):
596         * platform/ios/PasteboardIOS.mm:
597         (WebCore::Pasteboard::getStringSelection):
598         (WebCore::Pasteboard::writeSelection):
599         (WebCore::Pasteboard::writePlainText):
600         (WebCore::Pasteboard::writeImage):
601         (WebCore::Pasteboard::plainText):
602         (WebCore::documentFragmentWithRTF):
603         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
604         (WebCore::Pasteboard::documentFragment):
605
606 2013-05-15  Anders Carlsson  <andersca@apple.com>
607
608         Stop using the factory pattern in FileIconLoaderClient
609         https://bugs.webkit.org/show_bug.cgi?id=116197
610
611         Reviewed by Andreas Kling.
612
613         Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
614
615         * html/FileInputType.cpp:
616         (WebCore::FileInputType::~FileInputType):
617         (WebCore::FileInputType::requestIcon):
618         * html/FileInputType.h:
619         (FileInputType):
620         * platform/FileIconLoader.cpp:
621         (WebCore::FileIconLoader::invalidate):
622         * platform/FileIconLoader.h:
623         (WebCore::FileIconLoaderClient::~FileIconLoaderClient):
624         (FileIconLoader):
625
626 2013-05-15  Anders Carlsson  <andersca@apple.com>
627
628         Fix FileChooserClient design
629         https://bugs.webkit.org/show_bug.cgi?id=116195
630
631         Reviewed by Andreas Kling.
632
633         FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
634         Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
635
636         Fix this by making it an abstract class, and moving FileChooser into FileInputType.
637
638         * html/FileInputType.cpp:
639         (WebCore::FileInputType::~FileInputType):
640         Invalidate the file chooser.
641
642         (WebCore::FileInputType::handleDOMActivateEvent):
643         Apply the file chooser settings.
644
645         (WebCore::FileInputType::applyFileChooserSettings):
646         Recreate the file chooser with new settings.
647
648         (WebCore::FileInputType::receiveDropForDirectoryUpload):
649         Apply the settings.
650
651         * platform/FileChooser.cpp:
652         (WebCore::FileChooser::invalidate):
653         Set m_client to null.
654
655         (WebCore::FileChooser::chooseFiles):
656         Early return.
657
658         * platform/FileChooser.h:
659
660 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
661
662         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
663         https://bugs.webkit.org/show_bug.cgi?id=116193
664
665         Reviewed by Darin Adler
666
667         * dom/ScriptedAnimationController.cpp:
668         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
669         (WebCore::ScriptedAnimationController::setThrottled):
670         (WebCore::ScriptedAnimationController::scheduleAnimation):
671         * dom/ScriptedAnimationController.h:
672         (ScriptedAnimationController):
673             - Fixes for review comments.
674
675 2013-05-15  Anders Carlsson  <andersca@apple.com>
676
677         Move HTTPRequest class to WebKit2
678         https://bugs.webkit.org/show_bug.cgi?id=116192
679
680         Reviewed by Darin Adler.
681
682         HTTPRequest is only used by the "remote inspector" feature in WebKit2,
683         so there's no need to have it in WebCore.
684
685         * CMakeLists.txt:
686         * GNUmakefile.list.am:
687         * Target.pri:
688         * WebCore.vcproj/WebCore.vcproj:
689         * WebCore.vcxproj/WebCore.vcxproj:
690         * WebCore.vcxproj/WebCore.vcxproj.filters:
691         * WebCore.xcodeproj/project.pbxproj:
692
693 2013-05-15  Oliver Hunt  <oliver@apple.com>
694
695         RefCountedArray needs to use vector initialisers for its backing store
696         https://bugs.webkit.org/show_bug.cgi?id=116194
697
698         Reviewed by Gavin Barraclough.
699
700         Update to use new functions for operating on the exception stack.
701
702         * bindings/js/ScriptCallStackFactory.cpp:
703         (WebCore::createScriptCallStackFromException):
704
705 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
706
707         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
708         https://bugs.webkit.org/show_bug.cgi?id=116193
709
710         Reviewed by Simon Fraser.
711
712         * dom/ScriptedAnimationController.cpp:
713         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
714             - initialize m_throttled
715         (WebCore::ScriptedAnimationController::setThrottled):
716             - sets m_throttled, reschedule when this changes.
717         (WebCore::ScriptedAnimationController::scheduleAnimation):
718             - if throtled don't use a display link, and extend the timeout.
719         * dom/ScriptedAnimationController.h:
720         (ScriptedAnimationController):
721             - Added m_throttled
722
723 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
724
725         Process suppression should throttle scripted animations
726         https://bugs.webkit.org/show_bug.cgi?id=115812
727
728         Reviewed by Simon Fraser.
729
730         <rdar://problem/13799726>
731
732         * WebCore.exp.in:
733             - Expose Page::setThrottled
734         * dom/Document.cpp:
735         (WebCore::Document::scriptedAnimationControllerSetThrottled):
736         (WebCore):
737         * dom/Document.h:
738         (Document):
739             - Forwards to ScriptedAnimationController::setThrottled
740         * dom/ScriptedAnimationController.cpp:
741         (WebCore::ScriptedAnimationController::setThrottled):
742         (WebCore):
743         * dom/ScriptedAnimationController.h:
744             - Force use of a timer.
745         (ScriptedAnimationController):
746         * page/Page.cpp:
747         (WebCore::Page::setThrottled):
748         (WebCore):
749         * page/Page.h:
750         (Page):
751             - When under throttling force the ScriptedAnimationController to use a timer.
752
753 2013-05-15  Igor Oliveira  <igor.o@sisa.samsung.com>
754
755         Implement run-in remove child cases.
756         https://bugs.webkit.org/show_bug.cgi?id=86520
757
758         Move runin to original position when sibling element is destroyed.
759
760         Reviewed by David Hyatt.
761
762         Tests: fast/runin/runin-remove-child-simple.html
763                fast/runin/runin-sibling-inline.html
764
765         * rendering/RenderBlock.cpp:
766         (WebCore::RenderBlock::willBeDestroyed):
767         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
768             If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
769             is being destroyed, it means that the run-in is moving to original position and
770             we do not need to do nothing.
771
772 2013-05-15  Anders Carlsson  <andersca@apple.com>
773
774         Remove WebSocketHandshakeResponse class
775         https://bugs.webkit.org/show_bug.cgi?id=116190
776
777         Reviewed by Andreas Kling.
778
779         Just use ResourceResponse instead of WebSocketHandshakeResponse.
780
781         * CMakeLists.txt:
782         * GNUmakefile.list.am:
783         * Modules/websockets/WebSocketHandshake.cpp:
784         (WebCore::WebSocketHandshake::readServerHandshake):
785         (WebCore::WebSocketHandshake::serverWebSocketProtocol):
786         (WebCore::WebSocketHandshake::serverSetCookie):
787         (WebCore::WebSocketHandshake::serverSetCookie2):
788         (WebCore::WebSocketHandshake::serverUpgrade):
789         (WebCore::WebSocketHandshake::serverConnection):
790         (WebCore::WebSocketHandshake::serverWebSocketAccept):
791         (WebCore::WebSocketHandshake::serverHandshakeResponse):
792         (WebCore::WebSocketHandshake::readHTTPHeaders):
793         * Modules/websockets/WebSocketHandshake.h:
794         * Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
795         * Modules/websockets/WebSocketHandshakeResponse.h: Removed.
796         * Target.pri:
797         * WebCore.vcproj/WebCore.vcproj:
798         * WebCore.vcxproj/WebCore.vcxproj:
799         * WebCore.vcxproj/WebCore.vcxproj.filters:
800         * WebCore.xcodeproj/project.pbxproj:
801         * inspector/InspectorInstrumentation.cpp:
802         (WebCore):
803         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
804         * inspector/InspectorInstrumentation.h:
805         (InspectorInstrumentation):
806         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
807         * inspector/InspectorResourceAgent.cpp:
808         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
809         * inspector/InspectorResourceAgent.h:
810         (WebCore):
811         (InspectorResourceAgent):
812
813 2013-05-15  Eric Carlson  <eric.carlson@apple.com>
814
815         [Mac] media engine may deliver NULL in-band "cue"
816         https://bugs.webkit.org/show_bug.cgi?id=116180
817
818         Reviewed by Jer Noble.
819
820         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
821         (WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.
822
823 2013-05-15  Darin Adler  <darin@apple.com>
824
825         List platforms that still use the legacy clipboard instead of just saying "not Mac"
826         https://bugs.webkit.org/show_bug.cgi?id=116177
827
828         Reviewed by Andreas Kling.
829
830         * dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
831         legacy model.
832
833 2013-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
834
835         We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
836         https://bugs.webkit.org/show_bug.cgi?id=116119
837
838         Reviewed by Oliver Hunt.
839
840         MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
841         to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
842         cleared when we cancel the loader.
843
844         No new tests needed.
845
846         * loader/DocumentLoader.cpp:
847         (WebCore::DocumentLoader::~DocumentLoader):
848         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
849         (WebCore::DocumentLoader::cancelMainResourceLoad):
850         (WebCore::DocumentLoader::clearMainResource):
851         (WebCore):
852         * loader/DocumentLoader.h: add helper method clearMainResource()
853         (DocumentLoader):
854
855 2013-05-15  Joe Mason  <jmason@blackberry.com>
856
857         [BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
858         https://bugs.webkit.org/show_bug.cgi?id=116164
859
860         Reviewed by Rob Buis.
861
862         Internal PR: 338490
863         Internally Reviewed By: Lyon Chen
864
865         When there are multiple HTTP requests in flight with the same bad credentials (common with
866         proxy auth if the user mistyped their password), the first 407 that's received will cause
867         the credentials to be purged and the password dialog to open for new credentials. This means
868         that all 407's received after this should only purge the credentials if they have not
869         already been updated from the dialog; otherwise they will be wiping out credentials that
870         haven't failed yet.
871
872         * platform/network/blackberry/NetworkJob.cpp:
873         (WebCore::NetworkJob::sendRequestWithCredentials):
874         (WebCore::NetworkJob::purgeCredentials):
875
876 2013-05-15  Chris Fleizach  <cfleizach@apple.com>
877
878         AX: Use caching when requesting children object on iOS
879         https://bugs.webkit.org/show_bug.cgi?id=116112
880
881         Reviewed by David Kilzer.
882
883         Building up the children list in the AX hierarchy can be time consuming. On iOS, this
884         is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
885
886         We can speed everything up if we just cache the isIgnored() attribute while building up children.
887
888         * accessibility/AXObjectCache.cpp:
889         (WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
890         (WebCore):
891         (WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
892         * accessibility/AXObjectCache.h:
893         (AXAttributeCacheEnabler):
894         (WebCore):
895         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
896         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
897         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
898         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
899         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
900         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
901
902 2013-05-15  Anders Carlsson  <andersca@apple.com>
903
904         Remove WebSocketHandshakeRequest class
905         https://bugs.webkit.org/show_bug.cgi?id=116178
906
907         Reviewed by Andreas Kling.
908
909         Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason 
910         why we can't just use a ResourceRequest instead.
911
912         * CMakeLists.txt:
913         * GNUmakefile.list.am:
914         * Modules/websockets/WebSocketChannel.cpp:
915         (WebCore::WebSocketChannel::didOpenSocketStream):
916         * Modules/websockets/WebSocketHandshake.cpp:
917         (WebCore::WebSocketHandshake::clientHandshakeRequest):
918         * Modules/websockets/WebSocketHandshake.h:
919         (WebCore):
920         * Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
921         * Modules/websockets/WebSocketHandshakeRequest.h: Removed.
922         * Target.pri:
923         * WebCore.vcproj/WebCore.vcproj:
924         * WebCore.vcxproj/WebCore.vcxproj:
925         * WebCore.vcxproj/WebCore.vcxproj.filters:
926         * WebCore.xcodeproj/project.pbxproj:
927         * inspector/InspectorInstrumentation.cpp:
928         (WebCore):
929         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
930         * inspector/InspectorInstrumentation.h:
931         (InspectorInstrumentation):
932         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
933         * inspector/InspectorResourceAgent.cpp:
934         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
935         * inspector/InspectorResourceAgent.h:
936         (WebCore):
937         (InspectorResourceAgent):
938         * platform/network/HTTPRequest.cpp:
939         (WebCore):
940
941 2013-05-15  Darin Adler  <darin@apple.com>
942
943         Try to fix iOS build.
944
945         * platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
946         on iOS.
947
948 2013-05-13  Anders Carlsson  <andersca@apple.com>
949
950         Frame::editor() should return a reference
951         https://bugs.webkit.org/show_bug.cgi?id=116037
952
953         Reviewed by Darin Adler.
954
955         A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
956         Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
957
958         * accessibility/AccessibilityObject.cpp:
959         (WebCore::AccessibilityObject::hasMisspelling):
960         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
961         (AXAttributeStringSetSpelling):
962         * dom/ContainerNode.cpp:
963         (WebCore::ContainerNode::cloneChildNodes):
964         * dom/Document.cpp:
965         (WebCore::acceptsEditingFocus):
966         (WebCore::Document::setFocusedNode):
967         (WebCore::command):
968         * editing/AlternativeTextController.cpp:
969         (WebCore::AlternativeTextController::timerFired):
970         (WebCore::AlternativeTextController::applyDictationAlternative):
971         * editing/CompositeEditCommand.cpp:
972         (WebCore::EditCommandComposition::unapply):
973         (WebCore::EditCommandComposition::reapply):
974         (WebCore::CompositeEditCommand::apply):
975         (WebCore::CompositeEditCommand::moveParagraphs):
976         * editing/DeleteButton.cpp:
977         (WebCore::DeleteButton::defaultEventHandler):
978         * editing/DeleteButtonController.cpp:
979         (WebCore::DeleteButtonController::show):
980         * editing/DeleteButtonController.h:
981         (WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
982         (WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
983         * editing/DeleteSelectionCommand.cpp:
984         (WebCore::DeleteSelectionCommand::mergeParagraphs):
985         (WebCore::DeleteSelectionCommand::doApply):
986         * editing/EditCommand.cpp:
987         (WebCore::EditCommand::EditCommand):
988         * editing/EditingStyle.cpp:
989         (WebCore::StyleChange::StyleChange):
990         * editing/Editor.cpp:
991         (WebCore::Editor::markMisspellingsAfterTypingToWord):
992         * editing/EditorCommand.cpp:
993         (WebCore::applyCommandToFrame):
994         (WebCore::executeToggleStyle):
995         (WebCore::executeApplyParagraphStyle):
996         (WebCore::expandSelectionToGranularity):
997         (WebCore::stateStyle):
998         (WebCore::valueStyle):
999         (WebCore::executeCopy):
1000         (WebCore::executeCut):
1001         (WebCore::executeDefaultParagraphSeparator):
1002         (WebCore::executeDelete):
1003         (WebCore::executeDeleteBackward):
1004         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
1005         (WebCore::executeDeleteForward):
1006         (WebCore::executeDeleteToBeginningOfLine):
1007         (WebCore::executeDeleteToBeginningOfParagraph):
1008         (WebCore::executeDeleteToEndOfLine):
1009         (WebCore::executeDeleteToEndOfParagraph):
1010         (WebCore::executeDeleteToMark):
1011         (WebCore::executeDeleteWordBackward):
1012         (WebCore::executeDeleteWordForward):
1013         (WebCore::executeFindString):
1014         (WebCore::executeForwardDelete):
1015         (WebCore::executeIgnoreSpelling):
1016         (WebCore::executeInsertNewline):
1017         (WebCore::executeMakeTextWritingDirectionLeftToRight):
1018         (WebCore::executeMakeTextWritingDirectionNatural):
1019         (WebCore::executeMakeTextWritingDirectionRightToLeft):
1020         (WebCore::executeToggleOverwrite):
1021         (WebCore::executePaste):
1022         (WebCore::executePasteGlobalSelection):
1023         (WebCore::executePasteAndMatchStyle):
1024         (WebCore::executePasteAsPlainText):
1025         (WebCore::executeRedo):
1026         (WebCore::executeRemoveFormat):
1027         (WebCore::executeSelectToMark):
1028         (WebCore::executeSetMark):
1029         (WebCore::executeStyleWithCSS):
1030         (WebCore::executeUseCSS):
1031         (WebCore::executeSwapWithMark):
1032         (WebCore::executeTakeFindStringFromSelection):
1033         (WebCore::executeTranspose):
1034         (WebCore::executeUndo):
1035         (WebCore::executeYank):
1036         (WebCore::executeYankAndSelect):
1037         (WebCore::supportedCopyCut):
1038         (WebCore::supportedPaste):
1039         (WebCore::enabledVisibleSelection):
1040         (WebCore::enabledVisibleSelectionAndMark):
1041         (WebCore::enableCaretInEditableText):
1042         (WebCore::enabledCopy):
1043         (WebCore::enabledCut):
1044         (WebCore::enabledInEditableText):
1045         (WebCore::enabledDelete):
1046         (WebCore::enabledPaste):
1047         (WebCore::enabledRedo):
1048         (WebCore::enabledTakeFindStringFromSelection):
1049         (WebCore::enabledUndo):
1050         (WebCore::stateOrderedList):
1051         (WebCore::stateStyleWithCSS):
1052         (WebCore::stateUnorderedList):
1053         (WebCore::valueDefaultParagraphSeparator):
1054         * editing/FrameSelection.cpp:
1055         (WebCore::shouldAlwaysUseDirectionalSelection):
1056         (WebCore::FrameSelection::setSelection):
1057         (WebCore::FrameSelection::nextWordPositionForPlatform):
1058         (WebCore::FrameSelection::modifyMovingRight):
1059         (WebCore::FrameSelection::modifyMovingLeft):
1060         (WebCore::FrameSelection::modify):
1061         (WebCore::shouldStopBlinkingDueToTypingCommand):
1062         (WebCore::FrameSelection::shouldDeleteSelection):
1063         (WebCore::FrameSelection::shouldChangeSelection):
1064         * editing/InsertTextCommand.cpp:
1065         (WebCore::InsertTextCommand::doApply):
1066         * editing/SpellChecker.cpp:
1067         (WebCore::SpellChecker::didCheck):
1068         * editing/SpellingCorrectionCommand.cpp:
1069         * editing/TypingCommand.cpp:
1070         (WebCore::TypingCommand::insertText):
1071         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
1072         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1073         (WebCore::TypingCommand::typingAddedToOpenCommand):
1074         (WebCore::TypingCommand::deleteKeyPressed):
1075         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1076         * editing/htmlediting.cpp:
1077         (WebCore::createDefaultParagraphElement):
1078         * editing/mac/EditorMac.mm:
1079         (WebCore::Editor::pasteWithPasteboard):
1080         * editing/markup.cpp:
1081         (WebCore::createMarkup):
1082         * html/HTMLInputElement.cpp:
1083         (WebCore::HTMLInputElement::endEditing):
1084         * html/HTMLTextAreaElement.cpp:
1085         (WebCore::HTMLTextAreaElement::subtreeHasChanged):
1086         * html/TextFieldInputType.cpp:
1087         (WebCore::TextFieldInputType::handleKeydownEvent):
1088         (WebCore::TextFieldInputType::didSetValueByUserEdit):
1089         * loader/FrameLoader.cpp:
1090         (WebCore::FrameLoader::closeURL):
1091         (WebCore::FrameLoader::didOpenURL):
1092         (WebCore::FrameLoader::clear):
1093         * page/ContextMenuController.cpp:
1094         (WebCore::insertUnicodeCharacter):
1095         (WebCore::ContextMenuController::contextMenuItemSelected):
1096         (WebCore::ContextMenuController::populate):
1097         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1098         * page/DOMWindow.cpp:
1099         (WebCore::DOMWindow::find):
1100         * page/DragController.cpp:
1101         (WebCore::DragController::dispatchTextInputEventFor):
1102         (WebCore::DragController::concludeEditDrag):
1103         (WebCore::DragController::startDrag):
1104         * page/EventHandler.cpp:
1105         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
1106         (WebCore::EventHandler::handleMousePressEventSingleClick):
1107         (WebCore::EventHandler::handlePasteGlobalSelection):
1108         (WebCore::EventHandler::sendContextMenuEvent):
1109         (WebCore::EventHandler::sendContextMenuEventForKey):
1110         (WebCore::EventHandler::keyEvent):
1111         (WebCore::EventHandler::defaultKeyboardEventHandler):
1112         (WebCore::EventHandler::defaultTextInputEventHandler):
1113         (WebCore::EventHandler::defaultBackspaceEventHandler):
1114         * page/FocusController.cpp:
1115         (WebCore::relinquishesEditingFocus):
1116         * page/Frame.cpp:
1117         (WebCore::Frame::rangeForPoint):
1118         * page/Frame.h:
1119         (Frame):
1120         (WebCore::Frame::editor):
1121         * page/Page.cpp:
1122         (WebCore::Page::findString):
1123         (WebCore::Page::findStringMatchingRanges):
1124         (WebCore::Page::rangeOfString):
1125         (WebCore::Page::markAllMatchesForText):
1126         (WebCore::Page::setDeviceScaleFactor):
1127         * platform/mac/ClipboardMac.mm:
1128         (WebCore::ClipboardMac::writeRange):
1129         * platform/mac/DragDataMac.mm:
1130         (WebCore::DragData::asURL):
1131         * platform/mac/PasteboardMac.mm:
1132         (WebCore::Pasteboard::getStringSelection):
1133         (WebCore::Pasteboard::getDataSelection):
1134         (WebCore::Pasteboard::writeSelectionForTypes):
1135         (WebCore::writeURLForTypes):
1136         (WebCore::Pasteboard::plainText):
1137         (WebCore::documentFragmentWithRTF):
1138         (WebCore::Pasteboard::documentFragment):
1139         * rendering/HitTestResult.cpp:
1140         (WebCore::HitTestResult::dictationAlternatives):
1141         * rendering/InlineTextBox.cpp:
1142         (WebCore::InlineTextBox::paint):
1143         (WebCore::InlineTextBox::paintTextMatchMarker):
1144         * rendering/RenderBlock.cpp:
1145         (WebCore::RenderBlock::positionForPointWithInlineChildren):
1146         * testing/Internals.cpp:
1147         (WebCore::spellchecker):
1148         (WebCore::Internals::resetToConsistentState):
1149         (WebCore::Internals::hasSpellingMarker):
1150         (WebCore::Internals::hasAutocorrectedMarker):
1151         (WebCore::Internals::setContinuousSpellCheckingEnabled):
1152         (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
1153         (WebCore::Internals::setAutomaticLinkDetectionEnabled):
1154         (WebCore::Internals::setAutomaticDashSubstitutionEnabled):
1155         (WebCore::Internals::setAutomaticTextReplacementEnabled):
1156         (WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
1157         (WebCore::Internals::isOverwriteModeEnabled):
1158         (WebCore::Internals::toggleOverwriteModeEnabled):
1159         (WebCore::Internals::hasGrammarMarker):
1160
1161 2013-05-15  Darin Adler  <darin@apple.com>
1162
1163         [Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
1164         https://bugs.webkit.org/show_bug.cgi?id=116166
1165
1166         Reviewed by Anders Carlsson.
1167
1168         * WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
1169         non-iOS section, since iOS is still using the legacy version of Clipboard.
1170
1171         * dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
1172
1173 2013-05-15  Dongseong Hwang  <dongseong.hwang@intel.com>
1174
1175         Remove an overloaded strokeRect in <canvas>
1176         https://bugs.webkit.org/show_bug.cgi?id=116017
1177
1178         Reviewed by Benjamin Poulain.
1179
1180         The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
1181         remains only strokeRect with 4 arguments.
1182
1183         [1] http://www.w3.org/TR/2dcontext2/
1184
1185         Covered by existing tests: canvas/philip/tests/2d.missingargs.html
1186
1187         * html/canvas/CanvasRenderingContext2D.cpp:
1188         (WebCore::CanvasRenderingContext2D::strokeRect):
1189         * html/canvas/CanvasRenderingContext2D.h:
1190         (CanvasRenderingContext2D):
1191         * html/canvas/CanvasRenderingContext2D.idl:
1192
1193 2013-05-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1194
1195         [css3-text] text-decoration-line now accepts "blink" as valid value
1196         https://bugs.webkit.org/show_bug.cgi?id=116104
1197
1198         Reviewed by Andreas Kling.
1199
1200         As of November 13th 2012, the W3C specification has been updated to
1201         accept "blink" as a valid property value in text-decoration-line. Though
1202         accepting the value as valid, it is ignored as CSS Level 1
1203         text-decoration property currently does.
1204
1205         Updated related layout tests to reflect changes in specification.
1206
1207         * css/CSSParser.cpp:
1208         (WebCore::CSSParser::parseValue):
1209         (WebCore::CSSParser::parseTextDecoration):
1210
1211 2013-05-14  Simon Fraser  <simon.fraser@apple.com>
1212
1213         Revert http://trac.webkit.org/changeset/150047
1214         
1215         It introduced unwanted behavioral differences between
1216         Retina and non-Retina Mac hardware.
1217
1218         * platform/graphics/ca/GraphicsLayerCA.cpp:
1219         (WebCore::GraphicsLayerCA::requiresTiledLayer):
1220         (WebCore::GraphicsLayerCA::computePixelAlignment):
1221
1222 2013-05-15  Darin Adler  <darin@apple.com>
1223
1224         [Mac] Remove the ClipboardMac class and header file
1225         https://bugs.webkit.org/show_bug.cgi?id=116165
1226
1227         Reviewed by Anders Carlsson.
1228
1229         * WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
1230         * editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
1231         * page/mac/EventHandlerMac.mm: Ditto.
1232         * platform/mac/ClipboardMac.h: Removed.
1233
1234         * platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
1235         Deleted ClipboardMac constructor.
1236
1237 2013-05-15  Darin Adler  <darin@apple.com>
1238
1239         [Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
1240         https://bugs.webkit.org/show_bug.cgi?id=116163
1241
1242         Reviewed by Anders Carlsson.
1243
1244         * dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
1245
1246         * platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
1247         and it's not helpful to have the conditionals in here. It's helpful in cross-platform
1248         source files.
1249         (WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
1250         Later could refactor to have the Pasteboard creation be platform-specific, and make these
1251         functions platform-independent.
1252         (WebCore::Clipboard::createForDragAndDrop): Ditto.
1253         (WebCore::Clipboard::createForCopyAndPaste): Ditto.
1254
1255 2013-05-15  Darin Adler  <darin@apple.com>
1256
1257         [Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
1258         https://bugs.webkit.org/show_bug.cgi?id=116162
1259
1260         Reviewed by Andreas Kling.
1261
1262         * dom/Clipboard.h: Add createForCopyAndPaste function.
1263
1264         * editing/mac/EditorMac.mm:
1265         (WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
1266
1267         * platform/mac/ClipboardMac.mm:
1268         (WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
1269         Editor::newGeneralClipboard.
1270
1271 2013-05-15  Darin Adler  <darin@apple.com>
1272
1273         [Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
1274         https://bugs.webkit.org/show_bug.cgi?id=116161
1275
1276         Reviewed by Andreas Kling.
1277
1278         * dom/Clipboard.h: Added createForDragAndDrop function.
1279
1280         * page/mac/EventHandlerMac.mm:
1281         (WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
1282         instead of ClipboardMac::create.
1283
1284         * platform/mac/ClipboardMac.mm:
1285         (WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
1286         EventHandler::createDraggingClipboard function did, soon to be refactored better.
1287
1288 2013-05-15  Darin Adler  <darin@apple.com>
1289
1290         [Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
1291         https://bugs.webkit.org/show_bug.cgi?id=116159
1292
1293         Reviewed by Andreas Kling.
1294
1295         * dom/Clipboard.h:
1296         (WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
1297         object and need to get to the Pasteboard platform abstraction.
1298
1299         * editing/Editor.cpp:
1300         (WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
1301         Our long term plan is to delete writeClipboard.
1302
1303         * platform/Pasteboard.h: Added writePasteboard function.
1304         (WebCore::Pasteboard::name): Made this const.
1305
1306         * platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
1307         Deleted all the data members and the virtual destructor.
1308
1309         * platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
1310         Deleted the destructor, since it's now automatically generated. Deleted the comment
1311         on an #endif since it's only a few source lines away from the #if.
1312         (WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
1313         since they are no longer used.
1314
1315         * platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
1316         (WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
1317
1318 2013-05-15  Seokju Kwon  <seokju.kwon@gmail.com>
1319
1320         Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
1321         https://bugs.webkit.org/show_bug.cgi?id=116144
1322
1323         Reviewed by Timothy Hatcher.
1324
1325         No new tests, no behavior change.
1326
1327         * inspector/Inspector.json:
1328
1329 2013-05-15  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1330
1331         [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
1332         https://bugs.webkit.org/show_bug.cgi?id=116035
1333
1334         Reviewed by Allan Sandfeld Jensen.
1335
1336         The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
1337         which expects its QNetworkAccessManager to still be alive.
1338
1339         Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
1340         instead. The QNetworkReply doesn't need to be aborted in this case anyway.
1341
1342         * platform/network/qt/QNetworkReplyHandler.cpp:
1343         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
1344         (WebCore::QNetworkReplyWrapper::release):
1345         (WebCore::QNetworkReplyWrapper::stopForwarding):
1346           Rename resetConnections to stopForwarding since not all connections are related
1347           to data forwarding to the client anymore.
1348         (WebCore::QNetworkReplyWrapper::receiveMetaData):
1349         (WebCore::QNetworkReplyWrapper::replyDestroyed):
1350         (WebCore::QNetworkReplyWrapper::didReceiveFinished):
1351         * platform/network/qt/QNetworkReplyHandler.h:
1352         (QNetworkReplyWrapper):
1353
1354 2013-05-15  Darin Adler  <darin@apple.com>
1355
1356         [Mac] Make Clipboard::declareAndWriteDragImage non-virtual
1357         https://bugs.webkit.org/show_bug.cgi?id=116156
1358
1359         Reviewed by Anders Carlsson.
1360
1361         * dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
1362
1363         * platform/Pasteboard.h:
1364         (WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
1365         pasteboard operations directly instead of through the Pasteboard class
1366         functions. Not sure if we'll need it long term or not.
1367
1368         * platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
1369
1370         * platform/mac/ClipboardMac.mm:
1371         (WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
1372         member instead of ClipboardMac.
1373
1374 2013-05-15  Peter Gal  <galpeter@inf.u-szeged.hu>
1375
1376         [curl] Remove version #if guards
1377         https://bugs.webkit.org/show_bug.cgi?id=116152
1378
1379         Reviewed by Brent Fulgham.
1380
1381         No tests required.
1382
1383         * platform/network/curl/ResourceHandleCurl.cpp:
1384         (WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
1385         * platform/network/curl/ResourceHandleManager.cpp:
1386         (WebCore::writeCallback): Ditto.
1387         (WebCore::headerCallback): Ditto.
1388         (WebCore::readCallback): Ditto.
1389         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
1390         (WebCore::ResourceHandleManager::initializeHandle): Ditto.
1391
1392 2013-05-15  David Kilzer  <ddkilzer@apple.com>
1393
1394         BUILD FIX (r150089): Make WebCoreTestShim build for iOS
1395
1396         * Configurations/WebCoreTestShim.xcconfig: Exclude
1397         WebCoreTestShimLibrary.cpp when building for iOS.
1398
1399 2013-05-15  Radu Stavila  <stavila@adobe.com>
1400
1401         [CSSRegions] Implement offsetParent for elements inside named flow
1402         https://bugs.webkit.org/show_bug.cgi?id=113276
1403
1404         In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
1405         http://dev.w3.org/csswg/css-regions/#cssomview-offset-attributes
1406
1407         As a result of this change, the DumpRenderTree tool would crash in 
1408         WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
1409         test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the 
1410         RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.
1411
1412         Reviewed by Darin Adler.
1413
1414         Tests: fast/regions/offsetParent-body-in-flow-thread.html
1415                fast/regions/offsetParent-in-flow-thread.html
1416
1417         * rendering/RenderBoxModelObject.cpp:
1418         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1419         * rendering/RenderObject.cpp:
1420         (WebCore::RenderObject::offsetParent):
1421
1422 2013-05-15  Darin Adler  <darin@apple.com>
1423
1424         [Mac] Make Clipboard::createDragImage non-virtual
1425         https://bugs.webkit.org/show_bug.cgi?id=116136
1426
1427         Reviewed by Benjamin Poulain.
1428
1429         * dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.
1430
1431         * platform/mac/ClipboardMac.h: Removed frame argument from create function
1432         and constructor. Removed createDragImage and dragNSImage. Removed m_frame
1433         data member.
1434
1435         * platform/mac/ClipboardMac.mm:
1436         (WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
1437         to initialize m_frame.
1438         (WebCore::Clipboard::createDragImage): Merged the createDragImage and
1439         dragNSImage functions, since they were the same thing. Changed code to get
1440         the frame from the drag image element. Made the createDragImage function
1441         a Clipboard member instead of ClipboardMac.
1442
1443 2013-05-15  Patrick Gansterer  <paroga@webkit.org>
1444
1445         [WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
1446         https://bugs.webkit.org/show_bug.cgi?id=116137
1447
1448         Reviewed by Andreas Kling.
1449
1450         Use zero for the glyp when the fontData pointer is null.
1451         This aligns GlyphPageTreeNodeWinCE with the other implementations
1452         and makes all ASSERT() pass in setGlyphDataForIndex().
1453
1454         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
1455         (WebCore::GlyphPage::fill):
1456
1457 2013-05-15  Benjamin Poulain  <bpoulain@apple.com>
1458
1459         Do not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
1460         https://bugs.webkit.org/show_bug.cgi?id=116066
1461
1462         Reviewed by Ryosuke Niwa.
1463
1464         Merge https://chromium.googlesource.com/chromium/blink/+/45e0337b2f2db535ab08365f6e763a5015e4d990.
1465
1466         On x86_64, this removes 40kb from the binary. On my machine it is completely neutral on performance.
1467
1468         * html/parser/InputStreamPreprocessor.h:
1469         (WebCore::InputStreamPreprocessor::peek):
1470         (InputStreamPreprocessor):
1471         (WebCore::InputStreamPreprocessor::advance):
1472         (WebCore::InputStreamPreprocessor::skipNextNewLine):
1473         (WebCore::InputStreamPreprocessor::reset):
1474         (WebCore::InputStreamPreprocessor::processNextInputCharacter):
1475
1476 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1477
1478         Remove WTF_USE_PLATFORM_STRATEGIES
1479         https://bugs.webkit.org/show_bug.cgi?id=114431
1480
1481         Reviewed by Darin Adler.
1482
1483         * Modules/webdatabase/DatabaseManager.cpp:
1484         (WebCore::DatabaseManager::DatabaseManager):
1485         * dom/ContainerNode.cpp:
1486         (WebCore::ContainerNode::suspendPostAttachCallbacks):
1487         (WebCore::ContainerNode::resumePostAttachCallbacks):
1488         * dom/VisitedLinkState.cpp:
1489         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
1490         * loader/CookieJar.cpp:
1491         (WebCore::cookies):
1492         (WebCore::setCookies):
1493         (WebCore::cookiesEnabled):
1494         (WebCore::cookieRequestHeaderFieldValue):
1495         (WebCore::getRawCookies):
1496         (WebCore::deleteCookie):
1497         * loader/FrameLoader.cpp:
1498         (WebCore::FrameLoader::loadResourceSynchronously):
1499         * loader/HistoryController.cpp:
1500         (WebCore::addVisitedLink):
1501         * loader/LoaderStrategy.cpp:
1502         * loader/LoaderStrategy.h:
1503         * loader/ResourceLoadScheduler.cpp:
1504         (WebCore::resourceLoadScheduler):
1505         * loader/ResourceLoader.cpp:
1506         (WebCore::ResourceLoader::releaseResources):
1507         (WebCore::ResourceLoader::willSendRequest):
1508         * loader/cache/CachedResource.cpp:
1509         (WebCore::CachedResource::load):
1510         * loader/cache/CachedResourceLoader.cpp:
1511         (WebCore::CachedResourceLoader::performPostLoadActions):
1512         * platform/CookiesStrategy.h:
1513         * platform/DatabaseStrategy.cpp:
1514         * platform/DatabaseStrategy.h:
1515         * platform/PasteboardStrategy.h:
1516         * platform/PlatformStrategies.cpp:
1517         * platform/PlatformStrategies.h:
1518         * platform/VisitedLinkStrategy.h:
1519         * platform/mac/PasteboardMac.mm:
1520         * platform/network/BlobRegistry.cpp:
1521         (WebCore::blobRegistry):
1522         * plugins/PluginData.cpp:
1523         (WebCore::PluginData::initPlugins):
1524         * plugins/PluginStrategy.h:
1525         * storage/StorageNamespace.cpp:
1526         (WebCore::StorageNamespace::localStorageNamespace):
1527         (WebCore::StorageNamespace::transientLocalStorageNamespace):
1528         (WebCore::StorageNamespace::sessionStorageNamespace):
1529         * storage/StorageStrategy.cpp:
1530         * storage/StorageStrategy.h:
1531         * workers/SharedWorkerStrategy.h:
1532
1533 2013-05-15  Dávid Szabolcs  <David.Szabolcs@stud.u-szeged.hu>
1534
1535         [curl] Add support for HttpOnly cookies
1536         https://bugs.webkit.org/show_bug.cgi?id=116102
1537
1538         Reviewed by Brent Fulgham.
1539
1540         * platform/network/curl/CookieJarCurl.cpp:
1541         (WebCore::addMatchingCurlCookie):
1542         (WebCore::cookiesForSession):
1543         (WebCore::cookiesForDOM):
1544         (WebCore):
1545         (WebCore::cookieRequestHeaderFieldValue):
1546
1547 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1548
1549         REGRESSION(r147548): Broken comboboxes
1550         https://bugs.webkit.org/show_bug.cgi?id=115475
1551
1552         Reviewed by Gustavo Noronha Silva.
1553
1554         The problem is that r147548 made the popup to be closed when a
1555         blur event is received. Right before showing the popup the input
1556         element is focused, so that after the the popup is shown the focus
1557         event is emitted and the event handler is called again hiding the
1558         popup.
1559
1560         * html/HTMLSelectElement.cpp:
1561         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Check
1562         element has lost the focus before closing the popup menu.
1563
1564 2013-05-14  Darin Adler  <darin@apple.com>
1565
1566         [Mac] Move setDragImage from ClipboardMac to PasteboardMac
1567         https://bugs.webkit.org/show_bug.cgi?id=116036
1568
1569         Reviewed by Anders Carlsson.
1570
1571         * dom/Clipboard.cpp:
1572         (WebCore::Clipboard::~Clipboard): Stop loading the drag image when
1573         the clipboard object is deallocated. It would be better if there was
1574         a more-well-defined time to stop the load.
1575         (WebCore::Clipboard::setDragImage): Added. Sets up a drag image
1576         based on a CachedImage. This tells the image loader to load the image
1577         and updates the drag image when the image arrives. Copied from the
1578         code in ClipboardMac, but refactored to use a separate loader object.
1579         (WebCore::Clipboard::setDragImageElement): Added. Sets up a drag image
1580         based on an element.
1581         (WebCore::Clipboard::updateDragImage): Added. Common code to update
1582         drag image when a new one is set or when a drag image load completes.
1583         (WebCore::DragImageLoader::create): Added.
1584         (WebCore::DragImageLoader::DragImageLoader): Ditto.
1585         (WebCore::DragImageLoader::startLoading): Ditto.
1586         (WebCore::DragImageLoader::stopLoading): Ditto.
1587         (WebCore::DragImageLoader::imageChanged): Ditto.
1588
1589         * dom/Clipboard.h: Made setDragImage and setDragImageElement non-virtual
1590         for non-legacy. Added updateDragImage and m_dragImageLoader.
1591
1592         * platform/Pasteboard.h: Added setDragImage function.
1593
1594         * platform/mac/ClipboardMac.h: Removed CachedImageClient as a base class
1595         for ClipboardMac. Removed setDragImage and setDragImageElement.
1596
1597         * platform/mac/ClipboardMac.mm: Removed setDragImage and setDragImageElement.
1598         (WebCore::ClipboardMac::~ClipboardMac): Removed code to remove self as
1599         client loading the drag image. This is now in the Clipboard base class.
1600
1601         * platform/mac/PasteboardMac.mm:
1602         (WebCore::Pasteboard::setDragImage): Added. Contains code moved here
1603         from ClipboardMac.
1604
1605 2013-05-14  Ryosuke Niwa  <rniwa@webkit.org>
1606
1607         Use ElementTraversal in SelectorDataList::execute
1608         https://bugs.webkit.org/show_bug.cgi?id=116131
1609
1610         Reviewed by Darin Adler.
1611
1612         Use ElementTraversal::firstWithin and ElementTraversal::next to simplify the code.
1613
1614         * dom/SelectorQuery.cpp:
1615         (WebCore::SelectorDataList::execute):
1616
1617 2013-05-14  Tim Horton  <timothy_horton@apple.com>
1618
1619         [wk2] Not updating tiled backing coverage when main frame scrollability changes
1620         https://bugs.webkit.org/show_bug.cgi?id=116123
1621         <rdar://problem/13836559>
1622
1623         Reviewed by Simon Fraser.
1624
1625         Export FrameView::adjustTiledBackingCoverage.
1626
1627         * WebCore.exp.in:
1628
1629 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
1630
1631         [Mac] Add a testing shim for secure event input functions
1632         https://bugs.webkit.org/show_bug.cgi?id=116122
1633
1634         Reviewed by Mark Rowe.
1635
1636         Added a new target with a dynamic library that interposes secure event input functions.
1637         We need this to avoid interfering with user session state.
1638
1639         * Configurations/WebCoreTestShim.xcconfig: Added.
1640         * WebCore.xcodeproj/project.pbxproj:
1641         * platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
1642         * testing/WebCoreTestShimLibrary.cpp: Added.
1643         (shimEnableSecureEventInput):
1644         (shimDisableSecureEventInput):
1645         (shimIsSecureEventInputEnabled):
1646
1647 2013-05-14  Benjamin Poulain  <bpoulain@apple.com>
1648
1649         Get rid of Gradient::getColor()
1650         https://bugs.webkit.org/show_bug.cgi?id=116089
1651
1652         Reviewed by Andreas Kling.
1653
1654         This code is now useless, remove it.
1655
1656         * html/canvas/CanvasGradient.h:
1657         (CanvasGradient):
1658         * platform/graphics/Gradient.cpp:
1659         (WebCore::Gradient::Gradient):
1660         (WebCore::Gradient::hash):
1661         * platform/graphics/Gradient.h:
1662         (Gradient):
1663
1664 2013-05-14  David Hyatt  <hyatt@apple.com>
1665
1666         REGRESSION: united.com has overlapping elements and is broken by flex box changes.
1667         https://bugs.webkit.org/show_bug.cgi?id=115329
1668         <rdar://problem/13690610>
1669         
1670         The new flexbox spec says that flex-basis omitted in the flex shorthand defaults to
1671         0 when flex-grow/shrink are set. This has undesirable behavior when objects don't
1672         end up flexing at all, and it's something the spec is going to eventually address.
1673         
1674         For now, though, to fix the regression, I'm making a targeted "hack" to deliberately
1675         violate the spec, but to do so as minimally as possible. This hack detects if there
1676         is infinite available space on a line, and if so, it treats a flex-basis of 0 like
1677         auto.
1678         
1679         This means that when height is constrained and set by a container, flexing will do
1680         the right thing. Basically any time you end up actually flexing, the spec behavior
1681         should happen. If you're just laying out at intrinsic sizes, though, and no flexing
1682         is going to occur, we ignore a flex-basis of 0 and just use the child's normal size.
1683         
1684         Note that widths don't have to be patched because the preferred logical widths
1685         algorithm is broken right now and not checking flex-basis. If it did, we'd have seen
1686         the same bug in the width direction.
1687         
1688         This width issue is covered by https://bugs.webkit.org/show_bug.cgi?id=116117
1689         
1690         Reviewed by Simon Fraser.
1691
1692         Added fast/flexbox/auto-height-with-flex.html
1693
1694         * rendering/RenderFlexibleBox.cpp:
1695         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
1696         Make sure we return LayoutUnit::max when you have infinite free space and not
1697         max - borderPadding.
1698
1699         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
1700         Only clear override size if it was set. Only mark for relayout if we did
1701         an override size clear (i.e., if we were actually flexed). Add a new parameter,
1702         hasInfiniteLineLength, that - if set - causes us to special case flex-basis:0
1703         and treat it like flex-basis:auto.
1704
1705         (WebCore::RenderFlexibleBox::layoutFlexItems):
1706         Define hasInfiniteLineLength and pass it to all the functions that need it.
1707
1708         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1709         Remove the code that marks for layout and does a layout so early. This code
1710         is moving (and changing) to preferredMainAxisContentExtentForChild.
1711
1712         (WebCore::RenderFlexibleBox::computeNextFlexLine):
1713         Computes whether or not we have infinite line length now.
1714
1715         (WebCore::RenderFlexibleBox::freezeViolations):
1716         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1717         Propagate hasInfiniteLineLength through to preferredMainAxisContentExtentForChild.
1718
1719         * rendering/RenderFlexibleBox.h:
1720         (RenderFlexibleBox):
1721         Add hasInfiniteLineLength parameter to a bunch of functions.
1722
1723 2013-05-14  Andreas Kling  <akling@apple.com>
1724
1725         Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs)
1726         <http://webkit.org/b/116113>
1727         <rdar://problem/13833790>
1728
1729         Reviewed by Dan Bernstein.
1730
1731         If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference,
1732         we need to make sure we have per-glyph font data pointers, since it may end up using them.
1733
1734         Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let
1735         GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers
1736         in case the font is a composite font reference, or if there are CJK ideographs in the text.
1737
1738         This code can be made smarter, but that's outside the scope of this change.
1739         Fixes heavy asserting on bots running unreleased software.
1740
1741         * platform/graphics/GlyphPage.h:
1742         (GlyphPage):
1743         (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
1744         * platform/graphics/GlyphPageTreeNode.cpp:
1745         (WebCore::GlyphPageTreeNode::initializePage):
1746         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1747         (WebCore::shouldUseCoreText):
1748         (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
1749
1750 2013-05-14  Bem Jones-Bey  <bjonesbe@adobe.com>
1751
1752         Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
1753         https://bugs.webkit.org/show_bug.cgi?id=115566
1754
1755         Reviewed by David Hyatt.
1756
1757         When a portion of the render tree is being detached, anonymous blocks
1758         will be combined as their children are deleted. In this process, the
1759         anonymous block later in the tree is merged into the one preceeding it.
1760         It can happen that the later block contains floats that the previous
1761         block did not contain, and thus are not in the floating objects list for
1762         the new block. This can result in the new block containing floats that
1763         are not in it's floating objects list, but are in the floating objects
1764         lists of siblings and parents. This can cause problems when the float
1765         itself is deleted, since the deletion code assumes that if a float is not
1766         in it's containing block's floating objects list, it isn't in any
1767         floating objects list, causing dangling pointers in the floating objects
1768         lists of the siblings and parents. In order to preserve this condition
1769         (removing it has serious performance implications), we need to copy the
1770         floating objects from the old block to the new block.  The float's
1771         metrics will likely all be wrong, but since the new block is already
1772         marked for layout, this will get fixed before anything gets displayed.
1773
1774         Test: fast/block/float/float-append-child-crash.html
1775
1776         * rendering/RenderBlock.cpp:
1777         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Copy
1778             floating objects list in addition to children.
1779         (WebCore::RenderBlock::FloatingObject::clone): Added.
1780         (WebCore::RenderBlock::removeChild): Use new method to copy children.
1781         * rendering/RenderBlock.h:
1782         (RenderBlock): Add method.
1783
1784 2013-05-14  Commit Queue  <commit-queue@webkit.org>
1785
1786         Unreviewed, rolling out r150023.
1787         http://trac.webkit.org/changeset/150023
1788         https://bugs.webkit.org/show_bug.cgi?id=116120
1789
1790         Causes table layout issues (Bug 116118) and crashes on
1791         buildbot waterfall pages. (Requested by ddkilzer on #webkit).
1792
1793         * rendering/RenderTableSection.cpp:
1794         (WebCore::RenderTableSection::calcRowLogicalHeight):
1795         * rendering/RenderTableSection.h:
1796         (RenderTableSection):
1797
1798 2013-05-14  Antoine Quint  <graouts@apple.com>
1799
1800         Snapshotted plug-ins shadow tree should reset style inheritance
1801         https://bugs.webkit.org/show_bug.cgi?id=116098
1802
1803         Reset the styles such that only injected user-agent stylesheets affect
1804         the rendering of snapshotted plug-ins' shadow content.
1805
1806         Reviewed by Darin Adler.
1807
1808         * html/HTMLPlugInImageElement.cpp:
1809         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
1810
1811 2013-05-14  Mihnea Ovidenie  <mihnea@adobe.com>
1812
1813         [CSSRegions] Improve hit testing for empty regions
1814         https://bugs.webkit.org/show_bug.cgi?id=115534
1815
1816         Reviewed by David Hyatt.
1817
1818         As a better follow up after WebKit bug https://bugs.webkit.org/show_bug.cgi?id=107752,
1819         we can improve the code by not doing hit testing on the render flow thread object when
1820         we are trying to hit test the render flow thread background. In this case, we should just bail out.
1821         No new tests, covered by existing regions tests.
1822
1823         * rendering/RenderFlowThread.cpp:
1824         (WebCore::RenderFlowThread::nodeAtPoint):
1825         (WebCore):
1826         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
1827         * rendering/RenderFlowThread.h:
1828
1829 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1830
1831         [BlackBerry] Handle network errors when starting a new job
1832         https://bugs.webkit.org/show_bug.cgi?id=116101
1833
1834         Reviewed by Rob Buis.
1835
1836         Make startJob() return a network status that can be used by the
1837         caller to create a network error.
1838
1839         * platform/network/blackberry/NetworkJob.cpp:
1840         (WebCore::NetworkJob::initialize): createNetworkStream() should
1841         always return a valid pointer so use an ASSERT instead of an early
1842         return to make sure we have a valid stream.
1843         (WebCore::NetworkJob::startNewJobWithRequest): Only return true if
1844         the network job was started successfully.
1845         * platform/network/blackberry/NetworkJob.h:
1846         (NetworkJob): Make initialize method void instead of bool since it
1847         can't fail.
1848         * platform/network/blackberry/NetworkManager.cpp:
1849         (WebCore::NetworkManager::startJob): Return a network error or
1850         StatusSuccess.
1851         * platform/network/blackberry/NetworkManager.h:
1852         (NetworkManager):
1853         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
1854         (WebCore::ResourceHandle::start): Return true if job was started
1855         successfully.
1856         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1857         Check return value of startJob and fill the ResourceError with the
1858         network status returned to finish the load.
1859
1860 2013-05-14  Antoine Quint  <graouts@apple.com>
1861
1862         [Mac] captions menu is not positioned correctly in full-screen
1863         https://bugs.webkit.org/show_bug.cgi?id=116103
1864
1865         Update the positioning properties of the captions menu in full-screen
1866         following the fix for https://webkit.org/b/115968.
1867
1868         Reviewed by Darin Adler.
1869
1870         * css/fullscreenQuickTime.css:
1871         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
1872         Add 50px to the bottom position since we're now positioned relative to the
1873         media element, and use a calc() command to be right-aligned to the captions
1874         icon in the media controller. The max-width and max-height properties follow
1875         the same technique used for the non-full-screen mode.
1876
1877 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
1878
1879         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
1880         https://bugs.webkit.org/show_bug.cgi?id=115921
1881
1882         Reviewed by Gustavo Noronha Silva.
1883
1884         No new tests - no new functionality.
1885
1886         * GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libWebCoreSVG, libWebCore,
1887         libWebCorePlatform, libWebCoreGtk. Remove generation rules for ColorData.cpp and WebKitFontFamilyNames.(cpp|h).
1888         * GNUmakefile.list.am: Include the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) build targers under
1889         platform_built_sources.
1890         * bindings/gobject/GNUmakefile.am: Add platform_cppflags to the list of libWebCoreDOM CPPFLAGS.
1891
1892 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
1893
1894         [GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
1895         https://bugs.webkit.org/show_bug.cgi?id=115937
1896
1897         Reviewed by Martin Robinson.
1898
1899         No new tests - no new functionality.
1900
1901         * GNUmakefile.am: Fix typos in two libraries' names - Webcore -> WebCore.
1902
1903 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
1904
1905         Removing Attr can delete a wrong Attribute in ElementData
1906         https://bugs.webkit.org/show_bug.cgi?id=116077
1907
1908         Reviewed by Benjamin Poulain.
1909         
1910         Merge https://chromium.googlesource.com/chromium/blink/+/e861452a292e185501e48940305947aa6a4e23c2
1911         after simplifying and renaming functions to be more WebKit style.
1912
1913         The XML parser can produce elements with attributes whose names have
1914         distinct prefixes, but the same expanded name. When one of these
1915         attributes is put up for adoption, it may be its similarly named
1916         sibling that is removed from its owner element. As a result the
1917         original owner hangs onto the adopted attribute, despite the fact that
1918         it is now in a different document. Sometimes it's just hard to let go.
1919
1920         Test: fast/dom/adopt-attribute-crash.svg
1921
1922         * dom/Element.cpp:
1923         (WebCore::Element::setAttributeNode):
1924         (WebCore::Element::removeAttributeNode):
1925         (WebCore::ElementData::getAttributeItemIndex):
1926         * dom/Element.h:
1927         (ElementData):
1928         (Element):
1929
1930 2013-05-14  Antti Koivisto  <antti@apple.com>
1931
1932         Remove ::-webkit-distributed()
1933         https://bugs.webkit.org/show_bug.cgi?id=116106
1934
1935         Reviewed by Andreas Kling.
1936
1937         This experimental Shadow DOM selector code is unused and has no owner.
1938
1939         * css/CSSGrammar.y.in:
1940         * css/CSSParser.cpp:
1941         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
1942         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1943         * css/CSSParser.h:
1944         * css/CSSParserValues.cpp:
1945         (WebCore::CSSParserSelector::CSSParserSelector):
1946         * css/CSSParserValues.h:
1947         (CSSParserSelector):
1948         * css/CSSSelector.cpp:
1949         (WebCore::CSSSelector::pseudoId):
1950         (WebCore::nameToPseudoTypeMap):
1951         (WebCore::CSSSelector::selectorText):
1952         * css/CSSSelector.h:
1953         * css/CSSSelectorList.cpp:
1954         * css/CSSSelectorList.h:
1955         (CSSSelectorList):
1956         * css/DocumentRuleSets.cpp:
1957         (WebCore::DocumentRuleSets::resetAuthorStyle):
1958         * css/DocumentRuleSets.h:
1959         (DocumentRuleSets):
1960         * css/ElementRuleCollector.cpp:
1961         (WebCore::ElementRuleCollector::matchAuthorRules):
1962         * css/ElementRuleCollector.h:
1963         (ElementRuleCollector):
1964         * css/RuleSet.cpp:
1965         (WebCore::RuleSet::addChildRules):
1966         * css/SelectorChecker.cpp:
1967         (WebCore::SelectorChecker::match):
1968         * css/SelectorFilter.cpp:
1969         (WebCore::SelectorFilter::collectIdentifierHashes):
1970         * html/shadow/InsertionPoint.cpp:
1971         * html/shadow/InsertionPoint.h:
1972
1973 2013-05-14  Daker Fernandes Pinheiro  <daker.pinheiro@openbossa.org>
1974
1975         Remove RenderTheme::supportsCalendarPicker
1976         https://bugs.webkit.org/show_bug.cgi?id=116068
1977
1978         Reviewed by Benjamin Poulain.
1979
1980         No new tests needed because it doesn't affect behaviour.
1981
1982         This method was never overrided by any platform
1983         and always leaded to the same behaviour.
1984         The code which depended on it was also removed.
1985
1986         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1987         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
1988         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
1989         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1990         (BaseMultipleFieldsDateAndTimeInputType):
1991         * page/ChromeClient.h:
1992         (ChromeClient):
1993         * rendering/RenderTheme.h:
1994
1995 2013-04-30  Balazs Kelemen  <b.kelemen@sisa.samsung.com>
1996
1997         [GStreamer] cannot seek after video finished
1998         https://bugs.webkit.org/show_bug.cgi?id=114044
1999
2000         Reviewed by Philippe Normand.
2001
2002         Test: media/video-seek-after-end.html
2003
2004         Reland without wrong assertion. If seek is called after didEnd the pipeline
2005         state will not be in GST_STATE_NULL yet but it is not a problem because we handle that.
2006
2007         Rework the seeking logic to be able to seek after reseting the pipeline.
2008         In addition to solve the actual problem this patch supposed to make seeking
2009         more robust and correct.
2010         The previous implementation tried to hide the complexity of asynchronous operations
2011         on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
2012         but instead reported the seek as finished when it saw an asynchronous pending state
2013         (GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
2014         Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
2015         Seeks are not the only operations executed asynchronously, changing the pipeling state is
2016         similar. It means a seek can overlap with onother ongoing asynchronous operation.
2017         This change address this by introducing an invariant for seeks, which is that we only request
2018         a seek if there are no other ongoing asynchronous operations and the pipeline state is either
2019         paused or playing (which is recommended anyway according to GStreamer's documentation).
2020         This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
2021         seek has been completed.
2022
2023         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2024         (WebCore::toGstClockTime): Factored time conversation into a helper.
2025         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2026
2027         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
2028         if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
2029         use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
2030         operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
2031         this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
2032
2033         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
2034         This function called when there is an intent to restart playback but it does not actually restart it.
2035         (WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
2036         (WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
2037         If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
2038         Now we handle overlapping seeks as well because I saw that it can happen in some tests.
2039         Added an early return for live streams as it doesn't makes sense to try seeking in them.
2040
2041         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
2042         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
2043         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
2044         now handled in asyncStateChangeDone.
2045         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
2046         has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
2047         after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
2048         in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
2049         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2050         (MediaPlayerPrivateGStreamer):
2051
2052 2013-05-14  Zalan Bujtas  <zalan@apple.com>
2053
2054         Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
2055         https://bugs.webkit.org/show_bug.cgi?id=115858
2056
2057         Reviewed by Darin Adler.
2058
2059         Take text direction into account to calculate ellipsis position in case of
2060         full truncation.
2061
2062         Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html
2063
2064         * rendering/InlineTextBox.cpp:
2065         (WebCore::InlineTextBox::placeEllipsisBox):
2066
2067 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2068
2069         [BlackBerry] Implement platform strategies
2070         https://bugs.webkit.org/show_bug.cgi?id=112162
2071
2072         Reviewed by Rob Buis.
2073
2074         This is just a refactoring, covered by existing tests.
2075
2076         * CMakeLists.txt: Move PlatformStrategies.cpp from platform
2077         specific makefiles to the global one now that all platforms using
2078         cmake implement platform strategies.
2079         * PlatformBlackBerry.cmake:
2080         * PlatformEfl.cmake:
2081         * PlatformWinCE.cmake:
2082         * loader/CookieJar.cpp: Remove the preprocessor error that is not
2083         needed anymore.
2084         * loader/blackberry/CookieJarBlackBerry.cpp: Removed.
2085         * platform/network/blackberry/CookieJarBlackBerry.cpp: Added.
2086         (WebCore):
2087         (WebCore::setCookiesFromDOM):
2088         (WebCore::cookiesForDOM):
2089         (WebCore::cookieRequestHeaderFieldValue):
2090         (WebCore::cookiesEnabled):
2091         (WebCore::getRawCookies):
2092         (WebCore::deleteCookie):
2093         (WebCore::getHostnamesWithCookies):
2094         (WebCore::deleteCookiesForHostname):
2095         (WebCore::deleteAllCookies):
2096         * plugins/blackberry/PluginDataBlackBerry.cpp: Removed.
2097
2098 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2099
2100         [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
2101         https://bugs.webkit.org/show_bug.cgi?id=116035
2102
2103         Reviewed by Simon Hausmann.
2104
2105         Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
2106         The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
2107         with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.
2108
2109         * platform/network/qt/QNetworkReplyHandler.cpp:
2110         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
2111           Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
2112         (WebCore::QNetworkReplyWrapper::release):
2113
2114 2013-05-13  Eric Carlson  <eric.carlson@apple.com>
2115
2116         [Mac] update in-band caption attributes
2117         https://bugs.webkit.org/show_bug.cgi?id=116057
2118
2119         Reviewed by Dean Jackson.
2120
2121         * html/track/InbandTextTrack.cpp:
2122         (WebCore::InbandTextTrack::updateCueFromCueData): Copy highlight color.
2123
2124         * html/track/TextTrackCueGeneric.cpp:
2125         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): "highlight" color sets the cue
2126             background, "background" color sets the cue container background.
2127         * html/track/TextTrackCueGeneric.h:
2128
2129         * platform/graphics/InbandTextTrackPrivateClient.h:
2130
2131         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2132         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process "highlight" color.
2133
2134 2013-05-13  David Kilzer  <ddkilzer@apple.com>
2135
2136         BUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm
2137
2138         * platform/ios/PasteboardIOS.mm:
2139         (WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
2140         instead of RetainPtr<NSString>.
2141
2142 2013-05-13  Benjamin Poulain  <bpoulain@apple.com>
2143
2144         Remove platform/graphic's Generator
2145         https://bugs.webkit.org/show_bug.cgi?id=116084
2146
2147         Reviewed by Darin Adler.
2148
2149         The Generator no longer abstract anything useful, its only
2150         implementation is Gradient.
2151
2152         * GNUmakefile.list.am:
2153         * WebCore.exp.in:
2154         * WebCore.vcproj/WebCore.vcproj:
2155         * WebCore.vcxproj/WebCore.vcxproj:
2156         * WebCore.vcxproj/WebCore.vcxproj.filters:
2157         * WebCore.xcodeproj/project.pbxproj:
2158         * platform/graphics/GeneratedImage.h:
2159         * platform/graphics/Generator.h: Removed.
2160         * platform/graphics/GeneratorGeneratedImage.cpp:
2161         (WebCore::GeneratorGeneratedImage::draw):
2162         (WebCore::GeneratorGeneratedImage::drawPattern):
2163         * platform/graphics/GeneratorGeneratedImage.h:
2164         (WebCore::GeneratorGeneratedImage::create):
2165         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
2166         (GeneratorGeneratedImage):
2167         * platform/graphics/Gradient.h:
2168         (WebCore):
2169         (Gradient):
2170         * platform/graphics/GraphicsContext.cpp:
2171         (WebCore::GraphicsContext::fillRect):
2172         * platform/graphics/GraphicsContext.h:
2173         (WebCore):
2174         (GraphicsContext):
2175
2176 2013-05-13  David Kilzer  <ddkilzer@apple.com>
2177
2178         Upstream iOS Clipboard and Pasteboard changes
2179         <http://webkit.org/b/116062>
2180
2181         Reviewed by Darin Adler.
2182
2183         * WebCore.xcodeproj/project.pbxproj:
2184         * dom/Clipboard.h:
2185         * platform/Pasteboard.h:
2186         * platform/ios/ClipboardIOS.h: Added.
2187         * platform/ios/ClipboardIOS.mm: Added.
2188         * platform/ios/PasteboardIOS.mm: Added.
2189
2190 2013-05-13  Huang Dongsung  <luxtella@company100.net>
2191
2192         [Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
2193         https://bugs.webkit.org/show_bug.cgi?id=107359
2194
2195         Reviewed by Darin Adler.
2196
2197         Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
2198         computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
2199         them.
2200         It is because:
2201         1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
2202         pixel unit.
2203         2. computePixelAlignment() uses the scale to compute an aligned layer position
2204         in the device pixel unit.
2205
2206         No new tests. We can not test about requiresTiledLayer() because it depends on
2207         gpu. computePixelAlignment() is correct now because fortunately Mac uses
2208         only 2 (for retina display) as a deviceScaleFactor.
2209
2210         * platform/graphics/ca/GraphicsLayerCA.cpp:
2211         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2212         (WebCore::GraphicsLayerCA::computePixelAlignment):
2213
2214 2013-05-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2215
2216         Rename BarInfo to BarProp and remove [NoInterfaceObject]
2217         https://bugs.webkit.org/show_bug.cgi?id=116027
2218
2219         Reviewed by Andreas Kling.
2220
2221         Rename BarInfo to BarProp and remove [NoInterfaceObject] extended attribute from
2222         the IDL interface to match the specification:
2223         http://www.w3.org/html/wg/drafts/html/master/browsers.html#barprop
2224
2225         The new behavior also matches Firefox and Blink.
2226
2227         No new tests, covered by LayoutTests/fast/js/global-constructors-attributes.html.
2228
2229         * CMakeLists.txt:
2230         * DerivedSources.cpp:
2231         * DerivedSources.make:
2232         * DerivedSources.pri:
2233         * GNUmakefile.list.am:
2234         * Target.pri:
2235         * WebCore.order:
2236         * WebCore.vcproj/WebCore.vcproj:
2237         * WebCore.vcxproj/WebCore.vcxproj:
2238         * WebCore.vcxproj/WebCore.vcxproj.filters:
2239         * WebCore.xcodeproj/project.pbxproj:
2240         * bindings/gobject/GNUmakefile.am:
2241         * page/BarProp.cpp: Renamed from Source/WebCore/page/BarInfo.cpp.
2242         * page/BarProp.h: Renamed from Source/WebCore/page/BarInfo.h.
2243         * page/BarProp.idl: Renamed from Source/WebCore/page/BarInfo.idl.
2244         * page/DOMWindow.cpp:
2245         * page/DOMWindow.h:
2246         * page/DOMWindow.idl:
2247
2248 2013-05-13  Anders Carlsson  <andersca@apple.com>
2249
2250         Remove ChromeClient::willPopupMenu
2251         https://bugs.webkit.org/show_bug.cgi?id=116063
2252
2253         Reviewed by Andreas Kling.
2254
2255         Remove ChromeClient::willPopupMenu.
2256
2257         * page/ChromeClient.h:
2258
2259 2013-05-13  Beth Dakin  <bdakin@apple.com>
2260
2261         Headers and footers should be pinned to the left edge of the window when scrolling 
2262         horizontally
2263         https://bugs.webkit.org/show_bug.cgi?id=116061
2264         -and corresponding-
2265         <rdar://problem/13599215>
2266
2267         Reviewed by Simon Fraser.
2268
2269         The scrolling thread will need to know about the header and footer layers in order 
2270         the implement this custom scrolling behavior. 
2271
2272         These getters will fetch the header or footer layer from the FrameView as 
2273         appropriate.
2274         * page/scrolling/ScrollingCoordinator.cpp:
2275         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
2276         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
2277         * page/scrolling/ScrollingCoordinator.h:
2278
2279         When we’re scrolling on the main thread, adjust the position of the header and 
2280         footer layers here.
2281         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
2282
2283         ScrollingStateScrollingNode now stores GraphicsLayers and PlatformLayers for the 
2284         header and footer, just like it already does for the counterScrollingLayer.
2285         * page/scrolling/ScrollingStateScrollingNode.cpp:
2286         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2287         * page/scrolling/ScrollingStateScrollingNode.h:
2288         (ScrollingStateScrollingNode):
2289         (WebCore::ScrollingStateScrollingNode::headerLayer):
2290         (WebCore::ScrollingStateScrollingNode::footerLayer):
2291
2292         Setters for the new layers.
2293         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2294         (ScrollingCoordinatorMac):
2295         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2296         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
2297         (WebCore::ScrollingCoordinatorMac::setHeaderLayerForNode):
2298         (WebCore::ScrollingCoordinatorMac::setFooterLayerForNode):
2299
2300         These setters and getters mirror the existing one for counterScrollingLayer.
2301         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
2302         (WebCore::ScrollingStateScrollingNode::headerPlatformLayer):
2303         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
2304         (WebCore::ScrollingStateScrollingNode::footerPlatformLayer):
2305         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
2306
2307         And the ScrollingTree will store CALayers for the header and footer.
2308         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2309         (ScrollingTreeScrollingNodeMac):
2310         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2311         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2312
2313         This is where the magic happens when we are scrolling on the scrolling thread. 
2314         Adjust the horizontal position the behave like a fixed object, but keep the 
2315         vertical position what it was when layer was created.
2316         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2317
2318         RenderLayerCompositor must now provide getters for the header and footer.
2319         * rendering/RenderLayerCompositor.h:
2320         * rendering/RenderLayerCompositor.cpp:
2321         (WebCore::RenderLayerCompositor::headerLayer):
2322         (WebCore::RenderLayerCompositor::footerLayer):
2323
2324         Set the anchor point for when we adjust the position later on. Also call 
2325         frameViewRootLayerDidChange() to get the new layers picked up and sent to the 
2326         scrolling tree.
2327         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2328         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2329
2330 2013-05-12  Timothy Hatcher  <timothy@apple.com>
2331
2332         Add support for updating the Web Inspector toolbar height.
2333
2334         https://bugs.webkit.org/show_bug.cgi?id=115996
2335
2336         Reviewed by Joseph Pecoraro and Benjamin Poulain.
2337
2338         * inspector/InspectorFrontendClient.h:
2339         (InspectorFrontendClient):
2340         * inspector/InspectorFrontendHost.cpp:
2341         (WebCore::InspectorFrontendHost::setToolbarHeight):
2342         * inspector/InspectorFrontendHost.h:
2343         (InspectorFrontendHost):
2344         * inspector/InspectorFrontendHost.idl:
2345         * testing/Internals.cpp:
2346
2347 2013-05-13  Dean Jackson  <dino@apple.com>
2348
2349         toDataURL can return an empty image in some cases
2350         https://bugs.webkit.org/show_bug.cgi?id=115981
2351         <rdar://problem/13760256>
2352
2353         Reviewed by Darin Adler.
2354
2355         In some accelerated rendering cases, calling toDataURL on
2356         an off-screen canvas produced an empty image. The solution
2357         was to force a CGContextFlush before extracting the data
2358         for image generation.
2359
2360         While here, I collected the flushing code from other methods
2361         into a single place. Also we were getting into a situation where
2362         we called flush two times in a row.
2363
2364         Test: fast/canvas/toDataURL-not-empty.html
2365
2366         * platform/graphics/ImageBuffer.h:
2367         (ImageBuffer): Define two new methods flushContext and flushContextIfNecessary.
2368         * platform/graphics/cg/ImageBufferCG.cpp:
2369         (WebCore::ImageBuffer::context): Call flushContextIfNecessary.
2370         (WebCore::ImageBuffer::flushContextIfNecessary): Moved the 10.7 code in here.
2371         (WebCore::ImageBuffer::flushContext): Calls CGContextFlush.
2372         (WebCore::ImageBuffer::getUnmultipliedImageData): Call new helper.
2373         (WebCore::ImageBuffer::getPremultipliedImageData): Call new helper.
2374         (WebCore::ImageBuffer::toDataURL): Flush the CG context.
2375
2376 2013-05-13  David Hyatt  <hyatt@apple.com>
2377
2378         Regressions in flexbox layout caused by the flexing optimizations.
2379         https://bugs.webkit.org/show_bug.cgi?id=116058
2380         <rdar://problem/13863647>
2381         
2382         Reviewed by Beth Dakin.
2383
2384         Roll out the flex-related changes from r149597 so that the layout
2385         algorithm goes back to the way it was. Leave the repainting optimizations
2386         in place though.
2387
2388         * rendering/RenderDeprecatedFlexibleBox.cpp:
2389         (WebCore::gatherFlexChildrenInfo):
2390         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2391         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2392
2393 2013-05-13  Philippe Normand  <pnormand@igalia.com>
2394
2395         Unreviewed, rolling out r150014.
2396         http://trac.webkit.org/changeset/150014
2397         https://bugs.webkit.org/show_bug.cgi?id=86410
2398
2399         Broke video playback on WK2 and some webgl tests
2400
2401         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2402         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2403         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2404         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2405         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2406         (MediaPlayerPrivateGStreamerBase):
2407
2408 2013-05-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2409
2410         Unreviewed, rolling out r150022.
2411         http://trac.webkit.org/changeset/150022
2412         https://bugs.webkit.org/show_bug.cgi?id=114044
2413
2414         Causes assertions in media tests
2415
2416         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2417         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2418         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
2419         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
2420         (WebCore::MediaPlayerPrivateGStreamer::currentTime):
2421         (WebCore::MediaPlayerPrivateGStreamer::seek):
2422         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2423         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2424         (MediaPlayerPrivateGStreamer):
2425
2426 2013-05-13  Bem Jones-Bey  <bjonesbe@adobe.com>
2427
2428         Floats should not overhang from flex items
2429         https://bugs.webkit.org/show_bug.cgi?id=115925
2430
2431         Reviewed by David Hyatt.
2432
2433         Allowing floats to overhand from flex items is not only against the
2434         spec, it causes bad bugs. Fix this by having flex items properly avoid
2435         floats.
2436
2437         Test: fast/block/float/float-not-removed-crash2.html
2438
2439         * rendering/RenderBox.cpp:
2440         (WebCore::RenderBox::avoidsFloats): Add flex items to avoid floats.
2441         * rendering/RenderBox.h:
2442         (WebCore::RenderBox::isFlexItemIncludingDeprecated): Determine if the current box is a
2443             flex item or deprecated flex item.
2444
2445 2013-05-13  Zoltan Horvath  <zoltan@webkit.org>
2446
2447         [CSS Regions][CSS Exclusions] Shape-inside on regions should respect region borders and paddings
2448         https://bugs.webkit.org/show_bug.cgi?id=115456
2449
2450         Reviewed by David Hyatt.
2451
2452         I refactored the computation logic of shape-inside on regions by removing access to RenderFlowThread from ExclusionShapeInfo's logicalTopOffset
2453         function, this means all the logic is now existing in RenderBlockLineLayout.cpp. By modifying the logicalTopOffset it turned out that the borders
2454         and padding hadn't worked correctly, since borders and paddings were counted twice in the shape-inside's computation. This patch adds the necessary
2455         modifications to let it respect the borders and padding in the correct way. I created 2 new helper functions to prevent increasing the code size of
2456         the layoutRunsAndFloatsInRange function.
2457
2458         I introduced 7 new tests to test for testing the correct behavior.
2459
2460         Tests: fast/regions/shape-inside/shape-inside-on-first-region-block-content.html
2461                fast/regions/shape-inside/shape-inside-on-first-region-inline-content.html
2462                fast/regions/shape-inside/shape-inside-on-second-region-block-content.html
2463                fast/regions/shape-inside/shape-inside-on-second-region-inline-content.html
2464                fast/regions/shape-inside/shape-inside-on-regions-inline-content.html
2465                fast/regions/shape-inside/shape-inside-with-region-borders.html
2466                fast/regions/shape-inside/shape-inside-with-region-padding.html
2467
2468         * rendering/ExclusionShapeInfo.cpp:
2469         (WebCore): Remove FlowThread logic from logicalTopOffset move definition to header.
2470         * rendering/ExclusionShapeInfo.h:
2471         (WebCore::ExclusionShapeInfo::logicalTopOffset): Moved from cpp.
2472         (WebCore::ExclusionShapeInfo::logicalLeftOffset): Add condition for RenderRegions. 
2473         * rendering/RenderBlock.h:
2474         (RenderBlock): Add definition to the new helper members.
2475         * rendering/RenderBlockLineLayout.cpp:
2476         (WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Modified the flow thread case to return the appropriate region.
2477         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Added new helper function. Modify the shape-inside on regions
2478         line boundaries and position computation logic.
2479         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Added new helper function which handles the flow thread case also.
2480         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Modified the code to use the helper functions.
2481
2482 2013-05-13  Bear Travis  <betravis@adobe.com>
2483
2484         [css exclusions] Enable CSS Exclusions by default when CSS_EXCLUSIONS is set
2485         https://bugs.webkit.org/show_bug.cgi?id=115919
2486
2487         Reviewed by Dean Jackson.
2488
2489         Change the RuntimeEnabledFeatures::isCSSExclusionsEnabled boolean to default
2490         to true. CSS Exclusions can still be enabled / disabled in platforms by
2491         setting the CSS_EXCLUSIONS compile flag in one of the FeatureDefine files.
2492
2493         Test: fast/exclusions/css-exclusions-enabled.html
2494
2495         * bindings/generic/RuntimeEnabledFeatures.cpp:
2496         (WebCore):
2497
2498 2013-05-13  Suchit Agrawal  <a.suchit@samsung.com>
2499
2500         Cell heights are disproportional when a row-spanning cell contains a block element that determines the height of the rows
2501         https://bugs.webkit.org/show_bug.cgi?id=52185
2502
2503         Reviewed by David Hyatt.
2504
2505         Cells heights are not proper when rowspan cell have its own height and rowspan height
2506         is more than the height of the rows present in rowspan.
2507
2508         After calculating logical height of the rows in the table, we are recalculating the height
2509         of the rows present in rowspan. Based on the ratio of row's logical height, we are
2510         distributing rowspan cell height in rows.
2511
2512         Test: fast/table/table-rowspan-height-distribution-in-rows.html
2513
2514         * rendering/RenderTableSection.cpp:
2515         (WebCore):
2516
2517         Update the logical height of the rows based on rowspan cell height.
2518         (WebCore::RenderTableSection::distributeRowSpanHeightToRows):
2519
2520         It calculates logical height of the rows in the table.
2521         (WebCore::RenderTableSection::calcRowLogicalHeight):
2522
2523         Added new private API to distribute rowSpan cell height in rows.
2524         * rendering/RenderTableSection.h:
2525         (RenderTableSection):
2526
2527 2013-04-30  Balazs Kelemen  <b.kelemen@sisa.samsung.com>
2528
2529         [GStreamer] cannot seek after video finished
2530         https://bugs.webkit.org/show_bug.cgi?id=114044
2531
2532         Reviewed by Philippe Normand.
2533
2534         Test: media/video-seek-after-end.html
2535
2536         Rework the seeking logic to be able to seek after reseting the pipeline.
2537         In addition to solve the actual problem this patch supposed to make seeking
2538         more robust and correct.
2539         The previous implementation tried to hide the complexity of asynchronous operations
2540         on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
2541         but instead reported the seek as finished when it saw an asynchronous pending state
2542         (GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
2543         Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
2544         Seeks are not the only operations executed asynchronously, changing the pipeling state is
2545         similar. It means a seek can overlap with onother ongoing asynchronous operation.
2546         This change address this by introducing an invariant for seeks, which is that we only request
2547         a seek if there are no other ongoing asynchronous operations and the pipeline state is either
2548         paused or playing (which is recommended anyway according to GStreamer's documentation).
2549         This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
2550         seek has been completed.
2551
2552         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2553         (WebCore::toGstClockTime): Factored time conversation into a helper.
2554         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2555
2556         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
2557         if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
2558         use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
2559         operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
2560         this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
2561
2562         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
2563         This function called when there is an intent to restart playback but it does not actually restart it.
2564         (WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
2565         (WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
2566         If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
2567         Now we handle overlapping seeks as well because I saw that it can happen in some tests.
2568         Added an early return for live streams as it doesn't makes sense to try seeking in them.
2569
2570         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
2571         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
2572         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
2573         now handled in asyncStateChangeDone.
2574         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
2575         has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
2576         after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
2577         in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
2578         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2579         (MediaPlayerPrivateGStreamer):
2580
2581 2013-05-12  Darin Adler  <darin@apple.com>
2582
2583         [Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
2584         https://bugs.webkit.org/show_bug.cgi?id=116009
2585
2586         Reviewed by Andreas Kling.
2587
2588         * dom/Clipboard.cpp:
2589         (WebCore::Clipboard::writeRange): Added. Moved from ClipboardMac,
2590         but added some FIXMEs.
2591         (WebCore::Clipboard::writePlainText): Ditto.
2592         (WebCore::Clipboard::writeURL): Ditto.
2593
2594         * dom/Clipboard.h: Made writeURL, writeRange, and writePlainText
2595         non-virtual in non-legacy clipboard implementations.
2596
2597         * platform/mac/ClipboardMac.h: Removed writeRange, writeURL, and
2598         writePlainText.
2599         * platform/mac/ClipboardMac.mm: Ditto.
2600
2601 2013-05-13  Noam Rosenthal  <noam@webkit.org>
2602
2603         [CoordGfx] requestAnimationFrame performance issues
2604         https://bugs.webkit.org/show_bug.cgi?id=112345
2605
2606         Reviewed by Jocelyn Turcotte.
2607
2608         Removed current requestAnimationFrame logic from CoordinatedGraphics. The new logic
2609         is entirely in WebKit2 CoordinatedLayerTreeHost.
2610
2611         Covered by existing tests in fast/animations.
2612
2613         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2614         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2615         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2616         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2617         (CoordinatedGraphicsScene):
2618
2619 2013-05-13  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2620
2621         [texmap][GStreamer] Composited Video support
2622         https://bugs.webkit.org/show_bug.cgi?id=86410
2623
2624         Reviewed by Philippe Normand.
2625
2626         Enable the video accelerated compositing using the WebKit's
2627         TextureMapper.
2628
2629         This patch does not use hardware accelerated video decoding. It
2630         provides a generic path for system memory buffers.
2631
2632         No new tests, already covered by existing tests.
2633
2634         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2635         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2636         (WebCore):
2637         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
2638         texture content with the new received video buffer.
2639         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
2640         use the accelerated compositing or the normal code path
2641         (WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
2642         compositing is used this method is halted.
2643         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
2644         a texture from the pool and draws it if it is already available.
2645         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2646         (MediaPlayerPrivateGStreamerBase):
2647         (WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
2648         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
2649         returns true
2650
2651 2013-05-13  Andreas Kling  <akling@apple.com>
2652
2653         Document: Use a DeferrableOneShotTimer to throw out StyleResolver when unused.
2654         <http://webkit.org/b/115929>
2655
2656         Reviewed by Anders Carlsson.
2657
2658         Nothing exciting here, just replacing a rickety-looking punting mechanism with a proper
2659         DeferrableOneShotTimer. Note that the timeout changes from 60 to 30 seconds because DOST
2660         works by punting a full interval on next timeout.
2661
2662         * dom/Document.cpp:
2663         (WebCore::Document::Document):
2664         (WebCore::Document::didAccessStyleResolver):
2665         (WebCore::Document::styleResolverThrowawayTimerFired):
2666         * dom/Document.h:
2667         (Document):
2668
2669 2013-05-13  Andreas Kling  <akling@apple.com>
2670
2671         REGRESSION(r149287): FoldingText only shows me half of my text.
2672         <http://webkit.org/b/115956>
2673         <rdar://problem/13831099>
2674
2675         Reviewed by Antti Koivisto.
2676
2677         Check if the FrameView geometry changed post-layout, and send a resize event if needed.
2678         This brings us closer to the original resize event behavior, with the exception that
2679         setFrameRect() still fires an event right away if possible. This means we are still
2680         guarded from FOUC's but frames that layout via [WebHTMLView layoutToMinimumPageWidth]
2681         also get resize events like they used to.
2682
2683         No new tests, because I don't know how to test this.
2684
2685         * page/FrameView.h:
2686         * page/FrameView.cpp:
2687         (WebCore::FrameView::setFrameRect):
2688         (WebCore::FrameView::performPostLayoutTasks):
2689         (WebCore::FrameView::sendResizeEventIfNeeded):
2690
2691             Factor out the resize event logic from setFrameRect() so we can call it from both
2692             there and performPostLayoutTasks(). sendResizeEventIfNeeded() only sends an event
2693             if view geometry or zoom factor has changed since last time it was called.
2694
2695 2013-05-13  Antti Koivisto  <antti@apple.com>
2696
2697         Remove unneeded counters from ScopeContentDistribution.
2698         https://bugs.webkit.org/show_bug.cgi?id=116028
2699
2700         Reviewed by Andreas Kling.
2701
2702         They don't do much.
2703
2704         * WebCore.exp.in:
2705         * dom/ShadowRoot.cpp:
2706         (WebCore::ShadowRoot::ShadowRoot):
2707         * dom/ShadowRoot.h:
2708         
2709             No need for registration code anymore.
2710
2711         * html/shadow/ContentDistributor.cpp:
2712         (WebCore::ScopeContentDistribution::ScopeContentDistribution):
2713         
2714             Default m_insertionPointListIsValid to true to avoid crawling when there are no InsertionPoints.
2715
2716         (WebCore::ScopeContentDistribution::ensureInsertionPointList):
2717         (WebCore::ScopeContentDistribution::registerInsertionPoint):
2718         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
2719         * html/shadow/ContentDistributor.h:
2720         
2721             Remove distributeNodeChildrenTo, it was only used by the older/younger shadow root code.
2722
2723         * testing/Internals.cpp:
2724         * testing/Internals.h:
2725         * testing/Internals.idl:
2726
2727 2013-05-13  Seokju Kwon  <seokju.kwon@gmail.com>
2728
2729         Web Inspector: Remove unused references from projects in Visual Studio
2730         https://bugs.webkit.org/show_bug.cgi?id=116002
2731
2732         Reviewed by Csaba Osztrogonác.
2733
2734         nativeMemoryProfiler.css and NativeMemorySnapshotView.js were removed in r149807.
2735
2736         No new tests, no behavior change.
2737
2738         * WebCore.vcproj/WebCore.vcproj:
2739         * WebCore.vcxproj/WebCore.vcxproj:
2740         * WebCore.vcxproj/WebCore.vcxproj.filters:
2741
2742 2013-05-13  Zalan Bujtas  <zalan@apple.com>
2743
2744         WebProcess consuming very high CPU on linkedin.com
2745         https://bugs.webkit.org/show_bug.cgi?id=115601
2746
2747         Reviewed by Andreas Kling.
2748
2749         Disable WEB_TIMING_MINIMAL.
2750         Turn off window.performance and performance.now(). Some JS frameworks expect
2751         additional Web Timing APIs, when performance.now() is available.
2752
2753         * Configurations/FeatureDefines.xcconfig:
2754         * dom/EventTargetFactory.in:
2755         * page/DOMWindow.cpp:
2756         (WebCore::DOMWindow::~DOMWindow):
2757         (WebCore::DOMWindow::resetDOMWindowProperties):
2758         (WebCore):
2759         * page/DOMWindow.h:
2760         (DOMWindow):
2761         * page/DOMWindow.idl:
2762         * page/Performance.cpp:
2763         (WebCore::Performance::timing):
2764         * page/Performance.h:
2765         (Performance):
2766         * page/Performance.idl:
2767
2768 2013-05-12  Eric Carlson  <eric.carlson@apple.com>
2769
2770         REGRESSION (r149749): Video becomes invisible when it starts playing at newyorkbygehry.com
2771         https://bugs.webkit.org/show_bug.cgi?id=115963
2772
2773         Reviewed by Dean Jackson.
2774
2775         Test: media/video-remove-insert-repaints.html
2776
2777         * html/HTMLMediaElement.cpp:
2778         (WebCore::HTMLMediaElement::insertedInto): Set m_inActiveDocument when inserted into a document.
2779         (WebCore::HTMLMediaElement::removedFrom): Fix logging.
2780
2781 2013-05-12  David Kilzer  <ddkilzer@apple.com>
2782
2783         Move sudden termination symbols to the Mac-only section
2784
2785         * WebCore.exp.in: Move the sudden termination symbols to the
2786         !PLATFORM(IOS) section for reals this time.
2787
2788 2013-05-12  Darin Adler  <darin@apple.com>
2789
2790         Fix Mac build.
2791
2792         * platform/mac/PasteboardMac.mm: Add back include of ClipboardMac.h
2793         that was removed by accident a couple of patches back.
2794
2795 2013-05-12  Darin Adler  <darin@apple.com>
2796
2797         [Mac] Moved files function from ClipboardMac to PasteboardMac
2798         https://bugs.webkit.org/show_bug.cgi?id=116008
2799
2800         Reviewed by Anders Carlsson.
2801
2802         * dom/Clipboard.cpp:
2803         (WebCore::Clipboard::files): Added. Moved the DOM-depdendent and
2804         platform-independent part of the files function in ClipboardMac here.
2805
2806         * dom/Clipboard.h: Made files function non-virtual in non-legacy case.
2807
2808         * platform/Pasteboard.h: Removed static member function
2809         absoluteURLsFromPasteboardFilenames since it can now be private to
2810         PasteboardMac. Added member function readFilenames.
2811
2812         * platform/mac/ClipboardMac.h: Removed function member files and also
2813         now-unused data member m_clipboardContents.
2814
2815         * platform/mac/ClipboardMac.mm: Removed files function.
2816         (WebCore::ClipboardMac::ClipboardMac): Removed code to initialize
2817         m_clipboardContents.
2818
2819         * platform/mac/PasteboardMac.mm:
2820         (WebCore::absoluteURLsFromPasteboardFilenames): Changed from a static
2821         member function to a file-local function.
2822         (WebCore::absoluteURLsFromPasteboard): Changed to call the function
2823         above in its new location.
2824         (WebCore::Pasteboard::readFilenames): Added. Code from ClipboardMac,
2825         minus the DOM-specific parts. Added a FIXME about the peculiar round
2826         trip through NSURL this code takes.
2827
2828 2013-05-12  Anders Carlsson  <andersca@apple.com>
2829
2830         Fix WebKit2 build.
2831
2832         * WebCore.exp.in:
2833         Put WebCore::disableSuddenTermination and WebCore::enableSuddenTermination symbols in the right section.
2834
2835 2013-05-12  Darin Adler  <darin@apple.com>
2836
2837         [Mac] Move types function from ClipboardMac to PasteboardMac
2838         https://bugs.webkit.org/show_bug.cgi?id=116007
2839
2840         Reviewed by Anders Carlsson.
2841
2842         * dom/Clipboard.cpp:
2843         (WebCore::Clipboard::types): Added. Calls through to Pasteboard
2844         after doing checks needed at this level.
2845
2846         * dom/Clipboard.h: Made types function non-virtual in non-legacy case,
2847         and removed non-helpful comment.
2848
2849         * platform/Pasteboard.h: Updated includes and comments at the top of
2850         the file a bit. Removed static member function addHTMLClipboardTypesForCocoaType,
2851         since it can now be private to PasteboardMac. Added member function types.
2852
2853         * platform/mac/ClipboardMac.h: Removed types function.
2854         * platform/mac/ClipboardMac.mm: Ditto.
2855
2856         * platform/mac/PasteboardMac.mm:
2857         (WebCore::addHTMLClipboardTypesForCocoaType): Made this a file-local
2858         function instead of a static member function.
2859         (WebCore::Pasteboard::types): Added. Moved from ClipboardMac.
2860
2861 2013-05-12  Darin Adler  <darin@apple.com>
2862
2863         [Mac] Move setData from ClipboardMac to PasteboardMac
2864         https://bugs.webkit.org/show_bug.cgi?id=116006
2865
2866         Reviewed by Anders Carlsson.
2867
2868         * dom/Clipboard.cpp:
2869         (WebCore::Clipboard::setData): Added. Calls through to Pasteboard
2870         after doing checks needed at this level.
2871
2872         * dom/Clipboard.h: Made setData non-virtual in non-legacy case.
2873
2874         * platform/Pasteboard.h: Updated includes and forward declarations.
2875         Removed static member function cocoaTypeFromHTMLClipboardType, since
2876         it can now be private to PasteboardMac. Added static member function
2877         addHTMLClipboardTypesForCocoaType, which is shared between the
2878         ClipboardMac and PasteboardMac files for now. Added writeString.
2879
2880         * platform/mac/ClipboardMac.h: Removed setData.
2881
2882         * platform/mac/ClipboardMac.mm: Removed utiTypeFromCocoaType,
2883         addHTMLClipboardTypesForCocoaType, and setData.
2884         (WebCore::ClipboardMac::types): Call addHTMLClipboardTypesForCocoaType
2885         as a Pasteboard static member function, for now.
2886
2887         * platform/mac/PasteboardMac.mm:
2888         (WebCore::cocoaTypeFromHTMLClipboardType): Added. Moved from ClipboardMac.
2889         (WebCore::Pasteboard::readString): Changed to call
2890         cocoaTypeFromHTMLClipboardType as a file-local function, not a member
2891         function (in fact, we didn't need to repeat the class name before, either,
2892         so this is just removing something we didn't need).
2893         (WebCore::utiTypeFromCocoaType): Added. Moved from ClipboardMac.
2894         (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
2895         (WebCore::Pasteboard::writeString): Ditto.
2896
2897 2013-05-12  Darin Adler  <darin@apple.com>
2898
2899         [Mac] Move getData from ClipboardMac to PasteboardMac
2900         https://bugs.webkit.org/show_bug.cgi?id=116005
2901
2902         Reviewed by Anders Carlsson.
2903
2904         * dom/Clipboard.cpp:
2905         (WebCore::Clipboard::Clipboard): Added a new boolean argument, forFileDrag,
2906         to the constructor. Maybe we can find a better way to do this once we move
2907         all the platforms over, but this boolean seems a good way to do it for now.
2908         (WebCore::Clipboard::getData): Added. Calls through to Pasteboard after
2909         doing the canReadData check, which is part of DOM rules, not the platform.
2910         Also checks for the file drag case like the old ClipboardMac code did.
2911
2912         * dom/Clipboard.h: Made getData non-virtual in non-legacy case.
2913
2914         * platform/Pasteboard.h: Added a static member function named
2915         absoluteURLsFromPasteboardFilenames, temporary so it can be shared between
2916         ClipboardMac and PasteboardMac. Added a readString public function member,
2917         and a m_changeCount data member. The type of m_changeCount is long since
2918         that can always hold an NSInteger but yet is a type we can compile without
2919         including the header file that defines NSInteger.
2920
2921         * platform/mac/ClipboardMac.h: Removed getData.
2922         * platform/mac/ClipboardMac.mm: Removed getData.
2923         (WebCore::ClipboardMac::ClipboardMac): Added code to pass in the new
2924         forFileDrag boolean.
2925         (WebCore::ClipboardMac::files): Call absoluteURLsFromPasteboardFilenames
2926         as a static member function in Pasteboard since we moved it there.
2927
2928         * platform/mac/PasteboardMac.mm:
2929         (WebCore::Pasteboard::Pasteboard): Initialize the change count, so later
2930         pasteboard operations can check it.
2931         (WebCore::Pasteboard::absoluteURLsFromPasteboardFilenames): Added. Moved
2932         here from ClipboardMac.
2933         (WebCore::absoluteURLsFromPasteboard): Ditto.
2934         (WebCore::Pasteboard::readString): Added. Moved here from ClipboardMac.
2935
2936 2013-05-12  Anders Carlsson  <andersca@apple.com>
2937
2938         Stop including UnusedParam.h
2939         https://bugs.webkit.org/show_bug.cgi?id=116003
2940
2941         Reviewed by Sam Weinig.
2942
2943         UnusedParam.h is empty now so there's no need to include it anymore.
2944
2945         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
2946         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2947         * Modules/indexeddb/IDBObjectStore.cpp:
2948         * Modules/webdatabase/DatabaseServer.cpp:
2949         * Modules/webdatabase/DatabaseThread.cpp:
2950         * bindings/js/JSDOMWindowBase.cpp:
2951         * bindings/objc/DOMObject.mm:
2952         * css/CSSCursorImageValue.cpp:
2953         * css/DeprecatedStyleBuilder.cpp:
2954         * dom/EventDispatcher.cpp:
2955         * dom/Node.cpp:
2956         * editing/AlternativeTextController.h:
2957         * editing/Editor.cpp:
2958         * html/HTMLPlugInElement.cpp:
2959         * html/canvas/CanvasRenderingContext2D.cpp:
2960         * html/canvas/OESVertexArrayObject.h:
2961         * html/parser/HTMLConstructionSite.cpp:
2962         * html/parser/HTMLTokenizer.cpp:
2963         * html/track/InbandTextTrack.cpp:
2964         * inspector/InspectorCanvasInstrumentation.h:
2965         * inspector/InspectorConsoleInstrumentation.h:
2966         * inspector/InspectorController.cpp:
2967         * inspector/InspectorCounters.h:
2968         * inspector/InspectorDatabaseInstrumentation.h:
2969         * inspector/InspectorInstrumentation.h:
2970         * loader/DocumentThreadableLoader.cpp:
2971         * loader/PingLoader.cpp:
2972         * loader/appcache/ApplicationCacheGroup.cpp:
2973         * loader/cache/CachedResourceLoader.cpp:
2974         * loader/mac/DocumentLoaderMac.cpp:
2975         * page/ChromeClient.h:
2976         * page/Console.cpp:
2977         * page/FrameView.cpp:
2978         * page/PageConsole.cpp:
2979         * page/animation/AnimationController.cpp:
2980         * page/animation/ImplicitAnimation.cpp:
2981         * page/animation/KeyframeAnimation.cpp:
2982         * platform/LocalizedStrings.cpp:
2983         * platform/ScrollAnimator.h:
2984         * platform/ThreadGlobalData.cpp:
2985         * platform/blackberry/AsyncFileSystemBlackBerry.cpp:
2986         * platform/graphics/Font.cpp:
2987         * platform/graphics/GlyphBuffer.h:
2988         * platform/graphics/Gradient.cpp:
2989         * platform/graphics/ShadowBlur.cpp:
2990         * platform/graphics/SimpleFontData.cpp:
2991         * platform/graphics/SimpleFontData.h:
2992         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2993         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2994         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2995         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2996         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2997         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2998         * platform/graphics/blackberry/GradientBlackBerry.cpp:
2999         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3000         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3001         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3002         * platform/graphics/ca/mac/WebTileLayer.mm:
3003         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
3004         * platform/graphics/cg/GraphicsContextCG.cpp:
3005         * platform/graphics/cg/ImageBufferCG.cpp:
3006         * platform/graphics/cg/ImageSourceCG.cpp:
3007         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
3008         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
3009         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
3010         * platform/graphics/mac/GraphicsContext3DMac.mm:
3011         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3012         * platform/graphics/mac/SimpleFontDataMac.mm:
3013         * platform/graphics/mac/WebGLLayer.mm:
3014         * platform/graphics/mac/WebLayer.mm:
3015         * platform/graphics/mac/WebTiledLayer.mm:
3016         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3017         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3018         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3019         * platform/graphics/texmap/TextureMapper.h:
3020         * platform/graphics/wince/ImageBufferWinCE.cpp:
3021         * platform/mac/PasteboardMac.mm:
3022         * platform/mac/ScrollAnimatorMac.mm:
3023         * platform/mac/ScrollViewMac.mm:
3024         * platform/mac/ScrollbarThemeMac.mm:
3025         * platform/mac/SharedTimerMac.mm:
3026         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
3027         * platform/mac/WebCoreObjCExtras.mm:
3028         * platform/mac/WebFontCache.mm:
3029         * platform/mac/WebVideoFullscreenController.mm:
3030         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
3031         * platform/mac/WebWindowAnimation.mm:
3032         * platform/network/blackberry/CredentialStorageBlackBerry.cpp:
3033         * platform/network/cf/ResourceErrorCF.cpp:
3034         * platform/network/mac/CookieStorageMac.mm:
3035         * platform/network/mac/ResourceHandleMac.mm:
3036         * platform/network/win/ResourceHandleWin.cpp:
3037         * platform/text/TextEncodingDetectorICU.cpp:
3038         * rendering/RenderFlowThread.h:
3039         * rendering/RenderImage.cpp:
3040         * rendering/RenderLayer.cpp:
3041         * rendering/RenderObject.cpp:
3042         * rendering/RenderTreeAsText.cpp:
3043         * rendering/svg/RenderSVGResourceClipper.cpp:
3044         * rendering/svg/RenderSVGResourceFilter.cpp:
3045         * rendering/svg/RenderSVGResourceGradient.cpp:
3046         * rendering/svg/RenderSVGResourceMasker.cpp:
3047         * rendering/svg/SVGRenderSupport.cpp:
3048         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
3049         * workers/WorkerContext.cpp:
3050         * workers/WorkerScriptLoader.cpp:
3051         * xml/XMLHttpRequest.cpp:
3052         * xml/parser/XMLDocumentParserLibxml2.cpp:
3053
3054 2013-05-12  Darin Adler  <darin@apple.com>
3055
3056         [Mac] Move clearAllData from ClipboardMac to PasteboardMac
3057         https://bugs.webkit.org/show_bug.cgi?id=116001
3058
3059         Reviewed by Andreas Kling.
3060
3061         * dom/Clipboard.cpp:
3062         (WebCore::Clipboard::clearAllData): Added. Calls through to Pasteboard after
3063         doing the canWriteData check, which is part of DOM rules, not the platform.
3064
3065         * dom/Clipboard.h: Made clearAllData non-virtual in non-legacy case.
3066
3067         * platform/mac/ClipboardMac.h: Removed clearAllData.
3068         * platform/mac/ClipboardMac.mm: Ditto.
3069
3070 2013-05-12  Darin Adler  <darin@apple.com>
3071
3072         [Mac] Move clearData from ClipboardMac to PasteboardMac
3073         https://bugs.webkit.org/show_bug.cgi?id=116000
3074
3075         Reviewed by Andreas Kling.
3076
3077         * dom/Clipboard.cpp:
3078         (WebCore::Clipboard::clearData): Added. Calls through to Pasteboard after
3079         doing the canWriteData check, which is part of DOM rules, not the platform.
3080
3081         * dom/Clipboard.h: Made clearData non-virtual in non-legacy case.
3082
3083         * platform/Pasteboard.h: Added an overload of the clear function that takes
3084         a single type and clears only that type. Also temporarily exported the
3085         cocoaTypeFromHTMLClipboardType function as a static member so it can be used
3086         in both ClipboardMac and PasteboardMac during the transition.
3087
3088         * platform/mac/ClipboardMac.h: Removed clearData.
3089         * platform/mac/ClipboardMac.mm: Removed clearData.
3090         (WebCore::ClipboardMac::getData): Changed to call cocoaTypeFromHTMLClipboardType
3091         as a Pasteboard class static member function.
3092         (WebCore::ClipboardMac::setData): Ditto.
3093
3094         * platform/mac/PasteboardMac.mm:
3095         (WebCore::Pasteboard::cocoaTypeFromHTMLClipboardType): Moved here from
3096         ClipboardMac.
3097         (WebCore::Pasteboard::clear): Added. Moved here from ClipboardMac.
3098
3099 2013-05-12  Darin Adler  <darin@apple.com>
3100
3101         [Mac] Move hasData from ClipboardMac to PasteboardMac
3102         https://bugs.webkit.org/show_bug.cgi?id=115999
3103
3104         Reviewed by Andreas Kling.
3105
3106         * dom/Clipboard.cpp:
3107         (WebCore::Clipboard::hasData): Added. Calls through to Pasteboard.
3108
3109         * dom/Clipboard.h: Added LEGACY_VIRTUAL and LEGACY_PURE macros,
3110         only for within this header file. These help us keep many functions
3111         as pure virtual in the legacy style Clipboard class, but have them
3112         be non-virtual in the normal/future style. Use LEGACY_VIRTUAL and
3113         LEGACY_PURE to make the hasData member non-virtual.
3114
3115         * platform/Pasteboard.h: Added hasData, and added some blank lines and a FIXME.
3116
3117         * platform/mac/ClipboardMac.h: Removed hasData override.
3118         * platform/mac/ClipboardMac.mm: Ditto.
3119
3120         * platform/mac/PasteboardMac.mm:
3121         (WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardMac.
3122
3123 2013-05-12  David Kilzer  <ddkilzer@apple.com>
3124
3125         BUILD FIX (r149971): sudden termination is a Mac-only concept
3126
3127         * WebCore.exp.in: Move sudden termination symbols to Mac-only
3128         section.
3129
3130 2013-05-12  Andreas Kling  <akling@apple.com>
3131
3132         Node: Use FINAL instead of the non-virtual shadowing hack.
3133         <http://webkit.org/b/115995>
3134
3135         Reviewed by Anders Carlsson.
3136
3137         Decorate Element/Attr implementations of prefix/localName/namespaceURI getters with FINAL
3138         so that call sites with a more specific pointer type than Node* can avoid the virtual dispatch.
3139
3140         * dom/Attr.h:
3141         * dom/Element.h:
3142         * dom/Node.cpp:
3143         * dom/Node.h:
3144
3145 2013-05-11  Darin Adler  <darin@apple.com>
3146
3147         [Mac] Give every Clipboard an underlying Pasteboard
3148         https://bugs.webkit.org/show_bug.cgi?id=115979
3149
3150         Reviewed by Andreas Kling.
3151
3152         This is the first step in Clipboard and Pasteboard refactoring
3153         to fix the overlap and many layering violations.
3154
3155         * dom/Clipboard.cpp:
3156         (WebCore::Clipboard::Clipboard): Add an m_pasteboard data member,
3157         Mac-only for now, but eventually for all platforms.
3158         (WebCore::Clipboard::~Clipboard): No longer inline the destructor.
3159
3160         * dom/Clipboard.h: Add WTF_USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
3161         flag, currently true for all non-Mac platforms. Make the constructor
3162         no longer inline. Added a PassOwnPtr<Pasteboard> argument to the
3163         constructor and an OwnPtr<Pasteboard> data member.
3164
3165         * platform/Pasteboard.h: Added a create function to make it easy
3166         to create a pasteboard given a pasteboard name.
3167
3168         * platform/mac/ClipboardMac.mm:
3169         (WebCore::ClipboardMac::ClipboardMac): Create a pasteboard and pass
3170         it to the Clipboard constructor.
3171
3172         * platform/mac/PasteboardMac.mm:
3173         (WebCore::Pasteboard::create): Added.
3174
3175 2013-05-12  Andreas Kling  <akling@apple.com>
3176
3177         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
3178         <http://webkit.org/b/115988>
3179         <rdar://problem/13870943>
3180
3181         Reviewed by Anders Carlsson.
3182
3183         Add two methods to Chrome (and ChromeClient):
3184
3185             - enableSuddenTermination()
3186             - disableSuddenTermination()
3187
3188         ..and call these from DOMWindow instead of the free global functions.
3189
3190         For WebKit1, it just calls the NSProcessInfo methods to keep behavior the same.
3191         For WebKit2, the new methods plumb through the information to the UI process.
3192
3193         Also updated the DOMWindow logic to think in terms of per-DOMWindow sudden termination counters
3194         instead of a process-global one, since that gets confusing in a WK2 world.
3195         When a DOMWindow transitions between having/not having unload/beforeunload event listeners,
3196         we send a notification to the Chrome.
3197
3198         * WebCore.exp.in:
3199         * WebCore.xcodeproj/project.pbxproj:
3200         * page/Chrome.h:
3201         (WebCore::Chrome::enableSuddenTermination):
3202         (WebCore::Chrome::disableSuddenTermination):
3203         * page/ChromeClient.h:
3204         (WebCore::ChromeClient::enableSuddenTermination):
3205         (WebCore::ChromeClient::disableSuddenTermination):
3206         * page/DOMWindow.cpp:
3207         (WebCore::addUnloadEventListener):
3208         (WebCore::removeUnloadEventListener):
3209         (WebCore::removeAllUnloadEventListeners):
3210         (WebCore::addBeforeUnloadEventListener):
3211         (WebCore::removeBeforeUnloadEventListener):
3212         (WebCore::removeAllBeforeUnloadEventListeners):
3213         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
3214         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
3215         (WebCore::DOMWindow::enableSuddenTermination):
3216         (WebCore::DOMWindow::disableSuddenTermination):
3217         * page/DOMWindow.h:
3218         (DOMWindow):
3219
3220 2013-05-12  Anders Carlsson  <andersca@apple.com>
3221
3222         Remove Complex.h from WTF
3223         https://bugs.webkit.org/show_bug.cgi?id=115989
3224
3225         Reviewed by Beth Dakin.
3226
3227         Replace Complex declarations with std::complex<double>. Pass by value since the struct
3228         is small enough to go into two registers on X86-64.
3229
3230         * Modules/webaudio/RealtimeAnalyser.cpp:
3231         (WebCore::RealtimeAnalyser::doFFTAnalysis):
3232         (WebCore::RealtimeAnalyser::getFloatFrequencyData):
3233         (WebCore::RealtimeAnalyser::getByteFrequencyData):
3234         (WebCore::RealtimeAnalyser::getByteTimeDomainData):
3235         * platform/audio/Biquad.cpp:
3236         (WebCore::Biquad::setZeroPolePairs):
3237         (WebCore::Biquad::setAllpassPole):
3238         (WebCore::Biquad::getFrequencyResponse):
3239         * platform/audio/Biquad.h:
3240         * platform/audio/FFTFrame.cpp:
3241         (WebCore::FFTFrame::interpolateFrequencyComponents):
3242         (WebCore::FFTFrame::extractAverageGroupDelay):
3243         (WebCore::FFTFrame::addConstantGroupDelay):
3244
3245 2013-05-12  Simon Fraser  <simon.fraser@apple.com>
3246
3247         Dropdowns on http://www.exploratorium.edu don't show anything
3248         https://bugs.webkit.org/show_bug.cgi?id=115991
3249
3250         Reviewed by Dan Bernstein.
3251         
3252         We can't optimize away the backing store of a layer by saying that
3253         it paints into a composited ancestor if its composited bounds are not contained
3254         by that ancestor.
3255
3256         Test: compositing/backing/no-backing-for-clip-overhang.html
3257
3258         * rendering/RenderLayerBacking.cpp:
3259         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our 
3260         previously computed composited bounds relative to our composited ancestor,
3261         and its composited bounds.
3262         * rendering/RenderLayerCompositor.cpp:
3263         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
3264         composited bounds don't contain the layer's composited bounds, the layer
3265         needs its own backing store.
3266         * rendering/RenderLayerCompositor.h:
3267
3268 2013-05-12  Commit Queue  <commit-queue@webkit.org>
3269
3270         Unreviewed, rolling out r149955.
3271         http://trac.webkit.org/changeset/149955
3272         https://bugs.webkit.org/show_bug.cgi?id=115990
3273
3274         Broke lots of tests (Requested by smfr on #webkit).
3275
3276         * WebCore.exp.in:
3277         * rendering/InlineFlowBox.h:
3278         * rendering/InlineTextBox.h:
3279         (InlineTextBox):
3280         * rendering/RenderApplet.h:
3281         * rendering/RenderBR.h:
3282         * rendering/RenderBlock.h:
3283         (RenderBlock):
3284         (WebCore::RenderBlock::virtualContinuation):
3285         (WebCore::RenderBlock::virtualChildren):
3286         (WebCore::RenderBlock::isRenderBlock):
3287         (WebCore::RenderBlock::isBlockFlow):
3288         (WebCore::RenderBlock::isInlineBlockOrInlineTable):
3289         (WebCore::RenderBlock::dirtyLinesFromChangedChild):
3290         (WebCore::RenderBlock::collapsedMarginBefore):
3291         (WebCore::RenderBlock::collapsedMarginAfter):
3292         * rendering/RenderBox.h:
3293         (WebCore::RenderBox::borderBoundingBox):
3294         (RenderBox):
3295         (WebCore::RenderBox::marginLogicalLeft):
3296         (WebCore::RenderBox::marginLogicalRight):
3297         * rendering/RenderBoxModelObject.h:
3298         (WebCore::RenderBoxModelObject::isBoxModelObject):
3299         * rendering/RenderButton.h:
3300         * rendering/RenderCombineText.h:
3301         * rendering/RenderCounter.h:
3302         * rendering/RenderDeprecatedFlexibleBox.h:
3303         * rendering/RenderDetailsMarker.h:
3304         * rendering/RenderEmbeddedObject.h:
3305         (RenderEmbeddedObject):
3306         (WebCore::RenderEmbeddedObject::isEmbeddedObject):
3307         (WebCore::RenderEmbeddedObject::virtualChildren):
3308         * rendering/RenderFieldset.h:
3309         * rendering/RenderFileUploadControl.h:
3310         * rendering/RenderFlexibleBox.h:
3311         * rendering/RenderFlowThread.h:
3312         * rendering/RenderFrame.h:
3313         * rendering/RenderFrameSet.h:
3314         * rendering/RenderFullScreen.cpp:
3315         * rendering/RenderFullScreen.h:
3316         * rendering/RenderGrid.h:
3317         * rendering/RenderHTMLCanvas.h:
3318         * rendering/RenderIFrame.h:
3319         * rendering/RenderImage.h:
3320         (RenderImage):
3321         (WebCore::RenderImage::isRenderImage):
3322         * rendering/RenderInline.h:
3323         (RenderInline):
3324         (WebCore::RenderInline::virtualContinuation):
3325         (WebCore::RenderInline::virtualChildren):
3326         (WebCore::RenderInline::isRenderInline):
3327         (WebCore::RenderInline::layout):
3328         (WebCore::RenderInline::requiresLayer):
3329         (WebCore::RenderInline::offsetWidth):
3330         (WebCore::RenderInline::offsetHeight):
3331         (WebCore::RenderInline::borderBoundingBox):
3332         (WebCore::RenderInline::dirtyLinesFromChangedChild):
3333         * rendering/RenderLayerModelObject.h:
3334         * rendering/RenderListBox.h:
3335         * rendering/RenderListItem.h:
3336         * rendering/RenderListMarker.h:
3337         * rendering/RenderMedia.h:
3338         (WebCore::RenderMedia::virtualChildren):
3339         (WebCore::RenderMedia::canHaveChildren):
3340         (WebCore::RenderMedia::isMedia):
3341         (WebCore::RenderMedia::isImage):
3342         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
3343         * rendering/RenderMediaControlElements.h:
3344         * rendering/RenderMenuList.h:
3345         * rendering/RenderMeter.h:
3346         * rendering/RenderMultiColumnBlock.h:
3347         * rendering/RenderMultiColumnFlowThread.h:
3348         * rendering/RenderMultiColumnSet.h:
3349         * rendering/RenderNamedFlowThread.h:
3350         * rendering/RenderPart.h:
3351         (RenderPart):
3352         (WebCore::RenderPart::isRenderPart):
3353         (WebCore::RenderPart::renderName):
3354         * rendering/RenderProgress.h:
3355         * rendering/RenderRegion.h:
3356         (WebCore::RenderRegion::isRenderRegion):
3357         * rendering/RenderRegionSet.h:
3358         * rendering/RenderReplaced.h:
3359         (RenderReplaced):
3360         (WebCore::RenderReplaced::renderName):
3361         * rendering/RenderReplica.h:
3362         * rendering/RenderRuby.h:
3363         * rendering/RenderRubyBase.h:
3364         * rendering/RenderRubyRun.h:
3365         * rendering/RenderRubyText.h:
3366         * rendering/RenderScrollbarPart.h:
3367         * rendering/RenderSearchField.h:
3368         * rendering/RenderSlider.h:
3369         * rendering/RenderSnapshottedPlugIn.h:
3370         (RenderSnapshottedPlugIn):
3371         * rendering/RenderTable.h:
3372         (RenderTable):
3373         (WebCore::RenderTable::renderName):
3374         (WebCore::RenderTable::isTable):
3375         (WebCore::RenderTable::avoidsFloats):
3376         * rendering/RenderTableCaption.h:
3377         * rendering/RenderTableCell.h:
3378         * rendering/RenderTableCol.h:
3379         * rendering/RenderTableRow.h:
3380         * rendering/RenderTableSection.h:
3381         * rendering/RenderText.h:
3382         (RenderText):
3383         (WebCore::RenderText::marginLeft):
3384         (WebCore::RenderText::marginRight):
3385         (WebCore::RenderText::styleWillChange):
3386         (WebCore::RenderText::length):
3387         (WebCore::RenderText::paint):
3388         (WebCore::RenderText::layout):
3389         * rendering/RenderTextControl.h:
3390         (RenderTextControl):
3391         (WebCore::RenderTextControl::renderName):
3392         (WebCore::RenderTextControl::isTextControl):
3393         (WebCore::RenderTextControl::avoidsFloats):
3394         * rendering/RenderTextControlMultiLine.h:
3395         * rendering/RenderTextControlSingleLine.h:
3396         (RenderTextControlSingleLine):
3397         (WebCore::RenderTextControlSingleLine::isTextField):
3398         * rendering/RenderTextFragment.h:
3399         * rendering/RenderTextTrackCue.h:
3400         * rendering/RenderVideo.h:
3401         * rendering/RenderView.h:
3402         * rendering/RenderWidget.h:
3403         (RenderWidget):
3404         (WebCore::RenderWidget::isWidget):
3405         * rendering/RenderWordBreak.h:
3406         * rendering/RootInlineBox.h:
3407         (RootInlineBox):
3408         * rendering/mathml/RenderMathMLBlock.h:
3409         * rendering/svg/RenderSVGBlock.h:
3410         (RenderSVGBlock):
3411         * rendering/svg/RenderSVGContainer.h:
3412         (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
3413         (WebCore::RenderSVGContainer::virtualChildren):
3414         (WebCore::RenderSVGContainer::isSVGContainer):
3415         (WebCore::RenderSVGContainer::renderName):
3416         (RenderSVGContainer):
3417         (WebCore::RenderSVGContainer::objectBoundingBox):
3418         (WebCore::RenderSVGContainer::strokeBoundingBox):
3419         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
3420         * rendering/svg/RenderSVGEllipse.h:
3421         * rendering/svg/RenderSVGForeignObject.h:
3422         * rendering/svg/RenderSVGGradientStop.h:
3423         * rendering/svg/RenderSVGHiddenContainer.h:
3424         (WebCore::RenderSVGHiddenContainer::renderName):
3425         (RenderSVGHiddenContainer):
3426         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
3427         * rendering/svg/RenderSVGImage.h:
3428         * rendering/svg/RenderSVGInline.h:
3429         (WebCore::RenderSVGInline::renderName):
3430         (WebCore::RenderSVGInline::requiresLayer):
3431         (WebCore::RenderSVGInline::isSVGInline):
3432         (RenderSVGInline):
3433         * rendering/svg/RenderSVGInlineText.h:
3434         * rendering/svg/RenderSVGModelObject.h:
3435         (WebCore::RenderSVGModelObject::requiresLayer):
3436         (RenderSVGModelObject):
3437         * rendering/svg/RenderSVGPath.h:
3438         * rendering/svg/RenderSVGRect.h:
3439         * rendering/svg/RenderSVGResourceClipper.h:
3440         * rendering/svg/RenderSVGResourceContainer.h:
3441         (RenderSVGResourceContainer):
3442         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
3443         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
3444         * rendering/svg/RenderSVGResourceFilter.h:
3445         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
3446         * rendering/svg/RenderSVGResourceGradient.h:
3447         (RenderSVGResourceGradient):
3448         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
3449         * rendering/svg/RenderSVGResourceLinearGradient.h:
3450         * rendering/svg/RenderSVGResourceMarker.h:
3451         * rendering/svg/RenderSVGResourceMasker.h:
3452         * rendering/svg/RenderSVGResourcePattern.h:
3453         * rendering/svg/RenderSVGResourceRadialGradient.h:
3454         * rendering/svg/RenderSVGRoot.h:
3455         * rendering/svg/RenderSVGShape.h:
3456         (WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
3457         (WebCore::RenderSVGShape::setNeedsTransformUpdate):
3458         (WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
3459         (WebCore::RenderSVGShape::localToParentTransform):
3460         (WebCore::RenderSVGShape::localTransform):
3461         (WebCore::RenderSVGShape::isSVGShape):
3462         (RenderSVGShape):
3463         (WebCore::RenderSVGShape::objectBoundingBox):
3464         (WebCore::RenderSVGShape::strokeBoundingBox):
3465         * rendering/svg/RenderSVGTSpan.h:
3466         * rendering/svg/RenderSVGText.h:
3467         * rendering/svg/RenderSVGTextPath.h:
3468         * rendering/svg/RenderSVGTransformableContainer.h:
3469         * rendering/svg/RenderSVGViewportContainer.h:
3470
3471 2013-05-12  Anders Carlsson  <andersca@apple.com>
3472
3473         Simplify AutodrainedPool
3474         https://bugs.webkit.org/show_bug.cgi?id=115986
3475
3476         Reviewed by Andreas Kling.
3477
3478         Remove calls to AutodrainedPool::cycle as well as the iteration counter passed to the constructor.
3479         Instead, just declare RAII pools where it seems necessary.
3480
3481         * Modules/webdatabase/DatabaseThread.cpp:
3482         (WebCore::DatabaseThread::databaseThread):
3483         * fileapi/FileThread.cpp:
3484         (WebCore::FileThread::runLoop):
3485         * loader/icon/IconDatabase.cpp:
3486         (WebCore::IconDatabase::setIconDataForIconURL):
3487         (WebCore::IconDatabase::performURLImport):
3488         (WebCore::IconDatabase::readFromDatabase):
3489
3490 2013-05-12  Andreas Kling  <akling@apple.com>
3491
3492         Apply FINAL to the Node hierarchy.
3493         <http://webkit.org/b/115984>
3494
3495         Mostly from Blink r149454 by <cevans@chromium.org>
3496         <http://src.chromium.org/viewvc/blink?view=revision&revision=149454>
3497
3498         A couple of the stable DOM/ microbenchmarks are perf positive on Linux clang:
3499
3500             - CloneNodes time reduced from 162.4 to 156.5 ms.
3501             - CreateNodes time reduced from 113.9 to 104.9 ms.
3502
3503         * dom/: Beat things with the FINAL stick.
3504         * html/: Ditto.
3505         * svg/: Ditto.
3506
3507 2013-05-12  Andreas Kling  <akling@apple.com>
3508
3509         Devirtualize some things on Document.
3510
3511         From Blink r149967 by <esprehn@chromium.org>
3512         <http://src.chromium.org/viewvc/blink?view=revision&revision=149967>
3513
3514         Several methods on Document are virtual but don't override a super class method
3515         and don't need to be virtual. This patch devirtualizes:
3516
3517             - createElementNS()
3518             - finishedParsing()
3519             - suspendScriptedAnimationControllerCallbacks()
3520             - resumeScriptedAnimationControllerCallbacks()
3521
3522         It also removes the suspend and resume callbacks from ScriptExecutionContext
3523         since they didn't need to be there.
3524
3525         * dom/Document.h:
3526         * dom/ScriptExecutionContext.h:
3527
3528 2013-05-12  Andreas Kling  <akling@apple.com>
3529
3530         Remove redundant call to removeAllEventListeners() in Document::open().
3531
3532         From Blink r150175 by <dcheng@chromium.org>
3533         <http://src.chromium.org/viewvc/blink?view=revision&revision=150175>
3534
3535         Document::open() already calls Document::removeAllEventListeners(), which
3536         removes the event listeners from the DOMWindow it's attached to, so
3537         there's no need to do it manually here as well.
3538
3539         * dom/Document.cpp:
3540         (WebCore::Document::open):
3541
3542 2013-05-12  Andreas Kling  <akling@apple.com>
3543
3544         Apply FINAL to the RenderObject hierarchy.
3545         <http://webkit.org/b/115977>
3546
3547         Mostly from Blink r148795 by <cevans@chromium.org>
3548         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
3549
3550         * rendering/: Beat things with the FINAL stick.
3551         * WebCore.exp.in: Export a now-needed symbol.
3552
3553 2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3554
3555         [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
3556         https://bugs.webkit.org/show_bug.cgi?id=115914
3557
3558         Reviewed by Martin Robinson.
3559
3560         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
3561         (WebCore::FullscreenVideoControllerGtk::hideHud):
3562         (WebCore::FullscreenVideoControllerGtk::initializeWindow):
3563         * platform/gtk/GtkVersioning.c:
3564         * platform/gtk/GtkVersioning.h:
3565         * platform/gtk/WidgetRenderingContext.cpp:
3566         (WebCore::WidgetRenderingContext::WidgetRenderingContext):
3567         * plugins/gtk/gtk2xtbin.c:
3568         (gtk_xtbin_realize):
3569
3570 2013-05-11  Brent Fulgham  <bfulgham@apple.com>
3571
3572         [Windows] Unreviewed build fix after r149932
3573
3574         * make-export-file-generator: Don't attempt to import
3575         (or use) non-existent cxxabi functions on Windows.
3576
3577 2013-05-11  Simon Fraser  <simon.fraser@apple.com>
3578
3579         Add more info to compositing log channel output
3580         https://bugs.webkit.org/show_bug.cgi?id=115978
3581
3582         Reviewed by Dean Jackson.
3583
3584         Add to compositing log channel output whether a layer paints
3585         into its compositing ancestor.
3586
3587         * rendering/RenderLayerCompositor.cpp:
3588         (WebCore::RenderLayerCompositor::logLayerInfo):
3589
3590 2013-05-10  Simon Fraser  <simon.fraser@apple.com>
3591
3592         REGRESSION: Fixed background on ColterReed.com scrolls
3593         https://bugs.webkit.org/show_bug.cgi?id=115951
3594
3595         Reviewed by Beth Dakin.
3596         
3597         The logic for painting the fixed root background into its own layer was
3598         broken when the document element's layer was composited. This could be caused
3599         by a negative z-index child of the body, or by an explicit compositing-causing
3600         style on the <html>.
3601         
3602         There were two issues. First, when painting the layer for the fixed root
3603         background, we would simply short-circuit the fixed background paint in
3604         RenderLayer::paintLayer(), when checking for a composited layer. We have
3605         to continue to paint through the composited <html> layer to get the root
3606         background in this case.
3607         
3608         Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground
3609         flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is
3610         composited, we need to skip painting the root layer for both the RenderView's backing,
3611         and for the <html>'s backing. Checking whether there is *any* layer that paints
3612         the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer())
3613         is a simple way to fix this test.
3614
3615         Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html
3616                platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html
3617
3618         * rendering/RenderLayer.cpp:
3619         (WebCore::paintForFixedRootBackground):
3620         (WebCore::RenderLayer::paintLayer):
3621         * rendering/RenderLayerBacking.cpp:
3622         (WebCore::RenderLayerBacking::paintIntoLayer):
3623
3624 2013-05-11  Simon Fraser  <simon.fraser@apple.com>
3625
3626         Possible crash when going Back while loading PDF
3627         https://bugs.webkit.org/show_bug.cgi?id=115972
3628
3629         Reviewed by Dan Bernstein.
3630
3631         It's possible for m_frame to be null when Document::findUnsafeParentScrollPropagationBoundary()
3632         is called, so null-check currentFrame.
3633
3634         * dom/Document.cpp:
3635         (WebCore::Document::findUnsafeParentScrollPropagationBoundary):
3636
3637 2013-05-11  Alexey Proskuryakov  <ap@apple.com>
3638
3639         <rdar://problem/13823864> TextCodecICU complains about ambiguous codec names with current ICU release
3640         https://bugs.webkit.org/show_bug.cgi?id=115953
3641
3642         Reviewed by Darin Adler.
3643
3644         Store and use canonical converter name to create converters.
3645
3646         As a side effect, we now actually reuse cached converters - previously we would compare
3647         a standard encoding name to internal canonical one, which rarely match.
3648
3649         * platform/text/TextCodecICU.h:
3650         * platform/text/TextCodecICU.cpp:
3651         (WebCore::TextCodecICU::create): Pass canonical ICU converter name to constructor.
3652         (WebCore::TextCodecICU::registerEncodingNames): 
3653             - Updated terminology.
3654             - Added a comment that special cases should be kept in sync between registerEncodingNames
3655             and registerCodecs.
3656             - Moved maccyrillic alias to a correct section. It's not present in ICU even today.
3657             - Changed a few aliases to actually map to standard name, not to an overridden one
3658             (this doesn't change behavior since addToTextEncodingNameMap looks up canonical
3659             name, but is clearer).
3660         (WebCore::TextCodecICU::registerCodecs): Store a converter name to use with each
3661         canonical encoding name.
3662         (WebCore::TextCodecICU::TextCodecICU): Ditto.
3663         (WebCore::TextCodecICU::releaseICUConverter): Reset the converter to remove any
3664         leftover data.
3665         (WebCore::TextCodecICU::createICUConverter): 
3666             - Compare converter name to converter name, not to another alias name.
3667             - Use proper string comparison instead of pointer comparison.
3668             - When creating a converter, assert that the name is not ambigous - canonical
3669             converter names should never be, otherwise there would be no way to create
3670             the converter without ambiguity.
3671
3672 2013-05-11  Antoine Quint  <graouts@apple.com>
3673
3674         [Mac] The captions menu should not use a canned max-width and max-height
3675         https://bugs.webkit.org/show_bug.cgi?id=115968
3676
3677         Reviewed by Eric Carlson.
3678
3679         Use more real estate to display the captions menu should the caption names
3680         be long.
3681
3682         * css/mediaControlsQuickTime.css:
3683         (video::-webkit-media-controls-closed-captions-container):
3684         (video::-webkit-media-controls-closed-captions-track-list):
3685         Make the captions menu scale to a max-width and max-height to allow 4px
3686         above and below the menu, except on the right where it always aligns with
3687         the captions icon in the media controller.
3688         * html/shadow/MediaControlsApple.cpp:
3689         (WebCore::MediaControlsApple::createControls):
3690         Move the captions menu element to be a child of the controls instead of
3691         the panel such that it may scale relative to the controls when using %
3692         CSS values.
3693
3694 2013-05-11  Jochen Eisinger  <jochen@chromium.org>
3695
3696         Disallow a window to focus itself via javascript URLs or using target _self
3697         https://bugs.webkit.org/show_bug.cgi?id=115906
3698
3699         Reviewed by Geoffrey Garen.
3700
3701         Test: fast/dom/Window/window-focus-self.html
3702
3703         * loader/FrameLoader.cpp:
3704         (WebCore::createWindow):
3705         * page/DOMWindow.cpp:
3706         (WebCore::DOMWindow::focus):
3707
3708 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3709
3710         Fix several style warnings in generated bindings
3711         https://bugs.webkit.org/show_bug.cgi?id=115961
3712
3713         Reviewed by Kentaro Hara.
3714
3715         Fix several style errors in the bindings generated under
3716         Source/WebCore/bindings/scripts/test/
3717
3718         No new tests, no behavior change.
3719
3720         * bindings/scripts/CodeGeneratorCPP.pm:
3721         (GenerateImplementation):
3722         (WriteData):
3723         * bindings/scripts/CodeGeneratorJS.pm:
3724         (GenerateHeader):
3725         (GenerateImplementation):
3726         (WriteData):
3727         * bindings/scripts/CodeGeneratorObjC.pm:
3728         (GenerateHeader):
3729         * bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
3730         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
3731         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
3732         * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
3733         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
3734         * bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
3735         * bindings/scripts/test/CPP/WebDOMTestException.cpp:
3736         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
3737         * bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
3738         * bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
3739         * bindings/scripts/test/CPP/WebDOMTestNode.cpp:
3740         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
3741         * bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp:
3742         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
3743         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
3744         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3745         (WebCore::toJS):
3746         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3747         (WebCore::JSTestActiveDOMObject::releaseImplIfNotNull):
3748         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3749         (WebCore::toJS):
3750         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3751         (WebCore::JSTestCustomNamedGetter::releaseImplIfNotNull):
3752         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3753         (WebCore::toJS):
3754         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3755         (WebCore::JSTestEventConstructor::releaseImplIfNotNull):
3756         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3757         (WebCore::toJS):
3758         * bindings/scripts/test/JS/JSTestEventTarget.h:
3759         (WebCore::JSTestEventTarget::releaseImplIfNotNull):
3760         * bindings/scripts/test/JS/JSTestException.cpp:
3761         (WebCore::toJS):
3762         * bindings/scripts/test/JS/JSTestException.h:
3763         (WebCore::JSTestException::releaseImplIfNotNull):
3764         * bindings/scripts/test/JS/JSTestInterface.cpp:
3765         (WebCore::toJS):
3766         * bindings/scripts/test/JS/JSTestInterface.h:
3767         (WebCore::JSTestInterface::releaseImplIfNotNull):
3768         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3769         (WebCore::toJS):
3770         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3771         (WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
3772         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3773         (WebCore::toJS):
3774         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3775         (WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
3776         * bindings/scripts/test/JS/JSTestObj.cpp:
3777         (WebCore::toJS):
3778         * bindings/scripts/test/JS/JSTestObj.h:
3779         (WebCore::JSTestObj::releaseImplIfNotNull):
3780         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3781         (WebCore::toJS):
3782         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3783         (WebCore::JSTestOverloadedConstructors::releaseImplIfNotNull):
3784         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3785         (WebCore::toJS):
3786         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3787         (WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
3788         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3789         (WebCore::toJS):
3790         * bindings/scripts/test/JS/JSTestTypedefs.h:
3791         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
3792         * bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
3793         (WebCore):
3794         * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
3795         (WebCore):
3796         * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
3797         (WebCore):
3798         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
3799         (WebCore):
3800         * bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
3801         (WebCore):
3802         * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
3803         (WebCore):
3804         * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
3805         (WebCore):
3806         * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
3807         (WebCore):
3808         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
3809         (WebCore):
3810         * bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
3811         (WebCore):
3812         * bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
3813         (WebCore):
3814         * bindings/scripts/test/ObjC/DOMTestObjInternal.h:
3815         (WebCore):
3816         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
3817         (WebCore):
3818         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
3819         (WebCore):
3820         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
3821         (WebCore):
3822
3823 2013-05-11  Anders Carlsson  <andersca@apple.com>
3824
3825         Make it a build error to put invalid C++ symbol names in WebCore.exp.in
3826         https://bugs.webkit.org/show_bug.cgi?id=115958
3827
3828         Reviewed by Andreas Kling.
3829
3830         While invalid C++ symbols will eventually show up as a link error since the symbol won't be found,
3831         this makes it easier to catch invalid symbols inside of #ifdefs.
3832
3833         * make-export-file-generator:
3834         Try to demangle C++ symbols before printing them.
3835
3836 2013-05-11  David Kilzer  <ddkilzer@apple.com>
3837
3838         BUILD FIX (r149718): Move exported symbol into ENABLE(FULLSCREEN_API) section
3839
3840         Fixes the following build failure when ENABLE(FULLSCREEN_API) is
3841         off:
3842
3843             Undefined symbols for architecture i386:
3844               "__ZNK7WebCore7Element25containsFullScreenElementEv", referenced from:
3845                  -exported_symbol[s_list] command line option
3846
3847         * WebCore.exp.in: Move the symbol.
3848
3849 2013-05-11  Robert Hogan  <robert@webkit.org>
3850
3851         Unreviewed, remove some lint accidentally left in r149929.
3852
3853         * rendering/InlineFlowBox.cpp:
3854         (WebCore::verticalAlignApplies):
3855
3856 2013-03-17  Robert Hogan  <robert@webkit.org>
3857
3858         Text flow broken in elements with vertical align top/bottom and inline elements taller than line-height
3859         https://bugs.webkit.org/show_bug.cgi?id=111974
3860
3861         Reviewed by Ryosuke Niwa.
3862         
3863         Per http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align 'vertical-align' only applies to inline and table-cell
3864         elements.
3865
3866         Test: fast/css/vertical-align-block-elements.html
3867
3868         * rendering/InlineFlowBox.cpp:
3869         (WebCore::isTextInBlockElement):
3870         (WebCore):
3871         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
3872         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
3873         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3874
3875 2013-05-11  Benjamin Poulain  <bpoulain@apple.com>
3876
3877         Make CanvasStyle a plain object instead of an RefCounted object
3878         https://bugs.webkit.org/show_bug.cgi?id=115775
3879
3880         Reviewed by Andreas Kling.
3881
3882         CanvasStyle is just 2 words wide. We do not gain anything from allocating
3883         it on the heap. Change the object to be just a type and some data.
3884
3885         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3886         (WebCore::toJS):
3887         (WebCore::toHTMLCanvasStyle):
3888         * html/HTMLCanvasElement.cpp:
3889         * html/canvas/CanvasRenderingContext2D.cpp:
3890         (WebCore::CanvasRenderingContext2D::State::State):
3891         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
3892         (WebCore::CanvasRenderingContext2D::setFillStyle):
3893         (WebCore::CanvasRenderingContext2D::setStrokeColor):
3894         (WebCore::CanvasRenderingContext2D::setFillColor):
3895         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
3896         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3897         * html/canvas/CanvasRenderingContext2D.h:
3898         (WebCore::CanvasRenderingContext2D::strokeStyle):
3899         (CanvasRenderingContext2D):
3900         (WebCore::CanvasRenderingContext2D::fillStyle):
3901         (State):
3902         * html/canvas/CanvasStyle.cpp:
3903         (WebCore::CanvasStyle::CanvasStyle):
3904         (WebCore::CanvasStyle::createFromString):
3905         (WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
3906         (WebCore::CanvasStyle::isEquivalentColor):
3907         (WebCore):
3908         (WebCore::CanvasStyle::operator=):
3909         (WebCore::CanvasStyle::applyStrokeColor):
3910         (WebCore::CanvasStyle::applyFillColor):
3911         * html/canvas/CanvasStyle.h:
3912         (CanvasStyle):
3913         (WebCore::CanvasStyle::isValid):
3914         (WebCore::CanvasStyle::CanvasStyle):
3915         (WebCore):
3916         (WebCore::CanvasStyle::operator=):
3917
3918 2013-05-11  Benjamin Poulain  <benjamin@webkit.org>
3919
3920         Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
3921         https://bugs.webkit.org/show_bug.cgi?id=115779
3922
3923         Reviewed by Andreas Kling.
3924
3925         * platform/graphics/cg/GradientCG.cpp:
3926         (WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
3927         all the branches of this function. Remove two more with reserveInitialCapacity.
3928
3929 2013-05-10  Alexey Proskuryakov  <ap@apple.com>
3930
3931         <rdar://problem/13666412> Clean up some edge cases of URL parsing.
3932         https://bugs.webkit.org/show_bug.cgi?id=104919
3933
3934         Reviewed by Darin Adler.
3935
3936         Test: fast/url/segments-userinfo-vs-host.html
3937
3938         * page/SecurityOrigin.cpp:
3939         (WebCore::schemeRequiresHost):
3940         (WebCore::shouldTreatAsUniqueOrigin):
3941         Updated function name and comments (host is not the same as authority). We still
3942         need this check - KURL can still produce http URLs with an empty host (even as this
3943         patch reduces the number of such cases). So can Gecko and current draft of URL
3944         Standard.
3945         It would be good to have a guarantee that such useless URLs can not come out of
3946         URL parser, as relying on downstream code re-parsing the URL correctly would be fragile.
3947
3948         * platform/KURL.cpp:
3949         (WebCore::hostPortIsEmptyButCredentialsArePresent): Updated an argument name for
3950         correctness.
3951         (WebCore::KURL::parse):
3952         1. Reverted behavior changes from <http://trac.webkit.org/changeset/82181> - I could
3953         find no reason to allow "@" in hostnames, and having a URL like this re-parsed by
3954         a different parser would likely produce different results. It's better to just treat
3955         these edge case URLs as invalid.
3956         2. When hostname component is a lone colon, preserve it in parsed URL string,
3957         as otherwise path would get pushed in its place when re-parsing.
3958         3. When authority component is a lone colon, don't forget to "//" after scheme, too.
3959         4. Added some assertions about contents of authority component, to catch potential
3960         mis-parsing earlier.
3961
3962 2013-05-10  Alexey Proskuryakov  <ap@apple.com>
3963
3964         Make TextCodecICU not depend on TextEncoding
3965         https://bugs.webkit.org/show_bug.cgi?id=115848
3966
3967         Reviewed by Darin Adler.
3968
3969         * platform/text/TextCodecICU.cpp:
3970         (WebCore::TextCodecICU::create):
3971         (WebCore::TextCodecICU::TextCodecICU):
3972         (WebCore::TextCodecICU::createICUConverter):
3973         (WebCore::TextCodecICU::decode):
3974         (WebCore::TextCodecICU::encode):
3975         * platform/text/TextCodecICU.h:
3976         Use a plain encoding string in platform encoder wrapper, not a higher level concept.
3977
3978 2013-05-10  Laszlo Gombos  <l.gombos@samsung.com>
3979
3980         Remove Mac OS X Leopard (10.5) support
3981         https://bugs.webkit.org/show_bug.cgi?id=107964
3982
3983         Reviewed by Ryosuke Niwa.
3984
3985         Removed the code for 10.5 and removed if-def for 10.6.
3986
3987         No new tests, covered by existing tests.
3988
3989         * platform/LocalizedStrings.cpp:
3990         (WebCore::contextMenuItemTagLookUpInDictionary):
3991         * platform/graphics/cg/GraphicsContextCG.cpp:
3992         * platform/mac/EmptyProtocolDefinitions.h:
3993         * platform/mac/NSScrollerImpDetails.h:
3994         * platform/mac/WebCoreSystemInterface.h:
3995         * platform/text/mac/HyphenationMac.mm:
3996
3997 2013-05-10  Laszlo Gombos  <l.gombos@samsung.com>
3998
3999         Remove USE(OS_RANDOMNESS)
4000         https://bugs.webkit.org/show_bug.cgi?id=108095
4001
4002         Reviewed by Darin Adler.
4003
4004         Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
4005         ports.
4006
4007         No new tests as this is covered by existing tests.
4008
4009         * page/Crypto.cpp:
4010         (WebCore::Crypto::getRandomValues):
4011         * platform/UUID.cpp:
4012         (WebCore::createCanonicalUUIDString):
4013
4014 2013-05-10  Christophe Dumez  <ch.dumez@sisa.samsung.com>
4015
4016         Remove [NoInterfaceObject] from several WebAudio IDL interfaces
4017         https://bugs.webkit.org/show_bug.cgi?id=115894
4018
4019         Reviewed by Darin Adler.
4020
4021         Several WebAudio IDL interfaces had [NoInterfaceObject] extended attribute set,
4022         meaning that there was no corresponding attribute on the global window object.
4023         This behavior is not according to the specification:
4024         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
4025
4026         This patch removes the [NoInterfaceObject] extended attribute where needed to
4027         match the specification.
4028
4029         No new tests, already covered by existing tests.
4030
4031         * Modules/webaudio/AnalyserNode.idl:
4032         * Modules/webaudio/AudioBuffer.idl:
4033         * Modules/webaudio/AudioBufferSourceNode.idl:
4034         * Modules/webaudio/AudioDestinationNode.idl:
4035         * Modules/webaudio/AudioListener.idl:
4036         * Modules/webaudio/AudioNode.idl:
4037         * Modules/webaudio/AudioParam.idl:
4038         * Modules/webaudio/BiquadFilterNode.idl:
4039         * Modules/webaudio/ChannelMergerNode.idl:
4040         * Modules/webaudio/ChannelSplitterNode.idl:
4041         * Modules/webaudio/ConvolverNode.idl:
4042         * Modules/webaudio/DelayNode.idl:
4043         * Modules/webaudio/DynamicsCompressorNode.idl:
4044         * Modules/webaudio/GainNode.idl:
4045         * Modules/webaudio/MediaElementAudioSourceNode.idl:
4046         * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
4047         * Modules/webaudio/MediaStreamAudioSourceNode.idl:
4048         * Modules/webaudio/OscillatorNode.idl:
4049         * Modules/webaudio/ScriptProcessorNode.idl:
4050         * Modules/webaudio/WaveShaperNode.idl: