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