[iOS] WebCore fails to build: platform/network/mac/ResourceHandleMac.mm:729:62: error...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-02  David Kilzer  <ddkilzer@apple.com>
2
3         [iOS] WebCore fails to build: platform/network/mac/ResourceHandleMac.mm:729:62: error: use of undeclared identifier '_CFURLConnectionCopyTimingData'
4         <http://webkit.org/b/133445>
5         <rdar://problem/17090035>
6
7         Reviewed by Alexey Proskuryakov.
8
9         * platform/network/mac/ResourceHandleMac.mm: Attempt to fix the
10         build by including a private header and local declaration.
11
12 2014-05-31  Anders Carlsson  <andersca@apple.com>
13
14         Change DeferrableOneShotTimer to use std::function instead of being a class template
15         https://bugs.webkit.org/show_bug.cgi?id=133423
16
17         Reviewed by Antti Koivisto.
18
19         Also, add a new constructor to DeferrableOneShotTimer that takes an std::function. Change the callback
20         to not pass a DeferrableOneShotTimer& anymore. Change the delay parameter to use std::chrono::milliseconds.
21
22         * css/CSSImageGeneratorValue.cpp:
23         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
24         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
25         * css/CSSImageGeneratorValue.h:
26         * html/HTMLPlugInImageElement.cpp:
27         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
28         * html/HTMLPlugInImageElement.h:
29         * loader/cache/CachedResource.cpp:
30         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
31         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
32         (WebCore::CachedResource::decodedDataDeletionTimerFired):
33         * loader/cache/CachedResource.h:
34         * loader/cache/MemoryCache.cpp:
35         (WebCore::MemoryCache::MemoryCache):
36         * loader/cache/MemoryCache.h:
37         (WebCore::MemoryCache::setDeadDecodedDataDeletionInterval):
38         (WebCore::MemoryCache::deadDecodedDataDeletionInterval):
39         * platform/Timer.h:
40         (WebCore::Timer::Timer):
41         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
42         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
43         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
44         * platform/graphics/cg/SubimageCacheWithTimer.h:
45
46 2014-06-02  Benjamin Poulain  <benjamin@webkit.org>
47
48         Make pseudo element matching for style resolution more JIT friendly
49         https://bugs.webkit.org/show_bug.cgi?id=133441
50
51         Reviewed by Antti Koivisto.
52
53         Sharing pseudo elements is a complicated mess shared between the SelectorChecker
54         and the RuleCollector.
55
56         For compiling pseudo element matching, it would be best if all the complexity could
57         be moved to compile time instead of runtime. It is also preferable to keep the compiler
58         independant of the RuleCollector implementation's detail.
59
60         This patch is a first step toward that goal. The main objective here is to make
61         "dynamicPseudo" completely internal to the SelectorChecker.
62         This is mostly a mechanical change, it is likely PseudoElement matching could be simplified
63         further but that is not attempted here.
64
65         Test: fast/css/style-sharing-empty-rule-modification.html
66
67         * css/ElementRuleCollector.cpp:
68         (WebCore::ElementRuleCollector::ruleMatches):
69         The condition regarding pseudo element matching has been moved into SelectorChecker::match().
70
71         This creates an extra cost for querySelector(), but that should be fine since the vast majority
72         of selectors are JIT compiled and never use SelectorChecker in the first place.
73
74         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
75         The loop is changed such that the tree marking (Style::setHasPseudoStyle) could be moved
76         to SelectorChecker.
77
78         The conditions about the security origin for getMatchedCSSRules() and the empty style rules
79         are moved prior to the call to ElementRuleCollector::ruleMatches(). This ensure we keep the same
80         behavior of not adding the pseudo style for empty rules (this could also help with tree marking
81         in general but empty rules are probably uncommon).
82
83         There is one behavior change from making this loop simpler: the SharingRules and StyleInvalidation
84         modes now update their ruleRange. It is useless but it is simpler.
85
86         * css/ElementRuleCollector.h:
87         * css/SelectorChecker.cpp:
88         (WebCore::SelectorChecker::matchRecursively):
89         The tree marking has been moved here.
90
91         * css/SelectorChecker.h:
92         (WebCore::SelectorChecker::match):
93         The pseudo element matching has been moved here.
94
95         * css/StyleResolver.h:
96         (WebCore::checkRegionSelector):
97         * dom/SelectorQuery.cpp:
98         (WebCore::SelectorDataList::selectorMatches):
99
100 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
101
102         Send external playback properties to fullscreen.
103         https://bugs.webkit.org/show_bug.cgi?id=133366
104
105         Reviewed by Simon Fraser.
106
107         Refactor property updates in WebVideoFullscreenModelMediaElement and update
108         setExternalPlayback on webkitcurrentplaybacktargetiswirelesschangedEvent.
109
110         * WebCore.exp.in: Add export for setExternalPlayback.
111         * platform/ios/WebVideoFullscreenInterface.h: add setExternalPlayback
112         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: add setExternalPlayback
113         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
114         (-[WebAVPlayerController isPlayingOnExternalScreen]): added
115         (+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): added
116         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): added
117         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): added
118         * platform/ios/WebVideoFullscreenModelMediaElement.h: add updateForEventName
119         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
120         (WebVideoFullscreenModelMediaElement::setMediaElement): refactor property changes into updateForEventName()
121         (WebVideoFullscreenModelMediaElement::handleEvent): refactor property changes into updateForEventName()
122         (WebVideoFullscreenModelMediaElement::updateForEventName): remove duplicate code, implement for setExternalPlayback
123
124 2014-06-02  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
125
126         WebCore build fix for webreplay
127         https://bugs.webkit.org/show_bug.cgi?id=133401
128
129         Reviewed by Darin Adler.
130
131         * replay/MemoizedDOMResult.cpp:
132         (WebCore::MemoizedDOMResultBase::createFromEncodedResult):
133         Add a default nullptr return in order to avoid a gcc warning.
134         The warning is because of a non-void method that has a case which doesn't return.
135         * replay/ReplayController.cpp:
136         (WebCore::ReplayController::setForceDeterministicSettings):
137         Guard the ScrollingCoordinator with the appropriate #ifdef.
138         * replay/SerializationMethods.cpp:
139         Guard the KeypressCommand with COCOA as it is only present there.
140
141 2014-06-02  Jer Noble  <jer.noble@apple.com>
142
143         Further unreviewed GTK build fix after r169536.
144
145         Update the m_duration contructor in MediaSourceGStreamer.
146
147         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
148         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
149
150 2014-06-02  Jer Noble  <jer.noble@apple.com>
151
152         Unreviewed GTK build fix after r169536.
153
154         Update MediaSourceGStreamer to match new duration parameters.
155
156         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
157         (WebCore::MediaSourceGStreamer::setDuration): Ditto.
158         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
159         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
160
161 2014-06-02  Jer Noble  <jer.noble@apple.com>
162
163         [MSE][Mac] Media does not generate 'ended' event when playing to duration.
164         https://bugs.webkit.org/show_bug.cgi?id=133452
165
166         Reviewed by Eric Carlson.
167
168         Add a boundaryTimeObserver to the AVSampleBufferRenderSynchronizer to detect when
169         playback crosses the duration boundary, and pause in that event. Also refuse to begin
170         playback if the currentTime is beyond the duration. Also, pause playback if duration
171         becomes less than currentTime.
172
173         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
174         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
175         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
176         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
177         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
178         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
179         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
180
181         Update MediaSource::duration() and ::setDuration() to take and give MediaTimes rather than doubles:
182         * Modules/mediasource/MediaSource.cpp:
183         (WebCore::MediaSource::duration): double -> MediaTime.
184         (WebCore::MediaSource::setDuration): Ditto.
185         (WebCore::MediaSource::streamEndedWithError): Ditto.
186         * platform/graphics/MediaSourcePrivate.h: Ditto.
187         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
188         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
189         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Ditto.
190         (WebCore::MediaSourcePrivateAVFObjC::duration): Ditto.
191         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Ditto.
192         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
193         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Ditto.
194         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Ditto.
195         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
196         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
197         (WebCore::MockMediaPlayerMediaSource::updateDuration): Ditto.
198         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
199         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
200         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Ditto.
201         (WebCore::MockMediaSourcePrivate::duration): Ditto.
202         (WebCore::MockMediaSourcePrivate::setDuration): Ditto.
203         * platform/mock/mediasource/MockMediaSourcePrivate.h:
204
205 2014-06-02  Zalan Bujtas  <zalan@apple.com>
206
207         Rename ImagePaintingContext to ImagePaintingOptions.
208         https://bugs.webkit.org/show_bug.cgi?id=133451
209
210         Reviewed by Simon Fraser.
211
212         No change in functionality.
213
214         * WebCore.exp.in:
215         * html/HTMLCanvasElement.cpp:
216         (WebCore::HTMLCanvasElement::paint):
217         * html/canvas/CanvasRenderingContext2D.cpp:
218         (WebCore::CanvasRenderingContext2D::drawImage):
219         * platform/graphics/GraphicsContext.cpp:
220         (WebCore::GraphicsContext::drawImage):
221         (WebCore::GraphicsContext::drawTiledImage):
222         (WebCore::GraphicsContext::drawImageBuffer):
223         * platform/graphics/GraphicsContext.h:
224         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
225         (WebCore::ImagePaintingContext::ImagePaintingContext): Deleted.
226         * rendering/RenderBoxModelObject.cpp:
227         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
228         * rendering/RenderEmbeddedObject.cpp:
229         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
230         * rendering/RenderImage.cpp:
231         (WebCore::RenderImage::paintIntoRect):
232         * rendering/RenderSnapshottedPlugIn.cpp:
233         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
234
235 2014-05-31  Brent Fulgham  <bfulgham@apple.com>
236
237         REGRESSION (r154622): Borders disappear when hovering over cells in table
238         https://bugs.webkit.org/show_bug.cgi?id=133057
239         <rdar://problem/15922359>
240
241         Reviewed by Tim Horton.
242
243         * rendering/RenderTableCell.cpp:
244         (WebCore::RenderTableCell::paintCollapsedBorders): Revert recent
245         non-edge collapsed border optimization due to drawing
246         regressions.
247
248 2014-06-02  Zalan Bujtas  <zalan@apple.com>
249
250         Provide better encapsulation for image related painting properties.
251         https://bugs.webkit.org/show_bug.cgi?id=133434
252
253         Reviewed by Darin Adler.
254
255         Image related drawing property list keeps growing for the functions below and results in
256         multiple overloadings with seemingly random default parameters.
257         
258         GraphicsContext::drawImage()
259         GraphicsContext::drawTiledImage()
260         GraphicsContext::drawImageBuffer()
261         
262         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
263         introducing a new property does not result in yet another overloaded function.
264
265         No change in functionality.
266
267         * WebCore.exp.in:
268         * html/HTMLCanvasElement.cpp:
269         (WebCore::HTMLCanvasElement::paint):
270         * html/canvas/CanvasRenderingContext2D.cpp:
271         (WebCore::CanvasRenderingContext2D::drawImage):
272         (WebCore::CanvasRenderingContext2D::compositeBuffer):
273         * platform/graphics/GraphicsContext.cpp:
274         (WebCore::GraphicsContext::drawImage):
275         (WebCore::GraphicsContext::drawTiledImage):
276         (WebCore::GraphicsContext::drawImageBuffer):
277         * platform/graphics/GraphicsContext.h:
278         (WebCore::ImagePaintingContext::ImagePaintingContext):
279         * platform/graphics/ShadowBlur.cpp:
280         (WebCore::ShadowBlur::endShadowLayer):
281         * platform/graphics/cairo/ImageBufferCairo.cpp:
282         (WebCore::ImageBuffer::draw):
283         * platform/graphics/filters/FEComposite.cpp:
284         (WebCore::FEComposite::platformApplySoftware):
285         * rendering/FilterEffectRenderer.cpp:
286         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
287         * rendering/RenderBoxModelObject.cpp:
288         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
289         * rendering/RenderEmbeddedObject.cpp:
290         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
291         * rendering/RenderImage.cpp:
292         (WebCore::RenderImage::paintReplaced):
293         (WebCore::RenderImage::paintIntoRect):
294         * rendering/RenderSnapshottedPlugIn.cpp:
295         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
296
297 2014-06-02  Commit Queue  <commit-queue@webkit.org>
298
299         Unreviewed, rolling out r169529.
300         https://bugs.webkit.org/show_bug.cgi?id=133447
301
302         caused assert in drawImage() (Requested by zalan on #webkit).
303
304         Reverted changeset:
305
306         "Provide better encapsulation for image related painting
307         properties."
308         https://bugs.webkit.org/show_bug.cgi?id=133434
309         http://trac.webkit.org/changeset/169529
310
311 2014-06-02  Zalan Bujtas  <zalan@apple.com>
312
313         Provide better encapsulation for image related painting properties.
314         https://bugs.webkit.org/show_bug.cgi?id=133434
315
316         Reviewed by Darin Adler.
317
318         Image related drawing property list keeps growing for the functions below and results in
319         multiple overloadings with seemingly random default parameters.
320         
321         GraphicsContext::drawImage()
322         GraphicsContext::drawTiledImage()
323         GraphicsContext::drawImageBuffer()
324         
325         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
326         introducing a new property does not result in yet another overloaded function.
327
328         No change in functionality.
329
330         * WebCore.exp.in:
331         * html/HTMLCanvasElement.cpp:
332         (WebCore::HTMLCanvasElement::paint):
333         * html/canvas/CanvasRenderingContext2D.cpp:
334         (WebCore::CanvasRenderingContext2D::drawImage):
335         (WebCore::CanvasRenderingContext2D::compositeBuffer):
336         * platform/graphics/GraphicsContext.cpp:
337         (WebCore::GraphicsContext::drawImage):
338         (WebCore::GraphicsContext::drawTiledImage):
339         (WebCore::GraphicsContext::drawImageBuffer):
340         * platform/graphics/GraphicsContext.h:
341         (WebCore::ImagePaintingContext::ImagePaintingContext):
342         * platform/graphics/ShadowBlur.cpp:
343         (WebCore::ShadowBlur::endShadowLayer):
344         * platform/graphics/cairo/ImageBufferCairo.cpp:
345         (WebCore::ImageBuffer::draw):
346         * platform/graphics/filters/FEComposite.cpp:
347         (WebCore::FEComposite::platformApplySoftware):
348         * rendering/FilterEffectRenderer.cpp:
349         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
350         * rendering/RenderBoxModelObject.cpp:
351         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
352         * rendering/RenderEmbeddedObject.cpp:
353         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
354         * rendering/RenderImage.cpp:
355         (WebCore::RenderImage::paintReplaced):
356         (WebCore::RenderImage::paintIntoRect):
357         * rendering/RenderSnapshottedPlugIn.cpp:
358         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
359
360 2014-06-02  Kiran  <kiran.guduru@samsung.com>
361
362         Add mock DTMFSender support.
363         https://bugs.webkit.org/show_bug.cgi?id=133298
364
365         Reviewed by Eric Carlson.
366
367         Implemented mock implementation for RTCPeerConnectionHandler. Now creating
368         RTCDTMFSenderHandlerMock and returning while creating DTMFSender instead of
369         returning null.
370        
371         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
372
373         * CMakeLists.txt:
374         * platform/mock/RTCDTMFSenderHandlerMock.cpp: Added.
375         (WebCore::RTCDTMFSenderHandlerMock::RTCDTMFSenderHandlerMock):
376         (WebCore::RTCDTMFSenderHandlerMock::setClient):
377         (WebCore::RTCDTMFSenderHandlerMock::insertDTMF):
378         * platform/mock/RTCDTMFSenderHandlerMock.h: Added.
379         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
380         (WebCore::RTCPeerConnectionHandlerMock::createDTMFSender):
381
382 2014-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com>
383
384         [GTK] media controls should prevent 'click' events from reaching the page
385         https://bugs.webkit.org/show_bug.cgi?id=133402
386
387         Reviewed by Eric Carlson.
388
389         When handling events, we events we need to return true in order
390         that the superclass gets the value and prevents the execution of
391         the default event handler in the page.
392
393         Test: media/media-controls-cancel-events.html
394
395         * Modules/mediacontrols/mediaControlsGtk.js:
396         (ControllerGtk.prototype.handleMuteButtonMouseOver):
397         (ControllerGtk.prototype.handleVolumeBoxMouseOut):
398         (ControllerGtk.prototype.handleCaptionButtonClicked):
399         (ControllerGtk.prototype.handleCaptionButtonMouseOver):
400         (ControllerGtk.prototype.handleCaptionButtonShowMenu):
401         (ControllerGtk.prototype.handleCaptionButtonMouseOut):
402         (ControllerGtk.prototype.handleCaptionMouseOut): Return true to
403         prevent forwarding the event execution.
404
405 2014-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
406
407         CSS JIT: add support for the "not" pseudo class
408         https://bugs.webkit.org/show_bug.cgi?id=133314
409
410         Reviewed by Benjamin Poulain.
411
412         Add :not pseudo class support to CSS JIT. Current implementation
413         doesn't support visitedMatchType. So when link pseudo class appears in
414         :not sub fragment, fallback to the non-JIT implementation.
415
416         Tests: fast/selectors/not-active-hover-quirks.html
417                fast/selectors/not-active-hover-strict.html
418                fast/selectors/pseudo-class-not.html
419
420         * cssjit/SelectorCompiler.cpp:
421         (WebCore::SelectorCompiler::addPseudoClassType):
422         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
423         (WebCore::SelectorCompiler::constructFragments):
424         (WebCore::SelectorCompiler::minimumRegisterRequirements):
425         (WebCore::SelectorCompiler::computeBacktrackingInformation):
426         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
427         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
428         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
429         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
430         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
431         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
432         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation): Deleted.
433
434 2014-06-01  Jer Noble  <jer.noble@apple.com>
435
436         [MSE] Appends of overlapping sample data do not clear existing samples properly.
437         https://bugs.webkit.org/show_bug.cgi?id=133435
438
439         Reviewed by Darin Adler.
440
441         Test: media/media-source/media-source-overlapping-append.html
442
443         The MSE spec has a spec error in how it removes overlapping frames. The intention seems to be
444         to check for overlapping samples only when the incoming sample increases the highest presentation time
445         field. But due to a mismatch in the range of a sample, defined as [start, end), and the check, which 
446         treats the end as inclusive, the overlapping check is almost never run.
447
448         Add the sample comparison logic to match [start, end) ranges, and rename the existing check to differentiate
449         it from the new one:
450         * Modules/mediasource/SampleMap.cpp:
451         (WebCore::SamplePresentationTimeIsInsideRangeComparator::operator()):
452         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
453         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
454         (WebCore::SampleMap::findSamplesWithinPresentationRange):
455         * Modules/mediasource/SampleMap.h:
456
457         Update the overlapping check to occur whenever the highest presentation time increases, and update the
458         logic within that check to catch all overlapping frames.
459         * Modules/mediasource/SourceBuffer.cpp:
460         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
461         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
462         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
463         * Modules/mediasource/SourceBuffer.h:
464         * WebCore.exp.in:
465
466         Add a dump method to MediaSample so that samples can be easily converted to a string for testing.
467         * platform/MediaSample.h:
468         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
469         (WebCore::MediaSampleAVFObjC::presentationSize):
470         (WebCore::MediaSampleAVFObjC::dump):
471
472         Update the Mock MSE implementation to pass along a "generation" field, to aid in testing.
473         * platform/mock/mediasource/MockBox.cpp:
474         (WebCore::MockSampleBox::MockSampleBox):
475         * platform/mock/mediasource/MockBox.h:
476         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
477         (WebCore::MockMediaSample::dump):
478
479         Add a method to internals to dump the buffered samples to string.
480         * Modules/mediasource/SourceBuffer.cpp:
481         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
482         * Modules/mediasource/SourceBuffer.h:
483         * testing/Internals.cpp:
484         (WebCore::Internals::bufferedSamplesForTrackID):
485         * testing/Internals.h:
486         * testing/Internals.idl:
487
488 2014-06-01  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
489
490         getBBox() returns (0,0) when width or height is zero.
491         https://bugs.webkit.org/show_bug.cgi?id=93290
492
493         Reviewed by Philip Rogers.
494
495         The SVG spec states that a width or height of zero for  rects, circles and
496         ellipses is valid but disables rendering of that shape.
497         In this case, getBBox() should return the actual bounding box of the element.
498         Previously, WebKit always returned (0,0,0,0) rather than the
499         correct bounding box. This patch fixes that. 
500
501         Rects and ellipses both now follow the same behaviour where
502         the fall-back code path is only used when the shape will render (e.g. not
503         when a dimension <= 0).
504   
505         This necessitates calling calculateRadiiAndCenter for ellipses even
506         when the calculated values will be discarded in the fall back code path.
507         But calculateRadiiAndCenter is cheap and this avoids making changes 
508         elsewhere to stop CG drawing a zero width (or height) ellipse.  
509
510         Tests: svg/custom/getBBox-js-circle-zerodimension.html
511                svg/custom/getBBox-js-ellipse-zerodimension.html
512                svg/custom/getBBox-js-rect-zerodimension.html
513
514         * rendering/svg/RenderSVGEllipse.cpp:
515         (WebCore::RenderSVGEllipse::updateShapeFromElement):
516         Only follow fall-back code path when shape renders. 
517         width||height==0 is not an error case so calculate bounding box.        
518
519         * rendering/svg/RenderSVGRect.cpp:
520         (WebCore::RenderSVGRect::updateShapeFromElement):
521         Only follow fall-back code path when shape renders. 
522         rx||ry==0 is not an error case so calculate bounding box.        
523
524 2014-06-01  Simon Fraser  <simon.fraser@apple.com>
525
526         Don't scroll to non-integral scroll offsets
527         https://bugs.webkit.org/show_bug.cgi?id=133436
528         <rdar://problem/17088336>
529
530         Reviewed by Darin Adler.
531
532         With the gradual migration of scroll offsets to floating point, we ended
533         up with a fully floating point code path been event scroll deltas and
534         setting scroll positions in the scrolling tree.
535         
536         With some input devices (e.g. Logitech scrollwheel mice), the scroll deltas
537         come in with non-integral values, and that caused the scroll offset to be non-integral,
538         resulting in fuzzy layer contents. So round the scroll position.
539
540         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
541         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
542
543 2014-05-31  Anders Carlsson  <andersca@apple.com>
544
545         Add a LazyNeverDestroyed class template and use it
546         https://bugs.webkit.org/show_bug.cgi?id=133425
547
548         Reviewed by Darin Adler.
549
550         * Modules/webdatabase/DatabaseBackendBase.cpp:
551         (WebCore::guidMutex):
552         * crypto/CryptoAlgorithmRegistry.cpp:
553         (WebCore::registryMutex):
554         * inspector/WorkerDebuggerAgent.cpp:
555         * loader/CrossOriginAccessControl.cpp:
556         (WebCore::isOnAccessControlResponseHeaderWhitelist):
557         * platform/network/NetworkStateNotifier.cpp:
558         (WebCore::networkStateNotifier):
559         * workers/DefaultSharedWorkerRepository.cpp:
560         (WebCore::DefaultSharedWorkerRepository::instance):
561         * workers/DefaultSharedWorkerRepository.h:
562         * workers/WorkerThread.cpp:
563         (WebCore::threadSetMutex):
564         * xml/XMLHttpRequest.cpp:
565         (WebCore::staticData):
566
567 2014-06-01  Zalan Bujtas  <zalan@apple.com>
568
569         Subpixel rendering: Selection gap produces a pixel line overlap on inline boxes.
570         https://bugs.webkit.org/show_bug.cgi?id=133429
571
572         Reviewed by Simon Fraser.
573
574         Do not floor logical right/left values when selection gap is calculated for RenderBlocks.
575         It produces overlapping line/gap because the floored value is intersecting/too far from the
576         non-floored content selection rect.
577
578         Tests: fast/inline/hidpi-selection-gap-and-inline-selection-have-gap-rtl.html
579                fast/inline/hidpi-selection-gap-overlaps-inline-selection.html
580
581         * rendering/RenderBlock.cpp:
582         (WebCore::RenderBlock::logicalLeftSelectionGap):
583         (WebCore::RenderBlock::logicalRightSelectionGap):
584
585 2014-05-31  Timothy Horton  <timothy_horton@apple.com>
586
587         REGRESSION (r169412): Garbage pixels when vertical rubber-banding on http://yvoschaap.com/pmarca/
588         https://bugs.webkit.org/show_bug.cgi?id=133418
589         <rdar://problem/17065494>
590
591         Reviewed by Sam Weinig.
592
593         * WebCore.exp.in:
594         * platform/graphics/FloatPoint.h:
595         (WebCore::toFloatPoint):
596         * platform/graphics/Image.cpp:
597         (WebCore::Image::drawTiled):
598         The manual tiling code previously adjusted the initial
599         tiling source rect so that if the pattern was out of phase,
600         the first row and column would paint only the necessary part
601         of the tile. However, it did not also adjust the destination rect,
602         so the tile was painted in entirely the wrong place.
603         Additional testing (by enabling manual tiling mode for all patterned
604         images and running all of the layout tests) exposed another bug
605         where the last row and column would paint too much, which
606         was resolved by clipping to the outer image's destination rect.
607
608 2014-05-31  Benjamin Poulain  <benjamin@webkit.org>
609
610         CSS JIT cleanup: move two utility functions out of the properties-matcher section
611         https://bugs.webkit.org/show_bug.cgi?id=133427
612
613         Reviewed by Andreas Kling.
614
615         Just move the code, no other modification.
616
617         * cssjit/SelectorCompiler.cpp:
618         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
619         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
620
621 2014-05-31  Darin Adler  <darin@apple.com>
622
623         Viewport percentage tests that resize the viewport are flaky
624         https://bugs.webkit.org/show_bug.cgi?id=133351
625
626         Reviewed by Anders Carlsson.
627
628         * page/FrameView.cpp:
629         (WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
630         The resize event will be sent as a side effect of layout instead.
631         (WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
632         since this is what propagates the new geometry in so the JavaScript code can detect it. Also
633         simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
634         the code enqueues an event for an unknown time in the future. Removed the unneeded code that
635         passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
636         target by default.
637
638 2014-05-31  Anders Carlsson  <andersca@apple.com>
639
640         Don't use std::mutex::try_lock to check if we own a mutex
641         https://bugs.webkit.org/show_bug.cgi?id=133421
642
643         Reviewed by Dan Bernstein.
644
645         According the C++ standard, calling try_lock on a mutex that's already owned by the current thread
646         is undefined behavior, so don't do that.
647
648         * Modules/webdatabase/DatabaseBackendBase.cpp:
649         (WebCore::guidToVersionMap):
650         (WebCore::updateGuidVersionMap):
651         (WebCore::guidToDatabaseMap):
652         (WebCore::guidForOriginAndName):
653
654 2014-05-30  Enrica Casucci  <enrica@apple.com>
655
656         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
657         https://bugs.webkit.org/show_bug.cgi?id=133413
658         <rdar://problem/16948333>
659
660         Reviewed by Benjamin Poulain.
661
662         Adding utility functions and their exports.
663
664         * WebCore.exp.in:
665         * editing/TextIterator.cpp:
666         (WebCore::plainTextReplacingNoBreakSpace):
667         * editing/TextIterator.h:
668         * editing/VisibleUnits.cpp:
669         (WebCore::charactersAroundPosition):
670         (WebCore::characterBeforePosition): Deleted.
671         * editing/VisibleUnits.h:
672
673 2014-05-30  Zalan Bujtas  <zalan@apple.com>
674
675         Cleanup temporary setting of image interpolation quality in GraphicsContext::drawImage*
676         https://bugs.webkit.org/show_bug.cgi?id=133407
677
678         Reviewed by Darin Adler.
679
680         Add helper class to set/reset image interpolation quality value.
681
682         No change in functionality.
683
684         * platform/graphics/GraphicsContext.cpp:
685         (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
686         (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
687         (WebCore::GraphicsContext::drawImage):
688         (WebCore::GraphicsContext::drawTiledImage):
689         (WebCore::GraphicsContext::drawImageBuffer):
690
691 2014-05-30  Myles C. Maxfield  <mmaxfield@apple.com>
692
693         Support -apple-system-font on OS X
694         https://bugs.webkit.org/show_bug.cgi?id=133382
695
696         Addressing post-review comments.
697
698         * platform/mac/WebFontCache.mm:
699         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
700
701 2014-05-30  Prashant Hiremath  <hiremathprashants@gmail.com>
702
703         Remove repetitive header in HTMLInputElement.cpp
704         https://bugs.webkit.org/show_bug.cgi?id=133376
705
706         Reviewed by Anders Carlsson.
707
708         It is just removal repeative headers hence no test needed.
709
710         * html/HTMLInputElement.cpp:
711
712 2014-05-30  Zalan Bujtas  <zalan@apple.com>
713
714         Remove redundant GraphicsContext::drawImage() function.
715         https://bugs.webkit.org/show_bug.cgi?id=133347
716
717         Reviewed by Simon Fraser.
718
719         There are 2 GraphicsContext::drawImage functions with very similar parameter list. This looks
720         to be a source of confusion and results in passing unneeded parameters.
721
722         No change in functionality.
723
724         * html/canvas/CanvasRenderingContext2D.cpp:
725         (WebCore::CanvasRenderingContext2D::drawImage):
726         (WebCore::drawImageToContext):
727         * platform/graphics/GraphicsContext.cpp:
728         (WebCore::GraphicsContext::drawImage):
729         * platform/graphics/GraphicsContext.h:
730         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
731         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
732         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
733         (WebCore::BitmapTextureImageBuffer::updateContents):
734         * rendering/RenderBoxModelObject.cpp:
735         (WebCore::RenderBoxModelObject::paintNinePieceImage):
736
737 2014-05-29  Alex Christensen  <achristensen@webkit.org>
738
739         Prepare css jit for arm64 and other architectures.
740         https://bugs.webkit.org/show_bug.cgi?id=133394
741
742         Reviewed by Benjamin Poulain.
743
744         * cssjit/FunctionCall.h:
745         (WebCore::FunctionCall::swapArguments):
746         * cssjit/RegisterAllocator.h:
747         Use a designated temporary register on arm64 to prevent using a deallocated argument register to swap argument registers in.
748         * cssjit/SelectorCompiler.cpp:
749         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
750         Added assertion to make sure there are enough registers.
751
752 2014-05-29  Benjamin Poulain  <benjamin@webkit.org>
753
754         CSS JIT: add support for the pseudo classes :hover and :active
755         https://bugs.webkit.org/show_bug.cgi?id=133295
756
757         Reviewed by Andreas Kling.
758
759         This patch adds compilation support for :hover and :active. The code generation of both of them is trivial,
760         most of the patch is improving the infrastructure and safety.
761
762         The document compatibility mode is moved to its own typed enum. This ensure the values are exclusives and
763         the native type is known (unsigned char here). The values are changes to binary flags to take advantage of
764         test-and-branch on ARM64 (not used explicitely, it is automatically generated by the MacroAssembler).
765
766         The other important refactoring is the code updating the flags on RenderStyle::NonInheritedFlags.
767         The code was duplicated in some places so it is move into its own function addFlagToElementStyleFromContext().
768
769         The generators themself are very simple. First we check the quirks-mode exceptions, that is generally excluded
770         at compile time because the conditions are almost never met, even in strict mode.
771         Then we have two cases: style resolution and query selector. Almost everything is just function calls.
772
773         * cssjit/SelectorCompiler.cpp:
774         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
775         (WebCore::SelectorCompiler::addPseudoClassType):
776         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagToElementStyleFromContext):
777         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
778         (WebCore::SelectorCompiler::getDocument):
779         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
780         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
781         (WebCore::SelectorCompiler::elementIsActive):
782         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
783         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
784         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
785         (WebCore::SelectorCompiler::elementIsHovered):
786         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
787         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
788         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
789         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
790         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
791         * dom/Document.cpp:
792         (WebCore::Document::Document):
793         (WebCore::Document::setCompatibilityMode):
794         (WebCore::Document::implicitOpen):
795         (WebCore::Document::cloneDataFromDocument):
796         * dom/Document.h:
797         (WebCore::Document::compatibilityModeMemoryOffset):
798         (WebCore::Document::inQuirksMode):
799         (WebCore::Document::inLimitedQuirksMode):
800         (WebCore::Document::inNoQuirksMode):
801         (WebCore::Document::compatibilityMode): Deleted.
802         * html/ImageDocument.cpp:
803         (WebCore::ImageDocument::ImageDocument):
804         * html/MediaDocument.cpp:
805         (WebCore::MediaDocument::MediaDocument):
806         * html/PluginDocument.cpp:
807         (WebCore::PluginDocument::PluginDocument):
808         * html/TextDocument.cpp:
809         (WebCore::TextDocument::TextDocument):
810         * html/parser/HTMLConstructionSite.cpp:
811         (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
812         (WebCore::HTMLConstructionSite::setCompatibilityMode):
813         (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
814         (WebCore::HTMLConstructionSite::insertDoctype):
815         * html/parser/HTMLConstructionSite.h:
816         * loader/DocumentWriter.cpp:
817         (WebCore::DocumentWriter::replaceDocument):
818         * loader/SinkDocument.cpp:
819         (WebCore::SinkDocument::SinkDocument):
820         * page/ios/FrameIOS.mm:
821         (WebCore::Frame::initWithSimpleHTMLDocument):
822         * rendering/style/RenderStyle.h:
823
824 2014-05-28  Jon Honeycutt  <jhoneycutt@apple.com>
825
826         Roll r168668 back in.
827
828         <https://bugs.webkit.org/show_bug.cgi?id=132621>
829
830         Reviewed by Brent Fulgham.
831
832         Tests: fast/events/beforeload-assertion.html
833                fast/events/beforeload-iframe-crash.html
834                fast/events/beforeload-input-time-crash.html
835
836         * WebCore.exp.in:
837         * dom/Document.cpp:
838         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
839         * dom/Document.h:
840         * html/HTMLAppletElement.cpp:
841         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
842         * html/HTMLEmbedElement.cpp:
843         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
844         * html/HTMLObjectElement.cpp:
845         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
846         * page/FrameView.cpp:
847         (WebCore::FrameView::FrameView):
848         (WebCore::FrameView::reset):
849         (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
850         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
851         (WebCore::FrameView::performPostLayoutTasks):
852         * page/FrameView.h:
853         * testing/Internals.cpp:
854         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
855         * testing/Internals.h:
856         * testing/Internals.idl:
857
858 2014-05-29  Myles C. Maxfield  <mmaxfield@apple.com>
859
860         Support -apple-system-font on OS X
861         https://bugs.webkit.org/show_bug.cgi?id=133382
862
863         Reviewed by Simon Fraser.
864
865         Guard on both family names: "-apple-system-font" and "-webkit-system-font"
866
867         Test: platform/mac/fast/text/systemFont.html
868
869         * platform/mac/WebFontCache.mm:
870         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
871
872 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
873
874         Loading <object> from WebArchive crashes
875         https://bugs.webkit.org/show_bug.cgi?id=133386
876         <rdar://problem/13345509>
877
878         Reviewed by Brady Eidson.
879
880         Test: webarchive/loading/object.html
881
882         This (a) fixes the crash, and (b) avoids the crash.
883
884         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy):
885         Some types of substitute data - such as WebArchive - don't contain HTTP result codes,
886         so let's not drop to <object> fallback content when status is 0.
887         And if the load somehow failed anyway, don't crash by trying to deliver substitute data
888         to a finished loader.
889
890 2014-05-29  Alex Christensen  <achristensen@webkit.org>
891
892         [iOS WebGL] Fix depth buffer clearing issue.
893         https://bugs.webkit.org/show_bug.cgi?id=133388
894
895         Reviewed by Dean Jackson.
896
897         No new tests, but this fixes webgl/1.0.1/conformance/canvas/buffer-preserve-test.html.
898
899         * platform/graphics/mac/WebGLLayer.mm:
900         (-[WebGLLayer display]):
901         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
902         (WebCore::GraphicsContext3D::prepareTexture):
903         Moved marking the layer as composited from the mac-only prepareTexture to
904         the end of [WebGLLayer display] which is called by mac and iOS.
905
906 2014-05-29  Jeremy Jones  <jeremyj@apple.com>
907
908         Perserve caption selection in fullscreen.
909         https://bugs.webkit.org/show_bug.cgi?id=133350
910
911         Reviewed by Eric Carlson.
912
913         Use the logic from the inline player to calculate the selected caption index.
914
915         * html/HTMLMediaElement.h:
916         (WebCore::HTMLMediaElement::mediaControlsHost):
917         Expose mediaControlsHost() for use by WebVideoFullscreenModelMediaElement.
918
919         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
920         (WebVideoFullscreenModelMediaElement::updateLegibleOptions):
921         Use logic from buildCaptionsMenu from mediaControlsApple.js.
922
923 2014-05-29  Jeremy Jones  <jeremyj@apple.com>
924
925         Use correct version of requiresFullscreenForVideoPlayback().
926         https://bugs.webkit.org/show_bug.cgi?id=133331
927
928         Reviewed by Eric Carlson.
929
930         Test: media/video-fullscreeen-only-controls.html
931
932         Update the last place not yet using m_mediaSession->requiresFullscreenForVideoPlayback.
933
934         * html/HTMLMediaElement.cpp:
935         (WebCore::HTMLMediaElement::parseAttribute):
936         switch to media session version for requriesFullscreenForVideoPlayback.
937
938 2014-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
939
940         [GTK] Add support for HiDPI icons
941         https://bugs.webkit.org/show_bug.cgi?id=133377
942
943         Reviewed by Martin Robinson.
944
945         Use the GTK+ missing icon at 16 or 32 size depending on the device
946         scale factor.
947
948         * platform/graphics/gtk/ImageGtk.cpp:
949         (WebCore::loadMissingImageIconFromTheme):
950         (WebCore::Image::loadPlatformResource):
951
952 2014-05-29  Owen Taylor  <otaylor@redhat.com>
953
954         [GTK] Add HighDPI support for non-accelerated compositing contents
955         https://bugs.webkit.org/show_bug.cgi?id=131562
956
957         Reviewed by Anders Carlsson.
958
959         No new tests. This will be tested once we have the proper dependencies in the WebKit testing
960         JHBuild.
961
962         * platform/cairo/WidgetBackingStore.h:
963         (WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
964         * platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
965         * platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
966         * platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
967         * platform/graphics/cairo/CairoUtilities.h:
968         * platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
969         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
970         * platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.
971
972 2014-05-28  Brent Fulgham  <bfulgham@apple.com>
973
974         Captions during HLS playback flash/are difficult to readily
975         https://bugs.webkit.org/show_bug.cgi?id=133365
976         <rdar://problem/16584132>
977
978         Reviewed by Eric Carlson.
979
980         Correct two problems:
981         1. Add new logic to handle cues that are identical to existing cues, except
982            that they cover a slightly later moment in playback. For example, a cue
983            encoding device might emit a cue at 24 fps, with many of the cues containing
984            the same content but covering only 1/24th of a second.
985            
986            Rather than hiding and displaying our cues at the cue encoding rate, we should
987            simply continue to display the same cue as long as the content is unchanged.
988         2. The cue "isEqual" logic for TextTrackCueGeneric improperly short-circuited the
989            VTTCue isEqual logic. This was done to avoid a false failure due to the cue
990            type being 'generic' rather than 'vtt', but incorrectly treated cues with
991            non-matching text as equal.
992
993         * html/track/DataCue.cpp:
994         (WebCore::DataCue::cueContentsMatch): Move cue comparison code to new method that
995         doesn't check that the 'type' of the cue is identical.
996         (WebCore::DataCue::isEqual): Modified to use new 'cueContentsMatch' method.
997         (WebCore::DataCue::isStartOfCue): Confirms cues match except for start and end times.
998         * html/track/DataCue.h:
999         * html/track/TextTrack.cpp:
1000         (WebCore::TextTrack::hasCue): Modify to check if a new cue is simply a continuation
1001         of an existing cue.
1002         * html/track/TextTrackCue.cpp:
1003         (WebCore::TextTrackCue::cueContentsMatch): New method containing the equality code
1004         that used to live in 'isEqual'.
1005         (WebCore::TextTrackCue::isEqual): Modified to use new 'cueContentsMatch' method.
1006         (WebCore::TextTrackCue::isStartOfCue): Confirms cues match except for start and
1007         end times.
1008         * html/track/TextTrackCue.h:
1009         * html/track/TextTrackCueGeneric.cpp:
1010         (WebCore::TextTrackCueGeneric::cueContentsMatch): New method containing the equality
1011         code that used to live in 'isEqual'.
1012         (WebCore::TextTrackCueGeneric::isEqual): Modified to use new 'cueContentsMatch' method.
1013         (WebCore::TextTrackCueGeneric::isStartOfCue): Confirms cues match except for start and
1014         end times.
1015         * html/track/TextTrackCueGeneric.h:
1016         * html/track/VTTCue.cpp:
1017         (WebCore::VTTCue::cueContentsMatch): New method containing the equality code that
1018         used to live in 'isEqual'.
1019         (WebCore::VTTCue::isEqual): Modified to use new 'cueContentsMatch' method.
1020         (WebCore::VTTCue::isStartOfCue): Confirms cues match except for start and end times.
1021         * html/track/VTTCue.h:
1022
1023 2014-05-28  Oliver Hunt  <oliver@apple.com>
1024
1025         Whoops, update bindings tests results.
1026
1027 2014-05-28  Oliver Hunt  <oliver@apple.com>
1028
1029         Make DOM properties exposed as instance properties use the base object instead of |this|
1030         https://bugs.webkit.org/show_bug.cgi?id=133353
1031
1032         Reviewed by Geoffrey Garen.
1033
1034         Make the bindings generator emit code that uses the base object for
1035         a property, rather than the this object. This means that attributes
1036         that we need to be treated as instance properties will match their old
1037         instance-based behaviour.
1038
1039         * bindings/scripts/CodeGeneratorJS.pm:
1040         (InterfaceRequiresAttributesOnInstanceForCompatibility):
1041         (InterfaceRequiresAttributesOnInstance):
1042         (GetCastingHelperForBaseObject):
1043         (GenerateImplementation):
1044         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1045         (WebCore::jsTestActiveDOMObjectExcitingAttr):
1046         * bindings/scripts/test/JS/JSTestException.cpp:
1047         (WebCore::jsTestExceptionName):
1048         * bindings/scripts/test/JS/JSTestInterface.cpp:
1049         (WebCore::jsTestInterfaceImplementsStr3):
1050         (WebCore::jsTestInterfaceSupplementalStr3):
1051         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
1052         (WebCore::setJSTestInterfaceImplementsStr2):
1053         (WebCore::setJSTestInterfaceImplementsStr3):
1054         (WebCore::setJSTestInterfaceImplementsNode):
1055         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1056         (WebCore::setJSTestInterfaceSupplementalStr2):
1057         (WebCore::setJSTestInterfaceSupplementalStr3):
1058         (WebCore::setJSTestInterfaceSupplementalNode):
1059         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1060         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1061         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1062         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1063         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1064         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1065         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1066         (WebCore::jsTestTypedefsConstructorTestSubObj):
1067         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1068         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1069         (WebCore::setJSTestTypedefsAttrWithGetterException):
1070         (WebCore::setJSTestTypedefsAttrWithSetterException):
1071         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1072         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1073
1074 2014-05-28  Simon Fraser  <simon.fraser@apple.com>
1075
1076         [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
1077         https://bugs.webkit.org/show_bug.cgi?id=133352
1078
1079         Reviewed by Tim Horton.
1080
1081         When adjusting layers inside accelerated overflow-scroll, pass a delta
1082         down to descendant nodes. Fix behavior of sticky nodes inside fixed nodes
1083         inside overflow scroll (sticky should only be affected if the parent node
1084         is a scrolling node).
1085
1086         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1087         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange): Just remove
1088         some .get()
1089         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1090         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange): Remove .get()s.
1091         We never care about the cumulative delta here, because sticky nodes only respond to
1092         changes in their direct scrolling ancestors. Only adjust the layer if the parent
1093         is a scrolling node.
1094
1095 2014-05-27  Chris Fleizach  <cfleizach@apple.com>
1096
1097         AX: WebKit does not recognize ARIA 1.1 tables
1098         https://bugs.webkit.org/show_bug.cgi?id=133163
1099
1100         Reviewed by Darin Adler.
1101
1102         The AXObjectCache code that determines which object to create based on the role needs to be token fallback aware.
1103
1104         Test: accessibility/table-fallback-roles-expose-element-attributes.html
1105
1106         * accessibility/AXObjectCache.cpp:
1107         (WebCore::nodeHasRole):
1108
1109 2014-05-28  Radu Stavila  <stavila@adobe.com>
1110
1111         REGRESSION (r168046): Invalid layout in multicol
1112         https://bugs.webkit.org/show_bug.cgi?id=133322
1113
1114         Reviewed by Antti Koivisto.
1115
1116         In some situations, deleting the line boxes of a multicol element causes the line to region
1117         link to become invalid.
1118
1119         Test: fast/multicol/newmulticol/multicol-inside-multicol.html
1120
1121         * rendering/RenderFlowThread.cpp:
1122         (WebCore::RenderFlowThread::clearLinesToRegionMap):
1123         (WebCore::RenderFlowThread::deleteLines):
1124         (WebCore::RenderFlowThread::willBeDestroyed):
1125         * rendering/RenderFlowThread.h:
1126
1127 2014-05-28  Ryuan Choi  <ryuan.choi@samsung.com>
1128
1129         Remove DocumentThreadableLoaderClient.h
1130         https://bugs.webkit.org/show_bug.cgi?id=133341
1131
1132         Reviewed by Gyuyoung Kim.
1133
1134         DocumentThreadableLoaderClient is not used anymore.
1135
1136         * WebCore.order:
1137         * loader/DocumentThreadableLoader.cpp:
1138         (WebCore::DocumentThreadableLoader::redirectReceived):
1139         * loader/DocumentThreadableLoaderClient.h: Removed.
1140         * loader/ThreadableLoaderClient.h:
1141         (WebCore::ThreadableLoaderClient::isDocumentThreadableLoaderClient): Deleted.
1142
1143 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1144
1145         Unreviewed. Update GObject DOM bindings symbols file after r169017.
1146
1147         * bindings/gobject/webkitdom.symbols: Add webkit_dom_navigator_get_hardware_concurrency.
1148
1149 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1150
1151         REGRESSION(r168868): [GTK] Element.offset* client* scroll* API changed
1152         https://bugs.webkit.org/show_bug.cgi?id=133313
1153
1154         Reviewed by Philippe Normand.
1155
1156         Keep old API that uses long also for GObject bindings.
1157
1158         * dom/Element.idl:
1159
1160 2014-05-27  Commit Queue  <commit-queue@webkit.org>
1161
1162         Unreviewed, rolling out r169400.
1163         https://bugs.webkit.org/show_bug.cgi?id=133338
1164
1165         Broke the iOS build in
1166         LocalizedDateCache::calculateMaximumWidth() (Requested by smfr
1167         on #webkit).
1168
1169         Reverted changeset:
1170
1171         "SVG TextRuns do not always get RenderingContexts"
1172         https://bugs.webkit.org/show_bug.cgi?id=133198
1173         http://trac.webkit.org/changeset/169400
1174
1175 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
1176
1177         REGRESSION (Margin tiles): Background gradient on dom.spec.whatwg.org is very slow to render
1178         https://bugs.webkit.org/show_bug.cgi?id=133335
1179         <rdar://problem/17011392>
1180
1181         Reviewed by Simon Fraser.
1182
1183         * platform/graphics/Image.cpp:
1184         (WebCore::Image::drawTiled):
1185         Make cross-platform and use some iOS code which avoids patterned drawing when the pattern buffer
1186         would be very large. Instead, it calls draw() repeatedly over the pattern space, avoiding the allocation
1187         of a huge (in the case of bug 133335, nearly 2GB) buffer.
1188
1189 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
1190
1191         [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
1192         https://bugs.webkit.org/show_bug.cgi?id=133334
1193         <rdar://problem/16462535>
1194
1195         Reviewed by Tim Horton.
1196
1197         When the scroll position changes in an accelerated overflow-scroll element, we have
1198         to update child nodes in the scrolling tree for position:sticky. That requires a
1199         more generic ability to update the scrolling tree after some arbitrary zoom or
1200         scroll. To do this, we need to know the current fixed position rect, rather than
1201         having it passed in.
1202         
1203         So make the fixed position rect available from ScrollingTree, and make it possible
1204         to get the current scrollPosition() from any ScrollingTreeScrollingNode.
1205         
1206         Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
1207         and have it update descendant layers.
1208         
1209         Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
1210         constraints math, using the scroll position of the parent node if appropriate.
1211
1212         * page/scrolling/ScrollingTree.h:
1213         * page/scrolling/ScrollingTreeScrollingNode.h:
1214         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1215         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1216         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1217         (WebCore::ScrollingTreeIOS::fixedPositionRect):
1218         * page/scrolling/ios/ScrollingTreeIOS.h:
1219         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1220         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
1221
1222 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
1223
1224         Do some renaming in the scrolling tree
1225         https://bugs.webkit.org/show_bug.cgi?id=133333
1226
1227         Reviewed by Tim Horton.
1228
1229         Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
1230         since this goes deep and to indicate that it's about layer updating.
1231         
1232         Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
1233         this is the custom fixed-position rect that changes on zooming.
1234
1235         * page/scrolling/ScrollingTree.cpp:
1236         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
1237         * page/scrolling/ScrollingTree.h:
1238         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
1239         * page/scrolling/ScrollingTreeNode.h:
1240         * page/scrolling/ScrollingTreeScrollingNode.h:
1241         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
1242         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1243         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange):
1244         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1245         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1246         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1247         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
1248         (WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange): Deleted.
1249         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1250         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1251         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
1252         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1253         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1254         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
1255         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange): Deleted.
1256
1257 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
1258
1259         Instantiate a ScrollingTreeMac on Mac
1260         https://bugs.webkit.org/show_bug.cgi?id=133332
1261
1262         Reviewed by Tim Horton.
1263
1264         Mac previously instantiated a ThreadedScrollingTree, but this has no platform
1265         knowledge. To support future expansion, create a ScrollingTreeMac subclass and
1266         instantiate that on Mac.
1267         
1268         Also protect ScrollingCoordinatorMac in PLATFORM(MAC) #ifdefs and remove it from the
1269         EXCLUDED_SOURCE_FILE_NAMES list in the xcconfig file, following general trends.
1270
1271         * Configurations/WebCore.xcconfig:
1272         * WebCore.xcodeproj/project.pbxproj:
1273         * page/scrolling/ThreadedScrollingTree.cpp:
1274         (WebCore::ThreadedScrollingTree::create): Deleted.
1275         * page/scrolling/ThreadedScrollingTree.h:
1276         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1277         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1278         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
1279         * page/scrolling/mac/ScrollingTreeMac.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
1280         (ScrollingTreeMac::create):
1281         (ScrollingTreeMac::ScrollingTreeMac):
1282         * page/scrolling/mac/ScrollingTreeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
1283
1284 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
1285
1286         Prepare for position:sticky support inside accelerated overflow-scroll with WK2
1287         https://bugs.webkit.org/show_bug.cgi?id=133329
1288
1289         Reviewed by Tim Horton.
1290
1291         RenderLayerCompositor::computeStickyViewportConstraints() was always using
1292         the viewport rect as the constraining rect for sticky position. This is not
1293         correct when inside overflow:scroll.
1294         
1295         Refactor code in RenderBoxModelObject to make getting the rect easy, and use
1296         it to compute the constraints.
1297
1298         * rendering/RenderBoxModelObject.cpp:
1299         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
1300         (WebCore::RenderBoxModelObject::stickyPositionOffset):
1301         * rendering/RenderBoxModelObject.h:
1302         * rendering/RenderLayerCompositor.cpp:
1303         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
1304
1305 2014-05-27  Bem Jones-Bey  <bjonesbe@adobe.com>
1306
1307         vw/vh units used as font/line-height values don't scale with the viewport
1308         https://bugs.webkit.org/show_bug.cgi?id=87846
1309
1310         Reviewed by Darin Adler.
1311
1312         This patch moves the resolution of viewport units to style recalc
1313         time. Currently viewport units are left unresolved during style
1314         recalcs, which leads to many problems with viewport units. Moving the
1315         resolution will fix these problems, as well as reduce the plumbing
1316         that goes on.
1317
1318         This patch touches a lot of files since the valueForLength functions
1319         no longer need a RenderView. The interesting changes are in:
1320
1321         - CSSToLengthConversionData -> CSSPrimitiveValue: for moving
1322             resolution to style recalc time.
1323         - Length / LengthFunctions: no longer needs to know about viewport
1324             units.
1325         - FrameView -> Document -> StyleResolver: for scheduling style recalcs
1326             upon resize
1327
1328         Note that getComputedStyle will now return pixel values when viewport
1329         units are used. This behavior matches Firefox and the css3-cascade
1330         spec.
1331
1332         This is based on a Blink patch by timloh@chromium.org.
1333
1334         Tests: css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html
1335                css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html
1336                css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html
1337                css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html
1338                css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html
1339
1340         * WebCore.exp.in: Remove RenderView argument to floatValueForLength.
1341         * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 
1342         (getAttributeSetForAccessibilityObject): Remove RenderView argument.
1343         * css/BasicShapeFunctions.cpp:
1344         (WebCore::convertToLength): Ditto.
1345         (WebCore::floatValueForCenterCoordinate): Ditto.
1346         * css/BasicShapeFunctions.h: Ditto.
1347         * css/CSSCalculationValue.cpp:
1348         (WebCore::unitCategory): Remove special handling for viewport units,
1349             as they get resolved to pixels.
1350         (WebCore::createCSS): Ditto.
1351         * css/CSSComputedStyleDeclaration.cpp:
1352         (WebCore::positionOffsetValue): Remove RendewView argument.
1353         (WebCore::getBorderRadiusCornerValues): Remove handling of viewport
1354             units, as they are already resolve to pixels here.
1355         (WebCore::getBorderRadiusCornerValue): Remove RenderView argument.
1356         (WebCore::getBorderRadiusShorthandValue): Ditto.
1357         (WebCore::specifiedValueForGridTrackBreadth): Remove handling of
1358             viewport units, as they are already resolved to pixels here.
1359         (WebCore::specifiedValueForGridTrackSize): Remove RenderView argument.
1360         (WebCore::valueForGridTrackList): Ditto.
1361         (WebCore::lineHeightFromStyle): Ditto.
1362         (WebCore::ComputedStyleExtractor::propertyValue): Ditto.
1363         * css/CSSGradientValue.cpp:
1364         (WebCore::CSSLinearGradientValue::createGradient): Pass RenderView to
1365             CSSToLengthConversionData constructor.
1366         (WebCore::CSSRadialGradientValue::createGradient): Ditto.
1367         * css/CSSPrimitiveValue.cpp:
1368         (WebCore::CSSPrimitiveValue::unitCategory): Remove handling of
1369             viewport units, as they get resolved to pixels.
1370         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
1371         (WebCore::CSSPrimitiveValue::init): Ditto.
1372         (WebCore::CSSPrimitiveValue::computeLengthDouble): Resolve viewport
1373             units to pixels.
1374         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Remove
1375         handling of viewport units, since they get resolved to pixels.
1376         (WebCore::CSSPrimitiveValue::viewportPercentageLength): Deleted.
1377         * css/CSSPrimitiveValue.h:
1378         (WebCore::CSSPrimitiveValue::isLength): Remove special handling of
1379             viewport units, since they get resolved to pixels.
1380         * css/CSSPrimitiveValueMappings.h:
1381         (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
1382         * css/CSSToLengthConversionData.cpp:
1383         (WebCore::CSSToLengthConversionData::viewportWidthFactor): Caclulate
1384             conversion factor for viewport units to pixels. Note this does not
1385             set hasViewportUnits on the RenderStyle if computing the font
1386             size, because in the font size case, the RenderStyle is the
1387             parent's style, not the current renderer's style.
1388         (WebCore::CSSToLengthConversionData::viewportHeightFactor): Ditto.
1389         (WebCore::CSSToLengthConversionData::viewportMinFactor): Ditto.
1390         (WebCore::CSSToLengthConversionData::viewportMaxFactor): Ditto.
1391         * css/CSSToLengthConversionData.h:
1392         (WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add
1393             RenderView parameter, and make RenderStyle non-const so that
1394             hasViewportUnits can be set on the Style..
1395         (WebCore::CSSToLengthConversionData::style): style is now non-const.
1396         (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom): Handle
1397             RenderView argument.
1398         * css/CSSToStyleMap.cpp:
1399         (WebCore::CSSToStyleMap::mapFillXPosition): Remove handling of
1400             viewport units, as they are already resolved to pixels here.
1401         (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
1402         * css/DeprecatedStyleBuilder.cpp:
1403         (WebCore::ApplyPropertyLength::applyValue): Ditto.
1404         (WebCore::ApplyPropertyBorderRadius::applyValue): Ditto.
1405         (WebCore::ApplyPropertyComputeLength::applyValue): Ditto.
1406         (WebCore::ApplyPropertyFontSize::applyValue): Ditto.
1407         (WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
1408         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Ditto.
1409         (WebCore::ApplyPropertyWordSpacing::applyValue): Ditto.
1410         (WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
1411         (WebCore::ApplyPropertyTextIndent::applyValue): Ditto.
1412         * css/LengthFunctions.cpp:
1413         (WebCore::minimumIntValueForLength): Remove RenderView argument.
1414         (WebCore::intValueForLength): Remove RenderView argument and
1415             roundPecentages.
1416         (WebCore::minimumValueForLength): Remove RenderView argument, and
1417             special handling of viewport units.
1418         (WebCore::valueForLength): Ditto.
1419         (WebCore::floatValueForLength): Ditto.
1420         (WebCore::floatSizeForLengthSize): Remove RenderView argument.
1421         * css/LengthFunctions.h: Ditto.
1422         * css/MediaQueryEvaluator.cpp:
1423         (WebCore::MediaQueryEvaluator::eval): Add RenderView argument for
1424             CSSToLengthConversionData constuctor.
1425         * css/StyleResolver.cpp:
1426         (WebCore::StyleResolver::State::clear): Change to 0 arg constructor
1427             for CSSToLengthConversionData.
1428         (WebCore::StyleResolver::State::updateConversionData): In order to get
1429             the RenderView, we need to have a valid Element set on the state.
1430             Since this means that we need to set the conversion data in more
1431             places, move the contruction of conversion data into this helper
1432             method.
1433         (WebCore::StyleResolver::State::initElement): Make sure conversion
1434             data is up to date.
1435         (WebCore::StyleResolver::State::initForStyleResolve): Ditto.
1436         (WebCore::StyleResolver::State::setStyle): When the style is set, we
1437             need to make sure to update the conversion data.
1438         (WebCore::StyleResolver::styleForElement): If the style has viewport
1439             units, flage the document so that we can make sure to recalc the
1440             viewport unit values when the viewport is resized.
1441         (WebCore::StyleResolver::pseudoStyleForElement): Ditto.
1442         (WebCore::StyleResolver::updateFont): Make sure the font having
1443             viewport units updates the style.
1444         (WebCore::StyleResolver::convertToIntLength): Remove handling of
1445         viewport units, as they are resolved to pixels.
1446         (WebCore::StyleResolver::convertToFloatLength): Ditto.
1447         (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
1448             Invalidate the matched properties cache for styles with viewport
1449             units when the viewport is resized.
1450         (WebCore::createGridTrackBreadth): Remove handling of viewport units,
1451             as they are resolved to pixels.
1452         (WebCore::StyleResolver::applyProperty): Ditto.
1453         (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange):
1454             Rename to be less confusing, since it has nothing to do with
1455             viewport units.
1456         (WebCore::StyleResolver::createFilterOperations): Remove handling of
1457             viewport units, as they are resolved to pixels.
1458         (WebCore::StyleResolver::affectedByViewportChange): Deleted.
1459         (WebCore::StyleResolver::viewportPercentageValue): Deleted.
1460         * css/StyleResolver.h:
1461         (WebCore::StyleResolver::State::State): C++11 cleanup: 0 -> nullptr.
1462         (WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Set if
1463             the font size is specified in viewport units.
1464         (WebCore::StyleResolver::State::fontSizeHasViewportUnits): Ditto.
1465         (WebCore::StyleResolver::State::setStyle): Deleted.
1466         * css/TransformFunctions.cpp:
1467         (WebCore::convertToFloatLength): Remove handling of viewport units,
1468             since they are resolved to pixels.
1469         * dom/Document.cpp:
1470         (WebCore::Document::Document): Add flag to determine if some style in
1471             the document has viewport units.
1472         (WebCore::Document::pageSizeAndMarginsInPixels): Remove RenderView
1473             argument.
1474         (WebCore::Document::updateViewportUnitsOnResize): Mark elements with
1475             viewport units for style recalc when the viewport size has
1476             changed.
1477         * dom/Document.h:
1478         (WebCore::Document::setHasStyleWithViewportUnits): Flag to determine
1479             if some style in the document has viewport units.
1480         (WebCore::Document::hasStyleWithViewportUnits): Ditto.
1481         * html/HTMLAreaElement.cpp:
1482         (WebCore::HTMLAreaElement::getRegion): Remove RenderView argument.
1483         * page/FrameView.cpp:
1484         (WebCore::FrameView::layout): When the viewport is resized, call
1485             updateViewportUnitsOnResize on the document.
1486         * platform/Length.h:
1487         (WebCore::Length::isSpecified): Remove handling of viewport units,
1488             since they are now resolved to pixels.
1489         (WebCore::Length::viewportPercentageLength): Deleted.
1490         (WebCore::Length::isViewportPercentage): Deleted.
1491         * rendering/ClipPathOperation.h:
1492         (WebCore::ShapeClipPathOperation::pathForReferenceRect): Remove
1493             RenderView argument.
1494         (WebCore::BoxClipPathOperation::pathForReferenceRect): Ditto.
1495         * rendering/RenderBlock.cpp:
1496         (WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): Remove
1497             handling of viewport units, since they get updated by
1498             updateViewportUnitsOnResize when the viewport is resized.
1499         (WebCore::RenderBlock::nodeAtPoint): Remove RenderView argument.
1500         (WebCore::RenderBlock::lineHeight): Ditto.
1501         * rendering/RenderBox.cpp:
1502         (WebCore::RenderBox::paintBoxDecorations): Remove RenderView argument.
1503         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1504             Remove handling of viewport units, as they are resolved to pixels.
1505         (WebCore::RenderBox::computePercentageLogicalHeight): Ditto.
1506         (WebCore::RenderBox::computeReplacedLogicalWidthUsing): Ditto.
1507         (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Ditto.
1508         (WebCore::RenderBox::hasViewportPercentageLogicalHeight): Deleted.
1509         * rendering/RenderBox.h:
1510         * rendering/RenderBoxModelObject.cpp:
1511         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): Remove
1512             RenderView argument.
1513         (WebCore::RenderBoxModelObject::calculateFillTileSize): Remove
1514             handling of viewport units, as they are resolved to pixels.
1515         (WebCore::computeBorderImageSide): Remove RenderView argument.
1516         (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
1517         (WebCore::RenderBoxModelObject::paintBorder): Ditto.
1518         (WebCore::RenderBoxModelObject::paintBoxShadow): Ditto.
1519         * rendering/RenderElement.cpp:
1520         (WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.
1521         * rendering/RenderElement.h:
1522         (WebCore::RenderElement::valueForLength): Remove unused
1523             roundPercentages argument.
1524         (WebCore::RenderElement::minimumValueForLength): Remove unused
1525             RoundPercentages and RenderView arguments.
1526         * rendering/RenderGrid.cpp:
1527         (WebCore::RenderGrid::layoutGridItems): Remove handling of viewport
1528             units as they are resolved to pixels.
1529         * rendering/RenderInline.cpp:
1530         (WebCore::computeMargin): Ditto.
1531         (WebCore::RenderInline::lineHeight): Remove RenderView argument.
1532         * rendering/RenderLayer.cpp:
1533         (WebCore::RenderLayer::setupClipPath): Ditto.
1534         * rendering/RenderLineBreak.cpp:
1535         (WebCore::RenderLineBreak::lineHeight): Ditto.
1536         * rendering/RenderScrollbarPart.cpp:
1537         (WebCore::calcScrollbarThicknessUsing): Ditto.
1538         (WebCore::RenderScrollbarPart::computeScrollbarWidth): Ditto.
1539         (WebCore::RenderScrollbarPart::computeScrollbarHeight): Ditto.
1540         * rendering/RenderTable.cpp:
1541         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1542             Remove handling of viewport units, since they are resolved to
1543             pixels.
1544         (WebCore::RenderTable::computePreferredLogicalWidths): Now that
1545             viewport unit values are resolved to pixels at style recalc time,
1546             no special checking is needed to handle them, so update the
1547             comment to reflect that.
1548         * rendering/RenderThemeIOS.mm:
1549         (WebCore::applyCommonButtonPaddingToStyle): Add RenderView argument to
1550             CSSToLengthConversionData constructor.
1551         (WebCore::RenderThemeIOS::adjustButtonStyle): Ditto.
1552         * rendering/RenderThemeMac.mm:
1553         (WebCore::RenderThemeMac::paintMenuListButtonGradients): Remove
1554             RenderView argument.
1555         * rendering/RenderView.cpp:
1556         (WebCore::RenderView::layout): Remove handling of viewport units,
1557             since they are resolved to pixels.
1558         * rendering/RootInlineBox.cpp:
1559         (WebCore::RootInlineBox::ascentAndDescentForBox): Remove RenderView
1560             argument.
1561         * rendering/shapes/Shape.cpp:
1562         (WebCore::Shape::createShape): Remove RenderView argument.
1563         * rendering/shapes/Shape.h:
1564         * rendering/shapes/ShapeOutsideInfo.cpp:
1565         (WebCore::ShapeOutsideInfo::computedShape): Ditto.
1566         * rendering/style/BasicShapes.cpp:
1567         (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Ditto.
1568         (WebCore::BasicShapeCircle::path): Ditto.
1569         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
1570         (WebCore::BasicShapeEllipse::path): Ditto.
1571         (WebCore::BasicShapePolygon::path): Ditto.
1572         (WebCore::floatSizeForLengthSize): Ditto.
1573         (WebCore::BasicShapeInset::path): Ditto.
1574         * rendering/style/BasicShapes.h:
1575         * rendering/style/RenderStyle.cpp:
1576         (WebCore::calcRadiiFor): Ditto.
1577         (WebCore::RenderStyle::getRoundedBorderFor): Ditto.
1578         (WebCore::RenderStyle::computedLineHeight): Remove handling of
1579             viewport units since they are resolved to pixels.
1580         * rendering/style/RenderStyle.h:
1581         (WebCore::RenderStyle::setHasViewportUnits): Set if this style has
1582         a property set with viewport units.
1583         (WebCore::RenderStyle::hasViewportUnits): Ditto.
1584         * rendering/svg/RenderSVGRoot.cpp:
1585         (WebCore::resolveLengthAttributeForSVG): Remove RenderView argument.
1586         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Ditto.
1587         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
1588         * rendering/svg/SVGRenderingContext.cpp:
1589         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Ditto.
1590
1591 2014-05-27  Zoltan Horvath  <zoltan@webkit.org>
1592
1593         [CSS Shapes] serialization of the computed value should omit the default radii
1594         https://bugs.webkit.org/show_bug.cgi?id=132747
1595
1596         Reviewed by Darin Adler.
1597
1598         We should omit closest-side value, whereever is possible. Specification:
1599         http://www.w3.org/TR/2014/CR-css-shapes-1-20140320/#basic-shape-computed-values 
1600         This change aligns the behavior to the specification.
1601
1602         Added new test cases for the shape-outside parsing tests.
1603
1604         * css/CSSBasicShapes.cpp:
1605         (WebCore::buildCircleString):
1606         (WebCore::CSSBasicShapeCircle::cssText):
1607         (WebCore::CSSBasicShapeEllipse::cssText):
1608
1609 2014-05-27  Commit Queue  <commit-queue@webkit.org>
1610
1611         Unreviewed, rolling out r169399.
1612         https://bugs.webkit.org/show_bug.cgi?id=133326
1613
1614         Causes assertion failures in tests.  See
1615         http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK1%20(Tests)/r169399%20(5622)/results.html
1616         (Requested by mlam on #webkit).
1617
1618         Reverted changeset:
1619
1620         "Caret's screen position does not update during an overflow
1621         scroll"
1622         https://bugs.webkit.org/show_bug.cgi?id=133256
1623         http://trac.webkit.org/changeset/169399
1624
1625 2014-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
1626
1627         Lists styled with SVG fonts are not rendered as expected
1628         https://bugs.webkit.org/show_bug.cgi?id=133198
1629
1630         Reviewed by Simon Fraser.
1631
1632         There were a couple places in RenderListMarker and RenderMenuList that were
1633         implicitly creating TextRuns by passing a String to a function which
1634         expected a TextRun. Because TextRun has a constructor which takes a single
1635         String and isn't marked explicit, TextRuns were being created without
1636         any of the associated code that initializes the TextRun (such as creating
1637         a RenderingContext if necessary).
1638
1639         This patch marks the aforementioned constructor as "explicit" to discourage
1640         such behavior in the future.
1641
1642         Test: svg/custom/list-items-with-svg-font-family.html
1643
1644         * platform/graphics/TextRun.h:
1645         (WebCore::TextRun::TextRun): Mark constructors as explicit.
1646         * rendering/RenderListMarker.cpp:
1647         (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
1648         RenderBlock::constructTextRun.
1649         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
1650         * rendering/RenderMenuList.cpp:
1651         (RenderMenuList::updateOptionsWidth): Ditto.
1652
1653 2014-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
1654
1655         Caret's screen position does not update during an overflow scroll
1656         https://bugs.webkit.org/show_bug.cgi?id=133256
1657
1658         Reviewed by Simon Fraser.
1659
1660         During a scroll, we set a flag which caret position is gated on, but we never
1661         actually invalidate the caret's position. This patch does so.
1662
1663         Test: editing/input/caret-position-during-scroll.html
1664
1665         * editing/FrameSelection.h:
1666         * rendering/RenderLayer.cpp:
1667         (WebCore::RenderLayer::scrollTo):
1668
1669 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
1670
1671         Turn on the LayerPool for iOS
1672         https://bugs.webkit.org/show_bug.cgi?id=133299
1673
1674         Reviewed by Antti Koivisto.
1675
1676         * Configurations/WebCore.xcconfig:
1677         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1678         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1679         * platform/graphics/ca/mac/TileController.mm:
1680         (WebCore::TileController::createTileLayer):
1681         * platform/graphics/ca/mac/TileGrid.mm:
1682         (WebCore::TileGrid::removeTiles):
1683         Turn on the LayerPool for iOS.
1684         We've used this on Mac for a long time, and the WebKit1
1685         ("legacy") iOS TileCache also had a similar pool.
1686         This helps a good bit with flashiness while scrolling.
1687
1688 2014-05-27  David Hyatt  <hyatt@apple.com>
1689
1690         REGRESSION: Audio volume scrubber does not show volume level thumb
1691         <rdar://problem/16902004>
1692         https://bugs.webkit.org/show_bug.cgi?id=133310
1693
1694         Reviewed by Dean Jackson.
1695
1696         This was just a silly mistake on my part with the setting of the pagination
1697         layers. Layers inside transforms are supposed to clear out their pagination
1698         status based off their ancestor containing block layers, and not off the
1699         enclosing pagination layer.
1700         
1701         Added fast/multicol/pagination/nested-transforms.html
1702
1703         * rendering/RenderLayer.cpp:
1704         (WebCore::RenderLayer::updatePagination):
1705
1706 2014-05-27  Eric Carlson  <eric.carlson@apple.com>
1707
1708         [Mac] media controls should prevent 'click' events from reaching the page
1709         https://bugs.webkit.org/show_bug.cgi?id=133268
1710
1711         Reviewed by Jer Noble.
1712
1713         Test: media/media-controls-cancel-events.html
1714
1715         * Modules/mediacontrols/mediaControlsApple.js:
1716         (Controller.prototype.handleEvent): Allow event handler to cancel event default action.
1717         (Controller.prototype.handleRewindButtonClicked): Cancel event default.
1718         (Controller.prototype.handlePlayButtonClicked): Ditto.
1719         (Controller.prototype.handleMuteButtonClicked): Ditto.
1720         (Controller.prototype.handleMinButtonClicked): Ditto.
1721         (Controller.prototype.handleCaptionButtonClicked): Ditto.
1722         (Controller.prototype.handleFullscreenButtonClicked): Ditto.
1723         * Modules/mediacontrols/mediaControlsiOS.js:
1724         (ControllerIOS.prototype.handlePlayButtonTouchEnd): Ditto.
1725         (ControllerIOS.prototype.handlePlayButtonTouchCancel): Ditto.
1726         (ControllerIOS.prototype.handleFullscreenTouchEnd): Ditto.
1727         (ControllerIOS.prototype.handleFullscreenTouchCancel): Ditto.
1728         (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
1729         (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): Ditto.
1730         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto.
1731
1732 2014-05-27  Jon Lee  <jonlee@apple.com>
1733
1734         Fix Mavericks bots from r169383.
1735         https://bugs.webkit.org/show_bug.cgi?id=133311
1736
1737         Reviewed by Eric Carlson.
1738
1739         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Update #ifdef to check for ENABLE(MEDIA_SOURCE).
1740         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: Ditto.
1741
1742 2014-05-27  Radu Stavila  <stavila@adobe.com>
1743
1744         REGRESSION (r168046): Incorrect handling of multicol spanner
1745         https://bugs.webkit.org/show_bug.cgi?id=133249
1746
1747         Reviewed by David Hyatt.
1748
1749         When removing the child of an object, the removeChild method should return the next element
1750         following the one being deleted. This will ensure that proper iteration and destruction of
1751         an object's children is possible.
1752
1753         No new tests added. This is because the test that triggers this issue also triggers
1754         another assertion, in RenderMultiColumnSet::requiresBalancing(). However, that is a totally
1755         separate problem and will be handled in a separate bug: https://bugs.webkit.org/show_bug.cgi?id=133309
1756
1757         * rendering/RenderBlock.cpp:
1758         (WebCore::RenderBlock::removeChild):
1759         * rendering/RenderBlock.h:
1760         * rendering/RenderBlockFlow.cpp:
1761         (WebCore::RenderBlockFlow::removeChild):
1762         * rendering/RenderBlockFlow.h:
1763         * rendering/RenderButton.cpp:
1764         (WebCore::RenderButton::removeChild):
1765         * rendering/RenderButton.h:
1766         * rendering/RenderElement.cpp:
1767         (WebCore::RenderElement::removeChild):
1768         (WebCore::RenderElement::removeChildInternal):
1769         * rendering/RenderElement.h:
1770         * rendering/RenderMenuList.cpp:
1771         (RenderMenuList::removeChild):
1772         * rendering/RenderMenuList.h:
1773         * rendering/RenderMultiColumnFlowThread.cpp:
1774         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1775         * rendering/RenderRuby.cpp:
1776         (WebCore::RenderRubyAsInline::removeChild):
1777         (WebCore::RenderRubyAsBlock::removeChild):
1778         * rendering/RenderRuby.h:
1779         * rendering/RenderRubyRun.cpp:
1780         (WebCore::RenderRubyRun::removeChild):
1781         * rendering/RenderRubyRun.h:
1782         * rendering/mathml/RenderMathMLScripts.cpp:
1783         (WebCore::RenderMathMLScripts::removeChildInternal):
1784         (WebCore::RenderMathMLScripts::removeChild):
1785         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
1786         (WebCore::RenderMathMLScriptsWrapper::removeChild):
1787         * rendering/mathml/RenderMathMLScripts.h:
1788         * rendering/svg/RenderSVGContainer.cpp:
1789         (WebCore::RenderSVGContainer::removeChild):
1790         * rendering/svg/RenderSVGContainer.h:
1791         * rendering/svg/RenderSVGInline.cpp:
1792         (WebCore::RenderSVGInline::removeChild):
1793         * rendering/svg/RenderSVGInline.h:
1794         * rendering/svg/RenderSVGRoot.cpp:
1795         (WebCore::RenderSVGRoot::removeChild):
1796         * rendering/svg/RenderSVGRoot.h:
1797         * rendering/svg/RenderSVGText.cpp:
1798         (WebCore::RenderSVGText::removeChild):
1799         * rendering/svg/RenderSVGText.h:
1800
1801 2014-05-27  Jon Lee  <jonlee@apple.com>
1802
1803         Update ENABLE(MEDIA_SOURCE) on Mac
1804         https://bugs.webkit.org/show_bug.cgi?id=133141
1805
1806         Reviewed by Darin Adler.
1807
1808         * Configurations/FeatureDefines.xcconfig:
1809
1810 2014-05-27  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
1811
1812         Remove BLOB guards
1813         https://bugs.webkit.org/show_bug.cgi?id=132863
1814
1815         Reviewed by Csaba Osztrogonác.
1816
1817         * Configurations/FeatureDefines.xcconfig:
1818         * Modules/websockets/WebSocketChannel.cpp:
1819         (WebCore::WebSocketChannel::WebSocketChannel):
1820         (WebCore::WebSocketChannel::didFail):
1821         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
1822         (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
1823         * Modules/websockets/WebSocketChannel.h:
1824         * WebCore.exp.in:
1825         * WebCore.vcxproj/WebCore.vcxproj:
1826         * bindings/js/JSBlobCustom.cpp:
1827         (WebCore::JSBlobConstructor::constructJSBlob):
1828         * bindings/js/JSFileReaderCustom.cpp:
1829         * dom/DOMExceptions.in:
1830         * dom/EventTargetFactory.in:
1831         * dom/ScriptExecutionContext.cpp:
1832         (WebCore::ScriptExecutionContext::publicURLManager):
1833         * dom/ScriptExecutionContext.h:
1834         * fileapi/AsyncFileStream.cpp:
1835         * fileapi/AsyncFileStream.h:
1836         * fileapi/Blob.cpp:
1837         (WebCore::Blob::Blob):
1838         * fileapi/Blob.h:
1839         (WebCore::Blob::slice):
1840         * fileapi/Blob.idl:
1841         * fileapi/FileError.h:
1842         * fileapi/FileError.idl:
1843         * fileapi/FileException.cpp:
1844         * fileapi/FileException.h:
1845         * fileapi/FileException.idl:
1846         * fileapi/FileReader.cpp:
1847         * fileapi/FileReader.h:
1848         * fileapi/FileReader.idl:
1849         * fileapi/FileReaderLoader.cpp:
1850         * fileapi/FileReaderLoader.h:
1851         * fileapi/FileReaderLoaderClient.h:
1852         * fileapi/FileReaderSync.cpp:
1853         * fileapi/FileReaderSync.h:
1854         * fileapi/FileReaderSync.idl:
1855         * fileapi/FileThread.cpp:
1856         * fileapi/FileThread.h:
1857         * fileapi/ThreadableBlobRegistry.cpp:
1858         (WebCore::ThreadableBlobRegistry::registerFileBlobURL): Deleted.
1859         (WebCore::ThreadableBlobRegistry::registerBlobURL): Deleted.
1860         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice): Deleted.
1861         (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Deleted.
1862         (WebCore::ThreadableBlobRegistry::blobSize): Deleted.
1863         (WebCore::ThreadableBlobRegistry::getCachedOrigin): Deleted.
1864         * fileapi/WebKitBlobBuilder.cpp:
1865         (WebCore::BlobBuilder::append):
1866         * fileapi/WebKitBlobBuilder.h:
1867         * html/DOMURL.cpp:
1868         * html/DOMURL.h:
1869         * html/DOMURL.idl:
1870         * html/PublicURLManager.cpp:
1871         * html/PublicURLManager.h:
1872         * loader/LoaderStrategy.cpp:
1873         (WebCore::LoaderStrategy::createBlobRegistry):
1874         * loader/LoaderStrategy.h:
1875         * page/DOMWindow.idl:
1876         * page/SecurityOrigin.cpp:
1877         (WebCore::SecurityOrigin::shouldUseInnerURL):
1878         (WebCore::getCachedOrigin):
1879         * platform/FileStream.cpp:
1880         * platform/FileStream.h:
1881         * platform/FileStreamClient.h:
1882         * platform/SchemeRegistry.cpp:
1883         (WebCore::canDisplayOnlyIfCanRequestSchemes):
1884         * platform/network/BlobRegistry.cpp:
1885         * platform/network/BlobRegistryImpl.cpp:
1886         * platform/network/BlobResourceHandle.cpp:
1887         * platform/network/BlobResourceHandle.h:
1888         * platform/network/FormData.cpp:
1889         (WebCore::FormData::deepCopy):
1890         (WebCore::FormData::appendFile):
1891         (WebCore::FormData::appendBlob):
1892         (WebCore::FormData::appendKeyValuePairItems):
1893         (WebCore::FormData::resolveBlobReferences):
1894         (WebCore::encodeElement):
1895         (WebCore::decodeElement):
1896         * platform/network/FormData.h:
1897         (WebCore::FormDataElement::FormDataElement):
1898         (WebCore::operator==):
1899         * platform/network/cf/FormDataStreamCFNet.cpp:
1900         (WebCore::closeCurrentStream):
1901         (WebCore::advanceCurrentStream):
1902         (WebCore::formCreate):
1903         (WebCore::formRead):
1904         (WebCore::setHTTPBody):
1905         * platform/network/curl/ResourceHandleManager.cpp:
1906         (WebCore::getFormElementsCount):
1907         * platform/network/soup/ResourceHandleSoup.cpp:
1908         (WebCore::addEncodedBlobToSoupMessageBody):
1909         (WebCore::addFormElementsToSoupMessage):
1910         * workers/WorkerGlobalScope.idl:
1911         * xml/XMLHttpRequest.cpp:
1912         (WebCore::XMLHttpRequest::send):
1913         (WebCore::XMLHttpRequest::createRequest):
1914
1915 2014-05-27  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1916
1917         Allow building CMake based ports with WEB_REPLAY
1918         https://bugs.webkit.org/show_bug.cgi?id=133154
1919
1920         Reviewed by Csaba Osztrogonác.
1921
1922         * CMakeLists.txt:
1923
1924 2014-05-27  Adrian Perez de Castro  <aperez@igalia.com>
1925
1926         [GStreamer] Add missing <wtf/MathExtras.h> header
1927         https://bugs.webkit.org/show_bug.cgi?id=133236
1928
1929         Reviewed by Philippe Normand.
1930
1931         In some configurations, not including <wtf/MathExtras.h> will cause
1932         errors about undefined functions. In particular, this happens in
1933         Linux with glibc 2.19 and compiling with Clang. Having the header
1934         included is the correct thing to do anyway.
1935
1936         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1937         Include <wtf/MathExtras.h>
1938
1939 2014-05-27  Manuel Rego Casasnovas  <rego@igalia.com>
1940
1941         Setting up OrderIterator shouldn't require an extra Vector
1942         https://bugs.webkit.org/show_bug.cgi?id=119061
1943
1944         Reviewed by Darin Adler.
1945
1946         From Blink r153971 by <jchaffraix@chromium.org>
1947
1948         This patches reuse the OrderIterator's Vector. It provides a helper class OrderIteratorPopulator, used for
1949         manipulating the Vector directly. Which allows to consolidate the code into a single implementation across
1950         flexbox and grid.
1951
1952         No new tests, already covered by current tests.
1953
1954         * rendering/OrderIterator.cpp:
1955         (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Reset OrderIterator and call
1956         removeDuplicatedOrderValues().
1957         (WebCore::OrderIteratorPopulator::removeDuplicatedOrderValues): Sorts the Vector and removes the duplicated
1958         order values.
1959         (WebCore::OrderIteratorPopulator::collectChild): Collect order value information from child.
1960         (WebCore::OrderIterator::setOrderValues): Deleted.
1961         * rendering/OrderIterator.h:
1962         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Add helper class to manipulate OrderValues Vector.
1963         * rendering/RenderFlexibleBox.cpp:
1964         (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
1965         (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
1966         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
1967         * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
1968         * rendering/RenderGrid.cpp:
1969         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
1970
1971 2014-05-26  Tim Horton  <timothy_horton@apple.com>
1972
1973         [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
1974         https://bugs.webkit.org/show_bug.cgi?id=133020
1975         <rdar://problem/16521736>
1976
1977         Reviewed by Simon Fraser.
1978
1979         * WebCore.exp.in:
1980         * platform/graphics/cg/IOSurfacePool.cpp:
1981         (WebCore::IOSurfacePool::willAddSurface):
1982         * platform/graphics/cocoa/IOSurface.h:
1983         * platform/graphics/cocoa/IOSurface.mm:
1984         (IOSurface::releaseGraphicsContext):
1985         Rename clearGraphicsContext to releaseGraphicsContext for clarity.
1986
1987 2014-05-26  Philip Rogers  <pdr@google.com>
1988
1989         Remove special case for transparent SVG root layers
1990         https://bugs.webkit.org/show_bug.cgi?id=116856
1991
1992         Reviewed by Dirk Schulze.
1993
1994         This patch removes a special case from RenderLayer for root SVG layers
1995         with opacity. Instead of checking whether a composited layer exists in
1996         SVGRenderingContext::prepareToRenderSVGContent we now exclude the root
1997         SVG renderobject from the opacity checks in prepareToRenderSVGContent.
1998
1999         This is a merge of https://src.chromium.org/viewvc/blink?view=rev&revision=174102
2000         by Philip Rogers <pdr@chromium.org>.
2001
2002         No new tests as this is covered by svg/custom/composited-svg-with-opacity.html.
2003
2004         * rendering/RenderLayer.cpp:
2005         (WebCore::RenderLayer::isTransparent): Deleted.
2006         * rendering/RenderLayer.h:
2007         * rendering/svg/SVGRenderingContext.cpp:
2008         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2009             The opacity case for root svg renderers is now handled by
2010             RenderLayer.
2011
2012 2014-05-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2013
2014         CSS JIT: Fix build error raised when CSS_SELECTOR_JIT_DEBUGGING is 1
2015         https://bugs.webkit.org/show_bug.cgi?id=133266
2016
2017         Reviewed by Benjamin Poulain.
2018
2019         When CSS_SELECTOR_JIT_DEBUGGING is 1, build erros occur on x86_64.
2020
2021         * cssjit/SelectorCompiler.cpp:
2022         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2023         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2024
2025 2014-05-26  Benjamin Poulain  <benjamin@webkit.org>
2026
2027         Fix the quirks mode selector matching of the pseudo classes :hover and :active
2028         https://bugs.webkit.org/show_bug.cgi?id=133063
2029
2030         Reviewed by Antti Koivisto.
2031
2032         Our implementation of the quirks mode of :active and :hover was very wrong. The only
2033         thing it was doing is verify the pseudo class is not the first selector of a fragment
2034         (which was conveniently the only thing that was tested :)).
2035
2036         Since those pseudo class were only checking for the order of the filters, something like
2037             #target:hover
2038         would succeed because :hover is not the first simple selector, while
2039             :hover#target
2040         would fail.
2041
2042         That behavior is also a problem for the CSS JIT as it is an implementation detail of SelectorChecker
2043         and compiling something like that with our out-of-order matching would be nonsense.
2044
2045         This patch update the implementation to follow http://quirks.spec.whatwg.org/#the-:active-and-:hover-quirk
2046         Basically, the only cases that do not work in quirks mode are selectors composed only of "*, :hover and :active".
2047
2048         To implement this behavior, I needed to be able to inspect a complete selector fragment, including
2049         what is before and after :hover/:active.
2050         To do that, I replaced the boolean isSubSelector by a pointer to the first selector of the fragment.
2051         When we need to match :active/:hover in quirks mode, we just go over all the selectors in the fragment
2052         to find one of the qualifying match type.
2053
2054         Tests: fast/selectors/active-hover-quirks.html
2055                fast/selectors/active-quirks.html
2056                fast/selectors/hover-quirks.html
2057
2058         * css/SelectorChecker.cpp:
2059         (WebCore::SelectorChecker::matchRecursively):
2060         (WebCore::canMatchHoverOrActiveInQuirksMode):
2061         (WebCore::SelectorChecker::checkOne):
2062         * css/SelectorChecker.h:
2063         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2064
2065 2014-05-26  Zalan Bujtas  <zalan@apple.com>
2066
2067         Split the call to adjustForLocalZoom out into a separate expression.
2068         https://bugs.webkit.org/show_bug.cgi?id=133286
2069
2070         Reviewed by Darin Adler.
2071
2072         This patch ensures that adjustForLocalZoom() always gets called before we look at
2073         zoomFactor's value. (and not rely on the undefined behavior of the order of function argument evaluation)
2074
2075         * dom/Element.cpp:
2076         (WebCore::Element::offsetLeft):
2077         (WebCore::Element::offsetTop):
2078
2079 2014-05-26  Darin Adler  <darin@apple.com>
2080
2081         Class name matching should use ASCII case-insensitive matching, not Unicode case folding
2082         https://bugs.webkit.org/show_bug.cgi?id=133292
2083
2084         Reviewed by Anders Carlsson.
2085
2086         Tests: fast/dom/getElementsByClassName/ASCII-case-insensitive.html
2087                fast/dom/getElementsByClassName/case-sensitive.html
2088
2089         * dom/SpaceSplitString.cpp:
2090         (WebCore::hasNonASCIIOrUpper): Deleted.
2091         (WebCore::tokenizeSpaceSplitString): Use a for loop instead of while.
2092         (WebCore::spaceSplitStringTable): Renamed from sharedDataMap; the new name is supposed
2093         to help us see the analogy with the atomic string table.
2094         (WebCore::SpaceSplitString::set): Removed unneeded special case for null and preflight
2095         since AtomicString::convertToASCIILowercase now handles both of those. Changed to call
2096         convertToASCIILowercase instead of foldCase, since we don't want to fold non-ASCII.
2097         (WebCore::SpaceSplitString::spaceSplitStringContainsValue): Ditto.
2098         (WebCore::SpaceSplitStringData::create): Marked this inline since it's only called in
2099         one place and that place is in this file. Also used auto a bit and used get instead of
2100         find since the value type is a simple pointer.
2101         (WebCore::SpaceSplitStringData::destroy): Removed unneeded check for null. We never
2102         create any SpaceSplitStringData with empty strings, and a null is a kind of empty string.
2103
2104         * dom/SpaceSplitString.h: Removed some unneeded includes and some unneeded uses of the
2105         inline keyword. Changed types from size_t to unsigned in a couple places; we had a mix
2106         of the types and there was no reason to use size_t there.
2107
2108 2014-05-26  Javier Fernandez  <jfernandez@igalia.com>
2109
2110         [CSS Grid Layout] Implementation of the "grid" shorthand.
2111         https://bugs.webkit.org/show_bug.cgi?id=132122
2112
2113         Reviewed by Darin Adler.
2114
2115         The grid property is a shorthand that sets all of the explicit
2116         grid properties (grid-template-rows, grid-template-columns, and
2117         grid-template-areas) as well as all the implicit grid properties
2118         (grid-auto-rows, grid-auto-columns, and grid-auto-flow) in a
2119         single declaration
2120
2121         Notice that either explicit or implicit grid can be specified,
2122         assigning the initial values to the omitted properties.
2123
2124         Test: fast/css-grid-layout/grid-shorthand-get-set.html
2125
2126         * css/CSSComputedStyleDeclaration.cpp:
2127         (WebCore::ComputedStyleExtractor::propertyValue):
2128         * css/CSSParser.cpp:
2129         (WebCore::CSSParser::parseValue):
2130         (WebCore::CSSParser::parseGridShorthand):
2131         * css/CSSParser.h:
2132         * css/CSSPropertyNames.in:
2133         * css/StylePropertyShorthand.cpp:
2134         (WebCore::webkitGridShorthand):
2135         * css/StylePropertyShorthand.h:
2136
2137 2014-05-26  Zalan Bujtas  <zalan@apple.com>
2138
2139         Subpixel layout: Legacy Element.offset* client* return values are invalid in certain cases.
2140         https://bugs.webkit.org/show_bug.cgi?id=133272
2141
2142         Reviewed by Simon Fraser.
2143
2144         Element.offset* client* functions applied various rounding strategies on the return values before r168868.
2145         (for example, offsetLeft/Top either floored through implicit integer arithmetics or rounded explicitly depending
2146         whether the zoom scale was 1. see http://trac.webkit.org/changeset/168868/trunk/Source/WebCore/dom/Element.cpp for details)
2147         This patch mimics the legacy behavior by either rounding or flooring the return value.
2148
2149         Not testable (legacy switch is not exposed)
2150
2151         * dom/Element.cpp:
2152         (WebCore::adjustForLocalZoom):
2153         (WebCore::convertToNonSubpixelValueIfNeeded):
2154         (WebCore::Element::offsetLeft):
2155         (WebCore::Element::offsetTop):
2156
2157 2014-05-26  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2158
2159         [EFL] Input fields and text areas are not rendered correctly after r167771
2160         https://bugs.webkit.org/show_bug.cgi?id=133181
2161
2162         Reviewed by Gyuyoung Kim.
2163
2164         r167771 changed arguments of RenderTheme two virtual method arguments which were not reflected
2165         in changes in derived classes, which caused parent method to be called. Arguments in derived class
2166         were updated, also 'override' specifiers were added to all virtual methods to prevent similar errors.
2167
2168         Already covered by fast/forms/textarea-placeholder-wrapping.html
2169
2170         * platform/efl/RenderThemeEfl.cpp:
2171         (WebCore::RenderThemeEfl::paintTextField):
2172         (WebCore::RenderThemeEfl::paintTextArea):
2173         * platform/efl/RenderThemeEfl.h:
2174         (WebCore::RenderThemeEfl::supportsHover):
2175         (WebCore::RenderThemeEfl::supportsControlTints):
2176
2177 2014-05-20  Sergio Villar Senin  <svillar@igalia.com>
2178
2179         [CSS Grid Layout] Children of grid containers must be turned into grid items
2180         https://bugs.webkit.org/show_bug.cgi?id=132991
2181
2182         Reviewed by Darin Adler.
2183
2184         From Blink r150472 by <jchaffraix@chromium.org>
2185
2186         According to specs each child of a grid container must become a
2187         grid item meaning that grid items are grid level boxes and thus,
2188         do not participate in the block formatting context but in the grid
2189         formatting one.
2190
2191         This change updates the grid items' 'display' property after style
2192         resolution so that we match the specification (see section 4. Grid
2193         Items). The spec basically instructs us to compute the value of
2194         'display' by applying the table in CSS2.1 Chapter 9.7
2195         http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo
2196
2197         Test: fast/css-grid-layout/grid-item-display.html
2198
2199         * css/StyleResolver.cpp:
2200         (WebCore::isDisplayGridBox):
2201         (WebCore::StyleResolver::adjustRenderStyle):
2202
2203 2014-05-26  Zan Dobersek  <zdobersek@igalia.com>
2204
2205         Remove Vector copies in ShorthandPropertyWrapper implementation and use
2206         https://bugs.webkit.org/show_bug.cgi?id=133265
2207
2208         Reviewed by Simon Fraser.
2209
2210         * page/animation/CSSPropertyAnimation.cpp:
2211         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Move the passed-in Vector
2212         into the member variable instead of using Vector<>::swap().
2213         (WebCore::ShorthandPropertyWrapper::propertyWrappers): Return a const reference of the member
2214         variable instead of a const value.
2215         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Move the Vector
2216         object into the ShorthandProperthyWrapper constructor.
2217         (WebCore::gatherEnclosingShorthandProperties): Deploy a range-based for-loop.
2218
2219 2014-05-26  Tanay C  <tanay.c@samsung.com>
2220
2221         [EFL] Fix build error in blob.cpp after r168435
2222         https://bugs.webkit.org/show_bug.cgi?id=132678
2223
2224         Reviewed by Alexey Proskuryakov.
2225
2226         * fileapi/Blob.cpp:
2227         (WebCore::Blob::size): Using isInBound to check range of local var
2228         actualsize to resolve build error
2229
2230 2014-05-25  Ryuan Choi  <ryuan.choi@samsung.com>
2231
2232         [EFL] Remove TileCairo and TiledBackingStoreBackendCairo
2233         https://bugs.webkit.org/show_bug.cgi?id=133274
2234
2235         Reviewed by Gyuyoung Kim.
2236
2237         Now, TiledBackingStore is only used for CoordinatedGraphics and the EFL port.
2238         CoordinatedGraphics does not use TileCairo and TiledBackingStoreBackendCairo.
2239
2240         This patch removed them and refactored related files.
2241
2242         * PlatformEfl.cmake:
2243         * PlatformGTK.cmake:
2244         * WebCore.vcxproj/WebCore.vcxproj:
2245         * WebCore.vcxproj/WebCore.vcxproj.filters:
2246         * platform/graphics/TiledBackingStore.cpp:
2247         (WebCore::TiledBackingStore::TiledBackingStore): Deleted.
2248         * platform/graphics/TiledBackingStore.h:
2249         * platform/graphics/TiledBackingStoreBackend.h:
2250         * platform/graphics/cairo/TileCairo.cpp: Removed.
2251         * platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp: Removed.
2252
2253 2014-05-25  Jinwoo Song  <jinwoo7.song@samsung.com>
2254
2255         setData() of DataTransfer has a void return type
2256         https://bugs.webkit.org/show_bug.cgi?id=133108
2257
2258         Reviewed by Alexey Proskuryakov.
2259
2260         According to HTML5 spec, setData() of DataTranfer interface does not return value.
2261         http://www.w3.org/TR/html/editing.html#the-datatransfer-interface
2262
2263         Test: editing/pasteboard/set_data_typeof_return.html
2264
2265         * dom/DataTransfer.cpp:
2266         (WebCore::DataTransfer::setData):
2267         * dom/DataTransfer.h:
2268         * dom/DataTransfer.idl:
2269         * platform/Pasteboard.h:
2270         * platform/efl/PasteboardEfl.cpp:
2271         (WebCore::Pasteboard::writeString):
2272         * platform/gtk/PasteboardGtk.cpp:
2273         (WebCore::Pasteboard::writeString):
2274         * platform/ios/PasteboardIOS.mm:
2275         (WebCore::Pasteboard::writeString):
2276         * platform/mac/PasteboardMac.mm:
2277         (WebCore::Pasteboard::writeString):
2278         * platform/win/PasteboardWin.cpp:
2279         (WebCore::Pasteboard::writeString):
2280
2281 2014-05-25  Benjamin Poulain  <bpoulain@apple.com>
2282
2283         [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
2284         https://bugs.webkit.org/show_bug.cgi?id=133262
2285
2286         Reviewed by Simon Fraser.
2287
2288         Since VisibleContentRect was fixed, we were no longer sending scroll events when updating the scrollOffset
2289         when updating the visible content rects. The reason is that the scrollOffset was defined as the top left of the
2290         VisibleContentRect, and as such was already at the end position after updating the unobscured rect.
2291
2292         This patch split the unobscuredContentRect in unobscuredContentSize (updated live on zoom) and the position defined
2293         by the ScrollView's scrollOffset (updated when scrolling).
2294
2295         * WebCore.exp.in:
2296         * platform/ScrollView.h:
2297         * platform/ios/ScrollViewIOS.mm:
2298         (WebCore::ScrollView::unobscuredContentRect):
2299         (WebCore::ScrollView::setUnobscuredContentSize):
2300         (WebCore::ScrollView::setUnobscuredContentRect): Deleted.
2301
2302 2014-05-25  David Kilzer  <ddkilzer@apple.com>
2303
2304         Add type-checked casts for TransformOperations
2305         <http://webkit.org/b/133217>
2306
2307         Reviewed by Simon Fraser.
2308
2309         * platform/graphics/GraphicsLayer.cpp:
2310         (WebCore::GraphicsLayer::validateTransformOperations):
2311         * platform/graphics/ca/GraphicsLayerCA.cpp:
2312         (WebCore::getTransformFunctionValue):
2313         - Switch to type-checked casts.
2314
2315         * platform/graphics/transforms/IdentityTransformOperation.h:
2316         * platform/graphics/transforms/Matrix3DTransformOperation.h:
2317         * platform/graphics/transforms/MatrixTransformOperation.h:
2318         * platform/graphics/transforms/PerspectiveTransformOperation.h:
2319         * platform/graphics/transforms/RotateTransformOperation.h:
2320         * platform/graphics/transforms/ScaleTransformOperation.h:
2321         * platform/graphics/transforms/SkewTransformOperation.h:
2322         * platform/graphics/transforms/TranslateTransformOperation.h:
2323         - Add 'final' to class declaration.
2324         - Add 'override' to overridden methods.
2325         - Add type-checked cast via TRANSFORMOPERATION_TYPE_CASTS macro.
2326         - Move implementation of operator==(const TransformOperation&)
2327           from header to source file so it is able to use a type-checked
2328           cast, and switch back to using a reference instead of a
2329           pointer.
2330         - Add or update ASSERT in private constructor to check for
2331           correct OperationType in classes that represent multiple
2332           types.
2333
2334         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2335         (WebCore::Matrix3DTransformOperation::operator==): Added.
2336
2337         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2338         (WebCore::Matrix3DTransformOperation::operator==): Added.
2339         (WebCore::MatrixTransformOperation::blend):
2340         - Switch to type-checked casts and use a reference.
2341
2342         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2343         (WebCore::Matrix3DTransformOperation::operator==): Added.
2344         (WebCore::PerspectiveTransformOperation::blend):
2345         * platform/graphics/transforms/RotateTransformOperation.cpp:
2346         (WebCore::Matrix3DTransformOperation::operator==): Added.
2347         (WebCore::RotateTransformOperation::blend):
2348         * platform/graphics/transforms/ScaleTransformOperation.cpp:
2349         (WebCore::Matrix3DTransformOperation::operator==): Added.
2350         (WebCore::ScaleTransformOperation::blend):
2351         * platform/graphics/transforms/SkewTransformOperation.cpp:
2352         (WebCore::Matrix3DTransformOperation::operator==): Added.
2353         (WebCore::SkewTransformOperation::blend):
2354         * platform/graphics/transforms/TranslateTransformOperation.cpp:
2355         (WebCore::Matrix3DTransformOperation::operator==): Added.
2356         (WebCore::TranslateTransformOperation::blend):
2357         - Switch to type-checked casts.
2358
2359         * platform/graphics/transforms/TransformOperation.h:
2360         (WebCore::TransformOperation::isRotateTransformOperationType):
2361         (WebCore::TransformOperation::isScaleTransformOperationType):
2362         (WebCore::TransformOperation::isSkewTransformOperationType):
2363         (WebCore::TransformOperation::isTranslateTransformOperationType):
2364         - Add type-checking methods used in constructors and type-checked
2365           casts.
2366         - Define TRANSFORMOPERATION_TYPE_CASTS macro used by subclasses.
2367
2368 2014-05-25  David Kilzer  <ddkilzer@apple.com>
2369
2370         Crash in WebCore::TextResourceDecoder::checkForCSSCharset
2371         <http://webkit.org/b/133257>
2372         <rdar://problem/17027109>
2373
2374         Reviewed by Alexey Proskuryakov.
2375
2376         Test: fast/encoding/css-charset-missing-semi-colon-and-newline.html
2377
2378         * loader/TextResourceDecoder.cpp:
2379         (WebCore::TextResourceDecoder::checkForCSSCharset): Add early
2380         return.
2381
2382 2014-05-24  Eric Carlson  <eric.carlson@apple.com>
2383
2384         [Mac] preload AVAssetTrack properties before asking for them
2385         https://bugs.webkit.org/show_bug.cgi?id=133240
2386
2387         Reviewed by Jer Noble.
2388
2389         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2390         (WebCore::assetTrackMetadataKeyNames): Add preferredTransform and naturalSize to the list
2391             of properties we preload.
2392
2393 2014-05-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
2394
2395         Remove one of the CSSProperty constructor
2396         https://bugs.webkit.org/show_bug.cgi?id=131094
2397
2398         Reviewed by Darin Adler.
2399
2400         Remove one of the CSSProperty constructor, because it is obsolete.
2401
2402         * css/CSSProperty.h:
2403         (WebCore::CSSProperty::CSSProperty): Deleted.
2404         * css/StyleProperties.h:
2405         (WebCore::StyleProperties::PropertyReference::toCSSProperty):
2406
2407 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
2408
2409         Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
2410         https://bugs.webkit.org/show_bug.cgi?id=133254
2411
2412         Reviewed by Tim Horton.
2413
2414         Make ScrollingTreeScrollingNode::scrollPosition() pure virtual, and rename
2415         the member variable and associated getter to make it clear that they relate
2416         to the last committed scroll position.
2417
2418         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2419         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2420         * page/scrolling/ScrollingTreeScrollingNode.h:
2421         (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition):
2422         (WebCore::ScrollingTreeScrollingNode::scrollPosition): Deleted.
2423
2424 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
2425
2426         Share some more ScrollingTreeScrollingNode code
2427         https://bugs.webkit.org/show_bug.cgi?id=133248
2428
2429         Reviewed by Sam Weinig.
2430
2431         Push scrollBy(), scrollByWithoutContentEdgeConstraints() and setScrollPosition()
2432         down to ScrollingTreeFrameScrollingNode.
2433         
2434         This requires that scrollPosition() return the right thing for each class, so make
2435         it virtual. Future patches will reduce the confusion between the committed scroll
2436         position and the one derived from layers.
2437
2438         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2439         (WebCore::ScrollingTreeFrameScrollingNode::scrollBy):
2440         (WebCore::ScrollingTreeFrameScrollingNode::scrollByWithoutContentEdgeConstraints):
2441         (WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
2442         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2443         * page/scrolling/ScrollingTreeScrollingNode.h:
2444         (WebCore::ScrollingTreeScrollingNode::scrollPosition):
2445         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2446         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2447         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition): Deleted.
2448         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollBy): Deleted.
2449         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollByWithoutContentEdgeConstraints): Deleted.
2450         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2451         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2452         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2453         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
2454         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
2455         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
2456         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
2457         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollBy): Deleted.
2458         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollByWithoutContentEdgeConstraints): Deleted.
2459
2460 2014-05-24  Chris Fleizach  <cfleizach@apple.com>
2461
2462         AX: fix coordinate mapping for iOS accessibility
2463         https://bugs.webkit.org/show_bug.cgi?id=133188
2464
2465         Reviewed by Sam Weinig.
2466
2467         Make WebCore aware of the accessibility point/rect conversion methods.
2468
2469         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2470         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2471         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
2472         * loader/EmptyClients.h:
2473         * page/Chrome.cpp:
2474         (WebCore::Chrome::accessibilityScreenToRootView):
2475         (WebCore::Chrome::rootViewToAccessibilityScreen):
2476         * page/Chrome.h:
2477         * page/ChromeClient.h:
2478         * platform/HostWindow.h:
2479
2480 2014-05-24  Zalan Bujtas  <zalan@apple.com>
2481
2482         Subpixel rendering: Non-compositing transforms with subpixel coordinates paint to wrong position.
2483         https://bugs.webkit.org/show_bug.cgi?id=133184
2484         <rdar://problem/16745606>
2485
2486         Reviewed by Simon Fraser.
2487
2488         Snapping relative negative coordinate values should produce the same position as if they were
2489         positive absolute coordinates.
2490         When a child box gets positioned off of its containers towards top/left, its relative coordinates
2491         become negative. Pixel snapping those negative values should produce the same
2492         final painting position as if the child box was fixed positioned with positive coordinates.
2493         Since halfway values always round away from zero, negative and positive halfway values
2494         produce opposite rounding direction.
2495         This patch ensures that negative halfway values round to the direction as if they were positive.  
2496
2497         Test: fast/layers/hidpi-floor-negative-coordinate-values-to-maintain-rounding-direction.html
2498
2499         * platform/LayoutUnit.h:
2500         (WebCore::roundToDevicePixel):
2501         * rendering/RenderLayer.cpp:
2502         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2503
2504 2014-05-24  Frédéric Wang  <fred.wang@free.fr>
2505
2506         Use size variants and glyph assembly from the MATH data.
2507         https://bugs.webkit.org/show_bug.cgi?id=130322
2508
2509         Reviewed by Chris Fleizach.
2510
2511         This patch modifies the RenderMathMLOperator code to use the MATH table
2512         when one is provided in the current font on the <math> tag. More
2513         precisely, the MathVariants table is used to draw a size variant or
2514         a glyph assembly. The displaystyle attribute is not supported yet, so
2515         for now large operators are always assumed to be in display style. The
2516         MATH support does not work well with all platforms+fonts, so at the
2517         moment the default font-family on the <math> is not changed.
2518
2519         Tests: mathml/opentype/large-operators-LatinModern.html
2520                mathml/opentype/opentype-stretchy.html
2521                mathml/opentype/vertical-LatinModern.html
2522
2523         * css/mathml.css: We only specify the default font-family on the math root, so that people can easily style the mathematics.
2524         For now, old fonts without the MATH table are still used as the default.
2525         (math):
2526         (math, mfenced > *): Deleted.
2527         (mo, mfenced): Deleted.
2528         * platform/graphics/SimpleFontData.cpp: don't return the math data if the font is loading.
2529         (WebCore::SimpleFontData::mathData):
2530         * platform/graphics/opentype/OpenTypeMathData.cpp: update #ifdef so that disabling ENABLE_OPENTYPE_MATH won't lead to errors with unused parameters.
2531         (WebCore::OpenTypeMathData::OpenTypeMathData):
2532         (WebCore::OpenTypeMathData::getMathConstant):
2533         (WebCore::OpenTypeMathData::getItalicCorrection):
2534         (WebCore::OpenTypeMathData::getMathVariants):
2535         * rendering/mathml/RenderMathMLOperator.cpp:
2536         (WebCore::RenderMathMLOperator::boundsForGlyph):
2537         (WebCore::RenderMathMLOperator::heightForGlyph):
2538         (WebCore::RenderMathMLOperator::advanceForGlyph):
2539         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): We handle preferred width of size variants.
2540         (WebCore::RenderMathMLOperator::shouldAllowStretching): This function now only returns whether the operator will stretch and no longer has side effect.
2541         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): We add a function to convert from the MathVariant table data to the format supported by RenderMathMLOperator.
2542         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): We add a function to get the glyph that will be used for large operators in display style.
2543         (WebCore::RenderMathMLOperator::findStretchyData): We make this function handle size variants.
2544         (WebCore::RenderMathMLOperator::updateStyle): We handle size variants.
2545         (WebCore::RenderMathMLOperator::paint): We handle size variants.
2546         * rendering/mathml/RenderMathMLOperator.h:
2547
2548 2014-05-23  Tim Horton  <timothy_horton@apple.com>
2549
2550         REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
2551         https://bugs.webkit.org/show_bug.cgi?id=132794
2552         <rdar://problem/16877909>
2553
2554         Reviewed by Simon Fraser.
2555
2556         Virtualize DisplayRefreshMonitor so that WebKit2 can implement its own DisplayRefreshMonitor for UI-side compositing views.
2557         This allows the synchronization of requestAnimationFrame callbacks with UI-side compositing painting.
2558
2559         * WebCore.exp.in:
2560         * WebCore.xcodeproj/project.pbxproj:
2561         
2562         * page/ChromeClient.h:
2563         (WebCore::ChromeClient::graphicsLayerFactory):
2564         (WebCore::ChromeClient::createDisplayRefreshMonitor):
2565         * platform/graphics/DisplayRefreshMonitorFactory.h: Added.
2566         * platform/graphics/GraphicsLayerUpdater.cpp:
2567         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
2568         * platform/graphics/GraphicsLayerUpdater.h:
2569         * rendering/RenderLayerCompositor.cpp:
2570         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
2571         * rendering/RenderLayerCompositor.h:
2572         Give the ChromeClient a chance to provide us with a custom DisplayRefreshMonitor.
2573         If it does not, we'll fall back to making a DisplayRefreshMonitorMac or
2574         DisplayRefreshMonitorIOS depending on the platform.
2575
2576         * dom/ScriptedAnimationController.cpp:
2577         * dom/ScriptedAnimationController.h:
2578         * platform/graphics/DisplayRefreshMonitor.cpp:
2579         * platform/graphics/DisplayRefreshMonitor.h:
2580         * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
2581         * platform/graphics/DisplayRefreshMonitorClient.h: Added.
2582         * platform/graphics/DisplayRefreshMonitorManager.cpp: Added.
2583         * platform/graphics/DisplayRefreshMonitorManager.h: Added.
2584         Split DisplayRefreshMonitor.cpp into one file per class.
2585         Use references in a few places.
2586         Remove some useless comments.
2587
2588         * platform/graphics/DisplayRefreshMonitor.cpp:
2589         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
2590         Use takeAny() and remove a FIXME about it not existing.
2591
2592         * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
2593         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
2594         Use an early return instead of having the whole function body in an if().
2595
2596         * platform/graphics/ios/DisplayRefreshMonitorIOS.h: Added.
2597         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
2598         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2599         * platform/graphics/mac/DisplayRefreshMonitorMac.h: Added.
2600         Virtualize DisplayRefreshMonitorIOS and DisplayRefreshMonitorMac,
2601         and move things specific to each of them out of DisplayRefreshMonitor itself.
2602
2603 2014-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
2604
2605         CSS JIT: Apply backtracking optimization to adjacent backtracking
2606         https://bugs.webkit.org/show_bug.cgi?id=132951
2607
2608         Reviewed by Benjamin Poulain.
2609
2610         Apply the backtracking optimization to the adjacent backtracking.
2611         This optimization is already done for the descendant backtracking.
2612         We apply this to the adjacent backtracking similarly.
2613
2614         Test: fast/selectors/backtracking-adjacent-optimized.html
2615
2616         * cssjit/SelectorCompiler.cpp:
2617         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2618         (WebCore::SelectorCompiler::solveAdjacentBacktrackingActionForDirectAdjacent):
2619         (WebCore::SelectorCompiler::solveBacktrackingAction):
2620         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
2621         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
2622         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
2623         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
2624         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
2625         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
2626         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant): Deleted.
2627
2628 2014-05-23  Alex Christensen  <achristensen@webkit.org>
2629
2630         Make CSS JIT run on ARM64.
2631         https://bugs.webkit.org/show_bug.cgi?id=133156
2632
2633         Reviewed by Benjamin Poulain.
2634
2635         * cssjit/FunctionCall.h:
2636         (WebCore::FunctionCall::saveAllocatedRegisters):
2637         (WebCore::FunctionCall::restoreAllocatedRegisters):
2638         Use StackAllocator's new push and pop functions to push and pop a vector instead of iterating it.
2639         * cssjit/RegisterAllocator.h:
2640         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
2641         (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
2642         Return a vector of registers to allocate instead of doing the allocation to make the RegisterAllocator
2643         not need to know about the StackAllocator and to use the new vector push and pop functions.
2644         (WebCore::RegisterAllocator::~RegisterAllocator):
2645         Store RegisterIDs instead of StackReferences to avoid needing to know about the stack.
2646         * cssjit/SelectorCompiler.cpp:
2647         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2648         Removed the requirement for assert to be disabled to print disassembly when debugging css jit.
2649         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2650         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2651         Added to correctly push the link register and frame pointer.
2652         This is required if the jit code calls a function on arm64 and helpful for debugging tools on x86_64.
2653         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2654         Generate the prologue and epilogue which respectively push and pop
2655         the link register, frame pointer, and callee saved registers if needed.
2656         * cssjit/StackAllocator.h:
2657         (WebCore::StackAllocator::push):
2658         (WebCore::StackAllocator::pop):
2659         Added new vector push and pop functions to use stp and ldb instructions on arm64.
2660
2661 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
2662
2663         Hide fullscreen immediately when switching tabs.
2664         https://bugs.webkit.org/show_bug.cgi?id=133239
2665
2666         Reviewed by Eric Carlson.
2667
2668         This change allows fullscreen to disappear immediately while still cleaning
2669         up fullscreen normally.
2670
2671         * WebCore.exp.in:
2672         * platform/ios/WebVideoFullscreenControllerAVKit.h:
2673         renamed function to requestHideAndExitFullscreen
2674
2675         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2676         renamed function to requestHideAndExitFullscreen
2677
2678         (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
2679         rename of requestExitFullscreen that also hides.
2680
2681         (-[WebVideoFullscreenController requestExitFullscreen]): Deleted.
2682         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: declare requestHideAndExitFullscreen()
2683         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2684         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2685         this hides the window before requesting exitfullscreen from the model.
2686
2687 2014-05-23  Tim Horton  <timothy_horton@apple.com>
2688
2689         [iOS] WKPDFView should have a page indicator
2690         https://bugs.webkit.org/show_bug.cgi?id=133109
2691         <rdar://problem/16383003>
2692
2693         Reviewed by Anders Carlsson.
2694
2695         * English.lproj/Localizable.strings:
2696
2697 2014-05-23  Enrica Casucci  <enrica@apple.com>
2698
2699         Remove invalid ASSERT in wordRangeForPosition.
2700         https://bugs.webkit.org/show_bug.cgi?id=133232
2701
2702         Reviewed by Ryosuke Niwa.
2703
2704         In WK2 for iOS this function is called on every selection change.
2705         The selection could be set by Javascript in an element that is not visible.
2706         In that case we won't be able to create a VisiblePosition therefore wordRangeForPosition
2707         should not ASSERT that the VisiblePosition is not null, but rather
2708         perform an early return if it is null.
2709
2710         * editing/VisibleUnits.cpp:
2711         (WebCore::wordRangeFromPosition):
2712
2713 2014-05-23  Manuel Rego Casasnovas  <rego@igalia.com>
2714
2715         [CSS Grid Layout] Use gridRowCount() and gridColumnCount() when possible
2716         https://bugs.webkit.org/show_bug.cgi?id=133213
2717
2718         Reviewed by Sergio Villar Senin.
2719
2720         Use gridRowCount() and gridColumnCount() instead of m_grid.size() and
2721         m_grid[0].size() to make the code more descriptive and easier to
2722         understand.
2723
2724         No new tests (No change in behavior).
2725
2726         * rendering/RenderGrid.cpp:
2727         (WebCore::RenderGrid::growGrid):
2728         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2729
2730 2014-05-23  Alexey Proskuryakov  <ap@apple.com>
2731
2732         REGRESSION (r153917): Chart for the Category Explorer within Quicken Essentials
2733         does not draw until you force a redraw
2734         https://bugs.webkit.org/show_bug.cgi?id=133228
2735         <rdar://problem/15221231>
2736
2737         Reviewed by Simon Fraser.
2738
2739         * platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsQuickenEssentials):
2740         * platform/RuntimeApplicationChecks.h:
2741         Added a check for Quicken Essentials.
2742
2743         * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): Don't do an early return
2744         for Quicken Essentials, it depends on drawing to update its layer.
2745
2746 2014-05-23  Mihnea Ovidenie  <mihnea@adobe.com>
2747
2748         REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crashy than before
2749         https://bugs.webkit.org/show_bug.cgi?id=133124
2750
2751         Reviewed by David Hyatt.
2752
2753         When adjusting the end points of a subtree selection in the case of a document
2754         with named flows, we have to make sure that we pass the computed end
2755         points to the visible selection algorithm only if the end points are
2756         part of the same subtree, otherwise assume a selection clear behavior.
2757
2758         The test fast/regions/cssom/region-range-for-box-crash.html is used to
2759         test this behavior.
2760
2761         * rendering/SelectionSubtreeRoot.cpp:
2762         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
2763         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Moved to header file.
2764         * rendering/SelectionSubtreeRoot.h:
2765         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
2766
2767 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
2768
2769         reset m_havePreparedToPlay when changing media engines.
2770         https://bugs.webkit.org/show_bug.cgi?id=133199
2771
2772         Reviewed by Eric Carlson.
2773
2774         If a play request comes in before the media player is created, m_havePreparedToPlay
2775         is set to true. But when the player is created, this prevents the new player from
2776         getting the prepare call.
2777
2778         * html/HTMLMediaElement.cpp:
2779         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): set m_havePreparedToPlay false.
2780
2781 2014-05-23  Oliver Hunt  <oliver@apple.com>
2782
2783         Navigator object needs to have properties directly on the instance object
2784         https://bugs.webkit.org/show_bug.cgi?id=133221
2785
2786         Reviewed by Mark Lam.
2787
2788         Flag the Navigator object as requiring properties to be on the instance
2789         as there were a few compatibility issues when on the prototype.
2790
2791         * bindings/scripts/CodeGeneratorJS.pm:
2792         (InterfaceRequiresAttributesOnInstance):
2793
2794 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
2795
2796         Switch CSSGradientValue to use more references
2797         https://bugs.webkit.org/show_bug.cgi?id=133206
2798
2799         Reviewed by Andreas Kling.
2800
2801         Switch from pointers to references in various places.
2802
2803         * css/CSSGradientValue.cpp:
2804         (WebCore::CSSGradientValue::image):
2805         (WebCore::CSSGradientValue::addStops):
2806         (WebCore::positionFromValue):
2807         (WebCore::CSSGradientValue::computeEndPoint):
2808         (WebCore::CSSLinearGradientValue::createGradient):
2809         (WebCore::CSSRadialGradientValue::resolveRadius):
2810         (WebCore::CSSRadialGradientValue::createGradient):
2811         * css/CSSGradientValue.h:
2812
2813 2014-05-23  Zalan Bujtas  <zalan@apple.com>
2814
2815         Subpixel rendering: Make webkit-box-shadow painting subpixel aware.
2816         https://bugs.webkit.org/show_bug.cgi?id=133201
2817         <rdar://problem/16072830>
2818
2819         Reviewed by Simon Fraser.
2820
2821         This patch enables webkit-box-shadow to be painted on a subpixel position. However, we
2822         still truncate -webkit-box-shadow property values. Tracked here: http://webkit.org/b/133202
2823
2824         Test: fast/box-shadow/hidpi-webkit-box-shadow-subpixel-position.html
2825
2826         * platform/graphics/FloatRoundedRect.cpp:
2827         (WebCore::FloatRoundedRect::inflateWithRadii): same as in from RoundedRect.
2828         (WebCore::FloatRoundedRect::adjustRadii): same as in from RoundedRect.
2829         * platform/graphics/FloatRoundedRect.h:
2830         * rendering/RenderBoxModelObject.cpp:
2831         (WebCore::RenderBoxModelObject::paintBoxShadow):
2832
2833 2014-05-22  peavo@outlook.com  <peavo@outlook.com>
2834
2835         [Curl] Crash when exceeding maximum cache limit.
2836         https://bugs.webkit.org/show_bug.cgi?id=133185
2837
2838         Reviewed by Brent Fulgham.
2839
2840         When the maximum cache limit is exceeded, I get a crash.
2841         This happens when deleting cache entries, because a reference to the url string object in the LRU list
2842         is used as a parameter to invalidateCacheEntry(), when called from makeRoomForNewEntry().
2843         When the string is removed from the LRU list in makeRoomForNewEntry(), the string is deleted.
2844         Next, the string is accessed again to remove the url from the index, and we crash.
2845
2846         This can be fixed by removing the string from the LRU list after it is removed from the index.
2847
2848         Fixing the crash also revealed an infinite loop problem.
2849         If the url for some reason only exist in the LRU list, and not in the index,
2850         we will inifitely loop in makeRoomForNewEntry(), trying to remove this url from the cache, but never succeeding.
2851         This can be fixed by removing the url from the LRU list, also when it's not in the index.
2852
2853         * platform/network/curl/CurlCacheManager.cpp:
2854         (WebCore::CurlCacheManager::makeRoomForNewEntry): Avoid infinite loop by checking if there are more cache entries to remove.
2855         (WebCore::CurlCacheManager::invalidateCacheEntry): Avoid crash and infinite loop by removing url from LRU list last.
2856
2857 2014-05-22  Simon Fraser  <simon.fraser@apple.com>
2858
2859         Make viewport units work in CSS gradients
2860         https://bugs.webkit.org/show_bug.cgi?id=133204
2861         <rdar://problem/17012259>
2862         
2863         Reviewed by Tim Horton.
2864         
2865         Make viewport percentage lengths work in gradients.
2866
2867         Test: fast/gradients/viewport-units-gradient.html
2868
2869         * css/CSSGradientValue.cpp:
2870         (WebCore::CSSGradientValue::addStops):
2871         (WebCore::CSSLinearGradientValue::createGradient):
2872         (WebCore::CSSRadialGradientValue::createGradient):
2873         * css/CSSGradientValue.h:
2874
2875 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
2876
2877         [iOS][WK2] Add support for minimal-ui viewports
2878         https://bugs.webkit.org/show_bug.cgi?id=133162
2879
2880         Reviewed by Simon Fraser.
2881
2882         Add support for minimal-ui directly into the Viewport configuration.
2883
2884         ViewportConfiguration knows about two kinds of layout size in scrollview coordinates:
2885         -normal size
2886         -minimal ui size.
2887
2888         Initially, the page is initialized with resetMinimalUI() and starts with a normal layout.
2889
2890         At any time before the main resource is loaded, the Web page can update its viewport meta tag
2891         to include minimal-ui. The viewport configuration is updated immediately to reflect the minimal-ui
2892         layout size. Any layout after that takes minimal-ui into account.
2893
2894         * WebCore.exp.in:
2895         * css/LengthFunctions.cpp:
2896         (WebCore::minimumValueForLength):
2897         (WebCore::floatValueForLength):
2898         * css/StyleResolver.cpp:
2899         (WebCore::StyleResolver::viewportPercentageValue):
2900         * dom/ViewportArguments.h:
2901         (WebCore::ViewportArguments::operator==):
2902         * page/FrameView.cpp:
2903         (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
2904         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
2905         (WebCore::FrameView::setViewportSize): Deleted.
2906         (WebCore::FrameView::viewportSize): Deleted.
2907         * page/FrameView.h:
2908         * page/ViewportConfiguration.cpp:
2909         (WebCore::ViewportConfiguration::ViewportConfiguration):
2910         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2911         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
2912         (WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates):
2913         (WebCore::ViewportConfiguration::resetMinimalUI):
2914         (WebCore::ViewportConfiguration::pageWillRenderFirstFrame):
2915         (WebCore::ViewportConfiguration::initialScale):
2916         (WebCore::ViewportConfiguration::minimumScale):
2917         (WebCore::ViewportConfiguration::updateConfiguration):
2918         (WebCore::ViewportConfiguration::layoutWidth):
2919         (WebCore::ViewportConfiguration::layoutHeight):
2920         (WebCore::ViewportConfiguration::description):
2921         * page/ViewportConfiguration.h:
2922         (WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI):
2923         (WebCore::ViewportConfiguration::usesMinimalUI):
2924         * rendering/RenderView.cpp:
2925         (WebCore::RenderView::viewportSizeForCSSViewportUnits):
2926         (WebCore::RenderView::viewportSize): Deleted.
2927         * rendering/RenderView.h:
2928
2929 2014-05-22  Ryosuke Niwa  <rniwa@webkit.org>
2930
2931         Can't type in status in facebook.com on iOS Safari because keyboard disappears
2932         https://bugs.webkit.org/show_bug.cgi?id=133196
2933
2934         Reviewed by Geoffrey Garen.
2935
2936         Fixed the bug by rolling out r156252.
2937
2938         When the user taps on the status on facebook.com, the page focuses a textarea,
2939         which is then made momentarily invisible by setting display:none.
2940         The page then removes display:none later and expects the textarea to be still focused.
2941
2942         With r156252, the focus is removed after the page sets display:none and the keyboard disappears.
2943         Since the focus is never reset on the textarea, the user can never type in anything.
2944
2945         The specification may need to change here given that this (rather odd) behavior/expectation exists
2946         on one of the most popular websites on the Web.
2947
2948         * dom/Document.cpp:
2949         (WebCore::Document::Document):
2950         (WebCore::Document::recalcStyle):
2951         (WebCore::Document::updateLayout):
2952         (WebCore::Document::resetHiddenFocusElementSoon): Deleted.
2953         (WebCore::Document::resetHiddenFocusElementTimer): Deleted.
2954         * dom/Document.h:
2955
2956 2014-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
2957
2958         http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
2959         https://bugs.webkit.org/show_bug.cgi?id=132523
2960
2961         Reviewed by Alexey Proskuryakov.
2962
2963         We should not manufacture a response in the event of an error during a
2964         synchronous XHR. In addition, this test removes two places that are
2965         sensitive to such a manufactured response.
2966
2967         Updates test expectations.
2968
2969         * loader/DocumentThreadableLoader.cpp:
2970         (WebCore::DocumentThreadableLoader::loadRequest): Don't inspect a
2971         loader response if there is an error
2972         * platform/network/cf/ResourceHandleCFNet.cpp:
2973         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
2974         manufacture a response
2975         * platform/network/mac/ResourceHandleMac.mm:
2976         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
2977         manufacture a response
2978         * xml/XSLTProcessorLibxslt.cpp:
2979         (WebCore::docLoaderFunc): Only use the response's URL if no error
2980         occurred.
2981
2982 2014-05-22  Myles C. Maxfield  <litherum@gmail.com>
2983
2984         Unreviewed typo fix.
2985
2986         Reviewed by NOBODY.
2987
2988         No new tests.
2989
2990         * platform/graphics/mac/FontMac.mm:
2991         (WebCore::Font::dashesForIntersectionsWithRect): Accidentally said run.length() instead of glyphBuffer.size().
2992
2993 2014-05-22  Andreas Kling  <akling@apple.com>
2994
2995         [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
2996         <https://webkit.org/b/133197>
2997         <rdar://problem/17011561>
2998
2999         Make releaseMemory() public so we can call it from the process-will-suspend callback.
3000
3001         Reviewed by Gavin Barraclough.
3002
3003         * WebCore.exp.in:
3004         * platform/MemoryPressureHandler.h:
3005
3006 2014-05-22  Andreas Kling  <akling@apple.com>
3007
3008         Hook up a setting for showing detailed logging during memory pressure relief.
3009         <https://webkit.org/b/133194>
3010
3011         Make the pressure relief logger opt-in. Also make it flush memory back to the
3012         OS (for both malloc and FastMalloc) to get more accurate numbers at each step.
3013
3014         Reviewed by Gavin Barraclough.
3015
3016         * WebCore.exp.in:
3017         * platform/MemoryPressureHandler.cpp:
3018         * platform/MemoryPressureHandler.h:
3019         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
3020         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
3021         (WebCore::MemoryPressureHandler::ReliefLogger::setLoggingEnabled):
3022         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3023         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
3024
3025 2014-05-22  Brady Eidson  <beidson@apple.com>
3026
3027         Don't scan for phone numbers in editable regions
3028         <rdar://problem/16949846> and https://bugs.webkit.org/show_bug.cgi?id=133192
3029
3030         Reviewed by Enrica Casucci.
3031
3032         No new tests (Currently untested WK2-only feature)
3033
3034         * editing/Editor.cpp:
3035         (WebCore::Editor::scanRangeForTelephoneNumbers): Skip the range if the Node is editable.
3036
3037 2014-05-22  Jeremy Jones  <jeremyj@apple.com>
3038
3039         Captions layout incorrectly in fullscreen.
3040         https://bugs.webkit.org/show_bug.cgi?id=133175
3041
3042         Reviewed by Eric Carlson.
3043
3044         When doing layout for fullscreen, geometry should be absolute so it is not influenced
3045         by the rest of the page. This change adds style for CSSPropertyPosition, CSSPropertyLeft,
3046         and CSSPropertyTop.
3047
3048         * html/shadow/MediaControlElements.cpp:
3049         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3050         Refactor style changes into updateStyleForTextTrackRepresentation().
3051         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
3052         Refactor style changes into updateStyleForTextTrackRepresentation().
3053         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
3054         Refactor style changes into updateStyleForTextTrackRepresentation().
3055         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation):
3056         Consolidate style changes here. Include the two existing and three new style changes.
3057         * html/shadow/MediaControlElements.h:
3058         Declare updateStyleForTextTrackRepresentation().
3059
3060 2014-05-22  Simon Fraser  <simon.fraser@apple.com>
3061
3062         REGRESSION (r155977): Very stuttery 3D css animation on jtechcommunications.com
3063         https://bugs.webkit.org/show_bug.cgi?id=133179
3064         <rdar://problem/16864666>
3065
3066         Reviewed by Dean Jackson.
3067
3068         Revert code added in r155977 to try to pick a good contentsScale for layers
3069         based on a root-relative transform. This resulted in pages with too much 
3070         backing store, and too many cases where layers repainted during animations,
3071         causing stutter.
3072
3073         * platform/graphics/ca/GraphicsLayerCA.cpp:
3074         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3075         (WebCore::GraphicsLayerCA::flushCompositingState):
3076         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3077         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3078         (WebCore::GraphicsLayerCA::updateContentsOpaque):
3079         (WebCore::GraphicsLayerCA::updateAnimations):
3080         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
3081         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
3082         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
3083         (WebCore::GraphicsLayerCA::updateContentsScale):
3084         (WebCore::clampedContentsScaleForScale): Deleted.
3085         (WebCore::maxScaleFromTransform): Deleted.
3086         (WebCore::GraphicsLayerCA::updateRootRelativeScale): Deleted.
3087         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact): Deleted.
3088         * platform/graphics/ca/GraphicsLayerCA.h:
3089
3090 2014-05-22  Martin Hock  <mhock@apple.com>
3091
3092         [iOS] Enable -apple-system- styled elements to respond to system font size changes.
3093         https://bugs.webkit.org/show_bug.cgi?id=133186
3094         <rdar://problem/16583782>
3095
3096         Reviewed by Enrica Casucci.
3097
3098         * WebCore.exp.in:
3099         * WebCore.xcodeproj/project.pbxproj:
3100         * rendering/RenderThemeIOS.h:
3101         * rendering/RenderThemeIOS.mm:
3102         (WebCore::_contentSizeCategory):
3103         (WebCore::RenderThemeIOS::contentSizeCategory):
3104         (WebCore::RenderThemeIOS::setContentSizeCategory):
3105
3106 2014-05-22  Jer Noble  <jer.noble@apple.com>
3107
3108         [MSE] Stored samples are not freed when SourceBuffer is removed from MediaSource
3109         https://bugs.webkit.org/show_bug.cgi?id=133174
3110
3111         Reviewed by Eric Carlson.
3112
3113         Clear out stored MediaSamples from SourceBuffer's TrackBuffer storage when
3114         aborting loading. Also, report the memory cost of those samples, so that the
3115         SourceBuffer will be GCd more readily.
3116
3117         Add a mechanism for reporting the size of a MediaSample:
3118         * Modules/mediasource/SourceBuffer.h:
3119         * platform/MediaSample.h:
3120         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3121         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3122
3123         Track the memory usage of a SampleMap when adding and removing samples, as well
3124         as allowing the SampleMap to be cleared wholesale:
3125         * Modules/mediasource/SampleMap.cpp:
3126         (WebCore::SampleMap::clear): Release all stored MediaSamples.
3127         (WebCore::SampleMap::addSample): Update m_totalSize.
3128         (WebCore::SampleMap::removeSample): Ditto.
3129         * Modules/mediasource/SampleMap.h:
3130         (WebCore::SampleMap::SampleMap): Initialize m_totalSize.
3131         (WebCore::SampleMap::sizeInBytes): Simple accessor.
3132
3133         Clear the stored samples when loading is aborted, and report the extra memory
3134         cost
3135         * Modules/mediasource/SourceBuffer.cpp:
3136         (WebCore::SourceBuffer::SourceBuffer): Initialize m_reportedExtraMemoryCost.
3137         (WebCore::SourceBuffer::removedFromMediaSource): Clear all stored samples.
3138         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reportExtraMemoryCost().
3139         (WebCore::SourceBuffer::reportExtraMemoryCost): Inform the vm of the new
3140             extra memory cost incurred by the object.
3141
3142 2014-05-22  Enrica Casucci  <enrica@apple.com>
3143
3144         REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
3145         https://bugs.webkit.org/show_bug.cgi?id=133183
3146         <rdar://problem/17004207>
3147
3148         Reviewed by Geoff Garen.
3149
3150         Adding new export.
3151
3152         * WebCore.exp.in:
3153
3154 2014-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3155
3156         REGRESSION(r163712): [GTK] Misspelling and grammar underline marks are no longer drawn
3157         https://bugs.webkit.org/show_bug.cgi?id=133047
3158
3159         Reviewed by Darin Adler.
3160
3161         Change two conditions changed by mistake in r163712.
3162
3163         * editing/TextCheckingHelper.cpp:
3164         (WebCore::findMisspellings): Enter the loop also when wordStart is 0.
3165         (WebCore::TextCheckingHelper::findFirstMisspelling): Skip the work
3166         when the text is a single character. Also reworked it to use a for
3167         loop to improve the readability.
3168
3169 2014-05-22  Piotr Grad  <p.grad@samsung.com>
3170
3171         Video is resumed with old playback rate.
3172         https://bugs.webkit.org/show_bug.cgi?id=132905
3173
3174         Reviewed by Philippe Normand.
3175
3176         Setting '0' playback rate is causing pipeline to pause.
3177         GStreamer player impl. exposed this information to upper layers but it should not.
3178         Solution is to hidden such situation behind m_playbackRatePause flag.
3179
3180         Test: media/video-paused-0-rate.html
3181
3182         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3183         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3184         (WebCore::MediaPlayerPrivateGStreamer::play):
3185         (WebCore::MediaPlayerPrivateGStreamer::pause):
3186         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
3187         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
3188         (WebCore::MediaPlayerPrivateGStreamer::paused):
3189         (WebCore::MediaPlayerPrivateGStreamer::setRate):
3190         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
3191         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3192
3193 2014-05-22  Antti Koivisto  <antti@apple.com>
3194
3195         Text markers don't paint on simple lines
3196         https://bugs.webkit.org/show_bug.cgi?id=133177
3197
3198         Reviewed by Anders Carlsson.
3199         
3200         Marker painting code does not yet support simple lines.
3201
3202         Tests: fast/text/mark-matches-rendering-simple-lines.html
3203                fast/text/mark-matches-rendering.html
3204
3205         * dom/DocumentMarkerController.cpp:
3206         (WebCore::DocumentMarkerController::addMarker):
3207         
3208             Force text blocks with markers to use line boxes.
3209
3210         * testing/Internals.cpp:
3211         (WebCore::Internals::setMarkedTextMatchesAreHighlighted):
3212         
3213             Expose this so we can make reftests for marker rendering.
3214
3215         * testing/Internals.h:
3216         * testing/Internals.idl:
3217
3218 2014-05-22  Manuel Rego Casasnovas  <rego@igalia.com>
3219
3220         [CSS Grid Layout] Guard RenderObject::isRenderGrid() method
3221         https://bugs.webkit.org/show_bug.cgi?id=132380
3222
3223         Reviewed by Benjamin Poulain.
3224
3225         Guard RenderObject::isRenderGrid() method under ENABLE_CSS_GRID_LAYOUT compilation flag.
3226
3227         * rendering/RenderBox.cpp:
3228         (WebCore::RenderBox::computeLogicalWidthInRegion):
3229         * rendering/RenderObject.h:
3230
3231 2014-05-21  Antti Koivisto  <antti@apple.com>
3232
3233         REGRESSION(r167870): Crash in simple line layout code with :after
3234         https://bugs.webkit.org/show_bug.cgi?id=133155
3235         <rdar://problem/16977696>
3236
3237         Reviewed by Darin Adler.
3238         
3239         Fix https://bugs.webkit.org/show_bug.cgi?id=132241 in a safer way.
3240         The underline behavior is tested by the existing fast/text/simple-lines-hover-underline.html
3241
3242         Test: fast/text/simple-lines-hover-after.html
3243
3244         * rendering/RenderBlock.cpp:
3245         (WebCore::RenderBlock::invalidateLineLayoutPath): Deleted.
3246
3247             Move to RenderBlockFlow.
3248
3249         * rendering/RenderBlock.h:
3250         (WebCore::RenderBlock::invalidateLineLayoutPath):
3251         * rendering/RenderBlockFlow.cpp:
3252         (WebCore::RenderBlockFlow::styleDidChange):
3253         
3254             Invalidate layout if style changes in a manner that makes us ineligible to use the simple line layout path.
3255
3256         (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
3257         
3258             Drop the simple line layout on path invalidation if it exists. It may not be valid anymore.
3259             Also invalidate the layout if this happens so we'll reconstruct the lines later.
3260
3261         (WebCore::RenderBlockFlow::simpleLineLayout): Deleted.
3262         (WebCore::RenderBlockFlow::ensureLineBoxes):
3263         (WebCore::RenderBlockFlow::createLineBoxes): Deleted.
3264                 
3265             Revert some of the changes made it r167870.
3266
3267         * rendering/RenderBlockFlow.h:
3268         (WebCore::RenderBlockFlow::simpleLineLayout):
3269         
3270             Add strong validity assert.
3271
3272 2014-05-21  Eric Carlson  <eric.carlson@apple.com>
3273
3274         [iOS] two media control button strings are not localized
3275         https://bugs.webkit.org/show_bug.cgi?id=133160
3276
3277         Reviewed by Geoffrey Garen.
3278
3279         * English.lproj/mediaControlsLocalizedStrings.js:
3280
3281 2014-05-21  Dean Jackson  <dino@apple.com>
3282
3283         [iOS] Update some of the media controls buttons to be bigger
3284         https://bugs.webkit.org/show_bug.cgi?id=133158
3285         <rdar://problem/16475828>
3286
3287         Reviewed by Simon Fraser.
3288
3289         The buttons in the media controls on iOS are too small
3290         to be comfortably pressed. Make them the size of the controls
3291         panel and the expected iOS button size (44x44px).
3292
3293         The artwork for the buttons now includes the padding. I've
3294         added a file from which you can edit the artwork, then
3295         copy it into the CSS (because editing directly in CSS is
3296         a huge pain).
3297
3298         So far just the play/pause and fullscreen button have been
3299         updated. There will be a follow-up patch to fix the remaining
3300         buttons and the scrubber.
3301
3302         * Modules/mediacontrols/assets-apple-iOS.svg: Added.
3303         * Modules/mediacontrols/mediaControlsiOS.css:
3304         (audio::-webkit-media-controls-panel):
3305         (audio::-webkit-media-controls-fullscreen-button):
3306         (audio::-webkit-media-controls-play-button):
3307         (audio::-webkit-media-controls-play-button:active):
3308         (audio::-webkit-media-controls-play-button.paused):
3309         (audio::-webkit-media-controls-fullscreen-button:active):
3310         (@media only screen and (-webkit-min-device-pixel-ratio: 2)): Deleted.
3311
3312 2014-05-21  Zalan Bujtas  <zalan@apple.com>
3313
3314         Garbage when rubber-banding at the right edge of a page zoomed to non-integral scale.
3315         https://bugs.webkit.org/show_bug.cgi?id=133139
3316         <rdar://problem/16503353>
3317
3318         Reviewed by Simon Fraser.
3319
3320         Do not pixel align the root content layer. The alignment code expands the graphics's layer size
3321         which makes the right and bottom tiles bigger than the content.
3322         Painting the body's background color produces pixel cracks, because the content can not
3323         fill the expanded tiles completely.
3324
3325         Not testable.
3326
3327         * platform/graphics/GraphicsLayerClient.h:
3328         (WebCore::GraphicsLayerClient::needsPixelAligment):
3329         * platform/graphics/ca/GraphicsLayerCA.cpp:
3330         (WebCore::GraphicsLayerCA::updateGeometry):
3331         (WebCore::GraphicsLayerCA::computePixelAlignment):
3332         * platform/graphics/ca/mac/TileGrid.mm:
3333         (WebCore::TileGrid::rectForTileIndex):
3334         * rendering/RenderLayerBacking.cpp:
3335         (WebCore::RenderLayerBacking::needsPixelAligment):
3336         * rendering/RenderLayerBacking.h:
3337
3338 2014-05-21  Radu Stavila  <stavila@adobe.com>
3339
3340         REGRESSION (r168046): Invalid layout in WebCore::RenderBox::containingBlockLogicalWidthForPositioned
3341         https://bugs.webkit.org/show_bug.cgi?id=132933
3342
3343         Reviewed by Darin Adler.
3344
3345         Invalid layout is performed when calling containingBlockLogicalWidthForPositioned for a RenderTableSection object.
3346
3347         Test: fast/multicol/newmulticol/table-section-crash.html
3348
3349         * rendering/RenderBox.cpp:
3350         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3351
3352 2014-05-21  Simon Pena  <simon.pena@samsung.com>
3353
3354         [EFL] Ensure EGLOffScreenContext::initialize calls platformMakeCurrent on the surface
3355         https://bugs.webkit.org/show_bug.cgi?id=124832
3356
3357         Reviewed by Antonio Gomes.
3358
3359         The original code was only calling platformMakeCurrent when the
3360         GL_EXT_robustness extension is supported: the alternate code path
3361         would only create a context, but it wouldn't make that context
3362         current. This patch ensures platformMakeCurrent is also called for
3363         the alternate code path, and, if it fails to make the context
3364         current, will destroy the context. Effectively, this makes both
3365         code paths behave in the same way.
3366
3367         * platform/graphics/surfaces/egl/EGLContext.cpp:
3368         (WebCore::EGLOffScreenContext::initialize):
3369
3370 2014-05-20  Brent Fulgham  <bfulgham@apple.com>
3371
3372         [Mac] DataCues do not work properly when rewinding video
3373         https://bugs.webkit.org/show_bug.cgi?id=133138
3374         <rdar://problem/16979086>
3375
3376         Reviewed by Eric Carlson.
3377
3378         Make the TrackPrivateBase responsible for knowing if a type of track needs a non-zero
3379         startTimeVariance value.
3380
3381         Also, correct a bug in the equality test for DataCue objects.
3382
3383         * html/track/DataCue.cpp:
3384         (WebCore::DataCue::isEqual): Handle the JSValue data types consistently, so that we don't attempt
3385         to compare a JSNull against a default JSValue object.
3386         * html/track/InbandTextTrack.cpp:
3387         (WebCore::InbandTextTrack::startTimeVariance): Added.
3388         * html/track/InbandTextTrack.h:
3389         * html/track/TextTrack.cpp:
3390         (WebCore::TextTrack::hasCue): Use new startTimeVariance method location.
3391         * html/track/TextTrack.h:
3392         (WebCore::TextTrack::startTimeVariance): Added.
3393         * html/track/TextTrackCue.cpp:
3394         (WebCore::TextTrackCue::hasEquivalentStartTime): Use new startTimeVariance location.
3395         * html/track/TextTrackCue.h:
3396         (WebCore::TextTrackCue::startTimeVariance): Deleted.
3397         * html/track/TextTrackCueGeneric.h:
3398         * platform/graphics/TrackPrivateBase.h:
3399         (WebCore::TrackPrivateBase::startTimeVariance): Added.
3400         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3401
3402 2014-05-20  Mark Hahnenberg  <mhahnenberg@apple.com>
3403
3404         Watchdog timer should be lazily allocated
3405         https://bugs.webkit.org/show_bug.cgi?id=133135
3406
3407         Reviewed by Geoffrey Garen.
3408
3409         No new tests.
3410
3411         We incur a noticeable amount of overhead on some benchmarks due to checking if the Watchdog ever fired. 
3412         There is no reason to do this checking if we never activated the Watchdog, which can only be done through 
3413         JSContextGroupSetExecutionTimeLimit or JSContextGroupClearExecutionTimeLimit. 
3414
3415