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