5f04d333fa23b6083e060c49bb4f25a61531c9d9
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-22  Jeremy Jones  <jeremyj@apple.com>
2
3         Don't create new UIWindow for video fullscreen.
4         https://bugs.webkit.org/show_bug.cgi?id=135038
5
6         Reviewed by Darin Adler.
7
8         * WebCore.exp.in:
9         * platform/ios/WebVideoFullscreenControllerAVKit.h: use UIView instead of UIScreen.
10         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
11         (-[WebVideoFullscreenController enterFullscreen:]): provide parent UIView.
12         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: remove UIWindow.
13         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
14         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto 
15         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
16         (WebVideoFullscreenInterfaceAVKit::invalidate): ditto
17         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
18
19 2014-07-22  Carlos Alberto Lopez Perez  <clopez@igalia.com>
20
21         [GTK] Rollout r170529 due to ~10% performance regression on the
22         perf test Animation/balls.
23         https://bugs.webkit.org/show_bug.cgi?id=134972
24
25         Reviewed by Martin Robinson.
26
27         Reverted changeset:
28         "Increase priority on SharedTimer source."
29         https://trac.webkit.org/r170529
30
31 2014-07-18  Dirk Schulze  <krit@webkit.org>
32
33         Turn width/height to presentation attributes
34         https://bugs.webkit.org/show_bug.cgi?id=135046
35
36         Reviewed by Dean Jackson.
37
38         The elements <svg>, <image>, <pattern>, <mask> and <foreignObject> have the
39         'width' and 'height' attributes. So far they can just be set by SVG DOM or
40         setAttribute. Furthermore, animations just work with SVG Animation - No support
41         for CSS Animations and CSS Transitions. We started to turn the width and height
42         attributes on SVG roots to presentation attributes already. A presentation
43         attribute is a CSS property that can also be set by DOM (or now by SVG DOM).
44
45         This patch turns all width and height attributes to presentation attributes. It
46         basically allows authors to style width and height with CSS as well. Width and
47         height can now be set with CSS style sheets and can be animated with CSS.
48
49         To some degree it made it possible to remove code duplication. However, since
50         SVG DOM requires us to use SVGLength types and since we did not turn all
51         SVG attributes to the CSS length values (and our internal Length struct) yet,
52         we still need a hybrid - a bridge between SVGLength (for SVG DOM) and Length (for
53         RenderStyle). Once we move all attributes to use the Length struct, we can make SVGLength
54         a wrapper for Length and can move more code to the render tree.
55
56         The current challenge is to synchronize SVG DOM, normal DOM and RenderStyle.
57         With this patch we handle most part in RenderStyle. SVG DOM changes are
58         synchronized to DOM and RenderStyle will call needsStyleRecalc. Furthermore,
59         SVG Animations will continue to animate the SVG DOM (and synchronize the changes
60         back to RenderStyle) if the element has a JS property for the currently animated
61         attribute.
62
63         Short example:
64
65             <rect>
66                 <animate attributeName="width">
67             </rect>
68
69         The <rect> element has the SVG DOM property 'width'. Therefore, we animate the SVG DOM
70         property and synchronize RenderStyle.
71
72             <ellipse>
73                 <animate attributeName="width">
74             </ellipse>
75
76         The <ellipse> element does NOT have the SVG DOM property 'width'. Therefore, we
77         animate the CSS property directly. With synchronizing RenderStyle in all cases, we
78         make sure that the CSS cascade works even on animating on multiple SVG hierarchy
79         levels (animation of 'width' on <g> and inheriting the property value on a child
80         <rect>).
81
82         With using presentation attributes, we also inherit the CSS property parsing for
83         SVG attributes. <rect width="  100px  "> is possible now. (Note the trailing whitespaces.)
84         This follows a recent resolution of the SVG WG.
85
86         Since we turned width and height to presentation attributes, the layout optimization
87         selfHasRelativeLengths() in the DOM can't be used anymore. selfHasRelativeLengths() was
88         intended to solve a problem where we did not layout relatively position/sized elements
89         when the parent changes its size. However, as a side effect it did not call layout
90         for absolutely positioned/sized elements since the layout does not change. I run
91         all performance tests that we have and even wrote a test with hundreds of elements
92         that would be affected by this optimization. The differences were inside the sigma
93         of a normal test run. (Means I couldn't measure a performance difference.)
94         Therefore, it is not worth it to keep the "optimization" around and I will probably
95         remove it entirely for all basic shapes but <path> and <polygon> in future patches.
96
97         Tests: svg/css/parse-height.html
98                svg/css/parse-width.html
99                svg/css/width-height-presentation-attribute-expected.svg
100                svg/css/width-height-presentation-attribute.svg
101
102         * css/CSSComputedStyleDeclaration.cpp:
103         (WebCore::ComputedStyleExtractor::propertyValue): We never calculated the computed
104             value of width/height for SVG elements and returned auto instead. This is based
105             on a rule of CSS 2 and needs to be fixed in CSS3.
106         * css/DeprecatedStyleBuilder.cpp:
107         (WebCore::ApplyPropertyLength::applyValue): Length always incorporates the zoom level.
108             In SVG we still apply the zoom after all operations by scaling the context. We need
109             to take this in account for Length and don't apply zoom on SVG inline elements.
110         * css/StyleResolver.cpp:
111         (WebCore::StyleResolver::useSVGZoomRulesForLength):
112             See above.
113         * css/StyleResolver.h:
114         * rendering/svg/RenderSVGRect.cpp:
115         (WebCore::RenderSVGRect::updateShapeFromElement): Do not call width() and height() on
116             SVG DOM but use the values of RenderStyle instead.
117         * rendering/svg/SVGPathData.cpp:
118         (WebCore::updatePathFromRectElement): Ditto.
119         * svg/SVGAnimateElement.cpp:
120         (WebCore::SVGAnimateElement::resetAnimatedType): We need to differ between CSS properties
121             with and without SVG DOM on the current element. In the later case we animate the 
122             SVG DOM and need to synch RenderStyle.
123         (WebCore::SVGAnimateElement::clearAnimatedType): Ditto.
124         (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto.
125         * svg/SVGAnimationElement.cpp:
126         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): This checks if the CSS property
127             has to be synched with SVG DOM.
128         (WebCore::SVGAnimationElement::shouldApplyAnimation): Ditto.
129         * svg/SVGAnimationElement.h:
130         * svg/SVGElement.cpp:
131         (WebCore::populateAttributeNameToCSSPropertyIDMap): Add width and heigth to the CSS property
132             list for presentation attributes.
133         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): CSS properties with
134             SVG DOM synchronization need to be treated differently. Collect them in a separate map.
135         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Caller for the map.
136         (WebCore::SVGElement::animatedPropertyTypeForAttribute): We need to check both maps here:
137             CSS properties and CSS properties with SVG DOM synch.
138         (WebCore::SVGElement::isAnimatableCSSProperty): Ditto.
139         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Just return true if the property name
140             is in the map of properties with SVG DOM for the current element.
141         * svg/SVGElement.h:
142         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle): Call needsStyleRecalc.
143         * svg/SVGFilterElement.cpp: Make width/height presentation attribute.
144         (WebCore::SVGFilterElement::svgAttributeChanged):
145         (WebCore::SVGFilterElement::selfHasRelativeLengths): Deleted.
146         * svg/SVGFilterElement.h: Ditto.
147         * svg/SVGForeignObjectElement.cpp:
148         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
149         (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): Deleted.
150         * svg/SVGForeignObjectElement.h:
151         * svg/SVGImageElement.cpp: Ditto.
152         (WebCore::SVGImageElement::svgAttributeChanged):
153         (WebCore::SVGImageElement::isPresentationAttribute): Deleted.
154         (WebCore::SVGImageElement::collectStyleForPresentationAttribute): Deleted.
155         (WebCore::SVGImageElement::selfHasRelativeLengths): Deleted.
156         * svg/SVGImageElement.h:
157         * svg/SVGLength.h: Transform an Length value to an absolute value by taking the SVG viewport
158             into account. (An SVG viewport is not the same as the CSS viewport.)
159         * svg/SVGLengthContext.cpp: Ditto.
160         (WebCore::SVGLengthContext::valueForLength):
161         * svg/SVGLengthContext.h:
162         * svg/SVGMaskElement.cpp: Make width/height presentation attribute.
163         (WebCore::SVGMaskElement::svgAttributeChanged):
164         (WebCore::SVGMaskElement::selfHasRelativeLengths): Deleted.
165         * svg/SVGMaskElement.h:
166         * svg/SVGPatternElement.cpp: Ditto.
167         (WebCore::SVGPatternElement::svgAttributeChanged):
168         (WebCore::SVGPatternElement::selfHasRelativeLengths): Deleted.
169         * svg/SVGPatternElement.h:
170         * svg/SVGRectElement.cpp: Ditto.
171         (WebCore::SVGRectElement::svgAttributeChanged):
172         (WebCore::SVGRectElement::selfHasRelativeLengths): Deleted.
173         * svg/SVGRectElement.h:
174         * svg/SVGSVGElement.cpp: Ditto.
175         (WebCore::SVGSVGElement::svgAttributeChanged): Clean up redundant layout calls.
176         (WebCore::SVGSVGElement::isPresentationAttribute): Deleted.
177         (WebCore::SVGSVGElement::collectStyleForPresentationAttribute): Deleted.
178         * svg/SVGSVGElement.h:
179         * svg/properties/SVGAnimatedProperty.cpp: Synchronize SVG DOM with DOM.
180         (WebCore::SVGAnimatedProperty::commitChange):
181
182 2014-07-22  Adrian Perez de Castro  <aperez@igalia.com>
183
184         [GStreamer] [GTK] WebKit does not build with GStreamer 1.4
185         https://bugs.webkit.org/show_bug.cgi?id=135114
186
187         Reviewed by Philippe Normand.
188
189         Fix build with GStreamer 1.4
190
191         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
192         Change GstMpegTs-prefixed types to use the GstMpegts prefix.
193         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
194         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
195         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
196         Ditto.
197
198 2014-07-21  Benjamin Poulain  <bpoulain@apple.com>
199
200         [iOS][WK2] Improve event throttling for Scroll Events
201         https://bugs.webkit.org/show_bug.cgi?id=135082
202         <rdar://problem/17445266>
203
204         Reviewed by Simon Fraser.
205
206         This patch is composed of two parts. The first part in the WebKit layer
207         track an approximate measurement of the main thread responsiveness.
208         The second part in WebCore use that information to avoid sending events
209         if a page is unresponsive.
210
211         In WebCore, this patch only consider scroll events so far. Hopefully the concept
212         should be easy to generalize.
213
214         * loader/EmptyClients.h:
215         * page/ChromeClient.h:
216         Chrome client provides us with one information: how long an incoming event should be delayed.
217         Every port is free to implement whatever logic is suitable for them.
218
219         * page/FrameView.cpp:
220         (WebCore::FrameView::FrameView):
221         (WebCore::FrameView::reset):
222         (WebCore::FrameView::delayedScrollEventTimerFired):
223         (WebCore::FrameView::scrollPositionChanged):
224         (WebCore::FrameView::sendScrollEvent):
225         * page/FrameView.h:
226         Scroll events do not have any associated information so they can be coalesced by just skipping
227         all input hapenning during the throttling delay.
228
229         The implementation is done by using a timer to delay the events.
230
231 2014-07-21  Tim Horton  <timothy_horton@apple.com>
232
233         Avoid putting empty-sized surfaces into IOSurfacePool
234         https://bugs.webkit.org/show_bug.cgi?id=135136
235
236         Reviewed by Simon Fraser.
237
238         * platform/graphics/cg/IOSurfacePool.cpp:
239         (WebCore::IOSurfacePool::addSurface):
240         Avoid adding 0x0 surfaces to the pool, because they will wreak havoc
241         when their size is used as the key in the CachedSurfaceMap.
242         Additionally, avoid any empty sizes, because they're just pointless.
243
244 2014-07-21  Beth Dakin  <bdakin@apple.com>
245
246         WK1 should always setAcceleratedCompositingForFixedPositionEnabled(true) on 
247         Yosemite
248         https://bugs.webkit.org/show_bug.cgi?id=135135
249
250         Reviewed by Darin Adler.
251
252         This patch gets rid of the ChromeClient function that was introduced with 
253         http://trac.webkit.org/changeset/171308 We’ll just enable the Setting instead.
254         * css/StyleResolver.cpp:
255         (WebCore::StyleResolver::adjustRenderStyle):
256         (WebCore::fixedPositionCreatesStackingContext): Deleted.
257         * page/ChromeClient.h:
258         (WebCore::ChromeClient::requiresAcceleratedCompositingForViewportConstrainedPosition): Deleted.
259         * rendering/RenderLayerCompositor.cpp:
260         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
261
262 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
263
264         [iOS WK2] Turn off position:fixed behavior when the keyboard is up
265         https://bugs.webkit.org/show_bug.cgi?id=132537
266
267         Reviewed by Benjamin Poulain.
268
269         Export RenderObject::localToContainerPoint().
270
271         * WebCore.exp.in:
272
273 2014-07-21  Jer Noble  <jer.noble@apple.com>
274
275         [MSE] YouTube video decode error when variant-switching
276         https://bugs.webkit.org/show_bug.cgi?id=135128
277
278         Reviewed by Brent Fulgham.
279
280         Test: media/media-source/media-source-overlapping-decodetime.html
281
282         When variant-switching, the situation can arise where an existing sample with a presentation
283         timestamp of N and a decode timestamp of M, and a new sample with a presentation timestamp > N
284         and the same decode timestamp of M, will keep the new sample from being added to the SampleMap.
285         This can result in a decode error when samples depending on that new, missing sample are enqueued.
286
287         The MSE spec is silent on the issue of overlapping decode timestamps. However, it guarantees that
288         presentation timestamps are non-overlapping. So instead of using just the decode timestamp as a key
289         for storing the samples in decode order, use both the decode timestamp and the presentation timestamp.
290         That ensures that samples with different presentation times but equal decode times are both inserted
291         into the decode queue, and in the correct order.
292
293         * Modules/mediasource/SampleMap.cpp:
294         (WebCore::SampleIsRandomAccess::operator()): Update the parameter type to match the new KeyType.
295         (WebCore::SampleMap::addSample): Pass both decodeTime and presentationTime as the key to decodeOrder.
296         (WebCore::SampleMap::removeSample): Ditto.
297         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeKey): Renamed from findSampleWithDecodeTime.
298         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeKey): renamed from reverseFindSampleWithDecodeTime.
299         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Use renamed version of above.
300         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
301         (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
302         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Deleted.
303         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Deleted.
304         * Modules/mediasource/SampleMap.h:
305         * Modules/mediasource/SourceBuffer.cpp:
306         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
307         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
308         (WebCore::SourceBuffer::reenqueueMediaForTime): Ditto.
309
310 2014-07-21  Andy Estes  <aestes@apple.com>
311
312         [iOS] Handle QuickLook ResourceLoaders in the web process
313         https://bugs.webkit.org/show_bug.cgi?id=135113
314
315         Reviewed by David Kilzer.
316
317         No new tests. QuickLook is not testable from WebKit.
318
319         * WebCore.exp.in:
320         * loader/ResourceLoadScheduler.cpp:
321         (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Start loading the ResourceLoader if it is for a QuickLook resource.
322         * loader/ResourceLoadScheduler.h:
323
324 2014-07-21  Alexey Proskuryakov  <ap@apple.com>
325
326         Case sensitive file system build fix.
327
328         * page/scrolling/ScrollingStateTree.cpp:
329
330 2014-07-21  Beth Dakin  <bdakin@apple.com>
331
332         Put position:fixed elements into layers when a WK1 view is layer-backed
333         https://bugs.webkit.org/show_bug.cgi?id=135075
334
335         Reviewed by Darin Adler.
336
337         This patch adds a new ChromeClient function called 
338         requiresAcceleratedCompositingForViewportConstrainedPosition(). Since a view can 
339         go in and out of layer backing, we need a ChromeClient method that can be 
340         dynamically re-evaluated rather than using the existing settings for enabling 
341         accelerated fixed and fixed that creates a stacking context.
342
343         Ensure that fixed elements create a stacking context when 
344         requiresAcceleratedCompositingForViewportConstrainedPosition is true.
345         * css/StyleResolver.cpp:
346         (WebCore::StyleResolver::adjustRenderStyle):
347
348         New ChromeClient function.
349         * page/ChromeClient.h:
350
351 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
352
353         Add helper functions to dump the scrolling state tree from the debugger
354         https://bugs.webkit.org/show_bug.cgi?id=135101
355
356         Reviewed by Darin Adler.
357
358         Add debug-only showScrollingStateTree() functions that take a ScrollingStateTree* and ScrollingStateNode*
359         for use while debugging.
360
361         * page/scrolling/ScrollingStateTree.cpp:
362         (showScrollingStateTree):
363         * page/scrolling/ScrollingStateTree.h:
364
365 2014-07-20  Simon Fraser  <simon.fraser@apple.com>
366
367         [iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
368         https://bugs.webkit.org/show_bug.cgi?id=135103
369         <rdar://problem/11830219>
370
371         Reviewed by Darin Adler.
372
373         After r166117 all layer flushing starts on the root frame; we no longer flush layers
374         for each frame during painting. However, flushing GraphicsLayers can set some state
375         on a subframe RenderLayerCompositor that is now never processed, which breaks scroll
376         layer registration.
377         
378         Fix by doing a walk of the Frame tree, and calling didFlushLayers() on subframe RenderLayerCompositors
379         before calling didFlushLayers() on self.
380
381         * rendering/RenderLayerCompositor.cpp:
382         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
383         (WebCore::RenderLayerCompositor::didFlushLayers):
384         (WebCore::RenderLayerCompositor::notifySubframesAfterLayerFlush):
385         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): Drive-by nullptr.
386         * rendering/RenderLayerCompositor.h:
387
388 2014-07-21  Eric Carlson  <eric.carlson@apple.com>
389
390         [iOS] a Paused media session is not active
391         https://bugs.webkit.org/show_bug.cgi?id=135108
392
393         Reviewed by Darin Adler.
394
395         Activating the shared AudioSession will pause audio playing in another application,
396         so only report a Playing media sessions as active.
397
398         * platform/audio/MediaSessionManager.cpp:
399         * platform/audio/MediaSessionManager.h:
400         (WebCore::MediaSessionManager::activeAudioSessionRequired): Renamed from hasActive to make
401         clear what it does. Only return true for a session that is Playing.
402
403         * platform/audio/mac/MediaSessionManagerMac.cpp:
404         (MediaSessionManager::updateSessionState): hasActive renamed to activeAudioSessionRequired.
405
406 2014-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
407
408         Unreviewed. Update GObject DOM bindings test results after r171285.
409
410         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
411         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
412         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
413         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
414         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
415         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
416         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
417         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
418         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
419         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
420         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
421         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
422         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
423         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
424         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
425         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
426         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
427         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
428
429 2014-07-20  Pratik Solanki  <psolanki@apple.com>
430
431         Reduce the chances of a race condition when sharing SharedBuffer
432         https://bugs.webkit.org/show_bug.cgi?id=135060
433         <rdar://problem/17729444>
434
435         Reviewed by Darin Adler.
436
437         We currently pass a SharedBuffer wrapped in WebCoreSharedBufferData to ImageIO for image
438         decoding. This is not thread safe since ImageIO will access this buffer on a separate
439         thread. We access SharedBuffer::buffer() on the other thread which resizes the Vector
440         m_buffer if m_size is greater than the vector size. Since the code in SharedBuffer::append()
441         sets m_size before appending the data to the buffer, m_size is out of sync with the m_buffer
442         size for the entire duration of the Vector append which could be doing a lot of copying if
443         the resource is large. While this change does not fix the race condition, we can at least
444         reduce the chances of SharedBuffer::buffer() calling resize() by setting m_size after the
445         cector has finished appending.
446
447         No new tests because no functional changes.
448
449         * platform/SharedBuffer.cpp:
450         (WebCore::SharedBuffer::append):
451
452 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
453
454         Fix test crashes when cloning video layer since r171286
455         https://bugs.webkit.org/show_bug.cgi?id=135112
456
457         Unreviewed. Fix crashing tests by conditionalizing inline video layer change.
458         compositing/video/video-reflection.html [ Crash ]
459         media/video-layer-crash.html [ Crash ]
460
461         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add conditional
462         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
463         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): ditto
464         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto
465         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): ditto
466
467 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
468
469         Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
470         https://bugs.webkit.org/show_bug.cgi?id=134894
471
472         Reviewed by Darin Adler.
473
474         * WebCore.exp.in: add symbol for canPlayFastReverse
475         * html/HTMLMediaElement.cpp: Add two new accessors
476         (WebCore::HTMLMediaElement::nextScanRate): possibly limit scanRate
477         (WebCore::HTMLMediaElement::canPlayFastForward): added
478         (WebCore::HTMLMediaElement::canPlayFastReverse): added
479         * html/HTMLMediaElement.h: declare two new methods
480         * platform/graphics/MediaPlayer.cpp: Plumb through two new accessors
481         (WebCore::MediaPlayer::maxFastForwardRate): added
482         (WebCore::MediaPlayer::minFastReverseRate): added
483         * platform/graphics/MediaPlayer.h: Declare new methods
484         * platform/graphics/MediaPlayerPrivate.h: Added two new methods.
485         (WebCore::MediaPlayerPrivateInterface::maxFastForwardRate): added
486         (WebCore::MediaPlayerPrivateInterface::minFastReverseRate): added
487         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: member to cache ff/rw enabled state
488         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
489         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): observe on item canPlayFastForward canPlayFastReverse
490         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastForwardDidChange): added
491         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastReverseDidChange): added
492         (WebCore::itemKVOProperties): observe canPlayFastForward canPlayFastRewind
493         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): ditto
494         * platform/ios/WebVideoFullscreenInterface.h: add new method
495         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto
496         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: ditto
497         (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): Set value on WebAVPlayerController.
498         (-[WebAVPlayerController canScanBackward]): Deleted.
499         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanBackward]): Deleted.
500         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
501         (WebVideoFullscreenModelMediaElement::updateForEventName): update canPlayFastReverse.
502
503 2014-07-18  Gavin Barraclough  <baraclough@apple.com>
504
505         HTMLMediaElement should registerWithDocument on iOS
506         https://bugs.webkit.org/show_bug.cgi?id=135084
507         <rdar://problem/17702531>
508
509         Reviewed by Andreas Kling.
510
511         Otherwise it won't know when the visibility changes!
512
513         * html/HTMLMediaElement.cpp:
514         (WebCore::HTMLMediaElement::registerWithDocument):
515         (WebCore::HTMLMediaElement::unregisterWithDocument):
516
517 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
518
519         Decrease flicker when enter and exit fullscreen.
520         https://bugs.webkit.org/show_bug.cgi?id=134919
521
522         Reviewed by Simon Fraser.
523
524         Put AVPlayerLayer in a container layer so moving it between inline and fullscreen
525         is as easy as adding and removing it from a containter layer; no need to do a layout.
526
527         Make sure fullscreen layers are transparent before moving moving the AVPlayerLayer
528         between inline and fullscreen so you don't briefly see the empty fullscreen layers.
529
530         * html/HTMLMediaElement.cpp:
531         (WebCore::HTMLMediaElement::platformLayer): remove fullscreen special case.
532         (WebCore::HTMLMediaElement::setVideoFullscreenLayer): no need to recalc style
533         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add inline container layer
534         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
535         add WebVideoContainerLayer to contain AVPlayerLayer and keep layout correct.
536         (-[WebVideoContainerLayer setBounds:]): forward setbounds to set child frame.
537         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): create the video container layer
538         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): destroy the video container layer
539         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): use container layer instead of video layer
540         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): use transactions to prevent unwanted animation.
541         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): ditto
542         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
543         (PlatformCALayerMac::layerTypeForPlatformLayer): WebVideoContainerLayer is a kind of AVPlayerLayer
544         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
545         (-[WebVideoFullscreenController didCleanupFullscreen]): remove video fullscreen layer first
546         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
547         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): make background transparent during transition.
548            dispatch_async to allow CATransaction to complete before calling didSetupFullscreen()
549
550 2014-07-20  Ryuan Choi  <ryuan.choi@samsung.com>
551
552         Move ExceptionCodeDescription.h into the files that actually need it
553         https://bugs.webkit.org/show_bug.cgi?id=134968
554
555         Reviewed by Darin Adler.
556
557         No new tests because no functional changes.
558
559         * Modules/indexeddb/IDBDatabaseException.cpp:
560         * Modules/webdatabase/SQLException.cpp:
561         * bindings/js/JSDOMBinding.cpp:
562         * bindings/objc/ExceptionHandlers.mm:
563         * bindings/scripts/CodeGeneratorGObject.pm:
564         (Generate):
565         * dom/DOMCoreException.cpp:
566         * dom/EventException.cpp:
567         * dom/ExceptionBase.cpp:
568         * dom/ExceptionCode.h:
569         * dom/RangeException.cpp:
570         * fileapi/FileException.cpp:
571         * inspector/DOMEditor.cpp:
572         * inspector/InspectorDOMAgent.cpp:
573         * svg/SVGException.cpp:
574         * xml/XMLHttpRequestException.cpp:
575         * xml/XPathException.cpp:
576
577 2014-07-20  Dan Bernstein  <mitz@apple.com>
578
579         <rdar://problems/17742611> -[_WKActivatedElementInfo image] is often empty
580         https://bugs.webkit.org/show_bug.cgi?id=135107
581
582         Reviewed by Sam Weinig.
583
584         Test: TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm
585
586         * page/FrameView.cpp:
587         (WebCore::FrameView::paintContents): To work around http://webkit.org/b/135106, replace the
588         paint root with its nearest ancestor that isn’t an inline with culled line boxes, if needed.
589
590 2014-07-20  Darin Adler  <darin@apple.com>
591
592         Crashes seen in wheel event handling
593         https://bugs.webkit.org/show_bug.cgi?id=135102
594
595         Reviewed by Beth Dakin.
596
597         Speculative fix based on guesses about what could be crashing.
598         The crash seems to be calling ref on an event target, and my guess is that this
599         has something to do with latching.
600
601         * page/EventHandler.cpp:
602         (WebCore::EventHandler::platformPrepareForWheelEvents): Updated argument types.
603         (WebCore::EventHandler::handleWheelEvent): Refactored a little and made some local
604         variables use RefPtr instead of raw pointers. Also added some comments.
605
606         * page/EventHandler.h: Changed argument types to RefPtr.
607
608         * page/mac/EventHandlerMac.mm:
609         (WebCore::EventHandler::platformPrepareForWheelEvents): Updated argument types.
610         Also added a FIXME.
611
612 2014-07-20  Simon Fraser  <simon.fraser@apple.com>
613
614         Print layerIDs in GraphicsLayer dumps
615         https://bugs.webkit.org/show_bug.cgi?id=135100
616
617         Reviewed by Darin Adler.
618
619         When calling showGraphicsLayerTree() from the debugger, it's useful to show
620         layerIDs so they can be correlated with remote layer tree transactions. So
621         when dumping with debug info, dump the primary layer ID.
622
623         * platform/graphics/GraphicsLayer.cpp:
624         (WebCore::GraphicsLayer::dumpProperties):
625
626 2014-07-20  Eric Carlson  <eric.carlson@apple.com>
627
628         [iOS] ignore requests to set volume
629         https://bugs.webkit.org/show_bug.cgi?id=135081
630
631         Applied post-review comments from Darin Adler.
632
633         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
634         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Don't include unreachable
635             code on iOS.
636
637 2014-07-19  Mark Rowe  <mrowe@apple.com>
638
639         <https://webkit.org/b/135085> Ensure that make_names.pl generates the same result when run multiple times.
640
641         Perl 5.18 introduced hash randomization. This results in the iteration order of hashes being different
642         from one run to the next. To ensure identical output we can iterate over the hash keys in sorted order.
643
644         Reviewed by Alexey Proskuryakov.
645
646         * bindings/scripts/StaticString.pm:
647         (GenerateStrings):
648         (GenerateStringAsserts):
649         * dom/make_names.pl:
650
651 2014-07-19  Zan Dobersek  <zdobersek@igalia.com>
652
653         Document::unregisterNodeListforInvalidation() and Document::unregisterCollection() have incorrect assertions
654         https://bugs.webkit.org/show_bug.cgi?id=134869
655
656         Reviewed by Darin Adler.
657
658         Both methods should assert that the relevant HashMap is either empty if invalidation originates
659         from Document::invalidateNodeListAndCollectionCaches() or acutally contains the element that is
660         being invalidated. In the first case the HashMap is empty because its entries were moved out in
661         the Document::invalidateNodeListAndCollectionCaches().
662
663         This was exposed by r170995 (later rolled out in r170999) which introduced move constructor and
664         move assignment operators for HashTable. The assertions in the titular methods won't be passing
665         until r170995 relands.
666
667         * dom/Document.cpp:
668         (WebCore::Document::unregisterNodeListForInvalidation):
669
670 2014-07-18  Eric Carlson  <eric.carlson@apple.com>
671
672         [iOS] ignore requests to set volume
673         https://bugs.webkit.org/show_bug.cgi?id=135081
674
675         Reviewed by Jer Noble.
676
677         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
678         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Do nothing on iOS.
679
680 2014-07-18  Andy Estes  <aestes@apple.com>
681
682         [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
683         https://bugs.webkit.org/show_bug.cgi?id=135072
684         <rdar://problem/17528188>
685
686         Reviewed by David Kilzer.
687
688         No new tests. Content filtering is not testable from WebKit.
689
690         * WebCore.exp.in: Exported necessary ContentFilter symbols.
691         * loader/DocumentLoader.cpp:
692         (WebCore::DocumentLoader::finishedLoading): Called FrameLoaderClient::contentFilterDidBlockLoad().
693         (WebCore::DocumentLoader::responseReceived): Created a new ContentFilter.
694         (WebCore::DocumentLoader::dataReceived): Called FrameLoaderClient::contentFilterDidBlockLoad().
695         (WebCore::DocumentLoader::setContentFilterForBlockedLoad): Deleted.
696         (WebCore::DocumentLoader::handleContentFilterRequest): Deleted.
697         * loader/DocumentLoader.h:
698         * loader/FrameLoaderClient.h:
699         (WebCore::FrameLoaderClient::contentFilterDidBlockLoad):
700         * loader/PolicyChecker.cpp:
701         (WebCore::PolicyChecker::checkNavigationPolicy): Removed the check for unblock navigations, as this is now
702         handled at the WebKit layer.
703         * platform/ContentFilter.h: ContentFilter no longer needs to be RefCounted, so made various changes in order to
704         make it compatible with unique_ptr.
705         * platform/ios/ContentFilterIOS.mm:
706         (WebCore::scheme): Changed from a public member function to a static inline free function.
707         (WebCore::ContentFilter::handleUnblockRequestAndDispatchIfSuccessful): Renamed from requestUnblockAndDispatchIfSuccessful.
708         * platform/mac/ContentFilterMac.mm:
709         (WebCore::ContentFilter::ContentFilter): Added a default constructor for use during message decoding.
710         (WebCore::ContentFilter::addData): Removed calls to ref() and deref(). These were never actually needed since
711         we were dispatching the block synchronously.
712         (WebCore::ContentFilter::finishedAddingData): Ditto.
713         (WebCore::ContentFilter::encode): Encoded m_platformContentFilter to the NSKeyedArchiver if it conforms to NSSecureCoding.
714         (WebCore::ContentFilter::decode): Decoded m_platformContentFilter from the NSKeyedUnarchiver if it conforms to NSSecureCoding.
715         (WebCore::ContentFilter::create): Deleted.
716
717 2014-07-18  Simon Fraser  <simon.fraser@apple.com>
718
719         [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
720         https://bugs.webkit.org/show_bug.cgi?id=135078
721         <rdar://problem/17401823>
722
723         Reviewed by Tim Horton.
724         
725         When the UI-side scrolling tree receives a requested scroll position update, it scrolls
726         the node (e.g. a frame) then traverses child nodes to update them, e.g. for fixed position.
727         However, we would always use a viewport rect for the main document (from the scrolling tree),
728         which is not appropriate for subframes. Subframes should just use their own visible
729         rect to position fixed children.
730
731         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame.html
732
733         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
734         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
735
736 2014-07-18  Beth Dakin  <bdakin@apple.com>
737
738         Fixed position elements are misplaced when a WK1 view has contentInsets set
739         https://bugs.webkit.org/show_bug.cgi?id=135031
740         -and corresponding-
741         <rdar://problem/17682335>
742
743         Reviewed by Tim Horton.
744
745         [NSScrollView documentVisibleRect] includes content that is within the inset-area 
746         of a view, but WebCore is interested in the content that is fully visible, so we 
747         need to factor the inset sizes out of this rect.
748
749         Implement contract() to avoid the awkwardness of calling expand() with negative 
750         values.
751         * platform/graphics/IntSize.h:
752         (WebCore::IntSize::contract):
753
754         Factor out insets
755         * platform/mac/ScrollViewMac.mm:
756         (WebCore::ScrollView::platformVisibleContentRect):
757         (WebCore::ScrollView::platformVisibleContentSize):
758
759 2014-07-18  Tim Horton  <timothy_horton@apple.com>
760
761         Take navigation snapshots whenever the current back-forward item is going to change
762         https://bugs.webkit.org/show_bug.cgi?id=135058
763         <rdar://problem/17464515>
764
765         Reviewed by Dan Bernstein.
766
767         * loader/HistoryController.cpp:
768         (WebCore::HistoryController::updateForCommit):
769         (WebCore::HistoryController::recursiveUpdateForCommit):
770         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
771         (WebCore::HistoryController::createItem):
772         Use setCurrentItem instead of duplicating the contents of it inside each of these functions.
773
774         (WebCore::HistoryController::setCurrentItem):
775         (WebCore::HistoryController::replaceCurrentItem):
776         When setting or replacing the current item, let the FrameLoaderClient know that we're going
777         to change which history item is "current".
778
779         * loader/FrameLoaderClient.h:
780         (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Added.
781
782 2014-07-18  Commit Queue  <commit-queue@webkit.org>
783
784         Unreviewed, rolling out r171207.
785         https://bugs.webkit.org/show_bug.cgi?id=135056
786
787         Broke multiple tests on Yosemite (Requested by ap on #webkit).
788
789         Reverted changeset:
790
791         "Fixed position elements are misplaced when a WK1 view has
792         contentInsets set"
793         https://bugs.webkit.org/show_bug.cgi?id=135031
794         http://trac.webkit.org/changeset/171207
795
796 2014-07-18  Commit Queue  <commit-queue@webkit.org>
797
798         Unreviewed, rolling out r171218.
799         https://bugs.webkit.org/show_bug.cgi?id=135055
800
801         Made fast/dom/HTMLObjectElement/beforeload-set-text-
802         crash.xhtml crash (Requested by ap on #webkit).
803
804         Reverted changeset:
805
806         "REGRESSION (r169105): Crash in selection"
807         https://bugs.webkit.org/show_bug.cgi?id=134303
808         http://trac.webkit.org/changeset/171218
809
810 2014-07-18  Radu Stavila  <stavila@adobe.com>
811
812         REGRESSION (r169105): Crash in selection
813         https://bugs.webkit.org/show_bug.cgi?id=134303
814
815         Reviewed by Ryosuke Niwa.
816
817         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
818         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
819         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
820         we get inconsistent data.
821
822         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
823         method first iterates through all subtrees and performs the "clear" method and then starts all over again
824         and performs the "apply" method.
825
826         Also, the selectionStart/End members in RenderView have been renamed to fix problems caused by the fact that
827         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
828
829         Test: fast/regions/selection/crash-deselect.html
830
831         * WebCore.xcodeproj/project.pbxproj:
832         * rendering/RenderBlock.cpp:
833         (WebCore::RenderBlock::isSelectionRoot):
834         * rendering/RenderSelectionInfo.h:
835         * rendering/RenderView.cpp:
836         (WebCore::RenderView::RenderView):
837         (WebCore::RenderView::setSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
838         (WebCore::RenderView::splitSelectionBetweenSubtrees):
839         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
840         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
841         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
842         (WebCore::RenderView::getSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
843         (WebCore::RenderView::setSubtreeSelection): Deleted.
844         * rendering/RenderView.h:
845         * rendering/SelectionSubtreeRoot.cpp:
846         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
847         * rendering/SelectionSubtreeRoot.h:
848         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
849
850 2014-07-17  Jer Noble  <jer.noble@apple.com>
851
852         [MSE] Re-enqueue after a removeCodedFrames() only if the removed frames overlap what may have possibly been enqueued but undisplayed.
853         https://bugs.webkit.org/show_bug.cgi?id=135039
854
855         Reviewed by Eric Carlson.
856
857         When a client calls removeCodedFrames(), we must re-enqueue those ranges if the removed samples overlap with
858         enqueued but possibly un-displayed samples. Otherwise, replacement samples may lead to decode errors as those
859         new samples dependencies are not met. But if we re-enqueue too frequently, this may cause subtle but noticible
860         display timing glitches, so only re-enqueue when removeCodedFrames have a possiblity of removing enqueued, but
861         not yet displayed samples.
862
863         * Modules/mediasource/SourceBuffer.cpp:
864         (WebCore::SourceBuffer::removeCodedFrames):
865
866 2014-07-17  David Kilzer  <ddkilzer@apple.com>
867
868         SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
869         <http://webkit.org/b/135006>
870
871         Reviewed by Darin Adler.
872
873         * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
874         WebCore.xcconfig.
875         * Configurations/DebugRelease.xcconfig: Remove empty
876         SECTORDER_FLAGS definition.
877         * Configurations/WebCoreTestShim.xcconfig: Ditto.
878         * Configurations/WebCoreTestSupport.xcconfig: Ditto.
879         * Configurations/WebCore.xcconfig: Use $(CONFIGURATION) so
880         SECTORDER_FLAGS is only set on Production builds.
881
882 2014-07-17  Zalan Bujtas  <zalan@apple.com>
883
884         Subpixel rendering: Embedded non-compositing rotate transform paints to wrong position.
885         https://bugs.webkit.org/show_bug.cgi?id=135028
886
887         Reviewed by Simon Fraser.
888
889         CTM always translates to where the layer's renderer() is going to paint.
890         It ensures that the pixel snapped renderer() always end up painting to (0, 0) which is
891         required to be able to position properly on transformed context.
892
893         Test: fast/layers/hidpi-transform-on-child-content-is-mispositioned.html
894
895         * rendering/RenderLayer.cpp:
896         (WebCore::RenderLayer::beginTransparencyLayers):
897         (WebCore::RenderLayer::clipToRect):
898         (WebCore::RenderLayer::paintLayerByApplyingTransform):
899         (WebCore::RenderLayer::paintBackgroundForFragments):
900         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
901         (WebCore::RenderLayer::paintOutlineForFragments):
902         (WebCore::RenderLayer::paintMaskForFragments):
903         (WebCore::RenderLayer::paintOverflowControlsForFragments):
904         (WebCore::RenderLayer::calculateClipRects):
905         * rendering/RenderLayer.h:
906
907 2014-07-17  Beth Dakin  <bdakin@apple.com>
908
909         Fixed position elements are misplaced when a WK1 view has contentInsets set
910         https://bugs.webkit.org/show_bug.cgi?id=135031
911         -and corresponding-
912         <rdar://problem/17682335>
913
914         Reviewed by Tim Horton.
915
916         [NSScrollView documentVisibleRect] is not the rect that we are looking for when 
917         this function is called. WebCore is interested in the rect that does not include 
918         content that is within the inset region.
919
920         Implement contract() to avoid the awkwardness of calling expand() with negative 
921         values.
922         * platform/graphics/IntSize.h:
923         (WebCore::IntSize::contract):
924
925         Use _insetBounds instead of documentVisibleRect, and when it’s necessary to use 
926         the frame’s dimensions, extract the inset from that size.
927         * platform/mac/ScrollViewMac.mm:
928         (WebCore::ScrollView::platformVisibleContentRect):
929         (WebCore::ScrollView::platformVisibleContentSize):
930
931 2014-07-17  Enrica Casucci  <enrica@apple.com>
932
933         [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
934         https://bugs.webkit.org/show_bug.cgi?id=135023
935         <rdar://problem/17617282>
936
937         Reviewed by Benjamin Poulain.
938
939         Adding some exports.
940         
941         * WebCore.exp.in:
942
943 2014-07-17  Timothy Hatcher  <timothy@apple.com>
944
945         Make console.profile record to the Timeline.
946
947         https://bugs.webkit.org/show_bug.cgi?id=134643
948
949         Reviewed by Joseph Pecoraro.
950
951         Passes existing profiler tests in fast/profiler.
952
953         * bindings/js/ScriptState.cpp:
954         (WebCore::domWindowFromExecState):
955         (WebCore::frameFromExecState):
956         (WebCore::scriptExecutionContextFromExecState):
957         (WebCore::mainWorldExecState):
958         (WebCore::execStateFromNode):
959         * bindings/js/ScriptState.h:
960         * inspector/InspectorController.cpp:
961         (WebCore::InspectorController::InspectorController):
962         (WebCore::InspectorController::profilerEnabled):
963         (WebCore::InspectorController::setProfilerEnabled):
964         * inspector/InspectorController.h:
965         * inspector/InspectorInstrumentation.cpp:
966         (WebCore::InspectorInstrumentation::startProfilingImpl):
967         (WebCore::InspectorInstrumentation::stopProfilingImpl):
968         * inspector/InspectorTimelineAgent.cpp:
969         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
970         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
971         (WebCore::InspectorTimelineAgent::start):
972         (WebCore::InspectorTimelineAgent::stop):
973         (WebCore::startProfiling):
974         (WebCore::stopProfiling):
975         (WebCore::InspectorTimelineAgent::startFromConsole):
976         (WebCore::InspectorTimelineAgent::stopFromConsole):
977         (WebCore::InspectorTimelineAgent::didWriteHTML):
978         (WebCore::InspectorTimelineAgent::breakpointActionProbe):
979         (WebCore::toProtocol):
980         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
981         (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
982         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
983         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
984         (WebCore::InspectorTimelineAgent::sendEvent):
985         (WebCore::InspectorTimelineAgent::createRecordEntry):
986         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
987         * inspector/InspectorTimelineAgent.h:
988         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
989         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
990         * inspector/InstrumentingAgents.cpp:
991         (WebCore::InstrumentingAgents::InstrumentingAgents):
992         (WebCore::InstrumentingAgents::reset):
993         * inspector/InstrumentingAgents.h:
994         (WebCore::InstrumentingAgents::persistentInspectorTimelineAgent):
995         (WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent):
996         * inspector/TimelineRecordFactory.cpp:
997         (WebCore::TimelineRecordFactory::createConsoleProfileData):
998         * inspector/TimelineRecordFactory.h:
999         * inspector/protocol/Timeline.json:
1000         * page/PageConsole.cpp:
1001         (WebCore::PageConsole::profileEnd):
1002
1003 2014-07-16  Sam Weinig  <sam@webkit.org>
1004
1005         Don't send geolocation permission requests when the page is not visible
1006         <rdar://problem/17208715>
1007         https://bugs.webkit.org/show_bug.cgi?id=134989
1008
1009         Reviewed by Darin Adler.
1010
1011         Instead of eagerly requesting geolocation permission for pages that aren't visible,
1012         store a set of pending requests, and send them only once the page has become visible.
1013
1014         * Modules/geolocation/GeolocationController.cpp:
1015         (WebCore::GeolocationController::GeolocationController):
1016         (WebCore::GeolocationController::~GeolocationController):
1017         (WebCore::GeolocationController::requestPermission):
1018         (WebCore::GeolocationController::cancelPermissionRequest):
1019         (WebCore::GeolocationController::viewStateDidChange):
1020         (WebCore::provideGeolocationTo):
1021         * Modules/geolocation/GeolocationController.h:
1022         Store pending requests to be fired once the page is visible.
1023
1024         * WebCore.xcodeproj/project.pbxproj:
1025         Add ViewStateChangeObserver.h
1026
1027         * page/Page.cpp:
1028         (WebCore::Page::addViewStateChangeObserver):
1029         (WebCore::Page::removeViewStateChangeObserver):
1030         (WebCore::Page::setViewState):
1031         * page/Page.h:
1032         Add a set of registered view state observers, and notify them when the
1033         view state changes.
1034
1035         * page/ViewStateChangeObserver.h: Added.
1036         (WebCore::ViewStateChangeObserver::~ViewStateChangeObserver):
1037         Add an observer that can register with the page for view state changes.
1038
1039 2014-07-17  Jer Noble  <jer.noble@apple.com>
1040
1041         Enable legacy fullscreen API in media controls
1042         https://bugs.webkit.org/show_bug.cgi?id=134985
1043
1044         Reviewed by Eric Carlson.
1045
1046         Allow clients who have not enabled HTML5 Fullscreen APIs to still use fullscreen mode
1047         with <video> elements by using the legacy, video-element-specific fullscreen APIs in
1048         the <video> media controls.
1049
1050         * Modules/mediacontrols/mediaControlsApple.js:
1051         (Controller):
1052         (Controller.prototype.handleReadyStateChange):
1053         (Controller.prototype.isFullScreen):
1054         (Controller.prototype.handlePlayButtonClicked):
1055         (Controller.prototype.updateFullscreenButton):
1056         (Controller.prototype.handleFullscreenButtonClicked):
1057
1058 2014-07-17  Vineet Chaudhary  <code.vineet@gmail.com>
1059
1060         [GObject] StrictTypeChecking extended attribute fails for methods with sequence<T>.
1061         https://bugs.webkit.org/show_bug.cgi?id=121698
1062
1063         Reviewed by Antonio Gomes.
1064
1065         GodeGenerator was including wrong heeaders as WebKitDOMlong[] for methods with
1066         array parameters and StrictTypeChecking extended attribute.
1067         No new tests. TestObj.idl covers the tests.
1068
1069         * bindings/scripts/CodeGenerator.pm:
1070         (GetArrayOrSequenceType):
1071         * bindings/scripts/CodeGeneratorGObject.pm:
1072         (GenerateFunction):
1073         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1074         (webkit_dom_test_obj_strict_function_with_array):
1075         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1076         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1077         (webkit_dom_test_typedefs_func):
1078         (webkit_dom_test_typedefs_nullable_array_arg):
1079         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1080         * bindings/scripts/test/TestObj.idl:
1081
1082 2014-07-17  Yusuke Suzuki  <utatane.tea@gmail.com>
1083
1084         CSS JIT: Clean up return path
1085         https://bugs.webkit.org/show_bug.cgi?id=135011
1086
1087         Reviewed by Benjamin Poulain.
1088
1089         Clean up the existing CSS JIT return path before adding new early return path
1090         for pseudo elements.
1091
1092         * cssjit/SelectorCompiler.cpp:
1093         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1094         * cssjit/StackAllocator.h:
1095         (WebCore::StackAllocator::StackReference::StackReference):
1096         (WebCore::StackAllocator::StackReference::isValid):
1097         (WebCore::StackAllocator::popAndDiscard): Deleted.
1098
1099 2014-07-16  Zalan Bujtas  <zalan@apple.com>
1100
1101         Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
1102         https://bugs.webkit.org/show_bug.cgi?id=134950
1103         <rdar://problem/17617994>
1104
1105         Reviewed by Simon Fraser.
1106
1107         The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
1108         from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
1109         It puts us back to the correct coordinating system for intersecting with renderers.
1110
1111         Test: compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html
1112
1113         * rendering/RenderLayer.cpp:
1114         (WebCore::RenderLayer::beginTransparencyLayers):
1115         (WebCore::RenderLayer::clipToRect):
1116
1117 2014-07-16  Simon Fraser  <simon.fraser@apple.com>
1118
1119         Fix a typo noticed by Darin.
1120         
1121         * rendering/RenderBox.cpp:
1122         (WebCore::shouldApplyContainersClipAndOffset):
1123         (WebCore::RenderBox::computeRectForRepaint):
1124         (WebCore::shouldAppyContainersClipAndOffset): Deleted.
1125
1126 2014-07-16  Simon Fraser  <simon.fraser@apple.com>
1127
1128         Improve showTree() logging
1129         https://bugs.webkit.org/show_bug.cgi?id=134997
1130
1131         Reviewed by Tim Horton.
1132
1133         Have the debug showTree(), which dumps the Node/Element tree, show which nodes need
1134         style recalc, and print element renderers.
1135
1136         * dom/Node.cpp:
1137         (WebCore::Node::showNode):
1138
1139 2014-07-16  Simon Fraser  <simon.fraser@apple.com>
1140
1141         [iOS] Expose the points on WebEventRegion
1142         https://bugs.webkit.org/show_bug.cgi?id=134978
1143
1144         Reviewed by Tim Horton.
1145
1146         Expose WebEventRegion's points so that UIKit can get at them.
1147
1148         * page/ios/WebEventRegion.h:
1149         * page/ios/WebEventRegion.mm:
1150         (-[WebEventRegion p1]):
1151         (-[WebEventRegion p2]):
1152         (-[WebEventRegion p3]):
1153         (-[WebEventRegion p4]):
1154
1155 2014-07-16  Brady Eidson  <beidson@apple.com>
1156
1157         Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
1158         <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
1159
1160         Reviewed by Dan Bernstein.
1161
1162         Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
1163         * UIProcess/API/Cocoa/WKProcessPool.mm:
1164         (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
1165         (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
1166         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1167
1168         Add a big shiny comment in a few key places:
1169         * DatabaseProcess/DatabaseProcess.cpp:
1170         (WebKit::DatabaseProcess::initializeDatabaseProcess):
1171         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1172         (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
1173         * UIProcess/WebContext.cpp:
1174         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
1175         (WebKit::WebContext::ensureDatabaseProcess):
1176
1177 2014-07-16  Roger Fong  <roger_fong@apple.com>
1178
1179         Captions container should not clip content.
1180         https://bugs.webkit.org/show_bug.cgi?id=134840.
1181         <rdar://problem/14553608>.
1182
1183         Reviewed by Simon Fraser.
1184
1185         Tests: media/track/track-in-band-subtitles-too-large.html
1186                media/track/track-long-word-container-sizing.html
1187
1188         * Modules/mediacontrols/mediaControlsApple.css:
1189         (video::-webkit-media-text-track-container):
1190         Set word break property of WebCTT cues to normal to make it consistent with in-band cues.
1191         * html/track/TextTrackCueGeneric.cpp:
1192         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1193         Set -webkit-min-content on min-width/min-height property of the text track display.
1194         * html/track/VTTCue.cpp:
1195         (WebCore::VTTCueBox::applyCSSProperties):
1196         Do the same for WebVTT cues.
1197
1198 2014-07-16  Eric Carlson  <eric.carlson@apple.com>
1199
1200         [Mac] replace AVPlayerItem on the main thread
1201         https://bugs.webkit.org/show_bug.cgi?id=134983
1202
1203         Reviewed by Jer Noble.
1204
1205         No new tests, this fixes a problem with a thread configuration not present in the
1206         test environment.
1207
1208         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1209         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1210         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem): New, when called off of 
1211             the main thread, dispatch to the main thread before setting AVPlayerItem.
1212         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setAVPlayerItem.
1213         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
1214         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Ditto.
1215
1216 2014-07-16  Jer Noble  <jer.noble@apple.com>
1217
1218         [MSE] http/tests/media/media-source/mediasource-buffered.html is flakey
1219         https://bugs.webkit.org/show_bug.cgi?id=134949
1220
1221         Reviewed by Eric Carlson.
1222
1223         Depending on which SourceBuffer is successfully parsed first, the order of activeSourceBuffers
1224         may change from run to run, breaking the http/tests/media/media-source/mediasource-buffered.html
1225         test. Make the order of activeSourceBuffers the same as (a subset of) sourceBuffers, by replacing
1226         calls to activeSourceBuffers->add() and with a new call to regenerateActiveSourceBuffers(), which
1227         swaps the contents of the SourceBufferList with a new, ordered Vector.
1228
1229         * Modules/mediasource/MediaSource.cpp:
1230         (WebCore::MediaSource::addSourceBuffer):
1231         (WebCore::MediaSource::sourceBufferDidChangeAcitveState):
1232         (WebCore::MediaSource::regenerateActiveSourceBuffers):
1233         * Modules/mediasource/MediaSource.h:
1234         * Modules/mediasource/SourceBufferList.cpp:
1235         (WebCore::SourceBufferList::swap):
1236         * Modules/mediasource/SourceBufferList.h:
1237
1238 2014-07-16  Mike West  <mkwst@chromium.org>
1239
1240         CSP: Drop 'script-nonce' directive.
1241         https://bugs.webkit.org/show_bug.cgi?id=134926
1242
1243         Reviewed by Darin Adler.
1244
1245         This patch drops the outdated 'script-nonce' Content Security
1246         Policy directive. It was removed from the spec, and replaced in
1247         CSP2 with a new 'script-src' syntax. We should implement that
1248         instead.
1249
1250         Until then, removing the outdated syntax will ensure that no one
1251         ends up relying on it in WebKit's implementation.
1252
1253         This should have limited web-visible impact, as the feature is
1254         behind the CSP_NEXT flag, which is not enabled by default.
1255
1256         * dom/ScriptElement.cpp:
1257         (WebCore::ScriptElement::requestScript):
1258         (WebCore::ScriptElement::executeScript):
1259         * page/ContentSecurityPolicy.cpp:
1260         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
1261         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
1262         (WebCore::CSPDirectiveList::addDirective):
1263         (WebCore::NonceDirective::NonceDirective): Deleted.
1264         (WebCore::NonceDirective::allows): Deleted.
1265         (WebCore::NonceDirective::parse): Deleted.
1266         (WebCore::CSPDirectiveList::checkNonce): Deleted.
1267         (WebCore::CSPDirectiveList::checkNonceAndReportViolation): Deleted.
1268         (WebCore::CSPDirectiveList::allowScriptNonce): Deleted.
1269         (WebCore::isAllowedByAllWithNonce): Deleted.
1270         (WebCore::ContentSecurityPolicy::allowScriptNonce): Deleted.
1271         (WebCore::ContentSecurityPolicy::reportInvalidNonce): Deleted.
1272         * page/ContentSecurityPolicy.h:
1273
1274 2014-07-16  Jer Noble  <jer.noble@apple.com>
1275
1276         REGRESSION(r171069) 75% repro crash in WebCore::AudioHardwareListenerMac::processIsRunningChanged()
1277         https://bugs.webkit.org/show_bug.cgi?id=134986
1278
1279         Reviewed by Eric Carlson.
1280
1281         Add a WeakPtrFactory to AudioHardwareListenerMac, so that if CoreAudio calls our block after
1282         being unregistered, we can bail early instead of calling into a deleted object.
1283
1284         * platform/audio/mac/AudioHardwareListenerMac.cpp:
1285         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
1286         * platform/audio/mac/AudioHardwareListenerMac.h:
1287
1288 2014-07-16  Jer Noble  <jer.noble@apple.com>
1289
1290         [MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
1291         https://bugs.webkit.org/show_bug.cgi?id=134941
1292
1293         Reviewed by Eric Carlson.
1294
1295         Only do our modified-order change of the readyState if the error parameter is empty,
1296         as that's the only case where a duration change will cause an inadvertant readyState
1297         change.
1298
1299         * Modules/mediasource/MediaSource.cpp:
1300         (WebCore::MediaSource::streamEndedWithError):
1301
1302 2014-07-16  Alexey Proskuryakov  <ap@apple.com>
1303
1304         Remove svn:executable property erroneously added in <http://trac.webkit.org/changeset/171144> somehow.
1305
1306         * ChangeLog: Removed property svn:executable.
1307         * svg/SVGSVGElement.h: Removed property svn:executable.
1308         * svg/animation/SVGSMILElement.h: Removed property svn:executable.
1309
1310 2014-07-16  Daniel Bates  <dabates@apple.com>
1311
1312         Substitute CGRectZero for NSZeroRect in -[DOMNode hrefFrame].
1313
1314         Rubber-stamped by Zalan Bujtas.
1315
1316         The method -[DOMNode hrefFrame] returns a CGRect. So, when we don't have a renderer
1317         we should return CGRectZero instead of a NSZeroRect.
1318
1319         * bindings/objc/DOM.mm:
1320         (-[DOMNode hrefFrame]): Also, fix up some code style issues.
1321
1322 2014-07-16  Jeongeun Kim  <je_julie.kim@samsung.com>
1323
1324         mutable pointers from const methods, timeContainer().
1325         https://bugs.webkit.org/show_bug.cgi?id=134757
1326
1327         Reviewed by Alexey Proskuryakov.
1328
1329         Avoid return mutable pointers from const methods.
1330         No new tests, no behavior change.
1331
1332         * svg/SVGSVGElement.h:
1333         * svg/animation/SVGSMILElement.h:
1334         (WebCore::SVGSMILElement::timeContainer):
1335
1336 2014-07-15  Yusuke Suzuki  <utatane.tea@gmail.com>
1337
1338         CSS: Generalize CSS First Letter treatment
1339         https://bugs.webkit.org/show_bug.cgi?id=134936
1340
1341         Reviewed by Benjamin Poulain.
1342
1343         first-letter pseudo element rule is handled differently from the other rules
1344         such as first-line. This patch removes this special handling in SelectorChecker
1345         and handles it in RulesFeatureSet.
1346
1347         * css/RuleFeature.cpp:
1348         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
1349         (WebCore::RuleFeatureSet::add):
1350         (WebCore::RuleFeatureSet::clear):
1351         * css/RuleFeature.h:
1352         (WebCore::RuleFeatureSet::RuleFeatureSet):
1353         * css/SelectorChecker.cpp:
1354         (WebCore::SelectorChecker::matchRecursively):
1355         * css/StyleResolver.h:
1356         (WebCore::StyleResolver::usesFirstLetterRules):
1357         * dom/DocumentStyleSheetCollection.cpp:
1358         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
1359         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
1360         * dom/DocumentStyleSheetCollection.h:
1361         (WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules): Deleted.
1362
1363 2014-07-15  Simon Fraser  <simon.fraser@apple.com>
1364
1365         Fix non-iOS builds.
1366
1367         * rendering/RenderBox.cpp:
1368         (WebCore::shouldAppyContainersClipAndOffset):
1369
1370 2014-07-15  Simon Fraser  <simon.fraser@apple.com>
1371
1372         [iOS] Fix touches inside accelerated overflow:scroll
1373         https://bugs.webkit.org/show_bug.cgi?id=134961
1374         <rdar://problem/16088789>
1375
1376         Reviewed by Benjamin Poulain.
1377
1378         When individual elements inside an overflow:scroll with -webkit-overflow-scrolling: touch
1379         had touch event listeners, we would fail to take the scroll offset into account when
1380         building the touch event region, causing touches on those elements to fail after scrolling.
1381         
1382         Touch event region building uses RenderObject::absoluteClippedOverflowRect(), and that
1383         code path tries to fix up repaint rects to work correctly in composited overflow:scroll.
1384         However, that broke the touch region computation.
1385         
1386         Fix by only ignoring the scroll offset for calls to computeRectForRepaint() which
1387         have a non-null repaintContainer (which indicates that we're doing a repaint in the
1388         compositing layer), and for which the repaintContainer is the containing block
1389         which is using composited scrolling. This restores correct behavior to the event region
1390         code which always calls this with a null repaintContainer.
1391
1392         * rendering/RenderBox.cpp:
1393         (WebCore::shouldAppyContainersClipAndOffset):
1394         (WebCore::RenderBox::computeRectForRepaint):
1395
1396 2014-07-15  Simon Fraser  <simon.fraser@apple.com>
1397
1398         [iOS] Fix issues drawing subsampled image elements and CSS images
1399         https://bugs.webkit.org/show_bug.cgi?id=134944
1400         <rdar://problem/17634095>
1401
1402         Reviewed by Dean Jackson.
1403
1404         After r170675 it is important for BitmapImage::draw() to be given a srcRect computed
1405         using the original size of the image, not the subsampled size.
1406         
1407         So fix various code paths that end up in image drawing to use the originalSize(),
1408         which requires giving Image a virtual function that just returns size(), and hence has
1409         a FloatSize return value.
1410         
1411         Tested by setting a very low subsampling threshold and browsing various sites.
1412         
1413         A better longterm fix will happen via bug 134916.
1414
1415         * platform/graphics/BitmapImage.cpp:
1416         (WebCore::BitmapImage::originalSize):
1417         * platform/graphics/BitmapImage.h:
1418         * platform/graphics/GraphicsContext.cpp:
1419         (WebCore::GraphicsContext::drawImage):
1420         * platform/graphics/Image.cpp:
1421         (WebCore::Image::drawTiled):
1422         (WebCore::Image::computeIntrinsicDimensions):
1423         * platform/graphics/Image.h:
1424         (WebCore::Image::originalSize):
1425         * platform/graphics/cg/BitmapImageCG.cpp:
1426         (WebCore::BitmapImage::BitmapImage): Just use m_size for initializing the other members.
1427         (WebCore::BitmapImage::draw):
1428         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1429         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1430         * platform/graphics/cg/ImageCG.cpp:
1431         (WebCore::Image::drawPattern):
1432
1433 2014-07-15  Brent Fulgham  <bfulgham@apple.com>
1434
1435         [Win] Unreviewed build fix after r171069.
1436
1437         Add missing AudioHardwareListener implementation on Windows.
1438
1439         * WebCore.vcxproj/WebCore.vcxproj:
1440         * WebCore.vcxproj/WebCore.vcxproj.filters:
1441
1442 2014-07-15  Antti Koivisto  <antti@apple.com>
1443
1444         REGRESSION (r155957): Invalid cast in WebCore::RenderNamedFlowThread::getRanges
1445         https://bugs.webkit.org/show_bug.cgi?id=134888
1446
1447         Reviewed by Mihnea Ovidenie.
1448
1449         Test: fast/regions/flowthread-getranges-box-cast.html
1450
1451         * rendering/RenderNamedFlowThread.cpp:
1452         (WebCore::RenderNamedFlowThread::getRanges): Test the type before casting.
1453
1454 2014-07-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1455
1456         [GTK] Update GObject DOM bindings symbols file after r171014.
1457         https://bugs.webkit.org/show_bug.cgi?id=134907
1458
1459         Reviewed by Philippe Normand.
1460
1461         * bindings/gobject/webkitdom.symbols: Update to the current API.
1462
1463 2014-07-15  Manuel Rego Casasnovas  <rego@igalia.com>
1464
1465         Unreviwed fix wrong indentation from r171082.
1466
1467         * rendering/RenderGrid.cpp:
1468         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1469
1470 2014-07-14  Zalan Bujtas  <zalan@apple.com>
1471
1472         Subpixel rendering: Zero sized compositing container's content positioned off by one device pixel.
1473         https://bugs.webkit.org/show_bug.cgi?id=134903
1474
1475         Reviewed by Simon Fraser.
1476
1477         The compositing layer boundaries are calculated using its renderer()'s and the renderer()'s
1478         descendants' bounds. However when the renderer() is zero sized, its bounds are omitted.
1479         In such cases, when the child content has offset from the renderer(), the subpixel adjustment
1480         of the compositing layer becomes negative (-meaning that the compositing layer is to the right/bottom
1481         direction from its renderer()). Remove fabs() to be able to express such direction.
1482
1483         Test: compositing/hidpi-compositing-layer-with-zero-sized-container.html
1484
1485         * rendering/RenderLayerBacking.cpp:
1486         (WebCore::RenderLayerBacking::updateGeometry):
1487
1488 2014-07-14  Jeremy Jones  <jeremyj@apple.com>
1489
1490         Fix crash on WebVideoFullscreenManagerProxy construction.
1491         https://bugs.webkit.org/show_bug.cgi?id=134909
1492
1493         Unreviewed fix crash from r171089
1494
1495         Remove unnecessary dispatch to main queue since it can happen during construction.
1496
1497         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1498         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): remove dispatch_async
1499
1500 2014-07-14  Jeremy Jones  <jeremyj@apple.com>
1501
1502         WebVideoFullscreenInterfaceAVKit should only call the UI from main thread.
1503         https://bugs.webkit.org/show_bug.cgi?id=134890
1504
1505         Reviewed by Eric Carlson.
1506
1507         dispatch_async to the main thread before setting properties that would affect the UI.
1508
1509         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1510         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): wrap in call to dispatch_async
1511         (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
1512         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
1513         (WebVideoFullscreenInterfaceAVKit::setRate): ditto
1514         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
1515         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
1516         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
1517         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
1518         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto
1519
1520 2014-07-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
1521
1522         Fix the !ENABLE(FILTERS) && !ENABLE(CSS_FILTERS) build after r167497
1523         https://bugs.webkit.org/show_bug.cgi?id=134679
1524
1525         Reviewed by Darin Adler.
1526
1527         * html/ImageData.cpp:
1528         * platform/graphics/cairo/ImageBufferCairo.cpp:
1529
1530 2014-07-14  Manuel Rego Casasnovas  <rego@igalia.com>
1531
1532         [CSS Grid Layout] Support sparse in auto-placement algorithm
1533         https://bugs.webkit.org/show_bug.cgi?id=134544
1534
1535         Reviewed by Sergio Villar Senin.
1536
1537         This patch implements sparse mode for auto-placement algorithm, which is
1538         the default mode in the new grid-auto-flow syntax. It keeps track of the
1539         auto-placement cursor in
1540         RenderGrid::placeAutoMajorAxisItemsOnGrid() and updates it accordingly
1541         when auto-positioned items are placed.
1542         If we're in dense mode it resets the cursor after each item (which keeps
1543         the old behavior that was using dense mode by default).
1544
1545         GridIterator has been adapted to look for empty areas from a given
1546         position in both directions.
1547
1548         Test: fast/css-grid-layout/grid-auto-flow-sparse.html
1549
1550         * rendering/RenderGrid.cpp:
1551         (WebCore::RenderGrid::GridIterator::GridIterator): Modify constructor to
1552         add an optional argument for the varying index. This allows to look for
1553         empty areas in both axis.
1554         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Defined the
1555         auto-placement cursor and rested after each item if we're in dense mode.
1556         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Use auto-placement
1557         cursor to look for empty areas from the last auto-positioned item
1558         placed.
1559         * rendering/RenderGrid.h: Modify placeAutoMajorAxisItemOnGrid() header
1560         to receive the auto-placement cursor.
1561
1562 2014-07-14  Brent Fulgham  <bfulgham@apple.com>
1563
1564         [iOS] Some videos play as inline audio-only content
1565         https://bugs.webkit.org/show_bug.cgi?id=134898.
1566         <rdar://problem/17629379>
1567
1568         Reviewed by Eric Carlson.
1569
1570         Add a new 'presentationType' accessor that indicates if the media
1571         element is playing in 'audio' mode. This can happen if a video
1572         element plays an HLS stream that starts off in audio-only mode.
1573
1574         * html/HTMLMediaElement.cpp:
1575         (WebCore::HTMLMediaElement::presentationType): Added.
1576         * html/HTMLMediaElement.h:
1577         * platform/audio/MediaSession.cpp:
1578         (WebCore::MediaSession::presentationType): Added.
1579         * platform/audio/MediaSession.h:
1580         * platform/audio/MediaSessionManager.cpp: 
1581         (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
1582         Use the presentationType, rather than the mediaType to control
1583         inline playback behavior.
1584         * platform/audio/ios/AudioDestinationIOS.h:
1585         (WebCore::AudioDestinationMac::presentationType): Add presentationType.
1586         * platform/audio/mac/AudioDestinationMac.h:
1587         (WebCore::AudioDestinationMac::presentationType): Ditto.
1588
1589 2014-07-14  Bear Travis  <betravis@adobe.com>
1590
1591         [Feature Queries] Enable Feature Queries on Mac
1592         https://bugs.webkit.org/show_bug.cgi?id=134404
1593
1594         Reviewed by Antti Koivisto.
1595
1596         Enable Feature Queries on Mac and resume running the
1597         feature tests.
1598
1599         * Configurations/FeatureDefines.xcconfig: Turn on
1600         ENABLE_CSS3_CONDITIONAL_RULES.
1601
1602 2014-07-11  David Hyatt  <hyatt@apple.com>
1603
1604         <rdar://problem/17305458> Cannot interact with video controls in ePubs
1605         Bug 134836 - [New Multicolumn] Crawl to check for compositing between us and the enclosingPaginationLayer
1606         https://bugs.webkit.org/show_bug.cgi?id=134836
1607
1608         Reviewed by Dean Jackson.
1609
1610         The paginatedAndComposited bit being set in updateLayerPositions just didn't work, since compositing states
1611         can change without triggering that function. This patch just gets rid of the bit and does a crawl every time
1612         to check. This ensures that changes in compositing states don't necessitate any changes in pagination,
1613         since the lookup will always check the current compositing state.
1614         
1615         The new function that does this check is hasCompositedLayerInEnclosingPaginationChain.
1616         
1617         I have been unable to reproduce this issue, and this is therefore a purely speculative fix. I have no test
1618         case to provide because of this.
1619
1620         * rendering/RenderLayer.cpp:
1621         (WebCore::RenderLayer::RenderLayer):
1622         (WebCore::RenderLayer::updateLayerPositions):
1623         (WebCore::RenderLayer::hasCompositedLayerInEnclosingPaginationChain):
1624         (WebCore::RenderLayer::updatePagination):
1625         * rendering/RenderLayer.h:
1626
1627 2014-07-14  Zalan Bujtas  <zalan@apple.com>
1628
1629         Move composite bounds calculation to RenderLayerBacking.
1630         https://bugs.webkit.org/show_bug.cgi?id=134864
1631
1632         Reviewed by Darin Adler.
1633
1634         No change in functionality.
1635
1636         * rendering/RenderLayerBacking.cpp:
1637         (WebCore::RenderLayerBacking::updateCompositedBounds):
1638         * rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
1639         to the RenderLayer.
1640         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
1641         * rendering/RenderLayerCompositor.h:
1642
1643 2014-07-14  Tim Horton  <timothy_horton@apple.com>
1644
1645         Fix the build.
1646
1647         * platform/audio/MediaSessionManager.h:
1648
1649 2014-07-14  Eric Carlson  <eric.carlson@apple.com>
1650
1651         [Mac] don't enable low power audio mode on external output devices
1652         https://bugs.webkit.org/show_bug.cgi?id=134877
1653
1654         Reviewed by Sam Weinig.
1655
1656         No new tests, this deals with changes to the audio hardware at runtime.
1657
1658         * WebCore.xcodeproj/project.pbxproj: Remove AudioSessionListener.h.
1659         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1660
1661         * platform/audio/AudioHardwareListener.cpp:
1662         (WebCore::AudioHardwareListener::AudioHardwareListener): Initialize m_outputDeviceSupportsLowPowerMode
1663             to true on iOS.
1664         * platform/audio/AudioHardwareListener.h:
1665         (WebCore::AudioHardwareListener::outputDeviceSupportsLowPowerMode): New accessor.
1666         (WebCore::AudioHardwareListener::setHardwareActivity): New setter for derived classes.
1667         (WebCore::AudioHardwareListener::setOutputDeviceSupportsLowPowerMode): Ditto.
1668
1669         Remove AudioSessionListener interface, it wasn't being used.
1670         * platform/audio/AudioSession.cpp:
1671         (WebCore::AudioSession::addListener): Deleted.
1672         (WebCore::AudioSession::removeListener): Deleted.
1673         (WebCore::AudioSession::beganAudioInterruption): Deleted.
1674         (WebCore::AudioSession::endedAudioInterruption): Deleted.
1675         * platform/audio/AudioSession.h:
1676         * platform/audio/AudioSessionListener.h: Removed.
1677
1678         * platform/audio/MediaSessionManager.cpp:
1679         (WebCore::MediaSessionManager::addSession): Allocate the AudioHardwareListener if necessary.
1680         (WebCore::MediaSessionManager::removeSession): Free the AudioHardwareListener if necessary.
1681         (WebCore::MediaSessionManager::audioOutputDeviceChanged): AudioHardwareListener client interface
1682             called when the output device changes, call updateSessionState to make sure we are using
1683             the correct buffer size.
1684         * platform/audio/MediaSessionManager.h:
1685
1686         * platform/audio/ios/AudioDestinationIOS.h:
1687         * platform/audio/ios/AudioSessionIOS.mm:
1688         (WebCore::AudioSessionPrivate::AudioSessionPrivate): Drive-by cleanup, remove ObjC helper object
1689             that was used to listen for OS notifications, it is no longer used.
1690         (SOFT_LINK_POINTER): Deleted.
1691         (-[WebAudioSessionHelper initWithCallback:]): Deleted.
1692         (-[WebAudioSessionHelper dealloc]): Deleted.
1693         (-[WebAudioSessionHelper interruption:]): Deleted.
1694
1695         * platform/audio/mac/AudioHardwareListenerMac.cpp:
1696         (WebCore::currentDeviceSupportsLowPowerBufferSize): New, return true only if using build-in 
1697             transport device.
1698         (WebCore::processIsRunningPropertyDescriptor): Return reference to static AudioObjectPropertyAddress
1699             for kAudioHardwarePropertyProcessIsRunning instead of declaring one in every method
1700             that needs one.
1701         (WebCore::outputDevicePropertyDescriptor): Return reference to static AudioObjectPropertyAddress
1702             for kAudioHardwarePropertyDefaultOutputDevice.
1703         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac): Restructure and add audio object
1704             listener for default output device.
1705         (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac): *Remove* listener audio object
1706             property listener instead of *Adding* a new one. Remove new listener.
1707         (WebCore::AudioHardwareListenerMac::propertyChanged): Enumerate the properties that changed,
1708             call appropriate method.
1709         (WebCore::AudioHardwareListenerMac::processIsRunningChanged): Renamed from setHardwareActive, 
1710             cleanup.
1711         (WebCore::AudioHardwareListenerMac::outputDeviceChanged): New, call client.audioHardwareOutputDeviceChanged.
1712         (WebCore::AudioHardwareListenerMac::setHardwareActive): Deleted, renamed processIsRunningChanged.
1713         * platform/audio/mac/AudioHardwareListenerMac.h:
1714
1715         * platform/audio/mac/MediaSessionManagerMac.cpp:
1716         (MediaSessionManager::updateSessionState): Only set the output buffer size to 4K when hardware
1717             supports it.
1718
1719 2014-07-13  Benjamin Poulain  <benjamin@webkit.org>
1720
1721         Remove SelectorCheckerFastPath from the style resolution algorithm
1722         https://bugs.webkit.org/show_bug.cgi?id=134866
1723
1724         Reviewed by Antti Koivisto.
1725
1726         SelectorCheckerFastPath is now pure overhead because it can almost never match
1727         if the CSS JIT was unable to compile.
1728
1729         * css/ElementRuleCollector.cpp:
1730         (WebCore::ElementRuleCollector::ruleMatches):
1731         The "pre-filter" behind fastCheckableSelector had two parts:
1732         1) Filtering the pseudoID.
1733         2) Filtering on the rule hash.
1734
1735         The first part has been generalized (RuleDatacanMatchPseudoElement())
1736         and moved to collectMatchingRulesForList(). 
1737
1738         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1739         * css/RuleSet.cpp:
1740         (WebCore::selectorCanMatchPseudoElement):
1741         (WebCore::RuleData::RuleData):
1742         (WebCore::RuleSet::addRegionRule):
1743         (WebCore::RuleSet::addRulesFromSheet):
1744         * css/RuleSet.h:
1745         (WebCore::RuleData::canMatchPseudoElement):
1746         (WebCore::RuleData::hasFastCheckableSelector): Deleted.
1747         * css/StyleResolver.cpp:
1748
1749 2014-07-13  Benjamin Poulain  <benjamin@webkit.org>
1750
1751         Remove an useless check from SelectorChecker
1752         https://bugs.webkit.org/show_bug.cgi?id=134868
1753
1754         Reviewed by Darin Adler.
1755
1756         * css/SelectorChecker.cpp:
1757         (WebCore::SelectorChecker::matchRecursively):
1758         The condition of this if() branch can never be met for the mode "QueryingRules".
1759
1760         The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
1761         a pseudo element was matched prior to the current context/simple selector.
1762         This cannot happen with QueryingRules, since we never match pseudo elements for
1763         SelectorQuery.
1764
1765 2014-07-12  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1766
1767         Elements with rendering disabled due to dimensions should not contribute to parent bounding box
1768         https://bugs.webkit.org/show_bug.cgi?id=134184
1769
1770         Reviewed by Dirk Schulze.
1771
1772         SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
1773         Examples of elements with rendering disabled:
1774         - basic shape with width <= 0 or height <= 0
1775         - path with no path data (d attribute missing or empty)
1776         - polyline or polygon element with no point data (points attribute missing or empty)
1777
1778         To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
1779         This is used to determine if an element is included when creating the union of child bounding boxes
1780         in a container element.
1781
1782         Tests: svg/custom/GetBBox-path-nodata.html
1783                svg/custom/GetBBox-polygon-nodata.html
1784                svg/custom/GetBBox-polyline-nodata.html
1785                svg/custom/getBBox-container-hiddenchild.html
1786
1787         * rendering/svg/RenderSVGEllipse.cpp:
1788         (WebCore::RenderSVGEllipse::isRenderingDisabled):
1789         New method added. Checks bounding box to determine if rendering is disabled.
1790         * rendering/svg/RenderSVGEllipse.h:
1791         * rendering/svg/RenderSVGPath.cpp:
1792         (WebCore::RenderSVGPath::isRenderingDisabled):
1793         New method added. Checks bounding box to determine if rendering is disabled.
1794         * rendering/svg/RenderSVGPath.h:
1795         * rendering/svg/RenderSVGRect.cpp:
1796         (WebCore::RenderSVGRect::isRenderingDisabled):
1797         New method added. Checks bounding box to determine if rendering is disabled.
1798         * rendering/svg/RenderSVGRect.h:
1799         * rendering/svg/RenderSVGShape.h:
1800         (WebCore::RenderSVGShape::isRenderingDisabled):
1801         New method added. Always returns false so that derived classes that do not
1802         implement this method retain the existing behaviour.
1803         * rendering/svg/SVGRenderSupport.cpp:
1804         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
1805         For each element potentially being included in the unioned bounding box of
1806         a container, check isRenderingDisabled and skip that element if true.
1807
1808         * rendering/svg/RenderSVGEllipse.cpp:
1809         (WebCore::RenderSVGEllipse::isRenderingDisabled):
1810         * rendering/svg/RenderSVGEllipse.h:
1811         * rendering/svg/RenderSVGPath.cpp:
1812         (WebCore::RenderSVGPath::isRenderingDisabled):
1813         * rendering/svg/RenderSVGPath.h:
1814         * rendering/svg/RenderSVGRect.cpp:
1815         (WebCore::RenderSVGRect::isRenderingDisabled):
1816         * rendering/svg/RenderSVGRect.h:
1817         * rendering/svg/RenderSVGShape.h:
1818         * rendering/svg/SVGRenderSupport.cpp:
1819         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
1820
1821 2014-07-12  Benjamin Poulain  <benjamin@webkit.org>
1822
1823         Rename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttributeSelector()
1824         https://bugs.webkit.org/show_bug.cgi?id=134862
1825
1826         Reviewed by Sam Weinig.
1827
1828         Unlike containsUncommonAttributeSelector(), selectorListContainsUncommonAttributeSelector() does not
1829         evaluate the attribute for "uncommon" types.
1830
1831         It would be possible to change the function instead to evaluate common attributes based
1832         on the match type and the pseudo class type. Such change would be more risky
1833         and we would get very little benefit from it, I leave that for later if that ever becomes useful.
1834
1835         * css/RuleSet.cpp:
1836         (WebCore::selectorListContainsAttributeSelector):
1837         (WebCore::containsUncommonAttributeSelector):
1838         (WebCore::selectorListContainsUncommonAttributeSelector): Deleted.
1839
1840 2014-07-12  Zan Dobersek  <zdobersek@igalia.com>
1841
1842         Use braced-init-list to create one-item Vector object in insertPerformanceEntry
1843         https://bugs.webkit.org/show_bug.cgi?id=133675
1844
1845         Reviewed by Darin Adler.
1846
1847         * page/PerformanceUserTiming.cpp:
1848         (WebCore::insertPerformanceEntry): Avoid wasting three lines for creating a
1849         Vector object with just one item that in the end gets copied. Use the
1850         braced-init-list syntax instead, leveraging Vector's std::initializer_list
1851         constructor.
1852
1853 2014-07-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1854
1855         Memory leaks with autoLoadImages off
1856         https://bugs.webkit.org/show_bug.cgi?id=124411
1857
1858         Reviewed by Darin Adler.
1859
1860         Do not emit notifyFinished for images with deferred load,
1861         and allow deferred loads to be cancelled.
1862
1863         * loader/cache/CachedResource.cpp:
1864         (WebCore::CachedResource::checkNotify):
1865         (WebCore::CachedResource::cancelLoad):
1866
1867 2014-07-11  Jer Noble  <jer.noble@apple.com>
1868
1869         [MSE] http/tests/media/media-source/mediasource-duration.html is failing.
1870         https://bugs.webkit.org/show_bug.cgi?id=134852
1871
1872         Reviewed by Eric Carlson.
1873
1874         Fixes the following tests:
1875         http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
1876         http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
1877         http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
1878         http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
1879         http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
1880         http/tests/media/media-source/mediasource-duration.html
1881         http/tests/media/media-source/mediasource-play.html
1882
1883         The primary change necessary to fix the mediasource-duration.html test was to add support
1884         for delaying the completion of a seek operation until the HTMLMediaElement's readyState
1885         rises to > HAVE_CURRENT_DATA. This is accomplished by modifying MediaSourcePrivate to have
1886         waitForSeekCompleted() and seekCompleted() virtual methods. These are called by MediaSource
1887         when a seek operation results in the current time moving outside the currently buffered time
1888         ranges, and when an append operation results in the readyState changing, respectively.
1889
1890         A number of other drive-by fixes were necessary to get this test fully passing, as noted
1891         below.
1892
1893         Make the MediaSource the primary owner of the media's duration, rather than the MediaSourcePrivate.
1894         Move the MediaSourcePrivateClient pointer to the MediaSourcePrivate from the MediaPlayerPrivate, so
1895         the MediaSource's duration can be retrieved.  While we're at it, do the same thing for buffered.
1896
1897         * Modules/mediasource/MediaSource.cpp:
1898         (WebCore::MediaSource::MediaSource): Initialize m_duration.
1899         (WebCore::MediaSource::duration): Simple accessor.
1900         (WebCore::MediaSource::setDurationInternal): Bring 'duration change algorithm' up to spec.
1901         (WebCore::MediaSource::setReadyState): Reset m_duration on close.
1902         * Modules/mediasource/MediaSource.h:
1903         * platform/graphics/MediaSourcePrivate.h:
1904         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1905         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Do not call setPrivateAndOpen().
1906         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Pass through to MediaSourcePrivateAVFObjC.
1907         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
1908         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1909         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1910         (WebCore::MediaSourcePrivateAVFObjC::create): Call setPrivateAndOpen().
1911         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Set m_client.
1912         (WebCore::MediaSourcePrivateAVFObjC::duration): Pass through to MediaSourcePrivateClient.
1913         (WebCore::MediaSourcePrivateAVFObjC::buffered): Ditto.
1914         (WebCore::MediaSourcePrivateAVFObjC::durationChanged): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
1915         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Deleted.
1916         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1917         (WebCore::MediaSourceGStreamer::open): Pass in MediaSourcePrivateClient.
1918         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Initialize m_mediaSource.
1919         (WebCore::MediaSourceGStreamer::durationChanged): Retrieve the duration from MediaSourcePrivateClient.
1920         (WebCore::MediaSourceGStreamer::markEndOfStream): Remove unnecssary ASSERT.
1921         (WebCore::MediaSourceGStreamer::unmarkEndOfStream): Ditto.
1922         (WebCore::MediaSourceGStreamer::setDuration): Deleted.
1923         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
1924         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1925         (WebCore::MockMediaPlayerMediaSource::load): Do not call setPrivateAndOpen().
1926         (WebCore::MockMediaPlayerMediaSource::buffered): Pass through to MockMediaSourcePrivate.
1927         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
1928         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
1929         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1930         (WebCore::MockMediaSourcePrivate::create): Call setPrivateAndOpen().
1931         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set m_client.
1932         (WebCore::MockMediaSourcePrivate::duration): Pass through to MediaSourcePrivateClient.
1933         (WebCore::MockMediaSourcePrivate::buffered): Ditto.
1934         (WebCore::MockMediaSourcePrivate::durationChanged): Pass thorugh to MockMediaPlayerMediaSource.
1935         (WebCore::MockMediaSourcePrivate::setDuration): Deleted.
1936
1937         Route seekToTime through MediaSource, rather than through MediaSourcePrivate, so that
1938         the time can be compared against the buffered ranges, and trigger the delay of the seek
1939         operation if necessary. Add a seekTimer to MediaPlayerPrivateMediaSourceAVFObjC, as this
1940         guarantees the order of asynchronous operations, rather than callOnMainThread, which can
1941         cause async operations to occur out of order.
1942
1943         * Modules/mediasource/MediaSource.cpp:
1944         (WebCore::MediaSource::seekToTime): Bring up to spec.
1945         (WebCore::MediaSource::completeSeek): Ditto.
1946         (WebCore::MediaSource::monitorSourceBuffers): Call completeSeek() when appropriate.
1947         * Modules/mediasource/SourceBuffer.cpp:
1948         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Deleted.
1949         (WebCore::SourceBuffer::seekToTime): Renamed from sourceBufferPrivateSeekToTime().
1950         * platform/graphics/MediaSourcePrivate.h:
1951         * platform/graphics/MediaSourcePrivateClient.h:
1952         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1953         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1954         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Add seekTimer. Only
1955             call timeChanged() if no longer seeking, thereby triggering a 'seeked' event.
1956         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Clear m_seekTimer.
1957         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Use m_seekTimer.
1958         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Call seekInternal.
1959         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Add logging.
1960         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted): Added.
1961         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted): Added; trigger 'seeked'.
1962         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): No longer attempt to finish seek when
1963             readyState changes here; this has been moved up to MediaSource.cpp.
1964         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1965         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1966         (WebCore::MediaSourcePrivateAVFObjC::waitForSeekCompleted): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
1967         (WebCore::MediaSourcePrivateAVFObjC::seekCompleted): Ditto.
1968         (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Pass through to MediaSourcePrivateClient.
1969         (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Ditto.
1970         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1971         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Initialize m_seekCompleted.
1972         (WebCore::MockMediaPlayerMediaSource::seeking): Check for an uncompleted seek operation. 
1973         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance): Ditto.
1974         (WebCore::MockMediaPlayerMediaSource::waitForSeekCompleted): Added.
1975         (WebCore::MockMediaPlayerMediaSource::seekCompleted): Added; trigger 'seeked'.
1976         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1977         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1978         (WebCore::MockMediaSourcePrivate::waitForSeekCompleted): Pass through to MockMediaPlayerMediaSource.
1979         (WebCore::MockMediaSourcePrivate::seekCompleted): Ditto.
1980         * platform/mock/mediasource/MockMediaSourcePrivate.h:
1981
1982         Drive-by fixes.
1983
1984         * Modules/mediasource/MediaSource.cpp:
1985         (WebCore::MediaSource::streamEndedWithError): Re-order the steps in streamEndedWithError()
1986             to avoid the MediaSource being closed and re-opened by the resulting duration change
1987             operation.
1988         * Modules/mediasource/MediaSource.h:
1989         * Modules/mediasource/SourceBuffer.cpp:
1990         (WebCore::SourceBuffer::remove): Added logging.
1991         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
1992         (WebCore::SourceBuffer::hasFutureTime): Swap an ASSERT for an early-return; it's possible
1993             for currentTime() to be outside of a buffered area.
1994         * Modules/mediasource/SourceBuffer.h:
1995         * html/HTMLMediaElement.cpp:
1996         (WebCore::HTMLMediaElement::parseAttribute): Do not issue an additional 'timeupdate' event
1997             after finishSeek() issues one of its own.
1998         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1999         (WebCore::globalDataParserQueue): Allow parsing operations to happen concurrently on
2000             background queues.
2001
2002 2014-07-12  Eric Carlson  <eric.carlson@apple.com>
2003
2004         [iOS] update control type when playback state changes
2005         https://bugs.webkit.org/show_bug.cgi?id=134856
2006
2007         Reviewed by Dean Jackson.
2008
2009         Check to make sure the correct type of media controls are showing when playback state
2010         changes so we don't end up with the wrong type of controls during playback.
2011
2012         * Modules/mediacontrols/mediaControlsApple.js: 
2013         (Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
2014             of 'play' so controls don't hide too early.
2015         * Modules/mediacontrols/mediaControlsiOS.js:
2016         (ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
2017             controls are shown when appropriate.
2018
2019 2014-07-12  Dean Jackson  <dino@apple.com>
2020
2021         [iOS Media] Start playback button should indicate when it can't play
2022         https://bugs.webkit.org/show_bug.cgi?id=134851
2023
2024         Post-commit review with Eric Carlson on IRC.
2025
2026         * Modules/mediacontrols/mediaControlsiOS.js:
2027         (ControllerIOS.prototype.updateStatusDisplay): Remove the line that sets the
2028         class on the inline play button.
2029
2030 2014-07-11  Dean Jackson  <dino@apple.com>
2031
2032         [iOS Media] Start playback button should indicate when it can't play
2033         https://bugs.webkit.org/show_bug.cgi?id=134851
2034
2035         Reviewed by Sam Weinig.
2036
2037         If a video element has errors and cannot play, then the start
2038         playback button should use the "broken" icon.
2039
2040         * Modules/mediacontrols/mediaControlsApple.js: Add a new "failed" class.
2041         * Modules/mediacontrols/mediaControlsiOS.js:
2042         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): We need a playback button
2043         even when there is an error.
2044         (ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): Don't offer Airplay
2045         if we're in an error state.
2046         (ControllerIOS.prototype.updateStatusDisplay): Set the "failed" class on
2047         the playback buttons if we are in an error state.
2048
2049 2014-07-11  Benjamin Poulain  <benjamin@webkit.org>
2050
2051         Partition the CSS rules based on the most specific filter of the rightmost fragment
2052         https://bugs.webkit.org/show_bug.cgi?id=134828
2053
2054         Reviewed by Andreas Kling.
2055
2056         Previously, RuleSet was partitioning each rule based on the rightmost filter.
2057         While fast, this had the side effect of putting many selectors with ID match in the class
2058         bucket (because the selectors are generally written starting with the ID).
2059
2060         This patch replace the code of findBestRuleSetAndAdd() by a simple loop going over all
2061         the simple selectors in the rightmost fragment to find the best bucket.
2062
2063         * css/ElementRuleCollector.cpp:
2064         (WebCore::ElementRuleCollector::ruleMatches):
2065         * css/RuleSet.cpp:
2066         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
2067         I unified ruleData.hasRightmostSelectorMatchingHTMLBasedOnRuleHash() and hasMultipartSelector().
2068
2069         (WebCore::RuleData::RuleData):
2070         (WebCore::rulesCountForName):
2071         (WebCore::RuleSet::addRule):
2072         I removed the recursive part of findBestRuleSetAndAdd() (which was wrong anyway). The function
2073         was useless so I just moved the algorithm to addRule() directly.
2074
2075         We first loop over all the CSSSelectors related by SubSelector, this correspond to the rightmost fragment.
2076         If a filter with high specificity is found, we add the rule immediately and end there.
2077         If a filter that is not very specific is found, we keep a pointer to the selector to use it later.
2078
2079         (WebCore::RuleSet::findBestRuleSetAndAdd): Deleted.
2080         * css/RuleSet.h:
2081         (WebCore::RuleData::hasMultipartSelector): Deleted.
2082
2083 2014-07-11  Alex Christensen  <achristensen@webkit.org>
2084
2085         [WinCairo] Unreviewed build fix after r170937.
2086
2087         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
2088         Update and apply changes applied to WebCoreGenerated.make in r170937.
2089
2090 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
2091
2092         Web Inspector: Crash when using a stale InspectableNode Node
2093         https://bugs.webkit.org/show_bug.cgi?id=134849
2094
2095         Reviewed by Timothy Hatcher.
2096
2097         * inspector/PageConsoleAgent.cpp:
2098
2099 2014-07-11  Jer Noble  <jer.noble@apple.com>
2100
2101         [MSE] Separate MediaSource logging into its own log channel
2102         https://bugs.webkit.org/show_bug.cgi?id=134809
2103
2104         Reviewed by Eric Carlson.
2105
2106         Separate out MediaSource logging (which can be quite verbose) into its own log channel,
2107         distinct from the Media log channel. Add some per-sample logging and further sequester that
2108         logging into its own MediaSourceSamples log channel.
2109
2110         Add the MediaSource and MediaSourceSamples channels:
2111         * platform/Logging.h:
2112
2113         Move LOG(Media) -> LOG(MediaSource):
2114         * Modules/mediasource/MediaSource.cpp:
2115         (WebCore::MediaSource::MediaSource):
2116         (WebCore::MediaSource::~MediaSource):
2117         (WebCore::MediaSource::setReadyState):
2118         (WebCore::MediaSource::addSourceBuffer):
2119         (WebCore::MediaSource::removeSourceBuffer):
2120         (WebCore::MediaSource::isTypeSupported):
2121         * Modules/mediasource/SourceBuffer.cpp:
2122         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
2123         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2124         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2125         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
2126         (WebCore::SourceBuffer::provideMediaData):
2127         (WebCore::SourceBuffer::monitorBufferingRate):
2128         (WebCore::SourceBuffer::textTrackAddCues):
2129         (WebCore::SourceBuffer::hasFutureTime):
2130         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2131         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2132         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
2133         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
2134         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
2135         (WebCore::SourceBufferPrivateAVFObjC::append):
2136         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
2137         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
2138         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
2139         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
2140
2141 2014-07-11  Brady Eidson  <beidson@apple.com>
2142
2143         Phone numbers that span two lines are not detected.
2144         <rdar://problem/17601146> and https://bugs.webkit.org/show_bug.cgi?id=134808
2145
2146         Reviewed by Tim Horton.
2147
2148         * editing/Editor.cpp:
2149         (WebCore::Editor::scanSelectionForTelephoneNumbers): After scanning a range from the TextIterator,
2150             create an "edge range" window around the end of the TextIterator range, and scan it.
2151             Also make sure to not accumulate duplicate ranges that might have showed up in both the
2152             TextIterator range and the edge window range.
2153
2154 2014-07-11  Enrica Casucci  <enrica@apple.com>
2155
2156         Implement textStylingAtPosition in WK2.
2157         https://bugs.webkit.org/show_bug.cgi?id=134843
2158         <rdar://problem/17614981>
2159         
2160         Reviewed by Benjamin Poulain.
2161
2162         Adding some exports and making styleForSelectionStart public.
2163
2164         * WebCore.exp.in:
2165         * editing/Editor.h:
2166
2167 2014-07-11  Zalan Bujtas  <zalan@apple.com>
2168
2169         REGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversion behavior.
2170         https://bugs.webkit.org/show_bug.cgi?id=134841
2171         <rdar://problem/17577563>
2172
2173         Reviewed by Simon Fraser.
2174
2175         Revert back to type int for Element.scroll* APIs in order to preserve exception handling
2176         behavior.
2177
2178         Test: cssom/non-subpixel-scroll-top-left-values.html
2179
2180         * dom/Element.cpp:
2181         (WebCore::Element::scrollLeft):
2182         (WebCore::Element::scrollTop):
2183         (WebCore::Element::setScrollLeft):
2184         (WebCore::Element::setScrollTop):
2185         (WebCore::Element::scrollWidth):
2186         (WebCore::Element::scrollHeight):
2187         * dom/Element.h:
2188         * dom/Element.idl:
2189         * html/HTMLBodyElement.cpp:
2190         (WebCore::adjustForZoom):
2191         (WebCore::HTMLBodyElement::scrollLeft):
2192         (WebCore::HTMLBodyElement::setScrollLeft):
2193         (WebCore::HTMLBodyElement::scrollTop):
2194         (WebCore::HTMLBodyElement::setScrollTop):
2195         (WebCore::HTMLBodyElement::scrollHeight):
2196         (WebCore::HTMLBodyElement::scrollWidth):
2197         * html/HTMLBodyElement.h:
2198
2199 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
2200
2201         Web Inspector: Debugger Pause button does not work
2202         https://bugs.webkit.org/show_bug.cgi?id=134785
2203
2204         Reviewed by Timothy Hatcher.
2205
2206         * CMakeLists.txt:
2207         * DerivedSources.make:
2208         * inspector/CommandLineAPIModuleSource.js:
2209         Minification strips the sourceURL command. Add it back with minification.
2210
2211 2014-07-11  Andreas Kling  <akling@apple.com>
2212
2213         Use the bare minimum tile coverage rect when under memory pressure.
2214         <https://webkit.org/b/134837>
2215
2216         When the browser is under critical memory pressure, don't generate any
2217         more tiles than are needed to cover the exposed viewport rect.
2218
2219         Reviewed by Pratik Solanki.
2220
2221         * page/FrameView.cpp:
2222         (WebCore::FrameView::computeCoverageRect):
2223
2224 2014-07-11  Javier Fernandez  <jfernandez@igalia.com>
2225
2226         [CSS Grid Layout] Implement justify-self css property
2227         https://bugs.webkit.org/show_bug.cgi?id=134419
2228
2229         Reviewed by Dean Jackson.
2230
2231         This change adds the justify-self property from CSS 3 Box Alignment
2232         and implements the parsing.
2233
2234         From Blink r164685 by <jchaffraix@chromium.org>
2235
2236         Test: fast/css/parse-justify-self.html
2237
2238         * css/CSSComputedStyleDeclaration.cpp:
2239         (WebCore::ComputedStyleExtractor::propertyValue):
2240         * css/CSSParser.cpp:
2241         (WebCore::isValidKeywordPropertyAndValue):
2242         (WebCore::CSSParser::parseValue):
2243         (WebCore::isItemPositionKeyword):
2244         (WebCore::CSSParser::parseJustifySelf):
2245         * css/CSSParser.h:
2246         * css/CSSPrimitiveValueMappings.h:
2247         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2248         (WebCore::CSSPrimitiveValue::operator EJustifySelf):
2249         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment):
2250         * css/CSSPropertyNames.in:
2251         * css/CSSValueKeywords.in:
2252         * css/DeprecatedStyleBuilder.cpp:
2253         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2254         * css/StyleResolver.cpp:
2255         (WebCore::StyleResolver::applyProperty):
2256         * rendering/style/RenderStyle.h:
2257         * rendering/style/RenderStyleConstants.h:
2258         * rendering/style/StyleRareNonInheritedData.cpp:
2259         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2260         (WebCore::StyleRareNonInheritedData::operator==):
2261         * rendering/style/StyleRareNonInheritedData.h:
2262
2263 2014-07-11  Bear Travis  <betravis@adobe.com>
2264
2265         [Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
2266         https://bugs.webkit.org/show_bug.cgi?id=134810
2267
2268         Reviewed by Antti Koivisto.
2269
2270         The parsing return values are used to determine if a feature query is valid. Two
2271         grammar productions have been updated to correctly return a value.
2272
2273         Tests exist for this feature but will not be run until the feature is turned on.
2274         See https://bugs.webkit.org/show_bug.cgi?id=134404.
2275
2276         * css/CSSGrammar.y.in: Adding return values for two valid feature query productions.
2277
2278 2014-07-10  Brent Fulgham  <bfulgham@apple.com>
2279
2280         Use a separate backdrop element to allow cues to have highlight and background color
2281         https://bugs.webkit.org/show_bug.cgi?id=134821
2282         <rdar://problem/15999721>
2283
2284         Reviewed by Eric Carlson.
2285
2286         Add a new <div> element wrapping the existing cue <span>. This allows
2287         us to have a highlight on the cue (in the <span> background), as well
2288         as an overall background color.
2289
2290         * Modules/mediacontrols/mediaControlsApple.css:
2291         (video::-webkit-media-text-track-display-backdrop): New markup for
2292         the backdrop element of the caption.
2293         * html/track/VTTCue.cpp:
2294         (WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
2295         allow user customization of the cue backdrop.
2296         (WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
2297         "m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
2298         (WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
2299         (WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
2300         of the new m_cueBackdropBox element, and add m_cueBackdropBox to
2301         the display tree.
2302         * html/track/VTTCue.h:
2303         (WebCore::VTTCue::element):
2304         * page/CaptionUserPreferencesMediaAF.cpp:
2305         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
2306         Fix for missing caption style updates. Even if we are already
2307         listening for caption changes, we still want to update the new
2308         instance's style sheet to match.
2309         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
2310         * rendering/RenderVTTCue.cpp:
2311         (WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
2312         <div> into consideration when looking for the Cue text element.
2313
2314 2014-07-11  Zalan Bujtas  <zalan@apple.com>
2315
2316         Subpixel layout: return integral results for offset*, client*, scroll* by default.
2317         https://bugs.webkit.org/show_bug.cgi?id=134651
2318
2319         Reviewed by Simon Fraser.
2320
2321         Revert to returning integral values for Element.offset* client* scroll* by default.
2322         Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
2323
2324         Since snapped dimension depends on both the original point and the width/height of the box,
2325         we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
2326
2327         Covered by existing tests
2328  
2329         * dom/Element.cpp:
2330         (WebCore::subpixelMetricsEnabled):
2331         (WebCore::convertToNonSubpixelValueIfNeeded):
2332         (WebCore::Element::offsetLeft):
2333         (WebCore::Element::offsetTop):
2334         (WebCore::Element::offsetWidth):
2335         (WebCore::Element::offsetHeight):
2336         (WebCore::Element::clientLeft):
2337         (WebCore::Element::clientTop):
2338         (WebCore::Element::clientWidth):
2339         (WebCore::Element::clientHeight):
2340         * page/Settings.in:
2341
2342 2014-07-11  Zalan Bujtas  <zalan@apple.com>
2343
2344         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
2345         https://bugs.webkit.org/show_bug.cgi?id=134824
2346         <rdar://problem/17612729>
2347
2348         Reviewed by Simon Fraser.
2349
2350         Transparent layer clipping needs device pixel offset adjusting.
2351
2352         Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html
2353
2354         * rendering/RenderLayer.cpp:
2355         (WebCore::RenderLayer::beginTransparencyLayers):
2356         (WebCore::RenderLayer::paintLayer):
2357         (WebCore::RenderLayer::paintLayerContents):
2358         (WebCore::RenderLayer::paintBackgroundForFragments):
2359         (WebCore::RenderLayer::paintForegroundForFragments):
2360         * rendering/RenderLayer.h:
2361
2362 2014-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2363
2364         Unreviewed. Remove unused file.
2365
2366         * html/shadow/MediaControlsGtk.h: Removed.
2367
2368 2014-07-11  Manuel Rego Casasnovas  <rego@igalia.com>
2369
2370         [CSS Grid Layout] Update grid-auto-flow to the new syntax
2371         https://bugs.webkit.org/show_bug.cgi?id=134057
2372
2373         Reviewed by Sergio Villar Senin.
2374
2375         In last versions of the spec grid-auto-flow syntax has changed. New
2376         syntax is:
2377         [ row | column ] && dense? | stack && [ row | column ]?
2378
2379         Implemented parsing for new syntax and added/modified test cases in
2380         current layout tests.
2381
2382         For the moment, the implementation keeps working in the same way, but
2383         using "stack" value for grid-auto-flow property instead of "none". This
2384         should be fixed in a follow-up patch once "stack" is properly
2385         implemented.
2386
2387         Also "dense" needs to be reviewed. Right now auto-placement algorithm is
2388         always "dense" and never "sparse".
2389
2390         No new tests, update current tests to add new cases.
2391
2392         * css/CSSComputedStyleDeclaration.cpp:
2393         (WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
2394         * css/CSSParser.cpp:
2395         (WebCore::isValidKeywordPropertyAndValue): Removed grid-auto-flow as it
2396         is not a keyword anymore.
2397         (WebCore::isKeywordPropertyID): Ditto.
2398         (WebCore::CSSParser::parseValue): Add specific method for parsing
2399         grid-auto-flow.
2400         (WebCore::CSSParser::parseGridShorthand): Adapt parsing for
2401         grid-auto-flow property inside the shorthand.
2402         (WebCore::isValidGridAutoFlowId): Helper method to check if the CSSValue
2403         id is a valid keyword for grid-auto-flow property.
2404         (WebCore::CSSParser::parseGridAutoFlow): Implement new parsing for
2405         grid-auto-flow.
2406         * css/CSSParser.h: Method header for grid-auto-flow parsing.
2407         * css/CSSPrimitiveValueMappings.h:
2408         (WebCore::CSSPrimitiveValue::operator GridAutoFlow): Deleted.
2409         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
2410         * css/CSSValueKeywords.in: Add new keywords required by grid-auto-flow:
2411         "dense" and "stack".
2412         * css/DeprecatedStyleBuilder.cpp:
2413         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Remove
2414         default handler as grid-auto-flow is not a keyword now.
2415         * css/StyleResolver.cpp:
2416         (WebCore::StyleResolver::applyProperty): Implement particular handler
2417         for new grid-auto-flow syntax.
2418         * rendering/RenderGrid.cpp:
2419         (WebCore::RenderGrid::placeItemsOnGrid): Keep old "none" behavior as
2420         "stack" behavior for the moment.
2421         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Use the new
2422         helper methods in RenderStyle.
2423         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Ditto.
2424         * rendering/style/GridResolvedPosition.cpp:
2425         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): Again
2426         keep old "none" behavior for "stack".
2427         * rendering/style/RenderStyle.h: Add new helper methods to know the
2428         direction and algorithm of grid-auto-flow property.
2429         * rendering/style/RenderStyleConstants.h: Redefine GridAutoFlow enum
2430         using flags for algorithm and direction.
2431         * rendering/style/StyleGridData.h: Change m_gridAutoFlow type to
2432         unsigned.
2433
2434 2014-07-10  Myles C. Maxfield  <mmaxfield@apple.com>
2435
2436         [iOS] Pasting rich content does not perform a two-step paste
2437         https://bugs.webkit.org/show_bug.cgi?id=134795
2438
2439         Reviewed by Benjamin Poulain.
2440
2441         UIKit requires writing something (anything!) to a particular pasteboard
2442         during copy in order to flag the content as rich. When a paste occurs,
2443         UIKit will read this flag and perform a two-step paste.
2444
2445         Test: platform/ios-sim/editing/pasteboard/two-step-paste.html
2446
2447         * platform/ios/PlatformPasteboardIOS.mm:
2448         (WebCore::PlatformPasteboard::write):
2449
2450 2014-07-09  Andy Estes  <aestes@apple.com>
2451
2452         [iOS] Some QuickLook documents are not displayed as previews
2453         https://bugs.webkit.org/show_bug.cgi?id=134788
2454         <rdar://problem/17278194>
2455
2456         Reviewed by Pratik Solanki.
2457
2458         ResourceRequest::isMainResourceRequest() is not reliable (e.g. ResourceRequests reconstituted from an
2459         NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
2460         isMainResourceRequest() to check if a QuickLookHandle should be created when the Network Process is in use,
2461         just check if the current ResourceLoader is the same as the DocumentLoader's ResourceLoader.
2462
2463         No new tests. QuickLook is not testable from WebKit.
2464
2465         * platform/network/ios/QuickLook.mm:
2466         (WebCore::QuickLookHandle::create):
2467
2468 2014-07-10  Andreas Kling  <akling@apple.com>
2469
2470         [iOS WebKit2] Don't uninstall the memory pressure listener after first signal.
2471         <https://webkit.org/b/134814>
2472
2473         The call to uninstall() should not be made on iOS since iOS doesn't use the
2474         hold-off mechanism in MemoryPressureHandler.
2475
2476         Reviewed by Benjamin Poulain.
2477
2478         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2479         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2480
2481 2014-07-10  Jer Noble  <jer.noble@apple.com>
2482
2483         [MSE] Overlapping appended ranges must cause the decoder to flush and re-enqueue.
2484         https://bugs.webkit.org/show_bug.cgi?id=134805
2485
2486         Reviewed by Eric Carlson.
2487
2488         When appending a range of media data which overlaps with an existing range, SourceBuffer
2489         must cause the decoder to flush and re-enqueue samples. Those samples removed by appending
2490         the overlapping range may have already been enqueued for display, and unless the decode
2491         queue is flushed, corruption or decode errors may occur as the new samples are enqueued for
2492         display.
2493
2494         Add a boolean flag onto TrackBuffer to indicate whether the decoder needs to be flushed and
2495         re-enqueued the next time an append operation completes. Set this flag whenever samples are
2496         removed due to overlapping or an explicit call to removeCodedFrames(). Move the contents of
2497         sourceBufferPrivateSeekToTime() (which previously did flushing and re-enqueueing) into a new
2498         function, reenqueueMediaForTime(), which can be called from sourceBufferPrivateAppendComplete().
2499
2500         Drive-by fix: findSyncSampleAfterDecodeIterator() would return the passed in iterator if that
2501         sample is a sync-sample. Fix this to correctly return the next sync sample.
2502
2503         Drive-by fix: Use a SampleMap, rather than a DecodeOrderSampleMap, to track erased samples
2504         so that the erasedSamples are correctly accounted for in both presentation and decode orders.
2505
2506         * Modules/mediasource/SampleMap.cpp:
2507         (WebCore::SampleMap::empty): Add convenience method.
2508         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Drive-by fix.
2509         * Modules/mediasource/SampleMap.h:
2510         (WebCore::SampleMap::decodeOrder): Added const accessor.
2511         (WebCore::SampleMap::presentationOrder): Ditto.
2512         (WebCore::SampleMap::addRange): Added.
2513         * Modules/mediasource/SourceBuffer.cpp:
2514         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Add needsReenqueeing flag.
2515         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Move contents into reenqueueMediaForTime().
2516         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueMediaForTime() if necessary.
2517         (WebCore::SourceBuffer::removeCodedFrames): Set needsReenqueing.
2518         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
2519         (WebCore::SourceBuffer::provideMediaData): Drive-by fix.
2520         (WebCore::SourceBuffer::reenqueueMediaForTime): Moved from sourceBufferPrivateSeekToTime().
2521         * Modules/mediasource/SourceBuffer.h:
2522
2523 2014-07-10  Pratik Solanki  <psolanki@apple.com>
2524
2525         ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
2526         https://bugs.webkit.org/show_bug.cgi?id=134812
2527         <rdar://problem/17628434>
2528
2529         Reviewed by Joseph Pecoraro.
2530
2531         Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
2532         false. This field indicates when it is okay to use purgeable memory and is set to true once
2533         the resource is finished loading. By setting it to true in the constructor we were creating
2534         purgeable memory while the resource was still being loaded and this triggered the assert.
2535
2536         No new tests. Should be covered by existing tests.
2537
2538         * platform/cf/SharedBufferCF.cpp:
2539         (WebCore::SharedBuffer::SharedBuffer):
2540
2541 2014-07-10  Andreas Kling  <akling@apple.com>
2542
2543         [iOS WebKit2] Some memory pressure relief tweaks.
2544         <https://webkit.org/b/134811>
2545
2546         Split memory pressure relief into critical and non-critical sections.
2547         Non-critical relief is for clearing out things that are really not
2548         essential, e.g unused font data, text measurement caches, etc.
2549
2550         On iOS, only flip the "WebKit is under memory pressure" flag when we
2551         are under *critical* memroy pressure, rather than doing it early on
2552         and gimping ourselves because other processes are too big.
2553
2554         Also added logging for when we transition in/out of system pressure.
2555
2556         Reviewed by Geoffrey Garen.
2557
2558         * platform/MemoryPressureHandler.cpp:
2559         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
2560         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2561         (WebCore::MemoryPressureHandler::releaseMemory):
2562         * platform/MemoryPressureHandler.h:
2563         (WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):
2564         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2565         (WebCore::MemoryPressureHandler::install):
2566
2567 2014-07-10  Beth Dakin  <bdakin@apple.com>
2568
2569         Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
2570         on a secondary thread
2571         https://bugs.webkit.org/show_bug.cgi?id=134778
2572         -and corresponding-
2573         <rdar://problem/17595333>
2574
2575         Reviewed by Tim Horton.
2576
2577         This is a requirement for some types of performance tests. The patch adds a new 
2578         virtual function to ScrollableArea that forces subclasses to indicate the value of 
2579         the Setting. This is required because Scrollbar and ScrollableArea can’t get to 
2580         Settings on their own.
2581
2582         * page/FrameView.cpp:
2583         (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
2584         * page/FrameView.h:
2585         * page/Settings.in:
2586         * platform/ScrollableArea.h:
2587         * platform/Scrollbar.cpp:
2588         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2589         * platform/win/PopupMenuWin.h:
2590         * rendering/RenderLayer.cpp:
2591         (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
2592         * rendering/RenderLayer.h:
2593         * rendering/RenderListBox.cpp:
2594         (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
2595         * rendering/RenderListBox.h:
2596
2597 2014-07-10  Brady Eidson  <beidson@apple.com>
2598
2599         Phone number highlights should always be visible if the mouse hovers over.
2600         <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
2601
2602         Reviewed by Tim Horton.
2603
2604         * WebCore.exp.in:
2605
2606 2014-07-10  Timothy Horton  <timothy_horton@apple.com>
2607
2608         Assertions or crashes under _takeViewSnapshot when restoring windows
2609         https://bugs.webkit.org/show_bug.cgi?id=134792
2610
2611         Reviewed by Simon Fraser.
2612
2613         * platform/graphics/cocoa/IOSurface.mm:
2614         (IOSurface::createFromImage):
2615
2616 2014-07-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2617
2618         [XHR] overrideMimeType() should be able to change encoding in HEADERS RECEIVED state
2619         https://bugs.webkit.org/show_bug.cgi?id=128968
2620
2621         Reviewed by Alexey Proskuryakov.
2622
2623         Moved response encoding computation from didReceiveResponse to didReceiveData, just before the decoder is instantiated.
2624         This allows overrideMimeType to be changed within readystatechange event callback and have an impact on selected encoding.
2625
2626         Test: http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html
2627
2628         * xml/XMLHttpRequest.cpp:
2629         (WebCore::XMLHttpRequest::didReceiveResponse): Removed m_responseEncoding computation from response and mimeTypeOverride.
2630         (WebCore::XMLHttpRequest::didReceiveData): Added m_responseEncoding computation from response and mimeTypeOverride.
2631
2632 2014-07-09  Brady Eidson  <beidson@apple.com>
2633
2634         Fire connected/disconnected events for Gamepads.
2635         https://bugs.webkit.org/show_bug.cgi?id=134386
2636
2637         Reviewed by Dean Jackson.
2638
2639         No new tests (No effect in a currently tested config)
2640
2641         * Modules/gamepad/GamepadManager.cpp:
2642         (WebCore::navigatorGamepadFromDOMWindow): Handling converting a possibly-null Navigator into
2643             a possibly null NavigatorGamepad.
2644         (WebCore::GamepadManager::platformGamepadConnected): Notify blind Navigator/DOMWindows of all
2645             previously attached Gamepads, then notify everybody of this new gamepad.
2646         (WebCore::GamepadManager::platformGamepadDisconnected): Handle dispatching the disconnected
2647             event to all registered DOMWindows.
2648         (WebCore::GamepadManager::platformGamepadInputActivity): Notify blind Navigator/DOMWindows of all
2649             attached Gamepads.
2650         (WebCore::GamepadManager::makeGamepadVisible): Handles notifying setting up a new gamepads
2651             with all NavigatorGamepads as well as dispatching the connected even to DOMWindows.
2652         (WebCore::GamepadManager::registerDOMWindow):
2653         (WebCore::GamepadManager::unregisterDOMWindow):
2654         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Deleted.
2655         * Modules/gamepad/GamepadManager.h:
2656
2657         * Modules/gamepad/NavigatorGamepad.cpp:
2658         (WebCore::NavigatorGamepad::gamepadAtIndex):
2659         * Modules/gamepad/NavigatorGamepad.h:
2660
2661 2014-07-09  Benjamin Poulain  <bpoulain@apple.com>
2662
2663         [iOS][WK2] Disable text quantization while actively changing the page's scale factor
2664         https://bugs.webkit.org/show_bug.cgi?id=134781
2665
2666         Reviewed by Tim Horton and Myles C. Maxfield.
2667
2668         Query the chrome client to setup quantization on each layers.
2669
2670         * page/ChromeClient.h:
2671         (WebCore::ChromeClient::hasStablePageScaleFactor):
2672         * platform/graphics/mac/FontMac.mm:
2673         (WebCore::Font::drawGlyphs):
2674         * rendering/RenderLayer.cpp:
2675         (WebCore::RenderLayer::setupFontSubpixelQuantization):
2676
2677 2014-07-09  peavo@outlook.com  <peavo@outlook.com>
2678
2679         [Curl] Cache entry invalidated too early.
2680         https://bugs.webkit.org/show_bug.cgi?id=134681
2681
2682         Reviewed by Alex Christensen.
2683
2684         When a cache entry has expired, it is invalidated when a request for the corresponding url is started.
2685         This is too early, since the resource is possibly not modified (even though it has expired),
2686         and the server might respond with a 304 (not modified) response.
2687         When we then receive a 304 response, the cache entry is deleted, and we have no cached response/data to provide.
2688         This can be solved by not invalidating the entry when a request for that url is started,
2689         but instead invalidate when a 200 OK response is received (which means the resource has been modified).
2690
2691         * platform/network/curl/CurlCacheManager.cpp:
2692         (WebCore::CurlCacheManager::isCached): Avoid invalidating cache entry when it has expired, wait until we know the server response.
2693         * platform/network/curl/CurlCacheManager.h: Added const modifier.
2694
2695 2014-07-09  Myles C. Maxfield  <mmaxfield@apple.com>
2696
2697         Revert r170413 and r170390
2698         https://bugs.webkit.org/show_bug.cgi?id=134741
2699
2700         Reviewed by Benjamin Poulain.
2701
2702         These patches caused a variety of failures. I'm going to break them up into
2703         smaller chunks and commit them separately at some point in the future.
2704
2705         Requesting a review from Ben Poulain because there were some conflicts with
2706         r170561 in InlineTextBox.cpp and InlineTextBox.h.
2707
2708         * WebCore.exp.in:
2709         * platform/graphics/Font.cpp:
2710         (WebCore::Font::drawText):
2711         (WebCore::Font::drawEmphasisMarks):
2712         (WebCore::Font::adjustSelectionRectForText):
2713         (WebCore::computeUnderlineType):
2714         * platform/graphics/Font.h:
2715         * platform/graphics/FontFastPath.cpp:
2716         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2717         (WebCore::Font::drawSimpleText):
2718         (WebCore::Font::drawEmphasisMarksForSimpleText):
2719         (WebCore::Font::drawGlyphBuffer):
2720         (WebCore::Font::drawEmphasisMarks):
2721         (WebCore::Font::adjustSelectionRectForSimpleText):
2722         * platform/graphics/GlyphBuffer.h:
2723         (WebCore::GlyphBuffer::size):
2724         (WebCore::GlyphBuffer::glyphs):
2725         (WebCore::GlyphBuffer::advances):
2726         (WebCore::GlyphBuffer::fontDataAt):
2727         (WebCore::GlyphBuffer::advanceAt):
2728         (WebCore::GlyphBuffer::offsetAt):
2729         (WebCore::GlyphBuffer::reverse):
2730         (WebCore::GlyphBuffer::offsetInString):
2731         (WebCore::GlyphBuffer::swap):
2732         * platform/graphics/GraphicsContext.cpp:
2733         * platform/graphics/Latin1TextIterator.h:
2734         (WebCore::Latin1TextIterator::Latin1TextIterator):
2735         (WebCore::Latin1TextIterator::currentCharacter):
2736         * platform/graphics/SimpleFontData.h:
2737         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
2738         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
2739         * platform/graphics/SurrogatePairAwareTextIterator.h:
2740         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
2741         * platform/graphics/TextRun.h:
2742         (WebCore::TextRun::length):
2743         (WebCore::TextRun::charactersLength):
2744         * platform/graphics/WidthIterator.cpp:
2745         (WebCore::WidthIterator::glyphDataForCharacter):
2746         (WebCore::applyFontTransforms):
2747         (WebCore::WidthIterator::advanceInternal):
2748         (WebCore::WidthIterator::advance):
2749         (WebCore::WidthIterator::advanceOneCharacter):
2750         * platform/graphics/WidthIterator.h:
2751         * platform/graphics/cairo/FontCairo.cpp:
2752         (WebCore::Font::drawGlyphs):
2753         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2754         (WebCore::Font::drawComplexText):
2755         (WebCore::Font::drawEmphasisMarksForComplexText):
2756         (WebCore::Font::adjustSelectionRectForComplexText):
2757         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2758         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
2759         * platform/graphics/mac/FontComplexTextMac.cpp:
2760         (WebCore::Font::adjustSelectionRectForComplexText):
2761         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2762         (WebCore::Font::drawComplexText):
2763         (WebCore::Font::drawEmphasisMarksForComplexText):
2764         * platform/graphics/mac/FontMac.mm:
2765         (WebCore::Font::drawGlyphs):
2766         * platform/graphics/win/FontCGWin.cpp:
2767         (WebCore::Font::drawGlyphs):
2768         * platform/graphics/win/FontWin.cpp:
2769         (WebCore::Font::adjustSelectionRectForComplexText):
2770         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2771         (WebCore::Font::drawComplexText):
2772         (WebCore::Font::drawEmphasisMarksForComplexText):
2773         * platform/graphics/wince/FontWinCE.cpp:
2774         (WebCore::Font::drawGlyphs):
2775         (WebCore::Font::drawComplexText):
2776         (WebCore::Font::drawEmphasisMarksForComplexText):
2777         (WebCore::Font::selectionRectForComplexText):
2778         * rendering/InlineTextBox.cpp:
2779         (WebCore::InlineTextBox::isSelected):
2780         (WebCore::InlineTextBox::selectionState):
2781         (WebCore::InlineTextBox::localSelectionRect):
2782         (WebCore::InlineTextBox::paint):
2783         (WebCore::InlineTextBox::selectionStartEnd):
2784         (WebCore::InlineTextBox::paintSelection):
2785         (WebCore::InlineTextBox::paintCompositionBackground):
2786         (WebCore::InlineTextBox::paintDocumentMarker):
2787         (WebCore::InlineTextBox::paintTextMatchMarker):
2788         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2789         (WebCore::InlineTextBox::paintCompositionUnderline):
2790         (WebCore::InlineTextBox::positionForOffset):
2791         (WebCore::InlineTextBox::constructTextRun):
2792         * rendering/InlineTextBox.h:
2793         (WebCore::InlineTextBox::truncation):
2794         * rendering/RenderCombineText.cpp:
2795         (WebCore::RenderCombineText::getStringToRender):
2796         * rendering/RenderCombineText.h:
2797         * rendering/RenderTextLineBoxes.cpp:
2798         (WebCore::ellipsisRectForBox):
2799         * rendering/svg/SVGInlineFlowBox.cpp:
2800         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2801         * rendering/svg/SVGInlineTextBox.cpp:
2802         (WebCore::SVGInlineTextBox::positionForOffset):
2803         (WebCore::SVGInlineTextBox::localSelectionRect):
2804         (WebCore::SVGInlineTextBox::paintSelectionBackground):
2805         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
2806         (WebCore::SVGInlineTextBox::paintText):
2807         * rendering/svg/SVGInlineTextBox.h:
2808         * rendering/svg/SVGTextMetricsBuilder.cpp:
2809         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
2810         (WebCore::SVGTextMetricsBuilder::advance):
2811         * rendering/svg/SVGTextQuery.cpp:
2812         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
2813         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
2814         (WebCore::SVGTextQuery::subStringLengthCallback):
2815         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
2816         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
2817         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
2818         (WebCore::SVGTextQuery::extentOfCharacterCallback):
2819         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
2820         * rendering/svg/SVGTextQuery.h:
2821         * rendering/svg/SVGTextRunRenderingContext.cpp:
2822         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
2823         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2824         * rendering/svg/SVGTextRunRenderingContext.h:
2825         * svg/SVGFontData.cpp:
2826         (WebCore::SVGFontData::applySVGGlyphSelection):
2827         * svg/SVGFontData.h:
2828
2829 2014-07-08  Jeffrey Pfau  <jpfau@apple.com>
2830
2831         Fix flaky loading tests
2832         https://bugs.webkit.org/show_bug.cgi?id=133696
2833
2834         Reviewed by Ryosuke Niwa.
2835
2836         In some cases, the Frame may be destroyed while the loader is
2837         initializing. Make sure we don't delete it too early.
2838
2839         * loader/FrameLoader.cpp:
2840         (WebCore::FrameLoader::init):
2841
2842 2014-07-09  Simon Fraser  <simon.fraser@apple.com>
2843
2844         Make IndirectCompositingReason an enum class
2845         https://bugs.webkit.org/show_bug.cgi?id=134789
2846
2847         Reviewed by Tim Horton.
2848
2849         Make RenderLayer::IndirectCompositingReason an enum class, and change some code
2850         in RenderLayerCompositor::reasonsForCompositing() to use a switch.
2851
2852         * rendering/RenderLayer.cpp:
2853         (WebCore::RenderLayer::RenderLayer):
2854         * rendering/RenderLayer.h:
2855         * rendering/RenderLayerCompositor.cpp:
2856         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2857         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
2858         (WebCore::RenderLayerCompositor::reasonsForCompositing):
2859         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
2860
2861 2014-07-09  Pratik Solanki  <psolanki@apple.com>
2862
2863         Make SharedBuffer::append(SharedBuffer*) be smarter about CFData and data arrays
2864         https://bugs.webkit.org/show_bug.cgi?id=134731
2865
2866         Reviewed by Antti Koivisto.
2867
2868         If the target SharedBuffer has a CFDataRef or a data array then we can simply retain that
2869         CFDataRef or data array elements in the SharedBuffer being appended to. This avoids
2870         unnecessary copying.
2871
2872         No new tests because no functional changes.
2873
2874         * platform/SharedBuffer.cpp:
2875         (WebCore::SharedBuffer::append):
2876         (WebCore::SharedBuffer::maybeAppendPlatformData):
2877         * platform/SharedBuffer.h:
2878         * platform/cf/SharedBufferCF.cpp:
2879         (WebCore::SharedBuffer::maybeAppendPlatformData):
2880         (WebCore::SharedBuffer::maybeAppendDataArray):
2881         * platform/soup/SharedBufferSoup.cpp:
2882         (WebCore::SharedBuffer::maybeAppendPlatformData):
2883
2884 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
2885
2886         [Win] Remove uses of 'bash' in build system
2887         https://bugs.webkit.org/show_bug.cgi?id=134782
2888         <rdar://problem/17615533>
2889
2890         Reviewed by Dean Jackson.
2891
2892         Remove uses of 'bash' by replacing Windows-specific bash scripts
2893         with Perl equivalents.
2894
2895         * WebCore.vcxproj/WebCoreGenerated.make:
2896         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
2897         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters:
2898         * WebCore.vcxproj/WebCorePreBuild.cmd:
2899         * WebCore.vcxproj/build-generated-files.pl: Copied from Source/WebCore/WebCore.vcxproj/build-generated-files.sh.
2900         * WebCore.vcxproj/build-generated-files.sh: Removed.
2901         * WebCore.vcxproj/migrate-scripts.pl: Copied from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh.
2902         * WebCore.vcxproj/migrate-scripts.sh: Removed.
2903
2904 2014-07-09  Anders Carlsson  <andersca@apple.com>
2905
2906         Support transparent WKWebViews
2907         https://bugs.webkit.org/show_bug.cgi?id=134779
2908         <rdar://problem/17351058>
2909
2910         Reviewed by Tim Horton.
2911
2912         Schedule rebuilding the compositing layers if a FrameView's transparency changes.
2913
2914         * page/FrameView.cpp:
2915         (WebCore::FrameView::setTransparent):
2916
2917 2014-07-09  Javier Fernandez  <jfernandez@igalia.com>
2918         CSS canvas color parsing accepts invalid color identifiers
2919         https://bugs.webkit.org/show_bug.cgi?id=134661
2920
2921         Reviewed by Benjamin Poulain.
2922
2923         Current implementation of the CSSParser::parseSystemColor assumes
2924         that if a valid cssValueKeywordID is got then it has to be a valid
2925         color. Such assumption is wrong and lead to many bugs and layout
2926         test failures.
2927
2928         The parseSystemFunction determines now whether the parsed color is
2929         valid or not.
2930
2931         Addtionally, a new method has been added to share the logic of
2932         determining whether a CSSValueID is a valid primitive values for
2933         colors or not. Generally, we should avoid passing invalid color
2934         identifiers to the theming API.
2935
2936         No new tests, but added additional cases to the
2937         canvas-color-serialization.html, test-setting-canvas-color and
2938         rgb-color-parse test.
2939
2940         * css/CSSParser.cpp:
2941         (WebCore::validPrimitiveValueColor): Added.
2942         (WebCore::parseColorValue):
2943         (WebCore::CSSParser::parseSystemColor):
2944
2945 2014-06-28  Jer Noble  <jer.noble@apple.com>
2946
2947         [MSE] http/tests/media/media-source/mediasource-remove.html is failing
2948         https://bugs.webkit.org/show_bug.cgi?id=134768
2949
2950         Reviewed by Eric Carlson.
2951
2952         Fix multiple bugs causing mediasource-remove.html to fail:
2953
2954         Separate out setDuration() into setDurationInternal() so that steps which require
2955         us to run the "duration change algorithm" don't bail out if the SoureBuffer is
2956         inside updating().
2957
2958         * Modules/mediasource/MediaSource.cpp:
2959         (WebCore::MediaSource::setDuration):
2960         (WebCore::MediaSource::setDurationInternal):
2961         * Modules/mediasource/MediaSource.h:
2962         * Modules/mediasource/SourceBuffer.cpp:
2963         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2964         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2965
2966         When removing coded frames, do so starting from the first sample in the range in
2967         decode order, so that frames dependant on removed frames are themselves removed. Add
2968         a convenience method in SampleMap findSampleWithPresentationTime(), and rename
2969         findSampleAfterPresentationTime() to findSampleOnOrAfterPresentationTime() to correctly
2970         reflect what the method does, and simplify its implementation by searching the map's keys
2971         directly.
2972
2973         * Modules/mediasource/SampleMap.cpp:
2974         (WebCore::PresentationOrderSampleMap::findSampleWithPresentationTime):
2975         (WebCore::PresentationOrderSampleMap::findSampleOnOrAfterPresentationTime):
2976         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime):
2977         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Deleted.
2978         * Modules/mediasource/SampleMap.h:
2979         * Modules/mediasource/SourceBuffer.cpp:
2980         (WebCore::decodeTimeComparator):
2981         (WebCore::SourceBuffer::removeCodedFrames):
2982
2983         Throw the correct exception (INVALID_STATE_ERR) from SourceBuffer::remove().
2984
2985         * Modules/mediasource/SourceBuffer.cpp:
2986         (WebCore::SourceBuffer::remove):
2987
2988 2014-07-09  Pratik Solanki  <psolanki@apple.com>
2989
2990         Add SharedBuffer::wrapCFDataArray() and use it
2991         https://bugs.webkit.org/show_bug.cgi?id=134733
2992
2993         Reviewed by Antti Koivisto.
2994
2995         No new tests. Should be covered by existing tests.
2996
2997         * platform/SharedBuffer.h:
2998         * platform/cf/SharedBufferCF.cpp:
2999         (WebCore::SharedBuffer::wrapCFDataArray):
3000         (WebCore::SharedBuffer::SharedBuffer):
3001         * platform/network/ResourceHandle.h:
3002         * platform/network/cf/ResourceHandleCFNet.cpp:
3003         (WebCore::ResourceHandle::handleDataArray): Deleted.
3004         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3005         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
3006         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
3007         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
3008         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3009         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
3010         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3011         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]):
3012
3013 2014-07-09  Pratik Solanki  <psolanki@apple.com>
3014
3015         Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
3016         https://bugs.webkit.org/show_bug.cgi?id=134732
3017
3018         Reviewed by Darin Adler.
3019
3020         No new tests because no functional changes.
3021
3022         * WebCore.exp.in:
3023
3024 2014-07-09  Tim Horton  <timothy_horton@apple.com>
3025
3026         Fix the !USE(IOSURFACE) build.
3027
3028         * WebCore.exp.in:
3029
3030 2014-07-09  Tim Horton  <timothy_horton@apple.com>
3031
3032         Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
3033         https://bugs.webkit.org/show_bug.cgi?id=134773
3034
3035         Reviewed by Anders Carlsson.
3036
3037         * WebCore.exp.in:
3038         * platform/graphics/cocoa/IOSurface.h:
3039         * platform/graphics/cocoa/IOSurface.mm:
3040         (IOSurface::createFromImage):
3041         Move make-an-IOSurface-from-a-CGImageRef into WebCore::IOSurface.
3042
3043 2014-07-09  Enrica Casucci  <enrica@apple.com>
3044
3045         Implement Editor::fontAttributesForSelectionStart() or iOS.
3046         https://bugs.webkit.org/show_bug.cgi?id=134771
3047         <rdar://problem/16167838>
3048
3049         Reviewed by Ryosuke Niwa.
3050
3051         Implement for iOS the equivalent function we have for OS X.
3052
3053         * editing/ios/EditorIOS.mm:
3054         (WebCore::Editor::fontAttributesForSelectionStart):
3055
3056 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
3057
3058         [Win] Remove use of 'grep' in build steps
3059         https://bugs.webkit.org/show_bug.cgi?id=134770
3060         <rdar://problem/17608783>
3061
3062         Reviewed by Tim Horton.
3063
3064         Replace uses of the grep command in Windows builds with the equivalent
3065         Perl program.
3066
3067         * WebCore.vcxproj/WebCoreGenerated.make:
3068         * WebCore.vcxproj/WebCorePreBuild.cmd:
3069         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
3070         (WebCore::WebCoreAVCFResourceLoader::notifyFinished):
3071
3072 2014-07-09  Alex Christensen  <achristensen@webkit.org>
3073
3074         Added css jit profiler, disabled by default.
3075         https://bugs.webkit.org/show_bug.cgi?id=134695
3076
3077         Reviewed by Benjamin Poulain.
3078
3079         * css/ElementRuleCollector.cpp:
3080         (WebCore::ElementRuleCollector::ruleMatches):
3081         Tell the RuleData when its compiled selector is used.
3082         * css/RuleSet.cpp:
3083         (WebCore::RuleData::RuleData):
3084         Initialize the compiled selector use count to 0.
3085         * css/RuleSet.h:
3086         (WebCore::RuleData::~RuleData):
3087         (WebCore::RuleData::compiledSelectorUsed):
3088         Count and log the number of times a compiled selector is used.
3089         * cssjit/SelectorCompiler.h:
3090         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
3091         * dom/SelectorQuery.cpp:
3092         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
3093         (WebCore::SelectorDataList::execute):
3094         Tell the SelectorData when its compiled selector is used.
3095         * dom/SelectorQuery.h:
3096         (WebCore::SelectorDataList::SelectorData::SelectorData):
3097         (WebCore::SelectorDataList::SelectorData::~SelectorData):
3098         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
3099         Count and log the number of times a compiled selector is used.
3100
3101 2014-07-09  Eric Carlson  <eric.carlson@apple.com>
3102
3103         [iOS] caption size is sometimes incorrect in fullscreen
3104         https://bugs.webkit.org/show_bug.cgi?id=134740
3105
3106         Reviewed by Jer Noble.
3107
3108         Captions on iOS are displayed in fullscreen with a TextTrackRepresentation object. Because
3109         the fullscreen video presentation is controlled by code in the UI process running on the
3110         UI thread, WebCore is notified of changes to fullscreen state asynchronously. This resulted
3111         in the TextTrackRepresentation object being created and/or destroyed too late some of the 
3112         time, which caused us to sometimes display captions incorrectly. Fix this by setting up and
3113         tearing down the TextTrackRepresentation object when WebCore's 'webkitfullscreenchange'
3114         event fires.
3115
3116         * Modules/mediacontrols/MediaControlsHost.cpp:
3117         (WebCore::MediaControlsHost::enteredFullscreen): Notify text track container.
3118         (WebCore::MediaControlsHost::exitedFullscreen): Ditto.
3119         * Modules/mediacontrols/MediaControlsHost.h:
3120         * Modules/mediacontrols/MediaControlsHost.idl:
3121
3122         * Modules/mediacontrols/mediaControlsApple.js:
3123         (Controller.prototype.handleFullscreenChange): Notify host of fullscreen change.
3124
3125         * html/HTMLMediaElement.cpp:
3126         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): Only return true when in
3127             fullscreen.
3128         (WebCore::HTMLMediaElement::setVideoFullscreenLayer): Call updateTextTrackDisplay.
3129
3130         * html/shadow/MediaControlElements.cpp:
3131         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
3132             m_updateTextTrackRepresentationStyle to false.
3133         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Move logic for creating
3134             TextTrackRepresentation to updateTextTrackRepresentation.
3135         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize): New, split out of updateTimerFired.
3136         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Move code to force immediate
3137             font size change to updateActiveCuesFontSize.
3138         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): New, update
3139             text track representation, creating first if necessary.
3140         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Add an early
3141             return if we don't have a text track representation.
3142         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Early
3143             return if there is nothing to be done.
3144         (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): Force a caption update
3145             if there are visible captions.
3146         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set m_updateTextTrackRepresentationStyle
3147             to true.
3148         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):  Force a 
3149             caption update if there are visible captions.
3150         * html/shadow/MediaControlElements.h:
3151
3152 2014-07-09  Jer Noble  <jer.noble@apple.com>
3153
3154         [MSE] http/tests/media/media-source/mediasource-endofstream-invaliderror.html is failing.
3155         https://bugs.webkit.org/show_bug.cgi?id=134413
3156
3157         Reviewed by Eric Carlson.
3158
3159         Update MediaSource.endOfStream() to take an optional enum instead of an optional String.
3160
3161         * Modules/mediasource/MediaSource.cpp:
3162         (WebCore::MediaSource::endOfStream):
3163         * Modules/mediasource/MediaSource.h:
3164         * Modules/mediasource/MediaSource.idl:
3165
3166 2014-07-08  Brady Eidson  <beidson@apple.com>
3167
3168         DOMWindows should register themselves with the GamepadManager when they have event listeners
3169         https://bugs.webkit.org/show_bug.cgi?id=134669
3170
3171         Reviewed by Dean Jackson.
3172
3173         No new tests (No effect in a currently tested config)
3174
3175         By having DOMWindows register with the GamepadManager when they have/don’t have gamepad event
3176         listeners, we accomplish two things:
3177         1 - It’s simple for GamepadManager to dispatch gamepad events directly to the DOMWindows interested.
3178         2 - We know when to start monitoring for gamepad connections.
3179
3180         * Modules/gamepad/GamepadManager.cpp:
3181         (WebCore::GamepadManager::GamepadManager):
3182         (WebCore::GamepadManager::registerNavigator):
3183         (WebCore::GamepadManager::unregisterNavigator):
3184         (WebCore::GamepadManager::registerDOMWindow):
3185         (WebCore::GamepadManager::unregisterDOMWindow):
3186         (WebCore::GamepadManager::maybeStartMonitoringGamepads): Start monitoring gamepads if there are any
3187           registered DOMWindows or NavigatorGamepads, and we aren’t already monitoring them.
3188         (WebCore::GamepadManager::maybeStopMonitoringGamepads): Stop monitoring gamepads if there aren’t any
3189           registered DOMWindows or NavigatorGameads, and we have been monitoring them before now.
3190         * Modules/gamepad/GamepadManager.h:
3191
3192         * dom/EventNames.h:
3193         (WebCore::EventNames::isGamepadEventType):
3194
3195         * page/DOMWindow.cpp:
3196         (WebCore::DOMWindow::DOMWindow):
3197         (WebCore::DOMWindow::~DOMWindow): If registered for gamepad events, unregister now.
3198         (WebCore::DOMWindow::incrementGamepadEventListenerCount): If this is the first gamepad event
3199           listener, register with the GamepadManager now.
3200         (WebCore::DOMWindow::decrementGamepadEventListenerCount): If this was the last gamepad event
3201           listener, unregister from the GamepadManager now.
3202         (WebCore::DOMWindow::addEventListener):
3203         (WebCore::DOMWindow::removeEventListener):
3204         * page/DOMWindow.h:
3205
3206 2014-07-08  Sun-woo Nam  <sunny.nam@samsung.com>
3207
3208         [EFL] Fix the build break when ENABLE_ENCRYPTED_MEDIA_V2 is turned on.
3209         https://bugs.webkit.org/show_bug.cgi?id=134750
3210
3211         Reviewed by Gyuyoung Kim.
3212
3213         When turning ENABLE_ENCRYPTED_MEDIA_V2 on, build break occurs.
3214         Some source files need to be included in CMakeLists.txt file for build.
3215         And wrap the included header file which is built only on mac and wince.
3216
3217         * CMakeLists.txt:
3218         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
3219
3220 2014-07-08  Eric Carlson  <eric.carlson@apple.com>
3221
3222         [iOS] user caption preferences not applied
3223         https://bugs.webkit.org/show_bug.cgi?id=134599
3224
3225         Reviewed by Sam Weinig.
3226
3227         * page/CaptionUserPreferences.cpp:
3228         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): All Pages in a PageGroup
3229         do not necessarily use the same PageUserContentController, so apply and remove caption user
3230         the style sheet directly to each page rather than to the page group.
3231
3232 2014-07-08  Commit Queue  <commit-queue@webkit.org>
3233
3234         Unreviewed, rolling out r170894.
3235         https://bugs.webkit.org/show_bug.cgi?id=134749
3236
3237         "It broke the build on mountainlion release 32bit" (Requested
3238         by mmirman on #webkit).
3239
3240         Reverted changeset:
3241
3242         "Added css jit profiler, disabled by default."
3243         https://bugs.webkit.org/show_bug.cgi?id=134695
3244         http://trac.webkit.org/changeset/170894
3245
3246 2014-07-08  Jeremy Jones  <jeremyj@apple.com>
3247
3248         WebVideoFullscreenInterfaceAVKit should lazily create m_playerController.
3249         https://bugs.webkit.org/show_bug.cgi?id=134706
3250
3251         Reviewed by Simon Fraser.
3252
3253         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3254         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
3255         Don't set the delegate if m_playerController isn't created.
3256
3257 2014-07-08  Bem Jones-Bey  <bjonesbe@adobe.com>
3258
3259         Ensure we compute the height of replaced elements to 'auto' when appropriate.
3260         https://bugs.webkit.org/show_bug.cgi?id=134700
3261
3262         Reviewed by David Hyatt.
3263
3264         This fixes two issues:
3265
3266         1) If a replaced element has a percentage height specified then its
3267         height should compute to 'auto' when its containing block does not
3268         have a height 'specified explicitly'. We were taking this to mean when
3269         its containing block's specified height value is 'auto' - in fact it
3270         means when the containing block's computed height is auto.
3271
3272         2) Top and bottom on the containing block should only affect the
3273         height of the block if that block has absolute or fixed position.
3274
3275         This brings us into line with IE, Firefox, and Chrome.
3276
3277         This is a port of Blink patches by Rob Hogan and David Vest.
3278
3279         Tests: css2.1/20110323/height-percentage-005.htm
3280                fast/css/replaced-element-ignore-top-bottom.html
3281
3282         * rendering/RenderBoxModelObject.cpp:
3283         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
3284
3285 2014-07-08  Alex Christensen  <achristensen@webkit.org>
3286
3287         Added css jit profiler, disabled by default.
3288         https://bugs.webkit.org/show_bug.cgi?id=134695
3289
3290         Reviewed by Benjamin Poulain.
3291
3292         * css/ElementRuleCollector.cpp:
3293         (WebCore::ElementRuleCollector::ruleMatches):
3294         Tell the RuleData when its compiled selector is used.
3295         * css/RuleSet.cpp:
3296         (WebCore::RuleData::RuleData):
3297         Initialize the compiled selector use count to 0.
3298         * css/RuleSet.h:
3299         (WebCore::RuleData::~RuleData):
3300         (WebCore::RuleData::compiledSelectorUsed):
3301         Count and log the number of times a compiled selector is used.
3302         * cssjit/SelectorCompiler.h:
3303         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
3304         * dom/SelectorQuery.cpp:
3305         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
3306         (WebCore::SelectorDataList::execute):
3307         Tell the SelectorData when its compiled selector is used.
3308         * dom/SelectorQuery.h:
3309         (WebCore::SelectorDataList::SelectorData::SelectorData):
3310         (WebCore::SelectorDataList::SelectorData::~SelectorData):
3311         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
3312         Count and log the number of times a compiled selector is used.
3313
3314 2014-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3315
3316         Unreviewed. Fix GObject DOM bindings API breaks test after r170700.
3317
3318         Add missing WebKitDOMXPathNSResolver.symbols that I forgot to add
3319         in r170700.
3320
3321         * bindings/gobject/WebKitDOMXPathNSResolver.symbols: Added.
3322
3323 2014-07-07  Pratik Solanki  <psolanki@apple.com>
3324
3325         Unreviewed. iOS build fix after r170871.
3326
3327         * rendering/RenderThemeIOS.mm:
3328         (WebCore::adjustInputElementButtonStyle):
3329
3330 2014-07-07  Zalan Bujtas  <zalan@apple.com>
3331
3332         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
3333         https://bugs.webkit.org/show_bug.cgi?id=134710
3334         <rdar://problem/17545291>
3335
3336         Reviewed by Simon Fraser.
3337
3338         Transparent layer clipping needs device pixel snapping.
3339
3340         Test: fast/layers/wrong-clipping-semi-transparent-layer-on-subpixel-position.html
3341
3342         * rendering/RenderLayer.cpp:
3343         (WebCore::RenderLayer::beginTransparencyLayers):
3344
3345 2014-07-07  Benjamin Poulain  <benjamin@webkit.org>
3346
3347         LinkBuffer should not keep a reference to the MacroAssembler
3348         https://bugs.webkit.org/show_bug.cgi?id=134668
3349
3350         Reviewed by Geoffrey Garen.
3351
3352         * cssjit/SelectorCompiler.cpp:
3353         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3354
3355 2014-07-07  Zalan Bujtas  <zalan@apple.com>
3356
3357         Subpixel rendering: Inline box decoration rounds to integral.
3358         https://bugs.webkit.org/show_bug.cgi?id=134523
3359         <rdar://problem/17530298>
3360
3361         Reviewed by Darin Adler.
3362
3363         This patch removes 2 integral roundings from InlineFlowBox:
3364         1. Border and padding sizes are implicitly integral truncated by the 'int' return type
3365            of borderLogicalLeft/Right()/paddingLogicalLeft/Right(). It results in losing
3366            fractional border/padding values.
3367         2. Painting rectangle is explicitly rounded which pushes border and
3368            other decoration elements to odd device pixel positions on retina displays.
3369         These values get pixel snapped right before calling in to GraphicsContext::*.
3370
3371         Test: fast/inline/hidpi-inline-text-decoration-with-subpixel-value.html
3372
3373         * rendering/InlineBox.h:
3374         (WebCore::InlineBox::frameRect):
3375         * rendering/InlineFlowBox.cpp:
3376         (WebCore::InlineFlowBox::nodeAtPoint):
3377         (WebCore::InlineFlowBox::paintBoxDecorations):
3378         (WebCore::InlineFlowBox::paintMask):
3379         (WebCore::InlineFlowBox::roundedFrameRect): Deleted.
3380         * rendering/InlineFlowBox.h:
3381         (WebCore::InlineFlowBox::borderLogicalLeft):
3382         (WebCore::InlineFlowBox::borderLogicalRight):
3383         (WebCore::InlineFlowBox::paddingLogicalLeft):
3384         (WebCore::InlineFlowBox::paddingLogicalRight):
3385
3386 2014-07-07  Zalan Bujtas  <zalan@apple.com>
3387
3388         Pass RenderLayer reference instead of pointer to RenderLayer::paintingExtent().
3389         https://bugs.webkit.org/show_bug.cgi?id=134714
3390
3391         Reviewed by Simon Fraser.
3392
3393         No change in functionality. 
3394
3395         * rendering/RenderLayer.cpp: * -> &
3396         (WebCore::expandClipRectForRegionAndReflection):
3397         (WebCore::expandClipRectForDescendantsAndReflection):
3398         (WebCore::transparencyClipBox):
3399         (WebCore::paintingExtent):
3400         (WebCore::RenderLayer::beginTransparencyLayers):
3401         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
3402         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
3403         (WebCore::RenderLayer::paintingExtent): Deleted.
3404         * rendering/RenderLayer.h:
3405
3406 2014-07-07  Myles C. Maxfield  <mmaxfield@apple.com>
3407
3408         Remove misleadingly-named Font::isSVGFont()
3409         https://bugs.webkit.org/show_bug.cgi?id=134697
3410
3411         Reviewed by Dean Jackson.
3412
3413         Being a SVG font is a property of the FontData object, not
3414         the Font object. Providing an isSVGFont() function on the
3415         Font class will likely lead to incorrect code and non-obvious
3416         bugs.
3417
3418         No new tests because there is no behavior change.
3419
3420         * platform/graphics/Font.h:
3421         (WebCore::Font::isSVGFont): Deleted.
3422         * platform/graphics/mac/FontMac.mm:
3423         (WebCore::Font::primaryFontDataIsSystemFont):
3424         * rendering/InlineTextBox.cpp:
3425         (WebCore::InlineTextBox::constructTextRun):
3426         * rendering/RenderBlock.cpp:
3427         (WebCore::constructTextRunInternal):
3428         * rendering/SimpleLineLayout.cpp:
3429         (WebCore::SimpleLineLayout::canUseFor):
3430         * rendering/svg/SVGInlineTextBox.cpp:
3431         (WebCore::SVGInlineTextBox::constructTextRun):
3432         * rendering/svg/SVGTextMetrics.cpp:
3433         (WebCore::SVGTextMetrics::constructTextRun):
3434         (WebCore::SVGTextMetrics::SVGTextMetrics):
3435
3436 2014-07-07  Brady Eidson  <beidson@apple.com>
3437
3438         Move Gamepad index down into PlatformGamepad.
3439         https://bugs.webkit.org/show_bug.cgi?id=134670
3440
3441         Reviewed by Darin Adler.
3442
3443         PlatformGamepads always have an inherent index anyways.
3444         This will make things easier in all upcoming work.
3445
3446         * Modules/gamepad/Gamepad.cpp:
3447         (WebCore::Gamepad::Gamepad):
3448         * Modules/gamepad/Gamepad.h:
3449
3450         * Modules/gamepad/GamepadManager.cpp:
3451         (WebCore::GamepadManager::platformGamepadConnected):
3452         (WebCore::GamepadManager::platformGamepadDisconnected):
3453         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators):
3454         * Modules/gamepad/GamepadManager.h:
3455
3456         * Modules/gamepad/NavigatorGamepad.cpp:
3457         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
3458         (WebCore::NavigatorGamepad::gamepadConnected):
3459         (WebCore::NavigatorGamepad::gamepadDisconnected):
3460         * Modules/gamepad/NavigatorGamepad.h:
3461
3462         * platform/GamepadProviderClient.h:
3463
3464         * platform/PlatformGamepad.h:
3465         (WebCore::PlatformGamepad::index):
3466         (WebCore::PlatformGamepad::PlatformGamepad):
3467
3468         * platform/mac/HIDGamepad.cpp:
3469         (WebCore::HIDGamepad::HIDGamepad):
3470         * platform/mac/HIDGamepad.h:
3471
3472         * platform/mac/HIDGamepadProvider.cpp:
3473         (WebCore::HIDGamepadProvider::deviceAdded):
3474         (WebCore::HIDGamepadProvider::deviceRemoved):
3475         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
3476         * platform/mac/HIDGamepadProvider.h:
3477
3478 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
3479
3480         [UI-side compositing] Support reflections on custom layers like video
3481         https://bugs.webkit.org/show_bug.cgi?id=134701
3482
3483         Reviewed by Tim Horton.
3484
3485         Add a LayerTypeWebGLLayer layer type, and support casting to PlatformCALayerRemoteCustom.
3486
3487         * WebCore.exp.in: Export PlatformCALayerMac::layerTypeForPlatformLayer(CALayer*), and sort.
3488         * platform/graphics/ca/PlatformCALayer.h:
3489         (WebCore::PlatformCALayer::isPlatformCALayerRemoteCustom):
3490         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3491         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3492         (PlatformCALayerMac::layerTypeForPlatformLayer):
3493         (PlatformCALayerMac::PlatformCALayerMac):
3494         (PlatformCALayerMac::commonInit):
3495
3496 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
3497
3498         [UI-side compositing] Crash when starting a filter transition on a reflected layer
3499         https://bugs.webkit.org/show_bug.cgi?id=134694
3500
3501         Reviewed by Tim Horton.
3502
3503         Don't call the owner if we failed to find the animation key (which actually
3504         isn't used by PlatformCALayerMac anyway).
3505
3506         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3507         (-[WebAnimationDelegate animationDidStart:]):
3508
3509 2014-07-07  Alex Christensen  <achristensen@webkit.org>
3510
3511         [iOS WebGL] Fix crash with too many nested glsl functions.
3512         https://bugs.webkit.org/show_bug.cgi?id=134683
3513         <rdar://problem/17541529>
3514
3515         Reviewed by Geoffrey Garen.
3516
3517         This fixes the Khronos WebGL 1.0.3 test nested-functions-should-not-crash.html.
3518
3519         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3520         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
3521         Add SH_LIMIT_CALL_STACK_DEPTH to extraCompileOptions.
3522
3523 2014-07-07  Ion Rosca  <rosca@adobe.com>
3524
3525         [CSS Blending]The background images set on the root element will blend on an initial white backdrop.
3526         https://bugs.webkit.org/show_bug.cgi?id=134342
3527
3528         Reviewed by Dean Jackson.
3529
3530         Tests: css3/blending/background-blend-mode-body-image.html
3531                css3/blending/background-blend-mode-body-transparent-color-and-image.html
3532                css3/blending/background-blend-mode-body-transparent-image.html
3533
3534         * rendering/RenderBox.cpp:
3535         (WebCore::RenderBox::paintFillLayers):
3536         If the background layers have blend modes, we paint the base background color first,
3537         before starting a new transparency layer. After creating the transparency layer,
3538         the base background will be skipped, and the background layers will blend on top of
3539         a transparent backdrop.
3540         (WebCore::RenderBox::paintFillLayer):
3541         * rendering/RenderBox.h:
3542         * rendering/RenderBoxModelObject.cpp:
3543         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3544         This method is able to paint only the base background color (BaseBackgroundColorOnly), 
3545         skipping the background-color and background-images. This option is available only
3546         on bottom layer of the root renderer and only if the background color is not opaque,
3547         otherwise the method will return early.
3548         Another option is to paint the root background without using the base background color
3549         (BaseBackgroundColorSkip).
3550         * rendering/RenderBoxModelObject.h:
3551         Adding the BaseBackgroundColorUsage enum.
3552
3553 2014-07-06  Yoav Weiss  <yoav@yoav.ws>
3554
3555         Turn on img@sizes compile flag
3556         https://bugs.webkit.org/show_bug.cgi?id=134634
3557
3558         Reviewed by Benjamin Poulain.
3559
3560         * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
3561
3562 2014-07-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3563
3564         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
3565         https://bugs.webkit.org/show_bug.cgi?id=134647
3566
3567         Reviewed by Andreas Kling.
3568
3569         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
3570
3571         No new tests, no behavior change.
3572
3573         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
3574         file so that functions from that file can use the Element|Node classes and other things defined in this file.
3575         * mathml/MathMLMencloseElement.h:
3576         (WebCore::toMathMLMencloseElement): Deleted.
3577         * mathml/mathtags.in:
3578
3579 2014-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>
3580
3581         CSS JIT: Ensure resolvingMode size is 1 byte
3582         https://bugs.webkit.org/show_bug.cgi?id=134662
3583
3584         Reviewed by Benjamin Poulain.
3585
3586         Since selector compiler uses MacroAssembler::branch8 for SelectorChecker::Mode,
3587         we should ensure sizeof(SelectorChecker::Mode) == 1.
3588         Old implementation works only in little endianness environments.
3589
3590         * css/ElementRuleCollector.cpp:
3591         (WebCore::ElementRuleCollector::matchedResult):
3592         (WebCore::ElementRuleCollector::matchedRuleList):
3593         (WebCore::ElementRuleCollector::collectMatchingRules):
3594         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3595         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
3596         * css/ElementRuleCollector.h:
3597         (WebCore::ElementRuleCollector::ElementRuleCollector):
3598         * css/SelectorChecker.cpp:
3599         (WebCore::SelectorChecker::match):
3600         (WebCore::SelectorChecker::matchRecursively):
3601         (WebCore::SelectorChecker::checkOne):
3602         * css/SelectorChecker.h:
3603         * css/StyleInvalidationAnalysis.cpp:
3604         (WebCore::invalidateStyleRecursively):
3605         * css/StyleResolver.cpp:
3606         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3607         * css/StyleResolver.h:
3608         (WebCore::checkRegionSelector):
3609         * cssjit/SelectorCompiler.cpp:
3610         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
3611         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
3612         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
3613         * dom/SelectorQuery.cpp:
3614         (WebCore::SelectorDataList::selectorMatches):
3615
3616 2014-07-06  Antti Koivisto  <antti@apple.com>
3617
3618         Don't throttle layer flushes when the main resource is a GIF
3619         https://bugs.webkit.org/show_bug.cgi?id=134650
3620         <rdar://problem/17490712>
3621
3622         Reviewed by Simon Fraser.
3623         
3624         Avoid throttling big image animations.
3625
3626         * page/FrameView.cpp:
3627         (WebCore::determineLayerFlushThrottleState):
3628         
3629             Disable for image documents.
3630
3631         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
3632         (WebCore::FrameView::updateLayerFlushThrottling):
3633         
3634             Refactor a bit.
3635
3636         * page/LayerFlushThrottleState.h:
3637         
3638             Rename the flag.
3639
3640 2014-07-06  Andreas Kling  <akling@apple.com>
3641
3642         Inline NodeListsNodeData helpers more aggressively.
3643         <https://webkit.org/b/134654>
3644
3645         Get rid of call overhead costs when retrieving NodeLists and
3646         HTMLCollections from Document. These functions have very few clients,
3647         so there's no real reason to keep them out of line.
3648
3649         Reviewed by Antti Koivisto.
3650
3651         * dom/NodeRareData.h:
3652         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
3653         (WebCore::NodeListsNodeData::addCacheWithName):
3654
3655 2014-07-06  Andreas Kling  <akling@apple.com>
3656
3657         Inline Node's rare data getters.
3658         <https://webkit.org/b/134652>
3659
3660         There was a fair bit of overhead when calling Node::ensureRareData()
3661         from Document's collection getters. This patch inlines the case where
3662         we've already materialized the rare data.
3663
3664         Reviewed by Antti Koivisto.
3665
3666         * dom/Node.cpp:
3667         (WebCore::Node::materializeRareData):
3668         (WebCore::Node::rareData): Deleted.
3669         (WebCore::Node::ensureRareData): Deleted.
3670         * dom/Node.h:
3671         * dom/NodeRareData.h:
3672         (WebCore::Node::rareData):
3673         (WebCore::Node::ensureRareData):
3674
3675 2014-07-05  Dean Jackson  <dino@apple.com>
3676
3677         [iOS] MediaDocument should set a viewport
3678         https://bugs.webkit.org/show_bug.cgi?id=134658
3679         <rdar://problem/17552339>
3680
3681         Reviewed by Zalan Bujtas.
3682
3683         A MediaDocument should fill the viewport, so set its
3684         initial-scale to 1 and make it non-zoomable.
3685
3686         * html/MediaDocument.cpp:
3687         (WebCore::MediaDocumentParser::createDocumentStructure): Create
3688         a <head> element and a <meta> element with a 1:1 viewport.
3689
3690 2014-07-05  Commit Queue  <commit-queue@webkit.org>
3691
3692         Unreviewed, rolling out r170825.
3693         https://bugs.webkit.org/show_bug.cgi?id=134653
3694
3695         broke debug builds (Requested by kling on #webkit).
3696
3697         Reverted changeset:
3698
3699         "Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS
3700         macro and generateTypeHelpers"
3701         https://bugs.webkit.org/show_bug.cgi?id=134647
3702         http://trac.webkit.org/changeset/170825
3703
3704 2014-07-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3705
3706         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
3707         https://bugs.webkit.org/show_bug.cgi?id=134647
3708
3709         Reviewed by Andreas Kling.
3710
3711         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
3712
3713         No new tests, no behavior change.
3714
3715         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
3716         file so that functions from that file can use the Element|Node classes and other things defined in this file.
3717         (WebCore::isMathMLElement): Deleted.
3718         * mathml/MathMLMencloseElement.h:
3719         (WebCore::toMathMLMencloseElement): Deleted.
3720         * mathml/mathtags.in:
3721
3722 2014-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3723
3724         [EFL] Support Geolocation
3725         https://bugs.webkit.org/show_bug.cgi?id=134439
3726
3727         Reviewed by Antonio Gomes.
3728
3729         Add geoclue files in order to enable geolocation for EFL port.
3730
3731         * PlatformEfl.cmake:
3732
3733 2014-07-04  Benjamin Poulain  <benjamin@webkit.org>
3734
3735         CSS JIT: compile :in-range and :out-of-range
3736         https://bugs.webkit.org/show_bug.cgi?id=134639
3737
3738         Reviewed by Andreas Kling.
3739
3740         The pseudo class :in-range and :out-of-range are trivial non-inlined selectors.
3741
3742         * css/SelectorChecker.cpp:
3743         (WebCore::SelectorChecker::checkOne):
3744         * css/SelectorCheckerTestFunctions.h:
3745         (WebCore::isInRange):
3746         (WebCore::isOutOfRange):
3747         * cssjit/SelectorCompiler.cpp:
3748         (WebCore::SelectorCompiler::addPseudoClassType):
3749
3750 2014-07-04  Andreas Kling  <akling@apple.com>
3751
3752         Fast path for jsStringWithCache() when asked for the same string repeatedly.
3753         <https://webkit.org/b/134635>
3754
3755         Reviewed by Darin Adler.
3756
3757         * WebCore.exp.in:
3758         * bindings/js/JSDOMBinding.cpp:
3759         (WebCore::jsStringWithCache): Deleted.
3760         * bindings/js/JSDOMBinding.h:
3761         (WebCore::JSValueTraits<String>::arrayJSValue):
3762         (WebCore::jsStringWithCache): Deleted.
3763         * bridge/c/c_utility.cpp:
3764         (JSC::Bindings::convertNPVariantToValue):
3765         * loader/cache/CachedResourceHandle.h:
3766
3767 2014-07-04  Zalan Bujtas  <zalan@apple.com>
3768
3769         Subpixel rendering: ebay.com rotating billboard on the main page has cut off buttons.
3770         https://bugs.webkit.org/show_bug.cgi?id=134636
3771         <rdar://problem/17529112>
3772
3773         Reviewed by Darin Adler.
3774
3775         Missing pixel snapping when clipping the transparency layer for BackgroundBleedUseTransparencyLayer.
3776         Clipping needs to take the same snapping strategy as the rest of the painting code.
3777
3778         Test: fast/borders/border-radius-on-subpixel-position-non-hidpi.html
3779
3780         * rendering/RenderBox.cpp:
3781         (WebCore::RenderBox::paintBoxDecorations):
3782
3783 2014-05-10  Andreas Kling  <akling@apple.com>
3784
3785         QualifiedName should use RefPtr<QualifiedNameImpl> internally.
3786         <https://webkit.org/b/132796>
3787
3788         We were not inlining ~QualifiedName() and it was showing up in some
3789         profiles (over 1% on dom-attr.html.)
3790
3791         This patch modernizes QualifiedName a bit by using RefPtr to store
3792         the QualifiedNameImpl instead of doing manual ref() and deref()
3793         in out-of-line functions.
3794
3795         Reviewed by Darin Adler.
3796
3797         * WebCore.exp.in:
3798         * dom/QualifiedName.cpp:
3799         (WebCore::QNameComponentsTranslator::translate):
3800         (WebCore::QualifiedName::QualifiedName):
3801         (WebCore::QualifiedName::~QualifiedName): Deleted.
3802         (WebCore::QualifiedName::deref): Deleted.
3803         * dom/QualifiedName.h:
3804         (WebCore::QualifiedName::QualifiedNameImpl::create):
3805         (WebCore::QualifiedName::QualifiedName):
3806         (WebCore::QualifiedName::isHashTableDeletedValue):
3807         (WebCore::QualifiedName::~QualifiedName):
3808         (WebCore::QualifiedName::operator=):
3809         (WebCore::QualifiedName::impl):
3810         (WebCore::QualifiedName::ref): Deleted.
3811
3812 2014-07-04  Dean Jackson  <dino@apple.com>
3813
3814         [iOS] [Media] Prevent page zoom if it started in the video element
3815         https://bugs.webkit.org/show_bug.cgi?id=134640
3816         <rdar://problem/16630794>
3817
3818         Reviewed by Sam Weinig.
3819
3820         In r170572 I attempted to prevent the page zoom from happening
3821         when the user was attempting to fullscreen the video. That fix was
3822         not complete, because it relied on the touchstart event being
3823         sent before a gesture event. It turns out this doesn't always happen,
3824         so we need to apply the same check in the gesture event - if the
3825         gesture began with two fingers on the media, don't do a page zoom.
3826         The exception is zooming out, if you've managed to make the video
3827         cover the entire screen (also, the pinch-out-of-fullscreen gesture
3828         does not get handled by WebKit).
3829
3830         * Modules/mediacontrols/mediaControlsiOS.js:
3831         (ControllerIOS.prototype.handleBaseGestureChange): Add a check to
3832         make sure our pinch didn't start in the video element.
3833
3834 2014-07-04  Hunseop Jeong  <hs85.jeong@samsung.com>
3835
3836         [CoordinatedGraphics] Use the C++11 syntax to clean-up for loops 
3837         https://bugs.webkit.org/show_bug.cgi?id=134594
3838
3839         Reviewed by Darin Adler.
3840
3841         Convert a couple of loops to range-based for 
3842
3843         No change in functionality, no new tests.
3844
3845         * platform/graphics/TiledBackingStore.cpp:
3846         (WebCore::TiledBackingStore::updateTileBuffers):
3847         (WebCore::TiledBackingStore::resizeEdgeTiles):
3848         (WebCore::TiledBackingStore::setKeepRect):
3849         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3850         (WebCore::CompositingCoordinator::~CompositingCoordinator):
3851         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
3852         (WebCore::CompositingCoordinator::setVisibleContentsRect):
3853         (WebCore::CompositingCoordinator::purgeBackingStores):
3854         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3855         (WebCore::CoordinatedBackingStore::removeAllTiles):
3856         (WebCore::CoordinatedBackingStore::paintToTextureMapper):
3857         (WebCore::CoordinatedBackingStore::drawBorder):
3858         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
3859         (WebCore::CoordinatedBackingStore::commitTileOperations):
3860         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3861         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
3862         (WebCore::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):
3863
3864 2014-07-04  Andreas Kling  <akling@apple.com>
3865
3866         CTTE: ScriptElement always has a HTTPScriptElement or SVGScriptElement.
3867         <https://webkit.org/b/134637>
3868
3869         Have ScriptElement store the pointer to the more specific subclass
3870         element as a reference. Also made the constructor protected since
3871         nobody should instantiate ScriptElement directly.
3872
3873         Reviewed by Antti Koivisto.
3874
3875         * dom/ScriptElement.cpp:
3876         (WebCore::ScriptElement::ScriptElement):
3877         (WebCore::ScriptElement::childrenChanged):
3878         (WebCore::ScriptElement::dispatchErrorEvent):
3879         (WebCore::ScriptElement::prepareScript):
3880         (WebCore::ScriptElement::requestScript):
3881         (WebCore::ScriptElement::executeScript):
3882         (WebCore::ScriptElement::notifyFinished):
3883         (WebCore::ScriptElement::ignoresLoadRequest):
3884         (WebCore::ScriptElement::scriptContent):
3885         * dom/ScriptElement.h:
3886         (WebCore::ScriptElement::element):
3887         * dom/ScriptRunner.cpp:
3888         (WebCore::ScriptRunner::queueScriptForExecution):
3889         * html/HTMLScriptElement.cpp:
3890         (WebCore::HTMLScriptElement::HTMLScriptElement):
3891         * svg/SVGScriptElement.cpp:
3892         (WebCore::SVGScriptElement::SVGScriptElement):
3893
3894 2014-07-04  Julien Quint  <pom@graougraou.com>
3895
3896         input type=range element should only fire change events after committing a  value
3897         https://bugs.webkit.org/show_bug.cgi?id=134545
3898
3899         Reviewed by Dean Jackson.
3900
3901         A "change" event was fired every time the slider thumb element was dragged
3902         by the user. The "change" event is now fired only after the thumb
3903         element has stopped moving; previously, both "input" and "change" events
3904         where dispatched while changes were being made. This new behavior is
3905         consistent with the specification (cf.
3906         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-change),
3907         as well as other implementations such as Firefox and Chrome.
3908
3909         * Modules/mediacontrols/mediaControlsApple.js:
3910         (Controller.prototype.createControls): Listen to the "input" event
3911         rather than the "change" event for the timeline control in order to
3912         keep track of value changes when the user is dragging the thumb.
3913         * accessibility/AccessibilitySlider.cpp:
3914         (WebCore::AccessibilitySlider::setValue): Dispatch "change" event while
3915         setting the new value rather than dispatching later, since setting the
3916         value now clears the change flag.
3917         * html/RangeInputType.cpp:
3918         (WebCore::RangeInputType::setValue): Update the text value of the
3919         control in the case when no event is to be dispatched, so that this
3920         value can be checked the next time a "change" event dispatch is
3921         requested.
3922         * html/shadow/SliderThumbElement.cpp:
3923         (WebCore::SliderThumbElement::setPositionFromPoint): Removed the
3924         dispatch of the "change" event, and no longer track the text value of
3925         the element as a result of dispatching a "change" event.
3926         (WebCore::SliderThumbElement::stopDragging): Dispatch the "change" event
3927         on completing the drag.
3928
3929 2014-07-04  Andreas Kling  <akling@apple.com>
3930
3931         CTTE: ApplicationCacheHost always has a DocumentLoader.
3932         <https://webkit.org/b/b/128435>
3933
3934         Have ApplicationCacheHost store the backpointer to its owning
3935         DocumentLoader as a reference.
3936
3937         Reviewed by Sam Weinig.
3938
3939         * loader/DocumentLoader.cpp:
3940         (WebCore::DocumentLoader::DocumentLoader):
3941         (WebCore::DocumentLoader::startLoadingMainResource):
3942         * loader/appcache/ApplicationCacheHost.cpp:
3943         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
3944         (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
3945         (WebCore::ApplicationCacheHost::selectCacheWithoutManifest):
3946         (WebCore::ApplicationCacheHost::selectCacheWithManifest):
3947         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
3948         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
3949         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
3950         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
3951         (WebCore::ApplicationCacheHost::finishedLoadingMainResource):
3952         (WebCore::ApplicationCacheHost::maybeLoadResource):
3953         (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
3954         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
3955         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
3956         (WebCore::ApplicationCacheHost::stopDeferringEvents):
3957         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
3958         (WebCore::ApplicationCacheHost::update):
3959         (WebCore::ApplicationCacheHost::swapCache):
3960         (WebCore::ApplicationCacheHost::abort):
3961         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
3962         * loader/appcache/ApplicationCacheHost.h:
3963         (WebCore::ApplicationCacheHost::documentLoader): Deleted.
3964
3965 2014-07-04  Antti Koivisto  <antti@apple.com>
3966
3967         REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
3968         https://bugs.webkit.org/show_bug.cgi?id=134633
3969         <rdar://problem/17088936>
3970
3971         Reviewed by Zalan Bujtas.
3972
3973         Test: printing/simple-lines-break.html
3974
3975         * rendering/SimpleLineLayout.cpp:
3976         (WebCore::SimpleLineLayout::canUseFor):
3977         
3978             Disable simple lines if global pagination is enabled.
3979             Printing does not currently use flow threads which we already test for.
3980
3981 2014-07-04  Zan Dobersek  <zdobersek@igalia.com>
3982
3983         Unreviewed. Fixing the build after r170795.
3984
3985         Mac didn't like that change as it seems to properly typedef long long to int64_t.
3986         That's not the case on 64-bit Linux (for some reason), so I'm changing the type of
3987         the two long long variables in FormDataElement to int64_t to avoid any further trouble.
3988
3989         * platform/network/FormData.h:
3990
3991 2014-07-03  Brady Eidson  <beidson@apple.com>
3992
3993         When showing the selection menu, include menu options for all selected phone numbers.
3994         <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
3995
3996         Reviewed by Tim Horton.
3997
3998         * English.lproj/Localizable.strings:
3999