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