[CSS Grid Layout] Support sparse in auto-placement algorithm
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-14  Manuel Rego Casasnovas  <rego@igalia.com>
2
3         [CSS Grid Layout] Support sparse in auto-placement algorithm
4         https://bugs.webkit.org/show_bug.cgi?id=134544
5
6         Reviewed by Sergio Villar Senin.
7
8         This patch implements sparse mode for auto-placement algorithm, which is
9         the default mode in the new grid-auto-flow syntax. It keeps track of the
10         auto-placement cursor in
11         RenderGrid::placeAutoMajorAxisItemsOnGrid() and updates it accordingly
12         when auto-positioned items are placed.
13         If we're in dense mode it resets the cursor after each item (which keeps
14         the old behavior that was using dense mode by default).
15
16         GridIterator has been adapted to look for empty areas from a given
17         position in both directions.
18
19         Test: fast/css-grid-layout/grid-auto-flow-sparse.html
20
21         * rendering/RenderGrid.cpp:
22         (WebCore::RenderGrid::GridIterator::GridIterator): Modify constructor to
23         add an optional argument for the varying index. This allows to look for
24         empty areas in both axis.
25         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Defined the
26         auto-placement cursor and rested after each item if we're in dense mode.
27         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Use auto-placement
28         cursor to look for empty areas from the last auto-positioned item
29         placed.
30         * rendering/RenderGrid.h: Modify placeAutoMajorAxisItemOnGrid() header
31         to receive the auto-placement cursor.
32
33 2014-07-14  Brent Fulgham  <bfulgham@apple.com>
34
35         [iOS] Some videos play as inline audio-only content
36         https://bugs.webkit.org/show_bug.cgi?id=134898.
37         <rdar://problem/17629379>
38
39         Reviewed by Eric Carlson.
40
41         Add a new 'presentationType' accessor that indicates if the media
42         element is playing in 'audio' mode. This can happen if a video
43         element plays an HLS stream that starts off in audio-only mode.
44
45         * html/HTMLMediaElement.cpp:
46         (WebCore::HTMLMediaElement::presentationType): Added.
47         * html/HTMLMediaElement.h:
48         * platform/audio/MediaSession.cpp:
49         (WebCore::MediaSession::presentationType): Added.
50         * platform/audio/MediaSession.h:
51         * platform/audio/MediaSessionManager.cpp: 
52         (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
53         Use the presentationType, rather than the mediaType to control
54         inline playback behavior.
55         * platform/audio/ios/AudioDestinationIOS.h:
56         (WebCore::AudioDestinationMac::presentationType): Add presentationType.
57         * platform/audio/mac/AudioDestinationMac.h:
58         (WebCore::AudioDestinationMac::presentationType): Ditto.
59
60 2014-07-14  Bear Travis  <betravis@adobe.com>
61
62         [Feature Queries] Enable Feature Queries on Mac
63         https://bugs.webkit.org/show_bug.cgi?id=134404
64
65         Reviewed by Antti Koivisto.
66
67         Enable Feature Queries on Mac and resume running the
68         feature tests.
69
70         * Configurations/FeatureDefines.xcconfig: Turn on
71         ENABLE_CSS3_CONDITIONAL_RULES.
72
73 2014-07-11  David Hyatt  <hyatt@apple.com>
74
75         <rdar://problem/17305458> Cannot interact with video controls in ePubs
76         Bug 134836 - [New Multicolumn] Crawl to check for compositing between us and the enclosingPaginationLayer
77         https://bugs.webkit.org/show_bug.cgi?id=134836
78
79         Reviewed by Dean Jackson.
80
81         The paginatedAndComposited bit being set in updateLayerPositions just didn't work, since compositing states
82         can change without triggering that function. This patch just gets rid of the bit and does a crawl every time
83         to check. This ensures that changes in compositing states don't necessitate any changes in pagination,
84         since the lookup will always check the current compositing state.
85         
86         The new function that does this check is hasCompositedLayerInEnclosingPaginationChain.
87         
88         I have been unable to reproduce this issue, and this is therefore a purely speculative fix. I have no test
89         case to provide because of this.
90
91         * rendering/RenderLayer.cpp:
92         (WebCore::RenderLayer::RenderLayer):
93         (WebCore::RenderLayer::updateLayerPositions):
94         (WebCore::RenderLayer::hasCompositedLayerInEnclosingPaginationChain):
95         (WebCore::RenderLayer::updatePagination):
96         * rendering/RenderLayer.h:
97
98 2014-07-14  Zalan Bujtas  <zalan@apple.com>
99
100         Move composite bounds calculation to RenderLayerBacking.
101         https://bugs.webkit.org/show_bug.cgi?id=134864
102
103         Reviewed by Darin Adler.
104
105         No change in functionality.
106
107         * rendering/RenderLayerBacking.cpp:
108         (WebCore::RenderLayerBacking::updateCompositedBounds):
109         * rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
110         to the RenderLayer.
111         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
112         * rendering/RenderLayerCompositor.h:
113
114 2014-07-14  Tim Horton  <timothy_horton@apple.com>
115
116         Fix the build.
117
118         * platform/audio/MediaSessionManager.h:
119
120 2014-07-14  Eric Carlson  <eric.carlson@apple.com>
121
122         [Mac] don't enable low power audio mode on external output devices
123         https://bugs.webkit.org/show_bug.cgi?id=134877
124
125         Reviewed by Sam Weinig.
126
127         No new tests, this deals with changes to the audio hardware at runtime.
128
129         * WebCore.xcodeproj/project.pbxproj: Remove AudioSessionListener.h.
130         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
131
132         * platform/audio/AudioHardwareListener.cpp:
133         (WebCore::AudioHardwareListener::AudioHardwareListener): Initialize m_outputDeviceSupportsLowPowerMode
134             to true on iOS.
135         * platform/audio/AudioHardwareListener.h:
136         (WebCore::AudioHardwareListener::outputDeviceSupportsLowPowerMode): New accessor.
137         (WebCore::AudioHardwareListener::setHardwareActivity): New setter for derived classes.
138         (WebCore::AudioHardwareListener::setOutputDeviceSupportsLowPowerMode): Ditto.
139
140         Remove AudioSessionListener interface, it wasn't being used.
141         * platform/audio/AudioSession.cpp:
142         (WebCore::AudioSession::addListener): Deleted.
143         (WebCore::AudioSession::removeListener): Deleted.
144         (WebCore::AudioSession::beganAudioInterruption): Deleted.
145         (WebCore::AudioSession::endedAudioInterruption): Deleted.
146         * platform/audio/AudioSession.h:
147         * platform/audio/AudioSessionListener.h: Removed.
148
149         * platform/audio/MediaSessionManager.cpp:
150         (WebCore::MediaSessionManager::addSession): Allocate the AudioHardwareListener if necessary.
151         (WebCore::MediaSessionManager::removeSession): Free the AudioHardwareListener if necessary.
152         (WebCore::MediaSessionManager::audioOutputDeviceChanged): AudioHardwareListener client interface
153             called when the output device changes, call updateSessionState to make sure we are using
154             the correct buffer size.
155         * platform/audio/MediaSessionManager.h:
156
157         * platform/audio/ios/AudioDestinationIOS.h:
158         * platform/audio/ios/AudioSessionIOS.mm:
159         (WebCore::AudioSessionPrivate::AudioSessionPrivate): Drive-by cleanup, remove ObjC helper object
160             that was used to listen for OS notifications, it is no longer used.
161         (SOFT_LINK_POINTER): Deleted.
162         (-[WebAudioSessionHelper initWithCallback:]): Deleted.
163         (-[WebAudioSessionHelper dealloc]): Deleted.
164         (-[WebAudioSessionHelper interruption:]): Deleted.
165
166         * platform/audio/mac/AudioHardwareListenerMac.cpp:
167         (WebCore::currentDeviceSupportsLowPowerBufferSize): New, return true only if using build-in 
168             transport device.
169         (WebCore::processIsRunningPropertyDescriptor): Return reference to static AudioObjectPropertyAddress
170             for kAudioHardwarePropertyProcessIsRunning instead of declaring one in every method
171             that needs one.
172         (WebCore::outputDevicePropertyDescriptor): Return reference to static AudioObjectPropertyAddress
173             for kAudioHardwarePropertyDefaultOutputDevice.
174         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac): Restructure and add audio object
175             listener for default output device.
176         (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac): *Remove* listener audio object
177             property listener instead of *Adding* a new one. Remove new listener.
178         (WebCore::AudioHardwareListenerMac::propertyChanged): Enumerate the properties that changed,
179             call appropriate method.
180         (WebCore::AudioHardwareListenerMac::processIsRunningChanged): Renamed from setHardwareActive, 
181             cleanup.
182         (WebCore::AudioHardwareListenerMac::outputDeviceChanged): New, call client.audioHardwareOutputDeviceChanged.
183         (WebCore::AudioHardwareListenerMac::setHardwareActive): Deleted, renamed processIsRunningChanged.
184         * platform/audio/mac/AudioHardwareListenerMac.h:
185
186         * platform/audio/mac/MediaSessionManagerMac.cpp:
187         (MediaSessionManager::updateSessionState): Only set the output buffer size to 4K when hardware
188             supports it.
189
190 2014-07-13  Benjamin Poulain  <benjamin@webkit.org>
191
192         Remove SelectorCheckerFastPath from the style resolution algorithm
193         https://bugs.webkit.org/show_bug.cgi?id=134866
194
195         Reviewed by Antti Koivisto.
196
197         SelectorCheckerFastPath is now pure overhead because it can almost never match
198         if the CSS JIT was unable to compile.
199
200         * css/ElementRuleCollector.cpp:
201         (WebCore::ElementRuleCollector::ruleMatches):
202         The "pre-filter" behind fastCheckableSelector had two parts:
203         1) Filtering the pseudoID.
204         2) Filtering on the rule hash.
205
206         The first part has been generalized (RuleDatacanMatchPseudoElement())
207         and moved to collectMatchingRulesForList(). 
208
209         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
210         * css/RuleSet.cpp:
211         (WebCore::selectorCanMatchPseudoElement):
212         (WebCore::RuleData::RuleData):
213         (WebCore::RuleSet::addRegionRule):
214         (WebCore::RuleSet::addRulesFromSheet):
215         * css/RuleSet.h:
216         (WebCore::RuleData::canMatchPseudoElement):
217         (WebCore::RuleData::hasFastCheckableSelector): Deleted.
218         * css/StyleResolver.cpp:
219
220 2014-07-13  Benjamin Poulain  <benjamin@webkit.org>
221
222         Remove an useless check from SelectorChecker
223         https://bugs.webkit.org/show_bug.cgi?id=134868
224
225         Reviewed by Darin Adler.
226
227         * css/SelectorChecker.cpp:
228         (WebCore::SelectorChecker::matchRecursively):
229         The condition of this if() branch can never be met for the mode "QueryingRules".
230
231         The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
232         a pseudo element was matched prior to the current context/simple selector.
233         This cannot happen with QueryingRules, since we never match pseudo elements for
234         SelectorQuery.
235
236 2014-07-12  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
237
238         Elements with rendering disabled due to dimensions should not contribute to parent bounding box
239         https://bugs.webkit.org/show_bug.cgi?id=134184
240
241         Reviewed by Dirk Schulze.
242
243         SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
244         Examples of elements with rendering disabled:
245         - basic shape with width <= 0 or height <= 0
246         - path with no path data (d attribute missing or empty)
247         - polyline or polygon element with no point data (points attribute missing or empty)
248
249         To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
250         This is used to determine if an element is included when creating the union of child bounding boxes
251         in a container element.
252
253         Tests: svg/custom/GetBBox-path-nodata.html
254                svg/custom/GetBBox-polygon-nodata.html
255                svg/custom/GetBBox-polyline-nodata.html
256                svg/custom/getBBox-container-hiddenchild.html
257
258         * rendering/svg/RenderSVGEllipse.cpp:
259         (WebCore::RenderSVGEllipse::isRenderingDisabled):
260         New method added. Checks bounding box to determine if rendering is disabled.
261         * rendering/svg/RenderSVGEllipse.h:
262         * rendering/svg/RenderSVGPath.cpp:
263         (WebCore::RenderSVGPath::isRenderingDisabled):
264         New method added. Checks bounding box to determine if rendering is disabled.
265         * rendering/svg/RenderSVGPath.h:
266         * rendering/svg/RenderSVGRect.cpp:
267         (WebCore::RenderSVGRect::isRenderingDisabled):
268         New method added. Checks bounding box to determine if rendering is disabled.
269         * rendering/svg/RenderSVGRect.h:
270         * rendering/svg/RenderSVGShape.h:
271         (WebCore::RenderSVGShape::isRenderingDisabled):
272         New method added. Always returns false so that derived classes that do not
273         implement this method retain the existing behaviour.
274         * rendering/svg/SVGRenderSupport.cpp:
275         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
276         For each element potentially being included in the unioned bounding box of
277         a container, check isRenderingDisabled and skip that element if true.
278
279         * rendering/svg/RenderSVGEllipse.cpp:
280         (WebCore::RenderSVGEllipse::isRenderingDisabled):
281         * rendering/svg/RenderSVGEllipse.h:
282         * rendering/svg/RenderSVGPath.cpp:
283         (WebCore::RenderSVGPath::isRenderingDisabled):
284         * rendering/svg/RenderSVGPath.h:
285         * rendering/svg/RenderSVGRect.cpp:
286         (WebCore::RenderSVGRect::isRenderingDisabled):
287         * rendering/svg/RenderSVGRect.h:
288         * rendering/svg/RenderSVGShape.h:
289         * rendering/svg/SVGRenderSupport.cpp:
290         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
291
292 2014-07-12  Benjamin Poulain  <benjamin@webkit.org>
293
294         Rename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttributeSelector()
295         https://bugs.webkit.org/show_bug.cgi?id=134862
296
297         Reviewed by Sam Weinig.
298
299         Unlike containsUncommonAttributeSelector(), selectorListContainsUncommonAttributeSelector() does not
300         evaluate the attribute for "uncommon" types.
301
302         It would be possible to change the function instead to evaluate common attributes based
303         on the match type and the pseudo class type. Such change would be more risky
304         and we would get very little benefit from it, I leave that for later if that ever becomes useful.
305
306         * css/RuleSet.cpp:
307         (WebCore::selectorListContainsAttributeSelector):
308         (WebCore::containsUncommonAttributeSelector):
309         (WebCore::selectorListContainsUncommonAttributeSelector): Deleted.
310
311 2014-07-12  Zan Dobersek  <zdobersek@igalia.com>
312
313         Use braced-init-list to create one-item Vector object in insertPerformanceEntry
314         https://bugs.webkit.org/show_bug.cgi?id=133675
315
316         Reviewed by Darin Adler.
317
318         * page/PerformanceUserTiming.cpp:
319         (WebCore::insertPerformanceEntry): Avoid wasting three lines for creating a
320         Vector object with just one item that in the end gets copied. Use the
321         braced-init-list syntax instead, leveraging Vector's std::initializer_list
322         constructor.
323
324 2014-07-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
325
326         Memory leaks with autoLoadImages off
327         https://bugs.webkit.org/show_bug.cgi?id=124411
328
329         Reviewed by Darin Adler.
330
331         Do not emit notifyFinished for images with deferred load,
332         and allow deferred loads to be cancelled.
333
334         * loader/cache/CachedResource.cpp:
335         (WebCore::CachedResource::checkNotify):
336         (WebCore::CachedResource::cancelLoad):
337
338 2014-07-11  Jer Noble  <jer.noble@apple.com>
339
340         [MSE] http/tests/media/media-source/mediasource-duration.html is failing.
341         https://bugs.webkit.org/show_bug.cgi?id=134852
342
343         Reviewed by Eric Carlson.
344
345         Fixes the following tests:
346         http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
347         http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
348         http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
349         http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
350         http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
351         http/tests/media/media-source/mediasource-duration.html
352         http/tests/media/media-source/mediasource-play.html
353
354         The primary change necessary to fix the mediasource-duration.html test was to add support
355         for delaying the completion of a seek operation until the HTMLMediaElement's readyState
356         rises to > HAVE_CURRENT_DATA. This is accomplished by modifying MediaSourcePrivate to have
357         waitForSeekCompleted() and seekCompleted() virtual methods. These are called by MediaSource
358         when a seek operation results in the current time moving outside the currently buffered time
359         ranges, and when an append operation results in the readyState changing, respectively.
360
361         A number of other drive-by fixes were necessary to get this test fully passing, as noted
362         below.
363
364         Make the MediaSource the primary owner of the media's duration, rather than the MediaSourcePrivate.
365         Move the MediaSourcePrivateClient pointer to the MediaSourcePrivate from the MediaPlayerPrivate, so
366         the MediaSource's duration can be retrieved.  While we're at it, do the same thing for buffered.
367
368         * Modules/mediasource/MediaSource.cpp:
369         (WebCore::MediaSource::MediaSource): Initialize m_duration.
370         (WebCore::MediaSource::duration): Simple accessor.
371         (WebCore::MediaSource::setDurationInternal): Bring 'duration change algorithm' up to spec.
372         (WebCore::MediaSource::setReadyState): Reset m_duration on close.
373         * Modules/mediasource/MediaSource.h:
374         * platform/graphics/MediaSourcePrivate.h:
375         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
376         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Do not call setPrivateAndOpen().
377         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Pass through to MediaSourcePrivateAVFObjC.
378         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
379         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
380         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
381         (WebCore::MediaSourcePrivateAVFObjC::create): Call setPrivateAndOpen().
382         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Set m_client.
383         (WebCore::MediaSourcePrivateAVFObjC::duration): Pass through to MediaSourcePrivateClient.
384         (WebCore::MediaSourcePrivateAVFObjC::buffered): Ditto.
385         (WebCore::MediaSourcePrivateAVFObjC::durationChanged): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
386         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Deleted.
387         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
388         (WebCore::MediaSourceGStreamer::open): Pass in MediaSourcePrivateClient.
389         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Initialize m_mediaSource.
390         (WebCore::MediaSourceGStreamer::durationChanged): Retrieve the duration from MediaSourcePrivateClient.
391         (WebCore::MediaSourceGStreamer::markEndOfStream): Remove unnecssary ASSERT.
392         (WebCore::MediaSourceGStreamer::unmarkEndOfStream): Ditto.
393         (WebCore::MediaSourceGStreamer::setDuration): Deleted.
394         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
395         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
396         (WebCore::MockMediaPlayerMediaSource::load): Do not call setPrivateAndOpen().
397         (WebCore::MockMediaPlayerMediaSource::buffered): Pass through to MockMediaSourcePrivate.
398         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
399         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
400         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
401         (WebCore::MockMediaSourcePrivate::create): Call setPrivateAndOpen().
402         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set m_client.
403         (WebCore::MockMediaSourcePrivate::duration): Pass through to MediaSourcePrivateClient.
404         (WebCore::MockMediaSourcePrivate::buffered): Ditto.
405         (WebCore::MockMediaSourcePrivate::durationChanged): Pass thorugh to MockMediaPlayerMediaSource.
406         (WebCore::MockMediaSourcePrivate::setDuration): Deleted.
407
408         Route seekToTime through MediaSource, rather than through MediaSourcePrivate, so that
409         the time can be compared against the buffered ranges, and trigger the delay of the seek
410         operation if necessary. Add a seekTimer to MediaPlayerPrivateMediaSourceAVFObjC, as this
411         guarantees the order of asynchronous operations, rather than callOnMainThread, which can
412         cause async operations to occur out of order.
413
414         * Modules/mediasource/MediaSource.cpp:
415         (WebCore::MediaSource::seekToTime): Bring up to spec.
416         (WebCore::MediaSource::completeSeek): Ditto.
417         (WebCore::MediaSource::monitorSourceBuffers): Call completeSeek() when appropriate.
418         * Modules/mediasource/SourceBuffer.cpp:
419         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Deleted.
420         (WebCore::SourceBuffer::seekToTime): Renamed from sourceBufferPrivateSeekToTime().
421         * platform/graphics/MediaSourcePrivate.h:
422         * platform/graphics/MediaSourcePrivateClient.h:
423         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
424         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
425         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Add seekTimer. Only
426             call timeChanged() if no longer seeking, thereby triggering a 'seeked' event.
427         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Clear m_seekTimer.
428         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Use m_seekTimer.
429         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Call seekInternal.
430         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Add logging.
431         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted): Added.
432         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted): Added; trigger 'seeked'.
433         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): No longer attempt to finish seek when
434             readyState changes here; this has been moved up to MediaSource.cpp.
435         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
436         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
437         (WebCore::MediaSourcePrivateAVFObjC::waitForSeekCompleted): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
438         (WebCore::MediaSourcePrivateAVFObjC::seekCompleted): Ditto.
439         (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Pass through to MediaSourcePrivateClient.
440         (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Ditto.
441         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
442         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Initialize m_seekCompleted.
443         (WebCore::MockMediaPlayerMediaSource::seeking): Check for an uncompleted seek operation. 
444         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance): Ditto.
445         (WebCore::MockMediaPlayerMediaSource::waitForSeekCompleted): Added.
446         (WebCore::MockMediaPlayerMediaSource::seekCompleted): Added; trigger 'seeked'.
447         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
448         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
449         (WebCore::MockMediaSourcePrivate::waitForSeekCompleted): Pass through to MockMediaPlayerMediaSource.
450         (WebCore::MockMediaSourcePrivate::seekCompleted): Ditto.
451         * platform/mock/mediasource/MockMediaSourcePrivate.h:
452
453         Drive-by fixes.
454
455         * Modules/mediasource/MediaSource.cpp:
456         (WebCore::MediaSource::streamEndedWithError): Re-order the steps in streamEndedWithError()
457             to avoid the MediaSource being closed and re-opened by the resulting duration change
458             operation.
459         * Modules/mediasource/MediaSource.h:
460         * Modules/mediasource/SourceBuffer.cpp:
461         (WebCore::SourceBuffer::remove): Added logging.
462         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
463         (WebCore::SourceBuffer::hasFutureTime): Swap an ASSERT for an early-return; it's possible
464             for currentTime() to be outside of a buffered area.
465         * Modules/mediasource/SourceBuffer.h:
466         * html/HTMLMediaElement.cpp:
467         (WebCore::HTMLMediaElement::parseAttribute): Do not issue an additional 'timeupdate' event
468             after finishSeek() issues one of its own.
469         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
470         (WebCore::globalDataParserQueue): Allow parsing operations to happen concurrently on
471             background queues.
472
473 2014-07-12  Eric Carlson  <eric.carlson@apple.com>
474
475         [iOS] update control type when playback state changes
476         https://bugs.webkit.org/show_bug.cgi?id=134856
477
478         Reviewed by Dean Jackson.
479
480         Check to make sure the correct type of media controls are showing when playback state
481         changes so we don't end up with the wrong type of controls during playback.
482
483         * Modules/mediacontrols/mediaControlsApple.js: 
484         (Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
485             of 'play' so controls don't hide too early.
486         * Modules/mediacontrols/mediaControlsiOS.js:
487         (ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
488             controls are shown when appropriate.
489
490 2014-07-12  Dean Jackson  <dino@apple.com>
491
492         [iOS Media] Start playback button should indicate when it can't play
493         https://bugs.webkit.org/show_bug.cgi?id=134851
494
495         Post-commit review with Eric Carlson on IRC.
496
497         * Modules/mediacontrols/mediaControlsiOS.js:
498         (ControllerIOS.prototype.updateStatusDisplay): Remove the line that sets the
499         class on the inline play button.
500
501 2014-07-11  Dean Jackson  <dino@apple.com>
502
503         [iOS Media] Start playback button should indicate when it can't play
504         https://bugs.webkit.org/show_bug.cgi?id=134851
505
506         Reviewed by Sam Weinig.
507
508         If a video element has errors and cannot play, then the start
509         playback button should use the "broken" icon.
510
511         * Modules/mediacontrols/mediaControlsApple.js: Add a new "failed" class.
512         * Modules/mediacontrols/mediaControlsiOS.js:
513         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): We need a playback button
514         even when there is an error.
515         (ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): Don't offer Airplay
516         if we're in an error state.
517         (ControllerIOS.prototype.updateStatusDisplay): Set the "failed" class on
518         the playback buttons if we are in an error state.
519
520 2014-07-11  Benjamin Poulain  <benjamin@webkit.org>
521
522         Partition the CSS rules based on the most specific filter of the rightmost fragment
523         https://bugs.webkit.org/show_bug.cgi?id=134828
524
525         Reviewed by Andreas Kling.
526
527         Previously, RuleSet was partitioning each rule based on the rightmost filter.
528         While fast, this had the side effect of putting many selectors with ID match in the class
529         bucket (because the selectors are generally written starting with the ID).
530
531         This patch replace the code of findBestRuleSetAndAdd() by a simple loop going over all
532         the simple selectors in the rightmost fragment to find the best bucket.
533
534         * css/ElementRuleCollector.cpp:
535         (WebCore::ElementRuleCollector::ruleMatches):
536         * css/RuleSet.cpp:
537         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
538         I unified ruleData.hasRightmostSelectorMatchingHTMLBasedOnRuleHash() and hasMultipartSelector().
539
540         (WebCore::RuleData::RuleData):
541         (WebCore::rulesCountForName):
542         (WebCore::RuleSet::addRule):
543         I removed the recursive part of findBestRuleSetAndAdd() (which was wrong anyway). The function
544         was useless so I just moved the algorithm to addRule() directly.
545
546         We first loop over all the CSSSelectors related by SubSelector, this correspond to the rightmost fragment.
547         If a filter with high specificity is found, we add the rule immediately and end there.
548         If a filter that is not very specific is found, we keep a pointer to the selector to use it later.
549
550         (WebCore::RuleSet::findBestRuleSetAndAdd): Deleted.
551         * css/RuleSet.h:
552         (WebCore::RuleData::hasMultipartSelector): Deleted.
553
554 2014-07-11  Alex Christensen  <achristensen@webkit.org>
555
556         [WinCairo] Unreviewed build fix after r170937.
557
558         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
559         Update and apply changes applied to WebCoreGenerated.make in r170937.
560
561 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
562
563         Web Inspector: Crash when using a stale InspectableNode Node
564         https://bugs.webkit.org/show_bug.cgi?id=134849
565
566         Reviewed by Timothy Hatcher.
567
568         * inspector/PageConsoleAgent.cpp:
569
570 2014-07-11  Jer Noble  <jer.noble@apple.com>
571
572         [MSE] Separate MediaSource logging into its own log channel
573         https://bugs.webkit.org/show_bug.cgi?id=134809
574
575         Reviewed by Eric Carlson.
576
577         Separate out MediaSource logging (which can be quite verbose) into its own log channel,
578         distinct from the Media log channel. Add some per-sample logging and further sequester that
579         logging into its own MediaSourceSamples log channel.
580
581         Add the MediaSource and MediaSourceSamples channels:
582         * platform/Logging.h:
583
584         Move LOG(Media) -> LOG(MediaSource):
585         * Modules/mediasource/MediaSource.cpp:
586         (WebCore::MediaSource::MediaSource):
587         (WebCore::MediaSource::~MediaSource):
588         (WebCore::MediaSource::setReadyState):
589         (WebCore::MediaSource::addSourceBuffer):
590         (WebCore::MediaSource::removeSourceBuffer):
591         (WebCore::MediaSource::isTypeSupported):
592         * Modules/mediasource/SourceBuffer.cpp:
593         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
594         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
595         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
596         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
597         (WebCore::SourceBuffer::provideMediaData):
598         (WebCore::SourceBuffer::monitorBufferingRate):
599         (WebCore::SourceBuffer::textTrackAddCues):
600         (WebCore::SourceBuffer::hasFutureTime):
601         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
602         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
603         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
604         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
605         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
606         (WebCore::SourceBufferPrivateAVFObjC::append):
607         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
608         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
609         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
610         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
611
612 2014-07-11  Brady Eidson  <beidson@apple.com>
613
614         Phone numbers that span two lines are not detected.
615         <rdar://problem/17601146> and https://bugs.webkit.org/show_bug.cgi?id=134808
616
617         Reviewed by Tim Horton.
618
619         * editing/Editor.cpp:
620         (WebCore::Editor::scanSelectionForTelephoneNumbers): After scanning a range from the TextIterator,
621             create an "edge range" window around the end of the TextIterator range, and scan it.
622             Also make sure to not accumulate duplicate ranges that might have showed up in both the
623             TextIterator range and the edge window range.
624
625 2014-07-11  Enrica Casucci  <enrica@apple.com>
626
627         Implement textStylingAtPosition in WK2.
628         https://bugs.webkit.org/show_bug.cgi?id=134843
629         <rdar://problem/17614981>
630         
631         Reviewed by Benjamin Poulain.
632
633         Adding some exports and making styleForSelectionStart public.
634
635         * WebCore.exp.in:
636         * editing/Editor.h:
637
638 2014-07-11  Zalan Bujtas  <zalan@apple.com>
639
640         REGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversion behavior.
641         https://bugs.webkit.org/show_bug.cgi?id=134841
642         <rdar://problem/17577563>
643
644         Reviewed by Simon Fraser.
645
646         Revert back to type int for Element.scroll* APIs in order to preserve exception handling
647         behavior.
648
649         Test: cssom/non-subpixel-scroll-top-left-values.html
650
651         * dom/Element.cpp:
652         (WebCore::Element::scrollLeft):
653         (WebCore::Element::scrollTop):
654         (WebCore::Element::setScrollLeft):
655         (WebCore::Element::setScrollTop):
656         (WebCore::Element::scrollWidth):
657         (WebCore::Element::scrollHeight):
658         * dom/Element.h:
659         * dom/Element.idl:
660         * html/HTMLBodyElement.cpp:
661         (WebCore::adjustForZoom):
662         (WebCore::HTMLBodyElement::scrollLeft):
663         (WebCore::HTMLBodyElement::setScrollLeft):
664         (WebCore::HTMLBodyElement::scrollTop):
665         (WebCore::HTMLBodyElement::setScrollTop):
666         (WebCore::HTMLBodyElement::scrollHeight):
667         (WebCore::HTMLBodyElement::scrollWidth):
668         * html/HTMLBodyElement.h:
669
670 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
671
672         Web Inspector: Debugger Pause button does not work
673         https://bugs.webkit.org/show_bug.cgi?id=134785
674
675         Reviewed by Timothy Hatcher.
676
677         * CMakeLists.txt:
678         * DerivedSources.make:
679         * inspector/CommandLineAPIModuleSource.js:
680         Minification strips the sourceURL command. Add it back with minification.
681
682 2014-07-11  Andreas Kling  <akling@apple.com>
683
684         Use the bare minimum tile coverage rect when under memory pressure.
685         <https://webkit.org/b/134837>
686
687         When the browser is under critical memory pressure, don't generate any
688         more tiles than are needed to cover the exposed viewport rect.
689
690         Reviewed by Pratik Solanki.
691
692         * page/FrameView.cpp:
693         (WebCore::FrameView::computeCoverageRect):
694
695 2014-07-11  Javier Fernandez  <jfernandez@igalia.com>
696
697         [CSS Grid Layout] Implement justify-self css property
698         https://bugs.webkit.org/show_bug.cgi?id=134419
699
700         Reviewed by Dean Jackson.
701
702         This change adds the justify-self property from CSS 3 Box Alignment
703         and implements the parsing.
704
705         From Blink r164685 by <jchaffraix@chromium.org>
706
707         Test: fast/css/parse-justify-self.html
708
709         * css/CSSComputedStyleDeclaration.cpp:
710         (WebCore::ComputedStyleExtractor::propertyValue):
711         * css/CSSParser.cpp:
712         (WebCore::isValidKeywordPropertyAndValue):
713         (WebCore::CSSParser::parseValue):
714         (WebCore::isItemPositionKeyword):
715         (WebCore::CSSParser::parseJustifySelf):
716         * css/CSSParser.h:
717         * css/CSSPrimitiveValueMappings.h:
718         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
719         (WebCore::CSSPrimitiveValue::operator EJustifySelf):
720         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment):
721         * css/CSSPropertyNames.in:
722         * css/CSSValueKeywords.in:
723         * css/DeprecatedStyleBuilder.cpp:
724         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
725         * css/StyleResolver.cpp:
726         (WebCore::StyleResolver::applyProperty):
727         * rendering/style/RenderStyle.h:
728         * rendering/style/RenderStyleConstants.h:
729         * rendering/style/StyleRareNonInheritedData.cpp:
730         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
731         (WebCore::StyleRareNonInheritedData::operator==):
732         * rendering/style/StyleRareNonInheritedData.h:
733
734 2014-07-11  Bear Travis  <betravis@adobe.com>
735
736         [Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
737         https://bugs.webkit.org/show_bug.cgi?id=134810
738
739         Reviewed by Antti Koivisto.
740
741         The parsing return values are used to determine if a feature query is valid. Two
742         grammar productions have been updated to correctly return a value.
743
744         Tests exist for this feature but will not be run until the feature is turned on.
745         See https://bugs.webkit.org/show_bug.cgi?id=134404.
746
747         * css/CSSGrammar.y.in: Adding return values for two valid feature query productions.
748
749 2014-07-10  Brent Fulgham  <bfulgham@apple.com>
750
751         Use a separate backdrop element to allow cues to have highlight and background color
752         https://bugs.webkit.org/show_bug.cgi?id=134821
753         <rdar://problem/15999721>
754
755         Reviewed by Eric Carlson.
756
757         Add a new <div> element wrapping the existing cue <span>. This allows
758         us to have a highlight on the cue (in the <span> background), as well
759         as an overall background color.
760
761         * Modules/mediacontrols/mediaControlsApple.css:
762         (video::-webkit-media-text-track-display-backdrop): New markup for
763         the backdrop element of the caption.
764         * html/track/VTTCue.cpp:
765         (WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
766         allow user customization of the cue backdrop.
767         (WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
768         "m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
769         (WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
770         (WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
771         of the new m_cueBackdropBox element, and add m_cueBackdropBox to
772         the display tree.
773         * html/track/VTTCue.h:
774         (WebCore::VTTCue::element):
775         * page/CaptionUserPreferencesMediaAF.cpp:
776         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
777         Fix for missing caption style updates. Even if we are already
778         listening for caption changes, we still want to update the new
779         instance's style sheet to match.
780         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
781         * rendering/RenderVTTCue.cpp:
782         (WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
783         <div> into consideration when looking for the Cue text element.
784
785 2014-07-11  Zalan Bujtas  <zalan@apple.com>
786
787         Subpixel layout: return integral results for offset*, client*, scroll* by default.
788         https://bugs.webkit.org/show_bug.cgi?id=134651
789
790         Reviewed by Simon Fraser.
791
792         Revert to returning integral values for Element.offset* client* scroll* by default.
793         Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
794
795         Since snapped dimension depends on both the original point and the width/height of the box,
796         we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
797
798         Covered by existing tests
799  
800         * dom/Element.cpp:
801         (WebCore::subpixelMetricsEnabled):
802         (WebCore::convertToNonSubpixelValueIfNeeded):
803         (WebCore::Element::offsetLeft):
804         (WebCore::Element::offsetTop):
805         (WebCore::Element::offsetWidth):
806         (WebCore::Element::offsetHeight):
807         (WebCore::Element::clientLeft):
808         (WebCore::Element::clientTop):
809         (WebCore::Element::clientWidth):
810         (WebCore::Element::clientHeight):
811         * page/Settings.in:
812
813 2014-07-11  Zalan Bujtas  <zalan@apple.com>
814
815         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
816         https://bugs.webkit.org/show_bug.cgi?id=134824
817         <rdar://problem/17612729>
818
819         Reviewed by Simon Fraser.
820
821         Transparent layer clipping needs device pixel offset adjusting.
822
823         Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html
824
825         * rendering/RenderLayer.cpp:
826         (WebCore::RenderLayer::beginTransparencyLayers):
827         (WebCore::RenderLayer::paintLayer):
828         (WebCore::RenderLayer::paintLayerContents):
829         (WebCore::RenderLayer::paintBackgroundForFragments):
830         (WebCore::RenderLayer::paintForegroundForFragments):
831         * rendering/RenderLayer.h:
832
833 2014-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
834
835         Unreviewed. Remove unused file.
836
837         * html/shadow/MediaControlsGtk.h: Removed.
838
839 2014-07-11  Manuel Rego Casasnovas  <rego@igalia.com>
840
841         [CSS Grid Layout] Update grid-auto-flow to the new syntax
842         https://bugs.webkit.org/show_bug.cgi?id=134057
843
844         Reviewed by Sergio Villar Senin.
845
846         In last versions of the spec grid-auto-flow syntax has changed. New
847         syntax is:
848         [ row | column ] && dense? | stack && [ row | column ]?
849
850         Implemented parsing for new syntax and added/modified test cases in
851         current layout tests.
852
853         For the moment, the implementation keeps working in the same way, but
854         using "stack" value for grid-auto-flow property instead of "none". This
855         should be fixed in a follow-up patch once "stack" is properly
856         implemented.
857
858         Also "dense" needs to be reviewed. Right now auto-placement algorithm is
859         always "dense" and never "sparse".
860
861         No new tests, update current tests to add new cases.
862
863         * css/CSSComputedStyleDeclaration.cpp:
864         (WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
865         * css/CSSParser.cpp:
866         (WebCore::isValidKeywordPropertyAndValue): Removed grid-auto-flow as it
867         is not a keyword anymore.
868         (WebCore::isKeywordPropertyID): Ditto.
869         (WebCore::CSSParser::parseValue): Add specific method for parsing
870         grid-auto-flow.
871         (WebCore::CSSParser::parseGridShorthand): Adapt parsing for
872         grid-auto-flow property inside the shorthand.
873         (WebCore::isValidGridAutoFlowId): Helper method to check if the CSSValue
874         id is a valid keyword for grid-auto-flow property.
875         (WebCore::CSSParser::parseGridAutoFlow): Implement new parsing for
876         grid-auto-flow.
877         * css/CSSParser.h: Method header for grid-auto-flow parsing.
878         * css/CSSPrimitiveValueMappings.h:
879         (WebCore::CSSPrimitiveValue::operator GridAutoFlow): Deleted.
880         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
881         * css/CSSValueKeywords.in: Add new keywords required by grid-auto-flow:
882         "dense" and "stack".
883         * css/DeprecatedStyleBuilder.cpp:
884         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Remove
885         default handler as grid-auto-flow is not a keyword now.
886         * css/StyleResolver.cpp:
887         (WebCore::StyleResolver::applyProperty): Implement particular handler
888         for new grid-auto-flow syntax.
889         * rendering/RenderGrid.cpp:
890         (WebCore::RenderGrid::placeItemsOnGrid): Keep old "none" behavior as
891         "stack" behavior for the moment.
892         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Use the new
893         helper methods in RenderStyle.
894         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Ditto.
895         * rendering/style/GridResolvedPosition.cpp:
896         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): Again
897         keep old "none" behavior for "stack".
898         * rendering/style/RenderStyle.h: Add new helper methods to know the
899         direction and algorithm of grid-auto-flow property.
900         * rendering/style/RenderStyleConstants.h: Redefine GridAutoFlow enum
901         using flags for algorithm and direction.
902         * rendering/style/StyleGridData.h: Change m_gridAutoFlow type to
903         unsigned.
904
905 2014-07-10  Myles C. Maxfield  <mmaxfield@apple.com>
906
907         [iOS] Pasting rich content does not perform a two-step paste
908         https://bugs.webkit.org/show_bug.cgi?id=134795
909
910         Reviewed by Benjamin Poulain.
911
912         UIKit requires writing something (anything!) to a particular pasteboard
913         during copy in order to flag the content as rich. When a paste occurs,
914         UIKit will read this flag and perform a two-step paste.
915
916         Test: platform/ios-sim/editing/pasteboard/two-step-paste.html
917
918         * platform/ios/PlatformPasteboardIOS.mm:
919         (WebCore::PlatformPasteboard::write):
920
921 2014-07-09  Andy Estes  <aestes@apple.com>
922
923         [iOS] Some QuickLook documents are not displayed as previews
924         https://bugs.webkit.org/show_bug.cgi?id=134788
925         <rdar://problem/17278194>
926
927         Reviewed by Pratik Solanki.
928
929         ResourceRequest::isMainResourceRequest() is not reliable (e.g. ResourceRequests reconstituted from an
930         NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
931         isMainResourceRequest() to check if a QuickLookHandle should be created when the Network Process is in use,
932         just check if the current ResourceLoader is the same as the DocumentLoader's ResourceLoader.
933
934         No new tests. QuickLook is not testable from WebKit.
935
936         * platform/network/ios/QuickLook.mm:
937         (WebCore::QuickLookHandle::create):
938
939 2014-07-10  Andreas Kling  <akling@apple.com>
940
941         [iOS WebKit2] Don't uninstall the memory pressure listener after first signal.
942         <https://webkit.org/b/134814>
943
944         The call to uninstall() should not be made on iOS since iOS doesn't use the
945         hold-off mechanism in MemoryPressureHandler.
946
947         Reviewed by Benjamin Poulain.
948
949         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
950         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
951
952 2014-07-10  Jer Noble  <jer.noble@apple.com>
953
954         [MSE] Overlapping appended ranges must cause the decoder to flush and re-enqueue.
955         https://bugs.webkit.org/show_bug.cgi?id=134805
956
957         Reviewed by Eric Carlson.
958
959         When appending a range of media data which overlaps with an existing range, SourceBuffer
960         must cause the decoder to flush and re-enqueue samples. Those samples removed by appending
961         the overlapping range may have already been enqueued for display, and unless the decode
962         queue is flushed, corruption or decode errors may occur as the new samples are enqueued for
963         display.
964
965         Add a boolean flag onto TrackBuffer to indicate whether the decoder needs to be flushed and
966         re-enqueued the next time an append operation completes. Set this flag whenever samples are
967         removed due to overlapping or an explicit call to removeCodedFrames(). Move the contents of
968         sourceBufferPrivateSeekToTime() (which previously did flushing and re-enqueueing) into a new
969         function, reenqueueMediaForTime(), which can be called from sourceBufferPrivateAppendComplete().
970
971         Drive-by fix: findSyncSampleAfterDecodeIterator() would return the passed in iterator if that
972         sample is a sync-sample. Fix this to correctly return the next sync sample.
973
974         Drive-by fix: Use a SampleMap, rather than a DecodeOrderSampleMap, to track erased samples
975         so that the erasedSamples are correctly accounted for in both presentation and decode orders.
976
977         * Modules/mediasource/SampleMap.cpp:
978         (WebCore::SampleMap::empty): Add convenience method.
979         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Drive-by fix.
980         * Modules/mediasource/SampleMap.h:
981         (WebCore::SampleMap::decodeOrder): Added const accessor.
982         (WebCore::SampleMap::presentationOrder): Ditto.
983         (WebCore::SampleMap::addRange): Added.
984         * Modules/mediasource/SourceBuffer.cpp:
985         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Add needsReenqueeing flag.
986         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Move contents into reenqueueMediaForTime().
987         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueMediaForTime() if necessary.
988         (WebCore::SourceBuffer::removeCodedFrames): Set needsReenqueing.
989         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
990         (WebCore::SourceBuffer::provideMediaData): Drive-by fix.
991         (WebCore::SourceBuffer::reenqueueMediaForTime): Moved from sourceBufferPrivateSeekToTime().
992         * Modules/mediasource/SourceBuffer.h:
993
994 2014-07-10  Pratik Solanki  <psolanki@apple.com>
995
996         ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
997         https://bugs.webkit.org/show_bug.cgi?id=134812
998         <rdar://problem/17628434>
999
1000         Reviewed by Joseph Pecoraro.
1001
1002         Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
1003         false. This field indicates when it is okay to use purgeable memory and is set to true once
1004         the resource is finished loading. By setting it to true in the constructor we were creating
1005         purgeable memory while the resource was still being loaded and this triggered the assert.
1006
1007         No new tests. Should be covered by existing tests.
1008
1009         * platform/cf/SharedBufferCF.cpp:
1010         (WebCore::SharedBuffer::SharedBuffer):
1011
1012 2014-07-10  Andreas Kling  <akling@apple.com>
1013
1014         [iOS WebKit2] Some memory pressure relief tweaks.
1015         <https://webkit.org/b/134811>
1016
1017         Split memory pressure relief into critical and non-critical sections.
1018         Non-critical relief is for clearing out things that are really not
1019         essential, e.g unused font data, text measurement caches, etc.
1020
1021         On iOS, only flip the "WebKit is under memory pressure" flag when we
1022         are under *critical* memroy pressure, rather than doing it early on
1023         and gimping ourselves because other processes are too big.
1024
1025         Also added logging for when we transition in/out of system pressure.
1026
1027         Reviewed by Geoffrey Garen.
1028
1029         * platform/MemoryPressureHandler.cpp:
1030         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
1031         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1032         (WebCore::MemoryPressureHandler::releaseMemory):
1033         * platform/MemoryPressureHandler.h:
1034         (WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):
1035         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1036         (WebCore::MemoryPressureHandler::install):
1037
1038 2014-07-10  Beth Dakin  <bdakin@apple.com>
1039
1040         Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
1041         on a secondary thread
1042         https://bugs.webkit.org/show_bug.cgi?id=134778
1043         -and corresponding-
1044         <rdar://problem/17595333>
1045
1046         Reviewed by Tim Horton.
1047
1048         This is a requirement for some types of performance tests. The patch adds a new 
1049         virtual function to ScrollableArea that forces subclasses to indicate the value of 
1050         the Setting. This is required because Scrollbar and ScrollableArea can’t get to 
1051         Settings on their own.
1052
1053         * page/FrameView.cpp:
1054         (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
1055         * page/FrameView.h:
1056         * page/Settings.in:
1057         * platform/ScrollableArea.h:
1058         * platform/Scrollbar.cpp:
1059         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
1060         * platform/win/PopupMenuWin.h:
1061         * rendering/RenderLayer.cpp:
1062         (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
1063         * rendering/RenderLayer.h:
1064         * rendering/RenderListBox.cpp:
1065         (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
1066         * rendering/RenderListBox.h:
1067
1068 2014-07-10  Brady Eidson  <beidson@apple.com>
1069
1070         Phone number highlights should always be visible if the mouse hovers over.
1071         <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
1072
1073         Reviewed by Tim Horton.
1074
1075         * WebCore.exp.in:
1076
1077 2014-07-10  Timothy Horton  <timothy_horton@apple.com>
1078
1079         Assertions or crashes under _takeViewSnapshot when restoring windows
1080         https://bugs.webkit.org/show_bug.cgi?id=134792
1081
1082         Reviewed by Simon Fraser.
1083
1084         * platform/graphics/cocoa/IOSurface.mm:
1085         (IOSurface::createFromImage):
1086
1087 2014-07-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1088
1089         [XHR] overrideMimeType() should be able to change encoding in HEADERS RECEIVED state
1090         https://bugs.webkit.org/show_bug.cgi?id=128968
1091
1092         Reviewed by Alexey Proskuryakov.
1093
1094         Moved response encoding computation from didReceiveResponse to didReceiveData, just before the decoder is instantiated.
1095         This allows overrideMimeType to be changed within readystatechange event callback and have an impact on selected encoding.
1096
1097         Test: http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html
1098
1099         * xml/XMLHttpRequest.cpp:
1100         (WebCore::XMLHttpRequest::didReceiveResponse): Removed m_responseEncoding computation from response and mimeTypeOverride.
1101         (WebCore::XMLHttpRequest::didReceiveData): Added m_responseEncoding computation from response and mimeTypeOverride.
1102
1103 2014-07-09  Brady Eidson  <beidson@apple.com>
1104
1105         Fire connected/disconnected events for Gamepads.
1106         https://bugs.webkit.org/show_bug.cgi?id=134386
1107
1108         Reviewed by Dean Jackson.
1109
1110         No new tests (No effect in a currently tested config)
1111
1112         * Modules/gamepad/GamepadManager.cpp:
1113         (WebCore::navigatorGamepadFromDOMWindow): Handling converting a possibly-null Navigator into
1114             a possibly null NavigatorGamepad.
1115         (WebCore::GamepadManager::platformGamepadConnected): Notify blind Navigator/DOMWindows of all
1116             previously attached Gamepads, then notify everybody of this new gamepad.
1117         (WebCore::GamepadManager::platformGamepadDisconnected): Handle dispatching the disconnected
1118             event to all registered DOMWindows.
1119         (WebCore::GamepadManager::platformGamepadInputActivity): Notify blind Navigator/DOMWindows of all
1120             attached Gamepads.
1121         (WebCore::GamepadManager::makeGamepadVisible): Handles notifying setting up a new gamepads
1122             with all NavigatorGamepads as well as dispatching the connected even to DOMWindows.
1123         (WebCore::GamepadManager::registerDOMWindow):
1124         (WebCore::GamepadManager::unregisterDOMWindow):
1125         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Deleted.
1126         * Modules/gamepad/GamepadManager.h:
1127
1128         * Modules/gamepad/NavigatorGamepad.cpp:
1129         (WebCore::NavigatorGamepad::gamepadAtIndex):
1130         * Modules/gamepad/NavigatorGamepad.h:
1131
1132 2014-07-09  Benjamin Poulain  <bpoulain@apple.com>
1133
1134         [iOS][WK2] Disable text quantization while actively changing the page's scale factor
1135         https://bugs.webkit.org/show_bug.cgi?id=134781
1136
1137         Reviewed by Tim Horton and Myles C. Maxfield.
1138
1139         Query the chrome client to setup quantization on each layers.
1140
1141         * page/ChromeClient.h:
1142         (WebCore::ChromeClient::hasStablePageScaleFactor):
1143         * platform/graphics/mac/FontMac.mm:
1144         (WebCore::Font::drawGlyphs):
1145         * rendering/RenderLayer.cpp:
1146         (WebCore::RenderLayer::setupFontSubpixelQuantization):
1147
1148 2014-07-09  peavo@outlook.com  <peavo@outlook.com>
1149
1150         [Curl] Cache entry invalidated too early.
1151         https://bugs.webkit.org/show_bug.cgi?id=134681
1152
1153         Reviewed by Alex Christensen.
1154
1155         When a cache entry has expired, it is invalidated when a request for the corresponding url is started.
1156         This is too early, since the resource is possibly not modified (even though it has expired),
1157         and the server might respond with a 304 (not modified) response.
1158         When we then receive a 304 response, the cache entry is deleted, and we have no cached response/data to provide.
1159         This can be solved by not invalidating the entry when a request for that url is started,
1160         but instead invalidate when a 200 OK response is received (which means the resource has been modified).
1161
1162         * platform/network/curl/CurlCacheManager.cpp:
1163         (WebCore::CurlCacheManager::isCached): Avoid invalidating cache entry when it has expired, wait until we know the server response.
1164         * platform/network/curl/CurlCacheManager.h: Added const modifier.
1165
1166 2014-07-09  Myles C. Maxfield  <mmaxfield@apple.com>
1167
1168         Revert r170413 and r170390
1169         https://bugs.webkit.org/show_bug.cgi?id=134741
1170
1171         Reviewed by Benjamin Poulain.
1172
1173         These patches caused a variety of failures. I'm going to break them up into
1174         smaller chunks and commit them separately at some point in the future.
1175
1176         Requesting a review from Ben Poulain because there were some conflicts with
1177         r170561 in InlineTextBox.cpp and InlineTextBox.h.
1178
1179         * WebCore.exp.in:
1180         * platform/graphics/Font.cpp:
1181         (WebCore::Font::drawText):
1182         (WebCore::Font::drawEmphasisMarks):
1183         (WebCore::Font::adjustSelectionRectForText):
1184         (WebCore::computeUnderlineType):
1185         * platform/graphics/Font.h:
1186         * platform/graphics/FontFastPath.cpp:
1187         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1188         (WebCore::Font::drawSimpleText):
1189         (WebCore::Font::drawEmphasisMarksForSimpleText):
1190         (WebCore::Font::drawGlyphBuffer):
1191         (WebCore::Font::drawEmphasisMarks):
1192         (WebCore::Font::adjustSelectionRectForSimpleText):
1193         * platform/graphics/GlyphBuffer.h:
1194         (WebCore::GlyphBuffer::size):
1195         (WebCore::GlyphBuffer::glyphs):
1196         (WebCore::GlyphBuffer::advances):
1197         (WebCore::GlyphBuffer::fontDataAt):
1198         (WebCore::GlyphBuffer::advanceAt):
1199         (WebCore::GlyphBuffer::offsetAt):
1200         (WebCore::GlyphBuffer::reverse):
1201         (WebCore::GlyphBuffer::offsetInString):
1202         (WebCore::GlyphBuffer::swap):
1203         * platform/graphics/GraphicsContext.cpp:
1204         * platform/graphics/Latin1TextIterator.h:
1205         (WebCore::Latin1TextIterator::Latin1TextIterator):
1206         (WebCore::Latin1TextIterator::currentCharacter):
1207         * platform/graphics/SimpleFontData.h:
1208         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
1209         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
1210         * platform/graphics/SurrogatePairAwareTextIterator.h:
1211         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
1212         * platform/graphics/TextRun.h:
1213         (WebCore::TextRun::length):
1214         (WebCore::TextRun::charactersLength):
1215         * platform/graphics/WidthIterator.cpp:
1216         (WebCore::WidthIterator::glyphDataForCharacter):
1217         (WebCore::applyFontTransforms):
1218         (WebCore::WidthIterator::advanceInternal):
1219         (WebCore::WidthIterator::advance):
1220         (WebCore::WidthIterator::advanceOneCharacter):
1221         * platform/graphics/WidthIterator.h:
1222         * platform/graphics/cairo/FontCairo.cpp:
1223         (WebCore::Font::drawGlyphs):
1224         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
1225         (WebCore::Font::drawComplexText):
1226         (WebCore::Font::drawEmphasisMarksForComplexText):
1227         (WebCore::Font::adjustSelectionRectForComplexText):
1228         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1229         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
1230         * platform/graphics/mac/FontComplexTextMac.cpp:
1231         (WebCore::Font::adjustSelectionRectForComplexText):
1232         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1233         (WebCore::Font::drawComplexText):
1234         (WebCore::Font::drawEmphasisMarksForComplexText):
1235         * platform/graphics/mac/FontMac.mm:
1236         (WebCore::Font::drawGlyphs):
1237         * platform/graphics/win/FontCGWin.cpp:
1238         (WebCore::Font::drawGlyphs):
1239         * platform/graphics/win/FontWin.cpp:
1240         (WebCore::Font::adjustSelectionRectForComplexText):
1241         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1242         (WebCore::Font::drawComplexText):
1243         (WebCore::Font::drawEmphasisMarksForComplexText):
1244         * platform/graphics/wince/FontWinCE.cpp:
1245         (WebCore::Font::drawGlyphs):
1246         (WebCore::Font::drawComplexText):
1247         (WebCore::Font::drawEmphasisMarksForComplexText):
1248         (WebCore::Font::selectionRectForComplexText):
1249         * rendering/InlineTextBox.cpp:
1250         (WebCore::InlineTextBox::isSelected):
1251         (WebCore::InlineTextBox::selectionState):
1252         (WebCore::InlineTextBox::localSelectionRect):
1253         (WebCore::InlineTextBox::paint):
1254         (WebCore::InlineTextBox::selectionStartEnd):
1255         (WebCore::InlineTextBox::paintSelection):
1256         (WebCore::InlineTextBox::paintCompositionBackground):
1257         (WebCore::InlineTextBox::paintDocumentMarker):
1258         (WebCore::InlineTextBox::paintTextMatchMarker):
1259         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1260         (WebCore::InlineTextBox::paintCompositionUnderline):
1261         (WebCore::InlineTextBox::positionForOffset):
1262         (WebCore::InlineTextBox::constructTextRun):
1263         * rendering/InlineTextBox.h:
1264         (WebCore::InlineTextBox::truncation):
1265         * rendering/RenderCombineText.cpp:
1266         (WebCore::RenderCombineText::getStringToRender):
1267         * rendering/RenderCombineText.h:
1268         * rendering/RenderTextLineBoxes.cpp:
1269         (WebCore::ellipsisRectForBox):
1270         * rendering/svg/SVGInlineFlowBox.cpp:
1271         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1272         * rendering/svg/SVGInlineTextBox.cpp:
1273         (WebCore::SVGInlineTextBox::positionForOffset):
1274         (WebCore::SVGInlineTextBox::localSelectionRect):
1275         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1276         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
1277         (WebCore::SVGInlineTextBox::paintText):
1278         * rendering/svg/SVGInlineTextBox.h:
1279         * rendering/svg/SVGTextMetricsBuilder.cpp:
1280         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
1281         (WebCore::SVGTextMetricsBuilder::advance):
1282         * rendering/svg/SVGTextQuery.cpp:
1283         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
1284         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
1285         (WebCore::SVGTextQuery::subStringLengthCallback):
1286         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
1287         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
1288         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
1289         (WebCore::SVGTextQuery::extentOfCharacterCallback):
1290         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
1291         * rendering/svg/SVGTextQuery.h:
1292         * rendering/svg/SVGTextRunRenderingContext.cpp:
1293         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
1294         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1295         * rendering/svg/SVGTextRunRenderingContext.h:
1296         * svg/SVGFontData.cpp:
1297         (WebCore::SVGFontData::applySVGGlyphSelection):
1298         * svg/SVGFontData.h:
1299
1300 2014-07-08  Jeffrey Pfau  <jpfau@apple.com>
1301
1302         Fix flaky loading tests
1303         https://bugs.webkit.org/show_bug.cgi?id=133696
1304
1305         Reviewed by Ryosuke Niwa.
1306
1307         In some cases, the Frame may be destroyed while the loader is
1308         initializing. Make sure we don't delete it too early.
1309
1310         * loader/FrameLoader.cpp:
1311         (WebCore::FrameLoader::init):
1312
1313 2014-07-09  Simon Fraser  <simon.fraser@apple.com>
1314
1315         Make IndirectCompositingReason an enum class
1316         https://bugs.webkit.org/show_bug.cgi?id=134789
1317
1318         Reviewed by Tim Horton.
1319
1320         Make RenderLayer::IndirectCompositingReason an enum class, and change some code
1321         in RenderLayerCompositor::reasonsForCompositing() to use a switch.
1322
1323         * rendering/RenderLayer.cpp:
1324         (WebCore::RenderLayer::RenderLayer):
1325         * rendering/RenderLayer.h:
1326         * rendering/RenderLayerCompositor.cpp:
1327         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1328         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
1329         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1330         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
1331
1332 2014-07-09  Pratik Solanki  <psolanki@apple.com>
1333
1334         Make SharedBuffer::append(SharedBuffer*) be smarter about CFData and data arrays
1335         https://bugs.webkit.org/show_bug.cgi?id=134731
1336
1337         Reviewed by Antti Koivisto.
1338
1339         If the target SharedBuffer has a CFDataRef or a data array then we can simply retain that
1340         CFDataRef or data array elements in the SharedBuffer being appended to. This avoids
1341         unnecessary copying.
1342
1343         No new tests because no functional changes.
1344
1345         * platform/SharedBuffer.cpp:
1346         (WebCore::SharedBuffer::append):
1347         (WebCore::SharedBuffer::maybeAppendPlatformData):
1348         * platform/SharedBuffer.h:
1349         * platform/cf/SharedBufferCF.cpp:
1350         (WebCore::SharedBuffer::maybeAppendPlatformData):
1351         (WebCore::SharedBuffer::maybeAppendDataArray):
1352         * platform/soup/SharedBufferSoup.cpp:
1353         (WebCore::SharedBuffer::maybeAppendPlatformData):
1354
1355 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
1356
1357         [Win] Remove uses of 'bash' in build system
1358         https://bugs.webkit.org/show_bug.cgi?id=134782
1359         <rdar://problem/17615533>
1360
1361         Reviewed by Dean Jackson.
1362
1363         Remove uses of 'bash' by replacing Windows-specific bash scripts
1364         with Perl equivalents.
1365
1366         * WebCore.vcxproj/WebCoreGenerated.make:
1367         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
1368         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters:
1369         * WebCore.vcxproj/WebCorePreBuild.cmd:
1370         * WebCore.vcxproj/build-generated-files.pl: Copied from Source/WebCore/WebCore.vcxproj/build-generated-files.sh.
1371         * WebCore.vcxproj/build-generated-files.sh: Removed.
1372         * WebCore.vcxproj/migrate-scripts.pl: Copied from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh.
1373         * WebCore.vcxproj/migrate-scripts.sh: Removed.
1374
1375 2014-07-09  Anders Carlsson  <andersca@apple.com>
1376
1377         Support transparent WKWebViews
1378         https://bugs.webkit.org/show_bug.cgi?id=134779
1379         <rdar://problem/17351058>
1380
1381         Reviewed by Tim Horton.
1382
1383         Schedule rebuilding the compositing layers if a FrameView's transparency changes.
1384
1385         * page/FrameView.cpp:
1386         (WebCore::FrameView::setTransparent):
1387
1388 2014-07-09  Javier Fernandez  <jfernandez@igalia.com>
1389         CSS canvas color parsing accepts invalid color identifiers
1390         https://bugs.webkit.org/show_bug.cgi?id=134661
1391
1392         Reviewed by Benjamin Poulain.
1393
1394         Current implementation of the CSSParser::parseSystemColor assumes
1395         that if a valid cssValueKeywordID is got then it has to be a valid
1396         color. Such assumption is wrong and lead to many bugs and layout
1397         test failures.
1398
1399         The parseSystemFunction determines now whether the parsed color is
1400         valid or not.
1401
1402         Addtionally, a new method has been added to share the logic of
1403         determining whether a CSSValueID is a valid primitive values for
1404         colors or not. Generally, we should avoid passing invalid color
1405         identifiers to the theming API.
1406
1407         No new tests, but added additional cases to the
1408         canvas-color-serialization.html, test-setting-canvas-color and
1409         rgb-color-parse test.
1410
1411         * css/CSSParser.cpp:
1412         (WebCore::validPrimitiveValueColor): Added.
1413         (WebCore::parseColorValue):
1414         (WebCore::CSSParser::parseSystemColor):
1415
1416 2014-06-28  Jer Noble  <jer.noble@apple.com>
1417
1418         [MSE] http/tests/media/media-source/mediasource-remove.html is failing
1419         https://bugs.webkit.org/show_bug.cgi?id=134768
1420
1421         Reviewed by Eric Carlson.
1422
1423         Fix multiple bugs causing mediasource-remove.html to fail:
1424
1425         Separate out setDuration() into setDurationInternal() so that steps which require
1426         us to run the "duration change algorithm" don't bail out if the SoureBuffer is
1427         inside updating().
1428
1429         * Modules/mediasource/MediaSource.cpp:
1430         (WebCore::MediaSource::setDuration):
1431         (WebCore::MediaSource::setDurationInternal):
1432         * Modules/mediasource/MediaSource.h:
1433         * Modules/mediasource/SourceBuffer.cpp:
1434         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1435         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1436
1437         When removing coded frames, do so starting from the first sample in the range in
1438         decode order, so that frames dependant on removed frames are themselves removed. Add
1439         a convenience method in SampleMap findSampleWithPresentationTime(), and rename
1440         findSampleAfterPresentationTime() to findSampleOnOrAfterPresentationTime() to correctly
1441         reflect what the method does, and simplify its implementation by searching the map's keys
1442         directly.
1443
1444         * Modules/mediasource/SampleMap.cpp:
1445         (WebCore::PresentationOrderSampleMap::findSampleWithPresentationTime):
1446         (WebCore::PresentationOrderSampleMap::findSampleOnOrAfterPresentationTime):
1447         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime):
1448         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Deleted.
1449         * Modules/mediasource/SampleMap.h:
1450         * Modules/mediasource/SourceBuffer.cpp:
1451         (WebCore::decodeTimeComparator):
1452         (WebCore::SourceBuffer::removeCodedFrames):
1453
1454         Throw the correct exception (INVALID_STATE_ERR) from SourceBuffer::remove().
1455
1456         * Modules/mediasource/SourceBuffer.cpp:
1457         (WebCore::SourceBuffer::remove):
1458
1459 2014-07-09  Pratik Solanki  <psolanki@apple.com>
1460
1461         Add SharedBuffer::wrapCFDataArray() and use it
1462         https://bugs.webkit.org/show_bug.cgi?id=134733
1463
1464         Reviewed by Antti Koivisto.
1465
1466         No new tests. Should be covered by existing tests.
1467
1468         * platform/SharedBuffer.h:
1469         * platform/cf/SharedBufferCF.cpp:
1470         (WebCore::SharedBuffer::wrapCFDataArray):
1471         (WebCore::SharedBuffer::SharedBuffer):
1472         * platform/network/ResourceHandle.h:
1473         * platform/network/cf/ResourceHandleCFNet.cpp:
1474         (WebCore::ResourceHandle::handleDataArray): Deleted.
1475         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1476         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1477         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1478         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
1479         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1480         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
1481         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1482         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]):
1483
1484 2014-07-09  Pratik Solanki  <psolanki@apple.com>
1485
1486         Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
1487         https://bugs.webkit.org/show_bug.cgi?id=134732
1488
1489         Reviewed by Darin Adler.
1490
1491         No new tests because no functional changes.
1492
1493         * WebCore.exp.in:
1494
1495 2014-07-09  Tim Horton  <timothy_horton@apple.com>
1496
1497         Fix the !USE(IOSURFACE) build.
1498
1499         * WebCore.exp.in:
1500
1501 2014-07-09  Tim Horton  <timothy_horton@apple.com>
1502
1503         Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
1504         https://bugs.webkit.org/show_bug.cgi?id=134773
1505
1506         Reviewed by Anders Carlsson.
1507
1508         * WebCore.exp.in:
1509         * platform/graphics/cocoa/IOSurface.h:
1510         * platform/graphics/cocoa/IOSurface.mm:
1511         (IOSurface::createFromImage):
1512         Move make-an-IOSurface-from-a-CGImageRef into WebCore::IOSurface.
1513
1514 2014-07-09  Enrica Casucci  <enrica@apple.com>
1515
1516         Implement Editor::fontAttributesForSelectionStart() or iOS.
1517         https://bugs.webkit.org/show_bug.cgi?id=134771
1518         <rdar://problem/16167838>
1519
1520         Reviewed by Ryosuke Niwa.
1521
1522         Implement for iOS the equivalent function we have for OS X.
1523
1524         * editing/ios/EditorIOS.mm:
1525         (WebCore::Editor::fontAttributesForSelectionStart):
1526
1527 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
1528
1529         [Win] Remove use of 'grep' in build steps
1530         https://bugs.webkit.org/show_bug.cgi?id=134770
1531         <rdar://problem/17608783>
1532
1533         Reviewed by Tim Horton.
1534
1535         Replace uses of the grep command in Windows builds with the equivalent
1536         Perl program.
1537
1538         * WebCore.vcxproj/WebCoreGenerated.make:
1539         * WebCore.vcxproj/WebCorePreBuild.cmd:
1540         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1541         (WebCore::WebCoreAVCFResourceLoader::notifyFinished):
1542
1543 2014-07-09  Alex Christensen  <achristensen@webkit.org>
1544
1545         Added css jit profiler, disabled by default.
1546         https://bugs.webkit.org/show_bug.cgi?id=134695
1547
1548         Reviewed by Benjamin Poulain.
1549
1550         * css/ElementRuleCollector.cpp:
1551         (WebCore::ElementRuleCollector::ruleMatches):
1552         Tell the RuleData when its compiled selector is used.
1553         * css/RuleSet.cpp:
1554         (WebCore::RuleData::RuleData):
1555         Initialize the compiled selector use count to 0.
1556         * css/RuleSet.h:
1557         (WebCore::RuleData::~RuleData):
1558         (WebCore::RuleData::compiledSelectorUsed):
1559         Count and log the number of times a compiled selector is used.
1560         * cssjit/SelectorCompiler.h:
1561         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
1562         * dom/SelectorQuery.cpp:
1563         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1564         (WebCore::SelectorDataList::execute):
1565         Tell the SelectorData when its compiled selector is used.
1566         * dom/SelectorQuery.h:
1567         (WebCore::SelectorDataList::SelectorData::SelectorData):
1568         (WebCore::SelectorDataList::SelectorData::~SelectorData):
1569         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
1570         Count and log the number of times a compiled selector is used.
1571
1572 2014-07-09  Eric Carlson  <eric.carlson@apple.com>
1573
1574         [iOS] caption size is sometimes incorrect in fullscreen
1575         https://bugs.webkit.org/show_bug.cgi?id=134740
1576
1577         Reviewed by Jer Noble.
1578
1579         Captions on iOS are displayed in fullscreen with a TextTrackRepresentation object. Because
1580         the fullscreen video presentation is controlled by code in the UI process running on the
1581         UI thread, WebCore is notified of changes to fullscreen state asynchronously. This resulted
1582         in the TextTrackRepresentation object being created and/or destroyed too late some of the 
1583         time, which caused us to sometimes display captions incorrectly. Fix this by setting up and
1584         tearing down the TextTrackRepresentation object when WebCore's 'webkitfullscreenchange'
1585         event fires.
1586
1587         * Modules/mediacontrols/MediaControlsHost.cpp:
1588         (WebCore::MediaControlsHost::enteredFullscreen): Notify text track container.
1589         (WebCore::MediaControlsHost::exitedFullscreen): Ditto.
1590         * Modules/mediacontrols/MediaControlsHost.h:
1591         * Modules/mediacontrols/MediaControlsHost.idl:
1592
1593         * Modules/mediacontrols/mediaControlsApple.js:
1594         (Controller.prototype.handleFullscreenChange): Notify host of fullscreen change.
1595
1596         * html/HTMLMediaElement.cpp:
1597         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): Only return true when in
1598             fullscreen.
1599         (WebCore::HTMLMediaElement::setVideoFullscreenLayer): Call updateTextTrackDisplay.
1600
1601         * html/shadow/MediaControlElements.cpp:
1602         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
1603             m_updateTextTrackRepresentationStyle to false.
1604         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Move logic for creating
1605             TextTrackRepresentation to updateTextTrackRepresentation.
1606         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize): New, split out of updateTimerFired.
1607         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Move code to force immediate
1608             font size change to updateActiveCuesFontSize.
1609         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): New, update
1610             text track representation, creating first if necessary.
1611         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Add an early
1612             return if we don't have a text track representation.
1613         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Early
1614             return if there is nothing to be done.
1615         (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): Force a caption update
1616             if there are visible captions.
1617         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set m_updateTextTrackRepresentationStyle
1618             to true.
1619         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):  Force a 
1620             caption update if there are visible captions.
1621         * html/shadow/MediaControlElements.h:
1622
1623 2014-07-09  Jer Noble  <jer.noble@apple.com>
1624
1625         [MSE] http/tests/media/media-source/mediasource-endofstream-invaliderror.html is failing.
1626         https://bugs.webkit.org/show_bug.cgi?id=134413
1627
1628         Reviewed by Eric Carlson.
1629
1630         Update MediaSource.endOfStream() to take an optional enum instead of an optional String.
1631
1632         * Modules/mediasource/MediaSource.cpp:
1633         (WebCore::MediaSource::endOfStream):
1634         * Modules/mediasource/MediaSource.h:
1635         * Modules/mediasource/MediaSource.idl:
1636
1637 2014-07-08  Brady Eidson  <beidson@apple.com>
1638
1639         DOMWindows should register themselves with the GamepadManager when they have event listeners
1640         https://bugs.webkit.org/show_bug.cgi?id=134669
1641
1642         Reviewed by Dean Jackson.
1643
1644         No new tests (No effect in a currently tested config)
1645
1646         By having DOMWindows register with the GamepadManager when they have/don’t have gamepad event
1647         listeners, we accomplish two things:
1648         1 - It’s simple for GamepadManager to dispatch gamepad events directly to the DOMWindows interested.
1649         2 - We know when to start monitoring for gamepad connections.
1650
1651         * Modules/gamepad/GamepadManager.cpp:
1652         (WebCore::GamepadManager::GamepadManager):
1653         (WebCore::GamepadManager::registerNavigator):
1654         (WebCore::GamepadManager::unregisterNavigator):
1655         (WebCore::GamepadManager::registerDOMWindow):
1656         (WebCore::GamepadManager::unregisterDOMWindow):
1657         (WebCore::GamepadManager::maybeStartMonitoringGamepads): Start monitoring gamepads if there are any
1658           registered DOMWindows or NavigatorGamepads, and we aren’t already monitoring them.
1659         (WebCore::GamepadManager::maybeStopMonitoringGamepads): Stop monitoring gamepads if there aren’t any
1660           registered DOMWindows or NavigatorGameads, and we have been monitoring them before now.
1661         * Modules/gamepad/GamepadManager.h:
1662
1663         * dom/EventNames.h:
1664         (WebCore::EventNames::isGamepadEventType):
1665
1666         * page/DOMWindow.cpp:
1667         (WebCore::DOMWindow::DOMWindow):
1668         (WebCore::DOMWindow::~DOMWindow): If registered for gamepad events, unregister now.
1669         (WebCore::DOMWindow::incrementGamepadEventListenerCount): If this is the first gamepad event
1670           listener, register with the GamepadManager now.
1671         (WebCore::DOMWindow::decrementGamepadEventListenerCount): If this was the last gamepad event
1672           listener, unregister from the GamepadManager now.
1673         (WebCore::DOMWindow::addEventListener):
1674         (WebCore::DOMWindow::removeEventListener):
1675         * page/DOMWindow.h:
1676
1677 2014-07-08  Sun-woo Nam  <sunny.nam@samsung.com>
1678
1679         [EFL] Fix the build break when ENABLE_ENCRYPTED_MEDIA_V2 is turned on.
1680         https://bugs.webkit.org/show_bug.cgi?id=134750
1681
1682         Reviewed by Gyuyoung Kim.
1683
1684         When turning ENABLE_ENCRYPTED_MEDIA_V2 on, build break occurs.
1685         Some source files need to be included in CMakeLists.txt file for build.
1686         And wrap the included header file which is built only on mac and wince.
1687
1688         * CMakeLists.txt:
1689         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
1690
1691 2014-07-08  Eric Carlson  <eric.carlson@apple.com>
1692
1693         [iOS] user caption preferences not applied
1694         https://bugs.webkit.org/show_bug.cgi?id=134599
1695
1696         Reviewed by Sam Weinig.
1697
1698         * page/CaptionUserPreferences.cpp:
1699         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): All Pages in a PageGroup
1700         do not necessarily use the same PageUserContentController, so apply and remove caption user
1701         the style sheet directly to each page rather than to the page group.
1702
1703 2014-07-08  Commit Queue  <commit-queue@webkit.org>
1704
1705         Unreviewed, rolling out r170894.
1706         https://bugs.webkit.org/show_bug.cgi?id=134749
1707
1708         "It broke the build on mountainlion release 32bit" (Requested
1709         by mmirman on #webkit).
1710
1711         Reverted changeset:
1712
1713         "Added css jit profiler, disabled by default."
1714         https://bugs.webkit.org/show_bug.cgi?id=134695
1715         http://trac.webkit.org/changeset/170894
1716
1717 2014-07-08  Jeremy Jones  <jeremyj@apple.com>
1718
1719         WebVideoFullscreenInterfaceAVKit should lazily create m_playerController.
1720         https://bugs.webkit.org/show_bug.cgi?id=134706
1721
1722         Reviewed by Simon Fraser.
1723
1724         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1725         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
1726         Don't set the delegate if m_playerController isn't created.
1727
1728 2014-07-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1729
1730         Ensure we compute the height of replaced elements to 'auto' when appropriate.
1731         https://bugs.webkit.org/show_bug.cgi?id=134700
1732
1733         Reviewed by David Hyatt.
1734
1735         This fixes two issues:
1736
1737         1) If a replaced element has a percentage height specified then its
1738         height should compute to 'auto' when its containing block does not
1739         have a height 'specified explicitly'. We were taking this to mean when
1740         its containing block's specified height value is 'auto' - in fact it
1741         means when the containing block's computed height is auto.
1742
1743         2) Top and bottom on the containing block should only affect the
1744         height of the block if that block has absolute or fixed position.
1745
1746         This brings us into line with IE, Firefox, and Chrome.
1747
1748         This is a port of Blink patches by Rob Hogan and David Vest.
1749
1750         Tests: css2.1/20110323/height-percentage-005.htm
1751                fast/css/replaced-element-ignore-top-bottom.html
1752
1753         * rendering/RenderBoxModelObject.cpp:
1754         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
1755
1756 2014-07-08  Alex Christensen  <achristensen@webkit.org>
1757
1758         Added css jit profiler, disabled by default.
1759         https://bugs.webkit.org/show_bug.cgi?id=134695
1760
1761         Reviewed by Benjamin Poulain.
1762
1763         * css/ElementRuleCollector.cpp:
1764         (WebCore::ElementRuleCollector::ruleMatches):
1765         Tell the RuleData when its compiled selector is used.
1766         * css/RuleSet.cpp:
1767         (WebCore::RuleData::RuleData):
1768         Initialize the compiled selector use count to 0.
1769         * css/RuleSet.h:
1770         (WebCore::RuleData::~RuleData):
1771         (WebCore::RuleData::compiledSelectorUsed):
1772         Count and log the number of times a compiled selector is used.
1773         * cssjit/SelectorCompiler.h:
1774         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
1775         * dom/SelectorQuery.cpp:
1776         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1777         (WebCore::SelectorDataList::execute):
1778         Tell the SelectorData when its compiled selector is used.
1779         * dom/SelectorQuery.h:
1780         (WebCore::SelectorDataList::SelectorData::SelectorData):
1781         (WebCore::SelectorDataList::SelectorData::~SelectorData):
1782         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
1783         Count and log the number of times a compiled selector is used.
1784
1785 2014-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1786
1787         Unreviewed. Fix GObject DOM bindings API breaks test after r170700.
1788
1789         Add missing WebKitDOMXPathNSResolver.symbols that I forgot to add
1790         in r170700.
1791
1792         * bindings/gobject/WebKitDOMXPathNSResolver.symbols: Added.
1793
1794 2014-07-07  Pratik Solanki  <psolanki@apple.com>
1795
1796         Unreviewed. iOS build fix after r170871.
1797
1798         * rendering/RenderThemeIOS.mm:
1799         (WebCore::adjustInputElementButtonStyle):
1800
1801 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1802
1803         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
1804         https://bugs.webkit.org/show_bug.cgi?id=134710
1805         <rdar://problem/17545291>
1806
1807         Reviewed by Simon Fraser.
1808
1809         Transparent layer clipping needs device pixel snapping.
1810
1811         Test: fast/layers/wrong-clipping-semi-transparent-layer-on-subpixel-position.html
1812
1813         * rendering/RenderLayer.cpp:
1814         (WebCore::RenderLayer::beginTransparencyLayers):
1815
1816 2014-07-07  Benjamin Poulain  <benjamin@webkit.org>
1817
1818         LinkBuffer should not keep a reference to the MacroAssembler
1819         https://bugs.webkit.org/show_bug.cgi?id=134668
1820
1821         Reviewed by Geoffrey Garen.
1822
1823         * cssjit/SelectorCompiler.cpp:
1824         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1825
1826 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1827
1828         Subpixel rendering: Inline box decoration rounds to integral.
1829         https://bugs.webkit.org/show_bug.cgi?id=134523
1830         <rdar://problem/17530298>
1831
1832         Reviewed by Darin Adler.
1833
1834         This patch removes 2 integral roundings from InlineFlowBox:
1835         1. Border and padding sizes are implicitly integral truncated by the 'int' return type
1836            of borderLogicalLeft/Right()/paddingLogicalLeft/Right(). It results in losing
1837            fractional border/padding values.
1838         2. Painting rectangle is explicitly rounded which pushes border and
1839            other decoration elements to odd device pixel positions on retina displays.
1840         These values get pixel snapped right before calling in to GraphicsContext::*.
1841
1842         Test: fast/inline/hidpi-inline-text-decoration-with-subpixel-value.html
1843
1844         * rendering/InlineBox.h:
1845         (WebCore::InlineBox::frameRect):
1846         * rendering/InlineFlowBox.cpp:
1847         (WebCore::InlineFlowBox::nodeAtPoint):
1848         (WebCore::InlineFlowBox::paintBoxDecorations):
1849         (WebCore::InlineFlowBox::paintMask):
1850         (WebCore::InlineFlowBox::roundedFrameRect): Deleted.
1851         * rendering/InlineFlowBox.h:
1852         (WebCore::InlineFlowBox::borderLogicalLeft):
1853         (WebCore::InlineFlowBox::borderLogicalRight):
1854         (WebCore::InlineFlowBox::paddingLogicalLeft):
1855         (WebCore::InlineFlowBox::paddingLogicalRight):
1856
1857 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1858
1859         Pass RenderLayer reference instead of pointer to RenderLayer::paintingExtent().
1860         https://bugs.webkit.org/show_bug.cgi?id=134714
1861
1862         Reviewed by Simon Fraser.
1863
1864         No change in functionality. 
1865
1866         * rendering/RenderLayer.cpp: * -> &
1867         (WebCore::expandClipRectForRegionAndReflection):
1868         (WebCore::expandClipRectForDescendantsAndReflection):
1869         (WebCore::transparencyClipBox):
1870         (WebCore::paintingExtent):
1871         (WebCore::RenderLayer::beginTransparencyLayers):
1872         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1873         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1874         (WebCore::RenderLayer::paintingExtent): Deleted.
1875         * rendering/RenderLayer.h:
1876
1877 2014-07-07  Myles C. Maxfield  <mmaxfield@apple.com>
1878
1879         Remove misleadingly-named Font::isSVGFont()
1880         https://bugs.webkit.org/show_bug.cgi?id=134697
1881
1882         Reviewed by Dean Jackson.
1883
1884         Being a SVG font is a property of the FontData object, not
1885         the Font object. Providing an isSVGFont() function on the
1886         Font class will likely lead to incorrect code and non-obvious
1887         bugs.
1888
1889         No new tests because there is no behavior change.
1890
1891         * platform/graphics/Font.h:
1892         (WebCore::Font::isSVGFont): Deleted.
1893         * platform/graphics/mac/FontMac.mm:
1894         (WebCore::Font::primaryFontDataIsSystemFont):
1895         * rendering/InlineTextBox.cpp:
1896         (WebCore::InlineTextBox::constructTextRun):
1897         * rendering/RenderBlock.cpp:
1898         (WebCore::constructTextRunInternal):
1899         * rendering/SimpleLineLayout.cpp:
1900         (WebCore::SimpleLineLayout::canUseFor):
1901         * rendering/svg/SVGInlineTextBox.cpp:
1902         (WebCore::SVGInlineTextBox::constructTextRun):
1903         * rendering/svg/SVGTextMetrics.cpp:
1904         (WebCore::SVGTextMetrics::constructTextRun):
1905         (WebCore::SVGTextMetrics::SVGTextMetrics):
1906
1907 2014-07-07  Brady Eidson  <beidson@apple.com>
1908
1909         Move Gamepad index down into PlatformGamepad.
1910         https://bugs.webkit.org/show_bug.cgi?id=134670
1911
1912         Reviewed by Darin Adler.
1913
1914         PlatformGamepads always have an inherent index anyways.
1915         This will make things easier in all upcoming work.
1916
1917         * Modules/gamepad/Gamepad.cpp:
1918         (WebCore::Gamepad::Gamepad):
1919         * Modules/gamepad/Gamepad.h:
1920
1921         * Modules/gamepad/GamepadManager.cpp:
1922         (WebCore::GamepadManager::platformGamepadConnected):
1923         (WebCore::GamepadManager::platformGamepadDisconnected):
1924         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators):
1925         * Modules/gamepad/GamepadManager.h:
1926
1927         * Modules/gamepad/NavigatorGamepad.cpp:
1928         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
1929         (WebCore::NavigatorGamepad::gamepadConnected):
1930         (WebCore::NavigatorGamepad::gamepadDisconnected):
1931         * Modules/gamepad/NavigatorGamepad.h:
1932
1933         * platform/GamepadProviderClient.h:
1934
1935         * platform/PlatformGamepad.h:
1936         (WebCore::PlatformGamepad::index):
1937         (WebCore::PlatformGamepad::PlatformGamepad):
1938
1939         * platform/mac/HIDGamepad.cpp:
1940         (WebCore::HIDGamepad::HIDGamepad):
1941         * platform/mac/HIDGamepad.h:
1942
1943         * platform/mac/HIDGamepadProvider.cpp:
1944         (WebCore::HIDGamepadProvider::deviceAdded):
1945         (WebCore::HIDGamepadProvider::deviceRemoved):
1946         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
1947         * platform/mac/HIDGamepadProvider.h:
1948
1949 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
1950
1951         [UI-side compositing] Support reflections on custom layers like video
1952         https://bugs.webkit.org/show_bug.cgi?id=134701
1953
1954         Reviewed by Tim Horton.
1955
1956         Add a LayerTypeWebGLLayer layer type, and support casting to PlatformCALayerRemoteCustom.
1957
1958         * WebCore.exp.in: Export PlatformCALayerMac::layerTypeForPlatformLayer(CALayer*), and sort.
1959         * platform/graphics/ca/PlatformCALayer.h:
1960         (WebCore::PlatformCALayer::isPlatformCALayerRemoteCustom):
1961         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1962         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1963         (PlatformCALayerMac::layerTypeForPlatformLayer):
1964         (PlatformCALayerMac::PlatformCALayerMac):
1965         (PlatformCALayerMac::commonInit):
1966
1967 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
1968
1969         [UI-side compositing] Crash when starting a filter transition on a reflected layer
1970         https://bugs.webkit.org/show_bug.cgi?id=134694
1971
1972         Reviewed by Tim Horton.
1973
1974         Don't call the owner if we failed to find the animation key (which actually
1975         isn't used by PlatformCALayerMac anyway).
1976
1977         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1978         (-[WebAnimationDelegate animationDidStart:]):
1979
1980 2014-07-07  Alex Christensen  <achristensen@webkit.org>
1981
1982         [iOS WebGL] Fix crash with too many nested glsl functions.
1983         https://bugs.webkit.org/show_bug.cgi?id=134683
1984         <rdar://problem/17541529>
1985
1986         Reviewed by Geoffrey Garen.
1987
1988         This fixes the Khronos WebGL 1.0.3 test nested-functions-should-not-crash.html.
1989
1990         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1991         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1992         Add SH_LIMIT_CALL_STACK_DEPTH to extraCompileOptions.
1993
1994 2014-07-07  Ion Rosca  <rosca@adobe.com>
1995
1996         [CSS Blending]The background images set on the root element will blend on an initial white backdrop.
1997         https://bugs.webkit.org/show_bug.cgi?id=134342
1998
1999         Reviewed by Dean Jackson.
2000
2001         Tests: css3/blending/background-blend-mode-body-image.html
2002                css3/blending/background-blend-mode-body-transparent-color-and-image.html
2003                css3/blending/background-blend-mode-body-transparent-image.html
2004
2005         * rendering/RenderBox.cpp:
2006         (WebCore::RenderBox::paintFillLayers):
2007         If the background layers have blend modes, we paint the base background color first,
2008         before starting a new transparency layer. After creating the transparency layer,
2009         the base background will be skipped, and the background layers will blend on top of
2010         a transparent backdrop.
2011         (WebCore::RenderBox::paintFillLayer):
2012         * rendering/RenderBox.h:
2013         * rendering/RenderBoxModelObject.cpp:
2014         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2015         This method is able to paint only the base background color (BaseBackgroundColorOnly), 
2016         skipping the background-color and background-images. This option is available only
2017         on bottom layer of the root renderer and only if the background color is not opaque,
2018         otherwise the method will return early.
2019         Another option is to paint the root background without using the base background color
2020         (BaseBackgroundColorSkip).
2021         * rendering/RenderBoxModelObject.h:
2022         Adding the BaseBackgroundColorUsage enum.
2023
2024 2014-07-06  Yoav Weiss  <yoav@yoav.ws>
2025
2026         Turn on img@sizes compile flag
2027         https://bugs.webkit.org/show_bug.cgi?id=134634
2028
2029         Reviewed by Benjamin Poulain.
2030
2031         * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
2032
2033 2014-07-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2034
2035         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
2036         https://bugs.webkit.org/show_bug.cgi?id=134647
2037
2038         Reviewed by Andreas Kling.
2039
2040         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
2041
2042         No new tests, no behavior change.
2043
2044         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
2045         file so that functions from that file can use the Element|Node classes and other things defined in this file.
2046         * mathml/MathMLMencloseElement.h:
2047         (WebCore::toMathMLMencloseElement): Deleted.
2048         * mathml/mathtags.in:
2049
2050 2014-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>
2051
2052         CSS JIT: Ensure resolvingMode size is 1 byte
2053         https://bugs.webkit.org/show_bug.cgi?id=134662
2054
2055         Reviewed by Benjamin Poulain.
2056
2057         Since selector compiler uses MacroAssembler::branch8 for SelectorChecker::Mode,
2058         we should ensure sizeof(SelectorChecker::Mode) == 1.
2059         Old implementation works only in little endianness environments.
2060
2061         * css/ElementRuleCollector.cpp:
2062         (WebCore::ElementRuleCollector::matchedResult):
2063         (WebCore::ElementRuleCollector::matchedRuleList):
2064         (WebCore::ElementRuleCollector::collectMatchingRules):
2065         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2066         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
2067         * css/ElementRuleCollector.h:
2068         (WebCore::ElementRuleCollector::ElementRuleCollector):
2069         * css/SelectorChecker.cpp:
2070         (WebCore::SelectorChecker::match):
2071         (WebCore::SelectorChecker::matchRecursively):
2072         (WebCore::SelectorChecker::checkOne):
2073         * css/SelectorChecker.h:
2074         * css/StyleInvalidationAnalysis.cpp:
2075         (WebCore::invalidateStyleRecursively):
2076         * css/StyleResolver.cpp:
2077         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2078         * css/StyleResolver.h:
2079         (WebCore::checkRegionSelector):
2080         * cssjit/SelectorCompiler.cpp:
2081         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
2082         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
2083         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
2084         * dom/SelectorQuery.cpp:
2085         (WebCore::SelectorDataList::selectorMatches):
2086
2087 2014-07-06  Antti Koivisto  <antti@apple.com>
2088
2089         Don't throttle layer flushes when the main resource is a GIF
2090         https://bugs.webkit.org/show_bug.cgi?id=134650
2091         <rdar://problem/17490712>
2092
2093         Reviewed by Simon Fraser.
2094         
2095         Avoid throttling big image animations.
2096
2097         * page/FrameView.cpp:
2098         (WebCore::determineLayerFlushThrottleState):
2099         
2100             Disable for image documents.
2101
2102         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
2103         (WebCore::FrameView::updateLayerFlushThrottling):
2104         
2105             Refactor a bit.
2106
2107         * page/LayerFlushThrottleState.h:
2108         
2109             Rename the flag.
2110
2111 2014-07-06  Andreas Kling  <akling@apple.com>
2112
2113         Inline NodeListsNodeData helpers more aggressively.
2114         <https://webkit.org/b/134654>
2115
2116         Get rid of call overhead costs when retrieving NodeLists and
2117         HTMLCollections from Document. These functions have very few clients,
2118         so there's no real reason to keep them out of line.
2119
2120         Reviewed by Antti Koivisto.
2121
2122         * dom/NodeRareData.h:
2123         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
2124         (WebCore::NodeListsNodeData::addCacheWithName):
2125
2126 2014-07-06  Andreas Kling  <akling@apple.com>
2127
2128         Inline Node's rare data getters.
2129         <https://webkit.org/b/134652>
2130
2131         There was a fair bit of overhead when calling Node::ensureRareData()
2132         from Document's collection getters. This patch inlines the case where
2133         we've already materialized the rare data.
2134
2135         Reviewed by Antti Koivisto.
2136
2137         * dom/Node.cpp:
2138         (WebCore::Node::materializeRareData):
2139         (WebCore::Node::rareData): Deleted.
2140         (WebCore::Node::ensureRareData): Deleted.
2141         * dom/Node.h:
2142         * dom/NodeRareData.h:
2143         (WebCore::Node::rareData):
2144         (WebCore::Node::ensureRareData):
2145
2146 2014-07-05  Dean Jackson  <dino@apple.com>
2147
2148         [iOS] MediaDocument should set a viewport
2149         https://bugs.webkit.org/show_bug.cgi?id=134658
2150         <rdar://problem/17552339>
2151
2152         Reviewed by Zalan Bujtas.
2153
2154         A MediaDocument should fill the viewport, so set its
2155         initial-scale to 1 and make it non-zoomable.
2156
2157         * html/MediaDocument.cpp:
2158         (WebCore::MediaDocumentParser::createDocumentStructure): Create
2159         a <head> element and a <meta> element with a 1:1 viewport.
2160
2161 2014-07-05  Commit Queue  <commit-queue@webkit.org>
2162
2163         Unreviewed, rolling out r170825.
2164         https://bugs.webkit.org/show_bug.cgi?id=134653
2165
2166         broke debug builds (Requested by kling on #webkit).
2167
2168         Reverted changeset:
2169
2170         "Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS
2171         macro and generateTypeHelpers"
2172         https://bugs.webkit.org/show_bug.cgi?id=134647
2173         http://trac.webkit.org/changeset/170825
2174
2175 2014-07-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2176
2177         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
2178         https://bugs.webkit.org/show_bug.cgi?id=134647
2179
2180         Reviewed by Andreas Kling.
2181
2182         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
2183
2184         No new tests, no behavior change.
2185
2186         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
2187         file so that functions from that file can use the Element|Node classes and other things defined in this file.
2188         (WebCore::isMathMLElement): Deleted.
2189         * mathml/MathMLMencloseElement.h:
2190         (WebCore::toMathMLMencloseElement): Deleted.
2191         * mathml/mathtags.in:
2192
2193 2014-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2194
2195         [EFL] Support Geolocation
2196         https://bugs.webkit.org/show_bug.cgi?id=134439
2197
2198         Reviewed by Antonio Gomes.
2199
2200         Add geoclue files in order to enable geolocation for EFL port.
2201
2202         * PlatformEfl.cmake:
2203
2204 2014-07-04  Benjamin Poulain  <benjamin@webkit.org>
2205
2206         CSS JIT: compile :in-range and :out-of-range
2207         https://bugs.webkit.org/show_bug.cgi?id=134639
2208
2209         Reviewed by Andreas Kling.
2210
2211         The pseudo class :in-range and :out-of-range are trivial non-inlined selectors.
2212
2213         * css/SelectorChecker.cpp:
2214         (WebCore::SelectorChecker::checkOne):
2215         * css/SelectorCheckerTestFunctions.h:
2216         (WebCore::isInRange):
2217         (WebCore::isOutOfRange):
2218         * cssjit/SelectorCompiler.cpp:
2219         (WebCore::SelectorCompiler::addPseudoClassType):
2220
2221 2014-07-04  Andreas Kling  <akling@apple.com>
2222
2223         Fast path for jsStringWithCache() when asked for the same string repeatedly.
2224         <https://webkit.org/b/134635>
2225
2226         Reviewed by Darin Adler.
2227
2228         * WebCore.exp.in:
2229         * bindings/js/JSDOMBinding.cpp:
2230         (WebCore::jsStringWithCache): Deleted.
2231         * bindings/js/JSDOMBinding.h:
2232         (WebCore::JSValueTraits<String>::arrayJSValue):
2233         (WebCore::jsStringWithCache): Deleted.
2234         * bridge/c/c_utility.cpp:
2235         (JSC::Bindings::convertNPVariantToValue):
2236         * loader/cache/CachedResourceHandle.h:
2237
2238 2014-07-04  Zalan Bujtas  <zalan@apple.com>
2239
2240         Subpixel rendering: ebay.com rotating billboard on the main page has cut off buttons.
2241         https://bugs.webkit.org/show_bug.cgi?id=134636
2242         <rdar://problem/17529112>
2243
2244         Reviewed by Darin Adler.
2245
2246         Missing pixel snapping when clipping the transparency layer for BackgroundBleedUseTransparencyLayer.
2247         Clipping needs to take the same snapping strategy as the rest of the painting code.
2248
2249         Test: fast/borders/border-radius-on-subpixel-position-non-hidpi.html
2250
2251         * rendering/RenderBox.cpp:
2252         (WebCore::RenderBox::paintBoxDecorations):
2253
2254 2014-05-10  Andreas Kling  <akling@apple.com>
2255
2256         QualifiedName should use RefPtr<QualifiedNameImpl> internally.
2257         <https://webkit.org/b/132796>
2258
2259         We were not inlining ~QualifiedName() and it was showing up in some
2260         profiles (over 1% on dom-attr.html.)
2261
2262         This patch modernizes QualifiedName a bit by using RefPtr to store
2263         the QualifiedNameImpl instead of doing manual ref() and deref()
2264         in out-of-line functions.
2265
2266         Reviewed by Darin Adler.
2267
2268         * WebCore.exp.in:
2269         * dom/QualifiedName.cpp:
2270         (WebCore::QNameComponentsTranslator::translate):
2271         (WebCore::QualifiedName::QualifiedName):
2272         (WebCore::QualifiedName::~QualifiedName): Deleted.
2273         (WebCore::QualifiedName::deref): Deleted.
2274         * dom/QualifiedName.h:
2275         (WebCore::QualifiedName::QualifiedNameImpl::create):
2276         (WebCore::QualifiedName::QualifiedName):
2277         (WebCore::QualifiedName::isHashTableDeletedValue):
2278         (WebCore::QualifiedName::~QualifiedName):
2279         (WebCore::QualifiedName::operator=):
2280         (WebCore::QualifiedName::impl):
2281         (WebCore::QualifiedName::ref): Deleted.
2282
2283 2014-07-04  Dean Jackson  <dino@apple.com>
2284
2285         [iOS] [Media] Prevent page zoom if it started in the video element
2286         https://bugs.webkit.org/show_bug.cgi?id=134640
2287         <rdar://problem/16630794>
2288
2289         Reviewed by Sam Weinig.
2290
2291         In r170572 I attempted to prevent the page zoom from happening
2292         when the user was attempting to fullscreen the video. That fix was
2293         not complete, because it relied on the touchstart event being
2294         sent before a gesture event. It turns out this doesn't always happen,
2295         so we need to apply the same check in the gesture event - if the
2296         gesture began with two fingers on the media, don't do a page zoom.
2297         The exception is zooming out, if you've managed to make the video
2298         cover the entire screen (also, the pinch-out-of-fullscreen gesture
2299         does not get handled by WebKit).
2300
2301         * Modules/mediacontrols/mediaControlsiOS.js:
2302         (ControllerIOS.prototype.handleBaseGestureChange): Add a check to
2303         make sure our pinch didn't start in the video element.
2304
2305 2014-07-04  Hunseop Jeong  <hs85.jeong@samsung.com>
2306
2307         [CoordinatedGraphics] Use the C++11 syntax to clean-up for loops 
2308         https://bugs.webkit.org/show_bug.cgi?id=134594
2309
2310         Reviewed by Darin Adler.
2311
2312         Convert a couple of loops to range-based for 
2313
2314         No change in functionality, no new tests.
2315
2316         * platform/graphics/TiledBackingStore.cpp:
2317         (WebCore::TiledBackingStore::updateTileBuffers):
2318         (WebCore::TiledBackingStore::resizeEdgeTiles):
2319         (WebCore::TiledBackingStore::setKeepRect):
2320         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2321         (WebCore::CompositingCoordinator::~CompositingCoordinator):
2322         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
2323         (WebCore::CompositingCoordinator::setVisibleContentsRect):
2324         (WebCore::CompositingCoordinator::purgeBackingStores):
2325         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
2326         (WebCore::CoordinatedBackingStore::removeAllTiles):
2327         (WebCore::CoordinatedBackingStore::paintToTextureMapper):
2328         (WebCore::CoordinatedBackingStore::drawBorder):
2329         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
2330         (WebCore::CoordinatedBackingStore::commitTileOperations):
2331         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2332         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
2333         (WebCore::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):
2334
2335 2014-07-04  Andreas Kling  <akling@apple.com>
2336
2337         CTTE: ScriptElement always has a HTTPScriptElement or SVGScriptElement.
2338         <https://webkit.org/b/134637>
2339
2340         Have ScriptElement store the pointer to the more specific subclass
2341         element as a reference. Also made the constructor protected since
2342         nobody should instantiate ScriptElement directly.
2343
2344         Reviewed by Antti Koivisto.
2345
2346         * dom/ScriptElement.cpp:
2347         (WebCore::ScriptElement::ScriptElement):
2348         (WebCore::ScriptElement::childrenChanged):
2349         (WebCore::ScriptElement::dispatchErrorEvent):
2350         (WebCore::ScriptElement::prepareScript):
2351         (WebCore::ScriptElement::requestScript):
2352         (WebCore::ScriptElement::executeScript):
2353         (WebCore::ScriptElement::notifyFinished):
2354         (WebCore::ScriptElement::ignoresLoadRequest):
2355         (WebCore::ScriptElement::scriptContent):
2356         * dom/ScriptElement.h:
2357         (WebCore::ScriptElement::element):
2358         * dom/ScriptRunner.cpp:
2359         (WebCore::ScriptRunner::queueScriptForExecution):
2360         * html/HTMLScriptElement.cpp:
2361         (WebCore::HTMLScriptElement::HTMLScriptElement):
2362         * svg/SVGScriptElement.cpp:
2363         (WebCore::SVGScriptElement::SVGScriptElement):
2364
2365 2014-07-04  Julien Quint  <pom@graougraou.com>
2366
2367         input type=range element should only fire change events after committing a  value
2368         https://bugs.webkit.org/show_bug.cgi?id=134545
2369
2370         Reviewed by Dean Jackson.
2371
2372         A "change" event was fired every time the slider thumb element was dragged
2373         by the user. The "change" event is now fired only after the thumb
2374         element has stopped moving; previously, both "input" and "change" events
2375         where dispatched while changes were being made. This new behavior is
2376         consistent with the specification (cf.
2377         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-change),
2378         as well as other implementations such as Firefox and Chrome.
2379
2380         * Modules/mediacontrols/mediaControlsApple.js:
2381         (Controller.prototype.createControls): Listen to the "input" event
2382         rather than the "change" event for the timeline control in order to
2383         keep track of value changes when the user is dragging the thumb.
2384         * accessibility/AccessibilitySlider.cpp:
2385         (WebCore::AccessibilitySlider::setValue): Dispatch "change" event while
2386         setting the new value rather than dispatching later, since setting the
2387         value now clears the change flag.
2388         * html/RangeInputType.cpp:
2389         (WebCore::RangeInputType::setValue): Update the text value of the
2390         control in the case when no event is to be dispatched, so that this
2391         value can be checked the next time a "change" event dispatch is
2392         requested.
2393         * html/shadow/SliderThumbElement.cpp:
2394         (WebCore::SliderThumbElement::setPositionFromPoint): Removed the
2395         dispatch of the "change" event, and no longer track the text value of
2396         the element as a result of dispatching a "change" event.
2397         (WebCore::SliderThumbElement::stopDragging): Dispatch the "change" event
2398         on completing the drag.
2399
2400 2014-07-04  Andreas Kling  <akling@apple.com>
2401
2402         CTTE: ApplicationCacheHost always has a DocumentLoader.
2403         <https://webkit.org/b/b/128435>
2404
2405         Have ApplicationCacheHost store the backpointer to its owning
2406         DocumentLoader as a reference.
2407
2408         Reviewed by Sam Weinig.
2409
2410         * loader/DocumentLoader.cpp:
2411         (WebCore::DocumentLoader::DocumentLoader):
2412         (WebCore::DocumentLoader::startLoadingMainResource):
2413         * loader/appcache/ApplicationCacheHost.cpp:
2414         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
2415         (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
2416         (WebCore::ApplicationCacheHost::selectCacheWithoutManifest):
2417         (WebCore::ApplicationCacheHost::selectCacheWithManifest):
2418         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
2419         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
2420         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
2421         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
2422         (WebCore::ApplicationCacheHost::finishedLoadingMainResource):
2423         (WebCore::ApplicationCacheHost::maybeLoadResource):
2424         (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
2425         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2426         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
2427         (WebCore::ApplicationCacheHost::stopDeferringEvents):
2428         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
2429         (WebCore::ApplicationCacheHost::update):
2430         (WebCore::ApplicationCacheHost::swapCache):
2431         (WebCore::ApplicationCacheHost::abort):
2432         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
2433         * loader/appcache/ApplicationCacheHost.h:
2434         (WebCore::ApplicationCacheHost::documentLoader): Deleted.
2435
2436 2014-07-04  Antti Koivisto  <antti@apple.com>
2437
2438         REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
2439         https://bugs.webkit.org/show_bug.cgi?id=134633
2440         <rdar://problem/17088936>
2441
2442         Reviewed by Zalan Bujtas.
2443
2444         Test: printing/simple-lines-break.html
2445
2446         * rendering/SimpleLineLayout.cpp:
2447         (WebCore::SimpleLineLayout::canUseFor):
2448         
2449             Disable simple lines if global pagination is enabled.
2450             Printing does not currently use flow threads which we already test for.
2451
2452 2014-07-04  Zan Dobersek  <zdobersek@igalia.com>
2453
2454         Unreviewed. Fixing the build after r170795.
2455
2456         Mac didn't like that change as it seems to properly typedef long long to int64_t.
2457         That's not the case on 64-bit Linux (for some reason), so I'm changing the type of
2458         the two long long variables in FormDataElement to int64_t to avoid any further trouble.
2459
2460         * platform/network/FormData.h:
2461
2462 2014-07-03  Brady Eidson  <beidson@apple.com>
2463
2464         When showing the selection menu, include menu options for all selected phone numbers.
2465         <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
2466
2467         Reviewed by Tim Horton.
2468
2469         * English.lproj/Localizable.strings:
2470
2471         * dom/Range.cpp:
2472         (WebCore::rangesOverlap): Fix reversed arguments that caused some types of overlaps to not be detected.
2473
2474 2014-07-03  Daniel Bates  <dabates@apple.com>
2475
2476         Add WTF::move()
2477         https://bugs.webkit.org/show_bug.cgi?id=134500
2478
2479         Rubber-stamped by Anders Carlsson.
2480
2481         Substitute WTF::move() for std::move().
2482
2483         * Modules/battery/NavigatorBattery.cpp:
2484         * Modules/encryptedmedia/MediaKeys.cpp:
2485         * Modules/gamepad/NavigatorGamepad.cpp:
2486         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
2487         * Modules/geolocation/NavigatorGeolocation.cpp:
2488         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2489         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2490         * Modules/indexeddb/IDBDatabaseBackend.h:
2491         [...]
2492
2493 2014-07-03  Benjamin Poulain  <bpoulain@apple.com>
2494
2495         [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
2496         https://bugs.webkit.org/show_bug.cgi?id=134582
2497
2498         Reviewed by Tim Horton.
2499
2500         * WebCore.exp.in:
2501         * platform/ScrollView.h:
2502         (WebCore::ScrollView::unobscuredContentSize):
2503         * platform/ios/ScrollViewIOS.mm:
2504         (WebCore::ScrollView::unobscuredContentRect):
2505         (WebCore::ScrollView::setUnobscuredContentSize):
2506
2507 2014-07-02  Brent Fulgham  <bfulgham@apple.com>
2508
2509         [Mac] WebKit1 WebView iframe not responding to scroll gestures
2510         https://bugs.webkit.org/show_bug.cgi?id=134569
2511         <rdar://problem/17309008>
2512
2513         Reviewed by Simon Fraser.
2514
2515         New test: platform/mac/fast/scrolling/scroll-iframe-fragment.html
2516
2517         WK1 scrollable areas are implemented on top of PlatformWidget (i.e., NSView) objects. They only
2518         perform a scroll operation if the EventHandler::handleWheelEvent method returns 'false', indicating
2519         that the Cocoa layer should do scrolling work. This is in contrast to WK2, where the scrolling is
2520         handled separately and we return 'true' from EventHandler::handleWheelEvent to indicate that the
2521         scroll event has been handled and that no other work is needed. This mismatch in the meaning of
2522         EventHandler::handleWheelEvent means that WK1 views do not properly handle scroll wheel events.
2523
2524         To correct this, we need to see if we are acting on an Element backed by a PlatformWidget. When we
2525         are (the WK1 case) we want to return 'false' to instruct the Cocoa object to do the scroll operation.
2526         To implement proper latching behavior in WK1, we must return 'true' in the case where we are latched
2527         to a PlatformWidget, and that PlatformWidget did not start the scroll gesture at the edge of
2528         the region in the dominant scroll direction.
2529
2530         Finally, additional logic was needed to determine whether the PlatformWidget is scrolled to the
2531         edge in the dominant scroll direction.
2532
2533         * page/EventHandler.cpp:
2534         (WebCore::EventHandler::platformCompleteWheelEvent): Added stub.
2535         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added stub.
2536         (WebCore::EventHandler::handleWheelEvent): Call new platformCompletePlatformWidgetWheelEvent if the
2537         event was handled for a PlatformWidget.
2538         * page/EventHandler.h:
2539         * page/mac/EventHandlerMac.mm:
2540         (WebCore::widgetForEventTarget): Added helper function.
2541         (WebCore::scrollViewForEventTarget): Added helper function.
2542         (WebCore::eventTargetIsPlatformWidget): Added helper function.
2543         (WebCore::EventHandler::platformPrepareForWheelEvents): Check whether we are at a scrolled edge
2544         for the NSView (PlatformWidget) case.
2545         (WebCore::EventHandler::platformCompleteWheelEvent): Return 'false' when handling WK1-style scrolls.
2546         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added. We generally want to
2547         return false so the PlatformWidget handles scrolling, except in the case where we are latched to
2548         a PlatformWidget, which has already performed its scroll, and we want to avoid propegating a
2549         scroll event to an enclosing region.
2550
2551 2014-07-03  Pratik Solanki  <psolanki@apple.com>
2552
2553         Preserve old behavior of creating an NSURLRequest of the exact same type as passed to us
2554         https://bugs.webkit.org/show_bug.cgi?id=134605
2555         <rdar://problem/17544641>
2556
2557         Reviewed by Andreas Kling.
2558
2559         We have client code that passes us a subclass of NSURLRequest to load resource. Later when
2560         we call willSendRequest, they test to make sure they get an object of the same type. My
2561         optimization in r170642 broke this path when I cleared out the NSURLRequest object. We
2562         already had code in updateNSURLRequest() that was taking this quirk into account but I broke
2563         that. Fix it by reverting to old behavior for such clients.
2564
2565         No new tests though we need one. I will add it later.
2566
2567         * platform/network/cf/ResourceRequest.h:
2568         * platform/network/cf/ResourceRequestCFNet.cpp:
2569         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2570         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2571         (WebCore::ResourceRequest::setStorageSession):
2572         * platform/network/ios/ResourceRequestIOS.mm:
2573         (WebCore::ResourceRequest::updateNSURLRequest):
2574         (WebCore::ResourceRequest::clearOrUpdateNSURLRequest):
2575
2576 2014-07-02  Anders Carlsson  <andersca@apple.com>
2577
2578         Stop using EncoderAdapter/DecoderAdapter for FormData
2579         https://bugs.webkit.org/show_bug.cgi?id=134571
2580
2581         Reviewed by Andreas Kling.
2582
2583         * WebCore.exp.in:
2584         * platform/network/FormData.cpp:
2585         (WebCore::encodeElement): Deleted.
2586         (WebCore::decodeElement): Deleted.
2587         (WebCore::FormData::encode): Deleted.
2588         (WebCore::FormData::decode): Deleted.
2589         * platform/network/FormData.h:
2590         (WebCore::FormDataElement::encode):
2591         (WebCore::FormDataElement::decode):
2592         (WebCore::FormData::encode):
2593         (WebCore::FormData::decode):
2594
2595 2014-07-03  Brady Eidson  <beidson@apple.com>
2596
2597         Selection rects sent to ServicesOverlayController are wrong.
2598         <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
2599
2600         Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
2601
2602         * WebCore.exp.in:
2603
2604         Update the gatherer to keep GapRects separate from LayoutRects:
2605         * editing/SelectionRectGatherer.cpp:
2606         (WebCore::SelectionRectGatherer::addRects):
2607         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
2608         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
2609         * editing/SelectionRectGatherer.h:
2610
2611         * page/EditorClient.h:
2612         (WebCore::EditorClient::selectionRectsDidChange): Updated to take LayoutRects and GapRects separately.
2613
2614         Change RenderSelectionInfo to also hang on to the individual rects that formed the final bounding rect:
2615         * rendering/RenderSelectionInfo.h:
2616         (WebCore::RenderSelectionInfo::RenderSelectionInfo): If the RenderObject is a RenderText, then call
2617           collectSelectionRectsForLineBoxes instead of selectionRectForRepaint.
2618         (WebCore::RenderSelectionInfo::rects):
2619
2620         * rendering/RenderText.cpp:
2621         (WebCore::RenderText::collectSelectionRectsForLineBoxes): Added
2622         (WebCore::RenderText::selectionRectForRepaint):
2623         * rendering/RenderText.h:
2624
2625         * rendering/RenderTextLineBoxes.cpp:
2626         (WebCore::RenderTextLineBoxes::collectSelectionRectsForRange): Added
2627         * rendering/RenderTextLineBoxes.h:
2628
2629         * rendering/RenderView.cpp:
2630         (WebCore::RenderView::setSubtreeSelection): Add the list of rects to the gatherer instead of just 
2631           the bounding rect.
2632
2633 2014-07-03  Brady Eidson  <beidson@apple.com>
2634
2635         Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
2636         <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
2637
2638         Reviewed by Eric Carlson.
2639
2640         Since WebCore::IconDatabase is not RefCounted there’s no obvious way to keep it alive until it is
2641         truly no longer needed.
2642
2643         This isn’t generally a problem because they are usually a singleton that lasts the lifetime of the process.
2644
2645         In the WebKit2 case, WebCore::IconDatabases can come and go as their owning WebIconDatabases come and go.
2646
2647         So we can rely on WebIconDatabase to handle the lifetime appropriately. 
2648
2649         * loader/icon/IconDatabase.cpp:
2650         (WebCore::IconDatabase::close): If the database is actually closed, notify the client.
2651         (WebCore::IconDatabase::IconDatabase):
2652         (WebCore::IconDatabase::isOpen): Take into account whether there’s any main thread callbacks, plus what
2653           is covered by isOpenBesidesMainThreadCallbacks.
2654         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks): Take into account whether the sync thread
2655           is still running and whether or not the database file is still open.
2656         (WebCore::IconDatabase::checkClosedAfterMainThreadCallback): Checks to see if the database has just
2657           become 100% closed and - if so - notify the client.
2658         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread): Updated to increment the main thread
2659           callback count and to call checkClosedAfterMainThreadCallback when done.
2660         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread): Ditto.
2661         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread): Ditto.
2662         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread): Ditto.
2663         * loader/icon/IconDatabase.h:
2664
2665         * loader/icon/IconDatabaseClient.h:
2666         (WebCore::IconDatabaseClient::didClose): Added. For the IconDatabase to tell its client it is 100% closed.
2667
2668 2014-07-03  Chris Fleizach  <cfleizach@apple.com>
2669
2670         AX: VoiceOver does not read aria-expanded attribute on controls in Safari
2671         https://bugs.webkit.org/show_bug.cgi?id=134527
2672
2673         Reviewed by Mario Sanchez Prada.
2674
2675         Expose whether the ARIA expanded property is present or not.
2676
2677         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2678         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
2679
2680 2014-07-02  Jon Honeycutt  <jhoneycutt@apple.com>
2681
2682         Removing an element with CSS -webkit-overflow-scrolling: touch breaks
2683         subsequent touch events
2684
2685         <https://bugs.webkit.org/show_bug.cgi?id=134584>
2686         <rdar://problem/17202021>
2687
2688         This issue is caused by the order of teardown for RenderLayers.
2689
2690         RenderLayer clears its m_backing in its destructor, calling the
2691         RenderLayerBacking destructor. The RenderLayerBacking destructor calls
2692         RenderLayerCompositor::willRemoveScrollingLayer(), which tries to
2693         access the RenderLayer's backing that has already been cleared. This
2694         causes us to skip the call to ChromeClient::removeScrollingLayer(),
2695         resulting in a stale view that can block touch events.
2696
2697         Reviewed by Simon Fraser.
2698
2699         * rendering/RenderLayerBacking.cpp:
2700         (WebCore::RenderLayerBacking::updateScrollingLayers):
2701         When calling willRemoveScrollingLayerWithBacking(), pass both the layer
2702         and the RenderLayerBacking.
2703
2704         * rendering/RenderLayerCompositor.cpp:
2705         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
2706         Renamed. Use the passed RenderLayerBacking, as the RenderLayer's
2707         backing might have already been cleared.
2708         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer): Deleted.
2709
2710         * rendering/RenderLayerCompositor.h:
2711         Renamed willRemoveScrollingLayer() to
2712         willRemoveScrollingLayerWithBacking() and added a parameter.
2713
2714 2014-07-01  Mark Rowe  <mrowe@apple.com>
2715
2716         Ensure that the WebKit bundle version in the user agent string continues to match the current format.
2717         <https://webkit.org/b/134524> / <rdar://problem/17447771>
2718
2719         Reviewed by Simon Fraser.
2720
2721         * page/cocoa/UserAgent.h:
2722         * page/cocoa/UserAgent.mm:
2723         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Updated to take an NSString now that it's internal
2724         to the file.
2725         (WebCore::userAgentBundleVersionFromFullVersionString): Limit the bundle version included in the user agent
2726         string to three components.
2727         * page/ios/UserAgentIOS.mm:
2728         (WebCore::standardUserAgentWithApplicationName): Update to call userAgentBundleVersionFromFullVersionString.
2729         * page/mac/UserAgentMac.mm:
2730         (WebCore::standardUserAgentWithApplicationName): Ditto.
2731
2732 2014-07-01  Mark Rowe  <mrowe@apple.com>
2733
2734         <https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS
2735
2736         Reviewed by Simon Fraser.
2737
2738         * page/cocoa/UserAgent.h:
2739         * page/cocoa/UserAgent.mm:
2740         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Moved from WebKit2.
2741         * page/ios/UserAgentIOS.mm:
2742         (WebCore::standardUserAgentWithApplicationName): Pass the WebKit bundle version through userVisibleWebKitBundleVersionFromFullVersion
2743         before including it in the user agent string.
2744         * page/mac/UserAgentMac.mm:
2745         (WebCore::standardUserAgentWithApplicationName): Ditto.
2746
2747 2014-07-02  Mark Rowe  <mrowe@apple.com>
2748
2749         <https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version
2750
2751         Reviewed by Simon Fraser.
2752
2753         * WebCore.xcodeproj/project.pbxproj: Add the new files, and sort the groups they're in.
2754         * page/cocoa/UserAgent.h: Copied from Source/WebCore/page/mac/UserAgent.h.
2755         * page/cocoa/UserAgent.mm: Renamed from Source/WebCore/page/mac/UserAgent.h.
2756         Move systemMarketingVersionForUserAgentString to a location where it can be shared between
2757         Mac and iOS.
2758         * page/ios/UserAgentIOS.mm:
2759         (WebCore::standardUserAgentWithApplicationName): Switch to systemMarketingVersionForUserAgentString.
2760         * page/mac/UserAgentMac.mm:
2761         * platform/cocoa/SystemVersion.h: Renamed from Source/WebCore/platform/mac/SystemVersionMac.h.
2762         * platform/cocoa/SystemVersion.mm: Renamed from Source/WebCore/platform/mac/SystemVersionMac.mm.
2763         Move to a location that makes it clear this is shared between Mac and iOS. Enable the modern Mac
2764         codepath for iOS as well.
2765
2766 2014-07-02  Anders Carlsson  <andersca@apple.com>
2767
2768         Remove keyed coding from FormData
2769         https://bugs.webkit.org/show_bug.cgi?id=134565
2770
2771         Reviewed by Tim Horton.
2772
2773         * platform/network/FormData.cpp:
2774         (WebCore::encodeElement): Deleted.
2775         (WebCore::decodeElement): Deleted.
2776         (WebCore::FormData::encode): Deleted.
2777         (WebCore::FormData::decode): Deleted.
2778         * platform/network/FormData.h:
2779
2780 2014-07-02  Anders Carlsson  <andersca@apple.com>
2781
2782         Get rid of the HistoryItem encoding/decoding in WebCore
2783         https://bugs.webkit.org/show_bug.cgi?id=134564
2784
2785         Reviewed by Beth Dakin.
2786
2787         * WebCore.exp.in:
2788         * history/HistoryItem.cpp:
2789         (WebCore::HistoryItem::encodeBackForwardTree): Deleted.
2790         (WebCore::encodeRect): Deleted.
2791         (WebCore::encodeSize): Deleted.
2792         (WebCore::HistoryItem::encodeBackForwardTreeNode): Deleted.
2793         (WebCore::DecodeRecursionStackElement::DecodeRecursionStackElement): Deleted.
2794         (WebCore::decodeRect): Deleted.
2795         (WebCore::decodeSize): Deleted.
2796         (WebCore::HistoryItem::decodeBackForwardTree): Deleted.
2797         * history/HistoryItem.h:
2798
2799 2014-07-02  Alex Christensen  <achristensen@webkit.org>
2800
2801         [WebGL] Fix crash when glsl expressions are too complex.
2802         https://bugs.webkit.org/show_bug.cgi?id=134554
2803         <rdar://problem/17540462>
2804
2805         Reviewed by Dean Jackson.
2806         
2807         This fixes the Khronos test conformance/glsl/bugs/long-expressions-should-not-crash.html.
2808
2809         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2810         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2811         Add SH_LIMIT_EXPRESSION_COMPLEXITY to the ANGLE compile options.
2812
2813 2014-07-02  Benjamin Poulain  <benjamin@webkit.org>
2814
2815         WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
2816         https://bugs.webkit.org/show_bug.cgi?id=134552
2817
2818         Reviewed by Alex Christensen.
2819
2820         Little cleanup:
2821         -The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
2822         -Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
2823          size everywhere, no functional change.
2824         -Same idea for the stack: welcome StackReferenceVector!
2825
2826         * cssjit/FunctionCall.h:
2827         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
2828         Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
2829         from mistakes.
2830
2831         * cssjit/RegisterAllocator.h:
2832         (WebCore::RegisterAllocator::allocatedRegisters):
2833         * cssjit/SelectorCompiler.cpp:
2834         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2835         Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
2836         calleeSavedRegisterStackReferences to always overallocate.
2837         The code generator is never on the heap, so that should not change anything.
2838
2839         * cssjit/StackAllocator.h:
2840         (WebCore::StackAllocator::push):
2841         (WebCore::StackAllocator::pop):
2842
2843 2014-07-02  Dan Bernstein  <mitz@apple.com>
2844
2845         Remove some code only needed for versions of Safari that are no longer supported
2846         https://bugs.webkit.org/show_bug.cgi?id=134537
2847
2848         Reviewed by Anders Carlsson.
2849
2850         * bindings/objc/DOMHTML.mm:
2851         (-[DOMHTMLInputElement _rectOnScreen]): Deleted.
2852         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
2853         (-[DOMHTMLInputElement _selectedRange]): Deleted.
2854         * bindings/objc/DOMPrivate.h:
2855         * editing/EditorCommand.cpp:
2856         (WebCore::createCommandMap):
2857
2858 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2859
2860         [GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
2861         https://bugs.webkit.org/show_bug.cgi?id=134548
2862
2863         Reviewed by Philippe Normand.
2864
2865         Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
2866         since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>
2867
2868         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2869
2870 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2871
2872         [GTK] Unstable headers should include webkitdomdefines-unstable.h
2873         https://bugs.webkit.org/show_bug.cgi?id=134540
2874
2875         Reviewed by Martin Robinson.
2876
2877         Instead of the class header that can only be included from webkitdom.h.
2878
2879         * bindings/scripts/CodeGeneratorGObject.pm:
2880         (WriteData):
2881
2882 2014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>
2883
2884         REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
2885         https://bugs.webkit.org/show_bug.cgi?id=134399
2886
2887         Reviewed by Chris Fleizach.
2888
2889         Check that the value of optionIndex passed as a parameter is valid
2890         before calling didUpdateActiveOption() over the item of the menu
2891         list, to prevent crashes in platforms where renderers (and therefore
2892         accessibility objects) might not be created for items at the time
2893         of calling AccessibilityMenuList::didUpdateActiveOption().
2894
2895         * accessibility/AccessibilityMenuList.cpp:
2896         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.
2897
2898 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2899
2900         [GTK] Do not add forward declaration of class struct for interfaces
2901         https://bugs.webkit.org/show_bug.cgi?id=134297
2902
2903         Reviewed by Martin Robinson.
2904
2905         * PlatformGTK.cmake: Make files generated by
2906         gobject-generate-headers.pl script depend on it.
2907         * bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
2908         * bindings/gobject/WebKitDOMNodeFilter.h: Ditto
2909         * bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
2910         * bindings/scripts/gobject-generate-headers.pl: Use Iface instead
2911         of Class suffix for interfaces.
2912
2913 2014-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2914
2915         [GTK] XPathNSResolver should be exposed as an interface instead of as a class
2916         https://bugs.webkit.org/show_bug.cgi?id=134028
2917
2918         Reviewed by Gustavo Noronha Silva.
2919
2920         Add custom implementation of WebKitDOMXPathNSResolver to expose it
2921         as an interface instead of a class. It also includes an internal
2922         default implementation of the interface to support methods that
2923         create a XPathNSResolver using the native implementation.
2924
2925         * PlatformGTK.cmake: Add new files to compilation.
2926         * bindings/gobject/GObjectXPathNSResolver.cpp: Added.
2927         (WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
2928         (WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
2929         webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
2930         * bindings/gobject/GObjectXPathNSResolver.h: Added.
2931         (WebCore::GObjectXPathNSResolver::create):
2932         (WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
2933         a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
2934         * bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
2935         (webkit_dom_xpath_ns_resolver_default_init):
2936         (webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
2937         (webkitDOMNativeXPathNSResolverFinalize):
2938         (webkitDOMNativeXPathNSResolverConstructor):
2939         (webkit_dom_native_xpath_ns_resolver_init):
2940         (webkit_dom_native_xpath_ns_resolver_class_init):
2941         (webkitDOMNativeXPathNSResolverLookupNamespaceURI):
2942         (webkitDOMXPathNSResolverIfaceInit):
2943         (WebKit::core): Return the native XPathNSResolver when using the
2944         internal implementation or create a custom XPathNSResolver when
2945         using a user provided WebKitDOMXPathNSResolver.
2946         (WebKit::kit):
2947         * bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
2948         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
2949         * bindings/scripts/CodeGeneratorGObject.pm:
2950         (GenerateFunction): Add exceptions for XPathNSResolver since
2951         the core method returns a PassRefPtr.
2952
2953 2014-07-01  Frédéric Wang  <fred.wang@free.fr>
2954
2955         The OpenType MATH table is not read on Mac
2956         https://bugs.webkit.org/show_bug.cgi?id=133569
2957
2958         Reviewed by Chris Fleizach.
2959
2960         An incorrect tag format is used to load the OpenType MATH table on Mac.
2961         This commit makes the format consistent with what is used for other tables on Mac.
2962         This will allow to load the MATH table and to use it for the MathML rendering.
2963
2964         No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.
2965
2966         * platform/graphics/opentype/OpenTypeMathData.cpp:
2967
2968 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2969
2970         [Win64] Unreviewed build fix.
2971
2972         * WebCore.vcxproj/WebCore.vcxproj:
2973         Exclude CA files from 32 and 64 bit WinCairo builds.
2974         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2975         Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.
2976
2977 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2978
2979         Reduce dynamic memory allocation in css jit.
2980         https://bugs.webkit.org/show_bug.cgi?id=134416
2981
2982         Reviewed by Benjamin Poulain.
2983
2984         * cssjit/FunctionCall.h:
2985         (WebCore::FunctionCall::saveAllocatedRegisters):
2986         * cssjit/RegisterAllocator.h:
2987         * cssjit/SelectorCompiler.cpp:
2988         (WebCore::SelectorCompiler::addPseudoClassType):
2989         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2990         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2991         * cssjit/StackAllocator.h:
2992         (WebCore::StackAllocator::push):
2993         (WebCore::StackAllocator::pop):
2994         Use inlineCapacity template parameter to reduce malloc calls.
2995         I use 32 as the inline capacity for non-register related vectors because that
2996         is probably big enough for the selector compiler, and if it is not then a malloc
2997         call will not be significant because the selector is very complex.
2998
2999 2014-07-01  Eric Carlson  <eric.carlson@apple.com>
3000
3001         WebVTT percentage value can be a float
3002         https://bugs.webkit.org/show_bug.cgi?id=134511
3003
3004         Reviewed by Brent Fulgham.
3005
3006         No new tests, existing tests modified.
3007
3008         * html/track/TextTrackCueGeneric.cpp:
3009         (WebCore::TextTrackCueGeneric::setLine): int -> double.
3010         (WebCore::TextTrackCueGeneric::setPosition): Ditto.
3011         * html/track/TextTrackCueGeneric.h:
3012
3013         * html/track/VTTCue.cpp:
3014         (WebCore::VTTCue::setLine): Ditto.
3015         (WebCore::VTTCue::setPosition):  Ditto.
3016         (WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
3017         (WebCore::scanPercentage): Deleted.
3018         * html/track/VTTCue.h:
3019
3020         * html/track/VTTScanner.cpp:
3021         (WebCore::VTTScanner::scanFloat): Support negative values.
3022         * html/track/VTTScanner.h:
3023
3024         * html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
3025         * html/track/WebVTTParser.h:
3026
3027         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3028         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
3029             reference rather than a pointer.
3030         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
3031         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
3032             we are asking the client to delete the cue because the client will have already deleted
3033             it when status when to GenericCueData::Complete.
3034         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3035
3036 2014-07-01  Simon Fraser  <simon.fraser@apple.com>
3037
3038         Improve behavior of position:sticky on zoomed pages
3039         https://bugs.webkit.org/show_bug.cgi?id=134535
3040         <rdar://problem/12898829>
3041
3042         Reviewed by Dean Jackson.
3043
3044         Despite r138036, position:sticky still had incorrect behavior in zoomed pages.
3045         
3046         Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
3047         since all the other math happens in unscaled coordinates.
3048
3049         * rendering/RenderBoxModelObject.cpp:
3050         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
3051
3052 2014-07-01  Alex Christensen  <achristensen@webkit.org>
3053
3054         [WebGL] Fix PVRTC extension.
3055         https://bugs.webkit.org/show_bug.cgi?id=134525
3056
3057         Reviewed by Dean Jackson.
3058
3059         * html/canvas/WebGLRenderingContext.cpp:
3060         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
3061         Remove the return false which I mistakenly committed in r170128
3062         and make the gl error match the S3TC error and the khronos test.
3063
3064 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
3065
3066         AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
3067         https://bugs.webkit.org/show_bug.cgi?id=133875
3068
3069         Reviewed by Enrica Casucci.
3070
3071         Support the toggle button type in iOS.
3072
3073         Test: platform/ios-sim/accessibility/toggle-button.html
3074
3075         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3076         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
3077         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
3078         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
3079
3080 2014-07-01  Dean Jackson  <dino@apple.com>
3081
3082         [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
3083         https://bugs.webkit.org/show_bug.cgi?id=134513
3084         <rdar://problem/12078860>
3085         <rdar://problem/16745393>
3086
3087         Reviewed by Tim Horton.
3088
3089         Subsampled images (e.g. JPEG) were not consistently using
3090         their original dimensions and subsampled dimensions. This caused
3091         things like texImage2D to pack the pixels incorrectly, or drawImage
3092         to squish the rendering.
3093
3094         Renamed m_scale to m_subsamplingScale on FrameData.
3095
3096         Tests: fast/canvas/image-potential-subsample.html
3097                fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html
3098
3099         * platform/graphics/BitmapImage.cpp:
3100         (WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
3101         (WebCore::BitmapImage::frameAtIndex): Ditto.
3102         * platform/graphics/BitmapImage.h:
3103         (WebCore::FrameData::FrameData): Ditto.
3104         * platform/graphics/cg/BitmapImageCG.cpp:
3105         (WebCore::FrameData::clear): Ditto.
3106         (WebCore::BitmapImage::BitmapImage): Ditto.
3107         (WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
3108         rather than assuming the srcRect accurately reflects how many pixels we have
3109         in the Bitmap.
3110         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
3111         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3112         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
3113         time we just ask the image decoder to take into account the subsampled size
3114         when it is "generating" a frame, causing it to use the bitmap data it has already
3115         decoded.
3116
3117 2014-07-01  Joseph Pecoraro  <pecoraro@apple.com>
3118
3119         Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
3120         https://bugs.webkit.org/show_bug.cgi?id=133818
3121
3122         Reviewed by Beth Dakin.
3123
3124         * inspector/InspectorOverlay.cpp:
3125         (WebCore::InspectorOverlay::update):
3126         Take the topContentInset into account when sizing the InspectorOverlay's FrameView.
3127
3128 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
3129
3130         AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
3131         https://bugs.webkit.org/show_bug.cgi?id=134492
3132
3133         Reviewed by Andreas Kling.
3134
3135         Support the indeterminate attribute in AX code.
3136
3137         Test: Update existing test: accessibility/aria-checked-mixed-value
3138
3139         * accessibility/AccessibilityObject.cpp:
3140         (WebCore::AccessibilityObject::checkboxOrRadioValue):
3141
3142 2014-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
3143
3144         Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
3145         https://bugs.webkit.org/show_bug.cgi?id=133883
3146
3147         Reviewed by Enrica Casucci.
3148
3149         enclosingDeletableElement() makes sure that the element's container is editable, but not
3150         that it is capable of having content inside it (like how a <br> can't).
3151
3152         No new tests. I don't think this is testable because it requires setting some state in System Preferences.
3153
3154         * editing/DeleteButtonController.cpp:
3155         (WebCore::enclosingDeletableElement):
3156
3157 2014-07-01  Alex Christensen  <achristensen@webkit.org>
3158
3159         [iOS] Unreviewed build fix after r170640.
3160
3161         * page/EditorClient.h:
3162         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
3163         Add ifdefs to make everything compile and link.
3164
3165 2014-07-01  Daniel Bates  <dabates@apple.com>
3166
3167         Remove unnecessary calls to std::move()
3168         https://bugs.webkit.org/show_bug.cgi?id=134493
3169
3170         Reviewed by Anders Carlsson.
3171
3172         * Modules/encryptedmedia/CDM.cpp:
3173         (WebCore::CDM::CDM):
3174         * css/CSSGrammar.y.in:
3175         * css/CSSPrimitiveValue.cpp:
3176         (WebCore::CSSPrimitiveValue::formatNumberValue):
3177         * css/MediaQuery.cpp:
3178         (WebCore::MediaQuery::MediaQuery):
3179         * platform/graphics/mac/FontMac.mm:
3180         (WebCore::Font::dashesForIntersectionsWithRect):
3181
3182 2014-07-01  Zalan Bujtas  <zalan@apple.com>
3183
3184         Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
3185         https://bugs.webkit.org/show_bug.cgi?id=134491
3186
3187         Reviewed by Simon Fraser.
3188
3189         Do not early round geometry values, while computing background image position. It changes the final
3190         subpixel values and that could lead to wrong snap positions.
3191         pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.
3192
3193         Test: fast/backgrounds/background-image-size-double-rounding.html
3194
3195         * rendering/RenderBoxModelObject.cpp:
3196         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3197
3198 2014-07-01  Pratik Solanki  <psolanki@apple.com>
3199
3200         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
3201         https://bugs.webkit.org/show_bug.cgi?id=134441
3202
3203         Reviewed by Andreas Kling.
3204
3205         No new tests. Should be covered by existing tests.
3206
3207         * platform/network/cf/ResourceRequest.h:
3208         (WebCore::ResourceRequest::ResourceRequest):
3209         (WebCore::ResourceRequest::encodingRequiresPlatformData):
3210         * platform/network/cf/ResourceRequestCFNet.cpp:
3211         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3212         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3213         (WebCore::ResourceRequest::setStorageSession):
3214         * platform/network/cocoa/ResourceRequestCocoa.mm:
3215         (WebCore::ResourceRequest::nsURLRequest):
3216
3217 2014-07-01  Brady Eidson  <beidson@apple.com>
3218
3219         Combine the Telephone and Selection overlay controllers, updating UI behavior.
3220         https://bugs.webkit.org/show_bug.cgi?id=134461
3221
3222         Reviewed by Tim Horton.
3223
3224         * WebCore.exp.in:
3225
3226         * dom/Range.cpp:
3227         (WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
3228         * dom/Range.h:
3229
3230 2014-07-01  Antti Koivisto  <antti@apple.com>
3231
3232         REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
3233         https://bugs.webkit.org/show_bug.cgi?id=134489
3234
3235         Reviewed by Zalan Bujtas.
3236
3237         Test: fullscreen/full-screen-plugin.html
3238
3239         It is difficult to restore the render tree correctly in all cases after removing a full screen
3240         renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
3241         Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.
3242         
3243         With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.
3244
3245         * dom/Document.cpp:
3246         (WebCore::unwrapFullScreenRenderer):
3247         
3248             Force reconstruction conditionally.
3249
3250         (WebCore::Document::webkitWillEnterFullScreenForElement):
3251         (WebCore::Document::webkitDidExitFullScreenForElement):
3252         * rendering/RenderFullScreen.cpp:
3253         (WebCore::RenderFullScreen::wrapRenderer):
3254         (WebCore::RenderFullScreen::unwrapRenderer):
3255         
3256             Deal with the simple case of single child, possibly in anonymous wrapper.
3257             In other cases request reconstruction.
3258             This is covered by the existing fullscreen tests.
3259
3260         * rendering/RenderFullScreen.h:
3261
3262 2014-07-01  Zan Dobersek  <zdobersek@igalia.com>
3263
3264         Remove remaining Vector<> copies in WebCore accessibility code
3265         https://bugs.webkit.org/show_bug.cgi?id=133263
3266
3267         Reviewed by Darin Adler.
3268
3269         * accessibility/AXObjectCache.cpp:
3270         (WebCore::AXObjectCache::notificationPostTimerFired): Don't copy the Vector member and
3271         then clear it -- move it into the local variable instead.
3272         * accessibility/AccessibilityNodeObject.cpp:
3273         (WebCore::AccessibilityNodeObject::ariaLabeledByText): Move the axElements Vector into
3274         the AccessibilityText constructor.
3275         (WebCore::AccessibilityNodeObject::stringValue): Create a const reference to the Vector of
3276         HTMLSelectElement's list items instead of copying it.
3277         * accessibility/AccessibilityObject.h:
3278         (WebCore::AccessibilityText::AccessibilityText): Take the Vector parameter by non-const
3279         value and move it into the member variable.
3280         * accessibility/AccessibilityRenderObject.cpp: 
3281         (WebCore::AccessibilityRenderObject::stringValue): Create a const reference to the Vector
3282         of HTMLSelectElement's list items instead of copying it.
3283         (WebCore::AccessibilityRenderObject::ariaSelectedRows): Wrap the AccessibilityChildrenVector
3284         iteration in a lambda. Use it to iterate over either the newly-constructed Vector (in case
3285         the object has the tree role) or the reference to the vector returned by
3286         AccessibilityTable::rows() (in case the object is an AccessibilityTable instance).
3287
3288 2014-06-30  Commit Queue  <commit-queue@webkit.org>
3289
3290         Unreviewed, rolling out r170605.
3291         https://bugs.webkit.org/show_bug.cgi?id=134484
3292
3293         The changes cause crashes on ARM64 (Requested by benjaminp on
3294         #webkit).
3295
3296         Reverted changeset:
3297
3298         "Reduce dynamic memory allocation in css jit."
3299         https://bugs.webkit.org/show_bug.cgi?id=134416
3300         http://trac.webkit.org/changeset/170605
3301
3302 2014-06-30  Anders Carlsson  <andersca@apple.com>
3303
3304         Change the AddBackForwardItem message to take a page state object
3305         https://bugs.webkit.org/show_bug.cgi?id=134475
3306
3307         Reviewed by Andreas Kling.
3308
3309         * WebCore.exp.in:
3310
3311 2014-06-30  Benjamin Poulain  <benjamin@webkit.org>
3312
3313         [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
3314         https://bugs.webkit.org/show_bug.cgi?id=134471
3315         <rdar://problem/17513542>
3316
3317         Reviewed by Enrica Casucci.
3318
3319         UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
3320         since the page has no way of overriding that behavior.
3321
3322         This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
3323         by default for those object, and enabled for images that are in a link.
3324
3325         * css/html.css:
3326         (applet, embed, object, img):
3327         (:-webkit-any-link img):
3328
3329 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
3330
3331         All Indic text is rendered as boxes on iOS
3332         https://bugs.webkit.org/show_bug.cgi?id=134464
3333
3334         Reviewed by Simon Fraser.
3335
3336         I made a typo in r170207.
3337
3338         Test: fast/text/indic.html
3339
3340         * platform/graphics/ios/FontCacheIOS.mm:
3341         (WebCore::languageSpecificFallbackFont):
3342
3343 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
3344
3345         [iOS] languageSpecificFallbackFont() is not consistent
3346         https://bugs.webkit.org/show_bug.cgi?id=134473
3347
3348         Reviewed by Darin Adler.
3349
3350         It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.
3351
3352         No tests because there is no behavior change.
3353
3354         * platform/graphics/ios/FontCacheIOS.mm:
3355         (WebCore::languageSpecificFallbackFont):
3356
3357 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
3358
3359         [Win] Unreviewed gardening.
3360
3361         * WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
3362         and JSFileReaderSync multiple times.
3363
3364 2014-06-30  Daniel Bates  <dabates@apple.com>
3365
3366         Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
3367         https://bugs.webkit.org/show_bug.cgi?id=134470
3368
3369         Reviewed by Anders Carlsson.
3370
3371         Currently we always copy construct the captured std::function object when calling callOnMainThread()
3372         in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
3373         const in a lambda expression's body by default. That is, the std::function object is captured as const.
3374         Instead, we should mark this lambda expression as mutable so the captured std::function object is
3375         non-const and hence we can use move semantics when passing it to callOnMainThread().
3376
3377         * page/scrolling/ScrollingThread.cpp:
3378         (WebCore::ScrollingThread::dispatchBarrier):
3379
3380 2014-06-30  Anders Carlsson  <andersca@apple.com>
3381
3382         Adopt the legacy session decoding inside WebPage::restoreSession for now
3383         https://bugs.webkit.org/show_bug.cgi?id=134465
3384
3385         Reviewed by Sam Weinig.
3386
3387         * WebCore.exp.in:
3388
3389 2014-06-30  Commit Queue  <commit-queue@webkit.org>
3390
3391         Unreviewed, rolling out r170578.
3392         https://bugs.webkit.org/show_bug.cgi?id=134462
3393
3394         causes assertions loading nytimes.com on iOS (Requested by
3395         smfr on #webkit).
3396
3397         Reverted changeset:
3398
3399         "Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
3400         https://bugs.webkit.org/show_bug.cgi?id=134441
3401         http://trac.webkit.org/changeset/170578
3402
3403 2014-06-30  Alex Christensen  <achristensen@webkit.org>
3404
3405         Reduce dynamic memory allocation in css jit.
3406         https://bugs.webkit.org/show_bug.cgi?id=134416
3407
3408         Reviewed by Benjamin Poulain.
3409
3410         * cssjit/FunctionCall.h:
3411         (WebCore::FunctionCall::FunctionCall):
3412         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
3413         * cssjit/RegisterAllocator.h:
3414         * cssjit/SelectorCompiler.cpp:
3415         (WebCore::SelectorCompiler::addPseudoClassType):
3416         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
3417         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3418         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
3419         Use inlineCapacity template parameter to reduce malloc calls.
3420         I use 16 and 32 as the inline capacity for non-register related vectors because that
3421         is probably big enough for the selector compiler, and if it is not then a malloc
3422         call will not be significant because the selector is very complex.
3423         * cssjit/StackAllocator.h:
3424         (WebCore::StackAllocator::push):
3425         Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.
3426
3427 2014-06-30  Alex Christensen  <achristensen@webkit.org>
3428
3429         Use non-thumb registers in armv7 css jit.
3430         https://bugs.webkit.org/show_bug.cgi?id=134450
3431
3432         Reviewed by Geoff Garen.
3433
3434         * cssjit/RegisterAllocator.h:
3435         (WebCore::RegisterAllocator::isValidRegister):
3436         (WebCore::RegisterAllocator::isCallerSavedRegister):
3437         Use additional general purpose registers.