1 2015-03-06 Jeremy Jones <jeremyj@apple.com>
3 Scroll to make the video element visible when exiting fullscreen.
4 https://bugs.webkit.org/show_bug.cgi?id=141439
6 Reviewed by Simon Fraser.
8 This patch will scroll the element so it is visible when exiting fullscreen,
9 but only if the element is completely scrolled off screen.
10 Also update the element screen rect so exit animation goes to the correct location.
13 (WebCore::Element::scrollIntoViewIfNotVisible): Added.
14 * dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
15 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
16 (-[WebVideoFullscreenController fullscreenMayReturnToInline]):
17 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
18 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
19 (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
20 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
21 (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
22 (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
23 (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
24 (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
25 (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
26 (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
27 * rendering/ScrollBehavior.cpp:
28 * rendering/ScrollBehavior.h:
30 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
32 Crash in -[WebCascadeList objectAtIndex:] + 195
33 https://bugs.webkit.org/show_bug.cgi?id=141274
35 Reviewed by David Kilzer.
37 CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
38 WebCascadeList can too.
40 Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html
42 * platform/graphics/FontCascade.cpp:
43 (WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
44 * platform/graphics/FontCascade.h:
45 (WebCore::FontCascade::createWeakPtr):
46 * platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
48 (-[WebCascadeList initWithFont:character:]):
49 (-[WebCascadeList count]):
50 (-[WebCascadeList objectAtIndex:]):
52 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
54 Rename BreakingContextInlineHeaders.h to BreakingContext.h
55 https://bugs.webkit.org/show_bug.cgi?id=142404
57 Reviewed by Simon Fraser.
59 No point naming it "InlineHeaders" when there are no non-inline-headers files.
61 No new tests because this is just a rename of a file.
63 * WebCore.vcxproj/WebCore.vcxproj:
64 * WebCore.vcxproj/WebCore.vcxproj.filters:
65 * WebCore.xcodeproj/project.pbxproj:
66 * rendering/RenderBlockLineLayout.cpp:
67 * rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
68 (WebCore::WordMeasurement::WordMeasurement):
69 (WebCore::BreakingContext::BreakingContext):
70 (WebCore::BreakingContext::currentObject):
71 (WebCore::BreakingContext::lineBreak):
72 (WebCore::BreakingContext::lineWidth):
73 (WebCore::BreakingContext::atEnd):
74 (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
75 (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
76 (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
77 (WebCore::BreakingContext::InlineIteratorHistory::push):
78 (WebCore::BreakingContext::InlineIteratorHistory::update):
79 (WebCore::BreakingContext::InlineIteratorHistory::renderer):
80 (WebCore::BreakingContext::InlineIteratorHistory::offset):
81 (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
82 (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
83 (WebCore::BreakingContext::InlineIteratorHistory::get):
84 (WebCore::BreakingContext::InlineIteratorHistory::current):
85 (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
86 (WebCore::BreakingContext::InlineIteratorHistory::moveTo):
87 (WebCore::BreakingContext::InlineIteratorHistory::increment):
88 (WebCore::BreakingContext::InlineIteratorHistory::clear):
89 (WebCore::BreakingContext::initializeForCurrentObject):
90 (WebCore::BreakingContext::increment):
91 (WebCore::BreakingContext::handleBR):
92 (WebCore::borderPaddingMarginStart):
93 (WebCore::borderPaddingMarginEnd):
94 (WebCore::shouldAddBorderPaddingMargin):
95 (WebCore::previousInFlowSibling):
96 (WebCore::inlineLogicalWidth):
97 (WebCore::BreakingContext::handleOutOfFlowPositioned):
98 (WebCore::BreakingContext::handleFloat):
99 (WebCore::shouldSkipWhitespaceAfterStartObject):
100 (WebCore::BreakingContext::handleEmptyInline):
101 (WebCore::BreakingContext::handleReplaced):
102 (WebCore::firstPositiveWidth):
103 (WebCore::iteratorIsBeyondEndOfRenderCombineText):
104 (WebCore::nextCharacter):
105 (WebCore::updateCounterIfNeeded):
106 (WebCore::measureHyphenWidth):
107 (WebCore::textWidth):
108 (WebCore::ensureCharacterGetsLineBox):
109 (WebCore::tryHyphenating):
110 (WebCore::BreakingContext::handleText):
111 (WebCore::textBeginsWithBreakablePosition):
112 (WebCore::BreakingContext::canBreakAtThisPosition):
113 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
114 (WebCore::checkMidpoints):
115 (WebCore::BreakingContext::handleEndOfLine):
116 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
117 * rendering/line/LineBreaker.cpp:
119 2015-03-06 Dan Bernstein <mitz@apple.com>
121 Expose some of the functionality of extract-localizable-strings.pl as a module
122 https://bugs.webkit.org/show_bug.cgi?id=142038
124 Reviewed by Sam Weinig.
126 * LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
127 (setTreatWarningsAsErrors): Added this setter for the variable moved here.
128 (sawError): Added a getter.
129 (emitError): Added. Emits the error message and sets $sawError.
130 (unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
132 (keyCollisionCount): Added this getter.
133 (localizedCount): Added this getter.
134 (HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
135 localized string count.
136 (writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
137 (verifyStringsFile): Ditto.
139 * WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
142 * extract-localizable-strings.pl:
143 (emitWarning): Moved to the module.
144 (UnescapeHexSequence): Ditto.
145 (HandleUIString): Ditto.
147 2015-03-06 Darin Adler <darin@apple.com>
149 Remove unused C++ DOM event handler attribute functions
150 https://bugs.webkit.org/show_bug.cgi?id=142398
152 Reviewed by Anders Carlsson.
154 * dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
155 DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
156 DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
157 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.
159 * Modules/webaudio/AudioScheduledSourceNode.cpp:
160 (WebCore::AudioScheduledSourceNode::setOnended): Deleted.
161 (WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
162 instead of one-off event-sending code. Also use a lambda to avoid needing two
163 additional member functions to implement this.
164 (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
165 (WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
166 * Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.
168 * Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
169 including ones created with macros from EventTarget.h.
170 * Modules/encryptedmedia/MediaKeySession.h: Ditto.
171 * Modules/indexeddb/IDBDatabase.h: Ditto.
172 * Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
173 * Modules/indexeddb/IDBRequest.h: Ditto.
174 * Modules/indexeddb/IDBTransaction.h: Ditto.
175 * Modules/mediastream/MediaStream.h: Ditto.
176 * Modules/mediastream/MediaStreamTrack.h: Ditto.
177 * Modules/mediastream/RTCDTMFSender.h: Ditto.
178 * Modules/mediastream/RTCDataChannel.h: Ditto.
179 * Modules/mediastream/RTCPeerConnection.h: Ditto.
180 * Modules/notifications/Notification.h: Ditto.
181 * Modules/speech/SpeechSynthesisUtterance.h: Ditto.
182 * Modules/webaudio/AudioContext.h: Ditto.
183 * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
184 * Modules/webaudio/ScriptProcessorNode.h: Ditto.
185 * Modules/websockets/WebSocket.h: Ditto.
186 * css/FontLoader.h: Ditto.
187 * dom/Document.h: Ditto.
188 * dom/Element.cpp: Ditto.
189 * dom/Element.h: Ditto.
190 * dom/MessagePort.h: Ditto.
191 * fileapi/FileReader.h: Ditto.
192 * html/HTMLBodyElement.h: Ditto.
193 * html/HTMLFormElement.h: Ditto.
194 * html/HTMLFrameSetElement.h: Ditto.
195 * html/HTMLInputElement.h: Ditto.
196 * html/HTMLMediaElement.h: Ditto.
197 * html/HTMLVideoElement.h: Ditto.
198 * html/track/TextTrack.h: Ditto.
199 * html/track/TextTrackCue.h: Ditto.
200 * html/track/TrackListBase.h: Ditto.
201 * loader/appcache/DOMApplicationCache.h: Ditto.
202 * page/DOMWindow.h: Ditto.
203 * page/EventSource.h: Ditto.
204 * page/Performance.h: Ditto.
205 * workers/AbstractWorker.h: Ditto.
206 * workers/DedicatedWorkerGlobalScope.h: Ditto.
207 * workers/Worker.h: Ditto.
208 * workers/WorkerGlobalScope.h: Ditto.
209 * xml/XMLHttpRequest.h: Ditto.
210 * xml/XMLHttpRequestUpload.h: Ditto.
212 2015-03-06 Said Abou-Hallawa <sabouhallawa@apple.com>
214 Setting any of the <object> element plugin controlling attributes does not have any affect.
215 https://bugs.webkit.org/show_bug.cgi?id=141936.
217 Reviewed by Simon Fraser.
219 When setting any of the <object> element plugin controlling attributes
220 dynamically we need to mark the the element to be dirty by calling
221 setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
223 Tests: fast/css/image-object-hover-inherit.html
224 svg/as-object/svg-in-object-dynamic-attribute-change.html
226 * dom/Element.h: Delete unimplemented function.
228 * html/HTMLObjectElement.cpp:
229 (WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
230 calling setNeedsStyleRecalc() when one of the plugin controlling attributes
231 gets changed. We have to clear m_useFallbackContent because the attribute's
232 new value might fix the object rendering.
234 * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
236 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
238 Test horiz-origin-x and horiz-origin-y in SVG fonts
239 https://bugs.webkit.org/show_bug.cgi?id=142403
241 Reviewed by Simon Fraser.
243 Remove incorrect comment.
245 Test: svg/fonts/svg-font-horiz-origin.html
247 * svg/SVGToOTFFontConversion.cpp:
248 (WebCore::CFFBuilder::CFFBuilder):
250 2015-03-06 Simon Fraser <simon.fraser@apple.com>
252 Allow tree dumping functions to be used in release builds by switching a flag
253 https://bugs.webkit.org/show_bug.cgi?id=142379
255 Reviewed by Zalan Bujtas.
257 There are various tree dumping functions that are useful for debugging, and sometimes
258 you want to be able to use them in release builds. Currently they are surrounded by
259 #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
262 * dom/DocumentMarkerController.cpp:
263 * dom/DocumentMarkerController.h:
274 * editing/FrameSelection.cpp:
275 * editing/FrameSelection.h:
276 * editing/VisiblePosition.cpp:
277 * editing/VisiblePosition.h:
278 * editing/VisibleSelection.cpp:
279 * editing/VisibleSelection.h:
280 * html/parser/HTMLElementStack.cpp:
281 * html/parser/HTMLFormattingElementList.cpp:
282 * rendering/CounterNode.cpp:
283 * rendering/CounterNode.h:
284 * rendering/InlineBox.cpp:
285 * rendering/InlineBox.h:
286 * rendering/InlineFlowBox.cpp:
287 * rendering/InlineFlowBox.h:
288 * rendering/InlineTextBox.cpp:
289 * rendering/InlineTextBox.h:
290 * rendering/RenderBlockFlow.cpp:
291 * rendering/RenderBlockFlow.h:
292 * rendering/RenderCounter.cpp:
293 * rendering/RenderCounter.h:
294 * rendering/RenderLayer.cpp:
295 * rendering/RenderLayer.h:
296 * rendering/RenderLayerBacking.cpp:
297 (WebCore::RenderLayerBacking::createGraphicsLayer):
298 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
299 (WebCore::RenderLayerBacking::updateForegroundLayer):
300 (WebCore::RenderLayerBacking::updateBackgroundLayer):
301 * rendering/RenderLayerCompositor.cpp:
302 (WebCore::CompositingState::CompositingState):
303 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
304 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
305 (WebCore::RenderLayerCompositor::updateLayerForHeader):
306 (WebCore::RenderLayerCompositor::updateLayerForFooter):
307 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
308 (WebCore::RenderLayerCompositor::ensureRootLayer):
309 * rendering/RenderObject.cpp:
310 * rendering/RenderObject.h:
311 * rendering/RootInlineBox.cpp:
312 * rendering/RootInlineBox.h:
313 * rendering/SimpleLineLayoutFunctions.cpp:
314 * rendering/SimpleLineLayoutFunctions.h:
315 * rendering/svg/SVGResources.cpp:
316 * rendering/svg/SVGResources.h:
318 2015-03-06 Said Abou-Hallawa <sabouhallawa@apple.com>
320 An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
321 https://bugs.webkit.org/show_bug.cgi?id=141725.
323 Reviewed by Darin Adler.
325 The current viewport of the <svg> element should be retrieved from its
326 renderer if the renderer is available. If the renderer is not created yet,
327 this means the viewport is needed to calculate the size of the renderer.
328 In this case, we should return the element size if it is intrinsic size.
330 Test: svg/css/svg-css-different-intrinsic-sizes.html
332 * svg/SVGSVGElement.cpp:
333 (WebCore::SVGSVGElement::currentViewportSize): Change the order for
334 returning the viewport of the <svg> element. We should consider the case
335 of a valid renderer before considering the case of an intrinsic size.
337 2015-03-06 Simon Fraser <simon.fraser@apple.com>
339 Allow composited clip-path to be updated without a layer repaint
340 https://bugs.webkit.org/show_bug.cgi?id=142384
342 Reviewed by Zalan Bujtas.
344 When clip-path is mapped to a compositing shape layer mask, we can just
345 push a new shape to the GraphicsLayer to update the clip path, without
348 Achieve this by adding ContextSensitivePropertyClipPath. When set, and the
349 stars are aligned, issue a StyleDifferenceRecompositeLayer rather than
350 a StyleDifferenceRepaint.
352 We ask RenderLayerCompositor whether the clip path can be composited
353 to hide platform differences related to whether GraphicsLayer supports
356 Test: compositing/masks/compositing-clip-path-change-no-repaint.html
358 * rendering/RenderElement.cpp:
359 (WebCore::RenderElement::adjustStyleDifference): Remove obvious comment
360 about opacity. Handle ContextSensitivePropertyClipPath.
361 * rendering/RenderLayerCompositor.cpp:
362 (WebCore::RenderLayerCompositor::canCompositeClipPath): If we have a mask
363 we have to paint the mask + clip path into the mask layer (mirrors code in
364 RenderLayerBacking::updateMaskingLayer but isn't quite similar enough to share).
365 * rendering/RenderLayerCompositor.h:
366 * rendering/style/RenderStyle.cpp:
367 (WebCore::RenderStyle::changeRequiresRepaint): Set ContextSensitivePropertyClipPath
368 and don't return, as is normal for context-sensitive property handling.
369 * rendering/style/RenderStyleConstants.h: Line things up to avoid future bit
370 fumbles, and remove unnecessary braces.
372 2015-03-06 Alex Christensen <achristensen@webkit.org>
374 [Content Extensions] Process all actions when blocking a URL.
375 https://bugs.webkit.org/show_bug.cgi?id=142363
377 Reviewed by Darin Adler.
379 This can only be tested once we implement css selectors.
381 * contentextensions/ContentExtensionsBackend.cpp:
382 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
383 Do not return early when adding a block action.
384 * loader/cache/CachedResourceLoader.cpp:
385 (WebCore::CachedResourceLoader::requestResource):
386 Process all actions before returning.
388 2015-03-05 Darin Adler <darin@apple.com>
390 Make JavaScript binding get and set legacy event listener attributes directly
391 https://bugs.webkit.org/show_bug.cgi?id=142282
393 Reviewed by Antti Koivisto.
395 Test: fast/dom/legacy-event-handler-attributes.html
397 This patch changes the JavaScript getters and setters for these attributes
398 to work directly without requiring any functions in the C++ DOM implementation.
399 A subsequent patch will remove the now-unused C++ DOM implementation.
401 * Modules/webaudio/AudioScheduledSourceNode.cpp:
402 (WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
403 m_hasEndedListener; this was incorrect since it only detected event listeners
404 set up with the event handler attribute, not with addEventListener.
405 (WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
406 m_hasEndedListener after making changes to the event listeners.
407 (WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
408 (WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.
409 * Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.
411 * Modules/webaudio/ScriptProcessorNode.cpp:
412 (WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
413 m_hasAudioProcessListener; this was incorrect since it only detected event listeners
414 set up with the event handler attribute, not with addEventListener.
415 (WebCore::ScriptProcessorNode::addEventListener): Added code to update
416 m_hasAudioProcessListener after making changes to the event listeners.
417 (WebCore::ScriptProcessorNode::removeEventListener): Ditto.
418 (WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.
419 * Modules/webaudio/ScriptProcessorNode.h: Added above overrides.
421 * bindings/js/JSEventListener.cpp:
422 (WebCore::legacyEventListenerAttribute): Added.
423 (WebCore::createEventListenerForLegacyAttribute): Added.
424 (WebCore::setLegacyEventListenerAttribute): Added.
425 (WebCore::legacyWindowEventListenerAttribute): Added.
426 (WebCore::setLegacyWindowEventListenerAttribute): Added.
428 * bindings/js/JSEventListener.h:
429 (WebCore::createJSEventListenerForAttribute): Deleted.
431 * bindings/scripts/CodeGeneratorJS.pm:
432 (GenerateAttributeEventListenerCall): Deleted.
433 (LegacyEventListenerAttributeEventName): Added.
434 (LegacyEventListenerAttributePrefix): Added.
435 (GenerateImplementation): Use "auto" in lots of places to simplify the code
436 generation. Replaced the old inlined code to deal with legacy event listener
437 attributes with code that simply calls the new functions from JSEventLister.h.
438 (GenerateCallWith): Use "auto".
439 (GenerateConstructorDefinition): Ditto.
441 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected
442 results since these now use auto.
443 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
444 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
445 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
446 * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
447 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
448 * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
449 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
450 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
451 * bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
452 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
453 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
454 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
455 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
456 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
457 * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
458 * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
460 * dom/MessagePort.cpp:
461 (WebCore::MessagePort::addEventListener): Moved logic that calls the start
462 function in here from setOnmessage, since the latter will no longer be called.
463 * dom/MessagePort.h: Ditto.
465 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
467 [iOS] SVG fonts are garbled
468 https://bugs.webkit.org/show_bug.cgi?id=142377
470 Reviewed by Simon Fraser.
472 The C++ spec says that casting a negative floating point number to
473 an unsigned integer is undefined. Instead, use clamping.
475 Covered by existing SVG font tests.
477 * Configurations/FeatureDefines.xcconfig:
478 * svg/SVGToOTFFontConversion.cpp:
479 (WebCore::writeCFFEncodedNumber):
481 2015-03-06 Commit Queue <commit-queue@webkit.org>
483 Unreviewed, rolling out r181139.
484 https://bugs.webkit.org/show_bug.cgi?id=142394
486 "Caused many crashes in API tests and layout tests in Debug
487 builds on bots." (Requested by ddkilzer on #webkit).
491 "Allow tree dumping functions to be used in release builds by
493 https://bugs.webkit.org/show_bug.cgi?id=142379
494 http://trac.webkit.org/changeset/181139
496 2015-03-05 Philippe Normand <pnormand@igalia.com>
498 [MediaStream] new load method for MediaStreamPrivate objects
499 https://bugs.webkit.org/show_bug.cgi?id=142346
501 Reviewed by Eric Carlson.
503 No new tests, existing mediastream tests cover this use-case.
505 * html/HTMLMediaElement.cpp:
506 (WebCore::HTMLMediaElement::loadResource): Use new load method for MediaStreams.
507 * platform/graphics/MediaPlayer.cpp:
508 (WebCore::NullMediaPlayerPrivate::load): New stub.
509 (WebCore::MediaPlayer::load): New load method for
511 (WebCore::MediaPlayer::nextBestMediaEngine): Set a new boolean on
512 the MediaEngineSupportParameters to differenciate with MSE and
513 normal video resources.
514 (WebCore::MediaPlayer::loadWithNextMediaEngine): Defer loading of
515 the MediaStream to the MediaPlayerPrivate backend.
516 * platform/graphics/MediaPlayer.h:
517 (WebCore::MediaEngineSupportParameters::MediaEngineSupportParameters):
518 * platform/graphics/MediaPlayerPrivate.h:
519 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
520 (WebCore::MediaPlayerPrivateAVFoundation::load): New empty load
521 method for MediaStreamPrivate objects.
522 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
523 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto.
524 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
525 (WebCore::MediaPlayerPrivateGStreamer::load): Ditto.
526 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
527 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
528 (WebCore::MediaPlayerPrivateQTKit::load): Ditto.
529 * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
531 2015-03-05 Philippe Normand <pnormand@igalia.com>
533 Rename MediaStreamSource to RealtimeMediaSource
534 https://bugs.webkit.org/show_bug.cgi?id=142330
536 Reviewed by Eric Carlson.
538 MediaStreamSource is a misleading name, it's not the source of a
541 The chain from high level to low level is: MediaStream -
542 MediaStreamTrack - MediaStreamTrackPrivate - RealTimeMediaSource
543 and a MediaStream can contains several MediaStreamTrack objects of
546 MediaStreamSourceStates was also renamed to
547 RealtimeMediaSourceStates, and MediaStreamSourceCapabilities to
548 RealtimeMediaSourceCapabilities, for consistency.
550 2015-03-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
552 Unreviewed WinCairo port build fix since r181136.
554 * platform/network/curl/ResourceRequest.h:
555 (WebCore::ResourceRequest::doPlatformAdopt): Missing ":" in std::unique_ptr.
557 2015-03-06 David Kilzer <ddkilzer@apple.com>
559 Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE} to SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}
560 <http://webkit.org/b/142177>
562 Reviewed by Alex Christensen.
564 * platform/cf/CoreMediaSoftLink.cpp:
565 - Rename SOFT_LINK_{CONSTANT,FUNCTION}_SOURCE() to
566 SOFT_LINK_{CONSTANT,FUNCTION}_FOR_SOURCE().
567 * platform/cf/CoreMediaSoftLink.h:
568 - Rename SOFT_LINK_{CONSTANT,FUNCTION}_HEADER() to
569 SOFT_LINK_{CONSTANT,FUNCTION}_FOR_HEADER().
571 * platform/mac/SoftLinking.h:
572 * platform/win/SoftLinking.h:
573 - Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE}() to
574 SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}().
576 2015-03-06 Sergio Villar Senin <svillar@igalia.com>
578 [CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
579 https://bugs.webkit.org/show_bug.cgi?id=142265
581 Reviewed by Darin Adler.
583 The problem is that computeUsedBreadthOfGridTracks() could return
584 -1 for rows because we're calling computeContentLogicalHeight()
585 which can indeed return -1. In those cases we should clamp the
586 value to 0 the same as Flexbox does otherwise we could end up with
587 a negative value in the min track sizing function.
589 Test: fast/css-grid-layout/grid-indefinite-calculated-height-crash.html
591 * rendering/RenderGrid.cpp:
592 (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
594 2015-03-05 Simon Fraser <simon.fraser@apple.com>
596 Allow tree dumping functions to be used in release builds by switching a flag
597 https://bugs.webkit.org/show_bug.cgi?id=142379
599 Reviewed by Zalan Bujtas.
601 There are various tree dumping functions that are useful for debugging, and sometimes
602 you want to be able to use them in release builds. Currently they are surrounded by
603 #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
607 * dom/DocumentMarkerController.cpp:
608 * dom/DocumentMarkerController.h:
613 * dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
614 is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
620 * rendering/CounterNode.cpp:
621 * rendering/CounterNode.h:
622 * rendering/InlineBox.cpp:
623 * rendering/InlineBox.h:
624 * rendering/InlineFlowBox.cpp:
625 * rendering/InlineFlowBox.h:
626 * rendering/InlineTextBox.cpp:
627 * rendering/InlineTextBox.h:
628 * rendering/RenderBlockFlow.cpp:
629 * rendering/RenderBlockFlow.h:
630 * rendering/RenderCounter.cpp:
631 * rendering/RenderCounter.h:
632 * rendering/RenderLayer.cpp:
633 * rendering/RenderLayer.h:
634 * rendering/RenderLayerBacking.cpp:
635 (WebCore::RenderLayerBacking::createGraphicsLayer):
636 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
637 (WebCore::RenderLayerBacking::updateForegroundLayer):
638 (WebCore::RenderLayerBacking::updateBackgroundLayer):
639 * rendering/RenderLayerCompositor.cpp:
640 (WebCore::CompositingState::CompositingState):
641 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
642 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
643 (WebCore::RenderLayerCompositor::updateLayerForHeader):
644 (WebCore::RenderLayerCompositor::updateLayerForFooter):
645 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
646 (WebCore::RenderLayerCompositor::ensureRootLayer):
647 * rendering/RenderObject.cpp:
648 * rendering/RenderObject.h: showTreeCharacterOffset was unused.
649 * rendering/RootInlineBox.cpp:
650 * rendering/RootInlineBox.h:
651 * rendering/SimpleLineLayoutFunctions.cpp:
652 * rendering/SimpleLineLayoutFunctions.h:
653 * rendering/svg/SVGResources.cpp:
654 * rendering/svg/SVGResources.h:
656 2015-03-05 Brent Fulgham <bfulgham@apple.com>
658 [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
659 https://bugs.webkit.org/show_bug.cgi?id=142351
660 <rdar://problem/20058023>
662 Reviewed by Dean Jackson.
664 This problem was caused by incorrectly starting a new snapping animation timer when the
665 "end momentum" phase event had been received. This caused WebKit to recalculate the
666 animation curve for the remaining distance, resulting in the bad animation behavior.
668 Removing this incorrect start animation command when entering the momentum ended state
669 resolves the problem.
671 * platform/cocoa/ScrollController.mm:
672 (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Remove the command to
673 start a new snap animation when entering the "end momentum" state.
675 2015-03-05 Joonghun Park <jh718.park@samsung.com>
677 Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceRequest
678 https://bugs.webkit.org/show_bug.cgi?id=142349
680 Reviewed by Darin Adler.
682 No new tests, no behavior changes.
684 * loader/WorkerThreadableLoader.cpp:
685 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
686 * loader/cache/MemoryCache.cpp:
687 (WebCore::MemoryCache::removeRequestFromSessionCaches):
688 * platform/CrossThreadCopier.h:
689 * platform/network/ResourceRequestBase.cpp:
690 (WebCore::ResourceRequestBase::adopt):
691 (WebCore::ResourceRequestBase::copyData):
692 * platform/network/ResourceRequestBase.h:
693 * platform/network/cf/ResourceRequest.h:
694 * platform/network/cf/ResourceRequestCFNet.cpp:
695 (WebCore::ResourceRequest::doPlatformCopyData):
696 (WebCore::ResourceRequest::doPlatformAdopt):
697 * platform/network/curl/ResourceRequest.h:
698 (WebCore::ResourceRequest::doPlatformCopyData):
699 (WebCore::ResourceRequest::doPlatformAdopt):
700 * platform/network/soup/ResourceRequest.h:
701 (WebCore::ResourceRequest::doPlatformCopyData):
702 (WebCore::ResourceRequest::doPlatformAdopt):
704 2015-03-05 Oliver Hunt <oliver@apple.com>
706 Block mixed mode content
707 https://bugs.webkit.org/show_bug.cgi?id=142378
709 Reviewed by Darin Adler.
711 Switched to blocking mixed mode content by default,
712 and modify the blocking rules to allow us to match
713 the behaviours of other browsers.
715 * loader/DocumentLoader.cpp:
716 (WebCore::DocumentLoader::willSendRequest):
717 * loader/MixedContentChecker.cpp:
718 (WebCore::MixedContentChecker::canDisplayInsecureContent):
719 (WebCore::MixedContentChecker::canRunInsecureContent):
720 (WebCore::MixedContentChecker::logWarning):
721 * loader/MixedContentChecker.h:
722 * loader/cache/CachedResourceLoader.cpp:
723 (WebCore::contentTypeFromResourceType):
724 (WebCore::CachedResourceLoader::checkInsecureContent):
727 2015-03-05 Chris Dumez <cdumez@apple.com>
729 Document::recalcStyle() shouldn't call viewportContentsChanged() if there is a pending layout
730 https://bugs.webkit.org/show_bug.cgi?id=142140
732 Reviewed by Darin Adler.
734 Stop calling FrameView::viewportContentsChanged() in Document::recalcStyle()
735 if there is a layout pending to avoid doing unncessary work. If there is a
736 layout pending, we don't need to do anything because viewportContentsChanged()
737 will be called after layout.
739 We only need to call FrameView::viewportContentsChanged() in
740 Document::recalcStyle() if a style recalc does not cause a layout. For e.g.
741 a '-webkit-transform' could make an animated GIF visible without causing a
742 layout, in which case we need to resume the animated GIF after style recalc.
744 No new tests, already covered by:
745 fast/images/animated-gif-webkit-transform.html
748 (WebCore::Document::recalcStyle):
750 2015-03-05 Dean Jackson <dino@apple.com>
752 [iOS Media] Web video on iPad appears black and missing the AirPlay placard when connected to an AirPlay route
753 https://bugs.webkit.org/show_bug.cgi?id=142373
754 <rdar://problem/19866072>
756 Reviewed by Brent Fulgham.
758 There was no style for the placard, which meant it had
759 zero height (and thus was invisible).
761 * Modules/mediacontrols/mediaControlsiOS.css:
762 (audio::-webkit-media-controls-wireless-playback-status): Added.
763 (audio::-webkit-media-controls-wireless-playback-status.hidden):
765 2015-03-05 Roger Fong <roger_fong@apple.com>
767 Adjust volume box to not intersect with rest of inline media controls on OSX.
768 https://bugs.webkit.org/show_bug.cgi?id=142372.
769 <rdar://problem/20064327>
771 Reviewed by Brent Fulgham.
773 * Modules/mediacontrols/mediaControlsApple.css:
774 (audio::-webkit-media-controls-panel .volume-box):
775 (audio::-webkit-media-controls-panel .volume-box:active):
777 2015-03-05 Timothy Horton <timothy_horton@apple.com>
779 <attachment> should allow the title property to override its title
780 https://bugs.webkit.org/show_bug.cgi?id=142369
782 Reviewed by Anders Carlsson.
784 Test: fast/attachment/attachment-title.html
786 * html/HTMLAttachmentElement.cpp:
787 (WebCore::HTMLAttachmentElement::parseAttribute):
788 Invalidate the attachment if the title changes.
790 (WebCore::HTMLAttachmentElement::attachmentTitle):
791 Use the title attribute for the title, unless it's empty, in which
792 case we'll use the file's name.
794 * html/HTMLAttachmentElement.h:
795 * rendering/RenderThemeMac.mm:
796 (WebCore::AttachmentLayout::layOutTitle):
797 Use attachmentTitle() instead of reaching into the file. Also rename
798 some things from filename to title.
800 2015-03-05 Timothy Horton <timothy_horton@apple.com>
802 Two text carets result when dragging a file into a contentEditable area that preventDefault()s the "drop" event
803 https://bugs.webkit.org/show_bug.cgi?id=142362
804 <rdar://problem/20046434>
806 Reviewed by Simon Fraser.
808 * page/DragController.h:
809 * page/DragController.cpp:
810 (WebCore::DragController::clearDragCaret):
811 Rename cancelDrag to clearDragCaret, since that's really what it does.
813 (WebCore::DragController::tryDocumentDrag):
814 When updating the drag position, if we're now over a <input type="file">,
815 clear the drag caret. This avoids leaving a caret behind when dragging
816 over a <input type="file"> inside a contentEditable area.
818 (WebCore::DragController::performDragOperation):
819 When the content preventDefault()s while finishing a drag, we should still
820 clear the drag caret, because it's possible that the client did not
821 preventDefault() on dragover/etc., so we would have set a cursor, and
822 now need to clear it so that it doesn't get left behind.
824 (WebCore::DragController::mouseMovedIntoDocument):
825 (WebCore::DragController::dragEnteredOrUpdated):
826 (WebCore::DragController::concludeEditDrag):
827 Adjust to renamed clearDragCaret.
829 (WebCore::DragController::dragEnded):
830 Make use of clearDragCaret (which is equivalent to this line).
832 2015-03-05 Timothy Horton <timothy_horton@apple.com>
834 <attachment> should support indication of download progress
835 https://bugs.webkit.org/show_bug.cgi?id=142336
836 <rdar://problem/19982504>
838 Reviewed by Anders Carlsson.
840 * html/HTMLAttachmentElement.cpp:
841 (WebCore::HTMLAttachmentElement::parseAttribute):
842 Invalidate the attachment if the progress attribute changes.
844 * platform/graphics/FloatRoundedRect.h:
845 (WebCore::FloatRoundedRect::Radii::Radii):
846 Add a Radii constructor that takes a single argument that is used
847 as the radius for all corners, for convenience.
849 * rendering/RenderThemeMac.mm:
850 (WebCore::attachmentProgressBarBackgroundColor):
851 (WebCore::attachmentProgressBarFillColor):
852 (WebCore::attachmentProgressBarBorderColor):
853 Add a bunch of constants for the progress bar.
855 (WebCore::paintAttachmentIconBackground):
856 Make use of fillRoundedRect instead of creating a path.
858 (WebCore::paintAttachmentProgress):
859 (WebCore::RenderThemeMac::paintAttachment):
860 Paint a progress bar if the progress attribute exists and
861 is a valid floating point number.
863 2015-03-05 Commit Queue <commit-queue@webkit.org>
865 Unreviewed, rolling out r180846.
866 https://bugs.webkit.org/show_bug.cgi?id=142368
868 Caused missing image banners in iTunes store pages (Requested
873 "FrameView::layoutTimerFired() should update style if needed
875 https://bugs.webkit.org/show_bug.cgi?id=141688
876 http://trac.webkit.org/changeset/180846
878 2015-03-05 Sandy Perez <sperez@indaba.es>
880 Fix the build when NEON_INTRINSICS is enabled
881 https://bugs.webkit.org/show_bug.cgi?id=142361
883 Reviewed by Csaba Osztrogonác.
885 * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
886 (WebCore::FEBlend::platformApplySoftware):
887 * platform/graphics/filters/FEGaussianBlur.cpp:
888 (WebCore::standardBoxBlur):
890 2015-03-05 Benjamin Poulain <bpoulain@apple.com>
892 Add basic support for character sets to the URL Filter parser
893 https://bugs.webkit.org/show_bug.cgi?id=142257
895 Reviewed by Alex Christensen.
897 This patch is a first step toward making the URL filter parser a bit
898 more powerful: it adds support for character set atom.
900 I did not attempt to integrate that into the prefix tree in this patch,
901 instead, the GraphBuilder gets a two modes of generating the NFA:
902 PrefixTree and DirectGeneration.
904 As long as we only see trivial atoms, we use the PrefixTree generation
905 to minimize the number of nodes we need. As soon as we start a character
906 class, we switch to DirectGeneration and we generate the NFA from the input
907 without merging with previously seen patterns.
909 To differentiate between Trivial atoms and CharacterSet, we also gain
912 The character set themself are very simple: each character is represented by
913 a bit in a 16bytes bit vector.
915 * contentextensions/URLFilterParser.cpp:
916 (WebCore::ContentExtensions::quantifyTrivialAtom):
917 (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
918 (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
919 (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
920 (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
921 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
922 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
923 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
924 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
925 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
926 (WebCore::ContentExtensions::GraphBuilder::sinkAtom):
927 (WebCore::ContentExtensions::GraphBuilder::generateTransition):
928 (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
929 (WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet):
930 (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
932 2015-03-05 Roger Fong <roger_fong@apple.com>
934 Implement new fullscreen media controls on Mac.
935 https://bugs.webkit.org/show_bug.cgi?id=142355.
936 <rdar://problem/16175787>
938 Reviewed by Dean Jackson.
940 Adjust sizes and positioning of all fullscreen media control elements.
941 * Modules/mediacontrols/mediaControlsApple.css:
942 (audio::-webkit-media-controls-fullscreen-button.exit): Update to match entering fullscreen button.
943 (video:-webkit-full-screen::-webkit-media-controls-panel):
944 (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
945 (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
946 (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
947 (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
948 (video:-webkit-full-screen::-webkit-media-controls-play-button):
949 (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
950 (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
951 (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
952 (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
953 (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
954 (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
955 (audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
956 (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb): Deleted.
957 (video:-webkit-full-screen::-webkit-media-controls-rewind-button): Deleted. Not used in full screen.
959 2015-03-05 Roger Fong <roger_fong@apple.com>
961 Minor touchups to inline media control icons.
962 https://bugs.webkit.org/show_bug.cgi?id=142354.
963 <rdar://problem/20058854>.
965 Reviewed by Brent Fulgham.
967 Increase sizes of play/pause and fullscreen buttons slightly.
968 * Modules/mediacontrols/mediaControlsApple.css:
969 (audio::-webkit-media-controls-play-button):
970 (audio::-webkit-media-controls-play-button.paused):
971 (audio::-webkit-media-controls-fullscreen-button):
973 2015-03-05 Roger Fong <roger_fong@apple.com>
975 Update inline media control icons for OSX.
976 https://bugs.webkit.org/show_bug.cgi?id=142305.
977 <rdar://problem/19997484>
979 Reviewed by Dean Jackson.
981 Changes include: new volume button, new full screen button, new play/pause button.
982 Repositioning of 30 second and play buttons.
983 * Modules/mediacontrols/mediaControlsApple.css:
984 (audio::-webkit-media-controls-panel button):
985 (audio::-webkit-media-controls-rewind-button):
986 (audio::-webkit-media-controls-play-button):
987 (audio::-webkit-media-controls-play-button.paused):
988 (audio::-webkit-media-controls-panel .mute-box):
989 (video::-webkit-media-controls-volume-max-button):
990 (video::-webkit-media-controls-volume-min-button):
991 (audio::-webkit-media-controls-toggle-closed-captions-button):
992 (audio::-webkit-media-controls-fullscreen-button):
993 (audio::-webkit-media-controls-current-time-display):
994 * Modules/mediacontrols/mediaControlsApple.js:
995 (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
996 (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
997 (Controller.prototype.updateVolume): Ditto
999 2015-03-05 David Hyatt <hyatt@apple.com>
1001 Caps lock indicator in text fields is laying out in the wrong place.
1002 https://bugs.webkit.org/show_bug.cgi?id=142352
1004 Reviewed by Dean Jackson.
1007 (input::-webkit-caps-lock-indicator):
1008 Change the CSS to give the SVG image an intrinsic size, and to use align-self:stretch so that
1009 the image always stretches to fill the height of the text box. Get rid of height:100%, as that
1010 just resolves to auto in strict mode and was not ever going to work there.
1012 2015-03-04 Dean Jackson <dino@apple.com>
1014 [iOS Media] Use a blurry background for media controls
1015 https://bugs.webkit.org/show_bug.cgi?id=142316
1016 <rdar://problem/14911098>
1018 Reviewed by Eric Carlson.
1020 Start using the -webkit-appearance media-controls-light-bar-background
1021 in order to get the blurry background of media controls.
1023 * Modules/mediacontrols/mediaControlsApple.js: Keep the panel and the
1024 panel background in sync when it comes to hiding and showing. It would
1025 be better if this could be done on a container element in the future.
1026 (Controller.prototype.handlePanelTransitionEnd):
1027 (Controller.prototype.setPlaying):
1028 (Controller.prototype.showControls):
1029 (Controller.prototype.hideControls):
1031 * Modules/mediacontrols/mediaControlsiOS.css: New background container
1032 with the special appearance. I also renamed "composited-parent" to
1033 "container", which makes more sense.
1034 (video::-webkit-media-controls-panel-container):
1035 (audio::-webkit-media-controls-panel-container):
1036 (video::-webkit-media-controls-panel-background):
1037 (audio::-webkit-media-controls-panel-background):
1038 (video::-webkit-media-controls-panel-background.paused):
1039 (video::-webkit-media-controls-panel):
1040 (audio::-webkit-media-controls-panel):
1041 (video::-webkit-media-controls-panel.paused):
1042 (audio::-webkit-media-controls-optimized-fullscreen-button):
1043 (audio::-webkit-media-controls-timeline):
1044 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
1045 (video::-webkit-media-controls-panel-composited-parent): Deleted.
1046 (video::-webkit-media-controls-panel:hover): Deleted.
1048 * Modules/mediacontrols/mediaControlsiOS.js:
1049 (ControllerIOS.prototype.createControls): Create the new background element.
1050 (ControllerIOS.prototype.addControls):
1051 (ControllerIOS.prototype.set pageScaleFactor): Temporarily disable
1052 this because the background disappears when the zoom factor
1053 is too high - we start tiling the background. This will be addressed
1054 by https://bugs.webkit.org/show_bug.cgi?id=142317.
1056 2015-03-05 Myles C. Maxfield <mmaxfield@apple.com>
1058 Mechanical text-related cleanup
1059 https://bugs.webkit.org/show_bug.cgi?id=142326
1061 Reviewed by Andreas Kling.
1063 Use nullptr instead of 0.
1064 Use references instead of pointers.
1066 No new tests because there is no behavior change.
1068 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1069 (WebCore::FontCascade::adjustSelectionRectForComplexText):
1070 (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
1071 (WebCore::FontCascade::floatWidthForComplexText):
1072 (WebCore::FontCascade::offsetForPositionForComplexText):
1073 * platform/graphics/mac/ComplexTextController.cpp:
1074 (WebCore::TextLayout::TextLayout):
1075 (WebCore::ComplexTextController::ComplexTextController):
1076 * platform/graphics/mac/ComplexTextController.h:
1077 * rendering/InlineIterator.h:
1078 (WebCore::InlineIterator::InlineIterator):
1079 (WebCore::InlineIterator::clear):
1080 (WebCore::bidiNextShared):
1081 (WebCore::bidiNextSkippingEmptyInlines):
1082 (WebCore::bidiNextIncludingEmptyInlines):
1083 (WebCore::InlineWalker::InlineWalker):
1084 (WebCore::InlineIterator::increment):
1085 * rendering/RenderBlockLineLayout.cpp:
1086 (WebCore::setLogicalWidthForTextRun):
1087 (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1088 * rendering/line/BreakingContextInlineHeaders.h:
1089 (WebCore::measureHyphenWidth):
1090 (WebCore::textWidth):
1091 (WebCore::tryHyphenating):
1092 (WebCore::BreakingContext::handleText):
1093 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
1095 2015-03-05 Brent Fulgham <bfulgham@apple.com>
1097 Move AxisScrollSnapAnimator logic to ScrollController
1098 https://bugs.webkit.org/show_bug.cgi?id=142293
1099 <rdar://problem/20039867>
1101 Reviewed by Dean Jackson.
1103 No change in function.
1105 Move the animation logic out of 'AxisScrollSnapAnimator' into 'ScrollController'. Rename the remaining
1106 bits of 'AxisScrollSnapAnimator' as 'ScrollSnapAnimatorState'. Remove a number of delegate methods required
1107 by 'AxisScrollSnapAnimatorClient' that are no longer needed.
1109 Also, break up some of the Scroll Snap Point math to be a little easier to understand.
1111 * WebCore.xcodeproj/project.pbxproj: Rename 'platform/mac/AxisScrollSnapAnimator.{h,mm}' -> 'platform/cocoa/ScrollSnapAnimatorState.h'
1112 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Mark 'scrollOffsetOnAxis' as const.
1113 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1114 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Make 'const'
1115 * platform/ScrollAnimator.cpp:
1116 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Make 'const'
1117 * platform/ScrollAnimator.h:
1118 * platform/cocoa/ScrollController.h: No longer subclass from AxisScrollSnapAnimatorClient.
1119 * platform/cocoa/ScrollController.mm:
1120 (WebCore::ScrollController::scrollSnapPointState): Added accessors (const and non-const) for the individual
1121 Scroll Snap State of each axis.
1122 (WebCore::toWheelEventStatus): Moved from AxisScrollSnapAnimator.
1123 (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added helper function containing the snap wheel handler code
1124 from AxisScrollSnapAnimator.
1125 (WebCore::ScrollController::shouldOverrideWheelEvent): Moved from AxisScrollSnapAnimator.
1126 (WebCore::ScrollController::processWheelEventForScrollSnap): Update to use new methods moved from AxisScrollSnapAnimator.
1127 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Update for new ScrollSnapAnimatorState class.
1128 (WebCore::ScrollController::updateScrollSnapPoints): Ditto.
1129 (WebCore::ScrollController::startScrollSnapTimer): Call client (delegate) method.
1130 (WebCore::ScrollController::stopScrollSnapTimer): Ditto.
1131 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Call new 'scrollSnapAnimationUpdate' method passing the
1132 correct axis to animate.
1133 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
1134 (WebCore::ScrollController::scrollSnapAnimationUpdate): Moved from AxisScrollSnapAnimator.
1135 (WebCore::projectedInertialScrollDistance): Moved from AxisScrollSnapAnimator.
1136 (WebCore::ScrollController::initializeGlideParameters): Ditto.
1137 (WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
1138 (WebCore::ScrollController::endScrollSnapAnimation): Ditto.
1139 (WebCore::snapProgress): Created a new function for this calculation to make reasoning about the 'computeSnapDelta' and
1140 'computeGlideDelta' easier.
1141 (WebCore::clampedSnapMagnitude): Ditto.
1142 (WebCore::ScrollController::computeSnapDelta): Moved from AxisScrollSnapAnimator.
1143 (WebCore::snapGlide): Created a new function for this calculation to make reasoning about the 'computeGlideDelta' easier.
1144 (WebCore::ScrollController::computeGlideDelta): Moved from AxisScrollSnapAnimator.
1145 (WebCore::ScrollController::scrollOffsetOnAxis): Deleted.
1146 (WebCore::ScrollController::immediateScrollOnAxis): Deleted.
1147 * platform/cocoa/ScrollSnapAnimatorState.h: Copied from platform/mac/AxisScrollSnapAnimator.h.
1148 (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): Deleted.
1149 * platform/cocoa/ScrollSnapAnimatorState.mm: Copied from platform/mac/AxisScrollSnapAnimator.mm.
1150 (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState):
1151 (WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta):
1152 (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta):
1153 (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow):
1154 (WebCore::toWheelEventStatus): Deleted.
1155 (WebCore::projectedInertialScrollDistance): Deleted.
1156 (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Deleted.
1157 (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Deleted.
1158 (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Deleted.
1159 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Deleted.
1160 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Deleted.
1161 (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): Deleted.
1162 (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Deleted.
1163 (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Deleted.
1164 (WebCore::AxisScrollSnapAnimator::initializeGlideParameters): Deleted.
1165 (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): Deleted.
1166 (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): Deleted.
1167 (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): Deleted.
1168 * platform/mac/AxisScrollSnapAnimator.h: Removed.
1169 * platform/mac/AxisScrollSnapAnimator.mm: Removed.
1170 * platform/mac/ScrollAnimatorMac.h:
1171 * platform/mac/ScrollAnimatorMac.mm:
1172 (WebCore::ScrollAnimatorMac::pinnedInDirection): Removed.
1174 2015-03-04 Dean Jackson <dino@apple.com>
1176 [iOS Media] Small inline controls can clip the time widgets
1177 https://bugs.webkit.org/show_bug.cgi?id=142319
1179 Reviewed by Eric Carlson.
1181 Start counting the number of digits in a duration so that
1182 we can assign classes to the time widgets that specify
1185 * Modules/mediacontrols/mediaControlsApple.css: Replace the hour-long and ten-hour-long
1186 classes with number of digits.
1187 (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
1188 (audio::-webkit-media-controls-current-time-display.five-digit-time):
1189 (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
1190 (audio::-webkit-media-controls-current-time-display.six-digit-time):
1191 (audio::-webkit-media-controls-time-remaining-display.hour-long-time): Deleted.
1192 (audio::-webkit-media-controls-current-time-display.hour-long-time): Deleted.
1193 (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time): Deleted.
1194 (audio::-webkit-media-controls-current-time-display.ten-hour-long-time): Deleted.
1196 * Modules/mediacontrols/mediaControlsApple.js: Add some new class names.
1197 (Controller.prototype.updateDuration): Set the class of the time
1198 widgets when we know how long the media runs.
1200 * Modules/mediacontrols/mediaControlsiOS.css: Values for iOS that
1201 are big enough to avoid clipping.
1202 (video::-webkit-media-controls-current-time-display):
1203 (video::-webkit-media-controls-time-remaining-display):
1204 (video::-webkit-media-controls-current-time-display.three-digit-time):
1205 (video::-webkit-media-controls-time-remaining-display.three-digit-time):
1206 (video::-webkit-media-controls-current-time-display.four-digit-time):
1207 (video::-webkit-media-controls-time-remaining-display.four-digit-time):
1208 (video::-webkit-media-controls-current-time-display.five-digit-time):
1209 (video::-webkit-media-controls-time-remaining-display.five-digit-time):
1210 (video::-webkit-media-controls-current-time-display.six-digit-time):
1211 (video::-webkit-media-controls-time-remaining-display.six-digit-time):
1212 (audio::-webkit-media-controls-timeline-container): Deleted.
1213 (video::-webkit-media-text-track-container): Deleted.
1215 2015-03-05 Csaba Osztrogonác <ossy@webkit.org>
1217 [cmake] Fix the web replay build
1218 https://bugs.webkit.org/show_bug.cgi?id=142331
1220 Reviewed by Gyuyoung Kim.
1223 * inspector/InspectorReplayAgent.cpp:
1224 (WebCore::buildInspectorObjectForSessionState):
1225 (WebCore::buildInspectorObjectForSegmentState):
1227 2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com>
1229 [SOUP] Check TLS errors as soon as they are set in the SoupMessage
1230 https://bugs.webkit.org/show_bug.cgi?id=142244
1232 Reviewed by Sergio Villar Senin.
1234 Connect to the notify::tls-errors signal of SoupMessage to cancel
1235 the load earlier in case of TLS failure, preventing any private
1236 data from being sent to the server before the TLS errors are checked.
1238 * platform/network/soup/ResourceHandleSoup.cpp:
1239 (WebCore::tlsErrorsChangedCallback):
1240 (WebCore::gotHeadersCallback):
1241 (WebCore::createSoupMessageForHandleAndRequest):
1243 2015-03-05 Grzegorz Czajkowski <g.czajkowski@samsung.com>
1245 TextCheckingParagraph::isEmpty() is sufficient to check whether paragraph is empty
1246 https://bugs.webkit.org/show_bug.cgi?id=142276
1248 Reviewed by Darin Adler.
1250 TextCheckingParagraph::isEmpty() already calls TextCheckingParagraph::isRangeEmpty().
1251 There is no need to call them both at the caller site.
1253 No new tests. No behavior change.
1255 * editing/Editor.cpp:
1256 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1259 * editing/TextCheckingHelper.cpp:
1260 (WebCore::TextCheckingParagraph::isEmpty):
1261 Avoid using helepers here to get rid of them as they are
1262 no longer needed outside TextCheckingParagraph.
1264 * editing/TextCheckingHelper.h:
1265 (WebCore::TextCheckingParagraph::isTextEmpty): Deleted.
1266 (WebCore::TextCheckingParagraph::isRangeEmpty): Deleted.
1267 Do not expose isTextEmpty() and isRangeEmpty().
1269 2015-03-04 Simon Fraser <simon.fraser@apple.com>
1271 Clarify RenderElement::adjustStyleDifference()
1272 https://bugs.webkit.org/show_bug.cgi?id=142256
1274 Reviewed by David Hyatt.
1276 Make RenderElement::adjustStyleDifference() clearer in two ways.
1278 First, replace lots of if (diff < X) diff = X with
1279 diff = std::max(diff, X). I did this even in cases where diff was
1280 being set unconditionally, because it's never correct to change the diff
1283 Second the "set at least SimplifiedLayout, but if we have PositionedMovementOnly
1284 set it to SimplifiedLayoutAndPositionedMovement" was confusingly written.
1286 * rendering/RenderElement.cpp:
1287 (WebCore::RenderElement::adjustStyleDifference):
1289 2015-03-04 David Kilzer <ddkilzer@apple.com>
1291 Switch new soft-linking debug asserts to release asserts
1292 <http://webkit.org/b/142176>
1294 Reviewed by Alex Christensen.
1296 * platform/mac/SoftLinking.h:
1297 (SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
1298 (SOFT_LINK_FUNCTION_SOURCE): Ditto.
1299 * platform/win/SoftLinking.h:
1300 (SOFT_LINK_CONSTANT_SOURCE): Ditto.
1301 (SOFT_LINK_FUNCTION_SOURCE): Ditto. Note that this method is
1302 effectively only called once because the function pointer is
1303 replaced after the first time it's called.
1305 2015-03-04 Alex Christensen <achristensen@webkit.org>
1307 Optimize content extensions.
1308 https://bugs.webkit.org/show_bug.cgi?id=142295
1310 Reviewed by Benjamin Poulain.
1312 * contentextensions/ContentExtensionCompiler.cpp:
1313 (WebCore::ContentExtensions::serializeActions):
1314 There is no need to add duplicate sequential actions.
1315 * contentextensions/ContentExtensionRule.h:
1316 (WebCore::ContentExtensions::Action::operator==):
1317 Added to compare actions.
1318 * contentextensions/ContentExtensionsBackend.cpp:
1319 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
1320 Return early if a block action is found instead of moving to the next extension.
1322 2015-03-04 Commit Queue <commit-queue@webkit.org>
1324 Unreviewed, rolling out r181046.
1325 https://bugs.webkit.org/show_bug.cgi?id=142318
1327 Broke two layout tests (Requested by sundiamonde on #webkit).
1331 "Update inline media control icons for OSX."
1332 https://bugs.webkit.org/show_bug.cgi?id=142305
1333 http://trac.webkit.org/changeset/181046
1335 2015-03-04 Timothy Horton <timothy_horton@apple.com>
1337 <attachment> icons are low-resolution when transformed or under page scale
1338 https://bugs.webkit.org/show_bug.cgi?id=142262
1339 <rdar://problem/20035480>
1341 Reviewed by Dean Jackson.
1343 We should use Icon::createIconForFiles, just like <input type="file"> does,
1344 instead of directly talking to IconServices. This results both in less code
1345 and in NSImage's multiresolution magic making the icons sharp even under
1346 the influence of transforms and page scale.
1348 * WebCore.xcodeproj/project.pbxproj:
1349 * platform/spi/mac/IconServicesSPI.h: Removed.
1350 * platform/spi/mac/LaunchServicesSPI.h: Removed.
1351 Get rid of IconServicesSPI.h and LaunchServicesSPI.h.
1353 * platform/graphics/Icon.h:
1354 Include RetainPtr just once.
1355 paint() should take a GraphicsContext reference (null is not an option)
1356 and a FloatRect (after all, it just turns around and converts to NSRect).
1358 * platform/graphics/ios/IconIOS.mm:
1359 (WebCore::Icon::paint):
1360 * platform/graphics/mac/IconMac.mm:
1361 (WebCore::Icon::createIconForFiles):
1362 (WebCore::Icon::paint):
1363 * platform/graphics/efl/IconEfl.cpp:
1364 (WebCore::Icon::paint):
1365 * platform/graphics/gtk/IconGtk.cpp:
1366 (WebCore::Icon::paint):
1367 * platform/graphics/win/IconWin.cpp:
1368 (WebCore::Icon::paint):
1369 Adapt to the paint() signature changes, fix some style, etc.
1371 * rendering/RenderFileUploadControl.cpp:
1372 (WebCore::RenderFileUploadControl::paintObject):
1373 * rendering/RenderThemeIOS.mm:
1374 (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
1375 Adapt to the paint() signature changes.
1377 * rendering/RenderThemeMac.mm:
1378 (WebCore::paintAttachmentIcon):
1379 Use Icon::createIconForFiles instead of IconServices.
1381 2015-03-04 Tim Horton <timothy_horton@apple.com>
1383 <attachment> should not appear selected when the cursor is adjacent to it
1384 https://bugs.webkit.org/show_bug.cgi?id=142311
1385 <rdar://problem/20045862>
1387 Reviewed by Dean Jackson.
1389 * rendering/RenderAttachment.cpp:
1390 (WebCore::RenderAttachment::isSelected): Deleted.
1391 * rendering/RenderAttachment.h:
1392 * rendering/RenderThemeMac.mm:
1393 (WebCore::titleTextColorForAttachment):
1394 (WebCore::RenderThemeMac::paintAttachment):
1395 (WebCore::labelTextColorForAttachment): Deleted.
1396 We were using the wrong (and far too complicated) mechanism to determine
1397 if the attachment is selected (to decide which highlight color to use).
1398 Instead, just check selectionState().
1400 2015-03-04 Timothy Horton <timothy_horton@apple.com>
1402 <attachment> should show the file size as detail text below the icon
1403 https://bugs.webkit.org/show_bug.cgi?id=142261
1404 <rdar://problem/20009570>
1406 Reviewed by Dean Jackson.
1408 Test: fast/attachment/attachment-subtitle.html
1410 * html/HTMLAttachmentElement.cpp:
1411 (WebCore::HTMLAttachmentElement::setFile):
1412 (WebCore::HTMLAttachmentElement::parseAttribute):
1413 * html/HTMLAttachmentElement.h:
1414 Let RenderAttachment know when the subtitle attribute changes.
1416 * html/HTMLAttributeNames.in:
1417 Add a subtitle attribute.
1419 * rendering/RenderAttachment.cpp:
1420 (WebCore::RenderAttachment::invalidate):
1421 (WebCore::RenderAttachment::representedFileChanged): Deleted.
1422 * rendering/RenderAttachment.h:
1423 Rename representedFileChanged to invalidate; it will cause layout and
1424 repaint of the attachment. Mostly for use from HTMLAttachmentElement,
1425 when properties that affect the display and/or intrinsic size change.
1427 * rendering/RenderThemeMac.mm:
1428 (WebCore::attachmentTitleInactiveBackgroundColor):
1429 (WebCore::attachmentTitleInactiveTextColor):
1430 (WebCore::attachmentSubtitleTextColor):
1431 (WebCore::titleTextColorForAttachment):
1432 (WebCore::AttachmentLayout::addTitleLine):
1433 (WebCore::AttachmentLayout::layOutTitle):
1434 (WebCore::AttachmentLayout::layOutSubtitle):
1435 (WebCore::AttachmentLayout::AttachmentLayout):
1436 (WebCore::addAttachmentTitleBackgroundRightCorner):
1437 (WebCore::addAttachmentTitleBackgroundLeftCorner):
1438 (WebCore::paintAttachmentTitleBackground):
1439 (WebCore::paintAttachmentTitle):
1440 (WebCore::paintAttachmentSubtitle):
1441 (WebCore::RenderThemeMac::paintAttachment):
1442 (WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
1443 (WebCore::attachmentLabelInactiveTextColor): Deleted.
1444 (WebCore::labelTextColorForAttachment): Deleted.
1445 (WebCore::AttachmentLayout::addLine): Deleted.
1446 (WebCore::AttachmentLayout::layOutLabel): Deleted.
1447 (WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
1448 (WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
1449 (WebCore::paintAttachmentLabelBackground): Deleted.
1450 (WebCore::paintAttachmentLabel): Deleted.
1451 Rename everything "label" to "title" (except LabelLine, which is not
1452 specifically about the title). We're going to use "title" for the
1453 main text below the icon, and "subtitle" for the secondary text below that.
1455 Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.
1457 Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
1458 the subtitle (below the title, in blue, smaller than the label).
1460 2015-03-04 David Kilzer <ddkilzer@apple.com>
1462 [Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer
1466 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
1467 <http://webkit.org/b/141870>
1469 * platform/cf/CoreMediaSoftLink.cpp:
1470 * platform/cf/CoreMediaSoftLink.h:
1471 - Remove include of <CoreMedia/CoreMedia.h> here. These already
1472 include CoreMediaSPI.h.
1473 * platform/spi/cf/CoreMediaSPI.h:
1474 - Add include of <CoreMedia/CoreMedia.h> here.
1475 - Remove redundant include of <CoreMedia/CMTime.h> for Windows.
1477 2015-03-04 David Kilzer <ddkilzer@apple.com>
1479 [iOS] Fix build with newer clang due to duplicate macro definition
1483 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
1484 <http://webkit.org/b/141870>
1486 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1487 Remove duplicate kCMTimeIndefinite macro.
1489 2015-03-04 Roger Fong <roger_fong@apple.com>
1491 Update inline media control icons for OSX.
1492 https://bugs.webkit.org/show_bug.cgi?id=142305.
1493 <rdar://problem/19997484>
1495 Reviewed by Dean Jackson.
1497 Changes include: new volume button, new full screen button, new play/pause button.
1498 Repositioning of 30 second and play buttons.
1499 * Modules/mediacontrols/mediaControlsApple.css:
1500 (audio::-webkit-media-controls-panel button):
1501 (audio::-webkit-media-controls-rewind-button):
1502 (audio::-webkit-media-controls-play-button):
1503 (audio::-webkit-media-controls-play-button.paused):
1504 (audio::-webkit-media-controls-panel .mute-box):
1505 (video::-webkit-media-controls-volume-max-button):
1506 (video::-webkit-media-controls-volume-min-button):
1507 (audio::-webkit-media-controls-toggle-closed-captions-button):
1508 (audio::-webkit-media-controls-fullscreen-button):
1509 (audio::-webkit-media-controls-current-time-display):
1510 * Modules/mediacontrols/mediaControlsApple.js:
1511 (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
1512 (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
1513 (Controller.prototype.updateVolume): Ditto
1515 2015-03-04 Andy Estes <aestes@apple.com>
1517 [Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
1518 https://bugs.webkit.org/show_bug.cgi?id=142313
1520 Reviewed by Anders Carlsson.
1522 ContentFilterMac.mm no longer contains any Objective-C code, so rename it to ContentFilter.cpp. It is also no longer Mac-specific, so move it up to platform/.
1524 * WebCore.xcodeproj/project.pbxproj:
1525 * platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
1526 * platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.
1528 2015-03-04 Dean Jackson <dino@apple.com>
1530 REGRESSION (r179597): Can't see power saver banner for plugins
1531 https://bugs.webkit.org/show_bug.cgi?id=142312
1532 <rdar://problem/20040517>
1534 Reviewed by Brent Fulgham.
1536 We were being a bit too restrictive when deciding a child
1537 should not create a renderer. All shadow root children
1538 of the snapshotted plugin need one.
1540 * html/HTMLPlugInImageElement.cpp:
1541 (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
1542 Test if we're part of the shadow tree.
1544 2015-03-03 Andy Estes <aestes@apple.com>
1546 [Content Filtering] Make it easier to add new content filters
1547 https://bugs.webkit.org/show_bug.cgi?id=142255
1549 Reviewed by Sam Weinig.
1551 ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
1552 awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
1553 classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
1554 ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
1555 filters and is vended to the rest of the system by ContentFilter::createIfNeeded().
1557 This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
1558 content filter for testing purposes.
1560 * WebCore.xcodeproj/project.pbxproj:
1561 * loader/DocumentLoader.cpp:
1562 (WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
1563 * platform/ContentFilter.h:
1564 (WebCore::ContentFilter::~ContentFilter):
1565 * platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
1566 * platform/cocoa/NetworkExtensionContentFilter.mm: Added.
1567 (WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
1568 (WebCore::NetworkExtensionContentFilter::create): Ditto.
1569 (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
1570 (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
1571 (WebCore::NetworkExtensionContentFilter::addData): Ditto.
1572 (WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
1573 (WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
1574 (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
1575 (WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
1576 (WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
1577 * platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
1578 * platform/cocoa/ParentalControlsContentFilter.mm: Added.
1579 (WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
1580 (WebCore::ParentalControlsContentFilter::create): Ditto.
1581 (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
1582 (WebCore::ParentalControlsContentFilter::addData): Ditto.
1583 (WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
1584 (WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
1585 (WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
1586 (WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
1587 (WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
1588 * platform/mac/ContentFilterMac.mm:
1589 (WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
1590 (WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
1591 (WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
1592 (WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
1593 (WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
1594 (WebCore::ContentFilterCollection::finishedAddingData): Ditto.
1595 (WebCore::ContentFilterCollection::needsMoreData): Ditto.
1596 (WebCore::ContentFilterCollection::didBlockData): Ditto.
1597 (WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
1598 If no filter blocked the load, returned the first filter's replacement data.
1599 (WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
1600 (WebCore::ContentFilter::ContentFilter): Deleted.
1601 (WebCore::ContentFilter::~ContentFilter): Deleted.
1602 (WebCore::ContentFilter::canHandleResponse): Deleted.
1603 (WebCore::ContentFilter::addData): Deleted.
1604 (WebCore::ContentFilter::finishedAddingData): Deleted.
1605 (WebCore::ContentFilter::needsMoreData): Deleted.
1606 (WebCore::ContentFilter::didBlockData): Deleted.
1607 (WebCore::ContentFilter::getReplacementData): Deleted.
1608 (WebCore::ContentFilter::unblockHandler): Deleted.
1610 2015-03-04 David Kilzer <ddkilzer@apple.com>
1612 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
1613 <http://webkit.org/b/141870>
1615 Reviewed by Alex Christensen.
1617 * Configurations/WebCore.unexp:
1618 - Remove all weak symbols for CoreMedia.framework as they should
1621 * Modules/plugins/QuickTimePluginReplacement.mm:
1622 * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
1623 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1624 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1627 * platform/cf/CoreMediaSoftLink.cpp:
1628 * platform/cf/CoreMediaSoftLink.h:
1629 - Add soft-link functions and constants from remaining source
1632 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1633 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1634 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1635 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
1636 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1637 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1638 * platform/mac/PlatformClockCM.mm:
1639 * platform/mediastream/mac/AVMediaCaptureSource.mm:
1640 * platform/mediastream/mac/AVVideoCaptureSource.mm:
1641 - Switch to using CoreMediaSoftLink.h.
1643 * platform/mac/SoftLinking.h:
1644 * platform/win/SoftLinking.h:
1645 - Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
1646 macros since it won't work with const structs.
1648 * platform/spi/cf/CoreMediaSPI.h:
1649 - Add SPI declarations for Windows originally from
1650 InbandTextTrackPrivateAVF.cpp.
1652 2015-03-04 Commit Queue <commit-queue@webkit.org>
1654 Unreviewed, rolling out r181001 and r181003.
1655 https://bugs.webkit.org/show_bug.cgi?id=142307
1657 Broke many tests (Requested by ap on #webkit).
1659 Reverted changesets:
1661 "Make JavaScript binding get and set legacy event listener
1662 attributes directly"
1663 https://bugs.webkit.org/show_bug.cgi?id=142282
1664 http://trac.webkit.org/changeset/181001
1666 "Update bindings tests after r181001."
1667 http://trac.webkit.org/changeset/181003
1669 2015-03-04 Roger Fong <roger_fong@apple.com>
1671 Update elapsed/remaining time displays on media inline controls on OSX.
1672 https://bugs.webkit.org/show_bug.cgi?id=142264.
1673 <rdar://problem/19997487>
1675 Reviewed by Dean Jackson.
1677 Div surrounding times are set widths. A larger width is used for times that are
1678 an hour or longer. Time elapsed is right justified. Time remaining is left justified.
1679 Times are displayed in 11pt Helvetica Neue.
1680 * Modules/mediacontrols/mediaControlsApple.css:
1681 (audio::-webkit-media-controls-time-remaining-display):
1682 (audio::-webkit-media-controls-current-time-display):
1683 (audio::-webkit-media-controls-time-remaining-display.hour-long-time):
1684 (audio::-webkit-media-controls-current-time-display.hour-long-time):
1685 (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
1686 (audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
1687 * Modules/mediacontrols/mediaControlsApple.js:
1688 (Controller.prototype.updateDuration):
1690 2015-03-04 Myles C. Maxfield <mmaxfield@apple.com>
1692 Implement -apple-trailing-word: -apple-partially-balanced
1693 https://bugs.webkit.org/show_bug.cgi?id=142253
1695 Reviewed by David Hyatt.
1697 This patch implements a history mechanism for line breaking. In particular, this patch partitions
1698 the updates to the current line breaking location into two kinds: conceptually new breaking locations,
1699 and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
1700 to a maximum number of remembered locations.
1702 The patch then uses this memory to change the line-breaking selection based on the rules of
1703 -apple-trailing-word.
1705 Test: fast/text/trailing-word.html
1707 * rendering/line/BreakingContextInlineHeaders.h:
1708 Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
1709 are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
1710 (WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
1711 (WebCore::BreakingContext::lineBreak): Ditto.
1712 (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
1713 (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
1714 (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
1716 (WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
1717 (WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
1718 (WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
1719 (WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
1720 (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator): Ditto
1721 (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
1722 (WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
1723 (WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
1724 (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
1725 (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
1726 (WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
1727 (WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
1728 (WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
1729 (WebCore::BreakingContext::handleFloat): Ditto
1730 (WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
1731 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
1732 (WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
1733 (WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
1734 optimalLineBreakLocationForTrailingWord().
1735 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
1736 locations and choose the optimal one.
1737 (WebCore::BreakingContext::lineBreakRef): Deleted.
1739 2015-03-04 Timothy Horton <timothy_horton@apple.com>
1741 <attachment> title text disappears when dragging
1742 https://bugs.webkit.org/show_bug.cgi?id=142263
1743 <rdar://problem/20035515>
1745 Reviewed by Sam Weinig.
1747 * rendering/RenderThemeMac.mm:
1748 (WebCore::RenderThemeMac::paintAttachment):
1749 We use NSColors with CoreText, which requires that Cocoa knows the current
1750 CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
1751 Otherwise, sometimes (especially when dragging), it will try to apply the
1752 text foreground color to a null context, complain to the system log, and fail
1755 2015-03-04 Jer Noble <jer.noble@apple.com>
1757 [Mac] YouTube playback at 1.5x speed has audible distortion
1758 https://bugs.webkit.org/show_bug.cgi?id=142280
1760 Reviewed by Eric Carlson.
1762 Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the
1763 AVSampleBufferAudioRenderer rather than its default value of
1764 AVAudioTimePitchAlgorithmTimeDomain.
1768 Might as well add support for MediaPlayer::setPreservesPitch() while we're
1769 changing the audio pitch algorithm. If preservesPitch() is false use the
1770 AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
1771 (MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).
1773 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1774 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1775 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
1776 (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
1777 (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
1778 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1779 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1780 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
1781 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1783 2015-03-04 Jer Noble <jer.noble@apple.com>
1785 [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
1786 https://bugs.webkit.org/show_bug.cgi?id=142285
1788 Reviewed by Eric Carlson.
1790 When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
1791 underlying AVStreamSession is invalidated, the decryption context for in-flight
1792 CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
1793 one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
1794 the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
1795 asynchronously the next time the layer needs new samples.
1797 Add a workaround until framework-level support lands to fully flush enqueued and
1800 When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
1801 check to see if the session has been stopped. If so, and if the error in question is
1802 one that indicates that the samples decryption context has been invalidated, suppress
1803 the error and instruct the sender to suppress the error as well. This workaround will
1804 be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>
1806 Still, we'll make our best effort to flush undisplayed frames when our CDM session is
1807 invalidated. Move away from std::map and instead use HashMap to store the set of
1808 AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
1809 the HashMap's set of values.
1811 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1812 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1813 (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
1814 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
1815 error code and bail before issuing the error.
1816 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
1817 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1818 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1819 (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
1820 the layer is in the set of listened-to layers only back in the main thread; the
1821 listnener may have been unregistered by the time the main thread was called.
1822 (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
1823 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
1824 (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
1825 (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
1826 (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
1827 (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
1828 (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
1829 (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
1830 layers and audio renderers.
1831 (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
1832 asked to ignore the error, and if so, bail.
1833 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.
1835 2015-03-04 Alex Christensen <achristensen@webkit.org>
1837 Update bindings tests after r181001.
1839 * bindings/scripts/test/JS/*.cpp:
1840 Class names changed to auto.
1842 2015-03-04 Brent Fulgham <bfulgham@apple.com>
1844 [Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
1845 https://bugs.webkit.org/show_bug.cgi?id=142284
1847 Reviewed by David Kilzer.
1849 Make DerivedSources.make understand its build dependency on FeatureDefines.props
1850 when building on Windows:
1851 1. Modify DerivedSources.make to declare a default dependency (on Windows)
1852 to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
1853 2. Update the Windows script 'build-generated-files.pl' to specify the correct
1854 FeatureDefines{Cairo}.props value to use, depending on build environment.
1856 * DerivedSources.make:
1857 * WebCore.vcxproj/build-generated-files.pl:
1859 2015-03-04 Darin Adler <darin@apple.com>
1861 Make JavaScript binding get and set legacy event listener attributes directly
1862 https://bugs.webkit.org/show_bug.cgi?id=142282
1864 Reviewed by Sam Weinig.
1866 Test: fast/dom/legacy-event-handler-attributes.html
1868 This patch changes the JavaScript getters and setters for these attributes
1869 to work directly without requiring any functions in the C++ DOM implementation.
1870 A subsequent patch will remove the now-unused C++ DOM implementation.
1872 * bindings/js/JSEventListener.cpp:
1873 (WebCore::legacyEventListenerAttribute): Added.
1874 (WebCore::createEventListenerForLegacyAttribute): Added.
1875 (WebCore::setLegacyEventListenerAttribute): Added.
1876 (WebCore::legacyWindowEventListenerAttribute): Added.
1877 (WebCore::setLegacyWindowEventListenerAttribute): Added.
1879 * bindings/js/JSEventListener.h:
1880 (WebCore::createJSEventListenerForAttribute): Deleted.
1882 * bindings/scripts/CodeGeneratorJS.pm:
1883 (GenerateAttributeEventListenerCall): Deleted.
1884 (LegacyEventListenerAttributeEventName): Added.
1885 (LegacyEventListenerAttributePrefix): Added.
1886 (GenerateImplementation): Use "auto" in lots of places to simplify the code
1887 generation. Replaced the old inlined code to deal with legacy event listener
1888 attributes with code that simply calls the new functions from JSEventLister.h.
1889 (GenerateCallWith): Use "auto".
1890 (GenerateConstructorDefinition): Ditto.
1892 2015-03-03 Sam Weinig <sam@webkit.org>
1894 [Content Extensions] Split parsing and compiling of content extensions into their own files
1895 https://bugs.webkit.org/show_bug.cgi?id=142259
1897 Reviewed by Anders Carlsson.
1899 Added new unit test:
1900 ContentFilterTest.Basic
1902 * WebCore.xcodeproj/project.pbxproj:
1903 Add new files (CompiledContentExtension.h/cpp, ContentExtensionCompiler.h/cpp, and ContentExtensionParser.h/cpp)
1905 * contentextensions/CompiledContentExtension.cpp: Added.
1906 * contentextensions/CompiledContentExtension.h: Added.
1907 Add new class for holding onto the compiled content extension itself. Make it ThreadSafeRefCounted so it is easy
1908 to move between threads which will be important in a subsequent patch where we enable compilation on a background
1911 * contentextensions/ContentExtensionCompiler.cpp: Added.
1912 (WebCore::ContentExtensions::serializeActions):
1913 (WebCore::ContentExtensions::compileRuleList):
1914 * contentextensions/ContentExtensionCompiler.h: Added.
1915 Moving compilation to its own file. Was previously in ContentExtensionsBackend. This is necessary because
1916 we will want to be able to compile without the need of a backend.
1918 * contentextensions/ContentExtensionParser.cpp: Copied from contentextensions/ContentExtensionsManager.cpp.
1919 * contentextensions/ContentExtensionParser.h: Copied from contentextensions/ContentExtensionsManager.h.
1920 Renamed ContentExtensionsManager to ContentExtensionParser, since that is all it is doing.
1922 * contentextensions/ContentExtensionsBackend.cpp:
1923 (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
1924 (WebCore::ContentExtensions::ContentExtensionsBackend::removeContentExtension):
1925 (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllContentExtensions):
1926 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
1927 (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions): Deleted.
1928 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList): Deleted.
1929 (WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList): Deleted.
1930 (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists): Deleted.
1931 * contentextensions/ContentExtensionsBackend.h:
1932 Change the backend to use the new CompiledContentExtension and change the terminology to
1933 reference content extensions, rather than rule lists.
1935 * page/UserContentController.cpp:
1936 (WebCore::UserContentController::addUserContentFilter):
1937 (WebCore::UserContentController::removeUserContentFilter):
1938 (WebCore::UserContentController::removeAllUserContentFilters):
1939 Update for new names and change addUserContentFilter to explicitly compile the JSON
1940 rule list before handing it to the backend. In subsequent changes, addUserContentFilter
1941 should be changed to take the compiled content extension, and it should become the responsibility
1942 of the called (WebKit) to create them.
1944 2015-03-04 Philippe Normand <pnormand@igalia.com>
1946 [GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
1947 https://bugs.webkit.org/show_bug.cgi?id=142274
1949 Reviewed by Carlos Garcia Campos.
1951 Don't handle scheduling queries if building against versions of
1952 GStreamer older than 1.2.0.
1954 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1955 (webKitWebSrcQueryWithParent):
1957 2015-03-03 Yoav Weiss <yoav@yoav.ws>
1959 Add a microtask abstraction
1960 https://bugs.webkit.org/show_bug.cgi?id=137496
1962 Reviewed by Sam Weinig.
1964 This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
1965 That abstraction is required in order to enable async loading of images,
1966 which is in turn required to enable support for the picture element, as well as
1967 to make sure that the order of properties set on HTMLImageElement has no implications.
1969 A similar patch was rolled back in r180914. This patch is an improved version.
1971 * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
1972 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
1973 * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
1974 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
1975 * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
1976 * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
1977 * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
1978 (WebCore::MicroTask::~MicroTask):
1979 (WebCore::MicroTask::run): Run the microtask.
1980 * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
1981 (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
1982 (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
1983 (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
1984 * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
1985 (WebCore::ScriptRunner::timerFired):
1986 * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
1987 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1988 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1989 (WebCore::HTMLScriptRunner::runScript):
1990 * testing/Internals.cpp: Add a method to queue a test microtask.
1991 (WebCore::Internals::queueMicroTask):
1992 * testing/Internals.h: Add a method to queue a test microtask.
1993 (WebCore::Internals::queueMicroTask):
1994 * testing/Internals.idl: Expose test microtask queueing to test JS.
1995 * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
1996 (WebCore::MicroTaskTest::run): Run the microtask
1997 (WebCore::MicroTaskTest::create): Create a test microtask.
1998 * testing/MicroTaskTest.h: Add a test class that implements a microtask.
1999 (WebCore::MicroTaskTest::run):
2000 (WebCore::MicroTaskTest::create):
2002 2015-03-03 Brent Fulgham <bfulgham@apple.com>
2004 Scroll snap points are not supported on the main frame
2005 https://bugs.webkit.org/show_bug.cgi?id=141973
2006 <rdar://problem/19938393>
2008 Reviewed by Simon Fraser.
2010 No new tests. Tests will be added when the animation behavior is finalized. Manual tests are attached to the bug.
2012 Update the ScrollingTreeFrameScrollingNodeMac class to implement the delegate interface needed by the
2013 ScrollController. This involves the following:
2014 1. Implement scrollOffsetOnAxis: Used by the AxisScrollAnimator to determine the current position of the ScrollableArea.
2015 2. Implement immediateScrollOnAxis: Used by the AxisScrollAnimator to scroll the ScrollableArea
2017 We also need to hold a copy of the snap points vector to send to the scrolling thread.
2019 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2020 (WebCore::convertToLayoutUnits): Added helper function to match Scroll Snap Points API.
2021 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Recognize and react to changes to
2022 Scroll Snap Points on top-level frames.
2023 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Implement delegate method needed by the ScrollController.
2024 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
2025 * platform/cocoa/ScrollController.h:
2026 * platform/cocoa/ScrollController.mm:
2027 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Pass snap offsets to AxisScrollSnapAnimator constructor as references.
2028 (WebCore::ScrollController::updateScrollSnapPoints): Added. Used by ScrollingTreeFrameScrollingNodeMac to update scroll snap point
2029 settings in the scrolling thread.
2030 * platform/mac/AxisScrollSnapAnimator.h:
2031 * platform/mac/AxisScrollSnapAnimator.mm:
2032 (WebCore::toWheelEventStatus): Don't ignore the "MayBegin" or "Cancelled" event phases.
2033 (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Revise signature to take a reference to the layout units.
2034 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Handle the case where this method gets called from a thread
2035 when the scrollable area has already reached its final destination.
2036 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Handle the possibility that the snap offset point vector might be
2037 empty. Update method to account for m_snapOffsets being a value, instead of a pointer.
2039 2015-03-03 Andy Estes <aestes@apple.com>
2041 [Content Filtering] Separate unblock handling into its own class
2042 https://bugs.webkit.org/show_bug.cgi?id=142251
2044 Reviewed by Andreas Kling.
2046 Unblock handling is currently supported only for one type of content filter (WebFilterEvaluator) on one
2047 platform (iOS). Having its implementation in ContentFilter is making it difficult to support other filters and
2048 platforms, so let's separate unblock handling into its own class called ContentFilterUnblockHandler.
2050 * WebCore.xcodeproj/project.pbxproj:
2051 * loader/DocumentLoader.cpp:
2052 (WebCore::DocumentLoader::finishedLoading): Passed a ContentFilterUnblockHandler to FrameLoaderClient::contentFilterDidBlockLoad.
2053 (WebCore::DocumentLoader::dataReceived): Ditto.
2054 * loader/FrameLoaderClient.h:
2055 * platform/ContentFilter.h:
2056 * platform/ContentFilterUnblockHandler.h: Copied from Source/WebCore/platform/ios/ContentFilterIOS.mm.
2057 (WebCore::ContentFilterUnblockHandler::clear):
2058 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: Renamed from Source/WebCore/platform/ios/ContentFilterIOS.mm.
2059 (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
2060 (WebCore::ContentFilterUnblockHandler::encode):
2061 (WebCore::ContentFilterUnblockHandler::decode):
2063 (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful):
2064 * platform/mac/ContentFilterMac.mm:
2065 (WebCore::ContentFilter::unblockHandler):
2066 (WebCore::ContentFilter::ContentFilter): Deleted.
2067 (WebCore::ContentFilter::encode): Deleted.
2068 (WebCore::ContentFilter::decode): Deleted.
2070 2015-03-03 Alexey Proskuryakov <ap@apple.com>
2072 [Mac] Track localized name follows locale instead of primary language
2073 https://bugs.webkit.org/show_bug.cgi?id=142242
2074 rdar://problem/20000365
2076 Reviewed by Eric Carlson.
2078 * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
2079 language for localization, as CFBundle does.
2081 2015-03-03 Alex Christensen <achristensen@webkit.org>
2083 [Win] Unreviewed build fix.
2085 * WebCore.vcxproj/WebCoreIncludeCommon.props:
2086 Include contentextensions subdirectory.
2088 2015-03-03 Alex Christensen <achristensen@webkit.org>
2090 Prepare to use CSS selectors in content extensions.
2091 https://bugs.webkit.org/show_bug.cgi?id=142227
2093 Reviewed by Benjamin Poulain.
2095 Test: http/tests/usercontentfilter/css-display-none.html
2098 * WebCore.xcodeproj/project.pbxproj:
2099 * contentextensions/ContentExtensionActions.h: Added.
2100 * contentextensions/ContentExtensionRule.cpp:
2101 (WebCore::ContentExtensions::Action::deserialize):
2102 * contentextensions/ContentExtensionRule.h:
2103 (WebCore::ContentExtensions::Action::Action):
2104 (WebCore::ContentExtensions::Action::type):
2105 (WebCore::ContentExtensions::Action::cssSelector):
2106 * contentextensions/ContentExtensionsBackend.cpp:
2107 (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions):
2108 Put action descriptions into a compact format in a Vector
2109 to be able to be put into one block of shared read-only memory.
2110 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2111 Put an index of the beginning of the description into the NFA instead of the index of the rule
2112 because we will be sharing the descriptions of the actions and not the rules.
2113 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
2114 (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL): Deleted.
2115 Return a vector of actions to be able to do multiple actions for one URL.
2116 * contentextensions/ContentExtensionsBackend.h:
2117 * contentextensions/ContentExtensionsManager.cpp:
2118 (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
2119 (WebCore::ContentExtensions::ExtensionsManager::loadAction):
2120 Added the css-display-none action type, which requires a selector.
2121 (WebCore::ContentExtensions::ExtensionsManager::loadRule):
2122 * loader/cache/CachedResourceLoader.cpp:
2123 (WebCore::CachedResourceLoader::requestResource):
2124 * page/UserContentController.cpp:
2125 (WebCore::UserContentController::actionsForURL):
2126 (WebCore::UserContentController::actionForURL): Deleted.
2127 * page/UserContentController.h:
2129 2015-03-03 Brent Fulgham <bfulgham@apple.com>
2131 Move scroll animating functions from ScrollAnimator to ScrollController
2132 https://bugs.webkit.org/show_bug.cgi?id=142102
2133 <rdar://problem/20007161>
2135 Reviewed by Simon Fraser.
2137 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html.
2139 Do some refactoring of the various scrolling classes:
2140 1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
2141 and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
2142 2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
2143 3. Move code from ScrollAnimator{Mac} -> ScrollController.
2144 4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
2145 5. Rename immediateScrollInAxis -> immediateScrollOnAxis
2147 * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
2148 * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
2149 events, just as is done for the "event not handled" case in EventHandler.cpp.
2150 (WebCore::EventHandler::platformCompleteWheelEvent):
2151 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
2152 methods, now that ScrollController is controlling this state.
2153 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2154 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
2155 need to clean up the CFRunLoopTimer.
2156 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Make sure scroll
2157 state is updated after rubber band snap.
2158 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
2159 until Bug1973 is completed.).
2160 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
2161 (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
2162 * platform/ScrollAnimator.cpp:
2163 (WebCore::ScrollAnimator::ScrollAnimator):
2164 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
2165 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
2166 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
2167 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
2168 (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
2169 (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
2170 (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
2171 (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
2172 (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
2173 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
2174 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
2175 * platform/ScrollAnimator.h:
2176 * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
2177 (WebCore::ScrollControllerClient::startSnapRubberbandTimer):
2178 (WebCore::ScrollControllerClient::stopSnapRubberbandTimer):
2179 (WebCore::ScrollControllerClient::startScrollSnapTimer):
2180 (WebCore::ScrollControllerClient::stopScrollSnapTimer):
2181 * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
2182 (WebCore::ScrollController::ScrollController): Update to initialize new timers.
2183 (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
2184 (WebCore::ScrollController::startSnapRubberbandTimer): Added.
2185 (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
2186 require client to maintain timers.
2187 (WebCore::ScrollController::snapRubberBand): Ditto.
2188 (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
2189 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
2190 (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
2191 (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
2192 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
2193 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
2194 (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
2195 (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
2196 * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
2197 * platform/mac/AxisScrollSnapAnimator.mm:
2198 (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Update for 'InAxis' to 'OnAxis' renaming.
2199 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Ditto.
2200 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Ditto.
2201 (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Ditto.
2202 (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Ditto.
2203 * platform/mac/ScrollAnimatorMac.h:
2204 * platform/mac/ScrollAnimatorMac.mm:
2205 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
2206 controlled in the ScrollController)
2207 (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
2208 (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
2209 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
2210 * platform/mac/ScrollController.h: Removed.
2211 * platform/mac/ScrollController.mm: Removed.
2213 2015-03-03 Commit Queue <commit-queue@webkit.org>
2215 Unreviewed, rolling out r180683.
2216 https://bugs.webkit.org/show_bug.cgi?id=142249
2218 Broke fast/css/acid2-pixel.html (Requested by ap on #webkit).
2222 "Setting any of the <object> element plugin controlling
2223 attributes does not have any affect."
2224 https://bugs.webkit.org/show_bug.cgi?id=141936
2225 http://trac.webkit.org/changeset/180683
2227 2015-03-03 Dean Jackson <dino@apple.com>
2229 Controls panel should have system blurry background
2230 https://bugs.webkit.org/show_bug.cgi?id=142154
2231 <rdar://problem/20000964>
2233 Reviewed by Simon Fraser.
2235 In order to replicate the system style of media controls
2236 on OS X and iOS, we need to expose a special -webkit-appearance.
2237 This patch adds the new property value, and implements
2238 the iOS part of the appearance, which is a blurry shaded
2241 Test: compositing/media-controls-bar-appearance.html
2243 * css/CSSPrimitiveValueMappings.h:
2244 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the new
2245 keywords from ControlParts.
2247 * css/CSSValueKeywords.in: Add media-controls-light-bar-background
2248 and media-controls-dark-bar-background. Darin suggested they
2249 be sorted, so I did this at the same time.
2250 * platform/ThemeTypes.h: New ControlParts for the values, and
2251 sort the values since they need to be in sync with
2252 CSSValueKeywords.in.
2254 * platform/graphics/GraphicsLayer.h: Expose two new custom appearance
2256 * platform/graphics/ca/GraphicsLayerCA.cpp:
2257 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2258 (WebCore::layerTypeForCustomBackdropAppearance): Helper function.
2259 (WebCore::isCustomBackdropLayerType): Ditto.
2260 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Merge setting
2261 a system backdrop layer in with the code that swaps to/from tiled layers.
2262 (WebCore::GraphicsLayerCA::changeLayerTypeTo): New method that does what
2263 swapFromOrToTiledLayer implemented, but also allows us to change to a
2264 system backdrop layer.
2265 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Deleted.
2266 * platform/graphics/ca/GraphicsLayerCA.h:
2268 * platform/graphics/ca/PlatformCALayer.h: New layer types.
2269 * platform/graphics/ca/mac/PlatformCALayerMac.mm: For now expose these
2270 as regular backdrop layers.
2271 (PlatformCALayerMac::PlatformCALayerMac):
2272 (PlatformCALayerMac::updateCustomAppearance):
2274 * rendering/RenderLayerBacking.cpp:
2275 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Make sure to update
2277 (WebCore::RenderLayerBacking::updateCustomAppearance): New method.
2278 * rendering/RenderLayerBacking.h:
2280 2015-03-03 Chris Dumez <cdumez@apple.com>
2282 Access ApplicationCacheStorage global instance via singleton() static member function
2283 https://bugs.webkit.org/show_bug.cgi?id=142239
2285 Reviewed by Anders Carlsson.
2287 Access ApplicationCacheStorage global instance via singleton() static
2288 member function as per WebKit coding style.
2290 2015-03-03 Anders Carlsson <andersca@apple.com>
2292 Try to fix the build.
2294 * platform/spi/cf/CFNetworkSPI.h:
2296 2015-03-03 Timothy Horton <timothy_horton@apple.com>
2298 <attachment> label can get very wide, doesn't wrap/truncate
2299 https://bugs.webkit.org/show_bug.cgi?id=142214
2300 <rdar://problem/19982499>
2302 Reviewed by Simon Fraser.
2304 Test: fast/attachment/attachment-label-highlight.html
2306 * rendering/RenderThemeMac.h:
2307 * rendering/RenderThemeMac.mm:
2308 (WebCore::labelTextColorForAttachment):
2309 (WebCore::AttachmentLayout::addLine):
2310 (WebCore::AttachmentLayout::layOutText):
2311 (WebCore::AttachmentLayout::AttachmentLayout):
2312 Make it possible to lay out multiple lines of label text.
2313 We lay out the whole string normally, but then only draw N (where N=1 for now,
2314 but is adjustable) of the lines. The remainder of the string is then
2315 merged into a single line, which is middle-truncated with an ellipsis
2316 and drawn in place of the N+1 line.
2318 (WebCore::addAttachmentLabelBackgroundRightCorner):
2319 (WebCore::addAttachmentLabelBackgroundLeftCorner):
2320 (WebCore::paintAttachmentLabelBackground):
2321 Wrap the label background around the multiple lines of text with curved edges.
2322 We run first down the right side of the label, determining whether to use
2323 concave or convex arcs based on the relative widths of adjacent lines.
2324 Then, we run back up the left side of the label doing the same thing.
2326 If the background rects of two lines are very similar (within the rounded rect radius),
2327 they will be expanded to the larger of the two, because otherwise the arcs
2330 (WebCore::paintAttachmentLabel):
2331 Draw the label with CoreText directly instead of bothering with WebCore
2332 text layout primitives. There's no need, and it makes wrapping much more complicated.
2334 (WebCore::RenderThemeMac::paintAttachment):
2335 (WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
2336 (WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.
2338 2015-03-03 Simon Fraser <simon.fraser@apple.com>
2340 Avoid applying the clip-path when painting, if a layer also has a shape layer mask
2341 https://bugs.webkit.org/show_bug.cgi?id=142212
2343 Reviewed by Zalan Bujtas.
2345 After r180882 we translate clip-path into a composited shape mask when the layer
2346 is composited. However, we were also still applying the clip-path when painting
2349 Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
2350 only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
2351 and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
2352 rather than always. To ensure that masks and clip-path get applied for software paints,
2353 add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
2354 and when doing a flattening paint.
2356 * rendering/RenderLayer.cpp:
2357 (WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
2358 Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
2359 The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
2360 only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
2361 the clipped area for us.
2362 (WebCore::RenderLayer::calculateClipRects):
2363 (WebCore::RenderLayer::paintsWithClipPath): Deleted.
2364 * rendering/RenderLayer.h:
2365 * rendering/RenderLayerBacking.cpp:
2366 (WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
2367 when having a mask forces us onto the painting path.
2369 2015-03-03 Anders Carlsson <andersca@apple.com>
2371 Use the correct display name for website data for local files
2372 https://bugs.webkit.org/show_bug.cgi?id=142228
2374 Reviewed by Dan Bernstein.
2376 * English.lproj/Localizable.strings:
2377 Add local file display name.
2379 * platform/spi/cf/CFNetworkSPI.h:
2380 Add kCFHTTPCookieLocalFileDomain declaration.
2382 2015-03-03 Myles C. Maxfield <mmaxfield@apple.com>
2384 BreakingContext cleanup
2385 https://bugs.webkit.org/show_bug.cgi?id=142146
2387 Reviewed by Dean Jackson.
2389 1. Use commitLineBreakAtCurrentWidth() instead of directly
2390 updating m_width and m_lineBreak, because the name makes the
2392 2. Remove duplicate function LineBreaker::nextSegmentBreak().
2393 3. lineStyle() takes care of inspecting RenderText's parent's
2395 4. Add FIXME to BreakingContext::initializeForCurrentObject()
2396 because it seems like we are ignoring first-line style for
2399 No new tests because there is no behavior change.
2401 * rendering/line/BreakingContextInlineHeaders.h:
2402 (WebCore::BreakingContext::BreakingContext):
2403 (WebCore::BreakingContext::initializeForCurrentObject):
2404 (WebCore::BreakingContext::handleReplaced):
2405 (WebCore::BreakingContext::handleText):
2406 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2407 (WebCore::BreakingContext::handleEndOfLine):
2408 * rendering/line/LineBreaker.cpp:
2409 (WebCore::LineBreaker::nextLineBreak): Deleted.
2410 (WebCore::LineBreaker::nextSegmentBreak): Deleted.
2411 * rendering/line/LineBreaker.h:
2412 * rendering/line/LineInlineHeaders.h:
2413 (WebCore::lineStyle):
2415 2015-03-03 Chris Dumez <cdumez@apple.com>
2417 Make AudioContext suspendable when it is not rendering
2418 https://bugs.webkit.org/show_bug.cgi?id=142210
2419 <rdar://problem/19923085>
2421 Reviewed by Eric Carlson.
2423 Make AudioContext suspendable when it is not rendering to increase the
2424 likelihood of entering the PageCache for pages using WebAudio.
2426 This patch adds a state member to AudioContext with 3 possible states:
2427 Suspended / Running / Closed, as defined in the specification:
2428 http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
2430 This state is used to decide if we can suspend the page or not. We
2431 can safely suspend if the AudioContext's state is suspended (did not
2432 start rendering) or closed (Stopped rendering).
2434 Note that this patch does not expose the AudioContext's state to the
2435 Web yet, even though it is exposed in the latest specification.
2437 Tests: fast/history/page-cache-closed-audiocontext.html
2438 fast/history/page-cache-running-audiocontext.html
2439 fast/history/page-cache-suspended-audiocontext.html
2441 * Modules/webaudio/AudioContext.cpp:
2442 (WebCore::AudioContext::AudioContext):
2443 (WebCore::AudioContext::uninitialize):
2444 (WebCore::AudioContext::canSuspend):
2445 (WebCore::AudioContext::startRendering):
2446 (WebCore::AudioContext::fireCompletionEvent):
2447 * Modules/webaudio/AudioContext.h:
2449 2015-03-02 Carlos Garcia Campos <cgarcia@igalia.com>
2451 [SOUP] Use SoupMessage::starting instead of SoupSession::request-started
2452 https://bugs.webkit.org/show_bug.cgi?id=142164
2454 Reviewed by Sergio Villar Senin.
2456 SoupSession::request-started is deprecated in libsoup 2.50. Both
2457 signals are equivalent, but SoupMessage::starting is also emitted
2458 for resources loaded from the disk cache. This fixes web timing
2459 calculations for cached resources, since we were not initializing
2462 * platform/network/soup/ResourceHandleSoup.cpp:
2463 (WebCore::startingCallback):
2464 (WebCore::createSoupMessageForHandleAndRequest):
2465 * platform/network/soup/SoupNetworkSession.cpp:
2466 (WebCore::SoupNetworkSession::SoupNetworkSession):
2468 2015-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
2470 [SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
2471 https://bugs.webkit.org/show_bug.cgi?id=141508
2473 Reviewed by Sergio Villar Senin.
2475 Use SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag when loading a
2476 synchronous message instead of increasing the maximum number of
2477 connections allowed if the soup version is recent enough.
2478 The current solution of increasing/decreasing the limits doesn't
2479 always work, because connections are not marked as IDLE in libsoup
2480 until the message is unqueued, but we don't wait for the message
2481 to be unqueued to finish our loads in WebKit, we finish them as
2482 soon as we have finished reading the stream. This causes that
2483 synchronous loads keep blocked in the nested main loop until the
2484 timeout of 10 seconds is fired and the load fails.
2485 Also marked WebCoreSynchronousLoader class as final, the virtual
2486 methods as override and removed the unsused method isSynchronousClient.
2488 * platform/network/soup/ResourceHandleSoup.cpp:
2489 (WebCore::createSoupMessageForHandleAndRequest):
2490 (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2491 (WebCore::WebCoreSynchronousLoader::isSynchronousClient): Deleted.
2492 (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
2493 (WebCore::WebCoreSynchronousLoader::didReceiveData):
2494 (WebCore::WebCoreSynchronousLoader::didReceiveBuffer):
2495 (WebCore::WebCoreSynchronousLoader::didFinishLoading):
2496 (WebCore::WebCoreSynchronousLoader::didFail):
2497 (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
2498 (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
2500 2015-03-02 David Kilzer <ddkilzer@apple.com>
2502 [iOS] Disable -Wdeprecated-declaration warnings in WebVideoFullscreenInterfaceAVKit.mm
2504 Fixing the deprecations is tracked by: <rdar://problem/20018692>
2506 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2507 (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized):
2508 Ignore -Wdeprecated-declaration warnings via clang pragmas.
2510 2015-03-02 Commit Queue <commit-queue@webkit.org>
2512 Unreviewed, rolling out r180902.
2513 https://bugs.webkit.org/show_bug.cgi?id=142205
2515 It broke scrolling in some cases. See bug 142202 for details.
2516 (Requested by bdash on #webkit).
2520 "Move scroll animating functions from ScrollAnimator to
2522 https://bugs.webkit.org/show_bug.cgi?id=142102
2523 http://trac.webkit.org/changeset/180902
2525 2015-03-02 Commit Queue <commit-queue@webkit.org>
2527 Unreviewed, rolling out r180911.
2528 https://bugs.webkit.org/show_bug.cgi?id=142204
2530 The tests it added are crashing (Requested by bdash on
2535 "Add a microtask abstraction"
2536 https://bugs.webkit.org/show_bug.cgi?id=137496
2537 http://trac.webkit.org/changeset/180911
2539 2015-03-02 Yoav Weiss <yoav@yoav.ws>
2541 Add a microtask abstraction
2542 https://bugs.webkit.org/show_bug.cgi?id=137496
2544 Reviewed by Sam Weinig.
2546 This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
2547 That abstraction is required in order to enable async loading of images,
2548 which is in turn required to enable support for the picture element, as well as
2549 to make sure that the order of properties set on HTMLImageElement has no implications.
2551 * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
2552 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
2553 * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
2554 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
2555 * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
2556 * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
2557 * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
2558 (WebCore::MicroTask::~MicroTask):
2559 (WebCore::MicroTask::run): Run the microtask.
2560 * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
2561 (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
2562 (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
2563 (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
2564 * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
2565 (WebCore::ScriptRunner::timerFired):
2566 * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
2567 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
2568 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
2569 (WebCore::HTMLScriptRunner::runScript):
2570 * testing/Internals.cpp: Add a method to queue a test microtask.
2571 (WebCore::Internals::queueMicroTask):
2572 * testing/Internals.h: Add a method to queue a test microtask.
2573 (WebCore::Internals::queueMicroTask):
2574 * testing/Internals.idl: Expose test microtask queueing to test JS.
2575 * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
2576 (WebCore::MicroTaskTest::run): Run the microtask
2577 (WebCore::MicroTaskTest::create): Create a test microtask.
2578 * testing/MicroTaskTest.h: Add a test class that implements a microtask.
2579 (WebCore::MicroTaskTest::run):
2580 (WebCore::MicroTaskTest::create):
2582 2015-03-02 Jeremy Jones <jeremyj@apple.com>
2584 RenderVideo should not paint the video frame when video is fullscreen.
2585 https://bugs.webkit.org/show_bug.cgi?id=142097
2587 Reviewed by Eric Carlson.
2589 For performance and correctness, RenderVideo should not paint the current video frame
2590 inline when video is fullscreen. This happens when snapshots are taken and can have a
2591 negative performance impact.
2593 * rendering/RenderVideo.cpp:
2594 (WebCore::RenderVideo::paintReplaced):
2596 2015-03-02 Dean Jackson <dino@apple.com>
2598 [iOS Media] Airplay button should be blue when active
2599 https://bugs.webkit.org/show_bug.cgi?id=142193
2601 Reviewed by Brent Fulgham.
2603 Add a blue form of the Airplay button that is used
2604 when we are actively displaying on another screen.
2606 * Modules/mediacontrols/mediaControlsiOS.css:
2607 (video::-webkit-media-controls-wireless-playback-picker-button):
2608 (video::-webkit-media-controls-wireless-playback-picker-button:active):
2609 (video::-webkit-media-controls-wireless-playback-picker-button.playing):
2610 * Modules/mediacontrols/mediaControlsiOS.js:
2611 (ControllerIOS.prototype.updateWirelessPlaybackStatus):
2613 2015-03-02 Brent Fulgham <bfulgham@apple.com>
2615 Move scroll animating functions from ScrollAnimator to ScrollController
2616 https://bugs.webkit.org/show_bug.cgi?id=142102
2617 <rdar://problem/20007161>
2619 Reviewed by Simon Fraser.
2621 No change in functionality.
2623 Do some refactoring of the various scrolling classes:
2624 1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
2625 and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
2626 2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
2627 3. Move code from ScrollAnimator{Mac} -> ScrollController.
2628 4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
2629 5. Rename immediateScrollInAxis -> immediateScrollOnAxis
2631 * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
2632 * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
2633 events, just as is done for the "event not handled" case in EventHandler.cpp.
2634 (WebCore::EventHandler::platformCompleteWheelEvent):
2635 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
2636 methods, now that ScrollController is controlling this state.
2637 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2638 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
2639 need to clean up the CFRunLoopTimer.
2640 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
2641 until Bug 141973 is completed.).
2642 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
2643 (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
2644 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
2645 * platform/ScrollAnimator.cpp:
2646 (WebCore::ScrollAnimator::ScrollAnimator):
2647 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
2648 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
2649 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
2650 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
2651 (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
2652 (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
2653 (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
2654 (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
2655 (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
2656 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
2657 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
2658 * platform/ScrollAnimator.h:
2659 * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
2660 * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
2661 (WebCore::ScrollController::ScrollController): Update to initialize new timers.
2662 (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
2663 (WebCore::ScrollController::startSnapRubberbandTimer): Added.
2664 (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
2665 require client to maintain timers.
2666 (WebCore::ScrollController::snapRubberBand): Ditto.
2667 (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
2668 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
2669 (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
2670 (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
2671 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
2672 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
2673 (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
2674 (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
2675 * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
2676 * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
2677 * platform/mac/ScrollAnimatorMac.h:
2678 * platform/mac/ScrollAnimatorMac.mm:
2679 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
2680 controlled in the ScrollController)
2681 (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
2682 (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
2683 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
2684 * platform/mac/ScrollController.h: Removed.
2685 * platform/mac/ScrollController.mm: Removed.
2687 2015-03-02 Mark Lam <mark.lam@apple.com>
2689 The InspectorTimelineAgent should gracefully handle attempts to start more than once.
2690 <https://webkit.org/b/142189>
2692 Reviewed by Joseph Pecoraro.
2694 No new tests. Unskipped an existing test that already asserts this.
2696 InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
2697 case the InspectorTimelineAgent is already disabled. Similarly,
2698 InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
2699 is already enabled before proceeding to do work to enable it. Though wasteful,
2700 it is legal for clients of the InspectorTimelineAgent to invoke start on it more
2701 than once. Hence, this check is needed.
2703 This check fixes the debug assertion failure when running the
2704 inspector/timeline/debugger-paused-while-recording.html test. The test can now
2707 * inspector/InspectorTimelineAgent.cpp:
2708 (WebCore::InspectorTimelineAgent::internalStart):
2710 2015-03-02 Roger Fong <roger_fong@apple.com>
2712 Update backgrounds of sliders for inline media controls on OS X.
2713 https://bugs.webkit.org/show_bug.cgi?id=142188.
2714 <rdar://problem/20012413>
2716 Reviewed by Dean Jackson.
2718 Don’t use CSS to draw volume and timeline slider backgrounds.
2719 * Modules/mediacontrols/mediaControlsApple.css:
2720 (video::-webkit-media-controls-volume-slider):
2721 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
2722 (audio::-webkit-media-controls-timeline):
2723 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
2724 (audio::-webkit-media-controls-panel .thumbnail-track):
2725 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
2726 (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
2728 Draw volume and timeline slider backgrounds using 2d canvases.
2729 * Modules/mediacontrols/mediaControlsApple.js:
2730 (Controller.prototype.createControls):
2731 (Controller.prototype.handleVolumeSliderInput):
2732 (Controller.prototype.addRoundedRect):
2733 (Controller.prototype.drawTimelineBackground):
2734 (Controller.prototype.drawVolumeBackground):
2735 (Controller.prototype.showControls):
2736 * Modules/mediacontrols/mediaControlsiOS.js:
2737 (ControllerIOS.prototype.addRoundedRect): Deleted.
2739 2015-03-01 Roger Fong <roger_fong@apple.com>
2741 Update inline media element controls appearance Part 1.
2742 https://bugs.webkit.org/show_bug.cgi?id=142138.
2743 <rdar://problem/19997384>
2745 Reviewed by Dean Jackson.
2747 Update positioning, sizes, and background colors media control elements.
2748 Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
2750 * Modules/mediacontrols/mediaControlsApple.css:
2751 (audio::-webkit-media-controls-panel):
2752 (video::-webkit-media-controls-panel):
2753 (audio::-webkit-media-controls-rewind-button):
2754 (audio::-webkit-media-controls-play-button):
2755 (audio::-webkit-media-controls-panel .mute-box):
2756 (video::-webkit-media-controls-volume-max-button):
2757 (audio::-webkit-media-controls-panel .volume-box):
2758 (audio::-webkit-media-controls-panel .volume-box:active):
2759 (video::-webkit-media-controls-volume-slider):
2760 (audio::-webkit-media-controls-toggle-closed-captions-button):
2761 (audio::-webkit-media-controls-fullscreen-button):
2762 (audio::-webkit-media-controls-current-time-display):
2763 (audio::-webkit-media-controls-time-remaining-display):
2764 (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.
2766 2015-03-02 David Kilzer <ddkilzer@apple.com>
2768 REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
2769 <http://webkit.org/b/138684>
2771 Fixes the following build failures:
2773 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
2774 In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
2775 In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
2776 WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
2777 WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
2779 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
2780 In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
2781 In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
2782 WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
2783 virtual void setShapeLayerPath(const Path&);
2785 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
2786 In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
2787 In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
2788 WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
2789 WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
2791 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
2792 In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
2793 In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
2794 WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
2795 virtual void setShapeLayerWindRule(WindRule);
2799 * platform/graphics/ca/GraphicsLayerCA.h:
2800 (WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
2801 (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
2803 2015-03-01 Simon Fraser <simon.fraser@apple.com>
2805 Make clip-path work on <video>, <canvas> etc.
2806 https://bugs.webkit.org/show_bug.cgi?id=138684
2808 Reviewed by Darin Adler.
2810 clip-path only worked in compositing layers on the painted contents of the layer,
2811 and failed to clip children. Fix this by translating the clip path into a Path
2812 which is set on a CA shape layer (for Mac and iOS), or painted into the
2813 RenderLayerBacking's mask layer. There are two code paths:
2815 1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
2816 Here we can use the optimal code path of converting the clip into a path
2817 that is put onto a CAShapeLayer, which is then used as a mask. There is no
2818 additional backing store.
2819 2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
2820 Here we have to allocate backing store for the mask layer, and paint the
2821 clip path (possibly with the mask).
2823 We add GraphicsLayer::Type::Shape, and add a getter for the layer type.
2825 Tests: compositing/masks/compositing-clip-path-and-mask.html
2826 compositing/masks/compositing-clip-path-mask-change.html
2827 compositing/masks/compositing-clip-path.html
2828 compositing/masks/reference-clip-path-on-composited.html
2830 * platform/graphics/GraphicsLayer.cpp:
2831 (WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
2832 (WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
2833 (WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
2834 (WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
2835 (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
2836 * platform/graphics/GraphicsLayer.h:
2837 (WebCore::GraphicsLayer::type): Expose the type.
2838 (WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
2839 shape layers when it knows they are available.
2840 (WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
2841 * platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
2842 GraphicsLayerPaintClipPath phase.
2843 * platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
2844 * platform/graphics/ca/GraphicsLayerCA.cpp:
2845 (WebCore::GraphicsLayerCA::initialize): Make shape layers.
2846 (WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
2847 can't early return on unchanged paths yet.
2848 (WebCore::GraphicsLayerCA::setShapeLayerWindRule):
2849 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
2851 (WebCore::GraphicsLayerCA::updateShape):
2852 (WebCore::GraphicsLayerCA::updateWindRule):
2853 * platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
2854 * platform/graphics/ca/PlatformCALayer.h:
2855 * platform/graphics/ca/mac/PlatformCALayerMac.h:
2856 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
2857 (PlatformCALayerMac::~PlatformCALayerMac):
2858 (PlatformCALayerMac::setNeedsDisplay):
2859 (PlatformCALayerMac::setNeedsDisplayInRect):
2860 (PlatformCALayerMac::removeFromSuperlayer):
2861 (PlatformCALayerMac::setSublayers):
2862 (PlatformCALayerMac::removeAllSublayers):
2863 (PlatformCALayerMac::appendSublayer):
2864 (PlatformCALayerMac::insertSublayer):
2865 (PlatformCALayerMac::replaceSublayer):
2866 (PlatformCALayerMac::adoptSublayers):
2867 (PlatformCALayerMac::addAnimationForKey):
2868 (PlatformCALayerMac::removeAnimationForKey):
2869 (PlatformCALayerMac::animationForKey):
2870 (PlatformCALayerMac::setMask):
2871 (PlatformCALayerMac::isOpaque):
2872 (PlatformCALayerMac::setOpaque):
2873 (PlatformCALayerMac::bounds):
2874 (PlatformCALayerMac::setBounds):
2875 (PlatformCALayerMac::position):
2876 (PlatformCALayerMac::setPosition):
2877 (PlatformCALayerMac::anchorPoint):
2878 (PlatformCALayerMac::setAnchorPoint):
2879 (PlatformCALayerMac::transform):
2880 (PlatformCALayerMac::setTransform):
2881 (PlatformCALayerMac::sublayerTransform):
2882 (PlatformCALayerMac::setSublayerTransform):
2883 (PlatformCALayerMac::setHidden):
2884 (PlatformCALayerMac::setGeometryFlipped):
2885 (PlatformCALayerMac::isDoubleSided):
2886 (PlatformCALayerMac::setDoubleSided):
2887 (PlatformCALayerMac::masksToBounds):
2888 (PlatformCALayerMac::setMasksToBounds):
2889 (PlatformCALayerMac::acceleratesDrawing):
2890 (PlatformCALayerMac::setAcceleratesDrawing):
2891 (PlatformCALayerMac::contents):
2892 (PlatformCALayerMac::setContents):
2893 (PlatformCALayerMac::setContentsRect):
2894 (PlatformCALayerMac::setMinificationFilter):
2895 (PlatformCALayerMac::setMagnificationFilter):
2896 (PlatformCALayerMac::backgroundColor):
2897 (PlatformCALayerMac::setBackgroundColor):
2898 (PlatformCALayerMac::setBorderWidth):
2899 (PlatformCALayerMac::setBorderColor):
2900 (PlatformCALayerMac::opacity):
2901 (PlatformCALayerMac::setOpacity):
2902 (PlatformCALayerMac::copyFiltersFrom):
2903 (PlatformCALayerMac::setName):
2904 (PlatformCALayerMac::setSpeed):
2905 (PlatformCALayerMac::setTimeOffset):
2906 (PlatformCALayerMac::contentsScale):
2907 (PlatformCALayerMac::setContentsScale):
2908 (PlatformCALayerMac::cornerRadius):
2909 (PlatformCALayerMac::setCornerRadius):
2910 (PlatformCALayerMac::setEdgeAntialiasingMask):
2911 (PlatformCALayerMac::shapeWindRule): New function.
2912 (PlatformCALayerMac::setShapeWindRule): Ditto.
2913 (PlatformCALayerMac::shapePath): Ditto.
2914 (PlatformCALayerMac::setShapePath): Ditto.
2915 (PlatformCALayer::isWebLayer):
2916 * platform/graphics/cg/PathCG.cpp:
2917 (WebCore::Path::Path): nullptr.
2918 * rendering/RenderLayer.cpp:
2919 (WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
2920 (WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
2921 function, so we can call it from RenderLayerBacking too.
2922 (WebCore::RenderLayer::setupClipPath):
2923 (WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
2924 for painting when we're either painting a non-composited layer, or we're painting the
2925 mask layer of a composited layer. We in the latter case, we just want to fill the clip
2926 path with black, so re-use the paintChildClippingMaskForFragments() which does this.
2927 * rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
2928 * rendering/RenderLayerBacking.cpp:
2929 (WebCore::RenderLayerBacking::~RenderLayerBacking):
2930 (WebCore::RenderLayerBacking::updateConfiguration):
2931 (WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
2932 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
2933 code path, compute the Path and set it and the wind rule on the mask layer.
2934 (WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
2935 to deal with combinations of clip-path and mask, some of which allow for the shape layer
2936 mask, and we handle dynamic changes between these and painted masks.
2937 (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
2938 (WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
2939 (WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
2940 * rendering/RenderLayerBacking.h:
2942 2015-03-01 Hunseop Jeong <hs85.jeong@samsung.com>
2944 [Cairo] Implement Path::addEllipse
2945 https://bugs.webkit.org/show_bug.cgi?id=142144
2947 Reviewed by Gyuyoung Kim.
2949 Add support for addEllipse method for platforms using cairo.
2951 * platform/graphics/cairo/PathCairo.cpp:
2952 (WebCore::Path::addEllipse):
2954 2015-03-01 Joonghun Park <jh718.park@samsung.com>
2956 Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
2957 https://bugs.webkit.org/show_bug.cgi?id=142143
2959 Reviewed by Darin Adler.
2961 No new tests, no behavior changes.
2963 * platform/ScrollAnimator.cpp:
2964 (WebCore::ScrollAnimator::create):
2965 * platform/ScrollAnimator.h:
2966 * platform/ScrollAnimatorNone.cpp:
2967 (WebCore::ScrollAnimator::create):
2968 * platform/ScrollableArea.h:
2969 * platform/ios/ScrollAnimatorIOS.mm:
2970 (WebCore::ScrollAnimator::create):
2971 * platform/mac/ScrollAnimatorMac.mm:
2972 (WebCore::ScrollAnimator::create):
2974 2015-02-26 Andy Estes <aestes@apple.com>
2976 [Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
2977 https://bugs.webkit.org/show_bug.cgi?id=142066
2979 Reviewed by Andreas Kling.
2981 * platform/ios/ContentFilterIOS.mm:
2982 * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
2984 2015-03-01 Chris Dumez <cdumez@apple.com>
2986 Make NotificationCenter / Notification suspendable
2987 https://bugs.webkit.org/show_bug.cgi?id=142117
2988 <rdar://problem/19923085>
2990 Reviewed by Andreas Kling.
2992 Make NotificationCenter / Notification suspendable so that pages using
2993 them can enter the PageCache.
2995 NotificationCenter can safely be suspended if there are no pending
2996 permission requests. This required adding an
2997 "hasPendingPermissionRequests()" callback to the NotificationClient.
2999 Notification can safely be suspended if it is either idle (not showing
3002 Tests: fast/history/page-cache-notification-non-suspendable.html
3003 fast/history/page-cache-notification-suspendable.html
3005 * Modules/notifications/Notification.cpp:
3006 (WebCore::Notification::canSuspend):
3007 * Modules/notifications/NotificationCenter.cpp:
3008 (WebCore::NotificationCenter::canSuspend):
3009 * Modules/notifications/NotificationClient.h:
3011 2015-03-01 Ryosuke Niwa <rniwa@webkit.org>
3013 isContentEditable shouldn't trigger synchronous style recalc in most cases
3014 https://bugs.webkit.org/show_bug.cgi?id=129034
3016 Reviewed by Antti Koivisto.
3018 Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
3019 -webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
3020 However, still compute the editability from the style tree when it's up-to-date in order to avoid
3021 repeatedly walking up the DOM tree in a hot code path inside editing.
3023 Test: fast/dom/HTMLElement/dynamic-editability-change.html
3025 * css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
3026 * css/CSSParser.cpp:
3027 (WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
3028 (WebCore::parseKeywordValue): Passes around StyleSheetContents*.
3029 (WebCore::CSSParser::parseValue): Ditto.
3030 (WebCore::CSSParser::parseFont): Ditto.
3032 * css/StyleSheetContents.cpp:
3033 (WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.
3035 * css/StyleSheetContents.h:
3036 (WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
3037 (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
3038 (WebCore::StyleSheetContents::usesStyleBasedEditability): Added.
3041 (WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
3042 setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
3043 is set to true, it's too late to update the flag here.
3044 (WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
3045 (WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
3046 (WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
3047 any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
3048 changes here is fine because the alternative is to trigger a full blown style recalc.
3051 (WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.
3053 * dom/DocumentStyleSheetCollection.cpp:
3054 (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
3055 (WebCore::styleSheetsUseRemUnits): Deleted.
3056 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
3057 as well as m_usesRemUnit.
3059 * dom/DocumentStyleSheetCollection.h:
3060 (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
3061 (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.
3064 (WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
3065 (WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
3066 check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
3067 compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
3068 Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.
3070 * html/HTMLElement.cpp:
3071 (WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
3072 to be called in Node::computeEditability. Also made it return Editability instead of boolean.
3073 (WebCore::HTMLElement::matchesReadWritePseudoClass):
3074 * html/HTMLElement.h:
3076 2015-03-01 Brent Fulgham <bfulgham@apple.com>
3078 [Win] Unreviewed build fix.
3080 * WebCorePrefix.h: Provide some default definitions to help build on Windows
3081 machines with different application support libraries.
3083 2015-02-28 Simon Fraser <simon.fraser@apple.com>
3085 Viewport units should not dirty style just before we do layout
3086 https://bugs.webkit.org/show_bug.cgi?id=141682
3088 Reviewed by Zalan Bujtas.
3090 In documents using viewport units, we dirtied style every time layout changed
3091 the size of the document. This is nonsensical, because viewport units depend on the
3092 viewport size, not the document size.
3094 Move the style dirtying from layout() into availableContentSizeChanged(). Hook
3095 this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
3096 since that causes availableContentSizeChanged() to be called for WK1 for the first
3097 time, protect the call to updateScrollbars() with a !platformWidget check.
3099 Covered by existing viewport unit tests.
3101 * page/FrameView.cpp:
3102 (WebCore::FrameView::layout):
3103 (WebCore::FrameView::availableContentSizeChanged):
3104 (WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
3105 scrollbars are ignored depends on the value of the overflow property on the root element.
3107 * platform/ScrollView.cpp:
3108 (WebCore::ScrollView::availableContentSizeChanged):
3110 2015-02-28 Andreas Kling <akling@apple.com>
3112 [Cocoa] Purge SQLite page cache when under memory pressure.
3113 <https://webkit.org/b/142139>
3114 <rdar://problem/19997739>
3116 Reviewed by Pratik Solanki.
3118 Call out to sqlite3 cache purging SPI on Cocoa platforms when
3119 we need to free up some extra memory.
3121 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3122 (WebCore::MemoryPressureHandler::platformReleaseMemory):
3124 2015-02-28 Simon Fraser <simon.fraser@apple.com>
3126 FrameView::layoutTimerFired() should update style if needed before doing layout
3127 https://bugs.webkit.org/show_bug.cgi?id=141688
3129 Reviewed by Andreas Kling.
3131 If the style recalc timer has been scheduled to fire after the layout timer,
3132 when the layout timer fires, we might as well just do the style recalc
3133 too. The call to updateStyleIfNeeded() will cancel the pending style
3136 This doesn't have much impact on the number of layouts (measured via PLT)
3137 but seems like a reasonable thing to do.
3139 * page/FrameView.cpp:
3140 (WebCore::FrameView::layoutTimerFired):
3142 2015-02-28 Simon Fraser <simon.fraser@apple.com>
3144 Fullscreen video layers are off by one sometimes
3145 https://bugs.webkit.org/show_bug.cgi?id=142122
3146 rdar://problem/19878821
3148 Reviewed by Eric Carlson.
3150 Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
3151 isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
3152 backends to use FloatSizes for natural size. Convert the video image drawing code
3153 paths to FloatSize, since naturalSize is used on the destination rect computation,
3154 and painting should be floating point anyway.
3156 Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.
3158 * html/HTMLVideoElement.cpp:
3159 (WebCore::HTMLVideoElement::videoWidth):
3160 (WebCore::HTMLVideoElement::videoHeight):
3161 (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
3162 * html/HTMLVideoElement.h:
3163 * html/canvas/CanvasRenderingContext2D.cpp:
3165 (WebCore::CanvasRenderingContext2D::drawImage):
3166 * html/canvas/WebGLRenderingContextBase.cpp:
3167 (WebCore::WebGLRenderingContextBase::videoFrameToImage):
3168 * platform/graphics/MediaPlayer.cpp:
3169 (WebCore::NullMediaPlayerPrivate::naturalSize):
3170 (WebCore::MediaPlayer::naturalSize):
3171 (WebCore::MediaPlayer::paint):
3172 (WebCore::MediaPlayer::paintCurrentFrameInContext):
3173 (WebCore::NullMediaPlayerPrivate::paint): Deleted.
3174 * platform/graphics/MediaPlayer.h:
3175 * platform/graphics/MediaPlayerPrivate.h:
3176 (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
3177 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3178 (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
3179 (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
3180 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3181 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3182 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3183 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
3184 (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
3185 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
3186 (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
3187 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
3188 (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
3189 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3190 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3191 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3192 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
3193 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
3194 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
3195 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3196 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3197 (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
3198 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3199 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3200 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
3201 (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
3202 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
3203 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
3204 (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
3205 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3206 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3207 (WebCore::MediaPlayerPrivateQTKit::naturalSize):
3208 (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
3209 (WebCore::MediaPlayerPrivateQTKit::paint):
3210 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3211 (WebCore::MockMediaPlayerMediaSource::naturalSize):
3212 (WebCore::MockMediaPlayerMediaSource::paint):
3213 * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3214 * rendering/RenderVideo.cpp:
3215 (WebCore::RenderVideo::calculateIntrinsicSize):
3216 (WebCore::RenderVideo::paintReplaced):
3218 2015-02-27 Hunseop Jeong <hs85.jeong@samsung.com>
3220 [EFL][GTK] Fix build break after r180790,180798
3221 https://bugs.webkit.org/show_bug.cgi?id=142127
3223 Reviewed by Gyuyoung Kim.
3225 * platform/graphics/cairo/PathCairo.cpp:
3226 (WebCore::Path::addEllipse):
3228 2015-02-27 Zalan Bujtas <zalan@apple.com>
3230 Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
3231 https://bugs.webkit.org/show_bug.cgi?id=142065
3233 Reviewed by Simon Fraser.
3235 We should not pixelsnap (ceil in this case) logical coordinates during layout.
3236 Should this cause content to be partially cut off, we need to
3237 find the broken piece in the computation logic.
3239 Covered by the unskipped test.
3241 * rendering/RootInlineBox.cpp:
3242 (WebCore::RootInlineBox::paddedLayoutOverflowRect):
3244 2015-02-27 Ryosuke Niwa <rniwa@webkit.org>
3246 Node::hasEditableStyle and isEditablePosition have too many options
3247 https://bugs.webkit.org/show_bug.cgi?id=142078
3249 Reviewed by Andreas Kling.
3251 Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
3252 new editing helper functions hasEditableStyle and isEditableNode for this purpose.
3254 Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
3255 newly extracted computeEditability in call sites that specify this option since isContentEditable
3256 is a public DOM API.
3258 No new tests since there should be no observable behavior changes.
3260 * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
3263 (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
3266 (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
3267 (WebCore::Node::isContentRichlyEditable): Ditto.
3268 (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
3269 a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
3270 style tree. Also returns tri-state Editability enum instead of returning a boolean based on
3271 the value of EditableLevel argument.
3272 (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
3273 (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
3274 (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
3276 * dom/Node.h: No longer includes EditingBoundary.h.
3277 (WebCore::Node::isContentEditable):
3278 (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
3279 (WebCore::Node::hasRichlyEditableStyle): Ditto.
3281 * editing/ApplyStyleCommand.cpp:
3282 (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
3283 (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
3284 * editing/DeleteFromTextNodeCommand.cpp:
3285 (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
3286 * editing/FrameSelection.cpp:
3287 (WebCore::CaretBase::invalidateCaretRect): Ditto.
3288 * editing/InsertNodeBeforeCommand.cpp:
3289 (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
3290 (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
3291 * editing/RemoveNodeCommand.cpp:
3292 (WebCore::RemoveNodeCommand::doApply): Ditto.
3294 * editing/VisibleSelection.cpp:
3295 (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
3296 which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
3297 not possible prior to r180726 because isEditablePosition had to move out of tables.
3299 * editing/VisibleUnits.cpp:
3300 (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
3301 (WebCore::nextLeafWithSameEditability): Ditto.
3302 (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
3303 in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
3304 (WebCore::previousLinePosition):
3305 (WebCore::nextLinePosition):
3307 * editing/htmlediting.cpp:
3308 (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
3309 (WebCore::isEditableToAccessibility): Moved from Node.
3310 (WebCore::computeEditability): Extracted from isEditablePosition.
3311 (WebCore::hasEditableStyle): Added.
3312 (WebCore::isEditableNode): Added.
3313 (WebCore::isEditablePosition): Now calls computeEditability.
3314 (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
3315 (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
3317 * editing/htmlediting.h:
3319 2015-02-27 Chris Dumez <cdumez@apple.com>
3321 Make ActiveDOMObject::canSuspend() pure virtual
3322 https://bugs.webkit.org/show_bug.cgi?id=142096
3323 <rdar://problem/19923085>
3325 Reviewed by Andreas Kling.
3327 Make ActiveDOMObject::canSuspend() pure virtual so that people at least
3328 try to provide an implementation for it. The default implementation was
3329 returning false unconditionally and thus was preventing pages from
3330 entering the PageCache.
3332 2015-02-27 Commit Queue <commit-queue@webkit.org>
3334 Unreviewed, rolling out r180203 and r180210.
3335 https://bugs.webkit.org/show_bug.cgi?id=142116
3337 broke process suspension and tile map (Requested by thorton on
3340 Reverted changesets:
3342 "Adopt CAMachPort-as-layer-contents"
3343 https://bugs.webkit.org/show_bug.cgi?id=141687
3344 http://trac.webkit.org/changeset/180203
3346 "Fix the !USE(IOSURFACE) build"
3347 http://trac.webkit.org/changeset/180210
3349 2015-02-27 Sam Weinig <sam@webkit.org>
3351 Add WebKit2 SPI to create a DOM File object
3352 https://bugs.webkit.org/show_bug.cgi?id=142109