[JHBuild] Move to upstream OpenWebRTC
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-04-24  Philippe Normand  <pnormand@igalia.com>
2
3         [JHBuild] Move to upstream OpenWebRTC
4         https://bugs.webkit.org/show_bug.cgi?id=144145
5
6         Reviewed by Carlos Garcia Campos.
7
8         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
9         (WebCore::initializeOpenWebRTC): Update with new owr_init API.
10
11 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
12
13         [SOUP] Add initial implementation of NetworkProcess disk cache
14         https://bugs.webkit.org/show_bug.cgi?id=143872
15
16         Reviewed by Martin Robinson.
17
18         Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
19         is not a GObject and has copy/free functions instead of ref/unref,
20         it's internally refcounted, so we could use copy/free as
21         ref/unref.
22
23         * PlatformGTK.cmake:
24         * platform/network/soup/GRefPtrSoup.cpp: Added.
25         (WTF::refGPtr):
26         (WTF::derefGPtr):
27         * platform/network/soup/GRefPtrSoup.h: Added.
28
29 2015-04-26  Manuel Rego Casasnovas  <rego@igalia.com>
30
31         [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
32         https://bugs.webkit.org/show_bug.cgi?id=144144
33
34         Reviewed by Darin Adler.
35
36         Change order in hasDefiniteLogicalHeight() ifs to consider definite
37         absolutely positioned elements.
38
39         Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
40
41         * rendering/RenderBox.cpp:
42         (WebCore::RenderBox::hasDefiniteLogicalHeight):
43
44 2015-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
45
46         SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
47         https://bugs.webkit.org/show_bug.cgi?id=144137
48
49         Reviewed by Darin Adler.
50
51         The SourceAlpha should be driven from the last applied FilterEffect. This
52         will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
53         than just getting the SourceGraphic reference from FilterEffectRenderer.
54
55         This is based on the Blink patch:
56         https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
57
58         Test: svg/filters/sourceAlpha-input-filter-effect.html
59         
60         * platform/graphics/filters/SourceAlpha.cpp:
61         (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
62         rather than a Filter.
63         
64         (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
65         rect from the wrapped FilterEffect.
66         
67         (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
68         from the wrapped FilterEffect.
69         
70         (WebCore::SourceAlpha::SourceAlpha): 
71         * platform/graphics/filters/SourceAlpha.h:
72         (WebCore::SourceAlpha::SourceAlpha): Deleted.
73         Reimplement the constructor of the SourceAlpha such that it wraps the
74         sourceEffect in its inputEffects.
75     
76         * rendering/FilterEffectRenderer.cpp:
77         (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
78         comment and do exactly what it said. This matches the implementation of
79         Gecko and Blink.
80         
81         * rendering/svg/RenderSVGResourceFilter.cpp:
82         (WebCore::RenderSVGResourceFilter::buildPrimitives):
83         Delete the extra argument.
84
85         * svg/graphics/filters/SVGFilterBuilder.cpp:
86         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
87         * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
88         passed source FilterEffect.
89
90         * platform/graphics/filters/FEBlend.cpp:
91         * platform/graphics/filters/FEBlend.h:
92         * platform/graphics/filters/FEColorMatrix.cpp:
93         * platform/graphics/filters/FEColorMatrix.h:
94         * platform/graphics/filters/FEComponentTransfer.cpp:
95         * platform/graphics/filters/FEComponentTransfer.h:
96         * platform/graphics/filters/FEComposite.cpp:
97         * platform/graphics/filters/FEComposite.h:
98         * platform/graphics/filters/FEConvolveMatrix.cpp:
99         * platform/graphics/filters/FEConvolveMatrix.h:
100         * platform/graphics/filters/FEDiffuseLighting.cpp:
101         * platform/graphics/filters/FEDiffuseLighting.h:
102         * platform/graphics/filters/FEDisplacementMap.cpp:
103         * platform/graphics/filters/FEDisplacementMap.h:
104         * platform/graphics/filters/FEDropShadow.cpp:
105         * platform/graphics/filters/FEDropShadow.h:
106         * platform/graphics/filters/FEFlood.cpp:
107         * platform/graphics/filters/FEFlood.h:
108         * platform/graphics/filters/FEGaussianBlur.cpp:
109         * platform/graphics/filters/FEGaussianBlur.h:
110         * platform/graphics/filters/FELighting.cpp:
111         * platform/graphics/filters/FELighting.h:
112         * platform/graphics/filters/FEMerge.cpp:
113         * platform/graphics/filters/FEMerge.h:
114         * platform/graphics/filters/FEMorphology.cpp:
115         * platform/graphics/filters/FEMorphology.h:
116         * platform/graphics/filters/FEOffset.cpp:
117         * platform/graphics/filters/FEOffset.h:
118         * platform/graphics/filters/FESpecularLighting.cpp:
119         * platform/graphics/filters/FESpecularLighting.h:
120         * platform/graphics/filters/FETile.cpp:
121         * platform/graphics/filters/FETile.h:
122         * platform/graphics/filters/FETurbulence.cpp:
123         * platform/graphics/filters/FETurbulence.h:
124         * platform/graphics/filters/Filter.h:
125         * platform/graphics/filters/FilterEffect.cpp:
126         * platform/graphics/filters/FilterEffect.h:
127         * platform/graphics/filters/SourceGraphic.cpp:
128         * platform/graphics/filters/SourceGraphic.h:
129         * rendering/svg/RenderSVGResourceFilter.h:
130         * rendering/svg/SVGRenderTreeAsText.cpp:
131         Code clean up: Pointer to reference conversion. It starts by converting
132         FilterEffect::m_filter from pointer to reference and it kept expanding.
133         All the creations of FilterEffect were happening by passing "this" so
134         passing "*this" did not require to check whether the pointer is nil.
135
136         * svg/SVGFEBlendElement.cpp:
137         * svg/SVGFEBlendElement.h:
138         * svg/SVGFEColorMatrixElement.cpp:
139         * svg/SVGFEColorMatrixElement.h:
140         * svg/SVGFEComponentTransferElement.cpp:
141         * svg/SVGFEComponentTransferElement.h:
142         * svg/SVGFECompositeElement.cpp:
143         * svg/SVGFECompositeElement.h:
144         * svg/SVGFEConvolveMatrixElement.cpp:
145         * svg/SVGFEConvolveMatrixElement.h:
146         * svg/SVGFEDiffuseLightingElement.cpp:
147         * svg/SVGFEDiffuseLightingElement.h:
148         * svg/SVGFEDisplacementMapElement.cpp:
149         * svg/SVGFEDisplacementMapElement.h:
150         * svg/SVGFEDropShadowElement.cpp:
151         * svg/SVGFEDropShadowElement.h:
152         * svg/SVGFEFloodElement.cpp:
153         * svg/SVGFEFloodElement.h:
154         * svg/SVGFEGaussianBlurElement.cpp:
155         * svg/SVGFEGaussianBlurElement.h:
156         * svg/SVGFEImageElement.cpp:
157         * svg/SVGFEImageElement.h:
158         * svg/SVGFEMergeElement.cpp:
159         * svg/SVGFEMergeElement.h:
160         * svg/SVGFEMorphologyElement.cpp:
161         * svg/SVGFEMorphologyElement.h:
162         * svg/SVGFEOffsetElement.cpp:
163         * svg/SVGFEOffsetElement.h:
164         * svg/SVGFESpecularLightingElement.cpp:
165         * svg/SVGFESpecularLightingElement.h:
166         * svg/SVGFETileElement.cpp:
167         * svg/SVGFETileElement.h:
168         * svg/SVGFETurbulenceElement.cpp:
169         * svg/SVGFETurbulenceElement.h:
170         * svg/SVGFilterPrimitiveStandardAttributes.h:
171         * svg/graphics/filters/SVGFEImage.cpp:
172         * svg/graphics/filters/SVGFEImage.h:
173         Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
174         conversion.
175
176 2015-04-26  Darin Adler  <darin@apple.com>
177
178         REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
179         https://bugs.webkit.org/show_bug.cgi?id=144237
180
181         Reviewed by Simon Fraser.
182
183         No test because DumpRenderTree and WebKitTestRunner don't have a good method
184         for testing behaviors that are specific to active windows. That's the same reason
185         that the change that caused this bug didn't come with a regression test.
186
187         * rendering/RenderTheme.cpp:
188         (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
189         clarify the meaning of the setInsideDefaultButton function, and added an
190         isDisabledFormControl check so it won't trigger on a disabled button.
191         (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
192         alphabetical order to match the rest of the switch statement ordering.
193
194         * rendering/RenderThemeMac.mm:
195         (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
196         alphabetical order to match the rest of the switch statement ordering. Also
197         fixed its behavior on older versions of OS X; it should just return the same
198         thing that CSSValueButtontext would return in that context.
199
200 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
201
202         [ES6] Implement ES6 template literals
203         https://bugs.webkit.org/show_bug.cgi?id=142691
204
205         Reviewed by Darin Adler.
206
207         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
208
209         * Configurations/FeatureDefines.xcconfig:
210
211 2015-04-26  Javier Fernandez  <jfernandez@igalia.com>
212
213         [CSS Grid Layout] Support for align-self and align-items in grid layout
214         https://bugs.webkit.org/show_bug.cgi?id=133225
215
216         Reviewed by Darin Adler.
217
218         Implementation of align-self and align-items properties for grid. It supports
219         different writing-modes and direction. Margins, borders and paddings are also
220         considered when computing the final position and stretched size.
221
222         Overflow handling is still missing and will be added when implemented row-axis
223         alignment support.
224
225         Test: fast/css-grid-layout/grid-align.html
226
227         * rendering/RenderBox.cpp:
228         (WebCore::RenderBox::computeLogicalHeight):
229         * rendering/RenderGrid.cpp:
230         (WebCore::RenderGrid::logicalContentHeightForChild):
231         (WebCore::RenderGrid::layoutGridItems):
232         (WebCore::computeOverflowAlignmentOffset):
233         (WebCore::RenderGrid::endOfRowForChild):
234         (WebCore::RenderGrid::startOfRowForChild):
235         (WebCore::RenderGrid::centeredRowPositionForChild):
236         (WebCore::marginWidthForChild):
237         (WebCore::marginHeightForChild):
238         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
239         (WebCore::RenderGrid::needToStretchChildLogicalHeight):
240         (WebCore::RenderGrid::marginLogicalHeightForChild):
241         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
242         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
243         (WebCore::RenderGrid::rowPositionForChild):
244         (WebCore::RenderGrid::findChildLogicalPosition):
245         (WebCore::RenderGrid::populateGridPositions): Deleted.
246         * rendering/RenderGrid.h:
247
248 2015-04-26  Doug Russell  <d_russell@apple.com>
249
250         AX: richer text change notifications (142719)
251         https://bugs.webkit.org/show_bug.cgi?id=142719
252
253         Reviewed by Darin Adler.
254
255         Richer accessibility value change notifications. Introduce AXTextEditType,
256         postTextStateChangeNotification and postTextReplacementNotification to give assistive
257         tech apps more reliable context for responding to changes in web content. Also implement
258         a mechanism to post value changes in password form fields in coalesced ticks to thwart
259         analyzing the cadence of changes.
260
261         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
262         and an overload of postTextReplacementNotification to give assistive tech apps more
263         reliable context for responding to changes in web content selection. Also block posting
264         selection changes on password fields.
265
266         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
267                platform/mac/accessibility/selection-change-userinfo.html
268                platform/mac/accessibility/value-change-userinfo.html
269
270         * CMakeLists.txt:
271         * WebCore.vcxproj/WebCore.vcxproj:
272         * WebCore.vcxproj/WebCore.vcxproj.filters:
273         * WebCore.xcodeproj/project.pbxproj:
274         * accessibility/AXObjectCache.cpp:
275         (WebCore::AXObjectCache::AXObjectCache):
276         (WebCore::AXObjectCache::notificationPostTimerFired):
277         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
278         (WebCore::AXObjectCache::showIntent):
279         (WebCore::AXObjectCache::setTextSelectionIntent):
280         (WebCore::isPasswordFieldOrContainedByPasswordField):
281         (WebCore::AXObjectCache::postTextStateChangeNotification):
282         (WebCore::AXObjectCache::postTextReplacementNotification):
283         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
284         (WebCore::AXObjectCache::rootWebArea):
285         (WebCore::AXObjectCache::textChangeForEditType):
286         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
287         (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
288         * accessibility/AXObjectCache.h:
289         (WebCore::AXObjectCache::postTextStateChangeNotification):
290         (WebCore::AXObjectCache::postTextReplacementNotification):
291         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
292         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
293         (WebCore::AXObjectCache::textChangeForEditType):
294         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
295         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
296         (WebCore::AXObjectCache::getOrCreate): Deleted.
297         (WebCore::AXObjectCache::attachWrapper): Deleted.
298         * accessibility/AXTextStateChangeIntent.h: Added.
299         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
300         * accessibility/AccessibilityNodeObject.cpp:
301         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
302         * accessibility/AccessibilityNodeObject.h:
303         * accessibility/AccessibilityObject.cpp:
304         (WebCore::AccessibilityObject::isContainedByPasswordField):
305         * accessibility/AccessibilityObject.h:
306         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
307         (WebCore::AccessibilityObject::isPasswordField): Deleted.
308         * accessibility/AccessibilityRenderObject.cpp:
309         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
310         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
311         * accessibility/AccessibilityScrollView.h:
312         * accessibility/atk/AXObjectCacheAtk.cpp:
313         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
314         * accessibility/ios/AXObjectCacheIOS.mm:
315         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
316         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
317         * accessibility/mac/AXObjectCacheMac.mm:
318         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
319         (WebCore::AXPostNotificationWithUserInfo):
320         (WebCore::AXObjectCache::postPlatformNotification):
321         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
322         (WebCore::textReplacementChangeDictionary):
323         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
324         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
325         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
326         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
327         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
328         (arrayRemovingNonJSONTypes):
329         (dictionaryRemovingNonJSONTypes):
330         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
331         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
332         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
333         (textMarkerRangeFromVisiblePositions):
334         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
335         * editing/AppendNodeCommand.cpp:
336         (WebCore::AppendNodeCommand::AppendNodeCommand):
337         (WebCore::sendAXTextChangedIgnoringLineBreaks):
338         (WebCore::AppendNodeCommand::doApply):
339         (WebCore::AppendNodeCommand::doUnapply):
340         * editing/AppendNodeCommand.h:
341         (WebCore::AppendNodeCommand::create):
342         * editing/ApplyStyleCommand.cpp:
343         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
344         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
345         * editing/ApplyStyleCommand.h:
346         * editing/CompositeEditCommand.cpp:
347         (WebCore::EditCommandComposition::unapplyEditType):
348         (WebCore::CompositeEditCommand::CompositeEditCommand):
349         (WebCore::CompositeEditCommand::apply):
350         (WebCore::CompositeEditCommand::insertParagraphSeparator):
351         (WebCore::CompositeEditCommand::insertNodeBefore):
352         (WebCore::CompositeEditCommand::appendNode):
353         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
354         (WebCore::CompositeEditCommand::insertTextIntoNode):
355         (WebCore::CompositeEditCommand::deleteTextFromNode):
356         (WebCore::CompositeEditCommand::replaceTextInNode):
357         (WebCore::CompositeEditCommand::moveParagraphs):
358         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
359         (WebCore::CompositeEditCommand::applyStyle): Deleted.
360         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
361         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
362         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
363         (WebCore::CompositeEditCommand::inputText): Deleted.
364         * editing/CompositeEditCommand.h:
365         * editing/DeleteFromTextNodeCommand.cpp:
366         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
367         (WebCore::DeleteFromTextNodeCommand::doApply):
368         (WebCore::DeleteFromTextNodeCommand::doUnapply):
369         * editing/DeleteFromTextNodeCommand.h:
370         (WebCore::DeleteFromTextNodeCommand::create):
371         (WebCore::DeleteFromTextNodeCommand::deletedText):
372         * editing/DeleteSelectionCommand.cpp:
373         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
374         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
375         * editing/DeleteSelectionCommand.h:
376         (WebCore::DeleteSelectionCommand::create):
377         * editing/DictationCommand.cpp:
378         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
379         (WebCore::DictationCommand::insertParagraphSeparator):
380         * editing/EditAction.h:
381         * editing/EditCommand.cpp:
382         (WebCore::EditCommand::EditCommand):
383         (WebCore::EditCommand::editingAction):
384         (WebCore::EditCommand::applyEditType):
385         (WebCore::EditCommand::unapplyEditType):
386         (WebCore::SimpleEditCommand::SimpleEditCommand):
387         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
388         (WebCore::EditCommand::setParent): Deleted.
389         * editing/EditCommand.h:
390         * editing/EditingAllInOne.cpp:
391         * editing/Editor.cpp:
392         (WebCore::Editor::handleTextEvent):
393         (WebCore::Editor::deleteSelectionWithSmartDelete):
394         (WebCore::Editor::replaceSelectionWithFragment):
395         (WebCore::Editor::replaceSelectionWithText):
396         (WebCore::Editor::appliedEditing):
397         (WebCore::Editor::unappliedEditing):
398         (WebCore::Editor::performCutOrCopy):
399         (WebCore::Editor::markMisspellingsAfterTypingToWord):
400         (WebCore::Editor::changeBackToReplacedString):
401         (WebCore::Editor::transpose):
402         (WebCore::Editor::changeSelectionAfterCommand):
403         * editing/Editor.h:
404         * editing/EditorCommand.cpp:
405         (WebCore::executeInsertFragment):
406         * editing/FrameSelection.cpp:
407         (WebCore::FrameSelection::moveTo):
408         (WebCore::FrameSelection::moveWithoutValidationTo):
409         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
410         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
411         (WebCore::FrameSelection::setSelection):
412         (WebCore::FrameSelection::updateAndRevealSelection):
413         (WebCore::isBoundary):
414         (WebCore::FrameSelection::textSelectionIntent):
415         (WebCore::FrameSelection::modify):
416         (WebCore::FrameSelection::selectAll):
417         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
418         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
419         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
420         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
421         * editing/FrameSelection.h:
422         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
423         (WebCore::FrameSelection::selection): Deleted.
424         * editing/InsertIntoTextNodeCommand.cpp:
425         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
426         (WebCore::InsertIntoTextNodeCommand::doApply):
427         (WebCore::InsertIntoTextNodeCommand::doUnapply):
428         * editing/InsertIntoTextNodeCommand.h:
429         (WebCore::InsertIntoTextNodeCommand::create):
430         (WebCore::InsertIntoTextNodeCommand::insertedText):
431         * editing/InsertNodeBeforeCommand.cpp:
432         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
433         (WebCore::InsertNodeBeforeCommand::doApply):
434         (WebCore::InsertNodeBeforeCommand::doUnapply):
435         * editing/InsertNodeBeforeCommand.h:
436         (WebCore::InsertNodeBeforeCommand::create):
437         * editing/InsertParagraphSeparatorCommand.cpp:
438         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
439         * editing/InsertParagraphSeparatorCommand.h:
440         (WebCore::InsertParagraphSeparatorCommand::create):
441         * editing/InsertTextCommand.cpp:
442         (WebCore::InsertTextCommand::InsertTextCommand):
443         * editing/InsertTextCommand.h:
444         (WebCore::InsertTextCommand::create):
445         (WebCore::InsertTextCommand::createWithMarkerSupplier):
446         * editing/MoveSelectionCommand.cpp:
447         (WebCore::MoveSelectionCommand::doApply):
448         * editing/RemoveNodePreservingChildrenCommand.cpp:
449         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
450         * editing/RemoveNodePreservingChildrenCommand.h:
451         (WebCore::RemoveNodePreservingChildrenCommand::create):
452         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
453         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
454         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
455         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
456         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
457         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
458         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
459         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
460         * editing/ReplaceSelectionCommand.cpp:
461         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
462         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
463         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
464         * editing/ReplaceSelectionCommand.h:
465         (WebCore::ReplaceSelectionCommand::create):
466         * editing/TypingCommand.cpp:
467         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
468         (WebCore::TypingCommand::insertParagraphSeparator):
469         * editing/atk/FrameSelectionAtk.cpp:
470         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
471         * editing/ios/DictationCommandIOS.cpp:
472         (WebCore::DictationCommandIOS::DictationCommandIOS):
473         * editing/ios/DictationCommandIOS.h:
474         * editing/mac/FrameSelectionMac.mm:
475         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
476         * html/HTMLTextFormControlElement.cpp:
477         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
478         * page/DragController.cpp:
479         (WebCore::DragController::concludeEditDrag):
480         * page/EventHandler.cpp:
481         (WebCore::setInitialKeyboardSelection):
482         * page/FocusController.cpp:
483         (WebCore::FocusController::advanceFocusInDocumentOrder):
484
485 2015-04-26  Darin Adler  <darin@apple.com>
486
487         REGRESSION (r176751): line-height ignored in <button> elements
488         https://bugs.webkit.org/show_bug.cgi?id=144234
489
490         Reviewed by Antti Koivisto.
491
492         Test: fast/forms/button-line-height.html
493
494         The theme code was overriding line heights on all themed form controls.
495         Instead it should have only overridden line height when the theme overrides the font.
496         For <input type=button> on Mac, the theme always overrides the font, but for
497         other elements like <button> it does not.
498
499         * platform/Theme.h: Changed controlFont to return an Optional so we can tell
500         when the theme is overriding the font. Otherwise if the font from the user-agent
501         style sheet and the font from the theme are the same, we will think we are not
502         overriding the font when we actually are.
503
504         * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
505         * platform/mac/ThemeMac.mm:
506         (WebCore::ThemeMac::controlFont): Ditto.
507
508         * rendering/RenderTheme.cpp:
509         (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
510         overriden by the theme, all the time for PushButtonPart on Mac, and not at all
511         for other parts. Also tightened up the logic a little since RenderStyle's
512         setFontDescription already does an "==" comparison; we don't have to do
513         that twice.
514
515 2015-04-26  Darin Adler  <darin@apple.com>
516
517         REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
518         https://bugs.webkit.org/show_bug.cgi?id=137163
519
520         Reviewed by Andy Estes.
521
522         Test: fast/notifications/request-notification-permission-while-reloading.html
523
524         The test doesn't crash under WebKit2, but that's still OK for our purposes.
525
526         * Modules/notifications/NotificationCenter.cpp:
527         (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
528         (WebCore::NotificationCenter::createNotification): Moved here from the header.
529         (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
530         center when we need to defer a callback. Also use a lambda for the callback and changed
531         the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
532         bindings were not transferring ownership of the VoidCallback. The new type is a little
533         strange but it's consistent with how the bindings work right now.
534         (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
535         to match the ref we did above.
536         (WebCore::NotificationCenter::requestTimedOut): Deleted.
537         (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
538         (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
539         (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
540         (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
541
542         * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
543         Changed the argument type for requestPermission to match the reality of what's passed by the
544         bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
545         vector of std::function.
546
547 2015-04-26  Simon Fraser  <simon.fraser@apple.com>
548
549         Modernize animations code
550         https://bugs.webkit.org/show_bug.cgi?id=144196
551
552         Reviewed by Darin Adler.
553         
554         General cleanup in animation-related code.
555         
556         Use C++ references where possible. Use modern loops. Make classes fast-allocated.
557         Use C++11 member initialization. Order member variables to optimize packing.
558         
559         This removes some null checks in CompositeAnimation, but the values in m_transitions
560         and m_keyframeAnimations can never be null.
561         
562         No behavior change.
563
564         * page/animation/AnimationBase.cpp:
565         (WebCore::AnimationBase::AnimationBase):
566         (WebCore::AnimationBase::animationsMatch):
567         (WebCore::AnimationBase::updateStateMachine):
568         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
569         (WebCore::AnimationBase::beginAnimationUpdateTime):
570         (WebCore::AnimationBase::getElapsedTime):
571         * page/animation/AnimationBase.h:
572         (WebCore::AnimationBase::animation):
573         (WebCore::AnimationBase::setAnimation):
574         * page/animation/AnimationController.cpp:
575         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
576         (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
577         * page/animation/CompositeAnimation.cpp:
578         (WebCore::CompositeAnimation::CompositeAnimation):
579         (WebCore::CompositeAnimation::clearRenderer):
580         (WebCore::CompositeAnimation::updateTransitions):
581         (WebCore::CompositeAnimation::updateKeyframeAnimations):
582         (WebCore::CompositeAnimation::animate):
583         (WebCore::CompositeAnimation::getAnimatedStyle):
584         (WebCore::CompositeAnimation::timeToNextService):
585         (WebCore::CompositeAnimation::getAnimationForProperty):
586         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
587         (WebCore::CompositeAnimation::suspendAnimations):
588         (WebCore::CompositeAnimation::resumeAnimations):
589         (WebCore::CompositeAnimation::overrideImplicitAnimations):
590         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
591         (WebCore::CompositeAnimation::isAnimatingProperty):
592         (WebCore::CompositeAnimation::pauseTransitionAtTime):
593         (WebCore::CompositeAnimation::numberOfActiveAnimations):
594         * page/animation/CompositeAnimation.h:
595         (WebCore::CompositeAnimation::create):
596         (WebCore::CompositeAnimation::animationController):
597         * page/animation/ImplicitAnimation.cpp:
598         (WebCore::ImplicitAnimation::ImplicitAnimation):
599         (WebCore::ImplicitAnimation::sendTransitionEvent):
600         * page/animation/ImplicitAnimation.h:
601         (WebCore::ImplicitAnimation::create):
602         * page/animation/KeyframeAnimation.cpp:
603         (WebCore::KeyframeAnimation::KeyframeAnimation):
604         (WebCore::KeyframeAnimation::animate):
605         (WebCore::KeyframeAnimation::getAnimatedStyle):
606         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
607         (WebCore::KeyframeAnimation::startAnimation):
608         (WebCore::KeyframeAnimation::sendAnimationEvent):
609         (WebCore::KeyframeAnimation::overrideAnimations):
610         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
611         (WebCore::KeyframeAnimation::timeToNextService):
612         * page/animation/KeyframeAnimation.h:
613         * platform/animation/Animation.cpp:
614         (WebCore::Animation::animationsMatch):
615         * platform/animation/Animation.h:
616         * rendering/RenderLayer.cpp:
617         (WebCore::RenderLayer::paint):
618         (WebCore::performOverlapTests):
619         * rendering/style/KeyframeList.h:
620         (WebCore::KeyframeList::properties):
621         (WebCore::KeyframeList::keyframes):
622         (WebCore::KeyframeList::beginProperties): Deleted.
623         (WebCore::KeyframeList::endProperties): Deleted.
624         (WebCore::KeyframeList::operator[]): Deleted.
625         * rendering/style/RenderStyle.h:
626
627 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
628
629         Expand compositing coverage rect when scrolling and animating
630         https://bugs.webkit.org/show_bug.cgi?id=144214
631         rdar://problem/20695926
632
633         Reviewed by Darin Adler.
634         
635         r183300 added a secondary rect that gets mapped through graphics layers during
636         layer flushing, which represents a rect, in layer coordinates, that represents
637         the portion of this layer that's visible in the viewport.
638         
639         This patch extends that rect based on scrolling and animating, with the extended
640         coverage rect being mapped into descendants (where it's used to determine whether
641         they should detach their backing store). This required moving the responsibility for
642         extending the coverage rect from TileController (where it was used to compute
643         tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
644         of coverage rect, and pushes it onto TileControllers.
645
646         Test: compositing/tiling/transform-origin-tiled.html
647
648         * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
649         TiledBacking from outside; new functions reflect that.
650         * platform/graphics/ca/GraphicsLayerCA.cpp:
651         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
652         old visible rect to commitLayerChangesBeforeSublayers.
653         (WebCore::accumulatesTransform):
654         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
655         then adjustCoverageRect() which adjusts for scrolling and animations.
656         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
657         TransformState, but we can only use this if mapping it through various transforms didn't clamp
658         it (which can happen with severe rotations in perspective).
659         (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
660         ask the TileController to do coverage adjustment (code which should move into here eventually).
661         For other tiled layers, do motion-based adjustment. This should really be done for all layers
662         (an animating non-tiled layer may contain a tiled layer).
663         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
664         any more; layers only react to changed in coverage rect now.
665         (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
666         coverage rect, here we push the new rect back into the TransformState so it will affect
667         descendants.
668         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
669         (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
670         hand-in-hand now.
671         (WebCore::GraphicsLayerCA::changeLayerTypeTo):
672         (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
673         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
674         (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
675         * platform/graphics/ca/GraphicsLayerCA.h:
676         * platform/graphics/ca/TileController.cpp:
677         (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
678         logging now.
679         (WebCore::TileController::setCoverageRect):
680         (WebCore::TileController::tilesWouldChangeForCoverageRect):
681         (WebCore::TileController::revalidateTiles):
682         (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
683         is called at the top of committing the owning layer, we haven't yet pushed a new size to the
684         underlying platform layer (which TileController::bounds() consults).
685         (WebCore::TileController::bounds):
686         (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
687         underlying layer hasn't been updated yet.
688         (WebCore::TileController::didRevalidateTiles):
689         (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
690         * platform/graphics/ca/TileController.h:
691         * platform/graphics/ca/TileCoverageMap.cpp:
692         (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows 
693         a dark blue outline for the coverage rect.
694         (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
695         content inset is non-zero.
696         * platform/graphics/ca/TileCoverageMap.h:
697         * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
698         (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
699         (WebCore::TileGrid::revalidateTiles):
700         (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
701         * platform/graphics/ca/TileGrid.h:
702         * platform/graphics/transforms/TransformState.cpp:
703         (WebCore::TransformState::operator=):
704         (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
705         (WebCore::TransformState::mappedSecondaryQuad): Ditto.
706         (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
707         to pass in a secondary quad, and get it mapped into the coordinate space of the last
708         "flattening" state (since the TransformState may have in-flight XY offset, or transform).
709         This mapping is achieved by re-using mapQuad(), but in the inverse direction.
710         (WebCore::TransformState::mapQuad): Make direction a parameter.
711         (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
712         quad. Failure was detected by tests.
713         * platform/graphics/transforms/TransformState.h:
714         (WebCore::TransformState::isMappingSecondaryQuad):
715         (WebCore::TransformState::direction):
716         (WebCore::TransformState::inverseDirection):
717         (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
718
719 2015-04-25  Dan Bernstein  <mitz@apple.com>
720
721         Updated expected bindings generation test results after r183343.
722
723         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
724         * bindings/scripts/test/ObjC/DOMTestCallback.h:
725         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
726         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
727         * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
728         * bindings/scripts/test/ObjC/DOMTestException.h:
729         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
730         * bindings/scripts/test/ObjC/DOMTestInterface.h:
731         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
732         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
733         * bindings/scripts/test/ObjC/DOMTestNode.h:
734         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
735         * bindings/scripts/test/ObjC/DOMTestObj.h:
736         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
737         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
738         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
739         * bindings/scripts/test/ObjC/DOMattribute.h:
740         * bindings/scripts/test/ObjC/DOMreadonly.h:
741
742 2015-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
743
744         font-synthesis's initial value is "style weight"
745         https://bugs.webkit.org/show_bug.cgi?id=144195
746
747         Reviewed by Darin Adler.
748
749         Updated fast/css3-text/font-synthesis-parse.html.
750
751         * rendering/style/RenderStyle.h:
752
753 2015-04-25  Commit Queue  <commit-queue@webkit.org>
754
755         Unreviewed, rolling out r183305.
756         https://bugs.webkit.org/show_bug.cgi?id=144213
757
758         Crashes on wikipedia (Requested by litherum on #webkit).
759
760         Reverted changeset:
761
762         "[Cocoa] FontPlatformData's equality check should always use
763         reference URLs"
764         https://bugs.webkit.org/show_bug.cgi?id=144168
765         http://trac.webkit.org/changeset/183305
766
767 2015-04-25  Dan Bernstein  <mitz@apple.com>
768
769         WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
770         https://bugs.webkit.org/show_bug.cgi?id=144201
771
772         Reviewed by Darin Adler.
773
774         Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
775         9876.5.
776
777         * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
778         use 9876_5 in availability macros. Removed the definition of
779         __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
780
781         * bindings/scripts/CodeGeneratorObjC.pm:
782         (ReadPublicInterfaces): Use 9876_5 instead of TBD.
783
784 2015-04-25  Timothy Hatcher  <timothy@apple.com>
785
786         Update localized strings.
787
788         * English.lproj/Localizable.strings: Updated.
789
790 2015-04-25  Darin Adler  <darin@apple.com>
791
792         Crash if IDBTransaction is aborted right after it's created
793         https://bugs.webkit.org/show_bug.cgi?id=144199
794
795         Reviewed by Simon Fraser.
796
797         Test: storage/indexeddb/transaction-abort.html
798
799         * Modules/indexeddb/IDBTransactionBackend.cpp:
800         (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
801         transaction if it is already complete (has been aborted).
802
803 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
804
805         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
806         https://bugs.webkit.org/show_bug.cgi?id=144182
807
808         Reviewed by Simon Fraser.
809
810         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
811         * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
812         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
813         * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
814         * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
815         * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
816         * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
817         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
818         * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
819         * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
820         * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
821
822 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
823
824         [Cocoa] FontPlatformData's equality check should always use reference URLs
825         https://bugs.webkit.org/show_bug.cgi?id=144168
826
827         Reviewed by Tim Horton.
828
829         <rdar://problem/18985642> is not fixed, so we need to continue using the older
830         objectForEqualityCheck().
831
832         No new tests because there is no behavior change.
833
834         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
835         (WebCore::FontPlatformData::objectForEqualityCheck):
836
837 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
838
839         Implement parsing support for font-synthesis CSS property
840         https://bugs.webkit.org/show_bug.cgi?id=144180
841         <rdar://problem/20692791>
842         <rdar://problem/20625024>
843
844         Reviewed by Tim Horton.
845
846         See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
847
848         This property allows web authors to opt out of font synthesis. This patch only
849         implements parsing support for the property.
850
851         Test: fast/css3-text/font-synthesis-parse.html
852
853         * css/CSSComputedStyleDeclaration.cpp:
854         (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
855         (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
856         * css/CSSParser.cpp:
857         (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
858         (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
859         "none | [ weight || style ]"
860         * css/CSSParser.h: Function signature.
861         * css/CSSPropertyNames.in: New CSS property name.
862         * css/CSSValueKeywords.in: New CSS value names.
863         * css/StyleBuilderCustom.h:
864         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
865         representation of font-synthesis for a given CSSValue.
866         * rendering/style/RenderStyle.h: Function signature.
867         * rendering/style/RenderStyleConstants.h: Internal representation of
868         font-synthesis.
869         * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
870         related to this internal representation.
871
872 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
873
874         Have the web inspector report accurate memory use for layers with detached backing store
875         https://bugs.webkit.org/show_bug.cgi?id=144179
876
877         Reviewed by Dean Jackson.
878
879         Only report memory use for layers whose backing store is attached.
880
881         * platform/graphics/ca/GraphicsLayerCA.cpp:
882         * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
883         which platforms can override if they allow backing store detaching.
884
885 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
886
887         Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
888         https://bugs.webkit.org/show_bug.cgi?id=144165
889
890         Reviewed by Dean Jackson.
891         
892         Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
893         which maps this rect through all the layers. Each layer tests intersection with
894         this rect to determine if its backing store should be attached.
895         
896         This will cause us to drop backing store for layers that don't intersect the
897         visible part of the view, which is too aggressive. A future patch will add
898         some padding.
899
900         Tests: compositing/visible-rect/coverage-clipped.html
901                compositing/visible-rect/coverage-scrolling.html
902
903         * platform/graphics/ca/GraphicsLayerCA.cpp:
904         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
905         C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
906         (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
907         secondary coverage rect. A future patch will inflate this on the way down the tree.
908         (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
909         we have a secondary coverage rect, that rect can be clipped to us too.
910         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
911         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
912         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
913         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
914         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
915         * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
916         Use more C++11 initializers.
917         (WebCore::GraphicsLayerCA::coverageRect):
918
919 2015-04-24  Dean Jackson  <dino@apple.com>
920
921         AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
922         https://bugs.webkit.org/show_bug.cgi?id=144173
923         <rdar://problem/20526168>
924
925         Reviewed by Simon Fraser.
926
927         Keep a list of Animations that care about scroll updates, and only
928         run the animation update if the list is not empty.
929
930         Covered by existing tests.
931
932         * page/animation/AnimationBase.cpp:
933         (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
934         if this is an animation that depends on scrolling.
935         * page/animation/AnimationController.cpp:
936         (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
937         new removeFromAnimationsDependentOnScroll as this animation is deleted.
938         (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
939         (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
940         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
941         there are animations that care.
942         (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
943         value to FrameView.
944         * page/animation/AnimationController.h:
945         * page/animation/AnimationControllerPrivate.h:
946         (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
947
948 2015-04-24  Tim Horton  <timothy_horton@apple.com>
949
950         WKPDFView does not support password-protected PDFs
951         https://bugs.webkit.org/show_bug.cgi?id=144162
952         <rdar://problem/18411512>
953
954         Reviewed by Andy Estes.
955
956         * English.lproj/Localizable.strings:
957         Add some localizable strings.
958
959 2015-04-24  David Kilzer  <ddkilzer@apple.com>
960
961         Fix iOS EWS builds after updating to iOS 8.3 SDK
962
963         * platform/spi/cocoa/CoreTextSPI.h:
964         * rendering/RenderThemeIOS.mm:
965         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
966         - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
967
968 2015-04-24  Jer Noble  <jer.noble@apple.com>
969
970         Unreviewed iOS build fix; add declarations to AVKitSPI.h
971
972         * platform/spi/cocoa/AVKitSPI.h:
973
974 2015-04-24  Enrica Casucci  <enrica@apple.com>
975
976         Make rangeExpandedAroundPositionByCharacters to all platforms.
977         https://bugs.webkit.org/show_bug.cgi?id=144161
978
979         Reviewed by Tim Horton.
980
981         No change in functionality, simply making this available
982         to all platforms.
983
984         * editing/VisibleUnits.cpp:
985         (WebCore::rangeExpandedAroundPositionByCharacters):
986         * editing/VisibleUnits.h:
987         * editing/mac/DataDetection.mm:
988         * editing/mac/DictionaryLookup.h:
989         * editing/mac/DictionaryLookup.mm:
990         (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
991
992 2015-04-24  Andreas Kling  <akling@apple.com>
993
994         Purge PassRefPtr from NamedNodeMap.
995         <https://webkit.org/b/144091>
996
997         Reviewed by Antti Koivisto.
998
999         Use RefPtr instead of PassRefPtr in NamedNodeMap.
1000
1001         * dom/NamedNodeMap.cpp:
1002         (WebCore::NamedNodeMap::getNamedItem):
1003         (WebCore::NamedNodeMap::getNamedItemNS):
1004         (WebCore::NamedNodeMap::removeNamedItem):
1005         (WebCore::NamedNodeMap::removeNamedItemNS):
1006         (WebCore::NamedNodeMap::setNamedItem):
1007         (WebCore::NamedNodeMap::setNamedItemNS):
1008         (WebCore::NamedNodeMap::item):
1009         * dom/NamedNodeMap.h:
1010
1011 2015-04-24  Commit Queue  <commit-queue@webkit.org>
1012
1013         Unreviewed, rolling out r183266.
1014         https://bugs.webkit.org/show_bug.cgi?id=144164
1015
1016         Broke 32-bit build and a test. (Requested by ap on #webkit).
1017
1018         Reverted changeset:
1019
1020         "AX: richer text change notifications (142719)"
1021         https://bugs.webkit.org/show_bug.cgi?id=142719
1022         http://trac.webkit.org/changeset/183266
1023
1024 2015-04-24  Brady Eidson  <beidson@apple.com>
1025
1026         Origin header is preserved on cross-origin redirects.
1027         https://bugs.webkit.org/show_bug.cgi?id=144157.
1028
1029         Reviewed by Sam Weinig.
1030
1031         Tests: http/tests/security/cors-post-redirect-301.html
1032                http/tests/security/cors-post-redirect-302.html
1033                http/tests/security/cors-post-redirect-307.html
1034                http/tests/security/cors-post-redirect-308.html
1035
1036         * platform/network/cf/ResourceHandleCFNet.cpp:
1037         (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
1038         * platform/network/mac/ResourceHandleMac.mm:
1039         (WebCore::ResourceHandle::willSendRequest): Ditto.
1040
1041 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
1042
1043         Immediate action not functional for embedded PDFs
1044         https://bugs.webkit.org/show_bug.cgi?id=143952
1045         <rdar://problem/19842365>        
1046
1047         Reviewed by Tim Horton.
1048
1049         Add a dictionary lookup method to allow us to retrieve
1050         relevant information for PDFs.
1051
1052         * editing/mac/DictionaryLookup.mm:
1053         (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
1054         where the Lookup engine selects a smaller range than the initial automatic
1055         selection performed on clicking.
1056
1057 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
1058
1059         Make it possible to map a secondary quad through TransformState
1060         https://bugs.webkit.org/show_bug.cgi?id=144156
1061
1062         Reviewed by Dean Jackson.
1063
1064         A future patch will need to map two quads simultaneously through TransformState,
1065         so add the ability to provide an optional secondary quad.
1066         
1067         This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
1068         requiring the state to be flattened when setting the quad (and now, the secondary quad).
1069         Previously, setQuad implicitly flattened but failed to update m_mapPoint when
1070         doing so.
1071
1072         * platform/graphics/ca/GraphicsLayerCA.cpp:
1073         (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
1074         before setting the quad.
1075         * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
1076         * platform/graphics/transforms/TransformState.cpp:
1077         (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
1078         (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
1079         if we have one.
1080         (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
1081         (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
1082         into the state's current coordinate space.
1083         (WebCore::TransformState::mapQuad): Factored code.
1084         * platform/graphics/transforms/TransformState.h:
1085         (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
1086         (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
1087         (WebCore::TransformState::lastPlanarSecondaryQuad):
1088         (WebCore::TransformState::lastPlanarQuad): Deleted.
1089
1090 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
1091
1092         [iOS] Reimplement r182512 and r183153 in a cleaner way
1093         https://bugs.webkit.org/show_bug.cgi?id=144151
1094
1095         Reviewed by Enrica Casucci.
1096
1097         On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
1098         This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
1099         react to this fact by making users of a FontPlatformData use the original font passed in
1100         to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
1101         detect that the FontPlatformData represents a system font (the underlying APIs have
1102         different behavior for system fonts and non-system-fonts).
1103
1104         However, on OS X, we create a FontPlatformData's ctFont() directly from the original
1105         font passed in to the constructor. This preserves system-font-ness (because it no
1106         longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
1107         correct behavior regarding system fonts.
1108
1109         The difference between the two ctFont() creation codepaths seems to be historical
1110         rather than intentional. Rather than change all the call sites of ctFont() to use a
1111         different platform font object if a system font is detected, a cleaner solution is to
1112         simply unify the two ctFont() creation codepaths to the version which preserves system-
1113         font-ness. Doing this will make all users of FontPlatformData automatically have the
1114         correct behavior with no updates.
1115
1116         This patch reverts the relevant parts of r182512 and r183153 in favor of this new
1117         solution.
1118
1119         No new tests because there is no behavior change.
1120
1121         * platform/graphics/FontPlatformData.h:
1122         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
1123         * platform/graphics/cocoa/FontCocoa.mm:
1124         (WebCore::Font::platformWidthForGlyph):
1125         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1126         (WebCore::FontPlatformData::ctFontSize):
1127         (WebCore::FontPlatformData::ctFont):
1128         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
1129         (WebCore::Font::getCFStringAttributes):
1130
1131 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
1132
1133         Unreviewed build fix.
1134
1135         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1136         (WebCore::FontPlatformData::FontPlatformData):
1137
1138 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
1139
1140         [Cocoa] Start cleaning up FontPlatformData
1141         https://bugs.webkit.org/show_bug.cgi?id=144133
1142
1143         Reviewed by Enrica Casucci.
1144
1145         This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
1146         FontPlatformData. This patch starts this effort out by removing the FontPlatformData
1147         constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
1148         and forwards to another constructor. This patch moves this cast to callers of this constructor,
1149         thereby enumerating the places we have left that use NSFont with FontPlatformData.
1150
1151         This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
1152         a common constructor.
1153
1154         This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
1155         not 0 and not -1, and puts this common code inside a new function,
1156         FontPlatformData::isValidCTFontRef().
1157
1158         No new tests because there is no behavior change.
1159
1160         * platform/graphics/FontPlatformData.cpp:
1161         (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
1162         * platform/graphics/FontPlatformData.h:
1163         (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
1164         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
1165         * platform/graphics/cocoa/FontCocoa.mm:
1166         (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
1167         FontPlatformData constructor.
1168         (WebCore::Font::compositeFontReferenceFont): Ditto.
1169         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1170         (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
1171         (WebCore::FontPlatformData::platformDataInit): Ditto.
1172         (WebCore::FontPlatformData::platformDataAssign): Ditto.
1173         (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
1174         (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
1175         (WebCore::FontPlatformData::FontPlatformData): Deleted.
1176         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1177         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
1178         NSFont use.
1179         * platform/graphics/mac/FontCacheMac.mm:
1180         (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
1181         deleted FontPlatformData constructor.
1182         (WebCore::FontCache::createFontPlatformData): Ditto.
1183         * platform/mac/DragImageMac.mm:
1184         (WebCore::fontFromNSFont): Ditto.
1185         (WebCore::widthWithFont): Ditto.
1186         (WebCore::drawAtPoint): Ditto.
1187
1188 2015-04-24  Doug Russell  <d_russell@apple.com>
1189
1190         AX: richer text change notifications (142719)
1191         https://bugs.webkit.org/show_bug.cgi?id=142719
1192
1193         Reviewed by Darin Adler.
1194
1195         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
1196
1197         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
1198
1199         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
1200                platform/mac/accessibility/selection-change-userinfo.html
1201                platform/mac/accessibility/value-change-userinfo.html
1202
1203         * CMakeLists.txt:
1204         * WebCore.vcxproj/WebCore.vcxproj:
1205         * WebCore.vcxproj/WebCore.vcxproj.filters:
1206         * WebCore.xcodeproj/project.pbxproj:
1207         * accessibility/AXObjectCache.cpp:
1208         (WebCore::AXObjectCache::AXObjectCache):
1209         (WebCore::AXObjectCache::notificationPostTimerFired):
1210         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
1211         (WebCore::AXObjectCache::showIntent):
1212         (WebCore::AXObjectCache::setTextSelectionIntent):
1213         (WebCore::isPasswordFieldOrContainedByPasswordField):
1214         (WebCore::AXObjectCache::postTextStateChangeNotification):
1215         (WebCore::AXObjectCache::postTextReplacementNotification):
1216         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
1217         (WebCore::AXObjectCache::rootWebArea):
1218         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
1219         * accessibility/AXObjectCache.h:
1220         (WebCore::AXObjectCache::postTextStateChangeNotification):
1221         (WebCore::AXObjectCache::postTextReplacementNotification):
1222         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
1223         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1224         (WebCore::AXObjectCache::textChangeForEditType):
1225         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1226         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
1227         (WebCore::AXObjectCache::getOrCreate): Deleted.
1228         (WebCore::AXObjectCache::attachWrapper): Deleted.
1229         * accessibility/AXTextStateChangeIntent.h: Added.
1230         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
1231         * accessibility/AccessibilityNodeObject.cpp:
1232         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
1233         * accessibility/AccessibilityNodeObject.h:
1234         * accessibility/AccessibilityObject.cpp:
1235         (WebCore::AccessibilityObject::isContainedByPasswordField):
1236         * accessibility/AccessibilityObject.h:
1237         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
1238         (WebCore::AccessibilityObject::isPasswordField): Deleted.
1239         * accessibility/AccessibilityRenderObject.cpp:
1240         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1241         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
1242         * accessibility/AccessibilityScrollView.h:
1243         * accessibility/atk/AXObjectCacheAtk.cpp:
1244         (WebCore::AXObjectCache::textChangeForEditType):
1245         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1246         (WebCore::AXObjectCache::postPlatformNotification): Deleted.
1247         * accessibility/ios/AXObjectCacheIOS.mm:
1248         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
1249         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1250         * accessibility/mac/AXObjectCacheMac.mm:
1251         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
1252         (WebCore::AXPostNotificationWithUserInfo):
1253         (WebCore::AXObjectCache::postPlatformNotification):
1254         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
1255         (WebCore::textReplacementChangeDictionary):
1256         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1257         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1258         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1259         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
1260         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
1261         (arrayRemovingNonJSONTypes):
1262         (dictionaryRemovingNonJSONTypes):
1263         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
1264         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
1265         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1266         (textMarkerRangeFromVisiblePositions):
1267         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
1268         * editing/AppendNodeCommand.cpp:
1269         (WebCore::AppendNodeCommand::AppendNodeCommand):
1270         (WebCore::sendAXTextChangedIgnoringLineBreaks):
1271         (WebCore::AppendNodeCommand::doApply):
1272         (WebCore::AppendNodeCommand::doUnapply):
1273         * editing/AppendNodeCommand.h:
1274         (WebCore::AppendNodeCommand::create):
1275         * editing/ApplyStyleCommand.cpp:
1276         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
1277         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
1278         * editing/ApplyStyleCommand.h:
1279         * editing/CompositeEditCommand.cpp:
1280         (WebCore::EditCommandComposition::unapplyEditType):
1281         (WebCore::CompositeEditCommand::CompositeEditCommand):
1282         (WebCore::CompositeEditCommand::apply):
1283         (WebCore::CompositeEditCommand::insertParagraphSeparator):
1284         (WebCore::CompositeEditCommand::insertNodeBefore):
1285         (WebCore::CompositeEditCommand::appendNode):
1286         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
1287         (WebCore::CompositeEditCommand::insertTextIntoNode):
1288         (WebCore::CompositeEditCommand::deleteTextFromNode):
1289         (WebCore::CompositeEditCommand::replaceTextInNode):
1290         (WebCore::CompositeEditCommand::moveParagraphs):
1291         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
1292         (WebCore::CompositeEditCommand::applyStyle): Deleted.
1293         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
1294         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
1295         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
1296         (WebCore::CompositeEditCommand::inputText): Deleted.
1297         * editing/CompositeEditCommand.h:
1298         * editing/DeleteFromTextNodeCommand.cpp:
1299         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
1300         (WebCore::DeleteFromTextNodeCommand::doApply):
1301         (WebCore::DeleteFromTextNodeCommand::doUnapply):
1302         * editing/DeleteFromTextNodeCommand.h:
1303         (WebCore::DeleteFromTextNodeCommand::create):
1304         (WebCore::DeleteFromTextNodeCommand::deletedText):
1305         * editing/DeleteSelectionCommand.cpp:
1306         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
1307         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
1308         * editing/DeleteSelectionCommand.h:
1309         (WebCore::DeleteSelectionCommand::create):
1310         * editing/DictationCommand.cpp:
1311         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
1312         (WebCore::DictationCommand::insertParagraphSeparator):
1313         * editing/EditAction.h:
1314         * editing/EditCommand.cpp:
1315         (WebCore::EditCommand::EditCommand):
1316         (WebCore::EditCommand::editingAction):
1317         (WebCore::EditCommand::applyEditType):
1318         (WebCore::EditCommand::unapplyEditType):
1319         (WebCore::SimpleEditCommand::SimpleEditCommand):
1320         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
1321         (WebCore::EditCommand::setParent): Deleted.
1322         * editing/EditCommand.h:
1323         * editing/EditingAllInOne.cpp:
1324         * editing/Editor.cpp:
1325         (WebCore::Editor::handleTextEvent):
1326         (WebCore::Editor::deleteSelectionWithSmartDelete):
1327         (WebCore::Editor::replaceSelectionWithFragment):
1328         (WebCore::Editor::replaceSelectionWithText):
1329         (WebCore::Editor::appliedEditing):
1330         (WebCore::Editor::unappliedEditing):
1331         (WebCore::Editor::performCutOrCopy):
1332         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1333         (WebCore::Editor::changeBackToReplacedString):
1334         (WebCore::Editor::transpose):
1335         (WebCore::Editor::changeSelectionAfterCommand):
1336         * editing/Editor.h:
1337         * editing/EditorCommand.cpp:
1338         (WebCore::executeInsertFragment):
1339         * editing/FrameSelection.cpp:
1340         (WebCore::FrameSelection::moveTo):
1341         (WebCore::FrameSelection::moveWithoutValidationTo):
1342         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
1343         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
1344         (WebCore::FrameSelection::setSelection):
1345         (WebCore::FrameSelection::updateAndRevealSelection):
1346         (WebCore::isBoundary):
1347         (WebCore::FrameSelection::textSelectionIntent):
1348         (WebCore::FrameSelection::modify):
1349         (WebCore::FrameSelection::selectAll):
1350         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
1351         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
1352         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
1353         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
1354         * editing/FrameSelection.h:
1355         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1356         (WebCore::FrameSelection::selection): Deleted.
1357         * editing/InsertIntoTextNodeCommand.cpp:
1358         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
1359         (WebCore::InsertIntoTextNodeCommand::doApply):
1360         (WebCore::InsertIntoTextNodeCommand::doUnapply):
1361         * editing/InsertIntoTextNodeCommand.h:
1362         (WebCore::InsertIntoTextNodeCommand::create):
1363         (WebCore::InsertIntoTextNodeCommand::insertedText):
1364         * editing/InsertNodeBeforeCommand.cpp:
1365         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
1366         (WebCore::InsertNodeBeforeCommand::doApply):
1367         (WebCore::InsertNodeBeforeCommand::doUnapply):
1368         * editing/InsertNodeBeforeCommand.h:
1369         (WebCore::InsertNodeBeforeCommand::create):
1370         * editing/InsertParagraphSeparatorCommand.cpp:
1371         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
1372         * editing/InsertParagraphSeparatorCommand.h:
1373         (WebCore::InsertParagraphSeparatorCommand::create):
1374         * editing/InsertTextCommand.cpp:
1375         (WebCore::InsertTextCommand::InsertTextCommand):
1376         * editing/InsertTextCommand.h:
1377         (WebCore::InsertTextCommand::create):
1378         (WebCore::InsertTextCommand::createWithMarkerSupplier):
1379         * editing/MoveSelectionCommand.cpp:
1380         (WebCore::MoveSelectionCommand::doApply):
1381         * editing/RemoveNodePreservingChildrenCommand.cpp:
1382         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
1383         * editing/RemoveNodePreservingChildrenCommand.h:
1384         (WebCore::RemoveNodePreservingChildrenCommand::create):
1385         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
1386         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
1387         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
1388         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
1389         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
1390         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
1391         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
1392         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
1393         * editing/ReplaceSelectionCommand.cpp:
1394         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
1395         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
1396         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
1397         * editing/ReplaceSelectionCommand.h:
1398         (WebCore::ReplaceSelectionCommand::create):
1399         * editing/TypingCommand.cpp:
1400         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
1401         (WebCore::TypingCommand::insertParagraphSeparator):
1402         * editing/atk/FrameSelectionAtk.cpp:
1403         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1404         * editing/ios/DictationCommandIOS.cpp:
1405         (WebCore::DictationCommandIOS::DictationCommandIOS):
1406         * editing/ios/DictationCommandIOS.h:
1407         * editing/mac/FrameSelectionMac.mm:
1408         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1409         * html/HTMLTextFormControlElement.cpp:
1410         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1411         * page/DragController.cpp:
1412         (WebCore::DragController::concludeEditDrag):
1413         * page/EventHandler.cpp:
1414         (WebCore::setInitialKeyboardSelection):
1415         * page/FocusController.cpp:
1416         (WebCore::FocusController::advanceFocusInDocumentOrder):
1417
1418 2015-04-24  Darin Adler  <darin@apple.com>
1419
1420         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
1421         https://bugs.webkit.org/show_bug.cgi?id=128007
1422
1423         Reviewed by Anders Carlsson.
1424
1425         * PlatformEfl.cmake: Removed OwnPtrCairo source files.
1426         * PlatformGTK.cmake: Ditto.
1427         * PlatformWinCairo.cmake: Ditto.
1428         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1429         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1430
1431         * platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
1432         * platform/CrossThreadCopier.h: Ditto.
1433
1434         * platform/ScrollAnimatorNone.cpp: Removed unneeded include.
1435         * platform/ThreadGlobalData.cpp: Ditto.
1436         * platform/ThreadGlobalData.h: Ditto.
1437         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.
1438
1439         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1440         (WebCore::AVFWrapper::processNotification): Use unique_ptr.
1441         (WebCore::AVFWrapper::notificationCallback): Use make_unique.
1442         (WebCore::AVFWrapper::platformLayer): Ditto.
1443
1444         * platform/graphics/cairo/CairoUtilities.cpp:
1445         (WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
1446         instead of a smart pointer; the code path is simple enough that it is
1447         clear this way.
1448
1449         * platform/graphics/cairo/ImageBufferCairo.cpp:
1450         (WebCore::ImageBuffer::ImageBuffer): Use make_unique.
1451         * platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.
1452
1453         * platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
1454         * platform/graphics/cairo/OwnPtrCairo.h: Removed.
1455
1456         * platform/graphics/cairo/PathCairo.cpp:
1457         (WebCore::Path::Path): Use cairo_path_destroy directly instead of a
1458         smart pointer; the code path is simple enough that it is clear this way.
1459         (WebCore::Path::operator=): Ditto.
1460         (WebCore::Path::addPath): Ditto.
1461         (WebCore::Path::apply): Ditto.
1462         * platform/graphics/cairo/PlatformContextCairo.cpp:
1463         (WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.
1464
1465         * platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
1466         * platform/graphics/glx/GLContextGLX.cpp: Ditto.
1467
1468         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1469         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.
1470
1471         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1472         (WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
1473         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
1474         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1475         (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
1476         (WebCore::GLXOffScreenSurface::initialize): Ditto.
1477
1478         * platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.
1479
1480         * platform/graphics/surfaces/glx/X11Helper.cpp:
1481         (WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
1482         (WebCore::X11Helper::createPixmap): Ditto.
1483
1484         * platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
1485         which can be used with unique_ptr to make it call XFree instead of delete.
1486
1487         * platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
1488         (FullScreenController::FullScreenController): Use make_unique.
1489         (FullScreenController::enterFullScreen): Ditto.
1490         * platform/graphics/win/FullScreenController.h: Use unique_ptr.
1491
1492         * platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.
1493
1494         * platform/graphics/win/WKCAImageQueue.cpp:
1495         (WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
1496         * platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.
1497
1498         * platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.
1499
1500         * platform/network/ResourceHandleInternal.h: Use unique_ptr.
1501
1502         * platform/network/curl/MultipartHandle.cpp:
1503         (WebCore::MultipartHandle::create): Deleted.
1504         * platform/network/curl/MultipartHandle.h: Deleted the create function.
1505
1506         * platform/network/curl/ResourceHandleManager.cpp:
1507         (WebCore::headerCallback): Use make_unique.
1508
1509 2015-04-24  Per Arne Vollan  <peavo@outlook.com>
1510
1511         [Win] Popup menu is not accessible.
1512         https://bugs.webkit.org/show_bug.cgi?id=141704
1513
1514         Reviewed by Brent Fulgham.
1515
1516         Get accessibility information for items in popup menus.
1517
1518         * platform/win/PopupMenuWin.cpp:
1519         (WebCore::PopupMenuWin::onGetObject):
1520         (WebCore::PopupMenuWin::wndProc):
1521         (WebCore::AccessiblePopupMenu::AccessiblePopupMenu):
1522         (WebCore::AccessiblePopupMenu::~AccessiblePopupMenu):
1523         (WebCore::AccessiblePopupMenu::QueryInterface):
1524         (WebCore::AccessiblePopupMenu::AddRef):
1525         (WebCore::AccessiblePopupMenu::Release):
1526         (WebCore::AccessiblePopupMenu::GetTypeInfoCount):
1527         (WebCore::AccessiblePopupMenu::GetTypeInfo):
1528         (WebCore::AccessiblePopupMenu::GetIDsOfNames):
1529         (WebCore::AccessiblePopupMenu::Invoke):
1530         (WebCore::AccessiblePopupMenu::get_accParent):
1531         (WebCore::AccessiblePopupMenu::get_accChildCount):
1532         (WebCore::AccessiblePopupMenu::get_accChild):
1533         (WebCore::AccessiblePopupMenu::get_accName):
1534         (WebCore::AccessiblePopupMenu::get_accValue):
1535         (WebCore::AccessiblePopupMenu::get_accDescription):
1536         (WebCore::AccessiblePopupMenu::get_accRole):
1537         (WebCore::AccessiblePopupMenu::get_accState):
1538         (WebCore::AccessiblePopupMenu::get_accHelp):
1539         (WebCore::AccessiblePopupMenu::get_accKeyboardShortcut):
1540         (WebCore::AccessiblePopupMenu::get_accFocus):
1541         (WebCore::AccessiblePopupMenu::get_accSelection):
1542         (WebCore::AccessiblePopupMenu::get_accDefaultAction):
1543         (WebCore::AccessiblePopupMenu::accSelect):
1544         (WebCore::AccessiblePopupMenu::accLocation):
1545         (WebCore::AccessiblePopupMenu::accNavigate):
1546         (WebCore::AccessiblePopupMenu::accHitTest):
1547         (WebCore::AccessiblePopupMenu::accDoDefaultAction):
1548         (WebCore::AccessiblePopupMenu::put_accName):
1549         (WebCore::AccessiblePopupMenu::put_accValue):
1550         (WebCore::AccessiblePopupMenu::get_accHelpTopic):
1551         * platform/win/PopupMenuWin.h:
1552         * platform/win/ScrollbarThemeWin.h:
1553         (WebCore::ScrollbarThemeWin::hasButtons): Deleted.
1554
1555 2015-04-23  Antti Koivisto  <antti@apple.com>
1556
1557         Memory cache live resources repeatedly purged during painting
1558         https://bugs.webkit.org/show_bug.cgi?id=144104
1559         <rdar://problem/20667695>
1560
1561         Reviewed by Chris Dumez.
1562
1563         On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
1564         This slows down page loads significantly.
1565
1566         This might have regressed because improvements in page caching keep more pages and so resources 'live'.
1567
1568         With this path we do all regular cache pruning asynchronously. If memory is really critical
1569         the low memory handling code will still prune synchronously.
1570
1571         * loader/cache/CachedResource.cpp:
1572         (WebCore::CachedResource::removeClient):
1573         (WebCore::CachedResource::didAccessDecodedData):
1574
1575             prune() -> pruneSoon()
1576
1577         * loader/cache/MemoryCache.cpp:
1578
1579             Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.
1580
1581         (WebCore::MemoryCache::needsPruning):
1582
1583             Factor into a function.
1584
1585         (WebCore::MemoryCache::prune):
1586         (WebCore::MemoryCache::pruneSoon):
1587
1588             Prune asynchronously.
1589
1590         * loader/cache/MemoryCache.h:
1591
1592 2015-04-24  Antti Koivisto  <antti@apple.com>
1593
1594         Unreviewed, rolling out r183259.
1595
1596         Wrong ChangeLog.
1597
1598         Reverted changeset:
1599
1600         "Memory cache live resources repeatedly purged during
1601         painting"
1602         https://bugs.webkit.org/show_bug.cgi?id=144104
1603         http://trac.webkit.org/changeset/183259
1604
1605 2015-04-24  Antti Koivisto  <antti@apple.com>
1606
1607         CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
1608         https://bugs.webkit.org/show_bug.cgi?id=144050
1609
1610         Reviewed by Chris Dumez.
1611
1612         We are seeing null Element pointer crashes with this stack:
1613
1614         47 com.apple.WebCore:  WebCore::toScriptElementIfPossible + 4 <==
1615         47 com.apple.WebCore:  WebCore::ScriptRunner::timerFired + 452
1616         47 com.apple.WebCore:  WebCore::ThreadTimers::sharedTimerFiredInternal + 175
1617
1618         The most likely cause seems to be that this code
1619
1620             ASSERT(m_pendingAsyncScripts.contains(scriptElement));
1621             m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));
1622
1623         in ScriptRunner::notifyScriptReady fails to find scriptElement and we are left with null entry in
1624         m_scriptsToExecuteSoon. However I haven't managed to repro this or find the exact path how this
1625         could happen. The related code is fragile with lot of state (especially in ScriptElement class)
1626         and involves many opportunities for re-entry via scripts.
1627
1628         No repro, no test case.
1629
1630         * dom/ScriptRunner.cpp:
1631         (WebCore::ScriptRunner::timerFired):
1632
1633             Paper this over by adding a null check. We could check m_pendingAsyncScripts.take() above
1634             but this also covers possibility this is caused by something else.
1635
1636 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1637
1638         [SOUP] Use a webkit subdirectory for the disk cache
1639         https://bugs.webkit.org/show_bug.cgi?id=144048
1640
1641         Reviewed by Martin Robinson.
1642
1643         Add a static method to SoupNetworkSession to clear a soup cache
1644         given its directory.
1645
1646         * platform/network/soup/SoupNetworkSession.cpp:
1647         (WebCore::strIsNumeric):
1648         (WebCore::SoupNetworkSession::clearCache):
1649         * platform/network/soup/SoupNetworkSession.h:
1650
1651 2015-04-23  Andy Estes  <aestes@apple.com>
1652
1653         Fix the iOS build after r183234.
1654
1655         * platform/ios/LegacyTileCache.mm:
1656         (WebCore::LegacyTileCache::commitScaleChange):
1657
1658 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
1659
1660         Fix Windows build.
1661
1662         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1663         (PlatformCALayerWin::setBackingStoreAttached):
1664         (PlatformCALayerWin::backingStoreAttached):
1665         * platform/graphics/ca/win/PlatformCALayerWin.h:
1666
1667 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
1668
1669         Make it possible to detach GraphicsLayerCA backing store
1670         https://bugs.webkit.org/show_bug.cgi?id=144140
1671
1672         Reviewed by Tim Horton.
1673
1674         This changes makes it possible to denote a GraphicsLayerCA's backing store
1675         as "attached" or not. When not attached, the backing store is made volatile
1676         and can be purged. This will be used in a future patch.
1677
1678         * platform/graphics/ca/GraphicsLayerCA.h: Add updateBackingStoreAttachment().
1679         * platform/graphics/ca/PlatformCALayer.h:
1680         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1681         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Stubs. In future, we could
1682         remove backing store on Mac and iOS WK1 too.
1683         (PlatformCALayerMac::setBackingStoreAttached):
1684         (PlatformCALayerMac::backingStoreAttached):
1685
1686 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
1687
1688         Remove "layer" from GraphicsLayerCA member function names
1689         https://bugs.webkit.org/show_bug.cgi?id=144139
1690
1691         Reviewed by Myles Maxfield.
1692
1693         Rename "updateLayer*" to "update*" in GraphicsLayerCA.
1694
1695         * platform/graphics/ca/GraphicsLayerCA.cpp:
1696         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1697         (WebCore::GraphicsLayerCA::updateNames):
1698         (WebCore::GraphicsLayerCA::updateDrawsContent):
1699         (WebCore::GraphicsLayerCA::updateLayerNames): Deleted.
1700         (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Deleted.
1701         * platform/graphics/ca/GraphicsLayerCA.h:
1702
1703 2015-04-23  Dan Bernstein  <mitz@apple.com>
1704
1705         <rdar://problem/20663758> Fix the build after AVPlayerViewController API change
1706
1707         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1708         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Don’t pass a nil completion
1709         handler to -[AVPlayerViewController exitFullScreenAnimated:completionHandler:].
1710
1711 2015-04-23  Darin Adler  <darin@apple.com>
1712
1713         Another round of removing use of OwnPtr, PassOwnPtr, and deleteOwnedPtr
1714         https://bugs.webkit.org/show_bug.cgi?id=144090
1715
1716         Reviewed by Anders Carlsson.
1717
1718         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Removed unneeded include.
1719
1720         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed include of
1721         RefCountedSupplement.h.
1722
1723         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1724         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
1725         Pass data using rvalue references, and use new/delete to pass it across
1726         threads, rather than using PassOwnPtr.
1727         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Pass data
1728         in an rvalue reference instead of PassOwnPtr.
1729         * Modules/websockets/WebSocket.cpp:
1730         (WebCore::WebSocket::didReceiveBinaryData): Take an rvalue reference
1731         instead of a PassOwnPtr.
1732         * Modules/websockets/WebSocket.h: Ditto.
1733         * Modules/websockets/WebSocketChannel.cpp: Ditto.
1734         (WebCore::WebSocketChannel::processFrame): Ditto.
1735         * Modules/websockets/WebSocketChannelClient.h:
1736         (WebCore::WebSocketChannelClient::didReceiveBinaryData): Ditto.
1737         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1738         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
1739         Ditto.
1740         * Modules/websockets/WorkerThreadableWebSocketChannel.h: Ditto.
1741
1742         * WebCore.xcodeproj/project.pbxproj: Removed RefCountedSupplement.h.
1743
1744         * loader/cocoa/DiskCacheMonitorCocoa.mm:
1745         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Fixed comment
1746         to not mention adoptPtr.
1747
1748         * page/make_settings.pl:
1749         (generateInternalSettingsHeaderFile): Removed include of RefCountedSupplement.h.
1750
1751         * platform/ColorChooserClient.h: Removed unneded include.
1752         * platform/ContextMenuItem.h: Ditto.
1753
1754         * platform/RefCountedSupplement.h: Removed.
1755
1756         * platform/ScrollAnimator.cpp: Removed unneeded include.
1757         * platform/ScrollAnimatorNone.h: Ditto.
1758
1759         * platform/ThreadGlobalData.cpp: Added now-needed include of PassOwnPtr.h.
1760
1761         * platform/graphics/GlyphMetricsMap.h: Ditto.
1762         * platform/graphics/MediaPlayer.h: Ditto.
1763         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Ditto.
1764         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Ditto.
1765         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
1766         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Ditto.
1767         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Ditto.
1768         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Ditto.
1769         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Ditto.
1770
1771         * platform/graphics/cg/ImageBufferCG.cpp:
1772         (WebCore::ImageBuffer::ImageBuffer): Use make_unique instead of adoptPtr.
1773         * platform/graphics/cg/ImageBufferDataCG.cpp:
1774         (WebCore::ImageBufferData::getData): Return a RefPtr instead of a PassRefPtr.
1775         * platform/graphics/cg/ImageBufferDataCG.h: Streamlined the header a bit,
1776         use unique_ptr instead of OwnPtr and RefPtr instead of PassRefPtr.
1777
1778         * platform/graphics/cocoa/IOSurface.h: Use unique_ptr instead of OwnPtr.
1779         * platform/graphics/cocoa/IOSurface.mm:
1780         (IOSurface::ensureGraphicsContext): Use make_unique instead of adoptPtr.
1781
1782         * platform/graphics/egl/GLContextEGL.cpp: Removed unneeded includes.
1783         * platform/graphics/filters/FilterOperation.h: Ditto.
1784         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Ditto.
1785         * platform/ios/DeviceMotionClientIOS.h: Ditto.
1786         * platform/ios/DeviceOrientationClientIOS.h: Ditto.
1787
1788         * platform/ios/LegacyTileCache.h: Use unique_ptr instead of OwnPtr.
1789         * platform/ios/LegacyTileCache.mm:
1790         (WebCore::LegacyTileCache::LegacyTileCache): Use make_unique instead of
1791         a create function, and also get rid of unneeded initialization to null.
1792         (WebCore::LegacyTileCache::commitScaleChange): Ditto.
1793
1794         * platform/ios/LegacyTileGrid.h: Made constructor public and got rid of create
1795         function. Made constructor take a reference to the tile cache, and make both
1796         tileCache() and m_tileCache be references too.
1797
1798         * platform/ios/LegacyTileGrid.mm:
1799         (WebCore::LegacyTileGrid::LegacyTileGrid): Updated to use reference.
1800         (WebCore::LegacyTileGrid::visibleRect): Ditto.
1801         (WebCore::LegacyTileGrid::tileByteSize) Ditto.:
1802         (WebCore::LegacyTileGrid::dropDistantTiles): Ditto.
1803         (WebCore::LegacyTileGrid::updateTileOpacity): Ditto.
1804         (WebCore::LegacyTileGrid::updateTileBorderVisibility): Ditto.
1805         (WebCore::LegacyTileGrid::updateHostLayerSize): Ditto.
1806         (WebCore::LegacyTileGrid::invalidateTiles): Ditto.
1807         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage): Ditto.
1808         (WebCore::LegacyTileGrid::tileDistance2): Ditto.
1809         (WebCore::LegacyTileGrid::createTiles): Ditto.
1810         * platform/ios/LegacyTileGridTile.mm:
1811         (WebCore::LegacyTileGridTile::LegacyTileGridTile): Ditto.
1812         (WebCore::LegacyTileGridTile::invalidateRect): Ditto.
1813         (WebCore::LegacyTileGridTile::showBorder): Ditto.
1814         * platform/ios/LegacyTileLayer.mm:
1815         (-[LegacyTileHostLayer renderInContext:]): Ditto.
1816         (-[LegacyTileLayer layoutSublayers]): Ditto.
1817         (-[LegacyTileLayer drawInContext:]): Ditto.
1818
1819         * platform/ios/LegacyTileLayerPool.h: Removed unneeded include.
1820         * platform/ios/ScrollAnimatorIOS.mm: Ditto.
1821         * platform/mac/ScrollAnimatorMac.mm: Ditto.
1822         * platform/mac/WebVideoFullscreenController.h: Ditto.
1823         * platform/network/BlobData.cpp: Ditto.
1824
1825         * platform/network/ResourceHandle.cpp:
1826         (WebCore::ResourceHandle::ResourceHandle): Use make_unique instead of adoptPtr.
1827         * platform/network/ResourceHandle.h: Use unique_ptr instead of OwnPtr.
1828
1829         * platform/network/ResourceHandleInternal.h: Added now-needed include.
1830
1831         * platform/network/ResourceResponseBase.h: Removed unneeded includes and
1832         tweaked formatting a bit.
1833
1834         * platform/network/SynchronousLoaderClient.h: Removed the create function and
1835         the private constructor. Used data member initialize to make the default
1836         empty constructor automatically get generated (and be public now).
1837
1838         * platform/network/cf/FormDataStreamCFNet.cpp:
1839         (WebCore::formFinishFinalizationOnMainThread): Use delete instead of adoptPtr
1840         to delete the context argument.
1841
1842         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1843         (WebCore::defaultNetworkStorageSession): Return a unique_ptr& instead of an OwnPtr&.
1844         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use make_unique
1845         instead of adoptPtr.
1846         (WebCore::NetworkStorageSession::defaultStorageSession): Ditto.
1847
1848         * platform/network/cf/ResourceHandleCFNet.cpp:
1849         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Use a
1850         SynchronousLoaderClient on the stack instead of putting one on the heap with adoptPtr.
1851         * platform/network/mac/ResourceHandleMac.mm:
1852         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
1853
1854         * platform/text/TextCodec.h: Removed unneeded include.
1855         * platform/win/CursorWin.cpp: Ditto.
1856
1857         * rendering/RenderLayer.cpp:
1858         (WebCore::RenderLayer::calculateClipRects): Use move instead of release since
1859         we are using RefPtr&& instead of PassRefPtr.
1860
1861         * rendering/RenderLayerFilterInfo.cpp:
1862         (WebCore::RenderLayer::FilterInfo::setRenderer): Use RefPtr&& instead of PassRefPtr.
1863         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Streamlined to use
1864         modern for loops and auto.
1865         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
1866
1867         * rendering/RenderLayerFilterInfo.h: Streamlined code and removed some stuff that
1868         I think is unneeded on iOS; there is no unused private field and I suspect the problem
1869         that led to the warning is gone. Deleted friending of deleteOwnedPtr.
1870
1871         * rendering/RenderLayerMaskImageInfo.cpp: Removed unneeded includes. Moved private
1872         client classes in here from the header and made them members of MaskImageInfo.
1873         Streamlined them a bit in other ways.
1874         (WebCore::RenderLayer::MaskImageInfo::getIfExists): Use nullptr.
1875         (WebCore::RenderLayer::MaskImageInfo::MaskImageInfo): Use member initialization
1876         and also pass the layer in rather than the MaskImageInfo.
1877         (WebCore::RenderLayer::MaskImageInfo::notifyFinished): Deleted. Moved the code
1878         into the SVGDocumentClient.
1879         (WebCore::RenderLayer::MaskImageInfo::imageChanged): Deleted. Moved the code into
1880         the ImageClient.
1881         (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Streamlined a bit
1882         to use a for loop.
1883         (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Ditto.
1884
1885         * rendering/RenderLayerMaskImageInfo.h: Reduced unneeded includes. Got rid of
1886         definitions of private member classes here in the header; they can be in the cpp
1887         file instead. Also cut down from three classes to two, and gave the classes less
1888         redundant names since they are already members of MaskImageInfo. Removed some
1889         unneeded functions and friending of deleteOwnedPtr.
1890
1891         * testing/InternalSettings.cpp: Got rid of comment about RefCountedSupplement
1892         since no code anywhere was using it, so not using it here was not remarkable.
1893
1894 2015-04-23  Jer Noble  <jer.noble@apple.com>
1895
1896         [iOS] Add a wrapper around the hosted AVPlayerLayer to intercept -setBounds:
1897         https://bugs.webkit.org/show_bug.cgi?id=144129
1898
1899         Reviewed by Simon Fraser.
1900
1901         When passing the hosted AVPlayerLayer to the fullscreen controller, the new superlayer will
1902         resize the hosted layer with a call to -setBounds:. But because this is a hosted layer, the
1903         bonuds change has no effect. Instead, wrap the CALayerHost in another CALayer whose job it is
1904         to intercept -setBounds: in the same way that WebAVVideoLayer did. In fact, we should just use
1905         that wrapper class inside WebAVVideoLayer as well, to avoid duplicating code.
1906
1907         Drive-by Fix: Null-check m_videoElement in setVideoLayerFrame().
1908
1909         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1910         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1911         (-[WebCALayerHostWrapper setVideoSublayer:]):
1912         (-[WebCALayerHostWrapper videoSublayer]):
1913         (-[WebCALayerHostWrapper setBounds:]): Moved from WebAVVideoLayer.
1914         (-[WebCALayerHostWrapper resolveBounds]): Ditto.
1915         (-[WebAVVideoLayer setBounds:]): Moved to WebCALayerHostWrapper.
1916         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Create the wrapper.
1917         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Clear the wrapper.
1918         (-[WebAVVideoLayer resolveBounds]): Deleted. Moved to WebCALayerHostWrapper.
1919         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1920         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): Null-check m_videoElement.
1921
1922 2015-04-23  Tim Horton  <timothy_horton@apple.com>
1923
1924         Yellow highlight has gray background color when invoking Lookup on an address in a Google Maps drop down
1925         https://bugs.webkit.org/show_bug.cgi?id=138737
1926         <rdar://problem/18904429>
1927
1928         Reviewed by Simon Fraser.
1929
1930         * rendering/RenderReplaced.cpp:
1931         (WebCore::RenderReplaced::paint):
1932         Other RenderObjects don't paint box decorations in the selection painting phase,
1933         so RenderReplaced probably shouldn't either. This fixes the case where, when doing
1934         selection-only painting of a bit of text over top of a RenderReplaced, the RenderReplaced
1935         would paint its background, filling the previously transparent bitmap with an unwanted color.
1936
1937 2015-04-23  Roger Fong  <roger_fong@apple.com>
1938
1939         Update media timeline controls when video is paused..
1940         https://bugs.webkit.org/show_bug.cgi?id=144122.
1941         <rdar://problem/20422927>
1942
1943         Reviewed by Dean Jackson.
1944
1945         * Modules/mediacontrols/mediaControlsApple.js:
1946         (Controller.prototype.drawTimelineBackground): Use timelineWidth because offsetWidth is 0 when display: none.
1947         (Controller.prototype.setPlaying): Show controls when pausing.
1948         (Controller.prototype.showControls): Update time and timeline when unhiding controls.
1949
1950 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
1951
1952         Changing TiledBacking velocity should schedule a tile revalidation
1953         https://bugs.webkit.org/show_bug.cgi?id=144123
1954
1955         Reviewed by Tim Horton.
1956
1957         Changing the velocity parameters on the TileController affect the computed
1958         coverage rect, so whenever we make a change to velocity data that could
1959         affect the outcome (basically any non-zero old or new velocities),
1960         schedule a layer flush.
1961
1962         * platform/graphics/TiledBacking.h:
1963         (WebCore::VelocityData::velocityOrScaleIsChanging):
1964         * platform/graphics/ca/TileController.cpp:
1965         (WebCore::TileController::setVelocity):
1966
1967 2015-04-23  Jer Noble  <jer.noble@apple.com>
1968
1969         [Mac] Disable QTKit by default on future OS X.
1970         https://bugs.webkit.org/show_bug.cgi?id=144082
1971
1972         Reviewed by Darin Adler.
1973
1974         Settings::gQTKitEnabled defaults to false.
1975
1976         * page/Settings.cpp:
1977
1978 2015-04-23  Daniel Bates  <dabates@apple.com>
1979
1980         Clean up: Use references instead of pointers in more SVG files
1981         https://bugs.webkit.org/show_bug.cgi?id=144045
1982
1983         Reviewed by Darin Adler.
1984
1985         * rendering/svg/SVGRootInlineBox.cpp:
1986         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Pass reference instead of pointer.
1987
1988         * rendering/svg/SVGTextLayoutEngine.cpp:
1989         (WebCore::SVGTextLayoutEngine::recordTextFragment): Changed parameter textBox from pointer to reference.
1990         (WebCore::SVGTextLayoutEngine::layoutInlineTextBox): Ditto.
1991         (WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics): Changed parameter textBox from pointer to
1992         reference and made it const since this function does not modify textBox.
1993         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Changed parameters from pointers to references.
1994         Also, removed comma from comment so that it reads well.
1995         * rendering/svg/SVGTextLayoutEngine.h: Updated declarations for the above functions.
1996
1997         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
1998         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift): Changed parameter style from pointer to reference.
1999         Added case BS_LENGTH to switch block and removed default case so that the compiler checks that we handle all cases.
2000         Renamed parameter contextElement to context since the name of its data type conveys that it is an element.
2001         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift): Changed parameter textRenderer from
2002         pointer to reference and removed runtime assertion that textRenderer is non-null (since it well-formed reference
2003         cannot point to a non-existent object).
2004         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle): Changed parameter style from pointer to reference
2005         removed runtime assertion that style is non-null.
2006         * rendering/svg/SVGTextLayoutEngineBaseline.h: Updated declarations for the above functions.
2007
2008 2015-04-23  Commit Queue  <commit-queue@webkit.org>
2009
2010         Unreviewed, rolling out r183194.
2011         https://bugs.webkit.org/show_bug.cgi?id=144121
2012
2013         Made multiple tests flaky (Requested by ap_ on #webkit).
2014
2015         Reverted changeset:
2016
2017         "Memory cache live resources repeatedly purged during
2018         painting"
2019         https://bugs.webkit.org/show_bug.cgi?id=144104
2020         http://trac.webkit.org/changeset/183194
2021
2022 2015-04-23  Roger Fong  <roger_fong@apple.com>
2023
2024         Unreviewed. Missed a button in r182900.
2025
2026         * Modules/mediacontrols/mediaControlsApple.css:
2027         (audio::-webkit-media-controls-wireless-playback-picker-button:active):
2028
2029 2015-04-23  Roger Fong  <roger_fong@apple.com>
2030
2031         Unreviewed. Just shift some CSS around for code cleanup purposes.
2032
2033         * Modules/mediacontrols/mediaControlsApple.css:
2034         (video::-webkit-media-controls-panel):
2035         (video::-webkit-media-controls-panel:hover):
2036
2037 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2038
2039         [iOS] WebKit services should inherit environment variables for home
2040         https://bugs.webkit.org/show_bug.cgi?id=144078
2041         rdar://problem/20571678
2042
2043         Reviewed by Dan Bernstein.
2044
2045         Added an SPI header for a drive-by fix.
2046
2047         * WebCore.xcodeproj/project.pbxproj:
2048         * platform/spi/cf/CFBundleSPI.h: Added.
2049
2050 2015-04-23  Alex Christensen  <achristensen@webkit.org>
2051
2052         Use less memory when compiling content extensions.
2053         https://bugs.webkit.org/show_bug.cgi?id=144051
2054
2055         Reviewed by Darin Adler and Benjamin Poulain.
2056
2057         No change in functionality, correctness already covered by existing tests.
2058
2059         Before this patch, a DFANode contained a HashSet of transitions.
2060         Large vectors of DFANodes made many small HashSets, which was inefficient use of memory.
2061         We now put all the actions and transitions into one big compact Vector and each node owns ranges in that vector.
2062
2063         * contentextensions/CombinedURLFilters.cpp:
2064         (WebCore::ContentExtensions::recursiveMemoryUsed):
2065         (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
2066         * contentextensions/CombinedURLFilters.h:
2067         * contentextensions/ContentExtensionCompiler.cpp:
2068         (WebCore::ContentExtensions::compileRuleList):
2069         * contentextensions/ContentExtensionsDebugging.h:
2070         * contentextensions/DFA.cpp:
2071         (WebCore::ContentExtensions::DFA::memoryUsed):
2072         (WebCore::ContentExtensions::DFANode::actions):
2073         (WebCore::ContentExtensions::DFANode::transitions):
2074         (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
2075         (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
2076         (WebCore::ContentExtensions::DFANode::addFallbackTransition):
2077         (WebCore::ContentExtensions::DFANode::containsTransition):
2078         (WebCore::ContentExtensions::DFANode::kill):
2079         (WebCore::ContentExtensions::DFA::minimize):
2080         (WebCore::ContentExtensions::DFA::DFA): Deleted.
2081         (WebCore::ContentExtensions::DFA::operator=): Deleted.
2082         * contentextensions/DFA.h:
2083         * contentextensions/DFABytecodeCompiler.cpp:
2084         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2085         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2086         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2087         * contentextensions/DFABytecodeCompiler.h:
2088         * contentextensions/DFAMinimizer.cpp:
2089         (WebCore::ContentExtensions::DFAMinimizer::minimize):
2090         * contentextensions/DFAMinimizer.h:
2091         * contentextensions/DFANode.h:
2092         (WebCore::ContentExtensions::DFANode::isKilled):
2093         (WebCore::ContentExtensions::DFANode::hasFallbackTransition):
2094         (WebCore::ContentExtensions::DFANode::hasActions):
2095         (WebCore::ContentExtensions::DFANode::transitionsLength):
2096         (WebCore::ContentExtensions::DFANode::actionsLength):
2097         (WebCore::ContentExtensions::DFANode::actionsStart):
2098         (WebCore::ContentExtensions::DFANode::setActions):
2099         (WebCore::ContentExtensions::DFANode::setTransitions):
2100         (WebCore::ContentExtensions::DFANode::resetTransitions):
2101         (WebCore::ContentExtensions::DFANode::transitionsStart):
2102         (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA):
2103         * contentextensions/NFA.cpp:
2104         (WebCore::ContentExtensions::NFA::memoryUsed):
2105         * contentextensions/NFA.h:
2106         * contentextensions/NFAToDFA.cpp:
2107         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
2108         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
2109         (WebCore::ContentExtensions::getOrCreateDFANode):
2110         (WebCore::ContentExtensions::NFAToDFA::convert):
2111
2112 2015-04-23  David Hyatt  <hyatt@apple.com>
2113
2114         Don't fire a bunch of mouse moveds during scrolling.
2115         https://bugs.webkit.org/show_bug.cgi?id=99940
2116
2117         Reviewed by Simon Fraser.
2118
2119         * page/EventHandler.cpp:
2120         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
2121         Even for the short interval timer, make sure to cancel and restart it instead of allowing the original to
2122         complete. This has the effect of preventing fake mouse moves from firing until the scroll stops.
2123
2124 2015-04-23  Eric Carlson  <eric.carlson@apple.com>
2125
2126         Unreviewed, fix the release build.
2127
2128         * html/HTMLMediaSession.cpp:
2129         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Add an UNUSED_PARAM.
2130
2131 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2132
2133         Remove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer type instead
2134         https://bugs.webkit.org/show_bug.cgi?id=144108
2135
2136         Reviewed by Dean Jackson.
2137
2138         No need for the m_isPageTiledBackingLayer data member. We can just check the layer
2139         type instead.
2140
2141         * platform/graphics/ca/GraphicsLayerCA.cpp:
2142         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2143         (WebCore::GraphicsLayerCA::initialize):
2144         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
2145         (WebCore::GraphicsLayerCA::updateContentsScale):
2146         (WebCore::GraphicsLayerCA::getDebugBorderInfo):
2147         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2148         * platform/graphics/ca/GraphicsLayerCA.h:
2149         (WebCore::GraphicsLayerCA::isPageTiledBackingLayer):
2150
2151 2015-04-23  Brady Eidson  <beidson@apple.com>
2152
2153         Content extension with oft-repeated rules can cause slowdown.
2154         rdar://problem/20618511 and https://bugs.webkit.org/show_bug.cgi?id=144010
2155
2156         Reviewed by Alex Christensen.
2157
2158         No new tests (Behavior covered by existing tests).
2159
2160         * WebCore.xcodeproj/project.pbxproj:
2161
2162         * contentextensions/ContentExtension.cpp:
2163         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2164
2165         Add the String identifier for the extension and the rule action ID to Actions:
2166         * contentextensions/ContentExtensionRule.cpp:
2167         (WebCore::ContentExtensions::Action::deserialize):
2168         * contentextensions/ContentExtensionRule.h:
2169         (WebCore::ContentExtensions::Action::Action):
2170         (WebCore::ContentExtensions::Action::operator==):
2171         (WebCore::ContentExtensions::Action::setExtensionIdentifier):
2172         (WebCore::ContentExtensions::Action::extensionIdentifier):
2173         (WebCore::ContentExtensions::Action::actionID):
2174         (WebCore::ContentExtensions::Action::type): Deleted.
2175
2176         Object to manage a CSSStyleSheet and selectors identified by ID:
2177         * contentextensions/ContentExtensionStyleSheet.cpp:
2178         (WebCore::ContentExtensions::ContentExtensionStyleSheet::ContentExtensionStyleSheet):
2179         (WebCore::ContentExtensions::ContentExtensionStyleSheet::addDisplayNoneSelector):
2180         * contentextensions/ContentExtensionStyleSheet.h:
2181         (WebCore::ContentExtensions::ContentExtensionStyleSheet::create):
2182         (WebCore::ContentExtensions::ContentExtensionStyleSheet::styleSheet):
2183
2184         Instead of globbing selectors together into a String and making a new stylesheet,
2185         add new unique selectors to an already existing sheet:
2186         * contentextensions/ContentExtensionsBackend.cpp:
2187         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2188         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2189         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2190
2191         * dom/DocumentStyleSheetCollection.cpp:
2192         (WebCore::DocumentStyleSheetCollection::addDisplayNoneSelector):
2193         (WebCore::DocumentStyleSheetCollection::addContentExtensionUserSheet): Deleted.
2194         * dom/DocumentStyleSheetCollection.h:
2195
2196         * loader/DocumentLoader.cpp:
2197         (WebCore::DocumentLoader::commitData):
2198         (WebCore::DocumentLoader::addPendingContentExtensionDisplayNoneSelector):
2199         (WebCore::DocumentLoader::addPendingContentExtensionSheet): Deleted.
2200         * loader/DocumentLoader.h:
2201
2202 2015-04-23  Antti Koivisto  <antti@apple.com>
2203
2204         Memory cache live resources repeatedly purged during painting
2205         https://bugs.webkit.org/show_bug.cgi?id=144104
2206         <rdar://problem/20667695>
2207
2208         Reviewed by Chris Dumez.
2209
2210         On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
2211         This slows down page loads significantly.
2212
2213         This might have regressed because improvements in page caching keep more pages and so resources 'live'.
2214
2215         With this path we do all regular cache pruning asynchronously. If memory is really critical
2216         the low memory handling code will still prune synchronously.
2217
2218         * loader/cache/CachedResource.cpp:
2219         (WebCore::CachedResource::removeClient):
2220         (WebCore::CachedResource::didAccessDecodedData):
2221
2222             prune() -> pruneSoon()
2223
2224         * loader/cache/MemoryCache.cpp:
2225
2226             Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.
2227
2228         (WebCore::MemoryCache::needsPruning):
2229
2230             Factor into a function.
2231
2232         (WebCore::MemoryCache::prune):
2233         (WebCore::MemoryCache::pruneSoon):
2234
2235             Prune asynchronously.
2236
2237         * loader/cache/MemoryCache.h:
2238
2239 2015-04-23  Eric Carlson  <eric.carlson@apple.com>
2240
2241         Unreviewed, make a suggested change I overlooked in Darin's review of
2242         https://bugs.webkit.org/show_bug.cgi?id=144098
2243
2244         * dom/Document.cpp:
2245         (WebCore::Document::removePlaybackTargetPickerClient): const auto& -> auto
2246         (WebCore::Document::showPlaybackTargetPicker): Ditto.
2247         (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
2248         (WebCore::Document::playbackTargetAvailabilityDidChange): Ditto.
2249         (WebCore::Document::setPlaybackTarget): Ditto.
2250         (WebCore::Document::setShouldPlayToPlaybackTarget): Ditto.
2251
2252 2015-04-23  Joonghun Park  <jh718.park@samsung.com>
2253
2254         Use std::unique_ptr instead of OwnPtr in ThreadGlobalData
2255         https://bugs.webkit.org/show_bug.cgi?id=141950
2256
2257         Reviewed by Darin Adler.
2258
2259         No new tests, no behavior changes.
2260
2261         * dom/EventNames.h:
2262         (WebCore::EventNames::create):
2263         * loader/cache/CachedResourceRequestInitiators.h:
2264         * platform/ThreadGlobalData.cpp:
2265         (WebCore::ThreadGlobalData::ThreadGlobalData):
2266         (WebCore::ThreadGlobalData::destroy):
2267         * platform/ThreadGlobalData.h:
2268
2269 2015-04-23  Eric Carlson  <eric.carlson@apple.com>
2270
2271         Some media tests assert after r183096
2272         https://bugs.webkit.org/show_bug.cgi?id=144098
2273
2274         Reviewed by Darin Adler.
2275
2276         * dom/Document.cpp:
2277         (WebCore::Document::removePlaybackTargetPickerClient): Don't assert if the client has already
2278             been removed from the map. This happens when a media element is removed from the document
2279             before its destructor runs and is not an error.
2280         (WebCore::Document::showPlaybackTargetPicker): It is an error to call this after the client 
2281             has been removed from the map so leave the assert in a debug build, but return early
2282             so a release build doesn't crash.
2283         (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
2284         (WebCore::Document::playbackTargetAvailabilityDidChange): Use "auto" for the map iterator variable.
2285         (WebCore::Document::setPlaybackTarget): Ditto.
2286         (WebCore::Document::setShouldPlayToPlaybackTarget): Ditto.
2287         * dom/Document.h: Fix map typedef names.
2288
2289 2015-04-23  Andreas Kling  <akling@apple.com>
2290
2291         DOM nodes should be allocated with fastMalloc().
2292
2293         Unreviewed. This got lost in the TreeShared merge. :|
2294
2295         * dom/Node.h:
2296
2297 2015-04-23  Chris Dumez  <cdumez@apple.com>
2298
2299         [WK2] WebDiagnosticLoggingClient is leaking
2300         https://bugs.webkit.org/show_bug.cgi?id=144089
2301         <rdar://problem/19706214>
2302
2303         Reviewed by Darin Adler.
2304
2305         WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
2306         constructor but there is no code destroying it.
2307
2308         This patch adds a new xxxDestroyed() virtual function to
2309         DiagnosticLoggingClient and that is overriden in
2310         WebDiagnosticLoggingClient to call "delete this". This is the same
2311         pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
2312         WebProgressTrackerClient).
2313
2314         * loader/EmptyClients.h:
2315         * page/DiagnosticLoggingClient.h:
2316         * page/MainFrame.cpp:
2317         (WebCore::MainFrame::~MainFrame):
2318
2319 2015-04-22  Antti Koivisto  <antti@apple.com>
2320
2321         CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
2322         https://bugs.webkit.org/show_bug.cgi?id=144050
2323         rdar://problem/15534973
2324
2325         Reviewed by Chris Dumez.
2326
2327         We are seeing null Element pointer crashes with this stack:
2328
2329         47 com.apple.WebCore:  WebCore::toScriptElementIfPossible + 4 <==
2330         47 com.apple.WebCore:  WebCore::ScriptRunner::timerFired + 452
2331         47 com.apple.WebCore:  WebCore::ThreadTimers::sharedTimerFiredInternal + 175
2332
2333         The most likely cause seems to be that this code
2334
2335             ASSERT(m_pendingAsyncScripts.contains(scriptElement));
2336             m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));
2337
2338         in ScriptRunner::notifyScriptReady fails to find scriptElement and we are left with a null entry in
2339         m_scriptsToExecuteSoon. However I haven't managed to repro this or find the exact path how this
2340         could happen. The related code is fragile with lot of state (in ScriptElement class)
2341         and involves many opportunities for re-entry via scripts.
2342
2343         No repro, no test case.
2344
2345         * dom/ScriptRunner.cpp:
2346         (WebCore::ScriptRunner::timerFired):
2347
2348             Paper this over by adding a null check. We could check m_pendingAsyncScripts.take() above
2349             but this also covers possibility this is caused by something else.
2350
2351 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2352
2353         Use a typedef for TileGrid tile validation policy flags
2354         https://bugs.webkit.org/show_bug.cgi?id=144085
2355
2356         Reviewed by Tim Horton.
2357
2358         Replace 'unsigned' with a typedef for the bitmask of TileValidationPolicyFlags.
2359
2360         * platform/graphics/ca/TileController.cpp:
2361         (WebCore::TileController::tileRevalidationTimerFired):
2362         * platform/graphics/ca/TileGrid.cpp:
2363         (WebCore::TileGrid::revalidateTiles):
2364         * platform/graphics/ca/TileGrid.h:
2365
2366 2015-04-23  Andreas Kling  <akling@apple.com>
2367
2368         Slap Node's reference counting functions with ALWAYS_INLINE stick.
2369
2370         Speculative fix for weird ~3% regression on Speedometer seen after TreeShared
2371         was merged into Node. Since the memory layout didn't change, failure to inline
2372         seems like a possible source of regression.
2373
2374         * dom/Node.h:
2375         (WebCore::Node::ref):
2376         (WebCore::Node::deref):
2377         (WebCore::Node::hasOneRef):
2378         (WebCore::Node::refCount):
2379
2380 2015-04-22  Simon Fraser  <simon.fraser@apple.com>
2381
2382         [iOS] Move computeCoverageRect code from FrameView into TileController
2383         https://bugs.webkit.org/show_bug.cgi?id=144087
2384
2385         Reviewed by Benjamin Poulain.
2386         
2387         There is code in four different places that adjusts tiling coverage rect:
2388         1. LegacyTileCache. This will remain unchanged.
2389         2. FrameView::computeTileCoverageRect(). This was added to do velocity-based
2390         page tiled coverage expansion for iOS WK2.
2391         3. TileController::computeTileCoverageRect(): this is used for the page tiles
2392         on Mac.
2393         4. GraphicsLayerCA::adjustTiledLayerVisibleRect(). This is used by non-page
2394         tiled layers on both iOS and Mac.
2395         
2396         This patch reduced this list to 3, coalescing FrameView::computeTileCoverageRect()
2397         and TileController::computeTileCoverageRect(). It removes the rect inflation that
2398         affects the visibleRect passed into rootLayer->flushCompositingState() for iOS,
2399         but the page tiles now do an identical coverage inflation. The visible rect
2400         change does affect visible rect computations for non-page tiled backings, but
2401         a future patch will restore that.
2402
2403         * page/FrameView.cpp:
2404         (WebCore::FrameView::setScrollVelocity):
2405         (WebCore::FrameView::computeCoverageRect): Deleted.
2406         * page/FrameView.h:
2407         * platform/graphics/TiledBacking.h:
2408         (WebCore::VelocityData::VelocityData):
2409         * platform/graphics/ca/TileController.cpp:
2410         (WebCore::TileController::setVelocity):
2411         (WebCore::TileController::computeTileCoverageRect):
2412         * platform/graphics/ca/TileController.h:
2413         * rendering/RenderLayerCompositor.cpp:
2414         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2415
2416 2015-04-22  Darin Adler  <darin@apple.com>
2417
2418         Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
2419         https://bugs.webkit.org/show_bug.cgi?id=143943
2420
2421         Reviewed by Anders Carlsson.
2422
2423         * editing/Editor.cpp:
2424         (WebCore::Editor::insertDictationPhrases): Changed this iOS-only
2425         function to take a Vector<Vector<String>>&& and not involve PassOwnPtr.
2426         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed this iOS-only
2427         function to take a Vector<Vector<String>> and not involve PassOwnPtr. Also made
2428         it take a reference rather than a pointer to the element and simplify the code
2429         a bit using modern for loops and auto.
2430         * editing/Editor.h: Ditto.
2431
2432         * editing/ios/DictationCommandIOS.cpp:
2433         (WebCore::DictationCommandIOS::DictationCommandIOS): Take
2434         a Vector<Vector<String>>&& instead of a PassOwnPtr.
2435         (WebCore::DictationCommandIOS::~DictationCommandIOS): Deleted. No need to
2436         explicitly define this.
2437         (WebCore::DictationCommandIOS::doApply): Updated to use modern for loop and
2438         work with a Vector<Vector<String>> instead of an OwnPtr.
2439         * editing/ios/DictationCommandIOS.h: Updated to not use PassOwnPtr and OwnPtr.
2440         Also modernized a bit by using override.
2441
2442         * platform/network/ios/QuickLook.h: Return an NSURLRequest * instead of a
2443         PassOwnPtr<ResourceRequest> from this iOS-specific function.
2444         * platform/network/ios/QuickLook.mm:
2445         (WebCore::registerQLPreviewConverterIfNeeded): Ditto.
2446
2447 2015-04-22  Jinwoo Song  <jinwoo7.song@samsung.com>
2448
2449         Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
2450         https://bugs.webkit.org/show_bug.cgi?id=144033
2451
2452         Reviewed by Darin Adler.
2453
2454         Use unique_ptr for creating a copy of cairo_path_t and use lambda function
2455         for custom deleter, cairo_path_destroy().
2456
2457         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2458         (WebCore::drawPathShadow): Use std::unique_ptr instead of OwnPtr.
2459         (WebCore::GraphicsContext::clip): Call cairo_path_destroy() immediately.
2460         * platform/graphics/cairo/OwnPtrCairo.cpp:
2461         (WTF::deleteOwnedPtr<cairo_path_t>): Deleted. Remove unnecessary deleter anymore.
2462         * platform/graphics/cairo/OwnPtrCairo.h: Ditto.
2463
2464 2015-04-22  Darin Adler  <darin@apple.com>
2465
2466         Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
2467         https://bugs.webkit.org/show_bug.cgi?id=143949
2468
2469         Reviewed by Andreas Kling.
2470
2471         * dom/ContainerNode.h: Removed unneeded includes and forward declarations.
2472         * dom/Document.h: Ditto.
2473
2474         * dom/DocumentParser.h: Fixed comment to not mention PassOwnPtr.
2475
2476         * html/shadow/MediaControlElements.cpp:
2477         (WebCore::MediaControlTextTrackContainerElement::create): Return a Ref instead of a PassRefPtr.
2478         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Pass a reference
2479         rather than a pointer to TextTrackRepresentation::create.
2480         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Return a
2481         RefPtr instead of a PassRefPtr.
2482
2483         * html/shadow/MediaControlElements.h: Use unique_ptr for m_textTrackRepresentation.
2484         Also fix a couple uses of PassRefPtr.
2485
2486         * loader/DocumentLoader.cpp:
2487         (WebCore::DocumentLoader::DocumentLoader): Use make_unique.
2488         (WebCore::DocumentLoader::addAllArchiveResources): Ditto.
2489         (WebCore::DocumentLoader::addArchiveResource): Ditto.
2490         (WebCore::DocumentLoader::clearArchiveResources): Set to nullptr instead of calling clear.
2491         (WebCore::DocumentLoader::startLoadingMainResource): Use make_unique.
2492         * loader/DocumentLoader.h: Made m_archiveResourceCollection and
2493         m_applicationCacheHost use unique_ptr.
2494
2495         * loader/WorkerThreadableLoader.cpp:
2496         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Use delete here instead
2497         of using OwnPtr to do the deletion. Matches the other code nearby.
2498
2499         * loader/appcache/ApplicationCacheGroup.cpp:
2500         (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Handle case where the host is
2501         null; this happens during the DocumentLoader destruction process since unique_ptr sets itself
2502         to null before it destroys the object it points to and OwnPtr does not.
2503
2504         * loader/cocoa/DiskCacheMonitorCocoa.mm:
2505         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Use delete instead of adoptPtr
2506         to delete a raw pointer.
2507         (WebCore::DiskCacheMonitor::DiskCacheMonitor): Use unique_ptr instead of OwnPtr.
2508
2509         * page/DragController.h: Removed some unneeded forward declarations and changed the
2510         create function to return unique_ptr.
2511
2512         * platform/LayoutUnit.h: Removed wtf_ceil workaround hack here. Not sure why we ever did it
2513         this way!
2514
2515         * platform/graphics/FontCascade.cpp:
2516         (WTF::deleteOwnedPtr<WebCore::TextLayout>): Deleted.
2517         (WebCore::FontCascade::createLayout): Changed to return a unique_ptr.
2518         (WebCore::FontCascade::deleteLayout): Deleted.
2519         * platform/graphics/FontCascade.h: Made the above changes.
2520
2521         * platform/graphics/ImageBuffer.h: Changed copyImage to return a RefPtr instead of a PassRefPtr.
2522
2523         * platform/graphics/TextTrackRepresentation.cpp:
2524         (WebCore::TextTrackRepresentation::create): Use make_unique and return a unique_ptr.
2525         * platform/graphics/TextTrackRepresentation.h: Removed unneeded includes and forward declarations
2526         and made create return a unique_ptr.
2527         * platform/graphics/cairo/ImageBufferCairo.cpp:
2528         (WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.
2529         * platform/graphics/cg/ImageBufferCG.cpp:
2530         (WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.
2531
2532         * platform/graphics/ios/TextTrackRepresentationIOS.h: Use reference instead of pointer,
2533         made more things private.
2534         * platform/graphics/ios/TextTrackRepresentationIOS.mm:
2535         (TextTrackRepresentation::create): Use make_unique.
2536         (TextTrackRepresentationIOS::TextTrackRepresentationIOS): Take a reference.
2537
2538         * platform/graphics/mac/ComplexTextController.cpp:
2539         (WebCore::FontCascade::createLayout): Return a unique_ptr with a custom destruction function.
2540         The custom destruction function eliminates the need to put TextLayout in a visible header.
2541         (WebCore::FontCascade::deleteLayout): Deleted. Use a lambda instead.
2542         (WebCore::roundCGFloat): Deleted. Old fashioned way to deal with multiple floating point sizes.
2543         Just use std::round instead.
2544         (WebCore::ceilCGFloat): Deleted. Same as above. Just use std::ceil instead.
2545         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Use std::round and std::ceil.
2546
2547         * rendering/RenderBlockLineLayout.cpp:
2548         (WebCore::RenderTextInfo::RenderTextInfo): Deleted. Can compile constructor and destructor
2549         now thanks to use of unique_ptr with a custom deleter.
2550         (WebCore::RenderTextInfo::~RenderTextInfo): Deleted. Ditto.
2551         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Updated for RenderTextInfo data member
2552         name change.
2553
2554         * rendering/RenderView.h: Removed unneeded include.
2555
2556         * rendering/line/BreakingContext.h: Removed unneeded include.
2557         (WebCore::BreakingContext::handleOutOfFlowPositioned): Updated for RenderTextInfo data member
2558         name change.
2559         (WebCore::BreakingContext::handleFloat): Ditto.
2560         (WebCore::BreakingContext::handleReplaced): Ditto.
2561         (WebCore::BreakingContext::handleText): Ditto.
2562         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Ditto.
2563
2564         * rendering/line/LineBreaker.h: Made the RenderTextInfo struct more like a struct by taking
2565         off all the m_ prefixes from the data member names. Initialized all the values in the struct
2566         to defaults so we don't need an explicit constructor. We also don't need an explicit destructor
2567         any more due to use of a unique_ptr with a deleter.
2568
2569 2015-04-22  Roger Fong  <roger_fong@apple.com>
2570
2571         Volume slider appears/doesn't appear at the wrong times.
2572         https://bugs.webkit.org/show_bug.cgi?id=144072.
2573         <rdar://problem/20576145>
2574
2575         Reviewed by Dean Jackson.
2576
2577         Set background divs to match volume box dimensions.
2578         * Modules/mediacontrols/mediaControlsApple.css:
2579         (audio::-webkit-media-controls-volume-slider-container-background):
2580         (audio::-webkit-media-controls-volume-slider-container-tint):
2581
2582         Draw the volume slider immediately on mousing over the mute box.
2583         * Modules/mediacontrols/mediaControlsApple.js:
2584         (Controller.prototype.createControls):
2585         (Controller.prototype.handleMuteBoxOver):
2586
2587 2015-04-22  Jer Noble  <jer.noble@apple.com>
2588
2589         [Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
2590         https://bugs.webkit.org/show_bug.cgi?id=144023
2591
2592         Reviewed by Darin Adler.
2593
2594         Partially revert r183097 (as it was not sufficient to protect against re-entrancy). Instead,
2595         protect against re-entrancy in provideMediaData() directly by removing the first sample
2596         from the TrackBuffer's decodeQueue at a time. If provideMediaData() is called re-entrantly,
2597         or if any other method which modifies the decodeQueue is called from inside
2598         provideMediaData, no iterators will be invalidated.
2599
2600         * Modules/mediasource/SourceBuffer.cpp:
2601         (WebCore::SourceBuffer::provideMediaData):
2602         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2603         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
2604
2605 2015-04-22  Zalan Bujtas  <zalan@apple.com>
2606
2607         Create RenderRubyText for <rt> only when the parent renderer is a RenderRuby.
2608         https://bugs.webkit.org/show_bug.cgi?id=144035
2609         rdar://problem/20604467
2610
2611         Reviewed by Darin Adler.
2612
2613         This patch extends HTMLElement::createElementRenderer()
2614         with the render tree insertion point so that we can create different type
2615         of renderers based on the render tree context.
2616
2617         Test: fast/ruby/ruby-rt-with-region-crash.html
2618
2619         * CMakeLists.txt:
2620         * Modules/plugins/PluginReplacement.h:
2621         * Modules/plugins/QuickTimePluginReplacement.h:
2622         * Modules/plugins/QuickTimePluginReplacement.mm:
2623         (WebCore::QuickTimePluginReplacement::createElementRenderer):
2624         * Modules/plugins/YouTubePluginReplacement.cpp:
2625         (WebCore::YouTubePluginReplacement::createElementRenderer):
2626         * Modules/plugins/YouTubePluginReplacement.h:
2627         * WebCore.vcxproj/WebCore.vcxproj:
2628         * WebCore.vcxproj/WebCore.vcxproj.filters:
2629         * WebCore.xcodeproj/project.pbxproj:
2630         * dom/Element.cpp:
2631         (WebCore::Element::createElementRenderer):
2632         * dom/Element.h:
2633         * html/HTMLAppletElement.cpp:
2634         (WebCore::HTMLAppletElement::createElementRenderer):
2635         * html/HTMLAppletElement.h:
2636         * html/HTMLAttachmentElement.cpp:
2637         (WebCore::HTMLAttachmentElement::createElementRenderer):
2638         * html/HTMLAttachmentElement.h:
2639         * html/HTMLBRElement.cpp:
2640         (WebCore::HTMLBRElement::createElementRenderer):
2641         * html/HTMLBRElement.h:
2642         * html/HTMLButtonElement.cpp:
2643         (WebCore::HTMLButtonElement::createElementRenderer):
2644         * html/HTMLButtonElement.h:
2645         * html/HTMLCanvasElement.cpp:
2646         (WebCore::HTMLCanvasElement::createElementRenderer):
2647         * html/HTMLCanvasElement.h:
2648         * html/HTMLDetailsElement.cpp:
2649         (WebCore::HTMLDetailsElement::createElementRenderer):
2650         * html/HTMLDetailsElement.h:
2651         * html/HTMLElement.cpp:
2652         (WebCore::HTMLElement::createElementRenderer):
2653         * html/HTMLElement.h:
2654         * html/HTMLFieldSetElement.cpp:
2655         (WebCore::HTMLFieldSetElement::createElementRenderer):
2656         * html/HTMLFieldSetElement.h:
2657         * html/HTMLFrameElement.cpp:
2658         (WebCore::HTMLFrameElement::createElementRenderer):
2659         * html/HTMLFrameElement.h:
2660         * html/HTMLFrameSetElement.cpp:
2661         (WebCore::HTMLFrameSetElement::createElementRenderer):
2662         * html/HTMLFrameSetElement.h:
2663         * html/HTMLIFrameElement.cpp:
2664         (WebCore::HTMLIFrameElement::createElementRenderer):
2665         * html/HTMLIFrameElement.h:
2666         * html/HTMLImageElement.cpp:
2667         (WebCore::HTMLImageElement::createElementRenderer):
2668         * html/HTMLImageElement.h:
2669         * html/HTMLInputElement.cpp:
2670         (WebCore::HTMLInputElement::createElementRenderer):
2671         * html/HTMLInputElement.h:
2672         * html/HTMLMediaElement.cpp:
2673         (WebCore::HTMLMediaElement::parseAttribute):
2674         * html/HTMLMediaElement.h:
2675         * html/HTMLMeterElement.cpp:
2676         (WebCore::HTMLMeterElement::createElementRenderer):
2677         * html/HTMLMeterElement.h:
2678         * html/HTMLPlugInElement.cpp:
2679         (WebCore::HTMLPlugInElement::createElementRenderer):
2680         * html/HTMLPlugInElement.h:
2681         * html/HTMLPlugInImageElement.cpp:
2682         (WebCore::HTMLPlugInImageElement::createElementRenderer):
2683         * html/HTMLPlugInImageElement.h:
2684         * html/HTMLProgressElement.cpp:
2685         (WebCore::HTMLProgressElement::createElementRenderer):
2686         * html/HTMLProgressElement.h:
2687         * html/HTMLSelectElement.cpp:
2688         (WebCore::HTMLSelectElement::createElementRenderer):
2689         * html/HTMLSelectElement.h:
2690         * html/HTMLSummaryElement.cpp:
2691         (WebCore::HTMLSummaryElement::createElementRenderer):
2692         * html/HTMLSummaryElement.h:
2693         * html/HTMLTextAreaElement.cpp:
2694         (WebCore::HTMLTextAreaElement::createElementRenderer):
2695         * html/HTMLTextAreaElement.h:
2696         * html/HTMLVideoElement.cpp:
2697         (WebCore::HTMLVideoElement::createElementRenderer):
2698         * html/HTMLVideoElement.h:
2699         * html/HTMLWBRElement.cpp:
2700         (WebCore::HTMLWBRElement::createElementRenderer):
2701         * html/HTMLWBRElement.h:
2702         * html/RubyElement.cpp:
2703         (WebCore::RubyElement::createElementRenderer):
2704         * html/RubyElement.h:
2705         * html/RubyTextElement.cpp:
2706         (WebCore::RubyTextElement::createElementRenderer):
2707         * html/RubyTextElement.h:
2708         * html/shadow/DetailsMarkerControl.cpp:
2709         (WebCore::DetailsMarkerControl::createElementRenderer):
2710         * html/shadow/DetailsMarkerControl.h:
2711         * html/shadow/MediaControlElements.cpp:
2712         (WebCore::MediaControlTimelineContainerElement::createElementRenderer):
2713         (WebCore::MediaControlVolumeSliderContainerElement::createElementRenderer):
2714         (WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
2715         * html/shadow/MediaControlElements.h:
2716         * html/shadow/MeterShadowElement.cpp:
2717         (WebCore::MeterInnerElement::createElementRenderer):
2718         * html/shadow/MeterShadowElement.h:
2719         * html/shadow/ProgressShadowElement.cpp:
2720         (WebCore::ProgressInnerElement::createElementRenderer):
2721         * html/shadow/ProgressShadowElement.h:
2722         * html/shadow/SliderThumbElement.cpp:
2723         (WebCore::SliderThumbElement::createElementRenderer):
2724         (WebCore::SliderContainerElement::createElementRenderer):
2725         * html/shadow/SliderThumbElement.h:
2726         * html/shadow/TextControlInnerElements.cpp:
2727         (WebCore::TextControlInnerContainer::createElementRenderer):
2728         (WebCore::TextControlInnerTextElement::createElementRenderer):
2729         * html/shadow/TextControlInnerElements.h:
2730         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2731         (WebCore::ImageControlsButtonElementMac::createElementRenderer):
2732         * html/shadow/mac/ImageControlsButtonElementMac.h:
2733         * html/shadow/mac/ImageControlsRootElementMac.cpp:
2734         (WebCore::ImageControlsRootElementMac::createElementRenderer):
2735         * html/shadow/mac/ImageControlsRootElementMac.h:
2736         * html/track/VTTCue.cpp:
2737         (WebCore::VTTCueBox::createElementRenderer):
2738         * html/track/VTTCue.h:
2739         * mathml/MathMLInlineContainerElement.cpp:
2740         (WebCore::MathMLInlineContainerElement::createElementRenderer):
2741         * mathml/MathMLInlineContainerElement.h:
2742         * mathml/MathMLMathElement.cpp:
2743         (WebCore::MathMLMathElement::createElementRenderer):
2744         * mathml/MathMLMathElement.h:
2745         * mathml/MathMLMencloseElement.cpp:
2746         (WebCore::MathMLMencloseElement::createElementRenderer):
2747         * mathml/MathMLMencloseElement.h:
2748         * mathml/MathMLSelectElement.cpp:
2749         (WebCore::MathMLSelectElement::createElementRenderer):
2750         * mathml/MathMLSelectElement.h:
2751         * mathml/MathMLTextElement.cpp:
2752         (WebCore::MathMLTextElement::createElementRenderer):
2753         * mathml/MathMLTextElement.h:
2754         * rendering/RenderBlock.cpp:
2755         (WebCore::RenderBlock::clone):
2756         * rendering/RenderElement.cpp:
2757         * rendering/RenderRuby.h:
2758         (WebCore::isRuby):
2759         * style/RenderTreePosition.cpp: Added.
2760         (WebCore::RenderTreePosition::computeNextSibling):
2761         (WebCore::RenderTreePosition::invalidateNextSibling):
2762         (WebCore::RenderTreePosition::previousSiblingRenderer):
2763         (WebCore::RenderTreePosition::nextSiblingRenderer):
2764         (WebCore::RenderTreePosition::isRendererReparented):
2765         * style/RenderTreePosition.h: Added.
2766         (WebCore::RenderTreePosition::RenderTreePosition):
2767         (WebCore::RenderTreePosition::parent):
2768         (WebCore::RenderTreePosition::canInsert):
2769         (WebCore::RenderTreePosition::insert):
2770         * style/StyleResolveTree.cpp:
2771         (WebCore::Style::createRendererIfNeeded):
2772         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2773         (WebCore::Style::textRendererIsNeeded):
2774         (WebCore::Style::RenderTreePosition::parent): Deleted.
2775         (WebCore::Style::isRendererReparented): Deleted.
2776         (WebCore::Style::nextSiblingRenderer): Deleted.
2777         (WebCore::Style::RenderTreePosition::RenderTreePosition): Deleted.
2778         (WebCore::Style::RenderTreePosition::canInsert): Deleted.
2779         (WebCore::Style::RenderTreePosition::insert): Deleted.
2780         (WebCore::Style::RenderTreePosition::computeNextSibling): Deleted.
2781         (WebCore::Style::RenderTreePosition::invalidateNextSibling): Deleted.
2782         (WebCore::Style::previousSiblingRenderer): Deleted.
2783         * svg/SVGAElement.cpp:
2784         (WebCore::SVGAElement::createElementRenderer):
2785         * svg/SVGAElement.h:
2786         * svg/SVGAltGlyphElement.cpp:
2787         (WebCore::SVGAltGlyphElement::createElementRenderer):
2788         * svg/SVGAltGlyphElement.h:
2789         * svg/SVGCircleElement.cpp:
2790         (WebCore::SVGCircleElement::createElementRenderer):
2791         * svg/SVGCircleElement.h:
2792         * svg/SVGClipPathElement.cpp:
2793         (WebCore::SVGClipPathElement::createElementRenderer):
2794         * svg/SVGClipPathElement.h:
2795         * svg/SVGDefsElement.cpp:
2796         (WebCore::SVGDefsElement::createElementRenderer):
2797         * svg/SVGDefsElement.h:
2798         * svg/SVGEllipseElement.cpp:
2799         (WebCore::SVGEllipseElement::createElementRenderer):
2800         * svg/SVGEllipseElement.h:
2801         * svg/SVGFilterElement.cpp:
2802         (WebCore::SVGFilterElement::createElementRenderer):
2803         * svg/SVGFilterElement.h:
2804         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2805         (WebCore::SVGFilterPrimitiveStandardAttributes::createElementRenderer):
2806         * svg/SVGFilterPrimitiveStandardAttributes.h:
2807         * svg/SVGForeignObjectElement.cpp:
2808         (WebCore::SVGForeignObjectElement::createElementRenderer):
2809         * svg/SVGForeignObjectElement.h:
2810         * svg/SVGGElement.cpp:
2811         (WebCore::SVGGElement::createElementRenderer):
2812         * svg/SVGGElement.h:
2813         * svg/SVGGraphicsElement.cpp:
2814         (WebCore::SVGGraphicsElement::createElementRenderer):
2815         * svg/SVGGraphicsElement.h:
2816         * svg/SVGImageElement.cpp:
2817         (WebCore::SVGImageElement::createElementRenderer):
2818         * svg/SVGImageElement.h:
2819         * svg/SVGLinearGradientElement.cpp:
2820         (WebCore::SVGLinearGradientElement::createElementRenderer):
2821         * svg/SVGLinearGradientElement.h:
2822         * svg/SVGMarkerElement.cpp:
2823         (WebCore::SVGMarkerElement::createElementRenderer):
2824         * svg/SVGMarkerElement.h:
2825         * svg/SVGMaskElement.cpp:
2826         (WebCore::SVGMaskElement::createElementRenderer):
2827         * svg/SVGMaskElement.h:
2828         * svg/SVGPathElement.cpp:
2829         (WebCore::SVGPathElement::createElementRenderer):
2830         * svg/SVGPathElement.h:
2831         * svg/SVGPatternElement.cpp:
2832         (WebCore::SVGPatternElement::createElementRenderer):
2833         * svg/SVGPatternElement.h:
2834         * svg/SVGRadialGradientElement.cpp:
2835         (WebCore::SVGRadialGradientElement::createElementRenderer):
2836         * svg/SVGRadialGradientElement.h:
2837         * svg/SVGRectElement.cpp:
2838         (WebCore::SVGRectElement::createElementRenderer):
2839         * svg/SVGRectElement.h:
2840         * svg/SVGSVGElement.cpp:
2841         (WebCore::SVGSVGElement::createElementRenderer):
2842         * svg/SVGSVGElement.h:
2843         * svg/SVGStopElement.cpp:
2844         (WebCore::SVGStopElement::createElementRenderer):
2845         * svg/SVGStopElement.h:
2846         * svg/SVGSwitchElement.cpp:
2847         (WebCore::SVGSwitchElement::createElementRenderer):
2848         * svg/SVGSwitchElement.h:
2849         * svg/SVGSymbolElement.cpp:
2850         (WebCore::SVGSymbolElement::createElementRenderer):
2851         * svg/SVGSymbolElement.h:
2852         * svg/SVGTRefElement.cpp:
2853         (WebCore::SVGTRefElement::createElementRenderer):
2854         * svg/SVGTRefElement.h:
2855         * svg/SVGTSpanElement.cpp:
2856         (WebCore::SVGTSpanElement::createElementRenderer):
2857         * svg/SVGTSpanElement.h:
2858         * svg/SVGTextElement.cpp:
2859         (WebCore::SVGTextElement::createElementRenderer):
2860         * svg/SVGTextElement.h:
2861         * svg/SVGTextPathElement.cpp:
2862         (WebCore::SVGTextPathElement::createElementRenderer):
2863         * svg/SVGTextPathElement.h:
2864         * svg/SVGUseElement.cpp:
2865         (WebCore::SVGUseElement::createElementRenderer):
2866         * svg/SVGUseElement.h:
2867
2868 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2869
2870         VisibleSelection should only accept Range by reference
2871         https://bugs.webkit.org/show_bug.cgi?id=144047
2872
2873         Reviewed by Tim Horton.
2874
2875         Update VisibleSelection to expect a Range reference argument, rather than a
2876         Range*. Also update all uses of VisibleSelection to pass a reference instead
2877         of a pointer.
2878
2879         No change in behavior, so new tests.
2880
2881         * editing/Editor.cpp:
2882         (WebCore::Editor::selectionForCommand):
2883         (WebCore::Editor::advanceToNextMisspelling):
2884         (WebCore::Editor::markMisspellingsAfterTypingToWord):
2885         (WebCore::Editor::markAndReplaceFor):
2886         (WebCore::Editor::transpose):
2887         (WebCore::Editor::findString):
2888         (WebCore::Editor::rangeOfString):
2889         * editing/FrameSelection.cpp:
2890         (WebCore::FrameSelection::setSelectedRange):
2891         * editing/SpellingCorrectionCommand.cpp:
2892         (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
2893         * editing/VisibleSelection.cpp:
2894         (WebCore::VisibleSelection::VisibleSelection):
2895         * editing/VisibleSelection.h:
2896         * editing/mac/EditorMac.mm:
2897         (WebCore::Editor::replaceNodeFromPasteboard):
2898         * page/DragController.cpp:
2899         (WebCore::selectElement):
2900         * page/TextIndicator.cpp:
2901         (WebCore::TextIndicator::createWithRange):
2902         * page/mac/EventHandlerMac.mm:
2903         (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
2904         * rendering/SelectionSubtreeRoot.cpp:
2905         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
2906
2907 2015-04-22  Roger Fong  <roger_fong@apple.com>
2908
2909         Audio controls should render with a black background.
2910         https://bugs.webkit.org/show_bug.cgi?id=144074.
2911         <rdar://problem/20596939>
2912
2913         Reviewed by Darin Adler.
2914
2915         * Modules/mediacontrols/mediaControlsApple.css:
2916         (audio::-webkit-media-controls-panel-background-container):
2917         (audio::-webkit-media-controls-panel .volume-box):
2918
2919 2015-04-22  Roger Fong  <roger_fong@apple.com>
2920
2921         Inline media control icons scale down when video is too small.
2922         https://bugs.webkit.org/show_bug.cgi?id=144073.
2923         <rdar://problem/20659451>
2924
2925         Reviewed by Darin Adler.
2926
2927         Just make sure the buttons use min-width.
2928         * Modules/mediacontrols/mediaControlsApple.css:
2929         (audio::-webkit-media-controls-rewind-button):
2930         (audio::-webkit-media-controls-play-button):
2931         (audio::-webkit-media-controls-panel .mute-box):
2932         (video::-webkit-media-controls-volume-max-button):
2933         (audio::-webkit-media-controls-wireless-playback-picker-button):
2934         (audio::-webkit-media-controls-toggle-closed-captions-button):
2935         (audio::-webkit-media-controls-fullscreen-button):
2936
2937 2015-04-22  Jer Noble  <jer.noble@apple.com>
2938
2939         Add new optimized fullscreen delegate methods
2940         https://bugs.webkit.org/show_bug.cgi?id=144071
2941
2942         Reviewed by Eric Carlson.
2943
2944         AVPlayerViewController requires three new delegate methods to be implemented by WebKit which
2945         notify the delegates exactly when the owning view will enter and leave fullscreen mode. One
2946         of the delegate methods (-enterOptimizedFullScreenModeRedirectingVideoToLayer:) gives the
2947         delegate an opportunity to move the video sublayer into a new CALayer. The matching delegate
2948         (-leaveOptimizedFullScreenMode), allows us to return our sublayer back to its original parent.
2949         The third delegate (-isOptimizedFullscreenPossible) is required so the AVPlayerViewController
2950         knows whether to allow a standard -> optimized fullscreen transition.
2951
2952         Drive-by fix: initialize ivars at declaration time.
2953
2954         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2955         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2956         (-[WebAVPlayerController isOptimizedFullscreenPossible]):
2957         (-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]):
2958         (-[WebAVVideoLayer leaveOptimizedFullScreenMode]):
2959         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
2960         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
2961         (+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): Deleted.
2962
2963 2015-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
2964
2965         [iOS] Caret does not line up with text when using the system font
2966         https://bugs.webkit.org/show_bug.cgi?id=144076
2967         <rdar://problem/20578301>
2968
2969         Reviewed by Enrica Casucci.
2970
2971         Determining caret locations often uses the complex text codepath, which means
2972         the complex text codepath must know about custom tracking.
2973
2974         This regression is due to r182512.
2975
2976         Note that this patch is a short-term solution until I can solve the bigger issue of
2977         having two CTFontRefs and using each in their proper place.
2978
2979         No new tests because there is no way to robustly test the system font.
2980
2981         * platform/graphics/Font.h:
2982         (WebCore::Font::hasCustomTracking):
2983         * platform/graphics/cocoa/FontCocoa.mm:
2984         (WebCore::canUseFastGlyphAdvanceGetter):
2985         (WebCore::Font::platformWidthForGlyph):
2986         (WebCore::hasCustomTracking): Deleted.
2987         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2988         (WebCore::Font::getCFStringAttributes):
2989
2990 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2991
2992         Context menu doesn't account for selection semantics
2993         https://bugs.webkit.org/show_bug.cgi?id=143958
2994         <rdar://problem/19735706>
2995
2996         Reviewed by Tim Horton.
2997
2998         Before using the default word-only selection for context menus, check with the
2999         lookup service to see if we can get a semantically appropriate selection.
3000
3001         * editing/EditingBehavior.h:
3002         (WebCore::EditingBehavior::shouldSelectBasedOnDictionaryLookup): Added, so that we can
3003         behavior correctly when using non-Mac editing behavior.
3004         * editing/mac/DictionaryLookup.mm:
3005         (WebCore::rangeForDictionaryLookupAtHitTestResult): Modified to honor standard WebKit
3006         behavior when hit testing at end-of-line/end-of-paragraph, etc.
3007         * page/EventHandler.cpp:
3008         (WebCore::EventHandler::shouldAppendTrailingWhitespace): New helper function to share code.
3009         (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup): Added.
3010         (WebCore::EventHandler::selectClosestContextualWordFromMouseEvent): Added.
3011         (WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Renamed from selectClosestWordOrLinkFromMouseEvent.
3012         Have this call the new 'selectClosestContextualWordFromMouseEvent' instead of the vanilla 'selectClosestWordFromMouseEvent'.
3013         * page/EventHandler.h:
3014         * page/mac/EventHandlerMac.mm:
3015         (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup): Added.
3016
3017 2015-04-21  Brent Fulgham  <bfulgham@apple.com>
3018
3019         [Mac] Extend action menus to support PDF
3020         https://bugs.webkit.org/show_bug.cgi?id=143895
3021         <rdar://problem/19003333>
3022
3023         Reviewed by Tim Horton.
3024
3025         Tested by TestWebKitAPI ActionMenus.mm.
3026
3027         Add a new dictionary lookup method to support PDF Selections. This code replicates the
3028         DOM Range-based logic used for HTML documents, but does so using the PDFKit API and
3029         its support types.
3030
3031         * Configurations/Base.xcconfig: Add PDFKit include path for build.
3032         * editing/mac/DictionaryLookup.h:
3033         * editing/mac/DictionaryLookup.mm:
3034         (WebCore::expandSelectionByCharacters): Helper function for PDF support.
3035         (WebCore::dictionaryLookupForPDFSelection): Added.
3036
3037 2015-04-22  Zalan Bujtas  <zalan@apple.com>
3038
3039         Move render ruby initialization logic from RenderElement::createFor() to *::createElementRenderer()
3040         https://bugs.webkit.org/show_bug.cgi?id=144058
3041
3042         Reviewed by Darin Adler.
3043
3044         No change in functionality.
3045
3046         * CMakeLists.txt:
3047         * WebCore.vcxproj/WebCore.vcxproj:
3048         * WebCore.vcxproj/WebCore.vcxproj.filters:
3049         * WebCore.xcodeproj/project.pbxproj:
3050         * html/HTMLTagNames.in:
3051         * html/RubyElement.cpp: Added.
3052         (WebCore::RubyElement::RubyElement):
3053         (WebCore::RubyElement::create):
3054         (WebCore::RubyElement::createElementRenderer):
3055         * html/RubyElement.h: Added.
3056         * html/RubyTextElement.cpp: Added.
3057         (WebCore::RubyTextElement::RubyTextElement):
3058         (WebCore::RubyTextElement::create):
3059         (WebCore::RubyTextElement::createElementRenderer):
3060         * html/RubyTextElement.h: Added.
3061         * rendering/RenderElement.cpp:
3062         (WebCore::RenderElement::createFor):
3063
3064 2015-04-22  Roger Fong  <roger_fong@apple.com>
3065
3066         Show correct wireless play placard on iOS.
3067         <rdar://problem/20656596>
3068
3069         Copy wireless player placard code from r182631 to iOS.
3070         * Modules/mediacontrols/mediaControlsiOS.css:
3071         (audio::-webkit-media-controls-wireless-playback-status):
3072         (audio::-webkit-media-controls-wireless-playback-text):
3073         (audio::-webkit-media-controls-wireless-playback-text-top):
3074         (audio::-webkit-media-controls-wireless-playback-text-bottom):
3075         (audio::-webkit-media-controls-wireless-playback-status.small):
3076         (audio::-webkit-media-controls-wireless-playback-text-top.small):
3077         (audio::-webkit-media-controls-wireless-playback-text-bottom.small):
3078         * Modules/mediacontrols/mediaControlsiOS.js:
3079         (ControllerIOS.prototype.createControls):
3080         (ControllerIOS.prototype.configureInlineControls):
3081
3082 2015-04-22  Roger Fong  <roger_fong@apple.com>
3083
3084         Rollout part of r182263 that broke inline media controls on iOS.
3085         <rdar://problem/20654260>
3086
3087         * Modules/mediacontrols/mediaControlsApple.js:
3088         (Controller.prototype.handlePanelTransitionEnd):
3089         (Controller.prototype.setPlaying):
3090         (Controller.prototype.showControls):
3091         (Controller.prototype.hideControls):
3092
3093 2015-04-22  Eric Carlson  <eric.carlson@apple.com>
3094
3095         Unreviewed post-review clean up after r183096.
3096
3097         * Modules/mediasession/WebMediaSessionManagerClient.h:
3098         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
3099
3100 2015-04-22  Nan Wang  <nanwang1101@yahoo.com>
3101
3102         AX: WebKit does not expose text fields inside tree views.
3103         https://bugs.webkit.org/show_bug.cgi?id=142196
3104
3105         Reviewed by Chris Fleizach.
3106
3107         The problem is that any object in a tree which is not a static text 
3108         or treeitem will be ignored. Fixed it by exposing the children of treeitem.
3109
3110         Test: accessibility/treeitem-child-exposed.html
3111
3112         * accessibility/AccessibilityRenderObject.cpp:
3113         (WebCore::AccessibilityRenderObject::isAllowedChildOfTree):
3114
3115 2015-04-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3116
3117         [Streams API] Implement ReadableStreamController
3118         https://bugs.webkit.org/show_bug.cgi?id=143608
3119
3120         Reviewed by Benjamin Poulain.
3121
3122         Introducing ReadableStreamController, an abstraction to manage JS source stream queues.
3123         This new interface is not exposed to JS scripts as specified, using NoInterfaceObject.
3124
3125         A controller is created at the time a ReadableJSStream is started and it is owned by it.
3126         The controller may outlive the stream but as its reference will be reset, the calls to
3127         its methods would result in exceptions.
3128
3129         The constructor is not implemented yet.
3130
3131         Change covered by existing tests and rebased expectations.
3132
3133         * CMakeLists.txt:
3134         * DerivedSources.cpp:
3135         * DerivedSources.make: Added ReadableStreamController.idl related files.
3136         * Modules/streams/ReadableStreamController.h: Added.
3137         * Modules/streams/ReadableStreamController.idl: Added.
3138         * WebCore.vcxproj/WebCore.vcxproj:
3139         * WebCore.vcxproj/WebCore.vcxproj.filters:
3140         * WebCore.xcodeproj/project.pbxproj:
3141         * bindings/js/JSBindingsAllInOne.cpp: Added ReadableStreamController.idl related files.
3142         * bindings/js/JSReadableStreamControllerCustom.cpp: Added.
3143         * bindings/js/ReadableStreamJSSource.cpp:
3144         * bindings/js/ReadableStreamJSSource.h: Removed custom controller implementation.
3145
3146 2015-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
3147
3148         Rename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
3149         https://bugs.webkit.org/show_bug.cgi?id=143984
3150
3151         Reviewed by Darin Adler.
3152
3153         This patch is renaming these LayoutBox methods, because of their names
3154         don't match with the getters and setters, which is confusing. Specially
3155         now that we also have hasOverrideContainingBlockLogical{Height,Width}().
3156
3157         No new tests (this is just a refactoring).
3158
3159         * rendering/RenderBlockFlow.cpp:
3160         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
3161         * rendering/RenderBlockLineLayout.cpp:
3162         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
3163         * rendering/RenderBox.cpp:
3164         (WebCore::RenderBox::hasOverrideLogicalContentHeight):
3165         (WebCore::RenderBox::hasOverrideLogicalContentWidth):
3166         (WebCore::RenderBox::overrideLogicalContentWidth):
3167         (WebCore::RenderBox::overrideLogicalContentHeight):
3168         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
3169         (WebCore::RenderBox::computeLogicalWidthInRegion):
3170         (WebCore::RenderBox::computeLogicalHeight):
3171         (WebCore::RenderBox::computePercentageLogicalHeight):
3172         (WebCore::RenderBox::availableLogicalHeightUsing):
3173         * rendering/RenderBox.h:
3174         * rendering/RenderDeprecatedFlexibleBox.cpp:
3175         (WebCore::contentWidthForChild):
3176         (WebCore::contentHeightForChild):
3177         * rendering/RenderFlexibleBox.cpp:
3178         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
3179         * rendering/RenderRubyBase.cpp:
3180         (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
3181         * rendering/RenderTableSection.cpp:
3182         (WebCore::RenderTableSection::calcRowLogicalHeight):
3183
3184 2015-04-21  Jer Noble  <jer.noble@apple.com>
3185
3186         [Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
3187         https://bugs.webkit.org/show_bug.cgi?id=144023
3188
3189         Reviewed by Eric Carlson.
3190
3191         Fixes non-deterministic crash in media/media-source/media-source-stalled-holds-sleep-assertion.html.
3192
3193         Platform changes have introduced a re-entrancy to provideMediaData().  Calling
3194         SourceBufferPrivate::enqueueSample() can result in a re-entrant call back into
3195         SourceBuffer::provideMediaData(). To protect against this, wrap the client call
3196         from SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples() to
3197         SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples() in a dispatch_async() to the
3198         main thread. This gives the original provideMediaData() a chance to finish before the next
3199         one begins.
3200
3201         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3202         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
3203
3204 2015-04-21  Eric Carlson  <eric.carlson@apple.com>
3205
3206         [Mac] Use one playback target for all web processes
3207         https://bugs.webkit.org/show_bug.cgi?id=144009
3208
3209         Reviewed by Tim Horton.
3210
3211         * Modules/mediacontrols/mediaControlsApple.js:
3212         (Controller.prototype.updateWirelessPlaybackStatus): Drive-by fix to show controls when
3213             we show the placeholder image.
3214
3215         Instead of having each Page/Document pair manage access to the playback target for the videos
3216         in a web process, put all of the logic into a new class - WebMediaSessionManager. A singleton
3217         instance talks to the target picker and manages video element access for all web processes.
3218         All playback target logic was removed from Document, Page, and MediaSessionManager.
3219
3220         * Modules/mediasession: Added.
3221         * Modules/mediasession/WebMediaSessionManager.cpp: Added.
3222         (WebCore::ClientState::ClientState):
3223         (WebCore::flagsAreSet):
3224         (WebCore::WebMediaSessionManager::WebMediaSessionManager):
3225         (WebCore::WebMediaSessionManager::~WebMediaSessionManager):
3226         (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
3227         (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
3228         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
3229         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
3230         (WebCore::WebMediaSessionManager::clientStateDidChange):
3231         (WebCore::WebMediaSessionManager::setPlaybackTarget):
3232         (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
3233         (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring):
3234         (WebCore::WebMediaSessionManager::taskTimerFired):
3235         (WebCore::WebMediaSessionManager::find):
3236         (WebCore::WebMediaSessionManager::forEachClient):
3237         * Modules/mediasession/WebMediaSessionManager.h: Added.
3238         * Modules/mediasession/WebMediaSessionManagerClient.h: Added.
3239         (WebCore::WebMediaSessionManagerClient::~WebMediaSessionManagerClient):
3240         * Modules/webaudio/AudioContext.cpp:
3241         (WebCore::AudioContext::mediaState): Replaces isPlayingAudio.
3242         (WebCore::AudioContext::isPlayingAudio): Deleted.
3243         * Modules/webaudio/AudioContext.h:
3244         * WebCore.xcodeproj/project.pbxproj: Added new files.
3245         * dom/Document.cpp:
3246         (WebCore::Document::Document):
3247         (WebCore::Document::addAudioProducer): Take a MediaProducer instead of an AudioProducer.
3248         (WebCore::Document::removeAudioProducer):
3249         (WebCore::Document::updateIsPlayingMedia):
3250         (WebCore::nextPlaybackTargetClientContextId):
3251         (WebCore::Document::addPlaybackTargetPickerClient):
3252         (WebCore::Document::removePlaybackTargetPickerClient):
3253         (WebCore::Document::showPlaybackTargetPicker):
3254         (WebCore::Document::playbackTargetPickerClientStateDidChange):
3255         (WebCore::Document::playbackTargetAvailabilityDidChange):
3256         (WebCore::Document::setPlaybackTarget):
3257         (WebCore::Document::setShouldPlayToPlaybackTarget):
3258         (WebCore::Document::configurePlaybackTargetMonitoring): Deleted.
3259         (WebCore::Document::requiresPlaybackTargetRouteMonitoring): Deleted.
3260         (WebCore::Document::didChoosePlaybackTarget): Deleted.
3261         * dom/Document.h:
3262         (WebCore::Document::mediaState):
3263         (WebCore::Document::isPlayingAudio): Deleted.
3264         * html/HTMLMediaElement.cpp:
3265         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3266         (WebCore::HTMLMediaElement::registerWithDocument):
3267         (WebCore::HTMLMediaElement::setMuted): 
3268         (WebCore::HTMLMediaElement::parseAttribute):
3269         * html/HTMLMediaElement.h:
3270         * html/HTMLMediaSession.cpp:
3271         (WebCore::HTMLMediaSession::registerWithDocument):
3272         (WebCore::HTMLMediaSession::unregisterWithDocument):
3273         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
3274         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
3275         (WebCore::HTMLMediaSession::setPlaybackTarget):
3276         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
3277         (WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget):
3278         (WebCore::HTMLMediaSession::mediaStateDidChange):
3279         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Deleted.
3280         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
3281         (WebCore::HTMLMediaSession::startPlayingToPlaybackTarget): Deleted.
3282         (WebCore::HTMLMediaSession::stopPlayingToPlaybackTarget): Deleted.
3283         * html/HTMLMediaSession.h:
3284         * page/AudioProducer.h: Removed.
3285         * page/ChromeClient.h:
3286         * page/MediaProducer.h: Copied from Source/WebCore/page/AudioProducer.h.
3287         (WebCore::MediaProducer::~MediaProducer):
3288         (WebCore::AudioProducer::~AudioProducer): Deleted.
3289         * page/Page.cpp:
3290         (WebCore::Page::Page):
3291         (WebCore::Page::updateIsPlayingMedia):
3292         (WebCore::Page::addPlaybackTargetPickerClient):
3293         (WebCore::Page::removePlaybackTargetPickerClient):
3294         (WebCore::Page::showPlaybackTargetPicker):
3295         (WebCore::Page::playbackTargetPickerClientStateDidChange):
3296         (WebCore::Page::setPlaybackTarget):
3297         (WebCore::Page::playbackTargetAvailabilityDidChange):
3298         (WebCore::Page::setShouldPlayToPlaybackTarget):
3299         (WebCore::Page::playbackTarget): Deleted.
3300         (WebCore::Page::didChoosePlaybackTarget): Deleted.
3301         (WebCore::Page::configurePlaybackTargetMonitoring): Deleted.
3302         * page/Page.h:
3303         (WebCore::Page::mediaState):
3304         (WebCore::Page::isPlayingAudio): Deleted.
3305         (WebCore::Page::hasWirelessPlaybackTarget): Deleted.
3306         * platform/audio/MediaSession.h:
3307         (WebCore::MediaSession::isPlayingToWirelessPlaybackTarget):
3308         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
3309         (WebCore::MediaSessionClient::setShouldPlayToPlaybackTarget):
3310         (WebCore::MediaSession::startPlayingToPlaybackTarget): Deleted.
3311         (WebCore::MediaSession::stopPlayingToPlaybackTarget): Deleted.
3312         (WebCore::MediaSessionClient::startPlayingToPlaybackTarget): Deleted.
3313         (WebCore::MediaSessionClient::stopPlayingToPlaybackTarget): Deleted.
3314         * platform/audio/MediaSessionManager.cpp:
3315         (WebCore::MediaSessionManager::sessionWillBeginPlayback):
3316         (WebCore::MediaSessionManager::sessionCanLoadMedia):
3317         (WebCore::MediaSessionManager::sessionShouldBeginPlayingToWirelessPlaybackTarget): Deleted.
3318         * platform/audio/MediaSessionManager.h:
3319         * platform/graphics/MediaPlaybackTargetClient.h: Copied from Source/WebCore/platform/graphics/MediaPlaybackTargetPickerClient.h.
3320         (WebCore::MediaPlaybackTargetClient::~MediaPlaybackTargetClient):
3321         (WebCore::MediaPlaybackTargetPickerClient::~MediaPlaybackTargetPickerClient): Deleted.
3322         * platform/graphics/MediaPlaybackTargetPicker.cpp:
3323         (WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
3324         (WebCore::MediaPlaybackTargetPicker::startingMonitoringPlaybackTargets):
3325         (WebCore::MediaPlaybackTargetPicker::stopMonitoringPlaybackTargets):
3326         * platform/graphics/MediaPlaybackTargetPicker.h:
3327         * platform/graphics/MediaPlaybackTargetPickerClient.h: Removed.
3328         * platform/graphics/MediaPlayer.cpp:
3329         (WebCore::MediaPlayer::setShouldPlayToPlaybackTarget):
3330         (WebCore::MediaPlayer::startPlayingToPlaybackTarget): Deleted.
3331         (WebCore::MediaPlayer::stopPlayingToPlaybackTarget): Deleted.
3332         * platform/graphics/MediaPlayer.h:
3333         * platform/graphics/MediaPlayerPrivate.h:
3334         (WebCore::MediaPlayerPrivateInterface::setShouldPlayToPlaybackTarget):
3335         (WebCore::MediaPlayerPrivateInterface::startPlayingToPlaybackTarget): Deleted.
3336         (WebCore::MediaPlayerPrivateInterface::stopPlayingToPlaybackTarget): Deleted.
3337         * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: Added.
3338         (WebCore::WebMediaSessionManagerMac::singleton):
3339         (WebCore::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
3340         (WebCore::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
3341         (WebCore::WebMediaSessionManagerMac::targetPicker):
3342         * platform/graphics/avfoundation/WebMediaSessionManagerMac.h: Added.
3343         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
3344         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3345         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
3346         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3347         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3348         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3349         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
3350         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):
3351         (WebCore::MediaPlayerPrivateAVFoundationObjC::startPlayingToPlaybackTarget): Deleted.
3352         (WebCore::MediaPlayerPrivateAVFoundationObjC::stopPlayingToPlaybackTarget): Deleted.
3353         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3354         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3355         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
3356         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::togglePlayingToPlaybackTarget): Deleted.
3357         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startPlayingToPlaybackTarget): Deleted.
3358         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::stopPlayingToPlaybackTarget): Deleted.
3359         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3360         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3361         (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
3362         (WebCore::MediaPlayerPrivateQTKit::togglePlayingToPlaybackTarget): Deleted.
3363         (WebCore::MediaPlayerPrivateQTKit::startPlayingToPlaybackTarget): Deleted.
3364         (WebCore::MediaPlayerPrivateQTKit::stopPlayingToPlaybackTarget): Deleted.
3365         * testing/Internals.cpp:
3366         (WebCore::Internals::isPagePlayingAudio):
3367
3368 2015-04-21  Myles C. Maxfield  <mmaxfield@apple.com>
3369
3370         [iOS] When computing visible rects for tiling, stop searching at UIWindows
3371         https://bugs.webkit.org/show_bug.cgi?id=144022
3372         <rdar://problem/18327227>
3373
3374         Reviewed by Simon Fraser.
3375
3376         [WAKWindow _visibleRectRespectingMasksToBounds:] computes a visible rect which we use
3377         to determine which tiles to create. We do this by finding the frame of the _hostLayer,
3378         and then walking up the CALayer hierarchy converting each rect into its parent's
3379         coordinate system (all the while clipping to bounds if necessary). This walk up the
3380         layer hierarchy should stop at a layer associated with a UIWindow.
3381
3382         * platform/ios/wak/WAKWindow.mm:
3383         (-[WAKWindow _visibleRectRespectingMasksToBounds:]):
3384
3385 2015-04-21  Jinwoo Song  <jinwoo7.song@samsung.com>