1 2015-05-01 Commit Queue <commit-queue@webkit.org>
3 Unreviewed, rolling out r183687.
4 https://bugs.webkit.org/show_bug.cgi?id=144505
6 Appears to have caused assertions (Requested by ap on
11 "Media control volume slider is opaque."
12 https://bugs.webkit.org/show_bug.cgi?id=144470
13 http://trac.webkit.org/changeset/183687
15 2015-05-01 Jeremy Jones <jeremyj@apple.com>
17 Stop using deprecated AVKit SPI for enter and exit fullscreen.
18 https://bugs.webkit.org/show_bug.cgi?id=144493
20 Reviewed by Jer Noble.
23 -enterFullScreenWithCompletionHandler:
24 -exitFullScreenWithCompletionHandler:
26 -enterFullScreenAnimated:completionHandler:
27 -exitFullScreenAnimated:completionHandler:
29 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
30 (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard):
31 (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
32 * platform/spi/cocoa/AVKitSPI.h:
34 2015-05-01 Roger Fong <roger_fong@apple.com>
36 Media control volume slider is opaque.
37 https://bugs.webkit.org/show_bug.cgi?id=144470.
38 <rdar://problem/20770350>
40 Rubberstamped by Simon Fraser.
42 * Modules/mediacontrols/mediaControlsApple.css:
43 (audio::-webkit-media-controls-panel):
44 Don't create a stacking context just for the controls.
45 Doing so causes the mix-blend-mode on the volume box to fail.
47 2015-05-01 Joanmarie Diggs <jdiggs@igalia.com>
49 [GTK] REGRESSION(183368): It made editing tests assert
50 https://bugs.webkit.org/show_bug.cgi?id=144447
52 Reviewed by Chris Fleizach.
54 Don't notify platforms of editing actions of type EditActionUnspecified.
55 If we don't know what the action is, platform accessibility APIs certainly
58 Add AXTextEditTypeAttributesChange and AXTextAttributesChanged as catch-alls
59 for formatting changes. ATK lacks finely-grained signals through which to
60 specify which text attributes have changed. If other platforms have such
61 signals, new types can always be added.
63 Don't post an accessible replacement notification for AXTextEditTypeCut.
64 The notification is handled by DeleteSelectionCommand. It is possible for
65 white space to be inserted in preparation for a cut which was triggering
66 a not-reached assert, but insertion of whitespace in preparation for a
67 cut does not seem notification-worthy.
69 Treat AXTextEditTypeDictation the same as other insertion types (insert,
70 paste, typing) with respect to replacement notifications.
72 No new tests. The hundreds of editing tests that had been crashing seem sufficient.
74 * accessibility/AXObjectCache.cpp:
75 (WebCore::AXObjectCache::showIntent):
76 (WebCore::AXObjectCache::textChangeForEditType):
77 * accessibility/AXObjectCache.h:
78 * accessibility/AXTextStateChangeIntent.h:
79 * accessibility/atk/AXObjectCacheAtk.cpp:
80 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
81 * editing/AppendNodeCommand.cpp:
82 (WebCore::AppendNodeCommand::doApply):
83 (WebCore::AppendNodeCommand::doUnapply):
84 * editing/DeleteFromTextNodeCommand.cpp:
85 (WebCore::DeleteFromTextNodeCommand::doApply):
86 (WebCore::DeleteFromTextNodeCommand::doUnapply):
87 * editing/EditCommand.cpp:
88 (WebCore::EditCommand::applyEditType):
89 (WebCore::EditCommand::unapplyEditType):
90 * editing/InsertIntoTextNodeCommand.cpp:
91 (WebCore::InsertIntoTextNodeCommand::doApply):
92 (WebCore::InsertIntoTextNodeCommand::doUnapply):
93 * editing/InsertNodeBeforeCommand.cpp:
94 (WebCore::InsertNodeBeforeCommand::doApply):
95 (WebCore::InsertNodeBeforeCommand::doUnapply):
96 * editing/ReplaceInsertIntoTextNodeCommand.cpp:
97 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
99 2015-05-01 Brady Eidson <beidson@apple.com>
101 Add API to disable meta refreshes.
102 <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
104 Reviewed by Alexey Proskuryakov.
106 Test: loader/meta-refresh-disabled.html
109 (WebCore::Document::processHttpEquiv): Bail early if Settings have meta refreshes disabled.
112 2015-05-01 Martin Robinson <mrobinson@igalia.com>
114 [Freetype] Properly support synthetic oblique in vertical text
115 https://bugs.webkit.org/show_bug.cgi?id=144492
117 Reviewed by Sergio Villar Senin.
119 No new tests. Covered by existing tests.
121 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
122 (WebCore::FontPlatformData::initializeWithFontFace): Skew vertical when using synthetic
123 oblique for vertical text.
125 2015-05-01 Joanmarie Diggs <jdiggs@igalia.com>
127 AX: [ATK] REGRESSION: accessibility/canvas-fallback-content.html now crashes
128 https://bugs.webkit.org/show_bug.cgi?id=144481
130 Reviewed by Chris Fleizach.
132 Canvas fallback content is allowed to be focusable if the canvas is displayed
133 and visible. Update the style when creating an accessible object for a node in
134 a canvas subtree and before Element::isFocusable() gets called.
136 No new tests. The existing, crashing test no longer crashes.
138 * accessibility/AXObjectCache.cpp:
139 (WebCore::AXObjectCache::getOrCreate):
141 2015-05-01 Alex Christensen <achristensen@webkit.org>
143 [Content Extensions] Add CombinedURLFilters debugging code.
144 https://bugs.webkit.org/show_bug.cgi?id=144491
146 Reviewed by Daniel Bates.
148 No change in behavior.
150 * contentextensions/CombinedURLFilters.cpp:
151 (WebCore::ContentExtensions::recursiveMemoryUsed):
152 (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
153 (WebCore::ContentExtensions::prefixTreeVertexToString):
154 (WebCore::ContentExtensions::recursivePrint):
155 (WebCore::ContentExtensions::CombinedURLFilters::print):
156 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
157 (WebCore::ContentExtensions::generateNFAForSubtree):
158 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
159 * contentextensions/CombinedURLFilters.h:
160 * contentextensions/NFA.cpp:
161 (WebCore::ContentExtensions::NFA::memoryUsed):
162 * contentextensions/NFA.h:
163 * contentextensions/Term.h:
164 (WebCore::ContentExtensions::quantifierToString):
165 (WebCore::ContentExtensions::Term::toString):
167 2015-05-01 Eric Carlson <eric.carlson@apple.com>
169 Fix text track language selection logic
170 https://bugs.webkit.org/show_bug.cgi?id=144467
172 Reviewed by Brent Fulgham.
174 No new tests, media/track/track-language-preference.html was updated.
176 * html/HTMLMediaElement.cpp:
177 (WebCore::HTMLMediaElement::configureTextTrackGroup): Correct a minor style typo.
178 (WebCore::HTMLMediaElement::configureTextTrackDisplay): Update logging.
180 * page/CaptionUserPreferences.cpp:
181 (WebCore::CaptionUserPreferences::textTrackSelectionScore): Minor cleanup.
182 (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Give exact matches a
185 * page/CaptionUserPreferencesMediaAF.cpp:
186 (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Update for
187 indexOfBestMatchingLanguageInList change.
189 * platform/Language.cpp:
190 (WebCore::indexOfBestMatchingLanguageInList): Add parameter for exact match. Convert the
191 passed language to lower case as we do with the preferred languages.
192 * platform/Language.h:
194 2015-05-01 Martin Robinson <mrobinson@igalia.com>
196 [Freetype] Add support for the font-synthesis property
197 https://bugs.webkit.org/show_bug.cgi?id=144472
199 Reviewed by Sergio Villar Senin.
201 No new tests. This causes fast/css3-text/font-synthesis.html to pass
204 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
205 (WebCore::FontPlatformData::FontPlatformData): Only use synthetic bold when the font description allows it.
206 (WebCore::FontPlatformData::initializeWithFontFace): Ditto for synthetic oblique.
208 2015-05-01 Martin Robinson <mrobinson@igalia.com>
210 [GTK] New CORS tests from r183280 fail on WebKitGTK+
211 https://bugs.webkit.org/show_bug.cgi?id=144469
213 Reviewed by Sergio Villar Senin.
215 No new tests. This causes failing tests to pass.
217 * platform/network/soup/ResourceHandleSoup.cpp:
218 (WebCore::doRedirect): Clear the origin header on cross-origin redirects.
220 2015-04-30 Alex Christensen <achristensen@webkit.org>
222 Compile fix when using content extensions debugging code.
224 * contentextensions/ContentExtensionCompiler.cpp:
225 (WebCore::ContentExtensions::compileRuleList):
226 * contentextensions/ContentExtensionsDebugging.h:
227 * contentextensions/DFA.cpp:
228 (WebCore::ContentExtensions::printTransitions):
229 (WebCore::ContentExtensions::DFA::debugPrintDot):
230 * contentextensions/DFANode.h:
231 * contentextensions/NFA.cpp:
232 (WebCore::ContentExtensions::NFA::memoryUsed):
233 (WebCore::ContentExtensions::NFA::debugPrintDot):
235 2015-04-30 Dan Bernstein <mitz@apple.com>
237 Fixed the build for <rdar://problem/20758514>
239 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
240 (WebCore::AudioSourceProviderAVFObjC::destroyMix): Don’t pass nil to
241 -[AVMutableAudioMix setInputParameters:].
243 2015-04-30 Daniel Bates <dabates@apple.com>
245 Clean up: Remove unnecessary runtime computation of string length
246 https://bugs.webkit.org/show_bug.cgi?id=144483
248 Reviewed by Joseph Pecoraro.
250 Following <http://trac.webkit.org/changeset/183649>, WebCore::fullyQualifiedInfoTableName()
251 computes strlen() of the first string literal as part of concatenating two string literals.
252 It is sufficient to use sizeof() - 1 instead of strlen() to compute the length of the first
253 string literal because the size of the string literal is known at compile time.
255 * Modules/webdatabase/DatabaseBackendBase.cpp:
256 (WebCore::fullyQualifiedInfoTableName):
258 2015-04-30 Dean Jackson <dino@apple.com>
260 Expose -apple-system as a font family
261 https://bugs.webkit.org/show_bug.cgi?id=144484
262 <rdar://problem/20767330>
264 Reviewed by Tim Horton.
266 Accept "-apple-system" for the font-family property, and
267 rename "-apple-system-font-monospaced-numbers" to
268 "-apple-system-monospaced-numbers".
270 Also change the media controls to use the new name.
272 Covered by existing tests and this new one:
273 fast/text/system-font-legacy-name.html
275 * Modules/mediacontrols/mediaControlsApple.css:
276 (audio::-webkit-media-controls-time-remaining-display):
277 * Modules/mediacontrols/mediaControlsiOS.css:
278 (::-webkit-media-controls):
279 (audio::-webkit-media-controls-time-remaining-display):
280 (audio::-webkit-media-controls-status-display):
281 * platform/graphics/ios/FontCacheIOS.mm: Add support for the new name.
282 (WebCore::createCTFontWithFamilyNameAndWeight):
283 * platform/graphics/mac/FontCacheMac.mm: Ditto.
284 (WebCore::fontWithFamily):
286 2015-04-30 Javier Fernandez <jfernandez@igalia.com>
288 [CSS Grid Layout] overflow-position keyword for align and justify properties.
289 https://bugs.webkit.org/show_bug.cgi?id=144235
291 Reviewed by Sergio Villar Senin.
293 When the alignment subject is larger than the alignment container,
294 it will overflow. Some alignment modes, if honored in this
295 situation, may cause data loss; an overflow alignment mode can be
296 explicitly specified to avoid this.
298 This patch implements overflow-keyword handling for Grid Layout on
299 align-self and justify-self properties.
301 Test: fast/css-grid-layout/grid-align-justify-overflow.html
303 * rendering/RenderGrid.cpp:
304 (WebCore::computeOverflowAlignmentOffset):
305 (WebCore::RenderGrid::rowPositionForChild):
306 (WebCore::RenderGrid::columnPositionForChild):
307 (WebCore::RenderGrid::rowAxisPositionForChild): Deleted.
308 * rendering/style/RenderStyle.cpp:
309 (WebCore::resolveAlignmentData):
310 (WebCore::resolveJustificationData):
311 (WebCore::RenderStyle::resolveAlignment):
312 (WebCore::RenderStyle::resolveAlignmentOverflow):
313 (WebCore::RenderStyle::resolveJustification):
314 (WebCore::RenderStyle::resolveJustificationOverflow):
315 * rendering/style/RenderStyle.h:
317 2015-04-30 Jon Honeycutt <jhoneycutt@apple.com>
319 Rebaseline bindings tests results after r183648.
323 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
324 (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
325 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
326 (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
327 * bindings/scripts/test/JS/JSTestInterface.cpp:
328 (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
329 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
330 (WebCore::setJSTestInterfaceImplementsStr2):
331 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
332 (WebCore::setJSTestInterfaceSupplementalStr2):
333 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
334 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
335 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
336 (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
337 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
338 (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
339 (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
340 (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
341 (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
342 * bindings/scripts/test/JS/JSTestObj.cpp:
343 (WebCore::setJSTestObjConstructorStaticStringAttr):
344 (WebCore::setJSTestObjStringAttr):
345 (WebCore::setJSTestObjReflectedStringAttr):
346 (WebCore::setJSTestObjReflectedURLAttr):
347 (WebCore::setJSTestObjReflectedCustomURLAttr):
348 (WebCore::setJSTestObjStringAttrWithGetterException):
349 (WebCore::setJSTestObjStringAttrWithSetterException):
350 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
351 (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
352 (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
353 (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
354 (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
355 (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
356 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
357 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
358 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
359 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
360 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
361 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
362 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
363 (WebCore::jsTestObjPrototypeFunctionStrictFunction):
364 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
365 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
366 (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
367 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
368 (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
369 (WebCore::setJSTestTypedefsStringAttrWithGetterException):
370 (WebCore::setJSTestTypedefsStringAttrWithSetterException):
371 (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
373 2015-04-30 Simon Fraser <simon.fraser@apple.com>
375 Fixed elements end up in the middle of the view with pageScale < 1
376 https://bugs.webkit.org/show_bug.cgi?id=144428
377 rdar://problem/20404982
379 Reviewed by Tim Horton.
381 When pageScale is < 1, we used fixed layout mode, and FrameView::fixedElementsLayoutRelativeToFrame()
382 returns true. However, the scrolling thread was calling the static scrollOffsetForFixedPosition()
383 hardcoding 'false' for this parameter.
385 Fix by sending the value of fixedElementsLayoutRelativeToFrame over to the scrolling thread,
386 so we can use it when doing scrolling-thread fixed position stuff.
390 * page/scrolling/AsyncScrollingCoordinator.cpp:
391 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
392 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
393 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
394 (WebCore::ScrollingStateFrameScrollingNode::setFixedElementsLayoutRelativeToFrame):
395 * page/scrolling/ScrollingStateFrameScrollingNode.h:
396 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
397 (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
398 (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
399 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
400 (WebCore::ScrollingTreeFrameScrollingNode::fixedElementsLayoutRelativeToFrame):
401 (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
402 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
403 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
405 2015-04-30 Beth Dakin <bdakin@apple.com>
407 Remove invalid assertion from MouseEvent::create()
408 https://bugs.webkit.org/show_bug.cgi?id=144477
410 Reviewed by Tim Horton.
412 mouseforcechanged events and mouseforcewillbegin trigger this assertion. The
413 assertion does not seem valuable, so rather than changing it, just remove it.
414 * dom/MouseEvent.cpp:
415 (WebCore::MouseEvent::create):
417 2015-04-30 Dean Jackson <dino@apple.com>
419 -apple-system-font-monospaced-numbers doesn't work on iOS
420 https://bugs.webkit.org/show_bug.cgi?id=144478
421 <rdar://problem/20544940>
423 Reviewed by Brent Fulgham.
425 Make sure to start from the system font descriptor when
426 asking for a monospaced numeric alternate.
428 Test: platform/ios-simulator/fast/text/system-monospaced-numbers.html
430 * platform/graphics/ios/FontCacheIOS.mm:
431 (WebCore::createCTFontWithFamilyNameAndWeight):
433 2015-04-30 Oliver Hunt <oliver@apple.com>
435 DOM bindings should not be using a reference type to point to a temporary object
436 https://bugs.webkit.org/show_bug.cgi?id=144474
438 Reviewed by Beth Dakin.
440 The DOM bindings will currently try and use a local reference to point
441 to a temporary object. This currently works as a by product of the compiler's
442 stack layout. This patch removes the dependency on undefined behaviour
443 by ensuring that we use a value rather than reference type.
445 * bindings/scripts/CodeGeneratorJS.pm:
446 (GenerateParametersCheck):
447 (GetNativeTypeForCallbacks):
449 2015-04-30 Brady Eidson <beidson@apple.com>
451 Build fix after r183646 for less enlightened platforms.
455 * Modules/webdatabase/DatabaseBackendBase.cpp:
456 (WebCore::fullyQualifiedInfoTableName): Windows doesn’t have stpcpy :(
458 2015-04-30 Brady Eidson <beidson@apple.com>
460 Javascript using WebSQL can create their own WebKit info table.
461 <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
463 Reviewed by Alex Christensen.
465 Test: storage/websql/alter-to-info-table.html
467 * Modules/webdatabase/DatabaseBackendBase.cpp:
468 (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
469 (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
470 (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
471 (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
472 (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
473 (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.
475 2015-04-30 Beth Dakin <bdakin@apple.com>
477 Should choose UIScrollView indicatorStyle based on the document background color
478 https://bugs.webkit.org/show_bug.cgi?id=144473
480 rdar://problem/19897699
482 Reviewed by Simon Fraser.
484 Export this function.
485 * platform/graphics/Color.h:
487 2015-04-30 Brent Fulgham <bfulgham@apple.com>
489 [Win] Allow WebKit to build without ANGLE support
490 https://bugs.webkit.org/show_bug.cgi?id=144459
491 <rdar://problem/20707307>
493 Reviewed by Dean Jackson.
495 * platform/graphics/GLContext.cpp: Use the ENABLE(GRAPHICS_CONTEXT_3D)
496 macro to avoid compiling this code if not using WEBGL/3D contexts.
498 2015-04-29 David Hyatt <hyatt@apple.com>
500 Avoid containingBlock() calls when no writing mode flipping is needed.
501 https://bugs.webkit.org/show_bug.cgi?id=144407
503 Reviewed by Simon Fraser.
505 Add a bool to RenderView that indicates whether or not any flipped blocks have been
506 added to the view. Once tainted, the view just stays dirty forever. If no flipped
507 blocks are ever seen, we can then optimize away calls to containingBlock().
509 The motivation for this patch is to improve layer position updating, which makes many
510 calls to topLeftLocationOffset(), one of the functions that can be optimized by this
513 * rendering/RenderBox.cpp:
514 (WebCore::RenderBox::layoutOverflowRectForPropagation):
515 * rendering/RenderBoxModelObject.cpp:
516 (WebCore::RenderBoxModelObject::updateFromStyle):
517 * rendering/RenderLayer.cpp:
518 (WebCore::RenderLayer::calculateClipRects):
519 * rendering/RenderLineBoxList.cpp:
520 (WebCore::RenderLineBoxList::rangeIntersectsRect):
521 * rendering/RenderView.cpp:
522 (WebCore::RenderView::RenderView):
523 * rendering/RenderView.h:
525 2015-04-29 Jer Noble <jer.noble@apple.com>
527 Make GenericTaskQueue even more generic (and usable inside platform/)
528 https://bugs.webkit.org/show_bug.cgi?id=144414
530 Reviewed by Eric Carlson.
532 Templatize GenericTaskQueue so that it can be used from within platform/.
535 * WebCore.vcxproj/WebCore.vcxproj:
536 * WebCore.vcxproj/WebCore.vcxproj.filters:
537 * WebCore.xcodeproj/project.pbxproj:
538 * dom/GenericTaskQueue.cpp: Removed.
539 * html/HTMLMediaElement.h:
540 * platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
541 (WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
542 (WebCore::TaskDispatcher::postTask): Call context's postTask().
543 (WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
544 (WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
545 (WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
546 (WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
547 (WebCore::GenericTaskQueue::enqueueTask): Ditto.
548 (WebCore::GenericTaskQueue::close): Ditto.
549 (WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
550 (WebCore::GenericTaskQueue::hasPendingTasks): Ditto.
552 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
554 Unreviewed build fix. WebCore has a weak symbol.
556 WebCore has a weak external symbol in it. A common cause of weak external
557 symbols is when an inline function is listed in the linker export file.
558 ERROR: symbol __ZNK7WebCore4Page25expectsWheelEventTriggersEv
561 (WebCore::Page::expectsWheelEventTriggers):
563 (WebCore::Page::expectsWheelEventTriggers): Deleted.
565 2015-04-29 Simon Fraser <simon.fraser@apple.com>
567 Crash at WebCore::Document::absoluteRegionForEventTargets
568 https://bugs.webkit.org/show_bug.cgi?id=144426
569 rdar://problem/20502166
571 Reviewed by Tim Horton.
573 When a frame had wheel event handlers, we would register the document itself
574 as a handler in its parent document. This is problematic, because there's not
575 code path that removes it when the frame is destroyed.
577 It turns out we don't need to do this at all; the non-fast scrollable region
578 already takes handlers in subframes into account.
580 Tests: fast/events/wheelevent-in-frame.html
581 fast/events/wheelevent-in-reattached-frame.html
584 (WebCore::Document::didAddWheelEventHandler):
585 (WebCore::Document::didRemoveWheelEventHandler):
587 2015-04-29 Eric Carlson <eric.carlson@apple.com>
589 Not all videos should automatically play to playback target
590 https://bugs.webkit.org/show_bug.cgi?id=144430
591 <rdar://problem/20718523>
593 Reviewed by Darin Adler.
595 * Modules/mediasession/WebMediaSessionManager.cpp:
596 (WebCore::WebMediaSessionManager::clientStateDidChange): Consider ExternalDeviceAutoPlayCandidate.
599 * html/HTMLMediaElement.cpp:
600 (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate when a <video>
601 has a file with an audio track that does not loop.
603 * page/MediaProducer.h: Add ExternalDeviceAutoPlayCandidate.
605 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
607 LiveNodeList may unexpectedly return an element for empty string
608 https://bugs.webkit.org/show_bug.cgi?id=144429
610 Reviewed by Darin Adler.
612 * dom/LiveNodeList.cpp:
613 (WebCore::LiveNodeList::namedItem):
614 Never return a result for an empty string.
616 2015-04-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
618 Remove PassRefPtr in SVGFEFooElement classes
619 https://bugs.webkit.org/show_bug.cgi?id=144425
621 Reviewed by Darin Adler.
623 As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
626 No new tests, no behavior changes.
629 (WebCore::RGBColor::create):
631 * platform/graphics/filters/PointLightSource.h:
632 (WebCore::PointLightSource::create):
633 * platform/graphics/filters/SpotLightSource.h:
634 (WebCore::SpotLightSource::create):
636 (WebCore::SVGColor::rgbColor):
638 * svg/SVGFEDistantLightElement.cpp:
639 (WebCore::SVGFEDistantLightElement::lightSource):
640 * svg/SVGFEDistantLightElement.h:
641 * svg/SVGFELightElement.cpp:
642 (WebCore::SVGFELightElement::findLightSource):
643 * svg/SVGFELightElement.h:
644 * svg/SVGFEPointLightElement.cpp:
645 (WebCore::SVGFEPointLightElement::lightSource):
646 * svg/SVGFEPointLightElement.h:
647 * svg/SVGFESpotLightElement.cpp:
648 (WebCore::SVGFESpotLightElement::lightSource):
649 * svg/SVGFESpotLightElement.h:
651 2015-04-29 Dean Jackson <dino@apple.com>
653 Create a named CSS property for system colors
654 https://bugs.webkit.org/show_bug.cgi?id=144423
655 <rdar://problem/20491011>
657 Reviewed by Tim Horton.
659 Test: fast/css/apple-system-colors.html
661 Expose the following values to CSS color properties:
672 On platforms other than OS X Yosemite and iOS, the
673 actual color values are undefined and become transparent
674 black. (In fact, not all are defined on iOS either.)
676 * WebCore.xcodeproj/project.pbxproj: Two new SPI header files.
679 (WebCore::CSSParser::validSystemColorValue): New helper function that
680 checks if a CSSValueID is between the two system color values. This
681 was being tested everywhere, which meant adding a new system color was
682 at risk of being ignored. It's a static method so it can be used
683 from the SVG CSS parser too.
684 (WebCore::validPrimitiveValueColor): Use the new helper.
685 (WebCore::CSSParser::parseValue): Ditto.
686 (WebCore::CSSParser::parseBackgroundColor): Ditto.
687 (WebCore::CSSParser::parseShadow): Ditto.
688 (WebCore::parseDeprecatedGradientColorStop): Ditto.
689 (WebCore::parseGradientColorOrKeyword): Ditto.
690 * css/CSSParser.h: New static helper function.
692 * css/CSSValueKeywords.in: Add the new CSS value keywords.
694 * css/SVGCSSParser.cpp:
695 (WebCore::validSystemControlColorValue): SVG has a restricted
696 set of system colors, so use the helper from CSSParser but with
698 (WebCore::CSSParser::parseSVGValue): Use the helper.
700 * platform/spi/ios/UIColorSPI.h: Added.
701 * platform/spi/cocoa/NSColorSPI.h: Added.
703 * rendering/RenderThemeIOS.h: New systemColor override. Also add a cache for system colors.
704 * rendering/RenderThemeIOS.mm:
705 (WebCore::RenderThemeIOS::systemColor): Ask UIColor to provide the color values for the new CSS values.
706 * rendering/RenderThemeMac.mm:
707 (WebCore::RenderThemeMac::systemColor): Ditto.
709 2015-04-29 Commit Queue <commit-queue@webkit.org>
711 Unreviewed, rolling out r183600.
712 https://bugs.webkit.org/show_bug.cgi?id=144432
714 New tests time out everywhere (Requested by ap on #webkit).
718 "Crash at WebCore::Document::absoluteRegionForEventTargets"
719 https://bugs.webkit.org/show_bug.cgi?id=144426
720 http://trac.webkit.org/changeset/183600
722 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
724 Unreviewed iOS build fix. Unused parameter no longer exists.
726 * page/scrolling/ScrollingCoordinator.cpp:
727 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
729 2015-04-29 Simon Fraser <simon.fraser@apple.com>
731 Crash at WebCore::Document::absoluteRegionForEventTargets
732 https://bugs.webkit.org/show_bug.cgi?id=144426
733 rdar://problem/20502166
735 Reviewed by Tim Horton.
737 When a frame had wheel event handlers, we would register the document itself
738 as a handler in its parent document. This is problematic, because there's not
739 code path that removes it when the frame is destroyed.
741 It turns out we don't need to do this at all; the non-fast scrollable region
742 already takes handlers in subframes into account.
744 Tests: fast/events/wheelevent-in-frame.html
745 fast/events/wheelevent-in-reattached-frame.html
748 (WebCore::Document::didAddWheelEventHandler):
749 (WebCore::Document::didRemoveWheelEventHandler):
751 2015-04-29 David Kilzer <ddkilzer@apple.com>
753 Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
754 <http://webkit.org/b/144362>
756 Reviewed by Andy Estes.
758 This patch switches soft-linking of QuickLook.framework to
759 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
762 No new tests since no change in behavior.
764 * WebCore.xcodeproj/project.pbxproj:
765 - Add QuickLookSoftLinking.{h,mm} to the project.
767 * platform/ios/QuickLookSoftLink.h: Added.
768 * platform/ios/QuickLookSoftLink.mm: Added.
769 * platform/mac/SoftLinking.h:
770 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
771 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
772 (SOFT_LINK_POINTER_FOR_HEADER): Add macro.
773 (SOFT_LINK_POINTER_FOR_SOURCE): Add macro.
775 * platform/network/ios/QuickLook.h:
776 - Remove unused declarations.
778 * platform/network/ios/QuickLook.mm:
779 (WebCore::QLPreviewConverterClass): Deleted.
780 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
781 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
782 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
783 - Remove SOFT_LINK macros and unused methods after switching to
784 new QuickLookSoftLink.{h,mm}.
785 (WebCore::QLPreviewGetSupportedMIMETypesSet):
786 - Switch to use NeverDestroyed<>.
787 (WebCore::registerQLPreviewConverterIfNeeded):
788 (createQLPreviewProtocol):
789 (WebCore::QLPreviewProtocol):
790 (WebCore::QuickLookHandle::QuickLookHandle):
791 (WebCore::QuickLookHandle::create):
792 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
793 - Simplify code when using QuickLookSoftLink.h.
795 * platform/network/ios/WebCoreURLResponseIOS.mm:
796 - Include QuickLookSoftLink.h header.
798 2015-04-29 Simon Fraser <simon.fraser@apple.com>
800 Compute the non-fast-scrollable region in main-document coordinates
801 https://bugs.webkit.org/show_bug.cgi?id=144420
803 Reviewed by Tim Horton.
805 Compute the non-fast-scrollable region in document coordinates, to make it easier
806 to reason about. Previously, it was document coordinates offset by top content inset.
808 * page/DebugPageOverlays.cpp:
809 (WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
810 event handler region, mapping each to root view coords, and then mapping back into document
812 (WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
813 overlay and region are both document coordinates.
814 * page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
816 (WebCore::Page::nonFastScrollableRects): Remove frame argument.
818 * page/PageOverlay.cpp:
819 (WebCore::PageOverlay::bounds):
820 (WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
821 view and overlay coordinates.
822 * page/PageOverlay.h:
823 * page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
824 (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
825 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
826 (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
827 * page/scrolling/ScrollingCoordinator.cpp:
828 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
829 recurses on frames, computing an absolute (document-relative) region per frame. This
830 removes the confusing offsetting through top content inset.
831 Change how we get to plugins that want wheel events; we can't get from PluginViewBase
832 to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
833 regions for transformed plugin-ins.
834 For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
835 then to our frame, then to our document.
836 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
837 the recursive function.
838 (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
839 * page/scrolling/ScrollingCoordinator.h:
840 * page/scrolling/ScrollingTree.cpp:
841 (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
842 from view coordinates to document coordinates for testing against the non-fast region.
843 We previously assert that the root note is a FrameScrolling node.
844 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
845 (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
846 for the scrolling tree.
847 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
848 * testing/Internals.cpp:
849 (WebCore::Internals::nonFastScrollableRects): No need for frame arg.
851 2015-04-29 Brent Fulgham <bfulgham@apple.com>
853 Expand test infrastructure to support scrolling tests
854 https://bugs.webkit.org/show_bug.cgi?id=143684
855 <rdar://problem/20375516>
857 Reviewed by Simon Fraser.
859 Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.
861 This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
862 function object to be fired when scroll events are finished. The object also keeps track of reasons
863 why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
864 check rendering state in the middle of an animation.
866 Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
867 across multiple threads.
869 * page/FrameView.cpp:
870 (WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
871 (WebCore::FrameView::setScrollPosition): Ditto.
872 (WebCore::FrameView::didAddScrollbar): Ditto.
873 * page/MainFrame.cpp:
874 (WebCore::MainFrame::testTrigger): Moved to Page.
875 (WebCore::MainFrame::ensureTestTrigger): Ditto.
878 (WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
879 (WebCore::Page::ensureTestTrigger): Ditto.
881 * page/WheelEventTestTrigger.cpp:
882 (WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
883 (WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
884 * page/WheelEventTestTrigger.h:
885 * page/mac/EventHandlerMac.mm:
886 (WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
887 any active test trigger object.
888 * page/scrolling/AsyncScrollingCoordinator.cpp:
889 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
890 that the scrolling thread is synced with the main thread.
891 * platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger.
892 (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
893 * platform/cocoa/ScrollController.h:
894 * platform/cocoa/ScrollController.mm:
895 (WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
896 snapping is complete.
897 (WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
898 (WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
900 (WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
901 * platform/mac/ScrollAnimatorMac.mm:
902 (WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
903 (WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
904 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
905 scrolling is complete.
906 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
907 * rendering/RenderBox.cpp:
908 (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
909 (WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
910 to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
911 (WebCore::RenderBox::setScrollTop): Ditto.
912 * rendering/RenderLayer.cpp:
913 (WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
914 * rendering/RenderListBox.cpp:
915 (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
916 (WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
917 to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
918 (WebCore::RenderListBox::setScrollTop): Ditto.
919 (WebCore::RenderListBox::createScrollbar): Ditto.
920 * testing/js/WebCoreTestSupport.cpp:
921 (WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
922 (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
924 2015-04-29 Javier Fernandez <jfernandez@igalia.com>
926 [CSS Box Alignment] Unifying alignment data in a single class
927 https://bugs.webkit.org/show_bug.cgi?id=144384
929 Reviewed by David Hyatt.
931 The new CSS Box Alignment specification introduces more complex
932 values and syntax for defining alignment properties. Most of the
933 alignment values were just keyword identifiers, but the new syntax
934 allows different combinations of identifiers to determine the
935 alignment behavior (eg. overflow-alignment keyword).
937 This patch wll help to implement later overflow handling and
938 specially Content Dstribution alignment, the most complex case by
939 far. It will be more consistent against style changes and repaint,
940 snce we will have just one field to monitoring for value
943 No new tests, because no new functionality was added; it's just a
944 code refactoring which is just expected to pass current tests.
946 * css/CSSComputedStyleDeclaration.cpp:
947 (WebCore::resolveSelfAlignmentAuto):
948 (WebCore::ComputedStyleExtractor::propertyValue):
949 * css/CSSPropertyNames.in:
950 * css/StyleBuilderConverter.h:
951 (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
952 (WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
953 * css/StyleBuilderCustom.h:
954 (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
955 (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
956 (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
957 (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
958 (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
959 (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
960 (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
961 (WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
962 * css/StyleResolver.cpp:
963 (WebCore::StyleResolver::adjustRenderStyle):
964 * mathml/MathMLTextElement.cpp:
965 (WebCore::MathMLTextElement::createElementRenderer):
966 * rendering/RenderFlexibleBox.cpp:
967 (WebCore::RenderFlexibleBox::styleDidChange):
968 * rendering/RenderFullScreen.cpp:
969 (WebCore::createFullScreenStyle):
970 * rendering/RenderMenuList.cpp:
971 (WebCore::RenderMenuList::adjustInnerStyle):
972 * rendering/mathml/RenderMathMLRoot.cpp:
973 (WebCore::RenderMathMLRoot::updateStyle):
974 * rendering/mathml/RenderMathMLScripts.cpp:
975 (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
976 (WebCore::RenderMathMLScripts::fixAnonymousStyles):
977 * rendering/style/RenderStyle.cpp:
978 (WebCore::RenderStyle::resolveAlignment):
979 (WebCore::RenderStyle::resolveJustification):
980 * rendering/style/RenderStyle.h:
981 * rendering/style/StyleRareNonInheritedData.cpp:
982 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
983 (WebCore::StyleRareNonInheritedData::operator==):
984 (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
985 * rendering/style/StyleRareNonInheritedData.h:
986 * rendering/style/StyleSelfAlignmentData.h: Added.
987 (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
988 (WebCore::StyleSelfAlignmentData::setPosition):
989 (WebCore::StyleSelfAlignmentData::setPositionType):
990 (WebCore::StyleSelfAlignmentData::setOverflow):
991 (WebCore::StyleSelfAlignmentData::position):
992 (WebCore::StyleSelfAlignmentData::positionType):
993 (WebCore::StyleSelfAlignmentData::overflow):
994 (WebCore::StyleSelfAlignmentData::operator==):
995 (WebCore::StyleSelfAlignmentData::operator!=):
997 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
999 NodeList has issues with Symbol and empty string
1000 https://bugs.webkit.org/show_bug.cgi?id=144310
1002 Reviewed by Darin Adler.
1004 Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
1005 fast/dom/dataset-name-getter-symbols.html
1006 fast/dom/named-items-with-empty-name.html
1007 fast/dom/named-items-with-symbol-name.html
1008 storage/domstorage/localstorage/named-items.html
1010 Test different bindings objects with custom named setter
1011 and getter handlers. Ensure that they handle Symbol properties
1012 gracefully. Often times avoiding the string path.
1014 * dom/StaticNodeList.cpp:
1015 (WebCore::StaticNodeList::namedItem):
1016 (WebCore::StaticElementList::namedItem):
1017 Better handle the empty string. It should not match an item.
1019 * bindings/js/JSDOMBinding.h:
1020 (WebCore::propertyNameToString):
1021 In cases where we would use this, we should have handled
1024 (WebCore::propertyNameToAtomicString):
1025 For Symbols, use the unique string. This should result
1026 in no matches for a Symbol property.
1028 * bindings/js/JSDOMStringMapCustom.cpp:
1029 (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
1030 (WebCore::JSDOMStringMap::deleteProperty):
1031 (WebCore::JSDOMStringMap::putDelegate):
1032 * bindings/js/JSStorageCustom.cpp:
1033 (WebCore::JSStorage::canGetItemsForName):
1034 (WebCore::JSStorage::nameGetter):
1035 (WebCore::JSStorage::deleteProperty):
1036 (WebCore::JSStorage::putDelegate):
1037 * bindings/js/JSStyleSheetListCustom.cpp:
1038 (WebCore::JSStyleSheetList::canGetItemsForName):
1039 Treat Symbol properties as private properties. They just
1040 go directly through to the Object, and avoid the string
1041 getter/setter property path.
1043 2015-04-29 Eric Carlson <eric.carlson@apple.com>
1045 [Mac] Register with device picker whenever a page has <video>
1046 https://bugs.webkit.org/show_bug.cgi?id=144408
1048 Reviewed by Jer Noble.
1050 * Modules/mediasession/WebMediaSessionManager.cpp:
1051 (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
1052 to the target when it has not routes.
1054 * html/HTMLMediaElement.cpp:
1055 (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the
1056 element is <video> with a video track that does not block wireless playback.
1058 2015-04-29 Martin Robinson <mrobinson@igalia.com>
1060 [GTK] Add support for automatic hyphenation
1061 https://bugs.webkit.org/show_bug.cgi?id=44478
1063 Reviewed by Carlos Garcia Campos.
1065 No new tests. This patch unskips and updates results for existing hyphenation tests.
1067 * PlatformGTK.cmake: Add the libhypen implementation to the source list.
1068 * platform/gtk/GtkUtilities.cpp:
1069 (WebCore::topLevelPath): Add this helper function taken from the test harness.
1070 (WebCore::getWebKitBuildDirectory): Ditto.
1071 * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
1072 * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
1073 so that it can still be shared.
1074 * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
1075 (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
1076 determine the locale that it covers.
1077 (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
1078 as ones in the JHBuild root for testing.
1079 (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
1080 in the JHBuild root.
1081 (WebCore::availableLocales): Getter for global hash of installed dictionaries.
1082 (WebCore::canHyphenate): Added libhyphen implementation.
1083 (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
1084 an open libhyphen dictionary. This is useful so that they can be stored in an MRU
1085 cache. This is a similar approach to the CoreFoundation implementation.
1086 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
1088 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
1089 (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
1090 (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
1091 (WebCore::lastHyphenLocation): Added libhyphen implementation.
1093 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
1095 Unreviewed build fix.
1097 * platform/graphics/mac/FontCacheMac.mm:
1098 (WebCore::fontWithFamily):
1100 2015-04-29 Eric Carlson <eric.carlson@apple.com>
1102 Some media tests assert after r183096
1103 https://bugs.webkit.org/show_bug.cgi?id=144098
1105 Reviewed by Brent Fulgham.
1107 Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
1108 after it has been unregistered. A media element unregisters itself when it is removed from the
1109 document, but scripts can still run and modify state that results in a call to
1110 playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
1111 the various call sites.
1114 (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
1116 (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
1118 2015-04-29 Zalan Bujtas <zalan@apple.com>
1120 Simple line layout: Web process spins endlessly below layoutSimpleLines.
1121 https://bugs.webkit.org/show_bug.cgi?id=144403
1122 rdar://problem/20742783
1124 Reviewed by Antti Koivisto.
1126 When a text fragment overlaps multiple renderes and it does not fit the current line,
1127 we revert the text fragment iterator position so that the overlapping content
1128 gets processed again for the next line.
1129 However, TextFragmentIterator::revertToFragment() was reverting too much and
1130 we started processing old content all over again -> infinite loop.
1132 This patch ensures that text fragment iterator is reverted to the right position.
1134 Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
1136 * rendering/SimpleLineLayout.cpp:
1137 (WebCore::SimpleLineLayout::createLineRuns):
1138 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1139 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
1140 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
1141 * rendering/SimpleLineLayoutTextFragmentIterator.h:
1143 2015-04-29 Filip Pizlo <fpizlo@apple.com>
1145 JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
1146 https://bugs.webkit.org/show_bug.cgi?id=144397
1148 Reviewed by Andreas Kling.
1150 If you override getCallData() and you want to be called a "function", then you need to use the
1151 new TypeOfShouldCallGetCallData flag.
1153 * bindings/scripts/CodeGeneratorJS.pm:
1155 * bridge/objc/objc_runtime.h:
1156 * bridge/runtime_method.h:
1157 * bridge/runtime_object.h:
1159 2015-04-29 Commit Queue <commit-queue@webkit.org>
1161 Unreviewed, rolling out r183553 and r183561.
1162 https://bugs.webkit.org/show_bug.cgi?id=144406
1164 broke the iOS build (Requested by thorton__ on #webkit).
1166 Reverted changesets:
1168 "Switch QuickLook soft-linking to use
1169 QuickLookSoftLink.{h,mm}"
1170 https://bugs.webkit.org/show_bug.cgi?id=144362
1171 http://trac.webkit.org/changeset/183553
1173 "Unreviewed iOS build fix after r183553: fix declaration of
1175 http://trac.webkit.org/changeset/183561
1177 2015-04-29 Antti Koivisto <antti@apple.com>
1179 ResourceLoadPriority should be enum class
1180 https://bugs.webkit.org/show_bug.cgi?id=144326
1182 Reviewed by Darin Adler.
1184 * html/HTMLLinkElement.cpp:
1185 (WebCore::HTMLLinkElement::process):
1186 * loader/LinkLoader.cpp:
1187 (WebCore::LinkLoader::loadLink):
1188 * loader/ResourceLoadScheduler.cpp:
1189 (WebCore::ResourceLoadScheduler::scheduleLoad):
1190 (WebCore::ResourceLoadScheduler::servePendingRequests):
1191 (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
1192 (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
1193 (WebCore::ResourceLoadScheduler::HostInformation::schedule):
1194 (WebCore::ResourceLoadScheduler::HostInformation::remove):
1195 (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
1196 (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
1197 * loader/ResourceLoadScheduler.h:
1198 (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
1200 Modernize ResourceLoadScheduler code a bit while switching to enum class.
1202 * loader/cache/CachedResource.cpp:
1203 (WebCore::defaultPriorityForResourceType):
1204 * loader/cache/CachedResourceLoader.cpp:
1205 (WebCore::CachedResourceLoader::requestResource):
1206 * loader/icon/IconLoader.cpp:
1207 (WebCore::IconLoader::startLoading):
1208 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1209 (WebCore::WebCoreAVFResourceLoader::startLoading):
1210 * platform/network/ResourceLoadPriority.h:
1211 (WebCore::operator++):
1212 (WebCore::operator--):
1213 * platform/network/ResourceRequestBase.cpp:
1214 (WebCore::ResourceRequestBase::adopt):
1215 (WebCore::ResourceRequestBase::copyData):
1216 (WebCore::ResourceRequestBase::cachePolicy):
1217 (WebCore::ResourceRequestBase::priority):
1218 (WebCore::ResourceRequestBase::setPriority):
1219 * platform/network/ResourceRequestBase.h:
1221 Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
1222 Use modern initialization syntax.
1224 (WebCore::ResourceRequestBase::ResourceRequestBase):
1225 (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
1226 * platform/network/cf/ResourceRequestCFNet.cpp:
1227 (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1228 (WebCore::initializeHTTPConnectionSettingsOnStartup):
1229 * platform/network/cf/ResourceRequestCFNet.h:
1230 (WebCore::toResourceLoadPriority):
1231 (WebCore::toPlatformRequestPriority):
1232 * platform/network/soup/ResourceRequest.h:
1233 (WebCore::toSoupMessagePriority):
1234 * testing/Internals.cpp:
1235 (WebCore::stringToResourceLoadPriority):
1237 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
1239 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
1240 https://bugs.webkit.org/show_bug.cgi?id=132159
1242 Reviewed by Darin Adler.
1244 On platforms that support it, delegate font selection logic to the platform. Currently, this is
1245 only supported on Mac, using CTFontCreateForCSS().
1247 This also changes the mechanism that enforces our font whitelist in our tests. We used to
1248 swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
1249 font family names instead.
1251 Note that this patch is a work in progress, because it makes the following tests fail:
1252 fast/css/font-weight-1.html
1253 fast/forms/validation-message-appearance.html
1254 fast/forms/select/optgroup-rendering.html
1256 No new tests, because there is no behavior change.
1258 * platform/graphics/FontCache.h: Add a function to set the whitlist.
1259 * platform/graphics/mac/FontCacheMac.mm:
1260 (WebCore::fontWhitelist):
1261 (WebCore::FontCache::setFontWhitelist):
1262 (WebCore::toAppKitFontWeight):
1263 (WebCore::toCoreTextFontWeight):
1264 (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
1265 (WebCore::FontCache::createFontPlatformData):
1266 * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
1268 2015-04-29 Jer Noble <jer.noble@apple.com>
1270 Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
1272 * platform/ios/QuickLookSoftLink.mm:
1274 2015-04-29 Eric Carlson <eric.carlson@apple.com>
1276 [Mac] Use new device picker menu API
1277 https://bugs.webkit.org/show_bug.cgi?id=144392
1279 Reviewed by Jer Noble.
1281 * Modules/mediasession/WebMediaSessionManager.cpp:
1282 (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
1283 * platform/graphics/MediaPlaybackTargetPicker.h:
1285 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
1286 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1287 (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac): m_deviceChangeTimer -> m_pendingActionTimer.
1288 (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
1289 (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from
1290 outputeDeviceAvailabilityChangedTimerFired.
1291 (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
1292 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
1293 available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
1294 (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
1295 (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it
1296 can now be called from showPlaybackTargetPicker.
1297 (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
1298 pendingActionTimerFired.
1300 * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
1302 2015-04-29 Antti Koivisto <antti@apple.com>
1304 Main resource loaded via 304 response becomes empty if reloaded by user
1305 https://bugs.webkit.org/show_bug.cgi?id=144386
1307 Reviewed by Darin Adler.
1309 Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
1310 DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
1311 conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
1312 Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
1313 However DocumentLoader has no code to handle 304 so we would end up with an empty document.
1315 Test: http/tests/cache/main-resource-304-reload.html
1317 * loader/DocumentLoader.cpp:
1318 (WebCore::DocumentLoader::startLoadingMainResource):
1320 Ensure DocumentLoader doesn't issue conditional requests.
1322 2015-04-28 Jer Noble <jer.noble@apple.com>
1324 Replace HTMLMediaElement's seek timer with a task queue.
1325 https://bugs.webkit.org/show_bug.cgi?id=144353
1327 Reviewed by Eric Carlson.
1329 No change in functionality, so no new tests added.
1331 Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
1332 make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
1333 GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
1336 * WebCore.vcxproj/WebCore.vcxproj:
1337 * WebCore.vcxproj/WebCore.vcxproj.filters:
1338 * WebCore.xcodeproj/project.pbxproj:
1339 * dom/GenericTaskQueue.cpp: Added.
1340 (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
1341 (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
1342 (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
1343 (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
1344 * dom/GenericTaskQueue.h: Added.
1345 (WebCore::GenericTaskQueue::hasPendingTasks):
1346 * html/HTMLMediaElement.cpp:
1347 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
1348 (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
1349 (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
1350 (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
1351 (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
1352 * html/HTMLMediaElement.h:
1354 2015-04-28 David Kilzer <ddkilzer@apple.com>
1356 Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
1357 <http://webkit.org/b/144362>
1359 Reviewed by Andy Estes.
1361 This patch switches soft-linking of QuickLook.framework to
1362 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
1365 No new tests since no change in behavior.
1367 * WebCore.xcodeproj/project.pbxproj:
1368 - Add QuickLookSoftLinking.{h,mm} to the project.
1370 * platform/ios/QuickLookSoftLink.h: Added.
1371 * platform/ios/QuickLookSoftLink.mm: Added.
1372 * platform/mac/SoftLinking.h:
1373 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
1374 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
1376 * platform/network/ios/QuickLook.h:
1377 - Remove unused declarations.
1379 * platform/network/ios/QuickLook.mm:
1380 (WebCore::QLPreviewConverterClass): Deleted.
1381 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
1382 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
1383 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
1384 - Remove SOFT_LINK macros and unused methods after switching to
1385 new QuickLookSoftLink.{h,mm}.
1386 (WebCore::QLPreviewGetSupportedMIMETypesSet):
1387 - Switch to use NeverDestroyed<>.
1388 (WebCore::registerQLPreviewConverterIfNeeded):
1389 (createQLPreviewProtocol):
1390 (WebCore::QLPreviewProtocol):
1391 (WebCore::QuickLookHandle::QuickLookHandle):
1392 (WebCore::QuickLookHandle::create):
1393 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
1394 - Simplify code when using QuickLookSoftLink.h.
1396 * platform/network/ios/WebCoreURLResponseIOS.mm:
1397 - Include QuickLookSoftLink.h header.
1399 2015-04-29 Darin Adler <darin@apple.com>
1401 [ES6] Implement Unicode code point escapes
1402 https://bugs.webkit.org/show_bug.cgi?id=144377
1404 Reviewed by Antti Koivisto.
1406 Test: js/unicode-escape-sequences.html
1408 * css/CSSParser.cpp:
1409 (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
1410 out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
1413 * html/parser/HTMLEntityParser.cpp:
1414 (WebCore::isAlphaNumeric): Deleted.
1415 (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
1416 U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
1417 because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
1418 but maye it's something we want to do in the future.
1419 (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
1420 of a the function in this file that does the same thing less efficiently.
1422 * html/parser/InputStreamPreprocessor.h:
1423 (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
1424 replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
1426 * xml/parser/CharacterReferenceParserInlines.h:
1427 (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
1428 defining our own local highestValidCharacter constant.
1430 2015-04-29 Martin Robinson <mrobinson@igalia.com>
1432 [CMake] [GTK] Organize and clean up unused CMake variables
1433 https://bugs.webkit.org/show_bug.cgi?id=144364
1435 Reviewed by Gyuyoung Kim.
1437 * PlatformGTK.cmake: Add variables specific to this project.
1439 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
1441 REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
1442 https://bugs.webkit.org/show_bug.cgi?id=144388
1444 Reviewed by Brady Eidson.
1446 There used to be a method in ContextMenuItem to check if share
1447 menu item was supported or not, but since r182573, there's a
1448 method to get the share menu item. If the returned menu item is
1449 null, it's not added to the menu, but we are not returning a null
1450 ContextMenu item even though we don't support share menu item.
1452 * platform/gtk/ContextMenuItemGtk.cpp:
1453 (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
1455 2015-04-29 Zan Dobersek <zdobersek@igalia.com>
1457 Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
1458 https://bugs.webkit.org/show_bug.cgi?id=144232
1460 Reviewed by Darin Adler.
1462 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1463 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1464 Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
1466 2015-04-29 Hyungwook Lee <hyungwook.lee@navercorp.com>
1468 Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
1469 https://bugs.webkit.org/show_bug.cgi?id=140261
1471 Reviewed by Darin Adler.
1473 We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
1474 because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
1476 * rendering/RenderView.cpp:
1477 (WebCore::isValidObjectForNewSelection):
1478 (WebCore::RenderView::clearSubtreeSelection):
1479 (WebCore::RenderView::applySubtreeSelection):
1481 2015-04-29 Youenn Fablet <youenn.fablet@crf.canon.fr>
1483 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
1484 https://bugs.webkit.org/show_bug.cgi?id=143711
1486 Reviewed by Darin Adler.
1488 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
1489 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
1490 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
1492 Test: http/tests/appcache/simple-video-sync.html
1494 * html/HTMLMediaElement.cpp:
1495 (WebCore::HTMLMediaElement::parseAttribute):
1496 * loader/DocumentThreadableLoader.cpp:
1497 (WebCore::DocumentThreadableLoader::loadRequest):
1498 * loader/FrameLoader.cpp:
1499 (WebCore::FrameLoader::loadResourceSynchronously):
1500 * loader/FrameLoader.h:
1501 * loader/appcache/ApplicationCacheHost.cpp:
1502 (WebCore::ApplicationCacheHost::maybeLoadResource):
1503 (WebCore::ApplicationCacheHost::createFileURL):
1504 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1505 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1506 * loader/appcache/ApplicationCacheHost.h:
1507 * xml/XSLTProcessorLibxslt.cpp:
1508 (WebCore::docLoaderFunc):
1509 * xml/parser/XMLDocumentParserLibxml2.cpp:
1510 (WebCore::openFunc):
1512 2015-04-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1514 Purge PassRefPtr from createSVGPathSegFoo factory functions
1515 https://bugs.webkit.org/show_bug.cgi?id=144374
1517 Reviewed by Darin Adler.
1519 Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
1520 those factory functions can't return null. Additionally let's remove unnecessary
1521 #include<PassRefPtr.h> there.
1523 No new tests, no behavior changes.
1526 (WebCore::SVGColor::cloneForCSSOM):
1528 * svg/SVGGlyphMap.h:
1529 (WebCore::GlyphMapNode::create):
1531 (WebCore::SVGPaint::cloneForCSSOM):
1533 * svg/SVGPathElement.cpp:
1534 (WebCore::SVGPathElement::createSVGPathSegClosePath):
1535 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
1536 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
1537 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
1538 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
1539 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
1540 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
1541 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
1542 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
1543 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
1544 (WebCore::SVGPathElement::createSVGPathSegArcRel):
1545 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
1546 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
1547 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
1548 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
1549 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
1550 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
1551 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
1552 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
1553 * svg/SVGPathElement.h:
1554 * svg/SVGPathSegArcAbs.h:
1555 (WebCore::SVGPathSegArcAbs::create):
1556 * svg/SVGPathSegArcRel.h:
1557 (WebCore::SVGPathSegArcRel::create):
1558 * svg/SVGPathSegClosePath.h:
1559 (WebCore::SVGPathSegClosePath::create):
1560 * svg/SVGPathSegCurvetoCubicAbs.h:
1561 (WebCore::SVGPathSegCurvetoCubicAbs::create):
1562 * svg/SVGPathSegCurvetoCubicRel.h:
1563 (WebCore::SVGPathSegCurvetoCubicRel::create):
1564 * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
1565 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
1566 * svg/SVGPathSegCurvetoCubicSmoothRel.h:
1567 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
1568 * svg/SVGPathSegCurvetoQuadraticAbs.h:
1569 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
1570 * svg/SVGPathSegCurvetoQuadraticRel.h:
1571 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
1572 * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
1573 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
1574 * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
1575 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
1576 * svg/SVGPathSegLinetoAbs.h:
1577 (WebCore::SVGPathSegLinetoAbs::create):
1578 * svg/SVGPathSegLinetoHorizontalAbs.h:
1579 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
1580 * svg/SVGPathSegLinetoHorizontalRel.h:
1581 (WebCore::SVGPathSegLinetoHorizontalRel::create):
1582 * svg/SVGPathSegLinetoRel.h:
1583 (WebCore::SVGPathSegLinetoRel::create):
1584 * svg/SVGPathSegLinetoVerticalAbs.h:
1585 (WebCore::SVGPathSegLinetoVerticalAbs::create):
1586 * svg/SVGPathSegLinetoVerticalRel.h:
1587 (WebCore::SVGPathSegLinetoVerticalRel::create):
1588 * svg/SVGPathSegMovetoAbs.h:
1589 (WebCore::SVGPathSegMovetoAbs::create):
1590 * svg/SVGPathSegMovetoRel.h:
1591 (WebCore::SVGPathSegMovetoRel::create):
1592 * svg/SVGViewSpec.h:
1593 (WebCore::SVGViewSpec::create):
1594 * svg/animation/SMILTimeContainer.h:
1595 (WebCore::SMILTimeContainer::create):
1596 * svg/animation/SVGSMILElement.cpp:
1597 (WebCore::ConditionEventListener::create):
1598 * svg/graphics/SVGImage.h:
1599 * svg/graphics/SVGImageForContainer.h:
1600 * svg/graphics/filters/SVGFilter.cpp:
1601 (WebCore::SVGFilter::create):
1602 * svg/graphics/filters/SVGFilter.h:
1604 2015-04-28 Simon Fraser <simon.fraser@apple.com>
1606 Make a non-static version of FrameView::yPositionForRootContentLayer()
1607 https://bugs.webkit.org/show_bug.cgi?id=144375
1609 Reviewed by Andy Estes.
1611 There were two calls to the static FrameView::yPositionForRootContentLayer()
1612 which passed in all the arguments for the same FrameView. Make a member
1613 function for convenience.
1615 * page/FrameView.cpp:
1616 (WebCore::FrameView::yPositionForRootContentLayer):
1618 * rendering/RenderLayerCompositor.cpp:
1619 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1621 2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
1623 [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
1624 https://bugs.webkit.org/show_bug.cgi?id=143001
1626 Reviewed by Gyuyoung Kim.
1628 TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
1629 So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
1631 In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
1632 where other coordinated graphics files are located.
1634 * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
1635 * PlatformEfl.cmake:
1636 * PlatformGTK.cmake:
1637 * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
1638 * WebCore.vcxproj/WebCore.vcxproj.filters:
1639 * loader/EmptyClients.h:
1642 * page/ChromeClient.h:
1644 (WebCore::Frame::createView):
1645 * page/FrameView.cpp:
1646 (WebCore::FrameView::requestScrollPositionUpdate):
1649 (WebCore::Page::setPageScaleFactor):
1650 * platform/HostWindow.h:
1651 * platform/ScrollView.cpp:
1652 (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
1653 (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
1654 (WebCore::ScrollView::visibleContentRectInternal):
1655 (WebCore::ScrollView::scrollTo):
1656 * platform/ScrollView.h:
1657 * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
1658 * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
1659 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
1660 * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
1661 * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
1662 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
1664 2015-04-28 Brent Fulgham <bfulgham@apple.com>
1666 REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
1667 https://bugs.webkit.org/show_bug.cgi?id=144366
1668 <rdar://problem/20533513>
1670 Reviewed by Dean Jackson.
1672 * rendering/RenderBlockFlow.cpp:
1673 (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
1674 before attempting to dereference it.
1676 2015-04-28 Andreas Kling <akling@apple.com>
1678 Simplify DOM wrapper destruction, don't deref() in finalizers.
1679 <https://webkit.org/b/144183>
1681 Reviewed by Darin Adler.
1683 DOM JS bindings had two mechanisms to call deref() on the WebCore object,
1684 once through a weak finalizer, and once through the JSCell's regular destructor.
1686 That was once believed to be an optimization, but these days the finalizer will
1687 run just moments before the destructor anyway, all in the same call stack.
1688 And more importantly, the finalizer is not guaranteed to run, for instance in the
1689 case where a Weak is assigned to after going dead, but before the WeakBlock
1690 has been swept by the incremental sweeper.
1692 Simplify this by just removing the deref() from the generated finalizers.
1693 This makes it easier to reason about DOM wrapper destruction, and eliminates
1694 the awkward time window where a DOM wrapper could have a null impl().
1696 We could spend more time on figuring out a way to have finalizers manage the
1697 destruction of these wrappers, but that would require fundamental changes to
1698 our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
1699 destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
1700 However the risk:reward ratio does not seem justified at this point in time.
1702 * bindings/scripts/CodeGeneratorJS.pm:
1704 (GenerateImplementation):
1705 * bindings/js/JSCSSValueCustom.cpp:
1706 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1707 (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
1708 (WebCore::JSTestActiveDOMObjectOwner::finalize):
1709 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1710 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1711 (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
1712 (WebCore::JSTestCustomNamedGetterOwner::finalize):
1713 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1714 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1715 (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
1716 (WebCore::JSTestEventConstructorOwner::finalize):
1717 * bindings/scripts/test/JS/JSTestEventConstructor.h:
1718 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1719 (WebCore::JSTestEventTarget::~JSTestEventTarget):
1720 (WebCore::JSTestEventTargetOwner::finalize):
1721 * bindings/scripts/test/JS/JSTestEventTarget.h:
1722 * bindings/scripts/test/JS/JSTestException.cpp:
1723 (WebCore::JSTestException::~JSTestException):
1724 (WebCore::JSTestExceptionOwner::finalize):
1725 * bindings/scripts/test/JS/JSTestException.h:
1726 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1727 (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
1728 (WebCore::JSTestGenerateIsReachableOwner::finalize):
1729 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1730 * bindings/scripts/test/JS/JSTestInterface.cpp:
1731 (WebCore::JSTestInterface::~JSTestInterface):
1732 (WebCore::JSTestInterfaceOwner::finalize):
1733 * bindings/scripts/test/JS/JSTestInterface.h:
1734 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1735 (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
1736 (WebCore::JSTestMediaQueryListListenerOwner::finalize):
1737 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1738 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1739 (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
1740 (WebCore::JSTestNamedConstructorOwner::finalize):
1741 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1742 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1743 (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
1744 (WebCore::JSTestNondeterministicOwner::finalize):
1745 * bindings/scripts/test/JS/JSTestNondeterministic.h:
1746 * bindings/scripts/test/JS/JSTestObj.cpp:
1747 (WebCore::JSTestObj::~JSTestObj):
1748 (WebCore::JSTestObjOwner::finalize):
1749 * bindings/scripts/test/JS/JSTestObj.h:
1750 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1751 (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
1752 (WebCore::JSTestOverloadedConstructorsOwner::finalize):
1753 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1754 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1755 (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
1756 (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
1757 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1758 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1759 (WebCore::JSTestTypedefs::~JSTestTypedefs):
1760 (WebCore::JSTestTypedefsOwner::finalize):
1761 * bindings/scripts/test/JS/JSTestTypedefs.h:
1762 * bindings/scripts/test/JS/JSattribute.cpp:
1763 (WebCore::JSattribute::~JSattribute):
1764 (WebCore::JSattributeOwner::finalize):
1765 * bindings/scripts/test/JS/JSattribute.h:
1766 * bindings/scripts/test/JS/JSreadonly.cpp:
1767 (WebCore::JSreadonly::~JSreadonly):
1768 (WebCore::JSreadonlyOwner::finalize):
1769 * bindings/scripts/test/JS/JSreadonly.h:
1771 2015-04-28 Alex Christensen <achristensen@webkit.org>
1773 Build WinCairo without cygwin.
1774 https://bugs.webkit.org/show_bug.cgi?id=144365
1776 Reviewed by Myles Maxfield.
1778 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
1779 Pass the CC executable to build-generated-files.pl like r182164.
1780 * WebCore.vcxproj/build-generated-files.pl:
1781 Default to 8 CPUs unless otherwise specified.
1783 2015-04-28 Sam Weinig <sam@webkit.org>
1785 [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
1786 https://bugs.webkit.org/show_bug.cgi?id=144363
1788 Reviewed by Alex Christensen.
1790 This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
1792 * contentextensions/CombinedURLFilters.cpp:
1793 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1794 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
1795 * contentextensions/CombinedURLFilters.h:
1796 Replace function that creates a Vector of all the NFAs with one that allows incremental processing
1797 as they are created.
1799 * contentextensions/ContentExtensionCompiler.cpp:
1800 (WebCore::ContentExtensions::addUniversalActionsToDFA):
1801 Extract code to add universal actions into a helper, since we need to call it in two places now.
1803 (WebCore::ContentExtensions::compileRuleList):
1804 Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
1805 of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
1806 ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
1807 placed on the first DFA.
1809 2015-04-28 Timothy Horton <timothy_horton@apple.com>
1811 [TextIndicator] Yellow highlight takes too long to fade out on scroll
1812 https://bugs.webkit.org/show_bug.cgi?id=144358
1813 <rdar://problem/19451011>
1815 Reviewed by Beth Dakin.
1817 * page/TextIndicator.h:
1818 Add Lifetime and DismissalAnimation enums.
1820 (WebCore::TextIndicator::contentImageWithHighlight):
1821 (WebCore::TextIndicator::contentImage):
1824 * page/mac/TextIndicatorWindow.h:
1825 * page/mac/TextIndicatorWindow.mm:
1826 (WebCore::TextIndicatorWindow::TextIndicatorWindow):
1827 (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1828 (WebCore::TextIndicatorWindow::clearTextIndicator):
1829 (WebCore::TextIndicatorWindow::setTextIndicator):
1830 (WebCore::TextIndicatorWindow::closeWindow):
1831 (WebCore::TextIndicatorWindow::startFadeOut):
1832 Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
1833 This is just about temporary-lifetime TextIndicators, like the ones
1834 you get when the find-in-page UI is hidden but you hit Cmd-G.
1836 Add clearTextIndicator, which takes a DismissalAnimation, providing
1837 clients an opportunity to avoid the normal fade-out animation, if it
1838 was going to happen.
1840 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1842 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1843 https://bugs.webkit.org/show_bug.cgi?id=144304
1845 Reviewed by Geoffrey Garen.
1847 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1849 * Configurations/FeatureDefines.xcconfig:
1851 2015-04-28 Commit Queue <commit-queue@webkit.org>
1853 Unreviewed, rolling out r183514.
1854 https://bugs.webkit.org/show_bug.cgi?id=144359
1856 It broke cloop test bots (Requested by mcatanzaro on #webkit).
1860 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1861 https://bugs.webkit.org/show_bug.cgi?id=144304
1862 http://trac.webkit.org/changeset/183514
1864 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1866 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1867 https://bugs.webkit.org/show_bug.cgi?id=144304
1869 Reviewed by Geoffrey Garen.
1871 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1873 * Configurations/FeatureDefines.xcconfig:
1875 2015-04-28 Zalan Bujtas <zalan@apple.com>
1877 Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
1878 https://bugs.webkit.org/show_bug.cgi?id=144351
1880 Reviewed by Simon Fraser.
1882 This patch ensures that CG context is properly restored after painting dashed/dotted lines.
1884 Test: fast/forms/checkbox-painting-with-hr.html
1886 * platform/graphics/cg/GraphicsContextCG.cpp:
1887 (WebCore::GraphicsContext::drawLine):
1889 2015-04-28 Simon Fraser <simon.fraser@apple.com>
1891 Provide contentsToView() and viewToContents() functions on ScrollView, and use them
1892 https://bugs.webkit.org/show_bug.cgi?id=144357
1894 Reviewed by Tim Horton.
1896 Too much code was consulting topContentInset() and headerHeight() directly. Replace
1897 with calls to new contentsToView() and viewToContents() functions, which wrap the
1898 exisiting documentScrollOffsetRelativeToViewOrigin().
1900 Use the new functions in FrameView and ScrollView coordinate mapping functions.
1904 * page/FrameView.cpp:
1905 (WebCore::FrameView::convertFromRendererToContainingView):
1906 (WebCore::FrameView::convertFromContainingViewToRenderer):
1907 * platform/ScrollView.cpp:
1908 (WebCore::ScrollView::viewToContents):
1909 (WebCore::ScrollView::contentsToView):
1910 (WebCore::ScrollView::rootViewToContents):
1911 (WebCore::ScrollView::contentsToRootView):
1912 (WebCore::ScrollView::rootViewToTotalContents):
1913 (WebCore::ScrollView::windowToContents):
1914 (WebCore::ScrollView::contentsToWindow):
1915 * platform/ScrollView.h:
1917 2015-04-28 Eric Carlson <eric.carlson@apple.com>
1919 [Mac] Simplify code to support media engines which do not support target playback
1920 https://bugs.webkit.org/show_bug.cgi?id=144332
1922 Reviewed by Jer Noble.
1924 * Modules/mediasession/WebMediaSessionManager.cpp:
1925 (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
1926 callback, let them decide if it is significant or not.
1928 * html/HTMLMediaElement.cpp:
1929 (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
1930 (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
1931 (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
1932 (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
1933 (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
1934 (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
1935 (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
1936 (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
1937 (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
1938 event is dispatched when the current target is wireless but the media engine does not support
1939 wireless playback, tell the media engine not to play to the target.
1940 * html/HTMLMediaElement.h:
1941 * html/HTMLMediaElement.idl:
1943 * html/HTMLMediaSession.cpp:
1944 (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
1945 (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
1946 * html/HTMLMediaSession.h:
1948 * platform/graphics/MediaPlayer.cpp:
1949 (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
1950 * platform/graphics/MediaPlayer.h:
1951 * platform/graphics/MediaPlayerPrivate.h:
1953 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1954 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
1955 to explicitly manage the lifetime of the temporary object.
1956 (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
1957 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1959 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1960 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
1961 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
1962 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
1964 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1965 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1966 (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
1967 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
1968 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
1970 2015-04-28 Alex Christensen <achristensen@webkit.org>
1972 [Content Extensions] Use less memory for CombinedURLFilters.
1973 https://bugs.webkit.org/show_bug.cgi?id=144290
1975 Reviewed by Andreas Kling.
1977 * contentextensions/CombinedURLFilters.cpp:
1978 (WebCore::ContentExtensions::recursiveMemoryUsed):
1979 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1980 (WebCore::ContentExtensions::generateNFAForSubtree):
1981 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
1982 * contentextensions/NFA.cpp:
1983 (WebCore::ContentExtensions::NFA::memoryUsed):
1984 (WebCore::ContentExtensions::NFA::setActions):
1985 * contentextensions/NFA.h:
1986 * contentextensions/NFANode.h:
1987 * contentextensions/Term.h:
1988 (WebCore::ContentExtensions::Term::Term::generateGraph):
1989 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1990 Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
1992 2015-04-28 Brady Eidson <beidson@apple.com>
1994 Consolidate most "frame load" arguments into FrameLoadRequest.
1995 https://bugs.webkit.org/show_bug.cgi?id=144276
1997 Reviewed by Alexey Proskuryakov.
1999 No new tests (No change in behavior).
2001 This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
2003 Humble beginnings of this long process:
2004 - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
2005 - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
2006 - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
2007 - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
2009 These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
2010 arguments were from these various call sites.
2012 Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
2013 able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
2016 * inspector/InspectorFrontendClientLocal.cpp:
2017 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2019 * inspector/InspectorPageAgent.cpp:
2020 (WebCore::InspectorPageAgent::navigate):
2022 * loader/FrameLoadRequest.cpp:
2023 (WebCore::FrameLoadRequest::FrameLoadRequest):
2024 * loader/FrameLoadRequest.h:
2025 (WebCore::FrameLoadRequest::FrameLoadRequest):
2026 (WebCore::FrameLoadRequest::lockHistory):
2027 (WebCore::FrameLoadRequest::lockBackForwardList):
2028 (WebCore::FrameLoadRequest::shouldSendReferrer):
2029 (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
2030 (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
2031 (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
2033 * loader/FrameLoader.cpp:
2034 (WebCore::FrameLoader::changeLocation):
2035 (WebCore::FrameLoader::urlSelected):
2036 (WebCore::FrameLoader::loadFrameRequest):
2037 * loader/FrameLoader.h:
2039 * loader/NavigationScheduler.cpp:
2040 (WebCore::NavigationScheduler::scheduleLocationChange):
2042 * page/ContextMenuController.cpp:
2043 (WebCore::openNewWindow):
2044 (WebCore::ContextMenuController::contextMenuItemSelected):
2046 * page/DOMWindow.cpp:
2047 (WebCore::DOMWindow::createWindow):
2049 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
2051 [Mac] [iOS] Implement font-synthesis CSS property
2052 https://bugs.webkit.org/show_bug.cgi?id=144305
2054 Reviewed by Andreas Kling.
2056 This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
2058 The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
2059 determine if we should synthesize bold and italics, this CSS property simply guards that decision.
2061 Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
2062 regarding font-synthesis into FontDescription (from RenderStyle).
2064 Test: fast/css3-text/font-synthesis.html
2066 * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
2067 inside FontDescription. This also means that the property must be marked as a "high priority" property, which
2068 is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
2069 FontCacheIOS and FontCacheMac have access to the saved state.
2070 * css/CSSComputedStyleDeclaration.cpp:
2071 (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
2072 * css/CSSSegmentedFontFace.cpp:
2073 (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
2074 FontSynthesis state inside FontDescription.
2075 * css/StyleBuilderConverter.h:
2076 (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
2077 StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
2079 * css/StyleBuilderCustom.h:
2080 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
2081 * platform/graphics/FontDescription.h:
2082 (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
2083 (WebCore::FontDescription::fontSynthesis): Ditto.
2084 (WebCore::FontDescription::setFontSynthesis): Ditto.
2085 (WebCore::FontDescription::initialFontSynthesis): Ditto.
2086 (WebCore::FontDescription::operator==): Update to include new state.
2087 * platform/graphics/FontCache.h:
2088 (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
2089 state inside FontDescription.
2090 * platform/graphics/ios/FontCacheIOS.mm:
2091 (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
2092 new FontSynthesis state inside FontDescription.
2093 * platform/graphics/mac/FontCacheMac.mm:
2094 (WebCore::FontCache::createFontPlatformData): Ditto.
2095 * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
2096 * rendering/style/RenderStyle.h:
2097 (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
2098 (WebCore::RenderStyle::setFontSynthesis): Ditto.
2099 (WebCore::RenderStyle::initialFontSynthesis): Ditto.
2100 * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
2101 * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
2103 2015-04-28 Youenn Fablet <youenn.fablet@crf.canon.fr>
2105 SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
2106 https://bugs.webkit.org/show_bug.cgi?id=144321
2108 Reviewed by Darin Adler.
2110 Patch correctness covered by existing tests.
2112 * platform/SharedBuffer.cpp:
2113 (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
2115 2015-04-28 Per Arne Vollan <peavo@outlook.com>
2118 https://bugs.webkit.org/show_bug.cgi?id=144327
2120 Reviewed by Brent Fulgham.
2122 When a data url is loaded, the ResourceHandle is not released.
2124 * platform/network/curl/ResourceHandleManager.cpp:
2125 (WebCore::ResourceHandleManager::startJob):
2127 2015-04-28 Andy Estes <aestes@apple.com>
2129 Fix the Mavericks Debug build after r183467.
2131 * platform/network/ResourceRequestBase.h:
2132 (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
2133 (WebCore::ResourceRequestBase::setRequester): Ditto.
2135 2015-04-28 Csaba Osztrogonác <ossy@webkit.org>
2137 Remove make-file-arrays.py
2138 https://bugs.webkit.org/show_bug.cgi?id=144324
2140 Reviewed by Gyuyoung Kim.
2142 * make-file-arrays.py: Removed.
2144 2015-04-28 Antti Koivisto <antti@apple.com>
2148 * platform/network/ios/ResourceRequestIOS.mm:
2149 (WebCore::ResourceRequest::ResourceRequest):
2151 2015-04-28 Antti Koivisto <antti@apple.com>
2153 Network Cache: Disk cache getting filled by YouTube video data
2154 https://bugs.webkit.org/show_bug.cgi?id=144259
2156 Reviewed by Darin Adler.
2158 MSE media is loaded via XHR and tends to eventually fill the cache.
2160 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
2161 We can reduce disk writes and keep more useful resources around by not caching them
2163 Test: http/tests/cache/disk-cache/disk-cache-media.html
2165 * loader/DocumentLoader.cpp:
2166 (WebCore::DocumentLoader::startLoadingMainResource):
2170 * loader/cache/CachedRawResource.cpp:
2171 (WebCore::CachedRawResource::CachedRawResource):
2172 * page/DiagnosticLoggingKeys.cpp:
2173 (WebCore::DiagnosticLoggingKeys::streamingMedia):
2174 * page/DiagnosticLoggingKeys.h:
2175 * platform/network/ResourceRequestBase.cpp:
2176 (WebCore::ResourceRequestBase::adopt):
2177 (WebCore::ResourceRequestBase::copyData):
2178 (WebCore::equalIgnoringHeaderFields):
2179 * platform/network/ResourceRequestBase.h:
2180 (WebCore::ResourceRequestBase::requester):
2181 (WebCore::ResourceRequestBase::setRequester):
2183 Add requester type to the request object. Currently this is main resource, xhr or unspecified.
2185 (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
2186 (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
2187 * platform/network/cf/ResourceRequest.h:
2188 (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
2189 (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
2191 Replace this iOS only field with shared mechanism.
2193 * platform/network/ios/QuickLook.mm:
2194 (WebCore::QuickLookHandle::create):
2195 * xml/XMLHttpRequest.cpp:
2196 (WebCore::XMLHttpRequest::createRequest):
2200 2015-04-28 Namhoon Kim <nakim@ea.com>
2202 Fix windows build error in WebCore related to bulk build.
2203 https://bugs.webkit.org/show_bug.cgi?id=144313
2205 Reviewed by Csaba Osztrogonác.
2207 No new tests because there is no behavior change.
2209 * css/CSSAllInOne.cpp:
2210 * dom/DOMAllInOne.cpp:
2212 2015-04-27 Simon Fraser <simon.fraser@apple.com>
2214 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
2215 https://bugs.webkit.org/show_bug.cgi?id=144198
2217 Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
2218 paths set the style to the existing pointer, but with a SyntheticStyleChange.
2219 We have to avoid an early return in this case.
2221 * rendering/RenderElement.cpp:
2222 (WebCore::RenderElement::setStyle):
2224 2015-04-25 Simon Fraser <simon.fraser@apple.com>
2226 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
2227 https://bugs.webkit.org/show_bug.cgi?id=144198
2229 Reviewed by Darin Adler, Antti Koivisto.
2231 SyntheticStyleChange style recalcs are triggered for cases where behavior depends
2232 on state which is outside of RenderStyle; this includes triggering compositing for
2233 animations, for video and canvas, and for iframes with composited content.
2235 In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
2236 with diff == StyleDifferenceEqual, and so be unable to determine if there
2237 is actual work to be done.
2239 This patch enforces the contract that the diff is never StyleDifferenceEqual if
2240 compositing or other work has to happen from setStyle(). This is achieved by
2241 passing in a 'hasSideEffects' flag, which causes the diff to become at least
2242 StyleDifferenceRecompositeLayer.
2244 RenderLayerCompositor::layerStyleChanged() can now safely early return
2245 if the diff is equal. Future patches will reduce redundant work even more.
2247 Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
2249 * page/animation/AnimationBase.h:
2250 (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
2251 (WebCore::AnimationBase::state):
2252 * page/animation/AnimationController.cpp:
2253 (WebCore::AnimationController::updateAnimations): bool out param which indicates
2254 whether any animations changed state.
2255 * page/animation/AnimationController.h:
2256 * page/animation/CompositeAnimation.cpp:
2257 (WebCore::CompositeAnimation::animate): If any transitions or animations changed
2258 state, set the animationStateChanged out param to true.
2259 * page/animation/CompositeAnimation.h:
2260 * page/animation/ImplicitAnimation.cpp:
2261 (WebCore::ImplicitAnimation::animate): Return true if the state changed.
2262 * page/animation/ImplicitAnimation.h:
2263 * page/animation/KeyframeAnimation.cpp:
2264 (WebCore::KeyframeAnimation::animate): Return true if the state changed.
2265 * page/animation/KeyframeAnimation.h:
2266 * rendering/RenderElement.cpp:
2267 (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
2268 != StyleDifferenceEqual, but still need to do the check to see if layers changed.
2269 (WebCore::RenderElement::initializeStyle): When setting style for the first time,
2270 don't use StyleDifferenceEqual.
2271 (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
2272 change involves side effects. If the diff is equal but the flag is set, change
2273 the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
2274 * rendering/RenderElement.h:
2275 (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
2276 is true, or if animation state changed.
2277 * rendering/RenderLayer.cpp:
2278 (WebCore::RenderLayer::styleChanged): Pass the diff down.
2279 * rendering/RenderLayerCompositor.cpp:
2280 (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
2281 * rendering/RenderLayerCompositor.h:
2282 * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
2283 setting style for the first time.
2284 * style/StyleResolveTree.cpp:
2285 (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
2286 (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
2287 says there are side-effects.
2289 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
2291 [GTK] Add one single option to control all OpenGL-related options
2292 https://bugs.webkit.org/show_bug.cgi?id=144105
2294 Reviewed by Martin Robinson.
2296 Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
2298 * PlatformGTK.cmake:
2300 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
2302 Consolidate one-line flag-related header files into TextFlags.h
2303 https://bugs.webkit.org/show_bug.cgi?id=144295
2305 Reviewed by Tim Horton.
2307 There were a collection of single-line header files throughout platform/ which contain
2308 single-line type declaractions of flags related to text layout & rendering. This patch
2309 consolidates all these single-line headers into TextFlags.h
2311 No new tests because there is no behavior change.
2313 * WebCore.vcxproj/WebCore.vcxproj:
2314 * WebCore.vcxproj/WebCore.vcxproj.filters:
2315 * WebCore.xcodeproj/project.pbxproj:
2316 * css/CSSFontFace.h:
2317 * css/CSSPrimitiveValueMappings.h:
2318 * loader/cache/CachedFont.h:
2319 * loader/cache/CachedTextTrack.h:
2321 * platform/DragImage.h:
2322 * platform/graphics/FontDescription.h:
2323 * platform/graphics/FontOrientation.h: Removed.
2324 * platform/graphics/FontPlatformData.h:
2325 * platform/graphics/FontRenderingMode.h: Removed.
2326 * platform/graphics/FontSmoothingMode.h: Removed.
2327 * platform/graphics/FontTraitsMask.h: Removed.
2328 * platform/graphics/FontWidthVariant.h: Removed.
2329 * platform/graphics/TextRenderingMode.h: Removed.
2330 * platform/graphics/cairo/FontCustomPlatformData.h:
2331 * platform/graphics/freetype/FontPlatformData.h:
2332 * platform/graphics/mac/FontCustomPlatformData.h:
2333 * platform/graphics/win/FontCustomPlatformData.h:
2334 * platform/text/NonCJKGlyphOrientation.h: Removed.
2335 * platform/text/TextFlags.h:
2336 * rendering/TextPainter.h:
2337 * style/StyleFontSizeFunctions.h:
2339 2015-04-27 Daniel Bates <dabates@apple.com>
2341 Form control may be associated with the wrong HTML Form element after form id change
2342 https://bugs.webkit.org/show_bug.cgi?id=133456
2343 <rdar://problem/17095055>
2345 Reviewed by Andy Estes.
2347 Fixes an issue where a form control may be associated with the wrong HTML Form element
2348 after the id of the HTML Form element associated with the form control is changed when
2349 there is more than one HTML Form element with the same id in the document. Specifically,
2350 a form control that has an HTML form attribute value X will always be associated with
2351 some HTML Form element f where f.id = X regardless of whether f.id is subsequently
2354 Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
2355 fast/forms/change-form-id-to-be-unique.html
2358 (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
2359 (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
2360 as to whether we should notify observers of the id change.
2361 (WebCore::Element::updateIdForTreeScope): Ditto.
2362 (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
2363 indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
2364 we have not actually modified it when this method is called. Instead we will notify observers
2365 in Element::attributeChanged(), which is called after the DOM attribute id is modified.
2366 (WebCore::Element::cloneAttributesFromElement): Ditto.
2367 * dom/Element.h: Defined enum class NotifyObservers.
2368 * dom/TreeScope.cpp:
2369 (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
2370 as to whether we should dispatch a notification to all observers.
2371 (WebCore::TreeScope::removeElementById): Ditto.
2374 2015-04-27 Alex Christensen <achristensen@webkit.org>
2376 Reduce allocations and memory usage when compiling content extensions.
2377 https://bugs.webkit.org/show_bug.cgi?id=144277
2379 Reviewed by Benjamin Poulain.
2381 Covered by existing tests.
2383 * contentextensions/Term.h:
2384 (WebCore::ContentExtensions::Term::CharacterSet::set):
2385 (WebCore::ContentExtensions::Term::CharacterSet::get):
2386 (WebCore::ContentExtensions::Term::CharacterSet::invert):
2387 (WebCore::ContentExtensions::Term::CharacterSet::inverted):
2388 (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
2389 (WebCore::ContentExtensions::Term::CharacterSet::operator==):
2390 (WebCore::ContentExtensions::Term::CharacterSet::hash):
2391 (WebCore::ContentExtensions::Term::Term):
2392 (WebCore::ContentExtensions::Term::addCharacter):
2393 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
2394 (WebCore::ContentExtensions::Term::isUniversalTransition):
2395 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
2396 Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
2398 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
2400 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
2401 https://bugs.webkit.org/show_bug.cgi?id=144193
2403 Reviewed by Darin Adler.
2406 * platform/graphics/ANGLEWebKitBridge.cpp:
2407 * platform/graphics/FormatConverter.cpp:
2408 * platform/graphics/FormatConverter.h:
2409 * platform/graphics/GLContext.h:
2410 * platform/graphics/GraphicsContext3D.cpp:
2411 * platform/graphics/GraphicsContext3DPrivate.cpp:
2412 * platform/graphics/OpenGLShims.cpp:
2413 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2414 * platform/graphics/cg/GraphicsContext3DCG.cpp:
2415 * platform/graphics/egl/GLContextEGL.cpp:
2416 * platform/graphics/egl/GLContextEGL.h:
2417 * platform/graphics/glx/GLContextGLX.cpp:
2418 * platform/graphics/glx/GLContextGLX.h:
2419 * platform/graphics/mac/GraphicsContext3DMac.mm:
2420 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2421 * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2422 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2423 * platform/graphics/opengl/GLPlatformContext.cpp:
2424 * platform/graphics/opengl/GLPlatformSurface.cpp:
2425 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2426 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2427 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2428 * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
2429 * platform/graphics/win/GraphicsContext3DWin.cpp:
2431 2015-04-27 Jer Noble <jer.noble@apple.com>
2433 [iOS] Video not centered in element on retina devices
2434 https://bugs.webkit.org/show_bug.cgi?id=144274
2436 Reviewed by Simon Fraser.
2438 In r173702, a transform was added to the video layer (and a matching, inverse transform
2439 in the UIProcess), but this transform affects the position property of the video layer
2440 used to position the video content within the element bounds when their aspect ratios
2443 To work around this problem, pre-apply the transform during -setPosition:.
2445 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2446 (-[WebVideoContainerLayer setPosition:]):
2448 2015-04-27 Jer Noble <jer.noble@apple.com>
2450 Add a setting & restriction which prevents non-interactivte playback of audible media elements.
2451 https://bugs.webkit.org/show_bug.cgi?id=143486
2453 Reviewed by Eric Carlson.
2455 Tests: media/audio-playback-restriction-autoplay.html
2456 media/audio-playback-restriction-play.html
2458 To allow clients who want to allow non-user-interactive video-only playback, but still
2459 restrict playback of audible media elements, add a new setting and matching restriction
2460 which disallows playback of media elements containing audible characteristics.
2462 * html/HTMLMediaElement.cpp:
2463 (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
2464 restriction if the audioPlaybackRequiresUserGesture() setting is set.
2465 (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
2466 out of the #if, as this confuses the heck out of diff and makes all subsequent
2467 changes appear to be within HTMLMediaElement::parseAttribute.
2468 (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
2469 It is checked again immediately after every autoplay() call site.
2470 (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
2471 (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
2472 is permitted, and if not, pause.
2473 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
2474 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
2475 * html/HTMLMediaSession.cpp:
2476 (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
2478 (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
2479 (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and
2480 audio playback is restricted, and return false if so.
2481 * html/HTMLMediaSession.h:
2482 * page/Settings.cpp:
2484 * testing/Internals.cpp:
2485 (WebCore::Internals::setMediaSessionRestrictions): Added.
2486 (WebCore::Internals::setMediaElementRestrictions): Added.
2487 * testing/Internals.h:
2488 * testing/Internals.idl:
2490 2015-04-27 Jer Noble <jer.noble@apple.com>
2492 [WebAudio] AudioContext does not remove user-gesture restriction during resume()
2493 https://bugs.webkit.org/show_bug.cgi?id=144211
2495 Reviewed by Eric Carlson.
2497 Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
2498 webaudio/audiocontext-restriction.html
2500 Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
2501 a user-gesture would start normally, but would effectively mute their outputs. Now that
2502 the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
2503 in the "suspended" state until the user-gesture restriction is lifted.
2505 Add a new method, willBeginPlayback() which checks and potentially clears the context's
2506 behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
2507 method when the state would transition to "running".
2509 Because they may be called before any nodes are created, make sure to call lazyInitialize()
2510 from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
2512 Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
2513 call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
2514 inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
2515 from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
2516 unconditionally, only do so when the user-gesture restriction is set.
2518 Now that an AudioContext will not transition to "running" state without a user-gesture (if
2519 that restriction is set), there's no reason to check for that restriction from inside
2520 AudioDestinationNode.
2522 Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
2524 * Modules/webaudio/AudioBufferSourceNode.cpp:
2525 (WebCore::AudioBufferSourceNode::startPlaying):
2526 * Modules/webaudio/AudioContext.cpp:
2527 (WebCore::AudioContext::nodeWillBeginPlayback):
2528 (WebCore::AudioContext::willBeginPlayback):
2529 (WebCore::AudioContext::willPausePlayback):
2530 (WebCore::AudioContext::startRendering):
2531 (WebCore::AudioContext::suspendContext):
2532 (WebCore::AudioContext::resumeContext):
2533 (WebCore::AudioContext::closeContext):
2534 (WebCore::AudioContext::suspendPlayback):
2535 (WebCore::AudioContext::mayResumePlayback):
2536 * Modules/webaudio/AudioContext.h:
2537 (WebCore::AudioContext::behaviorRestrictions):
2538 (WebCore::AudioContext::userGestureRequiredForAudioStart):
2539 (WebCore::AudioContext::pageConsentRequiredForAudioStart):
2540 * Modules/webaudio/AudioDestinationNode.cpp:
2541 (WebCore::AudioDestinationNode::render):
2542 * Modules/webaudio/AudioScheduledSourceNode.cpp:
2543 (WebCore::AudioScheduledSourceNode::start):
2544 * testing/Internals.cpp:
2545 (WebCore::Internals::setAudioContextRestrictions):
2546 * testing/Internals.h:
2547 * testing/Internals.idl:
2549 2015-04-27 Alexey Proskuryakov <ap@apple.com>
2553 * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2554 Use -setObject:forKey:, not array subscript.
2556 2015-04-27 Eric Carlson <eric.carlson@apple.com>
2558 WirelessTargetPicker should not be visible unless a file is playable
2559 https://bugs.webkit.org/show_bug.cgi?id=144271
2560 <rdar://problem/20712003>
2562 Reviewed by Jer Noble.
2564 * Modules/mediacontrols/mediaControlsApple.js:
2565 (Controller.prototype.isPlayable): New.
2566 (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
2567 (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
2568 status message has been hidden.
2570 2015-04-22 Martin Robinson <mrobinson@igalia.com>
2572 [CMake] Autogenerate cmakeconfig.h.cmake
2573 https://bugs.webkit.org/show_bug.cgi?id=143997
2575 Reviewed by Csaba Osztrogonác.
2577 * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
2578 as the ones exposed to the build.
2580 2015-04-27 Zalan Bujtas <zalan@apple.com>
2582 Simple line layout: Wrong text offsetting when range does not start from the first renderer.
2583 https://bugs.webkit.org/show_bug.cgi?id=144167
2584 rdar://problem/20639857
2586 Reviewed by Simon Fraser.
2588 This patch ensures that TextIterator returns the right text when the input range starts
2589 from a sibling node.
2591 TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
2592 It is required to map simple line layout runs to RenderText positions.
2593 This patch sets the offset value when the iteration start with a sibling node.
2595 Test: fast/text/range-text-with-simple-line-layout.html
2597 * editing/TextIterator.cpp:
2598 (WebCore::TextIterator::TextIterator):
2599 (WebCore::TextIterator::handleTextNode):
2601 2015-04-27 Commit Queue <commit-queue@webkit.org>
2603 Unreviewed, rolling out r183393.
2604 https://bugs.webkit.org/show_bug.cgi?id=144272
2606 Caused memory corruption detected by GuardMalloc (Requested by
2611 "Synchronous XMLHttpRequest should get access to AppCache
2612 resources stored as flat files"
2613 https://bugs.webkit.org/show_bug.cgi?id=143711
2614 http://trac.webkit.org/changeset/183393
2616 2015-04-27 Per Arne Vollan <peavo@outlook.com>
2618 [Curl] Favicons loaded from disc cache are ignored.
2619 https://bugs.webkit.org/show_bug.cgi?id=143953
2621 Reviewed by Alex Christensen.
2623 When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
2624 This happens because we give a 304 response, which makes the icon loader ignore
2625 the response. We can solve this by responding with 200 OK.
2627 * platform/network/ResourceHandleInternal.h:
2628 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2629 * platform/network/curl/CurlCacheManager.cpp:
2630 (WebCore::CurlCacheManager::didReceiveResponse):
2631 * platform/network/curl/ResourceHandleManager.cpp:
2632 (WebCore::headerCallback):
2633 (WebCore::ResourceHandleManager::initializeHandle):
2635 2015-04-27 Brady Eidson <beidson@apple.com>
2637 Make 'enum NavigationType' be an enum class
2638 https://bugs.webkit.org/show_bug.cgi?id=144270
2640 Reviewed by Alex Christensen.
2642 No new tests (No change in behavior).
2644 I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
2645 an enum class first.
2647 * loader/FrameLoader.cpp:
2648 (WebCore::FrameLoader::load):
2649 (WebCore::FrameLoader::reload):
2650 (WebCore::FrameLoader::loadDifferentDocumentItem):
2651 * loader/FrameLoaderTypes.h:
2653 * loader/NavigationAction.cpp:
2654 (WebCore::navigationType):
2655 (WebCore::NavigationAction::NavigationAction):
2657 * loader/PolicyChecker.cpp:
2658 (WebCore::PolicyChecker::checkNavigationPolicy):
2660 * page/PerformanceNavigation.cpp:
2661 (WebCore::PerformanceNavigation::type):
2663 2015-04-27 Yoav Weiss <yoav@yoav.ws>
2665 Fix viewport units in Media Queries
2666 https://bugs.webkit.org/show_bug.cgi?id=144260
2668 Reviewed by Darin Adler.
2670 This patch makes sure that viewport units are considered "length units"
2671 in the context of Media Queries, by having MediaQueryExp use the unit logic
2672 that is in CSSPrimitiveValue.
2673 It does that by turning the relevant methods in CSSPrimitiveValue into static.
2675 It also makes sure that the logic for "resolution units" is not maintained separately
2676 in MediaQueryExp, to avoid similiar issues in the future with resolution units.
2678 Test: fast/media/mq-viewport-units.html
2680 * css/CSSPrimitiveValue.h:
2681 (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
2682 (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
2683 (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
2684 * css/MediaQueryExp.cpp:
2685 (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
2686 (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
2688 2015-04-27 Javier Fernandez <jfernandez@igalia.com>
2690 [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
2691 https://bugs.webkit.org/show_bug.cgi?id=133280
2693 Reviewed by David Hyatt.
2695 Implementation of justify-self and justify-items properties for grid. It supports
2696 different writing-modes and direction. Margins, borders and paddings are also
2697 considered when computing the final position and stretched size.
2699 This patch applies also a quite important refactoring of the alignment logic in
2700 order to share code between the two alignment dimensions, row-axis and column-axis.
2702 Overflow handling is still missing and will be added later in a follow-up bug.
2704 Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
2705 fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
2706 fast/css-grid-layout/grid-align-justify-margin-border-padding.html
2707 fast/css-grid-layout/justify-self-cell.html
2709 * rendering/RenderGrid.cpp:
2710 (WebCore::RenderGrid::layoutGridItems):
2711 (WebCore::RenderGrid::columnAxisPositionForChild):
2712 (WebCore::RenderGrid::rowAxisPositionForChild):
2713 (WebCore::RenderGrid::rowPositionForChild):
2714 (WebCore::RenderGrid::columnPositionForChild):
2715 (WebCore::RenderGrid::findChildLogicalPosition):
2716 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
2717 (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
2718 (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
2719 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
2720 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
2721 * rendering/RenderGrid.h:
2722 * rendering/style/RenderStyle.cpp:
2723 (WebCore::RenderStyle::resolveJustification):
2724 * rendering/style/RenderStyle.h:
2726 2015-04-27 Darin Adler <darin@apple.com>
2728 Crashes under IDBDatabase::closeConnection
2729 https://bugs.webkit.org/show_bug.cgi?id=141745
2731 Reviewed by Alexey Proskuryakov.
2733 * Modules/indexeddb/IDBDatabase.cpp:
2734 (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
2735 actually calling those functions.
2736 (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
2737 in the middle of this function's execution.
2739 2015-04-27 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2741 [Streams API] ReadableStream constructor start function should be able to close the stream
2742 https://bugs.webkit.org/show_bug.cgi?id=143363
2744 Reviewed by Benjamin Poulain.
2746 Implements https://streams.spec.whatwg.org/#close-readable-stream.
2747 When the "close" JS function is called, the stream is getting closed.
2748 The stream state is changed to close and if it has a reader, the reader gets closed as well:
2749 The reader resolves the closed promise and releases the stream.
2751 Enabled the possibility to resolve a promise with any JS value.
2752 This is used to resolve closed promise with jsUndefined and will be used for read promises in
2753 the future as well, though of course it is not restricted to Streams.
2755 Covered by reference tests that are now passing.
2757 * Modules/streams/ReadableStream.h:
2758 * Modules/streams/ReadableStream.cpp:
2759 (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
2760 * Modules/streams/ReadableStreamReader.cpp:
2761 (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
2762 (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
2763 in particular closed/errored state.
2764 (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
2765 (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
2766 immediately if the stream is already closed.
2767 (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
2768 resolves the promise and releases the stream.
2769 * Modules/streams/ReadableStreamReader.h:
2770 (WebCore::ReadableStreamReader::State): Added.
2771 * bindings/js/JSDOMPromise.h:
2772 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
2774 * bindings/js/JSReadableStreamControllerCustom.cpp:
2775 (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
2777 * bindings/js/JSReadableStreamReaderCustom.cpp:
2778 (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
2780 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
2782 Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
2783 https://bugs.webkit.org/show_bug.cgi?id=144255
2785 Reviewed by Carlos Garcia Campos.
2787 * rendering/RenderBox.cpp:
2788 (WebCore::RenderBox::computeLogicalHeight):
2790 2015-04-27 Youenn Fablet <youenn.fablet@crf.canon.fr>
2792 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
2793 https://bugs.webkit.org/show_bug.cgi?id=143711
2795 Reviewed by Darin Adler.
2797 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
2798 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
2799 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
2801 Test: http/tests/appcache/simple-video-sync.html
2803 * html/HTMLMediaElement.cpp:
2804 (WebCore::HTMLMediaElement::parseAttribute):
2805 * loader/DocumentThreadableLoader.cpp:
2806 (WebCore::DocumentThreadableLoader::loadRequest):
2807 * loader/FrameLoader.cpp:
2808 (WebCore::FrameLoader::loadResourceSynchronously):
2809 * loader/FrameLoader.h:
2810 * loader/appcache/ApplicationCacheHost.cpp:
2811 (WebCore::ApplicationCacheHost::maybeLoadResource):
2812 (WebCore::ApplicationCacheHost::createFileURL):
2813 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2814 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
2815 * loader/appcache/ApplicationCacheHost.h:
2816 * xml/XSLTProcessorLibxslt.cpp:
2817 (WebCore::docLoaderFunc):
2818 * xml/parser/XMLDocumentParserLibxml2.cpp:
2819 (WebCore::openFunc):
2821 2015-04-24 Philippe Normand <pnormand@igalia.com>
2823 [JHBuild] Move to upstream OpenWebRTC
2824 https://bugs.webkit.org/show_bug.cgi?id=144145
2826 Reviewed by Carlos Garcia Campos.
2828 * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
2829 (WebCore::initializeOpenWebRTC): Update with new owr_init API.
2831 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2833 [SOUP] Add initial implementation of NetworkProcess disk cache
2834 https://bugs.webkit.org/show_bug.cgi?id=143872
2836 Reviewed by Martin Robinson.
2838 Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
2839 is not a GObject and has copy/free functions instead of ref/unref,
2840 it's internally refcounted, so we could use copy/free as
2843 * PlatformGTK.cmake:
2844 * platform/network/soup/GRefPtrSoup.cpp: Added.
2847 * platform/network/soup/GRefPtrSoup.h: Added.
2849 2015-04-26 Manuel Rego Casasnovas <rego@igalia.com>
2851 [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
2852 https://bugs.webkit.org/show_bug.cgi?id=144144
2854 Reviewed by Darin Adler.
2856 Change order in hasDefiniteLogicalHeight() ifs to consider definite
2857 absolutely positioned elements.
2859 Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
2861 * rendering/RenderBox.cpp:
2862 (WebCore::RenderBox::hasDefiniteLogicalHeight):
2864 2015-04-26 Said Abou-Hallawa <sabouhallawa@apple.com>
2866 SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
2867 https://bugs.webkit.org/show_bug.cgi?id=144137
2869 Reviewed by Darin Adler.
2871 The SourceAlpha should be driven from the last applied FilterEffect. This
2872 will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
2873 than just getting the SourceGraphic reference from FilterEffectRenderer.
2875 This is based on the Blink patch:
2876 https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
2878 Test: svg/filters/sourceAlpha-input-filter-effect.html
2880 * platform/graphics/filters/SourceAlpha.cpp:
2881 (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
2882 rather than a Filter.
2884 (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
2885 rect from the wrapped FilterEffect.
2887 (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
2888 from the wrapped FilterEffect.
2890 (WebCore::SourceAlpha::SourceAlpha):
2891 * platform/graphics/filters/SourceAlpha.h:
2892 (WebCore::SourceAlpha::SourceAlpha): Deleted.
2893 Reimplement the constructor of the SourceAlpha such that it wraps the
2894 sourceEffect in its inputEffects.
2896 * rendering/FilterEffectRenderer.cpp:
2897 (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
2898 comment and do exactly what it said. This matches the implementation of
2901 * rendering/svg/RenderSVGResourceFilter.cpp:
2902 (WebCore::RenderSVGResourceFilter::buildPrimitives):
2903 Delete the extra argument.
2905 * svg/graphics/filters/SVGFilterBuilder.cpp:
2906 (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2907 * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
2908 passed source FilterEffect.
2910 * platform/graphics/filters/FEBlend.cpp:
2911 * platform/graphics/filters/FEBlend.h:
2912 * platform/graphics/filters/FEColorMatrix.cpp:
2913 * platform/graphics/filters/FEColorMatrix.h:
2914 * platform/graphics/filters/FEComponentTransfer.cpp:
2915 * platform/graphics/filters/FEComponentTransfer.h:
2916 * platform/graphics/filters/FEComposite.cpp:
2917 * platform/graphics/filters/FEComposite.h:
2918 * platform/graphics/filters/FEConvolveMatrix.cpp:
2919 * platform/graphics/filters/FEConvolveMatrix.h:
2920 * platform/graphics/filters/FEDiffuseLighting.cpp:
2921 * platform/graphics/filters/FEDiffuseLighting.h:
2922 * platform/graphics/filters/FEDisplacementMap.cpp:
2923 * platform/graphics/filters/FEDisplacementMap.h:
2924 * platform/graphics/filters/FEDropShadow.cpp:
2925 * platform/graphics/filters/FEDropShadow.h:
2926 * platform/graphics/filters/FEFlood.cpp:
2927 * platform/graphics/filters/FEFlood.h:
2928 * platform/graphics/filters/FEGaussianBlur.cpp:
2929 * platform/graphics/filters/FEGaussianBlur.h:
2930 * platform/graphics/filters/FELighting.cpp:
2931 * platform/graphics/filters/FELighting.h:
2932 * platform/graphics/filters/FEMerge.cpp:
2933 * platform/graphics/filters/FEMerge.h:
2934 * platform/graphics/filters/FEMorphology.cpp:
2935 * platform/graphics/filters/FEMorphology.h:
2936 * platform/graphics/filters/FEOffset.cpp:
2937 * platform/graphics/filters/FEOffset.h:
2938 * platform/graphics/filters/FESpecularLighting.cpp:
2939 * platform/graphics/filters/FESpecularLighting.h:
2940 * platform/graphics/filters/FETile.cpp:
2941 * platform/graphics/filters/FETile.h:
2942 * platform/graphics/filters/FETurbulence.cpp:
2943 * platform/graphics/filters/FETurbulence.h:
2944 * platform/graphics/filters/Filter.h:
2945 * platform/graphics/filters/FilterEffect.cpp:
2946 * platform/graphics/filters/FilterEffect.h:
2947 * platform/graphics/filters/SourceGraphic.cpp:
2948 * platform/graphics/filters/SourceGraphic.h:
2949 * rendering/svg/RenderSVGResourceFilter.h:
2950 * rendering/svg/SVGRenderTreeAsText.cpp:
2951 Code clean up: Pointer to reference conversion. It starts by converting
2952 FilterEffect::m_filter from pointer to reference and it kept expanding.
2953 All the creations of FilterEffect were happening by passing "this" so
2954 passing "*this" did not require to check whether the pointer is nil.
2956 * svg/SVGFEBlendElement.cpp:
2957 * svg/SVGFEBlendElement.h:
2958 * svg/SVGFEColorMatrixElement.cpp:
2959 * svg/SVGFEColorMatrixElement.h:
2960 * svg/SVGFEComponentTransferElement.cpp:
2961 * svg/SVGFEComponentTransferElement.h:
2962 * svg/SVGFECompositeElement.cpp:
2963 * svg/SVGFECompositeElement.h:
2964 * svg/SVGFEConvolveMatrixElement.cpp:
2965 * svg/SVGFEConvolveMatrixElement.h:
2966 * svg/SVGFEDiffuseLightingElement.cpp:
2967 * svg/SVGFEDiffuseLightingElement.h:
2968 * svg/SVGFEDisplacementMapElement.cpp:
2969 * svg/SVGFEDisplacementMapElement.h:
2970 * svg/SVGFEDropShadowElement.cpp:
2971 * svg/SVGFEDropShadowElement.h:
2972 * svg/SVGFEFloodElement.cpp:
2973 * svg/SVGFEFloodElement.h:
2974 * svg/SVGFEGaussianBlurElement.cpp:
2975 * svg/SVGFEGaussianBlurElement.h:
2976 * svg/SVGFEImageElement.cpp:
2977 * svg/SVGFEImageElement.h:
2978 * svg/SVGFEMergeElement.cpp:
2979 * svg/SVGFEMergeElement.h:
2980 * svg/SVGFEMorphologyElement.cpp:
2981 * svg/SVGFEMorphologyElement.h:
2982 * svg/SVGFEOffsetElement.cpp:
2983 * svg/SVGFEOffsetElement.h:
2984 * svg/SVGFESpecularLightingElement.cpp:
2985 * svg/SVGFESpecularLightingElement.h:
2986 * svg/SVGFETileElement.cpp:
2987 * svg/SVGFETileElement.h:
2988 * svg/SVGFETurbulenceElement.cpp:
2989 * svg/SVGFETurbulenceElement.h:
2990 * svg/SVGFilterPrimitiveStandardAttributes.h:
2991 * svg/graphics/filters/SVGFEImage.cpp:
2992 * svg/graphics/filters/SVGFEImage.h:
2993 Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
2996 2015-04-26 Darin Adler <darin@apple.com>
2998 REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
2999 https://bugs.webkit.org/show_bug.cgi?id=144237
3001 Reviewed by Simon Fraser.
3003 No test because DumpRenderTree and WebKitTestRunner don't have a good method
3004 for testing behaviors that are specific to active windows. That's the same reason
3005 that the change that caused this bug didn't come with a regression test.
3007 * rendering/RenderTheme.cpp:
3008 (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
3009 clarify the meaning of the setInsideDefaultButton function, and added an
3010 isDisabledFormControl check so it won't trigger on a disabled button.
3011 (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
3012 alphabetical order to match the rest of the switch statement ordering.
3014 * rendering/RenderThemeMac.mm:
3015 (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
3016 alphabetical order to match the rest of the switch statement ordering. Also
3017 fixed its behavior on older versions of OS X; it should just return the same
3018 thing that CSSValueButtontext would return in that context.
3020 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
3022 [ES6] Implement ES6 template literals
3023 https://bugs.webkit.org/show_bug.cgi?id=142691
3025 Reviewed by Darin Adler.
3027 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
3029 * Configurations/FeatureDefines.xcconfig:
3031 2015-04-26 Javier Fernandez <jfernandez@igalia.com>
3033 [CSS Grid Layout] Support for align-self and align-items in grid layout
3034 https://bugs.webkit.org/show_bug.cgi?id=133225
3036 Reviewed by Darin Adler.
3038 Implementation of align-self and align-items properties for grid. It supports
3039 different writing-modes and direction. Margins, borders and paddings are also
3040 considered when computing the final position and stretched size.
3042 Overflow handling is still missing and will be added when implemented row-axis
3045 Test: fast/css-grid-layout/grid-align.html
3047 * rendering/RenderBox.cpp:
3048 (WebCore::RenderBox::computeLogicalHeight):
3049 * rendering/RenderGrid.cpp:
3050 (WebCore::RenderGrid::logicalContentHeightForChild):
3051 (WebCore::RenderGrid::layoutGridItems):
3052 (WebCore::computeOverflowAlignmentOffset):
3053 (WebCore::RenderGrid::endOfRowForChild):
3054 (WebCore::RenderGrid::startOfRowForChild):
3055 (WebCore::RenderGrid::centeredRowPositionForChild):
3056 (WebCore::marginWidthForChild):
3057 (WebCore::marginHeightForChild):
3058 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
3059 (WebCore::RenderGrid::needToStretchChildLogicalHeight):
3060 (WebCore::RenderGrid::marginLogicalHeightForChild):
3061 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
3062 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
3063 (WebCore::RenderGrid::rowPositionForChild):
3064 (WebCore::RenderGrid::findChildLogicalPosition):
3065 (WebCore::RenderGrid::populateGridPositions): Deleted.
3066 * rendering/RenderGrid.h:
3068 2015-04-26 Doug Russell <d_russell@apple.com>
3070 AX: richer text change notifications (142719)
3071 https://bugs.webkit.org/show_bug.cgi?id=142719
3073 Reviewed by Darin Adler.
3075 Richer accessibility value change notifications. Introduce AXTextEditType,
3076 postTextStateChangeNotification and postTextReplacementNotification to give assistive
3077 tech apps more reliable context for responding to changes in web content. Also implement
3078 a mechanism to post value changes in password form fields in coalesced ticks to thwart
3079 analyzing the cadence of changes.
3081 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
3082 and an overload of postTextReplacementNotification to give assistive tech apps more
3083 reliable context for responding to changes in web content selection. Also block posting
3084 selection changes on password fields.
3086 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
3087 platform/mac/accessibility/selection-change-userinfo.html
3088 platform/mac/accessibility/value-change-userinfo.html
3091 * WebCore.vcxproj/WebCore.vcxproj:
3092 * WebCore.vcxproj/WebCore.vcxproj.filters:
3093 * WebCore.xcodeproj/project.pbxproj:
3094 * accessibility/AXObjectCache.cpp:
3095 (WebCore::AXObjectCache::AXObjectCache):
3096 (WebCore::AXObjectCache::notificationPostTimerFired):
3097 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
3098 (WebCore::AXObjectCache::showIntent):
3099 (WebCore::AXObjectCache::setTextSelectionIntent):
3100 (WebCore::isPasswordFieldOrContainedByPasswordField):
3101 (WebCore::AXObjectCache::postTextStateChangeNotification):
3102 (WebCore::AXObjectCache::postTextReplacementNotification):
3103 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
3104 (WebCore::AXObjectCache::rootWebArea):
3105 (WebCore::AXObjectCache::textChangeForEditType):
3106 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
3107 (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
3108 * accessibility/AXObjectCache.h:
3109 (WebCore::AXObjectCache::postTextStateChangeNotification):
3110 (WebCore::AXObjectCache::postTextReplacementNotification):
3111 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3112 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3113 (WebCore::AXObjectCache::textChangeForEditType):
3114 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3115 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
3116 (WebCore::AXObjectCache::getOrCreate): Deleted.
3117 (WebCore::AXObjectCache::attachWrapper): Deleted.
3118 * accessibility/AXTextStateChangeIntent.h: Added.
3119 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
3120 * accessibility/AccessibilityNodeObject.cpp:
3121 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
3122 * accessibility/AccessibilityNodeObject.h:
3123 * accessibility/AccessibilityObject.cpp:
3124 (WebCore::AccessibilityObject::isContainedByPasswordField):
3125 * accessibility/AccessibilityObject.h:
3126 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
3127 (WebCore::AccessibilityObject::isPasswordField): Deleted.
3128 * accessibility/AccessibilityRenderObject.cpp:
3129 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3130 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3131 * accessibility/AccessibilityScrollView.h:
3132 * accessibility/atk/AXObjectCacheAtk.cpp:
3133 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3134 * accessibility/ios/AXObjectCacheIOS.mm:
3135 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3136 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3137 * accessibility/mac/AXObjectCacheMac.mm:
3138 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
3139 (WebCore::AXPostNotificationWithUserInfo):
3140 (WebCore::AXObjectCache::postPlatformNotification):
3141 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3142 (WebCore::textReplacementChangeDictionary):
3143 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3144 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3145 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3146 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
3147 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
3148 (arrayRemovingNonJSONTypes):
3149 (dictionaryRemovingNonJSONTypes):
3150 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
3151 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3152 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3153 (textMarkerRangeFromVisiblePositions):
3154 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3155 * editing/AppendNodeCommand.cpp:
3156 (WebCore::AppendNodeCommand::AppendNodeCommand):
3157 (WebCore::sendAXTextChangedIgnoringLineBreaks):
3158 (WebCore::AppendNodeCommand::doApply):
3159 (WebCore::AppendNodeCommand::doUnapply):
3160 * editing/AppendNodeCommand.h:
3161 (WebCore::AppendNodeCommand::create):
3162 * editing/ApplyStyleCommand.cpp:
3163 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3164 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
3165 * editing/ApplyStyleCommand.h:
3166 * editing/CompositeEditCommand.cpp:
3167 (WebCore::EditCommandComposition::unapplyEditType):
3168 (WebCore::CompositeEditCommand::CompositeEditCommand):
3169 (WebCore::CompositeEditCommand::apply):
3170 (WebCore::CompositeEditCommand::insertParagraphSeparator):
3171 (WebCore::CompositeEditCommand::insertNodeBefore):
3172 (WebCore::CompositeEditCommand::appendNode):
3173 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3174 (WebCore::CompositeEditCommand::insertTextIntoNode):
3175 (WebCore::CompositeEditCommand::deleteTextFromNode):
3176 (WebCore::CompositeEditCommand::replaceTextInNode):
3177 (WebCore::CompositeEditCommand::moveParagraphs):
3178 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3179 (WebCore::CompositeEditCommand::applyStyle): Deleted.
3180 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3181 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3182 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3183 (WebCore::CompositeEditCommand::inputText): Deleted.
3184 * editing/CompositeEditCommand.h:
3185 * editing/DeleteFromTextNodeCommand.cpp:
3186 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3187 (WebCore::DeleteFromTextNodeCommand::doApply):
3188 (WebCore::DeleteFromTextNodeCommand::doUnapply):
3189 * editing/DeleteFromTextNodeCommand.h:
3190 (WebCore::DeleteFromTextNodeCommand::create):
3191 (WebCore::DeleteFromTextNodeCommand::deletedText):
3192 * editing/DeleteSelectionCommand.cpp:
3193 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3194 (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
3195 * editing/DeleteSelectionCommand.h:
3196 (WebCore::DeleteSelectionCommand::create):
3197 * editing/DictationCommand.cpp:
3198 (WebCore::DictationCommand::insertTextRunWithoutNewlines):
3199 (WebCore::DictationCommand::insertParagraphSeparator):
3200 * editing/EditAction.h:
3201 * editing/EditCommand.cpp:
3202 (WebCore::EditCommand::EditCommand):
3203 (WebCore::EditCommand::editingAction):
3204 (WebCore::EditCommand::applyEditType):
3205 (WebCore::EditCommand::unapplyEditType):
3206 (WebCore::SimpleEditCommand::SimpleEditCommand):
3207 (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
3208 (WebCore::EditCommand::setParent): Deleted.
3209 * editing/EditCommand.h:
3210 * editing/EditingAllInOne.cpp:
3211 * editing/Editor.cpp:
3212 (WebCore::Editor::handleTextEvent):
3213 (WebCore::Editor::deleteSelectionWithSmartDelete):
3214 (WebCore::Editor::replaceSelectionWithFragment):
3215 (WebCore::Editor::replaceSelectionWithText):
3216 (WebCore::Editor::appliedEditing):
3217 (WebCore::Editor::unappliedEditing):
3218 (WebCore::Editor::performCutOrCopy):
3219 (WebCore::Editor::markMisspellingsAfterTypingToWord):
3220 (WebCore::Editor::changeBackToReplacedString):
3221 (WebCore::Editor::transpose):
3222 (WebCore::Editor::changeSelectionAfterCommand):
3224 * editing/EditorCommand.cpp:
3225 (WebCore::executeInsertFragment):
3226 * editing/FrameSelection.cpp:
3227 (WebCore::FrameSelection::moveTo):
3228 (WebCore::FrameSelection::moveWithoutValidationTo):
3229 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
3230 (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3231 (WebCore::FrameSelection::setSelection):
3232 (WebCore::FrameSelection::updateAndRevealSelection):
3233 (WebCore::isBoundary):
3234 (WebCore::FrameSelection::textSelectionIntent):
3235 (WebCore::FrameSelection::modify):
3236 (WebCore::FrameSelection::selectAll):
3237 (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
3238 (WebCore::FrameSelection::modifyMovingBackward): Deleted.
3239 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
3240 (WebCore::FrameSelection::selectionAtWordStart): Deleted.
3241 * editing/FrameSelection.h:
3242 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3243 (WebCore::FrameSelection::selection): Deleted.
3244 * editing/InsertIntoTextNodeCommand.cpp:
3245 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3246 (WebCore::InsertIntoTextNodeCommand::doApply):
3247 (WebCore::InsertIntoTextNodeCommand::doUnapply):
3248 * editing/InsertIntoTextNodeCommand.h:
3249 (WebCore::InsertIntoTextNodeCommand::create):
3250 (WebCore::InsertIntoTextNodeCommand::insertedText):
3251 * editing/InsertNodeBeforeCommand.cpp:
3252 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3253 (WebCore::InsertNodeBeforeCommand::doApply):
3254 (WebCore::InsertNodeBeforeCommand::doUnapply):
3255 * editing/InsertNodeBeforeCommand.h:
3256 (WebCore::InsertNodeBeforeCommand::create):
3257 * editing/InsertParagraphSeparatorCommand.cpp:
3258 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3259 * editing/InsertParagraphSeparatorCommand.h:
3260 (WebCore::InsertParagraphSeparatorCommand::create):
3261 * editing/InsertTextCommand.cpp:
3262 (WebCore::InsertTextCommand::InsertTextCommand):
3263 * editing/InsertTextCommand.h:
3264 (WebCore::InsertTextCommand::create):
3265 (WebCore::InsertTextCommand::createWithMarkerSupplier):
3266 * editing/MoveSelectionCommand.cpp:
3267 (WebCore::MoveSelectionCommand::doApply):
3268 * editing/RemoveNodePreservingChildrenCommand.cpp:
3269 (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
3270 * editing/RemoveNodePreservingChildrenCommand.h:
3271 (WebCore::RemoveNodePreservingChildrenCommand::create):
3272 * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3273 (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
3274 (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
3275 * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3276 * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
3277 (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
3278 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
3279 * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
3280 * editing/ReplaceSelectionCommand.cpp:
3281 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3282 (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
3283 (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
3284 * editing/ReplaceSelectionCommand.h:
3285 (WebCore::ReplaceSelectionCommand::create):
3286 * editing/TypingCommand.cpp:
3287 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3288 (WebCore::TypingCommand::insertParagraphSeparator):
3289 * editing/atk/FrameSelectionAtk.cpp:
3290 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3291 * editing/ios/DictationCommandIOS.cpp:
3292 (WebCore::DictationCommandIOS::DictationCommandIOS):
3293 * editing/ios/DictationCommandIOS.h:
3294 * editing/mac/FrameSelectionMac.mm:
3295 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3296 * html/HTMLTextFormControlElement.cpp:
3297 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3298 * page/DragController.cpp:
3299 (WebCore::DragController::concludeEditDrag):
3300 * page/EventHandler.cpp:
3301 (WebCore::setInitialKeyboardSelection):
3302 * page/FocusController.cpp:
3303 (WebCore::FocusController::advanceFocusInDocumentOrder):
3305 2015-04-26 Darin Adler <darin@apple.com>
3307 REGRESSION (r176751): line-height ignored in <button> elements
3308 https://bugs.webkit.org/show_bug.cgi?id=144234
3310 Reviewed by Antti Koivisto.
3312 Test: fast/forms/button-line-height.html
3314 The theme code was overriding line heights on all themed form controls.
3315 Instead it should have only overridden line height when the theme overrides the font.
3316 For <input type=button> on Mac, the theme always overrides the font, but for
3317 other elements like <button> it does not.
3319 * platform/Theme.h: Changed controlFont to return an Optional so we can tell
3320 when the theme is overriding the font. Otherwise if the font from the user-agent
3321 style sheet and the font from the theme are the same, we will think we are not
3322 overriding the font when we actually are.
3324 * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
3325 * platform/mac/ThemeMac.mm:
3326 (WebCore::ThemeMac::controlFont): Ditto.
3328 * rendering/RenderTheme.cpp:
3329 (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
3330 overriden by the theme, all the time for PushButtonPart on Mac, and not at all
3331 for other parts. Also tightened up the logic a little since RenderStyle's
3332 setFontDescription already does an "==" comparison; we don't have to do
3335 2015-04-26 Darin Adler <darin@apple.com>
3337 REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
3338 https://bugs.webkit.org/show_bug.cgi?id=137163
3340 Reviewed by Andy Estes.
3342 Test: fast/notifications/request-notification-permission-while-reloading.html
3344 The test doesn't crash under WebKit2, but that's still OK for our purposes.
3346 * Modules/notifications/NotificationCenter.cpp:
3347 (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
3348 (WebCore::NotificationCenter::createNotification): Moved here from the header.
3349 (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
3350 center when we need to defer a callback. Also use a lambda for the callback and changed
3351 the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
3352 bindings were not transferring ownership of the VoidCallback. The new type is a little
3353 strange but it's consistent with how the bindings work right now.
3354 (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
3355 to match the ref we did above.
3356 (WebCore::NotificationCenter::requestTimedOut): Deleted.
3357 (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
3358 (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
3359 (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
3360 (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
3362 * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
3363 Changed the argument type for requestPermission to match the reality of what's passed by the
3364 bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
3365 vector of std::function.
3367 2015-04-26 Simon Fraser <simon.fraser@apple.com>
3369 Modernize animations code
3370 https://bugs.webkit.org/show_bug.cgi?id=144196
3372 Reviewed by Darin Adler.
3374 General cleanup in animation-related code.
3376 Use C++ references where possible. Use modern loops. Make classes fast-allocated.
3377 Use C++11 member initialization. Order member variables to optimize packing.
3379 This removes some null checks in CompositeAnimation, but the values in m_transitions
3380 and m_keyframeAnimations can never be null.
3384 * page/animation/AnimationBase.cpp:
3385 (WebCore::AnimationBase::AnimationBase):
3386 (WebCore::AnimationBase::animationsMatch):
3387 (WebCore::AnimationBase::updateStateMachine):
3388 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3389 (WebCore::AnimationBase::beginAnimationUpdateTime):
3390 (WebCore::AnimationBase::getElapsedTime):
3391 * page/animation/AnimationBase.h:
3392 (WebCore::AnimationBase::animation):
3393 (WebCore::AnimationBase::setAnimation):
3394 * page/animation/AnimationController.cpp:
3395 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
3396 (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
3397 * page/animation/CompositeAnimation.cpp:
3398 (WebCore::CompositeAnimation::CompositeAnimation):
3399 (WebCore::CompositeAnimation::clearRenderer):
3400 (WebCore::CompositeAnimation::updateTransitions):
3401 (WebCore::CompositeAnimation::updateKeyframeAnimations):
3402 (WebCore::CompositeAnimation::animate):
3403 (WebCore::CompositeAnimation::getAnimatedStyle):
3404 (WebCore::CompositeAnimation::timeToNextService):
3405 (WebCore::CompositeAnimation::getAnimationForProperty):
3406 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
3407 (WebCore::CompositeAnimation::suspendAnimations):
3408 (WebCore::CompositeAnimation::resumeAnimations):
3409 (WebCore::CompositeAnimation::overrideImplicitAnimations):
3410 (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
3411 (WebCore::CompositeAnimation::isAnimatingProperty):
3412 (WebCore::CompositeAnimation::pauseTransitionAtTime):
3413 (WebCore::CompositeAnimation::numberOfActiveAnimations):
3414 * page/animation/CompositeAnimation.h:
3415 (WebCore::CompositeAnimation::create):
3416 (WebCore::CompositeAnimation::animationController):
3417 * page/animation/ImplicitAnimation.cpp:
3418 (WebCore::ImplicitAnimation::ImplicitAnimation):
3419 (WebCore::ImplicitAnimation::sendTransitionEvent):
3420 * page/animation/ImplicitAnimation.h:
3421 (WebCore::ImplicitAnimation::create):
3422 * page/animation/KeyframeAnimation.cpp:
3423 (WebCore::KeyframeAnimation::KeyframeAnimation):
3424 (WebCore::KeyframeAnimation::animate):
3425 (WebCore::KeyframeAnimation::getAnimatedStyle):
3426 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3427 (WebCore::KeyframeAnimation::startAnimation):
3428 (WebCore::KeyframeAnimation::sendAnimationEvent):
3429 (WebCore::KeyframeAnimation::overrideAnimations):
3430 (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
3431 (WebCore::KeyframeAnimation::timeToNextService):
3432 * page/animation/KeyframeAnimation.h:
3433 * platform/animation/Animation.cpp:
3434 (WebCore::Animation::animationsMatch):
3435 * platform/animation/Animation.h:
3436 * rendering/RenderLayer.cpp:
3437 (WebCore::RenderLayer::paint):
3438 (WebCore::performOverlapTests):
3439 * rendering/style/KeyframeList.h:
3440 (WebCore::KeyframeList::properties):
3441 (WebCore::KeyframeList::keyframes):
3442 (WebCore::KeyframeList::beginProperties): Deleted.
3443 (WebCore::KeyframeList::endProperties): Deleted.
3444 (WebCore::KeyframeList::operator[]): Deleted.
3445 * rendering/style/RenderStyle.h:
3447 2015-04-25 Simon Fraser <simon.fraser@apple.com>
3449 Expand compositing coverage rect when scrolling and animating
3450 https://bugs.webkit.org/show_bug.cgi?id=144214
3451 rdar://problem/20695926
3453 Reviewed by Darin Adler.
3455 r183300 added a secondary rect that gets mapped through graphics layers during
3456 layer flushing, which represents a rect, in layer coordinates, that represents
3457 the portion of this layer that's visible in the viewport.
3459 This patch extends that rect based on scrolling and animating, with the extended
3460 coverage rect being mapped into descendants (where it's used to determine whether
3461 they should detach their backing store). This required moving the responsibility for
3462 extending the coverage rect from TileController (where it was used to compute
3463 tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
3464 of coverage rect, and pushes it onto TileControllers.
3466 Test: compositing/tiling/transform-origin-tiled.html
3468 * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
3469 TiledBacking from outside; new functions reflect that.
3470 * platform/graphics/ca/GraphicsLayerCA.cpp:
3471 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
3472 old visible rect to commitLayerChangesBeforeSublayers.
3473 (WebCore::accumulatesTransform):
3474 (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
3475 then adjustCoverageRect() which adjusts for scrolling and animations.
3476 (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
3477 TransformState, but we can only use this if mapping it through various transforms didn't clamp
3478 it (which can happen with severe rotations in perspective).
3479 (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
3480 ask the TileController to do coverage adjustment (code which should move into here eventually).
3481 For other tiled layers, do motion-based adjustment. This should really be done for all layers
3482 (an animating non-tiled layer may contain a tiled layer).
3483 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
3484 any more; layers only react to changed in coverage rect now.
3485 (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
3486 coverage rect, here we push the new rect back into the TransformState so it will affect
3488 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3489 (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
3491 (WebCore::GraphicsLayerCA::changeLayerTypeTo):
3492 (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
3493 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
3494 (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
3495 * platform/graphics/ca/GraphicsLayerCA.h:
3496 * platform/graphics/ca/TileController.cpp:
3497 (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
3499 (WebCore::TileController::setCoverageRect):
3500 (WebCore::TileController::tilesWouldChangeForCoverageRect):
3501 (WebCore::TileController::revalidateTiles):
3502 (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
3503 is called at the top of committing the owning layer, we haven't yet pushed a new size to the
3504 underlying platform layer (which TileController::bounds() consults).
3505 (WebCore::TileController::bounds):
3506 (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
3507 underlying layer hasn't been updated yet.
3508 (WebCore::TileController::didRevalidateTiles):
3509 (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
3510 * platform/graphics/ca/TileController.h:
3511 * platform/graphics/ca/TileCoverageMap.cpp:
3512 (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows
3513 a dark blue outline for the coverage rect.
3514 (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
3515 content inset is non-zero.
3516 * platform/graphics/ca/TileCoverageMap.h:
3517 * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
3518 (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
3519 (WebCore::TileGrid::revalidateTiles):
3520 (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
3521 * platform/graphics/ca/TileGrid.h:
3522 * platform/graphics/transforms/TransformState.cpp:
3523 (WebCore::TransformState::operator=):
3524 (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
3525 (WebCore::TransformState::mappedSecondaryQuad): Ditto.
3526 (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
3527 to pass in a secondary quad, and get it mapped into the coordinate space of the last
3528 "flattening" state (since the TransformState may have in-flight XY offset, or transform).
3529 This mapping is achieved by re-using mapQuad(), but in the inverse direction.
3530 (WebCore::TransformState::mapQuad): Make direction a parameter.
3531 (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
3532 quad. Failure was detected by tests.
3533 * platform/graphics/transforms/TransformState.h:
3534 (WebCore::TransformState::isMappingSecondaryQuad):
3535 (WebCore::TransformState::direction):
3536 (WebCore::TransformState::inverseDirection):
3537 (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
3539 2015-04-25 Dan Bernstein <mitz@apple.com>
3541 Updated expected bindings generation test results after r183343.
3543 * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
3544 * bindings/scripts/test/ObjC/DOMTestCallback.h:
3545 * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
3546 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
3547 * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
3548 * bindings/scripts/test/ObjC/DOMTestException.h:
3549 * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
3550 * bindings/scripts/test/ObjC/DOMTestInterface.h:
3551 * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
3552 * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
3553 * bindings/scripts/test/ObjC/DOMTestNode.h:
3554 * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
3555 * bindings/scripts/test/ObjC/DOMTestObj.h:
3556 * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
3557 * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
3558 * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
3559 * bindings/scripts/test/ObjC/DOMattribute.h:
3560 * bindings/scripts/test/ObjC/DOMreadonly.h:
3562 2015-04-25 Myles C. Maxfield <mmaxfield@apple.com>
3564 font-synthesis's initial value is "style weight"
3565 https://bugs.webkit.org/show_bug.cgi?id=144195
3567 Reviewed by Darin Adler.
3569 Updated fast/css3-text/font-synthesis-parse.html.
3571 * rendering/style/RenderStyle.h:
3573 2015-04-25 Commit Queue <commit-queue@webkit.org>
3575 Unreviewed, rolling out r183305.
3576 https://bugs.webkit.org/show_bug.cgi?id=144213
3578 Crashes on wikipedia (Requested by litherum on #webkit).
3582 "[Cocoa] FontPlatformData's equality check should always use
3584 https://bugs.webkit.org/show_bug.cgi?id=144168
3585 http://trac.webkit.org/changeset/183305
3587 2015-04-25 Dan Bernstein <mitz@apple.com>
3589 WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
3590 https://bugs.webkit.org/show_bug.cgi?id=144201
3592 Reviewed by Darin Adler.
3594 Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
3597 * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
3598 use 9876_5 in availability macros. Removed the definition of
3599 __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
3601 * bindings/scripts/CodeGeneratorObjC.pm:
3602 (ReadPublicInterfaces): Use 9876_5 instead of TBD.
3604 2015-04-25 Timothy Hatcher <timothy@apple.com>
3606 Update localized strings.
3608 * English.lproj/Localizable.strings: Updated.
3610 2015-04-25 Darin Adler <darin@apple.com>
3612 Crash if IDBTransaction is aborted right after it's created
3613 https://bugs.webkit.org/show_bug.cgi?id=144199
3615 Reviewed by Simon Fraser.
3617 Test: storage/indexeddb/transaction-abort.html
3619 * Modules/indexeddb/IDBTransactionBackend.cpp:
3620 (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
3621 transaction if it is already complete (has been aborted).
3623 2015-04-25 Martin Robinson <mrobinson@igalia.com>
3625 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
3626 https://bugs.webkit.org/show_bug.cgi?id=144182
3628 Reviewed by Simon Fraser.
3630 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3631 * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3632 * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3633 * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3634 * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3635 * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3636 * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3637 * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3638 * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3639 * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3640 * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3642 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3644 [Cocoa] FontPlatformData's equality check should always use reference URLs
3645 https://bugs.webkit.org/show_bug.cgi?id=144168
3647 Reviewed by Tim Horton.
3649 <rdar://problem/18985642> is not fixed, so we need to continue using the older
3650 objectForEqualityCheck().
3652 No new tests because there is no behavior change.
3654 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3655 (WebCore::FontPlatformData::objectForEqualityCheck):
3657 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3659 Implement parsing support for font-synthesis CSS property
3660 https://bugs.webkit.org/show_bug.cgi?id=144180
3661 <rdar://problem/20692791>
3662 <rdar://problem/20625024>
3664 Reviewed by Tim Horton.
3666 See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
3668 This property allows web authors to opt out of font synthesis. This patch only
3669 implements parsing support for the property.
3671 Test: fast/css3-text/font-synthesis-parse.html
3673 * css/CSSComputedStyleDeclaration.cpp:
3674 (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
3675 (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
3676 * css/CSSParser.cpp:
3677 (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
3678 (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
3679 "none | [ weight || style ]"
3680 * css/CSSParser.h: Function signature.
3681 * css/CSSPropertyNames.in: New CSS property name.
3682 * css/CSSValueKeywords.in: New CSS value names.
3683 * css/StyleBuilderCustom.h:
3684 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
3685 representation of font-synthesis for a given CSSValue.
3686 * rendering/style/RenderStyle.h: Function signature.
3687 * rendering/style/RenderStyleConstants.h: Internal representation of
3689 * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
3690 related to this internal representation.
3692 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3694 Have the web inspector report accurate memory use for layers with detached backing store
3695 https://bugs.webkit.org/show_bug.cgi?id=144179
3697 Reviewed by Dean Jackson.
3699 Only report memory use for layers whose backing store is attached.
3701 * platform/graphics/ca/GraphicsLayerCA.cpp:
3702 * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
3703 which platforms can override if they allow backing store detaching.
3705 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3707 Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
3708 https://bugs.webkit.org/show_bug.cgi?id=144165
3710 Reviewed by Dean Jackson.
3712 Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
3713 which maps this rect through all the layers. Each layer tests intersection with
3714 this rect to determine if its backing store should be attached.
3716 This will cause us to drop backing store for layers that don't intersect the
3717 visible part of the view, which is too aggressive. A future patch will add
3720 Tests: compositing/visible-rect/coverage-clipped.html
3721 compositing/visible-rect/coverage-scrolling.html
3723 * platform/graphics/ca/GraphicsLayerCA.cpp:
3724 (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
3725 C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
3726 (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
3727 secondary coverage rect. A future patch will inflate this on the way down the tree.
3728 (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
3729 we have a secondary coverage rect, that rect can be clipped to us too.
3730 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
3731 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3732 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3733 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
3734 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
3735 * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
3736 Use more C++11 initializers.
3737 (WebCore::GraphicsLayerCA::coverageRect):
3739 2015-04-24 Dean Jackson <dino@apple.com>
3741 AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
3742 https://bugs.webkit.org/show_bug.cgi?id=144173
3743 <rdar://problem/20526168>
3745 Reviewed by Simon Fraser.
3747 Keep a list of Animations that care about scroll updates, and only
3748 run the animation update if the list is not empty.
3750 Covered by existing tests.
3752 * page/animation/AnimationBase.cpp:
3753 (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
3754 if this is an animation that depends on scrolling.
3755 * page/animation/AnimationController.cpp:
3756 (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
3757 new removeFromAnimationsDependentOnScroll as this animation is deleted.
3758 (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
3759 (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
3760 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
3761 there are animations that care.
3762 (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
3764 * page/animation/AnimationController.h:
3765 * page/animation/AnimationControllerPrivate.h:
3766 (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
3768 2015-04-24 Tim Horton <timothy_horton@apple.com>
3770 WKPDFView does not support password-protected PDFs
3771 https://bugs.webkit.org/show_bug.cgi?id=144162
3772 <rdar://problem/18411512>
3774 Reviewed by Andy Estes.
3776 * English.lproj/Localizable.strings:
3777 Add some localizable strings.
3779 2015-04-24 David Kilzer <ddkilzer@apple.com>
3781 Fix iOS EWS builds after updating to iOS 8.3 SDK
3783 * platform/spi/cocoa/CoreTextSPI.h:
3784 * rendering/RenderThemeIOS.mm:
3785 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3786 - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
3788 2015-04-24 Jer Noble <jer.noble@apple.com>
3790 Unreviewed iOS build fix; add declarations to AVKitSPI.h
3792 * platform/spi/cocoa/AVKitSPI.h:
3794 2015-04-24 Enrica Casucci <enrica@apple.com>
3796 Make rangeExpandedAroundPositionByCharacters to all platforms.
3797 https://bugs.webkit.org/show_bug.cgi?id=144161
3799 Reviewed by Tim Horton.
3801 No change in functionality, simply making this available
3804 * editing/VisibleUnits.cpp:
3805 (WebCore::rangeExpandedAroundPositionByCharacters):
3806 * editing/VisibleUnits.h:
3807 * editing/mac/DataDetection.mm:
3808 * editing/mac/DictionaryLookup.h:
3809 * editing/mac/DictionaryLookup.mm:
3810 (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
3812 2015-04-24 Andreas Kling <akling@apple.com>
3814 Purge PassRefPtr from NamedNodeMap.
3815 <https://webkit.org/b/144091>
3817 Reviewed by Antti Koivisto.
3819 Use RefPtr instead of PassRefPtr in NamedNodeMap.
3821 * dom/NamedNodeMap.cpp:
3822 (WebCore::NamedNodeMap::getNamedItem):
3823 (WebCore::NamedNodeMap::getNamedItemNS):
3824 (WebCore::NamedNodeMap::removeNamedItem):
3825 (WebCore::NamedNodeMap::removeNamedItemNS):
3826 (WebCore::NamedNodeMap::setNamedItem):
3827 (WebCore::NamedNodeMap::setNamedItemNS):
3828 (WebCore::NamedNodeMap::item):
3829 * dom/NamedNodeMap.h:
3831 2015-04-24 Commit Queue <commit-queue@webkit.org>
3833 Unreviewed, rolling out r183266.
3834 https://bugs.webkit.org/show_bug.cgi?id=144164
3836 Broke 32-bit build and a test. (Requested by ap on #webkit).
3840 "AX: richer text change notifications (142719)"
3841 https://bugs.webkit.org/show_bug.cgi?id=142719
3842 http://trac.webkit.org/changeset/183266
3844 2015-04-24 Brady Eidson <beidson@apple.com>
3846 Origin header is preserved on cross-origin redirects.
3847 https://bugs.webkit.org/show_bug.cgi?id=144157.
3849 Reviewed by Sam Weinig.
3851 Tests: http/tests/security/cors-post-redirect-301.html
3852 http/tests/security/cors-post-redirect-302.html
3853 http/tests/security/cors-post-redirect-307.html
3854 http/tests/security/cors-post-redirect-308.html
3856 * platform/network/cf/ResourceHandleCFNet.cpp:
3857 (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
3858 * platform/network/mac/ResourceHandleMac.mm:
3859 (WebCore::ResourceHandle::willSendRequest): Ditto.
3861 2015-04-24 Brent Fulgham <bfulgham@apple.com>
3863 Immediate action not functional for embedded PDFs
3864 https://bugs.webkit.org/show_bug.cgi?id=143952
3865 <rdar://problem/19842365>
3867 Reviewed by Tim Horton.
3869 Add a dictionary lookup method to allow us to retrieve
3870 relevant information for PDFs.
3872 * editing/mac/DictionaryLookup.mm:
3873 (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
3874 where the Lookup engine selects a smaller range than the initial automatic
3875 selection performed on clicking.
3877 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3879 Make it possible to map a secondary quad through TransformState
3880 https://bugs.webkit.org/show_bug.cgi?id=144156
3882 Reviewed by Dean Jackson.
3884 A future patch will need to map two quads simultaneously through TransformState,
3885 so add the ability to provide an optional secondary quad.
3887 This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
3888 requiring the state to be flattened when setting the quad (and now, the secondary quad).
3889 Previously, setQuad implicitly flattened but failed to update m_mapPoint when
3892 * platform/graphics/ca/GraphicsLayerCA.cpp:
3893 (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
3894 before setting the quad.
3895 * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
3896 * platform/graphics/transforms/TransformState.cpp:
3897 (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
3898 (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
3900 (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
3901 (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
3902 into the state's current coordinate space.
3903 (WebCore::TransformState::mapQuad): Factored code.
3904 * platform/graphics/transforms/TransformState.h:
3905 (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
3906 (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
3907 (WebCore::TransformState::lastPlanarSecondaryQuad):
3908 (WebCore::TransformState::lastPlanarQuad): Deleted.
3910 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3912 [iOS] Reimplement r182512 and r183153 in a cleaner way
3913 https://bugs.webkit.org/show_bug.cgi?id=144151
3915 Reviewed by Enrica Casucci.
3917 On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
3918 This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
3919 react to this fact by making users of a FontPlatformData use the original font passed in
3920 to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
3921 detect that the FontPlatformData represents a system font (the underlying APIs have
3922 different behavior for system fonts and non-system-fonts).
3924 However, on OS X, we create a FontPlatformData's ctFont() directly from the original
3925 font passed in to the constructor. This preserves system-font-ness (because it no
3926 longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
3927 correct behavior regarding system fonts.
3929 The difference between the two ctFont() creation codepaths seems to be historical
3930 rather than intentional. Rather than change all the call sites of ctFont() to use a
3931 different platform font object if a system font is detected, a cleaner solution is to
3932 simply unify the two ctFont() creation codepaths to the version which preserves system-
3933 font-ness. Doing this will make all users of FontPlatformData automatically have the
3934 correct behavior with no updates.
3936 This patch reverts the relevant parts of r182512 and r183153 in favor of this new
3939 No new tests because there is no behavior change.
3941 * platform/graphics/FontPlatformData.h:
3942 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3943 * platform/graphics/cocoa/FontCocoa.mm:
3944 (WebCore::Font::platformWidthForGlyph):
3945 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3946 (WebCore::FontPlatformData::ctFontSize):
3947 (WebCore::FontPlatformData::ctFont):
3948 * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3949 (WebCore::Font::getCFStringAttributes):
3951 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3953 Unreviewed build fix.
3955 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3956 (WebCore::FontPlatformData::FontPlatformData):
3958 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3960 [Cocoa] Start cleaning up FontPlatformData
3961 https://bugs.webkit.org/show_bug.cgi?id=144133
3963 Reviewed by Enrica Casucci.
3965 This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
3966 FontPlatformData. This patch starts this effort out by removing the FontPlatformData
3967 constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
3968 and forwards to another constructor. This patch moves this cast to callers of this constructor,
3969 thereby enumerating the places we have left that use NSFont with FontPlatformData.
3971 This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to