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