1 2015-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
3 Build fix after r188510
5 * platform/mac/ThemeMac.mm:
6 (WebCore::paintToggleButton): Pass a raw pointer to drawCellOrFocusRingWithViewIntoContext.
8 2015-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
10 Search fields should scale when rendering while zoomed
11 https://bugs.webkit.org/show_bug.cgi?id=147867
13 Reviewed by Daniel Bates.
15 When rendering zoomed search fields, draw to an image buffer instead of drawing directly into the context. This
16 allows us to scale the image buffer up before rendering. Also refactors common logic used to draw both selects
17 (paintMenuList) and search fields into the new private method paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
19 * rendering/RenderThemeMac.h: Changed drawCellOrFocusRingWithViewIntoContext to take a raw pointer.
20 * rendering/RenderThemeMac.mm:
21 (WebCore::paintToggleButton): Passes a raw pointer to drawCellOrFocusRingWithViewIntoContext.
22 (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Changed to take a raw pointer.
23 * rendering/RenderThemeMac.h:
24 * rendering/RenderThemeMac.mm:
25 (WebCore::RenderThemeMac::paintMenuList): Refactored to use paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
26 (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Contains logic common to painting
27 both selects and search fields.
28 (WebCore::RenderThemeMac::paintSearchField): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
29 to render search fields, utilizing an offscreen image buffer only when necessary.
31 2015-08-14 Chris Dumez <cdumez@apple.com>
33 Refactor HTMLCollection to be as fast as CachedLiveNodeList
34 https://bugs.webkit.org/show_bug.cgi?id=147979
36 Reviewed by Ryosuke Niwa.
38 Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
39 preparation of having getElementsByTagName*() / getElementsByClassName()
40 return an HTMLCollection instead of a NodeList, as per the
41 specification. Chrome and Firefox already match the specification in
44 Traversing an HTMLCollection was slow because of all the extra
45 branching it had compared to CachedLiveNodeList. To address the issue,
46 this patch introduces a new templated CachedHTMLCollection subclass,
47 which behaves in a similar way as CachedLiveNodeList. The 2 template
49 1. The type of the subclass of CachedHTMLCollection, so we can call
50 elementMatches() directly on the subclass, without needed any
51 virtual function call or switch statement. This is the same approach
52 as in CachedLiveNodeList.
53 2. The type of tree traversal used (Descendants, ChildrenOnly,
54 CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
55 support these 3 types of tree traversal. These were causing extra
56 branching for every item() call. We are now able to choose the right
57 type of traversal for the CachedHTMLCollection at compile time.
59 * WebCore.xcodeproj/project.pbxproj:
60 Add new files to the Project.
62 * dom/ContainerNode.cpp:
63 (WebCore::ContainerNode::children):
64 (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
65 * dom/ContainerNode.h:
66 Drop ContainerNode::ensureCachedHTMLCollection() and use
67 NodeListsNodeData::addCachedCollection() directly at call sites
68 instead. We need access to the CollectionType at build-time so
69 we can resolve the CollectionTraversalType parameter for the
70 GenericCachedHTMLCollection using CollectionTypeTraits.
74 Update ensureCachedCollection() so the CollectionType is now a template
75 parameter instead of a method argument. We need to know the
76 CollectionType at build time to construct the GenericCachedHTMLCollection.
78 * dom/ElementChildIterator.h:
79 (WebCore::ElementChildIterator<ElementType>::operator):
80 (WebCore::ElementChildConstIterator<ElementType>::operator):
81 Add support for decrementing an ElementChildIterator, for consistency
82 with ElementDescendantIterator. We need this to support backward
83 traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
87 (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
88 (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
89 (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
90 (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
91 Move traversal implementation to CollectionTraversal.h, so it can be
92 shared with achedHTMLCollection.h.
94 * html/CachedHTMLCollection.h: Added.
95 (WebCore::traversalType>::CachedHTMLCollection):
96 (WebCore::traversalType>::~CachedHTMLCollection):
97 (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
98 (WebCore::traversalType>::collectionCanTraverseBackward):
99 (WebCore::traversalType>::collectionTraverseForward):
100 (WebCore::traversalType>::collectionTraverseBackward):
101 (WebCore::traversalType>::willValidateIndexCache):
102 (WebCore::traversalType>::length):
103 (WebCore::traversalType>::item):
104 (WebCore::traversalType>::invalidateCache):
105 (WebCore::traversalType>::elementMatches):
106 (WebCore::nameShouldBeVisibleInDocumentAll):
107 (WebCore::traversalType>::namedItem):
109 * html/CollectionTraversal.h: Added.
110 Add new template class that provide the collection traversal code
111 needed by CollectionIndexCache. It has template specializations for
112 all 3 types of traversal: Descendants, ChildrenOnly, and
115 * html/CollectionType.h:
116 Add CollectionTypeTraits traits so we can resolve the
117 CollectionTraversalType used by a specific CollectionType at
118 compile-time. This is needed for the second template parameter of
119 CachedHTMLCollection.
121 * html/GenericCachedHTMLCollection.cpp: Added.
122 (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
123 * html/GenericCachedHTMLCollection.h: Added.
124 Add CachedHTMLCollection subclass is the generic one used for all
125 CollectionTypes that do not have their own subclass (e.g. NodeChildren).
126 This has an elementMatches() method with a switch() statement handling
127 all these CollectionTypes. Those are not normally not performance
130 * html/HTMLAllCollection.cpp:
131 (WebCore::HTMLAllCollection::HTMLAllCollection):
132 * html/HTMLAllCollection.h:
133 Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
134 an elementMatches() method that simply returns true as we want to
137 * html/HTMLCollection.cpp:
138 (WebCore::HTMLCollection::HTMLCollection):
139 Move CollectionIndexCache member to the subclass and drop the 2 other
140 members as they are replaced with the CollectionTraversalType template
141 parameter of CachedHTMLCollection.
143 (WebCore::HTMLCollection::~HTMLCollection):
144 Move Document::unregisterCollection() call to ~CachedHTMLCollection()
145 as we needed to check if the CollectionIndexCache was valid first.
147 (WebCore::HTMLCollection::updateNamedElementCache):
148 Move part of the implementation to the CachedHTMLCollection subclass
149 as it needs to know about the type of traversal and it needs to be
150 able to call elementMatches().
152 * html/HTMLCollection.h:
153 (WebCore::HTMLCollection::rootNode):
154 Inline for performance reasons and consistency with CachedLiveNodeList.
156 (WebCore::HTMLCollection::memoryCost):
157 Make virtual and move part of the implementation to the
158 CachedHTMLCollection subclass to compute the cost of the
159 CollectionIndexCache.
161 (WebCore::HTMLCollection::invalidateCache):
162 Move part of the implementation to the subclass to invalidate the
163 CollectionIndexCache.
165 * html/HTMLFieldSetElement.cpp:
166 (WebCore::HTMLFieldSetElement::elements):
168 * html/HTMLFormControlsCollection.cpp:
169 * html/HTMLFormControlsCollection.h:
170 Subclass CachedHTMLCollection instead of HTMLCollection.
171 customElementAfter() no longer needs to be virtual as it
172 is called directly by CachedHTMLCollection on the subclass.
174 * html/HTMLFormElement.cpp:
175 (WebCore::HTMLFormElement::elements):
176 * html/HTMLMapElement.cpp:
177 (WebCore::HTMLMapElement::areas):
178 Call NodeListsNodeData::addCachedCollection() directly.
180 * html/HTMLNameCollection.cpp:
181 * html/HTMLNameCollection.h:
182 Subclass CachedHTMLCollection instead of HTMLCollection.
184 * html/HTMLOptionsCollection.cpp:
185 * html/HTMLOptionsCollection.h:
186 Subclass CachedHTMLCollection instead of HTMLCollection.
188 * html/HTMLSelectElement.cpp:
189 (WebCore::HTMLSelectElement::selectedOptions):
190 (WebCore::HTMLSelectElement::options):
191 * html/HTMLTableElement.cpp:
192 (WebCore::HTMLTableElement::rows):
193 (WebCore::HTMLTableElement::tBodies):
194 * html/HTMLTableRowElement.cpp:
195 (WebCore::HTMLTableRowElement::cells):
196 Call NodeListsNodeData::addCachedCollection() directly.
198 * html/HTMLTableRowsCollection.cpp:
199 * html/HTMLTableRowsCollection.h:
200 Subclass CachedHTMLCollection instead of HTMLCollection.
201 customElementAfter() no longer needs to be virtual as it
202 is called directly by CachedHTMLCollection on the subclass.
204 * html/HTMLTableSectionElement.cpp:
205 (WebCore::HTMLTableSectionElement::rows):
206 Call NodeListsNodeData::addCachedCollection() directly.
208 2015-08-14 Matthew Daiter <mdaiter@apple.com>
210 Implementing enumerateDevices
211 https://bugs.webkit.org/show_bug.cgi?id=146426
212 <rdar://problem/21599847>
214 Reviewed by Eric Carlson.
217 * Modules/mediastream/MediaDeviceInfo.idl:
218 * Modules/mediastream/UserMediaRequest.cpp:
219 (WebCore::UserMediaRequest::enumerateDevices):
220 * WebCore.xcodeproj/project.pbxproj:
221 * platform/mediastream/MediaDevicesPrivate.cpp:
222 (WebCore::MediaDevicesPrivate::create):
223 (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
224 (WebCore::MediaDevicesPrivate::didCompleteRequest):
225 (WebCore::MediaDevicesPrivate::availableMediaDevices):
226 * platform/mediastream/MediaDevicesPrivate.h:
227 (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
228 (WebCore::MediaDevicesPrivate::capturedDevices):
230 2015-08-13 Andy Estes <aestes@apple.com>
232 [Cocoa] Downloads do not start if policy decision is made asynchronously
233 https://bugs.webkit.org/show_bug.cgi?id=147985
235 Reviewed by Brady Eidson.
237 It's only possible to convert a NSURLConnection to a download while the connection delegate's
238 -connection:didReceiveResponse: is being called. However, WebKit clients can decide content policy
239 asynchronously. If a client chooses to download a response asynchronously, we can no longer convert the
240 connection to a download, so we should start a new download instead.
242 New API test: _WKDownload.AsynchronousDownloadPolicy
244 * dom/Document.cpp: Updated to include SubresourceLoader.h.
245 * loader/DocumentLoader.cpp:
246 (WebCore::DocumentLoader::mainResourceLoader): Updated to return a SubresourceLoader.
247 (WebCore::DocumentLoader::continueAfterContentPolicy): Cast mainResourceLoader() to a ResourceLoader since
248 didFail() is private in SubresourceLoader.
249 * loader/DocumentLoader.h:
250 * loader/SubresourceLoader.cpp:
251 (WebCore::SubresourceLoader::SubresourceLoader): Initialized m_callingDidReceiveResponse to false.
252 (WebCore::SubresourceLoader::didReceiveResponse): Used TemporaryChange<> to set m_callingDidReceiveResponse to true.
253 * loader/SubresourceLoader.h:
254 * loader/appcache/ApplicationCacheHost.cpp: Updated to include SubresourceLoader.h.
255 * loader/mac/DocumentLoaderMac.cpp: Ditto.
257 2015-08-14 Zalan Bujtas <zalan@apple.com>
259 RenderBlock::simplifiedLayout should pop LayoutStateMaintainer when early returns.
260 https://bugs.webkit.org/show_bug.cgi?id=148031
262 Reviewed by Simon Fraser.
264 LayoutStateMaintainer push/pop calls need to be balanced to ensure layout consistency.
266 Unable to make a test case for this.
268 * rendering/RenderBlock.cpp:
269 (WebCore::RenderBlock::simplifiedLayout):
270 * rendering/RenderView.h:
271 (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer): ASSERT the state properly.
272 (WebCore::LayoutStateMaintainer::push):
273 (WebCore::LayoutStateMaintainer::pop):
274 (WebCore::LayoutStateMaintainer::didPush):
275 (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): Deleted.
277 2015-08-14 Simon Fraser <simon.fraser@apple.com>
279 Remove a few includes from RenderObject.h
280 https://bugs.webkit.org/show_bug.cgi?id=148007
282 Reviewed by Tim Horton.
284 Shrink down the RenderObject.h includes a little.
286 * rendering/RenderElement.h:
287 * rendering/RenderObject.h:
288 * rendering/RenderText.h:
290 2015-08-14 Tim Horton <timothy_horton@apple.com>
292 Fix the Mavericks build.
294 * platform/spi/mac/LookupSPI.h:
296 2015-08-14 Tim Horton <timothy_horton@apple.com>
300 * platform/spi/mac/LookupSPI.h:
302 2015-08-14 Philippe Normand <pnormand@igalia.com>
304 [GStreamer] Handle missing plugins better at runtime
305 https://bugs.webkit.org/show_bug.cgi?id=146999
307 Reviewed by Carlos Garcia Campos.
309 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
310 (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Warn the
311 user if autoaudiosink wasn't found at runtime. In that case
312 playbin will try to be smart by itself, hopefully. Also moved a
313 couple GST_WARNING calls to WARN_MEDIA_MESSAGE.
314 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Use
315 WARN_MEDIA_MESSAGE here as well.
317 2015-08-13 Antti Koivisto <antti@apple.com>
319 Cover memory cache subresource validation policy with cache tests
320 https://bugs.webkit.org/show_bug.cgi?id=147830
322 Reviewed by Alexey Proskuryakov.
324 Existing tests under http/tests/cache/disk-cache currently cover disk and XHR memory cache validation behaviors.
325 They can be extended to cover the regular subresource policy too.
327 Add window.internals API to disable CachedRawResource validation behavior. This makes XHR validate like
328 other resources and allows existing tests (that use XHR) to cover normal subresource policy .
330 Test results reveal some bugs. For example subresources in memory cache don't respect Vary header.
332 It is generally bad that we have a separate XHR-and-main-resource validation policy in memory cache. Network cache
335 * loader/FrameLoader.cpp:
336 (WebCore::FrameLoader::clearTestingOverrides):
337 (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
338 * loader/FrameLoader.h:
339 (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
340 (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
341 (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting):
342 (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting):
343 (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL):
344 * loader/cache/CachedRawResource.h:
345 * loader/cache/CachedResource.h:
346 (WebCore::CachedResource::setLoadFinishTime):
347 (WebCore::CachedResource::loadFinishTime):
348 (WebCore::CachedResource::canReuse): Deleted.
350 Made canReuse non-virtual and removed it from the base. Only CachedRawResource has implementation.
352 * loader/cache/CachedResourceLoader.cpp:
353 (WebCore::CachedResourceLoader::determineRevalidationPolicy):
354 * testing/Internals.cpp:
355 (WebCore::Internals::setOverrideResourceLoadPriority):
356 (WebCore::Internals::setStrictRawResourceValidationPolicyDisabled):
357 (WebCore::Internals::clearMemoryCache):
358 * testing/Internals.h:
360 2015-08-13 Tim Horton <timothy_horton@apple.com>
362 Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
363 https://bugs.webkit.org/show_bug.cgi?id=148012
364 <rdar://problem/19238094>
366 Reviewed by Simon Fraser.
368 * platform/spi/mac/LookupSPI.h:
371 2015-08-13 Simon Fraser <simon.fraser@apple.com>
373 Another Windows build fix.
375 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
377 2015-08-13 Simon Fraser <simon.fraser@apple.com>
379 Try to fix Windows build after r188430.
381 * platform/graphics/ca/win/PlatformCALayerWin.h:
383 2015-08-13 Simon Fraser <simon.fraser@apple.com>
385 Generated files don't all need to include ScriptExecutionContext.h
386 https://bugs.webkit.org/show_bug.cgi?id=148011
388 Reviewed by Alexey Proskuryakov.
390 Generated files which are not callbacks or constructors do not need to include
391 ScriptExecutionContext.h.
393 * bindings/scripts/CodeGeneratorJS.pm:
394 (GenerateImplementation): Deleted.
395 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
396 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
397 * bindings/scripts/test/JS/JSTestException.cpp:
398 * bindings/scripts/test/JS/JSTestInterface.cpp:
399 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
400 * bindings/scripts/test/JS/JSTestObj.cpp:
401 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
402 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
403 * bindings/scripts/test/JS/JSattribute.cpp:
405 2015-08-13 Commit Queue <commit-queue@webkit.org>
407 Unreviewed, rolling out r188428.
408 https://bugs.webkit.org/show_bug.cgi?id=148015
410 broke cmake build (Requested by alexchristensen on #webkit).
414 "Move some commands from ./CMakeLists.txt to Source/cmake"
415 https://bugs.webkit.org/show_bug.cgi?id=148003
416 http://trac.webkit.org/changeset/188428
418 2015-08-13 Zalan Bujtas <zalan@apple.com>
420 Remove pixelSnapped* functions from RenderBoxModelObject/RenderBox.
421 https://bugs.webkit.org/show_bug.cgi?id=147982
423 Reviewed by Simon Fraser.
425 RenderBoxModelObject/RenderBox::pixelSnapped* functions are misleading.
426 They all round to integral values, while the rest of the pixel snapping
427 functions round to device pixels.
428 This patch moves integral rounding to the callers. (Note that they all will eventually
429 go away as we convert additional modules to subpixel rendering (tables, scrolling etc).)
431 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
432 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
434 (WebCore::Element::offsetLeft):
435 (WebCore::Element::offsetTop):
436 (WebCore::Element::offsetWidth):
437 (WebCore::Element::offsetHeight):
438 (WebCore::Element::clientWidth):
439 (WebCore::Element::clientHeight):
441 (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
442 * html/HTMLImageElement.cpp:
443 (WebCore::HTMLImageElement::width):
444 (WebCore::HTMLImageElement::height):
445 * html/shadow/SpinButtonElement.cpp:
446 (WebCore::SpinButtonElement::defaultEventHandler):
447 * inspector/InspectorOverlay.cpp:
448 (WebCore::buildObjectForElementData):
449 * page/FrameView.cpp:
450 (WebCore::FrameView::applyPaginationToViewport):
451 (WebCore::FrameView::calculateScrollbarModesForLayout):
452 (WebCore::FrameView::calculateExtendedBackgroundMode):
453 (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
454 * page/PrintContext.cpp:
455 (WebCore::PrintContext::pageNumberForElement):
456 * platform/graphics/LayoutRect.h:
457 (WebCore::LayoutRect::pixelSnappedSize): Deleted.
458 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
459 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
460 * rendering/RenderBox.cpp:
461 (WebCore::RenderBox::pixelSnappedClientWidth): Deleted.
462 (WebCore::RenderBox::pixelSnappedClientHeight): Deleted.
463 (WebCore::RenderBox::pixelSnappedOffsetWidth): Deleted.
464 (WebCore::RenderBox::pixelSnappedOffsetHeight): Deleted.
465 * rendering/RenderBox.h:
466 (WebCore::RenderBox::pixelSnappedLogicalHeight): Deleted.
467 (WebCore::RenderBox::pixelSnappedLogicalWidth): Deleted.
468 (WebCore::RenderBox::pixelSnappedSize): Deleted.
469 (WebCore::RenderBox::pixelSnappedBorderBoxRect): Deleted.
470 * rendering/RenderBoxModelObject.cpp:
471 (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): Deleted.
472 (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): Deleted.
473 * rendering/RenderBoxModelObject.h:
474 (WebCore::RenderBoxModelObject::pixelSnappedOffsetLeft): Deleted.
475 (WebCore::RenderBoxModelObject::pixelSnappedOffsetTop): Deleted.
476 * rendering/RenderFileUploadControl.cpp:
477 (WebCore::nodeWidth):
478 (WebCore::nodeHeight):
479 (WebCore::RenderFileUploadControl::maxFilenameWidth):
480 * rendering/RenderLayer.cpp:
481 (WebCore::RenderLayer::updateLayerPosition):
482 (WebCore::RenderLayer::perspectiveTransform):
483 (WebCore::RenderLayer::clampScrollOffset):
484 (WebCore::RenderLayer::visibleSize):
485 (WebCore::RenderLayer::positionOverflowControls):
486 (WebCore::RenderLayer::hasHorizontalOverflow):
487 (WebCore::RenderLayer::hasVerticalOverflow):
488 (WebCore::RenderLayer::updateScrollbarsAfterLayout):
489 (WebCore::RenderLayer::overflowControlsIntersectRect):
490 (WebCore::RenderLayer::isPointInResizeControl):
491 * rendering/RenderLayerBacking.cpp:
492 (WebCore::RenderLayerBacking::updateGeometry):
493 (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
494 (WebCore::RenderLayerBacking::startAnimation):
495 (WebCore::RenderLayerBacking::startTransition):
496 * rendering/RenderLayerBacking.h:
497 * rendering/RenderListBox.cpp:
498 (WebCore::RenderListBox::scrollWidth):
499 (WebCore::RenderListBox::scrollHeight):
500 * rendering/RenderMediaControlElements.cpp:
501 (WebCore::RenderMediaVolumeSliderContainer::layout):
502 * rendering/RenderScrollbar.cpp:
503 (WebCore::RenderScrollbar::buttonRect):
504 * rendering/RenderTable.cpp:
505 (WebCore::RenderTable::addOverflowFromChildren):
506 * rendering/RenderTableCell.cpp:
507 (WebCore::RenderTableCell::computeIntrinsicPadding):
508 (WebCore::RenderTableCell::paintCollapsedBorders):
509 (WebCore::RenderTableCell::paintBackgroundsBehindCell):
510 (WebCore::RenderTableCell::paintBoxDecorations):
511 (WebCore::RenderTableCell::paintMask):
512 * rendering/RenderTableCell.h:
513 (WebCore::RenderTableCell::logicalHeightForRowSizing):
514 * rendering/RenderTheme.cpp:
515 (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
516 * rendering/RenderTheme.h:
517 * rendering/RenderThemeMac.mm:
518 (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
519 (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
520 (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
521 * rendering/RenderTreeAsText.cpp:
523 * rendering/mathml/RenderMathMLFraction.cpp:
524 (WebCore::RenderMathMLFraction::paint):
525 * rendering/mathml/RenderMathMLRoot.cpp:
526 (WebCore::RenderMathMLRoot::paint):
527 * rendering/svg/RenderSVGRoot.cpp:
528 (WebCore::RenderSVGRoot::paintReplaced):
529 (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
531 2015-08-13 Simon Fraser <simon.fraser@apple.com>
533 Minor GraphicsLayer.h/PlatformCALayer.h cleanup
534 https://bugs.webkit.org/show_bug.cgi?id=148009
536 Reviewed by Tim Horton.
538 Remove some #includes.
540 * platform/graphics/GraphicsLayer.h:
541 * platform/graphics/ca/PlatformCALayer.h:
543 2015-08-13 Alex Christensen <achristensen@webkit.org>
545 Move some commands from ./CMakeLists.txt to Source/cmake
546 https://bugs.webkit.org/show_bug.cgi?id=148003
548 Reviewed by Brent Fulgham.
551 Added commands needed to build WebCore by itself.
553 2015-08-13 Tim Horton <timothy_horton@apple.com>
555 Refactor and improve TextIndicator to prepare for tests
556 https://bugs.webkit.org/show_bug.cgi?id=147622
558 Reviewed by Simon Fraser.
560 No new tests because they're coming soon!
562 * page/TextIndicator.cpp:
563 (WebCore::TextIndicator::TextIndicator):
564 (WebCore::TextIndicator::~TextIndicator):
565 (WebCore::TextIndicator::createWithRange):
566 (WebCore::TextIndicator::createWithSelectionInFrame):
567 (WebCore::hasNonInlineOrReplacedElements):
568 (WebCore::snapshotOptionsForTextIndicatorOptions):
569 (WebCore::takeSnapshot):
570 (WebCore::takeSnapshots):
571 (WebCore::initializeIndicator):
572 (WebCore::snapshotSelectionWithHighlight): Deleted.
573 (WebCore::TextIndicator::wantsBounce): Deleted.
574 (WebCore::TextIndicator::wantsContentCrossfade): Deleted.
575 (WebCore::TextIndicator::wantsFadeIn): Deleted.
576 (WebCore::TextIndicator::wantsManualAnimation): Deleted.
577 * page/TextIndicator.h:
578 (WebCore::TextIndicator::indicatesCurrentSelection):
579 (WebCore::TextIndicator::setWantsMargin): Deleted.
580 (WebCore::TextIndicator::wantsMargin): Deleted.
581 Rename wantsMargin to indicatesCurrentSelection. It's really about whether
582 the TextIndicator indicates the existing selection, and the Mac presentation
583 just uses that to determine whether or not to show a margin, but that
584 margin has nothing to do with the cross-platform TextIndicator code.
586 Move most of the snapshotting and rect gathering code to initializeTextIndicator, and call it
587 from both ::createWithRange and ::createWithSelectionInFrame, instead of calling
588 ::createWithSelectionInFrame from ::createWithRange after setting the selection.
589 This way, the range passed into ::createWithRange is preserved for use in initializeTextIndicator,
590 instead of round-tripping through selection code, which can change it (e.g. in the case
591 of user-select: none; elements).
593 Add TextIndicatorOptions, which allow callers to adjust the behavior of TextIndicator
594 instead of having #if PLATFORM(X) strewn throughout TextIndicator.
596 Add an option which was previously implemented at the iOS-specific callsites,
597 TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges,
598 which falls back to indicating a bounding rect and not doing a range-only paint
599 if the given range includes any non-inline elements or any replaced elements.
600 This makes it so that we do something reasonable-looking for very complex ranges,
601 like article links on the New York Times, which include multiple disparate paragraphs
602 of text and one or more images, and also so that indicating a range that only
603 includes an image does something fairly reasonable.
605 Move presentation-specific functions (wantsBounce, wantsContentCrossfade, etc.)
606 to TextIndicatorWindow. Ideally TextIndicatorPresentationTransition would also move,
607 but that is a fairly large and complicated change that should be made separately.
609 * page/mac/TextIndicatorWindow.h:
610 * page/mac/TextIndicatorWindow.mm:
611 (indicatorWantsBounce):
612 (indicatorWantsContentCrossfade):
613 (indicatorWantsFadeIn):
614 (indicatorWantsManualAnimation):
615 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
616 (-[WebTextIndicatorView _animationDuration]):
617 (-[WebTextIndicatorView present]):
618 (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
619 (WebCore::TextIndicatorWindow::clearTextIndicator):
620 (WebCore::TextIndicatorWindow::setTextIndicator):
621 Rename TextIndicatorDismissalAnimation to TextIndicatorWindowDismissalAnimation,
622 and TextIndicatorLifetime to TextIndicatorWindowLifetime, because
623 they are TextIndicatorWindow specific.
625 * accessibility/AccessibilityRenderObject.cpp:
626 (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
627 * bindings/objc/DOM.mm:
628 (-[DOMNode getPreviewSnapshotImage:andRects:]):
629 (-[DOMRange boundingBox]):
630 (-[DOMRange textRects]):
631 * dom/DocumentMarkerController.cpp:
632 (WebCore::DocumentMarkerController::addTextMatchMarker):
634 (WebCore::Node::textRects):
636 (WebCore::Range::intersectsNode):
637 (WebCore::Range::absoluteBoundingBox):
638 (WebCore::Range::absoluteTextRects):
639 (WebCore::Range::absoluteTextQuads):
640 (WebCore::Range::getClientRects):
641 (WebCore::Range::getBoundingClientRect):
642 (WebCore::Range::getBorderAndTextQuads):
643 (WebCore::Range::boundingRectInternal):
644 (WebCore::Range::absoluteBoundingRect):
645 (WebCore::Range::boundingBox): Deleted.
646 (WebCore::Range::textRects): Deleted.
647 (WebCore::Range::textQuads): Deleted.
648 (WebCore::Range::boundingRect): Deleted.
650 * editing/AlternativeTextController.cpp:
651 (WebCore::AlternativeTextController::rootViewRectForRange):
652 * editing/Editor.cpp:
653 (WebCore::Editor::findStringAndScrollToVisible):
654 * editing/FrameSelection.cpp:
655 (WebCore::FrameSelection::getClippedVisibleTextRectangles):
656 * editing/mac/DataDetection.mm:
657 (WebCore::DataDetection::detectItemAroundHitTestResult):
658 * rendering/RenderObject.cpp:
659 (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
660 Rename various Range methods to make it clear whether they return absolute or client rects.
662 2015-08-13 Jer Noble <jer.noble@apple.com>
664 Don't short circuit seeking
665 https://bugs.webkit.org/show_bug.cgi?id=147892
667 Reviewed by Eric Carlson.
669 When two seekWithTolerance() requests come in before the first is acted upon in seekTask(),
670 the second will result in a "no seek required" conditional, because the new "currentTime" is
671 assumed to be the destination time of the first seek.
673 When cancelling a pending seek, first replace the "now" value with the "now" value from the
674 replaced seek, thus preserving the original currentTime across all replacement seeks.
676 Drive-by fix: some added logging causes occasional crashes, due to the underlying object being
677 accessed having been deleted.
679 * html/HTMLMediaElement.cpp:
680 (WebCore::HTMLMediaElement::seekWithTolerance):
681 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
682 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
684 2015-08-13 Brent Fulgham <bfulgham@apple.com>
686 Prospective Mac/iOS build fix after the last Windows build fix.
688 * page/CaptionUserPreferences.cpp:
689 * page/UserContentController.cpp:
691 2015-08-13 Brent Fulgham <bfulgham@apple.com>
693 [Win] More build fixes.
695 * dom/make_event_factory.pl:
696 (generateImplementation):
697 * page/CaptionUserPreferences.cpp:
698 * page/PageGroup.cpp:
699 * page/UserContentController.cpp:
701 2015-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
703 A focused node should not be assisted when handling touch events synchronously
704 https://bugs.webkit.org/show_bug.cgi?id=147836
705 <rdar://problem/22204108>
707 Reviewed by Enrica Casucci.
709 Makes interaction with touch handlers no longer assist the currently focused element in the
710 general case. Added plumbing to reassist a currently focused node when dispatching touch events,
711 so that an input that programmatically focuses itself and prevents default on a touch event will
712 be properly assisted when it has been programmatically focused (either through Javascript or the
713 autofocus attribute) prior to receiving the touch event. This patch also removes the now
714 unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
718 (WebCore::Element::focus): Notifies the chrome client that the element has refocused before
720 * page/ChromeClient.h: Refocusing an element does nothing by default.
721 * platform/RuntimeApplicationChecksIOS.h: Removed special casing for Gmail Add Account.
722 * platform/RuntimeApplicationChecksIOS.mm: See above.
723 (WebCore::applicationIsGmailAddAccountOnIOS): See above.
725 2015-08-13 Brent Fulgham <bfulgham@apple.com>
727 [Win] Unreviewed build fix.
729 * accessibility/AXObjectCache.cpp: Add missing 'DataLog.h' include.
731 2015-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
733 Selects should scale when rendering while zoomed
734 https://bugs.webkit.org/show_bug.cgi?id=147868
736 Reviewed by Daniel Bates.
738 When rendering zoomed <select> elements, draw to an image buffer instead of drawing directly
739 into the context. This allows us to scale the image buffer up before rendering.
741 * rendering/RenderThemeMac.mm:
742 (WebCore::RenderThemeMac::paintMenuList): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
743 to render search fields, utilizing an offscreen image buffer only when necessary.
745 2015-08-13 Alex Christensen <achristensen@webkit.org>
747 [Win] Unreviewed build fix after r188388.
749 * bindings/js/JSWebGLRenderingContextCustom.cpp:
750 * dom/EventFactory.h:
751 * rendering/RenderThemeWin.cpp:
752 Strange things happen when you change including headers. This fixed my local build.
754 2015-08-13 Geoffrey Garen <ggaren@apple.com>
756 Standardize on the phrase "delete code"
757 https://bugs.webkit.org/show_bug.cgi?id=147984
759 Reviewed by Mark Lam.
761 Use "delete" when we talk about throwing away code, as opposed to
762 "invalidate" or "discard".
764 * bindings/js/GCController.cpp:
765 (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
766 (WebCore::GCController::deleteAllCode):
767 (WebCore::GCController::discardAllCompiledCode): Deleted.
768 * bindings/js/GCController.h:
769 * platform/MemoryPressureHandler.cpp:
770 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
772 2015-08-13 Eric Carlson <eric.carlson@apple.com>
774 Don't short circuit seeking
775 https://bugs.webkit.org/show_bug.cgi?id=147892
777 Reviewed by Jer Noble.
779 Test: media/video-seek-to-current-time.html
781 * html/HTMLMediaElement.cpp:
782 (WebCore::HTMLMediaElement::prepareForLoad): Call clearSeeking.
783 (WebCore::HTMLMediaElement::fastSeek): Add logging.
784 (WebCore::HTMLMediaElement::seekWithTolerance): Add logging. Set m_pendingSeekType.
785 (WebCore::HTMLMediaElement::seekTask): Call clearSeeking. Don't short circuit a
786 if the current or pending seek is a fast seek. Set m_seeking to true immediately
787 before calling media engine as it may have been cleared before the seek task
789 (WebCore::HTMLMediaElement::clearSeeking): New.
790 * html/HTMLMediaElement.h:
791 * html/HTMLMediaElementEnums.h:
793 * platform/GenericTaskQueue.h:
794 (WebCore::GenericTaskQueue::enqueueTask): Clear m_pendingTasks.
796 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
797 (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Don't return early
798 when asked to seek to the current time.
799 (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): Remove some
800 extremely noisy logging.
802 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
803 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Add logging.
805 2015-08-13 Simon Fraser <simon.fraser@apple.com>
807 FilterOperation.h should not include FilterEffect.h
808 https://bugs.webkit.org/show_bug.cgi?id=147970
810 Reviewed by Daniel Bates.
812 FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
813 so move its include to FilterOperation.cpp.
815 Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
817 * platform/graphics/filters/FilterOperation.cpp:
818 (WebCore::ReferenceFilterOperation::setFilterEffect):
819 * platform/graphics/filters/FilterOperation.h:
820 (WebCore::ReferenceFilterOperation::setFilterEffect): Deleted.
822 2015-08-13 Simon Fraser <simon.fraser@apple.com>
824 ScriptExecutionContext.h pulls in all the JSC headers
825 https://bugs.webkit.org/show_bug.cgi?id=147969
827 Reviewed by Alexey Proskuryakov.
829 ScriptExecutionContext.h included ScheduledAction.h, which pulled in all the
830 JSC headers via JSDOMBinding.h. There was no need for this #include, so remove
831 it and fix the fallout.
833 * Modules/webdatabase/DatabaseTracker.cpp:
834 * Modules/webdatabase/SQLTransaction.h:
835 * bindings/js/JSWebGLRenderingContextCustom.cpp:
836 * contentextensions/ContentExtensionStyleSheet.cpp:
837 * dom/ScriptExecutionContext.h:
838 * html/FTPDirectoryDocument.cpp:
839 * html/canvas/WebGLRenderingContext.cpp:
840 * html/parser/HTMLTreeBuilder.h:
842 2015-08-12 Anders Carlsson <andersca@apple.com>
844 Use WTF::Optional in WindowFeatures
845 https://bugs.webkit.org/show_bug.cgi?id=147956
847 Reviewed by Sam Weinig.
849 * loader/FrameLoader.cpp:
850 (WebCore::createWindow):
851 * page/WindowFeatures.cpp:
852 (WebCore::WindowFeatures::WindowFeatures):
853 (WebCore::WindowFeatures::setWindowFeature):
854 (WebCore::WindowFeatures::boolFeature):
855 (WebCore::WindowFeatures::floatFeature):
856 (WebCore::WindowFeatures::parseDialogFeatures):
857 * page/WindowFeatures.h:
858 (WebCore::WindowFeatures::WindowFeatures):
860 2015-08-13 Matthew Daiter <mdaiter@apple.com>
862 UserMediaRequest should supply IDs of devices selected by user
863 https://bugs.webkit.org/show_bug.cgi?id=147263
864 <rdar://problem/21983345>
866 Reviewed by Jer Noble.
868 * Modules/mediastream/UserMediaRequest.cpp:
869 (WebCore::UserMediaRequest::userMediaAccessGranted):
870 * Modules/mediastream/UserMediaRequest.h:
871 * platform/mock/UserMediaClientMock.h:
873 2015-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
875 [Cairo] Improve image quality when using newer versions of cairo/pixman
876 https://bugs.webkit.org/show_bug.cgi?id=147826
878 Reviewed by Martin Robinson.
880 Since cairo 1.14 the image filters changed a bit:
882 - CAIRO_FILTER_GOOD uses a box filter when downscaling if the
883 scale factor is less than 0.75, otherwise it uses a filter
884 equivalent to CAIRO_FILTER_BILINEAR.
885 - CAIRO_FILTER_BEST uses always a Catmull-Rom filter.
887 We are currently using CAIRO_FILTER_BILINEAR for medium, high and
888 default interpolation levels. We could use CAIRO_FILTER_GOOD for
889 medium and default, and CAIRO_FILTER_BEST for high. This will not
890 have any effect in previous versions of cairo because before 1.14
891 CAIRO_FILTER_GOOD, CAIRO_FILTER_BILINEAR and CAIRO_FILTER_BEST had
892 the same implementation in pixman.
894 * platform/graphics/cairo/PlatformContextCairo.cpp:
895 (WebCore::PlatformContextCairo::drawSurfaceToContext):
897 2015-08-12 Myles C. Maxfield <mmaxfield@apple.com>
899 [Cocoa] [CJK-configured device] System font has vertical punctuation
900 https://bugs.webkit.org/show_bug.cgi?id=147964
901 <rdar://problem/22256660>
903 Reviewed by Dean Jackson.
905 GlyphPage::fill() has multiple code paths to accomplish its goal. It uses the shouldUseCoreText() helper
906 function to determine which one of the paths should be taken. However, not all of the code paths in
907 GlyphPage::fill() are able of handling all situations. Indeed, the CoreText code paths in GlyphPage::fill()
908 are only able to handle the situations which shouldUseCoreText() returns true for. This happens in the
911 1. If the font is a composite font
912 2. If the font is used for text-combine
913 3. If the font has vertical glyphs
915 In r187693, I added one more case to this list: If the font is the system font. However, I failed to add
916 the necessary support to GlyphPage::fill() for this case. Becasue of this, we just happened to fall into
917 the case of vertical fonts (just by coincidence), which causes us to use
918 CTFontGetVerticalGlyphsForCharacters() instead of CTFontGetGlyphsForCharacters().
920 The solution is to adopt the same behavior we were using before r187693. Back then, we were using
921 CGFontGetGlyphsForUnichars(), which always returned horizontal glyphs. We should simply adopt this same
922 behavior, except in the Core Text case. Therefore, this patch is just a simple check to see if we are
923 using the system font when determining which Core Text function to use.
925 Test: fast/text/system-font-punctuation.html
927 * platform/graphics/FontDescription.h:
928 (WebCore::FontDescription::setWidthVariant):
929 * platform/graphics/FontPlatformData.h:
930 (WebCore::FontPlatformData::isForTextCombine):
931 * platform/graphics/mac/GlyphPageMac.cpp:
932 (WebCore::shouldUseCoreText):
933 (WebCore::GlyphPage::fill):
934 * rendering/RenderCombineText.cpp:
935 (WebCore::RenderCombineText::combineText):
937 2015-08-12 Jinyoung Hur <hur.ims@navercorp.com>
939 [WinCairo] Turn on WOFF font
940 https://bugs.webkit.org/show_bug.cgi?id=147878
942 WOFF is already usable in Windows Cairo. Just turn it on.
944 Reviewed by Myles C. Maxfield.
946 Test: fast\css\font-face-woff.html
948 * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
949 (WebCore::FontCustomPlatformData::supportsFormat):
951 2015-08-12 Brent Fulgham <bfulgham@apple.com>
953 Move RenderBox-specific Scroll Snap code from RenderElement to RenderBox
954 https://bugs.webkit.org/show_bug.cgi?id=147963
956 Reviewed by Simon Fraser.
958 No new tests: No change in functionality.
960 * rendering/RenderBox.cpp:
961 (WebCore::RenderBox::styleWillChange): Remove RenderBox-specific code.
962 (WebCore::RenderBox::willBeRemovedFromTree): Ditto.
963 * rendering/RenderBox.h:
964 * rendering/RenderElement.cpp:
965 (WebCore::RenderElement::styleWillChange): Move code from RenderElement to
966 handle Scroll Snap Points.
967 (WebCore::RenderElement::willBeRemovedFromTree): Added new override to handle
968 scroll-snap point logic.
970 2015-08-12 Antti Koivisto <antti@apple.com>
972 CachedResource leak in validation code
973 https://bugs.webkit.org/show_bug.cgi?id=147941
975 Reviewed by Chris Dumez.
977 While adding test coverage I discovered a way to hit ASSERT(!resource->m_proxyResource) in CachedResource::setResourceToRevalidate.
978 I think this ends up leaking a resource too.
980 Test: http/tests/cache/recursive-validation.html
982 * loader/cache/CachedRawResource.cpp:
983 (WebCore::CachedRawResource::didAddClient):
985 Tighten the condition.
987 * loader/cache/CachedResource.cpp:
988 (WebCore::CachedResource::setResourceToRevalidate):
989 (WebCore::CachedResource::clearResourceToRevalidate):
991 Replace workaround for this bug with an assert.
993 * loader/cache/CachedResource.h:
994 (WebCore::CachedResource::validationInProgress):
995 (WebCore::CachedResource::validationCompleting):
996 (WebCore::CachedResource::didSendData):
997 * loader/cache/CachedResourceLoader.cpp:
998 (WebCore::CachedResourceLoader::revalidateResource):
999 (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1001 Fix the bug by using (instead of revalidating) resource that we are just finishing revalidating.
1002 This can happen when a succesful revalidation synchronously triggers another load for the same resource.
1004 2015-08-12 Matthew Daiter <mdaiter@apple.com>
1006 Need to add stubs to enumerateDevices
1007 https://bugs.webkit.org/show_bug.cgi?id=147903
1009 Reviewed by Eric Carlson.
1011 * Modules/mediastream/MediaDevices.cpp:
1012 (WebCore::MediaDevices::enumerateDevices):
1013 * Modules/mediastream/MediaDevices.h:
1014 * Modules/mediastream/UserMediaRequest.cpp:
1015 (WebCore::UserMediaRequest::enumerateDevices):
1016 * Modules/mediastream/UserMediaRequest.h:
1018 2015-08-12 Matt Rajca <mrajca@apple.com>
1020 Fixed the Release build when MEDIA_SESSION is enabled.
1022 * testing/Internals.cpp:
1023 (WebCore::interruptingCategoryFromString):
1025 2015-08-07 Matt Rajca <mrajca@apple.com>
1027 Media Session: notify the UI process when media controls are enabled/disabled
1028 https://bugs.webkit.org/show_bug.cgi?id=147802
1030 Reviewed by Eric Carlson.
1032 * Modules/mediasession/MediaRemoteControls.cpp:
1033 (WebCore::MediaRemoteControls::MediaRemoteControls): Keep track of the parent session.
1034 (WebCore::MediaRemoteControls::~MediaRemoteControls): Removed unnecessary line.
1035 (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Tell the session a control was enabled/disabled.
1036 (WebCore::MediaRemoteControls::setNextTrackEnabled): Tell the session a control was enabled/disabled.
1037 * Modules/mediasession/MediaRemoteControls.h:
1038 (WebCore::MediaRemoteControls::create):
1039 (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Moved to implementation file.
1040 (WebCore::MediaRemoteControls::setNextTrackEnabled): Moved to implementation file.
1041 * Modules/mediasession/MediaSession.cpp:
1042 (WebCore::MediaSession::MediaSession): Keep track of the remote controls' parent session.
1043 (WebCore::MediaSession::controlIsEnabledDidChange): Propagate the new media state to the UI process.
1044 * Modules/mediasession/MediaSession.h:
1046 (WebCore::Document::updateIsPlayingMedia): Include whether we can skip to the previous/next track.
1047 * page/MediaProducer.h:
1049 2015-08-12 Alex Christensen <achristensen@webkit.org>
1051 Fix Debug CMake builds on Windows
1052 https://bugs.webkit.org/show_bug.cgi?id=147940
1054 Reviewed by Chris Dumez.
1056 * PlatformWin.cmake:
1057 Copy localized strings to the WebKit.resources directory.
1059 2015-08-12 Alex Christensen <achristensen@webkit.org>
1061 Unreviewed build fix after r188339.
1063 * bindings/js/GCController.cpp:
1064 (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
1065 (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
1066 (WebCore::GCController::releaseExecutableMemory): Deleted.
1067 * bindings/js/GCController.h:
1068 Commit WebCore part of patch.
1070 2015-08-12 Brent Fulgham <bfulgham@apple.com>
1072 REGRESSION(r185606): ASSERT in WebCore::RenderElement::styleWillChange
1073 https://bugs.webkit.org/show_bug.cgi?id=147596
1074 <rdar://problem/21963355>
1076 Reviewed by Jon Honeycutt.
1078 Only add (or remove) a RenderElement from the container of RenderBoxes with
1079 scroll snap coordinates if the element actually is a RenderBox.
1081 Tested by css3/scroll-snap/improper-snap-points-crash.html.
1083 * rendering/RenderElement.cpp:
1084 (WebCore::RenderElement::styleWillChange):
1085 (WebCore::RenderElement::willBeRemovedFromTree):
1087 2015-08-12 Devin Rousso <drousso@apple.com>
1089 Web Inspector: Implement selector highlighting for iOS
1090 https://bugs.webkit.org/show_bug.cgi?id=147919
1092 Reviewed by Timothy Hatcher.
1094 * inspector/InspectorOverlay.cpp:
1095 (WebCore::InspectorOverlay::getHighlight):
1096 If the current highlight is a nodeList, generate highlights for each node in the list and
1097 return the concatenated value of those highlights.
1099 2015-08-12 Youenn Fablet <youenn.fablet@crf.canon.fr>
1101 Remove promise attribute specific handling from binding generator
1102 https://bugs.webkit.org/show_bug.cgi?id=147828
1104 Reviewed by Darin Adler.
1106 Reverting http://trac.webkit.org/changeset/184643, as CachedAttribute is used instead.
1108 * bindings/scripts/CodeGeneratorJS.pm:
1109 (GenerateHeader): Deleted.
1110 * bindings/scripts/test/JS/JSTestObj.cpp:
1111 (WebCore::jsTestObjConstructor): Deleted.
1112 (WebCore::setJSTestObjConstructorStaticStringAttr): Deleted.
1113 * bindings/scripts/test/JS/JSTestObj.h:
1114 * bindings/scripts/test/ObjC/DOMTestObj.h:
1115 * bindings/scripts/test/ObjC/DOMTestObj.mm:
1116 (-[DOMTestObj voidMethod]): Deleted.
1117 (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]): Deleted.
1118 * bindings/scripts/test/TestObj.idl:
1120 2015-08-12 Youenn Fablet <youenn.fablet@crf.canon.fr>
1122 XHR.setRequestHeader should remove trailing and leading whitespaces from the header value
1123 https://bugs.webkit.org/show_bug.cgi?id=147445
1125 Reviewed by Darin Adler.
1127 Covered by added and modifed tests.
1129 * platform/network/HTTPParsers.h:
1130 (WebCore::isHTTPSpace):
1131 (WebCore::stripLeadingAndTrailingHTTPSpaces):
1132 * xml/XMLHttpRequest.cpp:
1133 (WebCore::XMLHttpRequest::setRequestHeader): strip trailing and leading whitespace before testing for header value validity and storing.
1135 2015-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
1137 NetworkProcess: DNS prefetch happens in the Web Process
1138 https://bugs.webkit.org/show_bug.cgi?id=147824
1140 Reviewed by Alexey Proskuryakov.
1142 Use FrameLoaderClient to do the DNS prefetch.
1144 * html/HTMLAnchorElement.cpp:
1145 (WebCore::HTMLAnchorElement::parseAttribute):
1146 * loader/FrameLoaderClient.h:
1147 * loader/LinkLoader.cpp:
1148 (WebCore::LinkLoader::loadLink):
1150 (WebCore::Chrome::mouseDidMoveOverElement):
1152 2015-08-11 Mark Lam <mark.lam@apple.com>
1154 Implementation JavaScript watchdog using WTF::WorkQueue.
1155 https://bugs.webkit.org/show_bug.cgi?id=147107
1157 Reviewed by Geoffrey Garen.
1159 No new tests because we're not introducing any behavior change to WebCore here.
1160 We're only #include'ing Watchdog.h directly instead of going through VM.h.
1162 * ForwardingHeaders/runtime/Watchdog.h: Added.
1163 * PlatformEfl.cmake:
1164 * WebCore.vcxproj/WebCore.vcxproj:
1165 * WebCore.vcxproj/WebCore.vcxproj.filters:
1166 * bindings/js/JSEventListener.cpp:
1167 * bindings/js/WorkerScriptController.cpp:
1169 2015-08-11 Simon Fraser <simon.fraser@apple.com>
1171 [iOS WK2] ASSERT(!m_properties.backingStore || owner()) sometimes on zooming
1172 https://bugs.webkit.org/show_bug.cgi?id=147854
1174 Reviewed by Tim Horton.
1176 When destroying a TileGrid, the container layer remains alive by virtue of being
1177 in the layer tree, and it and its tiles get visited during layer tree transaction
1178 building but we assert because we've cleared the owner on the tile layers.
1180 The real bug is that TileController doesn't tell GraphicsLayerCA when the custom
1181 sublayers change. Make this possible via a new PlatformCALayerClient function,
1182 and make TileController use this when rearranging its tile grids.
1184 * platform/graphics/ca/GraphicsLayerCA.cpp:
1185 (WebCore::GraphicsLayerCA::platformCALayerCustomSublayersChanged):
1186 (WebCore::GraphicsLayerCA::updateContentsScale): No need to explicitly set
1187 the ChildrenChanged flag now.
1188 * platform/graphics/ca/GraphicsLayerCA.h:
1189 * platform/graphics/ca/PlatformCALayerClient.h:
1190 (WebCore::PlatformCALayerClient::platformCALayerCustomSublayersChanged):
1191 (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
1192 * platform/graphics/ca/TileController.cpp:
1193 (WebCore::TileController::setNeedsDisplay):
1194 (WebCore::TileController::setContentsScale):
1195 (WebCore::TileController::setZoomedOutContentsScale):
1196 (WebCore::TileController::revalidateTiles):
1197 (WebCore::TileController::clearZoomedOutTileGrid):
1198 (WebCore::TileController::tileGridsChanged):
1199 (WebCore::TileController::tileRevalidationTimerFired):
1200 * platform/graphics/ca/TileController.h:
1201 * platform/graphics/ca/TileGrid.h: Default param.
1203 2015-08-11 Zalan Bujtas <zalan@apple.com>
1205 Disconnect LayoutStateDisabler logic and RenderView pointer.
1206 https://bugs.webkit.org/show_bug.cgi?id=147906
1208 Reviewed by Simon Fraser.
1210 LayoutStateDisabler should disable layout state unconditionally.
1211 The only place where it was actually conditional was the subtree layout branch.
1212 Create a dedicated SubtreeLayoutStateMaintainer to manage the subtree layout case.
1214 No change in behaviour.
1216 * page/FrameView.cpp:
1217 (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
1218 (WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
1219 (WebCore::FrameView::layout):
1220 * rendering/RenderBlock.cpp:
1221 (WebCore::RenderBlock::updateFirstLetterStyle):
1222 (WebCore::RenderBlock::updateFirstLetter):
1223 * rendering/RenderBlockFlow.cpp:
1224 (WebCore::RenderBlockFlow::repaintOverhangingFloats):
1225 * rendering/RenderFlowThread.cpp:
1226 (WebCore::RenderFlowThread::repaintRectangleInRegions):
1227 * rendering/RenderListBox.cpp:
1228 (WebCore::RenderListBox::layout):
1229 * rendering/RenderListItem.cpp:
1230 (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
1231 * rendering/RenderMediaControlElements.cpp:
1232 (WebCore::RenderMediaVolumeSliderContainer::layout):
1233 (WebCore::RenderMediaControlTimelineContainer::layout):
1234 (WebCore::RenderTextTrackContainerElement::layout):
1235 * rendering/RenderMultiColumnFlowThread.cpp:
1236 (WebCore::RenderMultiColumnFlowThread::populate):
1237 (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
1238 * rendering/RenderView.h:
1239 (WebCore::LayoutStateDisabler::LayoutStateDisabler):
1240 (WebCore::LayoutStateDisabler::~LayoutStateDisabler):
1241 * rendering/svg/RenderSVGRoot.cpp:
1242 (WebCore::RenderSVGRoot::layout):
1244 2015-08-11 Simon Fraser <simon.fraser@apple.com>
1246 Fix ViewportConfiguration dumping.
1248 ViewportConfiguration::dump() was dumping parameters.width as parameters.initialScale.
1250 * page/ViewportConfiguration.cpp:
1251 (WebCore::ViewportConfigurationTextStream::operator<<):
1253 2015-08-11 Myles C. Maxfield <mmaxfield@apple.com>
1255 [font-features] Map OpenType feature tags to TrueType feature selectors
1256 https://bugs.webkit.org/show_bug.cgi?id=147819
1258 Reviewed by Dean Jackson.
1260 Allow uses of font-feature-settings even on TrueType fonts.
1262 Test: css3/font-feature-settings-preinstalled-fonts.html
1264 * platform/graphics/cocoa/FontCacheCoreText.cpp:
1265 (WebCore::appendRawTrueTypeFeature):
1266 (WebCore::appendTrueTypeFeature):
1268 2015-08-11 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1270 Reduce use of PassRefPtr in WebCore/css
1271 https://bugs.webkit.org/show_bug.cgi?id=147821
1273 Reviewed by Daniel Bates.
1275 Use RefPtr when returning nullptr or RefPtr, if not, use Ref.
1277 * css/CSSBasicShapes.cpp:
1278 (WebCore::buildSerializablePositionOffset):
1279 (WebCore::CSSBasicShapeCircle::cssText):
1280 (WebCore::CSSBasicShapeEllipse::cssText):
1281 * css/CSSBasicShapes.h:
1282 * css/CSSCalculationValue.cpp:
1283 (WebCore::determineCategory):
1284 (WebCore::CSSCalcExpressionNodeParser::parseCalc):
1285 (WebCore::createBlendHalf):
1286 (WebCore::createCSS):
1287 * css/CSSCanvasValue.cpp:
1288 (WebCore::CSSCanvasValue::image):
1289 * css/CSSCanvasValue.h:
1290 * css/CSSComputedStyleDeclaration.cpp:
1291 (WebCore::positionOffsetValue):
1292 (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
1293 (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1294 (WebCore::counterToCSSValue):
1295 (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1296 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1297 (WebCore::computeRenderStyleForProperty):
1298 (WebCore::valueForItemPositionWithOverflowAlignment):
1299 (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
1300 (WebCore::ComputedStyleExtractor::propertyValue):
1301 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1302 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
1303 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1304 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal):
1305 (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1306 * css/CSSComputedStyleDeclaration.h:
1307 * css/CSSCrossfadeValue.cpp:
1308 (WebCore::CSSCrossfadeValue::image):
1309 (WebCore::CSSCrossfadeValue::blend):
1310 * css/CSSCrossfadeValue.h:
1311 * css/CSSFilterImageValue.cpp:
1312 (WebCore::CSSFilterImageValue::image):
1313 * css/CSSFilterImageValue.h:
1314 * css/CSSGradientValue.cpp:
1315 (WebCore::CSSGradientValue::image):
1316 (WebCore::CSSGradientValue::gradientWithStylesResolved):
1317 (WebCore::CSSLinearGradientValue::createGradient):
1318 (WebCore::CSSRadialGradientValue::createGradient):
1319 * css/CSSGradientValue.h:
1320 * css/CSSImageSetValue.cpp:
1321 (WebCore::CSSImageSetValue::cloneForCSSOM):
1322 * css/CSSImageSetValue.h:
1323 * css/CSSImageValue.cpp:
1324 (WebCore::CSSImageValue::cloneForCSSOM):
1325 * css/CSSImageValue.h:
1326 * css/CSSParser.cpp:
1327 (WebCore::CSSParser::parseRule):
1328 (WebCore::CSSParser::parseKeyframeRule):
1329 (WebCore::CSSParser::parseFontFaceValue):
1330 (WebCore::CSSParser::parseValidPrimitive):
1331 (WebCore::CSSParser::parseContentDistributionOverflowPosition):
1332 (WebCore::CSSParser::parseAttr):
1333 (WebCore::CSSParser::parseBackgroundColor):
1334 (WebCore::CSSParser::parsePositionX):
1335 (WebCore::CSSParser::parsePositionY):
1336 (WebCore::CSSParser::parseFillPositionComponent):
1337 (WebCore::CSSParser::parseFillSize):
1338 (WebCore::CSSParser::parseAnimationDelay):
1339 (WebCore::CSSParser::parseAnimationDirection):
1340 (WebCore::CSSParser::parseAnimationDuration):
1341 (WebCore::CSSParser::parseAnimationFillMode):
1342 (WebCore::CSSParser::parseAnimationIterationCount):
1343 (WebCore::CSSParser::parseAnimationName):
1344 (WebCore::CSSParser::parseAnimationPlayState):
1345 (WebCore::CSSParser::parseAnimationTrigger):
1346 (WebCore::CSSParser::parseAnimationProperty):
1347 (WebCore::CSSParser::parseAnimationTimingFunction):
1348 (WebCore::CSSParser::parseGridPosition):
1349 (WebCore::gridMissingGridPositionValue):
1350 (WebCore::CSSParser::parseGridTrackList):
1351 (WebCore::CSSParser::parseGridTrackSize):
1352 (WebCore::CSSParser::parseGridBreadth):
1353 (WebCore::CSSParser::parseGridAutoFlow):
1354 (WebCore::CSSParser::parseGridTemplateAreas):
1355 (WebCore::CSSParser::parseCounterContent):
1356 (WebCore::CSSParser::parseInsetRoundedCorners):
1357 (WebCore::CSSParser::parseBasicShapeInset):
1358 (WebCore::CSSParser::parseShapeRadius):
1359 (WebCore::CSSParser::parseBasicShapeCircle):
1360 (WebCore::CSSParser::parseBasicShapeEllipse):
1361 (WebCore::CSSParser::parseBasicShapePolygon):
1362 (WebCore::CSSParser::parseBasicShapeAndOrBox):
1363 (WebCore::CSSParser::parseShapeProperty):
1364 (WebCore::CSSParser::parseClipPath):
1365 (WebCore::CSSParser::parseBasicShape):
1366 (WebCore::CSSParser::parseFontFamily):
1367 (WebCore::CSSParser::parseColor):
1368 (WebCore::CSSParser::parseShadow):
1369 (WebCore::CSSParser::parseImageResolution):
1370 (WebCore::CSSParser::parseImageSet):
1371 (WebCore::CSSParser::parseTransform):
1372 (WebCore::CSSParser::parseTransformValue):
1373 (WebCore::CSSParser::parseBuiltinFilterArguments):
1374 (WebCore::CSSParser::parseTextIndent):
1375 (WebCore::CSSParser::createImportRule):
1376 (WebCore::CSSParser::createMediaRule):
1377 (WebCore::CSSParser::createEmptyMediaRule):
1378 (WebCore::CSSParser::createSupportsRule):
1379 (WebCore::CSSParser::popSupportsRuleData):
1380 (WebCore::CSSParser::createKeyframesRule):
1381 (WebCore::CSSParser::createStyleRule):
1382 (WebCore::CSSParser::createFontFaceRule):
1383 (WebCore::CSSParser::createPageRule):
1384 (WebCore::CSSParser::createRegionRule):
1385 (WebCore::CSSParser::createKeyframe):
1387 * css/CSSPrimitiveValue.cpp:
1388 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1389 * css/CSSPrimitiveValue.h:
1390 * css/CSSStyleDeclaration.h:
1391 * css/CSSStyleSheet.cpp:
1392 (WebCore::CSSStyleSheet::rules):
1393 (WebCore::CSSStyleSheet::cssRules):
1394 * css/CSSStyleSheet.h:
1395 * css/CSSToStyleMap.cpp:
1396 (WebCore::CSSToStyleMap::styleImage):
1397 * css/CSSToStyleMap.h:
1399 (WebCore::CSSValue::cloneForCSSOM):
1401 * css/CSSValueList.cpp:
1402 (WebCore::CSSValueList::cloneForCSSOM):
1403 * css/CSSValueList.h:
1405 (WebCore::MediaQuerySet::copy):
1406 * css/MediaQueryMatcher.cpp:
1407 (WebCore::MediaQueryMatcher::matchMedia):
1408 * css/MediaQueryMatcher.h:
1409 * css/PropertySetCSSStyleDeclaration.cpp:
1410 (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
1411 (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
1412 * css/PropertySetCSSStyleDeclaration.h:
1414 (WebCore::RGBColor::red):
1415 (WebCore::RGBColor::green):
1416 (WebCore::RGBColor::blue):
1417 (WebCore::RGBColor::alpha):
1419 * css/SVGCSSComputedStyleDeclaration.cpp:
1420 (WebCore::glyphOrientationToCSSPrimitiveValue):
1421 (WebCore::strokeDashArrayToCSSValueList):
1422 (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
1423 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1424 * css/SVGCSSParser.cpp:
1425 (WebCore::CSSParser::parseSVGStrokeDasharray):
1426 (WebCore::CSSParser::parseSVGPaint):
1427 (WebCore::CSSParser::parseSVGColor):
1428 (WebCore::CSSParser::parsePaintOrder):
1429 * css/WebKitCSSFilterValue.cpp:
1430 (WebCore::WebKitCSSFilterValue::cloneForCSSOM):
1431 * css/WebKitCSSFilterValue.h:
1432 * css/WebKitCSSMatrix.cpp:
1433 (WebCore::WebKitCSSMatrix::multiply):
1434 (WebCore::WebKitCSSMatrix::inverse):
1435 (WebCore::WebKitCSSMatrix::translate):
1436 (WebCore::WebKitCSSMatrix::scale):
1437 (WebCore::WebKitCSSMatrix::rotate):
1438 (WebCore::WebKitCSSMatrix::rotateAxisAngle):
1439 (WebCore::WebKitCSSMatrix::skewX):
1440 (WebCore::WebKitCSSMatrix::skewY):
1441 * css/WebKitCSSMatrix.h:
1442 * css/WebKitCSSTransformValue.cpp:
1443 (WebCore::WebKitCSSTransformValue::cloneForCSSOM):
1444 * css/WebKitCSSTransformValue.h:
1446 2015-08-11 Sam Weinig <sam@webkit.org>
1448 Move CountQueuingStrategy and related to files to their correct place in the Xcode project
1449 https://bugs.webkit.org/show_bug.cgi?id=147901
1451 Reviewed by Anders Carlsson.
1453 * WebCore.xcodeproj/project.pbxproj:
1455 2015-08-11 Zalan Bujtas <zalan@apple.com>
1457 Use more references in FrameView.
1458 https://bugs.webkit.org/show_bug.cgi?id=147899
1460 Reviewed by Simon Fraser.
1462 No change in functionality.
1464 * page/FrameView.cpp:
1465 (WebCore::FrameView::flushCompositingStateForThisFrame):
1466 (WebCore::FrameView::flushCompositingStateIncludingSubframes):
1467 (WebCore::FrameView::addSlowRepaintObject):
1468 (WebCore::FrameView::scrollElementToRect):
1470 * rendering/RenderObject.cpp:
1471 (WebCore::RenderObject::willBeDestroyed):
1472 * rendering/RenderScrollbarPart.cpp:
1473 (WebCore::RenderScrollbarPart::imageChanged):
1474 * testing/Internals.cpp:
1475 (WebCore::Internals::scrollElementToRect):
1477 2015-08-11 Zalan Bujtas <zalan@apple.com>
1479 Invalid FrameView::m_viewportRenderer after layout is finished.
1480 https://bugs.webkit.org/show_bug.cgi?id=147848
1481 rdar://problem/22205197
1483 Reviewed by Simon Fraser.
1485 We cache the current viewport renderer (FrameView::m_viewportRenderer) right before layout.
1486 It gets dereferenced later when layout is finished to update the overflow status.
1487 If the viewport renderer gets destroyed during layout, we end up with a dangling pointer.
1488 This patch replaces the pointer caching with type caching (none, body, document).
1490 Unable to construct a test case.
1492 2015-08-11 Brent Fulgham <bfulgham@apple.com>
1494 [Win] Switch Windows build to Visual Studio 2015
1495 https://bugs.webkit.org/show_bug.cgi?id=147887
1496 <rdar://problem/22235098>
1498 Reviewed by Alex Christensen.
1500 Update Visual Studio project file settings to use the current Visual
1501 Studio and compiler. Continue targeting binaries to run on our minimum
1502 supported configuration of Windows 7.
1504 No change in behavior, so no new tests.
1506 * WebCore.vcxproj/WebCore.vcxproj:
1507 * WebCore.vcxproj/WebCoreGenerated.vcxproj:
1508 * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
1510 2015-08-11 Said Abou-Hallawa <sabouhallawa@apple.com>
1512 feMorphology is not rendered correctly on Retina display
1513 https://bugs.webkit.org/show_bug.cgi?id=147589
1515 Reviewed by Dean Jackson.
1517 The result ImageBuffer of any FilterEffect is already scaled up for 2x
1518 display. The FEMorphology needs to fix its painting data dimension and
1519 radius by multiplying them by the filter scale factor.
1521 Test: fast/hidpi/filters-morphology.html
1523 * platform/graphics/filters/FEMorphology.cpp:
1524 (WebCore::FEMorphology::platformApplySoftware):
1526 2015-08-11 Myles C. Maxfield <mmaxfield@apple.com>
1528 [iOS] Arabic letter Yeh is drawn in LastResort
1529 https://bugs.webkit.org/show_bug.cgi?id=147862
1530 <rdar://problem/22202935>
1532 Reviewed by Darin Adler.
1534 In order to perform font fallback, we must know which fonts support which characters. We
1535 perform this check by asking each font to map a sequence of codepoints to glyphs, and
1536 any glyphs which end up with a 0 value are unsupported by the font.
1538 One of the mechanisms that we use to do this is to combine the code points into a string,
1539 and tell Core Text to lay out the string. However, this is fundamentally a different
1540 operation than the one we are trying to perform. Strings combine adjacent codepoints into
1541 grapheme clusters, and CoreText operates on these. However, we are trying to gain
1542 information regarding codepoints, not grapheme clusters.
1544 Instead of taking this string-based approach, we should try harder to use Core Text
1545 functions which operate on ordered collections of characters, rather than strings. In
1546 particular, CTFontGetGlyphsForCharacters() and CTFontGetVerticalGlyphsForCharacters()
1547 have the behavior we want where any unmapped characters end up with a 0 value glyph.
1549 Previously, we were only using the result of those functions if they were successfully
1550 able to map their entire input. However, given the fact that we can degrade gracefully
1551 in the case of a partial mapping, we shouldn't need to bail completely to the
1552 string-based approach should a partial mapping occur.
1554 At some point we should delete the string-based approach entirely. However, this path
1555 is still explicitly used for composite fonts. Fixing that use case is out of scope
1558 Test: fast/text/arabic-glyph-cache-fill-combine.html
1560 * platform/graphics/mac/GlyphPageMac.cpp:
1561 (WebCore::GlyphPage::fill):
1563 2015-08-11 Chris Dumez <cdumez@apple.com>
1565 The 'length' property on interface objects should be configurable
1566 https://bugs.webkit.org/show_bug.cgi?id=147858
1568 Reviewed by Daniel Bates.
1570 Make the 'length' property configurable on interface objects to comply
1571 with the Web IDL specification [1] and to align our behavior with
1572 Firefox 38 and Chrome 44.
1574 This behavior is also covered by the following W3C test suite:
1575 http://w3c-test.org/dom/interfaces.html
1577 [1] http://heycam.github.io/webidl/#es-interface-call (17 July 2015)
1579 Test: fast/dom/length-property-configurable.html
1581 * bindings/scripts/CodeGeneratorJS.pm:
1582 (GenerateConstructorHelperMethods):
1583 Make the 'length' property configurable on interface objects.
1585 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1586 (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1587 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1588 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1589 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1590 (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1591 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1592 (WebCore::JSTestEventConstructorConstructor::finishCreation):
1593 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1594 (WebCore::JSTestEventTargetConstructor::finishCreation):
1595 * bindings/scripts/test/JS/JSTestException.cpp:
1596 (WebCore::JSTestExceptionConstructor::finishCreation):
1597 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1598 (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1599 * bindings/scripts/test/JS/JSTestInterface.cpp:
1600 (WebCore::JSTestInterfaceConstructor::finishCreation):
1601 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1602 (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1603 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1604 (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1605 (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1606 * bindings/scripts/test/JS/JSTestNode.cpp:
1607 (WebCore::JSTestNodeConstructor::finishCreation):
1608 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1609 (WebCore::JSTestNondeterministicConstructor::finishCreation):
1610 * bindings/scripts/test/JS/JSTestObj.cpp:
1611 (WebCore::JSTestObjConstructor::finishCreation):
1612 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1613 (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1614 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1615 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1616 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1617 (WebCore::JSTestTypedefsConstructor::finishCreation):
1618 * bindings/scripts/test/JS/JSattribute.cpp:
1619 (WebCore::JSattributeConstructor::finishCreation):
1620 * bindings/scripts/test/JS/JSreadonly.cpp:
1621 (WebCore::JSreadonlyConstructor::finishCreation):
1622 Rebaseline bindings tests.
1624 2015-08-11 Per Arne Vollan <peavo@outlook.com>
1626 [Win] Popup menus have incorrect placement when device scale factor != 1.
1627 https://bugs.webkit.org/show_bug.cgi?id=147880
1629 Reviewed by Brent Fulgham.
1631 We need to take the device scaling factor into account when calculating
1632 the position and size of the popup menu.
1634 * platform/win/PopupMenuWin.cpp:
1635 (WebCore::PopupMenuWin::calculatePositionAndSize):
1637 2015-08-11 Chris Dumez <cdumez@apple.com>
1639 [WebIDL] All interface objects must have a property named "name"
1640 https://bugs.webkit.org/show_bug.cgi?id=147865
1642 Reviewed by Darin Adler.
1644 As per the Web IDL specification, all interface objects must have a
1645 property named "name" with attributes
1646 { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
1647 whose value is the identifier of the corresponding interface:
1648 http://heycam.github.io/webidl/#es-interface-call
1649 http://heycam.github.io/webidl/#named-constructors
1651 Previously, our interface objects had no such property, this patch
1652 addresses the problem.
1654 Both Firefox 38 and Chrome 44 comply with the Web IDL specification
1657 Test: fast/dom/interface-name-property.html
1659 * bindings/scripts/CodeGeneratorJS.pm:
1660 (GenerateConstructorHelperMethods):
1662 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1663 (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1664 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1665 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1666 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1667 (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1668 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1669 (WebCore::JSTestEventConstructorConstructor::finishCreation):
1670 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1671 (WebCore::JSTestEventTargetConstructor::finishCreation):
1672 * bindings/scripts/test/JS/JSTestException.cpp:
1673 (WebCore::JSTestExceptionConstructor::finishCreation):
1674 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1675 (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1676 * bindings/scripts/test/JS/JSTestInterface.cpp:
1677 (WebCore::JSTestInterfaceConstructor::finishCreation):
1678 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1679 (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1680 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1681 (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1682 (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1683 * bindings/scripts/test/JS/JSTestNode.cpp:
1684 (WebCore::JSTestNodeConstructor::finishCreation):
1685 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1686 (WebCore::JSTestNondeterministicConstructor::finishCreation):
1687 * bindings/scripts/test/JS/JSTestObj.cpp:
1688 (WebCore::JSTestObjConstructor::finishCreation):
1689 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1690 (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1691 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1692 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1693 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1694 (WebCore::JSTestTypedefsConstructor::finishCreation):
1695 * bindings/scripts/test/JS/JSattribute.cpp:
1696 (WebCore::JSattributeConstructor::finishCreation):
1697 * bindings/scripts/test/JS/JSreadonly.cpp:
1698 (WebCore::JSreadonlyConstructor::finishCreation):
1699 Rebaseline bindings tests.
1701 2015-08-11 Ting-Wei Lan <lantw44@gmail.com>
1703 Fix debug build when optimization is enabled
1704 https://bugs.webkit.org/show_bug.cgi?id=147816
1706 Reviewed by Alexey Proskuryakov.
1708 No new tests because this is only a build fix.
1710 * editing/InsertNodeBeforeCommand.cpp:
1712 2015-08-11 Chris Dumez <cdumez@apple.com>
1714 Unreviewed, rebaseline bindings tests after r188252.
1716 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1717 (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1718 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1719 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1720 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1721 (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1722 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1723 (WebCore::JSTestEventConstructorConstructor::finishCreation):
1724 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1725 (WebCore::JSTestEventTargetConstructor::finishCreation):
1726 * bindings/scripts/test/JS/JSTestException.cpp:
1727 (WebCore::JSTestExceptionConstructor::finishCreation):
1728 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1729 (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1730 * bindings/scripts/test/JS/JSTestInterface.cpp:
1731 (WebCore::JSTestInterfaceConstructor::finishCreation):
1732 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1733 (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1734 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1735 (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1736 (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1737 * bindings/scripts/test/JS/JSTestNode.cpp:
1738 (WebCore::JSTestNodeConstructor::finishCreation):
1739 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1740 (WebCore::JSTestNondeterministicConstructor::finishCreation):
1741 * bindings/scripts/test/JS/JSTestObj.cpp:
1742 (WebCore::JSTestObjConstructor::finishCreation):
1743 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1744 (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1745 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1746 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1747 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1748 (WebCore::JSTestTypedefsConstructor::finishCreation):
1749 * bindings/scripts/test/JS/JSattribute.cpp:
1750 (WebCore::JSattributeConstructor::finishCreation):
1751 * bindings/scripts/test/JS/JSreadonly.cpp:
1752 (WebCore::JSreadonlyConstructor::finishCreation):
1754 2015-08-10 Chris Dumez <cdumez@apple.com>
1756 The 'prototype' property on interface objects should not be enumerable
1757 https://bugs.webkit.org/show_bug.cgi?id=147861
1759 Reviewed by Darin Adler.
1761 1. Make the 'prototype' property not enumerable on interface object to
1762 comply with the Web IDL specification [1] and to align our behavior
1763 with Firefox 38 and Chrome 44.
1765 2. Also update the 'prototype' property on named constructors to have the
1766 following attributes:
1767 { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }
1769 Previously, all these were true in WebKit. The new behavior complies
1770 with the Web IDL specification [2] and aligns our behavior with
1771 Firefox 38. On Chrome 44, the attributes are as follows:
1772 { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false }
1774 This behavior is also covered by the following W3C test suite:
1775 http://w3c-test.org/dom/interfaces.html
1777 [1] http://heycam.github.io/webidl/#interface-object
1778 [2] http://heycam.github.io/webidl/#named-constructors
1780 Test: fast/dom/prototype-property-not-enumerable.html
1782 * bindings/scripts/CodeGeneratorJS.pm:
1783 (GenerateConstructorHelperMethods):
1785 2015-08-10 Alex Christensen <achristensen@webkit.org>
1787 Build fix after r188239.
1789 * PlatformWinCairo.cmake:
1790 MediaPlayerPrivateMediaFoundation is needed on WinCairo with video properly enabled.
1792 2015-08-10 Myles C. Maxfield <mmaxfield@apple.com>
1794 Post-review fixup after r188195
1795 https://bugs.webkit.org/show_bug.cgi?id=147806
1799 Covered by fast/text/crash-obscure-text.html.
1801 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1802 (WebCore::FontPlatformData::objectForEqualityCheck):
1804 2015-08-10 Alex Christensen <achristensen@webkit.org>
1806 Build TestWebKitAPI with CMake on Windows
1807 https://bugs.webkit.org/show_bug.cgi?id=147851
1809 Reviewed by Chris Dumez.
1811 * PlatformWin.cmake:
1812 Remove RenderThemeWin.cpp which is included in RenderingAllInOne.cpp.
1814 Include cmakeconfig.h before wtf/Platform.h like we do in JavaScriptCore's config.h to avoid warnings and redefining ENABLE_* macros.
1816 2015-08-10 Matthew Daiter <mdaiter@apple.com>
1818 HTMLMediaElement needs way to find MediaDeviceInfo
1819 https://bugs.webkit.org/show_bug.cgi?id=147842
1821 Reviewed by Jer Noble.
1823 * html/HTMLMediaElement.cpp:
1824 (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory):
1825 * html/HTMLMediaElement.h:
1827 (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory):
1828 (WebCore::Settings::mediaDeviceIdentifierStorageDirectory):
1829 * platform/graphics/MediaPlayer.h:
1830 (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory):
1832 2015-08-10 Chris Dumez <cdumez@apple.com>
1834 Simplify code for making Page-cacheability decision
1835 https://bugs.webkit.org/show_bug.cgi?id=147829
1837 Reviewed by Antti Koivisto.
1839 Simplify code for making Page-cacheability decision by merging logging
1840 code and decision making code. Having the same checks in two places was
1841 redundant and error-prone as we needed to keep them in sync.
1843 Also get rid of failure reason enum values as those have not been used
1846 * history/PageCache.cpp:
1847 (WebCore::canCacheFrame):
1848 (WebCore::canCachePage):
1849 (WebCore::PageCache::canCache):
1850 (WebCore::logPageCacheFailureDiagnosticMessage): Deleted.
1851 (WebCore::PageCache::singleton): Deleted.
1852 (WebCore::PageCache::setMaxSize): Deleted.
1853 (WebCore::PageCache::frameCount): Deleted.
1854 (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
1855 (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
1856 (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Deleted.
1857 (WebCore::PageCache::markPagesForContentsSizeChanged): Deleted.
1858 (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Deleted.
1859 (WebCore::pruningReasonToDiagnosticLoggingKey): Deleted.
1860 * page/DiagnosticLoggingKeys.cpp:
1861 (WebCore::DiagnosticLoggingKeys::isDisabledKey):
1862 (WebCore::DiagnosticLoggingKeys::redirectKey):
1863 (WebCore::DiagnosticLoggingKeys::replaceKey):
1864 (WebCore::DiagnosticLoggingKeys::sourceKey):
1865 (WebCore::DiagnosticLoggingKeys::underMemoryPressureKey):
1866 (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey): Deleted.
1867 * page/DiagnosticLoggingKeys.h:
1869 2015-08-10 Devin Rousso <drousso@apple.com>
1871 Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
1872 https://bugs.webkit.org/show_bug.cgi?id=147033
1874 Reviewed by Joseph Pecoraro.
1876 Implement systemFontFamilies for iOS.
1878 * platform/graphics/ios/FontCacheIOS.mm:
1879 (WebCore::FontCache::systemFontFamilies):
1881 2015-08-10 Devin Rousso <drousso@apple.com>
1883 Web Inspector: Invalid selectors can be applied to the stylesheet
1884 https://bugs.webkit.org/show_bug.cgi?id=147230
1886 Reviewed by Timothy Hatcher.
1888 * inspector/InspectorStyleSheet.cpp:
1889 (WebCore::isValidSelectorListString):
1890 (WebCore::InspectorStyleSheet::setRuleSelector):
1891 Now checks to see that the supplied selector is valid before trying to commit it to the rule.
1892 (WebCore::InspectorStyleSheet::addRule):
1893 (WebCore::checkStyleRuleSelector): Deleted.
1895 2015-08-10 James Craig <jcraig@apple.com>
1897 AX: Address follow-up comments in bug 145684
1898 https://bugs.webkit.org/show_bug.cgi?id=147817
1900 Reviewed by Dean Jackson.
1902 Minor cleanup and style updates requested by Dean.
1903 Updated Existing Test Expectations.
1905 * Modules/mediacontrols/mediaControlsApple.css:
1906 (video::-webkit-media-show-controls):
1907 * Modules/mediacontrols/mediaControlsiOS.css:
1908 (video::-webkit-media-show-controls):
1910 2015-08-07 Antti Koivisto <antti@apple.com>
1912 Expand network cache tests to cover memory cache behavior
1913 https://bugs.webkit.org/show_bug.cgi?id=147783
1915 Reviewed by Alexey Proskuryakov.
1917 To support testing, include memory cache as a possible source type to XHR responses.
1919 * loader/ResourceLoader.cpp:
1920 (WebCore::logResourceResponseSource):
1921 * loader/cache/CachedRawResource.cpp:
1922 (WebCore::CachedRawResource::didAddClient):
1923 * loader/cache/CachedResource.h:
1924 (WebCore::CachedResource::revalidationInProgress):
1925 * platform/network/ResourceResponseBase.h:
1926 * testing/Internals.cpp:
1927 (WebCore::Internals::xhrResponseSource):
1929 2015-08-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
1931 Compile warning (-Wsign-compare) on 32-bits at WebCore/platform/FileSystem.cpp
1932 https://bugs.webkit.org/show_bug.cgi?id=146414
1934 Reviewed by Darin Adler.
1936 No behavioral changes.
1938 * platform/FileSystem.cpp:
1939 (WebCore::MappedFileData::MappedFileData): Making use of convertSafely.
1940 * platform/posix/SharedBufferPOSIX.cpp:
1941 (WebCore::SharedBuffer::createFromReadingFile): Making use of convertSafely.
1943 2015-08-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
1945 [Streams API] ReadableStreamReader closed promise should use CachedAttribute
1946 https://bugs.webkit.org/show_bug.cgi?id=147487
1948 Reviewed by Darin Adler.
1950 Covered by existing tests.
1952 * Modules/streams/ReadableStreamReader.idl: Made closed a CachedAttribute.
1953 * bindings/js/JSReadableStreamReaderCustom.cpp:
1954 (WebCore::JSReadableStreamReader::closed): Updated according CachedAttribute specific field.
1956 2015-08-09 Hunseop Jeong <hs85.jeong@samsung.com>
1958 [EFL] Use the non-overlay scrollbar
1959 https://bugs.webkit.org/show_bug.cgi?id=147725
1961 Reviewed by Gyuyoung Kim.
1963 No new tests because there is no behavior change.
1965 * platform/efl/ScrollbarThemeEfl.cpp:
1966 (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
1967 Changed the condition of the 'usesOverlayScrollbars' to use the
1969 * platform/efl/ScrollbarThemeEfl.h:
1971 2015-08-09 Chris Dumez <cdumez@apple.com>
1973 Page cache doesn't work for pages actively using Geolocation
1974 https://bugs.webkit.org/show_bug.cgi?id=147785
1975 <rdar://problem/11147901>
1977 Reviewed by Darin Adler.
1979 Allow pages actively using Geolocation into the PageCache.
1981 Tests: fast/history/page-cache-geolocation-active-oneshot.html
1982 fast/history/page-cache-geolocation-active-watcher.html
1984 * Modules/geolocation/Geolocation.cpp:
1985 (WebCore::Geolocation::canSuspendForPageCache):
1986 (WebCore::Geolocation::suspend): Deleted.
1987 * history/PageCache.cpp:
1989 2015-08-09 Nan Wang <n_wang@apple.com>
1991 AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree
1992 https://bugs.webkit.org/show_bug.cgi?id=136415
1993 <rdar://problem/22026625>
1995 Reviewed by Chris Fleizach.
1997 Applying CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the
1998 accessibility code, which treats these as the actual rows. We can address this by diving deeper into anonymous nodes
1999 and finding the real rows and cells we want. In addition, another thing also causing malformed tables is that "grid"
2000 roles are being exposed as AXGrid instead of AXTable.
2002 Test: accessibility/mac/malformed-table.html
2004 * accessibility/AccessibilityARIAGrid.cpp:
2005 (WebCore::AccessibilityARIAGrid::addRowDescendant):
2006 * accessibility/AccessibilityTable.cpp:
2007 (WebCore::AccessibilityTable::addChildren):
2008 (WebCore::AccessibilityTable::addTableCellChild):
2009 (WebCore::AccessibilityTable::addChildrenFromSection):
2010 * accessibility/AccessibilityTable.h:
2011 * accessibility/AccessibilityTableCell.cpp:
2012 (WebCore::AccessibilityTableCell::parentTable):
2013 (WebCore::AccessibilityTableCell::rowIndexRange):
2014 * accessibility/AccessibilityTableRow.cpp:
2015 (WebCore::AccessibilityTableRow::parentTable):
2016 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2017 (createAccessibilityRoleMap):
2019 2015-08-08 Darin Adler <darin@apple.com>
2021 Remove -webkit-color-correction CSS property
2022 https://bugs.webkit.org/show_bug.cgi?id=147812
2024 Reviewed by Maciej Stachowiak.
2026 Covered by existing tests.
2028 I am doing some general cleanup of handling of color spaces in WebKit.
2029 This removes the obsolete web-visible property that allowed clients to
2030 get color correction on older Apple platforms where we chose not to do
2031 it all the time for performance reasons. Currently, it has no effect on
2032 any supported platform.
2034 Now that this property is removed, a website can detect that it's not
2035 there if it uses getComputedStyle, but I don't expect this to have
2036 significant compatibility fallout. It's harmless to continue using the
2037 property in legacy content or websites that have not been updated, since
2038 unknown property names are ignored and it had no effect before anyway.
2040 * css/CSSComputedStyleDeclaration.cpp: Removed
2041 CSSPropertyWebkitColorCorrection from the list of computed properties.
2042 (WebCore::ComputedStyleExtractor::propertyValue): Removed the
2043 CSSPropertyWebkitColorCorrection case.
2045 * css/CSSParser.cpp:
2046 (WebCore::isValidKeywordPropertyAndValue): Removed the
2047 CSSPropertyWebkitColorCorrection case.
2048 (WebCore::isKeywordPropertyID): Ditto.
2049 (WebCore::CSSParser::parseValue): Ditto.
2051 * css/CSSPrimitiveValueMappings.h:
2052 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted the overload
2053 of this that converts a ColorSpace to a CSSPrimitiveValue.
2054 (WebCore::CSSPrimitiveValue::operator ColorSpace): Deleted.
2056 * css/CSSPropertyNames.in: Removed -webkit-color-correction.
2058 * css/CSSValueKeywords.in: Removed the -webkit-color-correction section,
2059 which contained sRGB.
2061 * css/SVGCSSValueKeywords.in: Uncommented sRGB now that it's not shared
2062 with -webkit-color-correction.
2064 * rendering/style/RenderStyle.h: Removed setColorSpace and initialColorSpace.
2065 Kept colorSpace around for now, but it simply returns ColorSpaceSRGB.
2066 This prevents us from needing to touch every single call site that passes
2067 the color space in to functions in the platform graphics abstraction.
2068 We'll touch most of those call sites when we change Color to include the
2069 color space and eventually we can delete this.
2071 * rendering/style/StyleRareInheritedData.cpp: Deleted colorSpace.
2072 (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted
2073 code to initialize colorSpace and to copy colorSpace.
2074 (WebCore::StyleRareInheritedData::operator==): Deleted code to compare
2077 2015-08-09 Eric Carlson <eric.carlson@apple.com>
2079 [Mac] Always require ExternalDeviceAutoPlayCandidate flag to AirPlay automatically
2080 https://bugs.webkit.org/show_bug.cgi?id=147801
2082 Reviewed by Dean Jackson.
2084 Test: http/tests/media/video-media-document-disposition-download.html
2086 * Modules/mediasession/WebMediaSessionManager.cpp:
2087 (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't tell the last element
2088 to begin playing to the target unless the ExternalDeviceAutoPlayCandidate flag is set and
2089 it is not currently playing.
2091 2015-08-09 Myles C. Maxfield <mmaxfield@apple.com>
2093 Crash in ComplexTextController when laying out obscure text
2094 https://bugs.webkit.org/show_bug.cgi?id=147806
2095 <rdar://problem/22102378>
2097 Reviewed by Darin Adler.
2099 CTFontDescriptorCopyAttribute(fontDescriptor.get(), kCTFontReferenceURLAttribute) can return nullptr.
2101 Test: fast/text/crash-obscure-text.html
2103 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2104 (WebCore::safeCFEqual):
2105 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2107 2015-08-08 Dean Jackson <dino@apple.com>
2109 Remove the webkit prefix from CanvasRenderingContext2D imageSmoothingEnabled
2110 https://bugs.webkit.org/show_bug.cgi?id=147803
2111 <rdar://problem/22200553>
2113 Reviewed by Sam Weinig.
2115 Rename webkitImageSmoothingEnabled to imageSmoothingEnabled.
2117 Updated existing tests, and made sure that the prefixed version is
2118 identical to the standard version.
2120 * html/canvas/CanvasRenderingContext2D.cpp:
2121 (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled): Renamed from webkitImageSmoothingEnabled.
2122 (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled): Renamed from setWebkitImageSmoothingEnabled.
2123 (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): Deleted.
2124 (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): Deleted.
2125 * html/canvas/CanvasRenderingContext2D.h: Rename the methods.
2126 * html/canvas/CanvasRenderingContext2D.idl: Add the non-prefixed form, and mark is as the
2127 implementation of the prefixed form.
2129 2015-08-09 Andreas Kling <akling@apple.com>
2131 Ref-ify some functions that always succeed in constructing Documents.
2132 <https://webkit.org/b/147552>
2134 Reviewed by Sam Weinig.
2136 Update some functions involved in the construction of new Document objects
2137 to codify that they always construct objects.
2139 Bonus: DOMImplementation::createCSSStyleSheet().
2141 * dom/DOMImplementation.cpp:
2142 (WebCore::DOMImplementation::createCSSStyleSheet):
2143 (WebCore::DOMImplementation::createHTMLDocument):
2144 (WebCore::DOMImplementation::createDocument):
2145 * dom/DOMImplementation.h:
2146 * loader/DocumentWriter.cpp:
2147 (WebCore::DocumentWriter::createDocument):
2148 (WebCore::DocumentWriter::begin):
2149 * loader/DocumentWriter.h:
2150 * xml/DOMParser.cpp:
2151 (WebCore::DOMParser::parseFromString):
2153 * xml/XSLTProcessor.cpp:
2154 (WebCore::XSLTProcessor::createDocumentFromSource):
2155 * xml/XSLTProcessor.h:
2157 2015-08-08 Commit Queue <commit-queue@webkit.org>
2159 Unreviewed, rolling out r179871.
2160 https://bugs.webkit.org/show_bug.cgi?id=147810
2162 Breaks product images on http://www.apple.com/shop/buy-
2163 mac/macbook (Requested by smfr on #webkit).
2167 "Render: properly update body's background image"
2168 https://bugs.webkit.org/show_bug.cgi?id=140183
2169 http://trac.webkit.org/changeset/179871
2171 2015-08-07 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2173 Reduce uses of PassRefPtr in bindings
2174 https://bugs.webkit.org/show_bug.cgi?id=147781
2176 Reviewed by Chris Dumez.
2178 Use RefPtr when function can return null or an instance. If not, Ref is used.
2180 * bindings/gobject/GObjectNodeFilterCondition.h:
2181 * bindings/gobject/GObjectXPathNSResolver.h:
2182 * bindings/gobject/WebKitDOMNodeFilter.cpp:
2184 * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
2185 * bindings/gobject/WebKitDOMXPathNSResolver.cpp:
2187 * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h:
2188 * bindings/js/CallbackFunction.h:
2189 (WebCore::createFunctionOnlyCallback):
2190 * bindings/js/Dictionary.h:
2191 (WebCore::Dictionary::getEventListener):
2192 * bindings/js/IDBBindingUtilities.cpp:
2193 (WebCore::createIDBKeyFromValue):
2194 (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
2195 (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2196 (WebCore::scriptValueToIDBKey):
2197 * bindings/js/IDBBindingUtilities.h:
2198 * bindings/js/JSDOMBinding.h:
2199 (WebCore::toInt8Array):
2200 (WebCore::toInt16Array):
2201 (WebCore::toInt32Array):
2202 (WebCore::toUint8Array):
2203 (WebCore::toUint8ClampedArray):
2204 (WebCore::toUint16Array):
2205 (WebCore::toUint32Array):
2206 (WebCore::toFloat32Array):
2207 (WebCore::toFloat64Array):
2208 * bindings/js/JSDOMStringListCustom.cpp:
2209 (WebCore::JSDOMStringList::toWrapped):
2210 * bindings/js/JSDeviceMotionEventCustom.cpp:
2211 (WebCore::readAccelerationArgument):
2212 (WebCore::readRotationRateArgument):
2213 * bindings/js/JSErrorHandler.h:
2214 (WebCore::createJSErrorHandler):
2215 * bindings/js/JSGeolocationCustom.cpp:
2216 (WebCore::createPositionOptions):
2217 * bindings/js/JSNodeCustom.cpp:
2218 * bindings/js/JSNodeFilterCustom.cpp:
2219 (WebCore::JSNodeFilter::toWrapped):
2220 * bindings/js/ScriptController.cpp:
2221 (WebCore::ScriptController::createWorld):
2222 (WebCore::ScriptController::createRootObject):
2223 (WebCore::ScriptController::createScriptInstanceForWidget):
2224 * bindings/js/ScriptController.h:
2225 * bindings/js/ScriptControllerMac.mm:
2226 (WebCore::ScriptController::createScriptInstanceForWidget):
2227 * bindings/js/SerializedScriptValue.cpp:
2228 (WebCore::SerializedScriptValue::create):
2229 * bindings/js/SerializedScriptValue.h:
2230 * bindings/objc/DOMUIKitExtensions.mm:
2231 (-[DOMNode rangeOfContainingParagraph]):
2232 * bindings/objc/ObjCNodeFilterCondition.h:
2233 * bindings/scripts/CodeGeneratorJS.pm:
2236 2015-08-07 Myles C. Maxfield <mmaxfield@apple.com>
2238 [OS X] Remove dead code from FontCache::createFontPlatformData()
2239 https://bugs.webkit.org/show_bug.cgi?id=147804
2241 Reviewed by Zalan Bujtas.
2243 CTFontCreateForCSS() always returns the best font.
2245 No new tests because there is no behavior change.
2247 * platform/graphics/mac/FontCacheMac.mm:
2248 (WebCore::fontWithFamily):
2250 2015-08-07 Zalan Bujtas <zalan@apple.com>
2252 Move painting functions from RenderObject to RenderElement.
2253 https://bugs.webkit.org/show_bug.cgi?id=147764
2255 Reviewed by Simon Fraser.
2257 Ideally they should live in RenderBoxModelObject, but the current SVG architecture makes is difficult
2260 No change in functionality.
2262 * platform/graphics/FloatRect.h:
2263 (WebCore::FloatRect::FloatRect):
2264 * rendering/RenderBoxModelObject.cpp:
2265 (WebCore::RenderBoxModelObject::paintOneBorderSide):
2266 * rendering/RenderElement.cpp:
2267 (WebCore::RenderElement::drawLineForBoxSide):
2268 (WebCore::RenderElement::paintFocusRing):
2269 (WebCore::RenderElement::paintOutline):
2270 * rendering/RenderElement.h:
2271 * rendering/RenderInline.cpp:
2272 (WebCore::RenderInline::paintOutline):
2273 (WebCore::RenderInline::paintOutlineForLine):
2274 * rendering/RenderMultiColumnSet.cpp:
2275 (WebCore::RenderMultiColumnSet::paintColumnRules):
2276 * rendering/RenderObject.cpp:
2277 (WebCore::RenderObject::drawLineForBoxSide): Deleted.
2278 (WebCore::RenderObject::paintFocusRing): Deleted.
2279 (WebCore::RenderObject::paintOutline): Deleted.
2280 * rendering/RenderObject.h:
2281 * rendering/RenderTableCell.cpp:
2282 (WebCore::RenderTableCell::paintCollapsedBorders):
2283 * rendering/RenderTableSection.cpp:
2284 (WebCore::RenderTableSection::paintRowGroupBorder):
2285 * rendering/RenderTheme.h:
2286 (WebCore::RenderTheme::paintMenuListButtonDecorations):
2287 * rendering/RenderThemeIOS.h:
2288 * rendering/RenderThemeIOS.mm:
2289 (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2290 * rendering/RenderThemeMac.h:
2291 * rendering/RenderThemeMac.mm:
2292 (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
2294 2015-08-07 James Craig <jcraig@apple.com>
2296 REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
2297 https://bugs.webkit.org/show_bug.cgi?id=145684
2299 Reviewed by Dean Jackson.
2301 Updated Apple Video controls to add an invisible but focusable button that allows VoiceOver
2302 users (and when unblocked, keyboard users) to re-display the video controls.
2304 Test: media/video-controls-show-on-kb-or-ax-event.html
2306 * English.lproj/mediaControlsLocalizedStrings.js:
2307 * Modules/mediacontrols/mediaControlsApple.css:
2308 (audio::-webkit-media-show-controls):
2309 (video::-webkit-media-show-controls):
2310 * Modules/mediacontrols/mediaControlsApple.js:
2311 (Controller.prototype.createControls):
2312 (Controller.prototype.handleFullscreenChange):
2313 (Controller.prototype.handleShowControlsClick):
2314 (Controller.prototype.handleWrapperMouseMove):
2315 (Controller.prototype.updateForShowingControls):
2316 (Controller.prototype.showControls):
2317 (Controller.prototype.hideControls):
2318 (Controller.prototype.setNeedsUpdateForDisplayedWidth):
2319 * Modules/mediacontrols/mediaControlsiOS.css:
2320 (audio::-webkit-media-show-controls):
2321 (video::-webkit-media-show-controls):
2323 2015-08-07 Alex Christensen <achristensen@webkit.org>
2325 Build more testing binaries with CMake on Windows
2326 https://bugs.webkit.org/show_bug.cgi?id=147799
2328 Reviewed by Brent Fulgham.
2331 MockCDM.cpp needs to be part of WebCoreTestSupport, not WebCore.
2332 * PlatformWin.cmake:
2333 Added files needed for AppleWin port.
2335 2015-08-07 Anders Carlsson <andersca@apple.com>
2337 Being moving away from using SQLTransactionStateMachine in SQLTransactionBackend
2338 https://bugs.webkit.org/show_bug.cgi?id=147798
2340 Reviewed by Geoffrey Garen.
2342 This is the first step towards getting rid of the state machine so we can ultimately merge SQLTransactionBackend
2343 into SQLTransaction.
2345 Instead of having the state machine run our functions, just run them ourselves where we can. For states that need
2346 to be handled in the frontend, call SQLTransaction::requestTransitToState explicitly.
2348 * Modules/webdatabase/SQLTransactionBackend.cpp:
2349 (WebCore::SQLTransactionBackend::stateFunctionFor):
2350 (WebCore::SQLTransactionBackend::lockAcquired):
2351 (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2352 (WebCore::SQLTransactionBackend::runStatements):
2353 (WebCore::SQLTransactionBackend::runCurrentStatement):
2354 (WebCore::SQLTransactionBackend::handleCurrentStatementError):
2355 (WebCore::SQLTransactionBackend::handleTransactionError):
2356 (WebCore::SQLTransactionBackend::postflightAndCommit):
2357 (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): Deleted.
2358 (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): Deleted.
2359 (WebCore::SQLTransactionBackend::nextStateForTransactionError): Deleted.
2360 (WebCore::SQLTransactionBackend::sendToFrontendState): Deleted.
2361 * Modules/webdatabase/SQLTransactionBackend.h:
2363 2015-08-07 Filip Pizlo <fpizlo@apple.com>
2365 Lightweight locks should be adaptive
2366 https://bugs.webkit.org/show_bug.cgi?id=147545
2368 Reviewed by Geoffrey Garen.
2370 * bindings/objc/WebScriptObject.mm:
2371 (WebCore::getJSWrapper):
2372 (WebCore::addJSWrapper):
2373 (WebCore::removeJSWrapper):
2374 (WebCore::removeJSWrapperIfRetainCountOne):
2375 * platform/audio/mac/CARingBuffer.cpp:
2376 (WebCore::CARingBuffer::setCurrentFrameBounds):
2377 (WebCore::CARingBuffer::getCurrentFrameBounds):
2378 * platform/audio/mac/CARingBuffer.h:
2379 * platform/ios/wak/WAKWindow.mm:
2380 (-[WAKWindow setExposedScrollViewRect:]):
2381 (-[WAKWindow exposedScrollViewRect]):
2383 2015-08-07 Myles C. Maxfield <mmaxfield@apple.com>
2385 Post-review comments on r188146
2386 https://bugs.webkit.org/show_bug.cgi?id=147793
2388 Reviewed by Daniel Bates.
2390 No new tests because there is no behavior change.
2392 * platform/graphics/FontCache.h:
2393 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2394 (WebCore::appendTrueTypeFeature):
2395 (WebCore::appendOpenTypeFeature):
2396 (WebCore::applyFontFeatureSettings):
2397 * platform/graphics/ios/FontCacheIOS.mm:
2398 (WebCore::FontCache::getSystemFontFallbackForCharacters):
2399 (WebCore::FontCache::createFontPlatformData):
2400 * platform/graphics/mac/FontCacheMac.mm:
2401 (WebCore::fontWithFamily):
2402 (WebCore::FontCache::systemFallbackForCharacters):
2403 * platform/graphics/mac/FontCustomPlatformData.cpp:
2404 (WebCore::FontCustomPlatformData::fontPlatformData):
2405 * rendering/RenderThemeIOS.mm:
2406 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2408 2015-08-07 Myles C. Maxfield <mmaxfield@apple.com>
2410 [Cocoa] Font fallback is not language-sensitive
2411 https://bugs.webkit.org/show_bug.cgi?id=147390
2413 Reviewed by Dean Jackson.
2415 We need to make our font fallback code sensitive to locale.
2417 This patch rolls r187729 back in. However, only particular versions of iOS and OS X are
2418 performant enough to enable this language-sensitivity.
2420 This patch also applies to iOS.
2422 Test: fast/text/fallback-language-han.html
2424 * platform/graphics/mac/FontCacheMac.mm:
2425 (WebCore::lookupCTFont):
2426 (WebCore::FontCache::systemFallbackForCharacters):
2427 * platform/graphics/mac/FontCacheIOS.mm:
2428 (WebCore::FontCache::systemFallbackForCharacters):
2430 2015-08-07 Zalan Bujtas <zalan@apple.com>
2432 RenderTheme::volumeSliderOffsetFromMuteButton should take const& RenderBox.
2433 https://bugs.webkit.org/show_bug.cgi?id=147731
2435 Reviewed by Simon Fraser.
2437 No change in functionality.
2439 * rendering/RenderMediaControlElements.cpp:
2440 (WebCore::RenderMediaVolumeSliderContainer::layout):
2441 * rendering/RenderMediaControls.cpp:
2442 (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Deleted.
2443 * rendering/RenderMediaControls.h:
2444 * rendering/RenderTheme.cpp:
2445 (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
2446 * rendering/RenderTheme.h:
2448 2015-08-07 Zalan Bujtas <zalan@apple.com>
2450 Replace RenderObject::isRooted() logic with isDescendantOf().
2451 https://bugs.webkit.org/show_bug.cgi?id=147788
2453 Reviewed by Simon Fraser.
2455 And some related cleanups.
2457 No change in functionality.
2459 * page/FrameView.cpp:
2460 (WebCore::FrameView::scheduleRelayoutOfSubtree):
2461 (WebCore::FrameView::extendedBackgroundRectForPainting):
2462 * rendering/RenderBox.cpp:
2463 (WebCore::RenderBox::paintRootBoxFillLayers):
2464 * rendering/RenderElement.cpp:
2465 (WebCore::shouldRepaintForImageAnimation):
2466 * rendering/RenderObject.cpp:
2467 (WebCore::RenderObject::isDescendantOf):
2468 (WebCore::scheduleRelayoutForSubtree):
2469 (WebCore::RenderObject::repaint):
2470 (WebCore::RenderObject::repaintRectangle):
2471 (WebCore::RenderObject::repaintSlowRepaintObject):
2472 (WebCore::RenderObject::isRooted):
2473 * rendering/RenderObject.h:
2474 * rendering/RenderView.cpp:
2475 (WebCore::RenderView::unextendedBackgroundRect):
2476 (WebCore::RenderView::backgroundRect):
2477 * rendering/RenderView.h:
2479 2015-08-07 Zalan Bujtas <zalan@apple.com>
2481 Subtree layout code should use RenderElement.
2482 https://bugs.webkit.org/show_bug.cgi?id=147694
2484 Reviewed by Simon Fraser.
2486 Subtree layout will never begin at a RenderText, so tighten up
2487 the code to operate on RenderElements instead of RenderObjects.
2488 (This patch is based on webkit.org/b/126878)
2490 No change in functionality.
2492 * inspector/InspectorTimelineAgent.cpp:
2493 (WebCore::InspectorTimelineAgent::willLayout):
2494 * page/FrameView.cpp:
2495 (WebCore::FrameView::FrameView): Deleted.
2496 (WebCore::FrameView::layoutRoot): Deleted.
2498 * rendering/RenderBox.cpp:
2499 (WebCore::RenderBox::computeLogicalWidthInRegion):
2500 * rendering/RenderElement.cpp:
2501 (WebCore::RenderElement::clearLayoutRootIfNeeded):
2502 (WebCore::RenderElement::willBeDestroyed):
2503 * rendering/RenderElement.h:
2504 * rendering/RenderObject.cpp:
2505 (WebCore::RenderObject::clearLayoutRootIfNeeded): Deleted.
2506 (WebCore::RenderObject::willBeDestroyed): Deleted.
2507 * rendering/RenderObject.h:
2509 2015-08-07 Wenson Hsieh <wenson_hsieh@apple.com>
2511 Temporarily allow programmatic input assistance for adding Gmail account
2512 https://bugs.webkit.org/show_bug.cgi?id=147792
2514 Reviewed by Enrica Casucci.
2515 <rdar://problem/22126518>
2517 Temporary fix for keyboard input sliding out and immediately back in upon user interaction
2518 in the Gmail 2-factor authentication page.
2520 * platform/RuntimeApplicationChecksIOS.h:
2521 * platform/RuntimeApplicationChecksIOS.mm:
2522 (WebCore::applicationIsGmailAddAccountOnIOS): Added bundle ID for Gmail settings.
2524 2015-08-07 Andy Estes <aestes@apple.com>
2526 Crash when following a Google search link to Twitter with Limit Adult Content enabled
2527 https://bugs.webkit.org/show_bug.cgi?id=147651
2529 Reviewed by Brady Eidson.
2531 When a loaded CachedRawResource gets a new client, it synthesizes the callbacks that the new client would have
2532 received while the resource was loading. Unlike a real network load, it synthesizes these callbacks in a single
2533 run loop iteration. When DocumentLoader receives a redirect, and finds substitute data in the app cache for the
2534 redirect URL, it schedules a timer that removes DocumentLoader as a client of the CachedRawResource then
2535 synthesizes its own set of CachedRawResourceClient callbacks. But since CachedRawResource has already delivered
2536 client callbacks before the app cache timer fires, DocumentLoader unexpectedly ends up getting two sets of
2537 client callbacks and badness ensues.
2539 The fix is to let CachedRawResource detect if a redirect will trigger the client to load substitute data. If so,
2540 stop delivering client callbacks.
2542 Layout test to follow.
2544 * loader/DocumentLoader.cpp:
2545 (WebCore::DocumentLoader::syntheticRedirectReceived): If there is valid substitute data, do not continue.
2546 * loader/DocumentLoader.h:
2547 * loader/cache/CachedRawResource.cpp: Returned early if syntheticRedirectReceived() said not to continue.
2548 (WebCore::CachedRawResource::didAddClient):
2549 * loader/cache/CachedRawResourceClient.h:
2550 (WebCore::CachedRawResourceClient::syntheticRedirectReceived):
2552 2015-08-06 Dean Jackson <dino@apple.com>
2554 Shadows don't draw on fillText when using a gradient fill
2555 https://bugs.webkit.org/show_bug.cgi?id=147758
2556 <rdar://problem/20860912>
2558 Reviewed by Myles Maxfield.
2560 Since we use a mask to render a pattern or gradient
2561 into text, any shadow was being clipped out. Change
2562 this to draw the shadow before the mask + fill operation,
2563 using a technique similar to text-shadow.
2565 Test: fast/canvas/gradient-text-with-shadow.html
2567 * html/canvas/CanvasRenderingContext2D.cpp:
2568 (WebCore::CanvasRenderingContext2D::drawTextInternal): Get the current shadow
2569 style, paint the text with a transformed shadow offset so that we only
2570 see the shadow and not the text, then combine with the existing pattern/gradient
2573 2015-08-07 Myles C. Maxfield <mmaxfield@apple.com>
2575 Implement font-feature-settings
2576 https://bugs.webkit.org/show_bug.cgi?id=147722
2578 Reviewed by Simon Fraser.
2580 Fonts with features are simply modeled as new font objects. Font
2581 feature information is contained within FontDescription, and our
2582 caches are correctly sensitive to this information. Therefore,
2583 we just need to make our font lookup code honor the request to
2584 use certain features.
2586 This patch creates a file, FontCacheCoreText.cpp, which will be the
2587 new home of all shared OS X / iOS FontCache code. Over time, I will
2588 be moving more and more source into this file, until there is
2589 nothing left of FontCacheMac.mm and FontCacheIOS.mm. For now, the
2590 only function in this file is the code which applies font features.
2592 Test: css3/font-feature-settings-preinstalled-fonts.html
2594 * WebCore.xcodeproj/project.pbxproj: Add FontCacheCoreText.cpp.
2595 * platform/graphics/FontCache.h:
2596 * platform/graphics/cocoa/FontCacheCoreText.cpp: Added.
2597 (WebCore::appendTrueTypeFeature): What the name says.
2598 (WebCore::appendOpenTypeFeature): Ditto.
2599 (WebCore::applyFontFeatureSettings): Ditto.
2600 * platform/graphics/ios/FontCacheIOS.mm:
2601 (WebCore::FontCache::getSystemFontFallbackForCharacters): Call
2602 applyFontFeatureSettings().
2603 (WebCore::FontCache::createFontPlatformData): Ditto.
2604 * platform/graphics/mac/FontCacheMac.mm:
2605 (WebCore::fontWithFamily): Ditto.
2606 (WebCore::FontCache::systemFallbackForCharacters): Ditto.
2607 (WebCore::FontCache::createFontPlatformData): Ditto.
2608 * platform/graphics/mac/FontCustomPlatformData.cpp:
2609 (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
2610 * rendering/RenderThemeIOS.mm:
2611 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2614 2015-08-07 Commit Queue <commit-queue@webkit.org>
2616 Unreviewed, rolling out r187907.
2617 https://bugs.webkit.org/show_bug.cgi?id=147789
2619 taking a different approach to the fix (Requested by estes on
2624 "Crash when following a Google search link to Twitter with
2625 Limit Adult Content enabled."
2626 https://bugs.webkit.org/show_bug.cgi?id=147651
2627 http://trac.webkit.org/changeset/187907
2629 2015-08-07 Alex Christensen <achristensen@webkit.org>
2631 Fix WinCairo build after r188130.
2633 * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2634 (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2635 (WebCore::FontCustomPlatformData::fontPlatformData):
2636 I forgot the parameter name.
2638 2015-08-07 Alex Christensen <achristensen@webkit.org>
2640 Fix WinCairo build after r188130.
2642 * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2643 (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2644 (WebCore::FontCustomPlatformData::fontPlatformData):
2645 Update fontPlatformData parameters.
2647 2015-08-07 Daniel Bates <dabates@apple.com>
2649 Attempt to fix the Windows build after <http://trac.webkit.org/changeset/188130>
2650 (https://bugs.webkit.org/show_bug.cgi?id=147775)
2652 Include header FontDescription.h.
2654 * platform/graphics/win/FontCustomPlatformData.cpp:
2655 * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2657 2015-08-07 Myles C. Maxfield <mmaxfield@apple.com>
2659 Allow FontCustomPlatformData to consult with FontDescription
2660 https://bugs.webkit.org/show_bug.cgi?id=147775
2662 Reviewed by Zalan Bujtas.
2664 In order to implement font-feature-settings, web fonts need to be
2665 able to consult with the set of active font features. Rather than
2666 add yet another argument to all the functions in this flow, this
2667 patch passes around a reference to the FontDescription itself instead
2668 of copies of constituent members of it.
2670 No new tests because there is no behavior change.
2672 * css/CSSFontFaceSource.cpp:
2673 (WebCore::CSSFontFaceSource::font):
2674 * loader/cache/CachedFont.cpp:
2675 (WebCore::CachedFont::createFont):
2676 (WebCore::CachedFont::platformDataFromCustomData):
2677 * loader/cache/CachedFont.h:
2678 * loader/cache/CachedSVGFont.cpp:
2679 (WebCore::CachedSVGFont::platformDataFromCustomData):
2680 * loader/cache/CachedSVGFont.h:
2681 * platform/graphics/cairo/FontCustomPlatformData.h:
2682 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2683 (WebCore::FontCustomPlatformData::fontPlatformData):
2684 * platform/graphics/freetype/FontPlatformData.h:
2685 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2686 (WebCore::FontPlatformData::FontPlatformData):
2687 * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2688 (WebCore::Font::platformCreateScaledFont):
2689 * platform/graphics/mac/FontCustomPlatformData.cpp:
2690 (WebCore::FontCustomPlatformData::fontPlatformData):
2691 * platform/graphics/mac/FontCustomPlatformData.h:
2692 * platform/graphics/win/FontCustomPlatformData.cpp:
2693 (WebCore::FontCustomPlatformData::fontPlatformData):
2694 * platform/graphics/win/FontCustomPlatformData.h:
2696 2015-08-07 Xabier Rodriguez Calvar <calvaris@igalia.com>
2698 [Streams API] Create CountQueuingStrategy object as per spec
2699 https://bugs.webkit.org/show_bug.cgi?id=146594
2701 Reviewed by Geoffrey Garen.
2703 CountQueuingStrategy is a class part of the Streams API that can be found at
2704 https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
2705 natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
2706 the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
2707 do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
2708 property taking it from the argument.
2710 Covered by current tests
2711 (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
2712 LayoutTests/streams/reference-implementation/brand-checks.html).
2715 * DerivedSources.cpp:
2716 * DerivedSources.make:
2717 * PlatformMac.cmake:
2718 * WebCore.vcxproj/WebCore.vcxproj:
2719 * WebCore.vcxproj/WebCore.vcxproj.filters:
2720 * WebCore.xcodeproj/project.pbxproj:
2721 * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
2722 * Modules/streams/CountQueuingStrategy.h: Added.
2723 (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
2724 (WebCore::CountQueuingStrategy::size): Returns 1.
2725 * Modules/streams/CountQueuingStrategy.idl: Added.
2726 * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
2727 (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
2728 (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
2730 * bindings/js/JSDOMBinding.h:
2731 (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
2732 (WebCore::setPropertyToObject): Added to create a property into an object.
2733 * bindings/js/ReadableJSStream.cpp:
2734 (WebCore::getPropertyFromObject): Deleted.
2736 2015-08-07 Brady Eidson <beidson@apple.com>
2738 Move concrete KeyedDecoder/Encoder implementations to WebCore.
2739 https://bugs.webkit.org/show_bug.cgi?id=147757.
2741 Rubberstamped by Andy Estes.
2743 * PlatformEfl.cmake:
2744 * PlatformGTK.cmake:
2745 * WebCore.xcodeproj/project.pbxproj:
2747 * platform/KeyedCoding.h:
2748 (WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
2749 (WebCore::KeyedEncoder::KeyedEncoder): Ditto.
2751 * platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
2752 (WebCore::KeyedDecoder::decoder):
2753 (WebCore::KeyedDecoderCF::KeyedDecoderCF):
2754 (WebCore::KeyedDecoderCF::~KeyedDecoderCF):
2755 (WebCore::KeyedDecoderCF::decodeBytes):
2756 (WebCore::KeyedDecoderCF::decodeBool):
2757 (WebCore::KeyedDecoderCF::decodeUInt32):
2758 (WebCore::KeyedDecoderCF::decodeInt32):
2759 (WebCore::KeyedDecoderCF::decodeInt64):
2760 (WebCore::KeyedDecoderCF::decodeFloat):
2761 (WebCore::KeyedDecoderCF::decodeDouble):
2762 (WebCore::KeyedDecoderCF::decodeString):
2763 (WebCore::KeyedDecoderCF::beginObject):
2764 (WebCore::KeyedDecoderCF::endObject):
2765 (WebCore::KeyedDecoderCF::beginArray):
2766 (WebCore::KeyedDecoderCF::beginArrayElement):
2767 (WebCore::KeyedDecoderCF::endArrayElement):
2768 (WebCore::KeyedDecoderCF::endArray):
2769 * platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.
2771 * platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
2772 (WebCore::KeyedEncoder::encoder):
2773 (WebCore::createDictionary):
2774 (WebCore::KeyedEncoderCF::KeyedEncoderCF):
2775 (WebCore::KeyedEncoderCF::~KeyedEncoderCF):
2776 (WebCore::KeyedEncoderCF::encodeBytes):
2777 (WebCore::KeyedEncoderCF::encodeBool):
2778 (WebCore::KeyedEncoderCF::encodeUInt32):
2779 (WebCore::KeyedEncoderCF::encodeInt32):
2780 (WebCore::KeyedEncoderCF::encodeInt64):
2781 (WebCore::KeyedEncoderCF::encodeFloat):
2782 (WebCore::KeyedEncoderCF::encodeDouble):
2783 (WebCore::KeyedEncoderCF::encodeString):
2784 (WebCore::KeyedEncoderCF::beginObject):
2785 (WebCore::KeyedEncoderCF::endObject):
2786 (WebCore::KeyedEncoderCF::beginArray):
2787 (WebCore::KeyedEncoderCF::beginArrayElement):
2788 (WebCore::KeyedEncoderCF::endArrayElement):
2789 (WebCore::KeyedEncoderCF::endArray):
2790 (WebCore::KeyedEncoderCF::finishEncoding):
2791 * platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.
2793 * platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
2794 (WebCore::KeyedDecoder::decoder):
2795 (WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
2796 (WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
2797 (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
2798 (WebCore::KeyedDecoderGlib::decodeBytes):
2799 (WebCore::KeyedDecoderGlib::decodeSimpleValue):
2800 (WebCore::KeyedDecoderGlib::decodeBool):
2801 (WebCore::KeyedDecoderGlib::decodeUInt32):
2802 (WebCore::KeyedDecoderGlib::decodeInt32):
2803 (WebCore::KeyedDecoderGlib::decodeInt64):
2804 (WebCore::KeyedDecoderGlib::decodeFloat):
2805 (WebCore::KeyedDecoderGlib::decodeDouble):
2806 (WebCore::KeyedDecoderGlib::decodeString):
2807 (WebCore::KeyedDecoderGlib::beginObject):
2808 (WebCore::KeyedDecoderGlib::endObject):
2809 (WebCore::KeyedDecoderGlib::beginArray):
2810 (WebCore::KeyedDecoderGlib::beginArrayElement):
2811 (WebCore::KeyedDecoderGlib::endArrayElement):
2812 (WebCore::KeyedDecoderGlib::endArray):
2813 * platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.
2815 * platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
2816 (WebCore::KeyedEncoder::encoder):
2817 (WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
2818 (WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
2819 (WebCore::KeyedEncoderGlib::encodeBytes):
2820 (WebCore::KeyedEncoderGlib::encodeBool):
2821 (WebCore::KeyedEncoderGlib::encodeUInt32):
2822 (WebCore::KeyedEncoderGlib::encodeInt32):
2823 (WebCore::KeyedEncoderGlib::encodeInt64):
2824 (WebCore::KeyedEncoderGlib::encodeFloat):
2825 (WebCore::KeyedEncoderGlib::encodeDouble):
2826 (WebCore::KeyedEncoderGlib::encodeString):
2827 (WebCore::KeyedEncoderGlib::beginObject):
2828 (WebCore::KeyedEncoderGlib::endObject):
2829 (WebCore::KeyedEncoderGlib::beginArray):
2830 (WebCore::KeyedEncoderGlib::beginArrayElement):
2831 (WebCore::KeyedEncoderGlib::endArrayElement):
2832 (WebCore::KeyedEncoderGlib::endArray):
2833 (WebCore::KeyedEncoderGlib::finishEncoding):
2834 * platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.
2836 2015-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
2838 [GStreamer] Do not automatically show PackageKit codec installation notifications
2839 https://bugs.webkit.org/show_bug.cgi?id=135973
2841 Reviewed by Philippe Normand.
2843 Add description parameter to requestInstallMissingPlugins() that
2844 will be used by the API layer.
2846 * html/HTMLMediaElement.cpp:
2847 (WebCore::HTMLMediaElement::requestInstallMissingPlugins):
2848 * html/HTMLMediaElement.h:
2849 * page/ChromeClient.h:
2850 * platform/graphics/MediaPlayer.h:
2851 (WebCore::MediaPlayerClient::requestInstallMissingPlugins):
2852 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2853 (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2855 2015-08-07 Doug Russell <d_russell@apple.com>
2857 AX: Bug 147737 is causing test failures in Mavericks WK1
2858 https://bugs.webkit.org/show_bug.cgi?id=147763
2860 Restrict change made in 147737 to ElCapitan+ because it is causing tests
2861 to fail in Mavericks.
2863 Reviewed by Chris Fleizach.
2865 Fixes failing tests.
2867 * accessibility/AXObjectCache.cpp:
2868 (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
2870 2015-08-07 Xabier Rodriguez Calvar <calvaris@igalia.com>
2872 Create [CustomBinding] extended IDL attribute
2873 https://bugs.webkit.org/show_bug.cgi?id=146593
2875 Reviewed by Geoffrey Garen.
2877 Added the [CustomBinding] IDL extended attribute. The idea is that when using this attribute, bindings generate
2878 only the signature of the JS functions and we have to implement all the access in the Custom.cpp files, meaning
2879 accessing the implementations at our wish.
2881 Added customBindingMethod, customBindingMethodWithArgs to the generator tests.
2883 * bindings/scripts/CodeGeneratorGObject.pm:
2884 (SkipFunction): Skipped [CustomBinding] methods.
2885 * bindings/scripts/CodeGeneratorJS.pm:
2886 (GenerateHeader): Consider CustomBinding as ForwardDeclareInHeader.
2887 (GenerateImplementation): Avoid printing both header and implementation of the function.
2888 * bindings/scripts/CodeGeneratorObjC.pm:
2889 (SkipFunction): Skipped [CustomBinding] methods.
2890 * bindings/scripts/IDLAttributes.txt: Added [CustomBinding] IDL extended attribute.
2891 * bindings/scripts/test/JS/JSTestObj.cpp:
2892 * bindings/scripts/test/TestObj.idl: Added customBindingMethod, customBindingMethodWithArgs and their
2895 2015-08-06 Zan Dobersek <zdobersek@igalia.com>
2897 Source/WebCore/crypto code should pass std::function<> objects through rvalue references
2898 https://bugs.webkit.org/show_bug.cgi?id=147332
2900 Reviewed by Anders Carlsson.
2902 Pass the std::function<> callbacks through CryptoAlgorithm methods via
2903 rvlaue references. This avoids generation of unnecessary move and copy
2904 constructors for std::function<> objects that are being handled.
2906 * crypto/CryptoAlgorithm.cpp:
2907 (WebCore::CryptoAlgorithm::encrypt):
2908 (WebCore::CryptoAlgorithm::decrypt):
2909 (WebCore::CryptoAlgorithm::sign):
2910 (WebCore::CryptoAlgorithm::verify):
2911 (WebCore::CryptoAlgorithm::digest):
2912 (WebCore::CryptoAlgorithm::generateKey):
2913 (WebCore::CryptoAlgorithm::deriveKey):
2914 (WebCore::CryptoAlgorithm::deriveBits):
2915 (WebCore::CryptoAlgorithm::importKey):
2916 (WebCore::CryptoAlgorithm::encryptForWrapKey):
2917 (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
2918 * crypto/CryptoAlgorithm.h:
2919 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2920 (WebCore::CryptoAlgorithmAES_CBC::encrypt):
2921 (WebCore::CryptoAlgorithmAES_CBC::decrypt):
2922 (WebCore::CryptoAlgorithmAES_CBC::generateKey):
2923 (WebCore::CryptoAlgorithmAES_CBC::importKey):
2924 * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2925 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2926 (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
2927 (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
2928 (WebCore::CryptoAlgorithmAES_KW::generateKey):
2929 (WebCore::CryptoAlgorithmAES_KW::importKey):
2930 * crypto/algorithms/CryptoAlgorithmAES_KW.h:
2931 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2932 (WebCore::CryptoAlgorithmHMAC::sign):
2933 (WebCore::CryptoAlgorithmHMAC::verify):
2934 (WebCore::CryptoAlgorithmHMAC::generateKey):
2935 (WebCore::CryptoAlgorithmHMAC::importKey):
2936 * crypto/algorithms/CryptoAlgorithmHMAC.h:
2937 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
2938 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
2939 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
2940 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
2941 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
2942 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
2943 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2944 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
2945 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
2946 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
2947 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
2948 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
2949 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
2950 (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
2951 (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
2952 (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
2953 (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
2954 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
2955 * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
2956 (WebCore::CryptoAlgorithmSHA1::digest):
2957 * crypto/algorithms/CryptoAlgorithmSHA1.h:
2958 * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
2959 (WebCore::CryptoAlgorithmSHA224::digest):
2960 * crypto/algorithms/CryptoAlgorithmSHA224.h:
2961 * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
2962 (WebCore::CryptoAlgorithmSHA256::digest):
2963 * crypto/algorithms/CryptoAlgorithmSHA256.h:
2964 * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
2965 (WebCore::CryptoAlgorithmSHA384::digest):
2966 * crypto/algorithms/CryptoAlgorithmSHA384.h:
2967 * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
2968 (WebCore::CryptoAlgorithmSHA512::digest):
2969 * crypto/algorithms/CryptoAlgorithmSHA512.h:
2970 * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
2971 (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
2972 (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
2973 * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
2974 (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
2975 (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
2976 * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
2977 (WebCore::CryptoAlgorithmHMAC::platformSign):
2978 (WebCore::CryptoAlgorithmHMAC::platformVerify):
2979 * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
2980 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
2981 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
2982 * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
2983 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
2984 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
2985 * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
2986 (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
2987 (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
2988 * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2989 (WebCore::transformAES_CBC):
2990 (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
2991 (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
2992 * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
2993 (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
2994 (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
2995 * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2996 (WebCore::CryptoAlgorithmHMAC::platformSign):
2997 (WebCore::CryptoAlgorithmHMAC::platformVerify):
2998 * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
2999 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
3000 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
3001 * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3002 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
3003 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
3004 * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
3005 (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
3006 (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
3008 2015-08-06 Alex Christensen <achristensen@webkit.org>
3010 Fix GTK clean build after r187997
3011 https://bugs.webkit.org/show_bug.cgi?id=147723
3013 Reviewed by Gyuyoung Kim.
3016 r187997 made it so WebCoreTestSupport does not link with WebCore, which is necessary to get DumpRenderTree to link.
3017 It also made it so WebCoreTestSupport is no longer dependent on WebCore, which causes it to build at the same time.
3018 This caused problems because WebCoreTestSupport uses headers that are generated for WebCore, such as WebKitFontFamilyNames.h.
3019 Adding a dependency makes it so that WebCoreTestSupport waits until WebCore is done compiling before compiling,
3020 which is what it used to do, but it does not cause linking problems with DumpRenderTree.
3022 2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
3024 CSSSegmentedFontFace::fontRanges() does not handle duplicate fonts correctly
3025 https://bugs.webkit.org/show_bug.cgi?id=147765
3027 Reviewed by Filip Pizlo.
3029 CSSSegmentedFontFace::fontRanges() was trying to hash on FontDescriptors by
3030 picking a few specific pieces of data out of the FontDescriptor, computing
3031 a hash on it, and using that unsigned as a key in a HashMap. This has two
3032 problems: it doesn't handle equality correctly, as hash collisions cannot
3033 depend on an equality operator to dedup, and it doesn't hash on all the
3034 members of a FontDescription.
3036 Instead, this HashMap should use FontDescriptionKey, which represents a
3037 FontDescription, and is designed exactly for the purpose of being used as a
3040 No new tests because there is no behavior change (because a problem occurs
3041 when two different FontDescriptions hash to the same value, which is rare).
3043 * css/CSSSegmentedFontFace.cpp:
3044 (WebCore::CSSSegmentedFontFace::fontRanges):
3045 * css/CSSSegmentedFontFace.h:
3046 * platform/graphics/FontCache.h:
3047 (WebCore::FontDescriptionKeyHash::hash):
3048 (WebCore::FontDescriptionKeyHash::equal):
3050 2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
3052 [iOS] Remove dead code from FontCache::createFontPlatformData()
3053 https://bugs.webkit.org/show_bug.cgi?id=147762
3055 Reviewed by Andy Estes.
3057 No new tests because there is no behavior change.
3059 * platform/graphics/ios/FontCacheIOS.mm:
3060 (WebCore::FontCache::createFontPlatformData): Deleted.
3062 2015-08-06 Alex Christensen <achristensen@webkit.org>
3064 Revert part of my "build fix" in r188101.
3067 MockCDM was already conditionally added to WebCore_SOURCES, and that change causes dependency cycles when bug 147723 is fixed.
3069 2015-08-06 Alex Christensen <achristensen@webkit.org>
3071 [Win] CMake build fix after r188098.
3074 MockCDM is necessary for testing if ENCRYPTED_MEDIA_V2 is enabled.
3076 2015-08-06 Alex Christensen <achristensen@webkit.org>
3078 [Win] Enable all Windows features in CMake
3079 https://bugs.webkit.org/show_bug.cgi?id=147744
3081 Reviewed by Tim Horton.
3083 * PlatformWin.cmake:
3084 Add a file needed for enabling video.
3086 2015-08-06 Anders Carlsson <andersca@apple.com>
3088 Rename SQLStatementBackend to SQLStatement
3089 https://bugs.webkit.org/show_bug.cgi?id=147755
3091 Reviewed by Geoffrey Garen.
3094 * Modules/webdatabase/SQLStatement.h: Renamed from Source/WebCore/Modules/webdatabase/SQLStatementBackend.h.
3095 (WebCore::SQLStatement::hasStatementCallback):
3096 (WebCore::SQLStatement::hasStatementErrorCallback):
3097 * Modules/webdatabase/SQLStatementBackend.cpp: Removed.
3098 (WebCore::SQLStatementBackend::SQLStatementBackend): Deleted.
3099 (WebCore::SQLStatementBackend::~SQLStatementBackend): Deleted.
3100 (WebCore::SQLStatementBackend::sqlError): Deleted.
3101 (WebCore::SQLStatementBackend::sqlResultSet): Deleted.
3102 (WebCore::SQLStatementBackend::execute): Deleted.
3103 (WebCore::SQLStatementBackend::performCallback): Deleted.
3104 (WebCore::SQLStatementBackend::setDatabaseDeletedError): Deleted.
3105 (WebCore::SQLStatementBackend::setVersionMismatchedError): Deleted.
3106 (WebCore::SQLStatementBackend::setFailureDueToQuota): Deleted.
3107 (WebCore::SQLStatementBackend::clearFailureDueToQuota): Deleted.
3108 (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): Deleted.
3109 * Modules/webdatabase/SQLStatementBackend.h:
3110 (WebCore::SQLStatementBackend::hasStatementCallback): Deleted.
3111 (WebCore::SQLStatementBackend::hasStatementErrorCallback): Deleted.
3112 * Modules/webdatabase/SQLTransaction.cpp:
3113 (WebCore::SQLTransaction::deliverStatementCallback):
3114 (WebCore::SQLTransaction::executeSQL):
3115 * Modules/webdatabase/SQLTransactionBackend.cpp:
3116 (WebCore::SQLTransactionBackend::currentStatement):
3117 (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3118 (WebCore::SQLTransactionBackend::executeSQL):
3119 * Modules/webdatabase/SQLTransactionBackend.h:
3120 * WebCore.vcxproj/WebCore.vcxproj:
3121 * WebCore.vcxproj/WebCore.vcxproj.filters:
3122 * WebCore.xcodeproj/project.pbxproj:
3124 2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
3126 Make FontDescriptionKey sensitive to FontFeatureSettings
3127 https://bugs.webkit.org/show_bug.cgi?id=147751
3129 Reviewed by Anders Carlsson.
3131 Just like how FontDescription hashes should be sensitive to locale, they should
3132 also be sensitive to font features.
3134 This patch also fixes operator== for FontDescriptionKey, which was previously
3135 comparing hashes for equality instead of the underlying data. Comparing hashes
3136 for equality is useless inside hashmaps.
3138 This is in preparation for implementing font-feature-settings.
3140 No new tests because there is no behavior change.
3142 * platform/graphics/FontCache.cpp:
3143 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3144 (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
3145 (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
3146 * platform/graphics/FontCache.h:
3147 (WebCore::FontDescriptionKey::FontDescriptionKey):
3148 (WebCore::FontDescriptionKey::operator==):
3149 (WebCore::FontDescriptionKey::operator!=):
3150 (WebCore::FontDescriptionKey::isHashTableDeletedValue):
3151 (WebCore::FontDescriptionKey::computeHash):
3152 * platform/graphics/FontFeatureSettings.cpp:
3153 (WebCore::FontFeature::hash):
3154 (WebCore::FontFeatureSettings::hash):
3155 * platform/graphics/FontFeatureSettings.h:
3157 2015-08-06 Anders Carlsson <andersca@apple.com>
3159 Merge SQLStatement into SQLStatementBackend
3160 https://bugs.webkit.org/show_bug.cgi?id=147754
3162 Reviewed by Geoffrey Garen.
3165 * Modules/webdatabase/Database.h:
3166 * Modules/webdatabase/SQLStatement.cpp: Removed.
3167 (WebCore::SQLStatement::SQLStatement): Deleted.
3168 (WebCore::SQLStatement::setBackend): Deleted.
3169 (WebCore::SQLStatement::hasCallback): Deleted.
3170 (WebCore::SQLStatement::hasErrorCallback): Deleted.
3171 (WebCore::SQLStatement::performCallback): Deleted.
3172 * Modules/webdatabase/SQLStatement.h: Removed.
3173 * Modules/webdatabase/SQLStatementBackend.cpp:
3174 (WebCore::SQLStatementBackend::SQLStatementBackend):
3175 (WebCore::SQLStatementBackend::performCallback):
3176 (WebCore::SQLStatementBackend::frontend): Deleted.
3177 * Modules/webdatabase/SQLStatementBackend.h:
3178 (WebCore::SQLStatementBackend::hasStatementCallback):
3179 (WebCore::SQLStatementBackend::hasStatementErrorCallback):
3180 * Modules/webdatabase/SQLTransaction.cpp:
3181 (WebCore::SQLTransaction::deliverStatementCallback):
3182 (WebCore::SQLTransaction::executeSQL):
3183 * Modules/webdatabase/SQLTransaction.h:
3184 * Modules/webdatabase/SQLTransactionBackend.cpp:
3185 (WebCore::SQLTransactionBackend::currentStatement):
3186 (WebCore::SQLTransactionBackend::executeSQL):
3187 * Modules/webdatabase/SQLTransactionBackend.h:
3188 * WebCore.vcxproj/WebCore.vcxproj:
3189 * WebCore.vcxproj/WebCore.vcxproj.filters:
3190 * WebCore.xcodeproj/project.pbxproj:
3191 * bindings/js/JSSQLTransactionCustom.cpp:
3193 2015-08-06 Chris Dumez <cdumez@apple.com>
3195 Toggle GPS state based on page visibility to save battery
3196 https://bugs.webkit.org/show_bug.cgi?id=147685
3198 Reviewed by Benjamin Poulain.
3200 Toggle GPS state based on page visibility to save battery. Previously,
3201 if the site you were viewing was watching your position and you
3202 switched tab, the GPS would stay on. This was bad for battery life.
3204 Tests: fast/dom/Geolocation/startUpdatingOnlyWhenPageVisible.html
3205 fast/dom/Geolocation/stopUpdatingForHiddenPage.html
3207 * Modules/geolocation/GeolocationController.cpp:
3208 (WebCore::GeolocationController::addObserver):
3209 (WebCore::GeolocationController::viewStateDidChange):
3211 2015-08-06 Anders Carlsson <andersca@apple.com>
3213 SQLStatementBackend doesn't need to be refcounted
3214 https://bugs.webkit.org/show_bug.cgi?id=147748
3216 Reviewed by Geoffrey Garen.
3218 There's no shared ownership of SQLStatementBackend so we can just use std::unique_ptr.
3220 * Modules/webdatabase/SQLStatementBackend.cpp:
3221 (WebCore::SQLStatementBackend::create): Deleted.
3222 * Modules/webdatabase/SQLStatementBackend.h:
3223 * Modules/webdatabase/SQLTransactionBackend.cpp:
3224 (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3225 (WebCore::SQLTransactionBackend::executeSQL):
3226 * Modules/webdatabase/SQLTransactionBackend.h:
3228 2015-08-06 Eric Carlson <eric.carlson@apple.com>
3230 Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
3231 https://bugs.webkit.org/show_bug.cgi?id=147734
3232 rdar://problem/22028179
3234 Reviewed by Andy Estes.
3236 Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
3239 (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox
3240 instead of setting sandbox flags directly.
3241 (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special
3243 (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags
3244 according to document type.
3247 2015-08-06 Anders Carlsson <andersca@apple.com>
3249 Get rid of DatabaseBackendBase
3250 https://bugs.webkit.org/show_bug.cgi?id=147733
3252 Reviewed by Geoffrey Garen.
3255 * Modules/webdatabase/Database.cpp:
3256 (WebCore::Database::Database):
3257 (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
3258 (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
3259 * Modules/webdatabase/Database.h:
3260 * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
3261 (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
3262 (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
3263 * Modules/webdatabase/DatabaseBackendBase.h: Removed.
3264 * Modules/webdatabase/DatabaseManager.cpp:
3265 * Modules/webdatabase/DatabaseManager.h:
3266 * Modules/webdatabase/DatabaseTracker.cpp:
3267 * WebCore.vcxproj/WebCore.vcxproj:
3268 * WebCore.vcxproj/WebCore.vcxproj.filters:
3269 * WebCore.xcodeproj/project.pbxproj:
3271 2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
3273 Add comment to CSSParserString
3274 https://bugs.webkit.org/show_bug.cgi?id=147724
3276 Reviewed by Dean Jackson.
3278 No new tests because there is no behavior change.
3280 * css/CSSParserValues.h:
3282 2015-08-06 Myles C. Maxfield <mmaxfield@apple.com>
3284 Font feature settings comparisons are order-dependent and case-dependent
3285 https://bugs.webkit.org/show_bug.cgi?id=147719
3287 Reviewed by Benjamin Poulain.
3289 We should make our settings vector order-independent and case-independent.
3291 Test: css3/font-feature-settings-parsing.html
3293 * css/CSSParser.cpp:
3294 (WebCore::CSSParser::parseFontFeatureTag):
3295 * css/StyleBuilderConverter.h:
3296 (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
3297 * platform/graphics/FontFeatureSettings.cpp:
3298 (WebCore::FontFeature::FontFeature):
3299 (WebCore::FontFeature::operator==):
3300 (WebCore::FontFeatureSettings::FontFeatureSettings):
3301 * platform/graphics/FontFeatureSettings.h:
3302 (WebCore::FontFeature::FontFeature):
3303 (WebCore::FontFeature::operator==):
3304 (WebCore::FontFeature::operator<):
3305 (WebCore::FontFeatureSettings::insert):
3306 (WebCore::FontFeatureSettings::FontFeatureSettings):
3307 (WebCore::FontFeatureSettings::append): Deleted.
3309 2015-08-06 Doug Russell <d_russell@apple.com>
3311 AX: AXLoadComplete that comes before AX API access won't fire
3312 https://bugs.webkit.org/show_bug.cgi?id=147737
3314 Reviewed by Chris Fleizach.
3316 Treat setEnhancedUserInterfaceAccessibility() as AX API access and if true,
3317 enableAccessibility().
3319 Test: accessibility/mac/loaded-notification.html
3321 * accessibility/AXObjectCache.cpp:
3322 (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
3324 2015-08-06 Eric Carlson <eric.carlson@apple.com>
3326 Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
3327 https://bugs.webkit.org/show_bug.cgi?id=147734
3328 rdar://problem/22028179
3330 Reviewed by Dean Jackson.
3332 Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
3335 (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Return
3336 early if the Document is a MediaDocument.
3338 2015-08-06 Matt Rajca <mrajca@apple.com>
3340 Media Session: remove media elements from the ID <-> element map on destruction
3341 https://bugs.webkit.org/show_bug.cgi?id=147707
3343 Reviewed by Eric Carlson.
3345 * html/HTMLMediaElement.cpp:
3346 (WebCore::HTMLMediaElement::~HTMLMediaElement):
3348 2015-08-06 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3350 [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
3351 https://bugs.webkit.org/show_bug.cgi?id=147621
3353 Reviewed by Csaba Osztrogonác.
3355 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Remove setTileSize() and tileSize().
3356 (WebCore::TiledBackingStore::setTileSize):
3358 2015-08-06 Anders Carlsson <andersca@apple.com>
3360 Move the last remnants of DatabaseBackendBase to Database
3361 https://bugs.webkit.org/show_bug.cgi?id=147730
3363 Reviewed by Tim Horton.
3365 * Modules/webdatabase/Database.cpp:
3366 (WebCore::Database::Database):
3367 (WebCore::Database::performOpenAndVerify):
3368 * Modules/webdatabase/Database.h:
3369 * Modules/webdatabase/DatabaseBackendBase.cpp:
3370 (WebCore::DatabaseBackendBase::DatabaseBackendBase):
3371 * Modules/webdatabase/DatabaseBackendBase.h:
3372 (WebCore::DatabaseBackendBase::databaseContext): Deleted.
3373 (WebCore::DatabaseBackendBase::setFrontend): Deleted.
3375 2015-08-06 Alex Christensen <achristensen@webkit.org>
3377 Fix build without ENABLE(VIDEO) after r188030.
3380 * html/HTMLMediaElement.cpp:
3381 * html/HTMLMediaElement.h:
3382 Move definition of HTMLMediaElementInvalidID to Document.h so it can be used outside of ENABLE(VIDEO) macros.
3384 2015-08-04 Matt Rajca <mrajca@apple.com>
3386 Media Session: push paused state to the media session focus manager instead of polling
3387 https://bugs.webkit.org/show_bug.cgi?id=147633
3389 Reviewed by Simon Fraser.
3392 (WebCore::Document::updateIsPlayingMedia): If a valid source element ID is passed in, set the 'IsSourcePlaying'
3395 * html/HTMLMediaElement.cpp:
3396 (WebCore::HTMLMediaElement::elementWithID):
3397 (WebCore::HTMLMediaElement::setMuted): Pass along the element ID.
3398 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
3399 (WebCore::HTMLMediaElement::setPlaying): Ditto.
3400 * html/HTMLMediaElement.h:
3401 * page/ChromeClient.h:
3402 * page/MediaProducer.h:
3404 (WebCore::Page::updateIsPlayingMedia): Pass along the source element ID.
3405 (WebCore::Page::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
3408 2015-08-05 Myles C. Maxfield <mmaxfield@apple.com>
3410 CharacterFallbackMapKey should be locale-specific
3411 https://bugs.webkit.org/show_bug.cgi?id=147532
3413 Reviewed by Dean Jackson.
3415 This is in preparation for locale-specific font fallback.
3417 No new tests because there is no behavior change.
3419 * platform/graphics/Font.cpp:
3420 (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
3421 (WebCore::CharacterFallbackMapKey::operator==):
3422 (WebCore::CharacterFallbackMapKeyHash::hash):
3423 (WebCore::Font::systemFallbackFontForCharacter):
3425 2015-08-05 Myles C. Maxfield <mmaxfield@apple.com>
3427 Expand CharacterFallbackMapKey to a struct
3428 https://bugs.webkit.org/show_bug.cgi?id=147530
3430 Reviewed by Dean Jackson.
3432 This is in prepraration for making this struct locale-specific.
3434 No new tests because there is no behavior change.
3436 * platform/graphics/Font.cpp:
3437 (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
3438 (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
3439 (WebCore::CharacterFallbackMapKey::operator==):
3440 (WebCore::CharacterFallbackMapKeyHash::hash):
3441 (WebCore::CharacterFallbackMapKeyHash::equal):
3442 (WebCore::Font::systemFallbackFontForCharacter):
3444 2015-08-05 Chris Dumez <cdumez@apple.com>
3446 Crash when removing children of a MathMLSelectElement
3447 https://bugs.webkit.org/show_bug.cgi?id=147704
3448 <rdar://problem/21940321>
3450 Reviewed by Ryosuke Niwa.
3452 When MathMLSelectElement::childrenChanged() is called after its
3453 children have been removed, MathMLSelectElement calls
3454 updateSelectedChild() which accesses m_selectedChild. However,
3455 in this case, m_selectedChild is the previously selected child
3456 and it may be destroyed as this point if it was removed. To avoid
3457 this problem, MathMLSelectElement now keep a strong ref to the
3458 currently selected element.
3460 Test: mathml/maction-removeChild.html
3462 * mathml/MathMLSelectElement.h:
3464 2015-08-05 Myles C. Maxfield <mmaxfield@apple.com>
3466 Migrate FontCascade.cpp to NeverDestroyed
3467 https://bugs.webkit.org/show_bug.cgi?id=147533
3469 Reviewed by Simon Fraser.
3471 No new tests because there is no behavior change.