Floating box is misplaced after content change.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-26  Zalan Bujtas  <zalan@apple.com>
2
3         Floating box is misplaced after content change.
4         https://bugs.webkit.org/show_bug.cgi?id=150271
5
6         Reviewed by David Hyatt.
7
8         Collapse anonymous block when as the result of a sibling removal only floating siblings are left.
9
10         Test: fast/block/collapse-anon-block-with-float-siblings-only.html
11
12         * rendering/RenderBlock.cpp:
13         (WebCore::canCollapseAnonymousBlock):
14         (WebCore::canMergeContiguousAnonymousBlocks):
15         (WebCore::RenderBlock::collapseAnonymousBoxChild):
16         (WebCore::RenderBlock::removeChild):
17         (WebCore::canMergeAnonymousBlock): Deleted.
18         * rendering/RenderBlock.h:
19         * rendering/RenderElement.cpp:
20         (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
21
22 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
23
24         Null dereference loading Blink layout test editing/execCommand/crash-replacing-list-by-list.html
25         https://bugs.webkit.org/show_bug.cgi?id=149288
26         <rdar://problem/22746310>
27
28         Reviewed by Chris Dumez.
29
30         This is a merge of Blink r170821:
31         https://codereview.chromium.org/220233013
32
33         Test: editing/execCommand/crash-replacing-list-by-list.html
34
35         * editing/ReplaceSelectionCommand.cpp:
36         (WebCore::ReplaceSelectionCommand::insertAsListItems):
37
38 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
39
40         Null dereference loading Blink layout test editing/execCommand/insert-image-changing-visibility-crash.html
41         https://bugs.webkit.org/show_bug.cgi?id=150208
42         <rdar://problem/23137109>
43
44         Reviewed by Chris Dumez.
45
46         This is a merge from Blink r168502:
47         https://codereview.chromium.org/183893018
48
49         Test: editing/execCommand/insert-image-changing-visibility-crash.html
50
51         * editing/ReplaceSelectionCommand.cpp:
52         (WebCore::ReplaceSelectionCommand::doApply):
53         We should check again the visibility of the inserted position again since
54         the replacement might change the visibility.
55
56 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
57
58         Null dereference loading Blink layout test editing/execCommand/insert-ordered-list-crash.html
59         https://bugs.webkit.org/show_bug.cgi?id=150209
60         <rdar://problem/23137198>
61
62         Reviewed by Chris Dumez.
63
64         This is a merge from Blink r168006:
65         https://codereview.chromium.org/181283002
66
67         Test: editing/execCommand/insert-ordered-list-crash.html
68
69         * editing/InsertListCommand.cpp:
70         (WebCore::InsertListCommand::doApply):
71         setEndingSelection() might change endingSelection(), we should check again.
72
73 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
74
75         Null dereference loading Blink layout test editing/execCommand/insert-html-to-document-element-crash.html
76         https://bugs.webkit.org/show_bug.cgi?id=149294
77         <rdar://problem/22746657>
78
79         Reviewed by Darin Adler.
80
81         This is a merge of Blink r175019:
82         https://codereview.chromium.org/300143012
83
84         Test: editing/execCommand/insert-html-to-document-element-crash.html
85
86         * editing/ReplaceSelectionCommand.cpp:
87         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
88         check nullable value |element->parentNode()| before using it.
89
90 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
91
92         Null dereference loading Blink layout test editing/execCommand/indent-nested-blockquotes-crash.html
93         https://bugs.webkit.org/show_bug.cgi?id=149291
94         <rdar://problem/22746473>
95
96         Reviewed by Darin Adler.
97
98         This is a merge of Blink r172967:
99         https://codereview.chromium.org/251723003
100
101         Test: editing/execCommand/indent-nested-blockquotes-crash.html
102
103         * editing/CompositeEditCommand.cpp:
104         (WebCore::CompositeEditCommand::insertNodeAfter):
105
106 2015-10-26  Brady Eidson  <beidson@apple.com>
107
108         Modern IDB: Backing store objectStores (plumbing for b/150468).
109         https://bugs.webkit.org/show_bug.cgi?id=150543
110
111         Reviewed by Alex Christensen.
112
113         No new tests (No change in behavior, plumbing for future testability)
114
115         * CMakeLists.txt:
116         * WebCore.xcodeproj/project.pbxproj:
117
118         * Modules/indexeddb/server/IDBBackingStore.h:
119
120         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
121         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewObjectStore):
122         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
123         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
124         (WebCore::IDBServer::MemoryBackingStoreTransaction::finish):
125         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
126         (WebCore::IDBServer::MemoryBackingStoreTransaction::isWriting):
127
128         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
129         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
130         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
131         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
132
133         * Modules/indexeddb/server/MemoryObjectStore.cpp:
134         (WebCore::IDBServer::MemoryObjectStore::create):
135         (WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
136         (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
137         (WebCore::IDBServer::MemoryObjectStore::writeTransactionStarted):
138         (WebCore::IDBServer::MemoryObjectStore::writeTransactionFinished):
139         * Modules/indexeddb/server/MemoryObjectStore.h:
140         (WebCore::IDBServer::MemoryObjectStore::info):
141
142         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
143         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
144
145         * Modules/indexeddb/shared/IDBError.cpp:
146         (WebCore::idbErrorName):
147         (WebCore::idbErrorDescription):
148         * Modules/indexeddb/shared/IDBError.h:
149
150 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
151
152         Null dereference loading Blink layout test editing/execCommand/indent-inline-box-crash.html
153         https://bugs.webkit.org/show_bug.cgi?id=149290
154         <rdar://problem/22746435>
155
156         Reviewed by Alex Christensen.
157
158         This is a merge of Blink r174952:
159         https://codereview.chromium.org/297203004
160
161         Test: editing/execCommand/indent-inline-box-crash.html
162
163         * editing/IndentOutdentCommand.cpp:
164         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
165
166 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
167
168         Null dereference loading Blink layout test editing/execCommand/indent-no-visible-contents-crash.html
169         https://bugs.webkit.org/show_bug.cgi?id=149292
170         <rdar://problem/22746530>
171
172         Reviewed by Alex Christensen.
173
174         This is a merge of Blink r176735:
175         https://codereview.chromium.org/349143002
176
177         Test: editing/execCommand/indent-no-visible-contents-crash.html
178
179         * editing/CompositeEditCommand.cpp:
180         (WebCore::CompositeEditCommand::moveParagraphWithClones):
181         Sometimes callers of this method will pass null startOfParagraphToMove || endOfParagraphToMove,
182         hence check them before proceeding.
183
184 2015-10-26  Anders Carlsson  <andersca@apple.com>
185
186         Remove dead context menu code
187         https://bugs.webkit.org/show_bug.cgi?id=150567
188
189         Reviewed by Tim Horton.
190
191         * loader/EmptyClients.h:
192         * page/ContextMenuClient.h:
193         * page/ContextMenuController.cpp:
194         (WebCore::ContextMenuController::showContextMenu): Deleted.
195
196 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
197
198         Implement 'round' and 'space' values for border-image
199         https://bugs.webkit.org/show_bug.cgi?id=14185
200
201         Reviewed by Tim Horton.
202         
203         Add support for "round" and "space" values for border-image-repeat.
204         Following "stretch" and "repeat", the code is added to Image::drawTiled().
205         
206         For "round", we compute an integral number of copies of the image that fit,
207         and then adjust the tile scale.
208         
209         For "space", we also compute an integral number N of copies that will fit,
210         and then divide the remaining space amongst N+1 gaps, adjusting the tiling
211         phase so that with an even number of images, a gap is centered.
212
213         Tests: fast/borders/border-image-round.html
214                fast/borders/border-image-space.html
215
216         * platform/graphics/Image.cpp:
217         (WebCore::Image::drawTiled):
218         * platform/graphics/cg/GraphicsContextCG.cpp:
219         (WebCore::GraphicsContext::drawPattern):
220
221 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
222
223         Incorrect repeated background-size behavior in keyframes
224         https://bugs.webkit.org/show_bug.cgi?id=150309
225
226         Reviewed by Zalan Bujtas.
227         
228         After computing the style for a keyframe, we failed to propagate unset
229         fill-layer properties to all layers, which caused incorrect behavior when
230         there were multiple background images, but only one value on a background
231         property in the keyframes.
232         
233         Fix by calling adjustRenderStyle() on keyframe styles, which invokes
234         style.adjustBackgroundLayers() which fixes the bug.
235
236         Test: animations/multiple-backgrounds.html
237
238         * css/StyleResolver.cpp:
239         (WebCore::StyleResolver::styleForKeyframe):
240
241 2015-10-26  Chris Dumez  <cdumez@apple.com>
242
243         Indexing an object with an integer that is not a supported property index should not call the named property getter
244         https://bugs.webkit.org/show_bug.cgi?id=148871
245         <rdar://problem/22589952>
246
247         Reviewed by Darin Adler.
248
249         Indexing an object with an integer that is not a supported property
250         index should not call the named property getter, as per the Web IDL
251         specification:
252         https://heycam.github.io/webidl/#idl-indexed-properties (Note in blue)
253
254         Firefox and Chrome both already behave according to the specification
255         here so this patch aligns our behavior with other browsers as well.
256
257         No new tests, already covered by existing test.
258
259         * bindings/scripts/CodeGeneratorJS.pm:
260         (GenerateGetOwnPropertySlotBody):
261         (GenerateImplementation):
262         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
263         (WebCore::JSTestEventTarget::getOwnPropertySlot):
264         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex): Deleted.
265         (WebCore::jsTestEventTargetConstructor): Deleted.
266
267 2015-10-26  Xabier Rodriguez Calvar  <calvaris@igalia.com>
268
269         [Streams API] Implement abort method on writable streams
270         https://bugs.webkit.org/show_bug.cgi?id=150444
271
272         Reviewed by Darin Adler.
273
274         Abort method on writable streams implemented according to the spec.
275
276         Current test set suffices. Expectations are updated accordingly.
277
278         * Modules/streams/StreamInternals.js:
279         (promiseInvokeOrFallbackOrNoop): Implemented according to the spec.
280         * Modules/streams/WritableStream.js:
281         (abort): Implemented according to the spec.
282
283 2015-10-25  Hunseop Jeong  <hs85.jeong@samsung.com>
284
285         Use modern for-loops in WebCore/editing.
286         https://bugs.webkit.org/show_bug.cgi?id=150354
287
288         Reviewed by Darin Adler.
289
290         No new tests because there is no behavior change.
291
292         * editing/AlternativeTextController.cpp:
293         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
294         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
295         (WebCore::AlternativeTextController::rootViewRectForRange):
296         (WebCore::AlternativeTextController::markCorrection):
297         * editing/ApplyStyleCommand.cpp:
298         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
299         (WebCore::dummySpanAncestorForNode):
300         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
301         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
302         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
303         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
304         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
305         (WebCore::ApplyStyleCommand::joinChildTextNodes):
306         * editing/CompositeEditCommand.cpp:
307         (WebCore::EditCommandComposition::reapply):
308         (WebCore::EditCommandComposition::getNodesInCommand):
309         (WebCore::CompositeEditCommand::removeChildrenInRange):
310         (WebCore::CompositeEditCommand::removeNode):
311         (WebCore::copyMarkers):
312         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
313         (WebCore::CompositeEditCommand::deleteInsignificantText):
314         * editing/DictationCommand.cpp:
315         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
316         (WebCore::DictationCommand::collectDictationAlternativesInRange):
317         * editing/EditingStyle.cpp:
318         (WebCore::isEditingProperty):
319         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
320         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
321         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
322         (WebCore::styleFromMatchedRulesForElement):
323         (WebCore::diffTextDecorations):
324         * editing/Editor.cpp:
325         (WebCore::Editor::setComposition):
326         (WebCore::Editor::markAndReplaceFor):
327         * editing/EditorCommand.cpp:
328         (WebCore::createCommandMap):
329         * editing/MarkupAccumulator.cpp:
330         (WebCore::MarkupAccumulator::totalLength):
331         * editing/MergeIdenticalElementsCommand.cpp:
332         (WebCore::MergeIdenticalElementsCommand::doApply):
333         (WebCore::MergeIdenticalElementsCommand::doUnapply):
334         * editing/ReplaceSelectionCommand.cpp:
335         (WebCore::ReplacementFragment::removeUnrenderedNodes):
336         (WebCore::ReplacementFragment::removeInterchangeNodes):
337         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
338         (WebCore::removeHeadContents):
339         * editing/SpellChecker.cpp:
340         (WebCore::SpellChecker::~SpellChecker):
341         (WebCore::SpellChecker::client):
342         (WebCore::SpellChecker::enqueueRequest):
343         * editing/SplitElementCommand.cpp:
344         (WebCore::SplitElementCommand::executeApply):
345         (WebCore::SplitElementCommand::doApply):
346         (WebCore::SplitElementCommand::doUnapply):
347         * editing/TextCheckingHelper.cpp:
348         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
349         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
350         * editing/WrapContentsInDummySpanCommand.cpp:
351         (WebCore::WrapContentsInDummySpanCommand::executeApply):
352         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
353         * editing/ios/EditorIOS.mm:
354         (WebCore::Editor::createFragmentAndAddResources):
355         * editing/mac/EditorMac.mm:
356         (WebCore::Editor::WebContentReader::readFilenames):
357         (WebCore::Editor::createFragmentAndAddResources):
358         * editing/markup.cpp:
359         (WebCore::completeURLs):
360
361 2015-10-25  Simon Fraser  <simon.fraser@apple.com>
362
363         Support bezier paths in clip-path property
364         https://bugs.webkit.org/show_bug.cgi?id=149996
365
366         Reviewed by Darin Adler.
367         
368         Support path() in the -webkit-clip-path property, as specified in
369         https://drafts.csswg.org/css-shapes-2/#supported-basic-shapes
370         
371         Added BasicShapePath and CSSBasicShapePath, which both represent the path
372         as a SVGPathByteStream and wind rule.
373         
374         Make BasicShape::canBlend() a virtual function, and implement it on each subclass.
375         Make various BasicShape subclass function overrides private, other than windRule()
376         wich is called on derived classes in a few places.
377         
378         Add SVGPathBlender::canBlendPaths() which returns true if the given paths can be
379         interpolated. Uses the same logic as blendAnimatedPath(), without doing any interpolation.
380         
381         RenderElement::createsGroup() is fixed to have clip-path trigger a group,
382         which fixes rendering of clip-path with a descendant compositing layer.
383
384         Tests: compositing/masks/clip-path-composited-descendent.html
385                css3/masking/clip-path-with-path.html
386                transitions/clip-path-path-transitions.html
387
388         * css/BasicShapeFunctions.cpp:
389         (WebCore::valueForBasicShape):
390         (WebCore::basicShapeForValue):
391         * css/CSSBasicShapes.cpp:
392         (WebCore::CSSBasicShapePath::CSSBasicShapePath):
393         (WebCore::CSSBasicShapePath::pathData):
394         (WebCore::buildPathString):
395         (WebCore::CSSBasicShapePath::cssText):
396         (WebCore::CSSBasicShapePath::equals):
397         * css/CSSBasicShapes.h:
398         * css/CSSParser.cpp:
399         (WebCore::CSSParser::parseBasicShapePath):
400         (WebCore::CSSParser::parseBasicShape):
401         * css/CSSParser.h:
402         * rendering/RenderElement.h:
403         (WebCore::RenderElement::createsGroup):
404         * rendering/style/BasicShapes.cpp:
405         (WebCore::BasicShapeCircle::canBlend):
406         (WebCore::BasicShapeEllipse::canBlend):
407         (WebCore::BasicShapePolygon::canBlend):
408         (WebCore::BasicShapePath::BasicShapePath):
409         (WebCore::BasicShapePath::path):
410         (WebCore::BasicShapePath::operator==):
411         (WebCore::BasicShapePath::canBlend):
412         (WebCore::BasicShapePath::blend):
413         (WebCore::BasicShapeInset::canBlend):
414         (WebCore::BasicShape::canBlend): Deleted.
415         * rendering/style/BasicShapes.h:
416         * svg/SVGPathBlender.cpp:
417         (WebCore::SVGPathBlender::addAnimatedPath):
418         (WebCore::SVGPathBlender::blendAnimatedPath):
419         (WebCore::SVGPathBlender::canBlendPaths):
420         (WebCore::SVGPathBlender::SVGPathBlender):
421         (WebCore::SVGPathBlender::blendMoveToSegment):
422         (WebCore::SVGPathBlender::blendLineToSegment):
423         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
424         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
425         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
426         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
427         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
428         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
429         (WebCore::SVGPathBlender::blendArcToSegment):
430         * svg/SVGPathBlender.h:
431         * svg/SVGPathByteStream.h:
432         (WebCore::SVGPathByteStream::operator==):
433         * svg/SVGPathUtilities.cpp:
434         (WebCore::canBlendSVGPathByteStreams):
435         * svg/SVGPathUtilities.h:
436
437 2015-10-25  Gwang Yoon Hwang  <yoon@igalia.com>
438
439         [TexMap] Fix a misused flag for GstGL
440         https://bugs.webkit.org/show_bug.cgi?id=150545
441
442         Reviewed by Žan Doberšek.
443
444         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
445         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
446         We should pass TextureMapperGL::Flags to the TextureMapperGL::drawTexture instead of
447         BitmapTexture::Flags.
448
449 2015-10-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
450
451         Use ImplementedAs for MediaDevices.getUserMediaFromJS
452         https://bugs.webkit.org/show_bug.cgi?id=150439
453
454         Reviewed by Darin Adler.
455
456         No change in behavior.
457
458         * Modules/mediastream/MediaDevices.h: Removing getUserMediaFromJS C++ function.
459         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS as ImplementedAS=getUserMedia
460
461 2015-10-24  Gwang Yoon Hwang  <yoon@igalia.com>
462
463         Remove setApplyDeviceScaleFactorInCompositor
464         https://bugs.webkit.org/show_bug.cgi?id=150538
465
466         Reviewed by Tim Horton.
467
468         It was used to support the device scale factor for chromium port and blackberry
469         port. But it was removed quite a while ago.
470
471         * page/Settings.in:
472         applyDeviceScaleFactorInCompositor: Deleted
473         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
474         (WebCore::CompositingCoordinator::CompositingCoordinator): Remove uses
475         of applyDeviceScaleFactorInCompositor.
476
477 2015-10-24  Tim Horton  <timothy_horton@apple.com>
478
479         Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
480         https://bugs.webkit.org/show_bug.cgi?id=150525
481
482         Reviewed by Darin Adler.
483
484         Adjusted API test to cover this: WKWebView.EvaluateJavaScriptErrorCases.
485
486         * bindings/js/JSDOMBinding.cpp:
487         (WebCore::reportException):
488         * bindings/js/JSDOMBinding.h:
489         Fill in the given struct with computed exception data if it was given.
490
491         * bindings/js/ScriptController.cpp:
492         (WebCore::ScriptController::evaluateInWorld):
493         (WebCore::ScriptController::evaluate):
494         (WebCore::ScriptController::executeScript):
495         * bindings/js/ScriptController.h:
496         Plumb aforementioned struct through ScriptController.
497
498 2015-10-24  Gwang Yoon Hwang  <yoon@igalia.com>
499
500         [TexMap] Clean up BitmapTexture and BitmapTextureGL.
501         https://bugs.webkit.org/show_bug.cgi?id=143298
502
503         Reviewed by Žan Doberšek.
504
505         No new tests, this is just a refactor.
506
507         * platform/graphics/texmap/BitmapTexture.h:
508         (WebCore::BitmapTexture::canReuseWith): Deleted.
509         Reuseability of a BitmapTexture is only decided by its size.
510         We can use size() instead of this method.
511
512         * platform/graphics/texmap/BitmapTextureGL.h:
513         (WebCore::driverSupportsExternalTextureBGRA): Deleted.
514         We do not have to check a suitable texture format in every
515         update/reset. It is enough to store the formats in construction time
516         and reuse them.
517
518 2015-10-24  Simon Fraser  <simon.fraser@apple.com>
519
520         REGRESSION (r187121): Delayed instantaneous animations not honouring ' forwards' fill-mode
521         https://bugs.webkit.org/show_bug.cgi?id=150326
522
523         Reviewed by Darin Adler.
524         
525         With a zero-duration, delayed fill-forwards animation, we'd end up trying
526         to interpolate between the last and first keyframes, and picking the first
527         because AnimationBase::progress() had a special case for zero duration. Removing
528         this check fixes the bug.
529
530         Test: animations/fill-mode-forwards-zero-duration.html
531
532         * page/animation/AnimationBase.cpp:
533         (WebCore::AnimationBase::progress):
534
535 2015-10-23  Chris Dumez  <cdumez@apple.com>
536
537         RadioNodeList should be exposed on Window
538         https://bugs.webkit.org/show_bug.cgi?id=148869
539         <rdar://problem/22589828>
540
541         Reviewed by Ryosuke Niwa.
542
543         RadioNodeList should be exposed on on the global Window object, as per
544         the HTML specification:
545         https://html.spec.whatwg.org/multipage/infrastructure.html#radionodelist
546
547         This patch addresses the issue, and aligns our behavior with Firefox
548         and Chrome.
549
550         No new tests, already covered by existing tests.
551
552         * html/RadioNodeList.idl:
553
554 2015-10-23  Joseph Pecoraro  <pecoraro@apple.com>
555
556         Web Inspector: Remove unused ScrollLayer Timeline EventType
557         https://bugs.webkit.org/show_bug.cgi?id=150518
558
559         Reviewed by Timothy Hatcher.
560
561         * inspector/InspectorInstrumentation.cpp:
562         (WebCore::InspectorInstrumentation::willScrollLayerImpl): Deleted.
563         (WebCore::InspectorInstrumentation::didScrollLayerImpl): Deleted.
564         * inspector/InspectorInstrumentation.h:
565         (WebCore::InspectorInstrumentation::willScrollLayer): Deleted.
566         (WebCore::InspectorInstrumentation::didScrollLayer): Deleted.
567         * inspector/InspectorTimelineAgent.cpp:
568         (WebCore::InspectorTimelineAgent::willScroll): Deleted.
569         (WebCore::InspectorTimelineAgent::didScroll): Deleted.
570         * inspector/InspectorTimelineAgent.h:
571         * rendering/RenderLayer.cpp:
572         (WebCore::RenderLayer::scrollTo): Deleted.
573
574 2015-10-23  Joseph Pecoraro  <pecoraro@apple.com>
575
576         Web Inspector: Clean up InspectorInstrumentation includes
577         https://bugs.webkit.org/show_bug.cgi?id=150523
578
579         Reviewed by Timothy Hatcher.
580
581         * Modules/webdatabase/DatabaseManager.cpp:
582         * WebCore.vcxproj/WebCore.vcxproj:
583         * WebCore.vcxproj/WebCore.vcxproj.filters:
584         * WebCore.xcodeproj/project.pbxproj:
585         * css/MediaQueryEvaluator.cpp:
586         * dom/EventDispatcher.cpp:
587         * dom/ExtensionStyleSheets.cpp:
588         * inspector/InspectorController.h:
589         * inspector/InspectorDOMDebuggerAgent.cpp:
590         * inspector/InspectorDatabaseInstrumentation.h: Removed.
591         * inspector/InspectorInstrumentation.h:
592         (WebCore::InspectorInstrumentation::didOpenDatabase):
593         * inspector/InspectorPageAgent.cpp:
594         * inspector/InspectorTimelineAgent.cpp:
595         (WebCore::toProtocol): Deleted.
596         * loader/ResourceLoadScheduler.cpp:
597         * loader/mac/ResourceLoaderMac.mm:
598         * page/Screen.cpp:
599         * rendering/TextAutosizer.cpp:
600         * testing/Internals.cpp:
601         (WebCore::Internals::consoleMessageArgumentCounts): Deleted.
602         * testing/Internals.h:
603         * testing/Internals.idl:
604         * workers/AbstractWorker.cpp:
605
606 2015-10-23  Simon Fraser  <simon.fraser@apple.com>
607
608         Avoid SVG-induced layouts inside Element::absoluteEventBounds()
609         https://bugs.webkit.org/show_bug.cgi?id=150516
610
611         Reviewed by Zalan Bujtas.
612
613         Speculative fix for a crash under RenderObject::localToContainerQuad() when
614         computing the wheel event handler region, which uses Element::absoluteEventHandlerBounds().
615         Element::absoluteEventBounds() was calling SVGElement::getBoundingBox() in a way
616         that could trigger a layout.
617
618         * dom/Element.cpp:
619         (WebCore::Element::absoluteEventBounds):
620
621 2015-10-23  Alex Christensen  <achristensen@webkit.org>
622
623         Progress towards CMake on Mac
624         https://bugs.webkit.org/show_bug.cgi?id=150517
625
626         Reviewed by Tim Horton.
627
628         * PlatformMac.cmake:
629
630 2015-10-23  Per Arne Vollan  <peavo@outlook.com>
631
632         [WinCairo] Improve test results for fast layouttests.
633         https://bugs.webkit.org/show_bug.cgi?id=150464
634
635         Reviewed by Alex Christensen.
636
637         Disable the Mac ascent hack for WinCairo.
638
639         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
640         (WebCore::Font::platformInit):
641
642 2015-10-23  Simon Fraser  <simon.fraser@apple.com>
643
644         REGRESSION (r187121): Multiple-keyframe animations not honouring ' forwards' fill-mode
645         https://bugs.webkit.org/show_bug.cgi?id=150328
646
647         Reviewed by Dean Jackson.
648         
649         AnimationBase::getElapsedTime() for a finished animation would return 1 (a progress),
650         rather than a time value as the caller expects. Fix it to return the total duration
651         if the animation has finished. This fixes the bug.
652         
653         Change CompositeAnimation::pauseAnimationAtTime() to be more permissive, allowing
654         testing of filling-forwards animations with the pause API.
655
656         Test: animations/fill-forwards-end-state.html
657
658         * page/animation/AnimationBase.cpp:
659         (WebCore::AnimationBase::getElapsedTime):
660         * page/animation/CompositeAnimation.cpp:
661         (WebCore::CompositeAnimation::pauseAnimationAtTime):
662
663 2015-10-23  Chris Dumez  <cdumez@apple.com>
664
665         A label element not in a document should not label an element in a document
666         https://bugs.webkit.org/show_bug.cgi?id=148863
667         <rdar://problem/22589300>
668
669         Reviewed by Ryosuke Niwa.
670
671         As per the HTML specification, a label element's 'for' attribute may be
672         specified to indicate a form control with which the caption is to be
673         associated. If the attribute is specified, the attribute's value must
674         be the ID of a labelable element in the same Document as the label
675         element:
676         https://html.spec.whatwg.org/multipage/forms.html#attr-label-for
677
678         However, our code was failing to check if the label element was actually
679         in the document before calling document.getElementById(). In such case,
680         we would potentially return a labelable Element that is not in the same
681         document as the label Element. This patch fixes the problem.
682
683         The new behavior is consistent with Firefox.
684
685         No new tests, already covered by existing test.
686
687         * html/HTMLLabelElement.cpp:
688         (WebCore::HTMLLabelElement::control):
689
690 2015-10-23  Antoine Quint  <graouts@apple.com>
691
692         Support for SVG `beginEvent` event and `onbegin` attribute
693         https://bugs.webkit.org/show_bug.cgi?id=150442
694
695         Reviewed by Dean Jackson.
696
697         Add support for the SVG `beginEvent` event, which is fired as an SVG timing element enters its active interval.
698         Also add support for the SVG `onbegin` attribute which allows the definition of a JS event listener declaratively
699         for the SVG `beginEvent` event.
700
701         Tests: svg/animations/begin-event-attribute.svg
702                svg/animations/begin-event-script.svg
703                svg/animations/begin-event-syncbase.svg
704
705         * dom/EventNames.h:
706         * svg/animation/SVGSMILElement.cpp:
707         (WebCore::smilBeginEventSender):
708         (WebCore::smilEndEventSender):
709         (WebCore::SVGSMILElement::~SVGSMILElement):
710         (WebCore::SVGSMILElement::parseAttribute):
711         (WebCore::SVGSMILElement::progress):
712         (WebCore::SVGSMILElement::dispatchPendingEvent):
713         * svg/svgattrs.in:
714
715 2015-10-23  Hyemi Shin  <hyemi.sin@samsung.com>
716
717         ConvolverNode.buffer must have same sample-rate as the AudioContext 
718         https://bugs.webkit.org/show_bug.cgi?id=150385 
719
720         Reviewed by Chris Dumez.
721
722         ConvolverNode.buffer must be of the same sample-rate as the AudioContext
723         or an NOT_SUPPORTED_ERR exception MUST be thrown.
724
725         Test : webaudio/convolver-setBuffer-different-samplerate.html
726
727         * Modules/webaudio/ConvolverNode.cpp:
728         (WebCore::ConvolverNode::setBuffer):
729         * Modules/webaudio/ConvolverNode.h:
730         * Modules/webaudio/ConvolverNode.idl:
731
732 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
733
734         [OS X] Migrate GraphicsContext::drawLineForDocumentMarker() away from LocalCurrentGraphicsContext
735         https://bugs.webkit.org/show_bug.cgi?id=150483
736
737         Reviewed by Simon Fraser.
738
739         LocalCurrentGraphicsContext is an ugly hack to work around the problem that many NS* functions
740         operate on the current context rather than a context passed as an argument. This patch
741         migrates from NSRectFillUsingOperation() which has this behavior to CGContextDrawTiledImage()
742         which performs the same operation but with a passed-in CGContextRef. An added benefit is that
743         we don't have to mess around with pattern-based NSColors. 
744
745         No new tests because there is no behavior change.
746
747         * platform/graphics/mac/GraphicsContextMac.mm:
748         (WebCore::findImage):
749         (WebCore::GraphicsContext::updateDocumentMarkerResources):
750         (WebCore::GraphicsContext::drawLineForDocumentMarker):
751         (WebCore::makePatternColor): Deleted.
752
753 2015-10-22  Sam Weinig  <sam@webkit.org>
754
755         Navigations on the same host (but with different schemes and ports) should not trigger universal links
756         <rdar://problem/22811325>
757         https://bugs.webkit.org/show_bug.cgi?id=150481
758
759         Reviewed by Dan Bernstein.
760
761         Add new helper which efficiently compares the hosts of two URLs.
762
763         * platform/URL.cpp:
764         (WebCore::hostsAreEqual):
765         * platform/URL.h:
766
767 2015-10-22  Joseph Pecoraro  <pecoraro@apple.com>
768
769         Web Inspector: Remove unused Timeline GCEvent Record type
770         https://bugs.webkit.org/show_bug.cgi?id=150477
771
772         Reviewed by Timothy Hatcher.
773
774         This event is dispatched through the Heap domain, not Timelines.
775
776         * inspector/TimelineRecordFactory.cpp:
777         (WebCore::TimelineRecordFactory::createGCEventData): Deleted.
778         * inspector/TimelineRecordFactory.h:
779
780 2015-10-22  Gordon Sheridan  <gordon_sheridan@apple.com>
781
782         Fix build for clang-700.0.59.5 by replacing deprecated calls to convert points between screen and window coordinates for Mac.
783         https://bugs.webkit.org/show_bug.cgi?id=150379
784
785         Reviewed by Andy Estes.
786
787         Provide WAKWindow versions of the non-deprecated methods for converting an NSRect between
788         window and screen coordinates, which replace the deprecated methods that operated on an NSPoint.
789
790         * platform/ios/wak/WAKWindow.h:
791         * platform/ios/wak/WAKWindow.mm:
792         (-[WAKWindow convertRectToScreen:]): Added.
793         (-[WAKWindow convertRectFromScreen:]): Added.
794
795 2015-10-22  Alex Christensen  <achristensen@webkit.org>
796
797         Fix Mac CMake build after r191433.
798
799         * PlatformMac.cmake:
800         Use CMakeLists.txt to generate UserAgentScripts.h and cpp.
801
802 2015-10-22  Daniel Bates  <dabates@apple.com>
803
804         Unreviewed, rolling out r191113.
805
806         Rollout r144451 since it regressed the visibility of the
807         search cancel button when a search field is empty or showing
808         placeholder text. Further investigation is needed.
809
810         Reverted changeset:
811
812         "[iOS] DOM click event may not be dispatched when page has
813         :active style and <input type="search">"
814         https://bugs.webkit.org/show_bug.cgi?id=144451
815         http://trac.webkit.org/changeset/191113
816
817 2015-10-22  Simon Fraser  <simon.fraser@apple.com>
818
819         Add ways to log to log channels via a functional syntax, and via a TextStream
820         https://bugs.webkit.org/show_bug.cgi?id=150472
821  
822         Reviewed by Tim Horton.
823  
824         Make it possible to write to a WTFLogChannel with a std::function that returns
825         a const char*, and with stream syntax.
826  
827         Enhance TextStream to allow it to generate single-line output.
828
829         * platform/Logging.cpp:
830         (WebCore::logFunctionResult):
831         * platform/Logging.h:
832         * platform/text/TextStream.cpp:
833         (WebCore::TextStream::startGroup):
834         (WebCore::TextStream::endGroup):
835         (WebCore::TextStream::nextLine):
836         (WebCore::TextStream::writeIndent):
837         * platform/text/TextStream.h:
838         (WebCore::TextStream::TextStream):
839
840 2015-10-22  Alex Christensen  <achristensen@webkit.org>
841
842         Progress towards CMake on Mac
843         https://bugs.webkit.org/show_bug.cgi?id=150466
844
845         Reviewed by Chris Dumez.
846
847         * PlatformMac.cmake:
848         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
849         (WebCore::createAndStoreMasterKey):
850         * page/mac/WheelEventDeltaFilterMac.mm:
851         * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
852
853 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
854
855         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
856         https://bugs.webkit.org/show_bug.cgi?id=150460
857
858         Reviewed by Tim Horton.
859
860         No reason to use WKSI for these calls.
861
862         No new tests because there is no behavior change.
863
864         * platform/graphics/cg/GraphicsContextCG.cpp:
865         (WebCore::GraphicsContext::applyStrokePattern):
866         (WebCore::GraphicsContext::applyFillPattern):
867         (WebCore::GraphicsContext::setPlatformShadow):
868         * platform/graphics/cg/GraphicsContextCG.h:
869         (WebCore::getUserToBaseCTM):
870         * platform/graphics/cg/ImageBufferCG.cpp:
871         (WebCore::ImageBuffer::putByteArray):
872         * platform/graphics/mac/GraphicsContextMac.mm:
873         (WebCore::setPatternPhaseInUserSpace):
874         (WebCore::GraphicsContext::drawLineForDocumentMarker):
875         * platform/ios/WebCoreSystemInterfaceIOS.mm:
876         * platform/mac/WebCoreSystemInterface.h:
877         * platform/mac/WebCoreSystemInterface.mm:
878
879 2015-10-22  Brady Eidson  <beidson@apple.com>
880
881         Modern IDB: Basic createObjectStore implementation.
882         https://bugs.webkit.org/show_bug.cgi?id=150455
883
884         Reviewed by Alex Christensen.
885
886         Tests: storage/indexeddb/modern/createobjectstore-basic.html
887                storage/indexeddb/modern/createobjectstore-failures.html
888
889         * CMakeLists.txt:
890         * WebCore.xcodeproj/project.pbxproj:
891
892         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
893         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
894         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
895         * Modules/indexeddb/client/IDBConnectionToServer.h:
896         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
897         
898         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
899         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
900         (WebCore::IDBClient::IDBDatabase::createObjectStore):
901         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
902         * Modules/indexeddb/client/IDBDatabaseImpl.h:
903         (WebCore::IDBClient::IDBDatabase::serverConnection):
904         
905         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Added.
906         (WebCore::IDBClient::IDBObjectStore::create):
907         (WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
908         (WebCore::IDBClient::IDBObjectStore::~IDBObjectStore):
909         (WebCore::IDBClient::IDBObjectStore::id):
910         (WebCore::IDBClient::IDBObjectStore::name):
911         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
912         (WebCore::IDBClient::IDBObjectStore::keyPath):
913         (WebCore::IDBClient::IDBObjectStore::indexNames):
914         (WebCore::IDBClient::IDBObjectStore::transaction):
915         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
916         (WebCore::IDBClient::IDBObjectStore::add):
917         (WebCore::IDBClient::IDBObjectStore::put):
918         (WebCore::IDBClient::IDBObjectStore::openCursor):
919         (WebCore::IDBClient::IDBObjectStore::get):
920         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
921         (WebCore::IDBClient::IDBObjectStore::clear):
922         (WebCore::IDBClient::IDBObjectStore::createIndex):
923         (WebCore::IDBClient::IDBObjectStore::index):
924         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
925         (WebCore::IDBClient::IDBObjectStore::count):
926         * Modules/indexeddb/client/IDBObjectStoreImpl.h: Added.
927
928         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
929         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
930
931         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
932         (WebCore::IDBClient::IDBTransaction::serverConnection):
933         (WebCore::IDBClient::IDBTransaction::objectStore):
934         (WebCore::IDBClient::IDBTransaction::scheduleOperation):
935         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
936         (WebCore::IDBClient::IDBTransaction::finishAbortOrCommit):
937         (WebCore::IDBClient::IDBTransaction::didAbort):
938         (WebCore::IDBClient::IDBTransaction::didCommit):
939         (WebCore::IDBClient::IDBTransaction::createObjectStore):
940         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
941         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
942         * Modules/indexeddb/client/IDBTransactionImpl.h:
943         (WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
944         (WebCore::IDBClient::IDBTransaction::isVersionChange):
945         
946         * Modules/indexeddb/client/TransactionOperation.h: Added.
947         (WebCore::IDBClient::TransactionOperation::perform):
948         (WebCore::IDBClient::TransactionOperation::completed):
949         (WebCore::IDBClient::TransactionOperation::identifier):
950         (WebCore::IDBClient::TransactionOperation::transactionIdentifier):
951         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
952         (WebCore::IDBClient::createTransactionOperation):
953         
954         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
955         (WebCore::IDBServer::IDBConnectionToClient::didCreateObjectStore):
956         * Modules/indexeddb/server/IDBConnectionToClient.h:
957         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
958         
959         * Modules/indexeddb/server/IDBServer.cpp:
960         (WebCore::IDBServer::IDBServer::createObjectStore):
961         * Modules/indexeddb/server/IDBServer.h:
962         
963         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
964         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
965         (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
966         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
967         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
968         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
969         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): Deleted.
970         * Modules/indexeddb/server/UniqueIDBDatabase.h:
971         
972         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
973         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore):
974         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
975         
976         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
977         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isVersionChange):
978         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
979         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
980         
981         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
982         (WebCore::IDBDatabaseInfo::hasObjectStore):
983         (WebCore::IDBDatabaseInfo::createNewObjectStore):
984         (WebCore::IDBDatabaseInfo::addExistingObjectStore):
985         (WebCore::IDBDatabaseInfo::objectStoreNames):
986         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
987         
988         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp.
989         (WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
990         (WebCore::IDBObjectStoreInfo::isolatedCopy):
991         * Modules/indexeddb/shared/IDBObjectStoreInfo.h: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h.
992         (WebCore::IDBObjectStoreInfo::identifier):
993         (WebCore::IDBObjectStoreInfo::name):
994         (WebCore::IDBObjectStoreInfo::keyPath):
995         (WebCore::IDBObjectStoreInfo::autoIncrement):
996
997         * Modules/indexeddb/shared/IDBRequestData.cpp:
998         (WebCore::IDBRequestData::IDBRequestData):
999         (WebCore::IDBRequestData::requestIdentifier):
1000         (WebCore::IDBRequestData::transactionIdentifier):
1001         * Modules/indexeddb/shared/IDBRequestData.h:
1002         (WebCore::IDBRequestData::databaseIdentifier):
1003         (WebCore::IDBRequestData::requestIdentifier): Deleted.
1004
1005         * Modules/indexeddb/shared/IDBResultData.cpp:
1006         (WebCore::IDBResultData::IDBResultData):
1007         (WebCore::IDBResultData::createObjectStoreSuccess):
1008         * Modules/indexeddb/shared/IDBResultData.h:
1009
1010         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1011         (WebCore::InProcessIDBServer::didCreateObjectStore):
1012         (WebCore::InProcessIDBServer::createObjectStore):
1013         * Modules/indexeddb/shared/InProcessIDBServer.h:
1014
1015         * platform/CrossThreadCopier.cpp:
1016         (WebCore::IDBObjectStoreInfo>::copy):
1017         * platform/CrossThreadCopier.h:
1018
1019 2015-10-22  Alex Christensen  <achristensen@webkit.org>
1020
1021         Initial NSURLSession WebResourceLoader implementation
1022         https://bugs.webkit.org/show_bug.cgi?id=150355
1023
1024         Reviewed by Antti Koivisto.
1025
1026         * platform/network/cf/AuthenticationChallenge.h:
1027         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Export constructor for use in WebKit2.
1028
1029 2015-10-22  Frederic Wang  <fred.wang@free.fr>
1030
1031         [Mac] Add support for the USE_TYPO_METRICS flag
1032         https://bugs.webkit.org/show_bug.cgi?id=150394
1033
1034         Reviewed by Myles C. Maxfield.
1035
1036         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
1037
1038         No new tests because this is already tested by fonts/use-typo-metrics-1.html
1039
1040         * platform/graphics/cocoa/FontCocoa.mm:
1041         (WebCore::fontHasMathTable): Add a function to verify whether a font has a MATH table.
1042         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
1043
1044 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1045
1046         Implement touch-action: manipulation; for iOS
1047         https://bugs.webkit.org/show_bug.cgi?id=149854
1048         <rdar://problem/23017145>
1049
1050         Reviewed by Benjamin Poulain.
1051
1052         Implements the manipulation value for the CSS property touch-action. Adds support for
1053         parsing the touch-action property and two of its values: auto and manipulation.
1054
1055         Tests: css3/touch-action/touch-action-computed-style.html
1056                css3/touch-action/touch-action-manipulation-fast-clicks.html
1057                css3/touch-action/touch-action-parsing.html
1058
1059         * css/CSSComputedStyleDeclaration.cpp:
1060         (WebCore::ComputedStyleExtractor::propertyValue):
1061         * css/CSSParser.cpp:
1062         (WebCore::isValidKeywordPropertyAndValue):
1063         (WebCore::isKeywordPropertyID):
1064         (WebCore::CSSParser::parseValue):
1065         * css/CSSPrimitiveValueMappings.h:
1066         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1067         (WebCore::CSSPrimitiveValue::operator TouchAction):
1068         * css/CSSPropertyNames.in:
1069         * css/CSSValueKeywords.in:
1070         * dom/Element.cpp:
1071         (WebCore::Element::allowsDoubleTapGesture): Here, we determine whether an element that resulted from
1072             hit-testing a touch should allow double-tap gestures. To do this, we walk up the element's parents,
1073             stopping when we detect an element that disallows double tap gestures by having a touch-action other
1074             than auto or by hitting the root node.
1075         * dom/Element.h:
1076         * dom/Node.h:
1077         (WebCore::Node::allowsDoubleTapGesture):
1078         * rendering/style/RenderStyle.h:
1079         * rendering/style/RenderStyleConstants.h:
1080         * rendering/style/StyleRareNonInheritedData.cpp:
1081         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1082         (WebCore::StyleRareNonInheritedData::operator==):
1083         * rendering/style/StyleRareNonInheritedData.h:
1084
1085 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
1086
1087         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
1088         https://bugs.webkit.org/show_bug.cgi?id=150428
1089
1090         Reviewed by Antti Koivisto.
1091
1092         The bug was caused by updateFocusAppearance in WebPage::restoreSelectionInFocusedEditableElement
1093         revealing the focused element which was added in r181972. Fixed the bug by adding an option to
1094         suppress this behavior here.
1095
1096         * dom/Document.cpp:
1097         (WebCore::Document::Document):
1098         (WebCore::Document::updateFocusAppearanceSoon):
1099         * dom/Document.h:
1100         * dom/Element.cpp:
1101         (WebCore::Element::focus):
1102         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
1103         (WebCore::Element::updateFocusAppearance):
1104         * dom/Element.h:
1105         * history/CachedPage.cpp:
1106         (WebCore::CachedPage::restore):
1107         * html/HTMLAreaElement.cpp:
1108         (WebCore::HTMLAreaElement::updateFocusAppearance):
1109         * html/HTMLAreaElement.h:
1110         * html/HTMLInputElement.cpp:
1111         (WebCore::HTMLInputElement::updateFocusAppearance):
1112         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1113         (WebCore::HTMLInputElement::didAttachRenderers):
1114         * html/HTMLInputElement.h:
1115         * html/HTMLTextAreaElement.cpp:
1116         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
1117         * html/HTMLTextAreaElement.h:
1118
1119 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
1120
1121         [EFL] Fix build break since r191439
1122         https://bugs.webkit.org/show_bug.cgi?id=150441
1123
1124         Reviewed by Csaba Osztrogonác.
1125
1126         No new tests, no new behaviours.
1127
1128         * platform/Logging.cpp:
1129         (WebCore::registerNotifyCallback):
1130
1131 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1132
1133         Unreviewed. Fix GTK+ build after r191423.
1134
1135         Deprecate removed class WebKitDOMHTMLBaseFontElement.
1136
1137         * PlatformGTK.cmake:
1138         * bindings/gobject/WebKitDOMDeprecated.cpp:
1139         (webkit_dom_html_base_font_element_init):
1140         (webkit_dom_html_base_font_element_class_init):
1141         (webkit_dom_html_base_font_element_get_color):
1142         (webkit_dom_html_base_font_element_set_color):
1143         (webkit_dom_html_base_font_element_get_face):
1144         (webkit_dom_html_base_font_element_set_face):
1145         (webkit_dom_html_base_font_element_get_size):
1146         (webkit_dom_html_base_font_element_set_size):
1147         * bindings/gobject/WebKitDOMDeprecated.h:
1148         * bindings/gobject/WebKitDOMDeprecated.symbols:
1149         * bindings/gobject/WebKitDOMHTMLPrivate.cpp:
1150         * html/HTMLBaseFontElement.h:
1151         * html/HTMLBaseFontElement.idl:
1152
1153 2015-10-22  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1154
1155         [Streams API] Add writable stream attributes
1156         https://bugs.webkit.org/show_bug.cgi?id=150389
1157
1158         Reviewed by Darin Adler.
1159
1160         This patch adds the three writable stream attributes, which are closed, ready and state. They are implemented
1161         according to the spec.
1162
1163         Current test set suffices, expectations were adjusted accordingly.
1164
1165         * Modules/streams/WritableStream.js:
1166         (initializeWritableStream): Style fix.
1167         (closed):
1168         (ready):
1169         (state): Implemented according to the spec.
1170         * Modules/streams/WritableStreamInternals.js:
1171         (isWritableStream): Implemented according to the spec.
1172
1173 2015-10-22  Frederic Wang  <fred.wang@free.fr>
1174
1175         Rollout r190440 for the moment. It broke the build.
1176
1177         * platform/graphics/cocoa/FontCocoa.mm:
1178         (WebCore::Font::platformInit): Deleted.
1179
1180 2015-10-22  Frederic Wang  <fred.wang@free.fr>
1181
1182         Unreviewed compilation fix on Mac.
1183
1184         * platform/graphics/cocoa/FontCocoa.mm:
1185         (WebCore::Font::platformInit): Use a pointer for the third argument of CFArrayContainsValue.
1186
1187 2015-10-21  Frederic Wang  <fred.wang@free.fr>
1188
1189         Unreviewed compilation fix on Mac.
1190
1191         * platform/graphics/cocoa/FontCocoa.mm:
1192         (WebCore::Font::platformInit): Add missing font argument.
1193
1194 2015-10-21  Frederic Wang  <fred.wang@free.fr>
1195
1196         [Mac] Add support for the USE_TYPO_METRICS flag
1197         https://bugs.webkit.org/show_bug.cgi?id=150394
1198
1199         Reviewed by Myles C. Maxfield.
1200
1201         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
1202
1203         No new tests because this is already tested by fonts/use-typo-metrics-1.html
1204
1205         * platform/graphics/cocoa/FontCocoa.mm:
1206         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
1207
1208 2015-10-21  Zalan Bujtas  <zalan@apple.com>
1209
1210         Print out the render tree from command line.
1211         https://bugs.webkit.org/show_bug.cgi?id=150416
1212
1213         Use system-wide notification server (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/notify_register_dispatch.3.html)
1214         to print out the render tree for the live documents.
1215
1216         Usage: notifyutil -p com.apple.WebKit.showRenderTree
1217
1218         Reviewed by Simon Fraser.
1219
1220         No change in functionality.
1221
1222         * platform/Logging.cpp:
1223         (WebCore::registerNotifyCallback):
1224         * platform/Logging.h:
1225         * rendering/RenderObject.cpp:
1226         (WebCore::RenderObject::RenderObject):
1227         (WebCore::printRenderTreeForLiveDocuments):
1228
1229 2015-10-21  Alex Christensen  <achristensen@webkit.org>
1230
1231         Fix CMake clean build after r191423.
1232
1233         * CMakeLists.txt:
1234         HTMLBaseFontElement.idl no longer generates any JavaScript bindings.
1235
1236 2015-10-21  Brian Burg  <bburg@apple.com>
1237
1238         Unreviewed, CMake build fix after r191433.
1239
1240         * CMakeLists.txt: add WritableStreamInternals.js to WebCore_BUILTINS_SOURCES.
1241
1242 2015-10-21  Brian Burg  <bburg@apple.com>
1243
1244         Restructure generate-js-bindings script to be modular and testable
1245         https://bugs.webkit.org/show_bug.cgi?id=149929
1246
1247         Reviewed by Alex Christensen.
1248
1249         * CMakeLists.txt:
1250
1251             Define JavaScriptCore_SCRIPTS_DIR explicitly so the add_custom_command and
1252             shared file lists are identical between JavaScriptCore and WebCore.
1253
1254             The output files additionally depend on all builtin generator script files.
1255
1256         * DerivedSources.make:
1257
1258             Use JavaScriptCore_SCRIPTS_DIR so that the rule for code generation and
1259             shared file lists are identical between JavaScriptCore and WebCore.
1260
1261             The output files additionally depend on all builtin generator script files.
1262
1263         * WebCore.xcodeproj/project.pbxproj:
1264
1265             Define JavaScriptCore_SCRIPTS_DIR before calling DerivedSources.make.
1266             This will eventually be merged with the other similar script paths.
1267
1268         * bindings/js/JSDOMWindowBase.cpp:
1269         (WebCore::JSDOMWindowBase::finishCreation):
1270
1271             Update the generated builtin macro names.
1272
1273         * generate-js-builtins: Removed.
1274
1275 2015-10-21  Alex Christensen  <achristensen@webkit.org>
1276
1277         Recommit r191428.
1278
1279         I don't think it was supposed to be reverted in r191429, and it really does fix the build.
1280
1281         * loader/EmptyClients.h:
1282         (WebCore::EmptyContextMenuClient::~EmptyContextMenuClient):
1283         Remove customizeMenu again.
1284
1285 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1286
1287         [EFL][GTK][WK2] Fix build break since r191402, r191401
1288         https://bugs.webkit.org/show_bug.cgi?id=150432
1289
1290         Unreviewed EFL and GTK build fix.
1291
1292         * loader/EmptyClients.h:
1293
1294 2015-10-21  Alex Christensen  <achristensen@webkit.org>
1295
1296         Build fix after r191422.
1297
1298         * page/ContextMenuClient.h:
1299         (WebCore::ContextMenuClient::~ContextMenuClient):
1300         Completely remove customizeMenu.
1301
1302 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1303
1304         Remove unnecessary default quota setting in DatabaseContext::databaseExceededQuota
1305         https://bugs.webkit.org/show_bug.cgi?id=150356
1306
1307         Reviewed by Darin Adler.
1308
1309         All ports have supported DatabaseContext::databaseExceededQuota(). Thus we don't need to
1310         keep a test code to extend database quota anymore.
1311
1312         * Modules/webdatabase/DatabaseContext.cpp:
1313         (WebCore::DatabaseContext::databaseExceededQuota): Deleted.
1314
1315 2015-10-21  Chris Dumez  <cdumez@apple.com>
1316
1317         Un-expose obsolete HTMLBaseFontElement
1318         https://bugs.webkit.org/show_bug.cgi?id=150397
1319
1320         Reviewed by Anders Carlsson.
1321
1322         Un-expose obsolete HTMLBaseFontElement:
1323         - https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features
1324
1325         This means that we no longer expose HTMLBaseFontElement on the global
1326         Window object. Firefox and Chrome do not expose it either.
1327
1328         Also, document.createElement("basefont") now returns an HTMLUnknownElement
1329         as per the specification. Firefox and Chrome return a generic HTMLElement
1330         instead but I don't think this is a big compatibility risk.
1331
1332         No new tests, already covered by existing tests.
1333
1334         * html/HTMLBaseFontElement.cpp:
1335         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
1336         * html/HTMLBaseFontElement.h:
1337         * html/HTMLBaseFontElement.idl:
1338         * html/HTMLTagNames.in:
1339
1340 2015-10-21  Anders Carlsson  <andersca@apple.com>
1341
1342         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
1343         https://bugs.webkit.org/show_bug.cgi?id=150427
1344
1345         Reviewed by Tim Horton.
1346         * loader/EmptyClients.cpp:
1347         (WebCore::EmptyContextMenuClient::customizeMenu): Deleted.
1348         * loader/EmptyClients.h:
1349         * page/ContextMenuController.cpp:
1350         (WebCore::ContextMenuController::showContextMenu):
1351
1352 2015-10-21  Anders Carlsson  <andersca@apple.com>
1353
1354         Remove dead MHTML code
1355         https://bugs.webkit.org/show_bug.cgi?id=150426
1356
1357         Reviewed by Tim Horton.
1358
1359         * loader/archive/mhtml/MHTMLArchive.cpp:
1360         (WebCore::MHTMLArchive::generateMHTMLData):
1361         (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding): Deleted.
1362         * loader/archive/mhtml/MHTMLArchive.h:
1363
1364 2015-10-21  Dean Jackson  <dino@apple.com>
1365
1366         Null dereference loading Blink layout test svg/filters/display-none-filter-primitive.html
1367         https://bugs.webkit.org/show_bug.cgi?id=150212
1368         <rdar://problem/23137376>
1369
1370         Reviewed by Brent Fulgham.
1371
1372         Handle the case where a filter element doesn't have a renderer. Inspired by the Blink
1373         commit:
1374         https://chromium.googlesource.com/chromium/src.git/+/fb79f7fc46552d45127acd2959a23662ad8f271e
1375
1376         Test: svg/filters/display-none-filter-primitive.html
1377
1378         * rendering/svg/RenderSVGResourceFilter.cpp:
1379         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1380         * svg/graphics/filters/SVGFilterBuilder.cpp:
1381         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
1382
1383 2015-10-21  Brady Eidson  <beidson@apple.com>
1384
1385         Modern IDB: Add basic transaction aborting.
1386         https://bugs.webkit.org/show_bug.cgi?id=150148
1387
1388         Reviewed by Alex Christensen.
1389
1390         Tests: storage/indexeddb/modern/double-abort.html
1391                storage/indexeddb/modern/versionchange-abort-then-reopen.html
1392
1393         * CMakeLists.txt:
1394         * WebCore.xcodeproj/project.pbxproj:
1395         
1396         * Modules/indexeddb/IndexedDB.h:
1397         
1398         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1399         (WebCore::IDBClient::IDBConnectionToServer::abortTransaction):
1400         (WebCore::IDBClient::IDBConnectionToServer::didAbortTransaction):
1401         * Modules/indexeddb/client/IDBConnectionToServer.h:
1402         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1403         
1404         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1405         (WebCore::IDBClient::IDBDatabase::abortTransaction):
1406         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
1407         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1408         
1409         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1410         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
1411         (WebCore::IDBClient::IDBTransaction::abort):
1412         (WebCore::IDBClient::IDBTransaction::isFinishedOrFinishing):
1413         (WebCore::IDBClient::IDBTransaction::activationTimerFired):
1414         (WebCore::IDBClient::IDBTransaction::didAbort):
1415         * Modules/indexeddb/client/IDBTransactionImpl.h:
1416         
1417         * Modules/indexeddb/server/IDBBackingStore.h:
1418         
1419         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1420         (WebCore::IDBServer::IDBConnectionToClient::didAbortTransaction):
1421         * Modules/indexeddb/server/IDBConnectionToClient.h:
1422         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1423         
1424         * Modules/indexeddb/server/IDBServer.cpp:
1425         (WebCore::IDBServer::IDBServer::abortTransaction):
1426         * Modules/indexeddb/server/IDBServer.h:
1427         
1428         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1429         (WebCore::IDBServer::MemoryBackingStoreTransaction::create):
1430         (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):
1431         (WebCore::IDBServer::MemoryBackingStoreTransaction::~MemoryBackingStoreTransaction):
1432         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1433         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
1434         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1435         (WebCore::IDBServer::MemoryBackingStoreTransaction::isVersionChange):
1436         
1437         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1438         (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo):
1439         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
1440         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
1441         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
1442         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1443
1444         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1445         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
1446         (WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore):
1447         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
1448         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
1449         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
1450         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
1451         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
1452         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
1453         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1454         
1455         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1456         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
1457         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1458         
1459         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1460         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
1461         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::originalDatabaseInfo):
1462         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
1463         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1464         
1465         * Modules/indexeddb/shared/IDBError.cpp:
1466         (WebCore::idbErrorName):
1467         (WebCore::idbErrorDescription):
1468         * Modules/indexeddb/shared/IDBError.h:
1469
1470         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1471         (WebCore::InProcessIDBServer::didAbortTransaction):
1472         (WebCore::InProcessIDBServer::abortTransaction):
1473         * Modules/indexeddb/shared/InProcessIDBServer.h:
1474
1475 2015-10-21  Chris Dumez  <cdumez@apple.com>
1476
1477         bgsound should use HTMLUnknownElement interface
1478         https://bugs.webkit.org/show_bug.cgi?id=148857
1479         <rdar://problem/22589036>
1480
1481         Reviewed by Sam Weinig.
1482
1483         The blink, bgsound, isindex, multicol, nextid, and spacer elements must
1484         use the HTMLUnknownElement interface, as per the HTML specification:
1485         https://html.spec.whatwg.org/multipage/obsolete.html#other-elements,-attributes-and-apis
1486
1487         WebKit was using HTMLUnknownElement for all of them except bgsound.
1488         This patch fixes the issue and aligns our behavior with Chrome and
1489         Firefox.
1490
1491         No new tests, already covered by existing tests.
1492
1493         * html/HTMLTagNames.in:
1494
1495 2015-10-21  Antoine Quint  <graouts@apple.com>
1496
1497         Support for the SVG `onend` attribute
1498         https://bugs.webkit.org/show_bug.cgi?id=150393
1499
1500         Reviewed by Dean Jackson.
1501
1502         Add support for the SVG `onend` attribute to SVG timing and animation elements, which allow the definition
1503         of a JS event listener declaratively for the SVG `endEvent` event.
1504
1505         Tests: svg/animations/end-event-attribute-expected.svg
1506                svg/animations/end-event-attribute.svg
1507                svg/animations/end-event-syncbase-expected.svg
1508                svg/animations/end-event-syncbase.svg
1509
1510         * dom/EventNames.h:
1511         * svg/animation/SVGSMILElement.cpp:
1512         (WebCore::SVGSMILElement::parseAttribute):
1513         * svg/svgattrs.in:
1514
1515 2015-10-21  Nan Wang  <n_wang@apple.com>
1516
1517         AX: Expose table size and cell indexes on iOS
1518         https://bugs.webkit.org/show_bug.cgi?id=150366
1519
1520         Add support to expose table row/column count and cell indexes on iOS.
1521
1522         Reviewed by Chris Fleizach.
1523
1524         Test: accessibility/aria-table-attributes.html
1525
1526         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1527         (-[WebAccessibilityObjectWrapper tableParent]):
1528         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
1529         (-[WebAccessibilityObjectWrapper accessibilityRowCount]):
1530         (-[WebAccessibilityObjectWrapper accessibilityColumnCount]):
1531         (-[WebAccessibilityObjectWrapper accessibilityARIARowCount]):
1532         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnCount]):
1533         (-[WebAccessibilityObjectWrapper accessibilityARIARowIndex]):
1534         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
1535         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
1536
1537 2015-10-21  Chris Dumez  <cdumez@apple.com>
1538
1539         HTMLIFrameElement.sandbox should be a DOMSettableTokenList
1540         https://bugs.webkit.org/show_bug.cgi?id=150377
1541
1542         Reviewed by Ryosuke Niwa.
1543
1544         HTMLIFrameElement.sandbox should be a DOMSettableTokenList as per the
1545         HTML specification:
1546         - https://html.spec.whatwg.org/multipage/embedded-content.html#htmliframeelement
1547
1548         Chrome and Firefox match the specification but Safari/WebKit was uding
1549         a DOMString.
1550
1551         Test: fast/frames/sandbox-attribute.html
1552
1553         * html/HTMLIFrameElement.cpp:
1554         (WebCore::HTMLIFrameElement::sandbox):
1555         (WebCore::HTMLIFrameElement::parseAttribute):
1556         * html/HTMLIFrameElement.h:
1557         * html/HTMLIFrameElement.idl:
1558
1559 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1560
1561         ASSERTION FAILED: markFontData in FontCascade::emphasisMarkHeight
1562         https://bugs.webkit.org/show_bug.cgi?id=150171
1563
1564         Reviewed by Myles C. Maxfield.
1565
1566         It happens with several tests like fast/ruby/text-emphasis.html in
1567         the GTK Debug bot. The tests seem to pass in Release and the rendering
1568         looks correct as well removing the assert. The thing is that
1569         for some reason we can get an empty GlyphData from
1570         FontCascade::getEmphasisMarkGlyphData() when it ends up falling
1571         back to system (FontCascadeFonts::glyphDataForSystemFallback).
1572
1573         * platform/graphics/FontCascade.cpp:
1574         (WebCore::FontCascade::getEmphasisMarkGlyphData): Return
1575         Optional<GlyphData> instead of returning a boolean and an out
1576         parameter. If we get an invalid GlyphData, Nullopt is
1577         returned. Also use a SurrogatePairAwareTextIterator to handle
1578         surrogate pairs.
1579         (WebCore::FontCascade::emphasisMarkAscent):
1580         (WebCore::FontCascade::emphasisMarkDescent):
1581         (WebCore::FontCascade::emphasisMarkHeight):
1582         (WebCore::FontCascade::drawEmphasisMarks):
1583         * platform/graphics/FontCascade.h:
1584         * platform/graphics/GlyphPage.h:
1585         (WebCore::GlyphData::isValid): Return whether the GlyphData is valid.
1586
1587 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
1588
1589         [css-grid] Fix availableLogicalSpace computation with non-zero baseSize flex tracks
1590         https://bugs.webkit.org/show_bug.cgi?id=150359
1591
1592         Reviewed by Zalan Bujtas.
1593
1594         The availableLogicalSpace computation was incorrect whenever
1595         the flex tracks had a non-zero baseSize before the 1fr unit
1596         size resolution. That happened because when assigning the new
1597         baseSize to the flex track, we were unconditionally
1598         subtracting the whole baseSize to the
1599         availableLogicalSpace. That's correct if the track is a "pure"
1600         flex track, i.e. 2fr, but if the track had a non-zero baseSize
1601         (like minmax(10px, 1fr)) then both the new and the old base
1602         sizes were incorrectly used to compute the
1603         availableLogicalSpace.
1604
1605         We can test the amount of remaining freeSpace by using content
1606         distribution to align and item place on a non-zero baseSize
1607         flex track. The content distribution will be accurate if and
1608         only if the availableLogicalSpace computation is correct.
1609
1610         Test: fast/css-grid-layout/flex-content-distribution.html
1611
1612         * rendering/RenderGrid.cpp:
1613         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1614
1615 2015-10-21  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1616
1617         [Streams API] Construct a writable stream
1618         https://bugs.webkit.org/show_bug.cgi?id=150360
1619
1620         Reviewed by Darin Adler.
1621
1622         This patch initializes a writable stream according to the spec. To do it we need two internal functions, which
1623         are syncWritableStreamStateWithQueue and errorWritableStream, which are also implemented as a quite direct
1624         translation from the spec.
1625
1626         Current test set suffices, expectations are updated accordingly.
1627
1628         * CMakeLists.txt:
1629         * DerivedSources.make:
1630         * WebCore.xcodeproj/project.pbxproj:
1631         * bindings/js/JSDOMWindowBase.cpp:
1632         * bindings/js/WebCoreBuiltinNames.h:
1633         * bindings/js/WebCoreJSBuiltinInternals.h:
1634         * bindings/js/WebCoreJSBuiltins.cpp:
1635         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
1636         * Modules/streams/WritableStream.js:
1637         (initializeWritableStream): Function that acts as constructor of WritableStream.
1638         * Modules/streams/WritableStreamInternals.js:
1639         (syncWritableStreamStateWithQueue):
1640         (errorWritableStream): As per spec.
1641
1642 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1643
1644         NetworkProcess: DNS prefetch happens in the Web Process
1645         https://bugs.webkit.org/show_bug.cgi?id=147824
1646
1647         Reviewed by Chris Dumez.
1648
1649         Use FrameLoaderClient to do the DNS prefetch.
1650
1651         * html/HTMLAnchorElement.cpp:
1652         (WebCore::HTMLAnchorElement::parseAttribute):
1653         * loader/EmptyClients.h:
1654         * loader/FrameLoaderClient.h:
1655         * loader/LinkLoader.cpp:
1656         (WebCore::LinkLoader::loadLink):
1657         * page/Chrome.cpp:
1658         (WebCore::Chrome::mouseDidMoveOverElement):
1659
1660 2015-10-21  Frederic Wang  <fred.wang@free.fr>
1661
1662         [FreeType] Add support for the USE_TYPO_METRICS flag
1663         https://bugs.webkit.org/show_bug.cgi?id=150340
1664
1665         Reviewed by Martin Robinson.
1666
1667         Test: fonts/use-typo-metrics-1.html
1668
1669         Make the FreeType backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
1670         Similar work should be done for other backends, see bug 131839.
1671
1672         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1673         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that's the case.
1674
1675 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
1676
1677         Replace 0 and NULL with nullptr in WebCore/loader.
1678         https://bugs.webkit.org/show_bug.cgi?id=149657
1679
1680         Reviewed by Darin Adler.
1681
1682         No new tests because there is no behavior change.
1683
1684         * loader/CookieJar.cpp:
1685         (WebCore::networkingContext):
1686         * loader/DocumentLoader.cpp:
1687         (WebCore::DocumentLoader::DocumentLoader):
1688         (WebCore::DocumentLoader::frameLoader):
1689         (WebCore::DocumentLoader::popArchiveForSubframe):
1690         (WebCore::DocumentLoader::clearArchiveResources):
1691         (WebCore::DocumentLoader::clearMainResource):
1692         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
1693         * loader/DocumentThreadableLoader.cpp:
1694         (WebCore::DocumentThreadableLoader::cancel):
1695         (WebCore::DocumentThreadableLoader::setDefersLoading):
1696         (WebCore::DocumentThreadableLoader::clearResource):
1697         * loader/EmptyClients.cpp:
1698         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
1699         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
1700         * loader/EmptyClients.h:
1701         * loader/FTPDirectoryParser.cpp:
1702         (WebCore::parseOneFTPLine):
1703         * loader/FTPDirectoryParser.h:
1704         (WebCore::ListResult::clear):
1705         * loader/FormSubmission.cpp:
1706         (WebCore::FormSubmission::create):
1707         * loader/FrameLoader.cpp:
1708         (WebCore::FrameLoader::clear):
1709         (WebCore::FrameLoader::stopAllLoaders):
1710         (WebCore::FrameLoader::clearProvisionalLoad):
1711         (WebCore::FrameLoader::transitionToCommitted):
1712         (WebCore::FrameLoader::closeAndRemoveChild):
1713         (WebCore::FrameLoader::detachFromParent):
1714         (WebCore::FrameLoader::detachViewsAndDocumentLoader):
1715         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1716         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1717         * loader/FrameLoader.h:
1718         (WebCore::FrameLoader::stateMachine):
1719         * loader/FrameNetworkingContext.h:
1720         (WebCore::FrameNetworkingContext::invalidate):
1721         * loader/HistoryController.cpp:
1722         (WebCore::HistoryController::replaceState):
1723         * loader/ImageLoader.cpp:
1724         (WebCore::ImageLoader::ImageLoader):
1725         (WebCore::ImageLoader::updateFromElement):
1726         * loader/NetscapePlugInStreamLoader.cpp:
1727         (WebCore::NetscapePlugInStreamLoader::releaseResources):
1728         * loader/ResourceLoadNotifier.h:
1729         * loader/ResourceLoadScheduler.cpp:
1730         (WebCore::resourceLoadScheduler):
1731         * loader/SubresourceLoader.cpp:
1732         (WebCore::SubresourceLoader::releaseResources):
1733         * loader/TextResourceDecoder.cpp:
1734         (WebCore::TextResourceDecoder::TextResourceDecoder):
1735         * loader/ThreadableLoaderClientWrapper.h:
1736         (WebCore::ThreadableLoaderClientWrapper::clearClient):
1737         (WebCore::ThreadableLoaderClientWrapper::done):
1738         * loader/appcache/ApplicationCache.cpp:
1739         (WebCore::fallbackURLLongerThan):
1740         (WebCore::ApplicationCache::ApplicationCache):
1741         (WebCore::ApplicationCache::resourceForRequest):
1742         * loader/appcache/ApplicationCache.h:
1743         (WebCore::ApplicationCache::fallbackURLs):
1744         * loader/appcache/ApplicationCacheGroup.cpp:
1745         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
1746         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
1747         (WebCore::ApplicationCacheGroup::selectCache):
1748         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
1749         (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
1750         (WebCore::ApplicationCacheGroup::manifestNotFound):
1751         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1752         * loader/appcache/ApplicationCacheHost.cpp:
1753         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
1754         (WebCore::ApplicationCacheHost::setApplicationCache):
1755         * loader/appcache/ApplicationCacheHost.h:
1756         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup):
1757         * loader/appcache/ApplicationCacheStorage.cpp:
1758         (WebCore::StorageIDJournal::Record::Record):
1759         (WebCore::StorageIDJournal::Record::restore):
1760         (WebCore::ApplicationCacheStorage::loadCacheGroup):
1761         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
1762         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
1763         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
1764         (WebCore::ApplicationCacheStorage::loadCache):
1765         * loader/appcache/DOMApplicationCache.cpp:
1766         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
1767         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
1768         (WebCore::DOMApplicationCache::applicationCacheHost):
1769         (WebCore::DOMApplicationCache::scriptExecutionContext):
1770         (WebCore::DOMApplicationCache::toEventType):
1771         * loader/archive/ArchiveFactory.cpp:
1772         (WebCore::ArchiveFactory::create):
1773         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
1774         * loader/archive/ArchiveResourceCollection.cpp:
1775         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
1776         * loader/archive/cf/LegacyWebArchive.cpp:
1777         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
1778         (WebCore::LegacyWebArchive::createResource):
1779         (WebCore::LegacyWebArchive::create):
1780         (WebCore::LegacyWebArchive::rawDataRepresentation):
1781         * loader/archive/cf/LegacyWebArchiveMac.mm:
1782         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
1783         * loader/archive/mhtml/MHTMLArchive.cpp:
1784         (WebCore::MHTMLArchive::create):
1785         (WebCore::MHTMLArchive::generateMHTMLData):
1786         * loader/archive/mhtml/MHTMLParser.cpp:
1787         (WebCore::MHTMLParser::parseArchiveWithHeader):
1788         (WebCore::MHTMLParser::parseNextPart):
1789         * loader/cache/CachedImage.cpp:
1790         (WebCore::CachedImage::CachedImage):
1791         * loader/cache/CachedImageClient.h:
1792         (WebCore::CachedImageClient::imageChanged):
1793         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
1794         * loader/cache/CachedRawResource.cpp:
1795         (WebCore::CachedRawResource::calculateIncrementalDataChunk):
1796         * loader/cache/CachedRawResourceClient.h:
1797         (WebCore::CachedRawResourceClient::dataReceived):
1798         (WebCore::CachedRawResourceClient::redirectReceived):
1799         (WebCore::CachedRawResourceClient::getOrCreateReadBuffer):
1800         * loader/cache/CachedResource.cpp:
1801         (WebCore::CachedResource::CachedResource):
1802         (WebCore::CachedResource::clearResourceToRevalidate):
1803         * loader/cache/CachedResourceClientWalker.h:
1804         (WebCore::CachedResourceClientWalker::next):
1805         * loader/cache/CachedResourceHandle.cpp:
1806         (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
1807         * loader/cache/CachedResourceLoader.cpp:
1808         (WebCore::createResource):
1809         (WebCore::CachedResourceLoader::CachedResourceLoader):
1810         (WebCore::CachedResourceLoader::~CachedResourceLoader):
1811         (WebCore::CachedResourceLoader::canRequest): Return value is bool.
1812         (WebCore::CachedResourceLoader::requestResource):
1813         * loader/cache/CachedResourceLoader.h:
1814         (WebCore::CachedResourceLoader::document):
1815         (WebCore::CachedResourceLoader::setDocument):
1816         (WebCore::CachedResourceLoader::clearDocumentLoader):
1817         * loader/cache/CachedSVGDocumentReference.cpp:
1818         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
1819         * loader/cf/ResourceLoaderCFNet.cpp:
1820         (WebCore::ResourceLoader::shouldCacheResponse): Return value is bool.
1821         * loader/icon/IconDatabase.cpp:
1822         (WebCore::IconDatabase::synchronousIconForPageURL):
1823         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
1824         (WebCore::IconDatabase::setIconDataForIconURL):
1825         (WebCore::IconDatabase::getOrCreatePageURLRecord):
1826         (WebCore::IconDatabase::cleanupSyncThread):
1827         * loader/icon/IconDatabaseBase.cpp:
1828         (WebCore::IconDatabaseBase::open):
1829         (WebCore::iconDatabase):
1830         * loader/icon/IconDatabaseBase.h:
1831         (WebCore::EnumCallback::performCallback):
1832         (WebCore::EnumCallback::invalidate):
1833         (WebCore::ObjectCallback::performCallback):
1834         (WebCore::ObjectCallback::invalidate):
1835         * loader/icon/PageURLRecord.cpp:
1836         (WebCore::PageURLRecord::~PageURLRecord):
1837         (WebCore::PageURLRecord::setIconRecord):
1838         * loader/mac/ResourceLoaderMac.mm:
1839         (WebCore::ResourceLoader::willCacheResponse):
1840         * loader/soup/CachedRawResourceSoup.cpp:
1841         (WebCore::CachedRawResource::getOrCreateReadBuffer):
1842
1843 2015-10-20  Chris Dumez  <cdumez@apple.com>
1844
1845         Unreviewed, GTK API test fix after r191351.
1846
1847         Reverted API change for GTK bindings.
1848
1849         * html/HTMLOptionsCollection.idl:
1850         * html/HTMLSelectElement.idl:
1851
1852 2015-10-20  Chris Dumez  <cdumez@apple.com>
1853
1854         Unreviewed, Another GTK build fix after r191351.
1855
1856         * html/HTMLCollection.idl:
1857
1858 2015-10-20  Chris Dumez  <cdumez@apple.com>
1859
1860         Unreviewed, Another GTK build fix after r191351.
1861
1862         * html/HTMLFieldSetElement.cpp:
1863         (WebCore::HTMLFieldSetElement::elementsForNativeBindings):
1864         (WebCore::HTMLFieldSetElement::elementsForObjC): Deleted.
1865         * html/HTMLFieldSetElement.h:
1866         * html/HTMLFieldSetElement.idl:
1867
1868 2015-10-20  Chris Fleizach  <cfleizach@apple.com>
1869
1870         AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AccessibilityTable::tableElement const + 116
1871         https://bugs.webkit.org/show_bug.cgi?id=150349
1872
1873         Reviewed by Brent Fulgham.
1874
1875         The crash point for this bug says that the parentElement of the firstBody is garbage when it's accessed. 
1876         Unfortunately, I could not reproduce this in-situ or with a test. 
1877         So my speculative solution is to recalculate those body elements to ensure that they're valid before we access.
1878
1879         * accessibility/AccessibilityTable.cpp:
1880         (WebCore::AccessibilityTable::tableElement):
1881         (WebCore::AccessibilityTable::isDataTable):
1882
1883 2015-10-20  Chris Dumez  <cdumez@apple.com>
1884
1885         Unreviewed, GTK build fix after r191351.
1886
1887         * html/HTMLFormElement.cpp:
1888         (WebCore::HTMLFormElement::elementsForNativeBindings):
1889         (WebCore::HTMLFormElement::elementsForObjC): Deleted.
1890         * html/HTMLFormElement.h:
1891         * html/HTMLFormElement.idl:
1892
1893 2015-10-20  Simon Fraser  <simon.fraser@apple.com>
1894
1895         Add basic TextStream output for Images
1896         https://bugs.webkit.org/show_bug.cgi?id=150350
1897
1898         Reviewed by Darin Adler.
1899
1900         Add a TextStream output operator for Image, and virtual dump() member functions
1901         that the various image types override to dump their own data.
1902         
1903         Add isFoo() functions for each image type (surprising that these didn't already
1904         exist) so we can print the image type.
1905         
1906         Make isAnimated() const, and isBitmapImage() private.
1907
1908         * platform/graphics/BitmapImage.cpp:
1909         (WebCore::BitmapImage::dump):
1910         * platform/graphics/BitmapImage.h:
1911         * platform/graphics/CrossfadeGeneratedImage.cpp:
1912         (WebCore::CrossfadeGeneratedImage::dump):
1913         * platform/graphics/CrossfadeGeneratedImage.h:
1914         * platform/graphics/GeneratedImage.cpp:
1915         * platform/graphics/GeneratedImage.h:
1916         * platform/graphics/GradientImage.cpp:
1917         (WebCore::GradientImage::dump):
1918         * platform/graphics/GradientImage.h:
1919         * platform/graphics/Image.cpp:
1920         (WebCore::Image::dump):
1921         (WebCore::operator<<):
1922         * platform/graphics/Image.h:
1923         (WebCore::Image::isGeneratedImage):
1924         (WebCore::Image::isCrossfadeGeneratedImage):
1925         (WebCore::Image::isNamedImageGeneratedImage):
1926         (WebCore::Image::isGradientImage):
1927         (WebCore::Image::isSVGImage):
1928         (WebCore::Image::isAnimated):
1929         * platform/graphics/NamedImageGeneratedImage.cpp:
1930         (WebCore::NamedImageGeneratedImage::dump):
1931         * platform/graphics/NamedImageGeneratedImage.h:
1932         * platform/graphics/cg/PDFDocumentImage.cpp:
1933         (WebCore::PDFDocumentImage::dump):
1934         * platform/graphics/cg/PDFDocumentImage.h:
1935         * svg/graphics/SVGImage.cpp:
1936         (WebCore::SVGImage::dump):
1937         * svg/graphics/SVGImage.h:
1938
1939 2015-10-20  Chris Dumez  <cdumez@apple.com>
1940
1941         Use tighter typing for collections / node lists' item() / namedItem() methods
1942         https://bugs.webkit.org/show_bug.cgi?id=150347
1943
1944         Reviewed by Darin Adler.
1945
1946         Use tighter typing for collections / node lists' item() / namedItem() methods.
1947
1948         * accessibility/AccessibilityRenderObject.cpp:
1949         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1950         * dom/LiveNodeList.h:
1951         * dom/StaticNodeList.cpp:
1952         (WebCore::StaticElementList::item):
1953         * dom/StaticNodeList.h:
1954         * html/CachedHTMLCollection.h:
1955         * html/HTMLAllCollection.idl:
1956         * html/HTMLCollection.idl:
1957         * html/HTMLFieldSetElement.cpp:
1958         (WebCore::HTMLFieldSetElement::elements):
1959         (WebCore::HTMLFieldSetElement::elementsForObjC):
1960         * html/HTMLFieldSetElement.h:
1961         * html/HTMLFieldSetElement.idl:
1962         * html/HTMLFormControlsCollection.cpp:
1963         (WebCore::HTMLFormControlsCollection::customElementAfter):
1964         * html/HTMLFormControlsCollection.h:
1965         * html/HTMLFormControlsCollection.idl:
1966         * html/HTMLFormElement.cpp:
1967         (WebCore::HTMLFormElement::item):
1968         (WebCore::HTMLFormElement::elements):
1969         (WebCore::HTMLFormElement::elementsForObjC):
1970         * html/HTMLFormElement.h:
1971         * html/HTMLFormElement.idl:
1972         * html/HTMLOptionsCollection.cpp:
1973         (WebCore::HTMLOptionsCollection::add):
1974         * html/HTMLOptionsCollection.h:
1975         * html/HTMLOptionsCollection.idl:
1976         * html/HTMLSelectElement.cpp:
1977         (WebCore::HTMLSelectElement::namedItem):
1978         (WebCore::HTMLSelectElement::item):
1979         (WebCore::HTMLSelectElement::setOption):
1980         * html/HTMLSelectElement.idl:
1981         * html/HTMLTableRowElement.cpp:
1982         (WebCore::HTMLTableRowElement::deleteCell):
1983         * html/HTMLTableSectionElement.cpp:
1984         (WebCore::HTMLTableSectionElement::deleteRow):
1985         * html/RadioNodeList.cpp:
1986         (WebCore::toRadioButtonInputElement):
1987         (WebCore::RadioNodeList::value):
1988         (WebCore::RadioNodeList::setValue):
1989         * html/RadioNodeList.h:
1990         * html/RadioNodeList.idl:
1991
1992 2015-10-20  Chris Dumez  <cdumez@apple.com>
1993
1994         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes
1995         https://bugs.webkit.org/show_bug.cgi?id=150335
1996
1997         Reviewed by Darin Adler.
1998
1999         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes:
2000         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12.3)
2001         https://html.spec.whatwg.org/multipage/infrastructure.html#space-character
2002
2003         Previously, we were uding the wrong stripping function and we were stripping
2004         some non-HTML spaces.
2005
2006         Test: fast/dom/script-for-event-spaces.html
2007
2008         * dom/ScriptElement.cpp:
2009         (WebCore::ScriptElement::isScriptForEventSupported):
2010
2011 2015-10-20  Csaba Osztrogonác  <ossy@webkit.org>
2012
2013         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r191128
2014         https://bugs.webkit.org/show_bug.cgi?id=150321
2015
2016         Reviewed by Darin Adler.
2017
2018         * css/CSSGrammar.y.in: Typo fix.
2019
2020 2015-10-20  Tim Horton  <timothy_horton@apple.com>
2021
2022         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
2023
2024         * Configurations/FeatureDefines.xcconfig:
2025
2026 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
2027
2028         ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
2029         https://bugs.webkit.org/show_bug.cgi?id=149459
2030
2031         Reviewed by Darin Adler.
2032
2033         This was regressed after 189567 where min-height|width:auto
2034         support was added to flex items. The merge from Blink changes
2035         was not correctly done for assertions. In particular we were
2036         asserting if the resolved main size was not strictly greater
2037         than 0, but 0 is actually a valid value.
2038
2039         Test: fast/flexbox/crash-resolved-main-size-zero.html
2040
2041         * rendering/RenderFlexibleBox.cpp:
2042         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2043
2044 2015-10-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2045
2046         [Streams API] Rework some readable stream internals that can be common to writable streams
2047         https://bugs.webkit.org/show_bug.cgi?id=150133
2048
2049         Reviewed by Darin Adler.
2050
2051         There are some things in ReadableStream internals that be be used also for Writable Streams so it was necessary
2052         to move some functions and refactor some code that can be shared by both implementations.
2053
2054         Queue was written with the functions declared at the implementation and keeping the improvement of having the
2055         total size calculated instead of having to transverse the whole array.
2056
2057         The strategy is kept as an object and a common method is used to validate it as per spec.
2058
2059         Promises are reworked to keep in an internal slot inside the promise object the resolve and reject
2060         functions. For convinience three functions were written, one to create the promise (and keep internally the
2061         resolve and reject functions), one to resolve and another to reject. Promises can still be created with
2062         Promise.resolve or reject as the resolve and rejectStreamsPromise functions operate under the assumption that
2063         the internal slots might not exist.
2064
2065         invokeOrNoop and promiseInvokeOrNoop were moved to the common code as they will be also used by WritableStream.
2066
2067         Current test set suffices.
2068
2069         * CMakeLists.txt:
2070         * DerivedSources.make:
2071         * WebCore.xcodeproj/project.pbxproj:
2072         * bindings/js/JSDOMWindowBase.cpp:
2073         * bindings/js/WebCoreJSBuiltinInternals.h:
2074         * bindings/js/WebCoreJSBuiltins.cpp:
2075         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
2076         * Modules/streams/ReadableStream.js:
2077         (initializeReadableStream): Reworked queue and strategy.
2078         * Modules/streams/ReadableStreamInternals.js:
2079         (privateInitializeReadableStreamReader):
2080         (errorReadableStream):
2081         (getReadableStreamDesiredSize):
2082         (cancelReadableStream):
2083         (closeReadableStream):
2084         (closeReadableStreamReader):
2085         (enqueueInReadableStream):
2086         (readFromReadableStreamReader): Reworked queue, strategy and promises.
2087         (invokeOrNoop): Deleted.
2088         (promiseInvokeOrNoop): Deleted.
2089         * Modules/streams/StreamInternals.js: Added.
2090         (invokeOrNoop):
2091         (promiseInvokeOrNoop): Moved from ReadableStreamInternals.js.
2092         (validateAndNormalizeQueuingStrategy):
2093         (createNewStreamsPromise):
2094         (resolveStreamsPromise):
2095         (rejectStreamsPromise):
2096         (newQueue):
2097         (dequeueValue):
2098         (enqueueValueWithSize): Added according to the spec.
2099         * bindings/js/WebCoreBuiltinNames.h: Updated private names according to the new slots.
2100
2101 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
2102
2103         Rename the PICTURE_SIZES flag to CURRENTSRC
2104         https://bugs.webkit.org/show_bug.cgi?id=150275
2105
2106         Reviewed by Dean Jackson.
2107
2108         No new tests, since there is no functional change.
2109
2110         * Configurations/FeatureDefines.xcconfig:
2111         * html/HTMLImageElement.cpp:
2112         * html/HTMLImageElement.h:
2113         * html/HTMLImageElement.idl:
2114
2115 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2116
2117         ASSERTION FAILED: m_state == Initialized in SubresourceLoader::didReceiveResponse()
2118         https://bugs.webkit.org/show_bug.cgi?id=150327
2119
2120         Reviewed by Antti Koivisto.
2121
2122         This is how it happens:
2123
2124         1. print() is called while the document is still loading, so
2125            m_shouldPrintWhenFinishedLoading is set to true
2126         2. DataURLDecoder::decode() finishes in the work queue thread,
2127            the completion handler is scheduled in the main thread
2128         3. The load is cancelled
2129           3.1. SubresourceLoader::willCancel sets m_state = Finishing
2130           3.2. DOMWindow::finishedLoading() is called, and since
2131                m_shouldPrintWhenFinishedLoading is true, it does the print.
2132           3.3. Cancellation finishes and ResourceLoader::releaseResources()
2133                is called that sets m_reachedTerminalState = true
2134
2135         So, between 3.1 and 3.3, the state is Finishing, but
2136         m_reachedTerminalState is false. What happens, in the GTK+ port at
2137         least, is that the nested main loop used to make print()
2138         synchronous, processes the DataURLDecoder::decode() completion
2139         handler that was pending. The completion handler returns early if
2140         m_reachedTerminalState is true, but it's not yet in this
2141         particular case. So, it ends up calling didReceiveResponse,
2142         because the decode didn't fail, when the subresource loader state
2143         is Finishing.
2144
2145         I think there are two things here. One is that we shouldn't start
2146         a print that was waiting for the load to finish when it
2147         failed. That would fix the problem. But it's probably a good idea
2148         to also check for cancellation in the DataURLDecoder::decode()
2149         completion handler.
2150
2151         Fixes printing/print-close-crash.html in GTK+ Debug.
2152
2153         * loader/ResourceLoader.cpp:
2154         (WebCore::ResourceLoader::loadDataURL): Return early from
2155         DataURLDecoder::decode() completion handler if the load was cancelled.
2156         * page/DOMWindow.cpp:
2157         (WebCore::DOMWindow::finishedLoading): Do not start a print that
2158         was witing for the load to finish when it failed.
2159
2160 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2161
2162         FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
2163         https://bugs.webkit.org/show_bug.cgi?id=149775
2164
2165         Reviewed by Darin Adler.
2166
2167         This patch has two pieces:
2168
2169         We used to have a boolean, enableLigatures, which affected how we perform shaping in both our
2170         simple and complex text codepaths. However, in this brave new world of font-feature-settings
2171         and font-variant-*, there are many properties which may affect shaping (and multiple kinds
2172         of ligatures). This patch renames this boolean to requiresShaping, and teaches it about all
2173         the various properties which affect text shaping.
2174
2175         Similarly, one of the places which used this enableLigatures boolean was to tell CoreText
2176         if it should disable ligatures. However, we now have much finer-grained control over
2177         ligatures during font creation. This patch moves the responsibility of dictating which
2178         font features should be enabled entirely to the Font. Therefore, getCFStringAttributes()
2179         doesn't know anything about ligatures anymore; the logic inside font creation is used
2180         instead.
2181
2182         An added benefit of moving all the font feature logic to one place is that we can implement
2183         the feature resolution algorithm described in the CSS3 fonts spec. This patch adds a test to
2184         makes sure that text-rendering, font-feature-settings, and font-variant-* play together
2185         nicely.
2186
2187         Test: fast/text/multiple-feature-properties.html
2188
2189         * platform/graphics/Font.cpp:
2190         (WebCore::Font::applyTransforms):
2191         * platform/graphics/Font.h:
2192         * platform/graphics/FontCascade.cpp:
2193         (WebCore::FontCascade::FontCascade):
2194         (WebCore::FontCascade::operator=):
2195         (WebCore::FontCascade::update):
2196         (WebCore::FontCascade::drawText):
2197         (WebCore::FontCascade::drawEmphasisMarks):
2198         (WebCore::FontCascade::width):
2199         (WebCore::FontCascade::adjustSelectionRectForText):
2200         (WebCore::FontCascade::offsetForPosition):
2201         (WebCore::FontCascade::codePath):
2202         (WebCore::FontCascade::floatWidthForSimpleText):
2203         * platform/graphics/FontCascade.h:
2204         (WebCore::FontCascade::requiresShaping):
2205         (WebCore::FontCascade::computeRequiresShaping):
2206         (WebCore::FontCascade::enableLigatures): Deleted.
2207         (WebCore::FontCascade::computeEnableLigatures): Deleted.
2208         * platform/graphics/WidthIterator.cpp:
2209         (WebCore::WidthIterator::WidthIterator):
2210         (WebCore::WidthIterator::applyFontTransforms):
2211         * platform/graphics/WidthIterator.h:
2212         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2213         (WebCore::preparePlatformFont):
2214         * platform/graphics/cocoa/FontCocoa.mm:
2215         (WebCore::Font::canRenderCombiningCharacterSequence):
2216         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2217         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2218         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2219         (WebCore::Font::getCFStringAttributes):
2220         * svg/SVGFontData.h:
2221
2222 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2223
2224         Shadow GraphicsContext's ImageInterpolationQuality inside GraphicsContextState
2225         https://bugs.webkit.org/show_bug.cgi?id=150306
2226
2227         Reviewed by Simon Fraser.
2228
2229         When getting the ImageInterpolationQuality, there is no need to round-trip through
2230         the platform's graphics context. This patch migrates this piece of state to the
2231         existing idiom of having a setter in GraphicsContext.cpp which sets the relevent
2232         state in GraphicsContextState and then calls into a platform-specific setter.
2233
2234         No new tests because there is no behavior change.
2235
2236         * platform/graphics/GraphicsContext.cpp:
2237         (WebCore::GraphicsContext::setImageInterpolationQuality):
2238         * platform/graphics/GraphicsContext.h:
2239         (WebCore::GraphicsContext::imageInterpolationQuality):
2240         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2241         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
2242         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
2243         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
2244         * platform/graphics/cg/GraphicsContextCG.cpp:
2245         (WebCore::convertInterpolationQuality):
2246         (WebCore::GraphicsContext::platformInit):
2247         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
2248         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
2249         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
2250
2251 2015-10-19  Chris Dumez  <cdumez@apple.com>
2252
2253         Drop unnecessary Node::toInputElement() virtual function
2254         https://bugs.webkit.org/show_bug.cgi?id=150341
2255
2256         Reviewed by Darin Adler.
2257
2258         Drop unnecessary Node::toInputElement() virtual function and use the
2259         usual is<HTMLInputElement>() / downcast< HTMLInputElement >() instead.
2260
2261 2015-10-19  Commit Queue  <commit-queue@webkit.org>
2262
2263         Unreviewed, rolling out r191324.
2264         https://bugs.webkit.org/show_bug.cgi?id=150352
2265
2266         Shadowing CTM's state is not necessary (Requested by litherum
2267         on #webkit).
2268
2269         Reverted changeset:
2270
2271         "Host GraphicsContext's CTM inside GraphicsContextState"
2272         https://bugs.webkit.org/show_bug.cgi?id=150146
2273         http://trac.webkit.org/changeset/191324
2274
2275 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2276
2277         Host GraphicsContext's CTM inside GraphicsContextState
2278         https://bugs.webkit.org/show_bug.cgi?id=150146
2279
2280         There are 6 operations which interact with CTMs:
2281         - Get
2282         - Set
2283         - Concatenate
2284         - Scale
2285         - Rotate
2286         - Translate
2287
2288         This patch modifies all these operations so that these operations shadow the
2289         platform's CTM inside GraphicsContextState. This way, we don't have to consult
2290         with the underlying graphics context in order to know the current CTM.
2291
2292         There are currently many places in the Core Graphics ports where we will change
2293         the platform's CTM out from under the GraphicsContext. This patch migrates
2294         those users to going through GraphicsContext, thereby preserving the integrity
2295         of the shadowed state.
2296
2297         No new tests because there is no behavior change.
2298
2299         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
2300         The getter can just consult with the shadowed state.
2301         (WebCore::GraphicsContext::concatCTM):
2302         (WebCore::GraphicsContext::scale):
2303         (WebCore::GraphicsContext::rotate):
2304         (WebCore::GraphicsContext::translate):
2305         (WebCore::GraphicsContext::setCTM):
2306         (WebCore::GraphicsContext::getCTM):
2307         (WebCore::GraphicsContext::beginTransparencyLayer):
2308         (WebCore::GraphicsContext::applyDeviceScaleFactor):
2309         * platform/graphics/GraphicsContext.h:
2310         (WebCore::GraphicsContext::scale):
2311         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
2312         matches the platform graphics context's state.
2313         * platform/graphics/Image.h:
2314         (WebCore::Image::nativeImageForCurrentFrame):
2315         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
2316         (WebCore::GraphicsContext::resetPlatformCTM):
2317         (WebCore::GraphicsContext::getPlatformCTM):
2318         (WebCore::GraphicsContext::translatePlatformCTM):
2319         (WebCore::GraphicsContext::concatPlatformCTM):
2320         (WebCore::GraphicsContext::setPlatformCTM):
2321         (WebCore::GraphicsContext::rotatePlatformCTM):
2322         (WebCore::GraphicsContext::scalePlatformCTM):
2323         (WebCore::GraphicsContext::getCTM): Deleted.
2324         (WebCore::GraphicsContext::translate): Deleted.
2325         (WebCore::GraphicsContext::concatCTM): Deleted.
2326         (WebCore::GraphicsContext::setCTM): Deleted.
2327         (WebCore::GraphicsContext::rotate): Deleted.
2328         (WebCore::GraphicsContext::scale): Deleted.
2329         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2330         Renaming functions.
2331         (WebCore::GraphicsContextPlatformPrivate::save):
2332         (WebCore::GraphicsContextPlatformPrivate::restore):
2333         (WebCore::GraphicsContextPlatformPrivate::flush):
2334         (WebCore::GraphicsContextPlatformPrivate::clip):
2335         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
2336         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
2337         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
2338         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
2339         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
2340         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
2341         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
2342         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
2343         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
2344         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
2345         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
2346         migrate CTM setters to go through GraphicsContext.
2347         (WebCore::GraphicsContext::resetPlatformCTM):
2348         (WebCore::GraphicsContext::platformInit):
2349         (WebCore::GraphicsContext::drawNativeImage):
2350         (WebCore::GraphicsContext::drawPattern):
2351         (WebCore::GraphicsContext::fillPath):
2352         (WebCore::GraphicsContext::scalePlatformCTM):
2353         (WebCore::GraphicsContext::rotatePlatformCTM):
2354         (WebCore::GraphicsContext::translatePlatformCTM):
2355         (WebCore::GraphicsContext::concatPlatformCTM):
2356         (WebCore::GraphicsContext::setPlatformCTM):
2357         (WebCore::GraphicsContext::getPlatformCTM):
2358         (WebCore::GraphicsContext::scale): Deleted.
2359         (WebCore::GraphicsContext::rotate): Deleted.
2360         (WebCore::GraphicsContext::translate): Deleted.
2361         (WebCore::GraphicsContext::concatCTM): Deleted.
2362         (WebCore::GraphicsContext::setCTM): Deleted.
2363         (WebCore::GraphicsContext::getCTM): Deleted.
2364         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
2365         (WebCore::GraphicsContextPlatformPrivate::save):
2366         (WebCore::GraphicsContextPlatformPrivate::restore):
2367         (WebCore::GraphicsContextPlatformPrivate::flush):
2368         (WebCore::GraphicsContextPlatformPrivate::clip):
2369         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
2370         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
2371         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
2372         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
2373         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
2374         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
2375         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
2376         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
2377         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
2378         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
2379         * platform/graphics/transforms/AffineTransform.h:
2380         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
2381         is not a good idea. Instead, this function is more valuable. (However, note that
2382         it is expected for values in a CTM to hold values close to 0, which means that
2383         this function might erroneously return false (similar to operator=()).
2384         * platform/graphics/win/GraphicsContextWin.cpp:
2385         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
2386         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
2387         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
2388         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
2389         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
2390         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
2391         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
2392         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
2393         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
2394         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
2395         * platform/mac/DragImageMac.mm:
2396         (WebCore::drawAtPoint):
2397         * platform/spi/cg/CoreGraphicsSPI.h:
2398
2399 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2400
2401         Remove unused support for long presses from WebKit
2402         https://bugs.webkit.org/show_bug.cgi?id=150345
2403
2404         Reviewed by Beth Dakin.
2405
2406         * page/Chrome.cpp:
2407         (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Deleted.
2408         (WebCore::Chrome::didRecognizeLongMousePress): Deleted.
2409         (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Deleted.
2410         * page/Chrome.h:
2411         * page/ChromeClient.h:
2412         * page/EventHandler.cpp:
2413         (WebCore::EventHandler::EventHandler): Deleted.
2414         (WebCore::EventHandler::clear): Deleted.
2415         (WebCore::EventHandler::handleMousePressEvent): Deleted.
2416         (WebCore::EventHandler::eventMayStartDrag): Deleted.
2417         (WebCore::EventHandler::handleMouseReleaseEvent): Deleted.
2418         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Deleted.
2419         (WebCore::EventHandler::recognizeLongMousePress): Deleted.
2420         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Deleted.
2421         (WebCore::EventHandler::clearLongMousePressState): Deleted.
2422         (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Deleted.
2423         (WebCore::EventHandler::handleMouseMoveEvent): Deleted.
2424         (WebCore::EventHandler::handleDrag): Deleted.
2425         * page/EventHandler.h:
2426         * page/Settings.in:
2427
2428 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2429
2430         WKView being inside WKWebView leads to weird API issues
2431         https://bugs.webkit.org/show_bug.cgi?id=150174
2432
2433         Reviewed by Darin Adler.
2434
2435         No new tests, just moving code around.
2436
2437         * WebCore.xcodeproj/project.pbxproj:
2438         * platform/spi/mac/NSWindowSPI.h: Added.
2439
2440 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
2441
2442         Restore an assertion to the way it was before r191310, which was correct.
2443
2444         * platform/graphics/GraphicsTypes.cpp:
2445         (WebCore::compositeOperatorName):
2446
2447 2015-10-19  Beth Dakin  <bdakin@apple.com>
2448
2449         Build fix.
2450
2451         * dom/EventNames.in:
2452         * dom/make_event_factory.pl:
2453         (generateImplementation):
2454
2455 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
2456
2457         Fix the binding generator after r191176
2458         https://bugs.webkit.org/show_bug.cgi?id=150320
2459
2460         Reviewed by Darin Adler.
2461
2462         * bindings/scripts/CodeGeneratorJS.pm:
2463         (GenerateConstructorHelperMethods):
2464         * bindings/scripts/test/JS/JSTestInterface.cpp:
2465         (WebCore::JSTestInterfaceConstructor::getConstructData):
2466
2467 2015-10-19  Commit Queue  <commit-queue@webkit.org>
2468
2469         Unreviewed, rolling out r191307.
2470         https://bugs.webkit.org/show_bug.cgi?id=150338
2471
2472         broke lots of API tests, need time to figure out whats up
2473         (Requested by thorton on #webkit).
2474
2475         Reverted changeset:
2476
2477         "WKView being inside WKWebView leads to weird API issues"
2478         https://bugs.webkit.org/show_bug.cgi?id=150174
2479         http://trac.webkit.org/changeset/191307
2480
2481 2015-10-19  Commit Queue  <commit-queue@webkit.org>
2482
2483         Unreviewed, rolling out r191295, r191297, and r191301.
2484         https://bugs.webkit.org/show_bug.cgi?id=150337
2485
2486         ASSERTs in 5 tests (Requested by litherum on #webkit).
2487
2488         Reverted changesets:
2489
2490         "Host GraphicsContext's CTM inside GraphicsContextState"
2491         https://bugs.webkit.org/show_bug.cgi?id=150146
2492         http://trac.webkit.org/changeset/191295
2493
2494         "[iOS] Build fix after r191295"
2495         http://trac.webkit.org/changeset/191297
2496
2497         "Unreviewed build fix after r191295."
2498         http://trac.webkit.org/changeset/191301
2499
2500 2015-10-16  Brian Burg  <bburg@apple.com>
2501
2502         Unify handling of JavaScriptCore scripts that are used in WebCore
2503         https://bugs.webkit.org/show_bug.cgi?id=150245
2504
2505         Reviewed by Alex Christensen.
2506
2507         Use the new JavaScriptCore_SCRIPTS_DIR variable.
2508
2509         * CMakeLists.txt:
2510         * DerivedSources.make:
2511         * WebCore.xcodeproj/project.pbxproj:
2512
2513             No need to export other variables like InspectorScripts anymore.
2514
2515 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
2516
2517         Add TextStream formatters for FillLayer and all it entails
2518         https://bugs.webkit.org/show_bug.cgi?id=150312
2519
2520         Reviewed by Tim Horton.
2521
2522         Add TextStream output formatters for FillLayer, and all the enum
2523         types used by it.
2524         
2525         Drive-by fixes for CompositeOperator and BlendMode string conversions.
2526         compositeOperatorNames was missing the "difference" string, and compositeOperatorName()
2527         would do an OOB memory access if blendOp was zero.
2528
2529         * CMakeLists.txt:
2530         * WebCore.xcodeproj/project.pbxproj:
2531         * platform/Length.cpp:
2532         (WebCore::operator<<):
2533         * platform/Length.h:
2534         * platform/LengthSize.cpp: Added.
2535         (WebCore::operator<<):
2536         * platform/LengthSize.h:
2537         * platform/text/TextStream.h:
2538         * rendering/style/FillLayer.cpp:
2539         (WebCore::operator<<):
2540         * rendering/style/FillLayer.h:
2541         * rendering/style/RenderStyleConstants.cpp: Added.
2542         (WebCore::operator<<):
2543         * rendering/style/RenderStyleConstants.h:
2544
2545 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2546
2547         WKView being inside WKWebView leads to weird API issues
2548         https://bugs.webkit.org/show_bug.cgi?id=150174
2549
2550         Reviewed by Darin Adler.
2551
2552         No new tests, just moving code around.
2553
2554         * WebCore.xcodeproj/project.pbxproj:
2555         * platform/spi/mac/NSWindowSPI.h: Added.
2556
2557 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2558
2559         Try to fix the iOS build
2560
2561         * Configurations/FeatureDefines.xcconfig:
2562
2563 2015-10-19  Alex Christensen  <achristensen@webkit.org>
2564
2565         Unreviewed build fix after r191295.
2566
2567         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2568         (WebCore::GraphicsContext::translatePlatformCTM):
2569         (WebCore::GraphicsContext::setPlatformFillColor):
2570         (WebCore::GraphicsContext::concatPlatformCTM):
2571         (WebCore::GraphicsContext::setPlatformCTM):
2572         (WebCore::GraphicsContext::setPlatformShadow):
2573         (WebCore::GraphicsContext::rotatePlatformCTM):
2574         (WebCore::GraphicsContext::scalePlatformCTM):
2575         (WebCore::GraphicsContext::clipOut):
2576         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2577         (WebCore::GraphicsContextPlatformPrivate::save):
2578         (WebCore::GraphicsContextPlatformPrivate::restore):
2579         (WebCore::GraphicsContextPlatformPrivate::flush):
2580         (WebCore::GraphicsContextPlatformPrivate::clip):
2581         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
2582         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
2583         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
2584         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
2585         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
2586         (WebCore::GraphicsContextPlatformPrivate::syncContext):
2587         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
2588         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
2589         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
2590         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
2591         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
2592
2593 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2594
2595         Add magnify and rotate gesture event support for Mac
2596         https://bugs.webkit.org/show_bug.cgi?id=150179
2597         <rdar://problem/8036240>
2598
2599         Reviewed by Darin Adler.
2600
2601         No new tests.
2602
2603         * Configurations/FeatureDefines.xcconfig:
2604         New feature flag.
2605
2606         * Configurations/WebCore.xcconfig:
2607         Don't exclude generated gesture sources; they are already #ifdef-guarded.
2608
2609         * DerivedSources.make:
2610         Add GestureEvent.idl for ENABLE_MAC_GESTURE_EVENTS too.
2611
2612         * WebCore.xcodeproj/project.pbxproj:
2613         Add GestureEvents.cpp.
2614
2615         * bindings/objc/DOMEvents.mm:
2616         (kitClass):
2617         Support DOMGestureEvent on Mac if the new flag is enabled.
2618
2619         * dom/mac/GestureEvents.cpp: Added.
2620         * page/mac/EventHandlerMac.mm:
2621
2622         * page/EventHandler.cpp:
2623         (WebCore::EventHandler::clear):
2624         * page/EventHandler.h:
2625         Enable some gesture-related code on Mac if the new flag is enabled.
2626
2627         * platform/PlatformEvent.h:
2628
2629 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2630
2631         [iOS] Build fix after r191295
2632
2633         Unreviewed.
2634
2635         * platform/graphics/cg/GraphicsContextCG.cpp:
2636         (WebCore::GraphicsContext::resetPlatformCTM):
2637
2638 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
2639
2640         Host GraphicsContext's CTM inside GraphicsContextState
2641         https://bugs.webkit.org/show_bug.cgi?id=150146
2642
2643         Reviewed by Simon Fraser.
2644
2645         There are 6 operations which interact with CTMs:
2646         - Get
2647         - Set
2648         - Concatenate
2649         - Scale
2650         - Rotate
2651         - Translate
2652
2653         This patch modifies all these operations so that these operations shadow the
2654         platform's CTM inside GraphicsContextState. This way, we don't have to consult
2655         with the underlying graphics context in order to know the current CTM.
2656
2657         There are currently many places in the Core Graphics ports where we will change
2658         the platform's CTM out from under the GraphicsContext. This patch migrates
2659         those users to going through GraphicsContext, thereby preserving the integrity
2660         of the shadowed state.
2661
2662         No new tests because there is no behavior change.
2663
2664         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
2665         The getter can just consult with the shadowed state.
2666         (WebCore::GraphicsContext::concatCTM):
2667         (WebCore::GraphicsContext::scale):
2668         (WebCore::GraphicsContext::rotate):
2669         (WebCore::GraphicsContext::translate):
2670         (WebCore::GraphicsContext::setCTM):
2671         (WebCore::GraphicsContext::getCTM):
2672         (WebCore::GraphicsContext::beginTransparencyLayer):
2673         (WebCore::GraphicsContext::applyDeviceScaleFactor):
2674         * platform/graphics/GraphicsContext.h:
2675         (WebCore::GraphicsContext::scale):
2676         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
2677         matches the platform graphics context's state.
2678         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
2679         (WebCore::GraphicsContext::resetPlatformCTM):
2680         (WebCore::GraphicsContext::getPlatformCTM):
2681         (WebCore::GraphicsContext::translatePlatformCTM):
2682         (WebCore::GraphicsContext::concatPlatformCTM):
2683         (WebCore::GraphicsContext::setPlatformCTM):
2684         (WebCore::GraphicsContext::rotatePlatformCTM):
2685         (WebCore::GraphicsContext::scalePlatformCTM):
2686         (WebCore::GraphicsContext::getCTM): Deleted.
2687         (WebCore::GraphicsContext::translate): Deleted.
2688         (WebCore::GraphicsContext::concatCTM): Deleted.
2689         (WebCore::GraphicsContext::setCTM): Deleted.
2690         (WebCore::GraphicsContext::rotate): Deleted.
2691         (WebCore::GraphicsContext::scale): Deleted.
2692         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
2693         migrate CTM setters to go through GraphicsContext.
2694         (WebCore::GraphicsContext::resetPlatformCTM):
2695         (WebCore::GraphicsContext::platformInit):
2696         (WebCore::GraphicsContext::drawNativeImage):
2697         (WebCore::drawPatternCallback):
2698         (WebCore::GraphicsContext::drawPattern):
2699         (WebCore::GraphicsContext::fillPath):
2700         (WebCore::GraphicsContext::strokePath):
2701         (WebCore::GraphicsContext::fillRect):
2702         (WebCore::GraphicsContext::strokeRect):
2703         (WebCore::GraphicsContext::scalePlatformCTM):
2704         (WebCore::GraphicsContext::rotatePlatformCTM):
2705         (WebCore::GraphicsContext::translatePlatformCTM):
2706         (WebCore::GraphicsContext::concatPlatformCTM):
2707         (WebCore::GraphicsContext::setPlatformCTM):
2708         (WebCore::GraphicsContext::getPlatformCTM):
2709         (WebCore::GraphicsContext::scale): Deleted.
2710         (WebCore::GraphicsContext::rotate): Deleted.
2711         (WebCore::GraphicsContext::translate): Deleted.
2712         (WebCore::GraphicsContext::concatCTM): Deleted.
2713         (WebCore::GraphicsContext::setCTM): Deleted.
2714         (WebCore::GraphicsContext::getCTM): Deleted.
2715         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
2716         (WebCore::GraphicsContextPlatformPrivate::save):
2717         (WebCore::GraphicsContextPlatformPrivate::restore):
2718         (WebCore::GraphicsContextPlatformPrivate::flush):
2719         (WebCore::GraphicsContextPlatformPrivate::clip):
2720         (WebCore::GraphicsContextPlatformPrivate::scale):
2721         (WebCore::GraphicsContextPlatformPrivate::rotate):
2722         (WebCore::GraphicsContextPlatformPrivate::translate):
2723         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
2724         (WebCore::GraphicsContextPlatformPrivate::setCTM):
2725         * platform/graphics/transforms/AffineTransform.h:
2726         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
2727         is not a good idea. Instead, this function is more valuable. (However, note that
2728         it is expected for values in a CTM to hold values close to 0, which means that
2729         this function might erroneously return false (similar to operator=()).
2730         * platform/graphics/win/GraphicsContextWin.cpp:
2731         (WebCore::GraphicsContextPlatformPrivate::scale):
2732         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
2733         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
2734         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
2735         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
2736         * platform/mac/DragImageMac.mm:
2737         (WebCore::drawAtPoint):
2738
2739 2015-10-19  Chris Dumez  <cdumez@apple.com>
2740
2741         Null dereference loading Blink layout test fast/forms/color/input-color-onchange-event.html
2742         https://bugs.webkit.org/show_bug.cgi?id=150192
2743         <rdar://problem/23135050>
2744
2745         Reviewed by Darin Adler.
2746
2747         Calling internals.selectColorInColorChooser() with a non-Element would
2748         cause a null dereference. This is because in such case, the implementation
2749         method is passed a null pointer and we would fail to null-check it. This
2750         patch now does the null-check.
2751
2752         No new tests, existing test was updated.
2753
2754         * testing/Internals.cpp:
2755         (WebCore::Internals::selectColorInColorChooser):
2756
2757 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
2758
2759         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r190840
2760         https://bugs.webkit.org/show_bug.cgi?id=150322
2761
2762         Reviewed by Ryosuke Niwa.
2763
2764         * html/HTMLDetailsElement.cpp:
2765
2766 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2767
2768         Binding generator should generate names for JSBuiltins partial interface methods using ImplementedBy value
2769         https://bugs.webkit.org/show_bug.cgi?id=150163
2770
2771         Reviewed by Darin Adler.
2772
2773         Covered by updated binding tests.
2774
2775         Updating generation of JS built-in function/attribute name to use the ImplementedBy value of the interface if any.
2776         This allows splitting JS built-ins just like is done for IDLs.
2777         Updated accordingly the JS Builtin header include.
2778
2779         * bindings/scripts/CodeGeneratorJS.pm:
2780         (GetAttributeGetterName): Updated to pass function object and not only function name.
2781         (GetAttributeSetterName): Ditto.
2782         (GetFunctionName): Removed unneeded code plus updated to pass function object and not only function name.
2783         (GenerateConstructorHelperMethods): Making direct use of GetJSBuiltinFunctionNameFromString since there is no function object for the constructor.
2784         (GetJSBuiltinFunctionName): Updated to take into accound ImplementedBy value if any.
2785         (GetJSBuiltinFunctionNameFromString):
2786         (GetJSBuiltinScopeName): Returns either the interface name or its ImplementedBy value.
2787         (AddJSBuiltinIncludesIfNeeded): Updating name of the header in case of partial interface.
2788         * bindings/scripts/test/JS/JSTestInterface.cpp:
2789         * bindings/scripts/test/ObjC/DOMTestInterface.h:
2790         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2791         (-[DOMTestInterface builtinAttribute]):
2792         (-[DOMTestInterface setBuiltinAttribute:]):
2793         (-[DOMTestInterface builtinFunction]):
2794         * bindings/scripts/test/TestSupplemental.idl: Added JSBuiltin attribute and function.
2795
2796 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2797
2798         Binding generator should allow generating private JS functions
2799         https://bugs.webkit.org/show_bug.cgi?id=150167
2800
2801         Reviewed by Darin Adler.
2802
2803         Introducing the "Private" keyword for that purpose.
2804         Applying it to MediaDevices.getUserMedia which can be used directly or through navigator.webkitGetUserMedia
2805         which could be implemented as JS builtin based on it.
2806
2807         "Private" functions are added to the prototype with a corresponding private symbol.
2808         This symbol must be defined in bindings/js/WebCoreBuiltinNames.h.
2809
2810         Adding a getUserMediaFromJS function visible from builtins script.
2811         Implementing MediaDevices.getUserMedia as a JS builtin based on it.
2812
2813         Adding binding generator test.
2814
2815         * CMakeLists.txt: Adding MediaDevices.js.
2816         * DerivedSources.make: Ditto.
2817         * Modules/mediastream/MediaDevices.h:
2818         (WebCore::MediaDevices::getUserMediaFromJS):
2819         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS private and getUserMedia JSBuiltin.
2820         * Modules/mediastream/MediaDevices.js: Added.
2821         (getUserMedia):
2822         * bindings/js/WebCoreBuiltinNames.h:
2823         * bindings/js/WebCoreJSBuiltins.cpp:
2824         * bindings/js/WebCoreJSBuiltins.h:
2825         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
2826         (WebCore::JSBuiltinFunctions::mediaDevicesBuiltins):
2827         * bindings/scripts/CodeGeneratorGObject.pm: Skipping generation of Private functions.
2828         (SkipFunction):
2829         * bindings/scripts/CodeGeneratorJS.pm:
2830         (GenerateImplementation): Disabling addition of private function in table and adding private member field to the prototype.
2831         * bindings/scripts/CodeGeneratorObjC.pm: Skipping generation of Private functions.
2832         (SkipFunction):
2833         * bindings/scripts/IDLAttributes.txt: Adding Private keyword.
2834         * bindings/scripts/test/JS/JSTestObj.cpp: Adding Private keyword test.
2835         (WebCore::JSTestObjPrototype::finishCreation):
2836         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
2837         * bindings/scripts/test/TestObj.idl:
2838
2839 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2840
2841         [Streams API] Implement ReadableStream tee
2842         https://bugs.webkit.org/show_bug.cgi?id=146315
2843
2844         Reviewed by Darin Adler.
2845
2846         Covered by rebased test.
2847
2848         * Modules/streams/ReadableStream.js:
2849         (tee): Removing not implemented exception throwing.
2850         * Modules/streams/ReadableStreamInternals.js:
2851         (teeReadableStream): Implementing as per spec.
2852         (teeReadableStreamPullFunction): Ditto.
2853         (teeReadableStreamBranch2CancelFunction): Ditto.
2854
2855 2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2856
2857         [Streams API] Add skeleton for initial WritableStream support
2858         https://bugs.webkit.org/show_bug.cgi?id=149951
2859
2860         Reviewed by Darin Adler.
2861
2862         This basically adds an empty WritableStream object without initializing the object. It also adds all empty
2863         methods by raising an exception.
2864
2865         The reason why the object is not fully initialized is that it requires some other support and some refactorings
2866         to share more code with ReadableStream and we will make in following patches.
2867
2868         Tests are covered by current set and their expectations are properly updated.
2869
2870         * CMakeLists.txt:
2871         * DerivedSources.cpp:
2872         * DerivedSources.make:
2873         * WebCore.vcxproj/WebCore.vcxproj:
2874         * WebCore.vcxproj/WebCore.vcxproj.filters:
2875         * WebCore.xcodeproj/project.pbxproj:
2876         * bindings/js/WebCoreJSBuiltins.cpp:
2877         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
2878         * Modules/streams/WritableStream.idl: Added all methods and attributes.
2879         * Modules/streams/WritableStream.js:
2880         (initializeWritableStream):
2881         (abort):
2882         (close):
2883         (write):
2884         (closed):
2885         (ready):
2886         (state): Added all by throwing an EvalError.
2887
2888 2015-10-18  Chris Dumez  <cdumez@apple.com>
2889
2890         Script element with an empty for or event attributes should not execute
2891         https://bugs.webkit.org/show_bug.cgi?id=148855
2892         <rdar://problem/22588156>
2893
2894         Reviewed by Darin Adler.
2895
2896         A script element with an empty for or event attributes should not execute
2897         as per:
2898         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12)
2899
2900         Our implementation had a bug where it would not correctly differentiate
2901         an empty attribute from a missing one. This patch fixes this.
2902
2903         No new tests, already covered by existing test.
2904
2905         * dom/ScriptElement.cpp:
2906         (WebCore::ScriptElement::isScriptForEventSupported):
2907
2908 2015-10-18  Chris Dumez  <cdumez@apple.com>
2909
2910         WebKit must support all JavaScript MIME types in HTML5 spec
2911         https://bugs.webkit.org/show_bug.cgi?id=148854
2912         <rdar://problem/22588195>
2913
2914         Reviewed by Darin Adler.
2915
2916         WebKit did not execute certain EcmaScript MIME types although the HTML
2917         specification says all user agents should support those:
2918         https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type
2919
2920         In particular, the following MIME types are now recognized as valid and
2921         executed: "application/x-ecmascript", "text/javascript1.0",
2922         "text/javascript1.4", "text/javascript1.5", "text/x-javascript",
2923         "text/x-ecmascript".
2924
2925         The new behavior is consistent with Firefox.
2926
2927         No new tests, already covered by existing test.
2928
2929         * platform/MIMETypeRegistry.cpp:
2930         (WebCore::initializeSupportedJavaScriptMIMETypes):
2931
2932 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
2933
2934         [Win] Fix the Windows builds.
2935         https://bugs.webkit.org/show_bug.cgi?id=150300
2936
2937         Reviewed by Darin Adler.
2938
2939         Add missing files to WebCore.vcxproj.
2940         Add missing #includes to CSSAllInOne.cpp and HTMLElementsAllInOne.cpp.
2941
2942         No new tests, no behavior change.
2943
2944         * WebCore.vcxproj/WebCore.vcxproj:
2945         * WebCore.vcxproj/WebCore.vcxproj.filters:
2946         * css/CSSAllInOne.cpp:
2947         * html/HTMLElementsAllInOne.cpp:
2948
2949 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
2950
2951         Fix the builds with ENABLE_CONTENT_EXTENSIONS=OFF.
2952         https://bugs.webkit.org/show_bug.cgi?id=150302
2953
2954         Reviewed by Darin Adler.
2955
2956         Add missing #if ENABLE(CONTENT_EXTENSIONS).
2957
2958         No new tests, no behavior change.
2959
2960         * page/UserContentController.h:
2961
2962 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
2963
2964         [EFL] Fix debug build break since r191198
2965         https://bugs.webkit.org/show_bug.cgi?id=150277
2966
2967         Reviewed by Darin Adler.
2968
2969         No new tests, no new behaviours.
2970
2971         Use the correct %"PRIu64" for uint64_t,
2972         instead of %llu.
2973
2974         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2975         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
2976         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2977         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
2978         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp:
2979         (WebCore::IDBDatabaseBackend::processPendingOpenCalls):
2980         (WebCore::IDBDatabaseBackend::openConnectionInternal):
2981         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2982         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
2983
2984 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
2985
2986         Fix the builds with ENABLE_INDEX_DATABASE=OFF.
2987         https://bugs.webkit.org/show_bug.cgi?id=150301
2988
2989         Reviewed by Darin Adler.
2990
2991         Add missing #if ENABLE(INDEXED_DATABASE).
2992
2993         No new tests, no behavior change.
2994
2995         * page/Page.cpp:
2996
2997 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
2998
2999         [Cocoa] [Win] Remove unused code from GraphicsContext
3000         https://bugs.webkit.org/show_bug.cgi?id=150304
3001
3002         Reviewed by Darin Adler.
3003
3004         No new tests because there is no behavior change.
3005
3006         * platform/graphics/GraphicsContext.h:
3007         * platform/graphics/cg/GraphicsContextCG.cpp:
3008         (WebCore::GraphicsContext::setAllowsFontSmoothing): Deleted.
3009
3010 2015-10-18  Antti Koivisto  <antti@apple.com>
3011
3012         Computed style should work correctly with slotted elements that have display:none
3013         https://bugs.webkit.org/show_bug.cgi?id=150237
3014
3015         Reviewed by Andreas Kling..
3016
3017         If an element has display:none we don't normally retain or even compute its style (as it is not rendered).
3018         If getComputedStyle is invoked for such element we resolve the style (along with any ancestors) and cache
3019         it separately to rare data. This path needs to work with slotted elements in shadow trees.
3020
3021         This patch also make computedStyle() iterative rather than recursive.
3022
3023         Test: fast/shadow-dom/computed-style-display-none.html
3024
3025         * dom/Document.cpp:
3026         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
3027
3028             Pass in the parent style instead of invoking computedStyle() recursively.
3029
3030         * dom/Document.h:
3031         * dom/Element.cpp:
3032         (WebCore::beforeOrAfterPseudoElement):
3033         (WebCore::Element::existingComputedStyle):
3034         (WebCore::Element::resolveComputedStyle):
3035
3036             Iterative resolve function that uses composed tree iterator.
3037
3038         (WebCore::Element::computedStyle):
3039
3040             Factor into helpers.
3041
3042         * dom/Element.h:
3043         * dom/Node.cpp:
3044         (WebCore::Node::computedStyle):
3045
3046             Use the composed tree iterator.
3047
3048         * html/HTMLSelectElement.cpp:
3049         (WebCore::HTMLSelectElement::selectOption):
3050
3051             Call updateValidity() before calling renderer->updateFromElement(). Calling updateFromElement()
3052             may end up in Element::computedStyle() which can asserts if validity is not up to date.
3053
3054 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
3055
3056         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
3057         https://bugs.webkit.org/show_bug.cgi?id=150287
3058
3059         Reviewed by Simon Fraser.
3060
3061         This user default is currently on by default. Therefore, by setting the user default,
3062         users can only disable kerning / ligatures (rather than enable it).
3063
3064         There are a few reasons why we should stop honoring it:
3065
3066         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
3067         are many different kinds of ligatures which may be enabled at will. The simplistic
3068         statement of "turn on ligatures" no longer has any meaning.
3069
3070         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
3071         stylesheet.
3072
3073         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
3074
3075         4. I have never heard of anyone actually using this user default.
3076
3077         * platform/graphics/FontCascade.cpp:
3078         (WebCore::FontCascade::setDefaultKerning): Deleted.
3079         (WebCore::FontCascade::setDefaultLigatures): Deleted.
3080         * platform/graphics/FontCascade.h:
3081         (WebCore::FontCascade::advancedTextRenderingMode):
3082
3083 2015-10-18  Commit Queue  <commit-queue@webkit.org>
3084
3085         Unreviewed, rolling out r191250 and r191253.
3086         https://bugs.webkit.org/show_bug.cgi?id=150296
3087
3088         Broke all the tests on Windows (Requested by ap on #webkit).
3089
3090         Reverted changesets:
3091
3092         "Stop honoring the user default
3093         "WebKitKerningAndLigaturesEnabledByDefault""
3094         https://bugs.webkit.org/show_bug.cgi?id=150287
3095         http://trac.webkit.org/changeset/191250
3096
3097         "Build fix after r191250"
3098         http://trac.webkit.org/changeset/191253
3099
3100 2015-10-17  David Hyatt  <hyatt@apple.com>
3101
3102         Implement the CSS4 'revert' keyword.
3103         https://bugs.webkit.org/show_bug.cgi?id=149702
3104
3105         Reviewed by Simon Fraser.
3106
3107         Added new tests in fast/css and fast/css/variables.
3108
3109         * CMakeLists.txt:
3110         * WebCore.xcodeproj/project.pbxproj:
3111         Add CSSRevertValue to the project and makefiles.
3112
3113         * css/CSSParser.cpp:
3114         (WebCore::parseKeywordValue):
3115         Make sure to handle "revert" in the keyword parsing path (along with inherit/initial/unset).
3116
3117         (WebCore::CSSParser::parseValue):
3118         (WebCore::CSSParser::parseCustomPropertyDeclaration):
3119         At the parser level, "revert" is just like inherit/initial/unset and gets its own special
3120         singleton value, CSSRevertValue.
3121
3122         * css/CSSRevertValue.cpp: Added.
3123         (WebCore::CSSRevertValue::customCSSText):
3124         * css/CSSRevertValue.h: Added.
3125         (WebCore::CSSRevertValue::create):
3126         (WebCore::CSSRevertValue::equals):
3127         (WebCore::CSSRevertValue::CSSRevertValue):
3128         This value is identical to the inherit/initial/unset values, i.e., its own special value
3129         that can be used to indicate a revert when doing style resolution.
3130
3131         * css/CSSValue.cpp:
3132         (WebCore::CSSValue::cssValueType):
3133         (WebCore::CSSValue::equals):
3134         (WebCore::CSSValue::cssText):
3135         (WebCore::CSSValue::destroy):
3136         * css/CSSValue.h:
3137         (WebCore::CSSValue::isInheritedValue):
3138         (WebCore::CSSValue::isInitialValue):
3139         (WebCore::CSSValue::isUnsetValue):
3140         (WebCore::CSSValue::isRevertValue):
3141         Add the RevertClass to CSSValue and make sure it is handled in all the appropriate methods.
3142
3143         * css/CSSValueKeywords.in:
3144         Add the "revert" keyword to the list of allowed CSS keywords.
3145
3146         * css/CSSValuePool.cpp:
3147         (WebCore::CSSValuePool::CSSValuePool):
3148         * css/CSSValuePool.h:
3149         (WebCore::CSSValuePool::createRevertValue):
3150         Add support for a CSSRevertValue singleton, just like inherit/unset/initial.
3151
3152         * css/FontLoader.cpp:
3153         (WebCore::FontLoader::resolveFontStyle):
3154         Add "unset" and "revert" as special keywords to be ignored. This code seems to be turned off,
3155         but patching it anyway.
3156
3157         * css/SelectorChecker.h:
3158         Add a MatchDefault value of 0 to the LinkMatchMask. This enables it to be used as an index
3159         to the correct value in Property (in the style resolution code).
3160
3161         * css/StyleResolver.cpp:
3162         (WebCore::StyleResolver::State::initForStyleResolve):
3163         Delete any lingering old CascadedProperty rollbacks for UA/user rules.
3164
3165         (WebCore::StyleResolver::styleForKeyframe):
3166         (WebCore::StyleResolver::styleForPage):
3167         (WebCore::StyleResolver::applyMatchedProperties):
3168         Pass along the MatchResult as an additional parameter, since we need it to lazily compute
3169         the cascade rollbacks if the "revert" keyword is encountered.
3170
3171         (WebCore::StyleResolver::cascadedPropertiesForRollback):
3172         This method will lazily create and return a new CascadedProperties pointer that is cached
3173         in the StyleResolver's state. This will contain only UA rules (for user reverts) and UA/user
3174         rules (for author reverts). These will only be computed at most once for a given element
3175         when doing a reversion, and they will be computed lazily, i.e., only if a revert is
3176         requested.
3177
3178         (WebCore::StyleResolver::applyProperty):
3179         Pass along the LinkMatchMask and the MatchResult to applyProperty. This way we know specifically
3180         which link type we were computing if we have to revert (so that we roll back and look at the
3181         same index in the reverted version). The MatchResult is passed along because it is needed
3182         to build the CascadedProperties rollbacks.
3183
3184         The basic idea is that if a revert is encountered, the level that the rule came from is
3185         checked. If it is UA level, just treat as "unset." If it is author or user level, get
3186         the correct CascadedProperties rollback and repeat the applyProperty using the property
3187         found in the rollback. If the property is not present in the cascade rollback, then the
3188         revert becomes an unset.
3189
3190         (WebCore::StyleResolver::CascadedProperties::hasCustomProperty):
3191         (WebCore::StyleResolver::CascadedProperties::customProperty):
3192         Helpers used by applyProperty to check on custom properties, since they can revert too
3193         just like a regular property can.
3194
3195         (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
3196         (WebCore::StyleResolver::CascadedProperties::set):
3197         (WebCore::StyleResolver::CascadedProperties::setDeferred):
3198         Passing along the CascadeLevel (UA, User, Author) so that it can be stored in the Property.
3199         This way when we do property application, we always know where the rule came from so
3200         that the reversion can be handled properly.
3201
3202         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
3203         (WebCore::cascadeLevelForIndex):
3204         (WebCore::StyleResolver::CascadedProperties::addMatches):
3205         When style properties are added, also figure out the CascadeLevel and pass it along to be
3206         stored in the Property. We use the MatchResult's ranges to know where a property comes from.
3207
3208         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
3209         (WebCore::StyleResolver::CascadedProperties::Property::apply):
3210         (WebCore::StyleResolver::applyCascadedProperties):
3211         Pass along the MatchResult so we know how to build the rollback.
3212
3213         * css/StyleResolver.h:
3214         (WebCore::StyleResolver::State::cascadeLevel):
3215         (WebCore::StyleResolver::State::setCascadeLevel):
3216         (WebCore::StyleResolver::State::authorRollback):
3217         (WebCore::StyleResolver::State::userRollback):
3218         (WebCore::StyleResolver::State::setAuthorRollback):
3219         (WebCore::StyleResolver::State::setUserRollback):
3220         (WebCore::StyleResolver::state):
3221         (WebCore::StyleResolver::cascadeLevel):
3222         (WebCore::StyleResolver::setCascadeLevel):
3223         Move CascadedProperties into the header. Add CascadeLevel to Property. Add the level and
3224         rollbacks to the resolver's state.
3225
3226 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
3227
3228         Delete FontPlatformData::allowsLigatures()
3229         https://bugs.webkit.org/show_bug.cgi?id=150286
3230
3231         Reviewed by Dan Bernstein.
3232
3233         This function is only used to force ligatures on for complex fonts (where "complex"
3234         means "does not support the letter 'a'"). However, ligatures are turned on for all
3235         fonts by default, which means that this function is unnecessary.
3236
3237         Required ligatures, such as those which make these complex scripts legible, are always
3238         enabled, no matter what.
3239
3240         Test: fast/text/required-ligatures.html
3241
3242         * platform/graphics/FontPlatformData.h:
3243         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3244         (WebCore::FontPlatformData::allowsLigatures): Deleted.
3245         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3246         (WebCore::Font::getCFStringAttributes):
3247
3248 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
3249
3250         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
3251         https://bugs.webkit.org/show_bug.cgi?id=150287
3252
3253         Reviewed by Simon Fraser.
3254
3255         This user default is currently on by default. Therefore, by setting the user default,
3256         users can only disable kerning / ligatures (rather than enable it).
3257
3258         There are a few reasons why we should stop honoring it:
3259
3260         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
3261         are many different kinds of ligatures which may be enabled at will. The simplistic
3262         statement of "turn on ligatures" no longer has any meaning.
3263
3264         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
3265         stylesheet.
3266
3267         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
3268
3269         4. I have never heard of anyone actually using this user default.
3270
3271         * platform/graphics/FontCascade.cpp:
3272         (WebCore::FontCascade::setDefaultKerning): Deleted.
3273         (WebCore::FontCascade::setDefaultLigatures): Deleted.
3274         * platform/graphics/FontCascade.h:
3275         (WebCore::FontCascade::advancedTextRenderingMode):
3276
3277 2015-10-17  Dan Bernstein  <mitz@apple.com>
3278
3279         [Cocoa] Stop using WKAXRegisterRemoteApp
3280         https://bugs.webkit.org/show_bug.cgi?id=150283
3281
3282         Reviewed by Alexey Proskuryakov.
3283
3284         * platform/spi/ios/GraphicsServicesSPI.h: Added declaration of GSSystemRootDirectory.
3285
3286 2015-10-17  Chris Dumez  <cdumez@apple.com>
3287
3288         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
3289         https://bugs.webkit.org/show_bug.cgi?id=148859
3290         <rdar://problem/22588664>
3291
3292         Reviewed by Ryosuke Niwa.
3293
3294         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
3295         as per the latest HTML specification:
3296         https://html.spec.whatwg.org/multipage/tables.html#htmltabledatacellelement
3297         https://html.spec.whatwg.org/multipage/tables.html#htmltableheadercellelement
3298
3299         This patch aligns our behavior with the specification and IE. Firefox and Chrome do not
3300         seem to expose HTMLTableDataCellElement / HTMLTableHeaderCellElement at this time.
3301
3302         The compatibility risk is low, given that the API stays the same and those new
3303         interfaces inherit the pre-existing HTMLTableCellElement interface.
3304
3305         No new tests, already covered by existing tests.
3306
3307         * CMakeLists.txt:
3308         * DerivedSources.cpp:
3309         * DerivedSources.make:
3310         * WebCore.vcxproj/WebCore.vcxproj:
3311         * WebCore.vcxproj/WebCore.vcxproj.filters:
3312         * WebCore.xcodeproj/project.pbxproj:
3313         * html/HTMLTableCellElement.cpp:
3314         (WebCore::HTMLTableCellElement::HTMLTableCellElement):
3315         (WebCore::HTMLTableCellElement::colSpan): Deleted.
3316         * html/HTMLTableCellElement.h:
3317         * html/HTMLTableCellElement.idl:
3318         * html/HTMLTableDataCellElement.h: Added.
3319         * html/HTMLTableDataCellElement.idl: Added.
3320         * html/HTMLTableHeaderCellElement.h: Added.
3321         * html/HTMLTableHeaderCellElement.idl: Added.
3322         * html/HTMLTableRowElement.cpp:
3323         (WebCore::HTMLTableRowElement::insertCell):
3324         * html/HTMLTagNames.in:
3325
3326 2015-10-17  Zalan Bujtas  <zalan@apple.com>
3327
3328         RenderBlockFlow::xPositionForFloatIncludingMargin/yPositionForFloatIncludingMargin/flipFloatForWritingModeForChild
3329         should all take FloatingObject reference.
3330         https://bugs.webkit.org/show_bug.cgi?id=150267
3331
3332         Reviewed by Simon Fraser.
3333
3334         No change in behaviour.
3335
3336         * rendering/RenderBlockFlow.cpp:
3337         (WebCore::RenderBlockFlow::addOverflowFromFloats):
3338         (WebCore::RenderBlockFlow::paintFloats):
3339         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
3340         (WebCore::RenderBlockFlow::addOverhangingFloats):
3341         (WebCore::RenderBlockFlow::flipFloatForWritingModeForChild):
3342         (WebCore::RenderBlockFlow::hitTestFloats):
3343         (WebCore::RenderBlockFlow::adjustForBorderFit):
3344         * rendering/RenderBlockFlow.h:
3345         (WebCore::RenderBlockFlow::xPositionForFloatIncludingMargin):
3346         (WebCore::RenderBlockFlow::yPositionForFloatIncludingMargin):
3347
3348 2015-10-17  Simon Fraser  <simon.fraser@apple.com>
3349
3350         Sort the project file.
3351
3352         * WebCore.xcodeproj/project.pbxproj:
3353
3354 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
3355
3356         Enhance TextStream for logging, remove subclasses, log more things
3357         https://bugs.webkit.org/show_bug.cgi?id=150269
3358
3359         Reviewed by Zalan Bujtas.
3360
3361         Remove the various TextStream subclasses that only existed to support indenting,
3362         and output additional types. Add output for more WebCore and WebKit2 types, and
3363         just use TextStream everywhere.
3364         
3365         TextStream is enhance to support grouping (open paren and intent), with a 
3366         stack-based class to open/end a group.
3367         
3368         Remove some SVG-specific duplicate output functions.
3369         
3370         Outdent namespace contents of GraphicsTypes.h.
3371         
3372         * CMakeLists.txt:
3373         * WebCore.xcodeproj/project.pbxproj:
3374         * dom/ViewportArguments.cpp:
3375         (WebCore::operator<<):
3376         * dom/ViewportArguments.h:
3377         * page/ViewportConfiguration.cpp:
3378         (WebCore::operator<<):
3379         (WebCore::ViewportConfiguration::description):
3380         (WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream): Deleted.
3381         (WebCore::ViewportConfigurationTextStream::increaseIndent): Deleted.
3382         (WebCore::ViewportConfigurationTextStream::decreaseIndent): Deleted.
3383         (WebCore::dumpProperty): Deleted.
3384         (WebCore::ViewportConfigurationTextStream::writeIndent): Deleted.
3385         (WebCore::ViewportConfigurationTextStream::operator<<): Deleted.
3386         * page/ViewportConfiguration.h:
3387         * page/scrolling/ScrollingConstraints.cpp:
3388         (WebCore::operator<<):
3389         * page/scrolling/ScrollingConstraints.h:
3390         * page/scrolling/ScrollingCoordinator.cpp:
3391         (WebCore::operator<<):
3392         * page/scrolling/ScrollingCoordinator.h:
3393         * platform/animation/TimingFunction.cpp: Added.
3394         (WebCore::operator<<):
3395         * platform/animation/TimingFunction.h:
3396         * platform/graphics/Color.cpp:
3397         (WebCore::operator<<):
3398         * platform/graphics/Color.h:
3399         * platform/graphics/FloatPoint3D.cpp:
3400         (WebCore::operator<<):
3401         * platform/graphics/FloatPoint3D.h:
3402         * platform/graphics/FloatRoundedRect.cpp:
3403         (WebCore::operator<<):
3404         * platform/graphics/FloatRoundedRect.h:
3405         * platform/graphics/GraphicsLayer.cpp:
3406         (WebCore::operator<<):
3407         * platform/graphics/GraphicsLayer.h:
3408         * platform/graphics/GraphicsTypes.cpp:
3409         (WebCore::operator<<):
3410         * platform/graphics/GraphicsTypes.h:
3411         * platform/graphics/ca/PlatformCAAnimation.cpp: Added.
3412         (WebCore::operator<<):
3413         * platform/graphics/ca/PlatformCAAnimation.h:
3414         * platform/graphics/ca/PlatformCALayer.cpp:
3415         (WebCore::operator<<):
3416         * platform/graphics/ca/PlatformCALayer.h:
3417         * platform/graphics/filters/FilterOperation.cpp:
3418         (WebCore::operator<<):
3419         * platform/graphics/filters/FilterOperation.h:
3420         * platform/graphics/filters/FilterOperations.cpp:
3421         (WebCore::operator<<):
3422         * platform/graphics/filters/FilterOperations.h:
3423         * platform/graphics/filters/PointLightSource.cpp:
3424         (WebCore::operator<<): Deleted.
3425         * platform/graphics/filters/SpotLightSource.cpp:
3426         (WebCore::operator<<): Deleted.
3427         * platform/graphics/transforms/AffineTransform.cpp:
3428         (WebCore::operator<<):
3429         * platform/graphics/transforms/AffineTransform.h:
3430         * platform/graphics/transforms/TransformationMatrix.cpp:
3431         (WebCore::operator<<):
3432         * platform/graphics/transforms/TransformationMatrix.h:
3433         * platform/text/TextStream.cpp:
3434         (WebCore::TextStream::startGroup):
3435         (WebCore::TextStream::endGroup):
3436         (WebCore::TextStream::nextLine):
3437         (WebCore::TextStream::writeIndent):
3438         * platform/text/TextStream.h:
3439         (WebCore::TextStream::operator<<):
3440         (WebCore::TextStream::dumpProperty):
3441         (WebCore::TextStream::increaseIndent):
3442         (WebCore::TextStream::decreaseIndent):
3443         (WebCore::TextStream::GroupScope::GroupScope):
3444         (WebCore::TextStream::GroupScope::~GroupScope):
3445         * rendering/svg/SVGRenderTreeAsText.cpp:
3446         (WebCore::operator<<): Deleted.
3447         * rendering/svg/SVGRenderTreeAsText.h:
3448
3449 2015-10-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3450
3451         Finalize bug 149952 patch
3452         https://bugs.webkit.org/show_bug.cgi?id=150238
3453
3454         Reviewed by Darin Adler.
3455
3456         No change in behavior.
3457
3458         * bindings/js/JSDOMConstructor.h:
3459         (WebCore::JSDOMConstructor<JSClass>::finishCreation): Marked as inline.
3460         (WebCore::JSDOMConstructor<JSClass>::getConstructData): Marked as inline.
3461
3462 2015-10-16  Zalan Bujtas  <zalan@apple.com>
3463
3464         RenderBlockFlow::*logical*ForFloat should take FloatingObject reference.
3465         https://bugs.webkit.org/show_bug.cgi?id=150266
3466
3467         Reviewed by Simon Fraser.
3468
3469         No change in behaviour.
3470
3471         * rendering/FloatingObjects.cpp:
3472         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
3473         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
3474         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
3475         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
3476         (WebCore::ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded):
3477         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
3478         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
3479         * rendering/RenderBlockFlow.cpp:
3480         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
3481         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
3482         (WebCore::RenderBlockFlow::insertFloatingObject):
3483         (WebCore::RenderBlockFlow::removeFloatingObject):
3484         (WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
3485         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3486         (WebCore::RenderBlockFlow::positionNewFloats):
3487         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
3488         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
3489         (WebCore::RenderBlockFlow::addOverhangingFloats):
3490         (WebCore::RenderBlockFlow::hasOverhangingFloat):
3491         (WebCore::RenderBlockFlow::addIntrudingFloats):