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