[iOS] cleanup AirPlay code
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
2
3         [iOS] cleanup AirPlay code
4         https://bugs.webkit.org/show_bug.cgi?id=141811
5
6         Reviewed by Jer Noble.
7
8         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
9
10         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
11         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
12         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
13
14         * Modules/mediacontrols/MediaControlsHost.cpp:
15         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
16         (WebCore::MediaControlsHost::externalDeviceType):
17
18         * dom/EventNames.h: Ditto.
19         * dom/EventNames.in:
20
21         * html/HTMLMediaElement.cpp:
22         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
23         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
24         (WebCore::HTMLMediaElement::parseAttribute):
25         * html/HTMLMediaElement.h:
26         * html/HTMLMediaElement.idl:
27
28         * html/HTMLMediaSession.cpp:
29         (WebCore::restrictionName): Ditto.
30         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
31         * html/HTMLMediaSession.h:
32
33         * html/HTMLVideoElement.cpp:
34         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
35         * html/HTMLVideoElement.h:
36         * html/HTMLVideoElement.idl:
37
38         * page/Settings.in: Ditto.
39
40         * platform/audio/MediaSessionManager.h:
41         * platform/audio/ios/MediaSessionManagerIOS.h:
42         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
43
44         * platform/graphics/MediaPlayer.cpp:
45         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
46         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
47         * platform/graphics/MediaPlayer.h:
48         * platform/graphics/MediaPlayerPrivate.h:
49         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
50         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
51         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
52         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
53         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
54
55         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
56         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
57         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
58         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
59         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
60         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
61         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
62         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
63
64 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
65
66         Language ranges containing asterisks must be quoted as strings
67         https://bugs.webkit.org/show_bug.cgi?id=141659
68
69         Reviewed by Benjamin Poulain.
70
71         As specified in [1], the language ranges containing asterisks must be quoted as strings.
72
73         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
74
75         * css/CSSGrammar.y.in:
76         * css/CSSParser.cpp:
77         (WebCore::CSSParser::realLex):
78
79 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
80
81         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
82         https://bugs.webkit.org/show_bug.cgi?id=137765
83
84         Reviewed by Ryosuke Niwa.
85
86         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
87         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
88         used in registerMediaEngine().
89
90         No new tests, no behavior changes.
91
92         * WebCore.exp.in:
93         * html/HTMLMediaElement.cpp:
94         (WebCore::HTMLMediaElement::parseAttribute):
95         * html/HTMLMediaElement.h:
96         * platform/graphics/MediaPlayer.cpp:
97         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
98         (WebCore::MediaPlayer::MediaPlayer):
99         (WebCore::MediaPlayer::loadWithNextMediaEngine):
100         (WebCore::createNullMediaPlayer): Deleted.
101         * platform/graphics/MediaPlayer.h:
102         (WebCore::MediaPlayer::create): Deleted.
103         * platform/graphics/MediaPlayerPrivate.h:
104         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
105         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
106         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
107         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
108         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
109         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
110         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
111         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
112         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
113         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
114         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
115         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
116         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
117         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
118         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
119         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
120         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
121         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
122         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
123         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
124         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
125         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
126         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
127         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
128         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
129         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
130         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
131         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
132         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
133
134 2015-02-19  David Kilzer  <ddkilzer@apple.com>
135
136         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
137
138         Rubber-stamped by Brent Fulgham.
139
140         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
141         Brent agreed when I talked to him in person.
142
143         * platform/cf/CoreMediaSoftLink.cpp:
144         * platform/cf/CoreMediaSoftLink.h:
145         * platform/mac/SoftLinking.h:
146         * platform/win/SoftLinking.h:
147         - Do the rename.
148
149 2015-02-19  David Kilzer  <ddkilzer@apple.com>
150
151         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
152         <http://webkit.org/b/141791>
153
154         Reviewed by Alexey Proskuryakov.
155
156         * Configurations/WebCore.unexp:
157         - Remove five more symbols.
158
159         * Modules/plugins/QuickTimePluginReplacement.mm:
160         - Remove all local soft-links and include CoreMediaSoftLink.h.
161           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
162           used here since we didn't use the optional function soft-link
163           method.
164
165         * WebCore.vcxproj/WebCore.vcxproj.filters:
166         * WebCore.vcxproj/WebCoreCFNetwork.props:
167         * WebCore.xcodeproj/project.pbxproj:
168         - Add CoreMediaSPI.h to the project.
169
170         * platform/cf/CoreMediaSoftLink.cpp:
171         * platform/cf/CoreMediaSoftLink.h:
172         - Add three cross-platform symbols, five Cocoa-only symbols, and
173           two Windows-only symbols (based on current usage, not
174           availability on each platform).
175         - Include CoreMediaSPI.h header.
176         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
177
178         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
179         - Remove all CoreMedia soft-linked functions.  Constants remain.
180
181         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
182         - Remove one CoreMedia soft-linked method.
183
184         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
185         - Remove all CoreMedia soft-linked funtions.  With this change,
186           we are already realizing space savings for duplicate
187           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
188           generated for many unused functions included by
189           CoreMediaSoftLinking.h.)
190
191         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
192         - Remove all CoreMedia soft-linked funtions.  Constants remain.
193
194         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
195         - Remove duplicate header included by CoreMediaSoftLink.h.
196
197         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
198         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
199         - Remove all CoreMedia soft-linked funtions.  Constants remain.
200
201         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
202         - Remove three CoreMedia soft-linked methods.
203
204         * platform/mac/PlatformClockCM.mm:
205         - Remove two CoreMedia soft-linked methods.
206
207         * platform/mac/SerializedPlatformRepresentationMac.mm:
208         - Remove only CoreMedia soft-linked funtion.  It wasn't even
209           used.
210
211         * platform/mediastream/mac/AVVideoCaptureSource.mm:
212         - Remove two CoreMedia soft-linked method.
213
214         * platform/spi/cf/CoreMediaSPI.h:
215         - Add for SPI from CMNotificationCenter.h.
216
217 2015-02-19  David Hyatt  <hyatt@apple.com>
218
219         Columns are splitting unsplittable content.
220         https://bugs.webkit.org/show_bug.cgi?id=141807
221         <rdar://problem/18387659>
222
223         Reviewed by Dean Jackson.
224
225         Added inline-table-dynamic-movement.html
226
227         * rendering/RenderBlockFlow.cpp:
228         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
229         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
230         Patch these functions to always check the layout state for a zero
231         pageLogicalHeight, since that is actually our indicator that we're
232         doing column balancing and don't have a height set yet.
233
234         * rendering/RenderMultiColumnFlowThread.cpp:
235         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
236         * rendering/RenderMultiColumnSet.cpp:
237         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
238         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
239         (WebCore::RenderMultiColumnSet::prepareForLayout):
240         * rendering/RenderMultiColumnSet.h:
241         The function for deciding whether the logical height of the columns was
242         known was checking for a zero computedColumnHeight. However, a column set
243         can legitimately compute a zero column height, and with the fix to examine
244         the layout state, this bug was exposed.
245
246         The fix is to add a new variable that caches whether or not the column height
247         has been computed, so that even if it computes to zero, we aren't fooled.
248
249 2015-02-19  Chris Dumez  <cdumez@apple.com>
250
251         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
252         https://bugs.webkit.org/show_bug.cgi?id=141744
253
254         Reviewed by Alexey Proskuryakov.
255
256         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
257         implementation, similarly to what was already done for Mac in:
258         <http://trac.webkit.org/changeset/174717>
259
260         The following changes were made:
261         - Add missing "initLevel == AllFields" check before initializing
262           uncommon fields. This bug was causing us to initialize uncommon
263           fields even if called with 'CommonFieldsOnly' initLevel.
264         - Bypass the first pass populating common HTTP headers in
265           m_httpHeaderFields if the initLevel is AllFields. If called
266           with AllFields initLevel, we will end up populating all HTTP
267           headers later on so this first pass is redundant.
268         - Use C++11 range loop to iterator over commonHeaderFields array
269           for readability.
270         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
271           for the CFDictionaryRef containing the headers instead of creating
272           copies of keys and values using CFDictionaryGetKeysAndValues() and
273           then iterating over those. This avoids allocating Vectors for keys /
274           values and avoids unnecessary copying.
275
276
277 2015-02-18  Dean Jackson  <dino@apple.com>
278
279         Sufficiently small media controls should remove toolbar elements
280         https://bugs.webkit.org/show_bug.cgi?id=141780
281         <rdar://problem/16548548>
282         <rdar://problem/17598778>
283         <rdar://problem/18351963>
284
285         Reviewed by Eric Carlson.
286
287         Implement some logic where elements on the media controls are
288         hidden when there isn't enough room. We start by dropping
289         the scrubber, then the various buttons on the right hand
290         side.
291
292         This solution isn't perfect. If we had perfection, it would
293         be because we get resize events and respond accordingly. Instead
294         we check the size when the user has pinch-zoomed, or when
295         we start/stop playing.
296
297         This is going to cause some extra layout, because we need
298         to know the size of things before we can work out which
299         bits to hide.
300
301         * Modules/mediacontrols/mediaControlsiOS.css:
302         (::-webkit-media-controls): Remove the minimum width. This can
303         cause the controls to get clipped.
304         (audio::-webkit-media-controls-spacer): Add this empty element to
305         replace the scrubber when it is hidden.
306         (audio::-webkit-media-controls-timeline-container):
307         * Modules/mediacontrols/mediaControlsiOS.js:
308         (ControllerIOS): Remember our size so we don't churn.
309         (ControllerIOS.prototype.createControls): Create a new spacer element.
310         (ControllerIOS.prototype.configureInlineControls):
311         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
312         (ControllerIOS.prototype.updateControls):
313         (ControllerIOS.prototype.setPlaying): Ditto.
314         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
315         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
316         asap. In this case it's probably ok to be in a bad state for a frame, or
317         we are inside setup and we know that we'll layout soon.
318         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
319         that hides elements.
320
321 2015-02-19  Tim Horton  <timothy_horton@apple.com>
322
323         Move the software-only ImageBuffer::m_context to ImageBufferData
324         https://bugs.webkit.org/show_bug.cgi?id=141784
325
326         Reviewed by Simon Fraser.
327
328         * platform/graphics/ImageBuffer.h:
329         * platform/graphics/cairo/ImageBufferCairo.cpp:
330         (WebCore::ImageBuffer::ImageBuffer):
331         (WebCore::ImageBuffer::context):
332         * platform/graphics/cairo/ImageBufferDataCairo.h:
333         * platform/graphics/cg/ImageBufferCG.cpp:
334         (WebCore::ImageBuffer::ImageBuffer):
335         (WebCore::ImageBuffer::context):
336         * platform/graphics/cg/ImageBufferDataCG.h:
337         Move m_context to ImageBufferData in the software-only section;
338         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
339         This will make it harder for ImageBuffer to make the mistake of using
340         m_context blindly without thinking when it will often be null.
341
342 2015-02-18  Andreas Kling  <akling@apple.com>
343
344         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
345         <https://webkit.org/b/141788>
346
347         Reviewed by Anders Carlsson.
348
349         Once again we've fallen into the TemporaryChange trap:
350
351             TemporaryChange<unsigned>(m_member, temporaryValue);
352
353         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
354         it immediately goes out of scope and restores the original value of m_member.
355
356         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
357         to catch bugs like this. Whatever we do will be done separately from this bug.
358
359         Test: fast/history/page-cache-clearing.html
360
361         * history/PageCache.cpp:
362         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
363
364         * testing/Internals.cpp:
365         (WebCore::Internals::clearPageCache):
366         (WebCore::Internals::pageCacheSize):
367         * testing/Internals.h:
368         * testing/Internals.idl: Add a way to clear the page cache and query its size from
369         window.internals to facilitate writing a simple test for this bug.
370
371 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
372
373         Roll out r180280.
374
375         Crashes under IDBDatabase::closeConnection.
376         https://bugs.webkit.org/show_bug.cgi?id=141745
377         rdar://problem/19816412
378
379         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
380
381 2015-02-18  Tim Horton  <timothy_horton@apple.com>
382
383         Fix the iOS Simulator build after r180308.
384
385         * platform/graphics/cg/ImageBufferDataCG.h:
386
387 2015-02-18  Zalan Bujtas  <zalan@apple.com>
388
389         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
390         https://bugs.webkit.org/show_bug.cgi?id=138224
391
392         Reviewed by Dave Hyatt.
393
394         It's wrong to call flowThreadRelativeWillBeRemoved(child).
395         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
396         Should this introduce any regressions, we need to deal with those separately.
397
398         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
399
400         * rendering/RenderMultiColumnFlowThread.cpp:
401         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
402         * rendering/RenderMultiColumnFlowThread.h:
403
404 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
405
406         [Win] CFData leak in CDMSessionAVFoundationCF
407         https://bugs.webkit.org/show_bug.cgi?id=141765
408         <rdar://problem/141765>
409
410         Reviewed by Joseph Pecoraro.
411
412         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
413         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
414         so we don't double-increment the retain count.
415
416 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
417
418         Adopt WebCore::IOSurface in ImageBuffer
419         https://bugs.webkit.org/show_bug.cgi?id=141751
420
421         Reviewed by Simon Fraser.
422
423         * platform/graphics/cg/ImageBufferCG.cpp:
424         (WebCore::createIOSurface): Deleted.
425         (WebCore::ImageBuffer::ImageBuffer):
426         Make use of cachedCGColorSpace.
427         Make use of WebCore::IOSurface.
428         Remove the unused size argument from ImageBufferDataCG.
429         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
430         do this for us, unlike wkIOSurfaceContextCreate.
431         Apply the flipping and scale factor to whichever context we made.
432         We don't need to setIsAcceleratedContext anymore because it's always
433         false for software contexts, and WebCore::IOSurface will set it for
434         any accelerated contexts.
435
436         (WebCore::ImageBuffer::context):
437         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
438
439         (WebCore::ImageBuffer::flushContext):
440         Make use of context(); m_context is now null for accelerated ImageBuffers.
441
442         (WebCore::ImageBuffer::copyNativeImage):
443         Adopt in-line with the Create functions for clarity. Make use of
444         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
445
446         (WebCore::ImageBuffer::draw):
447         (WebCore::ImageBuffer::drawPattern):
448         (WebCore::ImageBuffer::getUnmultipliedImageData):
449         (WebCore::ImageBuffer::getPremultipliedImageData):
450         (WebCore::ImageBuffer::putByteArray):
451         (WebCore::ImageBuffer::toDataURL):
452         Make use of context(); m_context is now null for accelerated ImageBuffers.
453
454         * platform/graphics/cg/ImageBufferDataCG.cpp:
455         (WebCore::ImageBufferData::ImageBufferData):
456         Indentation fix, and use nullptr.
457
458         (WebCore::convertScanline):
459         Grammar fix (is -> are).
460
461         (WebCore::ImageBufferData::getData):
462         (WebCore::ImageBufferData::putData):
463         Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
464         should be made more convenient by the wrapper.
465
466         * platform/graphics/cg/ImageBufferDataCG.h:
467         Drop the unused size argument from the constructor.
468         Reorganize and label the various members which are only used
469         for a particular type of ImageBufferDataCG.
470
471         * platform/graphics/cocoa/IOSurface.mm:
472         (IOSurface::ensureGraphicsContext):
473         IOSurface-backed GraphicsContexts are always considered accelerated.
474
475         (IOSurface::create):
476         (IOSurface::IOSurface):
477         Add a constructor that take an extra size to use when making the CGContext;
478         it can only be less than the actual backing IOSurface size.
479         This is needed for r160121.
480
481         * platform/ios/WebCoreSystemInterfaceIOS.mm:
482         * platform/mac/WebCoreSystemInterface.h:
483         * platform/mac/WebCoreSystemInterface.mm:
484         Remove old WKSI IOSurface-related functions.
485
486 2015-02-18  Alex Christensen  <achristensen@webkit.org>
487
488         Prepare to use WEBCORE_EXPORT on Windows.
489         https://bugs.webkit.org/show_bug.cgi?id=141735
490
491         Reviewed by Brent Fulgham.
492
493         * bindings/js/GCController.h:
494         * bindings/js/JSDOMGlobalObject.h:
495         * bindings/scripts/CodeGeneratorJS.pm:
496         (GenerateHeader):
497         (GenerateImplementation):
498         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
499         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
500         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
501         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
502         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
503         * bindings/scripts/test/JS/JSTestEventConstructor.h:
504         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
505         * bindings/scripts/test/JS/JSTestEventTarget.h:
506         * bindings/scripts/test/JS/JSTestException.cpp:
507         * bindings/scripts/test/JS/JSTestException.h:
508         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
509         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
510         * bindings/scripts/test/JS/JSTestInterface.cpp:
511         * bindings/scripts/test/JS/JSTestInterface.h:
512         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
513         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
514         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
515         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
516         * bindings/scripts/test/JS/JSTestNode.cpp:
517         * bindings/scripts/test/JS/JSTestNode.h:
518         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
519         * bindings/scripts/test/JS/JSTestNondeterministic.h:
520         * bindings/scripts/test/JS/JSTestObj.cpp:
521         * bindings/scripts/test/JS/JSTestObj.h:
522         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
523         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
524         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
525         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
526         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
527         * bindings/scripts/test/JS/JSTestTypedefs.h:
528         * bindings/scripts/test/JS/JSattribute.cpp:
529         * bindings/scripts/test/JS/JSattribute.h:
530         * bindings/scripts/test/JS/JSreadonly.cpp:
531         * bindings/scripts/test/JS/JSreadonly.h:
532         * bridge/runtime_method.h:
533         * bridge/runtime_object.h:
534         * dom/make_names.pl:
535         (printNamesHeaderFile):
536         * history/HistoryItem.h:
537         * loader/FrameLoader.h:
538         * loader/LoaderStrategy.h:
539         * loader/ResourceLoadScheduler.h:
540         * loader/icon/IconDatabase.h:
541         * loader/icon/IconDatabaseBase.h:
542         * page/DatabaseProvider.h:
543         * page/Page.h:
544         * page/PageConsoleClient.h:
545         * page/PageOverlay.h:
546         * platform/FileSystem.h:
547         * platform/MemoryPressureHandler.h:
548         * platform/ThreadGlobalData.h:
549         * platform/URL.h:
550         * platform/graphics/ca/PlatformCALayer.h:
551         * platform/network/BlobDataFileReference.h:
552         * platform/network/BlobRegistry.h:
553         * platform/network/BlobRegistryImpl.h:
554         * platform/sql/SQLiteDatabase.h:
555         * rendering/ScrollBehavior.h:
556         * rendering/break_lines.h:
557         Add and move some WEBCORE_EXPORT macros.
558
559 2015-02-18  Anders Carlsson  <andersca@apple.com>
560
561         Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
562         https://bugs.webkit.org/show_bug.cgi?id=141767
563
564         Reviewed by Tim Horton.
565
566         Also, move it to platform/cocoa instead of platform/mac.
567
568         * WebCore.xcodeproj/project.pbxproj:
569         * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
570
571 2015-02-18  Antti Koivisto  <antti@apple.com>
572
573         Rename FontGlyphs to FontCascadeFonts
574         https://bugs.webkit.org/show_bug.cgi?id=141754
575
576         Reviewed by Andreas Kling.
577
578         "It is better than Impl."
579
580         The purpose of the class to own to create and own the realized Font instances and the associated caches
581         for FontCascade instances.
582
583 2015-02-18  Commit Queue  <commit-queue@webkit.org>
584
585         Unreviewed, rolling out r180286.
586         https://bugs.webkit.org/show_bug.cgi?id=141766
587
588         Caused >50 crashed LayoutTests (Requested by jernoble on
589         #webkit).
590
591         Reverted changeset:
592
593         "Page::userContentController() should return a reference, not
594         a pointer"
595         https://bugs.webkit.org/show_bug.cgi?id=141764
596         http://trac.webkit.org/changeset/180286
597
598 2015-02-18  David Kilzer  <ddkilzer@apple.com>
599
600         Consolidate soft-linked CMTimeMakeWithSeconds() function
601         <http://webkit.org/b/141655>
602
603         Reviewed by Brent Fulgham.
604
605         * Configurations/WebCore.unexp: Remove workaround for
606         CMTimeMakeWithSeconds() weak external.
607
608         * WebCore.vcxproj/WebCore.vcxproj:
609         * WebCore.vcxproj/WebCore.vcxproj.filters:
610         * WebCore.xcodeproj/project.pbxproj:
611         - Add CoreMediaSoftLink.{cpp,h} to the project.
612
613         * platform/cf/CoreMediaSoftLink.cpp: Add.
614         * platform/cf/CoreMediaSoftLink.h: Add.
615         - Implement new strategy where code for soft-linking is only
616           in one place, and the header can simply be included wherever a
617           soft-linked method is needed.
618
619         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
620         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
621         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
622         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
623         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
624         * platform/mac/PlatformClockCM.mm:
625         - Remove old soft-linking strategy and include
626           CoreMediaSoftLink.h.
627
628         * platform/mac/SoftLinking.h:
629         (SOFT_LINK_FUNCTION_DECL): Add.  New macro function used for
630         header declaration.  Split out from SOFT_LINK() macro.  Also
631         stop violating C++ standards by redeclaring an inline function
632         with the exact same signature as an extern "C" function.  This
633         now matches what we do on Windows (where Visual C++ already
634         prevented these shenanigans).
635         (SOFT_LINK_FUNCTION_IMPL): Add.  New macro function used for
636         source implementation.  Split out the from SOFT_LINK() macro.
637
638         * platform/win/SoftLinking.h:
639         (SOFT_LINK_FRAMEWORK): Map mac/SoftLinking.h macro name to
640         Windows macros so we can simplify CoreMediaSoftLink.{cpp,h}.
641         (SOFT_LINK_FUNCTION_DECL): Add.
642         (SOFT_LINK_FUNCTION_IMPL): Add.
643         - New macro functions split out from SOFT_LINK_DLL_IMPORT()
644           macro for header declaration and source implementation.
645         - We assume the __cdecl calling convention because that's what
646           all Apple libraries use, and so we are able to use the exact
647           same macro function on both Mac and Windows to simplify
648           CoreMediaSoftLink.{cpp,h}.
649
650 2015-02-18  Brady Eidson  <beidson@apple.com>
651
652         Page::userContentController() should return a reference, not a pointer
653         https://bugs.webkit.org/show_bug.cgi?id=141764
654
655         Reviewed by Jer Noble.
656
657         No new tests (No behavior change)
658
659         * dom/DocumentStyleSheetCollection.cpp:
660         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
661         * loader/cache/CachedResourceLoader.cpp:
662         (WebCore::CachedResourceLoader::requestResource):
663         * page/CaptionUserPreferences.cpp:
664         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
665         * page/DOMWindow.cpp:
666         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
667         * page/Frame.cpp:
668         (WebCore::Frame::injectUserScripts):
669         * page/Page.cpp:
670         (WebCore::Page::Page):
671         (WebCore::Page::~Page):
672         (WebCore::Page::setUserContentController):
673         * page/Page.h:
674         (WebCore::Page::userContentController):
675         * page/UserMessageHandlersNamespace.cpp:
676         (WebCore::UserMessageHandlersNamespace::handler):
677
678 2015-02-18  Roger Fong  <roger_fong@apple.com>
679
680         WebGL2: Promote various WebGL1 extensions to core for WebGL2.
681         https://bugs.webkit.org/show_bug.cgi?id=141446
682         <rdar://problem/19633715>
683
684         Reviewed by Brent Fulham.
685
686         Tests covered by WebGL2 conformance tests.
687
688         This patch promotes the following WebGL1 extensions to core in WebGL2:
689         OES_element_index_uint 
690         EXT_sRGB 
691         EXT_blend_minmax 
692         EXT_frag_depth 
693         EXT_shader_texture_lod
694         OES_standard_derivatives 
695         
696         The latter 3 are enabled by default now for GLSL1, though we will get these extensions 
697         for free when GLSL3 becomes available.
698
699         WebGL2 binding code should actually fall back to base implementation for getFramebufferAttachmentParameter.
700         * bindings/js/JSWebGL2RenderingContextCustom.cpp: 
701         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter): Deleted.
702         * html/canvas/WebGL2RenderingContext.idl: Ditto.
703
704         * html/canvas/WebGL2RenderingContext.cpp:
705         (WebCore::WebGL2RenderingContext::getExtension): Enable WEBGL_lose_context as an extension again.
706         It was not promoted to core as I originally thought it had been.
707         (WebCore::WebGL2RenderingContext::getSupportedExtensions): Ditto.
708         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Promote the 3 shader extensions for GLSL1 to core.
709         (WebCore::WebGL2RenderingContext::initializeShaderExtensions): Ditto.
710         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Promote SRGB extension to core.
711         (WebCore::WebGL2RenderingContext::renderbufferStorage): Ditto.
712         (WebCore::WebGL2RenderingContext::hint): Ditto.
713         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Ditto.
714         (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Promote OES_element_index_uint extension to core.
715         (WebCore::WebGL2RenderingContext::validateDrawElements): Ditto.
716         (WebCore::WebGL2RenderingContext::validateBlendEquation): Promote EXT_blend_minmax extension to core.
717         * html/canvas/WebGL2RenderingContext.h:
718
719         * html/canvas/WebGLRenderingContext.cpp:
720         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Copied form WebGLRenderingContextBase.
721         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
722         (WebCore::WebGLRenderingContext::hint): Ditto.
723         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
724         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
725         (WebCore::WebGLRenderingContext::validateBlendEquation): Ditto.
726         * html/canvas/WebGLRenderingContext.h:
727
728         * html/canvas/WebGLRenderingContextBase.cpp:
729         (WebCore::WebGLRenderingContextBase::validateIndexArrayConservative): Deleted.
730         (WebCore::WebGLRenderingContextBase::validateDrawElements): Deleted.
731         (WebCore::WebGLRenderingContextBase::getExtension): Deleted.
732         (WebCore::WebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
733         (WebCore::WebGLRenderingContextBase::hint): Deleted.
734         (WebCore::WebGLRenderingContextBase::renderbufferStorage): Deleted.
735         (WebCore::WebGLRenderingContextBase::validateBlendEquation): Deleted.
736         * html/canvas/WebGLRenderingContextBase.h:
737
738 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
739
740         Streamline unexported function build fixes
741         https://bugs.webkit.org/show_bug.cgi?id=141761
742
743         Reviewed by Alex Christensen.
744
745         * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
746         OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
747
748         * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
749         it's not only Xcode 5 that is affected.
750
751         * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
752         Node, NodeList needs an exactly the same one. Also updated the comments.
753
754 2015-02-18  Chris Dumez  <cdumez@apple.com>
755
756         Access FontCache global instance via singleton() static member function
757         https://bugs.webkit.org/show_bug.cgi?id=141726
758
759         Reviewed by Daniel Bates.
760
761         Access FontCache global instance via singleton() static member function,
762         as per coding style.
763
764 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
765
766         Crashes under IDBDatabase::closeConnection.
767         https://bugs.webkit.org/show_bug.cgi?id=141745
768         rdar://problem/19816412
769
770         Reviewed by David Kilzer.
771
772         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
773         Add a missing protector.
774
775 2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
776
777         Justified ruby can cause lines to grow beyond their container
778         https://bugs.webkit.org/show_bug.cgi?id=141732
779
780         Reviewed by David Hyatt.
781
782         After we re-layout RenderRubyRuns, this can change the environment upon which
783         ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
784         the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
785         effective width of the RenderRubyRun to change, which causes out subsequent
786         justification calculations to be off.
787
788         Therefore, we have a cycle; the amount of ruby overhang can change the justification
789         in a line, and the layout of the line affects the ruby overhang calculation. Instead
790         of performing a layout in a loop until it converges, this patch simply observes that
791         having a flush right edge is more valuable than having a perfectly correct overhang.
792         It therefore simply removes the secondary overhang calculation.
793
794         Test: fast/text/ruby-justification-flush.html
795
796         * rendering/RenderBlockFlow.h:
797         * rendering/RenderBlockLineLayout.cpp:
798         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
799         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
800         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
801
802 2015-02-18  Chris Dumez  <cdumez@apple.com>
803
804         Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
805         https://bugs.webkit.org/show_bug.cgi?id=141723
806
807         Reviewed by Andreas Kling.
808
809         Evict dead resources from the MemoryCache on non-critical memory
810         pressure. On critical memory pressure, we already evict ALL resources
811         from the MemoryCache. It is a good idea to start by evicting resources
812         we care less about on non-critical warning to decrease the chances of
813         getting a critical warning and thus having to clear the whole
814         MemoryCache.
815
816         * loader/cache/MemoryCache.h:
817         * platform/MemoryPressureHandler.cpp:
818         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
819         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
820         (WebCore::MemoryPressureHandler::releaseMemory):
821         Call releaseCriticalMemory() before releaseNoncriticalMemory()
822         as releaseCriticalMemory() is more aggressive. Doing it the
823         other way around would mean that on critical warning, we would
824         first evict dead resources, then evict all resources. It is
825         more efficient to evict all resources first, as it makes the
826         non-critical operation (evict dead resources) a no-op.
827
828 2015-02-18  Eric Carlson  <eric.carlson@apple.com>
829
830         [iOS] pause video when a tab moves to the background on some devices
831         https://bugs.webkit.org/show_bug.cgi?id=141753
832         <rdar://problem/19814562>
833
834         Reviewed by Jer Noble.
835
836         Test: media/video-background-tab-playback.html
837
838         * platform/audio/MediaSession.cpp:
839         (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
840             hidden if the BackgroundTabPlaybackRestricted is set.
841
842         * platform/audio/MediaSessionManager.cpp:
843         (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
844              to BackgroundProcessPlaybackRestricted.
845         (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
846         * platform/audio/MediaSessionManager.h:
847
848         * platform/audio/ios/MediaSessionManagerIOS.mm:
849         (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
850             devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
851
852         * testing/Internals.cpp:
853         (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
854             BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
855
856 2015-02-16  David Hyatt  <hyatt@apple.com>
857
858         Wrong element's style is used for text-decoration-style.
859         https://bugs.webkit.org/show_bug.cgi?id=141673
860         <rdar://problem/19876774>
861
862         Reviewed by Dean Jackson.
863
864         Added fast/text/text-underline-style.html
865
866         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
867         (AXAttributeStringSetStyle):
868         Add arguments for fetching styles.
869
870         * rendering/InlineTextBox.cpp:
871         (WebCore::InlineTextBox::paint):
872         (WebCore::InlineTextBox::paintDecoration):
873         * rendering/InlineTextBox.h:
874         Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
875         way it fetches the colors.
876
877         * rendering/RenderObject.cpp:
878         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
879         (WebCore::RenderObject::getTextDecorationColors): Deleted.
880         * rendering/RenderObject.h:
881         Add style fetching to the same function that fetches colors and rename it.
882
883 2015-02-18  David Kilzer  <ddkilzer@apple.com>
884
885         REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
886
887         Attempt to fix this linker error by making a non-coding change:
888
889             Undefined symbols for architecture i386:
890               "__ZN7WebCore17ContentExtensions24ContentExtensionsBackendC1Ev", referenced from:
891                   __ZN7WebCore21UserContentController20addUserContentFilterERKN3WTF6StringES4_ in UserContentController.o
892             ld: symbol(s) not found for architecture i386
893
894         This should have been fixed by r180266, but perhaps Xcode didn't
895         recognize that it needed to rebuild this source file.
896
897         * page/UserContentController.cpp: Update copyright.
898
899 2015-02-18  Andreas Kling  <akling@apple.com>
900
901         Purge PassRefPtr from CanvasRenderingContext2D.
902         <https://webkit.org/b/141749>
903
904         Reviewed by Gyuyoung Kim.
905
906         Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.
907
908         * html/TextMetrics.h:
909         (WebCore::TextMetrics::create): Changed create() helper to return Ref.
910
911         * html/canvas/CanvasRenderingContext2D.h:
912         * html/canvas/CanvasRenderingContext2D.cpp:
913         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.
914
915         (WebCore::CanvasRenderingContext2D::createLinearGradient):
916         (WebCore::CanvasRenderingContext2D::createRadialGradient):
917         (WebCore::CanvasRenderingContext2D::createPattern):
918         (WebCore::createEmptyImageData):
919         (WebCore::CanvasRenderingContext2D::createImageData):
920         (WebCore::CanvasRenderingContext2D::getImageData):
921         (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
922         a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
923         and changed a PassRefPtr argument to RefPtr&&.
924
925         (WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.
926
927 2015-02-18  Commit Queue  <commit-queue@webkit.org>
928
929         Unreviewed, rolling out r180260.
930         https://bugs.webkit.org/show_bug.cgi?id=141757
931
932         Broke the 32-bit builders (Requested by jessieberlin on
933         #webkit).
934
935         Reverted changeset:
936
937         "Add a trivial code generator for the DFA"
938         https://bugs.webkit.org/show_bug.cgi?id=141017
939         http://trac.webkit.org/changeset/180260
940
941 2015-02-17  Anders Carlsson  <andersca@apple.com>
942
943         Add API for clearing in-memory caches to WKWebsiteDataStore
944         https://bugs.webkit.org/show_bug.cgi?id=141724
945
946         Reviewed by Tim Horton.
947
948         Add a version of evictResources that takes a session id.
949
950         * loader/cache/MemoryCache.cpp:
951         (WebCore::MemoryCache::evictResources):
952
953 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
954
955         Remove more references to WebCore.exp.in
956         https://bugs.webkit.org/show_bug.cgi?id=141747
957
958         Reviewed by Alexey Proskuryakov.
959
960         * WebCore.xcodeproj/project.pbxproj:
961
962 2015-02-17  Benjamin Poulain  <benjamin@webkit.org>
963
964         Add a trivial code generator for the DFA
965         https://bugs.webkit.org/show_bug.cgi?id=141017
966
967         Reviewed by Andreas Kling.
968
969         Nothing fancy yet, this is just doing a literal translation from the DFA
970         to machine code. It is extremely inefficient at the moment.
971
972         * WebCore.xcodeproj/project.pbxproj:
973         * contentextensions/ContentExtensionsBackend.cpp:
974         (WebCore::ContentExtensions::ContentExtensionsBackend::ContentExtensionsBackend):
975         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
976         (WebCore::ContentExtensions::addActionToHashSet):
977         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
978         * contentextensions/ContentExtensionsBackend.h:
979         * contentextensions/DFA.cpp:
980         (WebCore::ContentExtensions::DFA::nextState): Deleted.
981         (WebCore::ContentExtensions::DFA::actions): Deleted.
982         * contentextensions/DFA.h:
983         (WebCore::ContentExtensions::DFA::size):
984         (WebCore::ContentExtensions::DFA::nodeAt):
985         * contentextensions/DFACompiler.cpp: Added.
986         (WebCore::ContentExtensions::compileDFA):
987         (WebCore::ContentExtensions::DFACodeGenerator::DFACodeGenerator):
988         (WebCore::ContentExtensions::DFACodeGenerator::compile):
989         (WebCore::ContentExtensions::DFACodeGenerator::lowerStateMachine):
990         (WebCore::ContentExtensions::DFACodeGenerator::lowerNode):
991         (WebCore::ContentExtensions::DFACodeGenerator::getNextCharacter):
992         (WebCore::ContentExtensions::DFACodeGenerator::callAddActionFunction):
993         * contentextensions/DFACompiler.h: Copied from Source/WebCore/contentextensions/DFA.h.
994
995 2015-02-17  Chris Dumez  <cdumez@apple.com>
996
997         Rename ScopedEventQueue::instance() to singleton()
998         https://bugs.webkit.org/show_bug.cgi?id=141738
999
1000         Reviewed by Daniel Bates.
1001
1002         Rename ScopedEventQueue::instance() to singleton(), as per coding
1003         style. Also modernize the code a little bit.
1004
1005         * dom/EventDispatcher.cpp:
1006         (WebCore::EventDispatcher::dispatchScopedEvent):
1007         * dom/ScopedEventQueue.cpp:
1008         (WebCore::ScopedEventQueue::singleton):
1009         (WebCore::ScopedEventQueue::dispatchAllEvents):
1010         (WebCore::ScopedEventQueue::incrementScopingLevel):
1011         (WebCore::ScopedEventQueue::decrementScopingLevel):
1012         (WebCore::ScopedEventQueue::ScopedEventQueue): Deleted.
1013         (WebCore::ScopedEventQueue::~ScopedEventQueue): Deleted.
1014         (WebCore::ScopedEventQueue::instance): Deleted.
1015         * dom/ScopedEventQueue.h:
1016         (WebCore::EventQueueScope::EventQueueScope):
1017         (WebCore::EventQueueScope::~EventQueueScope):
1018
1019 2015-02-17  Chris Dumez  <cdumez@apple.com>
1020
1021         Remove dead code from FontCache
1022         https://bugs.webkit.org/show_bug.cgi?id=141741
1023
1024         Reviewed by Daniel Bates.
1025
1026         Remove dead code from FontCache:
1027         - getFontFamilyForCharacters() has no implementation.
1028         - SimpleFontFamily is unused.
1029
1030         * platform/graphics/FontCache.h:
1031
1032 2015-02-17  Chris Dumez  <cdumez@apple.com>
1033
1034         Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
1035         https://bugs.webkit.org/show_bug.cgi?id=141739
1036
1037         Reviewed by Simon Fraser.
1038
1039         Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
1040         per coding style.
1041
1042         * page/animation/CSSPropertyAnimation.cpp:
1043         (WebCore::CSSPropertyAnimationWrapperMap::singleton):
1044         (WebCore::CSSPropertyAnimation::blendProperties):
1045         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
1046         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
1047         (WebCore::CSSPropertyAnimation::propertiesEqual):
1048         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
1049         (WebCore::CSSPropertyAnimation::getNumProperties):
1050         (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
1051
1052 2015-02-17  David Kilzer  <ddkilzer@apple.com>
1053
1054         REGRESSION (r180224): Remove unused generate-export-file script
1055         <http://webkit.org/b/141491>
1056
1057         * generate-export-file: Removed.  This was the script used to
1058         create WebCore.exp files for iOS since we couldn't compile a
1059         host-side tool to run like we did on Mac OS X.  Dont't tell
1060         anyone, but this was an epic hack I created while merging open
1061         source changes to the internal iOS WebKit repository around the
1062         time that the WebCore.exp.in file was created.  End of an era.
1063
1064 2015-02-17  David Kilzer  <ddkilzer@apple.com>
1065
1066         SoftLinking.h: Update copyright and license; clean up whitespace
1067
1068         * platform/win/SoftLinking.h:
1069
1070 2015-02-17  Chris Dumez  <cdumez@apple.com>
1071
1072         Slight CachedPage class clean up
1073         https://bugs.webkit.org/show_bug.cgi?id=141693
1074
1075         Reviewed by Andreas Kling.
1076
1077         Slight CachedPage class clean up:
1078         - Drop unnecessary m_timeStamp data member
1079         - Protect m_needsCaptionPreferencesChanged data member with
1080           #if ENABLE(VIDEO_TRACK)
1081         - Merge destroy() method into the destructor as this is the
1082           only caller
1083         - Update clear() to reset 2 data members that were missing
1084
1085 2015-02-17  Anders Carlsson  <andersca@apple.com>
1086
1087         Silence two -Wcast-qual warnings.
1088         rdar://problem/19758266
1089
1090         * platform/ios/wak/WKUtilities.c:
1091         (WKRetain):
1092         (WKRelease):
1093
1094 2015-02-17  Zalan Bujtas  <zalan@apple.com>
1095
1096         Minor RenderTable* class cleanups.
1097         https://bugs.webkit.org/show_bug.cgi?id=141707
1098
1099         Reviewed by Andreas Kling.
1100
1101         Use in-class initializer where possible.
1102         Remove redundant code.
1103         Move multiline implementations out of class declaration.
1104
1105         No change in functionality.
1106
1107         * rendering/RenderTableCaption.cpp:
1108         (WebCore::RenderTableCaption::insertedIntoTree):
1109         (WebCore::RenderTableCaption::willBeRemovedFromTree):
1110         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Deleted.
1111         * rendering/RenderTableCaption.h:
1112         * rendering/RenderTableCell.cpp:
1113         (WebCore::RenderTableCell::RenderTableCell):
1114         * rendering/RenderTableCell.h:
1115         (WebCore::RenderTableCell::colSpan):
1116         (WebCore::RenderTableCell::rowSpan):
1117         (WebCore::RenderTableCell::setCol):
1118         (WebCore::RenderTableCell::col):
1119         (WebCore::RenderTableCell::section):
1120         (WebCore::RenderTableCell::table):
1121         (WebCore::RenderTableCell::rowIndex):
1122         (WebCore::RenderTableCell::styleOrColLogicalWidth):
1123         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1124         (WebCore::RenderTableCell::isBaselineAligned):
1125         (WebCore::RenderTableCell::borderAdjoiningTableStart):
1126         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
1127         (WebCore::RenderTableCell::borderAdjoiningCellBefore):
1128         (WebCore::RenderTableCell::borderAdjoiningCellAfter):
1129         * rendering/RenderTableCol.cpp:
1130         (WebCore::RenderTableCol::RenderTableCol):
1131         * rendering/RenderTableCol.h:
1132         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
1133         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
1134         * rendering/RenderTableRow.h:
1135         (WebCore::RenderTableRow::setRowIndex):
1136         (WebCore::RenderTableRow::rowIndex):
1137         (WebCore::RenderTableRow::borderAdjoiningTableStart):
1138         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
1139         (WebCore::RenderTableRow::table):
1140         (WebCore::RenderTableSection::firstRow):
1141         (WebCore::RenderTableSection::lastRow):
1142         * rendering/RenderTableSection.cpp:
1143         (WebCore::RenderTableSection::RenderTableSection):
1144         (WebCore::RenderTableSection::dirtiedRows):
1145         (WebCore::RenderTableSection::dirtiedColumns):
1146         (WebCore::RenderTableSection::paintObject):
1147         (WebCore::RenderTableSection::nodeAtPoint):
1148         * rendering/RenderTableSection.h:
1149         (WebCore::CellSpan::CellSpan):
1150         (WebCore::RenderTableSection::borderAdjoiningTableStart):
1151         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
1152         (WebCore::RenderTableSection::cellAt):
1153         (WebCore::RenderTableSection::primaryCellAt):
1154         (WebCore::RenderTableSection::rowRendererAt):
1155         (WebCore::RenderTableSection::outerBorderLeft):
1156         (WebCore::RenderTableSection::outerBorderRight):
1157         (WebCore::RenderTableSection::outerBorderTop):
1158         (WebCore::RenderTableSection::outerBorderBottom):
1159         (WebCore::RenderTableSection::numRows):
1160         (WebCore::RenderTableSection::recalcCellsIfNeeded):
1161         (WebCore::RenderTableSection::rowBaseline):
1162         (WebCore::RenderTableSection::fullTableRowSpan):
1163         (WebCore::CellSpan::start): Deleted.
1164         (WebCore::CellSpan::end): Deleted.
1165
1166 2015-02-16  Dean Jackson  <dino@apple.com>
1167
1168         REGRESSION: Video control fails to hide after playback begins in reflowable EPUB files
1169         https://bugs.webkit.org/show_bug.cgi?id=141689
1170         <rdar://problem/19689286>
1171
1172         Reviewed by Eric Carlson.
1173
1174         The iBooks app turns off the requirement for a user gesture
1175         before triggering playback. When we moved to script-based
1176         media controls there were a few regressions in this setup.
1177         This makes them behave a lot more like iOS 7.
1178
1179         * Modules/mediacontrols/mediaControlsApple.js:
1180         (Controller.prototype.setPlaying): We don't want to hide the controls
1181         yet, just start a hiding timer.
1182         * Modules/mediacontrols/mediaControlsiOS.js:
1183         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): If we've ever
1184         played before, we don't want to show the big start button. If we
1185         are in the middle of construction, we do want to show it. We no
1186         longer care about the case where you're not in setup and have
1187         the relaxed restrictions (we still want to show the start button
1188         in that case).
1189         (ControllerIOS.prototype.showControls): When we show the controls,
1190         make sure our timeline is up to date. This is necessary for the
1191         cases where we automatically show the controls, such as when we hit
1192         the end of a video.
1193         (ControllerIOS.prototype.updateTime): Make sure to pass the forceUpdate
1194         parameter on to the super-method.
1195         (ControllerIOS.prototype.setPlaying):
1196         (ControllerIOS.prototype.progressFillStyle): Deleted.
1197
1198 2015-02-17  Chris Dumez  <cdumez@apple.com>
1199
1200         Access MemoryPressureHandler global instance via a singleton() static member function
1201         https://bugs.webkit.org/show_bug.cgi?id=141691
1202
1203         Reviewed by Andreas Kling.
1204
1205         Access MemoryPressureHandler global instance via a singleton() static
1206         member function as per coding style. Also make all other member
1207         functions non-static as callers can just use singleton() to get the
1208         instance and access methods. This avoid having to call
1209         MemoryPressureHandler::singleton() from member functions.
1210
1211         * bindings/js/ScriptController.cpp:
1212         (WebCore::collectGarbageAfterWindowShellDestruction):
1213         * history/PageCache.cpp:
1214         (WebCore::PageCache::canCache):
1215         * loader/FrameLoader.cpp:
1216         (WebCore::FrameLoader::commitProvisionalLoad):
1217         * page/FrameView.cpp:
1218         (WebCore::FrameView::willPaintContents):
1219         (WebCore::FrameView::didPaintContents):
1220         (WebCore::FrameView::computeCoverageRect):
1221         * platform/MemoryPressureHandler.cpp:
1222         (WebCore::MemoryPressureHandler::singleton):
1223         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
1224         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1225         (WebCore::memoryPressureHandler): Deleted.
1226         * platform/MemoryPressureHandler.h:
1227         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
1228         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1229         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1230         (WebCore::MemoryPressureHandler::install):
1231         (WebCore::MemoryPressureHandler::holdOff):
1232         (WebCore::respondToMemoryPressureCallback):
1233         * platform/graphics/FontCache.cpp:
1234         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
1235         * platform/ios/LegacyTileCache.mm:
1236         (WebCore::LegacyTileCache::createTilesInActiveGrid):
1237         * platform/ios/LegacyTileGrid.mm:
1238         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
1239         * platform/ios/LegacyTileLayerPool.mm:
1240         (WebCore::LegacyTileLayerPool::addLayer):
1241         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
1242         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
1243         * platform/linux/MemoryPressureHandlerLinux.cpp:
1244         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
1245
1246 2015-02-17  Alex Christensen  <achristensen@webkit.org>
1247
1248         Remove WebCore.exp.in and clean up.
1249         https://bugs.webkit.org/show_bug.cgi?id=141491
1250
1251         Reviewed by Andreas Kling.
1252
1253         * Configurations/WebCore.xcconfig:
1254         Don't use exported symbols files.
1255         * DerivedSources.make:
1256         Don't generate export files.
1257         * WebCore.exp.in: Removed.
1258         * WebCore.xcodeproj/project.pbxproj:
1259         Removed WebCoreExportFileGenerator targets.
1260         * make-export-file-generator: Removed.
1261
1262 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1263
1264         Use HashMap::add instead of get/contains + set in DOMObjectCache
1265         https://bugs.webkit.org/show_bug.cgi?id=141558
1266
1267         Rubber-stamped by Žan Doberšek.
1268
1269         * bindings/gobject/DOMObjectCache.cpp:
1270         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
1271         (WebKit::DOMObjectCache::put):
1272
1273 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1274
1275         [GTK] GObject DOM bindings object are cached forever
1276         https://bugs.webkit.org/show_bug.cgi?id=141558
1277
1278         Reviewed by Sergio Villar Senin.
1279
1280         Rework the DOMObjectCache to avoid having to manually clear the
1281         objects when the frame is destroyed, using a FrameDestructionObserver
1282         instead. When a new object associated to a Frame is added to the
1283         cache, a FrameDestructionObserver is created for the frame if
1284         needed, and the DOM object is tracked by the observer too. When
1285         the frame is detached from the page all its objects are cleared,
1286         and if the aren't additional references, the object is finalized
1287         and removed from the cache normally.
1288         This patch also simplifies and modernizes the code to make it
1289         easier to read an maintain.
1290
1291         * bindings/gobject/DOMObjectCache.cpp:
1292         (WebKit::DOMObjectCacheData::DOMObjectCacheData): Add constructor
1293         to initialize its members and simplify the callers.
1294         (WebKit::DOMObjectCacheData::clearObject): Remove the references
1295         added by the cache, ensuring the GObject is not finalized until
1296         the method returns.
1297         (WebKit::DOMObjectCacheData::refObject): Adds a reference owned by
1298         the cache.
1299         (WebKit::domObjectCacheFrameObservers): Map a frame to a FrameDestructionObserver.
1300         (WebKit::getOrCreateDOMObjectCacheFrameObserver): Create a new
1301         FrameDestructionObserver for the given Frame or return the
1302         existing one.
1303         (WebKit::domObjects): Map wrapped object to wrapper object.
1304         (WebKit::DOMObjectCache::forget): Remove the wrapped object from
1305         the cache.
1306         (WebKit::DOMObjectCache::get): Return the wrapped object if it is
1307         in the cache, increasing the cache references.
1308         (WebKit::DOMObjectCache::put): Add the wrapper object to the cache
1309         for the given wrapped object. If it's a Node and has a frame add
1310         the node to the FrameDestructionObserver corresponding to the frame.
1311         (WebKit::getFrameFromHandle): Deleted.
1312         (WebKit::weakRefNotify): Deleted.
1313         (WebKit::DOMObjectCache::clearByFrame): Deleted.
1314         (WebKit::DOMObjectCache::~DOMObjectCache): Deleted.
1315         * bindings/gobject/DOMObjectCache.h:
1316
1317 2015-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
1318
1319         REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
1320         https://bugs.webkit.org/show_bug.cgi?id=141647
1321
1322         Reviewed by Csaba Osztrogonác.
1323
1324         No new tests since this just fixes a build break.
1325
1326         * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
1327         (WebCore::Position::isCandidate):
1328
1329 2015-02-16  Chris Dumez  <cdumez@apple.com>
1330
1331         Keep all memory cache resources in ListHashSets
1332         https://bugs.webkit.org/show_bug.cgi?id=141667
1333
1334         Reviewed by Andreas Kling.
1335
1336         Keep all memory cache resources in ListHashSets instead of manual linked
1337         lists. This simplifies the code a lot and is also more efficient for
1338         retrieving / removing particular CachedResources.
1339
1340         * loader/cache/CachedResource.cpp:
1341         (WebCore::CachedResource::CachedResource):
1342         * loader/cache/CachedResource.h:
1343         * loader/cache/MemoryCache.cpp:
1344         (WebCore::MemoryCache::pruneDeadResourcesToSize):
1345         (WebCore::MemoryCache::removeFromLRUList):
1346         (WebCore::MemoryCache::insertInLRUList):
1347         (WebCore::MemoryCache::dumpLRULists):
1348         (WebCore::MemoryCache::lruListFor): Deleted.
1349         * loader/cache/MemoryCache.h:
1350
1351 2015-02-16  Benjamin Poulain  <benjamin@webkit.org>
1352
1353         CSS JIT: finish :nth-last-child()
1354         https://bugs.webkit.org/show_bug.cgi?id=141629
1355
1356         Reviewed by Andreas Kling.
1357
1358         This patch adds the matcher for :nth-child(An+B of selector list) and
1359         fix a small bug I discovered while working on it.
1360
1361         The matcher is straightforward: count the next siblings matching the selector,
1362         nothing fancy.
1363
1364         While working on it I noticed I forgot the test for IsParsingChildrenFinished
1365         on the simple version of :nth-last-child(). I add it in both matcher, write
1366         a couple of tests, the first part of the tests now succeed, but the second part
1367         fails...
1368
1369         What happened is:
1370         1) We interupt the parsing to execute the JavaScript.
1371            From there, we force the style resolution to get the computed style.
1372         2) When resolving the style, the early check for isFinishedParsingChildren()
1373            quits the function early. This is done *before* we marked the parent
1374            for :nth-last-child() style resolution.
1375         3) After the script, parsing resume and the following elements are added.
1376         4) When resolving the style, only the new elements are marked dirty,
1377            the elements pending their :nth-last-child() style never get udpated.
1378
1379         To fix the problem, I moved the test for FinishedParsingChildren after
1380         the parent marking.
1381
1382         Honestly, those early return for FinishedParsingChildren need to be refined
1383         and they should be tested properly. We should not do this kind of things
1384         for Query for example.
1385
1386         Tests: fast/selectors/nth-last-child-cannot-match-during-parsing-1.html
1387                fast/selectors/nth-last-child-cannot-match-during-parsing-2.html
1388                fast/selectors/nth-last-child-of-cannot-match-during-parsing-1.html
1389                fast/selectors/nth-last-child-of-cannot-match-during-parsing-2.html
1390                fast/selectors/nth-last-child-of-register-requirement.html
1391
1392         * css/SelectorChecker.cpp:
1393         (WebCore::SelectorChecker::checkOne):
1394         Fix the tree marking.
1395
1396         * cssjit/SelectorCompiler.cpp:
1397         (WebCore::SelectorCompiler::addPseudoClassType):
1398         The fragment creation was already done, all I had to do was
1399         accept the compile.
1400
1401         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1402         :nth-child() and :nth-last-child() with a selector list are heavier than :not()
1403         and :matches(), move them accordingly.
1404
1405         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
1406         More the early return after the tree marking.
1407
1408         (WebCore::SelectorCompiler::setParentAffectedByLastChildOf):
1409         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
1410         New matcher, nothing optimized yet.
1411
1412 2015-02-16  Tim Horton  <timothy_horton@apple.com>
1413
1414         Adopt CAMachPort-as-layer-contents
1415         https://bugs.webkit.org/show_bug.cgi?id=141687
1416         <rdar://problem/19393233>
1417
1418         Reviewed by Simon Fraser.
1419
1420         No new tests, just a performance bump.
1421
1422         * platform/cocoa/MachSendRight.h:
1423         (WebCore::MachSendRight::operator bool):
1424         Add an operator bool() that checks if the underlying port is nonnull.
1425
1426         * platform/spi/cocoa/QuartzCoreSPI.h:
1427         Add some SPI.
1428
1429 2015-02-15  Sam Weinig  <sam@webkit.org>
1430
1431         Add experimental <attachment> element support
1432         https://bugs.webkit.org/show_bug.cgi?id=141626
1433
1434         Reviewed by Tim Horton.
1435
1436         Adds scaffolding for an experimental implementation of an <attachment> element
1437         which can represent a file attachment (e.g. NSTextAttachment in NSAttributedString
1438         parlance).
1439
1440         The implementation is guarded by both an #ifdef (ENABLE(ATTACHMENT_ELEMENT)) and 
1441         a setting (Settings::attachmentElementEnabled()).
1442
1443         Tests: fast/attachment/attachment-disabled-dom.html
1444                fast/attachment/attachment-disabled-rendering.html
1445                fast/attachment/attachment-dom.html
1446                fast/attachment/attachment-rendering.html
1447
1448         * Configurations/FeatureDefines.xcconfig:
1449         Add new ENABLE_ATTACHMENT_ELEMENT macro.
1450
1451         * CMakeLists.txt:
1452         * WebCore.vcxproj/WebCore.vcxproj:
1453         * WebCore.xcodeproj/project.pbxproj:
1454         Add new files.
1455
1456         * dom/make_names.pl:
1457         Add support for checking a setting to determine if a particular tag should be exposed.
1458
1459         * html/HTMLAttachmentElement.cpp: Added.
1460         * html/HTMLAttachmentElement.h: Added.
1461         Stub out the basics of the new element.
1462
1463         * html/HTMLElementsAllInOne.cpp:
1464         Add HTMLAttachmentElement.cpp.
1465
1466         * html/HTMLTagNames.in:
1467         Add 'attachment'.
1468
1469         * page/Settings.in:
1470         Add attachmentElementEnabled setting.
1471
1472         * rendering/RenderAttachment.cpp: Added.
1473         * rendering/RenderAttachment.h: Added.
1474         Stub out the basics of the new render. We will probably want to replace this with
1475         a non-replaced render, but this will do as a placeholder for now.
1476
1477         * rendering/RenderObject.h:
1478         (WebCore::RenderObject::isAttachment):
1479         Add predicate for type casting.
1480
1481         * rendering/RenderingAllInOne.cpp:
1482         Add RenderAttachment.cpp.
1483
1484 2015-02-16  Andreas Kling  <akling@apple.com>
1485
1486         GC (almost) immediately when navigating under memory pressure.
1487         <https://webkit.org/b/141663>
1488
1489         Reviewed by Geoffrey Garen.
1490
1491         Since the PageCache is already disabled in memory pressure situations,
1492         we know that detaching the old window shell on navigation is basically
1493         guaranteed to generate a bunch of garbage, we can soften the memory
1494         peak a bit by doing a GC right away instead of scheduling one for soon(tm).
1495
1496         * bindings/js/GCController.cpp:
1497         (WebCore::GCController::GCController):
1498         (WebCore::GCController::garbageCollectSoon):
1499         (WebCore::GCController::garbageCollectOnNextRunLoop):
1500         (WebCore::GCController::gcTimerFired):
1501         * bindings/js/GCController.h:
1502
1503             Add a GCController::garbageCollectOnNextRunLoop() complement to the
1504             "soon" and "now" options. There was already a zero timer in here for
1505             non-CF builds, so I just used that same timer to implement this
1506             and have the non-CF code path call garbageCollectOnNextRunLoop().
1507
1508         * bindings/js/ScriptController.cpp:
1509         (WebCore::collectGarbageAfterWindowShellDestruction):
1510         (WebCore::ScriptController::~ScriptController):
1511         (WebCore::ScriptController::clearWindowShell):
1512
1513             Under system memory pressure conditions, schedule a full GC on next
1514             runloop iteration instead of just asking for it to happen soon.
1515             We do it on next runloop to ensure that there's no pointer to the
1516             window object on the stack.
1517
1518 2015-02-16  Enrica Casucci  <enrica@apple.com>
1519
1520         Emoji sequences do not render properly.
1521         https://bugs.webkit.org/show_bug.cgi?id=141661
1522         rdar://problem/19820463
1523
1524         Reviewed by Sam Weinig.
1525
1526         Emoji sequences and emoji with variations should be rendered
1527         using the Complex code path and should be treated as graphemes.
1528         This change modifies advanceByCombiningCharacterSequence to add
1529         this logic.
1530
1531         Test: fast/text/emoji.html
1532
1533         * WebCore.xcodeproj/project.pbxproj:
1534         * platform/graphics/FontCascade.cpp:
1535         (WebCore::FontCascade::characterRangeCodePath):
1536         * platform/graphics/mac/ComplexTextController.cpp:
1537         (WebCore::advanceByCombiningCharacterSequence): Implements a simple
1538         logic to treat emoji sequences and emoji with variations as graphemes.
1539         * platform/text/CharacterProperties.h: Added.
1540         (WebCore::isEmojiGroupCandidate):
1541         (WebCore::isEmojiModifier):
1542         (WebCore::isVariationSelector):
1543         * rendering/RenderText.cpp:
1544         (WebCore::isEmojiGroupCandidate): Deleted.
1545         (WebCore::isEmojiModifier): Deleted.
1546
1547 2015-02-16  Zalan Bujtas  <zalan@apple.com>
1548
1549         RenderTableRow should check if it has access to its ancestor chain.
1550         https://bugs.webkit.org/show_bug.cgi?id=141668
1551
1552         Reviewed by Andreas Kling.
1553
1554         Preventive fix.
1555
1556         * rendering/RenderTableRow.cpp:
1557         (WebCore::RenderTableRow::styleDidChange):
1558         (WebCore::RenderTableRow::addChild):
1559         * rendering/RenderTableRow.h:
1560
1561 2015-02-16  Jer Noble  <jer.noble@apple.com>
1562
1563         [iOS] Build fix: declare undeclared identifier 'credential'.
1564
1565         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1566         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential):
1567
1568 2015-02-16  Jer Noble  <jer.noble@apple.com>
1569
1570         [iOS] Unable to play .mp4 file over http with basic http authentication
1571         https://bugs.webkit.org/show_bug.cgi?id=141503
1572         rdar://problem/15799844
1573
1574         Reviewed by Alexey Proskuryakov.
1575
1576         On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
1577         provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
1578         object by way of CFURLAuthChallengeRef.
1579
1580         Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
1581         is to take AuthenticationChallengeClient callbacks and pass them along to a
1582         NSURLAuthenticationChallenge sender.
1583
1584         Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
1585         that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
1586         them into that same header.
1587
1588         * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
1589         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1590         (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
1591         (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
1592         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
1593         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
1594         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
1595         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
1596         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
1597         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
1598             Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
1599             to the HTMLMediaElement.
1600         * platform/network/mac/AuthenticationMac.mm:
1601         * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.
1602
1603 2015-02-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
1604
1605         Revert a change in SVGRenderSupport::mapLocalToContainer committed for fixing <https://bugs.webkit.org/show_bug.cgi?id=119626>.
1606         https://bugs.webkit.org/show_bug.cgi?id=138439
1607
1608         Reviewed by Darin Adler.
1609
1610         The change http://trac.webkit.org/changeset/164861 was ported from Blink
1611         but it was was revert later because it broke Chrome SVG rendering. It also
1612         broke the WebKit SVG text search highlighting.
1613         
1614         Tests: svg/transforms/svg-geometry-crash.html: This test was added by the
1615         blamed change. A new but correct solution is required to fix the assertion.
1616
1617         * rendering/svg/SVGRenderSupport.h:
1618         * rendering/svg/SVGRenderSupport.cpp:
1619         Notice that TransformState.applyTransform() does matrix-left-multiplication,
1620         i.e. state = transform * state. But operator*() of AffineTransform and
1621         MatrixTransform  does right multiply, i.e. this = this * transform.
1622         
1623         (WebCore::SVGRenderSupport::localToParentTransform): Have the calculation
1624         of the SVG localToParentTransform in one shared function.
1625         
1626         (WebCore::SVGRenderSupport::mapLocalToContainer): Revert the Blink change.
1627         If the parent is the SVG root, the transform state should be equal to
1628         transform = svg_to_css_mapping * local_to_parent_mapping * transform.
1629         
1630         (WebCore::SVGRenderSupport::pushMappingToContainer): Get the localToParent
1631         transform to be pushed in the geometryMap. If the parent is the SVG root,
1632         localToParent = svg_to_css_mapping * local_to_parent_mapping. The original
1633         code was doing the opposite and this is the cause of the assertion which 
1634         was fixed wrongly by reversing the correct multiplication order in 
1635         SVGRenderSupport::mapLocalToContainer().
1636
1637 2015-02-16  Zalan Bujtas  <zalan@apple.com>
1638
1639         RenderTableCell can't access its parent while in detached state.
1640         https://bugs.webkit.org/show_bug.cgi?id=141639
1641         rdar://problem/19850760
1642
1643         Reviewed by Simon Fraser.
1644
1645         Null check against ancestor chain so that certain methods in RenderTableCell can
1646         be called even if the renderer is not yet attached.
1647
1648         Test: fast/table/table-cell-crash-when-detached-state.html
1649
1650         * rendering/RenderTableCell.cpp:
1651         (WebCore::RenderTableCell::borderLeft):
1652         (WebCore::RenderTableCell::borderRight):
1653         (WebCore::RenderTableCell::borderTop):
1654         (WebCore::RenderTableCell::borderBottom):
1655         (WebCore::RenderTableCell::borderStart):
1656         (WebCore::RenderTableCell::borderEnd):
1657         (WebCore::RenderTableCell::borderBefore):
1658         (WebCore::RenderTableCell::borderAfter):
1659         * rendering/RenderTableCell.h:
1660
1661 2015-02-16  David Hyatt  <hyatt@apple.com>
1662
1663         Add ifdefs to avoid adjusting Ruby selection rects to avoid overlap on iOS.
1664         https://bugs.webkit.org/show_bug.cgi?id=141651
1665         <rdar://problem/19182526>
1666         
1667         Reviewed by Simon Fraser.
1668
1669         * rendering/RootInlineBox.cpp:
1670         (WebCore::RootInlineBox::selectionTop):
1671         (WebCore::RootInlineBox::selectionBottom):
1672
1673 2015-02-16  David Kilzer  <ddkilzer@apple.com>
1674
1675         SoftLinking.h: Update copyright and license; clean up whitespace
1676
1677         * platform/mac/SoftLinking.h:
1678
1679 2015-02-12  David Hyatt  <hyatt@apple.com>
1680
1681         text-underline-position:under has multiple correctness issues
1682         https://bugs.webkit.org/show_bug.cgi?id=141528
1683
1684         Reviewed by Dean Jackson.
1685
1686         Added a bunch of new tests in fast/text
1687
1688         * rendering/InlineFlowBox.cpp:
1689         (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
1690         (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
1691         (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
1692         * rendering/InlineFlowBox.h:
1693         These functions have been re-written to take an enclosing renderer that specified the
1694         decoration. This way they can properly limit the bottom/top computation to only line boxes
1695         that are contained inside the renderer.
1696
1697         * rendering/InlineTextBox.cpp:
1698         (WebCore::InlineTextBox::paintDecoration):
1699         Tweak the call to get the decoration colors now that quirks mode has been removed.
1700
1701         * rendering/RenderElement.cpp:
1702         (WebCore::RenderElement::enclosingRendererWithTextDecoration):
1703         * rendering/RenderElement.h:
1704         New function that finds the enclosing renderer that specified a text decoration. For now
1705         this is only used in the "under" position computation, but soon we'll be using it
1706         everywhere.
1707
1708         * rendering/RenderObject.cpp:
1709         (WebCore::RenderObject::getTextDecorationColors):
1710         * rendering/RenderObject.h:
1711         Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).
1712
1713         * rendering/RootInlineBox.cpp:
1714         (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
1715         * rendering/RootInlineBox.h:
1716         Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
1717         the InlineFlowBox functions directly.
1718
1719         * style/InlineTextBoxStyle.cpp:
1720         (WebCore::computeUnderlineOffset):
1721         Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
1722         computation to limit which line boxes get included.
1723
1724 2015-02-16  Brent Fulgham  <bfulgham@apple.com>
1725
1726         FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
1727         https://bugs.webkit.org/show_bug.cgi?id=141596
1728         <rdar://problem/19837103>
1729
1730         Reviewed by Zalan Bujtas.
1731
1732         No new tests. Covered by css3/filters/huge-blur-value.html
1733
1734         Avoid overflowing the signed integer values by not converting from unsigned
1735         until the maximum size has been clamped to the expected max.
1736
1737         * platform/graphics/filters/FEGaussianBlur.cpp:
1738         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
1739
1740 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
1741
1742         [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
1743         https://bugs.webkit.org/show_bug.cgi?id=140763
1744
1745         Reviewed by Antti Koivisto.
1746
1747         Content sized tracks with non-spanning grid items were not
1748         properly sized because the growth limit was sometimes infinity
1749         (-1) after calling resolveContentBasedTrackSizingFunctions() when
1750         it should not. This patch adds an special initialization phase for
1751         non-spanning grid items as the new track sizing algorithm
1752         describes.
1753
1754         Granted, that was handled in the old algorithm in
1755         distributeSpaceToTracks() as a special case. The problem is that
1756         it regressed after the optimization added in r173868 because that
1757         method is no longer called when the space to distribute is 0.
1758
1759         That's why we could fix this by allowing calls to
1760         distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
1761         it with an explicit initialization our implementation becomes
1762         closer to the new algorithm and the initialization is now explicit
1763         in the code instead of a side effect of calling
1764         distributeSpaceToTracks() with no space to be distributed. It also
1765         brings a slight performance improvement as we save sorts and hash
1766         lookups.
1767
1768         I also took the change to add caching to several GridTrackSize
1769         methods that were hot on the profiler (each one accounted for ~1%
1770         of the total time, now they account for ~0.3% each).
1771
1772         Test: fast/css-grid-layout/grid-initialize-span-one-items.html
1773
1774         * rendering/RenderGrid.cpp:
1775         (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
1776         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1777         Exclude non spanning grid items from the calls to
1778         resolveContentBasedTrackSizingFunctionsForItems().
1779         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
1780         New method to resolve track sizes only using non-spanning grid
1781         items.
1782         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1783         Ensure that it isn't called for non-spanning grid items.
1784         * rendering/RenderGrid.h:
1785         * rendering/style/GridTrackSize.h:
1786         (WebCore::GridTrackSize::GridTrackSize): Cache return values.
1787         (WebCore::GridTrackSize::setLength): Ditto.
1788         (WebCore::GridTrackSize::setMinMax): Ditto.
1789         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
1790         that caches the return values for hasXXXTrackBreadth() methods.
1791         (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
1792         the cached return value.
1793         (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
1794         (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
1795         (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
1796         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
1797         (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
1798         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
1799         Ditto.
1800         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
1801         Ditto.
1802
1803 2015-02-16  Milan Crha  <mcrha@redhat.com>
1804
1805         [GTK] Loading page into WebView shows g_closure_unref warning
1806         https://bugs.webkit.org/show_bug.cgi?id=127474
1807
1808         Reviewed by Carlos Garcia Campos.
1809
1810         * bindings/gobject/GObjectEventListener.cpp:
1811         (WebCore::GObjectEventListener::gobjectDestroyed):
1812
1813 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
1814
1815         [CSS Grid Layout] Remove the usage of Length(Undefined) in GridLength
1816         https://bugs.webkit.org/show_bug.cgi?id=141562
1817
1818         Reviewed by Chris Dumez.
1819
1820         From Blink r164154 by <timloh@chromium.org>
1821
1822         The patch simplifies some of the logic in creating and applying
1823         GridLength and GridTrackSize values to RenderStyles by using the
1824         constructors for initialisation instead of deferring to setters.
1825
1826         The rationale behind this change is that neither of
1827         createGridTrackSize() nor createGridTrackBreadth() should be able
1828         to fail, so these are changed to return objects directly instead
1829         of taking an out reference (note that in general failing in
1830         applying properties is incorrect and we should catch these in the
1831         parser).
1832
1833         The quirk value across to the Lengths was also removed because it
1834         doesn't apply to Grid.
1835
1836         * css/CSSPropertyNames.in:
1837         * css/StyleBuilderConverter.h:
1838         (WebCore::StyleBuilderConverter::createGridTrackBreadth): Return a
1839         GridLength instead of a bool.
1840         (WebCore::StyleBuilderConverter::createGridTrackSize): Return a
1841         GridTrackSize instead of a bool.
1842         (WebCore::StyleBuilderConverter::createGridTrackList): Do not
1843         create temporary GridTrackSizes with undefined Lengths.
1844         (WebCore::StyleBuilderConverter::convertGridTrackSize): Ditto.
1845         * rendering/style/GridLength.h:
1846         (WebCore::GridLength::GridLength): It now requires a mandatory
1847         Length argument.
1848         (WebCore::GridLength::length): Deleted.
1849         (WebCore::GridLength::setFlex): Deleted.
1850         * rendering/style/GridTrackSize.h:
1851         (WebCore::GridTrackSize::GridTrackSize): It now requires a
1852         mandatory GridLength argument.
1853         (WebCore::GridTrackSize::length): Removed no longer valid ASSERTs.
1854         (WebCore::GridTrackSize::minTrackBreadth): Ditto.
1855         (WebCore::GridTrackSize::maxTrackBreadth): Ditto.
1856         (WebCore::GridTrackSize::setLength): Deleted.
1857         (WebCore::GridTrackSize::setMinMax): Deleted.
1858         * rendering/style/RenderStyle.h:
1859
1860 2015-02-13  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1861
1862         Removing text node does not remove its associated markers
1863         https://bugs.webkit.org/show_bug.cgi?id=140999
1864
1865         Reviewed by Ryosuke Niwa.
1866
1867         Removing text node via script does not remove its markers.
1868         For example, running the following script:
1869
1870         <script>
1871             var div = document.getElementById("testElement");
1872             div.focus();
1873             document.execCommand("InsertText", false, "welllcome ");
1874
1875             // Give a time async spellchecker to show its markers and
1876             // remove the node.
1877             setTimeout(function() { div.removeChild(div.firstChild); }, 100);
1878         </script>
1879
1880         will cause that DocumentMarkerController still stores the markers for
1881         detached node.
1882
1883         The same issue occurs when the text gets cleared, for example,
1884         <script>
1885             input.value = ""; // for HTMLTextAreaElement, HTMLInputElement
1886             // or
1887             div.innerHTML = ""; // for content editable
1888         </script>
1889
1890         No new tests. Internals marker APIs operate on text node attached
1891         to the element. To test it we could expose document().markers().hasMarkers()
1892         but there is no more useful cases where it could be used.
1893         Another obstacle is that we are in isInShadowTree() so that there is
1894         no possible to register on "DOMSubtreeModified" event.
1895         Test cases attached to the bug:
1896         1. input.value = ""  https://bug-140999-attachments.webkit.org/attachment.cgi?id=245704
1897         2. elem.removeChild(textNode) https://bug-140999-attachments.webkit.org/attachment.cgi?id=246515
1898
1899         Remove markers when text nodes are about to remove.
1900         * dom/Document.cpp:
1901         (WebCore::Document::nodeChildrenWillBeRemoved):
1902         Fixes input.value = ""
1903         (WebCore::Document::nodeWillBeRemoved):
1904         Fixes elem.removeChild(textNode)
1905
1906 2015-02-15  David Kilzer  <ddkilzer@apple.com>
1907
1908         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
1909         <http://webkit.org/b/141607>
1910
1911         This should fix the build, but leaves a FIXME list in
1912         WebCore.unexp.
1913
1914         * Configurations/WebCore.unexp: Add weak externals with a FIXME
1915         statement so they can be removed later.  It's more important to
1916         fix the build first.
1917
1918         * Configurations/WebCore.xcconfig: Change XCODE_VERSION_MINOR to
1919         XCODE_VERSION_MAJOR since the internal bots use version 5.1.1
1920         which still has the error.
1921
1922 2015-02-15  Brian J. Burg  <burg@cs.washington.edu>
1923
1924         Web Inspector: remove unused XHR replay code
1925         https://bugs.webkit.org/show_bug.cgi?id=141622
1926
1927         Reviewed by Timothy Hatcher.
1928
1929         XHR Replay functionality became unused with the last frontend rewrite.
1930         Remove instrumentation and data storage classes only used by this feature.
1931
1932         * inspector/InspectorInstrumentation.cpp:
1933         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
1934         (WebCore::InspectorInstrumentation::willLoadXHRImpl): Deleted.
1935         (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): Deleted.
1936         * inspector/InspectorInstrumentation.h:
1937         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
1938         (WebCore::InspectorInstrumentation::willLoadXHR): Deleted.
1939         (WebCore::InspectorInstrumentation::didFailXHRLoading): Deleted.
1940         * inspector/InspectorResourceAgent.cpp:
1941         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1942         (WebCore::InspectorResourceAgent::didFinishXHRLoading):
1943         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
1944         (WebCore::InspectorResourceAgent::willLoadXHR): Deleted.
1945         (WebCore::InspectorResourceAgent::didFailXHRLoading): Deleted.
1946         (WebCore::InspectorResourceAgent::replayXHR): Deleted.
1947         * inspector/InspectorResourceAgent.h:
1948         * inspector/NetworkResourcesData.cpp:
1949         (WebCore::NetworkResourcesData::clear):
1950         (WebCore::XHRReplayData::create): Deleted.
1951         (WebCore::XHRReplayData::XHRReplayData): Deleted.
1952         (WebCore::NetworkResourcesData::xhrReplayData): Deleted.
1953         (WebCore::NetworkResourcesData::setXHRReplayData): Deleted.
1954         (WebCore::NetworkResourcesData::reuseXHRReplayData): Deleted.
1955         * inspector/NetworkResourcesData.h:
1956         (WebCore::XHRReplayData::method): Deleted.
1957         (WebCore::XHRReplayData::url): Deleted.
1958         (WebCore::XHRReplayData::async): Deleted.
1959         (WebCore::XHRReplayData::formData): Deleted.
1960         (WebCore::XHRReplayData::headers): Deleted.
1961         (WebCore::XHRReplayData::includeCredentials): Deleted.
1962         (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): Deleted.
1963         (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): Deleted.
1964         * loader/DocumentThreadableLoader.cpp:
1965         (WebCore::DocumentThreadableLoader::loadRequest):
1966         * xml/XMLHttpRequest.cpp:
1967         (WebCore::XMLHttpRequest::createRequest):
1968         (WebCore::XMLHttpRequest::internalAbort):
1969         (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Deleted.
1970         * xml/XMLHttpRequest.h:
1971
1972 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
1973
1974         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
1975         https://bugs.webkit.org/show_bug.cgi?id=141550.
1976
1977         Reviewed by David Kilzer.
1978
1979         * svg/properties/SVGMatrixTearOff.h:
1980         (WebCore::SVGMatrixTearOff::create): Fix a compilation error on the release build.
1981         The ASSERT() here references a parameter which is not used anywhere else. We need 
1982         to change it to ASSERT_UNUSED(). 
1983
1984 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
1985
1986         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
1987         https://bugs.webkit.org/show_bug.cgi?id=141550.
1988
1989         Reviewed by Darin Adler.
1990
1991         Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to
1992         include a new test case.
1993
1994         * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null
1995         pointer. There is no point in having SVGMatrixTearOff points to the parent and
1996         the property of the parent at the same time.
1997         
1998         (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to
1999         the parent SVGPropertyTearOff<SVGTransform>. But it should overrides setValue()
2000         and propertyReference() so it can set and get the SVGMatrix from the SVGTransform
2001         parent.
2002         
2003         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class.
2004         SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by
2005         itself but it knows what property to set and get from the parent.
2006         
2007         * svg/properties/SVGPropertyTearOff.h:
2008         (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value.
2009         
2010         (WebCore::SVGPropertyTearOff::propertyReference):
2011         (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes
2012         like SVGMatrixTearOff can override them.
2013         
2014         (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor.
2015
2016 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2017
2018         Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
2019         https://bugs.webkit.org/show_bug.cgi?id=141552.
2020
2021         Reviewed by Darin Adler.
2022
2023         Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to
2024         include a new test case.
2025
2026         * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item
2027         before trying to detach the wrapper of the item which going to be replaced.
2028
2029 2015-02-15  David Kilzer  <ddkilzer@apple.com>
2030
2031         CoreText only needs to be soft-linked on Windows
2032
2033         More work towards the Maverick Debug build fix:
2034
2035         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
2036         <http://webkit.org/b/141607>
2037
2038         * page/CaptionUserPreferencesMediaAF.cpp:
2039
2040 2015-02-15  Alexey Proskuryakov  <ap@apple.com>
2041
2042         More build fixing.
2043
2044         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
2045
2046 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
2047
2048         More internal build fixing.
2049
2050         DDDFACache.h is not an actual private header, so we were using open source
2051         redeclaration of DDDFACacheRef with an internal function prototype from DDDFAScanner.h.
2052
2053         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
2054         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
2055
2056 2015-02-14  Benjamin Poulain  <benjamin@webkit.org>
2057
2058         Add the initial matching implementation for attribute selectors with case-insensitive value
2059         https://bugs.webkit.org/show_bug.cgi?id=141615
2060
2061         Reviewed by Andreas Kling.
2062
2063         Tests: fast/css/case-insensitive-attribute-selector-specificity.html
2064                fast/css/case-insensitive-attribute-selector-styling-html-1.html
2065                fast/css/case-insensitive-attribute-selector-styling-html-2.html
2066                fast/css/case-insensitive-attribute-selector-styling-html-3.html
2067                fast/css/case-insensitive-attribute-selector-styling-xhtml-1.xhtml
2068                fast/css/case-insensitive-attribute-selector-styling-xhtml-2.xhtml
2069                fast/css/case-insensitive-attribute-selector-styling-xhtml-3.xhtml
2070                fast/selectors/case-insensitive-attribute-bascis.html
2071                fast/selectors/case-insensitive-attribute-matching-style-attribute.html
2072                fast/selectors/case-insensitive-attribute-style-update.html
2073                fast/selectors/case-insensitive-attribute-with-case-sensitive-name.html
2074
2075         * css/SelectorChecker.cpp:
2076         (WebCore::SelectorChecker::checkOne):
2077         We already had case-insensitive value matching due to some legacy HTML
2078         behaviors where some attribute values would be matched case-insensitively
2079         depending on the attribute name.
2080
2081         For this patch, I just re-use the same mechanism. I used branches to try
2082         to convey the idea that matching is case sensitive by default unless
2083         the selector has a flag or we are in the weird HTML exception.
2084
2085         * cssjit/SelectorCompiler.cpp:
2086         (WebCore::SelectorCompiler::constructFragmentsInternal):
2087         Disable that case in the CSS JIT for now, I'll implement it later.
2088
2089 2015-02-14  David Kilzer  <ddkilzer@apple.com>
2090
2091         Declare soft-linked functions with extern "C" linkage
2092
2093         More work towards the Maverick Debug build fix:
2094
2095         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
2096         <http://webkit.org/b/141607>
2097
2098         * platform/mac/SoftLinking.h: Try declaring soft-linked
2099         functions with extern "C" linkage to see if they stop appearing
2100         as weak externals.  This has the added benefit that if the
2101         function signature changes, we'll get a build failure.
2102
2103 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
2104
2105         [Mac] RetainPtr member cleanup, possible leaks
2106         https://bugs.webkit.org/show_bug.cgi?id=141616
2107
2108         Reviewed by Andreas Kling.
2109
2110         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2111         (-[WebSpeechSynthesisWrapper speakUtterance:]):
2112         Adopt the allocated object to avoid a possible leak.
2113
2114         * platform/mac/ScrollAnimatorMac.mm:
2115         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2116         Adopt to avoid unnecessary retain/autorelease.
2117
2118 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
2119
2120         IncompleteMetaDataCue leak seen on leaks bot
2121         https://bugs.webkit.org/show_bug.cgi?id=141611
2122
2123         Reviewed by Eric Carlson.        
2124
2125         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
2126         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue): Deleted.
2127         (WebCore::IncompleteMetaDataCue::~IncompleteMetaDataCue): Deleted.
2128         (WebCore::IncompleteMetaDataCue::cueData): Deleted.
2129         (WebCore::IncompleteMetaDataCue::startTime): Deleted.
2130         Convert to a struct and hold a list of structs instead of pointers.
2131
2132         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2133         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
2134         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
2135         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
2136         Update use of IncompleteMetaDataCue and modernize related code.
2137
2138 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
2139
2140         Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
2141         https://bugs.webkit.org/show_bug.cgi?id=141372
2142
2143         Reviewed by Joseph Pecoraro.
2144
2145         * WebCore.exp.in:
2146         * inspector/InspectorApplicationCacheAgent.cpp:
2147         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
2148         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
2149         * inspector/InspectorApplicationCacheAgent.h:
2150         * inspector/InspectorCSSAgent.cpp:
2151         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
2152         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
2153         * inspector/InspectorCSSAgent.h:
2154         * inspector/InspectorController.cpp:
2155         (WebCore::InspectorController::InspectorController):
2156         (WebCore::InspectorController::inspectedPageDestroyed):
2157         (WebCore::InspectorController::connectFrontend):
2158         (WebCore::InspectorController::disconnectFrontend):
2159         (WebCore::InspectorController::show):
2160         (WebCore::InspectorController::close):
2161         (WebCore::InspectorController::dispatchMessageFromFrontend):
2162         * inspector/InspectorController.h:
2163         * inspector/InspectorDOMAgent.cpp:
2164         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
2165         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
2166         * inspector/InspectorDOMAgent.h:
2167         * inspector/InspectorDOMDebuggerAgent.cpp:
2168         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
2169         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
2170         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
2171         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
2172         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
2173         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
2174         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
2175         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2176         * inspector/InspectorDOMDebuggerAgent.h:
2177         * inspector/InspectorDOMStorageAgent.cpp:
2178         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
2179         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
2180         * inspector/InspectorDOMStorageAgent.h:
2181         * inspector/InspectorDatabaseAgent.cpp:
2182         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
2183         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
2184         * inspector/InspectorDatabaseAgent.h:
2185         * inspector/InspectorDatabaseResource.cpp:
2186         (WebCore::InspectorDatabaseResource::bind):
2187         * inspector/InspectorDatabaseResource.h:
2188         * inspector/InspectorForwarding.h:
2189         * inspector/InspectorIndexedDBAgent.cpp:
2190         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
2191         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
2192         * inspector/InspectorIndexedDBAgent.h:
2193         * inspector/InspectorLayerTreeAgent.cpp:
2194         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
2195         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
2196         * inspector/InspectorLayerTreeAgent.h:
2197         * inspector/InspectorPageAgent.cpp:
2198         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
2199         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
2200         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2201         * inspector/InspectorPageAgent.h:
2202         * inspector/InspectorReplayAgent.cpp:
2203         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
2204         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
2205         * inspector/InspectorReplayAgent.h:
2206         * inspector/InspectorResourceAgent.cpp:
2207         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
2208         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
2209         * inspector/InspectorResourceAgent.h:
2210         * inspector/InspectorStyleSheet.cpp:
2211         (WebCore::InspectorStyle::styleWithProperties):
2212         * inspector/InspectorTimelineAgent.cpp:
2213         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2214         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2215         * inspector/InspectorTimelineAgent.h:
2216         * inspector/InspectorWorkerAgent.cpp:
2217         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
2218         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
2219         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
2220         * inspector/InspectorWorkerAgent.h:
2221         * inspector/PageRuntimeAgent.cpp:
2222         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
2223         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
2224         * inspector/PageRuntimeAgent.h:
2225         * inspector/WorkerInspectorController.cpp:
2226         (WebCore::WorkerInspectorController::~WorkerInspectorController):
2227         (WebCore::WorkerInspectorController::connectFrontend):
2228         (WebCore::WorkerInspectorController::disconnectFrontend):
2229         * inspector/WorkerInspectorController.h:
2230         * inspector/WorkerRuntimeAgent.cpp:
2231         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
2232         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
2233         * inspector/WorkerRuntimeAgent.h:
2234         * loader/EmptyClients.h:
2235         * page/PageDebuggable.cpp:
2236         (WebCore::PageDebuggable::connect):
2237         (WebCore::PageDebuggable::disconnect):
2238         * page/PageDebuggable.h:
2239         * testing/Internals.cpp:
2240         (WebCore::Internals::closeDummyInspectorFrontend):
2241         * workers/WorkerMessagingProxy.cpp:
2242         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2243
2244 2015-02-14  David Kilzer  <ddkilzer@apple.com>
2245
2246         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
2247         <http://webkit.org/b/141607>
2248
2249         Work towards fixing the Mavericks Debug build.
2250
2251         * dom/Document.h:
2252         (WebCore::Document::setAnnotatedRegionsDirty):
2253         * dom/Event.h:
2254         (WebCore::Event::create):
2255         * dom/Node.h:
2256         (WebCore::Node::hasEditableStyle):
2257         * dom/Position.h:
2258         (WebCore::Position::Position):
2259         * editing/FrameSelection.h:
2260         (WebCore::DragCaretController::clear):
2261         * loader/ResourceLoader.h:
2262         (WebCore::ResourceLoader::originalRequest):
2263         - Do not mark inline methods for export.
2264
2265 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
2266
2267         rel="noreferrer" should make window.opener null
2268         https://bugs.webkit.org/show_bug.cgi?id=141579
2269
2270         Reviewed by Darin Adler.
2271
2272         Tests: http/tests/navigation/target-blank-opener-post.html
2273                http/tests/navigation/target-blank-opener.html
2274
2275         We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader
2276         member variable. This works for some clients - ones that invoke delegate callbacks
2277         synchronously - but not in the general case.
2278
2279         So, changed to passing the policy explicitly.
2280
2281         * WebCore.exp.in:
2282         * loader/FrameLoader.cpp:
2283         (WebCore::FrameLoader::FrameLoader):
2284         (WebCore::FrameLoader::urlSelected):
2285         (WebCore::FrameLoader::loadURLIntoChildFrame):
2286         (WebCore::FrameLoader::loadFrameRequest):
2287         (WebCore::FrameLoader::loadURL):
2288         (WebCore::FrameLoader::load):
2289         (WebCore::FrameLoader::loadPostRequest):
2290         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2291         * loader/FrameLoader.h:
2292         (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted.
2293         * loader/FrameLoaderTypes.h:
2294         * loader/NavigationScheduler.cpp:
2295         * page/ContextMenuController.cpp:
2296         (WebCore::openNewWindow):
2297         (WebCore::ContextMenuController::contextMenuItemSelected):
2298
2299 2015-02-14  David Kilzer  <ddkilzer@apple.com>
2300
2301         REGRESSION (r180082): WebCore build on Mountain Lion fails due to weak export for i386
2302         <rdar://problem/19838127>
2303
2304         * Configurations/WebCore.unexp: Add missing symbol.
2305
2306 2015-02-13  Chris Dumez  <cdumez@apple.com>
2307
2308         RenderListItem resets its marker's style on style change even if the diff is StyleDifferenceEqual
2309         https://bugs.webkit.org/show_bug.cgi?id=141572
2310         <rdar://problem/19759818>
2311
2312         Reviewed by Simon Fraser.
2313
2314         Do not unnecessarily update the marker's style in RenderListItem::styleDidChange()
2315         if the RenderStyle diff is StyleDifferenceEqual. Doing so can cause unnecessary
2316         layouts.
2317
2318         This was causing high cpu usage on
2319         http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html because there
2320         is an animation that changes the style every second (but the diff is equal) and the
2321         RenderListItem keeps resetting its marker's margin, which triggers a layout and the
2322         RenderListMarker re-computes its margin during layout and updates its style again.
2323
2324         With this change, CPU usage on the page goes from 150% to 20%. There is only a style
2325         recalc happening every second, no more relayouts and repaints.
2326
2327         Test: fast/repaint/list-item-equal-style-change-no-repaint.html
2328
2329         * rendering/RenderListItem.cpp:
2330         (WebCore::RenderListItem::styleDidChange):
2331
2332 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
2333
2334         Make WebCore::IOSurface have single ownership instead of refcounting
2335         https://bugs.webkit.org/show_bug.cgi?id=141578
2336
2337         Reviewed by Anders Carlsson.
2338
2339         In the interests of making it harder to misuse and to make it more like
2340         ImageBuffer, our IOSurface wrapper should have single ownership.
2341
2342         This will also allow future changes which depend on temporarily
2343         consuming an IOSurface to more easily enforce correct usage.
2344
2345         * WebCore.exp.in:
2346         * platform/graphics/cg/IOSurfacePool.cpp:
2347         (WebCore::IOSurfacePool::takeSurface):
2348         (WebCore::IOSurfacePool::addSurface):
2349         (WebCore::IOSurfacePool::insertSurfaceIntoPool):
2350         (WebCore::IOSurfacePool::tryEvictInUseSurface):
2351         (WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
2352         (WebCore::IOSurfacePool::collectInUseSurfaces):
2353         * platform/graphics/cg/IOSurfacePool.h:
2354         * platform/graphics/cocoa/IOSurface.h:
2355         * platform/graphics/cocoa/IOSurface.mm:
2356         (IOSurface::create):
2357         (IOSurface::createFromSendRight):
2358         (IOSurface::createFromSurface):
2359         (IOSurface::createFromImage):
2360         Make IOSurface::create()s return a unique_ptr, and adjust everywhere.
2361
2362 2015-02-12  Enrica Casucci  <enrica@apple.com>
2363
2364         Additional emoji group support.
2365         https://bugs.webkit.org/show_bug.cgi?id=141539
2366         rdar://problem/19727527
2367
2368         Reviewed by Sam Weinig.
2369
2370         Adding some new emoji ligatures.
2371         Updated existing test to include the new sequences.
2372
2373         * platform/text/TextBreakIterator.cpp:
2374         (WebCore::cursorMovementIterator):
2375         * rendering/RenderText.cpp:
2376         (WebCore::isEmojiGroupCandidate):
2377
2378 2015-02-13  Alex Christensen  <achristensen@webkit.org>
2379
2380         Really stop using export files.
2381         https://bugs.webkit.org/show_bug.cgi?id=141521
2382
2383         Reviewed by Mark Rowe.
2384
2385         * Configurations/WebCore.xcconfig:
2386         Don't use exported symbols files.
2387         * Configurations/WebCore.unexp:
2388         Added list of symbols not to export (needed by Xcode 5.0.2).
2389
2390 2015-02-13  Zalan Bujtas  <zalan@apple.com>
2391
2392         Simplify ASSERT in lastRubyRun().
2393         https://bugs.webkit.org/show_bug.cgi?id=141574
2394
2395         Reviewed by Daniel Bates.
2396
2397         r180064 made some of the conditions in the ASSERT redundant.
2398
2399         Covered by existing tests.
2400
2401         * rendering/RenderRuby.cpp:
2402         (WebCore::lastRubyRun):
2403
2404 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
2405
2406         [Mac, iOS] Adjust pagination behavior for Mail.app printing use
2407         https://bugs.webkit.org/show_bug.cgi?id=141569
2408         <rdar://problem/14912763>
2409
2410         Reviewed by Anders Carlsson.
2411
2412         * page/Settings.in: Add new pagination setting flag.
2413         * rendering/RenderBlockFlow.cpp:
2414         (WebCore::messageContainerName): Added.
2415         (WebCore::needsPaginationQuirk): Added.
2416         (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Don't move the message content
2417         div to a new page when using this special printing mode.
2418
2419 2015-02-13  Daniel Bates  <dabates@apple.com>
2420
2421         [iOS] DumpRenderTree.app fails to link due to undefined classes
2422         <rdar://problem/19831228>
2423
2424         Following r179945, DumpRenderTree.app fails to link due to undefined symbols:
2425
2426         Undefined symbols for architecture x86_64:
2427           "_OBJC_CLASS_$_WebEvent", referenced from:
2428               objc-class-ref in libDumpRenderTree.a(EventSendingController.o)
2429           "_OBJC_CLASS_$_WebUndefined", referenced from:
2430               objc-class-ref in libDumpRenderTree.a(ObjCController.o)
2431
2432         We need to export the classes WebScriptObject and WebEvent.
2433
2434         * bindings/objc/WebScriptObject.h:
2435         * platform/ios/WebEvent.h:
2436
2437 2015-02-13  Andreas Kling  <akling@apple.com>
2438
2439         CachedResource::clearLoader() should self-destruct if nothing else retains the CachedResource.
2440         <https://webkit.org/b/141568>
2441         <rdar://problem/19800310>
2442
2443         Reviewed by Antti Koivisto.
2444
2445         Anything that may cause CachedResource::canDelete() to return true must also make sure
2446         to call CachedResource::deleteIfPossible(), or we risk leaking the CachedResource.
2447         This is because CachedResource employs an extremely convoluted lifetime mechanism that
2448         depends on its presence in a number of collections, as well as internal counters and
2449         state.
2450
2451         This is a speculative fix for a potential CachedResource leak that I'm not sure exists
2452         in practice, but let's be good citizens here.
2453
2454         * loader/cache/CachedResource.cpp:
2455         (WebCore::CachedResource::clearLoader):
2456
2457 2015-02-13  Jer Noble  <jer.noble@apple.com>
2458
2459         [MSE][Mac] Crash at WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset + 2357
2460         https://bugs.webkit.org/show_bug.cgi?id=141566
2461         rdar://problem/19826075
2462
2463         Reviewed by Andreas Kling.
2464
2465         Null check m_mediaSource before dereferencing.
2466
2467         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2468         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2469
2470 2015-02-13  Zalan Bujtas  <zalan@apple.com>
2471
2472         REGRESSION (r174761): Invalid cast in WebCore::lastRubyRun / WebCore::RenderRubyAsBlock::addChild
2473         https://bugs.webkit.org/show_bug.cgi?id=137929
2474         rdar://problem/18723492
2475
2476         Reviewed by Chris Dumez.
2477
2478         Ensure that the child renderer is a RenderRubyRun.
2479
2480         Test: fast/ruby/crash-with-before-after-on-ruby.html
2481
2482         * rendering/RenderRuby.cpp:
2483         (WebCore::lastRubyRun):
2484
2485 2015-02-13  Simon Fraser  <simon.fraser@apple.com>
2486
2487         Crashes under RenderLayer::hitTestLayer under determinePrimarySnapshottedPlugIn()
2488         https://bugs.webkit.org/show_bug.cgi?id=141551
2489
2490         Reviewed by Zalan Bujtas.
2491         
2492         It's possible for a layout to dirty the parent frame's state, via the calls to
2493         ownerElement()->scheduleSetNeedsStyleRecalc() that RenderLayerCompositor does when
2494         iframes toggle their compositing mode.
2495         
2496         That could cause FrameView::updateLayoutAndStyleIfNeededRecursive() to fail to 
2497         leave all the frames in a clean state. Later on, we could enter hit testing,
2498         which calls document().updateLayout() on each frame's document. Document::updateLayout()
2499         does layout on all ancestor documents, so in the middle of hit testing, we could
2500         layout a subframe (dirtying an ancestor frame), then layout another frame, which
2501         would forcing that ancestor to be laid out while we're hit testing it, thus
2502         corrupting the RenderLayer tree while it's being iterated over.
2503         
2504         Fix by having FrameView::updateLayoutAndStyleIfNeededRecursive() do a second
2505         layout after laying out subframes, which most of the time will be a no-op.
2506         
2507         Also add a stronger assertion, that this frame and all subframes are clean
2508         at the end of FrameView::updateLayoutAndStyleIfNeededRecursive() for the
2509         main frame.
2510
2511         Various existing frames tests hit the new assertion if the code change is removed,
2512         so this is covered by existing tests.
2513
2514         * page/FrameView.cpp:
2515         (WebCore::FrameView::needsStyleRecalcOrLayout):
2516         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2517         * page/FrameView.h:
2518         * rendering/RenderWidget.cpp:
2519         (WebCore::RenderWidget::willBeDestroyed):
2520
2521 2015-02-12  Simon Fraser  <simon.fraser@apple.com>
2522
2523         determinePrimarySnapshottedPlugIn() should only traverse visible Frames
2524         https://bugs.webkit.org/show_bug.cgi?id=141547
2525         Part of rdar://problem/18445733.
2526
2527         Reviewed by Anders Carlsson.
2528
2529         There's an expectation from clients that FrameView::updateLayoutAndStyleIfNeededRecursive()
2530         updates layout in all frames, but it uses the widget tree, so only hits frames
2531         that are parented via renderers (i.e. not display:none frames or their descendants).
2532         
2533         Moving towards a future where we remove Widgets, fix by adding a FrameTree 
2534         traversal function that only finds rendered frames (those with an ownerRenderer).
2535         
2536         Not testable.
2537
2538         * page/FrameTree.cpp:
2539         (WebCore::FrameTree::firstRenderedChild):
2540         (WebCore::FrameTree::nextRenderedSibling):
2541         (WebCore::FrameTree::traverseNextRendered):
2542         (printFrames):
2543         * page/FrameTree.h:
2544         * page/FrameView.cpp:
2545         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2546
2547 2015-02-13  Alexey Proskuryakov  <ap@apple.com>
2548
2549         TimerBase::m_heapInsertionOrder calculation is racy
2550         https://bugs.webkit.org/show_bug.cgi?id=141554
2551
2552         Reviewed by Anders Carlsson.
2553
2554         Use an atomic increment.
2555
2556         * platform/Timer.cpp: (WebCore::TimerBase::setNextFireTime):
2557
2558 2015-02-13  Andreas Kling  <akling@apple.com>
2559
2560         [iOS] Refine GC behavior in response to process suspension and memory pressure.
2561         <https://webkit.org/b/141543>
2562         <rdar://problem/19738024>
2563
2564         Reviewed by Geoffrey Garen.
2565
2566         Do an immediate full garbage collection when the web process is about to
2567         be suspended (when another tab is moving to the foreground on iOS.)
2568         This ensures that we make a best effort to reduce the process footprint
2569         before we lose the ability to execute code.
2570
2571         When receiving a memory pressure warning, tell the garbage collector to
2572         accelerate its next collection (by calling garbageCollectSoon().)
2573         This gives us some confidence that a collection will happen within a
2574         reasonable timeframe, but doesn't risk dooming us to a loop of endless
2575         garbage collections.
2576
2577         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2578         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2579
2580 2015-02-13  Antti Koivisto  <antti@apple.com>
2581
2582         Add some RELEASE_ASSERTs to try to catch crashes in StyleResolver::loadPendingImages
2583         https://bugs.webkit.org/show_bug.cgi?id=141561
2584
2585         Reviewed by Simon Fraser.
2586
2587         One possibility is that loads triggered by loadPendingImages end up synchronously destroying or re-entering
2588         style resolver. Try to catch these in release builds.
2589
2590         * css/StyleResolver.cpp:
2591         (WebCore::StyleResolver::~StyleResolver):
2592         (WebCore::StyleResolver::styleForElement):
2593         (WebCore::StyleResolver::styleForKeyframe):
2594         (WebCore::StyleResolver::styleForPage):
2595         (WebCore::StyleResolver::loadPendingImages):
2596         * css/StyleResolver.h:
2597
2598 2015-02-13  ChangSeok Oh  <changseok.oh@collabora.com>
2599
2600         Div having contentEditable and display:grid cannot be edited if it is empty.
2601         https://bugs.webkit.org/show_bug.cgi?id=141465
2602
2603         Reviewed by Ryosuke Niwa.
2604
2605         This bug is quite similar to webkit.org/b/141218. RenderGrid should be also treated as a candidate
2606         for visible position as like RenderFlexibleBox. The only different situation between them is
2607         that RenderGrid has a bug setting "0px" for logicalHeight when it is empty. RenderGrid should also have
2608         a minimum height of a single line if it is editable as well as RenderFlexibleBox does.
2609
2610         Test: fast/events/key-events-in-editable-gridbox.html
2611
2612         * dom/Position.cpp:
2613         (WebCore::Position::isCandidate):
2614         (WebCore::Position::isRenderedCharacter):
2615         * rendering/RenderGrid.cpp:
2616         (WebCore::RenderGrid::layoutGridItems):
2617
2618 2015-02-12  Zalan Bujtas  <zalan@apple.com>
2619
2620         REGRESSION (r176262): Invalid cast in WebCore`WebCore::RootInlineBox::selectionTop
2621         https://bugs.webkit.org/show_bug.cgi?id=138992
2622
2623         Reviewed by Dave Hyatt.
2624
2625         RenderRubyText requires the ancestor chain to be (RenderRubyAsInline | RenderRubyAsBlock) -> RenderRubyRun -> RenderRubyText.
2626         This patch ensures that we create RenderRubyText for an <rt> element only when
2627         the expected ancestor chain is guaranteed.
2628
2629         Test: fast/ruby/crash-when-ruby-is-set-to-inline-block.html
2630
2631         * rendering/RenderElement.cpp:
2632         (WebCore::RenderElement::createFor): treat inline-block <ruby> as block.
2633         * rendering/RenderObject.h:
2634         (WebCore::RenderObject::isRubyInline):
2635         (WebCore::RenderObject::isRubyBlock):
2636         (WebCore::RenderObject::isRuby): Deleted.
2637         * rendering/RenderRuby.cpp:
2638         (WebCore::isAnonymousRubyInlineBlock):
2639         * rendering/RenderRuby.h: add support for is<RenderRubyAsBlock>(renderer) and for is<RenderRubyAsInline>(renderer)
2640         The isRuby() method does not follow the is*() -> maps to one class pattern.
2641         (WebCore::isRuby):
2642         * rendering/RenderRubyRun.cpp:
2643         (WebCore::RenderRubyRun::addChild):
2644         (WebCore::RenderRubyRun::staticCreateRubyRun):
2645
2646 2015-02-13  Csaba Osztrogonac  <ossy@webkit.org>
2647
2648         Fix the gperf related build issue on the WinCairo bot
2649         https://bugs.webkit.org/show_bug.cgi?id=141507
2650
2651         Reviewed by Alex Christensen.
2652
2653         * platform/ColorData.gperf: Modified property svn:eol-style.
2654
2655 2015-02-13  Csaba Osztrogonác  <ossy@webkit.org>
2656
2657         Unreviewed, remove empty directories.
2658
2659         * loader/icon/wince: Removed.
2660         * platform/graphics/wince: Removed.
2661         * storage/wince: Removed.
2662
2663 2015-02-12  Timothy Horton  <timothy_horton@apple.com>
2664
2665         Crashes under detectItemAroundHitTestResult when DataDetectors is not available
2666         https://bugs.webkit.org/show_bug.cgi?id=141549
2667         <rdar://problem/19180955>
2668
2669         Reviewed by Dan Bernstein.
2670
2671         * editing/mac/DataDetection.mm:
2672         (WebCore::DataDetection::detectItemAroundHitTestResult):
2673         Bail out from data detection if either of the relevant frameworks aren't loaded.
2674
2675 2015-02-12  Dean Jackson  <dino@apple.com>
2676
2677         [iOS Media] Audio should hide timeline scrubber until playback starts
2678         https://bugs.webkit.org/show_bug.cgi?id=141542
2679         <rdar://problem/19820685>
2680
2681         Reviewed by Eric Carlson.
2682
2683         We regressed from the system behaviour in iOS 7, where the timeline
2684         scrubber for an audio element is not shown until the user starts
2685         playback.
2686
2687         * Modules/mediacontrols/mediaControlsiOS.css:
2688         (video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
2689         (audio::-webkit-media-controls-status-display): Add the style for the status display.
2690         * Modules/mediacontrols/mediaControlsiOS.js:
2691         (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
2692         (ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
2693         (ControllerIOS.prototype.setPlaying): Unhide the timeline.
2694
2695 2015-02-12  Chris Dumez  <cdumez@apple.com>
2696
2697         Drop the quirks-mode exception for CSS MIME types
2698         https://bugs.webkit.org/show_bug.cgi?id=141501
2699
2700         Reviewed by Alexey Proskuryakov.
2701
2702         Drop the quirks-mode exception for CSS MIME types.
2703         This matches Firefox's behavior.
2704
2705         This patch is based on the following Blink revision:
2706         http://src.chromium.org/viewvc/blink?view=revision&revision=189669
2707
2708         Tests:
2709         - http/tests/misc/css-accept-any-type.html
2710         - http/tests/security/cross-origin-css.html
2711
2712         * css/StyleSheetContents.cpp:
2713         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2714         * dom/ProcessingInstruction.cpp:
2715         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2716         * inspector/InspectorPageAgent.cpp:
2717         (WebCore::InspectorPageAgent::cachedResourceContent):
2718         * loader/cache/CachedCSSStyleSheet.cpp:
2719         (WebCore::CachedCSSStyleSheet::sheetText):
2720         (WebCore::CachedCSSStyleSheet::canUseSheet):
2721         * loader/cache/CachedCSSStyleSheet.h:
2722
2723 2015-02-12  Beth Dakin  <bdakin@apple.com>
2724
2725         REGRESSION: Should not send wheel events with a delta of 0
2726         https://bugs.webkit.org/show_bug.cgi?id=141537
2727         -and corresponding-
2728         rdar://problem/18903118
2729
2730         Reviewed by Simon Fraser.
2731
2732         This code should not have been removed entirely to accommodate rubber-banding, it 
2733         just needs to return false instead of true in order to allow the MayBegin and 
2734         Ended phases to be handled by the ElasticityController.
2735         * dom/Element.cpp:
2736         (WebCore::Element::dispatchWheelEvent):
2737
2738 2015-02-12  Dean Jackson  <dino@apple.com>
2739
2740         [iOS Media] Implement 3-style media timeline (buffered, played, unavailable)
2741         https://bugs.webkit.org/show_bug.cgi?id=141526
2742         <rdar://problem/19603337>
2743
2744         Reviewed by Eric Carlson and Antoine Quint.
2745
2746         Implement a 3-style media scrubber for iOS. This draws white for
2747         the region that has been played (before the playhead), black
2748         for the region that is buffered, and is hollow for the rest.
2749
2750         * Modules/mediacontrols/mediaControlsApple.js:
2751         (Controller.prototype.updateProgress): Update progress is now completely
2752         shared between OS X and iOS. This calls the implementation specific
2753         drawTimelineBackground.
2754         (Controller.prototype.drawTimelineBackground): Move the OS X code to here.
2755         * Modules/mediacontrols/mediaControlsiOS.css:
2756         (audio::-webkit-media-controls-timeline): New styles for the timeline. Updated thumb image, etc.
2757         (video::-webkit-media-controls-timeline::-webkit-slider-runnable-track):
2758         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
2759         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb:active):
2760         (video::-webkit-media-controls-time-remaining-display):
2761         * Modules/mediacontrols/mediaControlsiOS.js:
2762         (ControllerIOS): Create a globally unique canvas context name in the constructor.
2763         (ControllerIOS.prototype.createControls): Set the background of the timeline to a canvas.
2764         (ControllerIOS.prototype.addRoundedRect): Helper function.
2765         (ControllerIOS.prototype.drawTimelineBackground): Draw the 3-style content.
2766         (ControllerIOS.prototype.updateProgress): Deleted.
2767
2768 2015-02-12  Daniel Bates  <dabates@apple.com>
2769
2770         Fix some Mac linker warnings
2771         https://bugs.webkit.org/show_bug.cgi?id=141522
2772
2773         Reviewed by Alex Christensen.
2774
2775         Following <https://trac.webkit.org/changeset/179945>, the linker warns about the following hidden WebCore symbols:
2776         
2777         ld: warning: cannot export hidden symbol __ZN7WebCore20LogNotYetImplementedE from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/Logging.o
2778         ld: warning: cannot export hidden symbol _wkCreateURLPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
2779         ld: warning: cannot export hidden symbol _wkCreateURLNPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
2780
2781         * WebCore.exp.in: Remove symbols for functions wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
2782         * platform/Logging.h: Export WTFLogChannel for LogNotYetImplemented, which is referenced from
2783         notImplementedLoggingChannel() in file NotImplemented.cpp. We make use of the associated
2784         header, NotImplemented.h, in both WebKit and WebKit2.
2785         * platform/mac/WebCoreSystemInterface.mm: Remove declarations for functions
2786         wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName that
2787         were inadvertently not removed in r25494.
2788
2789 2015-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2790
2791         Web Inspector: Crash inspecting styles of element with mutated stylesheet
2792         https://bugs.webkit.org/show_bug.cgi?id=141451
2793
2794         Reviewed by Timothy Hatcher.
2795
2796         Test: inspector/css/stylesheet-with-mutations.html
2797
2798         * css/CSSStyleSheet.h:
2799         * css/CSSStyleSheet.cpp:
2800         (WebCore::CSSStyleSheet::CSSStyleSheet):
2801         (WebCore::CSSStyleSheet::didMutateRules):
2802         Keep a flag on the CSSStyleSheet to know when it has had a rule
2803         mutation from the contents.
2804
2805         * inspector/InspectorStyleSheet.h:
2806         * inspector/InspectorStyleSheet.cpp:
2807         (WebCore::InspectorStyleSheet::reparseStyleSheet):
2808         When completely replacing the stylesheet's contents, we will have
2809         destroyed any previous rules, so clear the has mutations flag.
2810
2811         (WebCore::selectorsFromSource):
2812         Previously there was a mismatch between the rules the parsed
2813         SourceData had, and the actual CSSSelectors we were iterating.
2814         We use the SourceData so we can get the exact user authored
2815         text instead of generated longhands from actualy selector objects.
2816         Add an ASSERT and bail to catch and more gracefully handle
2817         any possible mismatches in the future.
2818
2819         (WebCore::InspectorStyleSheet::styleSheetMutated):
2820         (WebCore::InspectorStyleSheet::ensureParsedDataReady):
2821         When a CSSStyleSheet has been mutated beyond the inspector's
2822         knowledge right now, fall back to readonly generated selectors.
2823         We should better handle this in the future:
2824         <https://webkit.org/b/141450> Web Inspector: Better support for CSSOM StyleSheet mutations (insertRule/deleteRule)
2825
2826 2015-02-12  Commit Queue  <commit-queue@webkit.org>
2827
2828         Unreviewed, rolling out r179987.
2829         https://bugs.webkit.org/show_bug.cgi?id=141525
2830
2831         caused debug tests to fail (Requested by alexchristensen on
2832         #webkit).
2833
2834         Reverted changeset:
2835
2836         "[CSS Grid Layout] Invalid initialization of track sizes with
2837         non spanning grid items"
2838         https://bugs.webkit.org/show_bug.cgi?id=140763
2839         http://trac.webkit.org/changeset/179987
2840
2841 2015-02-12  Brian J. Burg  <burg@cs.washington.edu>
2842
2843         REGRESSION(r178060): empty arguments are passed when logging to system console
2844         https://bugs.webkit.org/show_bug.cgi?id=141511
2845
2846         Reviewed by Timothy Hatcher.
2847
2848         * page/PageConsoleClient.cpp:
2849         (WebCore::PageConsoleClient::messageWithTypeAndLevel): Change premature move to copyRef.
2850
2851 2015-02-12  Alex Christensen  <achristensen@webkit.org>
2852
2853         [Win] Unreviewed debug build fix after r179980.
2854
2855         * svg/SVGSVGElement.cpp:
2856         (WebCore::SVGSVGElement::currentViewportSize):
2857         Explicitly call constructor.
2858
2859 2015-01-23  Sergio Villar Senin  <svillar@igalia.com>
2860
2861         [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
2862         https://bugs.webkit.org/show_bug.cgi?id=140763
2863
2864         Reviewed by Antti Koivisto.
2865
2866         Content sized tracks with non-spanning grid items were not
2867         properly sized because the growth limit was sometimes infinity
2868         (-1) after calling resolveContentBasedTrackSizingFunctions() when
2869         it should not. This patch adds an special initialization phase for
2870         non-spanning grid items as the new track sizing algorithm
2871         describes.
2872
2873         Granted, that was handled in the old algorithm in
2874         distributeSpaceToTracks() as a special case. The problem is that
2875         it regressed after the optimization added in r173868 because that
2876         method is no longer called when the space to distribute is 0.
2877
2878         That's why we could fix this by allowing calls to
2879         distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
2880         it with an explicit initialization our implementation becomes
2881         closer to the new algorithm and the initialization is now explicit
2882         in the code instead of a side effect of calling
2883         distributeSpaceToTracks() with no space to be distributed. It also
2884         brings a slight performance improvement as we save sorts and hash
2885         lookups.
2886
2887         I also took the change to add caching to several GridTrackSize
2888         methods that were hot on the profiler (each one accounted for ~1%
2889         of the total time, now they account for ~0.3% each).
2890
2891         Test: fast/css-grid-layout/grid-initialize-span-one-items.html
2892
2893         * rendering/RenderGrid.cpp:
2894         (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
2895         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2896         Exclude non spanning grid items from the calls to
2897         resolveContentBasedTrackSizingFunctionsForItems().
2898         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
2899         New method to resolve track sizes only using non-spanning grid
2900         items.
2901         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2902         Ensure that it isn't called for non-spanning grid items.
2903         * rendering/RenderGrid.h:
2904         * rendering/style/GridTrackSize.h:
2905         (WebCore::GridTrackSize::GridTrackSize): Cache return values.
2906         (WebCore::GridTrackSize::setLength): Ditto.
2907         (WebCore::GridTrackSize::setMinMax): Ditto.
2908         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
2909         that caches the return values for hasXXXTrackBreadth() methods.
2910         (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
2911         the cached return value.
2912         (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
2913         (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
2914         (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
2915         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
2916         (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
2917         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
2918         Ditto.
2919         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
2920         Ditto.
2921
2922 2015-02-12  Zan Dobersek  <zdobersek@igalia.com>
2923
2924         Remove the USE(ACCELERATED_COMPOSITING) guard from the
2925         MediaPlayerPrivateGStreamerBase destructor.
2926
2927         The guard was removed in r163079. It was still defined through CMake
2928         for the EFL and GTK ports when the guarded code was introduced in
2929         r172828. In r171741 the macro was finally removed for the GTK and EFL
2930         ports as well, but the guards for the affected code weren't updated
2931         so TextureMapperPlatformLayer::Client::platformLayerWillBeDestroyed()
2932         wasn't being called anymore.
2933
2934         Rubber-stamped by Philippe Normand.
2935
2936         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2937         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2938
2939 2015-02-11  Darin Adler  <darin@apple.com>
2940
2941         Streamline and simplify SVGSVGElement and related classes
2942         https://bugs.webkit.org/show_bug.cgi?id=141463
2943
2944         Reviewed by Antti Koivisto.
2945
2946         * dom/Document.cpp: Removed unneeded include of SVGSVGElement.h.
2947         * loader/FrameLoader.cpp: Ditto.
2948         * rendering/RenderBoxModelObject.cpp: Ditto.
2949         * rendering/svg/RenderSVGForeignObject.cpp: Ditto.
2950         * svg/SVGImageElement.cpp: Ditto.
2951         * svg/SVGMarkerElement.cpp: Ditto.
2952         * svg/SVGPathElement.cpp: Ditto.
2953         * svg/SVGPatternElement.cpp: Ditto.
2954         * svg/SVGTransform.cpp: Ditto.
2955
2956         * page/FrameView.cpp:
2957         (WebCore::FrameView::scrollToAnchor): Updated to call the SVGSVGElement function
2958         named scrollToAnchor (was setupInitialView). Also refactored to avoid repeating
2959         the expression frame().document() so often.
2960
2961         * platform/graphics/FloatSize.h: Added operator/.
2962
2963         * svg/SVGDocument.cpp:
2964         (WebCore::SVGDocument::rootElement): Rearranged to use early return.
2965         (WebCore::SVGDocument::zoomAndPanEnabled): Ditto.
2966         (WebCore::SVGDocument::startPan): Ditto. Also used FloatPoint math instead
2967         of breaking things apart into x and y.
2968         (WebCore::SVGDocument::updatePan): Ditto.
2969
2970         * svg/SVGDocument.h: Removed some unneeded includes and forward declarations.
2971         Moved function bodies out of the class to make it more readable. Renamed
2972         m_translate to m_panningOffset and made it a FloatSize instead of FloatPoint.
2973
2974         * svg/SVGDocumentExtensions.cpp:
2975         (WebCore::SVGDocumentExtensions::startAnimations): Use a modern for loop
2976         and update since timeContainer() now returns a reference.
2977
2978         * svg/SVGSVGElement.cpp: Removed many unneeded includes.
2979         (WebCore::SVGSVGElement::SVGSVGElement): Moved initialization of scalars to
2980         the class definition. Updated since m_timerContainer is a Ref (later should
2981         change it to be a std::unique_ptr or just directly contained in SVGSVGElement).
2982         (WebCore::SVGSVGElement::~SVGSVGElement): Removed comment that doesn't say much,
2983         but is worded in a confusing way.
2984         (WebCore::SVGSVGElement::contentScriptType): Use NeverDestroyed instead of
2985         DEPRECATED_DEFINE_STATIC_LOCAL.
2986         (WebCore::SVGSVGElement::contentStyleType): Ditto.
2987         (WebCore::SVGSVGElement::viewport): Streamlined a bit.
2988         (WebCore::SVGSVGElement::pixelUnitToMillimeterX): Ditto.
2989         (WebCore::SVGSVGElement::pixelUnitToMillimeterY): Ditto.
2990         (WebCore::SVGSVGElement::currentView): Changed to return a reference.
2991         (WebCore::SVGSVGElement::frameForCurrentScale): Added. Helper for the two
2992         functions below.
2993         (WebCore::SVGSVGElement::currentScale): Updated to use frameForCurrentScale.
2994         (WebCore::SVGSVGElement::setCurrentScale): Ditto.
2995         (WebCore::SVGSVGElement::setCurrentTranslate): Optimized the case where there
2996         is no change to the translation. Also changed the data member's name to
2997         m_currentTranslate to more directly match the DOM API naming.
2998         (WebCore::SVGSVGElement::parseAttribute): Simplified the parsing a bit, and
2999         changed to pass a reference to SVGZoomAndPan::parseAttribute.
3000         (WebCore::SVGSVGElement::svgAttributeChanged): Tweaked formatting and removed
3001         code that converts the renderer pointer to a RenderObject* unnecessarily.
3002         (WebCore::SVGSVGElement::suspendRedraw): Removed FIXME about implementing this,
3003         since we don't really plan to do that.
3004         (WebCore::SVGSVGElement::unsuspendRedraw): Ditto.
3005         (WebCore::SVGSVGElement::unsuspendRedrawAll): Ditto.
3006         (WebCore::SVGSVGElement::forceRedraw): Ditto.
3007         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList): Changed return
3008         type to Ref, and pass in a function instead of an enumeration value.
3009         (WebCore::SVGSVGElement::getIntersectionList): Updated for above.
3010         (WebCore::SVGSVGElement::getEnclosureList): Ditto.
3011         (WebCore::SVGSVGElement::checkIntersection): Use && instead of early return
3012         for the null check.
3013         (WebCore::SVGSVGElement::checkEnclosure): Ditto.
3014         (WebCore::SVGSVGElement::createSVGLength): Use initialization list syntax
3015         for greater brevity.
3016         (WebCore::SVGSVGElement::createSVGAngle): Ditto.
3017         (WebCore::SVGSVGElement::createSVGPoint): Ditto.
3018         (WebCore::SVGSVGElement::createSVGMatrix): Ditto.
3019         (WebCore::SVGSVGElement::createSVGRect): Ditto.
3020         (WebCore::SVGSVGElement::createSVGTransform): Removed unneeded explicit
3021         constructor invocation.
3022         (WebCore::SVGSVGElement::createSVGTransformFromMatrix): Removed unneeded cast.
3023         (WebCore::SVGSVGElement::insertedInto): Updated since timeContainer() now
3024         returns a reference.
3025         (WebCore::SVGSVGElement::setCurrentTime): Use isfinite instead of isnan, so
3026         we won't store infinity as the current time.
3027         (WebCore::SVGSVGElement::currentViewBoxRect): Renamed locals and changed
3028         to use initializer lists for brevity.
3029         (WebCore::SVGSVGElement::currentViewportSize): Streamlined code by using
3030         initializer lists, using local variables only for things used more than once,
3031         and using the / operator defined above.
3032         (WebCore::SVGSVGElement::viewBoxToViewTransform): Use the concatenate function
3033         in a way that is more straightforward, rather than doing it with a temporary.
3034         (WebCore::SVGSVGElement::scrollToAnchor): Renamed this from
3035         setupInitialView.
3036         (WebCore::SVGSVGElement::inheritViewAttributes): Changed this to work with
3037         references rather than pointers.
3038         (WebCore::SVGSVGElement::getElementById): Use getAllElementsById as the
3039         FIXME comment suggested for better efficiency when there are a lot of descendants
3040         of the <svg> element at the cost of making it less efficient if there are
3041         a lot of elements all with the desired ID, but not inside the <svg> element.
3042         (WebCore::SVGSVGElement::isValid): Moved here from the header.
3043
3044         * svg/SVGSVGElement.h: Removed unneeded forward declarations. Moved the
3045         animated properties to the top of the file, then other DOM, the other
3046         public members. Changed return types to references and Ref. Moved
3047         function bodies out of the class definition. Made createSVGNumber inline.
3048
3049         * svg/SVGViewElement.cpp: Removed unneeded includes.
3050         (WebCore::SVGViewElement::isSupportedAttribute): Deleted.
3051         (WebCore::SVGViewElement::parseAttribute): Changed to not rely on
3052         isSupportedAttribute. Eventually I will do this in all the SVG classes.
3053
3054         * svg/SVGViewSpec.cpp: Removed unneeded include of SVGSVGElement.h.
3055         (WebCore::SVGViewSpec::parseViewSpec): Updated for change in the name
3056         of the parse function in the SVGZoomAndPan class.
3057
3058         * svg/SVGZoomAndPan.cpp:
3059         (WebCore::SVGZoomAndPan::isKnownAttribute): Deleted.
3060         (WebCore::SVGZoomAndPan::addSupportedAttributes): Deleted.
3061         (WebCore::SVGZoomAndPan::parse): Renamed from parseZoomAndPan since
3062         this is a member of the SVGZoomAndPan class and also has an argument
3063         of SVGZoomAndPanType.
3064         (WebCore::SVGZoomAndPan::parseAttributeValue): Added. Helper so the
3065         template function is not so big. Also write it in a simpler way.
3066         (WebCore::SVGZoomAndPan::ref): Deleted.
3067         (WebCore::SVGZoomAndPan::deref): Deleted.
3068         (WebCore::SVGZoomAndPan::setZoomAndPan): Deleted.
3069
3070         * svg/SVGZoomAndPan.h: Removed unneeded includes. Reformatted the enum.
3071         Moved function bodies out of the class definition. Removed many unneeded
3072         functions.
3073
3074         * svg/animation/SVGSMILElement.cpp:
3075         (WebCore::SVGSMILElement::insertedInto): Updated since timeContainer
3076         now returns a reference rather than a pointer.
3077
3078 2015-02-11  Darin Adler  <darin@apple.com>
3079
3080         SVGUseElement follow-up improvements
3081         https://bugs.webkit.org/show_bug.cgi?id=141382
3082
3083         Reviewed by Antti Koivisto.
3084
3085         * loader/cache/CachedSVGDocumentClient.h: Removed unneeded forward declaration.
3086
3087         * page/EventHandler.cpp: Removed unneeded include of SVGUseElement.h.
3088         * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
3089
3090         * svg/SVGDocumentExtensions.cpp:
3091         (WebCore::SVGDocumentExtensions::clearTargetDependencies): Removed too-specific
3092         check that assumed that SVG elements in shadow trees are always for <use> elements.
3093         This amounted to an unneeded optimization that could be removed with no bad effect.
3094
3095         * svg/SVGElement.cpp:
3096         (WebCore::SVGElement::correspondingElement): Removed the assertions so this could
3097         be used more freely outside of cases where the shadow tree state is fully consistent.
3098         It's fine to have this just be a mechanical getter; there's nothing super-tricky
3099         here that needs to be caught by the assertion.
3100         (WebCore::SVGElement::title): Removed unneeded special handling for titles inside
3101         the shadow tree.
3102
3103         * svg/SVGGElement.cpp:
3104         (WebCore::SVGGElement::create): Added an overload that doesn't require explicitly
3105         passing in the tag name.
3106         * svg/SVGGElement.h: Ditto.
3107         * svg/SVGSVGElement.cpp:
3108         (WebCore::SVGSVGElement::create): Ditto.
3109         * svg/SVGSVGElement.h: Ditto.
3110
3111         * svg/SVGUseElement.cpp: Removed a lot of unneeded includes.
3112         (WebCore::SVGUseElement::SVGUseElement): Removed code to initialize some booleans.
3113         We do that in the class definition now.
3114         (WebCore::SVGUseElement::create): Removed the code that calls the
3115         ensureUserAgentShadowRoot function unconditionally. That's properly done when
3116         needed; no need to do it here.
3117         (WebCore::SVGUseElement::~SVGUseElement): Removed unneeded code to destroy the
3118         shadow tree (that happens automatically) and simplified the code to stop loading
3119         the external document.
3120         (WebCore::SVGUseElement::isSupportedAttribute): Deleted.
3121         (WebCore::SVGUseElement::parseAttribute): Simplified this. Removed assumptions
3122         about the intersection of various sets of attributes, and also removed the
3123         isSupportedAttribute function. This seems to serve no purpose here, or in any
3124         other SVG element class. I plan to remove it everywhere over time.
3125         (WebCore::isWellFormedDocument): Deleted.
3126         (WebCore::SVGUseElement::insertedInto): Simplified code by removing all the
3127         special cases during initial parsing, and did the invalidation here rather than
3128         deferring it to didNotifySubtreeInsertions. Added a call to the new function,
3129         updateExternalDocument, since that won't do anything when the element is not
3130         in a document.
3131         (WebCore::SVGUseElement::didNotifySubtreeInsertions): Deleted.
3132         (WebCore::SVGUseElement::removedFrom): Added code to call clearShadowTree and
3133         updateExternalDocument. Both are efficient when doing nothing, and both are
3134         appropriate since the element is no longer in a document.
3135         (WebCore::SVGUseElement::referencedDocument): Deleted. No longer needed.
3136         (WebCore::SVGUseElement::externalDocument): Streamlined the logic here, removing
3137         multiple unneeded checks.
3138         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone): Renamed since
3139         "target clone" is clear enough within this class, without explicitly stating
3140         "shadow tree". All the clones are in the shadow tree.
3141         (WebCore::SVGUseElement::svgAttributeChanged): Removed unneeded code calling
3142         isSupportedAttribute. Changed the code that detects changes in href to just
3143         call updateExternalDocument (for the document URL) and invalidateShadowTree
3144         (for the fragment). Also updated the transferSizeAttributesToTargetClone logic
3145         to only trigger on width and height and updated names.
3146         (WebCore::SVGUseElement::willAttachRenderers): Updated for the new name of
3147         m_shouldRebuildShadowTree and added a call through to the base class.
3148         (WebCore::createAllowedElementSet): Added. A more efficient way to implement
3149         the initialization of the set for isDisallowedElement.
3150         (WebCore::isDisallowedElement): Simplified this by using the function above,
3151         and also overloaded for both SVGElement and Element for a tiny efficiency boost.
3152         (WebCore::SVGUseElement::clearShadowTree): Renamed form clearResourceReferences.
3153         This is a much more straightforward name. Also deleted the code that sets the
3154         m_needsShadowTreeRecreation flag to false. That should be done by the build
3155         function, not here.
3156         (WebCore::SVGUseElement::buildPendingResource): Made this just invalidate the
3157         shadow tree now instead of explicitly building it.
3158         (WebCore::SVGUseElement::updateShadowTree): Moved the code to create a shadow
3159         tree here from buildPendingResource. ALso changed the logic so that we
3160         always blow away the old shadow tree. Moved the comment about rebuilding things
3161         every time here. Updated the code to use the findTarget and cloneTarget functions,
3162         eliminating the buildShadowTree function entirely. Moved the call to
3163         transferSizeAttributesToShadowTreeTargetClone inside cloneTarget. Also updated
3164         for the name change for m_shouldRebuildShadowTree.
3165         (WebCore::SVGUseElement::targetClone): Renamed from shadowTreeTargetClone.
3166         No need to emphasize "shadow tree" since that's where all clones are.
3167         (WebCore::isDirectReference): Streamlined a bit using "using namespace".
3168         (WebCore::SVGUseElement::toClipPath): Rewrote to use early return and updated
3169         for name changes. Also used ASCIILiteral.
3170         (WebCore::SVGUseElement::rendererClipChild): Changed local variable names.
3171         (WebCore::removeDisallowedElementsFromSubtree): Wrote the iteration in a
3172         slightly more idiomatic style.
3173         (WebCore::SVGUseElement::findTarget): Added. This new function implements
3174         the rule for finding a valid target for a use element. This replaces logic
3175         that was duplicated in two different places and it also includes all the
3176         rules that were formerly in the isValidTarget function. Also, this implements
3177         a correct check for a cycle that handles cases the code in isValidTarget did not.
3178         (WebCore::SVGUseElement::isValidTarget): Deleted.
3179         (WebCore::SVGUseElement::cloneTarget): Added. Helper function used both when
3180         cloning the target of the top level <use> elements and for other <use> elements
3181         inside the shadow tree.
3182         (WebCore::cloneDataAndChildren): Added. Helper function that allows both the
3183         <use> and <symbol> element expanding functions to be shorter and share more code.
3184         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed unneeded checks
3185         of cachedDocumentIsStillLoading. Used the new findTarget function, which handles
3186         finding the target cross-document correctly. Removed the incorrect use of
3187         referencedDocument when creating new elements and finding targets. Refactored
3188         to use the new cloneDataAndChildren function and also moved the code that removes
3189         the special attributes here, replacing the transferAttributesToShadowTreeReplacement
3190         function. Made a few other simplifications.
3191         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto, just like the
3192         <use> changes only simpler.
3193         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Made this const.
3194         Removed unneeded assertions.
3195         (WebCore::SVGUseElement::invalidateShadowTree): Updated for name change.
3196         (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed assertion.
3197         (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Deleted.
3198         (WebCore::SVGUseElement::selfHasRelativeLengths): Tweaked names.
3199         (WebCore::SVGUseElement::notifyFinished): Removed the inDocument check, since
3200         this function will only be called for elements that are in a document.
3201         (WebCore::SVGUseElement::cachedDocumentIsStillLoading): Deleted.
3202         (WebCore::SVGUseElement::finishParsingChildren): Removed the code that calls
3203         buildPendingResource here. Shadow tree updating is driven solely by renderer
3204         generation now.
3205         (WebCore::SVGUseElement::updateExternalDocument): Replaced setCachedDocument
3206         with this. This function knows how to load a different document if the URL
3207         has changed, or leave it alone if not, and also stop the load if it should.
3208         (WebCore::SVGUseElement::isValid): Moved this here from the header, since it's
3209         always being called virtually.
3210         (WebCore::SVGUseElement::haveLoadedRequiredResources): Ditto.
3211         (WebCore::SVGUseElement::setHaveFiredLoadEvent): Ditto.
3212         (WebCore::SVGUseElement::haveFiredLoadEvent): Ditto.
3213         (WebCore::SVGUseElement::svgLoadEventTimer): Ditto.
3214
3215         * svg/SVGUseElement.h: Removed unneeded include. Moved the animated properties
3216         to the top of the class because they are public DOM API and so are logical to
3217         list first. I'd like to do that for other classes too over time. Changed to
3218         derive privately from CachedSVGDocumentClient. Made the function
3219         invalidateDependentShadowTrees private. Removed didNotifySubtreeInsertions,
3220         isSupportedAttribute, clearResourceReferences, buildShadowTree,
3221         transferAttributesToShadowTreeReplacement, isParserInserted, and
3222         m_wasInsertedByParser. Added updateExternalDocument, cloneTarget, targetClone,
3223         updateShadowTree, and clearShadowTree. Also did a couple other renames,
3224         including renaming m_cachedDocument to m_externalDocument.
3225
3226         * svg/svgtags.in: Removed constructorNeedsCreatedByParser from the <use>
3227         element since we don't have to handle constructing by the parser specially.
3228
3229 2015-02-11  Dhi Aurrahman  <diorahman@rockybars.com>
3230
3231         CSS selector JIT compilation support for :lang()
3232         https://bugs.webkit.org/show_bug.cgi?id=140818
3233
3234         Reviewed by Benjamin Poulain.
3235
3236         Add the JIT support for :lang(), to ensure :lang() no longer force the engine to
3237         the slow path.
3238
3239         Test: fast/selectors/lang-chained-multiple.html
3240
3241         * cssjit/SelectorCompiler.cpp:
3242         (WebCore::SelectorCompiler::addPseudoClassType):
3243         Get rid of the FunctionType::CannotCompile
3244         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3245         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
3246
3247 2015-02-11  Alex Christensen  <achristensen@webkit.org>
3248
3249         Fix more weak external symbol errors.
3250
3251         * bindings/scripts/CodeGeneratorJS.pm:
3252         (GenerateHeader):
3253         * page/make_settings.pl:
3254         (printGetterAndSetter):
3255         Remove some WEBCORE_EXPORT macros.
3256
3257 2015-02-11  Alex Christensen  <achristensen@webkit.org>
3258
3259         Do not export functions defined in headers.
3260         This prevents weak external symbol errors in some configurations.
3261
3262         * dom/Range.h:
3263         (WebCore::Range::startContainer):
3264         (WebCore::Range::startOffset):
3265         (WebCore::Range::endContainer):
3266         (WebCore::Range::endOffset):
3267         * inspector/InspectorController.h:
3268         * page/Settings.h:
3269         (WebCore::Settings::setMediaKeysStorageDirectory):
3270         * page/make_settings.pl:
3271         (printGetterAndSetter):
3272         * platform/network/cocoa/ProtectionSpaceCocoa.h:
3273         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
3274         * platform/text/TextEncoding.h:
3275         (WebCore::TextEncoding::decode):
3276         Removed WEBCORE_EXPORT macros.
3277
3278 2015-02-11  Chris Dumez  <cdumez@apple.com>
3279
3280         [WK2] Add logging to validate the network cache efficacy (Part 2)
3281         https://bugs.webkit.org/show_bug.cgi?id=141345
3282         <rdar://problem/19632080>
3283
3284         Reviewed by Sam Weinig.
3285
3286         Add a few more diagnostic logging keys for the network cache efficacy
3287         logging.
3288
3289 2015-02-11  Sam Weinig  <sam@webkit.org>
3290
3291         REGRESSION(r179166): Crash when accessing document.dir on a document with no elements
3292         <rdar://problem/19804351>
3293         https://bugs.webkit.org/show_bug.cgi?id=141480
3294
3295         Reviewed by Chris Dumez.
3296
3297         Test: fast/dom/document-dir-empty-document-crash.html
3298
3299         * html/HTMLDocument.cpp:
3300         (WebCore::HTMLDocument::dir):
3301         Don't unnecessarily dereference the documentElement. is<HTMLHtmlElement>() will handle null just fine.
3302
3303 2015-02-11  Mark Rowe  <mrowe@apple.com>
3304
3305         <https://webkit.org/b/141492> extract-localizable-strings.pl shouldn't update the target file if the contents haven't changed
3306
3307         Avoid updating the target file if the contents haven't changed. This prevents Xcode from copying the identical
3308         file into the framework and resigning it, which avoids the resulting relinking of all targets that depend on
3309         the framework.
3310
3311         Reviewed by Dan Bernstein.
3312
3313         * extract-localizable-strings.pl: Write our output to a temporary file. If the output differs from the
3314         existing contents of the target file, move the temporary file over the target file. Otherwise, delete
3315         the temporary file.
3316
3317 2015-02-11  Chris Dumez  <cdumez@apple.com>
3318
3319         Turn recent assertions into release assertions to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
3320         https://bugs.webkit.org/show_bug.cgi?id=141484
3321         <rdar://problem/13811738>
3322
3323         Reviewed by Andy Estes.
3324
3325         Turn recent assertions into release assertions to help track down crash in
3326         DocumentLoader::stopLoadingForPolicyChange(). This should increase the
3327         likelyhood of tripping them so that we better understand why this happens.
3328
3329         * loader/DocumentLoader.cpp:
3330         (WebCore::DocumentLoader::~DocumentLoader):
3331         (WebCore::DocumentLoader::detachFromFrame):
3332
3333 2015-02-11  Jer Noble  <jer.noble@apple.com>
3334
3335         [MSE] SampleMap::addRange() returns an inverted iterator_range, possibly causing a crash when that iterator_range is traversed.
3336         https://bugs.webkit.org/show_bug.cgi?id=141479
3337         rdar://problem/19067597
3338
3339         Reviewed by Chris Dumez.
3340
3341         When looking backwards through a presentationOrder map to find samples, we then reverse our iterators
3342         and put them in an iterator_range to return to the caller. But in addition to reversing the iterators
3343         themselves, we also need to put them in the iterator_range in reverse order, so that when the caller
3344         iterates from iterator_range.first -> iterator_range.second, they don't end up off the end of the
3345         the underlying storage.
3346
3347         * Modules/mediasource/SampleMap.cpp:
3348         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
3349
3350 2015-02-11  Simon Fraser  <simon.fraser@apple.com>
3351
3352         Improve the showFrameTree() output slightly
3353         https://bugs.webkit.org/show_bug.cgi?id=141482
3354
3355         Reviewed by Zalan Bujtas.
3356
3357         Have showFrameTree() show the Frame's RenderView so it can be correlated with
3358         layer dumps, and show styleRecalc and needsLayout state.
3359
3360         * page/FrameTree.cpp:
3361         (printFrames):
3362         * page/FrameView.cpp:
3363         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): Add an explanatory
3364         comment about why we don't walk the Frame tree.
3365
3366 2015-02-11  Alex Christensen  <achristensen@webkit.org>
3367
3368         Stop using WebCore.exp.in on Mac and iOS.
3369         https://bugs.webkit.org/show_bug.cgi?id=141413
3370
3371         Reviewed by Dan Bates.
3372
3373         * Configurations/Base.xcconfig:
3374         Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
3375         * platform/PlatformExportMacros.h:
3376         Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
3377
3378 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
3379
3380         Div having contentEditable and display:flex cannot be edited if it is empty.
3381         https://bugs.webkit.org/show_bug.cgi?id=141218
3382
3383         Reviewed by Ryosuke Niwa.
3384
3385         RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
3386         in an editable area is recalculated whenever an inner value of div is changed. If the inner value
3387         is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
3388         is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
3389         in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
3390         having "display : flex" goes weird and VisibleSelection is empty accordingly.
3391
3392         Test: fast/events/key-events-in-editable-flexbox.html
3393
3394         * dom/Position.cpp:
3395         (WebCore::Position::isCandidate):
3396
3397 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
3398
3399         Activate ReliefLogger of a memory pressure handler for linux system.
3400         https://bugs.webkit.org/show_bug.cgi?id=123611
3401
3402         Reviewed by Anders Carlsson.
3403
3404         Put more logs for the time when a system goes under memory pressure or viceversa.
3405