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