Use references and more const in SVGPathUtilities
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-10  Simon Fraser  <simon.fraser@apple.com>
2
3         Use references and more const in SVGPathUtilities
4         https://bugs.webkit.org/show_bug.cgi?id=150007
5
6         Reviewed by Zalan Bujtas.
7         
8         SVGPathUtilities had lots of pointers whose non-nullness was asserted,
9         little const, and was very trigger-happy with stack allocations. Clean
10         that all up.
11
12         * svg/SVGAnimatedPath.cpp:
13         (WebCore::SVGAnimatedPathAnimator::constructFromString):
14         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
15         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
16         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
17         * svg/SVGPathByteStream.h:
18         (WebCore::SVGPathByteStream::begin):
19         (WebCore::SVGPathByteStream::end):
20         (WebCore::SVGPathByteStream::append):
21         * svg/SVGPathByteStreamSource.cpp:
22         (WebCore::SVGPathByteStreamSource::SVGPathByteStreamSource):
23         * svg/SVGPathByteStreamSource.h:
24         * svg/SVGPathElement.cpp:
25         (WebCore::SVGPathElement::getTotalLength):
26         (WebCore::SVGPathElement::getPointAtLength):
27         (WebCore::SVGPathElement::getPathSegAtLength):
28         (WebCore::SVGPathElement::parseAttribute):
29         (WebCore::SVGPathElement::svgAttributeChanged):
30         (WebCore::SVGPathElement::pathByteStream):
31         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
32         (WebCore::SVGPathElement::pathSegListChanged):
33         (WebCore::SVGPathElement::SVGPathElement): Deleted.
34         * svg/SVGPathElement.h:
35         * svg/SVGPathUtilities.cpp:
36         (WebCore::globalSVGPathBuilder):
37         (WebCore::globalSVGPathSegListBuilder):
38         (WebCore::globalSVGPathByteStreamBuilder):
39         (WebCore::globalSVGPathStringBuilder):
40         (WebCore::globalSVGPathTraversalStateBuilder):
41         (WebCore::globalSVGPathParser):
42         (WebCore::globalSVGPathBlender):
43         (WebCore::buildPathFromString):
44         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
45         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
46         (WebCore::buildPathFromByteStream):
47         (WebCore::buildSVGPathSegListFromByteStream):
48         (WebCore::buildStringFromByteStream):
49         (WebCore::buildStringFromSVGPathSegList):
50         (WebCore::buildSVGPathByteStreamFromString):
51         (WebCore::buildAnimatedSVGPathByteStream):
52         (WebCore::addToSVGPathByteStream):
53         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
54         (WebCore::getTotalLengthOfSVGPathByteStream):
55         (WebCore::getPointAtLengthOfSVGPathByteStream):
56         (WebCore::buildStringFromPath):
57         * svg/SVGPathUtilities.h:
58         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
59         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
60
61 2015-10-10  Andreas Kling  <akling@apple.com>
62
63         Reduce pointless malloc traffic in ElementRuleCollector.
64         <https://webkit.org/b/150003>
65
66         Reviewed by Antti Koivisto.
67
68         Don't use a unique_ptr for the m_matchedRules vector in ElementRuleCollector.
69         This is one of our heaviest sources of transient allocations, with ~88000
70         malloc/free pairs on loading theverge.com.
71
72         * css/ElementRuleCollector.cpp:
73         (WebCore::ElementRuleCollector::addMatchedRule):
74         (WebCore::ElementRuleCollector::clearMatchedRules):
75         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
76         (WebCore::ElementRuleCollector::sortMatchedRules):
77         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
78         * css/ElementRuleCollector.h:
79         (WebCore::ElementRuleCollector::hasMatchedRules):
80
81 2015-10-10  Dan Bernstein  <mitz@apple.com>
82
83         [iOS] Remove unnecessary iOS version checks
84         https://bugs.webkit.org/show_bug.cgi?id=150002
85
86         Reviewed by Alexey Proskuryakov.
87
88         * loader/cache/CachedFont.cpp:
89         (WebCore::CachedFont::ensureCustomFontData):
90         * loader/cocoa/DiskCacheMonitorCocoa.h:
91         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
92         * page/mac/SettingsMac.mm:
93         (WebCore::sansSerifTraditionalHanFontFamily):
94         (WebCore::sansSerifSimplifiedHanFontFamily):
95         * platform/graphics/cocoa/FontCacheCoreText.cpp:
96         (WebCore::appendOpenTypeFeature):
97         * platform/graphics/ios/FontCacheIOS.mm:
98         (WebCore::getSystemFontFallbackForCharacters):
99         (WebCore::platformLookupFallbackFont):
100         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
101         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
102         * platform/ios/WebCoreSystemInterfaceIOS.h:
103         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
104         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
105         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
106         * platform/ios/wak/WAKWindow.mm:
107         (+[WAKWindow hasLandscapeOrientation]):
108         (-[WAKWindow hostLayer]):
109         * platform/network/cf/CookieJarCFNet.cpp:
110         (WebCore::copyCookiesForURLWithFirstPartyURL):
111         (WebCore::createCookies):
112         * platform/network/mac/CertificateInfoMac.mm:
113         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
114         * platform/spi/cf/CFNetworkSPI.h:
115         * platform/spi/cocoa/AVKitSPI.h:
116         * platform/spi/cocoa/CoreTextSPI.h:
117         * platform/spi/cocoa/NEFilterSourceSPI.h:
118         * platform/spi/cocoa/QuartzCoreSPI.h:
119         * platform/spi/cocoa/SecuritySPI.h:
120         * platform/spi/ios/LaunchServicesSPI.h:
121         * platform/spi/mac/AVFoundationSPI.h:
122         * platform/text/TextBreakIterator.cpp:
123         * platform/text/TextFlags.h:
124         * platform/text/ios/LocalizedDateCache.mm:
125         (WebCore::LocalizedDateCache::calculateMaximumWidth):
126         * platform/text/mac/LocaleMac.mm:
127         (WebCore::LocaleMac::LocaleMac):
128         * rendering/RenderThemeIOS.mm:
129         (WebCore::RenderThemeIOS::cachedSystemFontDescription):
130         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
131         * svg/SVGToOTFFontConversion.cpp:
132         (WebCore::SVGToOTFFontConverter::appendKERNTable):
133         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
134
135 2015-10-10  Antti Koivisto  <antti@apple.com>
136
137         Rewrite HTMLDetailsElement using HTMLSlotElement
138         https://bugs.webkit.org/show_bug.cgi?id=149698
139
140         Reviewed by Andreas Kling.
141
142         Use the modern Shadow DOM to implement <details> element. After this the legacy InsertionPoint and
143         related code can be removed.
144
145         Based on a patch by Ryosuke.
146
147         * dom/Element.cpp:
148         (WebCore::Element::childrenChanged):
149         * dom/EventDispatcher.cpp:
150         (WebCore::EventPath::EventPath):
151         * dom/ShadowRoot.cpp:
152         (WebCore::ShadowRoot::ShadowRoot):
153         (WebCore::ShadowRoot::~ShadowRoot):
154         (WebCore::ShadowRoot::removeAllEventListeners):
155         (WebCore::ShadowRoot::findAssignedSlot):
156         (WebCore::ShadowRoot::addSlotElementByName):
157         (WebCore::ShadowRoot::removeSlotElementByName):
158         (WebCore::ShadowRoot::invalidateSlotAssignments):
159         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments):
160         (WebCore::ShadowRoot::assignedNodesForSlot):
161         * dom/ShadowRoot.h:
162         (WebCore::ShadowRoot::create):
163         (WebCore::ShadowRoot::distributor):
164         (WebCore::ShadowRoot::isOrphan):
165         * dom/SlotAssignment.cpp:
166         (WebCore::slotNameFromAttributeValue):
167
168             Rename for clarity.
169
170         (WebCore::slotNameFromSlotAttribute):
171
172             SlotAssignment can now be specialized by providing function that maps from node to slot name.
173             This is the default function that gets the name from the slot attribute.
174
175         (WebCore::SlotAssignment::SlotAssignment):
176         (WebCore::SlotAssignment::findAssignedSlot):
177
178             Use the name mapping function.
179             Ensure that the slots are assigned.
180
181         (WebCore::SlotAssignment::addSlotElementByName):
182         (WebCore::SlotAssignment::removeSlotElementByName):
183         (WebCore::SlotAssignment::assignedNodesForSlot):
184         (WebCore::SlotAssignment::invalidate):
185         (WebCore::SlotAssignment::invalidateDefaultSlot):
186         (WebCore::SlotAssignment::resolveAllSlotElements):
187         (WebCore::SlotAssignment::assignSlots):
188
189             Use the name mapping function.
190
191         (WebCore::SlotAssignment::assignToSlot):
192
193             Factor into function.
194
195         (WebCore::treatNullAsEmpty): Deleted.
196         * dom/SlotAssignment.h:
197         (WebCore::SlotAssignment::~SlotAssignment):
198         (WebCore::SlotAssignment::defaultSlotName):
199
200             Add static getter for emptyAtom for clarity.
201
202         (WebCore::SlotAssignment::SlotAssignment): Deleted.
203         * html/HTMLDetailsElement.cpp:
204         (WebCore::summarySlotName):
205         (WebCore::slotNameFunction):
206
207             Slot name function for <details>. It assigns the first <summary> child to the summary slot and others
208             to the default content slot if the element is open.
209
210         (WebCore::HTMLDetailsElement::create):
211         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
212         (WebCore::HTMLDetailsElement::isActiveSummary):
213         (WebCore::HTMLDetailsElement::parseAttribute):
214         (WebCore::HTMLDetailsElement::toggleOpen):
215         (WebCore::summaryQuerySelector): Deleted.
216         (WebCore::DetailsContentElement::create): Deleted.
217         (WebCore::DetailsSummaryElement::create): Deleted.
218         (WebCore::HTMLDetailsElement::findMainSummary): Deleted.
219         (WebCore::HTMLDetailsElement::childShouldCreateRenderer): Deleted.
220         * html/HTMLDetailsElement.h:
221         * html/HTMLSummaryElement.cpp:
222         (WebCore::HTMLSummaryElement::create):
223         (WebCore::HTMLSummaryElement::createElementRenderer):
224         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
225         (WebCore::HTMLSummaryElement::detailsElement):
226         (WebCore::HTMLSummaryElement::isActiveSummary):
227         (WebCore::isClickableControl):
228         (WebCore::HTMLSummaryElement::supportsFocus):
229         (WebCore::HTMLSummaryElement::defaultEventHandler):
230         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
231         (WebCore::SummaryContentElement::create): Deleted.
232         (WebCore::HTMLSummaryElement::childShouldCreateRenderer): Deleted.
233         (WebCore::HTMLSummaryElement::isMainSummary): Deleted.
234         * html/HTMLSummaryElement.h:
235         * html/shadow/DetailsMarkerControl.cpp:
236         (WebCore::DetailsMarkerControl::rendererIsNeeded):
237         * style/RenderTreePosition.cpp:
238         (WebCore::RenderTreePosition::computeNextSibling):
239
240             Skip the verification assert for shadow host children. Getting this right requires
241             better shadow-aware traversal code.
242
243         * style/StyleResolveTree.cpp:
244         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
245         (WebCore::Style::attachChildren):
246         (WebCore::Style::attachShadowRoot):
247         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
248         (WebCore::Style::attachSlotAssignees):
249         (WebCore::Style::attachRenderTree):
250         (WebCore::Style::detachChildren):
251         (WebCore::Style::detachShadowRoot):
252         (WebCore::Style::detachSlotAssignees):
253         (WebCore::Style::detachRenderTree):
254         (WebCore::Style::resolveChildren):
255         (WebCore::Style::resolveSlotAssignees):
256         (WebCore::Style::resolveTree):
257         (WebCore::Style::attachDistributedChildren): Deleted.
258         (WebCore::Style::detachDistributedChildren): Deleted.
259
260             Remove InsertionPoint related code paths.
261
262 2015-10-10  Andreas Kling  <akling@apple.com>
263
264         SerializedScriptValue should use a compact encoding for 8-bit strings.
265         <https://webkit.org/b/149934>
266
267         Reviewed by Antti Koivisto.
268
269         We were encoding known 8-bit strings in a 16-bit format when serializing script values.
270
271         Extend the format to support 8-bit strings. The 8-bittiness is encoded in the highest bit
272         of the string length. This is possible while supporting all older formats due to string
273         lengths >= 0x7FFFFFFF being disallowed.
274
275         This patch knocks ~1 MB off of theverge.com, where some ad or tracker or whatever likes to
276         do a ton of postMessage() business.
277
278         * bindings/js/SerializedScriptValue.cpp:
279         (WebCore::CurrentVersion): Bump the serialization format version. Also updated the grammar
280         comment to describe the new format. Artistic license applied in description of bitfield.
281
282         (WebCore::writeLittleEndianUInt16): Deleted.
283
284         (WebCore::CloneSerializer::serialize):
285         (WebCore::CloneSerializer::write):
286         (WebCore::CloneDeserializer::deserializeString):
287         (WebCore::CloneDeserializer::readString):
288         (WebCore::CloneDeserializer::readStringData): Support 8-bit strings. I kept the string
289         length limit at UINT_MAX/sizeof(UChar) since the highest bit of the length is no longer
290         available. Besides, it seems flimsy to support longer strings if they happen to have all
291         8-bit characters.
292
293 2015-10-10  Dan Bernstein  <mitz@apple.com>
294
295         [iOS] Remove project support for iOS 8
296         https://bugs.webkit.org/show_bug.cgi?id=149993
297
298         Reviewed by Alexey Proskuryakov.
299
300         * Configurations/WebCore.xcconfig:
301         * Configurations/WebCoreTestSupport.xcconfig:
302
303 2015-10-09  Zalan Bujtas  <zalan@apple.com>
304
305         Check if start and end positions are still valid after updating them through VisibleSelection.
306         https://bugs.webkit.org/show_bug.cgi?id=149982
307
308         Reviewed by Ryosuke Niwa.
309
310         This patch is required to be able to clean up anonymous tables structure.
311         In certain edge cases, start/end positions could become nullptr after various text splitting
312         operations. 
313
314         Covered by editing/execCommand/crash-137961.html
315
316         * editing/ApplyStyleCommand.cpp:
317         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
318         (WebCore::ApplyStyleCommand::applyInlineStyle):
319
320 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
321
322         Rename RenderObject::isRoot() to isDocumentElementRenderer()
323         https://bugs.webkit.org/show_bug.cgi?id=149976
324
325         Reviewed by Zalan Bujtas.
326
327         RenderObject::isRoot() was confusingly named, because it returns true for
328         the document element's renderer, not for the actual root (the RenderView).
329         In this way it mismatched RenderLayer::isRootLayer(), which returned true
330         for the RenderView's layer.
331         
332         Rename it to the more accurate isDocumentElementRenderer().
333
334         * dom/Node.cpp:
335         (WebCore::Node::renderRect):
336         * page/ios/FrameIOS.mm:
337         (WebCore::Frame::renderRectForPoint):
338         * rendering/RenderBlock.cpp:
339         (WebCore::RenderBlock::paint):
340         (WebCore::RenderBlock::isSelectionRoot):
341         (WebCore::RenderBlock::selectionGaps):
342         * rendering/RenderBlockFlow.cpp:
343         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
344         (WebCore::RenderBlockFlow::layoutBlock):
345         (WebCore::RenderBlockFlow::requiresColumns):
346         * rendering/RenderBox.cpp:
347         (WebCore::RenderBox::styleWillChange):
348         (WebCore::RenderBox::styleDidChange):
349         (WebCore::RenderBox::updateFromStyle):
350         (WebCore::RenderBox::paintBackground):
351         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
352         (WebCore::RenderBox::repaintLayerRectsForImage):
353         (WebCore::RenderBox::computeLogicalHeight):
354         (WebCore::RenderBox::computePercentageLogicalHeight):
355         (WebCore::RenderBox::createsNewFormattingContext):
356         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
357         * rendering/RenderBox.h:
358         (WebCore::RenderBox::stretchesToViewport):
359         * rendering/RenderBoxModelObject.cpp:
360         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
361         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
362         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
363         * rendering/RenderBoxModelObject.h:
364         * rendering/RenderDeprecatedFlexibleBox.cpp:
365         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
366         * rendering/RenderElement.cpp:
367         (WebCore::RenderElement::styleWillChange):
368         (WebCore::RenderElement::rendererForRootBackground):
369         (WebCore::shouldRepaintForImageAnimation):
370         * rendering/RenderElement.h:
371         * rendering/RenderFlexibleBox.cpp:
372         (WebCore::RenderFlexibleBox::layoutBlock):
373         * rendering/RenderGrid.cpp:
374         (WebCore::RenderGrid::layoutBlock):
375         * rendering/RenderLayer.cpp:
376         (WebCore::shouldSuppressPaintingLayer):
377         (WebCore::paintForFixedRootBackground):
378         (WebCore::RenderLayer::paintLayerContents):
379         (WebCore::RenderLayer::calculateClipRects):
380         * rendering/RenderLayer.h:
381         * rendering/RenderLayerBacking.cpp:
382         (WebCore::RenderLayerBacking::rendererBackgroundColor):
383         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
384         * rendering/RenderLayerModelObject.cpp:
385         (WebCore::RenderLayerModelObject::styleDidChange):
386         * rendering/RenderObject.cpp:
387         (WebCore::RenderObject::repaintSlowRepaintObject):
388         (WebCore::RenderObject::offsetParent):
389         * rendering/RenderObject.h:
390         (WebCore::RenderObject::isDocumentElementRenderer):
391         (WebCore::RenderObject::isRoot): Deleted.
392         * rendering/RenderTable.cpp:
393         (WebCore::RenderTable::paint):
394         * rendering/svg/RenderSVGRoot.cpp:
395         (WebCore::RenderSVGRoot::layout):
396         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
397         * rendering/svg/SVGRenderSupport.cpp:
398         (WebCore::SVGRenderSupport::isOverflowHidden):
399
400 2015-10-09  Nan Wang  <n_wang@apple.com>
401
402         AX: ARIA 1.1 implement aria-colcount, aria-colindex, aria-colspan, aria-rowcount, aria-rowindex and aria-rowspan
403         https://bugs.webkit.org/show_bug.cgi?id=148967
404
405         Reviewed by Chris Fleizach.
406
407         Added support for ARIA 1.1 table/grid related attributes. Created new attributes for mac, so
408         VoiceOver can pick up the information and speak accordingly.
409
410         Test: accessibility/mac/aria-table-attributes.html
411
412         * accessibility/AccessibilityARIAGridCell.cpp:
413         (WebCore::AccessibilityARIAGridCell::AccessibilityARIAGridCell):
414         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
415         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
416         (WebCore::AccessibilityARIAGridCell::parentRowGroup):
417         * accessibility/AccessibilityARIAGridCell.h:
418         * accessibility/AccessibilityObject.cpp:
419         (WebCore::initializeRoleMap):
420         * accessibility/AccessibilityObject.h:
421         * accessibility/AccessibilityTable.cpp:
422         (WebCore::AccessibilityTable::title):
423         (WebCore::AccessibilityTable::ariaColumnCount):
424         (WebCore::AccessibilityTable::ariaRowCount):
425         * accessibility/AccessibilityTable.h:
426         * accessibility/AccessibilityTableCell.cpp:
427         (WebCore::AccessibilityTableCell::AccessibilityTableCell):
428         (WebCore::AccessibilityTableCell::titleUIElement):
429         (WebCore::AccessibilityTableCell::ariaColumnIndex):
430         (WebCore::AccessibilityTableCell::ariaRowIndex):
431         (WebCore::AccessibilityTableCell::ariaColumnSpan):
432         (WebCore::AccessibilityTableCell::ariaRowSpan):
433         * accessibility/AccessibilityTableCell.h:
434         (WebCore::AccessibilityTableCell::setARIAColIndexFromRow):
435         * accessibility/AccessibilityTableRow.cpp:
436         (WebCore::AccessibilityTableRow::headerObject):
437         (WebCore::AccessibilityTableRow::addChildren):
438         (WebCore::AccessibilityTableRow::ariaColumnIndex):
439         (WebCore::AccessibilityTableRow::ariaRowIndex):
440         * accessibility/AccessibilityTableRow.h:
441         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
442         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
443         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
444         * html/HTMLAttributeNames.in:
445
446 2015-10-09  Anders Carlsson  <andersca@apple.com>
447
448         Remove hack that allowed plug-ins to always take over certain image formats
449         https://bugs.webkit.org/show_bug.cgi?id=149972
450
451         Reviewed by Tim Horton.
452
453         This hack was added 8 years ago to allow a certain plug-in to show multi-page TIFF images on uspto.gov. 
454         We now support said TIFFs natively, and the plug-in has been discontinued so it's safe to get rid of this.
455
456         * loader/SubframeLoader.cpp:
457         (WebCore::SubframeLoader::shouldUsePlugin): Deleted.
458
459 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
460
461         Garbage texture data with composited table row
462         https://bugs.webkit.org/show_bug.cgi?id=148984
463
464         Reviewed by Zalan Bujtas.
465         
466         Don't pretend to know if the layer for a table header, section or cell is
467         opaque, since table painting is special.
468
469         Test: compositing/contents-opaque/table-parts.html
470
471         * rendering/RenderLayer.cpp:
472         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
473
474 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
475
476         Garbage pixels on enphaseenergy.com site
477         https://bugs.webkit.org/show_bug.cgi?id=149915
478         rdar://problem/22976184
479
480         Reviewed by Darin Adler.
481         
482         When the <html> gets a composited RenderLayer, and we ask whether its background
483         is opaque, return false, since the document element's background propagates
484         to the root, and is painted by the RenderView.
485         
486         Also improve the compositing logging to indicate when fore- and background layers
487         are present.
488
489         Test: compositing/contents-opaque/negative-z-before-html.html
490
491         * rendering/RenderLayerBacking.cpp:
492         (WebCore::RenderLayerBacking::updateGeometry):
493         * rendering/RenderLayerCompositor.cpp:
494         (WebCore::RenderLayerCompositor::logLayerInfo):
495
496 2015-10-09  Antoine Quint  <graouts@apple.com>
497
498         Dynamic background color changes do not update until a layout is forced
499         https://bugs.webkit.org/show_bug.cgi?id=131623
500
501         Compute correct repaint rect for decorated RenderSVGRoots.
502
503         The current implementation of clippedOverflowRectForRepaint() uses the
504         generic repaint-rect calculations in SVGRenderSupport. Those in turn make
505         use of repaintRectInLocalCoordinates(), which for RenderSVGRoot is the
506         union of the painted children (w/ some expansion). If there're no children,
507         or they do not fill the entire content box, then a repaint would not
508         repaint the correct parts.
509         Fix by calculating the union of the border-box and the SVG content
510         when the SVG root is decorated (has background/border/etc.)
511
512         Adapted from a Chromium patch by fs@opera.com
513         https://src.chromium.org/viewvc/blink?revision=170890&view=revision
514
515         Reviewed by Darin Adler.
516
517         Tests: svg/repaint/add-background-property-on-root.html
518                svg/repaint/add-border-property-on-root.html
519                svg/repaint/add-outline-property-on-root.html
520                svg/repaint/change-background-color.html
521                svg/repaint/remove-background-property-on-root.html
522                svg/repaint/remove-border-property-on-root.html
523                svg/repaint/remove-outline-property-on-root.html
524
525         * rendering/svg/RenderSVGRoot.cpp:
526         (WebCore::RenderSVGRoot::layout):
527         (WebCore::RenderSVGRoot::styleDidChange):
528         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
529
530 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
531
532         [iOS WK2] Fix assertion in ViewportConfiguration::setDefaultConfiguration seen in testing
533         https://bugs.webkit.org/show_bug.cgi?id=149959
534
535         Reviewed by Tim Horton.
536
537         When loading tests which set a flexible viewport, ViewportConfiguration::setDefaultConfiguration()
538         is called first with testingParameters() and then with webpageParameters(). This
539         would trigger the assertion that m_defaultConfiguration.initialScaleIsSet but
540         the new initial scale is zero.
541         
542         The assertion seems wrong anyway; it's consulting m_defaultConfiguration.initialScaleIsSet
543         but defaultConfiguration.initialScale, so fix it to test defaultConfiguration.initialScaleIsSet.
544
545         * page/ViewportConfiguration.cpp:
546         (WebCore::ViewportConfiguration::setDefaultConfiguration):
547
548 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
549
550         Fix the !ENABLE(STREAM_API) build after r190794
551         https://bugs.webkit.org/show_bug.cgi?id=149955
552
553         Reviewed by Darin Adler.
554
555         * bindings/js/WebCoreJSBuiltinInternals.h:
556         (WebCore::JSBuiltinInternalFunctions::visit):
557         (WebCore::JSBuiltinInternalFunctions::init):
558
559 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
560
561         Fix the binding generator after r190785
562         https://bugs.webkit.org/show_bug.cgi?id=149956
563
564         Reviewed by Darin Adler.
565
566         * bindings/scripts/CodeGeneratorJS.pm:
567         (GenerateConstructorHelperMethods):
568         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
569         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
570         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
571         (WebCore::JSTestEventConstructorConstructor::getConstructData):
572         * bindings/scripts/test/JS/JSTestInterface.cpp:
573         (WebCore::JSTestInterfaceConstructor::getConstructData):
574         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
575         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
576         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
577         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
578         * bindings/scripts/test/JS/JSTestNode.cpp:
579         (WebCore::JSTestNodeConstructor::getConstructData):
580         * bindings/scripts/test/JS/JSTestObj.cpp:
581         (WebCore::JSTestObjConstructor::getConstructData):
582         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
583         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
584         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
585         (WebCore::JSTestTypedefsConstructor::getConstructData):
586
587 2015-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
588
589         Backgrounds bleed out of natively rendered text fields
590         https://bugs.webkit.org/show_bug.cgi?id=149843
591         <rdar://problem/22896977>
592
593         Reviewed by Darin Adler.
594
595         When natively rendering a text field with a background on Mac, the background bleeds out
596         of the text field's border when the graphics context is scaled (as a result of a retina
597         display or zoom/scale effects). This is because when we render the text field in bezeled
598         style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame,
599         which renders a text field that is slightly smaller than the frame. To adjust for this, we
600         inflate the paint rect.
601
602         Test: fast/forms/hidpi-textfield-background-bleeding.html
603
604         * rendering/RenderThemeMac.mm:
605         (WebCore::RenderThemeMac::paintTextField):
606
607 2015-10-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
608
609         Refactor WebCore JS builtins to prepare for automatic generation
610         https://bugs.webkit.org/show_bug.cgi?id=149751
611
612         Reviewed by Darin Adler.
613
614         Adding annotations to JS files to know whether they should be under a compilation flag and
615         whether they are JS internals or JS tied to WebIDL.
616         If a file is said as JS internals, all function names should be exported automatically.
617         Added WebCoreJSBuiltins.h to simplify handling of builtins in JSVMClientData.
618         Added WebCoreJSInternals.h to simplify handling of builtin private function in JSDOMWindowBase.
619         Renamed WebCoreJSClientData to JSVMClientData.
620
621         Covered by existing tests.
622
623         * CMakeLists.txt:
624         * Modules/streams/ByteLengthQueuingStrategy.js:
625         * Modules/streams/CountQueuingStrategy.js:
626         * Modules/streams/ReadableStream.js:
627         * Modules/streams/ReadableStreamController.js:
628         * Modules/streams/ReadableStreamInternals.js:
629         * Modules/streams/ReadableStreamReader.js:
630         * WebCore.order:
631         * WebCore.xcodeproj/project.pbxproj:
632         * bindings/js/DOMWrapperWorld.cpp:
633         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
634         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
635         (WebCore::normalWorld):
636         * bindings/js/JSDOMWindowBase.cpp:
637         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
638         (WebCore::JSDOMWindowBase::finishCreation):
639         (WebCore::JSDOMWindowBase::visitChildren):
640         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
641         (WebCore::JSDOMWindowBase::destroy): Deleted.
642         * bindings/js/JSDOMWindowBase.h:
643         * bindings/js/ScriptController.cpp:
644         (WebCore::ScriptController::getAllWorlds):
645         * bindings/js/SerializedScriptValue.cpp:
646         (WebCore::SerializedScriptValue::transferArrayBuffers):
647         * bindings/js/WebCoreJSBuiltinInternals.h: Added.
648         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
649         (WebCore::JSBuiltinInternalFunctions::readableStreamInternals):
650         (WebCore::JSBuiltinInternalFunctions::visit):
651         (WebCore::JSBuiltinInternalFunctions::init):
652         * bindings/js/WebCoreJSBuiltins.cpp:
653         * bindings/js/WebCoreJSBuiltins.h: Added.
654         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
655         (WebCore::JSBuiltinFunctions::byteLengthQueuingStrategyBuiltins):
656         (WebCore::JSBuiltinFunctions::countQueuingStrategyBuiltins):
657         (WebCore::JSBuiltinFunctions::readableStreamBuiltins):
658         (WebCore::JSBuiltinFunctions::readableStreamControllerBuiltins):
659         (WebCore::JSBuiltinFunctions::readableStreamInternalsBuiltins):
660         (WebCore::JSBuiltinFunctions::readableStreamReaderBuiltins):
661         * bindings/js/WebCoreJSClientData.h:
662         (WebCore::JSVMClientData::JSVMClientData):
663         (WebCore::JSVMClientData::~JSVMClientData):
664         (WebCore::JSVMClientData::builtinFunctions):
665         (WebCore::initNormalWorldClientData):
666         (WebCore::JSVMClientData::normalWorld): Deleted.
667         (WebCore::JSVMClientData::getAllWorlds): Deleted.
668
669 2015-10-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
670
671         Rationalize JSXXConstructor class definition
672         https://bugs.webkit.org/show_bug.cgi?id=149923
673
674         Reviewed by Darin Adler.
675
676         Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
677         as long as JSXX is constructable from JavaScript.
678
679         Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
680         It is now generated and directly calls the custom constructor function.
681
682         getConstructData was declared conditionally with #if in case of ConstructorConditional.
683         The #if are now within getConstructData body.
684
685         Covered by binding tests.
686
687         * bindings/scripts/CodeGeneratorJS.pm:
688         (GenerateConstructorDeclaration):
689         (GenerateOverloadedConstructorDefinition):
690         (GenerateConstructorDefinition):
691         (GenerateConstructorHelperMethods):
692         (GenerateConstructorDefinitions):.
693         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
694         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
695         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
696         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.
697         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
698         (WebCore::JSTestEventConstructorConstructor::construct):
699         (WebCore::JSTestEventConstructorConstructor::getConstructData):
700         * bindings/scripts/test/JS/JSTestInterface.cpp:
701         (WebCore::JSTestInterfaceConstructor::construct):
702         (WebCore::JSTestInterfaceConstructor::getConstructData):
703         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
704         (WebCore::JSTestJSBuiltinConstructorConstructor::construct):
705         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
706         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
707         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
708         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
709         * bindings/scripts/test/JS/JSTestNode.cpp:
710         (WebCore::JSTestNodeConstructor::construct):
711         (WebCore::JSTestNodeConstructor::getConstructData):
712         * bindings/scripts/test/JS/JSTestObj.cpp:
713         (WebCore::JSTestObjConstructor::construct):
714         (WebCore::JSTestObjConstructor::getConstructData):
715         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
716         (WebCore::constructJSTestOverloadedConstructors1):
717         (WebCore::constructJSTestOverloadedConstructors2):
718         (WebCore::constructJSTestOverloadedConstructors3):
719         (WebCore::constructJSTestOverloadedConstructors4):
720         (WebCore::constructJSTestOverloadedConstructors5):
721         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
722         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
723         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
724         (WebCore::JSTestTypedefsConstructor::construct):
725         (WebCore::JSTestTypedefsConstructor::getConstructData):
726
727 2015-10-07  Sergio Villar Senin  <svillar@igalia.com>
728
729         [css-grid] Include freeSpace in GridSizingData struct
730         https://bugs.webkit.org/show_bug.cgi?id=149876
731
732         Reviewed by Darin Adler.
733
734         During the layout process we keep the free space for rows and
735         columns in two variables that are passed to a few methods
736         along with the GridSizingData struct. Those two variables
737         should clearly be part of GridSizingData as they're temporary
738         values used just for the sake of the layout.
739
740         No new tests required as this is just a refactoring.
741
742         * rendering/RenderGrid.cpp:
743         (WebCore::RenderGrid::GridSizingData::GridSizingData):
744         (WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
745         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
746         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
747         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
748         (WebCore::RenderGrid::layoutGridItems):
749         (WebCore::RenderGrid::populateGridPositions):
750         (WebCore::contentDistributionOffset):
751         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
752         * rendering/RenderGrid.h:
753
754 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
755
756         [css-grid] Remove unneeded calls to compute(Content)LogicalWidth(Height)
757         https://bugs.webkit.org/show_bug.cgi?id=149926
758
759         Reviewed by Darin Adler.
760
761         In order to resolve a Length to a LayoutUnit we need to
762         provide a maximum value so that i.e. percentages are correctly
763         computed. That maximum value was computeLogicalWidth() for
764         columns and computeContentLogicalHeight() for rows. We were
765         calling it for every single track with a definite size instead
766         of computing it once and reusing it multiple times.
767
768         This brings some nice performance improvements:
769         - 2.9%  in /Layout/fixed-grid-lots-of-data
770         - 2.95% in /Layout/fixed-grid-lots-of-stretched-data
771
772         No new tests required as there is no change in functionality.
773
774         * rendering/RenderGrid.cpp:
775         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
776         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
777         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
778         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
779         * rendering/RenderGrid.h:
780
781 2015-10-08  Chris Dumez  <cdumez@apple.com>
782
783         Unreviewed, build fix for ENABLE(MEDIA_SESSION) after r190030.
784
785         * dom/Document.cpp:
786         (WebCore::Document::updateIsPlayingMedia):
787
788 2015-10-08  Chris Dumez  <cdumez@apple.com>
789
790         Unreviewed, build fixes for ENABLE(MEDIA_SESSION) after r190030.
791
792         * Modules/mediasession/HTMLMediaElementMediaSession.cpp:
793         (WebCore::HTMLMediaElementMediaSession::session):
794         * Modules/mediasession/HTMLMediaElementMediaSession.h:
795         * Modules/mediasession/MediaSession.cpp:
796         (WebCore::MediaSession::controls):
797         * Modules/mediasession/MediaSession.h:
798
799 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
800
801         Gracefully handle XMLDocumentParser being detached by mutation events.
802         https://bugs.webkit.org/show_bug.cgi?id=149485
803         <rdar://problem/22811489>
804
805         This is a merge of Blink change 200026,
806         https://codereview.chromium.org/1267283002
807
808         Reviewed by Darin Adler.
809
810         Test: fast/parser/xhtml-dom-character-data-modified-crash.html
811
812         * xml/parser/XMLDocumentParser.cpp:
813         (WebCore::XMLDocumentParser::createLeafTextNode):
814         Renamed from enterText() to make it more descriptive. 
815
816         (WebCore::XMLDocumentParser::updateLeafTextNode):
817         Renamed from exitText to firm up this stage.
818
819         (WebCore::XMLDocumentParser::end):
820         Gracefully handle stopped states.
821
822         (WebCore::XMLDocumentParser::enterText): Deleted.
823         (WebCore::XMLDocumentParser::exitText): Deleted.
824
825         * xml/parser/XMLDocumentParser.h:
826         Rename enterText to createLeafTextNode.
827         Rename exitText to updateLeafTextNode.
828
829         * xml/parser/XMLDocumentParserLibxml2.cpp:
830         (WebCore::XMLDocumentParser::startElementNs):
831         (WebCore::XMLDocumentParser::endElementNs):
832         (WebCore::XMLDocumentParser::characters):
833         (WebCore::XMLDocumentParser::processingInstruction):
834         (WebCore::XMLDocumentParser::cdataBlock):
835         (WebCore::XMLDocumentParser::comment):
836         (WebCore::XMLDocumentParser::endDocument):
837         Rename function calls and firm up updateLeafTextNode stage accordingly.
838
839 2015-10-08  Chris Dumez  <cdumez@apple.com>
840
841         data: URLs should not be preloaded
842         https://bugs.webkit.org/show_bug.cgi?id=149829
843
844         Reviewed by Darin Adler.
845
846         Fix review comments after r190605:
847         Use protocolIs() instead of String::startsWith().
848
849         * html/parser/HTMLPreloadScanner.cpp:
850         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
851
852 2015-10-08  Chris Dumez  <cdumez@apple.com>
853
854         Revert r187626 (and r188025) as it caused a PLT regression
855         https://bugs.webkit.org/show_bug.cgi?id=149898
856         <rdar://problem/22657123>
857
858         Reviewed by Myles Maxfield.
859
860         * css/CSSPropertyNames.in:
861         * css/StyleBuilderCustom.h:
862         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
863         * platform/graphics/Font.cpp:
864         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
865         (WebCore::CharacterFallbackMapKey::operator==):
866         (WebCore::CharacterFallbackMapKeyHash::hash):
867         (WebCore::Font::systemFallbackFontForCharacter):
868         * platform/graphics/FontCache.h:
869         (WebCore::FontDescriptionKey::operator==):
870         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
871         (WebCore::FontDescriptionKey::computeHash): Deleted.
872         * platform/graphics/FontDescription.cpp:
873         (WebCore::FontDescription::FontDescription):
874         (WebCore::FontDescription::traitsMask): Deleted.
875         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
876         * platform/graphics/FontDescription.h:
877         (WebCore::FontDescription::setScript):
878         (WebCore::FontDescription::operator==):
879         (WebCore::FontDescription::setFeatureSettings): Deleted.
880         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
881         * platform/graphics/cocoa/FontCacheCoreText.cpp:
882         (WebCore::FontCache::systemFallbackForCharacters):
883         * rendering/style/RenderStyle.cpp:
884         (WebCore::RenderStyle::changeRequiresLayout):
885         * rendering/style/RenderStyle.h:
886         * rendering/style/StyleRareInheritedData.cpp:
887         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
888         (WebCore::StyleRareInheritedData::operator==):
889         * rendering/style/StyleRareInheritedData.h:
890         * style/StyleResolveForDocument.cpp:
891         (WebCore::Style::resolveForDocument):
892
893 2015-10-08  Andreas Kling  <akling@apple.com>
894
895         Generated frame tree names should be kept reasonably long.
896         <https://webkit.org/b/149874>
897
898         Reviewed by Darin Adler.
899
900         Some clumsy advertising script is going around assigning JavaScript source code
901         to the "name" attribute of iframes. This is causing WebKit to generate way too huge
902         names for anonymous descendants of such iframes.
903
904         Previously, the generated name of an anonymous subframe would be its slash-separated
905         path from the root frame, with the "name" attribute of each ancestor between the
906         slashes, or "<!--frame${index in parent}-->" for anonymous ancestors.
907
908         These ad scripts are often over 100kB in size, with multiple subframes, so we'd end
909         up with frame names looking like this:
910
911         "<!--framePath //<MONSTER BLOB OF JAVASCRIPT FROM HELL>/<!--frame0--><!--frame0-->-->"
912
913         While this is worth fixing for the memory usage alone, we've been making it way
914         worse by also using these paths when recording the back/forward history parts of
915         WebKit session state.
916
917         This patch makes generated paths always use index-in-parent as the "directory name"
918         for ancestors of anonymous subframes. The above example path will now instead be:
919
920         "<!--framePath //<!--frame0-->/<!--frame0-->/<!--frame0-->-->"
921
922         Test: fast/frames/long-names-in-nested-subframes.html
923
924         * page/FrameTree.cpp:
925         (WebCore::FrameTree::indexInParent):
926         (WebCore::FrameTree::uniqueChildName):
927         * page/FrameTree.h:
928
929 2015-10-08  Commit Queue  <commit-queue@webkit.org>
930
931         Unreviewed, rolling out r190701.
932         https://bugs.webkit.org/show_bug.cgi?id=149937
933
934         "It did not help, will try a full roll out instead" (Requested
935         by cdumez on #webkit).
936
937         Reverted changeset:
938
939         "Partial revert of r187626 as it caused a PLT regression"
940         https://bugs.webkit.org/show_bug.cgi?id=149898
941         http://trac.webkit.org/changeset/190701
942
943 2015-10-08  Zalan Bujtas  <zalan@apple.com>
944
945         Fallback to the RenderView when repaint container is null.
946         https://bugs.webkit.org/show_bug.cgi?id=149903
947
948         Reviewed by Simon Fraser.
949
950         Reduces code complexity at the calling sites.
951
952         No change in functionality.
953
954         * rendering/RenderObject.cpp:
955         (WebCore::RenderObject::repaintUsingContainer):
956         (WebCore::RenderObject::repaint):
957         (WebCore::RenderObject::repaintRectangle):
958
959 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
960
961         Add NULL check for renderBox::layer() on applying zoom level change
962         https://bugs.webkit.org/show_bug.cgi?id=149302
963         <rdar://problem/22747292>
964
965         Reviewed by Darin Adler.
966
967         Test: fast/css/zoom-on-nested-scroll-crash.html
968
969         This is a merge of Blink r158238:
970         https://chromiumcodereview.appspot.com/23526081
971
972         * rendering/RenderBox.cpp:
973         (WebCore::RenderBox::styleDidChange):
974
975 2015-10-08  Brady Eidson  <beidson@apple.com>
976
977         Update Inspector to only work with Legacy IDB (for now).
978         https://bugs.webkit.org/show_bug.cgi?id=149928.
979
980         Reviewed by Tim Horton.
981
982         * Modules/indexeddb/IDBAny.h:
983         (WebCore::IDBAny::isLegacy):
984         
985         * Modules/indexeddb/legacy/LegacyAny.h:
986         * inspector/InspectorIndexedDBAgent.cpp:
987
988 2015-10-08  Antti Koivisto  <antti@apple.com>
989
990         CrashTracer: [USER] com.apple.WebKit.WebContent at …Core::SelectorChecker::checkScrollbarPseudoClass const + 217
991         https://bugs.webkit.org/show_bug.cgi?id=149921
992         rdar://problem/22731359
993
994         Reviewed by Andreas Kling.
995
996         Test: svg/css/use-window-inactive-crash.html
997
998         * css/SelectorCheckerTestFunctions.h:
999         (WebCore::isWindowInactive):
1000
1001             Null check page.
1002
1003 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1004
1005         Format string issues in LegacyRequest.cpp
1006         https://bugs.webkit.org/show_bug.cgi?id=149866
1007
1008         Reviewed by Csaba Osztrogonác.
1009
1010         Cast enums to ints before printing them to placate GCC's -Wformat.
1011
1012         * Modules/indexeddb/legacy/LegacyRequest.cpp:
1013         (WebCore::LegacyRequest::dispatchEvent):
1014         (WebCore::LegacyRequest::enqueueEvent):
1015
1016 2015-10-08  Commit Queue  <commit-queue@webkit.org>
1017
1018         Unreviewed, rolling out r190716.
1019         https://bugs.webkit.org/show_bug.cgi?id=149924
1020
1021         broke mac build from time to time (Requested by youenn on
1022         #webkit).
1023
1024         Reverted changeset:
1025
1026         "Automate WebCore JS builtins generation and build system"
1027         https://bugs.webkit.org/show_bug.cgi?id=149751
1028         http://trac.webkit.org/changeset/190716
1029
1030 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
1031
1032         [css-grid] Percentages of indefinite sizes to be resolved as auto
1033         https://bugs.webkit.org/show_bug.cgi?id=149810
1034
1035         Reviewed by Darin Adler.
1036
1037         Specs mention that percentages in grid track sizes must be
1038         resolved as 'auto' if the grid container has an indefinite
1039         size in the corresponding axis.
1040
1041         The 'auto' keyword used to be resolved as
1042         minmax(min-content,max-content) but since r189911 it's
1043         resolved as minmax(auto,auto). Updated the implementation so
1044         we properly resolve those percentages.
1045
1046         No new tests as the behavior does not change at all. That's
1047         because 'auto' as min-track sizing function is the same as
1048         min-content (unless we have a specified value for
1049         min-{width|height}, but those cases were already handled in the
1050         code), and as a max sizing function is works as max-content.
1051
1052         * rendering/RenderGrid.cpp:
1053         (WebCore::RenderGrid::gridTrackSize):
1054
1055 2015-10-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1056
1057         Automate WebCore JS builtins generation and build system
1058         https://bugs.webkit.org/show_bug.cgi?id=149751
1059
1060         Reviewed by Darin Adler.
1061
1062         Adding annotations to JS files to know whether they should be under a compilation flag and
1063         whether they are JS internals or JS tied to WebIDL.
1064         If a file is said as JS internals, all function names are exported automatically.
1065         Added auto generation of WebCoreJSBuiltins.cpp
1066         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
1067         WebCoreJSClientData as wrapper for builtins.
1068         Added auto generation of WebCoreJSBuiltinInternals.h which contain a wrapper around all private functions, used by
1069         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
1070         Renamed WebCoreJSClientData to JSVMClientData.
1071
1072         The remaining manual part for private functions is the pairing between private identifiers and
1073         the private JS functions within JSDOMWindowBase::finishCreation.
1074
1075         Covered by existing tests.
1076
1077         * CMakeLists.txt:
1078         * DerivedSources.make:
1079         * Modules/streams/ByteLengthQueuingStrategy.js:
1080         * Modules/streams/CountQueuingStrategy.js:
1081         * Modules/streams/ReadableStream.js:
1082         * Modules/streams/ReadableStreamInternals.js:
1083         * WebCore.order:
1084         * WebCore.vcxproj/WebCore.vcxproj:
1085         * WebCore.xcodeproj/project.pbxproj:
1086         * bindings/js/DOMWrapperWorld.cpp:
1087         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1088         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1089         (WebCore::normalWorld):
1090         * bindings/js/JSDOMWindowBase.cpp:
1091         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1092         (WebCore::JSDOMWindowBase::finishCreation):
1093         (WebCore::JSDOMWindowBase::visitChildren):
1094         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1095         * bindings/js/JSDOMWindowBase.h:
1096         * bindings/js/ScriptController.cpp:
1097         (WebCore::ScriptController::getAllWorlds):
1098         * bindings/js/SerializedScriptValue.cpp:
1099         (WebCore::SerializedScriptValue::transferArrayBuffers):
1100         * bindings/js/WebCoreJSClientData.h:
1101         (WebCore::JSClientData::JSClientData):
1102         (WebCore::JSClientData::~JSClientData):
1103         (WebCore::JSClientData::builtinFunctions):
1104         (WebCore::initNormalWorldClientData):
1105         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
1106         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
1107         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
1108         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
1109         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
1110         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
1111         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
1112         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
1113         * generate-js-builtins-allinone: Added.
1114         (retrieveGenerationParameters):
1115         (retrieveFilesWithParameters):
1116         (retrieveFilesWithParameters.FileInput):
1117         (writeConditional):
1118         (JSBuiltinFunctions):
1119         (Private):
1120         (JSBuiltinInternalFunctions):
1121         (copytempfile):
1122
1123 2015-10-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1124
1125         Binding generated JS constructors should use GlobalObject references
1126         https://bugs.webkit.org/show_bug.cgi?id=149872
1127
1128         Reviewed by Darin Adler.
1129
1130         Updated binding generator to generate JS DOM constructors code with JSDOMGlobalOBject references.
1131         Updated WebCore JS binding layer accordingly.
1132
1133         Covered by updated binding tests.
1134
1135         * bindings/js/DOMConstructorWithDocument.h:
1136         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
1137         (WebCore::DOMConstructorWithDocument::finishCreation):
1138         * bindings/js/JSDOMBinding.cpp:
1139         (WebCore::getCachedDOMStructure):
1140         (WebCore::cacheDOMStructure):
1141         * bindings/js/JSDOMBinding.h:
1142         (WebCore::DOMConstructorObject::DOMConstructorObject):
1143         (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
1144         (WebCore::getDOMStructure):
1145         (WebCore::deprecatedGetDOMStructure):
1146         (WebCore::getDOMPrototype):
1147         (WebCore::createJSBuiltin):
1148         (WebCore::createWrapper):
1149         * bindings/js/JSDOMConstructor.h:
1150         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
1151         * bindings/js/JSDOMGlobalObject.h:
1152         (WebCore::getDOMConstructor):
1153         * bindings/js/JSDOMWindowCustom.cpp:
1154         (WebCore::JSDOMWindow::image):
1155         (WebCore::JSDOMWindow::touch):
1156         (WebCore::JSDOMWindow::touchList):
1157         * bindings/js/JSDOMWrapper.h:
1158         (WebCore::JSDOMWrapper::JSDOMWrapper):
1159         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
1160         * bindings/js/JSImageConstructor.cpp:
1161         (WebCore::JSImageConstructor::JSImageConstructor):
1162         (WebCore::JSImageConstructor::finishCreation):
1163         * bindings/js/JSImageConstructor.h:
1164         (WebCore::JSImageConstructor::create):
1165         (WebCore::JSImageConstructor::createStructure):
1166         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
1167         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject):
1168         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject):
1169         * bindings/scripts/CodeGeneratorJS.pm:
1170         (GenerateHeader):
1171         (GenerateImplementation):
1172         (GenerateCallbackImplementation):
1173         (GenerateConstructorDeclaration):
1174         (GenerateConstructorHelperMethods):
1175         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1176         (WebCore::JSTestActiveDOMObjectConstructor::create):
1177         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
1178         (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
1179         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1180         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
1181         (WebCore::JSTestActiveDOMObject::getConstructor):
1182         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1183         (WebCore::JSTestActiveDOMObject::create):
1184         * bindings/scripts/test/JS/JSTestCallback.cpp:
1185         (WebCore::JSTestCallbackConstructor::create):
1186         (WebCore::JSTestCallbackConstructor::createStructure):
1187         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
1188         (WebCore::JSTestCallback::getConstructor):
1189         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1190         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
1191         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
1192         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
1193         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1194         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
1195         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
1196         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
1197         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
1198         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1199         (WebCore::JSTestCustomNamedGetterConstructor::create):
1200         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
1201         (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
1202         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1203         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
1204         (WebCore::JSTestCustomNamedGetter::getConstructor):
1205         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1206         (WebCore::JSTestCustomNamedGetter::create):
1207         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1208         (WebCore::JSTestEventConstructorConstructor::create):
1209         (WebCore::JSTestEventConstructorConstructor::createStructure):
1210         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
1211         (WebCore::JSTestEventConstructorConstructor::finishCreation):
1212         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
1213         (WebCore::JSTestEventConstructor::getConstructor):
1214         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1215         (WebCore::JSTestEventConstructor::create):
1216         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1217         (WebCore::JSTestEventTargetConstructor::create):
1218         (WebCore::JSTestEventTargetConstructor::createStructure):
1219         (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
1220         (WebCore::JSTestEventTargetConstructor::finishCreation):
1221         (WebCore::JSTestEventTarget::JSTestEventTarget):
1222         (WebCore::JSTestEventTarget::getConstructor):
1223         * bindings/scripts/test/JS/JSTestEventTarget.h:
1224         (WebCore::JSTestEventTarget::create):
1225         * bindings/scripts/test/JS/JSTestException.cpp:
1226         (WebCore::JSTestExceptionConstructor::create):
1227         (WebCore::JSTestExceptionConstructor::createStructure):
1228         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
1229         (WebCore::JSTestExceptionConstructor::finishCreation):
1230         (WebCore::JSTestException::JSTestException):
1231         (WebCore::JSTestException::getConstructor):
1232         * bindings/scripts/test/JS/JSTestException.h:
1233         (WebCore::JSTestException::create):
1234         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1235         (WebCore::JSTestGenerateIsReachableConstructor::create):
1236         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
1237         (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
1238         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1239         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
1240         (WebCore::JSTestGenerateIsReachable::getConstructor):
1241         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1242         (WebCore::JSTestGenerateIsReachable::create):
1243         * bindings/scripts/test/JS/JSTestInterface.cpp:
1244         (WebCore::JSTestInterfaceConstructor::create):
1245         (WebCore::JSTestInterfaceConstructor::createStructure):
1246         (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
1247         (WebCore::JSTestInterfaceConstructor::finishCreation):
1248         (WebCore::JSTestInterface::JSTestInterface):
1249         (WebCore::JSTestInterface::getConstructor):
1250         * bindings/scripts/test/JS/JSTestInterface.h:
1251         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1252         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
1253         (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
1254         (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
1255         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
1256         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
1257         (WebCore::JSTestJSBuiltinConstructor::getConstructor):
1258         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
1259         (WebCore::JSTestJSBuiltinConstructor::create):
1260         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1261         (WebCore::JSTestMediaQueryListListenerConstructor::create):
1262         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
1263         (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
1264         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1265         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
1266         (WebCore::JSTestMediaQueryListListener::getConstructor):
1267         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1268         (WebCore::JSTestMediaQueryListListener::create):
1269         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1270         (WebCore::JSTestNamedConstructorConstructor::create):
1271         (WebCore::JSTestNamedConstructorConstructor::createStructure):
1272         (WebCore::JSTestNamedConstructorNamedConstructor::create):
1273         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
1274         (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
1275         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1276         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
1277         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1278         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
1279         (WebCore::JSTestNamedConstructor::getConstructor):
1280         (WebCore::JSTestNamedConstructor::getNamedConstructor):
1281         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1282         (WebCore::JSTestNamedConstructor::create):
1283         * bindings/scripts/test/JS/JSTestNode.cpp:
1284         (WebCore::JSTestNodeConstructor::create):
1285         (WebCore::JSTestNodeConstructor::createStructure):
1286         (WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
1287         (WebCore::JSTestNodeConstructor::finishCreation):
1288         (WebCore::JSTestNode::JSTestNode):
1289         (WebCore::JSTestNode::getConstructor):
1290         * bindings/scripts/test/JS/JSTestNode.h:
1291         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1292         (WebCore::JSTestNondeterministicConstructor::create):
1293         (WebCore::JSTestNondeterministicConstructor::createStructure):
1294         (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
1295         (WebCore::JSTestNondeterministicConstructor::finishCreation):
1296         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
1297         (WebCore::JSTestNondeterministic::getConstructor):
1298         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1299         (WebCore::JSTestNondeterministic::create):
1300         * bindings/scripts/test/JS/JSTestObj.cpp:
1301         (WebCore::JSTestObjConstructor::create):
1302         (WebCore::JSTestObjConstructor::createStructure):
1303         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
1304         (WebCore::JSTestObjConstructor::finishCreation):
1305         (WebCore::JSTestObj::JSTestObj):
1306         (WebCore::JSTestObj::getConstructor):
1307         * bindings/scripts/test/JS/JSTestObj.h:
1308         (WebCore::JSTestObj::create):
1309         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1310         (WebCore::JSTestOverloadedConstructorsConstructor::create):
1311         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
1312         (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
1313         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1314         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
1315         (WebCore::JSTestOverloadedConstructors::getConstructor):
1316         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1317         (WebCore::JSTestOverloadedConstructors::create):
1318         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1319         (WebCore::JSTestOverrideBuiltinsConstructor::create):
1320         (WebCore::JSTestOverrideBuiltinsConstructor::createStructure):
1321         (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
1322         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
1323         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
1324         (WebCore::JSTestOverrideBuiltins::getConstructor):
1325         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1326         (WebCore::JSTestOverrideBuiltins::create):
1327         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1328         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
1329         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
1330         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
1331         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1332         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1333         (WebCore::JSTestSerializedScriptValueInterface::getConstructor):
1334         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1335         (WebCore::JSTestSerializedScriptValueInterface::create):
1336         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1337         (WebCore::JSTestTypedefsConstructor::create):
1338         (WebCore::JSTestTypedefsConstructor::createStructure):
1339         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
1340         (WebCore::JSTestTypedefsConstructor::finishCreation):
1341         (WebCore::JSTestTypedefs::JSTestTypedefs):
1342         (WebCore::JSTestTypedefs::getConstructor):
1343         * bindings/scripts/test/JS/JSTestTypedefs.h:
1344         (WebCore::JSTestTypedefs::create):
1345         * bindings/scripts/test/JS/JSattribute.cpp:
1346         (WebCore::JSattributeConstructor::create):
1347         (WebCore::JSattributeConstructor::createStructure):
1348         (WebCore::JSattributeConstructor::JSattributeConstructor):
1349         (WebCore::JSattributeConstructor::finishCreation):
1350         (WebCore::JSattribute::JSattribute):
1351         (WebCore::JSattribute::getConstructor):
1352         * bindings/scripts/test/JS/JSattribute.h:
1353         (WebCore::JSattribute::create):
1354         * bindings/scripts/test/JS/JSreadonly.cpp:
1355         (WebCore::JSreadonlyConstructor::create):
1356         (WebCore::JSreadonlyConstructor::createStructure):
1357         (WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
1358         (WebCore::JSreadonlyConstructor::finishCreation):
1359         (WebCore::JSreadonly::JSreadonly):
1360         (WebCore::JSreadonly::getConstructor):
1361         * bindings/scripts/test/JS/JSreadonly.h:
1362         (WebCore::JSreadonly::create):
1363
1364 2015-10-08  Philippe Normand  <pnormand@igalia.com>
1365
1366         WebRTC: Add event names needed by updated RTCPeerConnection
1367         https://bugs.webkit.org/show_bug.cgi?id=149875
1368
1369         Reviewed by Eric Carlson.
1370
1371         The track event name was recently added in the WebRTC spec. The
1372         icegatheringstatechange event has been part of the spec for a while but
1373         was not registered in our DOM events.
1374
1375         * dom/EventNames.h: Add track and icegatheringstatechange even names.
1376
1377 2015-10-07  Keith Rollin  <krollin@apple.com>
1378
1379         script.text shouldn't include text from non-direct children of the script element
1380         https://bugs.webkit.org/show_bug.cgi?id=148851
1381         <rdar://problem/22587759>
1382
1383         Reviewed by Chris Dumez.
1384
1385         Don't include text from non-direct children in script.text. Per:
1386         https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
1387         Chrome and Firefox behavior match the spec.
1388
1389         Test: fast/dom/script-subtext-in-script-elements.html
1390
1391         * dom/ScriptElement.cpp:
1392         (WebCore::ScriptElement::scriptContent):
1393
1394 2015-10-07  Chris Dumez  <cdumez@apple.com>
1395
1396         Partial revert of r187626 as it caused a PLT regression
1397         https://bugs.webkit.org/show_bug.cgi?id=149898
1398
1399         Reviewed by Myles C. Maxfield.
1400
1401         Do a partial revert of r187626 as it caused a regression on PLT.
1402
1403         * platform/graphics/FontCache.h:
1404         (WebCore::FontDescriptionKey::operator==):
1405         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
1406         (WebCore::FontDescriptionKey::computeHash): Deleted.
1407
1408 2015-10-07  Zalan Bujtas  <zalan@apple.com>
1409
1410         RenderObject::computeRectForRepaint/computeFloatRectForRepaint should return the computed rectangle.
1411         https://bugs.webkit.org/show_bug.cgi?id=149883
1412
1413         Reviewed by Simon Fraser.
1414
1415         Reduces code complexity at the calling sites.
1416  
1417         No change in functionality.
1418
1419         * rendering/RenderBox.cpp:
1420         (WebCore::RenderBox::clippedOverflowRectForRepaint):
1421         (WebCore::RenderBox::computeRectForRepaint):
1422         * rendering/RenderBox.h:
1423         * rendering/RenderInline.cpp:
1424         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1425         (WebCore::RenderInline::computeRectForRepaint):
1426         * rendering/RenderInline.h:
1427         * rendering/RenderListMarker.cpp:
1428         (WebCore::RenderListMarker::selectionRectForRepaint):
1429         * rendering/RenderObject.cpp:
1430         (WebCore::RenderObject::repaintRectangle):
1431         (WebCore::RenderObject::computeRectForRepaint):
1432         (WebCore::RenderObject::computeFloatRectForRepaint):
1433         * rendering/RenderObject.h:
1434         (WebCore::RenderObject::computeAbsoluteRepaintRect):
1435         * rendering/RenderReplaced.cpp:
1436         (WebCore::RenderReplaced::selectionRectForRepaint):
1437         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
1438         * rendering/RenderTableCell.cpp:
1439         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1440         (WebCore::RenderTableCell::computeRectForRepaint):
1441         * rendering/RenderTableCell.h:
1442         * rendering/RenderText.cpp:
1443         (WebCore::RenderText::collectSelectionRectsForLineBoxes):
1444         * rendering/RenderView.cpp:
1445         (WebCore::RenderView::computeRectForRepaint):
1446         * rendering/RenderView.h:
1447         * rendering/svg/RenderSVGForeignObject.cpp:
1448         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
1449         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
1450         * rendering/svg/RenderSVGForeignObject.h:
1451         * rendering/svg/RenderSVGInline.cpp:
1452         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
1453         * rendering/svg/RenderSVGInline.h:
1454         * rendering/svg/RenderSVGModelObject.cpp:
1455         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
1456         * rendering/svg/RenderSVGModelObject.h:
1457         * rendering/svg/RenderSVGRoot.cpp:
1458         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
1459         * rendering/svg/RenderSVGRoot.h:
1460         * rendering/svg/RenderSVGText.cpp:
1461         (WebCore::RenderSVGText::computeRectForRepaint):
1462         (WebCore::RenderSVGText::computeFloatRectForRepaint):
1463         * rendering/svg/RenderSVGText.h:
1464         * rendering/svg/SVGRenderSupport.cpp:
1465         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
1466         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
1467         * rendering/svg/SVGRenderSupport.h:
1468
1469 2015-10-07  Antti Koivisto  <antti@apple.com>
1470
1471         Implement :host pseudo class
1472         https://bugs.webkit.org/show_bug.cgi?id=149440
1473         rdar://problem/22731953
1474
1475         Reviewed by Ryosuke Niwa.
1476
1477         This implements the basic non-function :host syntax.
1478
1479         * css/CSSSelector.cpp:
1480         (WebCore::CSSSelector::selectorText):
1481         * css/CSSSelector.h:
1482         * css/ElementRuleCollector.cpp:
1483         (WebCore::ElementRuleCollector::matchAuthorRules):
1484         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
1485         (WebCore::ElementRuleCollector::matchUserRules):
1486         * css/ElementRuleCollector.h:
1487         * css/RuleSet.cpp:
1488         (WebCore::computeMatchBasedOnRuleHash):
1489         (WebCore::RuleSet::addRule):
1490         * css/RuleSet.h:
1491         (WebCore::RuleSet::cuePseudoRules):
1492         (WebCore::RuleSet::hostPseudoClassRules):
1493         (WebCore::RuleSet::focusPseudoClassRules):
1494         (WebCore::RuleSet::universalRules):
1495         * css/SelectorChecker.cpp:
1496         (WebCore::SelectorChecker::checkOne):
1497         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1498         * cssjit/SelectorCompiler.cpp:
1499         (WebCore::SelectorCompiler::addPseudoClassType):
1500
1501 2015-10-07  Nan Wang  <n_wang@apple.com>
1502
1503         AX: ARIA 1.1 @aria-placeholder
1504         https://bugs.webkit.org/show_bug.cgi?id=148970
1505
1506         Reviewed by Chris Fleizach.
1507
1508         Added support for aria-placeholder attribute.
1509
1510         Modified accessibility/placeholder.html test.
1511
1512         * accessibility/AccessibilityObject.cpp:
1513         (WebCore::AccessibilityObject::placeholderValue):
1514         * html/HTMLAttributeNames.in:
1515
1516 2015-10-07  Commit Queue  <commit-queue@webkit.org>
1517
1518         Unreviewed, rolling out r190664.
1519         https://bugs.webkit.org/show_bug.cgi?id=149877
1520
1521         mac build is sometimes borken due to missing generated header
1522         file (Requested by youenn on #webkit).
1523
1524         Reverted changeset:
1525
1526         "Automate WebCore JS builtins generation and build system"
1527         https://bugs.webkit.org/show_bug.cgi?id=149751
1528         http://trac.webkit.org/changeset/190664
1529
1530 2015-10-06  Simon Fraser  <simon.fraser@apple.com>
1531
1532         will-change should trigger stacking context based purely on properties
1533         https://bugs.webkit.org/show_bug.cgi?id=148068
1534
1535         Reviewed by Zalan Bujtas.
1536
1537         Previously, our will-change implementation didn't trigger stacking context
1538         on an inline if the will-change property didn't apply to inlines (like 'transform').
1539         However, this doesn't agree with the CSS-WG consensus (https://lists.w3.org/Archives/Public/www-style/2015Sep/0112.html).
1540         
1541         Change behavior to have stacking context creation behavior for will-change be
1542         identical for inlines and blocks.
1543
1544         Test: fast/css/will-change/will-change-creates-stacking-context-inline.html
1545
1546         * rendering/RenderInline.cpp:
1547         (WebCore::inFlowPositionedInlineAncestor):
1548         * rendering/RenderInline.h:
1549         (WebCore::RenderInline::willChangeCreatesStackingContext):
1550         * rendering/style/WillChangeData.cpp:
1551         (WebCore::propertyCreatesStackingContext):
1552         (WebCore::WillChangeData::addFeature):
1553         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Deleted.
1554         * rendering/style/WillChangeData.h:
1555         (WebCore::WillChangeData::canCreateStackingContextOnInline): Deleted.
1556
1557 2015-10-07  Javier Fernandez  <jfernandez@igalia.com>
1558
1559         [CSS Grid Layout] Modify grid item height doesn't work
1560         https://bugs.webkit.org/show_bug.cgi?id=149840
1561
1562         Reviewed by Sergio Villar Senin.
1563
1564         When computing the logical height of content-sized grid tracks we
1565         need to clear grid item's override height if it needs to be laid
1566         out again.
1567
1568         Currently we are doing so only in the case of percentage heights
1569         or when the grid track's width has changed; these situations would
1570         obviously mark grid items as needing layout.
1571
1572         However, there are other situations, like the one defined in this
1573         bug, which would imply a new layout of the grid items; hence we
1574         need to clear its override value if we want the layout logic to be
1575         computed correctly.
1576
1577         * rendering/RenderGrid.cpp:
1578         (WebCore::RenderGrid::logicalContentHeightForChild):
1579
1580 2015-10-07  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1581
1582         Automate WebCore JS builtins generation and build system
1583         https://bugs.webkit.org/show_bug.cgi?id=149751
1584
1585         Reviewed by Darin Adler.
1586
1587         Adding annotations to JS files to know whether they should be under a compilation flag and
1588         whether they are JS internals or JS tied to WebIDL.
1589         If a file is said as JS internals, all function names are exported automatically.
1590         Added auto generation of WebCoreJSBuiltins.cpp
1591         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
1592         WebCoreJSClientData as wrapper for builtins. Renamed WebCoreJSClientData to JSClientData.
1593         Added auto generation of PrivateWebCoreJSBuiltins that is a wrapper around all private functions, used by
1594         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
1595
1596         The remaining manual part for private functions is the pairing between private identifiers and
1597         the private JS functions within JSDOMWindowBase::finishCreation.
1598
1599         Covered by existing tests.
1600
1601         * CMakeLists.txt:
1602         * DerivedSources.make:
1603         * Modules/streams/ByteLengthQueuingStrategy.js:
1604         * Modules/streams/CountQueuingStrategy.js:
1605         * Modules/streams/ReadableStream.js:
1606         * Modules/streams/ReadableStreamInternals.js:
1607         * WebCore.order:
1608         * WebCore.vcxproj/WebCore.vcxproj:
1609         * WebCore.xcodeproj/project.pbxproj:
1610         * bindings/js/DOMWrapperWorld.cpp:
1611         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1612         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1613         (WebCore::normalWorld):
1614         * bindings/js/JSDOMWindowBase.cpp:
1615         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1616         (WebCore::JSDOMWindowBase::finishCreation):
1617         (WebCore::JSDOMWindowBase::visitChildren):
1618         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1619         * bindings/js/JSDOMWindowBase.h:
1620         * bindings/js/ScriptController.cpp:
1621         (WebCore::ScriptController::getAllWorlds):
1622         * bindings/js/SerializedScriptValue.cpp:
1623         (WebCore::SerializedScriptValue::transferArrayBuffers):
1624         * bindings/js/WebCoreJSClientData.h:
1625         (WebCore::JSClientData::JSClientData):
1626         (WebCore::JSClientData::~JSClientData):
1627         (WebCore::JSClientData::builtinFunctions):
1628         (WebCore::initNormalWorldClientData):
1629         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
1630         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
1631         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
1632         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
1633         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
1634         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
1635         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
1636         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
1637         * generate-js-builtins-allinone: Added.
1638         (retrieveGenerationParameters):
1639         (retrieveFilesWithParameters):
1640         (retrieveFilesWithParameters.FileInput):
1641         (writeConditional):
1642         (JSBuiltinFunctions):
1643         (Private):
1644         (JSBuiltinInternalFunctions):
1645         (copytempfile):
1646
1647 2015-10-05  Sergio Villar Senin  <svillar@igalia.com>
1648
1649         [css-grid] Implement grid gutters
1650         https://bugs.webkit.org/show_bug.cgi?id=149800
1651
1652         Reviewed by Darin Adler.
1653
1654         Authors can now specify the gutters between grid lines, i.e.,
1655         the space between two consecutive grid lines. This can be done
1656         using the new '-webkit-grid-column-gap 'and
1657         '-webkit-grid-row-gap' properties (or the '-webkit-grid-gap'
1658         shorthand).
1659
1660         From the track sizing algorithm POV, gutters are treated as
1661         fixed size columns. The primary consequence is that grids are
1662         enlarged (depending on the number of tracks). Gutters also
1663         affect the sizing of content-sized tracks and fr tracks as
1664         long as the grid have spanning items. Those tracks will become
1665         smaller as gutters will consume part of the item's size, so
1666         the tracks won't need to grow as much as they used to.
1667
1668         Tests: fast/css-grid-layout/grid-gutters-and-alignment.html
1669                fast/css-grid-layout/grid-gutters-and-flex-content.html
1670                fast/css-grid-layout/grid-gutters-and-tracks.html
1671                fast/css-grid-layout/grid-gutters-get-set.html
1672
1673         * css/CSSComputedStyleDeclaration.cpp:
1674         (WebCore::valueForGridTrackList):
1675         (WebCore::ComputedStyleExtractor::propertyValue):
1676         * css/CSSParser.cpp:
1677         (WebCore::isSimpleLengthPropertyID):
1678         (WebCore::CSSParser::parseValue):
1679         (WebCore::CSSParser::parseGridGapShorthand):
1680         * css/CSSParser.h:
1681         * css/CSSPropertyNames.in:
1682         * rendering/RenderGrid.cpp:
1683         (WebCore::RenderGrid::guttersSize):
1684         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1685         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1686         (WebCore::RenderGrid::layoutGridItems):
1687         (WebCore::RenderGrid::gridAreaBreadthForChild):
1688         (WebCore::RenderGrid::populateGridPositions):
1689         (WebCore::RenderGrid::columnAxisOffsetForChild):
1690         (WebCore::RenderGrid::rowAxisOffsetForChild):
1691         * rendering/RenderGrid.h:
1692         * rendering/style/RenderStyle.h:
1693         * rendering/style/StyleGridData.cpp:
1694         (WebCore::StyleGridData::StyleGridData):
1695         * rendering/style/StyleGridData.h:
1696         (WebCore::StyleGridData::operator==):
1697
1698 2015-10-07  ChangSeok Oh  <changseok.oh@collabora.com>
1699
1700         [GTK] Progress bar is broken on recent GTK+
1701         https://bugs.webkit.org/show_bug.cgi?id=149831
1702
1703         Reviewed by Carlos Garcia Campos.
1704
1705         The gtk progress bar has been broken after bumping up to Gtk+-3.16. This is because
1706         the way of rendering progress bar changed after gtk+-3.13.7. See more
1707         https://mail.gnome.org/archives/commits-list/2014-August/msg03865.html
1708         gtk_render_activity is no longer valid to paint a progress bar on a newer gtk+.
1709         It should be done with gtk_render_background and gtk_render_frame.
1710
1711         Test: fast/dom/HTMLProgressElement/native-progress-bar.html
1712
1713         * rendering/RenderThemeGtk.cpp:
1714         (WebCore::RenderThemeGtk::paintProgressBar):
1715
1716 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
1717
1718         [GTK] Add autocleanups
1719         https://bugs.webkit.org/show_bug.cgi?id=149588
1720
1721         Reviewed by Darin Adler.
1722
1723         * PlatformGTK.cmake:
1724         * bindings/scripts/gobject-generate-headers.pl:
1725
1726 2015-10-06  Zalan Bujtas  <zalan@apple.com>
1727
1728         Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
1729         https://bugs.webkit.org/show_bug.cgi?id=149535
1730         rdar://problem/22874920
1731
1732         Reviewed by Simon Fraser.
1733
1734         When due to some style change, a renderer's self-painting layer is getting destroyed 
1735         and the parent's overflow is no longer set to visible, we don't clean up the overflow part.
1736
1737         When a renderer has a self-painting layer, the parent stops tracking the child's 
1738         visual overflow rect. All overflow painting is delegated to the self-painting layer.
1739         However when this layer gets destroyed, no-one issues repaint to clean up
1740         the overflow bits.
1741         This patch ensures that we issue a repaint when the self-painting layer is destroyed
1742         and the triggering style change requires full repaint.
1743
1744         Test: fast/repaint/overflow-hidden-with-self-painting-child-layer.html
1745
1746         * rendering/RenderLayer.h:
1747         * rendering/RenderLayerModelObject.cpp:
1748         (WebCore::RenderLayerModelObject::styleDidChange):
1749
1750 2015-10-06  Jer Noble  <jer.noble@apple.com>
1751
1752         [Mac] REGRESSION(r173318): Seeks never complete for media loaded with QTKit.
1753         https://bugs.webkit.org/show_bug.cgi?id=149845
1754
1755         Reviewed by Darin Adler.
1756
1757         When converting from time-as-double to MediaTime, a regression was introduced
1758         when checking whether m_seekTo was set to a valid value or not. The clause
1759         `time != -1` should be translated to `time.isValid()`, not `!time.isValid()`.
1760
1761         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1762         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
1763
1764 2015-10-06  Brady Eidson  <beidson@apple.com>
1765
1766         Rename IDBRequestIdentifier to IDBResourceIdentifier.
1767         https://bugs.webkit.org/show_bug.cgi?id=149861
1768
1769         Reviewed by Alex Christensen.
1770
1771         No new tests (No change in behavior).
1772
1773         Turns out having an object representing a (connection ID + unique ID pair) is useful for more than just IDBRequests.
1774
1775         * CMakeLists.txt:
1776         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1777         (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
1778         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
1779         * Modules/indexeddb/client/IDBConnectionToServer.h:
1780         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1781         (WebCore::IDBClient::IDBRequest::IDBRequest):
1782         * Modules/indexeddb/client/IDBRequestImpl.h:
1783         (WebCore::IDBClient::IDBRequest::resourceIdentifier):
1784         (WebCore::IDBClient::IDBRequest::requestIdentifier): Deleted.
1785         * Modules/indexeddb/shared/IDBRequestData.h:
1786         (WebCore::IDBRequestData::requestIdentifier):
1787         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.cpp.
1788         (WebCore::nextResourceNumber):
1789         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
1790         (WebCore::IDBResourceIdentifier::emptyValue):
1791         (WebCore::IDBResourceIdentifier::deletedValue):
1792         (WebCore::IDBResourceIdentifier::isHashTableDeletedValue):
1793         * Modules/indexeddb/shared/IDBResourceIdentifier.h: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.h.
1794         (WebCore::IDBResourceIdentifier::isEmpty):
1795         (WebCore::IDBResourceIdentifier::hash):
1796         (WebCore::IDBResourceIdentifier::operator==):
1797         (WebCore::IDBResourceIdentifier::connectionIdentifier):
1798         (WebCore::IDBResourceIdentifierHash::hash):
1799         (WebCore::IDBResourceIdentifierHash::equal):
1800         (WebCore::IDBResourceIdentifierHashTraits::emptyValue):
1801         (WebCore::IDBResourceIdentifierHashTraits::isEmptyValue):
1802         (WebCore::IDBResourceIdentifierHashTraits::constructDeletedValue):
1803         (WebCore::IDBResourceIdentifierHashTraits::isDeletedValue):
1804         * Modules/indexeddb/shared/IDBResultData.cpp:
1805         (WebCore::IDBResultData::IDBResultData):
1806         * Modules/indexeddb/shared/IDBResultData.h:
1807         (WebCore::IDBResultData::requestIdentifier):
1808         * WebCore.xcodeproj/project.pbxproj:
1809
1810 2015-10-06  Nan Wang  <n_wang@apple.com>
1811
1812         AX: ARIA 1.1: aria-orientation now defaults to undefined, supported on more elements, and role-specific defaults are defined.
1813         https://bugs.webkit.org/show_bug.cgi?id=132177
1814
1815         Reviewed by Chris Fleizach.
1816
1817         Added role-specific defaults and changed general default to undefined.
1818         Also added more elements to support aria-orientation on Mac.
1819
1820         Test: accessibility/mac/aria-orientation.html
1821
1822         * accessibility/AccessibilityObject.cpp:
1823         (WebCore::AccessibilityObject::orientation):
1824         (WebCore::AccessibilityObject::isDescendantOfObject):
1825         * accessibility/AccessibilityObject.h:
1826         (WebCore::AccessibilityObject::isColorWell):
1827         (WebCore::AccessibilityObject::isSplitter):
1828         (WebCore::AccessibilityObject::isToolbar):
1829         (WebCore::AccessibilityObject::isChecked):
1830         (WebCore::AccessibilityObject::isEnabled):
1831         * accessibility/AccessibilityRenderObject.cpp:
1832         (WebCore::AccessibilityRenderObject::orientation):
1833         * accessibility/AccessibilityScrollView.cpp:
1834         (WebCore::AccessibilityScrollView::scrollBar):
1835         * accessibility/AccessibilityScrollbar.cpp:
1836         (WebCore::AccessibilityScrollbar::orientation):
1837         (WebCore::AccessibilityScrollbar::isEnabled):
1838         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1839         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1840         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1841
1842 2015-10-06  Per Arne Vollan  <peavo@outlook.com>
1843
1844         [WinCairo] GStreamer compile errors.
1845         https://bugs.webkit.org/show_bug.cgi?id=149839
1846
1847         Reviewed by Alex Christensen.
1848
1849         Help MSVC to resolve ambiguous calls.
1850
1851         * platform/graphics/MediaPlayer.h:
1852         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1853         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1854         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
1855         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
1856         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1857         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
1858         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
1859         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1860         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
1861         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1862         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
1863         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
1864         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1865         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1866         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
1867         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1868         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1869         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
1870         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1871         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
1872         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1873         (webkitVideoSinkRender):
1874         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1875         (webKitWebSrcChangeState):
1876         (webKitWebSrcNeedDataCb):
1877         (webKitWebSrcEnoughDataMainCb):
1878         (webKitWebSrcEnoughDataCb):
1879         (webKitWebSrcSeekMainCb):
1880         (webKitWebSrcSeekDataCb):
1881
1882 2015-10-06  Chris Dumez  <cdumez@apple.com>
1883
1884         Refactor TokenPreloadScanner::StartTagScanner::processAttribute()
1885         https://bugs.webkit.org/show_bug.cgi?id=149847
1886
1887         Reviewed by Antti Koivisto.
1888
1889         Refactor TokenPreloadScanner::StartTagScanner::processAttribute() to only
1890         process attributes that make sense given the current tagId. In particular,
1891         - We only process the charset parameter if the tag is a link or a script.
1892         - We only process the sizes / srcset attributes if the tag is an img.
1893
1894         * html/parser/HTMLPreloadScanner.cpp:
1895         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1896         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
1897
1898 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1899
1900         Binding generator XXConstructor::finishCreation should take references as parameters
1901         https://bugs.webkit.org/show_bug.cgi?id=149838
1902
1903         Reviewed by Darin Adler.
1904
1905         Updated the binding generator so that XXConstructor::finishCreation
1906         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
1907
1908         Covered by rebased binding tests.
1909
1910         * bindings/scripts/CodeGeneratorJS.pm:
1911         (GenerateConstructorDeclaration):
1912         (GenerateConstructorHelperMethods):
1913         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1914         (WebCore::JSTestActiveDOMObjectConstructor::create):
1915         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1916         * bindings/scripts/test/JS/JSTestCallback.cpp:
1917         (WebCore::JSTestCallbackConstructor::create):
1918         (WebCore::JSTestCallbackConstructor::finishCreation):
1919         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1920         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
1921         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1922         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1923         (WebCore::JSTestCustomNamedGetterConstructor::create):
1924         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1925         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1926         (WebCore::JSTestEventConstructorConstructor::create):
1927         (WebCore::JSTestEventConstructorConstructor::finishCreation):
1928         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1929         (WebCore::JSTestEventTargetConstructor::create):
1930         (WebCore::JSTestEventTargetConstructor::finishCreation):
1931         * bindings/scripts/test/JS/JSTestException.cpp:
1932         (WebCore::JSTestExceptionConstructor::create):
1933         (WebCore::JSTestExceptionConstructor::finishCreation):
1934         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1935         (WebCore::JSTestGenerateIsReachableConstructor::create):
1936         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1937         * bindings/scripts/test/JS/JSTestInterface.cpp:
1938         (WebCore::JSTestInterfaceConstructor::create):
1939         (WebCore::JSTestInterfaceConstructor::finishCreation):
1940         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1941         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
1942         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
1943         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1944         (WebCore::JSTestMediaQueryListListenerConstructor::create):
1945         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1946         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1947         (WebCore::JSTestNamedConstructorConstructor::create):
1948         (WebCore::JSTestNamedConstructorNamedConstructor::create):
1949         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1950         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1951         * bindings/scripts/test/JS/JSTestNode.cpp:
1952         (WebCore::JSTestNodeConstructor::create):
1953         (WebCore::JSTestNodeConstructor::finishCreation):
1954         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1955         (WebCore::JSTestNondeterministicConstructor::create):
1956         (WebCore::JSTestNondeterministicConstructor::finishCreation):
1957         * bindings/scripts/test/JS/JSTestObj.cpp:
1958         (WebCore::JSTestObjConstructor::create):
1959         (WebCore::JSTestObjConstructor::finishCreation):
1960         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1961         (WebCore::JSTestOverloadedConstructorsConstructor::create):
1962         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1963         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1964         (WebCore::JSTestOverrideBuiltinsConstructor::create):
1965         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
1966         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1967         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
1968         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1969         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1970         (WebCore::JSTestTypedefsConstructor::create):
1971         (WebCore::JSTestTypedefsConstructor::finishCreation):
1972         * bindings/scripts/test/JS/JSattribute.cpp:
1973         (WebCore::JSattributeConstructor::create):
1974         (WebCore::JSattributeConstructor::finishCreation):
1975         * bindings/scripts/test/JS/JSreadonly.cpp:
1976         (WebCore::JSreadonlyConstructor::create):
1977         (WebCore::JSreadonlyConstructor::finishCreation):
1978
1979 2015-10-06  Jiewen Tan  <jiewen_tan@apple.com>
1980
1981         Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange()
1982         https://bugs.webkit.org/show_bug.cgi?id=149300
1983         <rdar://problem/22747046>
1984
1985         Reviewed by Chris Dumez.
1986
1987         This is a merge of Blink r167845 and r194944:
1988         https://codereview.chromium.org/177093016
1989         https://codereview.chromium.org/1124863003
1990
1991         Test: editing/style/apply-style-crash2.html
1992               editing/style/apply-style-crash3.html
1993
1994         * editing/ApplyStyleCommand.cpp:
1995         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1996         The issue was that we would traverse the DOM tree past the beyondEnd 
1997         under some circumstances and thus NodeTraversal::next() would return 
1998         null unexpectedly. This CL adds a check to make sure startNode != beyondEnd 
1999         before traversing to avoid the problem.
2000
2001         Besides that, this CL hardens changing font style over unknown elements.
2002         When adjusting the start node position of where to apply a font style
2003         command, check that we haven't stepped off the end.
2004
2005         This CL also adds a few more assertions to catch similar issues 
2006         more easily in the future.
2007
2008 2015-10-06  Javier Fernandez  <jfernandez@igalia.com>
2009
2010         [CSS Grid Layout] Don't need to reset auto-margins during grid items layout
2011         https://bugs.webkit.org/show_bug.cgi?id=149764
2012
2013         Reviewed by Darin Adler.
2014
2015         This patch implements a refactoring of the auto-margin alignment code for grid
2016         items so it uses start/end and before/after margin logic terms.
2017
2018         I addition, it avoids resetting the auto-margin values, which requires an extra
2019         layout, before applying the alignment logic.
2020
2021         No new tests because there is no behavior change.
2022
2023         * rendering/RenderGrid.cpp:
2024         (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Computing margins if child needs layout.
2025         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2026         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded): Using start/end logical margins.
2027         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded): Using before/after logical margins.
2028         (WebCore::RenderGrid::columnAxisOffsetForChild): Just added comment.
2029         (WebCore::RenderGrid::rowAxisOffsetForChild): Just added comment.
2030
2031 2015-10-06  Tim Horton  <timothy_horton@apple.com>
2032
2033         Tile map shows a green rect when threaded scrolling is disabled
2034         https://bugs.webkit.org/show_bug.cgi?id=149716
2035
2036         Reviewed by Darin Adler.
2037
2038         Green is supposed to indicate that we're using the fast path; if threaded
2039         scrolling is disabled, we're definitely not doing that.
2040
2041         * platform/graphics/TiledBacking.h:
2042         * platform/graphics/ca/TileController.cpp:
2043         (WebCore::TileController::TileController):
2044         * platform/graphics/ca/TileCoverageMap.cpp:
2045         (WebCore::TileCoverageMap::update):
2046         Default to the "we have no ScrollingCoordinator" purple indication;
2047         if a ScrollingCoordinator comes along it will setScrollingModeIndication
2048         and change it from this default.
2049
2050 2015-10-06  Zalan Bujtas  <zalan@apple.com>
2051
2052         Remove redundant isComposited() function and replace
2053         hasLayer() && layer()->isComposited() with RenderObject::isComposited().
2054         https://bugs.webkit.org/show_bug.cgi?id=149846
2055
2056         Reviewed by Simon Fraser.
2057
2058         No change in functionality.
2059
2060         * rendering/RenderLayerCompositor.cpp:
2061         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
2062         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
2063         * rendering/RenderObject.cpp:
2064         (WebCore::RenderObject::repaintUsingContainer):
2065         * rendering/RenderThemeMac.mm:
2066         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2067         * rendering/RenderView.cpp:
2068         (WebCore::rendererObscuresBackground):
2069         (WebCore::isComposited): Deleted.
2070         * rendering/RenderWidget.cpp:
2071         (WebCore::RenderWidget::setWidgetGeometry):
2072
2073 2015-10-06  Commit Queue  <commit-queue@webkit.org>
2074
2075         Unreviewed, rolling out r190619.
2076         https://bugs.webkit.org/show_bug.cgi?id=149849
2077
2078         borke the binding tests on iOS at least (Requested by youenn
2079         on #webkit).
2080
2081         Reverted changeset:
2082
2083         "Binding generator XXConstructor::finishCreation should take
2084         references as parameters"
2085         https://bugs.webkit.org/show_bug.cgi?id=149838
2086         http://trac.webkit.org/changeset/190619
2087
2088 2015-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2089
2090         Slider knobs should scale when rendering while zoomed
2091         https://bugs.webkit.org/show_bug.cgi?id=149835
2092         <rdar://problem/22897080>
2093
2094         Reviewed by Darin Adler.
2095
2096         Make slider knobs follow suit with the rest of the unscaled form controls
2097         by rendering to an offscreen buffer when the page is zoomed or scaled and
2098         then rendering a scaled version of the offscreen buffer onto the page.
2099
2100         * platform/mac/ThemeMac.mm:
2101         (WebCore::drawCellOrFocusRingIntoRectWithView): Helper function for drawing
2102             cells and/or focus rings.
2103         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Refactored to
2104             handle drawing slider knobs as well.
2105         * rendering/RenderThemeMac.mm:
2106         (WebCore::RenderThemeMac::paintSliderThumb): Use scaled rendering when necessary.
2107
2108 2015-10-06  Chris Dumez  <cdumez@apple.com>
2109
2110         [Web IDL] 'length' property is wrong for variadic operations
2111         https://bugs.webkit.org/show_bug.cgi?id=149714
2112
2113         Reviewed by Darin Adler.
2114
2115         The value of the 'length' property was wrong for variadic operations:
2116         - https://heycam.github.io/webidl/#dfn-optional-argument
2117
2118         The final argument of a variadic operation is considered to be an
2119         optional argument. Therefore, we should not account for it when
2120         computing the value of the 'length' property. This patch fixes WebKit's
2121         behavior to match the specification.
2122
2123         Test: fast/dom/variadic-operations-length.html
2124
2125         * bindings/scripts/CodeGeneratorJS.pm:
2126         (GetFunctionLength):
2127         * bindings/scripts/test/JS/JSTestObj.cpp:
2128         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2129         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2130
2131 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2132
2133         Binding generator should add builtin header for JSBuiltin attributes
2134         https://bugs.webkit.org/show_bug.cgi?id=149837
2135
2136         Reviewed by Darin Adler.
2137
2138         Ensured XXBuiltins.h header is included for builtin attributes.
2139         Renamed AddIncludesForJSBuiltinMethods as AddJSBuiltinIncludesIfNeeded.
2140         Test loop is done through all functions and attributes to handle conditional correctly.
2141
2142         Covered by existing and added binding tests.
2143
2144         * bindings/scripts/CodeGeneratorJS.pm:
2145         (GenerateImplementation):
2146         (AddJSBuiltinIncludesIfNeeded):
2147         * bindings/scripts/test/JS/JSTestObj.cpp:
2148         * bindings/scripts/test/ObjC/DOMTestObj.h:
2149         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2150         * bindings/scripts/test/TestObj.idl:
2151
2152 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2153
2154         Binding generator XXConstructor::finishCreation should take references as parameters
2155         https://bugs.webkit.org/show_bug.cgi?id=149838
2156
2157         Reviewed by Darin Adler.
2158
2159         Updated the binding generator so that XXConstructor::finishCreation
2160         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
2161
2162         Covered by rebased binding tests.
2163
2164         * bindings/scripts/CodeGeneratorJS.pm:
2165         (GenerateConstructorDeclaration):
2166         (GenerateConstructorHelperMethods):
2167         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2168         (WebCore::JSTestActiveDOMObjectConstructor::create):
2169         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2170         * bindings/scripts/test/JS/JSTestCallback.cpp:
2171         (WebCore::JSTestCallbackConstructor::create):
2172         (WebCore::JSTestCallbackConstructor::finishCreation):
2173         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2174         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
2175         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2176         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2177         (WebCore::JSTestCustomNamedGetterConstructor::create):
2178         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2179         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2180         (WebCore::JSTestEventConstructorConstructor::create):
2181         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2182         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2183         (WebCore::JSTestEventTargetConstructor::create):
2184         (WebCore::JSTestEventTargetConstructor::finishCreation):
2185         * bindings/scripts/test/JS/JSTestException.cpp:
2186         (WebCore::JSTestExceptionConstructor::create):
2187         (WebCore::JSTestExceptionConstructor::finishCreation):
2188         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2189         (WebCore::JSTestGenerateIsReachableConstructor::create):
2190         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2191         * bindings/scripts/test/JS/JSTestInterface.cpp:
2192         (WebCore::JSTestInterfaceConstructor::create):
2193         (WebCore::JSTestInterfaceConstructor::finishCreation):
2194         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2195         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2196         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2197         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2198         (WebCore::JSTestMediaQueryListListenerConstructor::create):
2199         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2200         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2201         (WebCore::JSTestNamedConstructorConstructor::create):
2202         (WebCore::JSTestNamedConstructorNamedConstructor::create):
2203         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2204         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2205         * bindings/scripts/test/JS/JSTestNode.cpp:
2206         (WebCore::JSTestNodeConstructor::create):
2207         (WebCore::JSTestNodeConstructor::finishCreation):
2208         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2209         (WebCore::JSTestNondeterministicConstructor::create):
2210         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2211         * bindings/scripts/test/JS/JSTestObj.cpp:
2212         (WebCore::JSTestObjConstructor::create):
2213         (WebCore::JSTestObjConstructor::finishCreation):
2214         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2215         (WebCore::JSTestOverloadedConstructorsConstructor::create):
2216         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2217         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2218         (WebCore::JSTestOverrideBuiltinsConstructor::create):
2219         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
2220         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2221         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2222         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2223         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2224         (WebCore::JSTestTypedefsConstructor::create):
2225         (WebCore::JSTestTypedefsConstructor::finishCreation):
2226         * bindings/scripts/test/JS/JSattribute.cpp:
2227         (WebCore::JSattributeConstructor::create):
2228         (WebCore::JSattributeConstructor::finishCreation):
2229         * bindings/scripts/test/JS/JSreadonly.cpp:
2230         (WebCore::JSreadonlyConstructor::create):
2231         (WebCore::JSreadonlyConstructor::finishCreation):
2232
2233 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
2234
2235         [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
2236         https://bugs.webkit.org/show_bug.cgi?id=149752
2237
2238         Reviewed by Carlos Garcia Campos.
2239
2240         CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
2241
2242         * html/canvas/CanvasRenderingContext2D.cpp:
2243         (WebCore::CanvasRenderingContext2D::State::State):
2244
2245 2015-10-06  Daniel Bates  <dbates@webkit.org>
2246
2247         Enable XSLT when building WebKit for iOS using the public iOS SDK
2248         https://bugs.webkit.org/show_bug.cgi?id=149827
2249
2250         Reviewed by Alexey Proskuryakov.
2251
2252         * Configurations/FeatureDefines.xcconfig:
2253
2254 2015-10-06  Brent Fulgham  <bfulgham@apple.com>
2255
2256         [Win] Correct positioning error introduced in r190235
2257         https://bugs.webkit.org/show_bug.cgi?id=149631
2258         <rdar://problem/22635080>
2259
2260         Reviewed by Simon Fraser.
2261
2262         Covered by existing compositing tests:
2263           css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
2264           fast/layers/no-clipping-overflow-hidden-added-after-transform.html
2265           fast/layers/no-clipping-overflow-hidden-added-after-transition.html
2266           fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
2267           transforms/2d/preserve3d-not-fixed-container.html
2268
2269         * platform/graphics/ca/TileGrid.cpp:
2270         (TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
2271         on Windows.
2272         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2273         (PlatformCALayerWinInternal::displayCallback): We should always flip the
2274         coordinate system when drawing these layers on Windows.
2275         (shouldInvertBeforeDrawingContent): Deleted.
2276         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
2277         (WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
2278         for these tiled layers; that's already accounted for in common tile drawing code.
2279
2280 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
2281
2282         Fix ENABLE_OPENGL=OFF builds
2283         https://bugs.webkit.org/show_bug.cgi?id=146511
2284
2285         Reviewed by Darin Adler.
2286
2287         * platform/graphics/texmap/BitmapTextureGL.h:
2288         * platform/graphics/texmap/BitmapTextureGL.cpp:
2289         * platform/graphics/texmap/TextureMapperGL.h:
2290         * platform/graphics/texmap/TextureMapperGL.cpp:
2291         * platform/graphics/texmap/TextureMapperShaderProgram.h:
2292         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2293         Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
2294         ENABLE_OPENGL=OFF only disables the GL-related parts.
2295
2296 2015-10-06  Alex Christensen  <achristensen@webkit.org>
2297
2298         Fix Windows build after r190611.
2299
2300         * PlatformWin.cmake:
2301         Forward headers from contentextensions.
2302
2303 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
2304
2305         Use modern for-loops in WebCore/html.
2306         https://bugs.webkit.org/show_bug.cgi?id=149662
2307
2308         Reviewed by Darin Adler.
2309
2310         No new tests because there is no behavior change.
2311
2312         * html/DOMFormData.cpp:
2313         (WebCore::DOMFormData::DOMFormData):
2314         * html/EmailInputType.cpp:
2315         (WebCore::EmailInputType::typeMismatchFor):
2316         * html/FileInputType.cpp:
2317         (WebCore::FileInputType::receiveDroppedFiles):
2318         * html/FormController.cpp:
2319         (WebCore::FormControlState::serializeTo):
2320         (WebCore::FormControlState::deserialize):
2321         (WebCore::SavedFormState::serializeTo):
2322         (WebCore::SavedFormState::getReferencedFilePaths):
2323         (WebCore::FormController::createSavedFormStateMap):
2324         (WebCore::FormController::formElementsState):
2325         (WebCore::FormController::restoreControlStateIn):
2326         (WebCore::FormController::getReferencedFilePaths):
2327         * html/HTMLAnchorElement.cpp:
2328         (WebCore::hasNonEmptyBox):
2329         * html/HTMLCanvasElement.cpp:
2330         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
2331         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
2332         (WebCore::HTMLCanvasElement::reset):
2333         (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer):
2334         * html/HTMLFieldSetElement.cpp:
2335         (WebCore::HTMLFieldSetElement::length):
2336         * html/HTMLFormControlsCollection.cpp:
2337         (WebCore::firstNamedItem):
2338         * html/HTMLFormElement.cpp:
2339         (WebCore::HTMLFormElement::~HTMLFormElement):
2340         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
2341         (WebCore::HTMLFormElement::removedFrom):
2342         (WebCore::HTMLFormElement::length):
2343         (WebCore::HTMLFormElement::submitImplicitly):
2344         (WebCore::HTMLFormElement::validateInteractively):
2345         (WebCore::HTMLFormElement::getTextFieldValues):
2346         (WebCore::HTMLFormElement::submit):
2347         (WebCore::HTMLFormElement::reset):
2348         (WebCore::HTMLFormElement::defaultButton):
2349         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
2350         (WebCore::HTMLFormElement::removeFromPastNamesMap):
2351         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
2352         * html/HTMLInputElement.cpp:
2353         (WebCore::parseAcceptAttribute):
2354         * html/HTMLKeygenElement.cpp:
2355         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2356         * html/HTMLMediaElement.cpp:
2357         (WebCore::HTMLMediaElement::setMediaGroup):
2358         * html/HTMLOptionElement.cpp:
2359         (WebCore::HTMLOptionElement::index):
2360         * html/HTMLSelectElement.cpp:
2361         (WebCore::HTMLSelectElement::saveLastSelection):
2362         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
2363         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
2364         (WebCore::HTMLSelectElement::selectedIndex):
2365         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
2366         (WebCore::HTMLSelectElement::saveFormControlState):
2367         (WebCore::HTMLSelectElement::restoreFormControlState):
2368         (WebCore::HTMLSelectElement::appendFormData):
2369         (WebCore::HTMLSelectElement::reset):
2370         * html/HTMLTextAreaElement.cpp:
2371         (WebCore::HTMLTextAreaElement::setDefaultValue):
2372         * html/InputType.cpp:
2373         (WebCore::populateInputTypeFactoryMap):
2374         * html/MediaController.cpp:
2375         (MediaController::duration):
2376         (MediaController::setCurrentTime):
2377         (MediaController::play):
2378         (MediaController::setPlaybackRate):
2379         (MediaController::setVolume):
2380         (MediaController::setMuted):
2381         (playbackStateWaiting):
2382         (MediaController::updateMediaElements):
2383         (MediaController::bringElementUpToSpeed):
2384         (MediaController::isBlocked):
2385         (MediaController::hasEnded):
2386         (MediaController::asyncEventTimerFired):
2387         (MediaController::clearPositionTimerFired):
2388         (MediaController::hasAudio):
2389         (MediaController::hasVideo):
2390         (MediaController::hasClosedCaptions):
2391         (MediaController::setClosedCaptionsVisible):
2392         (MediaController::supportsScanning):
2393         (MediaController::beginScrubbing):
2394         (MediaController::endScrubbing):
2395         (MediaController::canPlay):
2396         (MediaController::isLiveStream):
2397         (MediaController::hasCurrentSrc):
2398         (MediaController::returnToRealtime):
2399         * html/MediaFragmentURIParser.cpp:
2400         (WebCore::MediaFragmentURIParser::parseTimeFragment):
2401         * html/PublicURLManager.cpp:
2402         (WebCore::PublicURLManager::revoke):
2403         (WebCore::PublicURLManager::stop):
2404         * html/canvas/WebGLBuffer.cpp:
2405         (WebCore::WebGLBuffer::getCachedMaxIndex):
2406         (WebCore::WebGLBuffer::setCachedMaxIndex):
2407         (WebCore::WebGLBuffer::setTarget):
2408         * html/canvas/WebGLContextGroup.cpp:
2409         (WebCore::WebGLContextGroup::loseContextGroup):
2410         * html/canvas/WebGLDrawBuffers.cpp:
2411         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
2412         * html/canvas/WebGLFramebuffer.cpp:
2413         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
2414         (WebCore::WebGLFramebuffer::checkStatus):
2415         (WebCore::WebGLFramebuffer::deleteObjectImpl):
2416         (WebCore::WebGLFramebuffer::initializeAttachments):
2417         (WebCore::WebGLFramebuffer::drawBuffers):
2418         * html/canvas/WebGLRenderingContextBase.cpp:
2419         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
2420         (WebCore::WebGLRenderingContextBase::deleteTexture):
2421         * html/canvas/WebGLVertexArrayObject.cpp:
2422         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
2423         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2424         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
2425         * html/parser/AtomicHTMLToken.h:
2426         (WebCore::AtomicHTMLToken::initializeAttributes):
2427         * html/parser/HTMLConstructionSite.cpp:
2428         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2429         * html/parser/HTMLFormattingElementList.cpp:
2430         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
2431         * html/parser/HTMLPreloadScanner.cpp:
2432         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2433         * html/parser/XSSAuditor.cpp:
2434         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
2435         * html/shadow/ContentDistributor.cpp:
2436         (WebCore::ContentDistributor::distribute):
2437         (WebCore::ContentDistributor::invalidate):
2438         * html/shadow/MediaControlElements.cpp:
2439         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
2440         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
2441         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
2442         * html/track/AudioTrackList.cpp:
2443         (AudioTrackList::getTrackById):
2444         * html/track/LoadableTextTrack.cpp:
2445         (WebCore::LoadableTextTrack::newCuesAvailable):
2446         (WebCore::LoadableTextTrack::newRegionsAvailable):
2447         * html/track/TextTrackCueList.cpp:
2448         (WebCore::TextTrackCueList::getCueById):
2449         (WebCore::TextTrackCueList::activeCues):
2450         * html/track/TextTrackList.cpp:
2451         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
2452         (TextTrackList::invalidateTrackIndexesAfterTrack):
2453         * html/track/TrackListBase.cpp:
2454         (TrackListBase::isAnyTrackEnabled):
2455         * html/track/VideoTrackList.cpp:
2456         (VideoTrackList::getTrackById):
2457
2458 2015-10-06  Alex Christensen  <achristensen@webkit.org>
2459
2460         Report error when main resource is blocked by content blocker
2461         https://bugs.webkit.org/show_bug.cgi?id=149719
2462         rdar://problem/21970595
2463
2464         Reviewed by Brady Eidson.
2465
2466         Test: http/tests/contentextensions/main-resource.html
2467
2468         * English.lproj/Localizable.strings:
2469         * contentextensions/ContentExtensionActions.h:
2470         * contentextensions/ContentExtensionError.h:
2471         (WebCore::ContentExtensions::make_error_code):
2472         * contentextensions/ContentExtensionsBackend.cpp:
2473         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
2474         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2475         Instead of nulling out the ResourceRequest, processContentExtensionRulesForLoad 
2476         now returns a status indicating whether the request should be blocked.
2477         This is needed because the DocumentLoader needs a CachedResource with an error representing the blocking
2478         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2479         * contentextensions/ContentExtensionsBackend.h:
2480         * html/HTMLMediaElement.cpp:
2481         (WebCore::HTMLMediaElement::loadResource):
2482         * loader/DocumentLoader.cpp:
2483         (WebCore::DocumentLoader::startLoadingMainResource):
2484         Dispatch an error if the resource is blocked by a content blocker.
2485         * loader/EmptyClients.h:
2486         * loader/FrameLoader.cpp:
2487         (WebCore::FrameLoader::loadResourceSynchronously):
2488         (WebCore::FrameLoader::cancelledError):
2489         (WebCore::FrameLoader::blockedByContentBlockerError):
2490         (WebCore::FrameLoader::connectionProperties):
2491         * loader/FrameLoader.h:
2492         * loader/FrameLoaderClient.h:
2493         * loader/ResourceLoader.cpp:
2494         (WebCore::ResourceLoader::willSendRequestInternal):
2495         * loader/cache/CachedResourceLoader.cpp:
2496         (WebCore::CachedResourceLoader::requestResource):
2497         * page/UserContentController.cpp:
2498         (WebCore::UserContentController::removeAllUserContentExtensions):
2499         (WebCore::UserContentController::processContentExtensionRulesForLoad):
2500         (WebCore::UserContentController::actionsForResourceLoad):
2501         * page/UserContentController.h:
2502         * platform/efl/ErrorsEfl.cpp:
2503         (WebCore::blockedError):
2504         (WebCore::blockedByContentBlockerError):
2505         (WebCore::cannotShowURLError):
2506         * platform/efl/ErrorsEfl.h:
2507         * platform/gtk/ErrorsGtk.cpp:
2508         (WebCore::blockedError):
2509         (WebCore::blockedByContentBlockerError):
2510         (WebCore::cannotShowURLError):
2511         * platform/gtk/ErrorsGtk.h:
2512
2513 2015-10-06  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2514
2515         JSBuiltinConstructor must always add builtin header
2516         https://bugs.webkit.org/show_bug.cgi?id=149759
2517
2518         Reviewed by Darin Adler.
2519
2520         Covered by TestJSBuiltinConstructor.idl.
2521
2522         * bindings/scripts/CodeGeneratorJS.pm:
2523         (AddIncludesForJSBuiltinMethods): Forces adding the builtin header when the JSBuiltinConstructor is present.
2524         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Expectation.
2525
2526 2015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2527
2528         Migrate streams API to JS Builtins
2529         https://bugs.webkit.org/show_bug.cgi?id=147092
2530
2531         Reviewed by Darin Adler.
2532
2533         Moved ReadableStream implementation from C++ to JS Builtins.
2534         Created specific private constructors for ReadableStreamReader and ReadableStreamController.
2535         Added these constructors to  JSDOMWindowBase.
2536         Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
2537
2538         Covered by existing tests.
2539
2540         * CMakeLists.txt:
2541         * DerivedSources.make:
2542         * Modules/streams/ReadableStream.cpp: Removed.
2543         * Modules/streams/ReadableStream.h: Removed.
2544         * Modules/streams/ReadableStream.idl:
2545         * Modules/streams/ReadableStream.js:
2546         (strategy.size):
2547         (initializeReadableStream):
2548         (cancel):
2549         (getReader):
2550         (pipeTo):
2551         (tee):
2552         (locked):
2553         * Modules/streams/ReadableStreamController.h:
2554         * Modules/streams/ReadableStreamController.idl:
2555         * Modules/streams/ReadableStreamController.js: Added.
2556         (enqueue):
2557         (error):
2558         (close):
2559         (desiredSize):
2560         * Modules/streams/ReadableStreamInternals.js:
2561         (privateInitializeReadableStreamReader):
2562         (privateInitializeReadableStreamController):
2563         (isReadableStream):
2564         (isReadableStreamReader):
2565         (isReadableStreamController):
2566         (errorReadableStream):
2567         (requestReadableStreamPull):
2568         (getReadableStreamDesiredSize):
2569         (releaseReadableStreamReader):
2570         (cancelReadableStream):
2571         (finishClosingReadableStream):
2572         (closeReadableStream):
2573         (closeReadableStreamReader):
2574         (enqueueInReadableStream):
2575         (readFromReadableStreamReader):
2576         (invokeOrNoop):
2577         (promiseInvokeOrNoop):
2578         * Modules/streams/ReadableStreamReader.cpp: Removed.
2579         * Modules/streams/ReadableStreamReader.h:
2580         * Modules/streams/ReadableStreamReader.idl:
2581         * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
2582         (cancel):
2583         (read):
2584         (releaseLock):
2585         (closed):
2586         * WebCore.vcxproj/WebCore.vcxproj:
2587         * WebCore.vcxproj/WebCore.vcxproj.filters:
2588         * WebCore.xcodeproj/project.pbxproj:
2589         * bindings/js/JSBindingsAllInOne.cpp:
2590         * bindings/js/JSDOMConstructor.h: Added.
2591         (WebCore::JSBuiltinConstructor::create):
2592         (WebCore::JSBuiltinConstructor::createStructure):
2593         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
2594         (WebCore::JSBuiltinConstructor::initializeProperties):
2595         (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
2596         (WebCore::JSBuiltinConstructor<JSClass>::construct):
2597         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
2598         * bindings/js/JSDOMWindowBase.cpp:
2599         (WebCore::JSDOMWindowBase::finishCreation):
2600         * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
2601         * bindings/js/JSReadableStreamCustom.cpp: Removed.
2602         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
2603         (WebCore::constructJSReadableStreamController):
2604         (WebCore::constructJSReadableStreamReader):
2605         (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
2606         (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
2607         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
2608         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
2609         (WebCore::createReadableStreamReaderPrivateConstructor):
2610         (WebCore::createReadableStreamControllerPrivateConstructor):
2611         * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
2612         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
2613         * bindings/js/ReadableJSStream.cpp: Removed.
2614         * bindings/js/ReadableJSStream.h: Removed.
2615         * bindings/js/WebCoreBuiltinNames.h: Added.
2616         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
2617         * bindings/js/WebCoreJSBuiltins.cpp:
2618         * bindings/js/WebCoreJSClientData.h:
2619         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
2620         (WebCore::WebCoreJSClientData::builtinNames):
2621         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
2622         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
2623
2624 2015-10-05  Chris Dumez  <cdumez@apple.com>
2625
2626         data: URLs should not be preloaded
2627         https://bugs.webkit.org/show_bug.cgi?id=149829
2628
2629         Reviewed by Ryosuke Niwa.
2630
2631         Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
2632         There is no need as the data is already available.
2633
2634         Test: fast/preloader/image-data-url.html
2635
2636         * html/parser/HTMLPreloadScanner.cpp:
2637         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
2638
2639 2015-10-05  Jer Noble  <jer.noble@apple.com>
2640
2641         [iOS] REGRESSION(r190434): Media continues to play when locking screen
2642         https://bugs.webkit.org/show_bug.cgi?id=149822
2643
2644         Reviewed by Brent Fulgham.
2645
2646         In MediaSessionManagerIOS.mm, both -applicationWillEnterForeground: and
2647         -applicationDidBecomeActive: called
2648         PlatformMediaSessionManager::applicationWillEnterForeground(), leading to the
2649         PlatformMediaSession's m_interruptionCount becoming increasingly unbalanced.
2650
2651         Rename PlatformMediaSessionManager::applicationWillEnterForeground() to
2652         applicationDidEnterForeground() to more correctly reflect when this notification will be
2653         called. Add a new method, MediaSessionManagerIOS::applicationWillEnterForeground(bool),
2654         whose paramater is whether the screen was locked. This allows the beginInterruption() and
2655         endInterruption() methods to be correctly balanced.
2656
2657         Drive-by fix: remove the unimplemented declarations for application{will,did}Enter{Fore,Back}ground()
2658         from PlatformMediaSession.h.
2659
2660         * platform/audio/PlatformMediaSession.h:
2661         * platform/audio/PlatformMediaSessionManager.cpp:
2662         (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
2663         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Deleted.
2664         * platform/audio/PlatformMediaSessionManager.h:
2665         * platform/audio/ios/MediaSessionManagerIOS.h:
2666         * platform/audio/ios/MediaSessionManagerIOS.mm:
2667         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
2668         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
2669         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
2670         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
2671         * testing/Internals.cpp:
2672         (WebCore::Internals::applicationDidEnterForeground):
2673         (WebCore::Internals::applicationWillEnterForeground): Deleted.
2674         * testing/Internals.h:
2675         * testing/Internals.idl:
2676
2677 2015-10-05  Alex Christensen  <achristensen@webkit.org>
2678
2679         Invalid CSS Selector for Content Blockers invalidates others
2680         https://bugs.webkit.org/show_bug.cgi?id=148446
2681         rdar://problem/22918235
2682
2683         Reviewed by Benjamin Poulain.
2684
2685         Test: http/tests/contentextensions/invalid-selector.html
2686
2687         * contentextensions/ContentExtensionParser.cpp:
2688         (WebCore::ContentExtensions::loadTrigger):
2689         (WebCore::ContentExtensions::isValidSelector):
2690         (WebCore::ContentExtensions::loadAction):
2691         (WebCore::ContentExtensions::loadRule):
2692         Add a check to see if a selector is valid before adding it.
2693
2694 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
2695
2696         CSSGradientValue should check whether gradientLength is zero or not.
2697         https://bugs.webkit.org/show_bug.cgi?id=149373
2698         <rdar://problem/22771418>
2699
2700         Reviewed by Darin Adler.
2701
2702         This is a merge of Blink r158220,
2703         https://chromiumcodereview.appspot.com/24350008
2704
2705         Test: fast/gradients/css3-repeating-radial-gradients-crash.html
2706
2707         * css/CSSGradientValue.cpp:
2708         (WebCore::CSSGradientValue::addStops):
2709         Check whether gradientLength > 0 before using it as denominator.
2710
2711 2015-10-05  Dean Jackson  <dino@apple.com>
2712
2713         EXT_texture_filter_anisotropic extension exposed with WEBKIT_ prefix
2714         https://bugs.webkit.org/show_bug.cgi?id=149765
2715         <rdar://problem/22983722>
2716
2717         Reviewed by Beth Dakin.
2718
2719         We can now remove the WEBKIT_ prefix from this extension.
2720
2721         Test: fast/canvas/webgl/unprefixed-anisotropic-extension.html
2722
2723         * html/canvas/WebGL2RenderingContext.cpp: Support the prefixed and unprefixed form.
2724         (WebCore::WebGL2RenderingContext::getExtension):
2725         * html/canvas/WebGLRenderingContext.cpp:
2726         (WebCore::WebGLRenderingContext::getExtension):
2727         (WebCore::WebGLRenderingContext::getSupportedExtensions):
2728
2729 2015-10-05  Dean Jackson  <dino@apple.com>
2730
2731         Reference cycles during SVG dependency invalidation
2732         https://bugs.webkit.org/show_bug.cgi?id=149824
2733         <rdar://problem/22771412>
2734
2735         Reviewed by Tim Horton.
2736
2737         Detect any reference cycles as we are invalidating.
2738
2739         This is mostly a merge of the following Blink commit:
2740         https://chromium.googlesource.com/chromium/blink/+/a4bc83453bda89823b672877dc02247652a02d51
2741
2742         Test: svg/custom/reference-cycle.svg
2743
2744         * rendering/svg/RenderSVGResource.cpp:
2745         (WebCore::removeFromCacheAndInvalidateDependencies): Keep around a hash
2746         table of dependencies, so that we can detect if an element is already
2747         present before marking it.
2748
2749 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
2750
2751         Fix null pointer dereference in WebSocket::connect()        
2752         https://bugs.webkit.org/show_bug.cgi?id=149311
2753         <rdar://problem/22748858>
2754
2755         Reviewed by Chris Dumez.
2756
2757         This is a merge of Blink r187441,
2758         https://codereview.chromium.org/785933005
2759
2760         Test: http/tests/websocket/construct-in-detached-frame.html
2761
2762         * Modules/websockets/WebSocket.cpp:
2763         (WebCore::WebSocket::connect):
2764         Call function implemented below instead of duplicating the code.
2765         * page/ContentSecurityPolicy.cpp:
2766         (WebCore::ContentSecurityPolicy::shouldBypassMainWorldContentSecurityPolicy):
2767         * page/ContentSecurityPolicy.h:
2768         Factor the logic to check shouldBypassMainWorldContentSecurityPolicy into 
2769         a function in this class. Check Frame pointers are not null before getting 
2770         shouldBypassMainWorldContentSecurityPolicy via those pointers.
2771         * page/EventSource.cpp:
2772         (WebCore::EventSource::create):
2773         This got fixed as a bonus.
2774         * xml/XMLHttpRequest.cpp:
2775         (WebCore::XMLHttpRequest::open):
2776         This got fixed as a bonus too.
2777
2778 2015-10-05  Beth Dakin  <bdakin@apple.com>
2779
2780         WebCore::IOSurface should ask the IOSurface for the pixel format instead of 
2781         caching it
2782         https://bugs.webkit.org/show_bug.cgi?id=149820
2783         -and corresponding-
2784         rdar://problem/22976230
2785
2786         Reviewed by Tim Horton.
2787
2788         Also there is no reason to make YUV be iOS only, so this patch removes those 
2789         PLATFORM checks.
2790
2791         * platform/graphics/cocoa/IOSurface.h:
2792         * platform/graphics/cocoa/IOSurface.mm:
2793         (IOSurface::IOSurface):
2794         (IOSurface::format):
2795         * platform/spi/cocoa/IOSurfaceSPI.h:
2796
2797 2015-10-02  Ryosuke Niwa  <rniwa@webkit.org>
2798
2799         ShadowRoot with leading or trailing white space cause a crash
2800         https://bugs.webkit.org/show_bug.cgi?id=149782
2801
2802         Reviewed by Chris Dumez.
2803
2804         Fixed the crash by adding a null pointer check since a TextNode that appears as a direct child
2805         of a ShadowRoot doesn't have a parent element.
2806
2807         Test: fast/shadow-dom/shadow-root-with-child-whitespace-text-crash.html
2808
2809         * style/RenderTreePosition.cpp:
2810         (WebCore::RenderTreePosition::previousSiblingRenderer):
2811
2812 2015-10-05  Beth Dakin  <bdakin@apple.com>
2813
2814         Build fix. 
2815
2816         * platform/spi/cocoa/IOSurfaceSPI.h:
2817
2818 2015-10-05  Beth Dakin  <bdakin@apple.com>
2819
2820         Unreviewed build fix.
2821
2822         * platform/spi/cocoa/IOSurfaceSPI.h:
2823
2824 2015-10-05  Brady Eidson  <beidson@apple.com>
2825
2826         Modernize IDBRequest::ReadyState into an enum class.
2827         https://bugs.webkit.org/show_bug.cgi?id=149817
2828
2829         Reviewed by Alex Christensen.
2830
2831         No new tests (Refactor, no behavior change).
2832
2833         * Modules/indexeddb/IDBRequest.h:
2834         
2835         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
2836         (WebCore::LegacyOpenDBRequest::shouldEnqueueEvent):
2837         
2838         * Modules/indexeddb/legacy/LegacyRequest.cpp:
2839         (WebCore::LegacyRequest::LegacyRequest):
2840         (WebCore::LegacyRequest::result):
2841         (WebCore::LegacyRequest::error):
2842         (WebCore::LegacyRequest::errorCode):
2843         (WebCore::LegacyRequest::readyState):
2844         (WebCore::LegacyRequest::markEarlyDeath):
2845         (WebCore::LegacyRequest::abort):
2846         (WebCore::LegacyRequest::setCursorDetails):
2847         (WebCore::LegacyRequest::setPendingCursor):
2848         (WebCore::LegacyRequest::setResultCursor):
2849         (WebCore::LegacyRequest::finishCursor):
2850         (WebCore::LegacyRequest::shouldEnqueueEvent):
2851         (WebCore::LegacyRequest::stop):
2852         (WebCore::LegacyRequest::dispatchEvent):
2853         (WebCore::LegacyRequest::transactionDidFinishAndDispatch):
2854         (WebCore::LegacyRequest::enqueueEvent):
2855         * Modules/indexeddb/legacy/LegacyRequest.h:
2856
2857 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
2858
2859         Cleaning up after revision 190339
2860         https://bugs.webkit.org/show_bug.cgi?id=149732
2861
2862         Reviewed by Myles C. Maxfield.
2863
2864         * xml/XSLStyleSheet.h:
2865         * xml/XSLStyleSheetLibxslt.cpp:
2866         (WebCore::XSLStyleSheet::compileStyleSheet):
2867
2868 2015-10-05  Beth Dakin  <bdakin@apple.com>
2869
2870         Errant space!!
2871         * platform/graphics/cocoa/IOSurface.mm:
2872         (IOSurface::releaseGraphicsContext):
2873         (IOSurface::convertToFormat):
2874
2875 2015-10-05  Beth Dakin  <bdakin@apple.com>
2876
2877         Compress snapshots on iOS
2878         https://bugs.webkit.org/show_bug.cgi?id=149814
2879         -and corresponding-
2880         rdar://problem/22976230
2881
2882         Reviewed by Simon Fraser.
2883
2884         Though the default is still RGBA, it is now possible to create an IOSurface 
2885         that uses the YUV422 pixel format.
2886         * platform/graphics/cocoa/IOSurface.h:
2887         * platform/graphics/cocoa/IOSurface.mm:
2888         (IOSurface::surfaceFromPool):
2889         (IOSurface::create):
2890         (IOSurface::createFromImage):
2891         (IOSurface::IOSurface):
2892         (IOSurface::releaseGraphicsContext):
2893
2894         In order to have a YUV IOSurface, we actually have to create an RGBA surface 
2895         first and then convert it to YUV, so this class method will handle that.
2896         (IOSurface::convertToFormat):
2897
2898         Necessary SPI.
2899         * platform/spi/cocoa/IOSurfaceSPI.h:
2900
2901 2015-10-05  Zalan Bujtas  <zalan@apple.com>
2902
2903         Mark the line dirty when RenderQuote's text changes.
2904         https://bugs.webkit.org/show_bug.cgi?id=149784
2905         rdar://problem/22558169
2906
2907         Reviewed by Antti Koivisto.
2908
2909         When quotation mark changes ( " -> ' or empty string), we
2910         need to mark the line dirty to ensure its content gets laid out properly.
2911
2912         Test: fast/inline/quotation-text-changes-dynamically.html
2913
2914         * rendering/RenderQuote.cpp:
2915         (WebCore::quoteTextRenderer):
2916         (WebCore::RenderQuote::updateText):
2917         (WebCore::fragmentChild): Deleted.
2918
2919 2015-10-03  Filip Pizlo  <fpizlo@apple.com>
2920
2921         Allow an object's marking state to track The Three Colors
2922         https://bugs.webkit.org/show_bug.cgi?id=149654
2923
2924         Reviewed by Geoffrey Garen.
2925
2926         No new tests because no new behavior.
2927
2928         * bindings/scripts/CodeGeneratorJS.pm:
2929         (GenerateImplementation):
2930
2931 2015-10-05  Katlyn Graff  <kgraff@apple.com>
2932
2933         Update setImageSmoothingQuality for additional reviews.
2934         https://bugs.webkit.org/show_bug.cgi?id=149541
2935
2936         Reviewed by Chris Dumez.
2937
2938         * html/canvas/CanvasRenderingContext2D.cpp:
2939         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
2940
2941 2015-10-05  Andreas Kling  <akling@apple.com>
2942
2943         Remove unused HistoryItem::targetItem()
2944         <https://webkit.org/b/149803>
2945
2946         Reviewed by Anders Carlsson.
2947
2948         This is ancient code with no remaining clients since 2010 (r53650)
2949
2950         * history/HistoryItem.cpp:
2951         (WebCore::HistoryItem::findTargetItem): Deleted.
2952         (WebCore::HistoryItem::targetItem): Deleted.
2953         * history/HistoryItem.h:
2954
2955 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
2956
2957         Unprefix -webkit-font-feature-settings
2958         https://bugs.webkit.org/show_bug.cgi?id=149722
2959
2960         Reviewed by Sam Weinig.
2961
2962         * css/CSSComputedStyleDeclaration.cpp:
2963         (WebCore::ComputedStyleExtractor::propertyValue):
2964         * css/CSSParser.cpp:
2965         (WebCore::CSSParser::parseValue):
2966         (WebCore::CSSParser::parseFontFeatureSettings):
2967         * css/CSSPropertyNames.in:
2968         * css/CSSValueKeywords.in:
2969         * css/StyleBuilderCustom.h:
2970         (WebCore::StyleBuilderCustom::applyInitialFontFeatureSettings):
2971         (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings):
2972         (WebCore::StyleBuilderCustom::applyInitialWebkitFontFeatureSettings): Deleted.
2973         (WebCore::StyleBuilderCustom::applyInheritWebkitFontFeatureSettings): Deleted.
2974
2975 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
2976
2977         [GStreamer] Replace uses of std::bind() with lambdas
2978         https://bugs.webkit.org/show_bug.cgi?id=149802
2979
2980         Reviewed by Carlos Garcia Campos.
2981
2982         Instead of std::bind(), use C++ lambdas to create std::function<>
2983         wrappers in GStreamer-related class implementations.
2984
2985         Ref-counted classes are protected by capturing a RefPtr object.
2986         GstObject-derived objects are protected by capturing a GRefPtr object.
2987         Necessary specializations for WebKitVideoSink and WebKitWebSrc are added.
2988
2989         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2990         (WebCore::AudioFileReader::createBus):
2991         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2992         (WTF::adoptGRef):
2993         (WTF::refGPtr<WebKitVideoSink>):
2994         (WTF::derefGPtr<WebKitVideoSink>):
2995         (WTF::refGPtr<WebKitWebSrc>):
2996         (WTF::derefGPtr<WebKitWebSrc>):
2997         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2998         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2999         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3000         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
3001         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3002         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
3003         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
3004         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
3005         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
3006         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3007         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
3008         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
3009         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3010         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
3011         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3012         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3013         (webkitVideoSinkRender):
3014         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3015         (webKitWebSrcChangeState):
3016         (webKitWebSrcNeedDataCb):
3017         (webKitWebSrcEnoughDataCb):
3018         (webKitWebSrcSeekDataCb):
3019
3020 2015-10-05  Andreas Kling  <akling@apple.com>
3021
3022         Remove unused HistoryItem::parent
3023         <https://webkit.org/b/149803>
3024
3025         Reviewed by Anders Carlsson.
3026
3027         Remove the effectively-unused "parent" field from HistoryItem.
3028         This also allows us to get rid of a HistoryItem constructor.
3029
3030         * history/HistoryItem.cpp:
3031         (WebCore::HistoryItem::HistoryItem): Deleted.
3032         (WebCore::HistoryItem::reset): Deleted.
3033         (WebCore::HistoryItem::parent): Deleted.
3034         (WebCore::HistoryItem::setParent): Deleted.
3035         * history/HistoryItem.h:
3036         (WebCore::HistoryItem::create): Deleted.
3037         * loader/HistoryController.cpp:
3038         (WebCore::HistoryController::initializeItem): Deleted.
3039
3040 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
3041
3042         GLContext should control ownership of context-related objects
3043         https://bugs.webkit.org/show_bug.cgi?id=149794
3044
3045         Reviewed by Martin Robinson.
3046
3047         Creation of GLContext objects can depend on various platform-specific
3048         objects like native window representations. Since these objects are
3049         used solely for the GLContext purposes, it would make sense to allow
3050         GLContext to provide an extensible way to impose ownership on these
3051         objects and control their lifetime.
3052
3053         GLContext::Data is declared with a defaulted virtual destructor.
3054         Users of these implementations can declare classes that derive from
3055         GLContext::Data and store context-related objects in instances of the
3056         derived class, and ensure that these objects are properly cleaned up
3057         when GLContext destroys the Data object.
3058
3059         The GLContext::Data object is managed through a protected
3060         std::unique_ptr<> member in the GLContext class. For now the member
3061         is only set in GLContextEGL::createWindowContext() and is destroyed
3062         during the GLContext destruction.
3063
3064         The local OffscreenContextData class in
3065         PlatformDisplayWayland::createSharingGLContext() derives from
3066         GLContext::Data and is used to store the wl_surface and
3067         EGLNativeWindowType (aka wl_egl_window) objects for offscreen
3068         GLContexts under the Wayland platform that are used for the sharing
3069         context and WebGL, effectively avoiding the leak that would further
3070         propagate problems into the compositor and the graphics library.
3071         (Such offscreen contexts are actually mimicked via a 1x1px
3072         wl_egl_window object that acts as a dummy base for the related
3073         wl_surface object).
3074
3075         * platform/graphics/GLContext.h:
3076         * platform/graphics/egl/GLContextEGL.cpp:
3077         (WebCore::GLContextEGL::createWindowContext):
3078         * platform/graphics/egl/GLContextEGL.h:
3079         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
3080         (WebCore::PlatformDisplayWayland::createSharingGLContext):
3081
3082 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
3083
3084         Make gdk.h inclusion in FontPlatformDataFreeType.cpp properly GTK-specific
3085         https://bugs.webkit.org/show_bug.cgi?id=149793
3086
3087         Reviewed by Carlos Garcia Campos.
3088
3089         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3090         Instead of including <gdk/gdk.h> header for all platforms but EFL, only
3091         include it for the GTK platform, since no other platform depends on the
3092         GDK library.
3093
3094 2015-10-03  Ricky Mondello  <rmondello@apple.com>
3095
3096         "Plug-in is blocked" message doesn't draw correctly
3097         https://bugs.webkit.org/show_bug.cgi?id=149741
3098         <rdar://problem/22920949>
3099
3100         Patch by Conrad Shultz and Ricky Mondello.
3101
3102         Reviewed by Anders Carlsson.
3103
3104         No new tests are added.
3105
3106         Add PluginData API to check whether a MIME type is supported, regardless of plug-in visibility.
3107
3108         * plugins/PluginData.cpp:
3109         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices): Adopt getMimesAndPluginIndiciesForPlugins.
3110         (WebCore::PluginData::getMimesAndPluginIndices): Added.
3111         (WebCore::PluginData::getMimesAndPluginIndiciesForPlugins): Essentially factored out of
3112             getWebVisibleMimesAndPluginIndices.
3113         (WebCore::PluginData::supportsMimeType): Added. Somewhat similar to preexisting supportsWebVisibleMimeType.
3114         * plugins/PluginData.h: Declare supportsMimeType.
3115
3116 2015-10-02  Antti Koivisto  <antti@apple.com>
3117
3118         Inserting a child to a slot assigned node doesn't trigger repaint
3119         https://bugs.webkit.org/show_bug.cgi?id=149739
3120
3121         Reviewed by Ryosuke Niwa.
3122
3123         Test: fast/shadow-dom/insert-child-to-assigned-node.html
3124
3125         * dom/Node.cpp:
3126         (WebCore::Node::derefEventTarget):
3127         (WebCore::traverseStyleParent):
3128         (WebCore::traverseFirstStyleParent):
3129         (WebCore::Node::updateAncestorsForStyleRecalc):
3130
3131             Traverse in style parent order.
3132
3133 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
3134
3135         Unreviewed, rolling out r190520, some tests assert / crash.
3136
3137         * ForwardingHeaders/heap/HeapObserver.h: Removed.
3138         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed.
3139         * WebCore.vcxproj/WebCore.vcxproj:
3140         * WebCore.vcxproj/WebCore.vcxproj.filters:
3141         * inspector/InspectorController.cpp:
3142         (WebCore::InspectorController::InspectorController): Deleted.
3143         (WebCore::InspectorController::vm): Deleted.
3144         * inspector/InspectorController.h:
3145         * inspector/WorkerInspectorController.cpp:
3146         (WebCore::WorkerInspectorController::vm): Deleted.
3147         * inspector/WorkerInspectorController.h:
3148
3149 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
3150
3151         Web Inspector: Include Garbage Collection Event in Timeline
3152         https://bugs.webkit.org/show_bug.cgi?id=142510
3153
3154         Reviewed by Geoffrey Garen.
3155
3156         Tests: inspector/heap/garbageCollected.html
3157                inspector/heap/gc.html
3158
3159         * ForwardingHeaders/heap/HeapObserver.h: Added.
3160         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
3161         * WebCore.vcxproj/WebCore.vcxproj:
3162         * WebCore.vcxproj/WebCore.vcxproj.filters:
3163         Forwarding headers.
3164
3165         * inspector/InspectorController.cpp:
3166         (WebCore::InspectorController::InspectorController):
3167         (WebCore::InspectorController::vm):
3168         * inspector/InspectorController.h:
3169         * inspector/WorkerInspectorController.cpp:
3170         (WebCore::WorkerInspectorController::vm):
3171         * inspector/WorkerInspectorController.h:
3172         Implement InspectorEnvironment::vm and create a Heap agent for the
3173         Page inspector controller.
3174
3175 2015-10-02  Jer Noble  <jer.noble@apple.com>
3176
3177         [MSE] Browser crashes when appending invalid data to MSE source buffer
3178         https://bugs.webkit.org/show_bug.cgi?id=149689
3179
3180         Reviewed by Darin Adler.
3181
3182         Test: media/media-source/media-source-stpp-crash.html
3183
3184         Bail out early (as specced) after disconnecting the SourceBuffer from its MediaSource.
3185
3186         * Modules/mediasource/SourceBuffer.cpp:
3187         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
3188
3189 2015-10-02  Simon Fraser  <simon.fraser@apple.com>
3190
3191         ASSERTION FAILED: param >= 0 in AnimationBase::updateStateMachine()
3192         https://bugs.webkit.org/show_bug.cgi?id=149737
3193         rdar://problem/19017465
3194
3195         Reviewed by Dean Jackson.
3196
3197         CoreAnimation can give us an animation beginTime that is slightly into the future,
3198         which results in 'param' here being < 0, so relax the assertion slightly.
3199         
3200         Fixes lots of assertions running iOS WK2 layout tests.
3201
3202         * page/animation/AnimationBase.cpp:
3203         (WebCore::AnimationBase::updateStateMachine):
3204
3205 2015-10-02  Per Arne Vollan  <peavo@outlook.com>
3206
3207         [WinCairo] Fix linker warnings.
3208         https://bugs.webkit.org/show_bug.cgi?id=149754
3209
3210         Reviewed by Alex Christensen.
3211
3212         Avoid compiling these files twice, they are already included in
3213         RenderingAllInOne.cpp.
3214
3215         * PlatformWinCairo.cmake:
3216
3217 2015-10-02  Alex Christensen  <achristensen@webkit.org>
3218
3219         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
3220         https://bugs.webkit.org/show_bug.cgi?id=149430
3221         rdar://problem/22742222
3222
3223         Reviewed by Geoffrey Garen.
3224
3225         Test: http/tests/contentextensions/disable-blocker.html
3226
3227         * html/HTMLMediaElement.cpp:
3228         (WebCore::HTMLMediaElement::loadResource):
3229         * loader/DocumentLoader.h:
3230         (WebCore::DocumentLoader::userContentExtensionsEnabled):
3231         (WebCore::DocumentLoader::setUserContentExtensionsEnabled):
3232         Store and use the state of whether content blockers are enabled or not on the DocumentLoader
3233         so that it stays constant for a document's entire life.  This state comes from the Page when
3234         making the DocumentLoader in WebKit2.
3235         * loader/FrameLoader.cpp:
3236         (WebCore::FrameLoader::loadResourceSynchronously):
3237         * loader/ResourceLoader.cpp:
3238         (WebCore::ResourceLoader::willSendRequestInternal):
3239         * loader/cache/CachedResourceLoader.cpp:
3240         (WebCore::CachedResourceLoader::requestResource):
3241         * page/DOMWindow.cpp:
3242         (WebCore::DOMWindow::open):
3243         * page/UserContentController.cpp:
3244         (WebCore::UserContentController::removeAllUserContentExtensions):
3245         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3246         (WebCore::UserContentController::actionsForResourceLoad):
3247         * page/UserContentController.h:
3248
3249 2015-10-02  Antoine Quint  <graouts@apple.com>
3250
3251         popstate is fired at the wrong time on load
3252         https://bugs.webkit.org/show_bug.cgi?id=94265
3253
3254         Reviewed by Darin Adler.
3255
3256         Don't fire popstate event on initial document load
3257
3258         According to the specification [1], a popstate event should only be fired
3259         when the document has a "last entry" and the entry being navigated to isn't
3260         it.  A document is created without a "last entry" and gets one just after
3261         this check when it is first navigated to, so a popstate should be fired any
3262         time a document is navigated to except for the first time after it has been
3263         created.
3264
3265         Patch adapted from work by jl@opera.com on Blink [2].
3266
3267         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#traverse-the-history (step 12-14 in particular)
3268         [2] https://src.chromium.org/viewvc/blink?revision=165221&view=revision
3269
3270         * dom/Document.cpp:
3271         (WebCore::Document::implicitClose):
3272
3273 2015-10-02  Javier Fernandez  <jfernandez@igalia.com>
3274
3275         [CSS Grid Layout] Support for Content Alignment in grid layout
3276         https://bugs.webkit.org/show_bug.cgi?id=145520
3277
3278         Reviewed by Darin Adler.
3279
3280         According to CSS Box Alignment specification, Content Distribution
3281         alignment controls alignment of the box's content within the box. The
3282         alignment container is the grid container's content box. The alignment
3283         subjects are the grid tracks.
3284
3285         This patch implements Grid Layout support for Content Distribution
3286         alignment along both block/column and inline/row axis, which are handled
3287         by align-content and justify-content properties respectively.
3288
3289         This patch provides support for overflow handling, similar to what
3290         Self Alignment provides with grid items, and both <content-position>
3291         and <content-distribution> values.
3292
3293         Baseline Alignment is still missing because it requires some additional
3294         behavior to be supported on grids before considering its implementation.
3295
3296         Tests: css3/overwrite-content-alignment.html
3297                css3/overwrite-self-alignment.html
3298                fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html
3299                fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html
3300                fast/css-grid-layout/grid-align-content-distribution.html
3301                fast/css-grid-layout/grid-align-content-vertical-lr.html
3302                fast/css-grid-layout/grid-align-content-vertical-rl.html
3303                fast/css-grid-layout/grid-align-content.html
3304                fast/css-grid-layout/grid-content-alignment-overflow.html
3305                fast/css-grid-layout/grid-content-alignment-with-different-sized-tracks.html
3306                fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html
3307                fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html
3308                fast/css-grid-layout/grid-content-alignment-with-span.html
3309                fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html
3310                fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html
3311                fast/css-grid-layout/grid-justify-content-distribution.html
3312                fast/css-grid-layout/grid-justify-content-vertical-lr.html
3313                fast/css-grid-layout/grid-justify-content-vertical-rl.html
3314                fast/css-grid-layout/grid-justify-content.html
3315
3316         * rendering/RenderFlexibleBox.cpp:
3317         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3318         (WebCore::RenderFlexibleBox::layoutColumnReverse):
3319         (WebCore::RenderFlexibleBox::alignFlexLines):
3320         * rendering/RenderGrid.cpp:
3321         (WebCore::ContentAlignmentData::ContentAlignmentData):
3322         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3323         (WebCore::RenderGrid::layoutGridItems):
3324         (WebCore::RenderGrid::gridAreaBreadthForChild):
3325         (WebCore::RenderGrid::populateGridPositions):
3326         (WebCore::resolveContentDistributionFallback):
3327         (WebCore::offsetToStartEdge):
3328         (WebCore::offsetToEndEdge):
3329         (WebCore::contentDistributionOffset):
3330         (WebCore::RenderGrid::computeContentPositionAndDistributionColumnOffset):
3331         (WebCore::RenderGrid::computeContentPositionAndDistributionRowOffset):
3332         (WebCore::RenderGrid::findChildLogicalPosition):
3333         (WebCore::RenderGrid::computePreferredLogicalWidths): Deleted.
3334         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Deleted.
3335         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Deleted.
3336         (WebCore::RenderGrid::cachedGridCoordinate): Deleted.
3337         (WebCore::RenderGrid::rowPositionForChild): Deleted.
3338         * rendering/RenderGrid.h:
3339         * rendering/style/RenderStyle.cpp:
3340         (WebCore::RenderStyle::resolvedAlignContentPosition):
3341         (WebCore::RenderStyle::resolvedAlignContentDistribution):
3342         (WebCore::RenderStyle::resolvedJustifyContentPosition):
3343         (WebCore::RenderStyle::resolvedJustifyContentDistribution):
3344         * rendering/style/RenderStyle.h:
3345
3346 2015-10-02  Dean Jackson  <dino@apple.com>
3347
3348         Attempted build fix.
3349
3350         * DerivedSources.make:
3351         * page/make_settings.pl:
3352         (printGetterAndSetter):
3353
3354 2015-10-01  Dean Jackson  <dino@apple.com>
3355
3356         Expose WEBGL_debug_renderer_info
3357         https://bugs.webkit.org/show_bug.cgi?id=149735
3358         <rdar://problem/18343500>
3359
3360         Reviewed by Simon Fraser.
3361
3362         Take two at landing this.
3363
3364         Enable the extension that allows content to query
3365         for the GPUs vendor and details.
3366
3367         Now that we're enabling this, there was no need for
3368         the internal setting that identified privileged situations.
3369         However, since this meant that WEBGL_debug_shaders was
3370         also exposed, I explicitly disable it since it is
3371         not yet conformant.
3372
3373         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
3374         as well as the general conformance suite.
3375
3376         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
3377         (WebCore::WebGL2RenderingContext::getExtension):
3378         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
3379         * html/canvas/WebGLRenderingContext.cpp: Ditto.
3380         (WebCore::WebGLRenderingContext::getExtension):
3381         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3382         * html/canvas/WebGLRenderingContextBase.cpp:
3383         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
3384         * html/canvas/WebGLRenderingContextBase.h:
3385         * page/Settings.in: Remove privilegedWebGLExtensions.
3386         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
3387         extension while it is still buggy.
3388         (WebCore::Extensions3DOpenGL::supportsExtension):
3389
3390 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
3391
3392         Fix the #if guard in PointerLockController.cpp
3393         https://bugs.webkit.org/show_bug.cgi?id=149705
3394
3395         Reviewed by Gyuyoung Kim.
3396
3397         * page/PointerLockController.cpp:
3398
3399 2015-10-01  Dean Jackson  <dino@apple.com>
3400
3401         Rollout r190446 for the moment. It broke the build.
3402
3403         * html/canvas/WebGL2RenderingContext.cpp:
3404         (WebCore::WebGL2RenderingContext::getExtension):
3405         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
3406         * html/canvas/WebGLRenderingContext.cpp:
3407         (WebCore::WebGLRenderingContext::getExtension):
3408         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3409         * html/canvas/WebGLRenderingContextBase.cpp:
3410         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions):
3411         * html/canvas/WebGLRenderingContextBase.h:
3412         * page/Settings.in:
3413         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3414         (WebCore::Extensions3DOpenGL::supportsExtension): Deleted.
3415
3416 2015-10-01  Jaehun Lim  <ljaehun.lim@samsung.com>
3417
3418         Unreviewed, fix build warning after r190434
3419
3420         Fix error: variable ‘interruption’ set but not used [-Werror=unused-but-set-variable]
3421
3422         * testing/Internals.cpp:
3423         (WebCore::Internals::beginMediaSessionInterruption):
3424
3425 2015-10-01  Dean Jackson  <dino@apple.com>
3426
3427         Expose WEBGL_debug_renderer_info
3428         https://bugs.webkit.org/show_bug.cgi?id=149735
3429         <rdar://problem/18343500>
3430
3431         Reviewed by Simon Fraser.
3432
3433         Enable the extension that allows content to query
3434         for the GPUs vendor and details.
3435
3436         Now that we're enabling this, there was no need for
3437         the internal setting that identified privileged situations.
3438         However, since this meant that WEBGL_debug_shaders was
3439         also exposed, I explicitly disable it since it is
3440         not yet conformant.
3441
3442         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
3443         as well as the general conformance suite.
3444
3445         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
3446         (WebCore::WebGL2RenderingContext::getExtension):
3447         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
3448         * html/canvas/WebGLRenderingContext.cpp: Ditto.
3449         (WebCore::WebGLRenderingContext::getExtension):
3450         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3451         * html/canvas/WebGLRenderingContextBase.cpp:
3452         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
3453         * html/canvas/WebGLRenderingContextBase.h:
3454         * page/Settings.in: Remove privilegedWebGLExtensions.
3455         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
3456         extension while it is still buggy.
3457         (WebCore::Extensions3DOpenGL::supportsExtension):
3458
3459 2015-10-01  Eric Carlson  <eric.carlson@apple.com>
3460
3461         [iOS] AirPlay should not stop when the screen locks
3462         https://bugs.webkit.org/show_bug.cgi?id=148315
3463         <rdar://problem/22770703>
3464
3465         Reviewed by Jer Noble.
3466
3467         Tested by media/video-interruption-with-resume-allowing-play.html
3468                   media/video-interruption-with-resume-not-allowing-play.html
3469
3470         * Modules/webaudio/AudioContext.h: overrideBackgroundPlaybackRestriction -> 
3471           shouldOverrideBackgroundPlaybackRestriction.
3472
3473         * html/HTMLMediaElement.cpp:
3474         (WebCore::HTMLMediaElement::suspendPlayback): Fix a typo in the logging.
3475         (WebCore::HTMLMediaElement::mayResumePlayback): Ditto.
3476         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Renamed from
3477           overrideBackgroundPlaybackRestriction.
3478         (WebCore::HTMLMediaElement::overrideBackgroundPlaybackRestriction): Deleted.
3479         * html/HTMLMediaElement.h:
3480
3481         * platform/audio/PlatformMediaSession.cpp:
3482         (WebCore::stateName):
3483         (WebCore::interruptionName): New, log the name of the interruption.
3484         (WebCore::PlatformMediaSession::beginInterruption): Log the interruption type. Don't
3485           increment the interruption counter if we are going to ignore it. Incorporate logic
3486           from doInterruption.
3487         (WebCore::PlatformMediaSession::doInterruption): Deleted.
3488         (WebCore::PlatformMediaSession::shouldDoInterruption): Deleted.
3489         (WebCore::PlatformMediaSession::forceInterruption): Deleted.
3490
3491         * platform/audio/PlatformMediaSession.h: Add SuspendedUnderLock interruption type.
3492         * platform/audio/PlatformMediaSessionManager.cpp:
3493         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground): Deleted.
3494         * platform/audio/PlatformMediaSessionManager.h:
3495
3496         * platform/audio/ios/MediaSessionManagerIOS.h:
3497         * platform/audio/ios/MediaSessionManagerIOS.mm:
3498         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground): Call beginInterruption
3499           when appropriate.
3500
3501 2015-10-01  Ryosuke Niwa  <rniwa@webkit.org>
3502
3503         Slot elements should support fallback contents
3504         https://bugs.webkit.org/show_bug.cgi?id=149701
3505
3506         Reviewed by Antti Koivisto.
3507
3508         Following discussions on Github discussions [1] [2], we're adding the default rule of `display: contents`
3509         on slot elements and making slot elements render its children when there are no assigned nodes [3].
3510
3511         Make these changes by attaching renderers on direct-children of slot elements when there are no assigned
3512         nodes during render tree construction. Note `display: contents` will be aded in webkit.org/b/149439.
3513
3514         [1] https://github.com/w3c/webcomponents/issues/317
3515         [2] https://github.com/w3c/webcomponents/issues/308
3516         [3] https://github.com/w3c/webcomponents/issues/308#issuecomment-143655347
3517
3518         Tests: fast/shadow-dom/css-scoping-shadow-slot-fallback.html
3519                fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html
3520
3521         * style/StyleResolveTree.cpp:
3522         (WebCore::Style::attachSlotAssignees):
3523         (WebCore::Style::detachSlotAssignees):
3524         (WebCore::Style::resolveSlotAssignees):
3525
3526 2015-10-01  Brent Fulgham  <bfulgham@apple.com>
3527
3528         Latch does not clear when a scroll snap animation is triggered
3529         https://bugs.webkit.org/show_bug.cgi?id=149681
3530         <rdar://problem/22733922>
3531
3532         Reviewed by Simon Fraser.
3533
3534         Test: tiled-drawing/scrolling/latched-div-with-scroll-snap.html
3535
3536         The scroll snap animation logic bypasses some of the normal clean-up code used
3537         for wheel event handling. When this happens, the scroll latching state is not
3538         cleared. In some cases this "stale" latch state is used when starting a new
3539         gesture in the same frame. This causes the wrong page element to receive the
3540         mouse wheel events, and hilarity ensues.
3541
3542         * page/mac/EventHandlerMac.mm:
3543         (WebCore::EventHandler::platformNotifyIfEndGesture): Clear latched state when
3544         ending the gesture.
3545
3546 2015-10-01  Brent Fulgham  <bfulgham@apple.com>
3547
3548         [Win] Unreviewed CMake build fixes.
3549
3550         * CMakeLists.txt: Match original Windows build flags for WebCoreTest.
3551         * PlatformAppleWin.cmake: Use the same build defines as the
3552         original Windows build.
3553
3554 2015-09-30  João Oliveira  <hello@jxs.pt>
3555
3556         Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
3557         https://bugs.webkit.org/show_bug.cgi?id=149590
3558
3559         Reviewed by Joseph Pecoraro.
3560
3561         Patch by João Oliveira and Brian Burg.
3562
3563         Expose the frontend page's zoom factor so we can implement relative zoom.
3564
3565         * inspector/InspectorFrontendHost.cpp:
3566         (WebCore::InspectorFrontendHost::zoomFactor): Added.
3567         * inspector/InspectorFrontendHost.h:
3568         * inspector/InspectorFrontendHost.idl:
3569         * page/Frame.h:
3570         (WebCore::Frame::pageZoomFactor):
3571
3572 2015-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3573
3574         [GTK] Websites with invalid auth header keep loading forever
3575         https://bugs.webkit.org/show_bug.cgi?id=149710
3576
3577         Reviewed by Martin Robinson.
3578
3579         We don't correctly handle a null realm from the server when
3580         retrieving and storing credentials from libsecret. First
3581         secret_attributes_build() fails because we pass a null domain, and
3582         we pass null attributes to secret_service_search() that returns
3583         early on a g_return macro and the callback is never called so the
3584         load doesn't continue after the auth challenge.
3585
3586         * platform/network/gtk/CredentialBackingStore.cpp:
3587         (WebCore::createAttributeHashTableFromChallenge):
3588         (WebCore::CredentialBackingStore::credentialForChallenge):
3589         (WebCore::CredentialBackingStore::storeCredentialsForChallenge):
3590
3591 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3592
3593         Refactor binding generator to factor JS DOM class m_impl handling
3594         https://bugs.webkit.org/show_bug.cgi?id=149660
3595
3596         Reviewed by Darin Adler.
3597
3598         Added JSDOMWrapperWithImplementation template class to move m_impl out of the binding generator.
3599         Updated custom bindings to use impl() instead of m_impl directly.
3600         Updated binding generator accordingly.
3601
3602         Covered by existing tests and binding tests.
3603
3604         * bindings/js/JSDOMStringMapCustom.cpp:
3605         (WebCore::JSDOMStringMap::getOwnPropertyNames):
3606         (WebCore::JSDOMStringMap::deleteProperty):
3607         * bindings/js/JSDOMWrapper.h:
3608         (WebCore::JSDOMWrapperWithImplementation::impl):
3609         (WebCore::JSDOMWrapperWithImplementation::~JSDOMWrapperWithImplementation):
3610         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
3611         (WebCore::JSDOMWrapperWithImplementation::releaseImpl):
3612         * bindings/js/JSGeolocationCustom.cpp:
3613         (WebCore::JSGeolocation::getCurrentPosition):
3614         (WebCore::JSGeolocation::watchPosition):
3615         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3616         (WebCore::JSSQLResultSetRowList::item):
3617         * bindings/js/JSSQLTransactionCustom.cpp:
3618         (WebCore::JSSQLTransaction::executeSql):
3619         * bindings/js/JSStorageCustom.cpp:
3620         (WebCore::JSStorage::deleteProperty):
3621         (WebCore::JSStorage::getOwnPropertyNames):
3622         * bindings/js/JSSubtleCryptoCustom.cpp:
3623         (WebCore::JSSubtleCrypto::encrypt):
3624         (WebCore::JSSubtleCrypto::decrypt):
3625         (WebCore::JSSubtleCrypto::sign):
3626         (WebCore::JSSubtleCrypto::verify):
3627         (WebCore::JSSubtleCrypto::wrapKey):
3628         (WebCore::JSSubtleCrypto::unwrapKey):
3629         * bindings/scripts/CodeGeneratorJS.pm:
3630         (GetParentClassName):
3631         (GetImplClassName):
3632         (GenerateHeader):
3633         (GenerateImplementation):
3634         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3635         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
3636         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot): Deleted.
3637         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3638         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
3639         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3640         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
3641         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): Deleted.
3642         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
3643         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
3644         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::finishCreation): Deleted.
3645         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3646         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
3647         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot): Deleted.
3648         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3649         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
3650         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3651         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
3652         (WebCore::jsTestEventConstructorAttr1): Deleted.
3653         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3654         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
3655         (WebCore::JSTestEventConstructor::finishCreation): Deleted.
3656         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3657         (WebCore::JSTestEventTarget::JSTestEventTarget):
3658         (WebCore::JSTestEventTarget::getOwnPropertySlot): Deleted.
3659         * bindings/scripts/test/JS/JSTestEventTarget.h:
3660         (WebCore::JSTestEventTarget::~JSTestEventTarget):
3661         * bindings/scripts/test/JS/JSTestException.cpp:
3662         (WebCore::JSTestException::JSTestException):
3663         (WebCore::JSTestException::getOwnPropertySlot): Deleted.
3664         * bindings/scripts/test/JS/JSTestException.h:
3665         (WebCore::JSTestException::~JSTestException):
3666         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3667         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
3668         (WebCore::jsTestGenerateIsReachableConstructor): Deleted.
3669         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3670         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
3671         (WebCore::JSTestGenerateIsReachable::finishCreation): Deleted.
3672         * bindings/scripts/test/JS/JSTestInterface.cpp:
3673         (WebCore::JSTestInterface::JSTestInterface):
3674         (WebCore::JSTestInterface::getOwnPropertySlot): Deleted.
3675         * bindings/scripts/test/JS/JSTestInterface.h:
3676         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3677         (WebCore::jsTestJSBuiltinConstructorConstructor): Deleted.
3678         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
3679         (WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
3680         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3681         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
3682         (WebCore::jsTestMediaQueryListListenerConstructor): Deleted.
3683         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3684         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
3685         (WebCore::JSTestMediaQueryListListener::finishCreation): Deleted.
3686         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3687         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
3688         (WebCore::jsTestNamedConstructorConstructor): Deleted.
3689         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3690         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
3691         (WebCore::JSTestNamedConstructor::finishCreation): Deleted.
3692         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3693         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
3694         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr): Deleted.
3695         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3696         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
3697         (WebCore::JSTestNondeterministic::finishCreation): Deleted.
3698         * bindings/scripts/test/JS/JSTestObj.cpp:
3699         (WebCore::JSTestObj::JSTestObj):
3700         (WebCore::JSTestObj::getOwnPropertySlot): Deleted.
3701         * bindings/scripts/test/JS/JSTestObj.h:
3702         (WebCore::JSTestObj::~JSTestObj):
3703         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3704         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
3705         (WebCore::jsTestOverloadedConstructorsConstructor): Deleted.
3706         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3707         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
3708         (WebCore::JSTestOverloadedConstructors::finishCreation): Deleted.
3709         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3710         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
3711         (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot): Deleted.
3712         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
3713         (WebCore::JSTestOverrideBuiltins::~JSTestOverrideBuiltins):
3714         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3715         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
3716         (WebCore::jsTestSerializedScriptValueInterfaceValue): Deleted.
3717         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3718         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
3719         (WebCore::JSTestSerializedScriptValueInterface::finishCreation): Deleted.
3720         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3721         (WebCore::JSTestTypedefs::JSTestTypedefs):
3722         (WebCore::JSTestTypedefs::getOwnPropertySlot): Deleted.
3723         * bindings/scripts/test/JS/JSTestTypedefs.h:
3724         (WebCore::JSTestTypedefs::~JSTestTypedefs):
3725         * bindings/scripts/test/JS/JSattribute.cpp:
3726         (WebCore::JSattribute::JSattribute):
3727         (WebCore::jsattributeReadonly): Deleted.
3728         * bindings/scripts/test/JS/JSattribute.h:
3729         (WebCore::JSattribute::~JSattribute):
3730         (WebCore::JSattribute::finishCreation): Deleted.
3731         * bindings/scripts/test/JS/JSreadonly.cpp:
3732         (WebCore::JSreadonly::JSreadonly):
3733         (WebCore::jsreadonlyConstructor): Deleted.
3734         * bindings/scripts/test/JS/JSreadonly.h:
3735         (WebCore::JSreadonly::~JSreadonly):
3736         (WebCore::JSreadonly::finishCreation): Deleted.
3737
3738 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
3739
3740         Fix the ARM build after r190192
3741         https://bugs.webkit.org/show_bug.cgi?id=149620
3742
3743         Reviewed by Darin Adler.
3744
3745         * platform/graphics/FontFeatureSettings.h:
3746         (WebCore::fontFeatureTag):
3747
3748 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3749
3750         [Streams API] Add support for private WebCore JS builtins functions
3751         https://bugs.webkit.org/show_bug.cgi?id=149518
3752
3753         Reviewed by Darin Adler.
3754
3755         Using ReadableStream tee method as a testbed to add support for private WebCore JS builtins functions.
3756         Private functions are hooked to JSDOMWindowBase, as it is the one connected to WebCoreClientData.
3757         WebCoreClientData is responsible to export the private function symbols to the VM.
3758
3759         Updated generate-js-builtins script to generate a class that can create and own all JS functions.
3760         This class is used by JSDOMWindowBase to create the JS builtin functions.
3761         It is also used to manage the GC of these objects.
3762
3763         Covered by rebased tests.
3764
3765         * CMakeLists.txt: Adding ReadableStreamInternals builtin files.
3766         * DerivedSources.cpp: Ditto.
3767         * DerivedSources.make: Ditto.
3768         * Modules/streams/ReadableStream.idl: Adding tee declaration as builtin
3769         * Modules/streams/ReadableStream.js:
3770         (tee): Calling @teeReadableStream
3771         * Modules/streams/ReadableStreamInternals.js: Barebone @teeReadableStream implementation.
3772         (teeReadableStream):
3773         * WebCore.vcxproj/WebCore.vcxproj: Adding ReadableStreamInternals builtin files.
3774         * WebCore.xcodeproj/project.pbxproj: Adding ReadableStreamInternals builtin files.
3775         * bindings/js/JSDOMWindowBase.cpp:
3776         (WebCore::JSDOMWindowBase::JSDOMWindowBase): Creating ReadableStreamInternalsBuiltinFunctions object.
3777         (WebCore::JSDOMWindowBase::finishCreation): Creating builtin functions through ReadableStreamInternalsBuiltinFunctions and registering them to the JS engine.
3778         (WebCore::JSDOMWindowBase::visitChildren): Ensuring GC does not collect private builtin functions through ReadableStreamInternalsBuiltinFunctions object
3779         * bindings/js/JSDOMWindowBase.h:
3780         * bindings/js/WebCoreJSClientData.h:
3781         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Exporting private names of ReadableStreamInternalsBuiltins
3782         (WebCore::WebCoreJSClientData::readableStreamBuiltins):
3783         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins):
3784         * generate-js-builtins: Adding support for ReadableStreamInternalsBuiltinFunctions and exportNames.
3785
3786 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3787
3788         Binding generator should make mutable CachedAttribute member fields
3789         https://bugs.webkit.org/show_bug.cgi?id=148056
3790
3791         Reviewed by Chris Dumez.
3792
3793         Making mutable CachedAttribute member fields.
3794         Removing const_cast from custom binding code.
3795         Rebased bindings tests.
3796
3797         No change in behavior.
3798
3799         * bindings/js/JSHistoryCustom.cpp:
3800         (WebCore::JSHistory::state):
3801         * bindings/js/JSMessageEventCustom.cpp:
3802         (WebCore::JSMessageEvent::data):
3803         * bindings/js/JSPopStateEventCustom.cpp:
3804         (WebCore::cacheState):
3805         (WebCore::JSPopStateEvent::state):
3806         * bindings/js/JSReadableStreamReaderEventCustom.cpp:
3807         (WebCore::JSReadableStreamReader::closed):
3808         * bindings/js/JSXMLHttpRequestCustom.cpp:
3809         (WebCore::JSXMLHttpRequest::response):
3810         * bindings/scripts/CodeGeneratorJS.pm:
3811         (GenerateHeader):
3812         * bindings/scripts/test/JS/JSTestObj.h:
3813         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3814
3815 2015-10-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3816
3817         [Streams API] Create ByteLengthQueuingStrategy object as per spec
3818         https://bugs.webkit.org/show_bug.cgi?id=147153
3819
3820         Reviewed by Darin Adler.
3821
3822         Added ByteLengthQueuingStream class as the spec defines at https://streams.spec.whatwg.org/#blqs-class.
3823
3824         Tests are covered by current set.
3825
3826         * CMakeLists.txt:
3827         * DerivedSources.cpp:
3828         * DerivedSources.make:
3829         * WebCore.vcxproj/WebCore.vcxproj:
3830         * WebCore.vcxproj/WebCore.vcxproj.filters:
3831         * WebCore.xcodeproj/project.pbxproj:
3832         * bindings/js/WebCoreJSBuiltins.cpp: Added build instructions.
3833         * Modules/streams/ByteLengthQueuingStrategy.idl: Added.
3834         * Modules/streams/ByteLengthQueuingStrategy.js: Copied from Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp.
3835         (size): Return byteLength attribute of the chunk.
3836         (initializeByteLengthQueuingStrategy): Initialize the highWaterMark property.
3837         * bindings/js/WebCoreJSClientData.h:
3838         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Initialize the blqs builtins.
3839         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Return the attribute.
3840
3841 2015-10-01  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3842
3843         Clean up all uses of PassRefPtr in Modules/geolocation
3844         https://bugs.webkit.org/show_bug.cgi?id=149552
3845
3846         Reviewed by Darin Adler.
3847
3848         * Modules/geolocation/GeoNotifier.cpp:
3849         (WebCore::GeoNotifier::GeoNotifier):
3850         (WebCore::GeoNotifier::setFatalError):
3851         * Modules/geolocation/GeoNotifier.h:
3852         (WebCore::GeoNotifier::create):
3853         * Modules/geolocation/Geolocation.cpp:
3854         (WebCore::createGeoposition):
3855         (WebCore::createPositionError):
3856         (WebCore::Geolocation::Watchers::add):
3857         (WebCore::Geolocation::getCurrentPosition):
3858         (WebCore::Geolocation::watchPosition):
3859         (WebCore::Geolocation::startRequest):
3860         * Modules/geolocation/Geolocation.h:
3861         * Modules/geolocation/GeolocationError.h:
3862         * Modules/geolocation/GeolocationPosition.h:
3863         * Modules/geolocation/Geoposition.h:
3864         (WebCore::Geoposition::create):
3865         (WebCore::Geoposition::isolatedCopy):
3866         (WebCore::Geoposition::Geoposition):
3867         * Modules/geolocation/PositionError.h:
3868         * Modules/geolocation/PositionOptions.h:
3869
3870 2015-09-30  Hunseop Jeong  <hs85.jeong@samsung.com>
3871
3872         [EFL][Gtk] Try to fix the build after r190379.
3873         https://bugs.webkit.org/show_bug.cgi?id=149693
3874
3875         Reviewed by Gyuyoung Kim.
3876
3877         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3878
3879 2015-09-30  Katlyn Graff  <kgraff@apple.com>
3880
3881         Add support for the imageSmoothingQuality property for CanvasRenderingContext2D.
3882         https://bugs.webkit.org/show_bug.cgi?id=149541
3883
3884         Reviewed by Ryosuke Niwa.
3885
3886         As documented here: https://html.spec.whatwg.org/multipage/scripting.html#image-smoothing
3887         Exposes the smooothing quality of algorithms used for scaling images. Valid input
3888         values are low, medium, and high: associated algorithms are expected to vary for
3889         differing hardware. setImageSmoothingQuality provides a handle into CGInterpolationQuality.
3890
3891         Test: fast/canvas/canvas-imageSmoothingQuality.html
3892
3893         * html/canvas/CanvasRenderingContext2D.cpp:
3894         (WebCore::CanvasRenderingContext2D::State::State):
3895         (WebCore::CanvasRenderingContext2D::State::operator=):
3896         (WebCore::smoothingToInterpolationQuality):
3897         (WebCore::CanvasRenderingContext2D::imageSmoothingQuality):
3898         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
3899         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled):
3900         * html/canvas/CanvasRenderingContext2D.h:
3901         * html/canvas/CanvasRenderingContext2D.idl:
3902
3903 2015-09-30  Dean Jackson  <dino@apple.com>
3904
3905         GraphicsContext3D::mappedSymbolName should initialize count variable
3906         https://bugs.webkit.org/show_bug.cgi?id=149692
3907         <rdar://problem/22871304>
3908
3909         Reviewed by Simon Fraser.
3910
3911         While debugging another WebGL issue, I noticed that some
3912         OpenGL renderers can get into a state where they
3913         drop resources (e.g. a GPU reset). If we don't detect that
3914         in time, we might try to ask for the currently attached
3915         resources and our in-parameter will not be set. In this
3916         case, initialize it to zero so that we don't do silly things.
3917
3918         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3919         (WebCore::GraphicsContext3D::mappedSymbolName): Initialize count to 0.
3920
3921 2015-09-30  Dean Jackson  <dino@apple.com>
3922
3923         Crash in gleLookupHashObject when context is lost
3924         https://bugs.webkit.org/show_bug.cgi?id=149690
3925         <rdar://problem/22751585>
3926         <rdar://problem/22465495>
3927
3928         Reviewed by Simon Fraser.
3929
3930         When we received notification that the GPU has reset,
3931         we were nulling out and deleting our OpenGL contexts
3932         and then trying to do it all over again. The fix was
3933         to flip the order of operations.
3934
3935         While there I added some logging, and changed the
3936         way we check GPU status to make sure we do a check
3937         after the first draw call.
3938
3939         Unfortunately we can't test automatically because it
3940         involves resetting the GPU which can possibly cause
3941         concurrent tests to fail.
3942
3943         * platform/graphics/mac/GraphicsContext3DMac.mm:
3944         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Move forceContextLost()
3945         to be the first thing we do after we've realised we need to
3946         bail.
3947
3948 2015-09-30  Brady Eidson  <beidson@apple.com>
3949
3950         Add UniqueIDBDatabase object, IDBBackingStore objects, and a database operation thread.
3951         https://bugs.webkit.org/show_bug.cgi?id=149678
3952
3953         Reviewed by Alex Christensen.
3954
3955         Test: storage/indexeddb/modern/opendatabase-request-event.html
3956
3957         - UniqueIDBDatabase represents a specific IDB database instance that can have multiple 
3958           connections to it.
3959         - IDBBackingStore is an abstract representation of a unique database's backing store, 
3960           and has a concrete in-memory implementation for now.
3961         - The database thread exists on IDBServer and is for offloading actual database I/O from 
3962           the main thread.
3963
3964         * CMakeLists.txt:
3965
3966         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
3967         (WebCore::IDBDatabaseIdentifier::isolatedCopy):
3968         * Modules/indexeddb/IDBDatabaseIdentifier.h:
3969
3970         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3971         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
3972         (WebCore::IDBClient::IDBConnectionToServer::didOpenDatabase):
3973         * Modules/indexeddb/client/IDBConnectionToServer.h:
3974         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3975
3976         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
3977         (WebCore::IDBClient::IDBFactory::openInternal):
3978
3979         * Modules/indexeddb/server/IDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
3980         (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
3981
3982         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3983         (WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase):
3984         * Modules/indexeddb/server/IDBConnectionToClient.h:
3985         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3986
3987         * Modules/indexeddb/server/IDBServer.cpp:
3988         (WebCore::IDBServer::IDBServer::IDBServer):
3989         (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
3990         (WebCore::IDBServer::IDBServer::createBackingStore):
3991         (WebCore::IDBServer::IDBServer::openDatabase):
3992         (WebCore::IDBServer::IDBServer::deleteDatabase):
3993         (WebCore::IDBServer::IDBServer::postDatabaseTask):
3994         (WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
3995         (WebCore::IDBServer::IDBServer::databaseThreadEntry):
3996         (WebCore::IDBServer::IDBServer::databaseRunLoop):
3997         (WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread):
3998         * Modules/indexeddb/server/IDBServer.h:
3999
4000         * Modules/indexeddb/server/IDBServerOperation.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
4001         (WebCore::IDBServer::IDBServerOperation::create):
4002         (WebCore::IDBServer::IDBServerOperation::IDBServerOperation):
4003         * Modules/indexeddb/server/IDBServerOperation.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
4004         (WebCore::IDBServer::IDBServerOperation::connection):
4005         (WebCore::IDBServer::IDBServerOperation::requestData):
4006
4007         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp.
4008         (WebCore::IDBServer::MemoryIDBBackingStore::create):
4009         (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
4010         (WebCore::IDBServer::MemoryIDBBackingStore::~MemoryIDBBackingStore):
4011         (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
4012         * Modules/indexeddb/server/MemoryIDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h.
4013
4014         * Modules/indexeddb/server/UniqueIDBDatabase.cpp: Added.
4015         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
4016         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
4017         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
4018         (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
4019         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
4020         * Modules/indexeddb/server/UniqueIDBDatabase.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
4021         (WebCore::IDBServer::UniqueIDBDatabase::create):
4022
4023         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.