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