1 2015-05-01 Eric Carlson <eric.carlson@apple.com>
3 Fix text track language selection logic
4 https://bugs.webkit.org/show_bug.cgi?id=144467
6 Reviewed by Brent Fulgham.
8 No new tests, media/track/track-language-preference.html was updated.
10 * html/HTMLMediaElement.cpp:
11 (WebCore::HTMLMediaElement::configureTextTrackGroup): Correct a minor style typo.
12 (WebCore::HTMLMediaElement::configureTextTrackDisplay): Update logging.
14 * page/CaptionUserPreferences.cpp:
15 (WebCore::CaptionUserPreferences::textTrackSelectionScore): Minor cleanup.
16 (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Give exact matches a
19 * page/CaptionUserPreferencesMediaAF.cpp:
20 (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Update for
21 indexOfBestMatchingLanguageInList change.
23 * platform/Language.cpp:
24 (WebCore::indexOfBestMatchingLanguageInList): Add parameter for exact match. Convert the
25 passed language to lower case as we do with the preferred languages.
26 * platform/Language.h:
28 2015-05-01 Martin Robinson <mrobinson@igalia.com>
30 [Freetype] Add support for the font-synthesis property
31 https://bugs.webkit.org/show_bug.cgi?id=144472
33 Reviewed by Sergio Villar Senin.
35 No new tests. This causes fast/css3-text/font-synthesis.html to pass
38 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
39 (WebCore::FontPlatformData::FontPlatformData): Only use synthetic bold when the font description allows it.
40 (WebCore::FontPlatformData::initializeWithFontFace): Ditto for synthetic oblique.
42 2015-05-01 Martin Robinson <mrobinson@igalia.com>
44 [GTK] New CORS tests from r183280 fail on WebKitGTK+
45 https://bugs.webkit.org/show_bug.cgi?id=144469
47 Reviewed by Sergio Villar Senin.
49 No new tests. This causes failing tests to pass.
51 * platform/network/soup/ResourceHandleSoup.cpp:
52 (WebCore::doRedirect): Clear the origin header on cross-origin redirects.
54 2015-04-30 Alex Christensen <achristensen@webkit.org>
56 Compile fix when using content extensions debugging code.
58 * contentextensions/ContentExtensionCompiler.cpp:
59 (WebCore::ContentExtensions::compileRuleList):
60 * contentextensions/ContentExtensionsDebugging.h:
61 * contentextensions/DFA.cpp:
62 (WebCore::ContentExtensions::printTransitions):
63 (WebCore::ContentExtensions::DFA::debugPrintDot):
64 * contentextensions/DFANode.h:
65 * contentextensions/NFA.cpp:
66 (WebCore::ContentExtensions::NFA::memoryUsed):
67 (WebCore::ContentExtensions::NFA::debugPrintDot):
69 2015-04-30 Dan Bernstein <mitz@apple.com>
71 Fixed the build for <rdar://problem/20758514>
73 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
74 (WebCore::AudioSourceProviderAVFObjC::destroyMix): Don’t pass nil to
75 -[AVMutableAudioMix setInputParameters:].
77 2015-04-30 Daniel Bates <dabates@apple.com>
79 Clean up: Remove unnecessary runtime computation of string length
80 https://bugs.webkit.org/show_bug.cgi?id=144483
82 Reviewed by Joseph Pecoraro.
84 Following <http://trac.webkit.org/changeset/183649>, WebCore::fullyQualifiedInfoTableName()
85 computes strlen() of the first string literal as part of concatenating two string literals.
86 It is sufficient to use sizeof() - 1 instead of strlen() to compute the length of the first
87 string literal because the size of the string literal is known at compile time.
89 * Modules/webdatabase/DatabaseBackendBase.cpp:
90 (WebCore::fullyQualifiedInfoTableName):
92 2015-04-30 Dean Jackson <dino@apple.com>
94 Expose -apple-system as a font family
95 https://bugs.webkit.org/show_bug.cgi?id=144484
96 <rdar://problem/20767330>
98 Reviewed by Tim Horton.
100 Accept "-apple-system" for the font-family property, and
101 rename "-apple-system-font-monospaced-numbers" to
102 "-apple-system-monospaced-numbers".
104 Also change the media controls to use the new name.
106 Covered by existing tests and this new one:
107 fast/text/system-font-legacy-name.html
109 * Modules/mediacontrols/mediaControlsApple.css:
110 (audio::-webkit-media-controls-time-remaining-display):
111 * Modules/mediacontrols/mediaControlsiOS.css:
112 (::-webkit-media-controls):
113 (audio::-webkit-media-controls-time-remaining-display):
114 (audio::-webkit-media-controls-status-display):
115 * platform/graphics/ios/FontCacheIOS.mm: Add support for the new name.
116 (WebCore::createCTFontWithFamilyNameAndWeight):
117 * platform/graphics/mac/FontCacheMac.mm: Ditto.
118 (WebCore::fontWithFamily):
120 2015-04-30 Javier Fernandez <jfernandez@igalia.com>
122 [CSS Grid Layout] overflow-position keyword for align and justify properties.
123 https://bugs.webkit.org/show_bug.cgi?id=144235
125 Reviewed by Sergio Villar Senin.
127 When the alignment subject is larger than the alignment container,
128 it will overflow. Some alignment modes, if honored in this
129 situation, may cause data loss; an overflow alignment mode can be
130 explicitly specified to avoid this.
132 This patch implements overflow-keyword handling for Grid Layout on
133 align-self and justify-self properties.
135 Test: fast/css-grid-layout/grid-align-justify-overflow.html
137 * rendering/RenderGrid.cpp:
138 (WebCore::computeOverflowAlignmentOffset):
139 (WebCore::RenderGrid::rowPositionForChild):
140 (WebCore::RenderGrid::columnPositionForChild):
141 (WebCore::RenderGrid::rowAxisPositionForChild): Deleted.
142 * rendering/style/RenderStyle.cpp:
143 (WebCore::resolveAlignmentData):
144 (WebCore::resolveJustificationData):
145 (WebCore::RenderStyle::resolveAlignment):
146 (WebCore::RenderStyle::resolveAlignmentOverflow):
147 (WebCore::RenderStyle::resolveJustification):
148 (WebCore::RenderStyle::resolveJustificationOverflow):
149 * rendering/style/RenderStyle.h:
151 2015-04-30 Jon Honeycutt <jhoneycutt@apple.com>
153 Rebaseline bindings tests results after r183648.
157 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
158 (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
159 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
160 (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
161 * bindings/scripts/test/JS/JSTestInterface.cpp:
162 (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
163 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
164 (WebCore::setJSTestInterfaceImplementsStr2):
165 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
166 (WebCore::setJSTestInterfaceSupplementalStr2):
167 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
168 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
169 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
170 (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
171 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
172 (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
173 (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
174 (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
175 (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
176 * bindings/scripts/test/JS/JSTestObj.cpp:
177 (WebCore::setJSTestObjConstructorStaticStringAttr):
178 (WebCore::setJSTestObjStringAttr):
179 (WebCore::setJSTestObjReflectedStringAttr):
180 (WebCore::setJSTestObjReflectedURLAttr):
181 (WebCore::setJSTestObjReflectedCustomURLAttr):
182 (WebCore::setJSTestObjStringAttrWithGetterException):
183 (WebCore::setJSTestObjStringAttrWithSetterException):
184 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
185 (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
186 (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
187 (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
188 (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
189 (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
190 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
191 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
192 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
193 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
194 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
195 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
196 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
197 (WebCore::jsTestObjPrototypeFunctionStrictFunction):
198 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
199 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
200 (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
201 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
202 (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
203 (WebCore::setJSTestTypedefsStringAttrWithGetterException):
204 (WebCore::setJSTestTypedefsStringAttrWithSetterException):
205 (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
207 2015-04-30 Simon Fraser <simon.fraser@apple.com>
209 Fixed elements end up in the middle of the view with pageScale < 1
210 https://bugs.webkit.org/show_bug.cgi?id=144428
211 rdar://problem/20404982
213 Reviewed by Tim Horton.
215 When pageScale is < 1, we used fixed layout mode, and FrameView::fixedElementsLayoutRelativeToFrame()
216 returns true. However, the scrolling thread was calling the static scrollOffsetForFixedPosition()
217 hardcoding 'false' for this parameter.
219 Fix by sending the value of fixedElementsLayoutRelativeToFrame over to the scrolling thread,
220 so we can use it when doing scrolling-thread fixed position stuff.
224 * page/scrolling/AsyncScrollingCoordinator.cpp:
225 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
226 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
227 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
228 (WebCore::ScrollingStateFrameScrollingNode::setFixedElementsLayoutRelativeToFrame):
229 * page/scrolling/ScrollingStateFrameScrollingNode.h:
230 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
231 (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
232 (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
233 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
234 (WebCore::ScrollingTreeFrameScrollingNode::fixedElementsLayoutRelativeToFrame):
235 (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
236 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
237 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
239 2015-04-30 Beth Dakin <bdakin@apple.com>
241 Remove invalid assertion from MouseEvent::create()
242 https://bugs.webkit.org/show_bug.cgi?id=144477
244 Reviewed by Tim Horton.
246 mouseforcechanged events and mouseforcewillbegin trigger this assertion. The
247 assertion does not seem valuable, so rather than changing it, just remove it.
248 * dom/MouseEvent.cpp:
249 (WebCore::MouseEvent::create):
251 2015-04-30 Dean Jackson <dino@apple.com>
253 -apple-system-font-monospaced-numbers doesn't work on iOS
254 https://bugs.webkit.org/show_bug.cgi?id=144478
255 <rdar://problem/20544940>
257 Reviewed by Brent Fulgham.
259 Make sure to start from the system font descriptor when
260 asking for a monospaced numeric alternate.
262 Test: platform/ios-simulator/fast/text/system-monospaced-numbers.html
264 * platform/graphics/ios/FontCacheIOS.mm:
265 (WebCore::createCTFontWithFamilyNameAndWeight):
267 2015-04-30 Oliver Hunt <oliver@apple.com>
269 DOM bindings should not be using a reference type to point to a temporary object
270 https://bugs.webkit.org/show_bug.cgi?id=144474
272 Reviewed by Beth Dakin.
274 The DOM bindings will currently try and use a local reference to point
275 to a temporary object. This currently works as a by product of the compiler's
276 stack layout. This patch removes the dependency on undefined behaviour
277 by ensuring that we use a value rather than reference type.
279 * bindings/scripts/CodeGeneratorJS.pm:
280 (GenerateParametersCheck):
281 (GetNativeTypeForCallbacks):
283 2015-04-30 Brady Eidson <beidson@apple.com>
285 Build fix after r183646 for less enlightened platforms.
289 * Modules/webdatabase/DatabaseBackendBase.cpp:
290 (WebCore::fullyQualifiedInfoTableName): Windows doesn’t have stpcpy :(
292 2015-04-30 Brady Eidson <beidson@apple.com>
294 Javascript using WebSQL can create their own WebKit info table.
295 <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
297 Reviewed by Alex Christensen.
299 Test: storage/websql/alter-to-info-table.html
301 * Modules/webdatabase/DatabaseBackendBase.cpp:
302 (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
303 (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
304 (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
305 (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
306 (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
307 (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.
309 2015-04-30 Beth Dakin <bdakin@apple.com>
311 Should choose UIScrollView indicatorStyle based on the document background color
312 https://bugs.webkit.org/show_bug.cgi?id=144473
314 rdar://problem/19897699
316 Reviewed by Simon Fraser.
318 Export this function.
319 * platform/graphics/Color.h:
321 2015-04-30 Brent Fulgham <bfulgham@apple.com>
323 [Win] Allow WebKit to build without ANGLE support
324 https://bugs.webkit.org/show_bug.cgi?id=144459
325 <rdar://problem/20707307>
327 Reviewed by Dean Jackson.
329 * platform/graphics/GLContext.cpp: Use the ENABLE(GRAPHICS_CONTEXT_3D)
330 macro to avoid compiling this code if not using WEBGL/3D contexts.
332 2015-04-29 David Hyatt <hyatt@apple.com>
334 Avoid containingBlock() calls when no writing mode flipping is needed.
335 https://bugs.webkit.org/show_bug.cgi?id=144407
337 Reviewed by Simon Fraser.
339 Add a bool to RenderView that indicates whether or not any flipped blocks have been
340 added to the view. Once tainted, the view just stays dirty forever. If no flipped
341 blocks are ever seen, we can then optimize away calls to containingBlock().
343 The motivation for this patch is to improve layer position updating, which makes many
344 calls to topLeftLocationOffset(), one of the functions that can be optimized by this
347 * rendering/RenderBox.cpp:
348 (WebCore::RenderBox::layoutOverflowRectForPropagation):
349 * rendering/RenderBoxModelObject.cpp:
350 (WebCore::RenderBoxModelObject::updateFromStyle):
351 * rendering/RenderLayer.cpp:
352 (WebCore::RenderLayer::calculateClipRects):
353 * rendering/RenderLineBoxList.cpp:
354 (WebCore::RenderLineBoxList::rangeIntersectsRect):
355 * rendering/RenderView.cpp:
356 (WebCore::RenderView::RenderView):
357 * rendering/RenderView.h:
359 2015-04-29 Jer Noble <jer.noble@apple.com>
361 Make GenericTaskQueue even more generic (and usable inside platform/)
362 https://bugs.webkit.org/show_bug.cgi?id=144414
364 Reviewed by Eric Carlson.
366 Templatize GenericTaskQueue so that it can be used from within platform/.
369 * WebCore.vcxproj/WebCore.vcxproj:
370 * WebCore.vcxproj/WebCore.vcxproj.filters:
371 * WebCore.xcodeproj/project.pbxproj:
372 * dom/GenericTaskQueue.cpp: Removed.
373 * html/HTMLMediaElement.h:
374 * platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
375 (WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
376 (WebCore::TaskDispatcher::postTask): Call context's postTask().
377 (WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
378 (WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
379 (WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
380 (WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
381 (WebCore::GenericTaskQueue::enqueueTask): Ditto.
382 (WebCore::GenericTaskQueue::close): Ditto.
383 (WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
384 (WebCore::GenericTaskQueue::hasPendingTasks): Ditto.
386 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
388 Unreviewed build fix. WebCore has a weak symbol.
390 WebCore has a weak external symbol in it. A common cause of weak external
391 symbols is when an inline function is listed in the linker export file.
392 ERROR: symbol __ZNK7WebCore4Page25expectsWheelEventTriggersEv
395 (WebCore::Page::expectsWheelEventTriggers):
397 (WebCore::Page::expectsWheelEventTriggers): Deleted.
399 2015-04-29 Simon Fraser <simon.fraser@apple.com>
401 Crash at WebCore::Document::absoluteRegionForEventTargets
402 https://bugs.webkit.org/show_bug.cgi?id=144426
403 rdar://problem/20502166
405 Reviewed by Tim Horton.
407 When a frame had wheel event handlers, we would register the document itself
408 as a handler in its parent document. This is problematic, because there's not
409 code path that removes it when the frame is destroyed.
411 It turns out we don't need to do this at all; the non-fast scrollable region
412 already takes handlers in subframes into account.
414 Tests: fast/events/wheelevent-in-frame.html
415 fast/events/wheelevent-in-reattached-frame.html
418 (WebCore::Document::didAddWheelEventHandler):
419 (WebCore::Document::didRemoveWheelEventHandler):
421 2015-04-29 Eric Carlson <eric.carlson@apple.com>
423 Not all videos should automatically play to playback target
424 https://bugs.webkit.org/show_bug.cgi?id=144430
425 <rdar://problem/20718523>
427 Reviewed by Darin Adler.
429 * Modules/mediasession/WebMediaSessionManager.cpp:
430 (WebCore::WebMediaSessionManager::clientStateDidChange): Consider ExternalDeviceAutoPlayCandidate.
433 * html/HTMLMediaElement.cpp:
434 (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate when a <video>
435 has a file with an audio track that does not loop.
437 * page/MediaProducer.h: Add ExternalDeviceAutoPlayCandidate.
439 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
441 LiveNodeList may unexpectedly return an element for empty string
442 https://bugs.webkit.org/show_bug.cgi?id=144429
444 Reviewed by Darin Adler.
446 * dom/LiveNodeList.cpp:
447 (WebCore::LiveNodeList::namedItem):
448 Never return a result for an empty string.
450 2015-04-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
452 Remove PassRefPtr in SVGFEFooElement classes
453 https://bugs.webkit.org/show_bug.cgi?id=144425
455 Reviewed by Darin Adler.
457 As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
460 No new tests, no behavior changes.
463 (WebCore::RGBColor::create):
465 * platform/graphics/filters/PointLightSource.h:
466 (WebCore::PointLightSource::create):
467 * platform/graphics/filters/SpotLightSource.h:
468 (WebCore::SpotLightSource::create):
470 (WebCore::SVGColor::rgbColor):
472 * svg/SVGFEDistantLightElement.cpp:
473 (WebCore::SVGFEDistantLightElement::lightSource):
474 * svg/SVGFEDistantLightElement.h:
475 * svg/SVGFELightElement.cpp:
476 (WebCore::SVGFELightElement::findLightSource):
477 * svg/SVGFELightElement.h:
478 * svg/SVGFEPointLightElement.cpp:
479 (WebCore::SVGFEPointLightElement::lightSource):
480 * svg/SVGFEPointLightElement.h:
481 * svg/SVGFESpotLightElement.cpp:
482 (WebCore::SVGFESpotLightElement::lightSource):
483 * svg/SVGFESpotLightElement.h:
485 2015-04-29 Dean Jackson <dino@apple.com>
487 Create a named CSS property for system colors
488 https://bugs.webkit.org/show_bug.cgi?id=144423
489 <rdar://problem/20491011>
491 Reviewed by Tim Horton.
493 Test: fast/css/apple-system-colors.html
495 Expose the following values to CSS color properties:
506 On platforms other than OS X Yosemite and iOS, the
507 actual color values are undefined and become transparent
508 black. (In fact, not all are defined on iOS either.)
510 * WebCore.xcodeproj/project.pbxproj: Two new SPI header files.
513 (WebCore::CSSParser::validSystemColorValue): New helper function that
514 checks if a CSSValueID is between the two system color values. This
515 was being tested everywhere, which meant adding a new system color was
516 at risk of being ignored. It's a static method so it can be used
517 from the SVG CSS parser too.
518 (WebCore::validPrimitiveValueColor): Use the new helper.
519 (WebCore::CSSParser::parseValue): Ditto.
520 (WebCore::CSSParser::parseBackgroundColor): Ditto.
521 (WebCore::CSSParser::parseShadow): Ditto.
522 (WebCore::parseDeprecatedGradientColorStop): Ditto.
523 (WebCore::parseGradientColorOrKeyword): Ditto.
524 * css/CSSParser.h: New static helper function.
526 * css/CSSValueKeywords.in: Add the new CSS value keywords.
528 * css/SVGCSSParser.cpp:
529 (WebCore::validSystemControlColorValue): SVG has a restricted
530 set of system colors, so use the helper from CSSParser but with
532 (WebCore::CSSParser::parseSVGValue): Use the helper.
534 * platform/spi/ios/UIColorSPI.h: Added.
535 * platform/spi/cocoa/NSColorSPI.h: Added.
537 * rendering/RenderThemeIOS.h: New systemColor override. Also add a cache for system colors.
538 * rendering/RenderThemeIOS.mm:
539 (WebCore::RenderThemeIOS::systemColor): Ask UIColor to provide the color values for the new CSS values.
540 * rendering/RenderThemeMac.mm:
541 (WebCore::RenderThemeMac::systemColor): Ditto.
543 2015-04-29 Commit Queue <commit-queue@webkit.org>
545 Unreviewed, rolling out r183600.
546 https://bugs.webkit.org/show_bug.cgi?id=144432
548 New tests time out everywhere (Requested by ap on #webkit).
552 "Crash at WebCore::Document::absoluteRegionForEventTargets"
553 https://bugs.webkit.org/show_bug.cgi?id=144426
554 http://trac.webkit.org/changeset/183600
556 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
558 Unreviewed iOS build fix. Unused parameter no longer exists.
560 * page/scrolling/ScrollingCoordinator.cpp:
561 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
563 2015-04-29 Simon Fraser <simon.fraser@apple.com>
565 Crash at WebCore::Document::absoluteRegionForEventTargets
566 https://bugs.webkit.org/show_bug.cgi?id=144426
567 rdar://problem/20502166
569 Reviewed by Tim Horton.
571 When a frame had wheel event handlers, we would register the document itself
572 as a handler in its parent document. This is problematic, because there's not
573 code path that removes it when the frame is destroyed.
575 It turns out we don't need to do this at all; the non-fast scrollable region
576 already takes handlers in subframes into account.
578 Tests: fast/events/wheelevent-in-frame.html
579 fast/events/wheelevent-in-reattached-frame.html
582 (WebCore::Document::didAddWheelEventHandler):
583 (WebCore::Document::didRemoveWheelEventHandler):
585 2015-04-29 David Kilzer <ddkilzer@apple.com>
587 Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
588 <http://webkit.org/b/144362>
590 Reviewed by Andy Estes.
592 This patch switches soft-linking of QuickLook.framework to
593 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
596 No new tests since no change in behavior.
598 * WebCore.xcodeproj/project.pbxproj:
599 - Add QuickLookSoftLinking.{h,mm} to the project.
601 * platform/ios/QuickLookSoftLink.h: Added.
602 * platform/ios/QuickLookSoftLink.mm: Added.
603 * platform/mac/SoftLinking.h:
604 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
605 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
606 (SOFT_LINK_POINTER_FOR_HEADER): Add macro.
607 (SOFT_LINK_POINTER_FOR_SOURCE): Add macro.
609 * platform/network/ios/QuickLook.h:
610 - Remove unused declarations.
612 * platform/network/ios/QuickLook.mm:
613 (WebCore::QLPreviewConverterClass): Deleted.
614 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
615 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
616 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
617 - Remove SOFT_LINK macros and unused methods after switching to
618 new QuickLookSoftLink.{h,mm}.
619 (WebCore::QLPreviewGetSupportedMIMETypesSet):
620 - Switch to use NeverDestroyed<>.
621 (WebCore::registerQLPreviewConverterIfNeeded):
622 (createQLPreviewProtocol):
623 (WebCore::QLPreviewProtocol):
624 (WebCore::QuickLookHandle::QuickLookHandle):
625 (WebCore::QuickLookHandle::create):
626 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
627 - Simplify code when using QuickLookSoftLink.h.
629 * platform/network/ios/WebCoreURLResponseIOS.mm:
630 - Include QuickLookSoftLink.h header.
632 2015-04-29 Simon Fraser <simon.fraser@apple.com>
634 Compute the non-fast-scrollable region in main-document coordinates
635 https://bugs.webkit.org/show_bug.cgi?id=144420
637 Reviewed by Tim Horton.
639 Compute the non-fast-scrollable region in document coordinates, to make it easier
640 to reason about. Previously, it was document coordinates offset by top content inset.
642 * page/DebugPageOverlays.cpp:
643 (WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
644 event handler region, mapping each to root view coords, and then mapping back into document
646 (WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
647 overlay and region are both document coordinates.
648 * page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
650 (WebCore::Page::nonFastScrollableRects): Remove frame argument.
652 * page/PageOverlay.cpp:
653 (WebCore::PageOverlay::bounds):
654 (WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
655 view and overlay coordinates.
656 * page/PageOverlay.h:
657 * page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
658 (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
659 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
660 (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
661 * page/scrolling/ScrollingCoordinator.cpp:
662 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
663 recurses on frames, computing an absolute (document-relative) region per frame. This
664 removes the confusing offsetting through top content inset.
665 Change how we get to plugins that want wheel events; we can't get from PluginViewBase
666 to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
667 regions for transformed plugin-ins.
668 For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
669 then to our frame, then to our document.
670 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
671 the recursive function.
672 (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
673 * page/scrolling/ScrollingCoordinator.h:
674 * page/scrolling/ScrollingTree.cpp:
675 (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
676 from view coordinates to document coordinates for testing against the non-fast region.
677 We previously assert that the root note is a FrameScrolling node.
678 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
679 (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
680 for the scrolling tree.
681 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
682 * testing/Internals.cpp:
683 (WebCore::Internals::nonFastScrollableRects): No need for frame arg.
685 2015-04-29 Brent Fulgham <bfulgham@apple.com>
687 Expand test infrastructure to support scrolling tests
688 https://bugs.webkit.org/show_bug.cgi?id=143684
689 <rdar://problem/20375516>
691 Reviewed by Simon Fraser.
693 Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.
695 This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
696 function object to be fired when scroll events are finished. The object also keeps track of reasons
697 why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
698 check rendering state in the middle of an animation.
700 Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
701 across multiple threads.
703 * page/FrameView.cpp:
704 (WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
705 (WebCore::FrameView::setScrollPosition): Ditto.
706 (WebCore::FrameView::didAddScrollbar): Ditto.
707 * page/MainFrame.cpp:
708 (WebCore::MainFrame::testTrigger): Moved to Page.
709 (WebCore::MainFrame::ensureTestTrigger): Ditto.
712 (WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
713 (WebCore::Page::ensureTestTrigger): Ditto.
715 * page/WheelEventTestTrigger.cpp:
716 (WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
717 (WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
718 * page/WheelEventTestTrigger.h:
719 * page/mac/EventHandlerMac.mm:
720 (WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
721 any active test trigger object.
722 * page/scrolling/AsyncScrollingCoordinator.cpp:
723 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
724 that the scrolling thread is synced with the main thread.
725 * platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger.
726 (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
727 * platform/cocoa/ScrollController.h:
728 * platform/cocoa/ScrollController.mm:
729 (WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
730 snapping is complete.
731 (WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
732 (WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
734 (WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
735 * platform/mac/ScrollAnimatorMac.mm:
736 (WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
737 (WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
738 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
739 scrolling is complete.
740 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
741 * rendering/RenderBox.cpp:
742 (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
743 (WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
744 to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
745 (WebCore::RenderBox::setScrollTop): Ditto.
746 * rendering/RenderLayer.cpp:
747 (WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
748 * rendering/RenderListBox.cpp:
749 (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
750 (WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
751 to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
752 (WebCore::RenderListBox::setScrollTop): Ditto.
753 (WebCore::RenderListBox::createScrollbar): Ditto.
754 * testing/js/WebCoreTestSupport.cpp:
755 (WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
756 (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
758 2015-04-29 Javier Fernandez <jfernandez@igalia.com>
760 [CSS Box Alignment] Unifying alignment data in a single class
761 https://bugs.webkit.org/show_bug.cgi?id=144384
763 Reviewed by David Hyatt.
765 The new CSS Box Alignment specification introduces more complex
766 values and syntax for defining alignment properties. Most of the
767 alignment values were just keyword identifiers, but the new syntax
768 allows different combinations of identifiers to determine the
769 alignment behavior (eg. overflow-alignment keyword).
771 This patch wll help to implement later overflow handling and
772 specially Content Dstribution alignment, the most complex case by
773 far. It will be more consistent against style changes and repaint,
774 snce we will have just one field to monitoring for value
777 No new tests, because no new functionality was added; it's just a
778 code refactoring which is just expected to pass current tests.
780 * css/CSSComputedStyleDeclaration.cpp:
781 (WebCore::resolveSelfAlignmentAuto):
782 (WebCore::ComputedStyleExtractor::propertyValue):
783 * css/CSSPropertyNames.in:
784 * css/StyleBuilderConverter.h:
785 (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
786 (WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
787 * css/StyleBuilderCustom.h:
788 (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
789 (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
790 (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
791 (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
792 (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
793 (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
794 (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
795 (WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
796 * css/StyleResolver.cpp:
797 (WebCore::StyleResolver::adjustRenderStyle):
798 * mathml/MathMLTextElement.cpp:
799 (WebCore::MathMLTextElement::createElementRenderer):
800 * rendering/RenderFlexibleBox.cpp:
801 (WebCore::RenderFlexibleBox::styleDidChange):
802 * rendering/RenderFullScreen.cpp:
803 (WebCore::createFullScreenStyle):
804 * rendering/RenderMenuList.cpp:
805 (WebCore::RenderMenuList::adjustInnerStyle):
806 * rendering/mathml/RenderMathMLRoot.cpp:
807 (WebCore::RenderMathMLRoot::updateStyle):
808 * rendering/mathml/RenderMathMLScripts.cpp:
809 (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
810 (WebCore::RenderMathMLScripts::fixAnonymousStyles):
811 * rendering/style/RenderStyle.cpp:
812 (WebCore::RenderStyle::resolveAlignment):
813 (WebCore::RenderStyle::resolveJustification):
814 * rendering/style/RenderStyle.h:
815 * rendering/style/StyleRareNonInheritedData.cpp:
816 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
817 (WebCore::StyleRareNonInheritedData::operator==):
818 (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
819 * rendering/style/StyleRareNonInheritedData.h:
820 * rendering/style/StyleSelfAlignmentData.h: Added.
821 (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
822 (WebCore::StyleSelfAlignmentData::setPosition):
823 (WebCore::StyleSelfAlignmentData::setPositionType):
824 (WebCore::StyleSelfAlignmentData::setOverflow):
825 (WebCore::StyleSelfAlignmentData::position):
826 (WebCore::StyleSelfAlignmentData::positionType):
827 (WebCore::StyleSelfAlignmentData::overflow):
828 (WebCore::StyleSelfAlignmentData::operator==):
829 (WebCore::StyleSelfAlignmentData::operator!=):
831 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
833 NodeList has issues with Symbol and empty string
834 https://bugs.webkit.org/show_bug.cgi?id=144310
836 Reviewed by Darin Adler.
838 Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
839 fast/dom/dataset-name-getter-symbols.html
840 fast/dom/named-items-with-empty-name.html
841 fast/dom/named-items-with-symbol-name.html
842 storage/domstorage/localstorage/named-items.html
844 Test different bindings objects with custom named setter
845 and getter handlers. Ensure that they handle Symbol properties
846 gracefully. Often times avoiding the string path.
848 * dom/StaticNodeList.cpp:
849 (WebCore::StaticNodeList::namedItem):
850 (WebCore::StaticElementList::namedItem):
851 Better handle the empty string. It should not match an item.
853 * bindings/js/JSDOMBinding.h:
854 (WebCore::propertyNameToString):
855 In cases where we would use this, we should have handled
858 (WebCore::propertyNameToAtomicString):
859 For Symbols, use the unique string. This should result
860 in no matches for a Symbol property.
862 * bindings/js/JSDOMStringMapCustom.cpp:
863 (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
864 (WebCore::JSDOMStringMap::deleteProperty):
865 (WebCore::JSDOMStringMap::putDelegate):
866 * bindings/js/JSStorageCustom.cpp:
867 (WebCore::JSStorage::canGetItemsForName):
868 (WebCore::JSStorage::nameGetter):
869 (WebCore::JSStorage::deleteProperty):
870 (WebCore::JSStorage::putDelegate):
871 * bindings/js/JSStyleSheetListCustom.cpp:
872 (WebCore::JSStyleSheetList::canGetItemsForName):
873 Treat Symbol properties as private properties. They just
874 go directly through to the Object, and avoid the string
875 getter/setter property path.
877 2015-04-29 Eric Carlson <eric.carlson@apple.com>
879 [Mac] Register with device picker whenever a page has <video>
880 https://bugs.webkit.org/show_bug.cgi?id=144408
882 Reviewed by Jer Noble.
884 * Modules/mediasession/WebMediaSessionManager.cpp:
885 (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
886 to the target when it has not routes.
888 * html/HTMLMediaElement.cpp:
889 (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the
890 element is <video> with a video track that does not block wireless playback.
892 2015-04-29 Martin Robinson <mrobinson@igalia.com>
894 [GTK] Add support for automatic hyphenation
895 https://bugs.webkit.org/show_bug.cgi?id=44478
897 Reviewed by Carlos Garcia Campos.
899 No new tests. This patch unskips and updates results for existing hyphenation tests.
901 * PlatformGTK.cmake: Add the libhypen implementation to the source list.
902 * platform/gtk/GtkUtilities.cpp:
903 (WebCore::topLevelPath): Add this helper function taken from the test harness.
904 (WebCore::getWebKitBuildDirectory): Ditto.
905 * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
906 * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
907 so that it can still be shared.
908 * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
909 (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
910 determine the locale that it covers.
911 (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
912 as ones in the JHBuild root for testing.
913 (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
915 (WebCore::availableLocales): Getter for global hash of installed dictionaries.
916 (WebCore::canHyphenate): Added libhyphen implementation.
917 (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
918 an open libhyphen dictionary. This is useful so that they can be stored in an MRU
919 cache. This is a similar approach to the CoreFoundation implementation.
920 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
922 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
923 (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
924 (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
925 (WebCore::lastHyphenLocation): Added libhyphen implementation.
927 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
929 Unreviewed build fix.
931 * platform/graphics/mac/FontCacheMac.mm:
932 (WebCore::fontWithFamily):
934 2015-04-29 Eric Carlson <eric.carlson@apple.com>
936 Some media tests assert after r183096
937 https://bugs.webkit.org/show_bug.cgi?id=144098
939 Reviewed by Brent Fulgham.
941 Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
942 after it has been unregistered. A media element unregisters itself when it is removed from the
943 document, but scripts can still run and modify state that results in a call to
944 playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
945 the various call sites.
948 (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
950 (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
952 2015-04-29 Zalan Bujtas <zalan@apple.com>
954 Simple line layout: Web process spins endlessly below layoutSimpleLines.
955 https://bugs.webkit.org/show_bug.cgi?id=144403
956 rdar://problem/20742783
958 Reviewed by Antti Koivisto.
960 When a text fragment overlaps multiple renderes and it does not fit the current line,
961 we revert the text fragment iterator position so that the overlapping content
962 gets processed again for the next line.
963 However, TextFragmentIterator::revertToFragment() was reverting too much and
964 we started processing old content all over again -> infinite loop.
966 This patch ensures that text fragment iterator is reverted to the right position.
968 Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
970 * rendering/SimpleLineLayout.cpp:
971 (WebCore::SimpleLineLayout::createLineRuns):
972 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
973 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
974 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
975 * rendering/SimpleLineLayoutTextFragmentIterator.h:
977 2015-04-29 Filip Pizlo <fpizlo@apple.com>
979 JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
980 https://bugs.webkit.org/show_bug.cgi?id=144397
982 Reviewed by Andreas Kling.
984 If you override getCallData() and you want to be called a "function", then you need to use the
985 new TypeOfShouldCallGetCallData flag.
987 * bindings/scripts/CodeGeneratorJS.pm:
989 * bridge/objc/objc_runtime.h:
990 * bridge/runtime_method.h:
991 * bridge/runtime_object.h:
993 2015-04-29 Commit Queue <commit-queue@webkit.org>
995 Unreviewed, rolling out r183553 and r183561.
996 https://bugs.webkit.org/show_bug.cgi?id=144406
998 broke the iOS build (Requested by thorton__ on #webkit).
1000 Reverted changesets:
1002 "Switch QuickLook soft-linking to use
1003 QuickLookSoftLink.{h,mm}"
1004 https://bugs.webkit.org/show_bug.cgi?id=144362
1005 http://trac.webkit.org/changeset/183553
1007 "Unreviewed iOS build fix after r183553: fix declaration of
1009 http://trac.webkit.org/changeset/183561
1011 2015-04-29 Antti Koivisto <antti@apple.com>
1013 ResourceLoadPriority should be enum class
1014 https://bugs.webkit.org/show_bug.cgi?id=144326
1016 Reviewed by Darin Adler.
1018 * html/HTMLLinkElement.cpp:
1019 (WebCore::HTMLLinkElement::process):
1020 * loader/LinkLoader.cpp:
1021 (WebCore::LinkLoader::loadLink):
1022 * loader/ResourceLoadScheduler.cpp:
1023 (WebCore::ResourceLoadScheduler::scheduleLoad):
1024 (WebCore::ResourceLoadScheduler::servePendingRequests):
1025 (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
1026 (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
1027 (WebCore::ResourceLoadScheduler::HostInformation::schedule):
1028 (WebCore::ResourceLoadScheduler::HostInformation::remove):
1029 (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
1030 (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
1031 * loader/ResourceLoadScheduler.h:
1032 (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
1034 Modernize ResourceLoadScheduler code a bit while switching to enum class.
1036 * loader/cache/CachedResource.cpp:
1037 (WebCore::defaultPriorityForResourceType):
1038 * loader/cache/CachedResourceLoader.cpp:
1039 (WebCore::CachedResourceLoader::requestResource):
1040 * loader/icon/IconLoader.cpp:
1041 (WebCore::IconLoader::startLoading):
1042 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1043 (WebCore::WebCoreAVFResourceLoader::startLoading):
1044 * platform/network/ResourceLoadPriority.h:
1045 (WebCore::operator++):
1046 (WebCore::operator--):
1047 * platform/network/ResourceRequestBase.cpp:
1048 (WebCore::ResourceRequestBase::adopt):
1049 (WebCore::ResourceRequestBase::copyData):
1050 (WebCore::ResourceRequestBase::cachePolicy):
1051 (WebCore::ResourceRequestBase::priority):
1052 (WebCore::ResourceRequestBase::setPriority):
1053 * platform/network/ResourceRequestBase.h:
1055 Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
1056 Use modern initialization syntax.
1058 (WebCore::ResourceRequestBase::ResourceRequestBase):
1059 (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
1060 * platform/network/cf/ResourceRequestCFNet.cpp:
1061 (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1062 (WebCore::initializeHTTPConnectionSettingsOnStartup):
1063 * platform/network/cf/ResourceRequestCFNet.h:
1064 (WebCore::toResourceLoadPriority):
1065 (WebCore::toPlatformRequestPriority):
1066 * platform/network/soup/ResourceRequest.h:
1067 (WebCore::toSoupMessagePriority):
1068 * testing/Internals.cpp:
1069 (WebCore::stringToResourceLoadPriority):
1071 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
1073 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
1074 https://bugs.webkit.org/show_bug.cgi?id=132159
1076 Reviewed by Darin Adler.
1078 On platforms that support it, delegate font selection logic to the platform. Currently, this is
1079 only supported on Mac, using CTFontCreateForCSS().
1081 This also changes the mechanism that enforces our font whitelist in our tests. We used to
1082 swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
1083 font family names instead.
1085 Note that this patch is a work in progress, because it makes the following tests fail:
1086 fast/css/font-weight-1.html
1087 fast/forms/validation-message-appearance.html
1088 fast/forms/select/optgroup-rendering.html
1090 No new tests, because there is no behavior change.
1092 * platform/graphics/FontCache.h: Add a function to set the whitlist.
1093 * platform/graphics/mac/FontCacheMac.mm:
1094 (WebCore::fontWhitelist):
1095 (WebCore::FontCache::setFontWhitelist):
1096 (WebCore::toAppKitFontWeight):
1097 (WebCore::toCoreTextFontWeight):
1098 (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
1099 (WebCore::FontCache::createFontPlatformData):
1100 * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
1102 2015-04-29 Jer Noble <jer.noble@apple.com>
1104 Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
1106 * platform/ios/QuickLookSoftLink.mm:
1108 2015-04-29 Eric Carlson <eric.carlson@apple.com>
1110 [Mac] Use new device picker menu API
1111 https://bugs.webkit.org/show_bug.cgi?id=144392
1113 Reviewed by Jer Noble.
1115 * Modules/mediasession/WebMediaSessionManager.cpp:
1116 (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
1117 * platform/graphics/MediaPlaybackTargetPicker.h:
1119 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
1120 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1121 (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac): m_deviceChangeTimer -> m_pendingActionTimer.
1122 (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
1123 (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from
1124 outputeDeviceAvailabilityChangedTimerFired.
1125 (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
1126 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
1127 available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
1128 (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
1129 (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it
1130 can now be called from showPlaybackTargetPicker.
1131 (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
1132 pendingActionTimerFired.
1134 * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
1136 2015-04-29 Antti Koivisto <antti@apple.com>
1138 Main resource loaded via 304 response becomes empty if reloaded by user
1139 https://bugs.webkit.org/show_bug.cgi?id=144386
1141 Reviewed by Darin Adler.
1143 Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
1144 DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
1145 conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
1146 Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
1147 However DocumentLoader has no code to handle 304 so we would end up with an empty document.
1149 Test: http/tests/cache/main-resource-304-reload.html
1151 * loader/DocumentLoader.cpp:
1152 (WebCore::DocumentLoader::startLoadingMainResource):
1154 Ensure DocumentLoader doesn't issue conditional requests.
1156 2015-04-28 Jer Noble <jer.noble@apple.com>
1158 Replace HTMLMediaElement's seek timer with a task queue.
1159 https://bugs.webkit.org/show_bug.cgi?id=144353
1161 Reviewed by Eric Carlson.
1163 No change in functionality, so no new tests added.
1165 Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
1166 make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
1167 GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
1170 * WebCore.vcxproj/WebCore.vcxproj:
1171 * WebCore.vcxproj/WebCore.vcxproj.filters:
1172 * WebCore.xcodeproj/project.pbxproj:
1173 * dom/GenericTaskQueue.cpp: Added.
1174 (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
1175 (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
1176 (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
1177 (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
1178 * dom/GenericTaskQueue.h: Added.
1179 (WebCore::GenericTaskQueue::hasPendingTasks):
1180 * html/HTMLMediaElement.cpp:
1181 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
1182 (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
1183 (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
1184 (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
1185 (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
1186 * html/HTMLMediaElement.h:
1188 2015-04-28 David Kilzer <ddkilzer@apple.com>
1190 Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
1191 <http://webkit.org/b/144362>
1193 Reviewed by Andy Estes.
1195 This patch switches soft-linking of QuickLook.framework to
1196 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
1199 No new tests since no change in behavior.
1201 * WebCore.xcodeproj/project.pbxproj:
1202 - Add QuickLookSoftLinking.{h,mm} to the project.
1204 * platform/ios/QuickLookSoftLink.h: Added.
1205 * platform/ios/QuickLookSoftLink.mm: Added.
1206 * platform/mac/SoftLinking.h:
1207 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
1208 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
1210 * platform/network/ios/QuickLook.h:
1211 - Remove unused declarations.
1213 * platform/network/ios/QuickLook.mm:
1214 (WebCore::QLPreviewConverterClass): Deleted.
1215 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
1216 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
1217 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
1218 - Remove SOFT_LINK macros and unused methods after switching to
1219 new QuickLookSoftLink.{h,mm}.
1220 (WebCore::QLPreviewGetSupportedMIMETypesSet):
1221 - Switch to use NeverDestroyed<>.
1222 (WebCore::registerQLPreviewConverterIfNeeded):
1223 (createQLPreviewProtocol):
1224 (WebCore::QLPreviewProtocol):
1225 (WebCore::QuickLookHandle::QuickLookHandle):
1226 (WebCore::QuickLookHandle::create):
1227 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
1228 - Simplify code when using QuickLookSoftLink.h.
1230 * platform/network/ios/WebCoreURLResponseIOS.mm:
1231 - Include QuickLookSoftLink.h header.
1233 2015-04-29 Darin Adler <darin@apple.com>
1235 [ES6] Implement Unicode code point escapes
1236 https://bugs.webkit.org/show_bug.cgi?id=144377
1238 Reviewed by Antti Koivisto.
1240 Test: js/unicode-escape-sequences.html
1242 * css/CSSParser.cpp:
1243 (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
1244 out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
1247 * html/parser/HTMLEntityParser.cpp:
1248 (WebCore::isAlphaNumeric): Deleted.
1249 (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
1250 U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
1251 because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
1252 but maye it's something we want to do in the future.
1253 (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
1254 of a the function in this file that does the same thing less efficiently.
1256 * html/parser/InputStreamPreprocessor.h:
1257 (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
1258 replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
1260 * xml/parser/CharacterReferenceParserInlines.h:
1261 (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
1262 defining our own local highestValidCharacter constant.
1264 2015-04-29 Martin Robinson <mrobinson@igalia.com>
1266 [CMake] [GTK] Organize and clean up unused CMake variables
1267 https://bugs.webkit.org/show_bug.cgi?id=144364
1269 Reviewed by Gyuyoung Kim.
1271 * PlatformGTK.cmake: Add variables specific to this project.
1273 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
1275 REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
1276 https://bugs.webkit.org/show_bug.cgi?id=144388
1278 Reviewed by Brady Eidson.
1280 There used to be a method in ContextMenuItem to check if share
1281 menu item was supported or not, but since r182573, there's a
1282 method to get the share menu item. If the returned menu item is
1283 null, it's not added to the menu, but we are not returning a null
1284 ContextMenu item even though we don't support share menu item.
1286 * platform/gtk/ContextMenuItemGtk.cpp:
1287 (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
1289 2015-04-29 Zan Dobersek <zdobersek@igalia.com>
1291 Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
1292 https://bugs.webkit.org/show_bug.cgi?id=144232
1294 Reviewed by Darin Adler.
1296 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1297 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1298 Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
1300 2015-04-29 Hyungwook Lee <hyungwook.lee@navercorp.com>
1302 Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
1303 https://bugs.webkit.org/show_bug.cgi?id=140261
1305 Reviewed by Darin Adler.
1307 We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
1308 because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
1310 * rendering/RenderView.cpp:
1311 (WebCore::isValidObjectForNewSelection):
1312 (WebCore::RenderView::clearSubtreeSelection):
1313 (WebCore::RenderView::applySubtreeSelection):
1315 2015-04-29 Youenn Fablet <youenn.fablet@crf.canon.fr>
1317 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
1318 https://bugs.webkit.org/show_bug.cgi?id=143711
1320 Reviewed by Darin Adler.
1322 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
1323 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
1324 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
1326 Test: http/tests/appcache/simple-video-sync.html
1328 * html/HTMLMediaElement.cpp:
1329 (WebCore::HTMLMediaElement::parseAttribute):
1330 * loader/DocumentThreadableLoader.cpp:
1331 (WebCore::DocumentThreadableLoader::loadRequest):
1332 * loader/FrameLoader.cpp:
1333 (WebCore::FrameLoader::loadResourceSynchronously):
1334 * loader/FrameLoader.h:
1335 * loader/appcache/ApplicationCacheHost.cpp:
1336 (WebCore::ApplicationCacheHost::maybeLoadResource):
1337 (WebCore::ApplicationCacheHost::createFileURL):
1338 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1339 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1340 * loader/appcache/ApplicationCacheHost.h:
1341 * xml/XSLTProcessorLibxslt.cpp:
1342 (WebCore::docLoaderFunc):
1343 * xml/parser/XMLDocumentParserLibxml2.cpp:
1344 (WebCore::openFunc):
1346 2015-04-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1348 Purge PassRefPtr from createSVGPathSegFoo factory functions
1349 https://bugs.webkit.org/show_bug.cgi?id=144374
1351 Reviewed by Darin Adler.
1353 Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
1354 those factory functions can't return null. Additionally let's remove unnecessary
1355 #include<PassRefPtr.h> there.
1357 No new tests, no behavior changes.
1360 (WebCore::SVGColor::cloneForCSSOM):
1362 * svg/SVGGlyphMap.h:
1363 (WebCore::GlyphMapNode::create):
1365 (WebCore::SVGPaint::cloneForCSSOM):
1367 * svg/SVGPathElement.cpp:
1368 (WebCore::SVGPathElement::createSVGPathSegClosePath):
1369 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
1370 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
1371 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
1372 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
1373 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
1374 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
1375 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
1376 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
1377 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
1378 (WebCore::SVGPathElement::createSVGPathSegArcRel):
1379 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
1380 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
1381 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
1382 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
1383 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
1384 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
1385 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
1386 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
1387 * svg/SVGPathElement.h:
1388 * svg/SVGPathSegArcAbs.h:
1389 (WebCore::SVGPathSegArcAbs::create):
1390 * svg/SVGPathSegArcRel.h:
1391 (WebCore::SVGPathSegArcRel::create):
1392 * svg/SVGPathSegClosePath.h:
1393 (WebCore::SVGPathSegClosePath::create):
1394 * svg/SVGPathSegCurvetoCubicAbs.h:
1395 (WebCore::SVGPathSegCurvetoCubicAbs::create):
1396 * svg/SVGPathSegCurvetoCubicRel.h:
1397 (WebCore::SVGPathSegCurvetoCubicRel::create):
1398 * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
1399 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
1400 * svg/SVGPathSegCurvetoCubicSmoothRel.h:
1401 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
1402 * svg/SVGPathSegCurvetoQuadraticAbs.h:
1403 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
1404 * svg/SVGPathSegCurvetoQuadraticRel.h:
1405 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
1406 * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
1407 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
1408 * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
1409 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
1410 * svg/SVGPathSegLinetoAbs.h:
1411 (WebCore::SVGPathSegLinetoAbs::create):
1412 * svg/SVGPathSegLinetoHorizontalAbs.h:
1413 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
1414 * svg/SVGPathSegLinetoHorizontalRel.h:
1415 (WebCore::SVGPathSegLinetoHorizontalRel::create):
1416 * svg/SVGPathSegLinetoRel.h:
1417 (WebCore::SVGPathSegLinetoRel::create):
1418 * svg/SVGPathSegLinetoVerticalAbs.h:
1419 (WebCore::SVGPathSegLinetoVerticalAbs::create):
1420 * svg/SVGPathSegLinetoVerticalRel.h:
1421 (WebCore::SVGPathSegLinetoVerticalRel::create):
1422 * svg/SVGPathSegMovetoAbs.h:
1423 (WebCore::SVGPathSegMovetoAbs::create):
1424 * svg/SVGPathSegMovetoRel.h:
1425 (WebCore::SVGPathSegMovetoRel::create):
1426 * svg/SVGViewSpec.h:
1427 (WebCore::SVGViewSpec::create):
1428 * svg/animation/SMILTimeContainer.h:
1429 (WebCore::SMILTimeContainer::create):
1430 * svg/animation/SVGSMILElement.cpp:
1431 (WebCore::ConditionEventListener::create):
1432 * svg/graphics/SVGImage.h:
1433 * svg/graphics/SVGImageForContainer.h:
1434 * svg/graphics/filters/SVGFilter.cpp:
1435 (WebCore::SVGFilter::create):
1436 * svg/graphics/filters/SVGFilter.h:
1438 2015-04-28 Simon Fraser <simon.fraser@apple.com>
1440 Make a non-static version of FrameView::yPositionForRootContentLayer()
1441 https://bugs.webkit.org/show_bug.cgi?id=144375
1443 Reviewed by Andy Estes.
1445 There were two calls to the static FrameView::yPositionForRootContentLayer()
1446 which passed in all the arguments for the same FrameView. Make a member
1447 function for convenience.
1449 * page/FrameView.cpp:
1450 (WebCore::FrameView::yPositionForRootContentLayer):
1452 * rendering/RenderLayerCompositor.cpp:
1453 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1455 2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
1457 [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
1458 https://bugs.webkit.org/show_bug.cgi?id=143001
1460 Reviewed by Gyuyoung Kim.
1462 TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
1463 So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
1465 In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
1466 where other coordinated graphics files are located.
1468 * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
1469 * PlatformEfl.cmake:
1470 * PlatformGTK.cmake:
1471 * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
1472 * WebCore.vcxproj/WebCore.vcxproj.filters:
1473 * loader/EmptyClients.h:
1476 * page/ChromeClient.h:
1478 (WebCore::Frame::createView):
1479 * page/FrameView.cpp:
1480 (WebCore::FrameView::requestScrollPositionUpdate):
1483 (WebCore::Page::setPageScaleFactor):
1484 * platform/HostWindow.h:
1485 * platform/ScrollView.cpp:
1486 (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
1487 (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
1488 (WebCore::ScrollView::visibleContentRectInternal):
1489 (WebCore::ScrollView::scrollTo):
1490 * platform/ScrollView.h:
1491 * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
1492 * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
1493 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
1494 * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
1495 * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
1496 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
1498 2015-04-28 Brent Fulgham <bfulgham@apple.com>
1500 REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
1501 https://bugs.webkit.org/show_bug.cgi?id=144366
1502 <rdar://problem/20533513>
1504 Reviewed by Dean Jackson.
1506 * rendering/RenderBlockFlow.cpp:
1507 (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
1508 before attempting to dereference it.
1510 2015-04-28 Andreas Kling <akling@apple.com>
1512 Simplify DOM wrapper destruction, don't deref() in finalizers.
1513 <https://webkit.org/b/144183>
1515 Reviewed by Darin Adler.
1517 DOM JS bindings had two mechanisms to call deref() on the WebCore object,
1518 once through a weak finalizer, and once through the JSCell's regular destructor.
1520 That was once believed to be an optimization, but these days the finalizer will
1521 run just moments before the destructor anyway, all in the same call stack.
1522 And more importantly, the finalizer is not guaranteed to run, for instance in the
1523 case where a Weak is assigned to after going dead, but before the WeakBlock
1524 has been swept by the incremental sweeper.
1526 Simplify this by just removing the deref() from the generated finalizers.
1527 This makes it easier to reason about DOM wrapper destruction, and eliminates
1528 the awkward time window where a DOM wrapper could have a null impl().
1530 We could spend more time on figuring out a way to have finalizers manage the
1531 destruction of these wrappers, but that would require fundamental changes to
1532 our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
1533 destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
1534 However the risk:reward ratio does not seem justified at this point in time.
1536 * bindings/scripts/CodeGeneratorJS.pm:
1538 (GenerateImplementation):
1539 * bindings/js/JSCSSValueCustom.cpp:
1540 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1541 (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
1542 (WebCore::JSTestActiveDOMObjectOwner::finalize):
1543 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1544 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1545 (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
1546 (WebCore::JSTestCustomNamedGetterOwner::finalize):
1547 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1548 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1549 (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
1550 (WebCore::JSTestEventConstructorOwner::finalize):
1551 * bindings/scripts/test/JS/JSTestEventConstructor.h:
1552 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1553 (WebCore::JSTestEventTarget::~JSTestEventTarget):
1554 (WebCore::JSTestEventTargetOwner::finalize):
1555 * bindings/scripts/test/JS/JSTestEventTarget.h:
1556 * bindings/scripts/test/JS/JSTestException.cpp:
1557 (WebCore::JSTestException::~JSTestException):
1558 (WebCore::JSTestExceptionOwner::finalize):
1559 * bindings/scripts/test/JS/JSTestException.h:
1560 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1561 (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
1562 (WebCore::JSTestGenerateIsReachableOwner::finalize):
1563 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1564 * bindings/scripts/test/JS/JSTestInterface.cpp:
1565 (WebCore::JSTestInterface::~JSTestInterface):
1566 (WebCore::JSTestInterfaceOwner::finalize):
1567 * bindings/scripts/test/JS/JSTestInterface.h:
1568 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1569 (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
1570 (WebCore::JSTestMediaQueryListListenerOwner::finalize):
1571 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1572 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1573 (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
1574 (WebCore::JSTestNamedConstructorOwner::finalize):
1575 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1576 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1577 (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
1578 (WebCore::JSTestNondeterministicOwner::finalize):
1579 * bindings/scripts/test/JS/JSTestNondeterministic.h:
1580 * bindings/scripts/test/JS/JSTestObj.cpp:
1581 (WebCore::JSTestObj::~JSTestObj):
1582 (WebCore::JSTestObjOwner::finalize):
1583 * bindings/scripts/test/JS/JSTestObj.h:
1584 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1585 (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
1586 (WebCore::JSTestOverloadedConstructorsOwner::finalize):
1587 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1588 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1589 (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
1590 (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
1591 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1592 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1593 (WebCore::JSTestTypedefs::~JSTestTypedefs):
1594 (WebCore::JSTestTypedefsOwner::finalize):
1595 * bindings/scripts/test/JS/JSTestTypedefs.h:
1596 * bindings/scripts/test/JS/JSattribute.cpp:
1597 (WebCore::JSattribute::~JSattribute):
1598 (WebCore::JSattributeOwner::finalize):
1599 * bindings/scripts/test/JS/JSattribute.h:
1600 * bindings/scripts/test/JS/JSreadonly.cpp:
1601 (WebCore::JSreadonly::~JSreadonly):
1602 (WebCore::JSreadonlyOwner::finalize):
1603 * bindings/scripts/test/JS/JSreadonly.h:
1605 2015-04-28 Alex Christensen <achristensen@webkit.org>
1607 Build WinCairo without cygwin.
1608 https://bugs.webkit.org/show_bug.cgi?id=144365
1610 Reviewed by Myles Maxfield.
1612 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
1613 Pass the CC executable to build-generated-files.pl like r182164.
1614 * WebCore.vcxproj/build-generated-files.pl:
1615 Default to 8 CPUs unless otherwise specified.
1617 2015-04-28 Sam Weinig <sam@webkit.org>
1619 [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
1620 https://bugs.webkit.org/show_bug.cgi?id=144363
1622 Reviewed by Alex Christensen.
1624 This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
1626 * contentextensions/CombinedURLFilters.cpp:
1627 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1628 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
1629 * contentextensions/CombinedURLFilters.h:
1630 Replace function that creates a Vector of all the NFAs with one that allows incremental processing
1631 as they are created.
1633 * contentextensions/ContentExtensionCompiler.cpp:
1634 (WebCore::ContentExtensions::addUniversalActionsToDFA):
1635 Extract code to add universal actions into a helper, since we need to call it in two places now.
1637 (WebCore::ContentExtensions::compileRuleList):
1638 Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
1639 of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
1640 ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
1641 placed on the first DFA.
1643 2015-04-28 Timothy Horton <timothy_horton@apple.com>
1645 [TextIndicator] Yellow highlight takes too long to fade out on scroll
1646 https://bugs.webkit.org/show_bug.cgi?id=144358
1647 <rdar://problem/19451011>
1649 Reviewed by Beth Dakin.
1651 * page/TextIndicator.h:
1652 Add Lifetime and DismissalAnimation enums.
1654 (WebCore::TextIndicator::contentImageWithHighlight):
1655 (WebCore::TextIndicator::contentImage):
1658 * page/mac/TextIndicatorWindow.h:
1659 * page/mac/TextIndicatorWindow.mm:
1660 (WebCore::TextIndicatorWindow::TextIndicatorWindow):
1661 (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1662 (WebCore::TextIndicatorWindow::clearTextIndicator):
1663 (WebCore::TextIndicatorWindow::setTextIndicator):
1664 (WebCore::TextIndicatorWindow::closeWindow):
1665 (WebCore::TextIndicatorWindow::startFadeOut):
1666 Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
1667 This is just about temporary-lifetime TextIndicators, like the ones
1668 you get when the find-in-page UI is hidden but you hit Cmd-G.
1670 Add clearTextIndicator, which takes a DismissalAnimation, providing
1671 clients an opportunity to avoid the normal fade-out animation, if it
1672 was going to happen.
1674 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1676 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1677 https://bugs.webkit.org/show_bug.cgi?id=144304
1679 Reviewed by Geoffrey Garen.
1681 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1683 * Configurations/FeatureDefines.xcconfig:
1685 2015-04-28 Commit Queue <commit-queue@webkit.org>
1687 Unreviewed, rolling out r183514.
1688 https://bugs.webkit.org/show_bug.cgi?id=144359
1690 It broke cloop test bots (Requested by mcatanzaro on #webkit).
1694 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1695 https://bugs.webkit.org/show_bug.cgi?id=144304
1696 http://trac.webkit.org/changeset/183514
1698 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1700 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1701 https://bugs.webkit.org/show_bug.cgi?id=144304
1703 Reviewed by Geoffrey Garen.
1705 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1707 * Configurations/FeatureDefines.xcconfig:
1709 2015-04-28 Zalan Bujtas <zalan@apple.com>
1711 Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
1712 https://bugs.webkit.org/show_bug.cgi?id=144351
1714 Reviewed by Simon Fraser.
1716 This patch ensures that CG context is properly restored after painting dashed/dotted lines.
1718 Test: fast/forms/checkbox-painting-with-hr.html
1720 * platform/graphics/cg/GraphicsContextCG.cpp:
1721 (WebCore::GraphicsContext::drawLine):
1723 2015-04-28 Simon Fraser <simon.fraser@apple.com>
1725 Provide contentsToView() and viewToContents() functions on ScrollView, and use them
1726 https://bugs.webkit.org/show_bug.cgi?id=144357
1728 Reviewed by Tim Horton.
1730 Too much code was consulting topContentInset() and headerHeight() directly. Replace
1731 with calls to new contentsToView() and viewToContents() functions, which wrap the
1732 exisiting documentScrollOffsetRelativeToViewOrigin().
1734 Use the new functions in FrameView and ScrollView coordinate mapping functions.
1738 * page/FrameView.cpp:
1739 (WebCore::FrameView::convertFromRendererToContainingView):
1740 (WebCore::FrameView::convertFromContainingViewToRenderer):
1741 * platform/ScrollView.cpp:
1742 (WebCore::ScrollView::viewToContents):
1743 (WebCore::ScrollView::contentsToView):
1744 (WebCore::ScrollView::rootViewToContents):
1745 (WebCore::ScrollView::contentsToRootView):
1746 (WebCore::ScrollView::rootViewToTotalContents):
1747 (WebCore::ScrollView::windowToContents):
1748 (WebCore::ScrollView::contentsToWindow):
1749 * platform/ScrollView.h:
1751 2015-04-28 Eric Carlson <eric.carlson@apple.com>
1753 [Mac] Simplify code to support media engines which do not support target playback
1754 https://bugs.webkit.org/show_bug.cgi?id=144332
1756 Reviewed by Jer Noble.
1758 * Modules/mediasession/WebMediaSessionManager.cpp:
1759 (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
1760 callback, let them decide if it is significant or not.
1762 * html/HTMLMediaElement.cpp:
1763 (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
1764 (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
1765 (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
1766 (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
1767 (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
1768 (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
1769 (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
1770 (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
1771 (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
1772 event is dispatched when the current target is wireless but the media engine does not support
1773 wireless playback, tell the media engine not to play to the target.
1774 * html/HTMLMediaElement.h:
1775 * html/HTMLMediaElement.idl:
1777 * html/HTMLMediaSession.cpp:
1778 (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
1779 (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
1780 * html/HTMLMediaSession.h:
1782 * platform/graphics/MediaPlayer.cpp:
1783 (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
1784 * platform/graphics/MediaPlayer.h:
1785 * platform/graphics/MediaPlayerPrivate.h:
1787 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1788 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
1789 to explicitly manage the lifetime of the temporary object.
1790 (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
1791 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1793 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1794 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
1795 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
1796 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
1798 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1799 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1800 (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
1801 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
1802 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
1804 2015-04-28 Alex Christensen <achristensen@webkit.org>
1806 [Content Extensions] Use less memory for CombinedURLFilters.
1807 https://bugs.webkit.org/show_bug.cgi?id=144290
1809 Reviewed by Andreas Kling.
1811 * contentextensions/CombinedURLFilters.cpp:
1812 (WebCore::ContentExtensions::recursiveMemoryUsed):
1813 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1814 (WebCore::ContentExtensions::generateNFAForSubtree):
1815 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
1816 * contentextensions/NFA.cpp:
1817 (WebCore::ContentExtensions::NFA::memoryUsed):
1818 (WebCore::ContentExtensions::NFA::setActions):
1819 * contentextensions/NFA.h:
1820 * contentextensions/NFANode.h:
1821 * contentextensions/Term.h:
1822 (WebCore::ContentExtensions::Term::Term::generateGraph):
1823 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1824 Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
1826 2015-04-28 Brady Eidson <beidson@apple.com>
1828 Consolidate most "frame load" arguments into FrameLoadRequest.
1829 https://bugs.webkit.org/show_bug.cgi?id=144276
1831 Reviewed by Alexey Proskuryakov.
1833 No new tests (No change in behavior).
1835 This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
1837 Humble beginnings of this long process:
1838 - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
1839 - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
1840 - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
1841 - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
1843 These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
1844 arguments were from these various call sites.
1846 Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
1847 able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
1850 * inspector/InspectorFrontendClientLocal.cpp:
1851 (WebCore::InspectorFrontendClientLocal::openInNewTab):
1853 * inspector/InspectorPageAgent.cpp:
1854 (WebCore::InspectorPageAgent::navigate):
1856 * loader/FrameLoadRequest.cpp:
1857 (WebCore::FrameLoadRequest::FrameLoadRequest):
1858 * loader/FrameLoadRequest.h:
1859 (WebCore::FrameLoadRequest::FrameLoadRequest):
1860 (WebCore::FrameLoadRequest::lockHistory):
1861 (WebCore::FrameLoadRequest::lockBackForwardList):
1862 (WebCore::FrameLoadRequest::shouldSendReferrer):
1863 (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
1864 (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
1865 (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
1867 * loader/FrameLoader.cpp:
1868 (WebCore::FrameLoader::changeLocation):
1869 (WebCore::FrameLoader::urlSelected):
1870 (WebCore::FrameLoader::loadFrameRequest):
1871 * loader/FrameLoader.h:
1873 * loader/NavigationScheduler.cpp:
1874 (WebCore::NavigationScheduler::scheduleLocationChange):
1876 * page/ContextMenuController.cpp:
1877 (WebCore::openNewWindow):
1878 (WebCore::ContextMenuController::contextMenuItemSelected):
1880 * page/DOMWindow.cpp:
1881 (WebCore::DOMWindow::createWindow):
1883 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
1885 [Mac] [iOS] Implement font-synthesis CSS property
1886 https://bugs.webkit.org/show_bug.cgi?id=144305
1888 Reviewed by Andreas Kling.
1890 This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
1892 The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
1893 determine if we should synthesize bold and italics, this CSS property simply guards that decision.
1895 Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
1896 regarding font-synthesis into FontDescription (from RenderStyle).
1898 Test: fast/css3-text/font-synthesis.html
1900 * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
1901 inside FontDescription. This also means that the property must be marked as a "high priority" property, which
1902 is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
1903 FontCacheIOS and FontCacheMac have access to the saved state.
1904 * css/CSSComputedStyleDeclaration.cpp:
1905 (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
1906 * css/CSSSegmentedFontFace.cpp:
1907 (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
1908 FontSynthesis state inside FontDescription.
1909 * css/StyleBuilderConverter.h:
1910 (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
1911 StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
1913 * css/StyleBuilderCustom.h:
1914 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
1915 * platform/graphics/FontDescription.h:
1916 (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
1917 (WebCore::FontDescription::fontSynthesis): Ditto.
1918 (WebCore::FontDescription::setFontSynthesis): Ditto.
1919 (WebCore::FontDescription::initialFontSynthesis): Ditto.
1920 (WebCore::FontDescription::operator==): Update to include new state.
1921 * platform/graphics/FontCache.h:
1922 (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
1923 state inside FontDescription.
1924 * platform/graphics/ios/FontCacheIOS.mm:
1925 (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
1926 new FontSynthesis state inside FontDescription.
1927 * platform/graphics/mac/FontCacheMac.mm:
1928 (WebCore::FontCache::createFontPlatformData): Ditto.
1929 * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
1930 * rendering/style/RenderStyle.h:
1931 (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
1932 (WebCore::RenderStyle::setFontSynthesis): Ditto.
1933 (WebCore::RenderStyle::initialFontSynthesis): Ditto.
1934 * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
1935 * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
1937 2015-04-28 Youenn Fablet <youenn.fablet@crf.canon.fr>
1939 SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
1940 https://bugs.webkit.org/show_bug.cgi?id=144321
1942 Reviewed by Darin Adler.
1944 Patch correctness covered by existing tests.
1946 * platform/SharedBuffer.cpp:
1947 (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
1949 2015-04-28 Per Arne Vollan <peavo@outlook.com>
1952 https://bugs.webkit.org/show_bug.cgi?id=144327
1954 Reviewed by Brent Fulgham.
1956 When a data url is loaded, the ResourceHandle is not released.
1958 * platform/network/curl/ResourceHandleManager.cpp:
1959 (WebCore::ResourceHandleManager::startJob):
1961 2015-04-28 Andy Estes <aestes@apple.com>
1963 Fix the Mavericks Debug build after r183467.
1965 * platform/network/ResourceRequestBase.h:
1966 (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
1967 (WebCore::ResourceRequestBase::setRequester): Ditto.
1969 2015-04-28 Csaba Osztrogonác <ossy@webkit.org>
1971 Remove make-file-arrays.py
1972 https://bugs.webkit.org/show_bug.cgi?id=144324
1974 Reviewed by Gyuyoung Kim.
1976 * make-file-arrays.py: Removed.
1978 2015-04-28 Antti Koivisto <antti@apple.com>
1982 * platform/network/ios/ResourceRequestIOS.mm:
1983 (WebCore::ResourceRequest::ResourceRequest):
1985 2015-04-28 Antti Koivisto <antti@apple.com>
1987 Network Cache: Disk cache getting filled by YouTube video data
1988 https://bugs.webkit.org/show_bug.cgi?id=144259
1990 Reviewed by Darin Adler.
1992 MSE media is loaded via XHR and tends to eventually fill the cache.
1994 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1995 We can reduce disk writes and keep more useful resources around by not caching them
1997 Test: http/tests/cache/disk-cache/disk-cache-media.html
1999 * loader/DocumentLoader.cpp:
2000 (WebCore::DocumentLoader::startLoadingMainResource):
2004 * loader/cache/CachedRawResource.cpp:
2005 (WebCore::CachedRawResource::CachedRawResource):
2006 * page/DiagnosticLoggingKeys.cpp:
2007 (WebCore::DiagnosticLoggingKeys::streamingMedia):
2008 * page/DiagnosticLoggingKeys.h:
2009 * platform/network/ResourceRequestBase.cpp:
2010 (WebCore::ResourceRequestBase::adopt):
2011 (WebCore::ResourceRequestBase::copyData):
2012 (WebCore::equalIgnoringHeaderFields):
2013 * platform/network/ResourceRequestBase.h:
2014 (WebCore::ResourceRequestBase::requester):
2015 (WebCore::ResourceRequestBase::setRequester):
2017 Add requester type to the request object. Currently this is main resource, xhr or unspecified.
2019 (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
2020 (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
2021 * platform/network/cf/ResourceRequest.h:
2022 (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
2023 (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
2025 Replace this iOS only field with shared mechanism.
2027 * platform/network/ios/QuickLook.mm:
2028 (WebCore::QuickLookHandle::create):
2029 * xml/XMLHttpRequest.cpp:
2030 (WebCore::XMLHttpRequest::createRequest):
2034 2015-04-28 Namhoon Kim <nakim@ea.com>
2036 Fix windows build error in WebCore related to bulk build.
2037 https://bugs.webkit.org/show_bug.cgi?id=144313
2039 Reviewed by Csaba Osztrogonác.
2041 No new tests because there is no behavior change.
2043 * css/CSSAllInOne.cpp:
2044 * dom/DOMAllInOne.cpp:
2046 2015-04-27 Simon Fraser <simon.fraser@apple.com>
2048 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
2049 https://bugs.webkit.org/show_bug.cgi?id=144198
2051 Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
2052 paths set the style to the existing pointer, but with a SyntheticStyleChange.
2053 We have to avoid an early return in this case.
2055 * rendering/RenderElement.cpp:
2056 (WebCore::RenderElement::setStyle):
2058 2015-04-25 Simon Fraser <simon.fraser@apple.com>
2060 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
2061 https://bugs.webkit.org/show_bug.cgi?id=144198
2063 Reviewed by Darin Adler, Antti Koivisto.
2065 SyntheticStyleChange style recalcs are triggered for cases where behavior depends
2066 on state which is outside of RenderStyle; this includes triggering compositing for
2067 animations, for video and canvas, and for iframes with composited content.
2069 In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
2070 with diff == StyleDifferenceEqual, and so be unable to determine if there
2071 is actual work to be done.
2073 This patch enforces the contract that the diff is never StyleDifferenceEqual if
2074 compositing or other work has to happen from setStyle(). This is achieved by
2075 passing in a 'hasSideEffects' flag, which causes the diff to become at least
2076 StyleDifferenceRecompositeLayer.
2078 RenderLayerCompositor::layerStyleChanged() can now safely early return
2079 if the diff is equal. Future patches will reduce redundant work even more.
2081 Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
2083 * page/animation/AnimationBase.h:
2084 (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
2085 (WebCore::AnimationBase::state):
2086 * page/animation/AnimationController.cpp:
2087 (WebCore::AnimationController::updateAnimations): bool out param which indicates
2088 whether any animations changed state.
2089 * page/animation/AnimationController.h:
2090 * page/animation/CompositeAnimation.cpp:
2091 (WebCore::CompositeAnimation::animate): If any transitions or animations changed
2092 state, set the animationStateChanged out param to true.
2093 * page/animation/CompositeAnimation.h:
2094 * page/animation/ImplicitAnimation.cpp:
2095 (WebCore::ImplicitAnimation::animate): Return true if the state changed.
2096 * page/animation/ImplicitAnimation.h:
2097 * page/animation/KeyframeAnimation.cpp:
2098 (WebCore::KeyframeAnimation::animate): Return true if the state changed.
2099 * page/animation/KeyframeAnimation.h:
2100 * rendering/RenderElement.cpp:
2101 (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
2102 != StyleDifferenceEqual, but still need to do the check to see if layers changed.
2103 (WebCore::RenderElement::initializeStyle): When setting style for the first time,
2104 don't use StyleDifferenceEqual.
2105 (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
2106 change involves side effects. If the diff is equal but the flag is set, change
2107 the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
2108 * rendering/RenderElement.h:
2109 (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
2110 is true, or if animation state changed.
2111 * rendering/RenderLayer.cpp:
2112 (WebCore::RenderLayer::styleChanged): Pass the diff down.
2113 * rendering/RenderLayerCompositor.cpp:
2114 (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
2115 * rendering/RenderLayerCompositor.h:
2116 * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
2117 setting style for the first time.
2118 * style/StyleResolveTree.cpp:
2119 (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
2120 (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
2121 says there are side-effects.
2123 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
2125 [GTK] Add one single option to control all OpenGL-related options
2126 https://bugs.webkit.org/show_bug.cgi?id=144105
2128 Reviewed by Martin Robinson.
2130 Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
2132 * PlatformGTK.cmake:
2134 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
2136 Consolidate one-line flag-related header files into TextFlags.h
2137 https://bugs.webkit.org/show_bug.cgi?id=144295
2139 Reviewed by Tim Horton.
2141 There were a collection of single-line header files throughout platform/ which contain
2142 single-line type declaractions of flags related to text layout & rendering. This patch
2143 consolidates all these single-line headers into TextFlags.h
2145 No new tests because there is no behavior change.
2147 * WebCore.vcxproj/WebCore.vcxproj:
2148 * WebCore.vcxproj/WebCore.vcxproj.filters:
2149 * WebCore.xcodeproj/project.pbxproj:
2150 * css/CSSFontFace.h:
2151 * css/CSSPrimitiveValueMappings.h:
2152 * loader/cache/CachedFont.h:
2153 * loader/cache/CachedTextTrack.h:
2155 * platform/DragImage.h:
2156 * platform/graphics/FontDescription.h:
2157 * platform/graphics/FontOrientation.h: Removed.
2158 * platform/graphics/FontPlatformData.h:
2159 * platform/graphics/FontRenderingMode.h: Removed.
2160 * platform/graphics/FontSmoothingMode.h: Removed.
2161 * platform/graphics/FontTraitsMask.h: Removed.
2162 * platform/graphics/FontWidthVariant.h: Removed.
2163 * platform/graphics/TextRenderingMode.h: Removed.
2164 * platform/graphics/cairo/FontCustomPlatformData.h:
2165 * platform/graphics/freetype/FontPlatformData.h:
2166 * platform/graphics/mac/FontCustomPlatformData.h:
2167 * platform/graphics/win/FontCustomPlatformData.h:
2168 * platform/text/NonCJKGlyphOrientation.h: Removed.
2169 * platform/text/TextFlags.h:
2170 * rendering/TextPainter.h:
2171 * style/StyleFontSizeFunctions.h:
2173 2015-04-27 Daniel Bates <dabates@apple.com>
2175 Form control may be associated with the wrong HTML Form element after form id change
2176 https://bugs.webkit.org/show_bug.cgi?id=133456
2177 <rdar://problem/17095055>
2179 Reviewed by Andy Estes.
2181 Fixes an issue where a form control may be associated with the wrong HTML Form element
2182 after the id of the HTML Form element associated with the form control is changed when
2183 there is more than one HTML Form element with the same id in the document. Specifically,
2184 a form control that has an HTML form attribute value X will always be associated with
2185 some HTML Form element f where f.id = X regardless of whether f.id is subsequently
2188 Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
2189 fast/forms/change-form-id-to-be-unique.html
2192 (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
2193 (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
2194 as to whether we should notify observers of the id change.
2195 (WebCore::Element::updateIdForTreeScope): Ditto.
2196 (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
2197 indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
2198 we have not actually modified it when this method is called. Instead we will notify observers
2199 in Element::attributeChanged(), which is called after the DOM attribute id is modified.
2200 (WebCore::Element::cloneAttributesFromElement): Ditto.
2201 * dom/Element.h: Defined enum class NotifyObservers.
2202 * dom/TreeScope.cpp:
2203 (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
2204 as to whether we should dispatch a notification to all observers.
2205 (WebCore::TreeScope::removeElementById): Ditto.
2208 2015-04-27 Alex Christensen <achristensen@webkit.org>
2210 Reduce allocations and memory usage when compiling content extensions.
2211 https://bugs.webkit.org/show_bug.cgi?id=144277
2213 Reviewed by Benjamin Poulain.
2215 Covered by existing tests.
2217 * contentextensions/Term.h:
2218 (WebCore::ContentExtensions::Term::CharacterSet::set):
2219 (WebCore::ContentExtensions::Term::CharacterSet::get):
2220 (WebCore::ContentExtensions::Term::CharacterSet::invert):
2221 (WebCore::ContentExtensions::Term::CharacterSet::inverted):
2222 (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
2223 (WebCore::ContentExtensions::Term::CharacterSet::operator==):
2224 (WebCore::ContentExtensions::Term::CharacterSet::hash):
2225 (WebCore::ContentExtensions::Term::Term):
2226 (WebCore::ContentExtensions::Term::addCharacter):
2227 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
2228 (WebCore::ContentExtensions::Term::isUniversalTransition):
2229 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
2230 Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
2232 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
2234 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
2235 https://bugs.webkit.org/show_bug.cgi?id=144193
2237 Reviewed by Darin Adler.
2240 * platform/graphics/ANGLEWebKitBridge.cpp:
2241 * platform/graphics/FormatConverter.cpp:
2242 * platform/graphics/FormatConverter.h:
2243 * platform/graphics/GLContext.h:
2244 * platform/graphics/GraphicsContext3D.cpp:
2245 * platform/graphics/GraphicsContext3DPrivate.cpp:
2246 * platform/graphics/OpenGLShims.cpp:
2247 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2248 * platform/graphics/cg/GraphicsContext3DCG.cpp:
2249 * platform/graphics/egl/GLContextEGL.cpp:
2250 * platform/graphics/egl/GLContextEGL.h:
2251 * platform/graphics/glx/GLContextGLX.cpp:
2252 * platform/graphics/glx/GLContextGLX.h:
2253 * platform/graphics/mac/GraphicsContext3DMac.mm:
2254 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2255 * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2256 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2257 * platform/graphics/opengl/GLPlatformContext.cpp:
2258 * platform/graphics/opengl/GLPlatformSurface.cpp:
2259 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2260 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2261 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2262 * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
2263 * platform/graphics/win/GraphicsContext3DWin.cpp:
2265 2015-04-27 Jer Noble <jer.noble@apple.com>
2267 [iOS] Video not centered in element on retina devices
2268 https://bugs.webkit.org/show_bug.cgi?id=144274
2270 Reviewed by Simon Fraser.
2272 In r173702, a transform was added to the video layer (and a matching, inverse transform
2273 in the UIProcess), but this transform affects the position property of the video layer
2274 used to position the video content within the element bounds when their aspect ratios
2277 To work around this problem, pre-apply the transform during -setPosition:.
2279 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2280 (-[WebVideoContainerLayer setPosition:]):
2282 2015-04-27 Jer Noble <jer.noble@apple.com>
2284 Add a setting & restriction which prevents non-interactivte playback of audible media elements.
2285 https://bugs.webkit.org/show_bug.cgi?id=143486
2287 Reviewed by Eric Carlson.
2289 Tests: media/audio-playback-restriction-autoplay.html
2290 media/audio-playback-restriction-play.html
2292 To allow clients who want to allow non-user-interactive video-only playback, but still
2293 restrict playback of audible media elements, add a new setting and matching restriction
2294 which disallows playback of media elements containing audible characteristics.
2296 * html/HTMLMediaElement.cpp:
2297 (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
2298 restriction if the audioPlaybackRequiresUserGesture() setting is set.
2299 (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
2300 out of the #if, as this confuses the heck out of diff and makes all subsequent
2301 changes appear to be within HTMLMediaElement::parseAttribute.
2302 (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
2303 It is checked again immediately after every autoplay() call site.
2304 (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
2305 (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
2306 is permitted, and if not, pause.
2307 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
2308 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
2309 * html/HTMLMediaSession.cpp:
2310 (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
2312 (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
2313 (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and
2314 audio playback is restricted, and return false if so.
2315 * html/HTMLMediaSession.h:
2316 * page/Settings.cpp:
2318 * testing/Internals.cpp:
2319 (WebCore::Internals::setMediaSessionRestrictions): Added.
2320 (WebCore::Internals::setMediaElementRestrictions): Added.
2321 * testing/Internals.h:
2322 * testing/Internals.idl:
2324 2015-04-27 Jer Noble <jer.noble@apple.com>
2326 [WebAudio] AudioContext does not remove user-gesture restriction during resume()
2327 https://bugs.webkit.org/show_bug.cgi?id=144211
2329 Reviewed by Eric Carlson.
2331 Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
2332 webaudio/audiocontext-restriction.html
2334 Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
2335 a user-gesture would start normally, but would effectively mute their outputs. Now that
2336 the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
2337 in the "suspended" state until the user-gesture restriction is lifted.
2339 Add a new method, willBeginPlayback() which checks and potentially clears the context's
2340 behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
2341 method when the state would transition to "running".
2343 Because they may be called before any nodes are created, make sure to call lazyInitialize()
2344 from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
2346 Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
2347 call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
2348 inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
2349 from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
2350 unconditionally, only do so when the user-gesture restriction is set.
2352 Now that an AudioContext will not transition to "running" state without a user-gesture (if
2353 that restriction is set), there's no reason to check for that restriction from inside
2354 AudioDestinationNode.
2356 Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
2358 * Modules/webaudio/AudioBufferSourceNode.cpp:
2359 (WebCore::AudioBufferSourceNode::startPlaying):
2360 * Modules/webaudio/AudioContext.cpp:
2361 (WebCore::AudioContext::nodeWillBeginPlayback):
2362 (WebCore::AudioContext::willBeginPlayback):
2363 (WebCore::AudioContext::willPausePlayback):
2364 (WebCore::AudioContext::startRendering):
2365 (WebCore::AudioContext::suspendContext):
2366 (WebCore::AudioContext::resumeContext):
2367 (WebCore::AudioContext::closeContext):
2368 (WebCore::AudioContext::suspendPlayback):
2369 (WebCore::AudioContext::mayResumePlayback):
2370 * Modules/webaudio/AudioContext.h:
2371 (WebCore::AudioContext::behaviorRestrictions):
2372 (WebCore::AudioContext::userGestureRequiredForAudioStart):
2373 (WebCore::AudioContext::pageConsentRequiredForAudioStart):
2374 * Modules/webaudio/AudioDestinationNode.cpp:
2375 (WebCore::AudioDestinationNode::render):
2376 * Modules/webaudio/AudioScheduledSourceNode.cpp:
2377 (WebCore::AudioScheduledSourceNode::start):
2378 * testing/Internals.cpp:
2379 (WebCore::Internals::setAudioContextRestrictions):
2380 * testing/Internals.h:
2381 * testing/Internals.idl:
2383 2015-04-27 Alexey Proskuryakov <ap@apple.com>
2387 * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2388 Use -setObject:forKey:, not array subscript.
2390 2015-04-27 Eric Carlson <eric.carlson@apple.com>
2392 WirelessTargetPicker should not be visible unless a file is playable
2393 https://bugs.webkit.org/show_bug.cgi?id=144271
2394 <rdar://problem/20712003>
2396 Reviewed by Jer Noble.
2398 * Modules/mediacontrols/mediaControlsApple.js:
2399 (Controller.prototype.isPlayable): New.
2400 (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
2401 (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
2402 status message has been hidden.
2404 2015-04-22 Martin Robinson <mrobinson@igalia.com>
2406 [CMake] Autogenerate cmakeconfig.h.cmake
2407 https://bugs.webkit.org/show_bug.cgi?id=143997
2409 Reviewed by Csaba Osztrogonác.
2411 * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
2412 as the ones exposed to the build.
2414 2015-04-27 Zalan Bujtas <zalan@apple.com>
2416 Simple line layout: Wrong text offsetting when range does not start from the first renderer.
2417 https://bugs.webkit.org/show_bug.cgi?id=144167
2418 rdar://problem/20639857
2420 Reviewed by Simon Fraser.
2422 This patch ensures that TextIterator returns the right text when the input range starts
2423 from a sibling node.
2425 TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
2426 It is required to map simple line layout runs to RenderText positions.
2427 This patch sets the offset value when the iteration start with a sibling node.
2429 Test: fast/text/range-text-with-simple-line-layout.html
2431 * editing/TextIterator.cpp:
2432 (WebCore::TextIterator::TextIterator):
2433 (WebCore::TextIterator::handleTextNode):
2435 2015-04-27 Commit Queue <commit-queue@webkit.org>
2437 Unreviewed, rolling out r183393.
2438 https://bugs.webkit.org/show_bug.cgi?id=144272
2440 Caused memory corruption detected by GuardMalloc (Requested by
2445 "Synchronous XMLHttpRequest should get access to AppCache
2446 resources stored as flat files"
2447 https://bugs.webkit.org/show_bug.cgi?id=143711
2448 http://trac.webkit.org/changeset/183393
2450 2015-04-27 Per Arne Vollan <peavo@outlook.com>
2452 [Curl] Favicons loaded from disc cache are ignored.
2453 https://bugs.webkit.org/show_bug.cgi?id=143953
2455 Reviewed by Alex Christensen.
2457 When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
2458 This happens because we give a 304 response, which makes the icon loader ignore
2459 the response. We can solve this by responding with 200 OK.
2461 * platform/network/ResourceHandleInternal.h:
2462 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2463 * platform/network/curl/CurlCacheManager.cpp:
2464 (WebCore::CurlCacheManager::didReceiveResponse):
2465 * platform/network/curl/ResourceHandleManager.cpp:
2466 (WebCore::headerCallback):
2467 (WebCore::ResourceHandleManager::initializeHandle):
2469 2015-04-27 Brady Eidson <beidson@apple.com>
2471 Make 'enum NavigationType' be an enum class
2472 https://bugs.webkit.org/show_bug.cgi?id=144270
2474 Reviewed by Alex Christensen.
2476 No new tests (No change in behavior).
2478 I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
2479 an enum class first.
2481 * loader/FrameLoader.cpp:
2482 (WebCore::FrameLoader::load):
2483 (WebCore::FrameLoader::reload):
2484 (WebCore::FrameLoader::loadDifferentDocumentItem):
2485 * loader/FrameLoaderTypes.h:
2487 * loader/NavigationAction.cpp:
2488 (WebCore::navigationType):
2489 (WebCore::NavigationAction::NavigationAction):
2491 * loader/PolicyChecker.cpp:
2492 (WebCore::PolicyChecker::checkNavigationPolicy):
2494 * page/PerformanceNavigation.cpp:
2495 (WebCore::PerformanceNavigation::type):
2497 2015-04-27 Yoav Weiss <yoav@yoav.ws>
2499 Fix viewport units in Media Queries
2500 https://bugs.webkit.org/show_bug.cgi?id=144260
2502 Reviewed by Darin Adler.
2504 This patch makes sure that viewport units are considered "length units"
2505 in the context of Media Queries, by having MediaQueryExp use the unit logic
2506 that is in CSSPrimitiveValue.
2507 It does that by turning the relevant methods in CSSPrimitiveValue into static.
2509 It also makes sure that the logic for "resolution units" is not maintained separately
2510 in MediaQueryExp, to avoid similiar issues in the future with resolution units.
2512 Test: fast/media/mq-viewport-units.html
2514 * css/CSSPrimitiveValue.h:
2515 (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
2516 (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
2517 (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
2518 * css/MediaQueryExp.cpp:
2519 (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
2520 (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
2522 2015-04-27 Javier Fernandez <jfernandez@igalia.com>
2524 [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
2525 https://bugs.webkit.org/show_bug.cgi?id=133280
2527 Reviewed by David Hyatt.
2529 Implementation of justify-self and justify-items properties for grid. It supports
2530 different writing-modes and direction. Margins, borders and paddings are also
2531 considered when computing the final position and stretched size.
2533 This patch applies also a quite important refactoring of the alignment logic in
2534 order to share code between the two alignment dimensions, row-axis and column-axis.
2536 Overflow handling is still missing and will be added later in a follow-up bug.
2538 Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
2539 fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
2540 fast/css-grid-layout/grid-align-justify-margin-border-padding.html
2541 fast/css-grid-layout/justify-self-cell.html
2543 * rendering/RenderGrid.cpp:
2544 (WebCore::RenderGrid::layoutGridItems):
2545 (WebCore::RenderGrid::columnAxisPositionForChild):
2546 (WebCore::RenderGrid::rowAxisPositionForChild):
2547 (WebCore::RenderGrid::rowPositionForChild):
2548 (WebCore::RenderGrid::columnPositionForChild):
2549 (WebCore::RenderGrid::findChildLogicalPosition):
2550 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
2551 (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
2552 (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
2553 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
2554 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
2555 * rendering/RenderGrid.h:
2556 * rendering/style/RenderStyle.cpp:
2557 (WebCore::RenderStyle::resolveJustification):
2558 * rendering/style/RenderStyle.h:
2560 2015-04-27 Darin Adler <darin@apple.com>
2562 Crashes under IDBDatabase::closeConnection
2563 https://bugs.webkit.org/show_bug.cgi?id=141745
2565 Reviewed by Alexey Proskuryakov.
2567 * Modules/indexeddb/IDBDatabase.cpp:
2568 (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
2569 actually calling those functions.
2570 (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
2571 in the middle of this function's execution.
2573 2015-04-27 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2575 [Streams API] ReadableStream constructor start function should be able to close the stream
2576 https://bugs.webkit.org/show_bug.cgi?id=143363
2578 Reviewed by Benjamin Poulain.
2580 Implements https://streams.spec.whatwg.org/#close-readable-stream.
2581 When the "close" JS function is called, the stream is getting closed.
2582 The stream state is changed to close and if it has a reader, the reader gets closed as well:
2583 The reader resolves the closed promise and releases the stream.
2585 Enabled the possibility to resolve a promise with any JS value.
2586 This is used to resolve closed promise with jsUndefined and will be used for read promises in
2587 the future as well, though of course it is not restricted to Streams.
2589 Covered by reference tests that are now passing.
2591 * Modules/streams/ReadableStream.h:
2592 * Modules/streams/ReadableStream.cpp:
2593 (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
2594 * Modules/streams/ReadableStreamReader.cpp:
2595 (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
2596 (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
2597 in particular closed/errored state.
2598 (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
2599 (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
2600 immediately if the stream is already closed.
2601 (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
2602 resolves the promise and releases the stream.
2603 * Modules/streams/ReadableStreamReader.h:
2604 (WebCore::ReadableStreamReader::State): Added.
2605 * bindings/js/JSDOMPromise.h:
2606 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
2608 * bindings/js/JSReadableStreamControllerCustom.cpp:
2609 (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
2611 * bindings/js/JSReadableStreamReaderCustom.cpp:
2612 (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
2614 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
2616 Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
2617 https://bugs.webkit.org/show_bug.cgi?id=144255
2619 Reviewed by Carlos Garcia Campos.
2621 * rendering/RenderBox.cpp:
2622 (WebCore::RenderBox::computeLogicalHeight):
2624 2015-04-27 Youenn Fablet <youenn.fablet@crf.canon.fr>
2626 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
2627 https://bugs.webkit.org/show_bug.cgi?id=143711
2629 Reviewed by Darin Adler.
2631 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
2632 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
2633 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
2635 Test: http/tests/appcache/simple-video-sync.html
2637 * html/HTMLMediaElement.cpp:
2638 (WebCore::HTMLMediaElement::parseAttribute):
2639 * loader/DocumentThreadableLoader.cpp:
2640 (WebCore::DocumentThreadableLoader::loadRequest):
2641 * loader/FrameLoader.cpp:
2642 (WebCore::FrameLoader::loadResourceSynchronously):
2643 * loader/FrameLoader.h:
2644 * loader/appcache/ApplicationCacheHost.cpp:
2645 (WebCore::ApplicationCacheHost::maybeLoadResource):
2646 (WebCore::ApplicationCacheHost::createFileURL):
2647 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2648 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
2649 * loader/appcache/ApplicationCacheHost.h:
2650 * xml/XSLTProcessorLibxslt.cpp:
2651 (WebCore::docLoaderFunc):
2652 * xml/parser/XMLDocumentParserLibxml2.cpp:
2653 (WebCore::openFunc):
2655 2015-04-24 Philippe Normand <pnormand@igalia.com>
2657 [JHBuild] Move to upstream OpenWebRTC
2658 https://bugs.webkit.org/show_bug.cgi?id=144145
2660 Reviewed by Carlos Garcia Campos.
2662 * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
2663 (WebCore::initializeOpenWebRTC): Update with new owr_init API.
2665 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2667 [SOUP] Add initial implementation of NetworkProcess disk cache
2668 https://bugs.webkit.org/show_bug.cgi?id=143872
2670 Reviewed by Martin Robinson.
2672 Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
2673 is not a GObject and has copy/free functions instead of ref/unref,
2674 it's internally refcounted, so we could use copy/free as
2677 * PlatformGTK.cmake:
2678 * platform/network/soup/GRefPtrSoup.cpp: Added.
2681 * platform/network/soup/GRefPtrSoup.h: Added.
2683 2015-04-26 Manuel Rego Casasnovas <rego@igalia.com>
2685 [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
2686 https://bugs.webkit.org/show_bug.cgi?id=144144
2688 Reviewed by Darin Adler.
2690 Change order in hasDefiniteLogicalHeight() ifs to consider definite
2691 absolutely positioned elements.
2693 Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
2695 * rendering/RenderBox.cpp:
2696 (WebCore::RenderBox::hasDefiniteLogicalHeight):
2698 2015-04-26 Said Abou-Hallawa <sabouhallawa@apple.com>
2700 SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
2701 https://bugs.webkit.org/show_bug.cgi?id=144137
2703 Reviewed by Darin Adler.
2705 The SourceAlpha should be driven from the last applied FilterEffect. This
2706 will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
2707 than just getting the SourceGraphic reference from FilterEffectRenderer.
2709 This is based on the Blink patch:
2710 https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
2712 Test: svg/filters/sourceAlpha-input-filter-effect.html
2714 * platform/graphics/filters/SourceAlpha.cpp:
2715 (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
2716 rather than a Filter.
2718 (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
2719 rect from the wrapped FilterEffect.
2721 (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
2722 from the wrapped FilterEffect.
2724 (WebCore::SourceAlpha::SourceAlpha):
2725 * platform/graphics/filters/SourceAlpha.h:
2726 (WebCore::SourceAlpha::SourceAlpha): Deleted.
2727 Reimplement the constructor of the SourceAlpha such that it wraps the
2728 sourceEffect in its inputEffects.
2730 * rendering/FilterEffectRenderer.cpp:
2731 (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
2732 comment and do exactly what it said. This matches the implementation of
2735 * rendering/svg/RenderSVGResourceFilter.cpp:
2736 (WebCore::RenderSVGResourceFilter::buildPrimitives):
2737 Delete the extra argument.
2739 * svg/graphics/filters/SVGFilterBuilder.cpp:
2740 (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2741 * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
2742 passed source FilterEffect.
2744 * platform/graphics/filters/FEBlend.cpp:
2745 * platform/graphics/filters/FEBlend.h:
2746 * platform/graphics/filters/FEColorMatrix.cpp:
2747 * platform/graphics/filters/FEColorMatrix.h:
2748 * platform/graphics/filters/FEComponentTransfer.cpp:
2749 * platform/graphics/filters/FEComponentTransfer.h:
2750 * platform/graphics/filters/FEComposite.cpp:
2751 * platform/graphics/filters/FEComposite.h:
2752 * platform/graphics/filters/FEConvolveMatrix.cpp:
2753 * platform/graphics/filters/FEConvolveMatrix.h:
2754 * platform/graphics/filters/FEDiffuseLighting.cpp:
2755 * platform/graphics/filters/FEDiffuseLighting.h:
2756 * platform/graphics/filters/FEDisplacementMap.cpp:
2757 * platform/graphics/filters/FEDisplacementMap.h:
2758 * platform/graphics/filters/FEDropShadow.cpp:
2759 * platform/graphics/filters/FEDropShadow.h:
2760 * platform/graphics/filters/FEFlood.cpp:
2761 * platform/graphics/filters/FEFlood.h:
2762 * platform/graphics/filters/FEGaussianBlur.cpp:
2763 * platform/graphics/filters/FEGaussianBlur.h:
2764 * platform/graphics/filters/FELighting.cpp:
2765 * platform/graphics/filters/FELighting.h:
2766 * platform/graphics/filters/FEMerge.cpp:
2767 * platform/graphics/filters/FEMerge.h:
2768 * platform/graphics/filters/FEMorphology.cpp:
2769 * platform/graphics/filters/FEMorphology.h:
2770 * platform/graphics/filters/FEOffset.cpp:
2771 * platform/graphics/filters/FEOffset.h:
2772 * platform/graphics/filters/FESpecularLighting.cpp:
2773 * platform/graphics/filters/FESpecularLighting.h:
2774 * platform/graphics/filters/FETile.cpp:
2775 * platform/graphics/filters/FETile.h:
2776 * platform/graphics/filters/FETurbulence.cpp:
2777 * platform/graphics/filters/FETurbulence.h:
2778 * platform/graphics/filters/Filter.h:
2779 * platform/graphics/filters/FilterEffect.cpp:
2780 * platform/graphics/filters/FilterEffect.h:
2781 * platform/graphics/filters/SourceGraphic.cpp:
2782 * platform/graphics/filters/SourceGraphic.h:
2783 * rendering/svg/RenderSVGResourceFilter.h:
2784 * rendering/svg/SVGRenderTreeAsText.cpp:
2785 Code clean up: Pointer to reference conversion. It starts by converting
2786 FilterEffect::m_filter from pointer to reference and it kept expanding.
2787 All the creations of FilterEffect were happening by passing "this" so
2788 passing "*this" did not require to check whether the pointer is nil.
2790 * svg/SVGFEBlendElement.cpp:
2791 * svg/SVGFEBlendElement.h:
2792 * svg/SVGFEColorMatrixElement.cpp:
2793 * svg/SVGFEColorMatrixElement.h:
2794 * svg/SVGFEComponentTransferElement.cpp:
2795 * svg/SVGFEComponentTransferElement.h:
2796 * svg/SVGFECompositeElement.cpp:
2797 * svg/SVGFECompositeElement.h:
2798 * svg/SVGFEConvolveMatrixElement.cpp:
2799 * svg/SVGFEConvolveMatrixElement.h:
2800 * svg/SVGFEDiffuseLightingElement.cpp:
2801 * svg/SVGFEDiffuseLightingElement.h:
2802 * svg/SVGFEDisplacementMapElement.cpp:
2803 * svg/SVGFEDisplacementMapElement.h:
2804 * svg/SVGFEDropShadowElement.cpp:
2805 * svg/SVGFEDropShadowElement.h:
2806 * svg/SVGFEFloodElement.cpp:
2807 * svg/SVGFEFloodElement.h:
2808 * svg/SVGFEGaussianBlurElement.cpp:
2809 * svg/SVGFEGaussianBlurElement.h:
2810 * svg/SVGFEImageElement.cpp:
2811 * svg/SVGFEImageElement.h:
2812 * svg/SVGFEMergeElement.cpp:
2813 * svg/SVGFEMergeElement.h:
2814 * svg/SVGFEMorphologyElement.cpp:
2815 * svg/SVGFEMorphologyElement.h:
2816 * svg/SVGFEOffsetElement.cpp:
2817 * svg/SVGFEOffsetElement.h:
2818 * svg/SVGFESpecularLightingElement.cpp:
2819 * svg/SVGFESpecularLightingElement.h:
2820 * svg/SVGFETileElement.cpp:
2821 * svg/SVGFETileElement.h:
2822 * svg/SVGFETurbulenceElement.cpp:
2823 * svg/SVGFETurbulenceElement.h:
2824 * svg/SVGFilterPrimitiveStandardAttributes.h:
2825 * svg/graphics/filters/SVGFEImage.cpp:
2826 * svg/graphics/filters/SVGFEImage.h:
2827 Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
2830 2015-04-26 Darin Adler <darin@apple.com>
2832 REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
2833 https://bugs.webkit.org/show_bug.cgi?id=144237
2835 Reviewed by Simon Fraser.
2837 No test because DumpRenderTree and WebKitTestRunner don't have a good method
2838 for testing behaviors that are specific to active windows. That's the same reason
2839 that the change that caused this bug didn't come with a regression test.
2841 * rendering/RenderTheme.cpp:
2842 (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
2843 clarify the meaning of the setInsideDefaultButton function, and added an
2844 isDisabledFormControl check so it won't trigger on a disabled button.
2845 (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
2846 alphabetical order to match the rest of the switch statement ordering.
2848 * rendering/RenderThemeMac.mm:
2849 (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
2850 alphabetical order to match the rest of the switch statement ordering. Also
2851 fixed its behavior on older versions of OS X; it should just return the same
2852 thing that CSSValueButtontext would return in that context.
2854 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
2856 [ES6] Implement ES6 template literals
2857 https://bugs.webkit.org/show_bug.cgi?id=142691
2859 Reviewed by Darin Adler.
2861 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
2863 * Configurations/FeatureDefines.xcconfig:
2865 2015-04-26 Javier Fernandez <jfernandez@igalia.com>
2867 [CSS Grid Layout] Support for align-self and align-items in grid layout
2868 https://bugs.webkit.org/show_bug.cgi?id=133225
2870 Reviewed by Darin Adler.
2872 Implementation of align-self and align-items properties for grid. It supports
2873 different writing-modes and direction. Margins, borders and paddings are also
2874 considered when computing the final position and stretched size.
2876 Overflow handling is still missing and will be added when implemented row-axis
2879 Test: fast/css-grid-layout/grid-align.html
2881 * rendering/RenderBox.cpp:
2882 (WebCore::RenderBox::computeLogicalHeight):
2883 * rendering/RenderGrid.cpp:
2884 (WebCore::RenderGrid::logicalContentHeightForChild):
2885 (WebCore::RenderGrid::layoutGridItems):
2886 (WebCore::computeOverflowAlignmentOffset):
2887 (WebCore::RenderGrid::endOfRowForChild):
2888 (WebCore::RenderGrid::startOfRowForChild):
2889 (WebCore::RenderGrid::centeredRowPositionForChild):
2890 (WebCore::marginWidthForChild):
2891 (WebCore::marginHeightForChild):
2892 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
2893 (WebCore::RenderGrid::needToStretchChildLogicalHeight):
2894 (WebCore::RenderGrid::marginLogicalHeightForChild):
2895 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2896 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2897 (WebCore::RenderGrid::rowPositionForChild):
2898 (WebCore::RenderGrid::findChildLogicalPosition):
2899 (WebCore::RenderGrid::populateGridPositions): Deleted.
2900 * rendering/RenderGrid.h:
2902 2015-04-26 Doug Russell <d_russell@apple.com>
2904 AX: richer text change notifications (142719)
2905 https://bugs.webkit.org/show_bug.cgi?id=142719
2907 Reviewed by Darin Adler.
2909 Richer accessibility value change notifications. Introduce AXTextEditType,
2910 postTextStateChangeNotification and postTextReplacementNotification to give assistive
2911 tech apps more reliable context for responding to changes in web content. Also implement
2912 a mechanism to post value changes in password form fields in coalesced ticks to thwart
2913 analyzing the cadence of changes.
2915 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
2916 and an overload of postTextReplacementNotification to give assistive tech apps more
2917 reliable context for responding to changes in web content selection. Also block posting
2918 selection changes on password fields.
2920 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2921 platform/mac/accessibility/selection-change-userinfo.html
2922 platform/mac/accessibility/value-change-userinfo.html
2925 * WebCore.vcxproj/WebCore.vcxproj:
2926 * WebCore.vcxproj/WebCore.vcxproj.filters:
2927 * WebCore.xcodeproj/project.pbxproj:
2928 * accessibility/AXObjectCache.cpp:
2929 (WebCore::AXObjectCache::AXObjectCache):
2930 (WebCore::AXObjectCache::notificationPostTimerFired):
2931 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2932 (WebCore::AXObjectCache::showIntent):
2933 (WebCore::AXObjectCache::setTextSelectionIntent):
2934 (WebCore::isPasswordFieldOrContainedByPasswordField):
2935 (WebCore::AXObjectCache::postTextStateChangeNotification):
2936 (WebCore::AXObjectCache::postTextReplacementNotification):
2937 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2938 (WebCore::AXObjectCache::rootWebArea):
2939 (WebCore::AXObjectCache::textChangeForEditType):
2940 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2941 (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
2942 * accessibility/AXObjectCache.h:
2943 (WebCore::AXObjectCache::postTextStateChangeNotification):
2944 (WebCore::AXObjectCache::postTextReplacementNotification):
2945 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2946 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2947 (WebCore::AXObjectCache::textChangeForEditType):
2948 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2949 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2950 (WebCore::AXObjectCache::getOrCreate): Deleted.
2951 (WebCore::AXObjectCache::attachWrapper): Deleted.
2952 * accessibility/AXTextStateChangeIntent.h: Added.
2953 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2954 * accessibility/AccessibilityNodeObject.cpp:
2955 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2956 * accessibility/AccessibilityNodeObject.h:
2957 * accessibility/AccessibilityObject.cpp:
2958 (WebCore::AccessibilityObject::isContainedByPasswordField):
2959 * accessibility/AccessibilityObject.h:
2960 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
2961 (WebCore::AccessibilityObject::isPasswordField): Deleted.
2962 * accessibility/AccessibilityRenderObject.cpp:
2963 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2964 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2965 * accessibility/AccessibilityScrollView.h:
2966 * accessibility/atk/AXObjectCacheAtk.cpp:
2967 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2968 * accessibility/ios/AXObjectCacheIOS.mm:
2969 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2970 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2971 * accessibility/mac/AXObjectCacheMac.mm:
2972 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
2973 (WebCore::AXPostNotificationWithUserInfo):
2974 (WebCore::AXObjectCache::postPlatformNotification):
2975 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2976 (WebCore::textReplacementChangeDictionary):
2977 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2978 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2979 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2980 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
2981 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
2982 (arrayRemovingNonJSONTypes):
2983 (dictionaryRemovingNonJSONTypes):
2984 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2985 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2986 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2987 (textMarkerRangeFromVisiblePositions):
2988 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
2989 * editing/AppendNodeCommand.cpp:
2990 (WebCore::AppendNodeCommand::AppendNodeCommand):
2991 (WebCore::sendAXTextChangedIgnoringLineBreaks):
2992 (WebCore::AppendNodeCommand::doApply):
2993 (WebCore::AppendNodeCommand::doUnapply):
2994 * editing/AppendNodeCommand.h:
2995 (WebCore::AppendNodeCommand::create):
2996 * editing/ApplyStyleCommand.cpp:
2997 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2998 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
2999 * editing/ApplyStyleCommand.h:
3000 * editing/CompositeEditCommand.cpp:
3001 (WebCore::EditCommandComposition::unapplyEditType):
3002 (WebCore::CompositeEditCommand::CompositeEditCommand):
3003 (WebCore::CompositeEditCommand::apply):
3004 (WebCore::CompositeEditCommand::insertParagraphSeparator):
3005 (WebCore::CompositeEditCommand::insertNodeBefore):
3006 (WebCore::CompositeEditCommand::appendNode):
3007 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3008 (WebCore::CompositeEditCommand::insertTextIntoNode):
3009 (WebCore::CompositeEditCommand::deleteTextFromNode):
3010 (WebCore::CompositeEditCommand::replaceTextInNode):
3011 (WebCore::CompositeEditCommand::moveParagraphs):
3012 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3013 (WebCore::CompositeEditCommand::applyStyle): Deleted.
3014 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3015 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3016 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3017 (WebCore::CompositeEditCommand::inputText): Deleted.
3018 * editing/CompositeEditCommand.h:
3019 * editing/DeleteFromTextNodeCommand.cpp:
3020 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3021 (WebCore::DeleteFromTextNodeCommand::doApply):
3022 (WebCore::DeleteFromTextNodeCommand::doUnapply):
3023 * editing/DeleteFromTextNodeCommand.h:
3024 (WebCore::DeleteFromTextNodeCommand::create):
3025 (WebCore::DeleteFromTextNodeCommand::deletedText):
3026 * editing/DeleteSelectionCommand.cpp:
3027 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3028 (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
3029 * editing/DeleteSelectionCommand.h:
3030 (WebCore::DeleteSelectionCommand::create):
3031 * editing/DictationCommand.cpp:
3032 (WebCore::DictationCommand::insertTextRunWithoutNewlines):
3033 (WebCore::DictationCommand::insertParagraphSeparator):
3034 * editing/EditAction.h:
3035 * editing/EditCommand.cpp:
3036 (WebCore::EditCommand::EditCommand):
3037 (WebCore::EditCommand::editingAction):
3038 (WebCore::EditCommand::applyEditType):
3039 (WebCore::EditCommand::unapplyEditType):
3040 (WebCore::SimpleEditCommand::SimpleEditCommand):
3041 (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
3042 (WebCore::EditCommand::setParent): Deleted.
3043 * editing/EditCommand.h:
3044 * editing/EditingAllInOne.cpp:
3045 * editing/Editor.cpp:
3046 (WebCore::Editor::handleTextEvent):
3047 (WebCore::Editor::deleteSelectionWithSmartDelete):
3048 (WebCore::Editor::replaceSelectionWithFragment):
3049 (WebCore::Editor::replaceSelectionWithText):
3050 (WebCore::Editor::appliedEditing):
3051 (WebCore::Editor::unappliedEditing):
3052 (WebCore::Editor::performCutOrCopy):
3053 (WebCore::Editor::markMisspellingsAfterTypingToWord):
3054 (WebCore::Editor::changeBackToReplacedString):
3055 (WebCore::Editor::transpose):
3056 (WebCore::Editor::changeSelectionAfterCommand):
3058 * editing/EditorCommand.cpp:
3059 (WebCore::executeInsertFragment):
3060 * editing/FrameSelection.cpp:
3061 (WebCore::FrameSelection::moveTo):
3062 (WebCore::FrameSelection::moveWithoutValidationTo):
3063 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
3064 (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3065 (WebCore::FrameSelection::setSelection):
3066 (WebCore::FrameSelection::updateAndRevealSelection):
3067 (WebCore::isBoundary):
3068 (WebCore::FrameSelection::textSelectionIntent):
3069 (WebCore::FrameSelection::modify):
3070 (WebCore::FrameSelection::selectAll):
3071 (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
3072 (WebCore::FrameSelection::modifyMovingBackward): Deleted.
3073 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
3074 (WebCore::FrameSelection::selectionAtWordStart): Deleted.
3075 * editing/FrameSelection.h:
3076 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3077 (WebCore::FrameSelection::selection): Deleted.
3078 * editing/InsertIntoTextNodeCommand.cpp:
3079 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3080 (WebCore::InsertIntoTextNodeCommand::doApply):
3081 (WebCore::InsertIntoTextNodeCommand::doUnapply):
3082 * editing/InsertIntoTextNodeCommand.h:
3083 (WebCore::InsertIntoTextNodeCommand::create):
3084 (WebCore::InsertIntoTextNodeCommand::insertedText):
3085 * editing/InsertNodeBeforeCommand.cpp:
3086 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3087 (WebCore::InsertNodeBeforeCommand::doApply):
3088 (WebCore::InsertNodeBeforeCommand::doUnapply):
3089 * editing/InsertNodeBeforeCommand.h:
3090 (WebCore::InsertNodeBeforeCommand::create):
3091 * editing/InsertParagraphSeparatorCommand.cpp:
3092 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3093 * editing/InsertParagraphSeparatorCommand.h:
3094 (WebCore::InsertParagraphSeparatorCommand::create):
3095 * editing/InsertTextCommand.cpp:
3096 (WebCore::InsertTextCommand::InsertTextCommand):
3097 * editing/InsertTextCommand.h:
3098 (WebCore::InsertTextCommand::create):
3099 (WebCore::InsertTextCommand::createWithMarkerSupplier):
3100 * editing/MoveSelectionCommand.cpp:
3101 (WebCore::MoveSelectionCommand::doApply):
3102 * editing/RemoveNodePreservingChildrenCommand.cpp:
3103 (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
3104 * editing/RemoveNodePreservingChildrenCommand.h:
3105 (WebCore::RemoveNodePreservingChildrenCommand::create):
3106 * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3107 (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
3108 (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
3109 * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3110 * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
3111 (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
3112 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
3113 * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
3114 * editing/ReplaceSelectionCommand.cpp:
3115 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3116 (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
3117 (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
3118 * editing/ReplaceSelectionCommand.h:
3119 (WebCore::ReplaceSelectionCommand::create):
3120 * editing/TypingCommand.cpp:
3121 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3122 (WebCore::TypingCommand::insertParagraphSeparator):
3123 * editing/atk/FrameSelectionAtk.cpp:
3124 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3125 * editing/ios/DictationCommandIOS.cpp:
3126 (WebCore::DictationCommandIOS::DictationCommandIOS):
3127 * editing/ios/DictationCommandIOS.h:
3128 * editing/mac/FrameSelectionMac.mm:
3129 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3130 * html/HTMLTextFormControlElement.cpp:
3131 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3132 * page/DragController.cpp:
3133 (WebCore::DragController::concludeEditDrag):
3134 * page/EventHandler.cpp:
3135 (WebCore::setInitialKeyboardSelection):
3136 * page/FocusController.cpp:
3137 (WebCore::FocusController::advanceFocusInDocumentOrder):
3139 2015-04-26 Darin Adler <darin@apple.com>
3141 REGRESSION (r176751): line-height ignored in <button> elements
3142 https://bugs.webkit.org/show_bug.cgi?id=144234
3144 Reviewed by Antti Koivisto.
3146 Test: fast/forms/button-line-height.html
3148 The theme code was overriding line heights on all themed form controls.
3149 Instead it should have only overridden line height when the theme overrides the font.
3150 For <input type=button> on Mac, the theme always overrides the font, but for
3151 other elements like <button> it does not.
3153 * platform/Theme.h: Changed controlFont to return an Optional so we can tell
3154 when the theme is overriding the font. Otherwise if the font from the user-agent
3155 style sheet and the font from the theme are the same, we will think we are not
3156 overriding the font when we actually are.
3158 * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
3159 * platform/mac/ThemeMac.mm:
3160 (WebCore::ThemeMac::controlFont): Ditto.
3162 * rendering/RenderTheme.cpp:
3163 (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
3164 overriden by the theme, all the time for PushButtonPart on Mac, and not at all
3165 for other parts. Also tightened up the logic a little since RenderStyle's
3166 setFontDescription already does an "==" comparison; we don't have to do
3169 2015-04-26 Darin Adler <darin@apple.com>
3171 REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
3172 https://bugs.webkit.org/show_bug.cgi?id=137163
3174 Reviewed by Andy Estes.
3176 Test: fast/notifications/request-notification-permission-while-reloading.html
3178 The test doesn't crash under WebKit2, but that's still OK for our purposes.
3180 * Modules/notifications/NotificationCenter.cpp:
3181 (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
3182 (WebCore::NotificationCenter::createNotification): Moved here from the header.
3183 (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
3184 center when we need to defer a callback. Also use a lambda for the callback and changed
3185 the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
3186 bindings were not transferring ownership of the VoidCallback. The new type is a little
3187 strange but it's consistent with how the bindings work right now.
3188 (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
3189 to match the ref we did above.
3190 (WebCore::NotificationCenter::requestTimedOut): Deleted.
3191 (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
3192 (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
3193 (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
3194 (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
3196 * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
3197 Changed the argument type for requestPermission to match the reality of what's passed by the
3198 bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
3199 vector of std::function.
3201 2015-04-26 Simon Fraser <simon.fraser@apple.com>
3203 Modernize animations code
3204 https://bugs.webkit.org/show_bug.cgi?id=144196
3206 Reviewed by Darin Adler.
3208 General cleanup in animation-related code.
3210 Use C++ references where possible. Use modern loops. Make classes fast-allocated.
3211 Use C++11 member initialization. Order member variables to optimize packing.
3213 This removes some null checks in CompositeAnimation, but the values in m_transitions
3214 and m_keyframeAnimations can never be null.
3218 * page/animation/AnimationBase.cpp:
3219 (WebCore::AnimationBase::AnimationBase):
3220 (WebCore::AnimationBase::animationsMatch):
3221 (WebCore::AnimationBase::updateStateMachine):
3222 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3223 (WebCore::AnimationBase::beginAnimationUpdateTime):
3224 (WebCore::AnimationBase::getElapsedTime):
3225 * page/animation/AnimationBase.h:
3226 (WebCore::AnimationBase::animation):
3227 (WebCore::AnimationBase::setAnimation):
3228 * page/animation/AnimationController.cpp:
3229 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
3230 (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
3231 * page/animation/CompositeAnimation.cpp:
3232 (WebCore::CompositeAnimation::CompositeAnimation):
3233 (WebCore::CompositeAnimation::clearRenderer):
3234 (WebCore::CompositeAnimation::updateTransitions):
3235 (WebCore::CompositeAnimation::updateKeyframeAnimations):
3236 (WebCore::CompositeAnimation::animate):
3237 (WebCore::CompositeAnimation::getAnimatedStyle):
3238 (WebCore::CompositeAnimation::timeToNextService):
3239 (WebCore::CompositeAnimation::getAnimationForProperty):
3240 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
3241 (WebCore::CompositeAnimation::suspendAnimations):
3242 (WebCore::CompositeAnimation::resumeAnimations):
3243 (WebCore::CompositeAnimation::overrideImplicitAnimations):
3244 (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
3245 (WebCore::CompositeAnimation::isAnimatingProperty):
3246 (WebCore::CompositeAnimation::pauseTransitionAtTime):
3247 (WebCore::CompositeAnimation::numberOfActiveAnimations):
3248 * page/animation/CompositeAnimation.h:
3249 (WebCore::CompositeAnimation::create):
3250 (WebCore::CompositeAnimation::animationController):
3251 * page/animation/ImplicitAnimation.cpp:
3252 (WebCore::ImplicitAnimation::ImplicitAnimation):
3253 (WebCore::ImplicitAnimation::sendTransitionEvent):
3254 * page/animation/ImplicitAnimation.h:
3255 (WebCore::ImplicitAnimation::create):
3256 * page/animation/KeyframeAnimation.cpp:
3257 (WebCore::KeyframeAnimation::KeyframeAnimation):
3258 (WebCore::KeyframeAnimation::animate):
3259 (WebCore::KeyframeAnimation::getAnimatedStyle):
3260 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3261 (WebCore::KeyframeAnimation::startAnimation):
3262 (WebCore::KeyframeAnimation::sendAnimationEvent):
3263 (WebCore::KeyframeAnimation::overrideAnimations):
3264 (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
3265 (WebCore::KeyframeAnimation::timeToNextService):
3266 * page/animation/KeyframeAnimation.h:
3267 * platform/animation/Animation.cpp:
3268 (WebCore::Animation::animationsMatch):
3269 * platform/animation/Animation.h:
3270 * rendering/RenderLayer.cpp:
3271 (WebCore::RenderLayer::paint):
3272 (WebCore::performOverlapTests):
3273 * rendering/style/KeyframeList.h:
3274 (WebCore::KeyframeList::properties):
3275 (WebCore::KeyframeList::keyframes):
3276 (WebCore::KeyframeList::beginProperties): Deleted.
3277 (WebCore::KeyframeList::endProperties): Deleted.
3278 (WebCore::KeyframeList::operator[]): Deleted.
3279 * rendering/style/RenderStyle.h:
3281 2015-04-25 Simon Fraser <simon.fraser@apple.com>
3283 Expand compositing coverage rect when scrolling and animating
3284 https://bugs.webkit.org/show_bug.cgi?id=144214
3285 rdar://problem/20695926
3287 Reviewed by Darin Adler.
3289 r183300 added a secondary rect that gets mapped through graphics layers during
3290 layer flushing, which represents a rect, in layer coordinates, that represents
3291 the portion of this layer that's visible in the viewport.
3293 This patch extends that rect based on scrolling and animating, with the extended
3294 coverage rect being mapped into descendants (where it's used to determine whether
3295 they should detach their backing store). This required moving the responsibility for
3296 extending the coverage rect from TileController (where it was used to compute
3297 tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
3298 of coverage rect, and pushes it onto TileControllers.
3300 Test: compositing/tiling/transform-origin-tiled.html
3302 * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
3303 TiledBacking from outside; new functions reflect that.
3304 * platform/graphics/ca/GraphicsLayerCA.cpp:
3305 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
3306 old visible rect to commitLayerChangesBeforeSublayers.
3307 (WebCore::accumulatesTransform):
3308 (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
3309 then adjustCoverageRect() which adjusts for scrolling and animations.
3310 (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
3311 TransformState, but we can only use this if mapping it through various transforms didn't clamp
3312 it (which can happen with severe rotations in perspective).
3313 (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
3314 ask the TileController to do coverage adjustment (code which should move into here eventually).
3315 For other tiled layers, do motion-based adjustment. This should really be done for all layers
3316 (an animating non-tiled layer may contain a tiled layer).
3317 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
3318 any more; layers only react to changed in coverage rect now.
3319 (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
3320 coverage rect, here we push the new rect back into the TransformState so it will affect
3322 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3323 (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
3325 (WebCore::GraphicsLayerCA::changeLayerTypeTo):
3326 (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
3327 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
3328 (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
3329 * platform/graphics/ca/GraphicsLayerCA.h:
3330 * platform/graphics/ca/TileController.cpp:
3331 (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
3333 (WebCore::TileController::setCoverageRect):
3334 (WebCore::TileController::tilesWouldChangeForCoverageRect):
3335 (WebCore::TileController::revalidateTiles):
3336 (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
3337 is called at the top of committing the owning layer, we haven't yet pushed a new size to the
3338 underlying platform layer (which TileController::bounds() consults).
3339 (WebCore::TileController::bounds):
3340 (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
3341 underlying layer hasn't been updated yet.
3342 (WebCore::TileController::didRevalidateTiles):
3343 (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
3344 * platform/graphics/ca/TileController.h:
3345 * platform/graphics/ca/TileCoverageMap.cpp:
3346 (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows
3347 a dark blue outline for the coverage rect.
3348 (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
3349 content inset is non-zero.
3350 * platform/graphics/ca/TileCoverageMap.h:
3351 * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
3352 (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
3353 (WebCore::TileGrid::revalidateTiles):
3354 (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
3355 * platform/graphics/ca/TileGrid.h:
3356 * platform/graphics/transforms/TransformState.cpp:
3357 (WebCore::TransformState::operator=):
3358 (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
3359 (WebCore::TransformState::mappedSecondaryQuad): Ditto.
3360 (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
3361 to pass in a secondary quad, and get it mapped into the coordinate space of the last
3362 "flattening" state (since the TransformState may have in-flight XY offset, or transform).
3363 This mapping is achieved by re-using mapQuad(), but in the inverse direction.
3364 (WebCore::TransformState::mapQuad): Make direction a parameter.
3365 (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
3366 quad. Failure was detected by tests.
3367 * platform/graphics/transforms/TransformState.h:
3368 (WebCore::TransformState::isMappingSecondaryQuad):
3369 (WebCore::TransformState::direction):
3370 (WebCore::TransformState::inverseDirection):
3371 (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
3373 2015-04-25 Dan Bernstein <mitz@apple.com>
3375 Updated expected bindings generation test results after r183343.
3377 * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
3378 * bindings/scripts/test/ObjC/DOMTestCallback.h:
3379 * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
3380 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
3381 * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
3382 * bindings/scripts/test/ObjC/DOMTestException.h:
3383 * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
3384 * bindings/scripts/test/ObjC/DOMTestInterface.h:
3385 * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
3386 * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
3387 * bindings/scripts/test/ObjC/DOMTestNode.h:
3388 * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
3389 * bindings/scripts/test/ObjC/DOMTestObj.h:
3390 * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
3391 * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
3392 * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
3393 * bindings/scripts/test/ObjC/DOMattribute.h:
3394 * bindings/scripts/test/ObjC/DOMreadonly.h:
3396 2015-04-25 Myles C. Maxfield <mmaxfield@apple.com>
3398 font-synthesis's initial value is "style weight"
3399 https://bugs.webkit.org/show_bug.cgi?id=144195
3401 Reviewed by Darin Adler.
3403 Updated fast/css3-text/font-synthesis-parse.html.
3405 * rendering/style/RenderStyle.h:
3407 2015-04-25 Commit Queue <commit-queue@webkit.org>
3409 Unreviewed, rolling out r183305.
3410 https://bugs.webkit.org/show_bug.cgi?id=144213
3412 Crashes on wikipedia (Requested by litherum on #webkit).
3416 "[Cocoa] FontPlatformData's equality check should always use
3418 https://bugs.webkit.org/show_bug.cgi?id=144168
3419 http://trac.webkit.org/changeset/183305
3421 2015-04-25 Dan Bernstein <mitz@apple.com>
3423 WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
3424 https://bugs.webkit.org/show_bug.cgi?id=144201
3426 Reviewed by Darin Adler.
3428 Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
3431 * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
3432 use 9876_5 in availability macros. Removed the definition of
3433 __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
3435 * bindings/scripts/CodeGeneratorObjC.pm:
3436 (ReadPublicInterfaces): Use 9876_5 instead of TBD.
3438 2015-04-25 Timothy Hatcher <timothy@apple.com>
3440 Update localized strings.
3442 * English.lproj/Localizable.strings: Updated.
3444 2015-04-25 Darin Adler <darin@apple.com>
3446 Crash if IDBTransaction is aborted right after it's created
3447 https://bugs.webkit.org/show_bug.cgi?id=144199
3449 Reviewed by Simon Fraser.
3451 Test: storage/indexeddb/transaction-abort.html
3453 * Modules/indexeddb/IDBTransactionBackend.cpp:
3454 (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
3455 transaction if it is already complete (has been aborted).
3457 2015-04-25 Martin Robinson <mrobinson@igalia.com>
3459 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
3460 https://bugs.webkit.org/show_bug.cgi?id=144182
3462 Reviewed by Simon Fraser.
3464 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3465 * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3466 * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3467 * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3468 * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3469 * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3470 * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3471 * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3472 * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3473 * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3474 * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3476 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3478 [Cocoa] FontPlatformData's equality check should always use reference URLs
3479 https://bugs.webkit.org/show_bug.cgi?id=144168
3481 Reviewed by Tim Horton.
3483 <rdar://problem/18985642> is not fixed, so we need to continue using the older
3484 objectForEqualityCheck().
3486 No new tests because there is no behavior change.
3488 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3489 (WebCore::FontPlatformData::objectForEqualityCheck):
3491 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3493 Implement parsing support for font-synthesis CSS property
3494 https://bugs.webkit.org/show_bug.cgi?id=144180
3495 <rdar://problem/20692791>
3496 <rdar://problem/20625024>
3498 Reviewed by Tim Horton.
3500 See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
3502 This property allows web authors to opt out of font synthesis. This patch only
3503 implements parsing support for the property.
3505 Test: fast/css3-text/font-synthesis-parse.html
3507 * css/CSSComputedStyleDeclaration.cpp:
3508 (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
3509 (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
3510 * css/CSSParser.cpp:
3511 (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
3512 (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
3513 "none | [ weight || style ]"
3514 * css/CSSParser.h: Function signature.
3515 * css/CSSPropertyNames.in: New CSS property name.
3516 * css/CSSValueKeywords.in: New CSS value names.
3517 * css/StyleBuilderCustom.h:
3518 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
3519 representation of font-synthesis for a given CSSValue.
3520 * rendering/style/RenderStyle.h: Function signature.
3521 * rendering/style/RenderStyleConstants.h: Internal representation of
3523 * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
3524 related to this internal representation.
3526 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3528 Have the web inspector report accurate memory use for layers with detached backing store
3529 https://bugs.webkit.org/show_bug.cgi?id=144179
3531 Reviewed by Dean Jackson.
3533 Only report memory use for layers whose backing store is attached.
3535 * platform/graphics/ca/GraphicsLayerCA.cpp:
3536 * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
3537 which platforms can override if they allow backing store detaching.
3539 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3541 Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
3542 https://bugs.webkit.org/show_bug.cgi?id=144165
3544 Reviewed by Dean Jackson.
3546 Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
3547 which maps this rect through all the layers. Each layer tests intersection with
3548 this rect to determine if its backing store should be attached.
3550 This will cause us to drop backing store for layers that don't intersect the
3551 visible part of the view, which is too aggressive. A future patch will add
3554 Tests: compositing/visible-rect/coverage-clipped.html
3555 compositing/visible-rect/coverage-scrolling.html
3557 * platform/graphics/ca/GraphicsLayerCA.cpp:
3558 (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
3559 C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
3560 (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
3561 secondary coverage rect. A future patch will inflate this on the way down the tree.
3562 (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
3563 we have a secondary coverage rect, that rect can be clipped to us too.
3564 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
3565 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3566 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3567 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
3568 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
3569 * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
3570 Use more C++11 initializers.
3571 (WebCore::GraphicsLayerCA::coverageRect):
3573 2015-04-24 Dean Jackson <dino@apple.com>
3575 AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
3576 https://bugs.webkit.org/show_bug.cgi?id=144173
3577 <rdar://problem/20526168>
3579 Reviewed by Simon Fraser.
3581 Keep a list of Animations that care about scroll updates, and only
3582 run the animation update if the list is not empty.
3584 Covered by existing tests.
3586 * page/animation/AnimationBase.cpp:
3587 (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
3588 if this is an animation that depends on scrolling.
3589 * page/animation/AnimationController.cpp:
3590 (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
3591 new removeFromAnimationsDependentOnScroll as this animation is deleted.
3592 (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
3593 (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
3594 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
3595 there are animations that care.
3596 (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
3598 * page/animation/AnimationController.h:
3599 * page/animation/AnimationControllerPrivate.h:
3600 (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
3602 2015-04-24 Tim Horton <timothy_horton@apple.com>
3604 WKPDFView does not support password-protected PDFs
3605 https://bugs.webkit.org/show_bug.cgi?id=144162
3606 <rdar://problem/18411512>
3608 Reviewed by Andy Estes.
3610 * English.lproj/Localizable.strings:
3611 Add some localizable strings.
3613 2015-04-24 David Kilzer <ddkilzer@apple.com>
3615 Fix iOS EWS builds after updating to iOS 8.3 SDK
3617 * platform/spi/cocoa/CoreTextSPI.h:
3618 * rendering/RenderThemeIOS.mm:
3619 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3620 - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
3622 2015-04-24 Jer Noble <jer.noble@apple.com>
3624 Unreviewed iOS build fix; add declarations to AVKitSPI.h
3626 * platform/spi/cocoa/AVKitSPI.h:
3628 2015-04-24 Enrica Casucci <enrica@apple.com>
3630 Make rangeExpandedAroundPositionByCharacters to all platforms.
3631 https://bugs.webkit.org/show_bug.cgi?id=144161
3633 Reviewed by Tim Horton.
3635 No change in functionality, simply making this available
3638 * editing/VisibleUnits.cpp:
3639 (WebCore::rangeExpandedAroundPositionByCharacters):
3640 * editing/VisibleUnits.h:
3641 * editing/mac/DataDetection.mm:
3642 * editing/mac/DictionaryLookup.h:
3643 * editing/mac/DictionaryLookup.mm:
3644 (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
3646 2015-04-24 Andreas Kling <akling@apple.com>
3648 Purge PassRefPtr from NamedNodeMap.
3649 <https://webkit.org/b/144091>
3651 Reviewed by Antti Koivisto.
3653 Use RefPtr instead of PassRefPtr in NamedNodeMap.
3655 * dom/NamedNodeMap.cpp:
3656 (WebCore::NamedNodeMap::getNamedItem):
3657 (WebCore::NamedNodeMap::getNamedItemNS):
3658 (WebCore::NamedNodeMap::removeNamedItem):
3659 (WebCore::NamedNodeMap::removeNamedItemNS):
3660 (WebCore::NamedNodeMap::setNamedItem):
3661 (WebCore::NamedNodeMap::setNamedItemNS):
3662 (WebCore::NamedNodeMap::item):
3663 * dom/NamedNodeMap.h:
3665 2015-04-24 Commit Queue <commit-queue@webkit.org>
3667 Unreviewed, rolling out r183266.
3668 https://bugs.webkit.org/show_bug.cgi?id=144164
3670 Broke 32-bit build and a test. (Requested by ap on #webkit).
3674 "AX: richer text change notifications (142719)"
3675 https://bugs.webkit.org/show_bug.cgi?id=142719
3676 http://trac.webkit.org/changeset/183266
3678 2015-04-24 Brady Eidson <beidson@apple.com>
3680 Origin header is preserved on cross-origin redirects.
3681 https://bugs.webkit.org/show_bug.cgi?id=144157.
3683 Reviewed by Sam Weinig.
3685 Tests: http/tests/security/cors-post-redirect-301.html
3686 http/tests/security/cors-post-redirect-302.html
3687 http/tests/security/cors-post-redirect-307.html
3688 http/tests/security/cors-post-redirect-308.html
3690 * platform/network/cf/ResourceHandleCFNet.cpp:
3691 (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
3692 * platform/network/mac/ResourceHandleMac.mm:
3693 (WebCore::ResourceHandle::willSendRequest): Ditto.
3695 2015-04-24 Brent Fulgham <bfulgham@apple.com>
3697 Immediate action not functional for embedded PDFs
3698 https://bugs.webkit.org/show_bug.cgi?id=143952
3699 <rdar://problem/19842365>
3701 Reviewed by Tim Horton.
3703 Add a dictionary lookup method to allow us to retrieve
3704 relevant information for PDFs.
3706 * editing/mac/DictionaryLookup.mm:
3707 (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
3708 where the Lookup engine selects a smaller range than the initial automatic
3709 selection performed on clicking.
3711 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3713 Make it possible to map a secondary quad through TransformState
3714 https://bugs.webkit.org/show_bug.cgi?id=144156
3716 Reviewed by Dean Jackson.
3718 A future patch will need to map two quads simultaneously through TransformState,
3719 so add the ability to provide an optional secondary quad.
3721 This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
3722 requiring the state to be flattened when setting the quad (and now, the secondary quad).
3723 Previously, setQuad implicitly flattened but failed to update m_mapPoint when
3726 * platform/graphics/ca/GraphicsLayerCA.cpp:
3727 (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
3728 before setting the quad.
3729 * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
3730 * platform/graphics/transforms/TransformState.cpp:
3731 (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
3732 (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
3734 (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
3735 (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
3736 into the state's current coordinate space.
3737 (WebCore::TransformState::mapQuad): Factored code.
3738 * platform/graphics/transforms/TransformState.h:
3739 (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
3740 (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
3741 (WebCore::TransformState::lastPlanarSecondaryQuad):
3742 (WebCore::TransformState::lastPlanarQuad): Deleted.
3744 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3746 [iOS] Reimplement r182512 and r183153 in a cleaner way
3747 https://bugs.webkit.org/show_bug.cgi?id=144151
3749 Reviewed by Enrica Casucci.
3751 On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
3752 This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
3753 react to this fact by making users of a FontPlatformData use the original font passed in
3754 to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
3755 detect that the FontPlatformData represents a system font (the underlying APIs have
3756 different behavior for system fonts and non-system-fonts).
3758 However, on OS X, we create a FontPlatformData's ctFont() directly from the original
3759 font passed in to the constructor. This preserves system-font-ness (because it no
3760 longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
3761 correct behavior regarding system fonts.
3763 The difference between the two ctFont() creation codepaths seems to be historical
3764 rather than intentional. Rather than change all the call sites of ctFont() to use a
3765 different platform font object if a system font is detected, a cleaner solution is to
3766 simply unify the two ctFont() creation codepaths to the version which preserves system-
3767 font-ness. Doing this will make all users of FontPlatformData automatically have the
3768 correct behavior with no updates.
3770 This patch reverts the relevant parts of r182512 and r183153 in favor of this new
3773 No new tests because there is no behavior change.
3775 * platform/graphics/FontPlatformData.h:
3776 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3777 * platform/graphics/cocoa/FontCocoa.mm:
3778 (WebCore::Font::platformWidthForGlyph):
3779 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3780 (WebCore::FontPlatformData::ctFontSize):
3781 (WebCore::FontPlatformData::ctFont):
3782 * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3783 (WebCore::Font::getCFStringAttributes):
3785 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3787 Unreviewed build fix.
3789 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3790 (WebCore::FontPlatformData::FontPlatformData):
3792 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3794 [Cocoa] Start cleaning up FontPlatformData
3795 https://bugs.webkit.org/show_bug.cgi?id=144133
3797 Reviewed by Enrica Casucci.
3799 This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
3800 FontPlatformData. This patch starts this effort out by removing the FontPlatformData
3801 constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
3802 and forwards to another constructor. This patch moves this cast to callers of this constructor,
3803 thereby enumerating the places we have left that use NSFont with FontPlatformData.
3805 This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
3806 a common constructor.
3808 This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
3809 not 0 and not -1, and puts this common code inside a new function,
3810 FontPlatformData::isValidCTFontRef().
3812 No new tests because there is no behavior change.
3814 * platform/graphics/FontPlatformData.cpp:
3815 (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
3816 * platform/graphics/FontPlatformData.h:
3817 (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
3818 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3819 * platform/graphics/cocoa/FontCocoa.mm:
3820 (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
3821 FontPlatformData constructor.
3822 (WebCore::Font::compositeFontReferenceFont): Ditto.
3823 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3824 (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
3825 (WebCore::FontPlatformData::platformDataInit): Ditto.
3826 (WebCore::FontPlatformData::platformDataAssign): Ditto.
3827 (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
3828 (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
3829 (WebCore::FontPlatformData::FontPlatformData): Deleted.
3830 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3831 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
3833 * platform/graphics/mac/FontCacheMac.mm:
3834 (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
3835 deleted FontPlatformData constructor.
3836 (WebCore::FontCache::createFontPlatformData): Ditto.
3837 * platform/mac/DragImageMac.mm:
3838 (WebCore::fontFromNSFont): Ditto.
3839 (WebCore::widthWithFont): Ditto.
3840 (WebCore::drawAtPoint): Ditto.
3842 2015-04-24 Doug Russell <d_russell@apple.com>
3844 AX: richer text change notifications (142719)
3845 https://bugs.webkit.org/show_bug.cgi?id=142719
3847 Reviewed by Darin Adler.
3849 Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
3851 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
3853 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
3854 platform/mac/accessibility/selection-change-userinfo.html
3855 platform/mac/accessibility/value-change-userinfo.html
3858 * WebCore.vcxproj/WebCore.vcxproj:
3859 * WebCore.vcxproj/WebCore.vcxproj.filters:
3860 * WebCore.xcodeproj/project.pbxproj:
3861 * accessibility/AXObjectCache.cpp:
3862 (WebCore::AXObjectCache::AXObjectCache):
3863 (WebCore::AXObjectCache::notificationPostTimerFired):
3864 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
3865 (WebCore::AXObjectCache::showIntent):
3866 (WebCore::AXObjectCache::setTextSelectionIntent):
3867 (WebCore::isPasswordFieldOrContainedByPasswordField):
3868 (WebCore::AXObjectCache::postTextStateChangeNotification):
3869 (WebCore::AXObjectCache::postTextReplacementNotification):
3870 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
3871 (WebCore::AXObjectCache::rootWebArea):
3872 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
3873 * accessibility/AXObjectCache.h:
3874 (WebCore::AXObjectCache::postTextStateChangeNotification):
3875 (WebCore::AXObjectCache::postTextReplacementNotification):
3876 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3877 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3878 (WebCore::AXObjectCache::textChangeForEditType):
3879 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3880 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
3881 (WebCore::AXObjectCache::getOrCreate): Deleted.
3882 (WebCore::AXObjectCache::attachWrapper): Deleted.
3883 * accessibility/AXTextStateChangeIntent.h: Added.
3884 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
3885 * accessibility/AccessibilityNodeObject.cpp:
3886 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
3887 * accessibility/AccessibilityNodeObject.h:
3888 * accessibility/AccessibilityObject.cpp:
3889 (WebCore::AccessibilityObject::isContainedByPasswordField):
3890 * accessibility/AccessibilityObject.h:
3891 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
3892 (WebCore::AccessibilityObject::isPasswordField): Deleted.
3893 * accessibility/AccessibilityRenderObject.cpp:
3894 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3895 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3896 * accessibility/AccessibilityScrollView.h:
3897 * accessibility/atk/AXObjectCacheAtk.cpp:
3898 (WebCore::AXObjectCache::textChangeForEditType):
3899 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3900 (WebCore::AXObjectCache::postPlatformNotification): Deleted.
3901 * accessibility/ios/AXObjectCacheIOS.mm:
3902 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3903 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3904 * accessibility/mac/AXObjectCacheMac.mm:
3905 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
3906 (WebCore::AXPostNotificationWithUserInfo):
3907 (WebCore::AXObjectCache::postPlatformNotification):
3908 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3909 (WebCore::textReplacementChangeDictionary):
3910 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3911 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3912 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3913 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
3914 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
3915 (arrayRemovingNonJSONTypes):
3916 (dictionaryRemovingNonJSONTypes):
3917 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
3918 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3919 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3920 (textMarkerRangeFromVisiblePositions):
3921 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3922 * editing/AppendNodeCommand.cpp:
3923 (WebCore::AppendNodeCommand::AppendNodeCommand):
3924 (WebCore::sendAXTextChangedIgnoringLineBreaks):
3925 (WebCore::AppendNodeCommand::doApply):
3926 (WebCore::AppendNodeCommand::doUnapply):
3927 * editing/AppendNodeCommand.h:
3928 (WebCore::AppendNodeCommand::create):
3929 * editing/ApplyStyleCommand.cpp:
3930 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3931 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
3932 * editing/ApplyStyleCommand.h:
3933 * editing/CompositeEditCommand.cpp:
3934 (WebCore::EditCommandComposition::unapplyEditType):
3935 (WebCore::CompositeEditCommand::CompositeEditCommand):
3936 (WebCore::CompositeEditCommand::apply):
3937 (WebCore::CompositeEditCommand::insertParagraphSeparator):
3938 (WebCore::CompositeEditCommand::insertNodeBefore):
3939 (WebCore::CompositeEditCommand::appendNode):
3940 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3941 (WebCore::CompositeEditCommand::insertTextIntoNode):
3942 (WebCore::CompositeEditCommand::deleteTextFromNode):
3943 (WebCore::CompositeEditCommand::replaceTextInNode):
3944 (WebCore::CompositeEditCommand::moveParagraphs):
3945 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3946 (WebCore::CompositeEditCommand::applyStyle): Deleted.
3947 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3948 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3949 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3950 (WebCore::CompositeEditCommand::inputText): Deleted.
3951 * editing/CompositeEditCommand.h:
3952 * editing/DeleteFromTextNodeCommand.cpp:
3953 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3954 (WebCore::DeleteFromTextNodeCommand::doApply):
3955 (WebCore::DeleteFromTextNodeCommand::doUnapply):
3956 * editing/DeleteFromTextNodeCommand.h: