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