[CMake] [GTK] Organize and clean up unused CMake variables
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2
3         [CMake] [GTK] Organize and clean up unused CMake variables
4         https://bugs.webkit.org/show_bug.cgi?id=144364
5
6         Reviewed by Gyuyoung Kim.
7
8         * PlatformGTK.cmake: Add variables specific to this project.
9
10 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
11
12         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
13         https://bugs.webkit.org/show_bug.cgi?id=144388
14
15         Reviewed by Brady Eidson.
16
17         There used to be a method in ContextMenuItem to check if share
18         menu item was supported or not, but since r182573, there's a
19         method to get the share menu item. If the returned menu item is
20         null, it's not added to the menu, but we are not returning a null
21         ContextMenu item even though we don't support share menu item.
22
23         * platform/gtk/ContextMenuItemGtk.cpp:
24         (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
25
26 2015-04-29  Zan Dobersek  <zdobersek@igalia.com>
27
28         Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
29         https://bugs.webkit.org/show_bug.cgi?id=144232
30
31         Reviewed by Darin Adler.
32
33         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
34         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): 
35         Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
36
37 2015-04-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
38
39         Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
40         https://bugs.webkit.org/show_bug.cgi?id=140261
41
42         Reviewed by Darin Adler.
43
44         We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
45         because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
46
47         * rendering/RenderView.cpp:
48         (WebCore::isValidObjectForNewSelection):
49         (WebCore::RenderView::clearSubtreeSelection):
50         (WebCore::RenderView::applySubtreeSelection):
51
52 2015-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
53
54         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
55         https://bugs.webkit.org/show_bug.cgi?id=143711
56
57         Reviewed by Darin Adler.
58
59         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
60         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
61         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
62
63         Test: http/tests/appcache/simple-video-sync.html
64
65         * html/HTMLMediaElement.cpp:
66         (WebCore::HTMLMediaElement::parseAttribute):
67         * loader/DocumentThreadableLoader.cpp:
68         (WebCore::DocumentThreadableLoader::loadRequest):
69         * loader/FrameLoader.cpp:
70         (WebCore::FrameLoader::loadResourceSynchronously):
71         * loader/FrameLoader.h:
72         * loader/appcache/ApplicationCacheHost.cpp:
73         (WebCore::ApplicationCacheHost::maybeLoadResource):
74         (WebCore::ApplicationCacheHost::createFileURL):
75         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
76         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
77         * loader/appcache/ApplicationCacheHost.h:
78         * xml/XSLTProcessorLibxslt.cpp:
79         (WebCore::docLoaderFunc):
80         * xml/parser/XMLDocumentParserLibxml2.cpp:
81         (WebCore::openFunc):
82
83 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
84
85         Purge PassRefPtr from createSVGPathSegFoo factory functions
86         https://bugs.webkit.org/show_bug.cgi?id=144374
87
88         Reviewed by Darin Adler.
89
90         Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
91         those factory functions can't return null. Additionally let's remove unnecessary
92         #include<PassRefPtr.h> there.
93
94         No new tests, no behavior changes.
95
96         * svg/SVGColor.cpp:
97         (WebCore::SVGColor::cloneForCSSOM):
98         * svg/SVGColor.h:
99         * svg/SVGGlyphMap.h:
100         (WebCore::GlyphMapNode::create):
101         * svg/SVGPaint.cpp:
102         (WebCore::SVGPaint::cloneForCSSOM):
103         * svg/SVGPaint.h:
104         * svg/SVGPathElement.cpp:
105         (WebCore::SVGPathElement::createSVGPathSegClosePath):
106         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
107         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
108         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
109         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
110         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
111         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
112         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
113         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
114         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
115         (WebCore::SVGPathElement::createSVGPathSegArcRel):
116         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
117         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
118         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
119         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
120         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
121         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
122         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
123         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
124         * svg/SVGPathElement.h:
125         * svg/SVGPathSegArcAbs.h:
126         (WebCore::SVGPathSegArcAbs::create):
127         * svg/SVGPathSegArcRel.h:
128         (WebCore::SVGPathSegArcRel::create):
129         * svg/SVGPathSegClosePath.h:
130         (WebCore::SVGPathSegClosePath::create):
131         * svg/SVGPathSegCurvetoCubicAbs.h:
132         (WebCore::SVGPathSegCurvetoCubicAbs::create):
133         * svg/SVGPathSegCurvetoCubicRel.h:
134         (WebCore::SVGPathSegCurvetoCubicRel::create):
135         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
136         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
137         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
138         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
139         * svg/SVGPathSegCurvetoQuadraticAbs.h:
140         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
141         * svg/SVGPathSegCurvetoQuadraticRel.h:
142         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
143         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
144         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
145         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
146         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
147         * svg/SVGPathSegLinetoAbs.h:
148         (WebCore::SVGPathSegLinetoAbs::create):
149         * svg/SVGPathSegLinetoHorizontalAbs.h:
150         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
151         * svg/SVGPathSegLinetoHorizontalRel.h:
152         (WebCore::SVGPathSegLinetoHorizontalRel::create):
153         * svg/SVGPathSegLinetoRel.h:
154         (WebCore::SVGPathSegLinetoRel::create):
155         * svg/SVGPathSegLinetoVerticalAbs.h:
156         (WebCore::SVGPathSegLinetoVerticalAbs::create):
157         * svg/SVGPathSegLinetoVerticalRel.h:
158         (WebCore::SVGPathSegLinetoVerticalRel::create):
159         * svg/SVGPathSegMovetoAbs.h:
160         (WebCore::SVGPathSegMovetoAbs::create):
161         * svg/SVGPathSegMovetoRel.h:
162         (WebCore::SVGPathSegMovetoRel::create):
163         * svg/SVGViewSpec.h:
164         (WebCore::SVGViewSpec::create):
165         * svg/animation/SMILTimeContainer.h:
166         (WebCore::SMILTimeContainer::create):
167         * svg/animation/SVGSMILElement.cpp:
168         (WebCore::ConditionEventListener::create):
169         * svg/graphics/SVGImage.h:
170         * svg/graphics/SVGImageForContainer.h:
171         * svg/graphics/filters/SVGFilter.cpp:
172         (WebCore::SVGFilter::create):
173         * svg/graphics/filters/SVGFilter.h:
174
175 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
176
177         Make a non-static version of FrameView::yPositionForRootContentLayer()
178         https://bugs.webkit.org/show_bug.cgi?id=144375
179
180         Reviewed by Andy Estes.
181
182         There were two calls to the static FrameView::yPositionForRootContentLayer()
183         which passed in all the arguments for the same FrameView. Make a member
184         function for convenience.
185
186         * page/FrameView.cpp:
187         (WebCore::FrameView::yPositionForRootContentLayer):
188         * page/FrameView.h:
189         * rendering/RenderLayerCompositor.cpp:
190         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
191
192 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
193
194         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
195         https://bugs.webkit.org/show_bug.cgi?id=143001
196
197         Reviewed by Gyuyoung Kim.
198
199         TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
200         So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
201
202         In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
203         where other coordinated graphics files are located.
204
205         * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
206         * PlatformEfl.cmake:
207         * PlatformGTK.cmake:
208         * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
209         * WebCore.vcxproj/WebCore.vcxproj.filters:
210         * loader/EmptyClients.h:
211         * page/Chrome.cpp:
212         * page/Chrome.h:
213         * page/ChromeClient.h:
214         * page/Frame.cpp:
215         (WebCore::Frame::createView):
216         * page/FrameView.cpp:
217         (WebCore::FrameView::requestScrollPositionUpdate):
218         * page/FrameView.h:
219         * page/Page.cpp:
220         (WebCore::Page::setPageScaleFactor):
221         * platform/HostWindow.h:
222         * platform/ScrollView.cpp:
223         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
224         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
225         (WebCore::ScrollView::visibleContentRectInternal):
226         (WebCore::ScrollView::scrollTo):
227         * platform/ScrollView.h:
228         * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
229         * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
230         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
231         * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
232         * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
233         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
234
235 2015-04-28  Brent Fulgham  <bfulgham@apple.com>
236
237         REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
238         https://bugs.webkit.org/show_bug.cgi?id=144366
239         <rdar://problem/20533513>
240
241         Reviewed by Dean Jackson.
242
243         * rendering/RenderBlockFlow.cpp:
244         (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
245         before attempting to dereference it. 
246
247 2015-04-28  Andreas Kling  <akling@apple.com>
248
249         Simplify DOM wrapper destruction, don't deref() in finalizers.
250         <https://webkit.org/b/144183>
251
252         Reviewed by Darin Adler.
253
254         DOM JS bindings had two mechanisms to call deref() on the WebCore object,
255         once through a weak finalizer, and once through the JSCell's regular destructor.
256
257         That was once believed to be an optimization, but these days the finalizer will
258         run just moments before the destructor anyway, all in the same call stack.
259         And more importantly, the finalizer is not guaranteed to run, for instance in the
260         case where a Weak is assigned to after going dead, but before the WeakBlock
261         has been swept by the incremental sweeper.
262
263         Simplify this by just removing the deref() from the generated finalizers.
264         This makes it easier to reason about DOM wrapper destruction, and eliminates
265         the awkward time window  where a DOM wrapper could have a null impl().
266
267         We could spend more time on figuring out a way to have finalizers manage the
268         destruction of these wrappers, but that would require fundamental changes to
269         our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
270         destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
271         However the risk:reward ratio does not seem justified at this point in time.
272
273         * bindings/scripts/CodeGeneratorJS.pm:
274         (GenerateHeader):
275         (GenerateImplementation):
276         * bindings/js/JSCSSValueCustom.cpp:
277         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
278         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
279         (WebCore::JSTestActiveDOMObjectOwner::finalize):
280         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
281         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
282         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
283         (WebCore::JSTestCustomNamedGetterOwner::finalize):
284         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
285         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
286         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
287         (WebCore::JSTestEventConstructorOwner::finalize):
288         * bindings/scripts/test/JS/JSTestEventConstructor.h:
289         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
290         (WebCore::JSTestEventTarget::~JSTestEventTarget):
291         (WebCore::JSTestEventTargetOwner::finalize):
292         * bindings/scripts/test/JS/JSTestEventTarget.h:
293         * bindings/scripts/test/JS/JSTestException.cpp:
294         (WebCore::JSTestException::~JSTestException):
295         (WebCore::JSTestExceptionOwner::finalize):
296         * bindings/scripts/test/JS/JSTestException.h:
297         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
298         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
299         (WebCore::JSTestGenerateIsReachableOwner::finalize):
300         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
301         * bindings/scripts/test/JS/JSTestInterface.cpp:
302         (WebCore::JSTestInterface::~JSTestInterface):
303         (WebCore::JSTestInterfaceOwner::finalize):
304         * bindings/scripts/test/JS/JSTestInterface.h:
305         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
306         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
307         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
308         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
309         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
310         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
311         (WebCore::JSTestNamedConstructorOwner::finalize):
312         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
313         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
314         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
315         (WebCore::JSTestNondeterministicOwner::finalize):
316         * bindings/scripts/test/JS/JSTestNondeterministic.h:
317         * bindings/scripts/test/JS/JSTestObj.cpp:
318         (WebCore::JSTestObj::~JSTestObj):
319         (WebCore::JSTestObjOwner::finalize):
320         * bindings/scripts/test/JS/JSTestObj.h:
321         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
322         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
323         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
324         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
325         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
326         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
327         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
328         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
329         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
330         (WebCore::JSTestTypedefs::~JSTestTypedefs):
331         (WebCore::JSTestTypedefsOwner::finalize):
332         * bindings/scripts/test/JS/JSTestTypedefs.h:
333         * bindings/scripts/test/JS/JSattribute.cpp:
334         (WebCore::JSattribute::~JSattribute):
335         (WebCore::JSattributeOwner::finalize):
336         * bindings/scripts/test/JS/JSattribute.h:
337         * bindings/scripts/test/JS/JSreadonly.cpp:
338         (WebCore::JSreadonly::~JSreadonly):
339         (WebCore::JSreadonlyOwner::finalize):
340         * bindings/scripts/test/JS/JSreadonly.h:
341
342 2015-04-28  Alex Christensen  <achristensen@webkit.org>
343
344         Build WinCairo without cygwin.
345         https://bugs.webkit.org/show_bug.cgi?id=144365
346
347         Reviewed by Myles Maxfield.
348
349         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
350         Pass the CC executable to build-generated-files.pl like r182164.
351         * WebCore.vcxproj/build-generated-files.pl:
352         Default to 8 CPUs unless otherwise specified.
353
354 2015-04-28  Sam Weinig  <sam@webkit.org>
355
356         [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
357         https://bugs.webkit.org/show_bug.cgi?id=144363
358
359         Reviewed by Alex Christensen.
360
361         This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
362
363         * contentextensions/CombinedURLFilters.cpp:
364         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
365         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
366         * contentextensions/CombinedURLFilters.h:
367         Replace function that creates a Vector of all the NFAs with one that allows incremental processing
368         as they are created.
369
370         * contentextensions/ContentExtensionCompiler.cpp:
371         (WebCore::ContentExtensions::addUniversalActionsToDFA):
372         Extract code to add universal actions into a helper, since we need to call it in two places now.
373
374         (WebCore::ContentExtensions::compileRuleList):
375         Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
376         of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
377         ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
378         placed on the first DFA.
379
380 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
381
382         [TextIndicator] Yellow highlight takes too long to fade out on scroll
383         https://bugs.webkit.org/show_bug.cgi?id=144358
384         <rdar://problem/19451011>
385
386         Reviewed by Beth Dakin.
387
388         * page/TextIndicator.h:
389         Add Lifetime and DismissalAnimation enums.
390
391         (WebCore::TextIndicator::contentImageWithHighlight):
392         (WebCore::TextIndicator::contentImage):
393         Fix style.
394
395         * page/mac/TextIndicatorWindow.h:
396         * page/mac/TextIndicatorWindow.mm:
397         (WebCore::TextIndicatorWindow::TextIndicatorWindow):
398         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
399         (WebCore::TextIndicatorWindow::clearTextIndicator):
400         (WebCore::TextIndicatorWindow::setTextIndicator):
401         (WebCore::TextIndicatorWindow::closeWindow):
402         (WebCore::TextIndicatorWindow::startFadeOut):
403         Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
404         This is just about temporary-lifetime TextIndicators, like the ones
405         you get when the find-in-page UI is hidden but you hit Cmd-G.
406
407         Add clearTextIndicator, which takes a DismissalAnimation, providing
408         clients an opportunity to avoid the normal fade-out animation, if it
409         was going to happen.
410
411 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
412
413         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
414         https://bugs.webkit.org/show_bug.cgi?id=144304
415
416         Reviewed by Geoffrey Garen.
417
418         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
419
420         * Configurations/FeatureDefines.xcconfig:
421
422 2015-04-28  Commit Queue  <commit-queue@webkit.org>
423
424         Unreviewed, rolling out r183514.
425         https://bugs.webkit.org/show_bug.cgi?id=144359
426
427         It broke cloop test bots (Requested by mcatanzaro on #webkit).
428
429         Reverted changeset:
430
431         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
432         https://bugs.webkit.org/show_bug.cgi?id=144304
433         http://trac.webkit.org/changeset/183514
434
435 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
436
437         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
438         https://bugs.webkit.org/show_bug.cgi?id=144304
439
440         Reviewed by Geoffrey Garen.
441
442         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
443
444         * Configurations/FeatureDefines.xcconfig:
445
446 2015-04-28  Zalan Bujtas  <zalan@apple.com>
447
448         Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
449         https://bugs.webkit.org/show_bug.cgi?id=144351
450
451         Reviewed by Simon Fraser.
452
453         This patch ensures that CG context is properly restored after painting dashed/dotted lines.
454
455         Test: fast/forms/checkbox-painting-with-hr.html
456
457         * platform/graphics/cg/GraphicsContextCG.cpp:
458         (WebCore::GraphicsContext::drawLine):
459
460 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
461
462         Provide contentsToView() and viewToContents() functions on ScrollView, and use them
463         https://bugs.webkit.org/show_bug.cgi?id=144357
464
465         Reviewed by Tim Horton.
466
467         Too much code was consulting topContentInset() and headerHeight() directly. Replace
468         with calls to new contentsToView() and viewToContents() functions, which wrap the
469         exisiting documentScrollOffsetRelativeToViewOrigin().
470         
471         Use the new functions in FrameView and ScrollView coordinate mapping functions.
472         
473         No behavior change.
474
475         * page/FrameView.cpp:
476         (WebCore::FrameView::convertFromRendererToContainingView):
477         (WebCore::FrameView::convertFromContainingViewToRenderer):
478         * platform/ScrollView.cpp:
479         (WebCore::ScrollView::viewToContents):
480         (WebCore::ScrollView::contentsToView):
481         (WebCore::ScrollView::rootViewToContents):
482         (WebCore::ScrollView::contentsToRootView):
483         (WebCore::ScrollView::rootViewToTotalContents):
484         (WebCore::ScrollView::windowToContents):
485         (WebCore::ScrollView::contentsToWindow):
486         * platform/ScrollView.h:
487
488 2015-04-28  Eric Carlson  <eric.carlson@apple.com>
489
490         [Mac] Simplify code to support media engines which do not support target playback
491         https://bugs.webkit.org/show_bug.cgi?id=144332
492
493         Reviewed by Jer Noble.
494
495         * Modules/mediasession/WebMediaSessionManager.cpp:
496         (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
497         callback, let them decide if it is significant or not.
498
499         * html/HTMLMediaElement.cpp:
500         (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
501         (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
502         (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
503         (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
504         (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
505         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
506         (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
507         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
508         (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
509         event is dispatched when the current target is wireless but the media engine does not support
510         wireless playback, tell the media engine not to play to the target.
511         * html/HTMLMediaElement.h:
512         * html/HTMLMediaElement.idl:
513
514         * html/HTMLMediaSession.cpp:
515         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
516         (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
517         * html/HTMLMediaSession.h:
518
519         * platform/graphics/MediaPlayer.cpp:
520         (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
521         * platform/graphics/MediaPlayer.h:
522         * platform/graphics/MediaPlayerPrivate.h:
523
524         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
525         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
526         to explicitly manage the lifetime of the temporary object.
527         (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
528         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
529
530         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
531         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
532         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
533         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
534
535         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
536         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
537         (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
538         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
539         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
540
541 2015-04-28  Alex Christensen  <achristensen@webkit.org>
542
543         [Content Extensions] Use less memory for CombinedURLFilters.
544         https://bugs.webkit.org/show_bug.cgi?id=144290
545
546         Reviewed by Andreas Kling.
547
548         * contentextensions/CombinedURLFilters.cpp:
549         (WebCore::ContentExtensions::recursiveMemoryUsed):
550         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
551         (WebCore::ContentExtensions::generateNFAForSubtree):
552         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
553         * contentextensions/NFA.cpp:
554         (WebCore::ContentExtensions::NFA::memoryUsed):
555         (WebCore::ContentExtensions::NFA::setActions):
556         * contentextensions/NFA.h:
557         * contentextensions/NFANode.h:
558         * contentextensions/Term.h:
559         (WebCore::ContentExtensions::Term::Term::generateGraph):
560         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
561         Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
562
563 2015-04-28  Brady Eidson  <beidson@apple.com>
564
565         Consolidate most "frame load" arguments into FrameLoadRequest.
566         https://bugs.webkit.org/show_bug.cgi?id=144276
567
568         Reviewed by Alexey Proskuryakov.
569
570         No new tests (No change in behavior).
571         
572         This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
573         
574         Humble beginnings of this long process:
575         - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
576         - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
577         - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
578         - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
579         
580         These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
581         arguments were from these various call sites.
582         
583         Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
584         able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
585         as an argument.
586
587         * inspector/InspectorFrontendClientLocal.cpp:
588         (WebCore::InspectorFrontendClientLocal::openInNewTab):
589         
590         * inspector/InspectorPageAgent.cpp:
591         (WebCore::InspectorPageAgent::navigate):
592         
593         * loader/FrameLoadRequest.cpp:
594         (WebCore::FrameLoadRequest::FrameLoadRequest):
595         * loader/FrameLoadRequest.h:
596         (WebCore::FrameLoadRequest::FrameLoadRequest):
597         (WebCore::FrameLoadRequest::lockHistory):
598         (WebCore::FrameLoadRequest::lockBackForwardList):
599         (WebCore::FrameLoadRequest::shouldSendReferrer):
600         (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
601         (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
602         (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
603         
604         * loader/FrameLoader.cpp:
605         (WebCore::FrameLoader::changeLocation):
606         (WebCore::FrameLoader::urlSelected):
607         (WebCore::FrameLoader::loadFrameRequest):
608         * loader/FrameLoader.h:
609         
610         * loader/NavigationScheduler.cpp:
611         (WebCore::NavigationScheduler::scheduleLocationChange):
612         
613         * page/ContextMenuController.cpp:
614         (WebCore::openNewWindow):
615         (WebCore::ContextMenuController::contextMenuItemSelected):
616         
617         * page/DOMWindow.cpp:
618         (WebCore::DOMWindow::createWindow):
619
620 2015-04-27  Myles C. Maxfield  <mmaxfield@apple.com>
621
622         [Mac] [iOS] Implement font-synthesis CSS property
623         https://bugs.webkit.org/show_bug.cgi?id=144305
624
625         Reviewed by Andreas Kling.
626
627         This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
628
629         The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
630         determine if we should synthesize bold and italics, this CSS property simply guards that decision.
631
632         Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
633         regarding font-synthesis into FontDescription (from RenderStyle).
634
635         Test: fast/css3-text/font-synthesis.html
636
637         * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
638         inside FontDescription. This also means that the property must be marked as a "high priority" property, which
639         is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
640         FontCacheIOS and FontCacheMac have access to the saved state.
641         * css/CSSComputedStyleDeclaration.cpp:
642         (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
643         * css/CSSSegmentedFontFace.cpp:
644         (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
645         FontSynthesis state inside FontDescription.
646         * css/StyleBuilderConverter.h:
647         (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
648         StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
649         CSSPropertyNames.in
650         * css/StyleBuilderCustom.h:
651         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
652         * platform/graphics/FontDescription.h:
653         (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
654         (WebCore::FontDescription::fontSynthesis): Ditto.
655         (WebCore::FontDescription::setFontSynthesis): Ditto.
656         (WebCore::FontDescription::initialFontSynthesis): Ditto.
657         (WebCore::FontDescription::operator==): Update to include new state.
658         * platform/graphics/FontCache.h:
659         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
660         state inside FontDescription.
661         * platform/graphics/ios/FontCacheIOS.mm:
662         (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
663         new FontSynthesis state inside FontDescription.
664         * platform/graphics/mac/FontCacheMac.mm:
665         (WebCore::FontCache::createFontPlatformData): Ditto.
666         * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
667         * rendering/style/RenderStyle.h:
668         (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
669         (WebCore::RenderStyle::setFontSynthesis): Ditto.
670         (WebCore::RenderStyle::initialFontSynthesis): Ditto.
671         * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
672         * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
673
674 2015-04-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
675
676         SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
677         https://bugs.webkit.org/show_bug.cgi?id=144321
678
679         Reviewed by Darin Adler.
680
681         Patch correctness covered by existing tests.
682
683         * platform/SharedBuffer.cpp:
684         (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
685
686 2015-04-28  Per Arne Vollan  <peavo@outlook.com>
687
688         [Curl] Memory leak.
689         https://bugs.webkit.org/show_bug.cgi?id=144327
690
691         Reviewed by Brent Fulgham.
692
693         When a data url is loaded, the ResourceHandle is not released.
694
695         * platform/network/curl/ResourceHandleManager.cpp:
696         (WebCore::ResourceHandleManager::startJob):
697
698 2015-04-28  Andy Estes  <aestes@apple.com>
699
700         Fix the Mavericks Debug build after r183467.
701
702         * platform/network/ResourceRequestBase.h:
703         (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
704         (WebCore::ResourceRequestBase::setRequester): Ditto.
705
706 2015-04-28  Csaba Osztrogonác  <ossy@webkit.org>
707
708         Remove make-file-arrays.py
709         https://bugs.webkit.org/show_bug.cgi?id=144324
710
711         Reviewed by Gyuyoung Kim.
712
713         * make-file-arrays.py: Removed.
714
715 2015-04-28  Antti Koivisto  <antti@apple.com>
716
717         Build fix.
718
719         * platform/network/ios/ResourceRequestIOS.mm:
720         (WebCore::ResourceRequest::ResourceRequest):
721
722 2015-04-28  Antti Koivisto  <antti@apple.com>
723
724         Network Cache: Disk cache getting filled by YouTube video data
725         https://bugs.webkit.org/show_bug.cgi?id=144259
726
727         Reviewed by Darin Adler.
728
729         MSE media is loaded via XHR and tends to eventually fill the cache.
730
731         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
732         We can reduce disk writes and keep more useful resources around by not caching them
733
734         Test: http/tests/cache/disk-cache/disk-cache-media.html
735
736         * loader/DocumentLoader.cpp:
737         (WebCore::DocumentLoader::startLoadingMainResource):
738
739             Set the requester.
740
741         * loader/cache/CachedRawResource.cpp:
742         (WebCore::CachedRawResource::CachedRawResource):
743         * page/DiagnosticLoggingKeys.cpp:
744         (WebCore::DiagnosticLoggingKeys::streamingMedia):
745         * page/DiagnosticLoggingKeys.h:
746         * platform/network/ResourceRequestBase.cpp:
747         (WebCore::ResourceRequestBase::adopt):
748         (WebCore::ResourceRequestBase::copyData):
749         (WebCore::equalIgnoringHeaderFields):
750         * platform/network/ResourceRequestBase.h:
751         (WebCore::ResourceRequestBase::requester):
752         (WebCore::ResourceRequestBase::setRequester):
753
754             Add requester type to the request object. Currently this is main resource, xhr or unspecified.
755
756         (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
757         (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
758         * platform/network/cf/ResourceRequest.h:
759         (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
760         (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
761
762             Replace this iOS only field with shared mechanism.
763
764         * platform/network/ios/QuickLook.mm:
765         (WebCore::QuickLookHandle::create):
766         * xml/XMLHttpRequest.cpp:
767         (WebCore::XMLHttpRequest::createRequest):
768
769             Set the requester.
770
771 2015-04-28  Namhoon Kim  <nakim@ea.com>
772
773         Fix windows build error in WebCore related to bulk build.
774         https://bugs.webkit.org/show_bug.cgi?id=144313
775
776         Reviewed by Csaba Osztrogonác.
777
778         No new tests because there is no behavior change.
779
780         * css/CSSAllInOne.cpp:
781         * dom/DOMAllInOne.cpp:
782
783 2015-04-27  Simon Fraser  <simon.fraser@apple.com>
784
785         Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
786         https://bugs.webkit.org/show_bug.cgi?id=144198
787
788         Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
789         paths set the style to the existing pointer, but with a SyntheticStyleChange.
790         We have to avoid an early return in this case.
791
792         * rendering/RenderElement.cpp:
793         (WebCore::RenderElement::setStyle):
794
795 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
796
797         Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
798         https://bugs.webkit.org/show_bug.cgi?id=144198
799
800         Reviewed by Darin Adler, Antti Koivisto.
801         
802         SyntheticStyleChange style recalcs are triggered for cases where behavior depends
803         on state which is outside of RenderStyle; this includes triggering compositing for
804         animations, for video and canvas, and for iframes with composited content.
805         
806         In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
807         with diff == StyleDifferenceEqual, and so be unable to determine if there
808         is actual work to be done.
809         
810         This patch enforces the contract that the diff is never StyleDifferenceEqual if
811         compositing or other work has to happen from setStyle(). This is achieved by
812         passing in a 'hasSideEffects' flag, which causes the diff to become at least
813         StyleDifferenceRecompositeLayer.
814         
815         RenderLayerCompositor::layerStyleChanged() can now safely early return
816         if the diff is equal. Future patches will reduce redundant work even more.
817
818         Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
819
820         * page/animation/AnimationBase.h:
821         (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
822         (WebCore::AnimationBase::state):
823         * page/animation/AnimationController.cpp:
824         (WebCore::AnimationController::updateAnimations): bool out param which indicates
825         whether any animations changed state.
826         * page/animation/AnimationController.h:
827         * page/animation/CompositeAnimation.cpp:
828         (WebCore::CompositeAnimation::animate): If any transitions or animations changed
829         state, set the animationStateChanged out param to true.
830         * page/animation/CompositeAnimation.h:
831         * page/animation/ImplicitAnimation.cpp:
832         (WebCore::ImplicitAnimation::animate): Return true if the state changed.
833         * page/animation/ImplicitAnimation.h:
834         * page/animation/KeyframeAnimation.cpp:
835         (WebCore::KeyframeAnimation::animate): Return true if the state changed.
836         * page/animation/KeyframeAnimation.h:
837         * rendering/RenderElement.cpp:
838         (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
839         != StyleDifferenceEqual, but still need to do the check to see if layers changed.
840         (WebCore::RenderElement::initializeStyle): When setting style for the first time,
841         don't use StyleDifferenceEqual.
842         (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
843         change involves side effects. If the diff is equal but the flag is set, change
844         the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
845         * rendering/RenderElement.h:
846         (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
847         is true, or if animation state changed.
848         * rendering/RenderLayer.cpp:
849         (WebCore::RenderLayer::styleChanged): Pass the diff down.
850         * rendering/RenderLayerCompositor.cpp:
851         (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
852         * rendering/RenderLayerCompositor.h:
853         * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
854         setting style for the first time.
855         * style/StyleResolveTree.cpp:
856         (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
857         (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
858         says there are side-effects.
859
860 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
861
862         [GTK] Add one single option to control all OpenGL-related options
863         https://bugs.webkit.org/show_bug.cgi?id=144105
864
865         Reviewed by Martin Robinson.
866
867         Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
868
869         * PlatformGTK.cmake:
870
871 2015-04-27  Myles C. Maxfield  <mmaxfield@apple.com>
872
873         Consolidate one-line flag-related header files into TextFlags.h
874         https://bugs.webkit.org/show_bug.cgi?id=144295
875
876         Reviewed by Tim Horton.
877
878         There were a collection of single-line header files throughout platform/ which contain
879         single-line type declaractions of flags related to text layout & rendering. This patch
880         consolidates all these single-line headers into TextFlags.h
881
882         No new tests because there is no behavior change.
883
884         * WebCore.vcxproj/WebCore.vcxproj:
885         * WebCore.vcxproj/WebCore.vcxproj.filters:
886         * WebCore.xcodeproj/project.pbxproj:
887         * css/CSSFontFace.h:
888         * css/CSSPrimitiveValueMappings.h:
889         * loader/cache/CachedFont.h:
890         * loader/cache/CachedTextTrack.h:
891         * page/Settings.h:
892         * platform/DragImage.h:
893         * platform/graphics/FontDescription.h:
894         * platform/graphics/FontOrientation.h: Removed.
895         * platform/graphics/FontPlatformData.h:
896         * platform/graphics/FontRenderingMode.h: Removed.
897         * platform/graphics/FontSmoothingMode.h: Removed.
898         * platform/graphics/FontTraitsMask.h: Removed.
899         * platform/graphics/FontWidthVariant.h: Removed.
900         * platform/graphics/TextRenderingMode.h: Removed.
901         * platform/graphics/cairo/FontCustomPlatformData.h:
902         * platform/graphics/freetype/FontPlatformData.h:
903         * platform/graphics/mac/FontCustomPlatformData.h:
904         * platform/graphics/win/FontCustomPlatformData.h:
905         * platform/text/NonCJKGlyphOrientation.h: Removed.
906         * platform/text/TextFlags.h:
907         * rendering/TextPainter.h:
908         * style/StyleFontSizeFunctions.h:
909
910 2015-04-27  Daniel Bates  <dabates@apple.com>
911
912         Form control may be associated with the wrong HTML Form element after form id change
913         https://bugs.webkit.org/show_bug.cgi?id=133456
914         <rdar://problem/17095055>
915
916         Reviewed by Andy Estes.
917
918         Fixes an issue where a form control may be associated with the wrong HTML Form element
919         after the id of the HTML Form element associated with the form control is changed when
920         there is more than one HTML Form element with the same id in the document. Specifically,
921         a form control that has an HTML form attribute value X will always be associated with
922         some HTML Form element f where f.id = X regardless of whether f.id is subsequently
923         changed.
924
925         Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
926                fast/forms/change-form-id-to-be-unique.html
927
928         * dom/Element.cpp:
929         (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
930         (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
931         as to whether we should notify observers of the id change.
932         (WebCore::Element::updateIdForTreeScope): Ditto.
933         (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
934         indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
935         we have not actually modified it when this method is called. Instead we will notify observers
936         in Element::attributeChanged(), which is called after the DOM attribute id is modified.
937         (WebCore::Element::cloneAttributesFromElement): Ditto.
938         * dom/Element.h: Defined enum class NotifyObservers.
939         * dom/TreeScope.cpp:
940         (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
941         as to whether we should dispatch a notification to all observers.
942         (WebCore::TreeScope::removeElementById): Ditto.
943         * dom/TreeScope.h:
944
945 2015-04-27  Alex Christensen  <achristensen@webkit.org>
946
947         Reduce allocations and memory usage when compiling content extensions.
948         https://bugs.webkit.org/show_bug.cgi?id=144277
949
950         Reviewed by Benjamin Poulain.
951
952         Covered by existing tests.
953
954         * contentextensions/Term.h:
955         (WebCore::ContentExtensions::Term::CharacterSet::set):
956         (WebCore::ContentExtensions::Term::CharacterSet::get):
957         (WebCore::ContentExtensions::Term::CharacterSet::invert):
958         (WebCore::ContentExtensions::Term::CharacterSet::inverted):
959         (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
960         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
961         (WebCore::ContentExtensions::Term::CharacterSet::hash):
962         (WebCore::ContentExtensions::Term::Term):
963         (WebCore::ContentExtensions::Term::addCharacter):
964         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
965         (WebCore::ContentExtensions::Term::isUniversalTransition):
966         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
967         Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
968
969 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
970
971         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
972         https://bugs.webkit.org/show_bug.cgi?id=144193
973
974         Reviewed by Darin Adler.
975
976         * CMakeLists.txt:
977         * platform/graphics/ANGLEWebKitBridge.cpp:
978         * platform/graphics/FormatConverter.cpp:
979         * platform/graphics/FormatConverter.h:
980         * platform/graphics/GLContext.h:
981         * platform/graphics/GraphicsContext3D.cpp:
982         * platform/graphics/GraphicsContext3DPrivate.cpp:
983         * platform/graphics/OpenGLShims.cpp:
984         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
985         * platform/graphics/cg/GraphicsContext3DCG.cpp:
986         * platform/graphics/egl/GLContextEGL.cpp:
987         * platform/graphics/egl/GLContextEGL.h:
988         * platform/graphics/glx/GLContextGLX.cpp:
989         * platform/graphics/glx/GLContextGLX.h:
990         * platform/graphics/mac/GraphicsContext3DMac.mm:
991         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
992         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
993         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
994         * platform/graphics/opengl/GLPlatformContext.cpp:
995         * platform/graphics/opengl/GLPlatformSurface.cpp:
996         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
997         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
998         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
999         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
1000         * platform/graphics/win/GraphicsContext3DWin.cpp:
1001
1002 2015-04-27  Jer Noble  <jer.noble@apple.com>
1003
1004         [iOS] Video not centered in element on retina devices
1005         https://bugs.webkit.org/show_bug.cgi?id=144274
1006
1007         Reviewed by Simon Fraser.
1008
1009         In r173702, a transform was added to the video layer (and a matching, inverse transform
1010         in the UIProcess), but this transform affects the position property of the video layer
1011         used to position the video content within the element bounds when their aspect ratios
1012         do not match.
1013
1014         To work around this problem, pre-apply the transform during -setPosition:.
1015
1016         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1017         (-[WebVideoContainerLayer setPosition:]):
1018
1019 2015-04-27  Jer Noble  <jer.noble@apple.com>
1020
1021         Add a setting & restriction which prevents non-interactivte playback of audible media elements.
1022         https://bugs.webkit.org/show_bug.cgi?id=143486
1023
1024         Reviewed by Eric Carlson.
1025
1026         Tests: media/audio-playback-restriction-autoplay.html
1027                media/audio-playback-restriction-play.html
1028
1029         To allow clients who want to allow non-user-interactive video-only playback, but still
1030         restrict playback of audible media elements, add a new setting and matching restriction
1031         which disallows playback of media elements containing audible characteristics.
1032
1033         * html/HTMLMediaElement.cpp:
1034         (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
1035             restriction if the audioPlaybackRequiresUserGesture() setting is set.
1036         (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
1037             out of the #if, as this confuses the heck out of diff and makes all subsequent
1038             changes appear to be within HTMLMediaElement::parseAttribute.
1039         (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
1040             It is checked again immediately after every autoplay() call site.
1041         (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
1042         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
1043             is permitted, and if not, pause.
1044         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1045         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
1046         * html/HTMLMediaSession.cpp:
1047         (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
1048             individually.
1049         (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
1050         (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and 
1051             audio playback is restricted, and return false if so.
1052         * html/HTMLMediaSession.h:
1053         * page/Settings.cpp:
1054         * page/Settings.in:
1055         * testing/Internals.cpp:
1056         (WebCore::Internals::setMediaSessionRestrictions): Added. 
1057         (WebCore::Internals::setMediaElementRestrictions): Added.
1058         * testing/Internals.h:
1059         * testing/Internals.idl:
1060
1061 2015-04-27  Jer Noble  <jer.noble@apple.com>
1062
1063         [WebAudio] AudioContext does not remove user-gesture restriction during resume()
1064         https://bugs.webkit.org/show_bug.cgi?id=144211
1065
1066         Reviewed by Eric Carlson.
1067
1068         Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
1069                webaudio/audiocontext-restriction.html
1070
1071         Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
1072         a user-gesture would start normally, but would effectively mute their outputs. Now that
1073         the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
1074         in the "suspended" state until the user-gesture restriction is lifted.
1075
1076         Add a new method, willBeginPlayback() which checks and potentially clears the context's
1077         behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
1078         method when the state would transition to "running".
1079
1080         Because they may be called before any nodes are created, make sure to call lazyInitialize()
1081         from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
1082
1083         Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
1084         call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
1085         inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
1086         from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
1087         unconditionally, only do so when the user-gesture restriction is set.
1088
1089         Now that an AudioContext will not transition to "running" state without a user-gesture (if
1090         that restriction is set), there's no reason to check for that restriction from inside
1091         AudioDestinationNode.
1092
1093         Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
1094
1095         * Modules/webaudio/AudioBufferSourceNode.cpp:
1096         (WebCore::AudioBufferSourceNode::startPlaying):
1097         * Modules/webaudio/AudioContext.cpp:
1098         (WebCore::AudioContext::nodeWillBeginPlayback):
1099         (WebCore::AudioContext::willBeginPlayback):
1100         (WebCore::AudioContext::willPausePlayback):
1101         (WebCore::AudioContext::startRendering):
1102         (WebCore::AudioContext::suspendContext):
1103         (WebCore::AudioContext::resumeContext):
1104         (WebCore::AudioContext::closeContext):
1105         (WebCore::AudioContext::suspendPlayback):
1106         (WebCore::AudioContext::mayResumePlayback):
1107         * Modules/webaudio/AudioContext.h:
1108         (WebCore::AudioContext::behaviorRestrictions):
1109         (WebCore::AudioContext::userGestureRequiredForAudioStart):
1110         (WebCore::AudioContext::pageConsentRequiredForAudioStart):
1111         * Modules/webaudio/AudioDestinationNode.cpp:
1112         (WebCore::AudioDestinationNode::render):
1113         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1114         (WebCore::AudioScheduledSourceNode::start):
1115         * testing/Internals.cpp:
1116         (WebCore::Internals::setAudioContextRestrictions):
1117         * testing/Internals.h:
1118         * testing/Internals.idl:
1119
1120 2015-04-27  Alexey Proskuryakov  <ap@apple.com>
1121
1122         Build fix.
1123
1124         * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1125         Use -setObject:forKey:, not array subscript.
1126
1127 2015-04-27  Eric Carlson  <eric.carlson@apple.com>
1128
1129         WirelessTargetPicker should not be visible unless a file is playable
1130         https://bugs.webkit.org/show_bug.cgi?id=144271
1131         <rdar://problem/20712003>
1132
1133         Reviewed by Jer Noble.
1134
1135         * Modules/mediacontrols/mediaControlsApple.js:
1136         (Controller.prototype.isPlayable): New.
1137         (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
1138         (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
1139             status message has been hidden.
1140
1141 2015-04-22  Martin Robinson  <mrobinson@igalia.com>
1142
1143         [CMake] Autogenerate cmakeconfig.h.cmake
1144         https://bugs.webkit.org/show_bug.cgi?id=143997
1145
1146         Reviewed by Csaba Osztrogonác.
1147
1148         * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
1149         as the ones exposed to the build.
1150
1151 2015-04-27  Zalan Bujtas  <zalan@apple.com>
1152
1153         Simple line layout: Wrong text offsetting when range does not start from the first renderer.
1154         https://bugs.webkit.org/show_bug.cgi?id=144167
1155         rdar://problem/20639857
1156
1157         Reviewed by Simon Fraser.
1158
1159         This patch ensures that TextIterator returns the right text when the input range starts
1160         from a sibling node.
1161
1162         TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
1163         It is required to map simple line layout runs to RenderText positions.
1164         This patch sets the offset value when the iteration start with a sibling node.
1165
1166         Test: fast/text/range-text-with-simple-line-layout.html
1167
1168         * editing/TextIterator.cpp:
1169         (WebCore::TextIterator::TextIterator):
1170         (WebCore::TextIterator::handleTextNode):
1171
1172 2015-04-27  Commit Queue  <commit-queue@webkit.org>
1173
1174         Unreviewed, rolling out r183393.
1175         https://bugs.webkit.org/show_bug.cgi?id=144272
1176
1177         Caused memory corruption detected by GuardMalloc (Requested by
1178         ap on #webkit).
1179
1180         Reverted changeset:
1181
1182         "Synchronous XMLHttpRequest should get access to AppCache
1183         resources stored as flat files"
1184         https://bugs.webkit.org/show_bug.cgi?id=143711
1185         http://trac.webkit.org/changeset/183393
1186
1187 2015-04-27  Per Arne Vollan  <peavo@outlook.com>
1188
1189         [Curl] Favicons loaded from disc cache are ignored.
1190         https://bugs.webkit.org/show_bug.cgi?id=143953
1191
1192         Reviewed by Alex Christensen.
1193
1194         When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
1195         This happens because we give a 304 response, which makes the icon loader ignore
1196         the response. We can solve this by responding with 200 OK.
1197
1198         * platform/network/ResourceHandleInternal.h:
1199         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1200         * platform/network/curl/CurlCacheManager.cpp:
1201         (WebCore::CurlCacheManager::didReceiveResponse):
1202         * platform/network/curl/ResourceHandleManager.cpp:
1203         (WebCore::headerCallback):
1204         (WebCore::ResourceHandleManager::initializeHandle):
1205
1206 2015-04-27  Brady Eidson  <beidson@apple.com>
1207
1208         Make 'enum NavigationType' be an enum class
1209         https://bugs.webkit.org/show_bug.cgi?id=144270
1210
1211         Reviewed by Alex Christensen.
1212
1213         No new tests (No change in behavior).
1214
1215         I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
1216         an enum class first.
1217
1218         * loader/FrameLoader.cpp:
1219         (WebCore::FrameLoader::load):
1220         (WebCore::FrameLoader::reload):
1221         (WebCore::FrameLoader::loadDifferentDocumentItem):
1222         * loader/FrameLoaderTypes.h:
1223
1224         * loader/NavigationAction.cpp:
1225         (WebCore::navigationType):
1226         (WebCore::NavigationAction::NavigationAction):
1227
1228         * loader/PolicyChecker.cpp:
1229         (WebCore::PolicyChecker::checkNavigationPolicy):
1230
1231         * page/PerformanceNavigation.cpp:
1232         (WebCore::PerformanceNavigation::type):
1233
1234 2015-04-27  Yoav Weiss  <yoav@yoav.ws>
1235
1236         Fix viewport units in Media Queries
1237         https://bugs.webkit.org/show_bug.cgi?id=144260
1238
1239         Reviewed by Darin Adler.
1240
1241         This patch makes sure that viewport units are considered "length units"
1242         in the context of Media Queries, by having MediaQueryExp use the unit logic
1243         that is in CSSPrimitiveValue.
1244         It does that by turning the relevant methods in CSSPrimitiveValue into static.
1245
1246         It also makes sure that the logic for "resolution units" is not maintained separately 
1247         in MediaQueryExp, to avoid similiar issues in the future with resolution units.
1248
1249         Test: fast/media/mq-viewport-units.html
1250
1251         * css/CSSPrimitiveValue.h:
1252         (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
1253         (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
1254         (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
1255         * css/MediaQueryExp.cpp:
1256         (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
1257         (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
1258
1259 2015-04-27  Javier Fernandez  <jfernandez@igalia.com>
1260
1261         [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
1262         https://bugs.webkit.org/show_bug.cgi?id=133280
1263
1264         Reviewed by David Hyatt.
1265
1266         Implementation of justify-self and justify-items properties for grid. It supports
1267         different writing-modes and direction. Margins, borders and paddings are also
1268         considered when computing the final position and stretched size.
1269
1270         This patch applies also a quite important refactoring of the alignment logic in
1271         order to share code between the two alignment dimensions, row-axis and column-axis.
1272
1273         Overflow handling is still missing and will be added later in a follow-up bug.
1274
1275         Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
1276                fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
1277                fast/css-grid-layout/grid-align-justify-margin-border-padding.html
1278                fast/css-grid-layout/justify-self-cell.html
1279
1280         * rendering/RenderGrid.cpp:
1281         (WebCore::RenderGrid::layoutGridItems):
1282         (WebCore::RenderGrid::columnAxisPositionForChild):
1283         (WebCore::RenderGrid::rowAxisPositionForChild):
1284         (WebCore::RenderGrid::rowPositionForChild):
1285         (WebCore::RenderGrid::columnPositionForChild):
1286         (WebCore::RenderGrid::findChildLogicalPosition):
1287         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
1288         (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
1289         (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
1290         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
1291         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
1292         * rendering/RenderGrid.h:
1293         * rendering/style/RenderStyle.cpp:
1294         (WebCore::RenderStyle::resolveJustification):
1295         * rendering/style/RenderStyle.h:
1296
1297 2015-04-27  Darin Adler  <darin@apple.com>
1298
1299         Crashes under IDBDatabase::closeConnection
1300         https://bugs.webkit.org/show_bug.cgi?id=141745
1301
1302         Reviewed by Alexey Proskuryakov.
1303
1304         * Modules/indexeddb/IDBDatabase.cpp:
1305         (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
1306         actually calling those functions.
1307         (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
1308         in the middle of this function's execution.
1309
1310 2015-04-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1311
1312         [Streams API] ReadableStream constructor start function should be able to close the stream
1313         https://bugs.webkit.org/show_bug.cgi?id=143363
1314
1315         Reviewed by Benjamin Poulain.
1316
1317         Implements https://streams.spec.whatwg.org/#close-readable-stream.
1318         When the "close" JS function is called, the stream is getting closed.
1319         The stream state is changed to close and if it has a reader, the reader gets closed as well:
1320         The reader resolves the closed promise and releases the stream.
1321
1322         Enabled the possibility to resolve a promise with any JS value.
1323         This is used to resolve closed promise with jsUndefined and will be used for read promises in
1324         the future as well, though of course it is not restricted to Streams.
1325
1326         Covered by reference tests that are now passing.
1327
1328         * Modules/streams/ReadableStream.h:
1329         * Modules/streams/ReadableStream.cpp:
1330         (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
1331         * Modules/streams/ReadableStreamReader.cpp:
1332         (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
1333         (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
1334         in particular closed/errored state.
1335         (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
1336         (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
1337         immediately if the stream is already closed.
1338         (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
1339         resolves the promise and releases the stream.
1340         * Modules/streams/ReadableStreamReader.h:
1341         (WebCore::ReadableStreamReader::State): Added.
1342         * bindings/js/JSDOMPromise.h:
1343         (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
1344         a custom JS value.
1345         * bindings/js/JSReadableStreamControllerCustom.cpp:
1346         (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
1347         stream.
1348         * bindings/js/JSReadableStreamReaderCustom.cpp:
1349         (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
1350
1351 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
1352
1353         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
1354         https://bugs.webkit.org/show_bug.cgi?id=144255
1355
1356         Reviewed by Carlos Garcia Campos.
1357
1358         * rendering/RenderBox.cpp:
1359         (WebCore::RenderBox::computeLogicalHeight):
1360
1361 2015-04-27  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1362
1363         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
1364         https://bugs.webkit.org/show_bug.cgi?id=143711
1365
1366         Reviewed by Darin Adler.
1367
1368         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
1369         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
1370         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
1371
1372         Test: http/tests/appcache/simple-video-sync.html
1373
1374         * html/HTMLMediaElement.cpp:
1375         (WebCore::HTMLMediaElement::parseAttribute):
1376         * loader/DocumentThreadableLoader.cpp:
1377         (WebCore::DocumentThreadableLoader::loadRequest):
1378         * loader/FrameLoader.cpp:
1379         (WebCore::FrameLoader::loadResourceSynchronously):
1380         * loader/FrameLoader.h:
1381         * loader/appcache/ApplicationCacheHost.cpp:
1382         (WebCore::ApplicationCacheHost::maybeLoadResource):
1383         (WebCore::ApplicationCacheHost::createFileURL):
1384         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1385         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1386         * loader/appcache/ApplicationCacheHost.h:
1387         * xml/XSLTProcessorLibxslt.cpp:
1388         (WebCore::docLoaderFunc):
1389         * xml/parser/XMLDocumentParserLibxml2.cpp:
1390         (WebCore::openFunc):
1391
1392 2015-04-24  Philippe Normand  <pnormand@igalia.com>
1393
1394         [JHBuild] Move to upstream OpenWebRTC
1395         https://bugs.webkit.org/show_bug.cgi?id=144145
1396
1397         Reviewed by Carlos Garcia Campos.
1398
1399         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
1400         (WebCore::initializeOpenWebRTC): Update with new owr_init API.
1401
1402 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1403
1404         [SOUP] Add initial implementation of NetworkProcess disk cache
1405         https://bugs.webkit.org/show_bug.cgi?id=143872
1406
1407         Reviewed by Martin Robinson.
1408
1409         Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
1410         is not a GObject and has copy/free functions instead of ref/unref,
1411         it's internally refcounted, so we could use copy/free as
1412         ref/unref.
1413
1414         * PlatformGTK.cmake:
1415         * platform/network/soup/GRefPtrSoup.cpp: Added.
1416         (WTF::refGPtr):
1417         (WTF::derefGPtr):
1418         * platform/network/soup/GRefPtrSoup.h: Added.
1419
1420 2015-04-26  Manuel Rego Casasnovas  <rego@igalia.com>
1421
1422         [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
1423         https://bugs.webkit.org/show_bug.cgi?id=144144
1424
1425         Reviewed by Darin Adler.
1426
1427         Change order in hasDefiniteLogicalHeight() ifs to consider definite
1428         absolutely positioned elements.
1429
1430         Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
1431
1432         * rendering/RenderBox.cpp:
1433         (WebCore::RenderBox::hasDefiniteLogicalHeight):
1434
1435 2015-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1436
1437         SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
1438         https://bugs.webkit.org/show_bug.cgi?id=144137
1439
1440         Reviewed by Darin Adler.
1441
1442         The SourceAlpha should be driven from the last applied FilterEffect. This
1443         will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
1444         than just getting the SourceGraphic reference from FilterEffectRenderer.
1445
1446         This is based on the Blink patch:
1447         https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
1448
1449         Test: svg/filters/sourceAlpha-input-filter-effect.html
1450         
1451         * platform/graphics/filters/SourceAlpha.cpp:
1452         (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
1453         rather than a Filter.
1454         
1455         (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
1456         rect from the wrapped FilterEffect.
1457         
1458         (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
1459         from the wrapped FilterEffect.
1460         
1461         (WebCore::SourceAlpha::SourceAlpha): 
1462         * platform/graphics/filters/SourceAlpha.h:
1463         (WebCore::SourceAlpha::SourceAlpha): Deleted.
1464         Reimplement the constructor of the SourceAlpha such that it wraps the
1465         sourceEffect in its inputEffects.
1466     
1467         * rendering/FilterEffectRenderer.cpp:
1468         (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
1469         comment and do exactly what it said. This matches the implementation of
1470         Gecko and Blink.
1471         
1472         * rendering/svg/RenderSVGResourceFilter.cpp:
1473         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1474         Delete the extra argument.
1475
1476         * svg/graphics/filters/SVGFilterBuilder.cpp:
1477         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
1478         * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
1479         passed source FilterEffect.
1480
1481         * platform/graphics/filters/FEBlend.cpp:
1482         * platform/graphics/filters/FEBlend.h:
1483         * platform/graphics/filters/FEColorMatrix.cpp:
1484         * platform/graphics/filters/FEColorMatrix.h:
1485         * platform/graphics/filters/FEComponentTransfer.cpp:
1486         * platform/graphics/filters/FEComponentTransfer.h:
1487         * platform/graphics/filters/FEComposite.cpp:
1488         * platform/graphics/filters/FEComposite.h:
1489         * platform/graphics/filters/FEConvolveMatrix.cpp:
1490         * platform/graphics/filters/FEConvolveMatrix.h:
1491         * platform/graphics/filters/FEDiffuseLighting.cpp:
1492         * platform/graphics/filters/FEDiffuseLighting.h:
1493         * platform/graphics/filters/FEDisplacementMap.cpp:
1494         * platform/graphics/filters/FEDisplacementMap.h:
1495         * platform/graphics/filters/FEDropShadow.cpp:
1496         * platform/graphics/filters/FEDropShadow.h:
1497         * platform/graphics/filters/FEFlood.cpp:
1498         * platform/graphics/filters/FEFlood.h:
1499         * platform/graphics/filters/FEGaussianBlur.cpp:
1500         * platform/graphics/filters/FEGaussianBlur.h:
1501         * platform/graphics/filters/FELighting.cpp:
1502         * platform/graphics/filters/FELighting.h:
1503         * platform/graphics/filters/FEMerge.cpp:
1504         * platform/graphics/filters/FEMerge.h:
1505         * platform/graphics/filters/FEMorphology.cpp:
1506         * platform/graphics/filters/FEMorphology.h:
1507         * platform/graphics/filters/FEOffset.cpp:
1508         * platform/graphics/filters/FEOffset.h:
1509         * platform/graphics/filters/FESpecularLighting.cpp:
1510         * platform/graphics/filters/FESpecularLighting.h:
1511         * platform/graphics/filters/FETile.cpp:
1512         * platform/graphics/filters/FETile.h:
1513         * platform/graphics/filters/FETurbulence.cpp:
1514         * platform/graphics/filters/FETurbulence.h:
1515         * platform/graphics/filters/Filter.h:
1516         * platform/graphics/filters/FilterEffect.cpp:
1517         * platform/graphics/filters/FilterEffect.h:
1518         * platform/graphics/filters/SourceGraphic.cpp:
1519         * platform/graphics/filters/SourceGraphic.h:
1520         * rendering/svg/RenderSVGResourceFilter.h:
1521         * rendering/svg/SVGRenderTreeAsText.cpp:
1522         Code clean up: Pointer to reference conversion. It starts by converting
1523         FilterEffect::m_filter from pointer to reference and it kept expanding.
1524         All the creations of FilterEffect were happening by passing "this" so
1525         passing "*this" did not require to check whether the pointer is nil.
1526
1527         * svg/SVGFEBlendElement.cpp:
1528         * svg/SVGFEBlendElement.h:
1529         * svg/SVGFEColorMatrixElement.cpp:
1530         * svg/SVGFEColorMatrixElement.h:
1531         * svg/SVGFEComponentTransferElement.cpp:
1532         * svg/SVGFEComponentTransferElement.h:
1533         * svg/SVGFECompositeElement.cpp:
1534         * svg/SVGFECompositeElement.h:
1535         * svg/SVGFEConvolveMatrixElement.cpp:
1536         * svg/SVGFEConvolveMatrixElement.h:
1537         * svg/SVGFEDiffuseLightingElement.cpp:
1538         * svg/SVGFEDiffuseLightingElement.h:
1539         * svg/SVGFEDisplacementMapElement.cpp:
1540         * svg/SVGFEDisplacementMapElement.h:
1541         * svg/SVGFEDropShadowElement.cpp:
1542         * svg/SVGFEDropShadowElement.h:
1543         * svg/SVGFEFloodElement.cpp:
1544         * svg/SVGFEFloodElement.h:
1545         * svg/SVGFEGaussianBlurElement.cpp:
1546         * svg/SVGFEGaussianBlurElement.h:
1547         * svg/SVGFEImageElement.cpp:
1548         * svg/SVGFEImageElement.h:
1549         * svg/SVGFEMergeElement.cpp:
1550         * svg/SVGFEMergeElement.h:
1551         * svg/SVGFEMorphologyElement.cpp:
1552         * svg/SVGFEMorphologyElement.h:
1553         * svg/SVGFEOffsetElement.cpp:
1554         * svg/SVGFEOffsetElement.h:
1555         * svg/SVGFESpecularLightingElement.cpp:
1556         * svg/SVGFESpecularLightingElement.h:
1557         * svg/SVGFETileElement.cpp:
1558         * svg/SVGFETileElement.h:
1559         * svg/SVGFETurbulenceElement.cpp:
1560         * svg/SVGFETurbulenceElement.h:
1561         * svg/SVGFilterPrimitiveStandardAttributes.h:
1562         * svg/graphics/filters/SVGFEImage.cpp:
1563         * svg/graphics/filters/SVGFEImage.h:
1564         Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
1565         conversion.
1566
1567 2015-04-26  Darin Adler  <darin@apple.com>
1568
1569         REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
1570         https://bugs.webkit.org/show_bug.cgi?id=144237
1571
1572         Reviewed by Simon Fraser.
1573
1574         No test because DumpRenderTree and WebKitTestRunner don't have a good method
1575         for testing behaviors that are specific to active windows. That's the same reason
1576         that the change that caused this bug didn't come with a regression test.
1577
1578         * rendering/RenderTheme.cpp:
1579         (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
1580         clarify the meaning of the setInsideDefaultButton function, and added an
1581         isDisabledFormControl check so it won't trigger on a disabled button.
1582         (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
1583         alphabetical order to match the rest of the switch statement ordering.
1584
1585         * rendering/RenderThemeMac.mm:
1586         (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
1587         alphabetical order to match the rest of the switch statement ordering. Also
1588         fixed its behavior on older versions of OS X; it should just return the same
1589         thing that CSSValueButtontext would return in that context.
1590
1591 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
1592
1593         [ES6] Implement ES6 template literals
1594         https://bugs.webkit.org/show_bug.cgi?id=142691
1595
1596         Reviewed by Darin Adler.
1597
1598         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
1599
1600         * Configurations/FeatureDefines.xcconfig:
1601
1602 2015-04-26  Javier Fernandez  <jfernandez@igalia.com>
1603
1604         [CSS Grid Layout] Support for align-self and align-items in grid layout
1605         https://bugs.webkit.org/show_bug.cgi?id=133225
1606
1607         Reviewed by Darin Adler.
1608
1609         Implementation of align-self and align-items properties for grid. It supports
1610         different writing-modes and direction. Margins, borders and paddings are also
1611         considered when computing the final position and stretched size.
1612
1613         Overflow handling is still missing and will be added when implemented row-axis
1614         alignment support.
1615
1616         Test: fast/css-grid-layout/grid-align.html
1617
1618         * rendering/RenderBox.cpp:
1619         (WebCore::RenderBox::computeLogicalHeight):
1620         * rendering/RenderGrid.cpp:
1621         (WebCore::RenderGrid::logicalContentHeightForChild):
1622         (WebCore::RenderGrid::layoutGridItems):
1623         (WebCore::computeOverflowAlignmentOffset):
1624         (WebCore::RenderGrid::endOfRowForChild):
1625         (WebCore::RenderGrid::startOfRowForChild):
1626         (WebCore::RenderGrid::centeredRowPositionForChild):
1627         (WebCore::marginWidthForChild):
1628         (WebCore::marginHeightForChild):
1629         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
1630         (WebCore::RenderGrid::needToStretchChildLogicalHeight):
1631         (WebCore::RenderGrid::marginLogicalHeightForChild):
1632         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
1633         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1634         (WebCore::RenderGrid::rowPositionForChild):
1635         (WebCore::RenderGrid::findChildLogicalPosition):
1636         (WebCore::RenderGrid::populateGridPositions): Deleted.
1637         * rendering/RenderGrid.h:
1638
1639 2015-04-26  Doug Russell  <d_russell@apple.com>
1640
1641         AX: richer text change notifications (142719)
1642         https://bugs.webkit.org/show_bug.cgi?id=142719
1643
1644         Reviewed by Darin Adler.
1645
1646         Richer accessibility value change notifications. Introduce AXTextEditType,
1647         postTextStateChangeNotification and postTextReplacementNotification to give assistive
1648         tech apps more reliable context for responding to changes in web content. Also implement
1649         a mechanism to post value changes in password form fields in coalesced ticks to thwart
1650         analyzing the cadence of changes.
1651
1652         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
1653         and an overload of postTextReplacementNotification to give assistive tech apps more
1654         reliable context for responding to changes in web content selection. Also block posting
1655         selection changes on password fields.
1656
1657         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
1658                platform/mac/accessibility/selection-change-userinfo.html
1659                platform/mac/accessibility/value-change-userinfo.html
1660
1661         * CMakeLists.txt:
1662         * WebCore.vcxproj/WebCore.vcxproj:
1663         * WebCore.vcxproj/WebCore.vcxproj.filters:
1664         * WebCore.xcodeproj/project.pbxproj:
1665         * accessibility/AXObjectCache.cpp:
1666         (WebCore::AXObjectCache::AXObjectCache):
1667         (WebCore::AXObjectCache::notificationPostTimerFired):
1668         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
1669         (WebCore::AXObjectCache::showIntent):
1670         (WebCore::AXObjectCache::setTextSelectionIntent):
1671         (WebCore::isPasswordFieldOrContainedByPasswordField):
1672         (WebCore::AXObjectCache::postTextStateChangeNotification):
1673         (WebCore::AXObjectCache::postTextReplacementNotification):
1674         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
1675         (WebCore::AXObjectCache::rootWebArea):
1676         (WebCore::AXObjectCache::textChangeForEditType):
1677         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
1678         (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
1679         * accessibility/AXObjectCache.h:
1680         (WebCore::AXObjectCache::postTextStateChangeNotification):
1681         (WebCore::AXObjectCache::postTextReplacementNotification):
1682         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
1683         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1684         (WebCore::AXObjectCache::textChangeForEditType):
1685         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1686         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
1687         (WebCore::AXObjectCache::getOrCreate): Deleted.
1688         (WebCore::AXObjectCache::attachWrapper): Deleted.
1689         * accessibility/AXTextStateChangeIntent.h: Added.
1690         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
1691         * accessibility/AccessibilityNodeObject.cpp:
1692         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
1693         * accessibility/AccessibilityNodeObject.h:
1694         * accessibility/AccessibilityObject.cpp:
1695         (WebCore::AccessibilityObject::isContainedByPasswordField):
1696         * accessibility/AccessibilityObject.h:
1697         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
1698         (WebCore::AccessibilityObject::isPasswordField): Deleted.
1699         * accessibility/AccessibilityRenderObject.cpp:
1700         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1701         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
1702         * accessibility/AccessibilityScrollView.h:
1703         * accessibility/atk/AXObjectCacheAtk.cpp:
1704         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1705         * accessibility/ios/AXObjectCacheIOS.mm:
1706         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
1707         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1708         * accessibility/mac/AXObjectCacheMac.mm:
1709         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
1710         (WebCore::AXPostNotificationWithUserInfo):
1711         (WebCore::AXObjectCache::postPlatformNotification):
1712         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
1713         (WebCore::textReplacementChangeDictionary):
1714         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1715         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1716         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1717         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
1718         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
1719         (arrayRemovingNonJSONTypes):
1720         (dictionaryRemovingNonJSONTypes):
1721         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
1722         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
1723         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1724         (textMarkerRangeFromVisiblePositions):
1725         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
1726         * editing/AppendNodeCommand.cpp:
1727         (WebCore::AppendNodeCommand::AppendNodeCommand):
1728         (WebCore::sendAXTextChangedIgnoringLineBreaks):
1729         (WebCore::AppendNodeCommand::doApply):
1730         (WebCore::AppendNodeCommand::doUnapply):
1731         * editing/AppendNodeCommand.h:
1732         (WebCore::AppendNodeCommand::create):
1733         * editing/ApplyStyleCommand.cpp:
1734         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
1735         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
1736         * editing/ApplyStyleCommand.h:
1737         * editing/CompositeEditCommand.cpp:
1738         (WebCore::EditCommandComposition::unapplyEditType):
1739         (WebCore::CompositeEditCommand::CompositeEditCommand):
1740         (WebCore::CompositeEditCommand::apply):
1741         (WebCore::CompositeEditCommand::insertParagraphSeparator):
1742         (WebCore::CompositeEditCommand::insertNodeBefore):
1743         (WebCore::CompositeEditCommand::appendNode):
1744         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
1745         (WebCore::CompositeEditCommand::insertTextIntoNode):
1746         (WebCore::CompositeEditCommand::deleteTextFromNode):
1747         (WebCore::CompositeEditCommand::replaceTextInNode):
1748         (WebCore::CompositeEditCommand::moveParagraphs):
1749         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
1750         (WebCore::CompositeEditCommand::applyStyle): Deleted.
1751         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
1752         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
1753         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
1754         (WebCore::CompositeEditCommand::inputText): Deleted.
1755         * editing/CompositeEditCommand.h:
1756         * editing/DeleteFromTextNodeCommand.cpp:
1757         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
1758         (WebCore::DeleteFromTextNodeCommand::doApply):
1759         (WebCore::DeleteFromTextNodeCommand::doUnapply):
1760         * editing/DeleteFromTextNodeCommand.h:
1761         (WebCore::DeleteFromTextNodeCommand::create):
1762         (WebCore::DeleteFromTextNodeCommand::deletedText):
1763         * editing/DeleteSelectionCommand.cpp:
1764         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
1765         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
1766         * editing/DeleteSelectionCommand.h:
1767         (WebCore::DeleteSelectionCommand::create):
1768         * editing/DictationCommand.cpp:
1769         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
1770         (WebCore::DictationCommand::insertParagraphSeparator):
1771         * editing/EditAction.h:
1772         * editing/EditCommand.cpp:
1773         (WebCore::EditCommand::EditCommand):
1774         (WebCore::EditCommand::editingAction):
1775         (WebCore::EditCommand::applyEditType):
1776         (WebCore::EditCommand::unapplyEditType):
1777         (WebCore::SimpleEditCommand::SimpleEditCommand):
1778         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
1779         (WebCore::EditCommand::setParent): Deleted.
1780         * editing/EditCommand.h:
1781         * editing/EditingAllInOne.cpp:
1782         * editing/Editor.cpp:
1783         (WebCore::Editor::handleTextEvent):
1784         (WebCore::Editor::deleteSelectionWithSmartDelete):
1785         (WebCore::Editor::replaceSelectionWithFragment):
1786         (WebCore::Editor::replaceSelectionWithText):
1787         (WebCore::Editor::appliedEditing):
1788         (WebCore::Editor::unappliedEditing):
1789         (WebCore::Editor::performCutOrCopy):
1790         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1791         (WebCore::Editor::changeBackToReplacedString):
1792         (WebCore::Editor::transpose):
1793         (WebCore::Editor::changeSelectionAfterCommand):
1794         * editing/Editor.h:
1795         * editing/EditorCommand.cpp:
1796         (WebCore::executeInsertFragment):
1797         * editing/FrameSelection.cpp:
1798         (WebCore::FrameSelection::moveTo):
1799         (WebCore::FrameSelection::moveWithoutValidationTo):
1800         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
1801         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
1802         (WebCore::FrameSelection::setSelection):
1803         (WebCore::FrameSelection::updateAndRevealSelection):
1804         (WebCore::isBoundary):
1805         (WebCore::FrameSelection::textSelectionIntent):
1806         (WebCore::FrameSelection::modify):
1807         (WebCore::FrameSelection::selectAll):
1808         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
1809         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
1810         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
1811         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
1812         * editing/FrameSelection.h:
1813         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1814         (WebCore::FrameSelection::selection): Deleted.
1815         * editing/InsertIntoTextNodeCommand.cpp:
1816         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
1817         (WebCore::InsertIntoTextNodeCommand::doApply):
1818         (WebCore::InsertIntoTextNodeCommand::doUnapply):
1819         * editing/InsertIntoTextNodeCommand.h:
1820         (WebCore::InsertIntoTextNodeCommand::create):
1821         (WebCore::InsertIntoTextNodeCommand::insertedText):
1822         * editing/InsertNodeBeforeCommand.cpp:
1823         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
1824         (WebCore::InsertNodeBeforeCommand::doApply):
1825         (WebCore::InsertNodeBeforeCommand::doUnapply):
1826         * editing/InsertNodeBeforeCommand.h:
1827         (WebCore::InsertNodeBeforeCommand::create):
1828         * editing/InsertParagraphSeparatorCommand.cpp:
1829         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
1830         * editing/InsertParagraphSeparatorCommand.h:
1831         (WebCore::InsertParagraphSeparatorCommand::create):
1832         * editing/InsertTextCommand.cpp:
1833         (WebCore::InsertTextCommand::InsertTextCommand):
1834         * editing/InsertTextCommand.h:
1835         (WebCore::InsertTextCommand::create):
1836         (WebCore::InsertTextCommand::createWithMarkerSupplier):
1837         * editing/MoveSelectionCommand.cpp:
1838         (WebCore::MoveSelectionCommand::doApply):
1839         * editing/RemoveNodePreservingChildrenCommand.cpp:
1840         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
1841         * editing/RemoveNodePreservingChildrenCommand.h:
1842         (WebCore::RemoveNodePreservingChildrenCommand::create):
1843         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
1844         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
1845         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
1846         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
1847         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
1848         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
1849         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
1850         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
1851         * editing/ReplaceSelectionCommand.cpp:
1852         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
1853         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
1854         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
1855         * editing/ReplaceSelectionCommand.h:
1856         (WebCore::ReplaceSelectionCommand::create):
1857         * editing/TypingCommand.cpp:
1858         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
1859         (WebCore::TypingCommand::insertParagraphSeparator):
1860         * editing/atk/FrameSelectionAtk.cpp:
1861         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1862         * editing/ios/DictationCommandIOS.cpp:
1863         (WebCore::DictationCommandIOS::DictationCommandIOS):
1864         * editing/ios/DictationCommandIOS.h:
1865         * editing/mac/FrameSelectionMac.mm:
1866         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1867         * html/HTMLTextFormControlElement.cpp:
1868         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1869         * page/DragController.cpp:
1870         (WebCore::DragController::concludeEditDrag):
1871         * page/EventHandler.cpp:
1872         (WebCore::setInitialKeyboardSelection):
1873         * page/FocusController.cpp:
1874         (WebCore::FocusController::advanceFocusInDocumentOrder):
1875
1876 2015-04-26  Darin Adler  <darin@apple.com>
1877
1878         REGRESSION (r176751): line-height ignored in <button> elements
1879         https://bugs.webkit.org/show_bug.cgi?id=144234
1880
1881         Reviewed by Antti Koivisto.
1882
1883         Test: fast/forms/button-line-height.html
1884
1885         The theme code was overriding line heights on all themed form controls.
1886         Instead it should have only overridden line height when the theme overrides the font.
1887         For <input type=button> on Mac, the theme always overrides the font, but for
1888         other elements like <button> it does not.
1889
1890         * platform/Theme.h: Changed controlFont to return an Optional so we can tell
1891         when the theme is overriding the font. Otherwise if the font from the user-agent
1892         style sheet and the font from the theme are the same, we will think we are not
1893         overriding the font when we actually are.
1894
1895         * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
1896         * platform/mac/ThemeMac.mm:
1897         (WebCore::ThemeMac::controlFont): Ditto.
1898
1899         * rendering/RenderTheme.cpp:
1900         (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
1901         overriden by the theme, all the time for PushButtonPart on Mac, and not at all
1902         for other parts. Also tightened up the logic a little since RenderStyle's
1903         setFontDescription already does an "==" comparison; we don't have to do
1904         that twice.
1905
1906 2015-04-26  Darin Adler  <darin@apple.com>
1907
1908         REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
1909         https://bugs.webkit.org/show_bug.cgi?id=137163
1910
1911         Reviewed by Andy Estes.
1912
1913         Test: fast/notifications/request-notification-permission-while-reloading.html
1914
1915         The test doesn't crash under WebKit2, but that's still OK for our purposes.
1916
1917         * Modules/notifications/NotificationCenter.cpp:
1918         (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
1919         (WebCore::NotificationCenter::createNotification): Moved here from the header.
1920         (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
1921         center when we need to defer a callback. Also use a lambda for the callback and changed
1922         the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
1923         bindings were not transferring ownership of the VoidCallback. The new type is a little
1924         strange but it's consistent with how the bindings work right now.
1925         (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
1926         to match the ref we did above.
1927         (WebCore::NotificationCenter::requestTimedOut): Deleted.
1928         (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
1929         (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
1930         (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
1931         (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
1932
1933         * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
1934         Changed the argument type for requestPermission to match the reality of what's passed by the
1935         bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
1936         vector of std::function.
1937
1938 2015-04-26  Simon Fraser  <simon.fraser@apple.com>
1939
1940         Modernize animations code
1941         https://bugs.webkit.org/show_bug.cgi?id=144196
1942
1943         Reviewed by Darin Adler.
1944         
1945         General cleanup in animation-related code.
1946         
1947         Use C++ references where possible. Use modern loops. Make classes fast-allocated.
1948         Use C++11 member initialization. Order member variables to optimize packing.
1949         
1950         This removes some null checks in CompositeAnimation, but the values in m_transitions
1951         and m_keyframeAnimations can never be null.
1952         
1953         No behavior change.
1954
1955         * page/animation/AnimationBase.cpp:
1956         (WebCore::AnimationBase::AnimationBase):
1957         (WebCore::AnimationBase::animationsMatch):
1958         (WebCore::AnimationBase::updateStateMachine):
1959         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1960         (WebCore::AnimationBase::beginAnimationUpdateTime):
1961         (WebCore::AnimationBase::getElapsedTime):
1962         * page/animation/AnimationBase.h:
1963         (WebCore::AnimationBase::animation):
1964         (WebCore::AnimationBase::setAnimation):
1965         * page/animation/AnimationController.cpp:
1966         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
1967         (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
1968         * page/animation/CompositeAnimation.cpp:
1969         (WebCore::CompositeAnimation::CompositeAnimation):
1970         (WebCore::CompositeAnimation::clearRenderer):
1971         (WebCore::CompositeAnimation::updateTransitions):
1972         (WebCore::CompositeAnimation::updateKeyframeAnimations):
1973         (WebCore::CompositeAnimation::animate):
1974         (WebCore::CompositeAnimation::getAnimatedStyle):
1975         (WebCore::CompositeAnimation::timeToNextService):
1976         (WebCore::CompositeAnimation::getAnimationForProperty):
1977         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
1978         (WebCore::CompositeAnimation::suspendAnimations):
1979         (WebCore::CompositeAnimation::resumeAnimations):
1980         (WebCore::CompositeAnimation::overrideImplicitAnimations):
1981         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
1982         (WebCore::CompositeAnimation::isAnimatingProperty):
1983         (WebCore::CompositeAnimation::pauseTransitionAtTime):
1984         (WebCore::CompositeAnimation::numberOfActiveAnimations):
1985         * page/animation/CompositeAnimation.h:
1986         (WebCore::CompositeAnimation::create):
1987         (WebCore::CompositeAnimation::animationController):
1988         * page/animation/ImplicitAnimation.cpp:
1989         (WebCore::ImplicitAnimation::ImplicitAnimation):
1990         (WebCore::ImplicitAnimation::sendTransitionEvent):
1991         * page/animation/ImplicitAnimation.h:
1992         (WebCore::ImplicitAnimation::create):
1993         * page/animation/KeyframeAnimation.cpp:
1994         (WebCore::KeyframeAnimation::KeyframeAnimation):
1995         (WebCore::KeyframeAnimation::animate):
1996         (WebCore::KeyframeAnimation::getAnimatedStyle):
1997         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1998         (WebCore::KeyframeAnimation::startAnimation):
1999         (WebCore::KeyframeAnimation::sendAnimationEvent):
2000         (WebCore::KeyframeAnimation::overrideAnimations):
2001         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
2002         (WebCore::KeyframeAnimation::timeToNextService):
2003         * page/animation/KeyframeAnimation.h:
2004         * platform/animation/Animation.cpp:
2005         (WebCore::Animation::animationsMatch):
2006         * platform/animation/Animation.h:
2007         * rendering/RenderLayer.cpp:
2008         (WebCore::RenderLayer::paint):
2009         (WebCore::performOverlapTests):
2010         * rendering/style/KeyframeList.h:
2011         (WebCore::KeyframeList::properties):
2012         (WebCore::KeyframeList::keyframes):
2013         (WebCore::KeyframeList::beginProperties): Deleted.
2014         (WebCore::KeyframeList::endProperties): Deleted.
2015         (WebCore::KeyframeList::operator[]): Deleted.
2016         * rendering/style/RenderStyle.h:
2017
2018 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
2019
2020         Expand compositing coverage rect when scrolling and animating
2021         https://bugs.webkit.org/show_bug.cgi?id=144214
2022         rdar://problem/20695926
2023
2024         Reviewed by Darin Adler.
2025         
2026         r183300 added a secondary rect that gets mapped through graphics layers during
2027         layer flushing, which represents a rect, in layer coordinates, that represents
2028         the portion of this layer that's visible in the viewport.
2029         
2030         This patch extends that rect based on scrolling and animating, with the extended
2031         coverage rect being mapped into descendants (where it's used to determine whether
2032         they should detach their backing store). This required moving the responsibility for
2033         extending the coverage rect from TileController (where it was used to compute
2034         tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
2035         of coverage rect, and pushes it onto TileControllers.
2036
2037         Test: compositing/tiling/transform-origin-tiled.html
2038
2039         * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
2040         TiledBacking from outside; new functions reflect that.
2041         * platform/graphics/ca/GraphicsLayerCA.cpp:
2042         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
2043         old visible rect to commitLayerChangesBeforeSublayers.
2044         (WebCore::accumulatesTransform):
2045         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
2046         then adjustCoverageRect() which adjusts for scrolling and animations.
2047         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
2048         TransformState, but we can only use this if mapping it through various transforms didn't clamp
2049         it (which can happen with severe rotations in perspective).
2050         (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
2051         ask the TileController to do coverage adjustment (code which should move into here eventually).
2052         For other tiled layers, do motion-based adjustment. This should really be done for all layers
2053         (an animating non-tiled layer may contain a tiled layer).
2054         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
2055         any more; layers only react to changed in coverage rect now.
2056         (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
2057         coverage rect, here we push the new rect back into the TransformState so it will affect
2058         descendants.
2059         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2060         (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
2061         hand-in-hand now.
2062         (WebCore::GraphicsLayerCA::changeLayerTypeTo):
2063         (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
2064         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
2065         (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
2066         * platform/graphics/ca/GraphicsLayerCA.h:
2067         * platform/graphics/ca/TileController.cpp:
2068         (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
2069         logging now.
2070         (WebCore::TileController::setCoverageRect):
2071         (WebCore::TileController::tilesWouldChangeForCoverageRect):
2072         (WebCore::TileController::revalidateTiles):
2073         (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
2074         is called at the top of committing the owning layer, we haven't yet pushed a new size to the
2075         underlying platform layer (which TileController::bounds() consults).
2076         (WebCore::TileController::bounds):
2077         (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
2078         underlying layer hasn't been updated yet.
2079         (WebCore::TileController::didRevalidateTiles):
2080         (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
2081         * platform/graphics/ca/TileController.h:
2082         * platform/graphics/ca/TileCoverageMap.cpp:
2083         (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows 
2084         a dark blue outline for the coverage rect.
2085         (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
2086         content inset is non-zero.
2087         * platform/graphics/ca/TileCoverageMap.h:
2088         * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
2089         (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
2090         (WebCore::TileGrid::revalidateTiles):
2091         (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
2092         * platform/graphics/ca/TileGrid.h:
2093         * platform/graphics/transforms/TransformState.cpp:
2094         (WebCore::TransformState::operator=):
2095         (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
2096         (WebCore::TransformState::mappedSecondaryQuad): Ditto.
2097         (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
2098         to pass in a secondary quad, and get it mapped into the coordinate space of the last
2099         "flattening" state (since the TransformState may have in-flight XY offset, or transform).
2100         This mapping is achieved by re-using mapQuad(), but in the inverse direction.
2101         (WebCore::TransformState::mapQuad): Make direction a parameter.
2102         (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
2103         quad. Failure was detected by tests.
2104         * platform/graphics/transforms/TransformState.h:
2105         (WebCore::TransformState::isMappingSecondaryQuad):
2106         (WebCore::TransformState::direction):
2107         (WebCore::TransformState::inverseDirection):
2108         (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
2109
2110 2015-04-25  Dan Bernstein  <mitz@apple.com>
2111
2112         Updated expected bindings generation test results after r183343.
2113
2114         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
2115         * bindings/scripts/test/ObjC/DOMTestCallback.h:
2116         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
2117         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2118         * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
2119         * bindings/scripts/test/ObjC/DOMTestException.h:
2120         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
2121         * bindings/scripts/test/ObjC/DOMTestInterface.h:
2122         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
2123         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
2124         * bindings/scripts/test/ObjC/DOMTestNode.h:
2125         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
2126         * bindings/scripts/test/ObjC/DOMTestObj.h:
2127         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
2128         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2129         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
2130         * bindings/scripts/test/ObjC/DOMattribute.h:
2131         * bindings/scripts/test/ObjC/DOMreadonly.h:
2132
2133 2015-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
2134
2135         font-synthesis's initial value is "style weight"
2136         https://bugs.webkit.org/show_bug.cgi?id=144195
2137
2138         Reviewed by Darin Adler.
2139
2140         Updated fast/css3-text/font-synthesis-parse.html.
2141
2142         * rendering/style/RenderStyle.h:
2143
2144 2015-04-25  Commit Queue  <commit-queue@webkit.org>
2145
2146         Unreviewed, rolling out r183305.
2147         https://bugs.webkit.org/show_bug.cgi?id=144213
2148
2149         Crashes on wikipedia (Requested by litherum on #webkit).
2150
2151         Reverted changeset:
2152
2153         "[Cocoa] FontPlatformData's equality check should always use
2154         reference URLs"
2155         https://bugs.webkit.org/show_bug.cgi?id=144168
2156         http://trac.webkit.org/changeset/183305
2157
2158 2015-04-25  Dan Bernstein  <mitz@apple.com>
2159
2160         WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
2161         https://bugs.webkit.org/show_bug.cgi?id=144201
2162
2163         Reviewed by Darin Adler.
2164
2165         Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
2166         9876.5.
2167
2168         * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
2169         use 9876_5 in availability macros. Removed the definition of
2170         __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
2171
2172         * bindings/scripts/CodeGeneratorObjC.pm:
2173         (ReadPublicInterfaces): Use 9876_5 instead of TBD.
2174
2175 2015-04-25  Timothy Hatcher  <timothy@apple.com>
2176
2177         Update localized strings.
2178
2179         * English.lproj/Localizable.strings: Updated.
2180
2181 2015-04-25  Darin Adler  <darin@apple.com>
2182
2183         Crash if IDBTransaction is aborted right after it's created
2184         https://bugs.webkit.org/show_bug.cgi?id=144199
2185
2186         Reviewed by Simon Fraser.
2187
2188         Test: storage/indexeddb/transaction-abort.html
2189
2190         * Modules/indexeddb/IDBTransactionBackend.cpp:
2191         (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
2192         transaction if it is already complete (has been aborted).
2193
2194 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
2195
2196         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2197         https://bugs.webkit.org/show_bug.cgi?id=144182
2198
2199         Reviewed by Simon Fraser.
2200
2201         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2202         * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2203         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2204         * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2205         * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2206         * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2207         * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2208         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2209         * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2210         * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2211         * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2212
2213 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2214
2215         [Cocoa] FontPlatformData's equality check should always use reference URLs
2216         https://bugs.webkit.org/show_bug.cgi?id=144168
2217
2218         Reviewed by Tim Horton.
2219
2220         <rdar://problem/18985642> is not fixed, so we need to continue using the older
2221         objectForEqualityCheck().
2222
2223         No new tests because there is no behavior change.
2224
2225         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2226         (WebCore::FontPlatformData::objectForEqualityCheck):
2227
2228 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2229
2230         Implement parsing support for font-synthesis CSS property
2231         https://bugs.webkit.org/show_bug.cgi?id=144180
2232         <rdar://problem/20692791>
2233         <rdar://problem/20625024>
2234
2235         Reviewed by Tim Horton.
2236
2237         See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
2238
2239         This property allows web authors to opt out of font synthesis. This patch only
2240         implements parsing support for the property.
2241
2242         Test: fast/css3-text/font-synthesis-parse.html
2243
2244         * css/CSSComputedStyleDeclaration.cpp:
2245         (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
2246         (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
2247         * css/CSSParser.cpp:
2248         (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
2249         (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
2250         "none | [ weight || style ]"
2251         * css/CSSParser.h: Function signature.
2252         * css/CSSPropertyNames.in: New CSS property name.
2253         * css/CSSValueKeywords.in: New CSS value names.
2254         * css/StyleBuilderCustom.h:
2255         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
2256         representation of font-synthesis for a given CSSValue.
2257         * rendering/style/RenderStyle.h: Function signature.
2258         * rendering/style/RenderStyleConstants.h: Internal representation of
2259         font-synthesis.
2260         * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
2261         related to this internal representation.
2262
2263 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2264
2265         Have the web inspector report accurate memory use for layers with detached backing store
2266         https://bugs.webkit.org/show_bug.cgi?id=144179
2267
2268         Reviewed by Dean Jackson.
2269
2270         Only report memory use for layers whose backing store is attached.
2271
2272         * platform/graphics/ca/GraphicsLayerCA.cpp:
2273         * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
2274         which platforms can override if they allow backing store detaching.
2275
2276 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2277
2278         Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
2279         https://bugs.webkit.org/show_bug.cgi?id=144165
2280
2281         Reviewed by Dean Jackson.
2282         
2283         Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
2284         which maps this rect through all the layers. Each layer tests intersection with
2285         this rect to determine if its backing store should be attached.
2286         
2287         This will cause us to drop backing store for layers that don't intersect the
2288         visible part of the view, which is too aggressive. A future patch will add
2289         some padding.
2290
2291         Tests: compositing/visible-rect/coverage-clipped.html
2292                compositing/visible-rect/coverage-scrolling.html
2293
2294         * platform/graphics/ca/GraphicsLayerCA.cpp:
2295         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
2296         C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
2297         (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
2298         secondary coverage rect. A future patch will inflate this on the way down the tree.
2299         (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
2300         we have a secondary coverage rect, that rect can be clipped to us too.
2301         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2302         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2303         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2304         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
2305         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2306         * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
2307         Use more C++11 initializers.
2308         (WebCore::GraphicsLayerCA::coverageRect):
2309
2310 2015-04-24  Dean Jackson  <dino@apple.com>
2311
2312         AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
2313         https://bugs.webkit.org/show_bug.cgi?id=144173
2314         <rdar://problem/20526168>
2315
2316         Reviewed by Simon Fraser.
2317
2318         Keep a list of Animations that care about scroll updates, and only
2319         run the animation update if the list is not empty.
2320
2321         Covered by existing tests.
2322
2323         * page/animation/AnimationBase.cpp:
2324         (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
2325         if this is an animation that depends on scrolling.
2326         * page/animation/AnimationController.cpp:
2327         (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
2328         new removeFromAnimationsDependentOnScroll as this animation is deleted.
2329         (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
2330         (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
2331         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
2332         there are animations that care.
2333         (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
2334         value to FrameView.
2335         * page/animation/AnimationController.h:
2336         * page/animation/AnimationControllerPrivate.h:
2337         (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
2338
2339 2015-04-24  Tim Horton  <timothy_horton@apple.com>
2340
2341         WKPDFView does not support password-protected PDFs
2342         https://bugs.webkit.org/show_bug.cgi?id=144162
2343         <rdar://problem/18411512>
2344
2345         Reviewed by Andy Estes.
2346
2347         * English.lproj/Localizable.strings:
2348         Add some localizable strings.
2349
2350 2015-04-24  David Kilzer  <ddkilzer@apple.com>
2351
2352         Fix iOS EWS builds after updating to iOS 8.3 SDK
2353
2354         * platform/spi/cocoa/CoreTextSPI.h:
2355         * rendering/RenderThemeIOS.mm:
2356         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2357         - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
2358
2359 2015-04-24  Jer Noble  <jer.noble@apple.com>
2360
2361         Unreviewed iOS build fix; add declarations to AVKitSPI.h
2362
2363         * platform/spi/cocoa/AVKitSPI.h:
2364
2365 2015-04-24  Enrica Casucci  <enrica@apple.com>
2366
2367         Make rangeExpandedAroundPositionByCharacters to all platforms.
2368         https://bugs.webkit.org/show_bug.cgi?id=144161
2369
2370         Reviewed by Tim Horton.
2371
2372         No change in functionality, simply making this available
2373         to all platforms.
2374
2375         * editing/VisibleUnits.cpp:
2376         (WebCore::rangeExpandedAroundPositionByCharacters):
2377         * editing/VisibleUnits.h:
2378         * editing/mac/DataDetection.mm:
2379         * editing/mac/DictionaryLookup.h:
2380         * editing/mac/DictionaryLookup.mm:
2381         (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
2382
2383 2015-04-24  Andreas Kling  <akling@apple.com>
2384
2385         Purge PassRefPtr from NamedNodeMap.
2386         <https://webkit.org/b/144091>
2387
2388         Reviewed by Antti Koivisto.
2389
2390         Use RefPtr instead of PassRefPtr in NamedNodeMap.
2391
2392         * dom/NamedNodeMap.cpp:
2393         (WebCore::NamedNodeMap::getNamedItem):
2394         (WebCore::NamedNodeMap::getNamedItemNS):
2395         (WebCore::NamedNodeMap::removeNamedItem):
2396         (WebCore::NamedNodeMap::removeNamedItemNS):
2397         (WebCore::NamedNodeMap::setNamedItem):
2398         (WebCore::NamedNodeMap::setNamedItemNS):
2399         (WebCore::NamedNodeMap::item):
2400         * dom/NamedNodeMap.h:
2401
2402 2015-04-24  Commit Queue  <commit-queue@webkit.org>
2403
2404         Unreviewed, rolling out r183266.
2405         https://bugs.webkit.org/show_bug.cgi?id=144164
2406
2407         Broke 32-bit build and a test. (Requested by ap on #webkit).
2408
2409         Reverted changeset:
2410
2411         "AX: richer text change notifications (142719)"
2412         https://bugs.webkit.org/show_bug.cgi?id=142719
2413         http://trac.webkit.org/changeset/183266
2414
2415 2015-04-24  Brady Eidson  <beidson@apple.com>
2416
2417         Origin header is preserved on cross-origin redirects.
2418         https://bugs.webkit.org/show_bug.cgi?id=144157.
2419
2420         Reviewed by Sam Weinig.
2421
2422         Tests: http/tests/security/cors-post-redirect-301.html
2423                http/tests/security/cors-post-redirect-302.html
2424                http/tests/security/cors-post-redirect-307.html
2425                http/tests/security/cors-post-redirect-308.html
2426
2427         * platform/network/cf/ResourceHandleCFNet.cpp:
2428         (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
2429         * platform/network/mac/ResourceHandleMac.mm:
2430         (WebCore::ResourceHandle::willSendRequest): Ditto.
2431
2432 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2433
2434         Immediate action not functional for embedded PDFs
2435         https://bugs.webkit.org/show_bug.cgi?id=143952
2436         <rdar://problem/19842365>        
2437
2438         Reviewed by Tim Horton.
2439
2440         Add a dictionary lookup method to allow us to retrieve
2441         relevant information for PDFs.
2442
2443         * editing/mac/DictionaryLookup.mm:
2444         (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
2445         where the Lookup engine selects a smaller range than the initial automatic
2446         selection performed on clicking.
2447
2448 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2449
2450         Make it possible to map a secondary quad through TransformState
2451         https://bugs.webkit.org/show_bug.cgi?id=144156
2452
2453         Reviewed by Dean Jackson.
2454
2455         A future patch will need to map two quads simultaneously through TransformState,
2456         so add the ability to provide an optional secondary quad.
2457         
2458         This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
2459         requiring the state to be flattened when setting the quad (and now, the secondary quad).
2460         Previously, setQuad implicitly flattened but failed to update m_mapPoint when
2461         doing so.
2462
2463         * platform/graphics/ca/GraphicsLayerCA.cpp:
2464         (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
2465         before setting the quad.
2466         * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
2467         * platform/graphics/transforms/TransformState.cpp:
2468         (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
2469         (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
2470         if we have one.
2471         (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
2472         (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
2473         into the state's current coordinate space.
2474         (WebCore::TransformState::mapQuad): Factored code.
2475         * platform/graphics/transforms/TransformState.h:
2476         (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
2477         (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
2478         (WebCore::TransformState::lastPlanarSecondaryQuad):
2479         (WebCore::TransformState::lastPlanarQuad): Deleted.
2480
2481 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2482
2483         [iOS] Reimplement r182512 and r183153 in a cleaner way
2484         https://bugs.webkit.org/show_bug.cgi?id=144151
2485
2486         Reviewed by Enrica Casucci.
2487
2488         On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
2489         This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
2490         react to this fact by making users of a FontPlatformData use the original font passed in
2491         to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
2492         detect that the FontPlatformData represents a system font (the underlying APIs have
2493         different behavior for system fonts and non-system-fonts).
2494
2495         However, on OS X, we create a FontPlatformData's ctFont() directly from the original
2496         font passed in to the constructor. This preserves system-font-ness (because it no
2497         longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
2498         correct behavior regarding system fonts.
2499
2500         The difference between the two ctFont() creation codepaths seems to be historical
2501         rather than intentional. Rather than change all the call sites of ctFont() to use a
2502         different platform font object if a system font is detected, a cleaner solution is to
2503         simply unify the two ctFont() creation codepaths to the version which preserves system-
2504         font-ness. Doing this will make all users of FontPlatformData automatically have the
2505         correct behavior with no updates.
2506
2507         This patch reverts the relevant parts of r182512 and r183153 in favor of this new
2508         solution.
2509
2510         No new tests because there is no behavior change.
2511
2512         * platform/graphics/FontPlatformData.h:
2513         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2514         * platform/graphics/cocoa/FontCocoa.mm:
2515         (WebCore::Font::platformWidthForGlyph):
2516         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2517         (WebCore::FontPlatformData::ctFontSize):
2518         (WebCore::FontPlatformData::ctFont):
2519         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2520         (WebCore::Font::getCFStringAttributes):
2521
2522 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2523
2524         Unreviewed build fix.
2525
2526         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2527         (WebCore::FontPlatformData::FontPlatformData):
2528
2529 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2530
2531         [Cocoa] Start cleaning up FontPlatformData
2532         https://bugs.webkit.org/show_bug.cgi?id=144133
2533
2534         Reviewed by Enrica Casucci.
2535
2536         This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
2537         FontPlatformData. This patch starts this effort out by removing the FontPlatformData
2538         constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
2539         and forwards to another constructor. This patch moves this cast to callers of this constructor,
2540         thereby enumerating the places we have left that use NSFont with FontPlatformData.
2541
2542         This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
2543         a common constructor.
2544
2545         This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
2546         not 0 and not -1, and puts this common code inside a new function,
2547         FontPlatformData::isValidCTFontRef().
2548
2549         No new tests because there is no behavior change.
2550
2551         * platform/graphics/FontPlatformData.cpp:
2552         (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
2553         * platform/graphics/FontPlatformData.h:
2554         (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
2555         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2556         * platform/graphics/cocoa/FontCocoa.mm:
2557         (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
2558         FontPlatformData constructor.
2559         (WebCore::Font::compositeFontReferenceFont): Ditto.
2560         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2561         (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
2562         (WebCore::FontPlatformData::platformDataInit): Ditto.
2563         (WebCore::FontPlatformData::platformDataAssign): Ditto.
2564         (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
2565         (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
2566         (WebCore::FontPlatformData::FontPlatformData): Deleted.
2567         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2568         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
2569         NSFont use.
2570         * platform/graphics/mac/FontCacheMac.mm:
2571         (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
2572         deleted FontPlatformData constructor.
2573         (WebCore::FontCache::createFontPlatformData): Ditto.
2574         * platform/mac/DragImageMac.mm:
2575         (WebCore::fontFromNSFont): Ditto.
2576         (WebCore::widthWithFont): Ditto.
2577         (WebCore::drawAtPoint): Ditto.
2578
2579 2015-04-24  Doug Russell  <d_russell@apple.com>
2580
2581         AX: richer text change notifications (142719)
2582         https://bugs.webkit.org/show_bug.cgi?id=142719
2583
2584         Reviewed by Darin Adler.
2585
2586         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.
2587
2588         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.
2589
2590         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2591                platform/mac/accessibility/selection-change-userinfo.html
2592                platform/mac/accessibility/value-change-userinfo.html
2593
2594         * CMakeLists.txt:
2595         * WebCore.vcxproj/WebCore.vcxproj:
2596         * WebCore.vcxproj/WebCore.vcxproj.filters:
2597         * WebCore.xcodeproj/project.pbxproj:
2598         * accessibility/AXObjectCache.cpp:
2599         (WebCore::AXObjectCache::AXObjectCache):
2600         (WebCore::AXObjectCache::notificationPostTimerFired):
2601         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2602         (WebCore::AXObjectCache::showIntent):
2603         (WebCore::AXObjectCache::setTextSelectionIntent):
2604         (WebCore::isPasswordFieldOrContainedByPasswordField):
2605         (WebCore::AXObjectCache::postTextStateChangeNotification):
2606         (WebCore::AXObjectCache::postTextReplacementNotification):
2607         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2608         (WebCore::AXObjectCache::rootWebArea):
2609         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2610         * accessibility/AXObjectCache.h:
2611         (WebCore::AXObjectCache::postTextStateChangeNotification):
2612         (WebCore::AXObjectCache::postTextReplacementNotification):
2613         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2614         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2615         (WebCore::AXObjectCache::textChangeForEditType):
2616         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2617         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2618         (WebCore::AXObjectCache::getOrCreate): Deleted.
2619         (WebCore::AXObjectCache::attachWrapper): Deleted.
2620         * accessibility/AXTextStateChangeIntent.h: Added.
2621         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2622         * accessibility/AccessibilityNodeObject.cpp:
2623         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2624         * accessibility/AccessibilityNodeObject.h:
2625         * accessibility/AccessibilityObject.cpp:
2626         (WebCore::AccessibilityObject::isContainedByPasswordField):
2627         * accessibility/AccessibilityObject.h:
2628         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
2629         (WebCore::AccessibilityObject::isPasswordField): Deleted.
2630         * accessibility/AccessibilityRenderObject.cpp:
2631         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2632         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2633         * accessibility/AccessibilityScrollView.h:
2634         * accessibility/atk/AXObjectCacheAtk.cpp:
2635         (WebCore::AXObjectCache::textChangeForEditType):
2636         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2637         (WebCore::AXObjectCache::postPlatformNotification): Deleted.
2638         * accessibility/ios/AXObjectCacheIOS.mm:
2639         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2640         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2641         * accessibility/mac/AXObjectCacheMac.mm:
2642         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
2643         (WebCore::AXPostNotificationWithUserInfo):
2644         (WebCore::AXObjectCache::postPlatformNotification):
2645         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2646         (WebCore::textReplacementChangeDictionary):
2647         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2648         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2649         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2650         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
2651         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
2652         (arrayRemovingNonJSONTypes):
2653         (dictionaryRemovingNonJSONTypes):
2654         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2655         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2656         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2657         (textMarkerRangeFromVisiblePositions):
2658         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
2659         * editing/AppendNodeCommand.cpp:
2660         (WebCore::AppendNodeCommand::AppendNodeCommand):
2661         (WebCore::sendAXTextChangedIgnoringLineBreaks):
2662         (WebCore::AppendNodeCommand::doApply):
2663         (WebCore::AppendNodeCommand::doUnapply):
2664         * editing/AppendNodeCommand.h:
2665         (WebCore::AppendNodeCommand::create):
2666         * editing/ApplyStyleCommand.cpp:
2667         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2668         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
2669         * editing/ApplyStyleCommand.h:
2670         * editing/CompositeEditCommand.cpp:
2671         (WebCore::EditCommandComposition::unapplyEditType):
2672         (WebCore::CompositeEditCommand::CompositeEditCommand):
2673         (WebCore::CompositeEditCommand::apply):
2674         (WebCore::CompositeEditCommand::insertParagraphSeparator):
2675         (WebCore::CompositeEditCommand::insertNodeBefore):
2676         (WebCore::CompositeEditCommand::appendNode):
2677         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
2678         (WebCore::CompositeEditCommand::insertTextIntoNode):
2679         (WebCore::CompositeEditCommand::deleteTextFromNode):
2680         (WebCore::CompositeEditCommand::replaceTextInNode):
2681         (WebCore::CompositeEditCommand::moveParagraphs):
2682         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
2683         (WebCore::CompositeEditCommand::applyStyle): Deleted.
2684         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
2685         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
2686         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
2687         (WebCore::CompositeEditCommand::inputText): Deleted.
2688         * editing/CompositeEditCommand.h:
2689         * editing/DeleteFromTextNodeCommand.cpp:
2690         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
2691         (WebCore::DeleteFromTextNodeCommand::doApply):
2692         (WebCore::DeleteFromTextNodeCommand::doUnapply):
2693         * editing/DeleteFromTextNodeCommand.h:
2694         (WebCore::DeleteFromTextNodeCommand::create):
2695         (WebCore::DeleteFromTextNodeCommand::deletedText):
2696         * editing/DeleteSelectionCommand.cpp:
2697         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
2698         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
2699         * editing/DeleteSelectionCommand.h:
2700         (WebCore::DeleteSelectionCommand::create):
2701         * editing/DictationCommand.cpp:
2702         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
2703         (WebCore::DictationCommand::insertParagraphSeparator):
2704         * editing/EditAction.h:
2705         * editing/EditCommand.cpp:
2706         (WebCore::EditCommand::EditCommand):
2707         (WebCore::EditCommand::editingAction):
2708         (WebCore::EditCommand::applyEditType):
2709         (WebCore::EditCommand::unapplyEditType):
2710         (WebCore::SimpleEditCommand::SimpleEditCommand):
2711         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
2712         (WebCore::EditCommand::setParent): Deleted.
2713         * editing/EditCommand.h:
2714         * editing/EditingAllInOne.cpp:
2715         * editing/Editor.cpp:
2716         (WebCore::Editor::handleTextEvent):
2717         (WebCore::Editor::deleteSelectionWithSmartDelete):
2718         (WebCore::Editor::replaceSelectionWithFragment):
2719         (WebCore::Editor::replaceSelectionWithText):
2720         (WebCore::Editor::appliedEditing):
2721         (WebCore::Editor::unappliedEditing):
2722         (WebCore::Editor::performCutOrCopy):
2723         (WebCore::Editor::markMisspellingsAfterTypingToWord):
2724         (WebCore::Editor::changeBackToReplacedString):
2725         (WebCore::Editor::transpose):
2726         (WebCore::Editor::changeSelectionAfterCommand):
2727         * editing/Editor.h:
2728         * editing/EditorCommand.cpp:
2729         (WebCore::executeInsertFragment):
2730         * editing/FrameSelection.cpp:
2731         (WebCore::FrameSelection::moveTo):
2732         (WebCore::FrameSelection::moveWithoutValidationTo):
2733         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
2734         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2735         (WebCore::FrameSelection::setSelection):
2736         (WebCore::FrameSelection::updateAndRevealSelection):
2737         (WebCore::isBoundary):
2738         (WebCore::FrameSelection::textSelectionIntent):
2739         (WebCore::FrameSelection::modify):
2740         (WebCore::FrameSelection::selectAll):
2741         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
2742         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
2743         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
2744         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
2745         * editing/FrameSelection.h:
2746         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2747         (WebCore::FrameSelection::selection): Deleted.
2748         * editing/InsertIntoTextNodeCommand.cpp:
2749         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
2750         (WebCore::InsertIntoTextNodeCommand::doApply):
2751         (WebCore::InsertIntoTextNodeCommand::doUnapply):
2752         * editing/InsertIntoTextNodeCommand.h:
2753         (WebCore::InsertIntoTextNodeCommand::create):
2754         (WebCore::InsertIntoTextNodeCommand::insertedText):
2755         * editing/InsertNodeBeforeCommand.cpp:
2756         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2757         (WebCore::InsertNodeBeforeCommand::doApply):
2758         (WebCore::InsertNodeBeforeCommand::doUnapply):
2759         * editing/InsertNodeBeforeCommand.h:
2760         (WebCore::InsertNodeBeforeCommand::create):
2761         * editing/InsertParagraphSeparatorCommand.cpp:
2762         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
2763         * editing/InsertParagraphSeparatorCommand.h:
2764         (WebCore::InsertParagraphSeparatorCommand::create):
2765         * editing/InsertTextCommand.cpp:
2766         (WebCore::InsertTextCommand::InsertTextCommand):
2767         * editing/InsertTextCommand.h:
2768         (WebCore::InsertTextCommand::create):
2769         (WebCore::InsertTextCommand::createWithMarkerSupplier):
2770         * editing/MoveSelectionCommand.cpp:
2771         (WebCore::MoveSelectionCommand::doApply):
2772         * editing/RemoveNodePreservingChildrenCommand.cpp:
2773         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
2774         * editing/RemoveNodePreservingChildrenCommand.h:
2775         (WebCore::RemoveNodePreservingChildrenCommand::create):
2776         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2777         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
2778         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
2779         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2780         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
2781         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
2782         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
2783         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
2784         * editing/ReplaceSelectionCommand.cpp:
2785         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2786         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
2787         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
2788         * editing/ReplaceSelectionCommand.h:
2789         (WebCore::ReplaceSelectionCommand::create):
2790         * editing/TypingCommand.cpp:
2791         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2792         (WebCore::TypingCommand::insertParagraphSeparator):
2793         * editing/atk/FrameSelectionAtk.cpp:
2794         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2795         * editing/ios/DictationCommandIOS.cpp:
2796         (WebCore::DictationCommandIOS::DictationCommandIOS):
2797         * editing/ios/DictationCommandIOS.h:
2798         * editing/mac/FrameSelectionMac.mm:
2799         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2800         * html/HTMLTextFormControlElement.cpp:
2801         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2802         * page/DragController.cpp:
2803         (WebCore::DragController::concludeEditDrag):
2804         * page/EventHandler.cpp:
2805         (WebCore::setInitialKeyboardSelection):
2806         * page/FocusController.cpp:
2807         (WebCore::FocusController::advanceFocusInDocumentOrder):
2808
2809 2015-04-24  Darin Adler  <darin@apple.com>
2810
2811         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
2812         https://bugs.webkit.org/show_bug.cgi?id=128007
2813
2814         Reviewed by Anders Carlsson.
2815
2816         * PlatformEfl.cmake: Removed OwnPtrCairo source files.
2817         * PlatformGTK.cmake: Ditto.
2818         * PlatformWinCairo.cmake: Ditto.
2819         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2820         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2821
2822         * platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
2823         * platform/CrossThreadCopier.h: Ditto.
2824
2825         * platform/ScrollAnimatorNone.cpp: Removed unneeded include.
2826         * platform/ThreadGlobalData.cpp: Ditto.
2827         * platform/ThreadGlobalData.h: Ditto.
2828         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.
2829
2830         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2831         (WebCore::AVFWrapper::processNotification): Use unique_ptr.
2832         (WebCore::AVFWrapper::notificationCallback): Use make_unique.
2833         (WebCore::AVFWrapper::platformLayer): Ditto.
2834
2835         * platform/graphics/cairo/CairoUtilities.cpp:
2836         (WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
2837         instead of a smart pointer; the code path is simple enough that it is
2838         clear this way.
2839
2840         * platform/graphics/cairo/ImageBufferCairo.cpp:
2841         (WebCore::ImageBuffer::ImageBuffer): Use make_unique.
2842         * platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.
2843
2844         * platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
2845         * platform/graphics/cairo/OwnPtrCairo.h: Removed.
2846
2847         * platform/graphics/cairo/PathCairo.cpp:
2848         (WebCore::Path::Path): Use cairo_path_destroy directly instead of a
2849         smart pointer; the code path is simple enough that it is clear this way.
2850         (WebCore::Path::operator=): Ditto.
2851         (WebCore::Path::addPath): Ditto.
2852         (WebCore::Path::apply): Ditto.
2853         * platform/graphics/cairo/PlatformContextCairo.cpp:
2854         (WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.
2855
2856         * platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
2857         * platform/graphics/glx/GLContextGLX.cpp: Ditto.
2858
2859         * platform/graphics/surfaces/egl/EGLSurface.cpp:
2860         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.
2861
2862         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
2863         (WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
2864         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
2865         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2866         (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
2867         (WebCore::GLXOffScreenSurface::initialize): Ditto.
2868
2869         * platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.
2870
2871         * platform/graphics/surfaces/glx/X11Helper.cpp:
2872         (WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
2873         (WebCore::X11Helper::createPixmap): Ditto.
2874
2875         * platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
2876         which can be used with unique_ptr to make it call XFree instead of delete.
2877
2878         * platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
2879         (FullScreenController::FullScreenController): Use make_unique.
2880         (FullScreenController::enterFullScreen): Ditto.
2881         * platform/graphics/win/FullScreenController.h: Use unique_ptr.
2882
2883         * platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.
2884
2885         * platform/graphics/win/WKCAImageQueue.cpp:
2886         (WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
2887         * platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.
2888
2889         * platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.
2890
2891         * platform/network/ResourceHandleInternal.h: Use unique_ptr.
2892
2893         * platform/network/curl/MultipartHandle.cpp:
2894         (WebCore::MultipartHandle::create): Deleted.
2895         * platform/network/curl/MultipartHandle.h: Deleted the create function.
2896
2897         * platform/network/curl/ResourceHandleManager.cpp:
2898         (WebCore::headerCallback): Use make_unique.
2899
2900 2015-04-24  Per Arne Vollan  <peavo@outlook.com>
2901
2902         [Win] Popup menu is not accessible.
2903         https://bugs.webkit.org/show_bug.cgi?id=141704
2904
2905         Reviewed by Brent Fulgham.
2906
2907         Get accessibility information for items in popup menus.
2908
2909         * platform/win/PopupMenuWin.cpp:
2910         (WebCore::PopupMenuWin::onGetObject):
2911         (WebCore::PopupMenuWin::wndProc):
2912         (WebCore::AccessiblePopupMenu::AccessiblePopupMenu):
2913         (WebCore::AccessiblePopupMenu::~AccessiblePopupMenu):
2914         (WebCore::AccessiblePopupMenu::QueryInterface):
2915         (WebCore::AccessiblePopupMenu::AddRef):
2916         (WebCore::AccessiblePopupMenu::Release):
2917         (WebCore::AccessiblePopupMenu::GetTypeInfoCount):
2918         (WebCore::AccessiblePopupMenu::GetTypeInfo):
2919         (WebCore::AccessiblePopupMenu::GetIDsOfNames):
2920         (WebCore::AccessiblePopupMenu::Invoke):
2921         (WebCore::AccessiblePopupMenu::get_accParent):
2922         (WebCore::AccessiblePopupMenu::get_accChildCount):
2923         (WebCore::AccessiblePopupMenu::get_accChild):
2924         (WebCore::AccessiblePopupMenu::get_accName):
2925         (WebCore::AccessiblePopupMenu::get_accValue):
2926         (WebCore::AccessiblePopupMenu::get_accDescription):
2927         (WebCore::AccessiblePopupMenu::get_accRole):
2928         (WebCore::AccessiblePopupMenu::get_accState):
2929         (WebCore::AccessiblePopupMenu::get_accHelp):
2930         (WebCore::AccessiblePopupMenu::get_accKeyboardShortcut):
2931         (WebCore::AccessiblePopupMenu::get_accFocus):
2932         (WebCore::AccessiblePopupMenu::get_accSelection):
2933         (WebCore::AccessiblePopupMenu::get_accDefaultAction):
2934         (WebCore::AccessiblePopupMenu::accSelect):
2935         (WebCore::AccessiblePopupMenu::accLocation):
2936         (WebCore::AccessiblePopupMenu::accNavigate):
2937         (WebCore::AccessiblePopupMenu::accHitTest):
2938         (WebCore::AccessiblePopupMenu::accDoDefaultAction):
2939         (WebCore::AccessiblePopupMenu::put_accName):
2940         (WebCore::AccessiblePopupMenu::put_accValue):
2941         (WebCore::AccessiblePopupMenu::get_accHelpTopic):
2942         * platform/win/PopupMenuWin.h:
2943         * platform/win/ScrollbarThemeWin.h:
2944         (WebCore::ScrollbarThemeWin::hasButtons): Deleted.
2945
2946 2015-04-23  Antti Koivisto  <antti@apple.com>
2947
2948         Memory cache live resources repeatedly purged during painting
2949         https://bugs.webkit.org/show_bug.cgi?id=144104
2950         <rdar://problem/20667695>
2951
2952         Reviewed by Chris Dumez.
2953
2954         On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
2955         This slows down page loads significantly.
2956
2957         This might have regressed because improvements in page caching keep more pages and so resources 'live'.
2958
2959         With this path we do all regular cache pruning asynchronously. If memory is really critical
2960         the low memory handling code will still prune synchronously.
2961
2962         * loader/cache/CachedResource.cpp:
2963         (WebCore::CachedResource::removeClient):
2964         (WebCore::CachedResource::didAccessDecodedData):
2965
2966             prune() -> pruneSoon()
2967
2968         * loader/cache/MemoryCache.cpp:
2969
2970             Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.
2971
2972         (WebCore::MemoryCache::needsPruning):
2973
2974             Factor into a function.
2975
2976         (WebCore::MemoryCache::prune):
2977         (WebCore::MemoryCache::pruneSoon):
2978
2979             Prune asynchronously.
2980
2981         * loader/cache/MemoryCache.h:
2982
2983 2015-04-24  Antti Koivisto  <antti@apple.com>
2984
2985         Unreviewed, rolling out r183259.
2986
2987         Wrong ChangeLog.
2988
2989         Reverted changeset:
2990
2991         "Memory cache live resources repeatedly purged during
2992         painting"
2993         https://bugs.webkit.org/show_bug.cgi?id=144104
2994         http://trac.webkit.org/changeset/183259
2995
2996 2015-04-24  Antti Koivisto  <antti@apple.com>
2997
2998         CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
2999         https://bugs.webkit.org/show_bug.cgi?id=144050
3000
3001         Reviewed by Chris Dumez.
3002
3003         We are seeing null Element pointer crashes with this stack:
3004
3005         47 com.apple.WebCore:  WebCore::toScriptElementIfPossible + 4 <==
3006         47 com.apple.WebCore:  WebCore::ScriptRunner::timerFired + 452
3007         47 com.apple.WebCore:  WebCore::ThreadTimers::sharedTimerFiredInternal + 175
3008
3009         The most likely cause seems to be that this code
3010
3011             ASSERT(m_pendingAsyncScripts.contains(scriptElement));
3012             m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));
3013
3014         in ScriptRunner::notifyScriptReady fails to find scriptElement and we are left with null entry in
3015         m_scriptsToExecuteSoon. However I haven't managed to repro this or find the exact path how this
3016         could happen. The related code is fragile with lot of state (especially in ScriptElement class)
3017         and involves many opportunities for re-entry via scripts.
3018
3019         No repro, no test case.
3020
3021         * dom/ScriptRunner.cpp:
3022         (WebCore::ScriptRunner::timerFired):
3023
3024             Paper this over by adding a null check. We could check m_pendingAsyncScripts.take() above
3025             but this also covers possibility this is caused by something else.
3026
3027 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3028
3029         [SOUP] Use a webkit subdirectory for the disk cache
3030         https://bugs.webkit.org/show_bug.cgi?id=144048
3031
3032         Reviewed by Martin Robinson.
3033
3034         Add a static method to SoupNetworkSession to clear a soup cache
3035         given its directory.
3036
3037         * platform/network/soup/SoupNetworkSession.cpp:
3038         (WebCore::strIsNumeric):
3039         (WebCore::SoupNetworkSession::clearCache):
3040         * platform/network/soup/SoupNetworkSession.h:
3041
3042 2015-04-23  Andy Estes  <aestes@apple.com>
3043
3044         Fix the iOS build after r183234.
3045
3046         * platform/ios/LegacyTileCache.mm:
3047         (WebCore::LegacyTileCache::commitScaleChange):
3048
3049 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3050
3051         Fix Windows build.
3052
3053         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3054         (PlatformCALayerWin::setBackingStoreAttached):
3055         (PlatformCALayerWin::backingStoreAttached):
3056         * platform/graphics/ca/win/PlatformCALayerWin.h:
3057
3058 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3059
3060         Make it possible to detach GraphicsLayerCA backing store
3061         https://bugs.webkit.org/show_bug.cgi?id=144140
3062
3063         Reviewed by Tim Horton.
3064
3065         This changes makes it possible to denote a GraphicsLayerCA's backing store
3066         as "attached" or not. When not attached, the backing store is made volatile
3067         and can be purged. This will be used in a future patch.
3068
3069         * platform/graphics/ca/GraphicsLayerCA.h: Add updateBackingStoreAttachment().
3070         * platform/graphics/ca/PlatformCALayer.h:
3071         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3072         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Stubs. In future, we could
3073         remove backing store on Mac and iOS WK1 too.
3074         (PlatformCALayerMac::setBackingStoreAttached):
3075         (PlatformCALayerMac::backingStoreAttached):
3076
3077 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3078
3079         Remove "layer" from GraphicsLayerCA member function names
3080         https://bugs.webkit.org/show_bug.cgi?id=144139
3081
3082         Reviewed by Myles Maxfield.
3083
3084         Rename "updateLayer*" to "update*" in GraphicsLayerCA.
3085
3086         * platform/graphics/ca/GraphicsLayerCA.cpp:
3087         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3088         (WebCore::GraphicsLayerCA::updateNames):
3089         (WebCore::GraphicsLayerCA::updateDrawsContent):
3090         (WebCore::GraphicsLayerCA::updateLayerNames): Deleted.
3091         (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Deleted.
3092         * platform/graphics/ca/GraphicsLayerCA.h:
3093
3094 2015-04-23  Dan Bernstein  <mitz@apple.com>
3095
3096         <rdar://problem/20663758> Fix the build after AVPlayerViewController API change
3097
3098         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3099         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Don’t pass a nil completion
3100         handler to -[AVPlayerViewController exitFullScreenAnimated:completionHandler:].
3101
3102 2015-04-23  Darin Adler  <darin@apple.com>
3103
3104         Another round of removing use of OwnPtr, PassOwnPtr, and deleteOwnedPtr
3105         https://bugs.webkit.org/show_bug.cgi?id=144090
3106
3107         Reviewed by Anders Carlsson.
3108
3109         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Removed unneeded include.
3110
3111         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed include of
3112         RefCountedSupplement.h.
3113
3114         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3115         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3116         Pass data using rvalue references, and use new/delete to pass it across
3117         threads, rather than using PassOwnPtr.
3118         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Pass data
3119         in an rvalue reference instead of PassOwnPtr.
3120         * Modules/websockets/WebSocket.cpp:
3121         (WebCore::WebSocket::didReceiveBinaryData): Take an rvalue reference
3122         instead of a PassOwnPtr.
3123         * Modules/websockets/WebSocket.h: Ditto.
3124         * Modules/websockets/WebSocketChannel.cpp: Ditto.
3125         (WebCore::WebSocketChannel::processFrame): Ditto.
3126         * Modules/websockets/WebSocketChannelClient.h:
3127         (WebCore::WebSocketChannelClient::didReceiveBinaryData): Ditto.
3128         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3129         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3130         Ditto.
3131         * Modules/websockets/WorkerThreadableWebSocketChannel.h: Ditto.
3132
3133         * WebCore.xcodeproj/project.pbxproj: Removed RefCountedSupplement.h.
3134
3135         * loader/cocoa/DiskCacheMonitorCocoa.mm:
3136         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Fixed comment
3137         to not mention adoptPtr.
3138
3139         * page/make_settings.pl:
3140         (generateInternalSettingsHeaderFile): Removed include of RefCountedSupplement.h.
3141
3142         * platform/ColorChooserClient.h: Removed unneded include.
3143         * platform/ContextMenuItem.h: Ditto.
3144
3145         * platform/RefCountedSupplement.h: Removed.
3146
3147         * platform/ScrollAnimator.cpp: Removed unneeded include.
3148         * platform/ScrollAnimatorNone.h: Ditto.
3149
3150         * platform/ThreadGlobalData.cpp: Added now-needed include of PassOwnPtr.h.
3151
3152         * platform/graphics/GlyphMetricsMap.h: Ditto.
3153         * platform/graphics/MediaPlayer.h: Ditto.
3154         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Ditto.
3155         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Ditto.
3156         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
3157         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Ditto.
3158         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Ditto.
3159         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Ditto.
3160         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Ditto.
3161
3162         * platform/graphics/cg/ImageBufferCG.cpp:
3163         (WebCore::ImageBuffer::ImageBuffer): Use make_unique instead of adoptPtr.
3164         * platform/graphics/cg/ImageBufferDataCG.cpp:
3165         (WebCore::ImageBufferData::getData): Return a RefPtr instead of a PassRefPtr.
3166         * platform/graphics/cg/ImageBufferDataCG.h: Streamlined the header a bit,
3167         use unique_ptr instead of OwnPtr and RefPtr instead of PassRefPtr.
3168
3169         * platform/graphics/cocoa/IOSurface.h: Use unique_ptr instead of OwnPtr.
3170         * platform/graphics/cocoa/IOSurface.mm:
3171         (IOSurface::ensureGraphicsContext): Use make_unique instead of adoptPtr.
3172
3173         * platform/graphics/egl/GLContextEGL.cpp: Removed unneeded includes.
3174         * platform/graphics/filters/FilterOperation.h: Ditto.
3175         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Ditto.
3176         * platform/ios/DeviceMotionClientIOS.h: Ditto.
3177         * platform/ios/DeviceOrientationClientIOS.h: Ditto.
3178
3179         * platform/ios/LegacyTileCache.h: Use unique_ptr instead of OwnPtr.
3180         * platform/ios/LegacyTileCache.mm:
3181         (WebCore::LegacyTileCache::LegacyTileCache): Use make_unique instead of
3182         a create function, and also get rid of unneeded initialization to null.
3183         (WebCore::LegacyTileCache::commitScaleChange): Ditto.
3184
3185         * platform/ios/LegacyTileGrid.h: Made constructor public and got rid of create
3186         function. Made constructor take a reference to the tile cache, and make both
3187         tileCache() and m_tileCache be references too.
3188
3189         * platform/ios/LegacyTileGrid.mm:
3190         (WebCore::LegacyTileGrid::LegacyTileGrid): Updated to use reference.
3191         (WebCore::LegacyTileGrid::visibleRect): Ditto.
3192         (WebCore::LegacyTileGrid::tileByteSize) Ditto.:
3193         (WebCore::LegacyTileGrid::dropDistantTiles): Ditto.
3194         (WebCore::LegacyTileGrid::updateTileOpacity): Ditto.
3195         (WebCore::LegacyTileGrid::updateTileBorderVisibility): Ditto.
3196         (WebCore::LegacyTileGrid::updateHostLayerSize): Ditto.
3197         (WebCore::LegacyTileGrid::invalidateTiles): Ditto.
3198         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage): Ditto.
3199         (WebCore::LegacyTileGrid::tileDistance2): Ditto.
3200         (WebCore::LegacyTileGrid::createTiles): Ditto.
3201         * platform/ios/LegacyTileGridTile.mm:
3202         (WebCore::LegacyTileGridTile::LegacyTileGridTile): Ditto.
3203         (WebCore::LegacyTileGridTile::invalidateRect): Ditto.
3204         (WebCore::LegacyTileGridTile::showBorder): Ditto.
3205         * platform/ios/LegacyTileLayer.mm:
3206         (-[LegacyTileHostLayer renderInContext:]): Ditto.
3207         (-[LegacyTileLayer layoutSublayers]): Ditto.
3208         (-[LegacyTileLayer drawInContext:]): Ditto.
3209
3210         * platform/ios/LegacyTileLayerPool.h: Removed unneeded include.
3211         * platform/ios/ScrollAnimatorIOS.mm: Ditto.
3212         * platform/mac/ScrollAnimatorMac.mm: Ditto.
3213         * platform/mac/WebVideoFullscreenController.h: Ditto.
3214         * platform/network/BlobData.cpp: Ditto.
3215
3216         * platform/network/ResourceHandle.cpp:
3217         (WebCore::ResourceHandle::ResourceHandle): Use make_unique instead of adoptPtr.
3218         * platform/network/ResourceHandle.h: Use unique_ptr instead of OwnPtr.
3219
3220         * platform/network/ResourceHandleInternal.h: Added now-needed include.
3221
3222         * platform/network/ResourceResponseBase.h: Removed unneeded includes and
3223         tweaked formatting a bit.
3224
3225         * platform/network/SynchronousLoaderClient.h: Removed the create function and
3226         the private constructor. Used data member initialize to make the default
3227         empty constructor automatically get generated (and be public now).
3228
3229         * platform/network/cf/FormDataStreamCFNet.cpp:
3230         (WebCore::formFinishFinalizationOnMainThread): Use delete instead of adoptPtr
3231         to delete the context argument.
3232
3233         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3234         (WebCore::defaultNetworkStorageSession): Return a unique_ptr& instead of an OwnPtr&.
3235         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use make_unique
3236         instead of adoptPtr.
3237         (WebCore::NetworkStorageSession::defaultStorageSession): Ditto.
3238
3239         * platform/network/cf/ResourceHandleCFNet.cpp:
3240         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Use a
3241         SynchronousLoaderClient on the stack instead of putting one on the heap with adoptPtr.
3242         * platform/network/mac/ResourceHandleMac.mm:
3243         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
3244
3245         * platform/text/TextCodec.h: Removed unneeded include.
3246         * platform/win/CursorWin.cpp: Ditto.
3247
3248         * rendering/RenderLayer.cpp:
3249         (WebCore::RenderLayer::calculateClipRects): Use move instead of release since
3250         we are using RefPtr&& instead of PassRefPtr.
3251
3252         * rendering/RenderLayerFilterInfo.cpp:
3253         (WebCore::RenderLayer::FilterInfo::setRenderer): Use RefPtr&& instead of PassRefPtr.
3254         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Streamlined to use
3255         modern for loops and auto.
3256         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
3257
3258         * rendering/RenderLayerFilterInfo.h: Streamlined code and removed some stuff that
3259         I think is unneeded on iOS; there is no unused private field and I suspect the problem
3260         that led to the warning is gone. Deleted friending of deleteOwnedPtr.
3261
3262         * rendering/RenderLayerMaskImageInfo.cpp: Removed unneeded includes. Moved private
3263         client classes in here from the header and made them members of MaskImageInfo.
3264         Streamlined them a bit in other ways.
3265         (WebCore::RenderLayer::MaskImageInfo::getIfExists): Use nullptr.
3266         (WebCore::RenderLayer::MaskImageInfo::MaskImageInfo): Use member initialization
3267         and also pass the layer in rather than the MaskImageInfo.
3268         (WebCore::RenderLayer::MaskImageInfo::notifyFinished): Deleted. Moved the code
3269         into the SVGDocumentClient.
3270         (WebCore::RenderLayer::MaskImageInfo::imageChanged): Deleted. Moved the code into
3271         the ImageClient.
3272         (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Streamlined a bit
3273         to use a for loop.
3274         (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Ditto.
3275
3276         * rendering/RenderLayerMaskImageInfo.h: Reduced unneeded includes. Got rid of
3277         definitions of private member classes here in the header; they can be in the cpp
3278         file instead. Also cut down from three classes to two, and gave the classes less
3279         redundant names since they are already members of MaskImageInfo. Removed some
3280         unneeded functions and friending of deleteOwnedPtr.
3281
3282         * testing/InternalSettings.cpp: Got rid of comment about RefCountedSupplement
3283         since no code anywhere was using it, so not using it here was not remarkable.
3284
3285 2015-04-23  Jer Noble  <jer.noble@apple.com>
3286
3287         [iOS] Add a wrapper around the hosted AVPlayerLayer to intercept -setBounds:
3288         https://bugs.webkit.org/show_bug.cgi?id=144129
3289
3290         Reviewed by Simon Fraser.
3291
3292         When passing the hosted AVPlayerLayer to the fullscreen controller, the new superlayer will
3293         resize the hosted layer with a call to -setBounds:. But because this is a hosted layer, the
3294         bonuds change has no effect. Instead, wrap the CALayerHost in another CALayer whose job it is
3295         to intercept -setBounds: in the same way that WebAVVideoLayer did. In fact, we should just use
3296         that wrapper class inside WebAVVideoLayer as well, to avoid duplicating code.
3297
3298         Drive-by Fix: Null-check m_videoElement in setVideoLayerFrame().
3299
3300         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3301         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3302         (-[WebCALayerHostWrapper setVideoSublayer:]):
3303         (-[WebCALayerHostWrapper videoSublayer]):
3304         (-[WebCALayerHostWrapper setBounds:]): Moved from WebAVVideoLayer.
3305         (-[WebCALayerHostWrapper resolveBounds]): Ditto.
3306         (-[WebAVVideoLayer setBounds:]): Moved to WebCALayerHostWrapper.
3307         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Create the wrapper.
3308         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Clear the wrapper.
3309         (-[WebAVVideoLayer resolveBounds]): Deleted. Moved to WebCALayerHostWrapper.
3310         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3311         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): Null-check m_videoElement.
3312
3313 2015-04-23  Tim Horton  <timothy_horton@apple.com>
3314
3315         Yellow highlight has gray background color when invoking Lookup on an address in a Google Maps drop down
3316         https://bugs.webkit.org/show_bug.cgi?id=138737
3317         <rdar://problem/18904429>
3318
3319         Reviewed by Simon Fraser.
3320
3321         * rendering/RenderReplaced.cpp:
3322         (WebCore::RenderReplaced::paint):
3323         Other RenderObjects don't paint box decorations in the selection painting phase,
3324         so RenderReplaced probably shouldn't either. This fixes the case where, when doing
3325         selection-only painting of a bit of text over top of a RenderReplaced, the RenderReplaced
3326         would paint its background, filling the previously transparent bitmap with an unwanted color.
3327
3328 2015-04-23  Roger Fong  <roger_fong@apple.com>
3329
3330         Update media timeline controls when video is paused..
3331         https://bugs.webkit.org/show_bug.cgi?id=144122.
3332         <rdar://problem/20422927>
3333
3334         Reviewed by Dean Jackson.
3335
3336         * Modules/mediacontrols/mediaControlsApple.js:
3337         (Controller.prototype.drawTimelineBackground): Use timelineWidth because offsetWidth is 0 when display: none.
3338         (Controller.prototype.setPlaying): Show controls when pausing.
3339         (Controller.prototype.showControls): Update time and timeline when unhiding controls.
3340
3341 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3342
3343         Changing TiledBacking velocity should schedule a tile revalidation
3344         https://bugs.webkit.org/show_bug.cgi?id=144123
3345
3346         Reviewed by Tim Horton.
3347
3348         Changing the velocity parameters on the TileController affect the computed
3349         coverage rect, so whenever we make a change to velocity data that could
3350         affect the outcome (basically any non-zero old or new velocities),
3351         schedule a layer flush.
3352
3353         * platform/graphics/TiledBacking.h:
3354         (WebCore::VelocityData::velocityOrScaleIsChanging):
3355         * platform/graphics/ca/TileController.cpp:
3356         (WebCore::TileController::setVelocity):
3357
3358 2015-04-23  Jer Noble  <jer.noble@apple.com>
3359
3360         [Mac] Disable QTKit by default on future OS X.
3361         https://bugs.webkit.org/show_bug.cgi?id=144082
3362
3363         Reviewed by Darin Adler.
3364
3365         Settings::gQTKitEnabled defaults to false.
3366
3367         * page/Settings.cpp:
3368
3369 2015-04-23  Daniel Bates  <dabates@apple.com>
3370
3371         Clean up: Use references instead of pointers in more SVG files
3372         https://bugs.webkit.org/show_bug.cgi?id=144045
3373
3374         Reviewed by Darin Adler.
3375
3376         * rendering/svg/SVGRootInlineBox.cpp:
3377         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Pass reference instead of pointer.
3378
3379         * rendering/svg/SVGTextLayoutEngine.cpp:
3380         (WebCore::SVGTextLayoutEngine::recordTextFragment): Changed parameter textBox from pointer to reference.
3381         (WebCore::SVGTextLayoutEngine::layoutInlineTextBox): Ditto.
3382         (WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics): Changed parameter textBox from pointer to