Render tree teardown should be iterative
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-04-05  Antti Koivisto  <antti@apple.com>
2
3         Render tree teardown should be iterative
4         https://bugs.webkit.org/show_bug.cgi?id=156233
5
6         Reviewed by Andreas Kling.
7
8         * dom/ContainerNode.cpp:
9         (WebCore::destroyRenderTreeIfNeeded):
10         (WebCore::ContainerNode::takeAllChildrenFrom):
11         * dom/Document.cpp:
12         (WebCore::Document::destroyRenderTree):
13         * dom/Element.cpp:
14         (WebCore::disconnectPseudoElement):
15         * html/HTMLPlugInImageElement.cpp:
16         (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension):
17         * mathml/MathMLSelectElement.cpp:
18         (WebCore::MathMLSelectElement::updateSelectedChild):
19         * style/RenderTreeUpdater.cpp:
20         (WebCore::RenderTreeUpdater::updateElementRenderer):
21         (WebCore::RenderTreeUpdater::updateTextRenderer):
22         (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
23         (WebCore::RenderTreeUpdater::tearDownRenderers):
24
25             Tear down render tree using ComposedTreeIterator for traversal.
26
27         (WebCore::RenderTreeUpdater::tearDownRenderer):
28
29         * style/RenderTreeUpdater.h:
30         * style/StyleTreeResolver.cpp:
31         (WebCore::Style::ensurePlaceholderStyle):
32         (WebCore::Style::TreeResolver::styleForElement):
33         (WebCore::Style::resetStyleForNonRenderedDescendants):
34         (WebCore::Style::affectsRenderedSubtree):
35         (WebCore::Style::SelectorFilterPusher::SelectorFilterPusher): Deleted.
36         (WebCore::Style::SelectorFilterPusher::push): Deleted.
37         (WebCore::Style::SelectorFilterPusher::~SelectorFilterPusher): Deleted.
38
39             Unused class.
40
41         (WebCore::Style::detachTextRenderer): Deleted.
42         (WebCore::Style::detachChildren): Deleted.
43         (WebCore::Style::detachShadowRoot): Deleted.
44         (WebCore::Style::detachSlotAssignees): Deleted.
45         (WebCore::Style::detachRenderTree): Deleted.
46
47             Remove the old recursive code.
48
49         * style/StyleTreeResolver.h:
50
51 2016-04-05  Antoine Quint  <graouts@apple.com>
52
53         [WebGL2] Allow enabling WebGL2 with a runtime flag
54         https://bugs.webkit.org/show_bug.cgi?id=156166
55         <rdar://problem/25526929>
56
57         Added new runtime flags for WebGL2.
58
59         Reviewed by Dean Jackson.
60
61         * bindings/generic/RuntimeEnabledFeatures.h:
62         (WebCore::RuntimeEnabledFeatures::setWebGL2Enabled):
63         (WebCore::RuntimeEnabledFeatures::webGL2Enabled):
64
65 2016-04-05  Antti Koivisto  <antti@apple.com>
66
67         Use RenderTreeUpdater for text node mutations
68         https://bugs.webkit.org/show_bug.cgi?id=156107
69
70         Reviewed by Andreas Kling.
71
72         Use the new mechanism for updating render tree after text node content changes.
73
74         * dom/CharacterData.cpp:
75         (WebCore::CharacterData::parserAppendData):
76         (WebCore::CharacterData::setDataAndUpdate):
77         * dom/Text.cpp:
78         (WebCore::Text::createWithLengthLimit):
79         (WebCore::Text::updateRendererAfterContentChange):
80
81             Update using RenderTreeUpdater.
82
83         (WebCore::Text::formatForDebugger):
84         * dom/Text.h:
85         (WebCore::Text::Text):
86         * style/StyleTreeResolver.cpp:
87         (WebCore::Style::TreeResolver::styleForElement):
88         (WebCore::Style::resetStyleForNonRenderedDescendants):
89         (WebCore::Style::TreeResolver::resolveElement):
90         (WebCore::Style::elementImplicitVisibility):
91         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded): Deleted.
92         (WebCore::Style::textRendererIsNeeded): Deleted.
93         (WebCore::Style::createTextRendererIfNeeded): Deleted.
94         (WebCore::Style::attachTextRenderer): Deleted.
95         (WebCore::Style::detachTextRenderer): Deleted.
96         (WebCore::Style::updateTextRendererAfterContentChange): Deleted.
97         (WebCore::Style::resolveTextNode): Deleted.
98
99             Kill the old code paths.
100
101         * style/StyleTreeResolver.h:
102
103 2016-04-05  Hunseop Jeong  <hs85.jeong@samsung.com>
104
105         [Curl][Soup] Fix the build after r199039
106         https://bugs.webkit.org/show_bug.cgi?id=156229 
107
108         Reviewed by Žan Doberšek.
109
110         * platform/network/curl/SocketStreamHandle.h:
111         (WebCore::SocketStreamHandle::create):
112         * platform/network/soup/SocketStreamHandle.h:
113         (WebCore::SocketStreamHandle::create):
114
115 2016-04-04  Zan Dobersek  <zdobersek@igalia.com>
116
117         Guard showGraphicsLayerTree() with ENABLE(TREE_DEBUGGING)
118         https://bugs.webkit.org/show_bug.cgi?id=156157
119
120         Reviewed by Simon Fraser.
121
122         Mimic r181166 and guard the showGraphicsLayerTree() function with
123         ENABLE(TREE_DEBUGGING) guards, instead of !defined(NDEBUG). This
124         would enable invoking the function in release builds when the
125         ENABLE_TREE_DEBUGGING option is enabled, not limiting the function
126         to only debug builds.
127
128         * platform/graphics/GraphicsLayer.cpp:
129         * platform/graphics/GraphicsLayer.h:
130
131 2016-04-04  Zan Dobersek  <zdobersek@igalia.com>
132
133         [TexMap] Improve viewport array access in TextureMapperGL::bindDefaultSurface()
134         https://bugs.webkit.org/show_bug.cgi?id=156159
135
136         Reviewed by Antonio Gomes.
137
138         * platform/graphics/texmap/TextureMapperGL.cpp:
139         (WebCore::TextureMapperGL::bindDefaultSurface): Create a reference to the
140         viewport array in the TextureMapperGLData object. Inline the IntSize constructor
141         for the object that's passed to createProjectionMatrix(), and use the reference
142         to access all four elements of the array as necessary.
143
144 2016-04-04  Zan Dobersek  <zdobersek@igalia.com>
145
146         [TexMap] resolveOverlaps() should be passed-in the first Region parameter via a reference
147         https://bugs.webkit.org/show_bug.cgi?id=156158
148
149         Reviewed by Antonio Gomes.
150
151         * platform/graphics/texmap/TextureMapperLayer.cpp:
152         (WebCore::resolveOverlaps): Don't copy the Region object that's passed through
153         the first parameter by accepting a reference to the object instead. This does
154         modify the passed-in object, but these modifications don't have any effect on
155         any state via the call sites in TextureMapperLayer::computeOverlapRegions().
156
157 2016-04-04  Brady Eidson  <beidson@apple.com>
158
159         Modern IDB: Dump blobs to disk before storing them in an object store.
160         https://bugs.webkit.org/show_bug.cgi?id=156068
161         
162         Reviewed by Alex Christensen.
163
164         No new tests (Under development, no observable change in behavior yet).
165
166         * WebCore.xcodeproj/project.pbxproj:
167         * CMakeLists.txt:
168
169         * Modules/indexeddb/IDBTransaction.cpp:
170         (WebCore::IDBTransaction::putOrAddOnServer):
171         
172         * Modules/indexeddb/IDBValue.cpp: Copied from Source/WebCore/platform/ScopeGuard.h.
173         (WebCore::IDBValue::IDBValue):
174         * Modules/indexeddb/IDBValue.h: Copied from Source/WebCore/platform/ScopeGuard.h.
175         
176         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
177         (WebCore::IDBClient::IDBConnectionToServer::putOrAdd):
178         * Modules/indexeddb/client/IDBConnectionToServer.h:
179         
180         * Modules/indexeddb/client/TransactionOperation.h:
181         
182         * bindings/js/SerializedScriptValue.cpp:
183         (WebCore::SerializedScriptValue::SerializedScriptValue):
184         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
185         (WebCore::SerializedScriptValue::addBlobURL): Deleted.
186         * bindings/js/SerializedScriptValue.h:
187         
188         * platform/FileSystem.cpp:
189         (WebCore::appendFileContentsToFileHandle):
190         * platform/FileSystem.h:
191         
192         * platform/ScopeGuard.h:
193         
194         * platform/network/BlobRegistry.h:
195         * platform/network/BlobRegistryImpl.cpp:
196         (WebCore::blobUtilityQueue):
197         (WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles):
198         * platform/network/BlobRegistryImpl.h:
199
200 2016-04-04  Jer Noble  <jer.noble@apple.com>
201
202         [iOS] Crash when playing <video> after playing Web Audio
203         https://bugs.webkit.org/show_bug.cgi?id=156185
204         <rdar://problem/10177005>
205
206         Reviewed by Eric Carlson.
207
208         Off-by-one error in AudioDestinationIOS::render. The ivars m_firstSpareFrame and m_lastSpareFrame imply that
209         the sample range is inclusive, i.e. [m_firstSpareFrame .. m_lastSpareFrame], but the length of the range was
210         being calculated as if m_lastSpareFrame was exclusive; when the two were equal, the length was calculated as
211         0, rather than 1. This was caught by an ASSERT (and would have been caught by a downstream ASSERT had that one
212         not been present).
213
214         Fix the off-by-one by treating them as inclusive/exclusive--similar to C++ iterators--and renaming them to reflect
215         this: [m_startSpareFrame .. m_endSpareFrame). This corrects the "length" math which caused the crash.
216
217         * platform/audio/ios/AudioDestinationIOS.cpp:
218         (WebCore::AudioDestinationIOS::render):
219         * platform/audio/ios/AudioDestinationIOS.h:
220
221 2016-04-04  John Wilander  <wilander@apple.com>
222
223         Block plaintext WebSocket requests to domains under HSTS.
224         https://bugs.webkit.org/show_bug.cgi?id=156049
225         <rdar://problem/13820000>
226
227         Reviewed by Brent Fulgham.
228
229         No new tests because the way TLS is setup for layout tests doesn't allow the server to set HSTS for 127.0.0.1 nor localhost. This is tracked in <rdar://problem/25467825>.
230
231         * Modules/websockets/WebSocketChannel.cpp:
232         (WebCore::WebSocketChannel::connect):
233             - Now sends usesEphemeralSession to SocketStreamHandle::create.
234         * platform/network/cf/SocketStreamHandle.h:
235         (WebCore::SocketStreamHandle::create):
236             - Added parameter usesEphemeralSession which it passes on to the SocketStreamHandle constructor.
237         * platform/network/cf/SocketStreamHandleCFNet.cpp:
238         (WebCore::SocketStreamHandle::SocketStreamHandle):
239             - Now blocks plaintext WebSocket connections for domains under HSTS if not in an ephemeral session.
240
241 2016-04-04  Simon Fraser  <simon.fraser@apple.com>
242
243         Make FrameView's exposedRect an Optional<>
244         https://bugs.webkit.org/show_bug.cgi?id=156189
245
246         Reviewed by Tim Horton.
247
248         Instead of testing against isInfinite(), make FrameView::exposedRect() and the
249         member variable an Optional<FloatRect>.
250
251         * page/FrameView.cpp:
252         (WebCore::FrameView::setExposedRect):
253         * page/FrameView.h:
254         * rendering/RenderLayerBacking.cpp:
255         (WebCore::computeTileCoverage):
256         * rendering/RenderLayerCompositor.cpp:
257         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
258
259 2016-04-04  Simon Fraser  <simon.fraser@apple.com>
260
261         Don't crash when rendering form controls with Display List Drawing enabled
262         https://bugs.webkit.org/show_bug.cgi?id=156122
263
264         Reviewed by Sam Weinig.
265         
266         Don't attempt to paint form controls if display-list drawing is enabled, since
267         doing so attempts to get at a CGContextRef that doens't exist.
268
269         * rendering/RenderTheme.cpp:
270         (WebCore::RenderTheme::paint):
271
272 2016-04-04  Zalan Bujtas  <zalan@apple.com>
273
274         CSS Triangles Rendering Regression affecting CSS Ribbons.
275         https://bugs.webkit.org/show_bug.cgi?id=156121
276
277         Reviewed by Simon Fraser.
278
279         We use floored border width values for painting (see BorderEdge).
280         However border-box sizing is based on rounded border values. This mismatch could result in a 2 device pixel
281         gap when both top and bottom (or left and right) borders are present.
282         
283         This patch applies flooring on the computed border width value.
284
285         It matches FireFox (44.0.2) behaviour (both by inspecting box-sizing visually and through getComputedStyle() values on border-width).
286     
287         Covered by existing tests.
288
289         * css/StyleBuilderConverter.h:
290         (WebCore::StyleBuilderConverter::convertLineWidth):
291
292 2016-04-04  Doug Russell  <d_russell@apple.com>
293
294         AX: new lines in content editable elements don't notify accessibility
295         https://bugs.webkit.org/show_bug.cgi?id=153361
296
297         Reviewed by Ryosuke Niwa.
298
299         Relocate accessibility edit notification logic into higher level logic.
300         Typing notifications relocated into TypingCommand.
301         Cut & Paste notifications relocated into Editor.
302         Undo relocated into EditCommandComposition.
303
304         Tests: accessibility/mac/value-change/value-change-user-info-contenteditable.html
305                accessibility/mac/value-change/value-change-user-info-textarea.html
306                accessibility/mac/value-change/value-change-user-info-textfield.html
307
308         * CMakeLists.txt:
309         * WebCore.xcodeproj/project.pbxproj:
310         * accessibility/AXObjectCache.cpp:
311         (WebCore::AccessibilityReplacedText::AccessibilityReplacedText):
312         (WebCore::AccessibilityReplacedText::postTextStateChangeNotification):
313         (WebCore::AXObjectCache::postTextStateChangeNotification):
314         (WebCore::AXObjectCache::postTextReplacementNotification):
315         * accessibility/AXObjectCache.h:
316         (WebCore::VisiblePositionIndexRange::isNull):
317         (WebCore::AccessibilityReplacedText::AccessibilityReplacedText):
318         (WebCore::AccessibilityReplacedText::replacedRange):
319         * accessibility/AccessibilityObject.cpp:
320         (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
321         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
322         * accessibility/AccessibilityObject.h:
323         (WebCore::VisiblePositionRange::VisiblePositionRange):
324         * accessibility/mac/AXObjectCacheMac.mm:
325         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
326         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
327         * editing/AppendNodeCommand.cpp:
328         (WebCore::AppendNodeCommand::doApply): Deleted.
329         (WebCore::AppendNodeCommand::doUnapply): Deleted.
330         * editing/CompositeEditCommand.cpp:
331         (WebCore::AccessibilityUndoReplacedText::indexForVisiblePosition):
332         (WebCore::AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyIndexesWithEditCommandEndingSelection):
333         (WebCore::AccessibilityUndoReplacedText::confgureTextToBeDeletedByUnapplyStartIndexWithEditCommandStartingSelection):
334         (WebCore::AccessibilityUndoReplacedText::setTextInsertedByUnapplyRange):
335         (WebCore::AccessibilityUndoReplacedText::captureTextToBeDeletedByUnapply):
336         (WebCore::AccessibilityUndoReplacedText::captureTextToBeDeletedByReapply):
337         (WebCore::stringForVisiblePositionIndexRange):
338         (WebCore::AccessibilityUndoReplacedText::textInsertedByUnapply):
339         (WebCore::AccessibilityUndoReplacedText::textInsertedByReapply):
340         (WebCore::postTextStateChangeNotification):
341         (WebCore::AccessibilityUndoReplacedText::postTextStateChangeNotificationForUnapply):
342         (WebCore::AccessibilityUndoReplacedText::postTextStateChangeNotificationForReapply):
343         (WebCore::EditCommandComposition::EditCommandComposition):
344         (WebCore::EditCommandComposition::unapply):
345         (WebCore::EditCommandComposition::reapply):
346         (WebCore::EditCommandComposition::setStartingSelection):
347         (WebCore::EditCommandComposition::setEndingSelection):
348         (WebCore::EditCommandComposition::setTextInsertedByUnapplyRange):
349         (WebCore::CompositeEditCommand::removeNode):
350         (WebCore::CompositeEditCommand::replaceTextInNode):
351         (WebCore::deleteSelectionEditingActionForEditingAction):
352         (WebCore::CompositeEditCommand::deleteSelection):
353         (WebCore::CompositeEditCommand::applyStyle): Deleted.
354         (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren): Deleted.
355         (WebCore::CompositeEditCommand::inputText): Deleted.
356         * editing/CompositeEditCommand.h:
357         (WebCore::AccessibilityUndoReplacedText::AccessibilityUndoReplacedText):
358         * editing/DeleteFromTextNodeCommand.cpp:
359         (WebCore::DeleteFromTextNodeCommand::doApply): Deleted.
360         (WebCore::DeleteFromTextNodeCommand::getNodesInCommand): Deleted.
361         * editing/DeleteFromTextNodeCommand.h:
362         * editing/DictationCommand.cpp:
363         (WebCore::DictationCommand::doApply):
364         * editing/EditCommand.cpp:
365         (WebCore::EditCommand::postTextStateChangeNotification):
366         (WebCore::SimpleEditCommand::SimpleEditCommand): Deleted.
367         (WebCore::SimpleEditCommand::doReapply): Deleted.
368         (WebCore::SimpleEditCommand::addNodeAndDescendants): Deleted.
369         * editing/EditCommand.h:
370         * editing/EditingAllInOne.cpp:
371         * editing/Editor.cpp:
372         (WebCore::Editor::replaceSelectionWithFragment):
373         (WebCore::Editor::appliedEditing):
374         (WebCore::Editor::unappliedEditing):
375         (WebCore::Editor::postTextStateChangeNotificationForCut):
376         (WebCore::Editor::performCutOrCopy):
377         (WebCore::Editor::changeSelectionAfterCommand):
378         (WebCore::dispatchEditableContentChangedEvents): Deleted.
379         (WebCore::Editor::addTextToKillRing): Deleted.
380         * editing/Editor.h:
381         * editing/InsertIntoTextNodeCommand.cpp:
382         (WebCore::InsertIntoTextNodeCommand::doApply): Deleted.
383         (WebCore::InsertIntoTextNodeCommand::getNodesInCommand): Deleted.
384         * editing/InsertNodeBeforeCommand.cpp:
385         (WebCore::InsertNodeBeforeCommand::doApply): Deleted.
386         (WebCore::InsertNodeBeforeCommand::doUnapply): Deleted.
387         (WebCore::InsertNodeBeforeCommand::getNodesInCommand): Deleted.
388         * editing/RemoveNodeCommand.cpp:
389         (WebCore::RemoveNodeCommand::RemoveNodeCommand):
390         * editing/RemoveNodeCommand.h:
391         (WebCore::RemoveNodeCommand::create):
392         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Removed.
393         * editing/ReplaceDeleteFromTextNodeCommand.h: Removed.
394         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Removed.
395         * editing/ReplaceInsertIntoTextNodeCommand.h: Removed.
396         * editing/ReplaceSelectionCommand.cpp:
397         (WebCore::ReplaceSelectionCommand::doApply):
398         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
399         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
400         * editing/ReplaceSelectionCommand.h:
401         (WebCore::ReplaceSelectionCommand::visibleSelectionForInsertedText):
402         * editing/TextInsertionBaseCommand.cpp:
403         (WebCore::TextInsertionBaseCommand::TextInsertionBaseCommand):
404         * editing/TextInsertionBaseCommand.h:
405         * editing/TypingCommand.cpp:
406         (WebCore::TypingCommand::TypingCommand):
407         (WebCore::TypingCommand::insertText):
408         (WebCore::TypingCommand::insertLineBreak):
409         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
410         (WebCore::TypingCommand::insertParagraphSeparator):
411         (WebCore::TypingCommand::postTextStateChangeNotificationForDeletion):
412         (WebCore::TypingCommand::doApply):
413         (WebCore::TypingCommand::insertTextAndNotifyAccessibility):
414         (WebCore::TypingCommand::insertLineBreakAndNotifyAccessibility):
415         (WebCore::TypingCommand::insertParagraphSeparatorAndNotifyAccessibility):
416         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContentAndNotifyAccessibility):
417         (WebCore::TypingCommand::deleteKeyPressed):
418         (WebCore::TypingCommand::forwardDeleteKeyPressed):
419         * editing/TypingCommand.h:
420
421 2016-04-04  Dean Jackson  <dino@apple.com>
422
423         Add color-gamut media query support
424         https://bugs.webkit.org/show_bug.cgi?id=155994
425         <rdar://problem/23282326>
426
427         Reviewed by Darin Adler.
428
429         Add the new CSS media query: color-gamut
430         https://drafts.csswg.org/mediaqueries-4/#color-gamut
431
432         This ultimately calls into screenSupportsExtendedColor,
433         which has only been implemented on iOS at the moment.
434         All displays will match the "srgb" keyword, but only
435         iOS devices with an extended color screen will
436         match against "p3" (e.g. the iPad Pro 9.7").
437         Nothing will match against "rec2020".
438
439         Test: fast/media/mq-color-gamut.html
440
441         * css/CSSValueKeywords.in: Add "p3" and "rec2020".
442         * css/MediaFeatureNames.h: Add "color-gamut"
443         * css/MediaQueryEvaluator.cpp:
444         (WebCore::color_gamutMediaFeatureEval): Call
445         screenSupportsExtendedColor to see if we're srgb or p3.
446         * css/MediaQueryExp.cpp:
447         (WebCore::featureWithCSSValueID):
448         * platform/efl/PlatformScreenEfl.cpp: Add empty implementation.
449         (WebCore::screenSupportsExtendedColor):
450         * platform/gtk/PlatformScreenGtk.cpp: Ditto.
451         (WebCore::screenSupportsExtendedColor):
452         * platform/win/PlatformScreenWin.cpp: Ditto.
453         (WebCore::screenSupportsExtendedColor):
454
455 2016-04-04  Brent Fulgham  <bfulgham@apple.com>
456
457         Update feature status on anchor download attribute.
458
459         * features.json:
460
461 2016-04-04  Beth Dakin  <bdakin@apple.com>
462
463         Add some logic to decide when a video can control the videoControlsManager
464         https://bugs.webkit.org/show_bug.cgi?id=156089
465         -and corresponding-
466         rdar://problem/23833752
467
468         Reviewed by Eric Carlson and Tim Horton.
469
470         With this patch, a video can take over the videoControlsManager if all of 
471         these conditions are met:
472         -Playback is permitted
473         -The video has a renderer
474         -The video is 400x300 or larger
475         AND
476         -The video has both audio and video
477
478         If those criteria are not met the video will still be allowed to take over 
479         the videoControlsManager if:
480         -Playback is permitted
481         -The video has a renderer
482         -The video started playing because of a user gesture.
483
484         If multiple videos meet this criteria, then the video that most recently 
485         started playing will take over the videoControlsManager.
486
487         We might consider more restrictions in the future, but this seems like a good 
488         place to start.
489
490         Move all decisions about the videoControlsManager to updatePlayState() 
491         instead of playInternal().
492         * html/HTMLMediaElement.cpp:
493         (WebCore::HTMLMediaElement::playInternal):
494
495         If the video will play after updatePlayState, then invoke 
496         setUpVideoControlsManager() if canControlControlsManager() is true. If the 
497         video will not be playing after updatePlayState, then check to see if 
498         endedPlayback() is true. If it is, then invoke clearVideoControlsManager().
499         (WebCore::HTMLMediaElement::updatePlayState):
500
501         The logic for the heuristic is here:
502         * html/MediaElementSession.cpp:
503         (WebCore::MediaElementSession::canControlControlsManager):
504         * html/MediaElementSession.h:
505
506         New ChromeClient function clearVideoControlsManager().
507         * page/ChromeClient.h:
508
509 2016-04-03  Sam Weinig  <sam@webkit.org>
510
511         Add SPI to allow install script message handlers in isolated worlds
512         https://bugs.webkit.org/show_bug.cgi?id=156153
513
514         Reviewed by Anders Carlsson.
515
516         Added API Test: WKUserContentController.ScriptMessageHandlerBasicPostIsolatedWorld
517
518         - Changes the signature of the method in UserContentProvider to get UserMessageHandlerDescriptors
519           to match that of UserScripts and UserStyleSheets.
520         - Removes the need for UserMessageHandlerDescriptor::Client by making UserMessageHandlerDescriptor
521           directly subclassable.
522         - Changes invalidation model of UserMessageHandlersNamespace to be more direct by allowing it to
523           register for invalidation notifications, rather than always checking if handler has been removed
524           on each invocation.
525
526         * loader/EmptyClients.cpp:
527         Update for new signature.
528
529         * page/DOMWindow.cpp:
530         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
531         Switch to using forEachUserMessageHandler.
532
533         (WebCore::DOMWindow::webkitNamespace):
534         Pass the UserContentProvider to the namespace on creation, so the UserMessageHandlersNamespace
535         can use it to register to listen for UserMessageHandler changes.
536
537         * page/UserContentController.h:
538         * page/UserContentController.cpp:
539         (WebCore::UserContentController::forEachUserStyleSheet):
540         (WebCore::UserContentController::forEachUserMessageHandler):
541         (WebCore::UserContentController::addUserScript):
542         (WebCore::UserContentController::removeUserStyleSheets):
543         (WebCore::UserContentController::removeAllUserContent):
544         (WebCore::UserContentController::addUserMessageHandlerDescriptor): Deleted.
545         (WebCore::UserContentController::removeUserMessageHandlerDescriptor): Deleted.
546         (WebCore::UserContentController::addUserContentExtension): Deleted.
547         (WebCore::UserContentController::removeUserContentExtension): Deleted.
548         (WebCore::UserContentController::removeAllUserContentExtensions): Deleted.
549         Removed unused functions, all the UserMessageHandler and UserContentExtension ones. UserContentController
550         is only used for Legacy WebKit where those features are not exposed.
551
552         * page/UserContentProvider.h:
553         * page/UserContentProvider.cpp:
554         (WebCore::UserContentProvider::registerForUserMessageHandlerInvalidation):
555         (WebCore::UserContentProvider::unregisterForUserMessageHandlerInvalidation):
556         (WebCore::UserContentProvider::invalidateAllRegisteredUserMessageHandlerInvalidationClients):
557         (WebCore::UserContentProviderInvalidationClient::~UserContentProviderInvalidationClient):
558         Update signature for UserMessageHandlerDescriptor access to match UserScript and UserStyleSheet.
559         Adds explicit invalidation for UserMessageHandlers.
560
561         * page/UserMessageHandler.cpp:
562         (WebCore::UserMessageHandler::UserMessageHandler):
563         (WebCore::UserMessageHandler::postMessage):
564         (WebCore::UserMessageHandler::name): Deleted.
565         (WebCore::UserMessageHandler::world): Deleted.
566         * page/UserMessageHandler.h:
567         (WebCore::UserMessageHandler::descriptor):
568         (WebCore::UserMessageHandler::invalidateDescriptor):
569         * page/UserMessageHandlerDescriptor.cpp:
570         (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor):
571         (WebCore::UserMessageHandlerDescriptor::~UserMessageHandlerDescriptor):
572         (WebCore::UserMessageHandlerDescriptor::name):
573         (WebCore::UserMessageHandlerDescriptor::world):
574         * page/UserMessageHandlerDescriptor.h:
575         (WebCore::UserMessageHandlerDescriptor::Client::~Client): Deleted.
576         (WebCore::UserMessageHandlerDescriptor::create): Deleted.
577         (WebCore::UserMessageHandlerDescriptor::client): Deleted.
578         (WebCore::UserMessageHandlerDescriptor::invalidateClient): Deleted.
579         Simplify by removing the Client. Now, when the UserMessageHandlerDescriptor is no longer
580         active, it gets nulled out in the UserMessageHandler.
581
582         * page/UserMessageHandlersNamespace.cpp:
583         (WebCore::UserMessageHandlersNamespace::UserMessageHandlersNamespace):
584         (WebCore::UserMessageHandlersNamespace::~UserMessageHandlersNamespace):
585         (WebCore::UserMessageHandlersNamespace::didInvalidate):
586         (WebCore::UserMessageHandlersNamespace::handler):
587         * page/UserMessageHandlersNamespace.h:
588         Change the logic to listen for invalidations of the UserMessageHandlerDescriptor map. When it
589         is invalidated, re-build the map of cached UserMessageHandlers from the UserContentProvider,
590         and invalidate any remaining UserMessageHandlers that no longer exist in the UserContentProvider.
591
592         * page/WebKitNamespace.cpp:
593         (WebCore::WebKitNamespace::WebKitNamespace):
594         * page/WebKitNamespace.h:
595         (WebCore::WebKitNamespace::create):
596         Pass through the UserContentProvider.
597
598 2016-04-04  Chris Dumez  <cdumez@apple.com>
599
600         Regression(r196145): Crash in getOwnPropertyDescriptor on http://www.history.com/shows/vikings
601         https://bugs.webkit.org/show_bug.cgi?id=156136
602         <rdar://problem/25410767>
603
604         Reviewed by Ryosuke Niwa.
605
606         The page was crashing when doing the following:
607         Object.getOwnPropertyDescriptor(window, "indexedDB")
608
609         getOwnPropertyDescriptor() expected getDirect() to return a CustomGetterSetter for
610         CustomAccessors but it was not the case for window.indexedDB. The reason was that
611         window.indexedDB was a special property, which is not part of the static table but
612         returned by GetOwnPropertySlot() if IndexedDB feature is enabled. This weirdness
613         was due to our bindings generator not having proper support for [EnabledAtRuntime]
614         properties on Window.
615
616         This patch adds support for [EnabledAtRuntime] properties on Window by omitting
617         these properties from the static property table and then setting them at runtime
618         in JSDOMWindow::finishCreation() if the corresponding feature is enabled.
619         window.indexedDB now looks like a regular property when IndexedDB is enabled
620         and getOwnPropertyDescriptor() works as expected for this property.
621
622         Test: storage/indexeddb/indexeddb-getownpropertyDescriptor.html
623
624         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
625         (WebCore::DOMWindowIndexedDatabase::indexedDB):
626         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
627         The generated bindings pass DOMWindow by reference instead of pointer so update
628         the implementation accordingly.
629
630         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
631         Add 'indexedDB' and 'webkitIndexedDB' properties and mark them as
632         [EnabledAtRuntime]. Now that the bindings generator correctly handles
633         [EnabledAtRuntime] properties on the Window, there is no need to
634         custom-handle them in JSDOMWindowCustom.
635
636         * bindings/js/JSDOMWindowCustom.cpp:
637         Drop custom handling for 'indexedDB' and 'webkitIndexedDB' properties
638         in getOwnPropertySlot(). The generated bindings code now makes sure to
639         only set those properties on the Window if IndexedDB is enabled so we
640         can let the regular code path look up those properties.
641
642         * bindings/scripts/CodeGeneratorJS.pm:
643         (GetJSCAttributesForAttribute):
644         (GenerateHeader):
645         (GeneratePropertiesHashTable):
646         (GenerateImplementation):
647         Add support for [EnabledAtRuntime] properties on DOMWindow. For such
648         properties, we do the following:
649         1. Omit them from the static property table
650         2. In JSDOMWindow::finishCreation(), dynamically add those properties
651            at runtime if the corresponding feature is enabled.
652
653         Note that this works for constructors as well.
654
655         * inspector/InspectorIndexedDBAgent.cpp:
656         (WebCore::assertIDBFactory):
657         Pass Window by reference instead of pointer.
658
659 2016-04-04  Myles C. Maxfield  <mmaxfield@apple.com>
660
661         Addressing post-review feedback on r198970
662         https://bugs.webkit.org/show_bug.cgi?id=156123
663
664         Unreviewed.
665
666         * platform/text/BidiResolver.h:
667         (WebCore::BidiCharacterRun::~BidiCharacterRun):
668
669 2016-04-04  Myles C. Maxfield  <mmaxfield@apple.com>
670
671         [SVG -> OTF Converter] Crash when trying to re-convert a previously-failed font conversion
672         https://bugs.webkit.org/show_bug.cgi?id=156175
673         <rdar://problem/25130547>
674
675         Reviewed by David Kilzer.
676
677         m_externalSVGFontElement points inside the document owned by m_externalSVGDocument.
678         However, when the m_externalSVGDocument is destroyed (due to a failed conversion),
679         we weren't resetting m_externalSVGFontElement. Then, when trying to re-convert, we
680         were using the fact that m_externalSVGFontElement is non-null to mean it's valid.
681
682         Test: fast/text/svg-font-invalid-glyph-path-failure.html (Under GuardMalloc)
683
684         * loader/cache/CachedSVGFont.cpp:
685         (WebCore::CachedSVGFont::ensureCustomFontData):
686
687 2016-04-04  Anders Carlsson  <andersca@apple.com>
688
689         Properly generate static functions that return Promises
690         https://bugs.webkit.org/show_bug.cgi?id=156169
691
692         Reviewed by Sam Weinig.
693
694         * bindings/scripts/CodeGeneratorJS.pm:
695         (GenerateReturnParameters):
696         * bindings/scripts/test/JS/JSTestObj.cpp:
697         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
698         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
699         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
700         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):
701         * bindings/scripts/test/TestObj.idl:
702
703 2016-04-04  Joonghun Park  <jh718.park@samsung.com>
704
705         [EFL] Fix build break since r198800
706         https://bugs.webkit.org/show_bug.cgi?id=156011
707
708         Reviewed by Alex Christensen.
709
710         * PlatformEfl.cmake: Remove temorary statement which was applied to avoid build failure of Efl port.
711
712 2016-04-04  Antti Koivisto  <antti@apple.com>
713
714         Re-disable event dispatch assertions in RenderTreeUpdater::updateRenderTree
715         https://bugs.webkit.org/show_bug.cgi?id=156172
716
717         Some ruby tests on iOS hit these.
718
719         * style/RenderTreeUpdater.cpp:
720         (WebCore::RenderTreeUpdater::updateRenderTree):
721
722 2016-04-04  Alejandro G. Castro  <alex@igalia.com>
723
724         REGRESSION(r198492): [GTK] The WEB_RTC flag was not correctly added in some situations
725         https://bugs.webkit.org/show_bug.cgi?id=156164
726
727         Reviewed by Philippe Normand.
728
729         Replace WEBRTC with WEB_RTC, in the idls add the new option
730         UsePointersEvenForNonNullableObjectArguments to fix compilation.
731
732         * Modules/mediastream/RTCDataChannel.idl:
733         * Modules/mediastream/RTCPeerConnection.idl:
734         * Modules/mediastream/RTCRtpReceiver.cpp:
735         * Modules/mediastream/RTCRtpReceiver.h:
736         * Modules/mediastream/RTCRtpSender.cpp:
737         * Modules/mediastream/RTCRtpSender.h:
738         * Modules/mediastream/RTCRtpSender.idl:
739         * Modules/mediastream/RTCRtpSenderReceiverBase.h:
740         * Modules/mediastream/RTCSessionDescription.cpp:
741         * Modules/mediastream/RTCSessionDescription.h:
742         * Modules/mediastream/RTCStatsReport.cpp:
743         * Modules/mediastream/RTCStatsResponse.cpp:
744         * Modules/mediastream/RTCTrackEvent.cpp:
745         * Modules/mediastream/RTCTrackEvent.h:
746         * Modules/mediastream/SDPProcessor.cpp:
747         * Modules/mediastream/SDPProcessor.h:
748         * bindings/generic/RuntimeEnabledFeatures.cpp:
749         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
750         * bindings/generic/RuntimeEnabledFeatures.h:
751         * bindings/js/WebCoreJSBuiltinInternals.cpp:
752         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
753         (WebCore::JSBuiltinInternalFunctions::visit):
754         (WebCore::JSBuiltinInternalFunctions::initialize):
755         * bindings/js/WebCoreJSBuiltinInternals.h:
756         * bindings/js/WebCoreJSBuiltins.h:
757         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
758         * platform/mediastream/RTCSessionDescriptionDescriptor.cpp:
759         * platform/mediastream/RTCSessionDescriptionDescriptor.h:
760         * platform/mediastream/RTCSessionDescriptionRequest.h:
761         * platform/mediastream/RTCStatsRequest.h:
762         * platform/mediastream/RTCStatsResponseBase.h:
763         * platform/mediastream/RTCVoidRequest.h:
764         * platform/mediastream/SDPProcessorScriptResource.cpp:
765         * platform/mediastream/SDPProcessorScriptResource.h:
766         * platform/mock/TimerEventBasedMock.h:
767
768 2016-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>
769
770         REGRESSION(r198792): [GTK] Inspector crashes in Inspector::Protocol::getEnumConstantValue since r198792
771         https://bugs.webkit.org/show_bug.cgi?id=155745
772         <rdar://problem/25289456>
773
774         Reviewed by Brian Burg.
775
776         Use Inspector::Protocol::AutomationEnums namespace for getEnumConstantValue().
777
778         * inspector/InspectorDOMAgent.cpp:
779         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
780         * inspector/InspectorTimelineAgent.cpp:
781         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
782
783 2016-04-04  Antti Koivisto  <antti@apple.com>
784
785         Avoid double traversal in RenderTreeUpdater for slot roots
786         https://bugs.webkit.org/show_bug.cgi?id=156110
787
788         Reviewed by Andreas Kling.
789
790         * style/RenderTreeUpdater.cpp:
791         (WebCore::hasDisplayContents):
792         (WebCore::findRenderingRoot):
793         (WebCore::findRenderingRoots):
794         (WebCore::RenderTreeUpdater::commit):
795
796             If there are multiple roots that are slots we may end up updating the same rendering root multiple times.
797             Fix by deduplicating the roots.
798
799         (WebCore::RenderTreeUpdater::updateRenderTree):
800
801             Some cleanups.
802
803 2016-04-04  Antti Koivisto  <antti@apple.com>
804
805         Enable assertions against DOM mutations in RenderTreeUpdater
806         https://bugs.webkit.org/show_bug.cgi?id=156156
807
808         Reviewed by Andreas Kling.
809
810         Ensure we don't mutate DOM or dispatch events during render tree updates.
811
812         * WebCore.xcodeproj/project.pbxproj:
813         * dom/ContainerNode.cpp:
814         * dom/ContainerNode.h:
815         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion): Deleted.
816         (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion): Deleted.
817         (WebCore::NoEventDispatchAssertion::isEventDispatchForbidden): Deleted.
818
819             Move NoEventDispatchAssertion to a header of its own.
820
821         * dom/NoEventDispatchAssertion.h: Added.
822         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
823         (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
824         (WebCore::NoEventDispatchAssertion::isEventDispatchForbidden):
825         (WebCore::NoEventDispatchAssertion::dropTemporarily):
826         (WebCore::NoEventDispatchAssertion::restoreDropped):
827
828             Add a way to disable event assertions temporarily.
829
830         * loader/cache/CachedSVGFont.cpp:
831         (WebCore::CachedSVGFont::ensureCustomFontData):
832
833             Temporary SVG font document may get constructed during render tree update. These can't run scripts or generally
834             affect anything outside the font document as it does not have a frame. Disable event assertions temporarily.
835
836             Tested by svg/W3C-SVG-1.1/fonts-elem-07-b.svg
837
838         * style/RenderTreeUpdater.cpp:
839         (WebCore::RenderTreeUpdater::updateRenderTree):
840
841             Enable assertions.
842
843 2016-04-04  Emanuele Aina  <emanuele.aina@collabora.com>
844
845         [TexMap] Trim redundant guards
846         https://bugs.webkit.org/show_bug.cgi?id=155927
847
848         Reviewed by Žan Doberšek.
849
850         * platform/graphics/GraphicsContext3DPrivate.cpp: Drop some redundant
851         checks in preprocessor guards.
852
853 2016-04-04  Emanuele Aina  <emanuele.aina@collabora.com>
854
855         Rely on PlatformLayer to choose the TextureMapperPlatformLayer impl
856         https://bugs.webkit.org/show_bug.cgi?id=155926
857
858         Reviewed by Žan Doberšek.
859
860         Use PlatformLayer to replace a bunch of subtly different #ifdef
861         scattered over the codebase to choose between TextureMapperPlatformLayer
862         and TextureMapperPlatformLayerProxyProvider.
863
864         * platform/graphics/GraphicsContext3DPrivate.h:
865         * platform/graphics/cairo/ImageBufferDataCairo.h:
866         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Use
867         PlatformLayer.h an inherit from PlatformLayer instead of choosing the
868         right implementation every time.
869         * platform/graphics/texmap/TextureMapperPlatformLayer.h: Add
870         TEXTURE_MAPPER guards to make it unconditionally usable.
871         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: Add
872         COORDINATED_GRAPHICS_THREADED guards to make it unconditionally
873         usable.
874
875 2016-04-04  Frederic Wang  <fwang@igalia.com>
876
877         Refactor RenderMathMLRow layout functions to avoid using flexbox
878         https://bugs.webkit.org/show_bug.cgi?id=153208
879
880         Reviewed by Martin Robinson.
881
882         This is the first patch to rewrite MathML layout without relying on
883         flexboxes or anonymous renderers.
884         We have done some temporary changes to allow overriding of
885         layoutBlock and to implement paintChildren, but this will be remove in a
886         follow-up patch. We also implement firstLineBaseline,
887         computePreferredLogicalWidths and layoutBlock of RenderMathMLRow without
888         using any flexbox functions. We adjust a bit the MathML CSS to take into
889         account these changes. Finally, we delete the unused helper function to
890         create anonymous RenderMathMLRow.
891
892         * css/mathml.css:
893         (ms, mtext, mi, mn, mo, annotation, mtd): Prevent linebreaking inside token elements and table cells, otherwise this cause test failures with the new implementation of RenderMathMLRow.
894         (math, mrow, mfenced, merror, mphantom, mstyle, menclose): Deleted. We no longer rely on flexbox for baseline alignment of RenderMathMLRow.
895         * rendering/RenderFlexibleBox.h: Allow overrider of the LayoutBlock for the moment.
896         * rendering/RenderObject.h:
897         (WebCore::RenderObject::isRenderMathMLMenclose): Add helper function.
898         * rendering/mathml/RenderMathMLMenclose.h: ditto.
899         * rendering/mathml/RenderMathMLBlock.h:
900         (WebCore::ascentForChild): Add helper function to easily compute the ascent of a child.
901         * rendering/mathml/RenderMathMLRow.cpp: Reimplement the class without using the flexbox layout.
902         (WebCore::RenderMathMLRow::firstLineBaseline): Implement the function to determine the baseline.
903         (WebCore::RenderMathMLRow::computeLineVerticalStretch): Add a function that browses non-stretchy children to determine the desired vertical stretch metrics.
904         (WebCore::RenderMathMLRow::computePreferredLogicalWidths): Implement the function to determine the preferred widths of the RenderMathMLRow.
905         (WebCore::RenderMathMLRow::layoutRowItems): Helper function that layouts children (stretching vertical operators if needed), calculate the exact logical width and position children.
906         (WebCore::RenderMathMLRow::layoutBlock): Implement the function to do the actual layout, which essentially calls layoutRowItems.
907         (WebCore::RenderMathMLRow::paintChildren): Temporarily implement this function, which just calls paintChild on each child.
908         (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer): Deleted. We actually don't create anonymous RenderMathMLRow at the moment.
909         (WebCore::RenderMathMLRow::layout): Deleted.
910         * rendering/mathml/RenderMathMLRow.h: Update declarations of functions.
911
912 2016-04-04  Chris Fleizach  <cfleizach@apple.com>
913
914         AX: Consolidate radio button group member code with that in HTMLElement derivatives
915         https://bugs.webkit.org/show_bug.cgi?id=155696
916         <rdar://problem/25260379>
917
918         Reviewed by Darin Adler.
919
920         Behavior covered by existing tests.
921
922         * accessibility/AccessibilityRenderObject.cpp:
923         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
924         * dom/CheckedRadioButtons.cpp:
925         (WebCore::RadioButtonGroup::isValid):
926         (WebCore::RadioButtonGroup::members):
927         (WebCore::RadioButtonGroup::setCheckedButton):
928         (WebCore::CheckedRadioButtons::addButton):
929         (WebCore::CheckedRadioButtons::groupMembers):
930         (WebCore::CheckedRadioButtons::updateCheckedState):
931         * dom/CheckedRadioButtons.h:
932         * dom/Range.h:
933         (WebCore::documentOrderComparator):
934         * html/HTMLInputElement.cpp:
935         (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup):
936         (WebCore::HTMLInputElement::radioButtonGroup):
937         (WebCore::HTMLInputElement::checkedRadioButtonForGroup):
938         * html/HTMLInputElement.h:
939
940 2016-04-03  Darin Adler  <darin@apple.com>
941
942         Remove unneeded UsePointersEvenForNonNullableObjectArguments in WebKitCSSMatrix.idl
943         https://bugs.webkit.org/show_bug.cgi?id=156142
944
945         Reviewed by Sam Weinig.
946
947         * css/WebKitCSSMatrix.idl: Removed UsePointersEvenForNonNullableObjectArguments.
948         It was having no effect, I think because there were no non-nullable object arguments.
949
950 2016-04-03  Antti Koivisto  <antti@apple.com>
951
952         Tighten ComposedTreeAncestorIterator to return Elements
953         https://bugs.webkit.org/show_bug.cgi?id=150324
954
955         Reviewed by Andreas Kling.
956
957         Only other thing it could credibly return was Document. We can exclude it from the composed tree and avoid some casting.
958
959         * dom/ComposedTreeAncestorIterator.h:
960         (WebCore::ComposedTreeAncestorIterator::operator*):
961         (WebCore::ComposedTreeAncestorIterator::operator->):
962         (WebCore::ComposedTreeAncestorIterator::operator==):
963         (WebCore::ComposedTreeAncestorIterator::operator!=):
964         (WebCore::ComposedTreeAncestorIterator::operator++):
965         (WebCore::ComposedTreeAncestorIterator::get):
966         (WebCore::ComposedTreeAncestorIterator::ComposedTreeAncestorIterator):
967         (WebCore::ComposedTreeAncestorIterator::traverseParent):
968         (WebCore::ComposedTreeAncestorAdapter::begin):
969         (WebCore::ComposedTreeAncestorAdapter::end):
970         (WebCore::ComposedTreeAncestorAdapter::first):
971         * dom/Element.cpp:
972         (WebCore::Element::resolveComputedStyle):
973         * dom/Node.cpp:
974         (WebCore::Node::updateAncestorsForStyleRecalc):
975         (WebCore::Node::setNeedsStyleRecalc):
976         * rendering/RenderNamedFlowThread.cpp:
977         (WebCore::RenderNamedFlowThread::isChildAllowed):
978         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
979         * style/RenderTreeUpdater.cpp:
980         (WebCore::findRenderingRoot):
981         (WebCore::RenderTreeUpdater::commit):
982
983 2016-04-03  Antti Koivisto  <antti@apple.com>
984
985         Shadow DOM: Slot style is not computed
986         https://bugs.webkit.org/show_bug.cgi?id=156144
987
988         Reviewed by Darin Adler.
989
990         We don’t currently compute style for active slots. While slots have have implicit display:contents and don’t create
991         boxes themselves the style should still inherit to slotted children.
992
993         Basically
994
995         <slot style=“color:red”></slot>
996
997         should work as expected.
998
999         The implementation falls out from the new style resolve architecture and this patch mostly just removes the special
1000         case code that prevented this from working.
1001
1002         Test: fast/shadow-dom/css-scoping-shadow-slot-style.html
1003
1004         * html/HTMLSlotElement.h:
1005         (WebCore::hasImplicitDisplayContents):
1006
1007             Move to a shared location.
1008
1009         * style/RenderTreeUpdater.cpp:
1010         (WebCore::RenderTreeUpdater::RenderTreeUpdater):
1011         (WebCore::findRenderingRoot):
1012         (WebCore::RenderTreeUpdater::updateRenderTree):
1013
1014             Remove the special case code. What remains is a display:contents test for rendererless elements.
1015
1016         (WebCore::RenderTreeUpdater::updateElementRenderer):
1017
1018             Don't create renderers for (implicit) display:contents.
1019
1020         (WebCore::hasDisplayContents): Deleted.
1021         * style/StyleTreeResolver.cpp:
1022         (WebCore::Style::detachRenderTree):
1023         (WebCore::Style::affectsRenderedSubtree):
1024
1025             Factor into a function.
1026
1027         (WebCore::Style::TreeResolver::resolveElement):
1028
1029             Remove the special case code.
1030
1031         (WebCore::Style::TreeResolver::resolveComposedTree):
1032
1033             Always resolve slots as we don't currently save their style.
1034
1035 2016-04-03  David Kilzer  <ddkilzer@apple.com>
1036
1037         REGRESSION (r198653, r198864): http/tests/contentdispositionattachmentsandbox/referer-header-stripped*.html tests crashing due to unavailable SPI
1038         <http://webkit.org/b/156145>
1039
1040         Reviewed by Tim Horton.
1041
1042         Covered by existing tests under GuardMalloc:
1043
1044             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-always.html
1045             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-default.html
1046             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-never.html
1047             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer-when-downgrade.html
1048             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer.html
1049             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-origin.html
1050             http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-unsafe-url.html
1051             http/tests/contentdispositionattachmentsandbox/referer-header-stripped.html
1052
1053         * editing/cocoa/DataDetection.mm:
1054         (WebCore::DataDetection::isDataDetectorLink):
1055         (WebCore::DataDetection::shouldCancelDefaultAction):
1056         - Restore iOS 9.x code.
1057         (WebCore::DataDetection::detectContentInRange):
1058         - Guard new SPI with version macros.
1059
1060         * platform/cocoa/DataDetectorsCoreSoftLink.h:
1061         * platform/cocoa/DataDetectorsCoreSoftLink.mm:
1062         - Guard new SPI with version macros.
1063
1064 2016-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1065
1066         Replace all RenderTheme::popupInternalPadding methods with a single one returning a LengthBox
1067         https://bugs.webkit.org/show_bug.cgi?id=156098
1068
1069         Reviewed by Darin Adler.
1070
1071         The caller always wants all padding sides, so we can simplify both the caller and the implementations by using a
1072         single method. It's also more efficient for the GTK+ port that creates and destroys the same style contexts on
1073         every call.
1074
1075         * rendering/RenderMenuList.cpp:
1076         (WebCore::RenderMenuList::adjustInnerStyle):
1077         * rendering/RenderTheme.h:
1078         (WebCore::RenderTheme::popupInternalPaddingBox):
1079         (WebCore::RenderTheme::popupInternalPaddingLeft): Deleted.
1080         (WebCore::RenderTheme::popupInternalPaddingRight): Deleted.
1081         (WebCore::RenderTheme::popupInternalPaddingTop): Deleted.
1082         (WebCore::RenderTheme::popupInternalPaddingBottom): Deleted.
1083         * rendering/RenderThemeGtk.cpp:
1084         (WebCore::RenderThemeGtk::popupInternalPaddingBox):
1085         (WebCore::getComboBoxMetrics): Deleted.
1086         (WebCore::RenderThemeGtk::popupInternalPaddingLeft): Deleted.
1087         (WebCore::RenderThemeGtk::popupInternalPaddingRight): Deleted.
1088         (WebCore::RenderThemeGtk::popupInternalPaddingTop): Deleted.
1089         (WebCore::RenderThemeGtk::popupInternalPaddingBottom): Deleted.
1090         * rendering/RenderThemeGtk.h:
1091         * rendering/RenderThemeIOS.h:
1092         * rendering/RenderThemeIOS.mm:
1093         (WebCore::RenderThemeIOS::popupInternalPaddingBox):
1094         (WebCore::RenderThemeIOS::popupInternalPaddingRight): Deleted.
1095         * rendering/RenderThemeMac.h:
1096         * rendering/RenderThemeMac.mm:
1097         (WebCore::RenderThemeMac::popupInternalPaddingBox):
1098         (WebCore::RenderThemeMac::popupInternalPaddingLeft): Deleted.
1099         (WebCore::RenderThemeMac::popupInternalPaddingRight): Deleted.
1100         (WebCore::RenderThemeMac::popupInternalPaddingTop): Deleted.
1101         (WebCore::RenderThemeMac::popupInternalPaddingBottom): Deleted.
1102
1103 2016-04-02  Sam Weinig  <sam@webkit.org>
1104
1105         Cleanup DataDetection.mm a little bit
1106         https://bugs.webkit.org/show_bug.cgi?id=156128
1107
1108         Reviewed by Dan Bernstein.
1109
1110         * html/HTMLAttributeNames.in:
1111         Add x-apple-data-detectors, x-apple-data-detectors-type, x-apple-data-detectors-result
1112
1113         * editing/cocoa/DataDetection.mm:
1114         (WebCore::DataDetection::requiresExtendedContext):
1115         (WebCore::DataDetection::dataDetectorIdentifier):
1116         (WebCore::DataDetection::shouldCancelDefaultAction):
1117         (WebCore::removeResultLinksFromAnchor):
1118         (WebCore::searchForLinkRemovingExistingDDLinks):
1119         Use new generated qualified name attributes, switch to using fastGetAttribute and 
1120         equalIgnoringASCIICase, and fix the position of some *s.
1121
1122         (WebCore::dataDetectorStringForPath):
1123         Fix some *s and switch to using StringBuilder.
1124
1125         (WebCore::buildQuery):
1126         Fix some *s.
1127
1128         (WebCore::DataDetection::detectContentInRange):
1129         Use new generated qualified name attributes.
1130
1131 2016-04-01  Myles C. Maxfield  <mmaxfield@apple.com>
1132
1133         Migrate BidiRunList and BidiRun to automatic memory management
1134         https://bugs.webkit.org/show_bug.cgi?id=156123
1135
1136         Reviewed by Simon Fraser.
1137
1138         BidiRunList, BidiRun, and BidiCharacterRun have all been doing manual
1139         "new"s and "delete"s for years. This patch migrates those classes to
1140         using std::unique_ptr.
1141
1142         No new tests because there is no behavior change.
1143
1144         * platform/graphics/GraphicsContext.cpp:
1145         (WebCore::GraphicsContext::drawBidiText):
1146         * platform/text/BidiResolver.h:
1147         (WebCore::BidiCharacterRun::BidiCharacterRun):
1148         (WebCore::BidiCharacterRun::next):
1149         (WebCore::BidiCharacterRun::takeNext):
1150         (WebCore::BidiCharacterRun::setNext):
1151         (WebCore::Subclass>::appendRunInternal):
1152         * platform/text/BidiRunList.h:
1153         (WebCore::BidiRunList::BidiRunList):
1154         (WebCore::BidiRunList::firstRun):
1155         (WebCore::BidiRunList<Run>::appendRun):
1156         (WebCore::BidiRunList<Run>::prependRun):
1157         (WebCore::BidiRunList<Run>::moveRunToEnd):
1158         (WebCore::BidiRunList<Run>::moveRunToBeginning):
1159         (WebCore::BidiRunList<Run>::replaceRunWithRuns):
1160         (WebCore::BidiRunList<Run>::clear):
1161         (WebCore::BidiRunList<Run>::reverseRuns):
1162         (WebCore::BidiRunList<Run>::clearWithoutDestroyingRuns): Deleted.
1163         (WebCore::BidiRunList<Run>::deleteRuns): Deleted.
1164         * rendering/BidiRun.cpp:
1165         (WebCore::BidiRun::takeNext):
1166         * rendering/BidiRun.h:
1167         (WebCore::BidiRun::next):
1168         (WebCore::BidiRun::takeNext):
1169         * rendering/InlineIterator.h:
1170         (WebCore::addPlaceholderRunForIsolatedInline):
1171         * rendering/RenderBlockLineLayout.cpp:
1172         (WebCore::createRun):
1173         (WebCore::RenderBlockFlow::handleTrailingSpaces):
1174         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1175         * rendering/line/LineBreaker.cpp:
1176         (WebCore::LineBreaker::skipLeadingWhitespace):
1177
1178 2016-04-01  Simon Fraser  <simon.fraser@apple.com>
1179
1180         Backdrop Filter should repaint when changed via script
1181         https://bugs.webkit.org/show_bug.cgi?id=149319
1182         rdar://problem/22749892
1183
1184         Reviewed by Tim Horton.
1185
1186         When backdrop filters change, we need to trigger a recomposite, just as we do
1187         for filters. It's ok to re-use ContextSensitivePropertyFilter because
1188         adjustStyleDifference() does the right thing.
1189
1190         Test: css3/filters/backdrop/dynamic-backdrop-filter-change.html
1191
1192         * rendering/style/RenderStyle.cpp:
1193         (WebCore::RenderStyle::changeRequiresLayerRepaint):
1194
1195 2016-03-31  Zalan Bujtas  <zalan@apple.com>
1196
1197         putImageData leaves visible artifacts on retina display
1198         https://bugs.webkit.org/show_bug.cgi?id=156039
1199         <rdar://problem/25482243>
1200
1201         Reviewed by Simon Fraser.
1202
1203         Inflate the repaint rect to cover anti-aliasing bits.
1204
1205         Test: fast/canvas/hidpi-repaint-on-retina-leaves-bits-behind.html
1206
1207         * html/HTMLCanvasElement.cpp:
1208         (WebCore::HTMLCanvasElement::didDraw):
1209
1210 2016-04-01  Jiewen Tan  <jiewen_tan@apple.com>
1211
1212         WebKit should dispatchDidFailProvisionalLoad while loading invalid URLs
1213         https://bugs.webkit.org/show_bug.cgi?id=155995
1214         <rdar://problem/14967004>
1215
1216         Reviewed by Andy Estes.
1217
1218         Added API Tests.
1219
1220         If a loading request contains an invalid URL, DocumentLoader will now dispatch
1221         cannotShowURLError to the clients.
1222
1223         * loader/DocumentLoader.cpp:
1224         (WebCore::DocumentLoader::startLoadingMainResource):
1225
1226 2016-04-01  Frederic Wang  <fwang@igalia.com>
1227
1228         Reset CSS spacing rules on the <math> element.
1229         https://bugs.webkit.org/show_bug.cgi?id=155433
1230
1231         Reviewed by Brent Fulgham.
1232
1233         Test: mathml/presentation/css-spacing.html
1234
1235         When the authors has changed some CSS spacing rules on a page, they are currently inherited on MathML too, potentially causing broken math rendering.
1236         For example, this caused a bug in Firefox on Wikipedia in the past. Hence we align on Gecko and just reset the CSS spacing rules by default. We also import Mozilla's test.
1237
1238         * css/mathml.css:
1239         (math): Set line-height, word-spacing and letter-spacing to normal.
1240
1241 2016-04-01  Daniel Bates  <dabates@apple.com>
1242
1243         CSP: child-src violations reported as frame-src violation
1244         https://bugs.webkit.org/show_bug.cgi?id=156092
1245         <rdar://problem/25478509>
1246
1247         Reviewed by Andy Estes.
1248
1249         Tests: http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src.html
1250                http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src.html
1251                http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-frame-src.html
1252
1253         * page/csp/ContentSecurityPolicy.cpp:
1254         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Determine the name of the effective violation
1255         directive from the name of the violated directive. If the name of the violated directive is "frame-src"
1256         then use that name for the name of the effective violated directive. Otherwise, use "child-src" for the
1257         name of the effective violated directive. A byproduct of this decision is that we report child-src as the
1258         effective violated directive when a frame load was blocked by the default-src directive. This seems reasonable
1259         because directive frame-src is deprecated in Content Security Policy Level 2. The child-src directive is
1260         its replacement.
1261
1262 2016-04-01  Alex Christensen  <achristensen@webkit.org>
1263
1264         Compile DumpRenderTree with CMake on Mac
1265         https://bugs.webkit.org/show_bug.cgi?id=156088
1266
1267         Reviewed by Brent Fulgham.
1268
1269         * PlatformMac.cmake:
1270         * platform/mock/mediasource/MockBox.cpp:
1271
1272 2016-03-31  Antti Koivisto  <antti@apple.com>
1273
1274         Separate render tree updating from style resolve
1275         https://bugs.webkit.org/show_bug.cgi?id=155298
1276
1277         Reviewed by Andreas Kling.
1278
1279         This patch splits computing document style and applying the results into two distinct steps:
1280
1281         Style::TreeResolver::resolve()
1282                 |
1283                 | Style::Update
1284                 V
1285         RenderTreeUpdater::commit()
1286
1287         Style::TreeResolver::resolve() returns a Style::Update object that contains all the changes to be made
1288         for the whole composed tree. RenderTreeUpdater then applies the changes updating, building or tearing
1289         down portions of the render tree as needed.
1290
1291         Style::Update consists of a map that contains new style for each newly resolved element along with some
1292         metadata. A separate map contains text nodes that require reconstruction. It also tracks change roots so
1293         RenderTreeUpdater needs to traverse the changed subtrees only.
1294
1295         The patch eliminates the recursive render tree build code path replacing it with iterative functions.
1296
1297         This will enable future optimizations. For example we won't need to commit to immediate rendering
1298         changes simply because some script or internal function requires up-to-date style.
1299
1300         * CMakeLists.txt:
1301         * WebCore.xcodeproj/project.pbxproj:
1302         * css/StyleResolver.cpp:
1303         (WebCore::StyleResolver::State::State):
1304         (WebCore::StyleResolver::styleForElement):
1305         * css/StyleResolver.h:
1306         (WebCore::StyleResolver::setOverrideDocumentElementStyle):
1307         (WebCore::StyleResolver::State::State):
1308
1309             Root element style is needed for resolving other elements. Add a way to provide it without looking
1310             into active document style.
1311
1312         * dom/Document.cpp:
1313         (WebCore::Document::recalcStyle):
1314
1315             Resolve the document style and commit it immediately (for now).
1316
1317         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1318         * dom/Document.h:
1319         (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
1320         (WebCore::Document::inStyleRecalc):
1321         (WebCore::Document::inRenderTreeUpdate):
1322         * dom/Element.cpp:
1323         (WebCore::Element::setChildIndex):
1324
1325             Setting the unique bit is now done by style relations update code.
1326
1327         * dom/Node.cpp:
1328         (WebCore::Node::setNeedsStyleRecalc):
1329
1330             Prevent spurious style invalidation during render tree updating.
1331
1332         * rendering/RenderBox.cpp:
1333         (WebCore::RenderBox::styleDidChange):
1334
1335             Capturing body element color for color:-webkit-text is now done by TreeResolver.
1336
1337         * rendering/RenderElement.h:
1338         (WebCore::RenderElement::setAnimatableStyle): Deleted.
1339
1340             No longer used.
1341
1342         * style/RenderTreePosition.cpp:
1343         (WebCore::RenderTreePosition::nextSiblingRenderer):
1344
1345             Skip over non-rendered slot elements.
1346
1347         * style/RenderTreeUpdater.cpp: Added.
1348         (WebCore::RenderTreeUpdater::Parent::Parent):
1349         (WebCore::RenderTreeUpdater::RenderTreeUpdater):
1350         (WebCore::hasDisplayContents):
1351         (WebCore::findRenderingRoot):
1352         (WebCore::RenderTreeUpdater::commit):
1353
1354             Call updateRenderTree for each change root.
1355
1356         (WebCore::shouldCreateRenderer):
1357         (WebCore::RenderTreeUpdater::updateRenderTree):
1358
1359             Iteratively traverse the composed tree starting for a change root.
1360             Apply the changes calling updateElementRenderer and updateTextRenderer as needed.
1361             Enter subtrees that haves changes to apply.
1362
1363         (WebCore::RenderTreeUpdater::renderTreePosition):
1364
1365             We may not create renderers for all elements (<slot> or more generally display:contents) that
1366             have rendered descendants. Search the parent stack to find the valid position.
1367
1368         (WebCore::RenderTreeUpdater::pushParent):
1369         (WebCore::RenderTreeUpdater::popParent):
1370         (WebCore::RenderTreeUpdater::popParentsToDepth):
1371
1372             Maintain parent stack.
1373
1374         (WebCore::pseudoStyleCacheIsInvalid):
1375         (WebCore::RenderTreeUpdater::updateElementRenderer):
1376
1377             Create, delete or update the renderer.
1378
1379         (WebCore::moveToFlowThreadIfNeeded):
1380         (WebCore::RenderTreeUpdater::createRenderer):
1381         (WebCore::textRendererIsNeeded):
1382         (WebCore::createTextRenderer):
1383         (WebCore::RenderTreeUpdater::updateTextRenderer):
1384         (WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1385
1386             This is moved from TreeResolver.
1387
1388         (WebCore::needsPseudoElement):
1389         (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
1390
1391             Pseudo elements are handled entirely during render tree construction. Compute their style and
1392             create or delete them as needed.
1393
1394         * style/RenderTreeUpdater.h: Added.
1395         (WebCore::RenderTreeUpdater::parent):
1396         * style/StyleRelations.cpp:
1397         (WebCore::Style::commitRelationsToRenderStyle):
1398         (WebCore::Style::commitRelations):
1399
1400             Commit to Style::Update instead of the document if needed.
1401
1402         (WebCore::Style::commitRelationsToDocument): Deleted.
1403         * style/StyleRelations.h:
1404         * style/StyleSharingResolver.cpp:
1405         (WebCore::Style::elementHasDirectionAuto):
1406         (WebCore::Style::SharingResolver::resolve):
1407
1408             Fetch the shareable style from Style::Update instead of the active document style.
1409
1410         (WebCore::Style::SharingResolver::findSibling):
1411         (WebCore::Style::SharingResolver::canShareStyleWithElement):
1412         * style/StyleSharingResolver.h:
1413         * style/StyleTreeResolver.cpp:
1414         (WebCore::Style::TreeResolver::Parent::Parent):
1415
1416             No need for render tree position anymore.
1417
1418         (WebCore::Style::TreeResolver::popScope):
1419         (WebCore::Style::TreeResolver::styleForElement):
1420         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1421         (WebCore::Style::createTextRendererIfNeeded):
1422         (WebCore::Style::updateTextRendererAfterContentChange):
1423         (WebCore::Style::resetStyleForNonRenderedDescendants):
1424         (WebCore::Style::detachChildren):
1425         (WebCore::Style::detachSlotAssignees):
1426         (WebCore::Style::detachRenderTree):
1427         (WebCore::Style::TreeResolver::resolveElement):
1428
1429             Just resolve the style and return it, no more applying or entering render tree construction code paths.
1430
1431         (WebCore::Style::resolveTextNode):
1432         (WebCore::Style::elementImplicitVisibility):
1433         (WebCore::Style::TreeResolver::pushParent):
1434         (WebCore::Style::TreeResolver::popParent):
1435         (WebCore::Style::TreeResolver::popParentsToDepth):
1436         (WebCore::Style::shouldResolvePseudoElement):
1437         (WebCore::Style::TreeResolver::resolveComposedTree):
1438
1439             Add style changes to Style::Update.
1440
1441         (WebCore::Style::TreeResolver::resolve):
1442
1443             Return Style::Update object if non-empty.
1444
1445         (WebCore::Style::postResolutionCallbackQueue):
1446         (WebCore::Style::shouldCreateRenderer): Deleted.
1447         (WebCore::Style::moveToFlowThreadIfNeeded): Deleted.
1448         (WebCore::Style::TreeResolver::createRenderer): Deleted.
1449         (WebCore::Style::TreeResolver::createRenderTreeForChildren): Deleted.
1450         (WebCore::Style::TreeResolver::createRenderTreeForShadowRoot): Deleted.
1451         (WebCore::Style::beforeOrAfterPseudoElement): Deleted.
1452         (WebCore::Style::setBeforeOrAfterPseudoElement): Deleted.
1453         (WebCore::Style::clearBeforeOrAfterPseudoElement): Deleted.
1454         (WebCore::Style::needsPseudoElement): Deleted.
1455         (WebCore::Style::TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement): Deleted.
1456         (WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees): Deleted.
1457         (WebCore::Style::TreeResolver::createRenderTreeRecursively): Deleted.
1458         (WebCore::Style::pseudoStyleCacheIsInvalid): Deleted.
1459         (WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement): Deleted.
1460
1461             Remove the recursive render tree building code path.
1462
1463         * style/StyleTreeResolver.h:
1464         (WebCore::Style::TreeResolver::scope):
1465         * style/StyleUpdate.cpp: Added.
1466         (WebCore::Style::Update::Update):
1467         (WebCore::Style::Update::elementUpdate):
1468         (WebCore::Style::Update::textUpdate):
1469         (WebCore::Style::Update::elementStyle):
1470         (WebCore::Style::Update::addElement):
1471         (WebCore::Style::Update::addText):
1472         (WebCore::Style::Update::addPossibleRoot):
1473         * style/StyleUpdate.h: Added.
1474         (WebCore::Style::Update::roots):
1475         (WebCore::Style::Update::document):
1476         * svg/SVGElement.h:
1477         (WebCore::SVGElement::updateRelativeLengthsInformation):
1478         * svg/SVGUseElement.cpp:
1479         (WebCore::SVGUseElement::svgAttributeChanged):
1480         (WebCore::SVGUseElement::willRecalcStyle):
1481         (WebCore::SVGUseElement::willAttachRenderers): Deleted.
1482
1483             Switvh willAttachRenderers to willRecalcStyle as the former is now called too late.
1484
1485         * svg/SVGUseElement.h:
1486
1487 2016-03-31  Chris Fleizach  <cfleizach@apple.com>
1488
1489         AX: <attachment> element not accessible
1490         https://bugs.webkit.org/show_bug.cgi?id=156045
1491
1492         Reviewed by Joanmarie Diggs.
1493
1494         Make this element accessible by exposing title, subtitle, action, progress to accessibility.
1495
1496         Test: accessibility/attachment-element.html
1497
1498         * accessibility/AXObjectCache.cpp:
1499         (WebCore::createFromRenderer):
1500         * accessibility/AccessibilityAttachment.cpp: Added.
1501         (WebCore::AccessibilityAttachment::AccessibilityAttachment):
1502         (WebCore::AccessibilityAttachment::create):
1503         (WebCore::AccessibilityAttachment::hasProgress):
1504         (WebCore::AccessibilityAttachment::valueForRange):
1505         (WebCore::AccessibilityAttachment::attachmentElement):
1506         (WebCore::AccessibilityAttachment::roleDescription):
1507         (WebCore::AccessibilityAttachment::computeAccessibilityIsIgnored):
1508         (WebCore::AccessibilityAttachment::accessibilityText):
1509         (WebCore::AccessibilityAttachment::accessibilityDescription):
1510         * accessibility/AccessibilityAttachment.h: Added.
1511         * accessibility/AccessibilityObject.cpp:
1512         (WebCore::AccessibilityObject::hasHighlighting):
1513         (WebCore::AccessibilityObject::roleDescription):
1514         (WebCore::AccessibilityObject::supportsRangeValue):
1515         (WebCore::AccessibilityObject::supportsARIASetSize):
1516         * accessibility/AccessibilityObject.h:
1517         (WebCore::AccessibilityObject::isAttachmentElement):
1518         (WebCore::AccessibilityObject::isHeading):
1519         (WebCore::AccessibilityObject::isLink):
1520         (WebCore::AccessibilityObject::isImage):
1521         (WebCore::AccessibilityObject::isRadioButton):
1522         (WebCore::AccessibilityObject::isListBox):
1523         (WebCore::AccessibilityObject::isListBoxOption):
1524         (WebCore::AccessibilityObject::isAttachment):
1525         (WebCore::AccessibilityObject::isMediaTimeline):
1526         (WebCore::AccessibilityObject::isMenuRelated):
1527         (WebCore::AccessibilityObject::isMenu):
1528         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1529         (-[WebAccessibilityObjectWrapper accessibilityValue]):
1530
1531 2016-03-31  Nan Wang  <n_wang@apple.com>
1532
1533         AX: AX hit-testing does not work on WebKit video playback buttons
1534         https://bugs.webkit.org/show_bug.cgi?id=156084
1535
1536         Reviewed by Darin Adler.
1537
1538         Use the element at point instead of the shadow host for hit testing on video tags.
1539
1540         Test: accessibility/mac/video-tag-hit-test.html
1541
1542         * accessibility/AccessibilityRenderObject.cpp:
1543         (WebCore::AccessibilityRenderObject::elementAccessibilityHitTest):
1544         (WebCore::shouldUseShadowHostForHitTesting):
1545         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1546
1547 2016-03-31  Alexey Proskuryakov  <ap@apple.com>
1548
1549         Page overlay tests sometimes crash under MockPageOverlayClient::uninstallAllOverlays()
1550         https://bugs.webkit.org/show_bug.cgi?id=156080
1551         rdar://problem/24922183
1552
1553         Reviewed by Alex Christensen.
1554
1555         Make MockPageOverlayClient::m_overlays reference the overlays. There is no reference
1556         cycle because they are all removed between test page loads.
1557
1558         * testing/MockPageOverlayClient.cpp:
1559         (WebCore::MockPageOverlayClient::uninstallAllOverlays):
1560         (WebCore::MockPageOverlayClient::pageOverlayDestroyed):
1561         * testing/MockPageOverlayClient.h:
1562
1563 2016-03-31  Daniel Bates  <dabates@apple.com>
1564
1565         REGRESSION (r196012): <object>/<embed> with no URL does not match source *
1566         https://bugs.webkit.org/show_bug.cgi?id=156079
1567         <rdar://problem/25470805>
1568
1569         Reviewed by Brent Fulgham.
1570
1571         Fixes an issue where HTML object and embed elements that are not associated with a URL are
1572         allowed to load when object-src/default-src contains source *. More generally, we allow
1573         such elements to load so long as object-src/default-src is not 'none' per section object-src
1574         of the Content Security Policy Level 3 spec., <http://w3c.github.io/webappsec-csp> (Editor's Draft, 29 February 2016).
1575
1576         Tests: http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-default-src-star.html
1577                http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-star.html
1578                http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-default-src-star.html
1579                http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-star.html
1580
1581         * page/csp/ContentSecurityPolicy.cpp:
1582         (WebCore::ContentSecurityPolicy::allowObjectFromSource): Modified to call violatedDirectiveInAnyPolicy() passing
1583         ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone::Yes.
1584         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
1585         (WebCore::checkSource): Modified to take argument of type ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone (defaults to false)
1586         and pass it through to ContentSecurityPolicySourceListDirective.
1587         (WebCore::checkFrameAncestors): Explicitly pass ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone::No
1588         to avoid URL from having the compiler implicitly convert it to a String and selecting override ContentSecurityPolicySourceListDirective::allows(const String&),
1589         which will lead to incorrect results. We will look to make this code less error prone in <https://bugs.webkit.org/show_bug.cgi?id=156086>.
1590         (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource): Modified to take argument of type
1591         ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone and pass it through.
1592         * page/csp/ContentSecurityPolicyDirectiveList.h:
1593         * page/csp/ContentSecurityPolicySourceList.cpp:
1594         (WebCore::ContentSecurityPolicySourceList::parse): Set instance variable m_isNone to true so that we can differentiate
1595         a source list with value 'none' from a source list that lists one or more sources or non-none keywords.
1596         * page/csp/ContentSecurityPolicySourceList.h:
1597         (WebCore::ContentSecurityPolicySourceList::isNone): Added.
1598         * page/csp/ContentSecurityPolicySourceListDirective.cpp:
1599         (WebCore::ContentSecurityPolicySourceListDirective::allows): Modified to take argument of type ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone
1600         and updated code to return true for an empty URL only if this argument is ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone::Yes and
1601         the source list does not have value 'none'.
1602         * page/csp/ContentSecurityPolicySourceListDirective.h:
1603
1604 2016-03-31  Saam barati  <sbarati@apple.com>
1605
1606         Revert rewrite const as var workaround
1607         https://bugs.webkit.org/show_bug.cgi?id=155393
1608
1609         Reviewed by Mark Lam.
1610
1611         * bindings/js/JSDOMWindowBase.cpp:
1612         (WebCore::JSDOMWindowBase::commonVM):
1613         * page/Settings.cpp:
1614         * page/Settings.h:
1615         (WebCore::Settings::shouldUseHighResolutionTimers):
1616         (WebCore::Settings::backgroundShouldExtendBeyondPage):
1617         (WebCore::Settings::shouldRewriteConstAsVar): Deleted.
1618         (WebCore::Settings::setShouldRewriteConstAsVar): Deleted.
1619
1620 2016-03-31  Chris Dumez  <cdumez@apple.com>
1621
1622         Unreviewed, rolling out r196854.
1623
1624         We do not need those assertions anymore as it seems
1625         <rdar://problem/24457478> is fixed
1626
1627         Reverted changeset:
1628
1629         "Land release assertions to help track down a possible
1630         HTMLCollection lifetime bug"
1631         https://bugs.webkit.org/show_bug.cgi?id=154490
1632         http://trac.webkit.org/changeset/196854
1633
1634 2016-03-31  Chris Dumez  <cdumez@apple.com>
1635
1636         [iOS] Both WebPage's volatility timer and WebProcess's processSuspensionCleanupTimer are trying to make surfaces volatile with very short interval
1637         https://bugs.webkit.org/show_bug.cgi?id=156065
1638         <rdar://problem/25452004>
1639
1640         Reviewed by Simon Fraser.
1641
1642         Export a symbol so it can be used from WebKit2.
1643
1644         * page/Page.h:
1645
1646 2016-03-31  Daniel Bates  <dabates@apple.com>
1647
1648         REGRESSION (r195605): ASSERTION FAILED: !NoEventDispatchAssertion::isEventDispatchForbidden()
1649         when pressing the back button on a page with a focused subframe
1650         https://bugs.webkit.org/show_bug.cgi?id=156033
1651         <rdar://problem/25446561>
1652
1653         Reviewed by Chris Dumez.
1654
1655         Fixes an assertion failure when navigating back, by pressing the browser back button, to
1656         the previous page from a page with a focused subframe.
1657
1658         Following r195605 (https://bugs.webkit.org/show_bug.cgi?id=153449), the responsibility for
1659         dispatching a DOM pagehide event moved from CachedFrame to PageCache and we now instantiate
1660         a NoEventDispatchAssertion object to enforce the invariant that no additional DOM events are
1661         dispatched as part of adding a page to the page cache. When adding a page with a focused
1662         subframe to the page cache we focus its main frame, which implicitly defocuses the subframe
1663         and dispatches a DOM blur event at it. Therefore an assertion failure occurs when dispatching
1664         this DOM blur event (because a NoEventDispatchAssertion object was allocated on the stack).
1665
1666         Test: fast/history/back-from-page-with-focused-iframe.html
1667
1668         * history/CachedFrame.cpp:
1669         (WebCore::CachedFrame::CachedFrame): Move logic to focus the main frame from here...
1670         * history/PageCache.cpp:
1671         (WebCore::PageCache::addIfCacheable): to here such that any DOM blur and focus events
1672         are dispatched before instantiate the NoEventDispatchAssertion object and enter the page
1673         cache.
1674
1675 2016-03-31  Chris Dumez  <cdumez@apple.com>
1676
1677         REGRESSION (r191180): Safari does not send Referer Header to iframe src in certain situations
1678         https://bugs.webkit.org/show_bug.cgi?id=155754
1679         <rdar://problem/25296445>
1680
1681         Unreviewed, roll out r191180 as it breaks sites and needs to be reworked.
1682
1683         * html/parser/HTMLPreloadScanner.cpp:
1684         (WebCore::TokenPreloadScanner::tagIdFor): Deleted.
1685         (WebCore::TokenPreloadScanner::initiatorFor): Deleted.
1686         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
1687         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType): Deleted.
1688         * html/parser/HTMLPreloadScanner.h:
1689
1690 2016-03-31  Jiewen Tan  <jiewen_tan@apple.com>
1691
1692         WebKit should set Original URL of a download request correctly
1693         https://bugs.webkit.org/show_bug.cgi?id=155914
1694         <rdar://problem/10473811>
1695
1696         Reviewed by Anders Carlsson.
1697
1698         Added API tests.
1699
1700         Replace the old logic for identifying the Original URL of a download request
1701         with a new method based on the logic from Document::firstPartyForCookies, which
1702         does a much better job determining the URL a user actually visited.
1703
1704         * loader/FrameLoader.cpp:
1705         (WebCore::FrameLoader::setOriginalURLForDownloadRequest):
1706         (WebCore::originatingURLFromBackForwardList): Deleted.
1707
1708 2016-03-31  Antonio Gomes  <tonikitoo@webkit.org>
1709
1710         eventMayStartDrag() does not check for shiftKey or isOverLink
1711         https://bugs.webkit.org/show_bug.cgi?id=155746
1712
1713         Reviewed by Darin Adler.
1714
1715         There is currently a mismatch between the logic that checks whether
1716         an event can start a dragging action in EventHandler::handleMousePressEvent
1717         and in EventHandler::eventMayStartDrag
1718         Basically the former checks for event's count, type, button, target and modifier.
1719         The later, on the other hand, only checks for event's button and count.
1720
1721         In order to sync them up again, as per the comment in the code,
1722         patch factors out the logic in ::handleMousePressEvent into a helper function,
1723         and ultimately reuses it in ::eventMayStartDrag.
1724
1725         No new tests for two reasons:
1726
1727         1) ::handleMousePressEvent will not have any behavior change. Code is factored out
1728         into a helper.
1729
1730         2) The callees of ::eventMayStartDrag are currently WebPage::shouldDelayWindowOrderingEvent
1731         and ::acceptsFirstMouse. Based on my understanding of [1], these methods
1732         are called when there is a (say) browser window in background with some text selected,
1733         and user starts to drag the selected content. Dragging happens without bringing the window
1734         foreground. This is called "non-activating click".
1735         Such behavior will not change with the patch.
1736
1737         [1] https://bugs.webkit.org/show_bug.cgi?id=55053 - "Implement non-activating clicks to allow dragging out of a background window"
1738
1739         * page/EventHandler.cpp:
1740         (WebCore::isSingleMouseDownOnLinkOrImage):
1741         (WebCore::canMouseEventStartDragInternal):
1742         (WebCore::EventHandler::handleMousePressEvent):
1743         (WebCore::documentPointForWindowPoint): Moved up in the file to be used elsewhere.
1744         (WebCore::EventHandler::eventMayStartDrag):
1745
1746 2016-03-31  Antonio Gomes  <tonikitoo@webkit.org>
1747
1748         SelectionController::positionForPlatform should ask EditingBehavior for platform specific behavior
1749         https://bugs.webkit.org/show_bug.cgi?id=41976
1750
1751         Reviewed by Darin Adler.
1752
1753         SSIA.
1754
1755         No new tests needed.
1756
1757         * editing/EditingBehavior.h:
1758         (WebCore::EditingBehavior::shouldAlwaysExtendSelectionFromExtentEndpoint):
1759         * editing/FrameSelection.cpp:
1760         (WebCore::FrameSelection::positionForPlatform):
1761
1762 2016-03-31  Jeremy Jones  <jeremyj@apple.com>
1763
1764         mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
1765         https://bugs.webkit.org/show_bug.cgi?id=155924
1766
1767         Reviewed by Simon Fraser.
1768
1769         No new tests because there is no behavior change.
1770
1771         Remove machinery for mediaShouldUsePersistentCache() adopt usesEphemeralSession().
1772
1773         * html/HTMLMediaElement.cpp:
1774         (WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache):
1775         * page/ChromeClient.h: remove mediaShouldUsePersistentCache()
1776
1777 2016-03-30  Ada Chan  <adachan@apple.com>
1778
1779         Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.
1780         https://bugs.webkit.org/show_bug.cgi?id=156031
1781
1782         Reviewed by Eric Carlson.
1783
1784         * page/ContextMenuController.cpp:
1785         (WebCore::ContextMenuController::contextMenuItemSelected):
1786         Handle the selection of the context menu item.
1787         (WebCore::ContextMenuController::populate):
1788         Add this menu item on Mac.
1789         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1790         Set the menu item's title depending on the current enhanced fullscreen state
1791         and enable this menu item if supported.
1792
1793         * platform/ContextMenuItem.h:
1794         Define the new tag for this menu item.
1795
1796         * platform/LocalizedStrings.cpp:
1797         (WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen):
1798         (WebCore::contextMenuItemTagExitVideoEnhancedFullscreen):
1799         * platform/LocalizedStrings.h:
1800
1801         * rendering/HitTestResult.cpp:
1802         (WebCore::HitTestResult::mediaSupportsEnhancedFullscreen):
1803         (WebCore::HitTestResult::mediaIsInEnhancedFullscreen):
1804         (WebCore::HitTestResult::toggleEnhancedFullscreenForVideo):
1805         * rendering/HitTestResult.h:
1806
1807 2016-03-31  Nan Wang  <n_wang@apple.com>
1808
1809         AX: aria-hidden=false causes video fallback content to be exposed to AX API
1810         https://bugs.webkit.org/show_bug.cgi?id=149278
1811
1812         Reviewed by Chris Fleizach.
1813
1814         The comment says when aria-hidden="false" and object is not rendered, we should
1815         check each parent's aria-hidden status until we encounter a rendered object. So 
1816         added a check for the rendered parent in order to break out of the loop earlier.
1817
1818         Test case covered in modified accessibility/aria-hidden-negates-no-visibility.html
1819
1820         * accessibility/AXObjectCache.cpp:
1821         (WebCore::isNodeAriaVisible):
1822
1823 2016-03-31  Brent Fulgham  <bfulgham@apple.com>
1824
1825         [WK2] Support download attribute feature
1826         https://bugs.webkit.org/show_bug.cgi?id=102914
1827         <rdar://problem/13177492>
1828
1829         Reviewed by Darin Adler.
1830
1831         Tested by imported/w3c/web-platform-tests/html/dom/interfaces.html
1832                   imported/w3c/web-platform-tests/html/dom/reflection-text.html
1833
1834         A first draft implementation of this feature.
1835
1836         * html/HTMLAnchorElement.cpp:
1837         (WebCore::HTMLAnchorElement::handleClick): If the anchor has the 'download'
1838         attribute, pass along the information to the rest of the load system.
1839         * loader/FrameLoadRequest.h:
1840         (WebCore::FrameLoadRequest::FrameLoadRequest): Create new overload that
1841         accepts a download attribute flag and a suggested filename.
1842         (WebCore::FrameLoadRequest::hasDownloadAttribute): Added.
1843         (WebCore::FrameLoadRequest::suggestedFilename): Added.
1844         * loader/FrameLoader.cpp:
1845         (WebCore::FrameLoader::urlSelected): Expand to accept the download attribute
1846         flag and suggested filename.
1847         (WebCore::FrameLoader::loadURL): Populate the NavigationAction with the new
1848         download attribute flag and suggested filename.
1849         (WebCore::FrameLoader::loadPostRequest): Ditto.
1850         * loader/FrameLoader.h:
1851         * loader/FrameLoaderTypes.h: Add new 'HasDownloadAttribute' enum.
1852         * loader/NavigationAction.cpp:
1853         (WebCore::navigationType):
1854         (WebCore::NavigationAction::NavigationAction): Update to accept new download
1855         attribute flag and suggested filename.
1856         * loader/NavigationAction.h:
1857         (WebCore::NavigationAction::hasDownloadAttribute): Added.
1858         (WebCore::NavigationAction::suggestedFilename): Added.
1859         * loader/PolicyChecker.cpp:
1860         (WebCore::PolicyChecker::checkNavigationPolicy): Pass more information to
1861         'continueAfterNavigationPolicy'
1862         (WebCore::PolicyChecker::continueAfterNavigationPolicy): Accept suggested
1863         filename
1864         * loader/PolicyChecker.h:
1865
1866 2016-03-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1867
1868         [Fetch API] Add basic loading of resources for Workers
1869         https://bugs.webkit.org/show_bug.cgi?id=155886
1870
1871         Reviewed by Alex Christensen.
1872
1873         Adding impplementation to WorkerGlobalScopeFetch::fetch similarly to DOMWindowFetch::fetch.
1874         Refactored code in FetchResponse to share code between the two.
1875
1876         Updated WorkerThreadableLoader to cope with an ASSERT.
1877         The ASSERT ensures that a DocumentThreadableLoader::create returns non null. 
1878         In our case, it might happen as all cross origin fetch requests are denied at the moment.
1879         This leads to calling didFail in DocumentThreadableLoader::create call and DocumentThreadableLoader::create to return null.
1880         Updated the ASSERT to ensures that either the load is finished or DocumentThreadableLoader::create does not return null.
1881
1882         Covered by rebased tests.
1883
1884         * Modules/fetch/DOMWindowFetch.cpp:
1885         (WebCore::DOMWindowFetch::fetch):
1886         * Modules/fetch/FetchResponse.cpp:
1887         (WebCore::FetchResponse::startFetching):
1888         (WebCore::FetchResponse::fetch):
1889         * Modules/fetch/FetchResponse.h:
1890         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
1891         (WebCore::WorkerGlobalScopeFetch::fetch):
1892         * Modules/fetch/WorkerGlobalScopeFetch.h:
1893         * loader/WorkerThreadableLoader.cpp:
1894         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1895         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
1896         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
1897         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
1898         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
1899         * loader/WorkerThreadableLoader.h:
1900
1901 2016-03-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1902
1903         [Fetch API] Move isDisturbed handling to FetchBodyOwner
1904         https://bugs.webkit.org/show_bug.cgi?id=155968
1905
1906         Reviewed by Darin Adler.
1907
1908         Moved isDisturbed handling in FetchBodyOwner.
1909         This includes promise rejection in case of disturbed bodies.
1910
1911         No behavior change observable from user scripts.
1912
1913         * Modules/fetch/FetchBody.cpp:
1914         (WebCore::FetchBody::arrayBuffer):
1915         (WebCore::FetchBody::blob):
1916         (WebCore::FetchBody::json):
1917         (WebCore::FetchBody::text):
1918         (WebCore::FetchBody::extractFromBody):
1919         (WebCore::FetchBody::consume):
1920         (WebCore::FetchBody::consumeArrayBuffer):
1921         (WebCore::FetchBody::processIfEmptyOrDisturbed): Deleted.
1922         * Modules/fetch/FetchBody.h:
1923         (WebCore::FetchBody::isEmpty): Deleted.
1924         * Modules/fetch/FetchBodyOwner.cpp:
1925         (WebCore::FetchBodyOwner::arrayBuffer):
1926         (WebCore::FetchBodyOwner::blob):
1927         (WebCore::FetchBodyOwner::formData):
1928         (WebCore::FetchBodyOwner::json):
1929         (WebCore::FetchBodyOwner::text):
1930         * Modules/fetch/FetchBodyOwner.h:
1931         (WebCore::FetchBodyOwner::isDisturbed):
1932         (WebCore::FetchBodyOwner::setDisturbed):
1933         * Modules/fetch/FetchRequest.cpp:
1934         (WebCore::FetchRequest::create):
1935         * Modules/fetch/FetchResponse.cpp:
1936         (WebCore::FetchResponse::clone):
1937
1938 2016-03-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1939
1940         Remove forEach use from Fetch Headers builtin constructor
1941         https://bugs.webkit.org/show_bug.cgi?id=155967
1942
1943         Reviewed by Joseph Pecoraro.
1944
1945         Tests: fetch/shadowing-forEach.html
1946                streams/shadowing-Promise.html
1947                streams/shadowing-defineProperty.html
1948
1949         * Modules/fetch/FetchHeaders.idl: Adding fillFromJS private method.
1950         * Modules/fetch/FetchHeaders.js:
1951         (initializeFetchHeaders): Using fillFromJS private method. Using
1952         instanceof test to check whether parameter is Headers or subclass of it.
1953         * bindings/js/WebCoreBuiltinNames.h: Adding fillFromJS private symbol.
1954
1955 2016-03-30  Alex Christensen  <achristensen@webkit.org>
1956
1957         Fix Windows build.
1958
1959         * platform/text/LineEnding.cpp:
1960         make the char's and uint8_t's compile.
1961
1962 2016-03-30  Alex Christensen  <achristensen@webkit.org>
1963
1964         Build fix.
1965
1966         * platform/text/LineEnding.cpp:
1967
1968 2016-03-30  Alex Christensen  <achristensen@webkit.org>
1969
1970         Fix GTK and Windows builds after r198869.
1971
1972         * platform/network/soup/ResourceHandleSoup.cpp:
1973         (WebCore::blobIsOutOfDate):
1974         (WebCore::addEncodedBlobItemToSoupMessageBody):
1975         * platform/text/LineEnding.cpp:
1976
1977 2016-03-30  Simon Fraser  <simon.fraser@apple.com>
1978
1979         [iOS WK2] Avoid creating tiles that are too large for rendering
1980         https://bugs.webkit.org/show_bug.cgi?id=156050
1981         rdar://problem/25424541
1982
1983         Reviewed by Darin Adler.
1984
1985         In the case of a WKWebView which is sized large enough to show an entire document
1986         (for example, when enclosed inside a UIScrollView), we would create tiles that were
1987         larger than CoreAnimation was willing to deal with.
1988         
1989         * platform/graphics/ca/TileController.cpp:
1990         (WebCore::TileController::tileSize): Take the device scale, and the max IOSurface size
1991         into account when computing the max tile size.
1992         * platform/graphics/cocoa/IOSurface.mm:
1993         (IOSurface::maximumSize): CoreAnimation imposes limits in addition to the size reported
1994         by IOSurfaceGetPropertyMaximum(), namely an 8k cap, so mimic that here.
1995         (IOSurface::ensurePlatformContext): Typo.
1996
1997 2016-03-30  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1998
1999         [EFL][CMake] WebKit include path has been added to system include path
2000         https://bugs.webkit.org/show_bug.cgi?id=156019
2001
2002         Reviewed by Darin Adler.
2003
2004         Fix wrong include path addition.
2005
2006         * PlatformEfl.cmake:
2007
2008             Add ${WEBCORE_DIR}/platform/graphics/surfaces/egl to WebCore include directory path.
2009
2010 2016-03-30  Joanmarie Diggs  <jdiggs@igalia.com>
2011
2012         AX: Update handling of SVG elements with presentational role
2013         https://bugs.webkit.org/show_bug.cgi?id=156042
2014
2015         Reviewed by Chris Fleizach.
2016
2017         Because the new expected behavior is to treat SVG elements with a
2018         presentational role just like we treat other host language elements
2019         with a presentational role, delete AccessibilitySVGElement's
2020         determineAriaRoleAttribute().
2021
2022         No new test files. The expectations for w3c-svg-presentational-role.html
2023         were updated because the presentational elements which have global ARIA
2024         attributes are now being included in the accessibility tree. In addition,
2025         several new test cases were added to this layout test so that we have
2026         coverage for more presentational elements which lack global ARIA attributes.
2027
2028         * accessibility/AccessibilitySVGElement.cpp:
2029         (WebCore::AccessibilitySVGElement::determineAriaRoleAttribute): Deleted.
2030         * accessibility/AccessibilitySVGElement.h:
2031
2032 2016-03-30  Brady Eidson  <beidson@apple.com>
2033
2034         Make BlobData use ThreadSafeSharedBuffer instead of RawData.
2035         https://bugs.webkit.org/show_bug.cgi?id=156041
2036
2037         Reviewed by Alex Christensen.
2038
2039         No new tests (No change in behavior).
2040
2041         * Modules/fetch/FetchBody.cpp:
2042         (WebCore::FetchBody::consumeText):
2043         (WebCore::FetchBody::extractFromText):
2044         (WebCore::blobFromArrayBuffer):
2045         * Modules/fetch/FetchBody.h:
2046         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2047         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
2048         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2049         * Modules/websockets/WebSocket.cpp:
2050         (WebCore::WebSocket::didReceiveBinaryData):
2051         * Modules/websockets/WebSocket.h:
2052         * Modules/websockets/WebSocketChannel.cpp:
2053         (WebCore::WebSocketChannel::processFrame):
2054         * Modules/websockets/WebSocketChannel.h:
2055         * Modules/websockets/WebSocketChannelClient.h:
2056         (WebCore::WebSocketChannelClient::didReceiveBinaryData):
2057         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2058         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2059         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2060         * fileapi/Blob.cpp:
2061         (WebCore::Blob::Blob):
2062         * fileapi/Blob.h:
2063         (WebCore::Blob::create):
2064         * fileapi/WebKitBlobBuilder.h:
2065         * platform/network/BlobData.cpp:
2066         (WebCore::BlobData::BlobData):
2067         (WebCore::BlobDataItem::length):
2068         (WebCore::BlobData::appendData):
2069         (WebCore::BlobData::setContentType): Deleted.
2070         * platform/network/BlobData.h:
2071         (WebCore::BlobDataItem::type):
2072         (WebCore::BlobDataItem::data):
2073         (WebCore::BlobDataItem::file):
2074         (WebCore::BlobDataItem::BlobDataItem):
2075         (WebCore::BlobData::create):
2076         (WebCore::RawData::create): Deleted.
2077         (WebCore::RawData::data): Deleted.
2078         (WebCore::RawData::length): Deleted.
2079         (WebCore::RawData::RawData): Deleted.
2080         * platform/network/BlobPart.h:
2081         (WebCore::BlobPart::BlobPart):
2082         (WebCore::BlobPart::data):
2083         (WebCore::BlobPart::moveData):
2084         * platform/network/BlobRegistryImpl.cpp:
2085         (WebCore::BlobRegistryImpl::appendStorageItems):
2086         (WebCore::BlobRegistryImpl::registerFileBlobURL):
2087         (WebCore::BlobRegistryImpl::registerBlobURL):
2088         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
2089         * platform/network/BlobResourceHandle.cpp:
2090         (WebCore::BlobResourceHandle::getSizeForNext):
2091         (WebCore::BlobResourceHandle::readSync):
2092         (WebCore::BlobResourceHandle::readDataSync):
2093         (WebCore::BlobResourceHandle::readFileSync):
2094         (WebCore::BlobResourceHandle::readAsync):
2095         (WebCore::BlobResourceHandle::readDataAsync):
2096         (WebCore::BlobResourceHandle::readFileAsync):
2097         * platform/network/BlobResourceHandle.h:
2098         * platform/network/FormData.cpp:
2099         (WebCore::appendBlobResolved):
2100         * platform/network/soup/ResourceHandleSoup.cpp:
2101         (WebCore::blobIsOutOfDate):
2102         (WebCore::addEncodedBlobItemToSoupMessageBody):
2103         * platform/text/LineEnding.cpp:
2104         (WebCore::normalizeToCROrLF):
2105         (WebCore::normalizeLineEndingsToNative):
2106         (WebCore::normalizeLineEndingsToCR): Deleted.
2107         (WebCore::normalizeLineEndingsToLF): Deleted.
2108         * platform/text/LineEnding.h:
2109         * xml/XMLHttpRequest.cpp:
2110         (WebCore::XMLHttpRequest::responseBlob):
2111
2112 2016-03-30  Enrica Casucci  <enrica@apple.com>
2113
2114         Add a style for Data Detectors links.
2115         https://bugs.webkit.org/show_bug.cgi?id=155996
2116         rdar://problem/25343514
2117
2118         Reviewed by Sam Weinig.
2119
2120         Based on indication from the data detection engine,
2121         we style some of the links differently.
2122
2123         * editing/cocoa/DataDetection.mm:
2124         (WebCore::DataDetection::detectContentInRange):
2125         * platform/cocoa/DataDetectorsCoreSoftLink.h:
2126         * platform/cocoa/DataDetectorsCoreSoftLink.mm:
2127
2128 2016-03-30  Myles C. Maxfield  <mmaxfield@apple.com>
2129
2130         [OS X] [RTL Scrollbars] Overlay RTL scrollbars animate in from the wrong side
2131         https://bugs.webkit.org/show_bug.cgi?id=155962
2132
2133         Reviewed by Darin Adler.
2134
2135         We can control the animation direction with the NSScrollerImp property
2136         userInterfaceLayoutDirection.
2137
2138         This patch also adds an Internals function to set whether or not we
2139         should mock the scrollbars. Not mocking the scrollbars is required
2140         to use NSScrollerImps.
2141
2142         Test: fast/scrolling/rtl-scrollbars-animation-property.html
2143
2144         * platform/ScrollableArea.h: Use nullptr instead of 0.
2145         (WebCore::ScrollableArea::horizontalScrollbar):
2146         (WebCore::ScrollableArea::verticalScrollbar):
2147         (WebCore::ScrollableArea::tiledBacking):
2148         (WebCore::ScrollableArea::layerForHorizontalScrollbar):
2149         (WebCore::ScrollableArea::layerForVerticalScrollbar):
2150         (WebCore::ScrollableArea::layerForScrolling):
2151         (WebCore::ScrollableArea::layerForScrollCorner):
2152         (WebCore::ScrollableArea::layerForOverhangAreas):
2153         * platform/mac/ScrollAnimatorMac.mm:
2154         (WebCore::ScrollAnimatorMac::updateScrollerStyle): Set the direction
2155         of the new NSScrollerImps.
2156         * platform/mac/ScrollbarThemeMac.h:
2157         * platform/mac/ScrollbarThemeMac.mm:
2158         (WebCore::ScrollbarThemeMac::didCreateScrollerImp): Set the direction
2159         of an NSScrollerImp.
2160         (WebCore::ScrollbarThemeMac::registerScrollbar): Call
2161         didCreateScrollerImp().
2162         (WebCore::ScrollbarThemeMac::isLayoutDirectionRTL): Used for testing,
2163         to tell if the scroller's direction is RTL.
2164         * platform/spi/mac/NSScrollerImpSPI.h:
2165         * rendering/RenderTreeAsText.cpp:
2166         (WebCore::write):
2167         * testing/Internals.cpp:
2168         (WebCore::Internals::setMockScrollbarsEnabled): Used for testing.
2169         * testing/Internals.h:
2170         * testing/Internals.idl:
2171
2172 2016-03-30  Sam Weinig  <sam@webkit.org>
2173
2174         -webkit-text-underline-position: under; does not work in ToT
2175         https://bugs.webkit.org/show_bug.cgi?id=156038
2176
2177         Reviewed by David Hyatt.
2178
2179         Test: fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html
2180
2181         * style/InlineTextBoxStyle.cpp:
2182         (WebCore::computeUnderlineOffset):
2183         Only resolve the underline position when based on the InlineTextBox when it is specified as auto.
2184
2185 2016-03-30  Alex Christensen  <achristensen@webkit.org>
2186
2187         Fix Windows EWS after r198766
2188         https://bugs.webkit.org/show_bug.cgi?id=156029
2189
2190         Reviewed by Brent Fulgham.
2191
2192         * CMakeLists.txt:
2193         * PlatformWin.cmake:
2194         Copy headers before compiling WebCoreDerivedSources, not just before compiling WebCore.
2195
2196 2016-03-30  Brady Eidson  <beidson@apple.com>
2197
2198         Random SerializedScriptValue cleanup.
2199         https://bugs.webkit.org/show_bug.cgi?id=156032
2200
2201         Rubberstamped by Tim Hatcher.
2202
2203         - Remove two unused functions.
2204         - Make the class always be ThreadSafeRefCounted.
2205
2206         * bindings/js/SerializedScriptValue.cpp:
2207         (WebCore::SerializedScriptValue::numberValue): Deleted.
2208         (WebCore::SerializedScriptValue::undefinedValue): Deleted.
2209         * bindings/js/SerializedScriptValue.h:
2210
2211 2016-03-30  Brent Fulgham  <bfulgham@apple.com>
2212
2213         Avoid WebCore-prefixed paths when building WebCore
2214         https://bugs.webkit.org/show_bug.cgi?id=156027
2215
2216         Reviewed by David Kilzer.
2217
2218         Replace instances of '#include <WebCore/XXXYYY.h>"' with the normal
2219         '#include "XXXYYY.h"' for files inside WebCore.
2220
2221         * config.h:
2222         * inspector/InspectorTimelineAgent.cpp:
2223         * page/ViewportConfiguration.cpp:
2224         * platform/audio/ios/AudioDestinationIOS.cpp:
2225         * platform/cocoa/WebVideoFullscreenModel.h:
2226         * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
2227         * platform/graphics/Font.h:
2228         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
2229         * platform/graphics/cg/ColorCG.cpp:
2230         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2231         * platform/mac/WebVideoFullscreenInterfaceMac.h:
2232         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
2233
2234 2016-03-30  Said Abou-Hallawa  <sabouhallawa@apple,com>
2235
2236         Move the CG ImageDecoder class from ImageSourceCG.cpp to ImageDecoderCG.h and .cpp
2237         https://bugs.webkit.org/show_bug.cgi?id=155980
2238
2239         Reviewed by Simon Fraser.
2240
2241         After this step, ImageSource.cpp and ImageSourceCG.cpp look very similar
2242         so they can be merged in one file. All the redundant code in these two files
2243         can be removed.
2244
2245         * PlatformAppleWin.cmake:
2246         * PlatformMac.cmake:
2247         * WebCore.xcodeproj/project.pbxproj:
2248         * platform/graphics/cg/ImageDecoderCG.cpp: Copied from Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp.
2249         (WebCore::createImageSourceOptions):
2250         (WebCore::imageSourceOptions):
2251         (WebCore::orientationFromProperties):
2252         (WebCore::sharedBufferGetBytesAtPosition):
2253         (WebCore::sharedBufferRelease):
2254         (WebCore::ImageDecoder::ImageDecoder):
2255         (WebCore::ImageDecoder::subsamplingLevelForScale):
2256         (WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
2257         (WebCore::ImageDecoder::filenameExtension):
2258         (WebCore::ImageDecoder::isSizeAvailable):
2259         (WebCore::ImageDecoder::size):
2260         (WebCore::ImageDecoder::frameCount):
2261         (WebCore::ImageDecoder::repetitionCount):
2262         (WebCore::ImageDecoder::hotSpot):
2263         (WebCore::ImageDecoder::frameSizeAtIndex):
2264         (WebCore::ImageDecoder::frameIsCompleteAtIndex):
2265         (WebCore::ImageDecoder::orientationAtIndex):
2266         (WebCore::ImageDecoder::frameDurationAtIndex):
2267         (WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
2268         (WebCore::ImageDecoder::frameHasAlphaAtIndex):
2269         (WebCore::ImageDecoder::frameBytesAtIndex):
2270         (WebCore::ImageDecoder::createFrameImageAtIndex):
2271         (WebCore::ImageDecoder::setData):
2272         * platform/graphics/cg/ImageDecoderCG.h: Added.
2273         (WebCore::ImageDecoder::create):
2274         * platform/graphics/cg/ImageSourceCG.cpp:
2275         (WebCore::ImageDecoder::create): Deleted.
2276         (WebCore::createImageSourceOptions): Deleted.
2277         (WebCore::imageSourceOptions): Deleted.
2278         (WebCore::orientationFromProperties): Deleted.
2279         (WebCore::sharedBufferGetBytesAtPosition): Deleted.
2280         (WebCore::sharedBufferRelease): Deleted.
2281         (WebCore::ImageDecoder::ImageDecoder): Deleted.
2282         (WebCore::ImageDecoder::subsamplingLevelForScale): Deleted.
2283         (WebCore::ImageDecoder::bytesDecodedToDetermineProperties): Deleted.
2284         (WebCore::ImageDecoder::filenameExtension): Deleted.
2285         (WebCore::ImageDecoder::isSizeAvailable): Deleted.
2286         (WebCore::ImageDecoder::size): Deleted.
2287         (WebCore::ImageDecoder::frameCount): Deleted.
2288         (WebCore::ImageDecoder::repetitionCount): Deleted.
2289         (WebCore::ImageDecoder::hotSpot): Deleted.
2290         (WebCore::ImageDecoder::frameSizeAtIndex): Deleted.
2291         (WebCore::ImageDecoder::frameIsCompleteAtIndex): Deleted.
2292         (WebCore::ImageDecoder::orientationAtIndex): Deleted.
2293         (WebCore::ImageDecoder::frameDurationAtIndex): Deleted.
2294         (WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex): Deleted.
2295         (WebCore::ImageDecoder::frameHasAlphaAtIndex): Deleted.
2296         (WebCore::ImageDecoder::frameBytesAtIndex): Deleted.
2297         (WebCore::ImageDecoder::createFrameImageAtIndex): Deleted.
2298         (WebCore::ImageDecoder::setData): Deleted.
2299
2300 2016-03-30  Per Arne Vollan  <peavo@outlook.com>
2301
2302         [WinCairo][MediaFoundation] Video size is not always set.
2303         https://bugs.webkit.org/show_bug.cgi?id=156020
2304
2305         Reviewed by Darin Adler.
2306
2307         Getting the video display control object from the media session might fail the first time.
2308         In case it fails, we should try again when setting the video size.
2309
2310         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2311         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
2312         (WebCore::MediaPlayerPrivateMediaFoundation::getVideoDisplay):
2313         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
2314         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2315
2316 2016-03-30  Commit Queue  <commit-queue@webkit.org>
2317
2318         Unreviewed, rolling out r198828.
2319         https://bugs.webkit.org/show_bug.cgi?id=156030
2320
2321         Confirming PLT regression (Requested by anttik on #webkit).
2322
2323         Reverted changeset:
2324
2325         "Separate render tree updating from style resolve"
2326         https://bugs.webkit.org/show_bug.cgi?id=155298
2327         http://trac.webkit.org/changeset/198828
2328
2329 2016-03-30  Keith Miller <keith_miller@apple.com>
2330
2331         Unreviewed, rollout r198808. The patch causes crashes on 32-bit and appears to be a JSBench regression.
2332
2333 2016-03-30  Myles C. Maxfield  <mmaxfield@apple.com>
2334
2335         [OS X] [RTL Scrollbars] List boxes should obey RTL scrollbars
2336         https://bugs.webkit.org/show_bug.cgi?id=155991
2337
2338         Reviewed by Darin Adler.
2339
2340         List boxes were created before RenderLayers, and therefore don't share
2341         the scollbar logic with them. Instead, they manage their own Scrollbars.
2342         The placement logic needs to be updated to take RTL scrollbars into
2343         account.
2344
2345         Tests: fast/scrolling/rtl-scrollbars-listbox-scroll.html
2346                fast/scrolling/rtl-scrollbars-listbox-select-left.html
2347                fast/scrolling/rtl-scrollbars-listbox-select-right.html
2348                fast/scrolling/rtl-scrollbars-listbox-simple.html
2349                fast/scrolling/rtl-scrollbars-listbox.html
2350
2351         * rendering/RenderBox.cpp:
2352         (WebCore::RenderBox::contentBoxRect):
2353         * rendering/RenderBox.h:
2354         (WebCore::RenderBox::contentBoxRect): Deleted.
2355         * rendering/RenderListBox.cpp:
2356         (WebCore::RenderListBox::itemBoundingBoxRect):
2357         (WebCore::RenderListBox::paintScrollbar):
2358         (WebCore::RenderListBox::paintItemBackground):
2359         (WebCore::RenderListBox::isPointInOverflowControl):
2360         (WebCore::RenderListBox::listIndexAtOffset):
2361         (WebCore::RenderListBox::nodeAtPoint):
2362         (WebCore::RenderListBox::controlClipRect):
2363         (WebCore::RenderListBox::invalidateScrollbarRect):
2364         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
2365         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
2366         (WebCore::RenderListBox::scrolledToTop):
2367         (WebCore::RenderListBox::scrolledToBottom):
2368
2369 2016-03-30  Myles C. Maxfield  <mmaxfield@apple.com>
2370
2371         Use references instead of pointers in scrollbar-related code
2372         https://bugs.webkit.org/show_bug.cgi?id=155998
2373
2374         Reviewed by Dean Jackson.
2375
2376         Migrate pointers to references.
2377
2378         No new tests because there is no behavior change.
2379
2380         * page/FrameView.cpp:
2381         (WebCore::FrameView::invalidateScrollbarRect):
2382         (WebCore::FrameView::setVisibleScrollerThumbRect):
2383         * page/FrameView.h:
2384         * platform/ScrollView.cpp:
2385         (WebCore::ScrollView::convertFromScrollbarToContainingView):
2386         (WebCore::ScrollView::convertFromContainingViewToScrollbar):
2387         * platform/ScrollView.h:
2388         * platform/ScrollableArea.cpp:
2389         (WebCore::ScrollableArea::invalidateScrollbar):
2390         * platform/ScrollableArea.h:
2391         (WebCore::ScrollableArea::convertFromScrollbarToContainingView):
2392         (WebCore::ScrollableArea::convertFromContainingViewToScrollbar):
2393         * platform/Scrollbar.cpp:
2394         (WebCore::Scrollbar::invalidateRect):
2395         (WebCore::Scrollbar::convertToContainingView):
2396         (WebCore::Scrollbar::convertFromContainingView):
2397         * rendering/RenderLayer.cpp:
2398         (WebCore::RenderLayer::convertFromScrollbarToContainingView):
2399         (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
2400         (WebCore::RenderLayer::scrollbarOffset):
2401         (WebCore::RenderLayer::invalidateScrollbarRect):
2402         * rendering/RenderLayer.h:
2403         * rendering/RenderLayerCompositor.cpp:
2404         (WebCore::RenderLayerCompositor::destroyRootLayer):
2405         * rendering/RenderListBox.cpp:
2406         (WebCore::RenderListBox::invalidateScrollbarRect):
2407         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
2408         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
2409         * rendering/RenderListBox.h:
2410         * platform/win/PopupMenuWin.cpp:
2411         (WebCore::RenderListBox::invalidateScrollbarRect):
2412         * platform/win/PopupMenuWin.h:
2413
2414 2016-03-24  Simon Fraser  <simon.fraser@apple.com>
2415
2416         Make animation events non-cancelable
2417         https://bugs.webkit.org/show_bug.cgi?id=78110
2418
2419         Reviewed by Dan Bates.
2420
2421         Make the animation events non-cancelable.
2422
2423         Test: animations/animation-events-not-cancelable.html
2424
2425         * dom/AnimationEvent.cpp:
2426         (WebCore::AnimationEvent::AnimationEvent):
2427
2428 2016-03-30  Manuel Rego Casasnovas  <rego@igalia.com>
2429
2430         [css-grid] Refactor positioned children code
2431         https://bugs.webkit.org/show_bug.cgi?id=155972
2432
2433         Reviewed by Sergio Villar Senin.
2434
2435         This is a refactoring of RenderGrid::offsetAndBreadthForPositionedChild()
2436         in order to calculate offset and breadth in a more clean way.
2437         Hopefully making the code easier to follow.
2438
2439         Thanks to the refactoring, now positioned children in RTL
2440         are working fine if they use the static inline position
2441         (when "left" and "right" properties are both "auto").
2442
2443         The other case (not having a static inline position)
2444         will be fixed in a separated patch.
2445
2446         * rendering/RenderGrid.cpp:
2447         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
2448
2449 2016-03-30  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2450
2451         Binding generator should allow passing DOM objects parameters as references
2452         https://bugs.webkit.org/show_bug.cgi?id=155953
2453
2454         Reviewed by Alex Christensen.
2455
2456         Updating binding generator to pass DOM object parameters as references.
2457         Introducing UsePointersEvenForNonNullableObjectArguments to disable that change.
2458
2459         Updating FetchRequest.idl and DOMWindowFetch.idl to pass parameters as references.
2460
2461         Updated other IDL interfaces to keep passing DOM object parameters as pointers.
2462         This should not change the behavior for these interfaces.
2463         UsePointersEvenForNonNullableObjectArguments should be progressively removed on those interfaces.
2464
2465         Binding generator tests covered by rebased binding tests.
2466
2467         * Modules/encryptedmedia/MediaKeySession.idl:
2468         * Modules/encryptedmedia/MediaKeys.idl:
2469         * Modules/fetch/DOMWindowFetch.cpp:
2470         (WebCore::DOMWindowFetch::fetch):
2471         * Modules/fetch/DOMWindowFetch.h:
2472         * Modules/fetch/DOMWindowFetch.idl:
2473         * Modules/fetch/FetchRequest.cpp:
2474         (WebCore::FetchRequest::create):
2475         * Modules/fetch/FetchRequest.h:
2476         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
2477         (WebCore::WorkerGlobalScopeFetch::fetch):
2478         * Modules/fetch/WorkerGlobalScopeFetch.h:
2479         * Modules/mediacontrols/MediaControlsHost.idl:
2480         * Modules/mediasource/MediaSource.idl:
2481         * Modules/mediasource/SourceBuffer.idl:
2482         * Modules/mediastream/MediaStream.idl:
2483         * Modules/speech/SpeechSynthesis.idl:
2484         * Modules/webaudio/AudioContext.idl:
2485         * Modules/webaudio/OscillatorNode.idl:
2486         * Modules/websockets/WebSocket.idl:
2487         * bindings/scripts/CodeGeneratorJS.pm:
2488         (GenerateParametersCheck):
2489         (IsParameterPassedByReference):
2490         (GenerateConstructorDefinition):
2491         * bindings/scripts/IDLAttributes.txt:
2492         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2493         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2494         * bindings/scripts/test/JS/JSTestInterface.cpp:
2495         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2496         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2497         * bindings/scripts/test/JS/JSTestObj.cpp:
2498         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2499         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
2500         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
2501         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
2502         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2503         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2504         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
2505         (WebCore::jsTestObjPrototypeFunctionConvert1):
2506         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
2507         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
2508         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
2509         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
2510         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
2511         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
2512         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
2513         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2514         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):
2515         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2516         (WebCore::constructJSTestOverloadedConstructors1):
2517         (WebCore::constructJSTestOverloadedConstructors3):
2518         * css/FontFaceSet.idl:
2519         * css/WebKitCSSMatrix.idl:
2520         * dom/CompositionEvent.idl:
2521         * dom/DataTransfer.idl:
2522         * dom/Document.idl:
2523         * dom/Element.idl:
2524         * dom/EventTarget.idl:
2525         * dom/KeyboardEvent.idl:
2526         * dom/MouseEvent.idl:
2527         * dom/MutationEvent.idl:
2528         * dom/MutationObserver.idl:
2529         * dom/NamedNodeMap.idl:
2530         * dom/Node.idl:
2531         * dom/Range.idl:
2532         * dom/TextEvent.idl:
2533         * dom/TouchEvent.idl:
2534         * dom/UIEvent.idl:
2535         * dom/WebKitNamedFlow.idl:
2536         * dom/WheelEvent.idl:
2537         * fileapi/FileReader.idl:
2538         * fileapi/FileReaderSync.idl:
2539         * html/DOMURL.idl:
2540         * html/HTMLElement.idl:
2541         * html/HTMLMediaElement.idl:
2542         * html/HTMLOptionsCollection.idl:
2543         * html/HTMLSelectElement.idl:
2544         * html/canvas/CanvasRenderingContext2D.idl:
2545         * html/canvas/DOMPath.idl:
2546         * html/canvas/OESVertexArrayObject.idl:
2547         * html/canvas/WebGLDebugShaders.idl:
2548         * html/canvas/WebGLRenderingContext.idl:
2549         * html/canvas/WebGLRenderingContextBase.idl:
2550         * html/track/TextTrack.idl:
2551         * inspector/InspectorFrontendHost.idl:
2552         * page/DOMSelection.idl:
2553         * storage/StorageEvent.idl:
2554         * svg/SVGGraphicsElement.idl:
2555         * svg/SVGLengthList.idl:
2556         * svg/SVGNumberList.idl:
2557         * svg/SVGPathSegList.idl:
2558         * svg/SVGPointList.idl:
2559         * svg/SVGSVGElement.idl:
2560         * svg/SVGTransformList.idl:
2561         * testing/Internals.idl:
2562         * xml/XMLSerializer.idl:
2563         * xml/XPathEvaluator.idl:
2564         * xml/XPathExpression.idl:
2565         * xml/XSLTProcessor.idl:
2566
2567 2016-03-29  Joonghun Park  <jh718.park@samsung.com>
2568
2569         [EFL] Fix build break since r198800. Unreviewed.
2570         https://bugs.webkit.org/show_bug.cgi?id=156011
2571
2572         Currently libWebCoreDerivedSources.a cannot see the symbol located in WebCore Source files.
2573         This patch let the library can see the symbols of WebCore Sources.
2574
2575         * PlatformEfl.cmake:
2576
2577 2016-03-26  Antti Koivisto  <antti@apple.com>
2578
2579         Separate render tree updating from style resolve
2580         https://bugs.webkit.org/show_bug.cgi?id=155298
2581
2582         Reviewed by Andreas Kling.
2583
2584         This patch splits computing document style and applying the results into two distinct steps:
2585
2586         Style::TreeResolver::resolve()
2587                 |
2588                 | Style::Update
2589                 V
2590         RenderTreeUpdater::commit()
2591
2592         Style::TreeResolver::resolve() returns a Style::Update object that contains all the changes to be made
2593         for the whole composed tree. RenderTreeUpdater then applies the changes updating, building or tearing
2594         down portions of the render tree as needed.
2595
2596         Style::Update consists of a map that contains new style for each newly resolved element along with some
2597         metadata. A separate map contains text nodes that require reconstruction. It also tracks change roots so
2598         RenderTreeUpdater needs to traverse the changed subtrees only.
2599
2600         The patch eliminates the recursive render tree build code path replacing it with iterative functions.
2601
2602         This will enable future optimizations. For example we won't need to commit to immediate rendering
2603         changes simply because some script or internal function requires up-to-date style.
2604
2605         * CMakeLists.txt:
2606         * WebCore.xcodeproj/project.pbxproj:
2607         * css/StyleResolver.cpp:
2608         (WebCore::StyleResolver::State::State):
2609         (WebCore::StyleResolver::styleForElement):
2610         * css/StyleResolver.h:
2611         (WebCore::StyleResolver::setOverrideDocumentElementStyle):
2612         (WebCore::StyleResolver::State::State):
2613
2614             Root element style is needed for resolving other elements. Add a way to provide it without looking
2615             into active document style.
2616
2617         * dom/Document.cpp:
2618         (WebCore::Document::recalcStyle):
2619
2620             Resolve the document style and commit it immediately (for now).
2621
2622         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
2623         * dom/Document.h:
2624         (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
2625         (WebCore::Document::inStyleRecalc):
2626         (WebCore::Document::inRenderTreeUpdate):
2627         * dom/Element.cpp:
2628         (WebCore::Element::setChildIndex):
2629
2630             Setting the unique bit is now done by style relations update code.
2631
2632         * dom/Node.cpp:
2633         (WebCore::Node::setNeedsStyleRecalc):
2634
2635             Prevent spurious style invalidation during render tree updating.
2636
2637         * rendering/RenderBox.cpp:
2638         (WebCore::RenderBox::styleDidChange):
2639
2640             Capturing body element color for color:-webkit-text is now done by TreeResolver.
2641
2642         * rendering/RenderElement.h:
2643         (WebCore::RenderElement::setAnimatableStyle): Deleted.
2644
2645             No longer used.
2646
2647         * style/RenderTreePosition.cpp:
2648         (WebCore::RenderTreePosition::nextSiblingRenderer):
2649
2650             Skip over non-rendered slot elements.
2651
2652         * style/RenderTreeUpdater.cpp: Added.
2653         (WebCore::RenderTreeUpdater::Parent::Parent):
2654         (WebCore::RenderTreeUpdater::RenderTreeUpdater):
2655         (WebCore::hasDisplayContents):
2656         (WebCore::findRenderingRoot):
2657         (WebCore::RenderTreeUpdater::commit):
2658
2659             Call updateRenderTree for each change root.
2660
2661         (WebCore::shouldCreateRenderer):
2662         (WebCore::RenderTreeUpdater::updateRenderTree):
2663
2664             Iteratively traverse the composed tree starting for a change root.
2665             Apply the changes calling updateElementRenderer and updateTextRenderer as needed.
2666             Enter subtrees that haves changes to apply.
2667
2668         (WebCore::RenderTreeUpdater::renderTreePosition):
2669
2670             We may not create renderers for all elements (<slot> or more generally display:contents) that
2671             have rendered descendants. Search the parent stack to find the valid position.
2672
2673         (WebCore::RenderTreeUpdater::pushParent):
2674         (WebCore::RenderTreeUpdater::popParent):
2675         (WebCore::RenderTreeUpdater::popParentsToDepth):
2676
2677             Maintain parent stack.
2678
2679         (WebCore::pseudoStyleCacheIsInvalid):
2680         (WebCore::RenderTreeUpdater::updateElementRenderer):
2681
2682             Create, delete or update the renderer.
2683
2684         (WebCore::moveToFlowThreadIfNeeded):
2685         (WebCore::RenderTreeUpdater::createRenderer):
2686         (WebCore::textRendererIsNeeded):
2687         (WebCore::createTextRenderer):
2688         (WebCore::RenderTreeUpdater::updateTextRenderer):
2689         (WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2690
2691             This is moved from TreeResolver.
2692
2693         (WebCore::needsPseudoElement):
2694         (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
2695
2696             Pseudo elements are handled entirely during render tree construction. Compute their style and
2697             create or delete them as needed.
2698
2699         * style/RenderTreeUpdater.h: Added.
2700         (WebCore::RenderTreeUpdater::parent):
2701         * style/StyleRelations.cpp:
2702         (WebCore::Style::commitRelationsToRenderStyle):
2703         (WebCore::Style::commitRelations):
2704
2705             Commit to Style::Update instead of the document if needed.
2706
2707         (WebCore::Style::commitRelationsToDocument): Deleted.
2708         * style/StyleRelations.h:
2709         * style/StyleSharingResolver.cpp:
2710         (WebCore::Style::elementHasDirectionAuto):
2711         (WebCore::Style::SharingResolver::resolve):
2712
2713             Fetch the shareable style from Style::Update instead of the active document style.
2714
2715         (WebCore::Style::SharingResolver::findSibling):
2716         (WebCore::Style::SharingResolver::canShareStyleWithElement):
2717         * style/StyleSharingResolver.h:
2718         * style/StyleTreeResolver.cpp:
2719         (WebCore::Style::TreeResolver::Parent::Parent):
2720
2721             No need for render tree position anymore.
2722
2723         (WebCore::Style::TreeResolver::popScope):
2724         (WebCore::Style::TreeResolver::styleForElement):
2725         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2726         (WebCore::Style::createTextRendererIfNeeded):
2727         (WebCore::Style::updateTextRendererAfterContentChange):
2728         (WebCore::Style::resetStyleForNonRenderedDescendants):
2729         (WebCore::Style::detachChildren):
2730         (WebCore::Style::detachSlotAssignees):
2731         (WebCore::Style::detachRenderTree):
2732         (WebCore::Style::TreeResolver::resolveElement):
2733
2734             Just resolve the style and return it, no more applying or entering render tree construction code paths.
2735
2736         (WebCore::Style::resolveTextNode):
2737         (WebCore::Style::elementImplicitVisibility):
2738         (WebCore::Style::TreeResolver::pushParent):
2739         (WebCore::Style::TreeResolver::popParent):
2740         (WebCore::Style::TreeResolver::popParentsToDepth):
2741         (WebCore::Style::shouldResolvePseudoElement):
2742         (WebCore::Style::TreeResolver::resolveComposedTree):
2743
2744             Add style changes to Style::Update.
2745
2746         (WebCore::Style::TreeResolver::resolve):
2747
2748             Return Style::Update object if non-empty.
2749
2750         (WebCore::Style::postResolutionCallbackQueue):
2751         (WebCore::Style::shouldCreateRenderer): Deleted.
2752         (WebCore::Style::moveToFlowThreadIfNeeded): Deleted.
2753         (WebCore::Style::TreeResolver::createRenderer): Deleted.
2754         (WebCore::Style::TreeResolver::createRenderTreeForChildren): Deleted.
2755         (WebCore::Style::TreeResolver::createRenderTreeForShadowRoot): Deleted.
2756         (WebCore::Style::beforeOrAfterPseudoElement): Deleted.
2757         (WebCore::Style::setBeforeOrAfterPseudoElement): Deleted.
2758         (WebCore::Style::clearBeforeOrAfterPseudoElement): Deleted.
2759         (WebCore::Style::needsPseudoElement): Deleted.
2760         (WebCore::Style::TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement): Deleted.
2761         (WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees): Deleted.
2762         (WebCore::Style::TreeResolver::createRenderTreeRecursively): Deleted.
2763         (WebCore::Style::pseudoStyleCacheIsInvalid): Deleted.
2764         (WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement): Deleted.
2765
2766             Remove the recursive render tree building code path.
2767
2768         * style/StyleTreeResolver.h:
2769         (WebCore::Style::TreeResolver::scope):
2770         * style/StyleUpdate.cpp: Added.
2771         (WebCore::Style::Update::Update):
2772         (WebCore::Style::Update::elementUpdate):
2773         (WebCore::Style::Update::textUpdate):
2774         (WebCore::Style::Update::elementStyle):
2775         (WebCore::Style::Update::addElement):
2776         (WebCore::Style::Update::addText):
2777         (WebCore::Style::Update::addPossibleRoot):
2778         * style/StyleUpdate.h: Added.
2779         (WebCore::Style::Update::roots):
2780         (WebCore::Style::Update::document):
2781         * svg/SVGElement.h:
2782         (WebCore::SVGElement::updateRelativeLengthsInformation):
2783         * svg/SVGUseElement.cpp:
2784         (WebCore::SVGUseElement::svgAttributeChanged):
2785         (WebCore::SVGUseElement::willRecalcStyle):
2786         (WebCore::SVGUseElement::willAttachRenderers): Deleted.
2787
2788             Switch willAttachRenderers to willRecalcStyle as the former is now called too late.
2789
2790         * svg/SVGUseElement.h:
2791
2792 2016-03-29  Nan Wang  <n_wang@apple.com>
2793
2794         AX: VoiceOver not announcing the right header information for table on iOS
2795         https://bugs.webkit.org/show_bug.cgi?id=155907
2796
2797         Reviewed by Chris Fleizach.
2798
2799         Make sure we consider the case where header elements size does not equal to
2800         row size.
2801
2802         Test: accessibility/ios-simulator/table-row-column-headers.html
2803
2804         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2805         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
2806
2807 2016-03-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
2808
2809         REGRESSION (r198782): CGImageSourceUpdateData() is called twice with the same data every time ImageSource::setData() is called
2810         https://bugs.webkit.org/show_bug.cgi?id=155997
2811
2812         Reviewed by Simon Fraser.
2813
2814         Remove a call to CGImageSourceUpdateData() which was mistakenly left in
2815         ImageDecoder::setData() after ImageSource refactoring.
2816
2817         * platform/graphics/cg/ImageSourceCG.cpp:
2818         (WebCore::ImageDecoder::setData):
2819
2820 2016-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
2821
2822         REGRESSION(r198784) Shouldn't add platform-dependent code to ScrollableArea.h
2823         https://bugs.webkit.org/show_bug.cgi?id=155999
2824
2825         Rolling out the patch.
2826
2827         * platform/ScrollableArea.h:
2828         (WebCore::ScrollableArea::horizontalScrollbar):
2829         (WebCore::ScrollableArea::verticalScrollbar):
2830         (WebCore::ScrollableArea::tiledBacking):
2831         (WebCore::ScrollableArea::layerForHorizontalScrollbar):
2832         (WebCore::ScrollableArea::layerForVerticalScrollbar):
2833         (WebCore::ScrollableArea::layerForScrolling):
2834         (WebCore::ScrollableArea::layerForScrollCorner):
2835         (WebCore::ScrollableArea::layerForOverhangAreas):
2836         * platform/mac/ScrollAnimatorMac.mm:
2837         (WebCore::ScrollAnimatorMac::updateScrollerStyle): Deleted.
2838         * platform/mac/ScrollableAreaMac.mm:
2839         (WebCore::ScrollableArea::setScrollbarLayoutDirection): Deleted.
2840         * platform/mac/ScrollbarThemeMac.mm:
2841         (WebCore::ScrollbarThemeMac::registerScrollbar): Deleted.
2842         * platform/spi/mac/NSScrollerImpSPI.h:
2843
2844 2016-03-29  Alex Christensen  <achristensen@webkit.org>
2845
2846         Fix Windows clean build.
2847
2848         * CMakeLists.txt:
2849         Make sure WebCoreDerivedSources is done building before building WebCore.
2850
2851 2016-03-29  Keith Miller  <keith_miller@apple.com>
2852
2853         [ES6] Add support for Symbol.isConcatSpreadable.
2854         https://bugs.webkit.org/show_bug.cgi?id=155351
2855
2856         Reviewed by Saam Barati.
2857
2858         Makes runtime arrays have the new ArrayType
2859
2860         * bridge/runtime_array.h:
2861         (JSC::RuntimeArray::createStructure):
2862
2863 2016-03-29  Nan Wang  <n_wang@apple.com>
2864
2865         AX: VoiceOver: Navigating Numbered Lists Causes Number to be announced On Each Line of List
2866         https://bugs.webkit.org/show_bug.cgi?id=155984
2867
2868         Reviewed by Chris Fleizach.
2869
2870         We should limit the list marker text only to the first line of that list item.
2871
2872         Test: accessibility/mac/attributed-string-with-listitem-multiple-lines.html
2873
2874         * accessibility/AccessibilityObject.cpp:
2875         (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
2876         (WebCore::AccessibilityObject::stringForRange):
2877
2878 2016-03-29  Antonio Gomes  <tonikitoo@webkit.org>
2879
2880         Wheel events' latching state is not reset when appropriate
2881         https://bugs.webkit.org/show_bug.cgi?id=155746
2882
2883         Reviewed by Simon Fraser.
2884
2885         When one performs a two fingers scroll (with trackpad),
2886         it might either trigger a kinetic scroll movement (by
2887         flickering with both fingers in a given direction) or perform
2888         a static scroll movement (without the flicker animation).
2889
2890         In case of the first scenario (kinetic), the container being
2891         scrolled is "latched" during the scroll animation and properly unlatched
2892         once the scroll ends. See the call to 'shouldResetLatching' in EventHandlerMac.mm.
2893         When transitioning from non-momentum to momentum scroll, the following events are seen:
2894         - 'phase PlatformWheelEventPhaseEnded' 'momentumPhase PlatformWheelEventPhaseNone' -> end of static scroll
2895         - 'phase PlatformWheelEventPhaseNone' 'momentumPhase PlatformWheelEventPhaseBegan' -> start of momentum scroll
2896
2897         On the second scenario (static scroll), when the scroll movement ends,
2898         the latched state is not reset. This might actually cause scrolling elsewhere on the page to scroll
2899         the previously latched container.
2900         Note that, only specific wheel event below is fired when static scroll ends:
2901         - 'phase PlatformWheelEventPhaseEnded' 'momentumPhase PlatformWheelEventPhaseNone'
2902
2903         In order to fix this, patch installs a timer as soon as a non-momentum
2904         wheel scroll event end fires. It works as follows:
2905
2906         - If the timer fires, the latched state is reset, preventing scrolling getting stuck to
2907         a previously latched scrollable.
2908         - If platform code starts sending momentum wheel scroll events before it times out, the timer is
2909         stopped and the latched state remains untouched (this is a flick scroll case).
2910         - If a new wheel scroll gesture starts, the latched state is manually reset
2911         and the timer stopped.
2912
2913         Note that given that latched state logic applies primarily to main frames,
2914         the timer only gets manipulated for main frame objects.
2915
2916         Test: tiled-drawing/scrolling/scroll-iframe-latched-selects.html
2917
2918         * page/EventHandler.cpp:
2919         (WebCore::EventHandler::doOrScheduleClearLatchedStateIfNeeded):
2920         * page/EventHandler.h:
2921         * page/MainFrame.cpp:
2922         (WebCore::MainFrame::MainFrame):
2923         (WebCore::MainFrame::~MainFrame):
2924         * page/MainFrame.h:
2925         * page/mac/EventHandlerMac.mm:
2926         (WebCore::scrollableAreaForContainerNode):
2927         (WebCore::latchedToFrameOrBody):
2928         (WebCore::areWheelEventsTransitioningToMomentumScrolling):
2929         (WebCore::areWheelEventsEndingNonMomentumScrolling):
2930         (WebCore::EventHandler::doOrScheduleClearLatchedStateIfNeeded):
2931
2932 2016-03-29  Alex Christensen  <achristensen@webkit.org>
2933
2934         Fix Windows build.
2935
2936         * CMakeLists.txt:
2937
2938 2016-03-29  Alex Christensen  <achristensen@webkit.org>
2939
2940         Windows build fix.
2941
2942         * CMakeLists.txt:
2943         DerivedSources.cpp should be in WebCore_DERIVED_SOURCES because it depends on the derived sources.
2944
2945 2016-03-29  Alex Christensen  <achristensen@webkit.org>
2946
2947         Fix Windows build after r198777
2948
2949         * CMakeLists.txt:
2950         * PlatformEfl.cmake:
2951         WebCore_DERIVED_SOURCES should not be in WebCore_SOURCES.  If it's needed for EFL,
2952         then keep it in the EFL-specific platform.
2953         * PlatformWin.cmake:
2954         Make more derived sources in WebCore_DERIVED_SOURCES.
2955
2956 2016-03-29  Saam barati  <sbarati@apple.com>
2957
2958         Allow builtin JS functions to be intrinsics
2959         https://bugs.webkit.org/show_bug.cgi?id=155960
2960
2961         Reviewed by Mark Lam.
2962
2963         * ForwardingHeaders/runtime/Intrinsic.h: Added.
2964
2965 2016-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
2966
2967         [Cocoa] Rename ScrollbarPainter variables to ScrollerImp
2968         https://bugs.webkit.org/show_bug.cgi?id=155976
2969
2970         Reviewed by Simon Fraser.
2971
2972         This patch continues where r198078 left off. That patch renamed all the types,
2973         however, there are some variables which were left as "scrollbarPainter". This
2974         patch completes the transition to ScrollerImp.
2975
2976         No new tests because there is no behavior change.
2977
2978         * platform/mac/ScrollAnimatorMac.h:
2979         * platform/mac/ScrollAnimatorMac.mm:
2980         (scrollerImpForScrollbar):
2981         (-[WebScrollerImpPairDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
2982         (-[WebScrollbarPartAnimation startAnimation]):
2983         (-[WebScrollbarPartAnimation setCurrentProgress:]):
2984         (-[WebScrollerImpDelegate mouseLocationInScrollerForScrollerImp:]):
2985         (-[WebScrollerImpDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2986         (-[WebScrollerImpDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2987         (-[WebScrollerImpDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2988         (-[WebScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
2989         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2990         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2991         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
2992         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
2993         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
2994         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
2995         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2996         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2997         (WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
2998         (WebCore::ScrollAnimatorMac::willStartLiveResize):
2999         (WebCore::ScrollAnimatorMac::contentsResized):
3000         (WebCore::ScrollAnimatorMac::willEndLiveResize):
3001         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
3002         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
3003         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
3004         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
3005         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
3006         (WebCore::ScrollAnimatorMac::lockOverlayScrollbarStateToHidden):
3007         (WebCore::ScrollAnimatorMac::scrollbarsCanBeActive):
3008         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
3009         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
3010         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
3011         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
3012         (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
3013         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
3014         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
3015         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
3016         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
3017         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3018         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
3019         (WebCore::ScrollAnimatorMac::sendContentAreaScrolled):
3020         (scrollbarPainterForScrollbar): Deleted.
3021         * platform/mac/ScrollbarThemeMac.mm:
3022         (WebCore::ScrollbarThemeMac::registerScrollbar):
3023         (WebCore::ScrollbarThemeMac::scrollbarThickness):
3024         (WebCore::scrollerImpPaint):
3025         (WebCore::ScrollbarThemeMac::paint):
3026         (WebCore::scrollbarPainterPaint): Deleted.
3027
3028 2016-03-29  Joseph Pecoraro  <pecoraro@apple.com>
3029
3030         Web Inspector: We should have a way to capture heap snapshots programatically.
3031         https://bugs.webkit.org/show_bug.cgi?id=154407
3032         <rdar://problem/24726292>
3033
3034         Reviewed by Timothy Hatcher.
3035
3036         Test: inspector/console/heapSnapshot.html
3037
3038         * page/PageConsoleClient.cpp:
3039         (WebCore::PageConsoleClient::takeHeapSnapshot):
3040         * page/PageConsoleClient.h:
3041         Pass through to Inspector Instrumentation.
3042
3043         * inspector/InspectorConsoleInstrumentation.h:
3044         (WebCore::InspectorInstrumentation::takeHeapSnapshot):
3045         * inspector/InspectorInstrumentation.cpp:
3046         (WebCore::InspectorInstrumentation::takeHeapSnapshotImpl):
3047         * inspector/InspectorInstrumentation.h:
3048         Pass through to InspectorConsoleAgent.
3049
3050         * inspector/InspectorController.cpp:
3051         (WebCore::InspectorController::InspectorController):
3052         * inspector/PageConsoleAgent.cpp:
3053         (WebCore::PageConsoleAgent::PageConsoleAgent):
3054         * inspector/PageConsoleAgent.h:
3055         * inspector/WebConsoleAgent.cpp:
3056         (WebCore::WebConsoleAgent::WebConsoleAgent):
3057         * inspector/WebConsoleAgent.h:
3058         * workers/WorkerConsoleClient.cpp:
3059         (WebCore::WorkerConsoleClient::takeHeapSnapshot):
3060         * workers/WorkerConsoleClient.h:
3061         Provide a HeapAgent to the ConsoleAgent.
3062
3063 2016-03-29  Zalan Bujtas  <zalan@apple.com>
3064
3065         REGRESSION (r196813): Missing plug-in placeholder is missing
3066         https://bugs.webkit.org/show_bug.cgi?id=155973
3067         <rdar://problem/25068392>
3068
3069         Reviewed by Andy Estes.
3070
3071         Show unavailable plugin indicator when UnavailablePluginIndicatorState (uninitialized, hidden, visible) is not set to hidden explicitly.
3072         It matches pre-196813 behaviour.
3073
3074         Unable to test.
3075
3076         * rendering/RenderEmbeddedObject.h:
3077         (WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
3078
3079 2016-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
3080
3081         [OS X] [RTL Scrollbars] Overlay RTL scrollbars animate in from the wrong side
3082         https://bugs.webkit.org/show_bug.cgi?id=155962
3083
3084         Reviewed by Simon Fraser.
3085
3086         We can control the animation direction with the NSScrollerImp property
3087         userInterfaceLayoutDirection.
3088
3089         Not testable.
3090
3091         * platform/ScrollableArea.cpp:
3092         (WebCore::ScrollableArea::setScrollbarLayoutDirection):
3093         * platform/ScrollableArea.h:
3094         (WebCore::ScrollableArea::horizontalScrollbar):
3095         (WebCore::ScrollableArea::verticalScrollbar):
3096         (WebCore::ScrollableArea::tiledBacking):
3097         (WebCore::ScrollableArea::layerForHorizontalScrollbar):
3098         (WebCore::ScrollableArea::layerForVerticalScrollbar):
3099         (WebCore::ScrollableArea::layerForScrolling):
3100         (WebCore::ScrollableArea::layerForScrollCorner):
3101         (WebCore::ScrollableArea::layerForOverhangAreas):
3102         * platform/mac/ScrollAnimatorMac.mm:
3103         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3104         * platform/mac/ScrollableAreaMac.mm:
3105         (WebCore::ScrollableArea::setScrollbarDirection):
3106         * platform/mac/ScrollbarThemeMac.mm:
3107         (WebCore::ScrollbarThemeMac::registerScrollbar):
3108         * platform/spi/mac/NSScrollerImpSPI.h:
3109
3110 2016-03-29  Dan Bernstein  <mitz@apple.com>
3111
3112         Inline WebFullScreenVideoRootViewController.m
3113         https://bugs.webkit.org/show_bug.cgi?id=155971
3114
3115         Reviewed by Anders Carlsson.
3116
3117         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3118         (createFullScreenVideoRootViewControllerClass): Replaced with the code from
3119           WebFullScreenVideoRootViewController.m.
3120
3121 2016-03-29  Said Abou-Hallawa  <sabouhallawa@apple,com>
3122
3123         Create a CG ImageDecoder class instead of defining it as CGImageSourceRef
3124         https://bugs.webkit.org/show_bug.cgi?id=155422
3125
3126         Reviewed by Simon Fraser.
3127
3128         Move the image CG decoding code from the class ImageSource out to a new
3129         class named ImageDecoder. The purpose of this split is to unify the code
3130         of the ImageSource for all platforms. This class should be a container
3131         for the ImageDecoder. All the direct frame manipulation like querying the
3132         frame metadata or creating a frame image should be the responsibility of
3133         the ImageDecoder. The ImageSource will be responsible of the image frame
3134         caching. When responding to a frame metadata query, for example. the
3135         ImageSource checks its cache first. If an entry does not exist for the
3136         requested frame, the ImageSource will cache the image and the metadata
3137         of this frame. The ImageSource will respond at the end from the image
3138         frame cache.
3139  
3140         The plan after this patch is is the following:
3141             -- Move the new class to separate files
3142             -- Merge the ImageSource.cpp and ImageSourceCG.cpp. in one file
3143             -- Move caching the FrameData from BitmapImage to ImageSource.
3144  
3145         * loader/cache/CachedImage.cpp:
3146         (WebCore::CachedImage::imageSizeForRenderer):
3147         BitmapImage::sizeRespectingOrientation() does not take any argument now.
3148         Fix the call to this function and delete the conditionally compiled code 
3149         since the code is the same for the two cases.
3150  
3151         * platform/graphics/BitmapImage.cpp:
3152         (WebCore::BitmapImage::updateSize):
3153         (WebCore::BitmapImage::sizeRespectingOrientation):
3154         (WebCore::BitmapImage::frameImageAtIndex):
3155         (WebCore::BitmapImage::BitmapImage):
3156         An image can have two sizes: size() and sizeRespectingOrientation(). The
3157         sizeRespectingOrientation() is the transpose of size() iff the image
3158         orientation has usesWidthAsHeight() is true. So there is no need for the
3159         ImageOrientationDescription argument. So there is no need for the members
3160         m_imageOrientation or m_shouldRespectImageOrientation. Also move
3161         m_allowSubsampling and m_minimumSubsamplingLevel (which should be named
3162         m_maximumSubsamplingLevel) to ImageSource instead.
3163
3164         (WebCore::BitmapImage::frameOrientationAtIndex): Replace DefaultImageOrientation
3165         by ImageOrientation().
3166         
3167         (WebCore::BitmapImage::dump): Move dumping the image metadata to the
3168         ImageSource.
3169         
3170         * platform/graphics/BitmapImage.h:
3171         
3172         * platform/graphics/GraphicsContext.h:
3173         * platform/graphics/ImageOrientation.h:
3174         (WebCore::ImageOrientation::ImageOrientation):
3175         (WebCore::ImageOrientation::fromEXIFValue):
3176         (WebCore::ImageOrientation::operator ImageOrientationEnum):
3177         Add a casting operator to ImageOrientation so it can be dumped as enum
3178         value. Also add a default constructor and make the other constructor be
3179         explicit. All the rvalues DefaultImageOrientation should be replaced by
3180         ImageOrientation().
3181
3182         * platform/graphics/ImageSource.cpp:
3183         (WebCore::ImageSource::ImageSource):
3184         (WebCore::ImageSource::clear):
3185         m_decoder is now a unique_ptr. To release it, assign it to nullptr.
3186
3187         (WebCore::ImageSource::ensureDecoderIsCreated): Ensure m_decoder is created.
3188         
3189         (WebCore::ImageSource::setData): Call ensureDecoderIsCreated() before
3190         actually setting the data.
3191         
3192         (WebCore::ImageSource::isSizeAvailable): Use initialized();
3193         
3194         (WebCore::ImageSource::size):
3195         (WebCore::ImageSource::sizeRespectingOrientation):
3196         (WebCore::ImageSource::frameSizeAtIndex):
3197         These functions return the size of the image.
3198     
3199         (WebCore::ImageSource::getHotSpot):
3200         (WebCore::ImageSource::repetitionCount):
3201         (WebCore::ImageSource::frameCount):
3202         (WebCore::ImageSource::createFrameImageAtIndex):
3203         (WebCore::ImageSource::frameDurationAtIndex):
3204         (WebCore::ImageSource::orientationAtIndex):
3205         (WebCore::ImageSource::frameHasAlphaAtIndex):
3206         (WebCore::ImageSource::frameIsCompleteAtIndex):
3207         (WebCore::ImageSource::frameBytesAtIndex):
3208         Check for initialized() instead of checking m_decoder.
3209         
3210         (WebCore::ImageSource::dump): Dump the image metadata.
3211         
3212         (WebCore::ImageSource::initialized): Deleted.
3213         
3214         * platform/graphics/ImageSource.h: The image decoder is now named
3215         ImageDecoder for all platforms.
3216         
3217         (WebCore::ImageSource::initialized): Moved to the header file.
3218
3219         (WebCore::ImageSource::setAllowSubsampling): Moved from BitmapImage.
3220         
3221         * platform/graphics/cairo/BitmapImageCairo.cpp:
3222         (WebCore::BitmapImage::BitmapImage):
3223         (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Deleted.
3224         Delete initializing m_minimumSubsamplingLevel and determineMinimumSubsamplingLevel()
3225         since they are moved to ImageSource.
3226         
3227         * platform/graphics/cg/BitmapImageCG.cpp:
3228         (WebCore::BitmapImage::BitmapImage):
3229         (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Deleted.
3230         Delete members and methods which are now owned and calculated by ImageSource.
3231         
3232         * platform/graphics/cg/ImageSourceCG.cpp:
3233         (WebCore::ImageDecoder::create): Returns a CG ImageDecoder object.
3234         
3235         (WebCore::orientationFromProperties):  Replace DefaultImageOrientation
3236         by ImageOrientation().
3237         
3238         (WebCore::ImageDecoder::ImageDecoder): Creates a native CG image decoder.
3239         
3240         (WebCore::ImageDecoder::~ImageDecoder): Releases the native CG image decoder.
3241         
3242         (WebCore::ImageDecoder::subsamplingLevelForScale): Moved from ImageSource.
3243         A new argument named 'maximumSubsamplingLevel' is added to low filter the
3244         return value.
3245         
3246         (WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
3247         (WebCore::ImageDecoder::filenameExtension):
3248         (WebCore::ImageDecoder::isSizeAvailable):
3249         (WebCore::ImageDecoder::size):
3250         (WebCore::ImageDecoder::frameCount):
3251         (WebCore::ImageDecoder::repetitionCount):
3252         (WebCore::ImageDecoder::hotSpot):
3253         (WebCore::ImageDecoder::frameSizeAtIndex):
3254         (WebCore::ImageDecoder::frameIsCompleteAtIndex):
3255         (WebCore::ImageDecoder::orientationAtIndex):
3256         (WebCore::ImageDecoder::frameDurationAtIndex):
3257         (WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
3258         (WebCore::ImageDecoder::frameHasAlphaAtIndex):
3259         (WebCore::ImageDecoder::frameBytesAtIndex):
3260         (WebCore::ImageDecoder::createFrameImageAtIndex):
3261         (WebCore::ImageDecoder::setData):
3262         The code of these function was moved from the functions of ImageSource.
3263         
3264         (WebCore::ImageSource::ImageSource):
3265         (WebCore::ImageSource::~ImageSource):
3266         (WebCore::ImageSource::clear):
3267         (WebCore::ImageSource::ensureDecoderIsCreated):
3268         (WebCore::ImageSource::setData):
3269         (WebCore::ImageSource::filenameExtension):
3270         (WebCore::ImageSource::calculateMaximumSubsamplingLevel):
3271         (WebCore::ImageSource::maximumSubsamplingLevel):
3272         (WebCore::ImageSource::subsamplingLevelForScale):
3273         (WebCore::ImageSource::isSizeAvailable):
3274         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
3275         (WebCore::ImageSource::frameSizeAtIndex):
3276         (WebCore::ImageSource::orientationAtIndex):
3277         (WebCore::ImageSource::size):
3278         (WebCore::ImageSource::sizeRespectingOrientation):
3279         (WebCore::ImageSource::getHotSpot):
3280         (WebCore::ImageSource::bytesDecodedToDetermineProperties):
3281         (WebCore::ImageSource::repetitionCount):
3282         (WebCore::ImageSource::frameCount):
3283         (WebCore::ImageSource::createFrameImageAtIndex):
3284         (WebCore::ImageSource::frameIsCompleteAtIndex):
3285         (WebCore::ImageSource::frameDurationAtIndex):
3286         (WebCore::ImageSource::frameHasAlphaAtIndex):
3287         (WebCore::ImageSource::frameBytesAtIndex):
3288         Call m_decoder's function to do the real work.
3289         
3290         (WebCore::ImageSource::dump): Dump the image metadata.
3291         
3292         (WebCore::ImageSource::initialized): Deleted.
3293         
3294         * platform/image-decoders/ImageDecoder.cpp:
3295         (WebCore::ImageDecoder::create):
3296         * platform/image-decoders/ImageDecoder.h:
3297         Change the return of ImageDecoder::create() to be unique_ptr.
3298         
3299         * platform/mac/DragImageMac.mm:
3300         (WebCore::createDragImageFromImage): Delete unneeded argument.
3301
3302 2016-03-29  Eric Carlson  <eric.carlson@apple.com>
3303
3304         media/track/track-remove-track.html is flaky, crashing and failing
3305         https://bugs.webkit.org/show_bug.cgi?id=130971
3306
3307         Reviewed by Alexey Proskuryakov.
3308         
3309         Prevent HTMLMediaElement from being collected while it is creating media controls.
3310         These changes prevent the test from crashing but they do not fix the flakiness,
3311         which is caused by another bug. Fixing that is tracked by 
3312         https://bugs.webkit.org/show_bug.cgi?id=155956.
3313
3314         * html/HTMLMediaElement.cpp:
3315         (WebCore::actionName): New, debugging-only helper function.
3316         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new variables.
3317         (WebCore::HTMLMediaElement::scheduleDelayedAction): Log the flag names to make debugging easier.
3318         (WebCore::HTMLMediaElement::scheduleNextSourceChild): Add logging.
3319         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Update logging.
3320         (WebCore::HTMLMediaElement::configureTextTrackGroup): Drive-by optimization: don't call 
3321           updateCaptionContainer here, call it before exiting configureTextTracks so we only call
3322           it once instead of once per track group.
3323         (WebCore::controllerJSValue):
3324         (WebCore::HTMLMediaElement::ensureMediaControlsShadowRoot): New, wrapper around calling
3325           ensureUserAgentShadowRoot so m_creatingControls can be set and cleared appropriately.
3326         (WebCore::HTMLMediaElement::updateCaptionContainer): ensureUserAgentShadowRoot -> 
3327           ensureMediaControlsShadowRoot. Drive by optimization: set/test m_haveSetupCaptionContainer
3328           so we only do this setup once.
3329         (WebCore::HTMLMediaElement::configureTextTracks): Call updateCaptionContainer.
3330         (WebCore::HTMLMediaElement::clearMediaPlayer): Log flag names.
3331         (WebCore::HTMLMediaElement::hasPendingActivity): Return true when creating controls so GC
3332           won't happen during controls setup.
3333         (WebCore::HTMLMediaElement::updateTextTrackDisplay): ensureUserAgentShadowRoot -> 
3334           ensureMediaControlsShadowRoot.
3335         (WebCore::HTMLMediaElement::createMediaControls): Ditto.
3336         (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
3337         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
3338         * html/HTMLMediaElement.h:
3339
3340 2016-03-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3341
3342         Unreviewed EFL build fix caused by r198773
3343
3344         * CMakeLists.txt: Append WebCore_DERIVED_SOURCES to WebCore source list.
3345
3346 2016-03-29  Joseph Pecoraro  <pecoraro@apple.com>
3347
3348         Audit WebCore builtins for user overridable code
3349         https://bugs.webkit.org/show_bug.cgi?id=155923
3350
3351         Reviewed by Youenn Fablet.
3352
3353         Tests: fetch/builtin-overrides.html
3354                streams/builtin-overrides.html
3355
3356         * Modules/fetch/FetchHeaders.js:
3357         (initializeFetchHeaders):
3358         Avoid using an Array.prototype.forEach that could be overriden.
3359
3360         * Modules/streams/ByteLengthQueuingStrategy.js:
3361         (initializeByteLengthQueuingStrategy):
3362         * Modules/streams/CountQueuingStrategy.js:
3363         (initializeCountQueuingStrategy):
3364         Use the private Object.defineProperty not one that could be overriden.
3365
3366         * Modules/streams/ReadableStreamInternals.js:
3367         (finishClosingReadableStream):
3368         Fix style.
3369
3370         * Modules/streams/WritableStream.js:
3371         (write):
3372         Fix error message to use the correct function name.
3373
3374 2016-03-28  Zalan Bujtas  <zalan@apple.com>
3375
3376         Pixel turds when bordered div is resized on SMF forum software.
3377         https://bugs.webkit.org/show_bug.cgi?id=155957
3378         <rdar://problem/25010646>
3379
3380         Reviewed by Simon Fraser.
3381
3382         Use unmodified, non-snapped bounding box rect when computing dirty rects.
3383
3384         Test: fast/repaint/hidpi-box-with-subpixel-height-inflates.html
3385
3386         * rendering/RenderBox.h:
3387         * rendering/RenderBoxModelObject.h:
3388         * rendering/RenderElement.cpp:
3389         (WebCore::RenderElement::getTrailingCorner):
3390         * rendering/RenderInline.h:
3391         * rendering/RenderLineBreak.cpp:
3392         (WebCore::RenderLineBreak::borderBoundingBox): Deleted.
3393         * rendering/RenderLineBreak.h:
3394         * rendering/RenderView.cpp:
3395         (WebCore::RenderView::setBestTruncatedAt):
3396
3397 2016-03-28  Chris Fleizach  <cfleizach@apple.com>
3398
3399         AX: Crash when AX trying to create element for an old auto fill element
3400         https://bugs.webkit.org/show_bug.cgi?id=155943
3401
3402         Reviewed by Joanmarie Diggs.
3403
3404         When an auto-fill element is removed, the Node hangs around but the renderer is gone.
3405         In those cases, we can't blindly add the result of getOrCreate to the children array.
3406
3407         Test: accessibility/auto-fill-crash.html
3408
3409         * accessibility/AccessibilityRenderObject.cpp:
3410         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
3411
3412 2016-03-28  Chris Fleizach  <cfleizach@apple.com>
3413
3414         AX: iOS: Can't navigate inside ContentEditable fields with voiceover enabled
3415         https://bugs.webkit.org/show_bug.cgi?id=155942
3416
3417         Reviewed by Joanmarie Diggs.
3418
3419         The code to set the selected text range on a non-native text control (like a contenteditable) was either
3420         wrong or broke at some point. It assumed that creating a Position with the contenteditable node with the right
3421         offset would make a valid Position, but it almost never did.
3422
3423         Instead we can use this helper method to create a valid Position.
3424
3425         Test: accessibility/set-selected-text-range-contenteditable.html
3426
3427         * accessibility/AccessibilityRenderObject.cpp:
3428         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3429
3430 2016-03-28  Alex Christensen  <achristensen@webkit.org>
3431
3432         Fix Ninja build on Mac
3433         https://bugs.webkit.org/show_bug.cgi?id=151399
3434
3435         Reviewed by Darin Adler.
3436
3437         * CMakeLists.txt:
3438         * PlatformEfl.cmake:
3439         * PlatformGTK.cmake:
3440         * PlatformMac.cmake:
3441         This moves WebCoreDerivedSources to a separate static library to reduce linker command 
3442         line lengths when using ninja on mac. This also helps Windows builds, which sometimes 
3443         regenerate everything every time you build; now you'll be able to just build WebCore
3444         and WebKit without all the WebCoreDerivedSources stuff.
3445
3446 2016-03-28  Brady Eidson  <beidson@apple.com>
3447
3448         Fix build on some stricter compilers by removing unnecessary WTFMove.
3449         Opportunistically remove some unnecessary "WebCore::"s
3450         Followup to r198762
3451
3452         * Modules/indexeddb/IDBObjectStore.cpp: