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