[CSS Grid Layout] Don't need to reset auto-margins during grid items layout
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-06  Javier Fernandez  <jfernandez@igalia.com>
2
3         [CSS Grid Layout] Don't need to reset auto-margins during grid items layout
4         https://bugs.webkit.org/show_bug.cgi?id=149764
5
6         Reviewed by Darin Adler.
7
8         This patch implements a refactoring of the auto-margin alignment code for grid
9         items so it uses start/end and before/after margin logic terms.
10
11         I addition, it avoids resetting the auto-margin values, which requires an extra
12         layout, before applying the alignment logic.
13
14         No new tests because there is no behavior change.
15
16         * rendering/RenderGrid.cpp:
17         (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Computing margins if child needs layout.
18         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
19         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded): Using start/end logical margins.
20         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded): Using before/after logical margins.
21         (WebCore::RenderGrid::columnAxisOffsetForChild): Just added comment.
22         (WebCore::RenderGrid::rowAxisOffsetForChild): Just added comment.
23
24 2015-10-06  Tim Horton  <timothy_horton@apple.com>
25
26         Tile map shows a green rect when threaded scrolling is disabled
27         https://bugs.webkit.org/show_bug.cgi?id=149716
28
29         Reviewed by Darin Adler.
30
31         Green is supposed to indicate that we're using the fast path; if threaded
32         scrolling is disabled, we're definitely not doing that.
33
34         * platform/graphics/TiledBacking.h:
35         * platform/graphics/ca/TileController.cpp:
36         (WebCore::TileController::TileController):
37         * platform/graphics/ca/TileCoverageMap.cpp:
38         (WebCore::TileCoverageMap::update):
39         Default to the "we have no ScrollingCoordinator" purple indication;
40         if a ScrollingCoordinator comes along it will setScrollingModeIndication
41         and change it from this default.
42
43 2015-10-06  Zalan Bujtas  <zalan@apple.com>
44
45         Remove redundant isComposited() function and replace
46         hasLayer() && layer()->isComposited() with RenderObject::isComposited().
47         https://bugs.webkit.org/show_bug.cgi?id=149846
48
49         Reviewed by Simon Fraser.
50
51         No change in functionality.
52
53         * rendering/RenderLayerCompositor.cpp:
54         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
55         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
56         * rendering/RenderObject.cpp:
57         (WebCore::RenderObject::repaintUsingContainer):
58         * rendering/RenderThemeMac.mm:
59         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
60         * rendering/RenderView.cpp:
61         (WebCore::rendererObscuresBackground):
62         (WebCore::isComposited): Deleted.
63         * rendering/RenderWidget.cpp:
64         (WebCore::RenderWidget::setWidgetGeometry):
65
66 2015-10-06  Commit Queue  <commit-queue@webkit.org>
67
68         Unreviewed, rolling out r190619.
69         https://bugs.webkit.org/show_bug.cgi?id=149849
70
71         borke the binding tests on iOS at least (Requested by youenn
72         on #webkit).
73
74         Reverted changeset:
75
76         "Binding generator XXConstructor::finishCreation should take
77         references as parameters"
78         https://bugs.webkit.org/show_bug.cgi?id=149838
79         http://trac.webkit.org/changeset/190619
80
81 2015-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
82
83         Slider knobs should scale when rendering while zoomed
84         https://bugs.webkit.org/show_bug.cgi?id=149835
85         <rdar://problem/22897080>
86
87         Reviewed by Darin Adler.
88
89         Make slider knobs follow suit with the rest of the unscaled form controls
90         by rendering to an offscreen buffer when the page is zoomed or scaled and
91         then rendering a scaled version of the offscreen buffer onto the page.
92
93         * platform/mac/ThemeMac.mm:
94         (WebCore::drawCellOrFocusRingIntoRectWithView): Helper function for drawing
95             cells and/or focus rings.
96         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Refactored to
97             handle drawing slider knobs as well.
98         * rendering/RenderThemeMac.mm:
99         (WebCore::RenderThemeMac::paintSliderThumb): Use scaled rendering when necessary.
100
101 2015-10-06  Chris Dumez  <cdumez@apple.com>
102
103         [Web IDL] 'length' property is wrong for variadic operations
104         https://bugs.webkit.org/show_bug.cgi?id=149714
105
106         Reviewed by Darin Adler.
107
108         The value of the 'length' property was wrong for variadic operations:
109         - https://heycam.github.io/webidl/#dfn-optional-argument
110
111         The final argument of a variadic operation is considered to be an
112         optional argument. Therefore, we should not account for it when
113         computing the value of the 'length' property. This patch fixes WebKit's
114         behavior to match the specification.
115
116         Test: fast/dom/variadic-operations-length.html
117
118         * bindings/scripts/CodeGeneratorJS.pm:
119         (GetFunctionLength):
120         * bindings/scripts/test/JS/JSTestObj.cpp:
121         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
122         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
123
124 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
125
126         Binding generator should add builtin header for JSBuiltin attributes
127         https://bugs.webkit.org/show_bug.cgi?id=149837
128
129         Reviewed by Darin Adler.
130
131         Ensured XXBuiltins.h header is included for builtin attributes.
132         Renamed AddIncludesForJSBuiltinMethods as AddJSBuiltinIncludesIfNeeded.
133         Test loop is done through all functions and attributes to handle conditional correctly.
134
135         Covered by existing and added binding tests.
136
137         * bindings/scripts/CodeGeneratorJS.pm:
138         (GenerateImplementation):
139         (AddJSBuiltinIncludesIfNeeded):
140         * bindings/scripts/test/JS/JSTestObj.cpp:
141         * bindings/scripts/test/ObjC/DOMTestObj.h:
142         * bindings/scripts/test/ObjC/DOMTestObj.mm:
143         * bindings/scripts/test/TestObj.idl:
144
145 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
146
147         Binding generator XXConstructor::finishCreation should take references as parameters
148         https://bugs.webkit.org/show_bug.cgi?id=149838
149
150         Reviewed by Darin Adler.
151
152         Updated the binding generator so that XXConstructor::finishCreation
153         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
154
155         Covered by rebased binding tests.
156
157         * bindings/scripts/CodeGeneratorJS.pm:
158         (GenerateConstructorDeclaration):
159         (GenerateConstructorHelperMethods):
160         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
161         (WebCore::JSTestActiveDOMObjectConstructor::create):
162         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
163         * bindings/scripts/test/JS/JSTestCallback.cpp:
164         (WebCore::JSTestCallbackConstructor::create):
165         (WebCore::JSTestCallbackConstructor::finishCreation):
166         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
167         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
168         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
169         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
170         (WebCore::JSTestCustomNamedGetterConstructor::create):
171         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
172         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
173         (WebCore::JSTestEventConstructorConstructor::create):
174         (WebCore::JSTestEventConstructorConstructor::finishCreation):
175         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
176         (WebCore::JSTestEventTargetConstructor::create):
177         (WebCore::JSTestEventTargetConstructor::finishCreation):
178         * bindings/scripts/test/JS/JSTestException.cpp:
179         (WebCore::JSTestExceptionConstructor::create):
180         (WebCore::JSTestExceptionConstructor::finishCreation):
181         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
182         (WebCore::JSTestGenerateIsReachableConstructor::create):
183         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
184         * bindings/scripts/test/JS/JSTestInterface.cpp:
185         (WebCore::JSTestInterfaceConstructor::create):
186         (WebCore::JSTestInterfaceConstructor::finishCreation):
187         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
188         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
189         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
190         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
191         (WebCore::JSTestMediaQueryListListenerConstructor::create):
192         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
193         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
194         (WebCore::JSTestNamedConstructorConstructor::create):
195         (WebCore::JSTestNamedConstructorNamedConstructor::create):
196         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
197         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
198         * bindings/scripts/test/JS/JSTestNode.cpp:
199         (WebCore::JSTestNodeConstructor::create):
200         (WebCore::JSTestNodeConstructor::finishCreation):
201         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
202         (WebCore::JSTestNondeterministicConstructor::create):
203         (WebCore::JSTestNondeterministicConstructor::finishCreation):
204         * bindings/scripts/test/JS/JSTestObj.cpp:
205         (WebCore::JSTestObjConstructor::create):
206         (WebCore::JSTestObjConstructor::finishCreation):
207         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
208         (WebCore::JSTestOverloadedConstructorsConstructor::create):
209         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
210         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
211         (WebCore::JSTestOverrideBuiltinsConstructor::create):
212         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
213         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
214         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
215         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
216         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
217         (WebCore::JSTestTypedefsConstructor::create):
218         (WebCore::JSTestTypedefsConstructor::finishCreation):
219         * bindings/scripts/test/JS/JSattribute.cpp:
220         (WebCore::JSattributeConstructor::create):
221         (WebCore::JSattributeConstructor::finishCreation):
222         * bindings/scripts/test/JS/JSreadonly.cpp:
223         (WebCore::JSreadonlyConstructor::create):
224         (WebCore::JSreadonlyConstructor::finishCreation):
225
226 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
227
228         [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
229         https://bugs.webkit.org/show_bug.cgi?id=149752
230
231         Reviewed by Carlos Garcia Campos.
232
233         CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
234
235         * html/canvas/CanvasRenderingContext2D.cpp:
236         (WebCore::CanvasRenderingContext2D::State::State):
237
238 2015-10-06  Daniel Bates  <dbates@webkit.org>
239
240         Enable XSLT when building WebKit for iOS using the public iOS SDK
241         https://bugs.webkit.org/show_bug.cgi?id=149827
242
243         Reviewed by Alexey Proskuryakov.
244
245         * Configurations/FeatureDefines.xcconfig:
246
247 2015-10-06  Brent Fulgham  <bfulgham@apple.com>
248
249         [Win] Correct positioning error introduced in r190235
250         https://bugs.webkit.org/show_bug.cgi?id=149631
251         <rdar://problem/22635080>
252
253         Reviewed by Simon Fraser.
254
255         Covered by existing compositing tests:
256           css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
257           fast/layers/no-clipping-overflow-hidden-added-after-transform.html
258           fast/layers/no-clipping-overflow-hidden-added-after-transition.html
259           fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
260           transforms/2d/preserve3d-not-fixed-container.html
261
262         * platform/graphics/ca/TileGrid.cpp:
263         (TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
264         on Windows.
265         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
266         (PlatformCALayerWinInternal::displayCallback): We should always flip the
267         coordinate system when drawing these layers on Windows.
268         (shouldInvertBeforeDrawingContent): Deleted.
269         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
270         (WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
271         for these tiled layers; that's already accounted for in common tile drawing code.
272
273 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
274
275         Fix ENABLE_OPENGL=OFF builds
276         https://bugs.webkit.org/show_bug.cgi?id=146511
277
278         Reviewed by Darin Adler.
279
280         * platform/graphics/texmap/BitmapTextureGL.h:
281         * platform/graphics/texmap/BitmapTextureGL.cpp:
282         * platform/graphics/texmap/TextureMapperGL.h:
283         * platform/graphics/texmap/TextureMapperGL.cpp:
284         * platform/graphics/texmap/TextureMapperShaderProgram.h:
285         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
286         Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
287         ENABLE_OPENGL=OFF only disables the GL-related parts.
288
289 2015-10-06  Alex Christensen  <achristensen@webkit.org>
290
291         Fix Windows build after r190611.
292
293         * PlatformWin.cmake:
294         Forward headers from contentextensions.
295
296 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
297
298         Use modern for-loops in WebCore/html.
299         https://bugs.webkit.org/show_bug.cgi?id=149662
300
301         Reviewed by Darin Adler.
302
303         No new tests because there is no behavior change.
304
305         * html/DOMFormData.cpp:
306         (WebCore::DOMFormData::DOMFormData):
307         * html/EmailInputType.cpp:
308         (WebCore::EmailInputType::typeMismatchFor):
309         * html/FileInputType.cpp:
310         (WebCore::FileInputType::receiveDroppedFiles):
311         * html/FormController.cpp:
312         (WebCore::FormControlState::serializeTo):
313         (WebCore::FormControlState::deserialize):
314         (WebCore::SavedFormState::serializeTo):
315         (WebCore::SavedFormState::getReferencedFilePaths):
316         (WebCore::FormController::createSavedFormStateMap):
317         (WebCore::FormController::formElementsState):
318         (WebCore::FormController::restoreControlStateIn):
319         (WebCore::FormController::getReferencedFilePaths):
320         * html/HTMLAnchorElement.cpp:
321         (WebCore::hasNonEmptyBox):
322         * html/HTMLCanvasElement.cpp:
323         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
324         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
325         (WebCore::HTMLCanvasElement::reset):
326         (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer):
327         * html/HTMLFieldSetElement.cpp:
328         (WebCore::HTMLFieldSetElement::length):
329         * html/HTMLFormControlsCollection.cpp:
330         (WebCore::firstNamedItem):
331         * html/HTMLFormElement.cpp:
332         (WebCore::HTMLFormElement::~HTMLFormElement):
333         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
334         (WebCore::HTMLFormElement::removedFrom):
335         (WebCore::HTMLFormElement::length):
336         (WebCore::HTMLFormElement::submitImplicitly):
337         (WebCore::HTMLFormElement::validateInteractively):
338         (WebCore::HTMLFormElement::getTextFieldValues):
339         (WebCore::HTMLFormElement::submit):
340         (WebCore::HTMLFormElement::reset):
341         (WebCore::HTMLFormElement::defaultButton):
342         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
343         (WebCore::HTMLFormElement::removeFromPastNamesMap):
344         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
345         * html/HTMLInputElement.cpp:
346         (WebCore::parseAcceptAttribute):
347         * html/HTMLKeygenElement.cpp:
348         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
349         * html/HTMLMediaElement.cpp:
350         (WebCore::HTMLMediaElement::setMediaGroup):
351         * html/HTMLOptionElement.cpp:
352         (WebCore::HTMLOptionElement::index):
353         * html/HTMLSelectElement.cpp:
354         (WebCore::HTMLSelectElement::saveLastSelection):
355         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
356         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
357         (WebCore::HTMLSelectElement::selectedIndex):
358         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
359         (WebCore::HTMLSelectElement::saveFormControlState):
360         (WebCore::HTMLSelectElement::restoreFormControlState):
361         (WebCore::HTMLSelectElement::appendFormData):
362         (WebCore::HTMLSelectElement::reset):
363         * html/HTMLTextAreaElement.cpp:
364         (WebCore::HTMLTextAreaElement::setDefaultValue):
365         * html/InputType.cpp:
366         (WebCore::populateInputTypeFactoryMap):
367         * html/MediaController.cpp:
368         (MediaController::duration):
369         (MediaController::setCurrentTime):
370         (MediaController::play):
371         (MediaController::setPlaybackRate):
372         (MediaController::setVolume):
373         (MediaController::setMuted):
374         (playbackStateWaiting):
375         (MediaController::updateMediaElements):
376         (MediaController::bringElementUpToSpeed):
377         (MediaController::isBlocked):
378         (MediaController::hasEnded):
379         (MediaController::asyncEventTimerFired):
380         (MediaController::clearPositionTimerFired):
381         (MediaController::hasAudio):
382         (MediaController::hasVideo):
383         (MediaController::hasClosedCaptions):
384         (MediaController::setClosedCaptionsVisible):
385         (MediaController::supportsScanning):
386         (MediaController::beginScrubbing):
387         (MediaController::endScrubbing):
388         (MediaController::canPlay):
389         (MediaController::isLiveStream):
390         (MediaController::hasCurrentSrc):
391         (MediaController::returnToRealtime):
392         * html/MediaFragmentURIParser.cpp:
393         (WebCore::MediaFragmentURIParser::parseTimeFragment):
394         * html/PublicURLManager.cpp:
395         (WebCore::PublicURLManager::revoke):
396         (WebCore::PublicURLManager::stop):
397         * html/canvas/WebGLBuffer.cpp:
398         (WebCore::WebGLBuffer::getCachedMaxIndex):
399         (WebCore::WebGLBuffer::setCachedMaxIndex):
400         (WebCore::WebGLBuffer::setTarget):
401         * html/canvas/WebGLContextGroup.cpp:
402         (WebCore::WebGLContextGroup::loseContextGroup):
403         * html/canvas/WebGLDrawBuffers.cpp:
404         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
405         * html/canvas/WebGLFramebuffer.cpp:
406         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
407         (WebCore::WebGLFramebuffer::checkStatus):
408         (WebCore::WebGLFramebuffer::deleteObjectImpl):
409         (WebCore::WebGLFramebuffer::initializeAttachments):
410         (WebCore::WebGLFramebuffer::drawBuffers):
411         * html/canvas/WebGLRenderingContextBase.cpp:
412         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
413         (WebCore::WebGLRenderingContextBase::deleteTexture):
414         * html/canvas/WebGLVertexArrayObject.cpp:
415         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
416         * html/canvas/WebGLVertexArrayObjectOES.cpp:
417         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
418         * html/parser/AtomicHTMLToken.h:
419         (WebCore::AtomicHTMLToken::initializeAttributes):
420         * html/parser/HTMLConstructionSite.cpp:
421         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
422         * html/parser/HTMLFormattingElementList.cpp:
423         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
424         * html/parser/HTMLPreloadScanner.cpp:
425         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
426         * html/parser/XSSAuditor.cpp:
427         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
428         * html/shadow/ContentDistributor.cpp:
429         (WebCore::ContentDistributor::distribute):
430         (WebCore::ContentDistributor::invalidate):
431         * html/shadow/MediaControlElements.cpp:
432         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
433         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
434         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
435         * html/track/AudioTrackList.cpp:
436         (AudioTrackList::getTrackById):
437         * html/track/LoadableTextTrack.cpp:
438         (WebCore::LoadableTextTrack::newCuesAvailable):
439         (WebCore::LoadableTextTrack::newRegionsAvailable):
440         * html/track/TextTrackCueList.cpp:
441         (WebCore::TextTrackCueList::getCueById):
442         (WebCore::TextTrackCueList::activeCues):
443         * html/track/TextTrackList.cpp:
444         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
445         (TextTrackList::invalidateTrackIndexesAfterTrack):
446         * html/track/TrackListBase.cpp:
447         (TrackListBase::isAnyTrackEnabled):
448         * html/track/VideoTrackList.cpp:
449         (VideoTrackList::getTrackById):
450
451 2015-10-06  Alex Christensen  <achristensen@webkit.org>
452
453         Report error when main resource is blocked by content blocker
454         https://bugs.webkit.org/show_bug.cgi?id=149719
455         rdar://problem/21970595
456
457         Reviewed by Brady Eidson.
458
459         Test: http/tests/contentextensions/main-resource.html
460
461         * English.lproj/Localizable.strings:
462         * contentextensions/ContentExtensionActions.h:
463         * contentextensions/ContentExtensionError.h:
464         (WebCore::ContentExtensions::make_error_code):
465         * contentextensions/ContentExtensionsBackend.cpp:
466         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
467         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
468         Instead of nulling out the ResourceRequest, processContentExtensionRulesForLoad 
469         now returns a status indicating whether the request should be blocked.
470         This is needed because the DocumentLoader needs a CachedResource with an error representing the blocking
471         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
472         * contentextensions/ContentExtensionsBackend.h:
473         * html/HTMLMediaElement.cpp:
474         (WebCore::HTMLMediaElement::loadResource):
475         * loader/DocumentLoader.cpp:
476         (WebCore::DocumentLoader::startLoadingMainResource):
477         Dispatch an error if the resource is blocked by a content blocker.
478         * loader/EmptyClients.h:
479         * loader/FrameLoader.cpp:
480         (WebCore::FrameLoader::loadResourceSynchronously):
481         (WebCore::FrameLoader::cancelledError):
482         (WebCore::FrameLoader::blockedByContentBlockerError):
483         (WebCore::FrameLoader::connectionProperties):
484         * loader/FrameLoader.h:
485         * loader/FrameLoaderClient.h:
486         * loader/ResourceLoader.cpp:
487         (WebCore::ResourceLoader::willSendRequestInternal):
488         * loader/cache/CachedResourceLoader.cpp:
489         (WebCore::CachedResourceLoader::requestResource):
490         * page/UserContentController.cpp:
491         (WebCore::UserContentController::removeAllUserContentExtensions):
492         (WebCore::UserContentController::processContentExtensionRulesForLoad):
493         (WebCore::UserContentController::actionsForResourceLoad):
494         * page/UserContentController.h:
495         * platform/efl/ErrorsEfl.cpp:
496         (WebCore::blockedError):
497         (WebCore::blockedByContentBlockerError):
498         (WebCore::cannotShowURLError):
499         * platform/efl/ErrorsEfl.h:
500         * platform/gtk/ErrorsGtk.cpp:
501         (WebCore::blockedError):
502         (WebCore::blockedByContentBlockerError):
503         (WebCore::cannotShowURLError):
504         * platform/gtk/ErrorsGtk.h:
505
506 2015-10-06  Xabier Rodriguez Calvar  <calvaris@igalia.com>
507
508         JSBuiltinConstructor must always add builtin header
509         https://bugs.webkit.org/show_bug.cgi?id=149759
510
511         Reviewed by Darin Adler.
512
513         Covered by TestJSBuiltinConstructor.idl.
514
515         * bindings/scripts/CodeGeneratorJS.pm:
516         (AddIncludesForJSBuiltinMethods): Forces adding the builtin header when the JSBuiltinConstructor is present.
517         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Expectation.
518
519 2015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
520
521         Migrate streams API to JS Builtins
522         https://bugs.webkit.org/show_bug.cgi?id=147092
523
524         Reviewed by Darin Adler.
525
526         Moved ReadableStream implementation from C++ to JS Builtins.
527         Created specific private constructors for ReadableStreamReader and ReadableStreamController.
528         Added these constructors to  JSDOMWindowBase.
529         Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
530
531         Covered by existing tests.
532
533         * CMakeLists.txt:
534         * DerivedSources.make:
535         * Modules/streams/ReadableStream.cpp: Removed.
536         * Modules/streams/ReadableStream.h: Removed.
537         * Modules/streams/ReadableStream.idl:
538         * Modules/streams/ReadableStream.js:
539         (strategy.size):
540         (initializeReadableStream):
541         (cancel):
542         (getReader):
543         (pipeTo):
544         (tee):
545         (locked):
546         * Modules/streams/ReadableStreamController.h:
547         * Modules/streams/ReadableStreamController.idl:
548         * Modules/streams/ReadableStreamController.js: Added.
549         (enqueue):
550         (error):
551         (close):
552         (desiredSize):
553         * Modules/streams/ReadableStreamInternals.js:
554         (privateInitializeReadableStreamReader):
555         (privateInitializeReadableStreamController):
556         (isReadableStream):
557         (isReadableStreamReader):
558         (isReadableStreamController):
559         (errorReadableStream):
560         (requestReadableStreamPull):
561         (getReadableStreamDesiredSize):
562         (releaseReadableStreamReader):
563         (cancelReadableStream):
564         (finishClosingReadableStream):
565         (closeReadableStream):
566         (closeReadableStreamReader):
567         (enqueueInReadableStream):
568         (readFromReadableStreamReader):
569         (invokeOrNoop):
570         (promiseInvokeOrNoop):
571         * Modules/streams/ReadableStreamReader.cpp: Removed.
572         * Modules/streams/ReadableStreamReader.h:
573         * Modules/streams/ReadableStreamReader.idl:
574         * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
575         (cancel):
576         (read):
577         (releaseLock):
578         (closed):
579         * WebCore.vcxproj/WebCore.vcxproj:
580         * WebCore.vcxproj/WebCore.vcxproj.filters:
581         * WebCore.xcodeproj/project.pbxproj:
582         * bindings/js/JSBindingsAllInOne.cpp:
583         * bindings/js/JSDOMConstructor.h: Added.
584         (WebCore::JSBuiltinConstructor::create):
585         (WebCore::JSBuiltinConstructor::createStructure):
586         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
587         (WebCore::JSBuiltinConstructor::initializeProperties):
588         (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
589         (WebCore::JSBuiltinConstructor<JSClass>::construct):
590         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
591         * bindings/js/JSDOMWindowBase.cpp:
592         (WebCore::JSDOMWindowBase::finishCreation):
593         * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
594         * bindings/js/JSReadableStreamCustom.cpp: Removed.
595         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
596         (WebCore::constructJSReadableStreamController):
597         (WebCore::constructJSReadableStreamReader):
598         (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
599         (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
600         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
601         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
602         (WebCore::createReadableStreamReaderPrivateConstructor):
603         (WebCore::createReadableStreamControllerPrivateConstructor):
604         * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
605         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
606         * bindings/js/ReadableJSStream.cpp: Removed.
607         * bindings/js/ReadableJSStream.h: Removed.
608         * bindings/js/WebCoreBuiltinNames.h: Added.
609         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
610         * bindings/js/WebCoreJSBuiltins.cpp:
611         * bindings/js/WebCoreJSClientData.h:
612         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
613         (WebCore::WebCoreJSClientData::builtinNames):
614         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
615         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
616
617 2015-10-05  Chris Dumez  <cdumez@apple.com>
618
619         data: URLs should not be preloaded
620         https://bugs.webkit.org/show_bug.cgi?id=149829
621
622         Reviewed by Ryosuke Niwa.
623
624         Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
625         There is no need as the data is already available.
626
627         Test: fast/preloader/image-data-url.html
628
629         * html/parser/HTMLPreloadScanner.cpp:
630         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
631
632 2015-10-05  Jer Noble  <jer.noble@apple.com>
633
634         [iOS] REGRESSION(r190434): Media continues to play when locking screen
635         https://bugs.webkit.org/show_bug.cgi?id=149822
636
637         Reviewed by Brent Fulgham.
638
639         In MediaSessionManagerIOS.mm, both -applicationWillEnterForeground: and
640         -applicationDidBecomeActive: called
641         PlatformMediaSessionManager::applicationWillEnterForeground(), leading to the
642         PlatformMediaSession's m_interruptionCount becoming increasingly unbalanced.
643
644         Rename PlatformMediaSessionManager::applicationWillEnterForeground() to
645         applicationDidEnterForeground() to more correctly reflect when this notification will be
646         called. Add a new method, MediaSessionManagerIOS::applicationWillEnterForeground(bool),
647         whose paramater is whether the screen was locked. This allows the beginInterruption() and
648         endInterruption() methods to be correctly balanced.
649
650         Drive-by fix: remove the unimplemented declarations for application{will,did}Enter{Fore,Back}ground()
651         from PlatformMediaSession.h.
652
653         * platform/audio/PlatformMediaSession.h:
654         * platform/audio/PlatformMediaSessionManager.cpp:
655         (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
656         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Deleted.
657         * platform/audio/PlatformMediaSessionManager.h:
658         * platform/audio/ios/MediaSessionManagerIOS.h:
659         * platform/audio/ios/MediaSessionManagerIOS.mm:
660         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
661         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
662         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
663         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
664         * testing/Internals.cpp:
665         (WebCore::Internals::applicationDidEnterForeground):
666         (WebCore::Internals::applicationWillEnterForeground): Deleted.
667         * testing/Internals.h:
668         * testing/Internals.idl:
669
670 2015-10-05  Alex Christensen  <achristensen@webkit.org>
671
672         Invalid CSS Selector for Content Blockers invalidates others
673         https://bugs.webkit.org/show_bug.cgi?id=148446
674         rdar://problem/22918235
675
676         Reviewed by Benjamin Poulain.
677
678         Test: http/tests/contentextensions/invalid-selector.html
679
680         * contentextensions/ContentExtensionParser.cpp:
681         (WebCore::ContentExtensions::loadTrigger):
682         (WebCore::ContentExtensions::isValidSelector):
683         (WebCore::ContentExtensions::loadAction):
684         (WebCore::ContentExtensions::loadRule):
685         Add a check to see if a selector is valid before adding it.
686
687 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
688
689         CSSGradientValue should check whether gradientLength is zero or not.
690         https://bugs.webkit.org/show_bug.cgi?id=149373
691         <rdar://problem/22771418>
692
693         Reviewed by Darin Adler.
694
695         This is a merge of Blink r158220,
696         https://chromiumcodereview.appspot.com/24350008
697
698         Test: fast/gradients/css3-repeating-radial-gradients-crash.html
699
700         * css/CSSGradientValue.cpp:
701         (WebCore::CSSGradientValue::addStops):
702         Check whether gradientLength > 0 before using it as denominator.
703
704 2015-10-05  Dean Jackson  <dino@apple.com>
705
706         EXT_texture_filter_anisotropic extension exposed with WEBKIT_ prefix
707         https://bugs.webkit.org/show_bug.cgi?id=149765
708         <rdar://problem/22983722>
709
710         Reviewed by Beth Dakin.
711
712         We can now remove the WEBKIT_ prefix from this extension.
713
714         Test: fast/canvas/webgl/unprefixed-anisotropic-extension.html
715
716         * html/canvas/WebGL2RenderingContext.cpp: Support the prefixed and unprefixed form.
717         (WebCore::WebGL2RenderingContext::getExtension):
718         * html/canvas/WebGLRenderingContext.cpp:
719         (WebCore::WebGLRenderingContext::getExtension):
720         (WebCore::WebGLRenderingContext::getSupportedExtensions):
721
722 2015-10-05  Dean Jackson  <dino@apple.com>
723
724         Reference cycles during SVG dependency invalidation
725         https://bugs.webkit.org/show_bug.cgi?id=149824
726         <rdar://problem/22771412>
727
728         Reviewed by Tim Horton.
729
730         Detect any reference cycles as we are invalidating.
731
732         This is mostly a merge of the following Blink commit:
733         https://chromium.googlesource.com/chromium/blink/+/a4bc83453bda89823b672877dc02247652a02d51
734
735         Test: svg/custom/reference-cycle.svg
736
737         * rendering/svg/RenderSVGResource.cpp:
738         (WebCore::removeFromCacheAndInvalidateDependencies): Keep around a hash
739         table of dependencies, so that we can detect if an element is already
740         present before marking it.
741
742 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
743
744         Fix null pointer dereference in WebSocket::connect()        
745         https://bugs.webkit.org/show_bug.cgi?id=149311
746         <rdar://problem/22748858>
747
748         Reviewed by Chris Dumez.
749
750         This is a merge of Blink r187441,
751         https://codereview.chromium.org/785933005
752
753         Test: http/tests/websocket/construct-in-detached-frame.html
754
755         * Modules/websockets/WebSocket.cpp:
756         (WebCore::WebSocket::connect):
757         Call function implemented below instead of duplicating the code.
758         * page/ContentSecurityPolicy.cpp:
759         (WebCore::ContentSecurityPolicy::shouldBypassMainWorldContentSecurityPolicy):
760         * page/ContentSecurityPolicy.h:
761         Factor the logic to check shouldBypassMainWorldContentSecurityPolicy into 
762         a function in this class. Check Frame pointers are not null before getting 
763         shouldBypassMainWorldContentSecurityPolicy via those pointers.
764         * page/EventSource.cpp:
765         (WebCore::EventSource::create):
766         This got fixed as a bonus.
767         * xml/XMLHttpRequest.cpp:
768         (WebCore::XMLHttpRequest::open):
769         This got fixed as a bonus too.
770
771 2015-10-05  Beth Dakin  <bdakin@apple.com>
772
773         WebCore::IOSurface should ask the IOSurface for the pixel format instead of 
774         caching it
775         https://bugs.webkit.org/show_bug.cgi?id=149820
776         -and corresponding-
777         rdar://problem/22976230
778
779         Reviewed by Tim Horton.
780
781         Also there is no reason to make YUV be iOS only, so this patch removes those 
782         PLATFORM checks.
783
784         * platform/graphics/cocoa/IOSurface.h:
785         * platform/graphics/cocoa/IOSurface.mm:
786         (IOSurface::IOSurface):
787         (IOSurface::format):
788         * platform/spi/cocoa/IOSurfaceSPI.h:
789
790 2015-10-02  Ryosuke Niwa  <rniwa@webkit.org>
791
792         ShadowRoot with leading or trailing white space cause a crash
793         https://bugs.webkit.org/show_bug.cgi?id=149782
794
795         Reviewed by Chris Dumez.
796
797         Fixed the crash by adding a null pointer check since a TextNode that appears as a direct child
798         of a ShadowRoot doesn't have a parent element.
799
800         Test: fast/shadow-dom/shadow-root-with-child-whitespace-text-crash.html
801
802         * style/RenderTreePosition.cpp:
803         (WebCore::RenderTreePosition::previousSiblingRenderer):
804
805 2015-10-05  Beth Dakin  <bdakin@apple.com>
806
807         Build fix. 
808
809         * platform/spi/cocoa/IOSurfaceSPI.h:
810
811 2015-10-05  Beth Dakin  <bdakin@apple.com>
812
813         Unreviewed build fix.
814
815         * platform/spi/cocoa/IOSurfaceSPI.h:
816
817 2015-10-05  Brady Eidson  <beidson@apple.com>
818
819         Modernize IDBRequest::ReadyState into an enum class.
820         https://bugs.webkit.org/show_bug.cgi?id=149817
821
822         Reviewed by Alex Christensen.
823
824         No new tests (Refactor, no behavior change).
825
826         * Modules/indexeddb/IDBRequest.h:
827         
828         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
829         (WebCore::LegacyOpenDBRequest::shouldEnqueueEvent):
830         
831         * Modules/indexeddb/legacy/LegacyRequest.cpp:
832         (WebCore::LegacyRequest::LegacyRequest):
833         (WebCore::LegacyRequest::result):
834         (WebCore::LegacyRequest::error):
835         (WebCore::LegacyRequest::errorCode):
836         (WebCore::LegacyRequest::readyState):
837         (WebCore::LegacyRequest::markEarlyDeath):
838         (WebCore::LegacyRequest::abort):
839         (WebCore::LegacyRequest::setCursorDetails):
840         (WebCore::LegacyRequest::setPendingCursor):
841         (WebCore::LegacyRequest::setResultCursor):
842         (WebCore::LegacyRequest::finishCursor):
843         (WebCore::LegacyRequest::shouldEnqueueEvent):
844         (WebCore::LegacyRequest::stop):
845         (WebCore::LegacyRequest::dispatchEvent):
846         (WebCore::LegacyRequest::transactionDidFinishAndDispatch):
847         (WebCore::LegacyRequest::enqueueEvent):
848         * Modules/indexeddb/legacy/LegacyRequest.h:
849
850 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
851
852         Cleaning up after revision 190339
853         https://bugs.webkit.org/show_bug.cgi?id=149732
854
855         Reviewed by Myles C. Maxfield.
856
857         * xml/XSLStyleSheet.h:
858         * xml/XSLStyleSheetLibxslt.cpp:
859         (WebCore::XSLStyleSheet::compileStyleSheet):
860
861 2015-10-05  Beth Dakin  <bdakin@apple.com>
862
863         Errant space!!
864         * platform/graphics/cocoa/IOSurface.mm:
865         (IOSurface::releaseGraphicsContext):
866         (IOSurface::convertToFormat):
867
868 2015-10-05  Beth Dakin  <bdakin@apple.com>
869
870         Compress snapshots on iOS
871         https://bugs.webkit.org/show_bug.cgi?id=149814
872         -and corresponding-
873         rdar://problem/22976230
874
875         Reviewed by Simon Fraser.
876
877         Though the default is still RGBA, it is now possible to create an IOSurface 
878         that uses the YUV422 pixel format.
879         * platform/graphics/cocoa/IOSurface.h:
880         * platform/graphics/cocoa/IOSurface.mm:
881         (IOSurface::surfaceFromPool):
882         (IOSurface::create):
883         (IOSurface::createFromImage):
884         (IOSurface::IOSurface):
885         (IOSurface::releaseGraphicsContext):
886
887         In order to have a YUV IOSurface, we actually have to create an RGBA surface 
888         first and then convert it to YUV, so this class method will handle that.
889         (IOSurface::convertToFormat):
890
891         Necessary SPI.
892         * platform/spi/cocoa/IOSurfaceSPI.h:
893
894 2015-10-05  Zalan Bujtas  <zalan@apple.com>
895
896         Mark the line dirty when RenderQuote's text changes.
897         https://bugs.webkit.org/show_bug.cgi?id=149784
898         rdar://problem/22558169
899
900         Reviewed by Antti Koivisto.
901
902         When quotation mark changes ( " -> ' or empty string), we
903         need to mark the line dirty to ensure its content gets laid out properly.
904
905         Test: fast/inline/quotation-text-changes-dynamically.html
906
907         * rendering/RenderQuote.cpp:
908         (WebCore::quoteTextRenderer):
909         (WebCore::RenderQuote::updateText):
910         (WebCore::fragmentChild): Deleted.
911
912 2015-10-03  Filip Pizlo  <fpizlo@apple.com>
913
914         Allow an object's marking state to track The Three Colors
915         https://bugs.webkit.org/show_bug.cgi?id=149654
916
917         Reviewed by Geoffrey Garen.
918
919         No new tests because no new behavior.
920
921         * bindings/scripts/CodeGeneratorJS.pm:
922         (GenerateImplementation):
923
924 2015-10-05  Katlyn Graff  <kgraff@apple.com>
925
926         Update setImageSmoothingQuality for additional reviews.
927         https://bugs.webkit.org/show_bug.cgi?id=149541
928
929         Reviewed by Chris Dumez.
930
931         * html/canvas/CanvasRenderingContext2D.cpp:
932         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
933
934 2015-10-05  Andreas Kling  <akling@apple.com>
935
936         Remove unused HistoryItem::targetItem()
937         <https://webkit.org/b/149803>
938
939         Reviewed by Anders Carlsson.
940
941         This is ancient code with no remaining clients since 2010 (r53650)
942
943         * history/HistoryItem.cpp:
944         (WebCore::HistoryItem::findTargetItem): Deleted.
945         (WebCore::HistoryItem::targetItem): Deleted.
946         * history/HistoryItem.h:
947
948 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
949
950         Unprefix -webkit-font-feature-settings
951         https://bugs.webkit.org/show_bug.cgi?id=149722
952
953         Reviewed by Sam Weinig.
954
955         * css/CSSComputedStyleDeclaration.cpp:
956         (WebCore::ComputedStyleExtractor::propertyValue):
957         * css/CSSParser.cpp:
958         (WebCore::CSSParser::parseValue):
959         (WebCore::CSSParser::parseFontFeatureSettings):
960         * css/CSSPropertyNames.in:
961         * css/CSSValueKeywords.in:
962         * css/StyleBuilderCustom.h:
963         (WebCore::StyleBuilderCustom::applyInitialFontFeatureSettings):
964         (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings):
965         (WebCore::StyleBuilderCustom::applyInitialWebkitFontFeatureSettings): Deleted.
966         (WebCore::StyleBuilderCustom::applyInheritWebkitFontFeatureSettings): Deleted.
967
968 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
969
970         [GStreamer] Replace uses of std::bind() with lambdas
971         https://bugs.webkit.org/show_bug.cgi?id=149802
972
973         Reviewed by Carlos Garcia Campos.
974
975         Instead of std::bind(), use C++ lambdas to create std::function<>
976         wrappers in GStreamer-related class implementations.
977
978         Ref-counted classes are protected by capturing a RefPtr object.
979         GstObject-derived objects are protected by capturing a GRefPtr object.
980         Necessary specializations for WebKitVideoSink and WebKitWebSrc are added.
981
982         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
983         (WebCore::AudioFileReader::createBus):
984         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
985         (WTF::adoptGRef):
986         (WTF::refGPtr<WebKitVideoSink>):
987         (WTF::derefGPtr<WebKitVideoSink>):
988         (WTF::refGPtr<WebKitWebSrc>):
989         (WTF::derefGPtr<WebKitWebSrc>):
990         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
991         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
992         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
993         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
994         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
995         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
996         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
997         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
998         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
999         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1000         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1001         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1002         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1003         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
1004         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1005         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1006         (webkitVideoSinkRender):
1007         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1008         (webKitWebSrcChangeState):
1009         (webKitWebSrcNeedDataCb):
1010         (webKitWebSrcEnoughDataCb):
1011         (webKitWebSrcSeekDataCb):
1012
1013 2015-10-05  Andreas Kling  <akling@apple.com>
1014
1015         Remove unused HistoryItem::parent
1016         <https://webkit.org/b/149803>
1017
1018         Reviewed by Anders Carlsson.
1019
1020         Remove the effectively-unused "parent" field from HistoryItem.
1021         This also allows us to get rid of a HistoryItem constructor.
1022
1023         * history/HistoryItem.cpp:
1024         (WebCore::HistoryItem::HistoryItem): Deleted.
1025         (WebCore::HistoryItem::reset): Deleted.
1026         (WebCore::HistoryItem::parent): Deleted.
1027         (WebCore::HistoryItem::setParent): Deleted.
1028         * history/HistoryItem.h:
1029         (WebCore::HistoryItem::create): Deleted.
1030         * loader/HistoryController.cpp:
1031         (WebCore::HistoryController::initializeItem): Deleted.
1032
1033 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
1034
1035         GLContext should control ownership of context-related objects
1036         https://bugs.webkit.org/show_bug.cgi?id=149794
1037
1038         Reviewed by Martin Robinson.
1039
1040         Creation of GLContext objects can depend on various platform-specific
1041         objects like native window representations. Since these objects are
1042         used solely for the GLContext purposes, it would make sense to allow
1043         GLContext to provide an extensible way to impose ownership on these
1044         objects and control their lifetime.
1045
1046         GLContext::Data is declared with a defaulted virtual destructor.
1047         Users of these implementations can declare classes that derive from
1048         GLContext::Data and store context-related objects in instances of the
1049         derived class, and ensure that these objects are properly cleaned up
1050         when GLContext destroys the Data object.
1051
1052         The GLContext::Data object is managed through a protected
1053         std::unique_ptr<> member in the GLContext class. For now the member
1054         is only set in GLContextEGL::createWindowContext() and is destroyed
1055         during the GLContext destruction.
1056
1057         The local OffscreenContextData class in
1058         PlatformDisplayWayland::createSharingGLContext() derives from
1059         GLContext::Data and is used to store the wl_surface and
1060         EGLNativeWindowType (aka wl_egl_window) objects for offscreen
1061         GLContexts under the Wayland platform that are used for the sharing
1062         context and WebGL, effectively avoiding the leak that would further
1063         propagate problems into the compositor and the graphics library.
1064         (Such offscreen contexts are actually mimicked via a 1x1px
1065         wl_egl_window object that acts as a dummy base for the related
1066         wl_surface object).
1067
1068         * platform/graphics/GLContext.h:
1069         * platform/graphics/egl/GLContextEGL.cpp:
1070         (WebCore::GLContextEGL::createWindowContext):
1071         * platform/graphics/egl/GLContextEGL.h:
1072         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1073         (WebCore::PlatformDisplayWayland::createSharingGLContext):
1074
1075 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
1076
1077         Make gdk.h inclusion in FontPlatformDataFreeType.cpp properly GTK-specific
1078         https://bugs.webkit.org/show_bug.cgi?id=149793
1079
1080         Reviewed by Carlos Garcia Campos.
1081
1082         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1083         Instead of including <gdk/gdk.h> header for all platforms but EFL, only
1084         include it for the GTK platform, since no other platform depends on the
1085         GDK library.
1086
1087 2015-10-03  Ricky Mondello  <rmondello@apple.com>
1088
1089         "Plug-in is blocked" message doesn't draw correctly
1090         https://bugs.webkit.org/show_bug.cgi?id=149741
1091         <rdar://problem/22920949>
1092
1093         Patch by Conrad Shultz and Ricky Mondello.
1094
1095         Reviewed by Anders Carlsson.
1096
1097         No new tests are added.
1098
1099         Add PluginData API to check whether a MIME type is supported, regardless of plug-in visibility.
1100
1101         * plugins/PluginData.cpp:
1102         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices): Adopt getMimesAndPluginIndiciesForPlugins.
1103         (WebCore::PluginData::getMimesAndPluginIndices): Added.
1104         (WebCore::PluginData::getMimesAndPluginIndiciesForPlugins): Essentially factored out of
1105             getWebVisibleMimesAndPluginIndices.
1106         (WebCore::PluginData::supportsMimeType): Added. Somewhat similar to preexisting supportsWebVisibleMimeType.
1107         * plugins/PluginData.h: Declare supportsMimeType.
1108
1109 2015-10-02  Antti Koivisto  <antti@apple.com>
1110
1111         Inserting a child to a slot assigned node doesn't trigger repaint
1112         https://bugs.webkit.org/show_bug.cgi?id=149739
1113
1114         Reviewed by Ryosuke Niwa.
1115
1116         Test: fast/shadow-dom/insert-child-to-assigned-node.html
1117
1118         * dom/Node.cpp:
1119         (WebCore::Node::derefEventTarget):
1120         (WebCore::traverseStyleParent):
1121         (WebCore::traverseFirstStyleParent):
1122         (WebCore::Node::updateAncestorsForStyleRecalc):
1123
1124             Traverse in style parent order.
1125
1126 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
1127
1128         Unreviewed, rolling out r190520, some tests assert / crash.
1129
1130         * ForwardingHeaders/heap/HeapObserver.h: Removed.
1131         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed.
1132         * WebCore.vcxproj/WebCore.vcxproj:
1133         * WebCore.vcxproj/WebCore.vcxproj.filters:
1134         * inspector/InspectorController.cpp:
1135         (WebCore::InspectorController::InspectorController): Deleted.
1136         (WebCore::InspectorController::vm): Deleted.
1137         * inspector/InspectorController.h:
1138         * inspector/WorkerInspectorController.cpp:
1139         (WebCore::WorkerInspectorController::vm): Deleted.
1140         * inspector/WorkerInspectorController.h:
1141
1142 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
1143
1144         Web Inspector: Include Garbage Collection Event in Timeline
1145         https://bugs.webkit.org/show_bug.cgi?id=142510
1146
1147         Reviewed by Geoffrey Garen.
1148
1149         Tests: inspector/heap/garbageCollected.html
1150                inspector/heap/gc.html
1151
1152         * ForwardingHeaders/heap/HeapObserver.h: Added.
1153         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
1154         * WebCore.vcxproj/WebCore.vcxproj:
1155         * WebCore.vcxproj/WebCore.vcxproj.filters:
1156         Forwarding headers.
1157
1158         * inspector/InspectorController.cpp:
1159         (WebCore::InspectorController::InspectorController):
1160         (WebCore::InspectorController::vm):
1161         * inspector/InspectorController.h:
1162         * inspector/WorkerInspectorController.cpp:
1163         (WebCore::WorkerInspectorController::vm):
1164         * inspector/WorkerInspectorController.h:
1165         Implement InspectorEnvironment::vm and create a Heap agent for the
1166         Page inspector controller.
1167
1168 2015-10-02  Jer Noble  <jer.noble@apple.com>
1169
1170         [MSE] Browser crashes when appending invalid data to MSE source buffer
1171         https://bugs.webkit.org/show_bug.cgi?id=149689
1172
1173         Reviewed by Darin Adler.
1174
1175         Test: media/media-source/media-source-stpp-crash.html
1176
1177         Bail out early (as specced) after disconnecting the SourceBuffer from its MediaSource.
1178
1179         * Modules/mediasource/SourceBuffer.cpp:
1180         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1181
1182 2015-10-02  Simon Fraser  <simon.fraser@apple.com>
1183
1184         ASSERTION FAILED: param >= 0 in AnimationBase::updateStateMachine()
1185         https://bugs.webkit.org/show_bug.cgi?id=149737
1186         rdar://problem/19017465
1187
1188         Reviewed by Dean Jackson.
1189
1190         CoreAnimation can give us an animation beginTime that is slightly into the future,
1191         which results in 'param' here being < 0, so relax the assertion slightly.
1192         
1193         Fixes lots of assertions running iOS WK2 layout tests.
1194
1195         * page/animation/AnimationBase.cpp:
1196         (WebCore::AnimationBase::updateStateMachine):
1197
1198 2015-10-02  Per Arne Vollan  <peavo@outlook.com>
1199
1200         [WinCairo] Fix linker warnings.
1201         https://bugs.webkit.org/show_bug.cgi?id=149754
1202
1203         Reviewed by Alex Christensen.
1204
1205         Avoid compiling these files twice, they are already included in
1206         RenderingAllInOne.cpp.
1207
1208         * PlatformWinCairo.cmake:
1209
1210 2015-10-02  Alex Christensen  <achristensen@webkit.org>
1211
1212         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
1213         https://bugs.webkit.org/show_bug.cgi?id=149430
1214         rdar://problem/22742222
1215
1216         Reviewed by Geoffrey Garen.
1217
1218         Test: http/tests/contentextensions/disable-blocker.html
1219
1220         * html/HTMLMediaElement.cpp:
1221         (WebCore::HTMLMediaElement::loadResource):
1222         * loader/DocumentLoader.h:
1223         (WebCore::DocumentLoader::userContentExtensionsEnabled):
1224         (WebCore::DocumentLoader::setUserContentExtensionsEnabled):
1225         Store and use the state of whether content blockers are enabled or not on the DocumentLoader
1226         so that it stays constant for a document's entire life.  This state comes from the Page when
1227         making the DocumentLoader in WebKit2.
1228         * loader/FrameLoader.cpp:
1229         (WebCore::FrameLoader::loadResourceSynchronously):
1230         * loader/ResourceLoader.cpp:
1231         (WebCore::ResourceLoader::willSendRequestInternal):
1232         * loader/cache/CachedResourceLoader.cpp:
1233         (WebCore::CachedResourceLoader::requestResource):
1234         * page/DOMWindow.cpp:
1235         (WebCore::DOMWindow::open):
1236         * page/UserContentController.cpp:
1237         (WebCore::UserContentController::removeAllUserContentExtensions):
1238         (WebCore::UserContentController::processContentExtensionRulesForLoad):
1239         (WebCore::UserContentController::actionsForResourceLoad):
1240         * page/UserContentController.h:
1241
1242 2015-10-02  Antoine Quint  <graouts@apple.com>
1243
1244         popstate is fired at the wrong time on load
1245         https://bugs.webkit.org/show_bug.cgi?id=94265
1246
1247         Reviewed by Darin Adler.
1248
1249         Don't fire popstate event on initial document load
1250
1251         According to the specification [1], a popstate event should only be fired
1252         when the document has a "last entry" and the entry being navigated to isn't
1253         it.  A document is created without a "last entry" and gets one just after
1254         this check when it is first navigated to, so a popstate should be fired any
1255         time a document is navigated to except for the first time after it has been
1256         created.
1257
1258         Patch adapted from work by jl@opera.com on Blink [2].
1259
1260         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#traverse-the-history (step 12-14 in particular)
1261         [2] https://src.chromium.org/viewvc/blink?revision=165221&view=revision
1262
1263         * dom/Document.cpp:
1264         (WebCore::Document::implicitClose):
1265
1266 2015-10-02  Javier Fernandez  <jfernandez@igalia.com>
1267
1268         [CSS Grid Layout] Support for Content Alignment in grid layout
1269         https://bugs.webkit.org/show_bug.cgi?id=145520
1270
1271         Reviewed by Darin Adler.
1272
1273         According to CSS Box Alignment specification, Content Distribution
1274         alignment controls alignment of the box's content within the box. The
1275         alignment container is the grid container's content box. The alignment
1276         subjects are the grid tracks.
1277
1278         This patch implements Grid Layout support for Content Distribution
1279         alignment along both block/column and inline/row axis, which are handled
1280         by align-content and justify-content properties respectively.
1281
1282         This patch provides support for overflow handling, similar to what
1283         Self Alignment provides with grid items, and both <content-position>
1284         and <content-distribution> values.
1285
1286         Baseline Alignment is still missing because it requires some additional
1287         behavior to be supported on grids before considering its implementation.
1288
1289         Tests: css3/overwrite-content-alignment.html
1290                css3/overwrite-self-alignment.html
1291                fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html
1292                fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html
1293                fast/css-grid-layout/grid-align-content-distribution.html
1294                fast/css-grid-layout/grid-align-content-vertical-lr.html
1295                fast/css-grid-layout/grid-align-content-vertical-rl.html
1296                fast/css-grid-layout/grid-align-content.html
1297                fast/css-grid-layout/grid-content-alignment-overflow.html
1298                fast/css-grid-layout/grid-content-alignment-with-different-sized-tracks.html
1299                fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html
1300                fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html
1301                fast/css-grid-layout/grid-content-alignment-with-span.html
1302                fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html
1303                fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html
1304                fast/css-grid-layout/grid-justify-content-distribution.html
1305                fast/css-grid-layout/grid-justify-content-vertical-lr.html
1306                fast/css-grid-layout/grid-justify-content-vertical-rl.html
1307                fast/css-grid-layout/grid-justify-content.html
1308
1309         * rendering/RenderFlexibleBox.cpp:
1310         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1311         (WebCore::RenderFlexibleBox::layoutColumnReverse):
1312         (WebCore::RenderFlexibleBox::alignFlexLines):
1313         * rendering/RenderGrid.cpp:
1314         (WebCore::ContentAlignmentData::ContentAlignmentData):
1315         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1316         (WebCore::RenderGrid::layoutGridItems):
1317         (WebCore::RenderGrid::gridAreaBreadthForChild):
1318         (WebCore::RenderGrid::populateGridPositions):
1319         (WebCore::resolveContentDistributionFallback):
1320         (WebCore::offsetToStartEdge):
1321         (WebCore::offsetToEndEdge):
1322         (WebCore::contentDistributionOffset):
1323         (WebCore::RenderGrid::computeContentPositionAndDistributionColumnOffset):
1324         (WebCore::RenderGrid::computeContentPositionAndDistributionRowOffset):
1325         (WebCore::RenderGrid::findChildLogicalPosition):
1326         (WebCore::RenderGrid::computePreferredLogicalWidths): Deleted.
1327         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Deleted.
1328         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Deleted.
1329         (WebCore::RenderGrid::cachedGridCoordinate): Deleted.
1330         (WebCore::RenderGrid::rowPositionForChild): Deleted.
1331         * rendering/RenderGrid.h:
1332         * rendering/style/RenderStyle.cpp:
1333         (WebCore::RenderStyle::resolvedAlignContentPosition):
1334         (WebCore::RenderStyle::resolvedAlignContentDistribution):
1335         (WebCore::RenderStyle::resolvedJustifyContentPosition):
1336         (WebCore::RenderStyle::resolvedJustifyContentDistribution):
1337         * rendering/style/RenderStyle.h:
1338
1339 2015-10-02  Dean Jackson  <dino@apple.com>
1340
1341         Attempted build fix.
1342
1343         * DerivedSources.make:
1344         * page/make_settings.pl:
1345         (printGetterAndSetter):
1346
1347 2015-10-01  Dean Jackson  <dino@apple.com>
1348
1349         Expose WEBGL_debug_renderer_info
1350         https://bugs.webkit.org/show_bug.cgi?id=149735
1351         <rdar://problem/18343500>
1352
1353         Reviewed by Simon Fraser.
1354
1355         Take two at landing this.
1356
1357         Enable the extension that allows content to query
1358         for the GPUs vendor and details.
1359
1360         Now that we're enabling this, there was no need for
1361         the internal setting that identified privileged situations.
1362         However, since this meant that WEBGL_debug_shaders was
1363         also exposed, I explicitly disable it since it is
1364         not yet conformant.
1365
1366         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
1367         as well as the general conformance suite.
1368
1369         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
1370         (WebCore::WebGL2RenderingContext::getExtension):
1371         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1372         * html/canvas/WebGLRenderingContext.cpp: Ditto.
1373         (WebCore::WebGLRenderingContext::getExtension):
1374         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1375         * html/canvas/WebGLRenderingContextBase.cpp:
1376         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
1377         * html/canvas/WebGLRenderingContextBase.h:
1378         * page/Settings.in: Remove privilegedWebGLExtensions.
1379         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
1380         extension while it is still buggy.
1381         (WebCore::Extensions3DOpenGL::supportsExtension):
1382
1383 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
1384
1385         Fix the #if guard in PointerLockController.cpp
1386         https://bugs.webkit.org/show_bug.cgi?id=149705
1387
1388         Reviewed by Gyuyoung Kim.
1389
1390         * page/PointerLockController.cpp:
1391
1392 2015-10-01  Dean Jackson  <dino@apple.com>
1393
1394         Rollout r190446 for the moment. It broke the build.
1395
1396         * html/canvas/WebGL2RenderingContext.cpp:
1397         (WebCore::WebGL2RenderingContext::getExtension):
1398         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1399         * html/canvas/WebGLRenderingContext.cpp:
1400         (WebCore::WebGLRenderingContext::getExtension):
1401         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1402         * html/canvas/WebGLRenderingContextBase.cpp:
1403         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions):
1404         * html/canvas/WebGLRenderingContextBase.h:
1405         * page/Settings.in:
1406         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1407         (WebCore::Extensions3DOpenGL::supportsExtension): Deleted.
1408
1409 2015-10-01  Jaehun Lim  <ljaehun.lim@samsung.com>
1410
1411         Unreviewed, fix build warning after r190434
1412
1413         Fix error: variable ‘interruption’ set but not used [-Werror=unused-but-set-variable]
1414
1415         * testing/Internals.cpp:
1416         (WebCore::Internals::beginMediaSessionInterruption):
1417
1418 2015-10-01  Dean Jackson  <dino@apple.com>
1419
1420         Expose WEBGL_debug_renderer_info
1421         https://bugs.webkit.org/show_bug.cgi?id=149735
1422         <rdar://problem/18343500>
1423
1424         Reviewed by Simon Fraser.
1425
1426         Enable the extension that allows content to query
1427         for the GPUs vendor and details.
1428
1429         Now that we're enabling this, there was no need for
1430         the internal setting that identified privileged situations.
1431         However, since this meant that WEBGL_debug_shaders was
1432         also exposed, I explicitly disable it since it is
1433         not yet conformant.
1434
1435         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
1436         as well as the general conformance suite.
1437
1438         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
1439         (WebCore::WebGL2RenderingContext::getExtension):
1440         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1441         * html/canvas/WebGLRenderingContext.cpp: Ditto.
1442         (WebCore::WebGLRenderingContext::getExtension):
1443         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1444         * html/canvas/WebGLRenderingContextBase.cpp:
1445         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
1446         * html/canvas/WebGLRenderingContextBase.h:
1447         * page/Settings.in: Remove privilegedWebGLExtensions.
1448         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
1449         extension while it is still buggy.
1450         (WebCore::Extensions3DOpenGL::supportsExtension):
1451
1452 2015-10-01  Eric Carlson  <eric.carlson@apple.com>
1453
1454         [iOS] AirPlay should not stop when the screen locks
1455         https://bugs.webkit.org/show_bug.cgi?id=148315
1456         <rdar://problem/22770703>
1457
1458         Reviewed by Jer Noble.
1459
1460         Tested by media/video-interruption-with-resume-allowing-play.html
1461                   media/video-interruption-with-resume-not-allowing-play.html
1462
1463         * Modules/webaudio/AudioContext.h: overrideBackgroundPlaybackRestriction -> 
1464           shouldOverrideBackgroundPlaybackRestriction.
1465
1466         * html/HTMLMediaElement.cpp:
1467         (WebCore::HTMLMediaElement::suspendPlayback): Fix a typo in the logging.
1468         (WebCore::HTMLMediaElement::mayResumePlayback): Ditto.
1469         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Renamed from
1470           overrideBackgroundPlaybackRestriction.
1471         (WebCore::HTMLMediaElement::overrideBackgroundPlaybackRestriction): Deleted.
1472         * html/HTMLMediaElement.h:
1473
1474         * platform/audio/PlatformMediaSession.cpp:
1475         (WebCore::stateName):
1476         (WebCore::interruptionName): New, log the name of the interruption.
1477         (WebCore::PlatformMediaSession::beginInterruption): Log the interruption type. Don't
1478           increment the interruption counter if we are going to ignore it. Incorporate logic
1479           from doInterruption.
1480         (WebCore::PlatformMediaSession::doInterruption): Deleted.
1481         (WebCore::PlatformMediaSession::shouldDoInterruption): Deleted.
1482         (WebCore::PlatformMediaSession::forceInterruption): Deleted.
1483
1484         * platform/audio/PlatformMediaSession.h: Add SuspendedUnderLock interruption type.
1485         * platform/audio/PlatformMediaSessionManager.cpp:
1486         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground): Deleted.
1487         * platform/audio/PlatformMediaSessionManager.h:
1488
1489         * platform/audio/ios/MediaSessionManagerIOS.h:
1490         * platform/audio/ios/MediaSessionManagerIOS.mm:
1491         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground): Call beginInterruption
1492           when appropriate.
1493
1494 2015-10-01  Ryosuke Niwa  <rniwa@webkit.org>
1495
1496         Slot elements should support fallback contents
1497         https://bugs.webkit.org/show_bug.cgi?id=149701
1498
1499         Reviewed by Antti Koivisto.
1500
1501         Following discussions on Github discussions [1] [2], we're adding the default rule of `display: contents`
1502         on slot elements and making slot elements render its children when there are no assigned nodes [3].
1503
1504         Make these changes by attaching renderers on direct-children of slot elements when there are no assigned
1505         nodes during render tree construction. Note `display: contents` will be aded in webkit.org/b/149439.
1506
1507         [1] https://github.com/w3c/webcomponents/issues/317
1508         [2] https://github.com/w3c/webcomponents/issues/308
1509         [3] https://github.com/w3c/webcomponents/issues/308#issuecomment-143655347
1510
1511         Tests: fast/shadow-dom/css-scoping-shadow-slot-fallback.html
1512                fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html
1513
1514         * style/StyleResolveTree.cpp:
1515         (WebCore::Style::attachSlotAssignees):
1516         (WebCore::Style::detachSlotAssignees):
1517         (WebCore::Style::resolveSlotAssignees):
1518
1519 2015-10-01  Brent Fulgham  <bfulgham@apple.com>
1520
1521         Latch does not clear when a scroll snap animation is triggered
1522         https://bugs.webkit.org/show_bug.cgi?id=149681
1523         <rdar://problem/22733922>
1524
1525         Reviewed by Simon Fraser.
1526
1527         Test: tiled-drawing/scrolling/latched-div-with-scroll-snap.html
1528
1529         The scroll snap animation logic bypasses some of the normal clean-up code used
1530         for wheel event handling. When this happens, the scroll latching state is not
1531         cleared. In some cases this "stale" latch state is used when starting a new
1532         gesture in the same frame. This causes the wrong page element to receive the
1533         mouse wheel events, and hilarity ensues.
1534
1535         * page/mac/EventHandlerMac.mm:
1536         (WebCore::EventHandler::platformNotifyIfEndGesture): Clear latched state when
1537         ending the gesture.
1538
1539 2015-10-01  Brent Fulgham  <bfulgham@apple.com>
1540
1541         [Win] Unreviewed CMake build fixes.
1542
1543         * CMakeLists.txt: Match original Windows build flags for WebCoreTest.
1544         * PlatformAppleWin.cmake: Use the same build defines as the
1545         original Windows build.
1546
1547 2015-09-30  João Oliveira  <hello@jxs.pt>
1548
1549         Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
1550         https://bugs.webkit.org/show_bug.cgi?id=149590
1551
1552         Reviewed by Joseph Pecoraro.
1553
1554         Patch by João Oliveira and Brian Burg.
1555
1556         Expose the frontend page's zoom factor so we can implement relative zoom.
1557
1558         * inspector/InspectorFrontendHost.cpp:
1559         (WebCore::InspectorFrontendHost::zoomFactor): Added.
1560         * inspector/InspectorFrontendHost.h:
1561         * inspector/InspectorFrontendHost.idl:
1562         * page/Frame.h:
1563         (WebCore::Frame::pageZoomFactor):
1564
1565 2015-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1566
1567         [GTK] Websites with invalid auth header keep loading forever
1568         https://bugs.webkit.org/show_bug.cgi?id=149710
1569
1570         Reviewed by Martin Robinson.
1571
1572         We don't correctly handle a null realm from the server when
1573         retrieving and storing credentials from libsecret. First
1574         secret_attributes_build() fails because we pass a null domain, and
1575         we pass null attributes to secret_service_search() that returns
1576         early on a g_return macro and the callback is never called so the
1577         load doesn't continue after the auth challenge.
1578
1579         * platform/network/gtk/CredentialBackingStore.cpp:
1580         (WebCore::createAttributeHashTableFromChallenge):
1581         (WebCore::CredentialBackingStore::credentialForChallenge):
1582         (WebCore::CredentialBackingStore::storeCredentialsForChallenge):
1583
1584 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1585
1586         Refactor binding generator to factor JS DOM class m_impl handling
1587         https://bugs.webkit.org/show_bug.cgi?id=149660
1588
1589         Reviewed by Darin Adler.
1590
1591         Added JSDOMWrapperWithImplementation template class to move m_impl out of the binding generator.
1592         Updated custom bindings to use impl() instead of m_impl directly.
1593         Updated binding generator accordingly.
1594
1595         Covered by existing tests and binding tests.
1596
1597         * bindings/js/JSDOMStringMapCustom.cpp:
1598         (WebCore::JSDOMStringMap::getOwnPropertyNames):
1599         (WebCore::JSDOMStringMap::deleteProperty):
1600         * bindings/js/JSDOMWrapper.h:
1601         (WebCore::JSDOMWrapperWithImplementation::impl):
1602         (WebCore::JSDOMWrapperWithImplementation::~JSDOMWrapperWithImplementation):
1603         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
1604         (WebCore::JSDOMWrapperWithImplementation::releaseImpl):
1605         * bindings/js/JSGeolocationCustom.cpp:
1606         (WebCore::JSGeolocation::getCurrentPosition):
1607         (WebCore::JSGeolocation::watchPosition):
1608         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1609         (WebCore::JSSQLResultSetRowList::item):
1610         * bindings/js/JSSQLTransactionCustom.cpp:
1611         (WebCore::JSSQLTransaction::executeSql):
1612         * bindings/js/JSStorageCustom.cpp:
1613         (WebCore::JSStorage::deleteProperty):
1614         (WebCore::JSStorage::getOwnPropertyNames):
1615         * bindings/js/JSSubtleCryptoCustom.cpp:
1616         (WebCore::JSSubtleCrypto::encrypt):
1617         (WebCore::JSSubtleCrypto::decrypt):
1618         (WebCore::JSSubtleCrypto::sign):
1619         (WebCore::JSSubtleCrypto::verify):
1620         (WebCore::JSSubtleCrypto::wrapKey):
1621         (WebCore::JSSubtleCrypto::unwrapKey):
1622         * bindings/scripts/CodeGeneratorJS.pm:
1623         (GetParentClassName):
1624         (GetImplClassName):
1625         (GenerateHeader):
1626         (GenerateImplementation):
1627         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1628         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
1629         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot): Deleted.
1630         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1631         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
1632         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1633         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
1634         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): Deleted.
1635         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
1636         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
1637         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::finishCreation): Deleted.
1638         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1639         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
1640         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot): Deleted.
1641         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1642         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
1643         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1644         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
1645         (WebCore::jsTestEventConstructorAttr1): Deleted.
1646         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1647         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
1648         (WebCore::JSTestEventConstructor::finishCreation): Deleted.
1649         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1650         (WebCore::JSTestEventTarget::JSTestEventTarget):
1651         (WebCore::JSTestEventTarget::getOwnPropertySlot): Deleted.
1652         * bindings/scripts/test/JS/JSTestEventTarget.h:
1653         (WebCore::JSTestEventTarget::~JSTestEventTarget):
1654         * bindings/scripts/test/JS/JSTestException.cpp:
1655         (WebCore::JSTestException::JSTestException):
1656         (WebCore::JSTestException::getOwnPropertySlot): Deleted.
1657         * bindings/scripts/test/JS/JSTestException.h:
1658         (WebCore::JSTestException::~JSTestException):
1659         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1660         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
1661         (WebCore::jsTestGenerateIsReachableConstructor): Deleted.
1662         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1663         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
1664         (WebCore::JSTestGenerateIsReachable::finishCreation): Deleted.
1665         * bindings/scripts/test/JS/JSTestInterface.cpp:
1666         (WebCore::JSTestInterface::JSTestInterface):
1667         (WebCore::JSTestInterface::getOwnPropertySlot): Deleted.
1668         * bindings/scripts/test/JS/JSTestInterface.h:
1669         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1670         (WebCore::jsTestJSBuiltinConstructorConstructor): Deleted.
1671         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
1672         (WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
1673         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1674         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
1675         (WebCore::jsTestMediaQueryListListenerConstructor): Deleted.
1676         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1677         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
1678         (WebCore::JSTestMediaQueryListListener::finishCreation): Deleted.
1679         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1680         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
1681         (WebCore::jsTestNamedConstructorConstructor): Deleted.
1682         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1683         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
1684         (WebCore::JSTestNamedConstructor::finishCreation): Deleted.
1685         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1686         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
1687         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr): Deleted.
1688         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1689         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
1690         (WebCore::JSTestNondeterministic::finishCreation): Deleted.
1691         * bindings/scripts/test/JS/JSTestObj.cpp:
1692         (WebCore::JSTestObj::JSTestObj):
1693         (WebCore::JSTestObj::getOwnPropertySlot): Deleted.
1694         * bindings/scripts/test/JS/JSTestObj.h:
1695         (WebCore::JSTestObj::~JSTestObj):
1696         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1697         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
1698         (WebCore::jsTestOverloadedConstructorsConstructor): Deleted.
1699         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1700         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
1701         (WebCore::JSTestOverloadedConstructors::finishCreation): Deleted.
1702         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1703         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
1704         (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot): Deleted.
1705         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1706         (WebCore::JSTestOverrideBuiltins::~JSTestOverrideBuiltins):
1707         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1708         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1709         (WebCore::jsTestSerializedScriptValueInterfaceValue): Deleted.
1710         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1711         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
1712         (WebCore::JSTestSerializedScriptValueInterface::finishCreation): Deleted.
1713         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1714         (WebCore::JSTestTypedefs::JSTestTypedefs):
1715         (WebCore::JSTestTypedefs::getOwnPropertySlot): Deleted.
1716         * bindings/scripts/test/JS/JSTestTypedefs.h:
1717         (WebCore::JSTestTypedefs::~JSTestTypedefs):
1718         * bindings/scripts/test/JS/JSattribute.cpp:
1719         (WebCore::JSattribute::JSattribute):
1720         (WebCore::jsattributeReadonly): Deleted.
1721         * bindings/scripts/test/JS/JSattribute.h:
1722         (WebCore::JSattribute::~JSattribute):
1723         (WebCore::JSattribute::finishCreation): Deleted.
1724         * bindings/scripts/test/JS/JSreadonly.cpp:
1725         (WebCore::JSreadonly::JSreadonly):
1726         (WebCore::jsreadonlyConstructor): Deleted.
1727         * bindings/scripts/test/JS/JSreadonly.h:
1728         (WebCore::JSreadonly::~JSreadonly):
1729         (WebCore::JSreadonly::finishCreation): Deleted.
1730
1731 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
1732
1733         Fix the ARM build after r190192
1734         https://bugs.webkit.org/show_bug.cgi?id=149620
1735
1736         Reviewed by Darin Adler.
1737
1738         * platform/graphics/FontFeatureSettings.h:
1739         (WebCore::fontFeatureTag):
1740
1741 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1742
1743         [Streams API] Add support for private WebCore JS builtins functions
1744         https://bugs.webkit.org/show_bug.cgi?id=149518
1745
1746         Reviewed by Darin Adler.
1747
1748         Using ReadableStream tee method as a testbed to add support for private WebCore JS builtins functions.
1749         Private functions are hooked to JSDOMWindowBase, as it is the one connected to WebCoreClientData.
1750         WebCoreClientData is responsible to export the private function symbols to the VM.
1751
1752         Updated generate-js-builtins script to generate a class that can create and own all JS functions.
1753         This class is used by JSDOMWindowBase to create the JS builtin functions.
1754         It is also used to manage the GC of these objects.
1755
1756         Covered by rebased tests.
1757
1758         * CMakeLists.txt: Adding ReadableStreamInternals builtin files.
1759         * DerivedSources.cpp: Ditto.
1760         * DerivedSources.make: Ditto.
1761         * Modules/streams/ReadableStream.idl: Adding tee declaration as builtin
1762         * Modules/streams/ReadableStream.js:
1763         (tee): Calling @teeReadableStream
1764         * Modules/streams/ReadableStreamInternals.js: Barebone @teeReadableStream implementation.
1765         (teeReadableStream):
1766         * WebCore.vcxproj/WebCore.vcxproj: Adding ReadableStreamInternals builtin files.
1767         * WebCore.xcodeproj/project.pbxproj: Adding ReadableStreamInternals builtin files.
1768         * bindings/js/JSDOMWindowBase.cpp:
1769         (WebCore::JSDOMWindowBase::JSDOMWindowBase): Creating ReadableStreamInternalsBuiltinFunctions object.
1770         (WebCore::JSDOMWindowBase::finishCreation): Creating builtin functions through ReadableStreamInternalsBuiltinFunctions and registering them to the JS engine.
1771         (WebCore::JSDOMWindowBase::visitChildren): Ensuring GC does not collect private builtin functions through ReadableStreamInternalsBuiltinFunctions object
1772         * bindings/js/JSDOMWindowBase.h:
1773         * bindings/js/WebCoreJSClientData.h:
1774         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Exporting private names of ReadableStreamInternalsBuiltins
1775         (WebCore::WebCoreJSClientData::readableStreamBuiltins):
1776         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins):
1777         * generate-js-builtins: Adding support for ReadableStreamInternalsBuiltinFunctions and exportNames.
1778
1779 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1780
1781         Binding generator should make mutable CachedAttribute member fields
1782         https://bugs.webkit.org/show_bug.cgi?id=148056
1783
1784         Reviewed by Chris Dumez.
1785
1786         Making mutable CachedAttribute member fields.
1787         Removing const_cast from custom binding code.
1788         Rebased bindings tests.
1789
1790         No change in behavior.
1791
1792         * bindings/js/JSHistoryCustom.cpp:
1793         (WebCore::JSHistory::state):
1794         * bindings/js/JSMessageEventCustom.cpp:
1795         (WebCore::JSMessageEvent::data):
1796         * bindings/js/JSPopStateEventCustom.cpp:
1797         (WebCore::cacheState):
1798         (WebCore::JSPopStateEvent::state):
1799         * bindings/js/JSReadableStreamReaderEventCustom.cpp:
1800         (WebCore::JSReadableStreamReader::closed):
1801         * bindings/js/JSXMLHttpRequestCustom.cpp:
1802         (WebCore::JSXMLHttpRequest::response):
1803         * bindings/scripts/CodeGeneratorJS.pm:
1804         (GenerateHeader):
1805         * bindings/scripts/test/JS/JSTestObj.h:
1806         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1807
1808 2015-10-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1809
1810         [Streams API] Create ByteLengthQueuingStrategy object as per spec
1811         https://bugs.webkit.org/show_bug.cgi?id=147153
1812
1813         Reviewed by Darin Adler.
1814
1815         Added ByteLengthQueuingStream class as the spec defines at https://streams.spec.whatwg.org/#blqs-class.
1816
1817         Tests are covered by current set.
1818
1819         * CMakeLists.txt:
1820         * DerivedSources.cpp:
1821         * DerivedSources.make:
1822         * WebCore.vcxproj/WebCore.vcxproj:
1823         * WebCore.vcxproj/WebCore.vcxproj.filters:
1824         * WebCore.xcodeproj/project.pbxproj:
1825         * bindings/js/WebCoreJSBuiltins.cpp: Added build instructions.
1826         * Modules/streams/ByteLengthQueuingStrategy.idl: Added.
1827         * Modules/streams/ByteLengthQueuingStrategy.js: Copied from Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp.
1828         (size): Return byteLength attribute of the chunk.
1829         (initializeByteLengthQueuingStrategy): Initialize the highWaterMark property.
1830         * bindings/js/WebCoreJSClientData.h:
1831         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Initialize the blqs builtins.
1832         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Return the attribute.
1833
1834 2015-10-01  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1835
1836         Clean up all uses of PassRefPtr in Modules/geolocation
1837         https://bugs.webkit.org/show_bug.cgi?id=149552
1838
1839         Reviewed by Darin Adler.
1840
1841         * Modules/geolocation/GeoNotifier.cpp:
1842         (WebCore::GeoNotifier::GeoNotifier):
1843         (WebCore::GeoNotifier::setFatalError):
1844         * Modules/geolocation/GeoNotifier.h:
1845         (WebCore::GeoNotifier::create):
1846         * Modules/geolocation/Geolocation.cpp:
1847         (WebCore::createGeoposition):
1848         (WebCore::createPositionError):
1849         (WebCore::Geolocation::Watchers::add):
1850         (WebCore::Geolocation::getCurrentPosition):
1851         (WebCore::Geolocation::watchPosition):
1852         (WebCore::Geolocation::startRequest):
1853         * Modules/geolocation/Geolocation.h:
1854         * Modules/geolocation/GeolocationError.h:
1855         * Modules/geolocation/GeolocationPosition.h:
1856         * Modules/geolocation/Geoposition.h:
1857         (WebCore::Geoposition::create):
1858         (WebCore::Geoposition::isolatedCopy):
1859         (WebCore::Geoposition::Geoposition):
1860         * Modules/geolocation/PositionError.h:
1861         * Modules/geolocation/PositionOptions.h:
1862
1863 2015-09-30  Hunseop Jeong  <hs85.jeong@samsung.com>
1864
1865         [EFL][Gtk] Try to fix the build after r190379.
1866         https://bugs.webkit.org/show_bug.cgi?id=149693
1867
1868         Reviewed by Gyuyoung Kim.
1869
1870         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1871
1872 2015-09-30  Katlyn Graff  <kgraff@apple.com>
1873
1874         Add support for the imageSmoothingQuality property for CanvasRenderingContext2D.
1875         https://bugs.webkit.org/show_bug.cgi?id=149541
1876
1877         Reviewed by Ryosuke Niwa.
1878
1879         As documented here: https://html.spec.whatwg.org/multipage/scripting.html#image-smoothing
1880         Exposes the smooothing quality of algorithms used for scaling images. Valid input
1881         values are low, medium, and high: associated algorithms are expected to vary for
1882         differing hardware. setImageSmoothingQuality provides a handle into CGInterpolationQuality.
1883
1884         Test: fast/canvas/canvas-imageSmoothingQuality.html
1885
1886         * html/canvas/CanvasRenderingContext2D.cpp:
1887         (WebCore::CanvasRenderingContext2D::State::State):
1888         (WebCore::CanvasRenderingContext2D::State::operator=):
1889         (WebCore::smoothingToInterpolationQuality):
1890         (WebCore::CanvasRenderingContext2D::imageSmoothingQuality):
1891         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
1892         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled):
1893         * html/canvas/CanvasRenderingContext2D.h:
1894         * html/canvas/CanvasRenderingContext2D.idl:
1895
1896 2015-09-30  Dean Jackson  <dino@apple.com>
1897
1898         GraphicsContext3D::mappedSymbolName should initialize count variable
1899         https://bugs.webkit.org/show_bug.cgi?id=149692
1900         <rdar://problem/22871304>
1901
1902         Reviewed by Simon Fraser.
1903
1904         While debugging another WebGL issue, I noticed that some
1905         OpenGL renderers can get into a state where they
1906         drop resources (e.g. a GPU reset). If we don't detect that
1907         in time, we might try to ask for the currently attached
1908         resources and our in-parameter will not be set. In this
1909         case, initialize it to zero so that we don't do silly things.
1910
1911         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1912         (WebCore::GraphicsContext3D::mappedSymbolName): Initialize count to 0.
1913
1914 2015-09-30  Dean Jackson  <dino@apple.com>
1915
1916         Crash in gleLookupHashObject when context is lost
1917         https://bugs.webkit.org/show_bug.cgi?id=149690
1918         <rdar://problem/22751585>
1919         <rdar://problem/22465495>
1920
1921         Reviewed by Simon Fraser.
1922
1923         When we received notification that the GPU has reset,
1924         we were nulling out and deleting our OpenGL contexts
1925         and then trying to do it all over again. The fix was
1926         to flip the order of operations.
1927
1928         While there I added some logging, and changed the
1929         way we check GPU status to make sure we do a check
1930         after the first draw call.
1931
1932         Unfortunately we can't test automatically because it
1933         involves resetting the GPU which can possibly cause
1934         concurrent tests to fail.
1935
1936         * platform/graphics/mac/GraphicsContext3DMac.mm:
1937         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Move forceContextLost()
1938         to be the first thing we do after we've realised we need to
1939         bail.
1940
1941 2015-09-30  Brady Eidson  <beidson@apple.com>
1942
1943         Add UniqueIDBDatabase object, IDBBackingStore objects, and a database operation thread.
1944         https://bugs.webkit.org/show_bug.cgi?id=149678
1945
1946         Reviewed by Alex Christensen.
1947
1948         Test: storage/indexeddb/modern/opendatabase-request-event.html
1949
1950         - UniqueIDBDatabase represents a specific IDB database instance that can have multiple 
1951           connections to it.
1952         - IDBBackingStore is an abstract representation of a unique database's backing store, 
1953           and has a concrete in-memory implementation for now.
1954         - The database thread exists on IDBServer and is for offloading actual database I/O from 
1955           the main thread.
1956
1957         * CMakeLists.txt:
1958
1959         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
1960         (WebCore::IDBDatabaseIdentifier::isolatedCopy):
1961         * Modules/indexeddb/IDBDatabaseIdentifier.h:
1962
1963         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1964         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
1965         (WebCore::IDBClient::IDBConnectionToServer::didOpenDatabase):
1966         * Modules/indexeddb/client/IDBConnectionToServer.h:
1967         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1968
1969         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
1970         (WebCore::IDBClient::IDBFactory::openInternal):
1971
1972         * Modules/indexeddb/server/IDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
1973         (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
1974
1975         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1976         (WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase):
1977         * Modules/indexeddb/server/IDBConnectionToClient.h:
1978         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1979
1980         * Modules/indexeddb/server/IDBServer.cpp:
1981         (WebCore::IDBServer::IDBServer::IDBServer):
1982         (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
1983         (WebCore::IDBServer::IDBServer::createBackingStore):
1984         (WebCore::IDBServer::IDBServer::openDatabase):
1985         (WebCore::IDBServer::IDBServer::deleteDatabase):
1986         (WebCore::IDBServer::IDBServer::postDatabaseTask):
1987         (WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
1988         (WebCore::IDBServer::IDBServer::databaseThreadEntry):
1989         (WebCore::IDBServer::IDBServer::databaseRunLoop):
1990         (WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread):
1991         * Modules/indexeddb/server/IDBServer.h:
1992
1993         * Modules/indexeddb/server/IDBServerOperation.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
1994         (WebCore::IDBServer::IDBServerOperation::create):
1995         (WebCore::IDBServer::IDBServerOperation::IDBServerOperation):
1996         * Modules/indexeddb/server/IDBServerOperation.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
1997         (WebCore::IDBServer::IDBServerOperation::connection):
1998         (WebCore::IDBServer::IDBServerOperation::requestData):
1999
2000         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp.
2001         (WebCore::IDBServer::MemoryIDBBackingStore::create):
2002         (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
2003         (WebCore::IDBServer::MemoryIDBBackingStore::~MemoryIDBBackingStore):
2004         (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
2005         * Modules/indexeddb/server/MemoryIDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h.
2006
2007         * Modules/indexeddb/server/UniqueIDBDatabase.cpp: Added.
2008         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
2009         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
2010         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
2011         (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
2012         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
2013         * Modules/indexeddb/server/UniqueIDBDatabase.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
2014         (WebCore::IDBServer::UniqueIDBDatabase::create):
2015
2016         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
2017         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
2018         (WebCore::IDBDatabaseInfo::isolatedCopy):
2019         * Modules/indexeddb/shared/IDBDatabaseInfo.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
2020         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
2021
2022         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2023         (WebCore::InProcessIDBServer::didDeleteDatabase):
2024         (WebCore::InProcessIDBServer::openDatabase):
2025         (WebCore::InProcessIDBServer::didOpenDatabase):
2026         * Modules/indexeddb/shared/InProcessIDBServer.h:
2027
2028         * WebCore.xcodeproj/project.pbxproj:
2029
2030         * platform/CrossThreadCopier.cpp:
2031         (WebCore::IDBDatabaseInfo>::copy):
2032         (WebCore::IDBDatabaseIdentifier>::copy):
2033         * platform/CrossThreadCopier.h:
2034
2035 2015-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2036
2037         Crash when using an SVG font with > 390 glyphs
2038         https://bugs.webkit.org/show_bug.cgi?id=149677
2039         <rdar://problem/21676402>
2040
2041         Reviewed by Simon Fraser.
2042
2043         The "Charset Index" in OTF are indices into a collection of strings. There are
2044         390 predefined strings in this collection. We were currently assigning each
2045         glyph to one of these strings. However, if there are more glyphs than strings,
2046         we will be using invalid indices.
2047
2048         The values of the strings themselves are not necessary for SVG fonts. Therefore,
2049         the solution is to create a single dummy string, and have all glyphs target it.
2050
2051         Tests: svg/custom/many-glyphs.svg
2052
2053         * css/CSSFontFaceSource.cpp:
2054         (WebCore::CSSFontFaceSource::font):
2055         * svg/SVGToOTFFontConversion.cpp:
2056         (WebCore::SVGToOTFFontConverter::appendCFFTable):
2057
2058 2015-09-30  Chris Dumez  <cdumez@apple.com>
2059
2060         Unreviewed, roll out r188331: "NetworkProcess: DNS prefetch happens in the Web Process"
2061         <rdar://problem/22560715>
2062
2063         Speculative roll out of r188331 as we had a ~2.5% PLT regression around
2064         the time it landed and it seems the most likely culprit. I'll reland if
2065         the perf bots do not recover after the roll out.
2066
2067         * html/HTMLAnchorElement.cpp:
2068         (WebCore::HTMLAnchorElement::parseAttribute):
2069         * loader/FrameLoaderClient.h:
2070         * loader/LinkLoader.cpp:
2071         (WebCore::LinkLoader::loadLink):
2072         * page/Chrome.cpp:
2073         (WebCore::Chrome::mouseDidMoveOverElement):
2074
2075 2015-09-30  Timothy Horton  <timothy_horton@apple.com>
2076
2077         Compute document marker rects at use time instead of paint time
2078         https://bugs.webkit.org/show_bug.cgi?id=149643
2079
2080         Reviewed by Darin Adler.
2081
2082         * dom/DocumentMarkerController.cpp:
2083         (WebCore::DocumentMarkerController::DocumentMarkerController):
2084         (WebCore::DocumentMarkerController::detach):
2085         Store and zero the Document backpointer.
2086
2087         (WebCore::DocumentMarkerController::addMarker):
2088         (WebCore::DocumentMarkerController::addTextMatchMarker):
2089         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
2090         (WebCore::DocumentMarkerController::addDictationResultMarker):
2091         (WebCore::DocumentMarkerController::copyMarkers):
2092         Remove some useless comments.
2093
2094         (WebCore::updateRenderedRectsForMarker):
2095         Use Range to compute the (unclipped, absolute) text rects, and store them
2096         on the RenderedDocumentMarker.
2097
2098         (WebCore::DocumentMarkerController::invalidateRectsForAllMarkers):
2099         (WebCore::DocumentMarkerController::invalidateRectsForMarkersInNode):
2100         Mark the relevant markers' rects as invalid, and notify the ChromeClient.
2101
2102         (WebCore::DocumentMarkerController::updateRectsForInvalidatedMarkersOfType):
2103         Run through all markers, computing rects for ones that don't have valid rects.
2104         We will do layout (once) if necessary. However, this is most commonly
2105         called from a place where layout should already be up to date, so this
2106         should not happen often. updateRenderedRectsForMarker also asserts
2107         that layout is up to date.
2108
2109         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
2110         Retrieve all markers of the given type, clip them by overflow clip and
2111         frame clip, and return them to the caller.
2112
2113         (WebCore::DocumentMarkerController::addMarker):
2114         (WebCore::DocumentMarkerController::markerContainingPoint):
2115         (WebCore::DocumentMarkerController::markersFor):
2116         (WebCore::DocumentMarkerController::repaintMarkers):
2117         (WebCore::DocumentMarkerController::shiftMarkers):
2118         (DocumentMarkerController::setMarkersActive):
2119         (DocumentMarkerController::hasMarkers):
2120         Modern iteration.
2121         
2122         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect): Deleted.
2123         * dom/DocumentMarkerController.h:
2124
2125         * dom/Document.cpp:
2126         (WebCore::Document::Document):
2127         Pass the Document to the DocumentMarkerController.
2128
2129         * dom/RenderedDocumentMarker.h:
2130         (WebCore::RenderedDocumentMarker::contains):
2131         (WebCore::RenderedDocumentMarker::setUnclippedAbsoluteRects):
2132         (WebCore::RenderedDocumentMarker::unclippedAbsoluteRects):
2133         (WebCore::RenderedDocumentMarker::invalidate):
2134         (WebCore::RenderedDocumentMarker::isValid):
2135         (WebCore::RenderedDocumentMarker::addRenderedRect): Deleted.
2136         (WebCore::RenderedDocumentMarker::renderedRects): Deleted.
2137         Instead of keeping "rendered" rects, keep unclipped rects in absolute
2138         document coordinates. Invalidation will happen wholesale instead of
2139         based on dirty rects, because computation no longer happens at paint
2140         time, so it's safe to throw all of the rects away.
2141         Keep track of whether we have valid rects or not.
2142
2143         * editing/Editor.cpp:
2144         (WebCore::Editor::countMatchesForText):
2145         We don't need to do a fake whole-document paint just to compute the
2146         document marker rects. They are computed on demand, using layout information
2147         instead of paint-time information.
2148
2149         * page/ChromeClient.h:
2150         Remove an unnecessary semicolon.
2151         Add didInvalidateDocumentMarkerRects, which DocumentMarkerController
2152         will call whenever document marker rects are invalidated (and when e.g.
2153         the find holes PageOverlay should repaint itself).
2154
2155         * page/FrameView.cpp:
2156         (WebCore::FrameView::layout):
2157         Invalidate document marker's layout-computed rects after layout is complete.
2158         They'll be lazily recomputed when next requested.
2159
2160         (WebCore::FrameView::willPaintContents):
2161         Remove the pre-painting invalidation of document marker rects.
2162
2163         * rendering/InlineTextBox.cpp:
2164         (WebCore::InlineTextBox::paintTextMatchMarker):
2165         (WebCore::InlineTextBox::paintDocumentMarker): Deleted.
2166         (WebCore::InlineTextBox::computeRectForReplacementMarker): Deleted.
2167         (WebCore::InlineTextBox::paintDocumentMarkers): Deleted.
2168         Don't bother computing rendered rects for document markers at paint time.
2169         Just do the actual painting work (which, for replacement markers, is
2170         nothing at all).
2171
2172         * rendering/InlineTextBox.h:
2173         * rendering/RenderLayer.cpp:
2174         (WebCore::RenderLayer::updateLayerPositions):
2175         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
2176         When RenderLayers move, invalidate document marker rects.
2177
2178         * rendering/svg/SVGInlineFlowBox.cpp:
2179         (WebCore::SVGInlineFlowBox::paint):
2180         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer): Deleted.
2181         * rendering/svg/SVGInlineFlowBox.h:
2182         * rendering/svg/SVGRootInlineBox.cpp:
2183         (WebCore::SVGRootInlineBox::paint):
2184         Don't bother computing rendered rects for document markers at paint time.
2185
2186         * testing/Internals.cpp:
2187         (WebCore::markerTypeFrom):
2188         (WebCore::markerTypesFrom):
2189         Add markerTypeFrom, which returns MarkerType enum values for the input string
2190         instead of a MarkerTypes class.
2191
2192         (WebCore::Internals::dumpMarkerRects):
2193         Dump all markers for the given type, and request them from DocumentMarkerController
2194         instead of from the RenderedDocumentMarker, because we want fully clipped
2195         rects, which can only be obtained from DocumentMarkerController.
2196
2197         * editing/FrameSelection.cpp:
2198         (WebCore::FrameSelection::getTextRectangles):
2199         Avoid enclosing unnecessarily, to avoid inflating zero-width text rects
2200         to have a non-zero width. Callers appear to be OK with non-integral positions.
2201
2202         * testing/Internals.h:
2203         * testing/Internals.idl:
2204
2205 2015-09-30  Eric Carlson  <eric.carlson@apple.com>
2206
2207         REGRESSION(r190262): User media unit test failures after r190262
2208         https://bugs.webkit.org/show_bug.cgi?id=149580
2209
2210         Reviewed by Darin Adler.
2211
2212         * Modules/mediastream/RTCPeerConnection.cpp:
2213         (WebCore::RTCPeerConnection::getStats): Drive-by fix to deal with optional param.
2214
2215         * Modules/mediastream/UserMediaRequest.cpp:
2216         (WebCore::UserMediaRequest::constraintsValidated): Swap the track parameter order.
2217         * Modules/mediastream/UserMediaRequest.h:
2218
2219         * platform/mediastream/MediaStreamCreationClient.h:
2220         (WebCore::MediaStreamCreationClient::validateRequestConstraints): Swap the track parameter order.
2221
2222         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2223         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): If there is no 
2224           constraint for a media type, don't return a device of that type.
2225
2226         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
2227         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
2228
2229         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2230         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
2231
2232         * platform/mock/TimerEventBasedMock.h:
2233         (WebCore::TimerEvent::~TimerEvent): Clear the m_mock pointer.
2234
2235         * platform/mock/UserMediaClientMock.h:
2236         (WebCore::UserMediaClientMock::fire): Deal with empty device vectors.
2237
2238         * testing/Internals.cpp:
2239         (WebCore::Internals::Internals): Don't register UserMediaController, it isn't needed for
2240           WKTR.
2241
2242 2015-09-29  Antti Koivisto  <antti@apple.com>
2243
2244         Use separate style resolver for user agent shadow trees
2245         https://bugs.webkit.org/show_bug.cgi?id=149626
2246
2247         Reviewed by Andreas Kling.
2248
2249         We now support separate style resolvers for shadow trees. Use this mechanism to have a separate
2250         per-document style resolver for user agent shadow trees. This isolates user agent shadow trees
2251         from author style better and simplifies the style resolver. It can also avoid some unnecessary style recalcs.
2252
2253         * css/DocumentRuleSets.cpp:
2254         (WebCore::DocumentRuleSets::resetAuthorStyle):
2255         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
2256
2257             Change interface so that only the new rules are provided.
2258
2259         * css/DocumentRuleSets.h:
2260         * css/ElementRuleCollector.cpp:
2261         (WebCore::ElementRuleCollector::addElementStyleProperties):
2262         (WebCore::ElementRuleCollector::collectMatchingRules):
2263
2264             We can remove special bailout as shadow tree style resolver won't have other author style
2265
2266         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2267
2268             Remove the exception that disables property whitelists for UA stylesheets. We don't seem to use the feature.
2269
2270         (WebCore::ElementRuleCollector::matchUARules):
2271         (WebCore::MatchingUARulesScope::MatchingUARulesScope): Deleted.
2272         (WebCore::MatchingUARulesScope::~MatchingUARulesScope): Deleted.
2273         (WebCore::MatchingUARulesScope::isMatchingUARules): Deleted.
2274
2275             Remove this unnecessary hack.
2276
2277         * css/ElementRuleCollector.h:
2278         (WebCore::ElementRuleCollector::ElementRuleCollector):
2279         * css/RuleSet.cpp:
2280         (WebCore::RuleSet::addStyleRule):
2281         (WebCore::RuleSet::copyShadowPseudoElementRulesFrom):
2282
2283             Also copy WebVTT rules. They are currently a sort of mixture of UA and author shadow tree.
2284
2285         (WebCore::shrinkMapVectorsToFit):
2286         * css/RuleSet.h:
2287         (WebCore::RuleData::containsUncommonAttributeSelector):
2288         (WebCore::RuleData::linkMatchType):
2289         (WebCore::RuleData::hasDocumentSecurityOrigin):
2290         (WebCore::RuleData::propertyWhitelistType):
2291         (WebCore::RuleData::descendantSelectorIdentifierHashes):
2292         (WebCore::RuleSet::ruleCount):
2293         (WebCore::RuleSet::hasShadowPseudoElementRules):
2294         * css/StyleInvalidationAnalysis.cpp:
2295         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
2296         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
2297
2298             Don't invalidate the whole tree when author shadow pseudo element rules change. Just invalidate the shadow trees.
2299
2300         (WebCore::StyleInvalidationAnalysis::invalidateStyleForTree):
2301         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
2302         (WebCore::invalidateIfNeeded): Deleted.
2303         (WebCore::invalidateStyleForTree): Deleted.
2304         * css/StyleInvalidationAnalysis.h:
2305         (WebCore::StyleInvalidationAnalysis::dirtiesAllStyle):
2306         (WebCore::StyleInvalidationAnalysis::hasShadowPseudoElementRulesInAuthorSheet):
2307         * css/StyleResolver.cpp:
2308         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2309         (WebCore::StyleResolver::StyleResolver):
2310         (WebCore::StyleResolver::appendAuthorStyleSheets):
2311
2312             Simpler interface.
2313
2314         * css/StyleResolver.h:
2315         (WebCore::StyleResolver::document):
2316         (WebCore::StyleResolver::documentSettings):
2317         (WebCore::StyleResolver::ruleSets):
2318         * dom/AuthorStyleSheets.cpp:
2319         (WebCore::AuthorStyleSheets::collectActiveStyleSheets):
2320         (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
2321
2322             Cleanups.
2323
2324         (WebCore::filterEnabledNonemptyCSSStyleSheets):
2325         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
2326         (WebCore::AuthorStyleSheets::updateStyleResolver):
2327
2328             Factor to a function.
2329             Copy any author shadow pseudo elements to user agent shadow tree resolver.
2330
2331         (WebCore::AuthorStyleSheets::activeStyleSheetsForInspector):
2332         * dom/AuthorStyleSheets.h:
2333         * dom/Document.cpp:
2334         (WebCore::Document::createStyleResolver):
2335         (WebCore::Document::userAgentShadowTreeStyleResolver):
2336
2337             Use separate resolver.
2338
2339         (WebCore::Document::fontsNeedUpdate):
2340         (WebCore::Document::clearStyleResolver):
2341         * dom/Document.h:
2342         (WebCore::Document::ensureStyleResolver):
2343         * dom/ShadowRoot.cpp:
2344         (WebCore::ShadowRoot::styleResolver):
2345
2346             Return document-global shadow tree resolver for ua trees.
2347
2348         * style/StyleResolveTree.cpp:
2349         (WebCore::Style::resolveShadowTree):
2350
2351             Take styleChange of shadow root into account.
2352
2353 2015-09-30  Gwang Yoon Hwang  <yoon@igalia.com>
2354
2355         [GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
2356         https://bugs.webkit.org/show_bug.cgi?id=141782
2357
2358         Reviewed by Carlos Garcia Campos.
2359
2360         This patch fixes HiDPI issue in the TextureMapper.
2361         To support HiDPI in the TextureMapper, we need to draw scaled contents
2362         in the TextureMapperTile, and apply the global scale in the root layer
2363         to apply transforms correctly.
2364
2365         Supporting the device scale is handled at LayerTreeHostGtk and
2366         TextureMapperBackingStore, and GraphicsLayerTextureMapper doesn't handle
2367         the device scale directly.
2368
2369         From the TextureMapperLayer, deviceScale and pageScale do not have to be
2370         handled differently. These are multiplied and provided to
2371         TextureMapperBackingStore.
2372
2373         * platform/graphics/texmap/TextureMapperTile.cpp:
2374         (WebCore::TextureMapperTile::updateContents):
2375         * platform/graphics/texmap/TextureMapperTile.h:
2376         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
2377
2378             Modified to increase the cover rect for tiles creation. For the image
2379             contents, it just creates texture with a image size, regardless of the
2380             contents scale.
2381
2382         * platform/graphics/texmap/BitmapTexture.cpp:
2383         (WebCore::BitmapTexture::updateContents):
2384
2385             Apply the device scale to the graphics context before painting contents.
2386
2387         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2388         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
2389         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
2390
2391             Apply the device scale and the page scale to the backing store
2392
2393 2015-09-29  Ryosuke Niwa  <rniwa@webkit.org>
2394
2395         ASSERTION FAILED: !isUnreachableNode(m_target.get()) when hovering over any input element
2396         https://bugs.webkit.org/show_bug.cgi?id=149589
2397
2398         Reviewed by Darin Adler.
2399
2400         The bug was caused by target not being reset across shadow boundary when SHADOW_DOM was disabled.
2401
2402         No new tests since exiting tests cover this in debug builds. e.g. editing/deleting/5290534.html
2403
2404         * dom/EventDispatcher.cpp:
2405         (WebCore::EventPath::EventPath):
2406
2407 2015-09-29  Jon Honeycutt  <jhoneycutt@apple.com>
2408
2409         Avoid reparsing an XSLT stylesheet after the first failure.
2410         https://bugs.webkit.org/show_bug.cgi?id=149188
2411         <rdar://problem/22709912>
2412
2413         Reviewed by Dave Hyatt.
2414
2415         Patch by Jiewen Tan, jiewen_tan@apple.com.
2416
2417         Test: svg/custom/invalid-xslt-crash.svg
2418
2419         * xml/XSLStyleSheet.h:
2420         Add a new member variable m_compilationFailed that tracks whether
2421         compilation has failed. Default value is false.
2422
2423         * xml/XSLStyleSheetLibxslt.cpp:
2424         (WebCore::XSLStyleSheet::compileStyleSheet):
2425         Return early if the compilation has failed before. After compiling the
2426         style sheet, if we failed, set m_compilationFailed to true.
2427
2428 2015-09-29  Hunseop Jeong  <hs85.jeong@samsung.com>
2429
2430         Use modern for-loops in WebCore/loader.
2431         https://bugs.webkit.org/show_bug.cgi?id=149397
2432
2433         Reviewed by Darin Adler.
2434
2435         No new tests because there is no behavior change.
2436
2437         * loader/CrossOriginAccessControl.cpp:
2438         (WebCore::parseAccessControlExposeHeadersAllowList):
2439         * loader/DocumentLoader.cpp:
2440         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
2441         * loader/FormSubmission.cpp:
2442         (WebCore::FormSubmission::create):
2443         * loader/FrameLoader.cpp:
2444         (WebCore::FrameLoader::~FrameLoader):
2445         (WebCore::FrameLoader::commitProvisionalLoad):
2446         (WebCore::FrameLoader::detachChildren):
2447         (WebCore::FrameLoader::shouldClose):
2448         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
2449         * loader/HistoryController.cpp:
2450         (WebCore::HistoryController::currentFramesMatchItem):
2451         * loader/SubframeLoader.cpp:
2452         (WebCore::findPluginMIMETypeFromURL):
2453         (WebCore::SubframeLoader::createJavaAppletWidget):
2454         * loader/appcache/ApplicationCache.cpp:
2455         (WebCore::ApplicationCache::isURLInOnlineWhitelist):
2456         (WebCore::ApplicationCache::urlMatchesFallbackNamespace):
2457         * loader/appcache/ApplicationCacheGroup.cpp:
2458         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2459         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2460         (WebCore::ApplicationCacheGroup::postListenerTask):
2461         * loader/appcache/ApplicationCacheHost.cpp:
2462         (WebCore::ApplicationCacheHost::stopDeferringEvents):
2463         * loader/appcache/ApplicationCacheStorage.cpp:
2464         (WebCore::StorageIDJournal::~StorageIDJournal):
2465         (WebCore::ApplicationCacheStorage::store):
2466         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
2467         * loader/archive/Archive.cpp:
2468         (WebCore::Archive::clearAllSubframeArchivesImpl):
2469         * loader/archive/ArchiveResourceCollection.cpp:
2470         (WebCore::ArchiveResourceCollection::addAllResources):
2471         * loader/archive/cf/LegacyWebArchive.cpp:
2472         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
2473         (WebCore::LegacyWebArchive::create):
2474         * loader/archive/mhtml/MHTMLArchive.cpp:
2475         (WebCore::MHTMLArchive::generateMHTMLData):
2476         * loader/cache/CachedImage.cpp:
2477         (WebCore::CachedImage::switchClientsToRevalidatedResource):
2478         (WebCore::CachedImage::createImage):
2479         * loader/cache/CachedResource.cpp:
2480         (WebCore::CachedResource::switchClientsToRevalidatedResource):
2481         * loader/cache/CachedResourceLoader.cpp:
2482         (WebCore::CachedResourceLoader::~CachedResourceLoader):
2483         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
2484         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
2485         (WebCore::CachedResourceLoader::isPreloaded):
2486         (WebCore::CachedResourceLoader::printPreloadStats):
2487         * loader/icon/IconDatabase.cpp:
2488         (WebCore::IconDatabase::removeAllIcons):
2489         (WebCore::IconDatabase::setIconDataForIconURL):
2490         (WebCore::IconDatabase::iconRecordCountWithData):
2491         (WebCore::IconDatabase::notifyPendingLoadDecisions):
2492         (WebCore::IconDatabase::performURLImport):
2493         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2494         (WebCore::IconDatabase::readFromDatabase):
2495         (WebCore::IconDatabase::writeToDatabase):
2496
2497 2015-09-29  Chris Dumez  <cdumez@apple.com>
2498
2499         sectionRowIndex must return -1 when its parent is not a table, tbody, thead, or tfoot
2500         https://bugs.webkit.org/show_bug.cgi?id=148841
2501         <rdar://problem/22586870>
2502
2503         Reviewed by Ryosuke Niwa.
2504
2505         Update HTMLTableRowElement.sectionRowIndex to match the specification:
2506         https://html.spec.whatwg.org/multipage/tables.html#dom-tr-sectionrowindex
2507
2508         In particular, it now returns -1 if the parent is not a table, tbody,
2509         thead and tfoot.
2510
2511         No new tests, already covered by existing test.
2512
2513         * html/HTMLTableRowElement.cpp:
2514         (WebCore::HTMLTableRowElement::sectionRowIndex):
2515
2516 2015-09-29  Daniel Bates  <dabates@apple.com>
2517
2518         Make WebKit for iOS Simulator build with the public iOS 9 SDK
2519         https://bugs.webkit.org/show_bug.cgi?id=149652
2520
2521         Reviewed by Simon Fraser.
2522
2523         * WebCore.xcodeproj/project.pbxproj: Add private header pthreadSPI.h. Also move entry for IDBTransaction.h so that it is in sorted order.
2524         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Substitute AVPlayerViewControllerDelegate_WebKitOnly for AVPlayerViewControllerDelegate.
2525         * platform/spi/cocoa/AVKitSPI.h: As of iOS 9, AVPlayerViewControllerDelegate is a public protocol. Separate out WebKit-specific SPI into protocol
2526         AVPlayerViewControllerDelegate_WebKitOnly, which extends AVPlayerViewControllerDelegate. Also, the properties -[AVPlayerViewController allowsPictureInPicturePlayback] and -[AVPlayerViewController delegate] are public in iOS 9.
2527         * platform/spi/cocoa/pthreadSPI.h: Added.
2528         * platform/spi/ios/LaunchServicesSPI.h: Add more SPI.
2529         * platform/spi/ios/MediaPlayerSPI.h: Ignore deprecation warnings for UIPopoverController and UIActionSheet.
2530
2531 2015-09-29  Brady Eidson  <beidson@apple.com>
2532
2533         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
2534         https://bugs.webkit.org/show_bug.cgi?id=149651
2535
2536         Rubberstamped by Alex Christensen.
2537
2538         No new tests (No change in behavior).
2539
2540         * platform/CrossThreadTask.h: Now in WebCore, use the WebCore namespace.
2541
2542 2015-09-29  Brady Eidson  <beidson@apple.com>
2543
2544         Move WebKit2 AsyncTask to WebCore CrossThreadTask.
2545         https://bugs.webkit.org/show_bug.cgi?id=149651
2546
2547         Reviewed by Alex Christensen.
2548
2549         No new tests (No change in behavior).
2550         
2551         It will be needed in WebCore to support IndexedDB.
2552
2553         * WebCore.xcodeproj/project.pbxproj:
2554         * platform/CrossThreadTask.h: Renamed from Source/WebKit2/Shared/AsyncTask.h.
2555         (WebKit::CrossThreadTask::CrossThreadTask):
2556         (WebKit::CrossThreadTask::performTask):
2557         (WebKit::createCrossThreadTask):
2558
2559 2015-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2560
2561         Snap offsets should update when style is programmatically changed
2562         https://bugs.webkit.org/show_bug.cgi?id=135964
2563         <rdar://problem/18162411>
2564
2565         Reviewed by Darin Adler.
2566
2567         Tests:  css3/scroll-snap/scroll-snap-style-changed-coordinates.html
2568                 css3/scroll-snap/scroll-snap-style-changed-repeat.html
2569
2570         Updating scroll snap style properties now programmatically updates the scroll snap container. Does not yet
2571         handle the case of reparented elements with scroll snap coordinates. Adds some plumbing the FrameView and
2572         RenderLayerCompositor to immediately update the scrolling coordinator when updating the FrameView due to
2573         style changes.
2574
2575         * page/FrameView.cpp:
2576         (WebCore::FrameView::updateScrollingCoordinatorScrollSnapProperties): Calls on the compositor to reupdate scroll snap
2577             properties on the FrameView.
2578         * page/FrameView.h:
2579         * page/scrolling/AsyncScrollingCoordinator.cpp: Sets snap offsets to an empty vector when appropriate.
2580         (WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Ditto.
2581         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Ditto.
2582         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
2583         (WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView): Updates scroll snap properties
2584             from a given FrameView.
2585         * page/scrolling/AsyncScrollingCoordinator.h:
2586         * page/scrolling/ScrollingCoordinator.h:
2587         (WebCore::ScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):
2588         * rendering/RenderLayerCompositor.cpp:
2589         (WebCore::RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView): Updates the scrolling coordinator's
2590             scroll snap properties.
2591         * rendering/RenderLayerCompositor.h: Plumb scroll snap property updating to the FrameView.
2592         * rendering/RenderLayerModelObject.cpp: Checks for style changes and updates snap offsets when appropriate.
2593         (WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate): Ditto.
2594         (WebCore::RenderLayerModelObject::styleDidChange): Ditto.
2595
2596 2015-09-29  Jer Noble  <jer.noble@apple.com>
2597
2598         REGRESSION: WebAudio user-gesture restriction is no longer lifted by touchstart event
2599         https://bugs.webkit.org/show_bug.cgi?id=149367
2600
2601         Reviewed by Eric Carlson.
2602
2603         Use processingUserGestureForMedia() rather than processingUserGesture(),
2604         as the former includes touchstart and the latter does not.
2605
2606         * Modules/webaudio/AudioContext.cpp:
2607         (WebCore::AudioContext::willBeginPlayback):
2608         (WebCore::AudioContext::willPausePlayback):
2609         * html/MediaElementSession.cpp:
2610         (WebCore::MediaElementSession::playbackPermitted):
2611         (WebCore::MediaElementSession::dataLoadingPermitted):
2612         (WebCore::MediaElementSession::fullscreenPermitted):
2613         (WebCore::MediaElementSession::showPlaybackTargetPicker):
2614
2615 2015-09-29  Ryosuke Niwa  <rniwa@webkit.org>
2616
2617         Update style/layout when a slot is added or removed
2618         https://bugs.webkit.org/show_bug.cgi?id=149593
2619
2620         Reviewed by Antti Koivisto.
2621
2622         Fixed the bug by forcing the render tree reconstruction on the shadow host when a slot is inserted or removed.
2623         We should optimize these reconstructions by only triggering them on the affected slot elements in the future.
2624
2625         Also fixed a bug that we were not invalidating the slot assignments when a default slot is introduced dynamically
2626         after the slot assignment algorithm had run.
2627
2628         Test (existing): fast/shadow-dom/shadow-layout-after-slot-changes.html
2629
2630         * dom/ShadowRoot.cpp:
2631         (WebCore::ShadowRoot::addSlotElementByName): Passes in ShadowRoot.
2632         (WebCore::ShadowRoot::removeSlotElementByName): Ditto.
2633         * dom/SlotAssignment.cpp:
2634         (WebCore::SlotAssignment::addSlotElementByName): Call setNeedsStyleRecalc.
2635         (WebCore::SlotAssignment::removeSlotElementByName): Call setNeedsStyleRecalc if the host is still alive since this
2636         function can be called while the host is being destructed in which case shadowRoot.host() would be nullptr.
2637         * dom/SlotAssignment.h:
2638
2639 2015-09-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2640
2641         Improve binding of JSBuiltinConstructor classes
2642         https://bugs.webkit.org/show_bug.cgi?id=149556
2643
2644         Reviewed by Darin Adler.
2645
2646         JSBuiltinConstructor classes no longer need definition of a DOM class.
2647         These classes no longer go through the JS wrapper cache.
2648         Removed code related to DOM class handling (m_impl, releaseImpl, WrapperOwner, toJS, ...)
2649         Updated creation code.
2650
2651         Refactoring of the binding generator code to simplify whether generating or not some methods.
2652
2653         Removed unneeded include of DOM class in JSXX.cpp (already done in JSXX.h)
2654
2655         Added new binding test to cover JSBuiltinConstructor keyword.
2656
2657         Covered by binding tests.
2658
2659         * bindings/js/JSDOMBinding.h:
2660         (WebCore::createJSBuiltin):
2661         (WebCore::DOMConstructorObject::createStructure):.
2662         * bindings/scripts/CodeGeneratorJS.pm:
2663         (NeedsImplementationClass):
2664         (ShouldGenerateToWrapped):
2665         (ShouldGenerateWrapperOwnerCode):
2666         (ShouldGenerateToJSDeclaration):
2667         (ShouldGenerateToJSImplementation):
2668         (GenerateHeader):
2669         (GenerateImplementation):
2670         (GenerateConstructorDefinition):
2671         (ComputeFunctionSpecial):.
2672         (UseJSBuiltins):.
2673         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp: Added.
2674         (WebKit::kit):
2675         (WebKit::core):
2676         (WebKit::wrapTestJSBuiltinConstructor):
2677         (webkit_dom_test_js_builtin_constructor_finalize):
2678         (webkit_dom_test_js_builtin_constructor_constructor):
2679         (webkit_dom_test_js_builtin_constructor_class_init):
2680         (webkit_dom_test_js_builtin_constructor_init):
2681         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h: Added.
2682         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructorPrivate.h: Added.
2683         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2684         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2685         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2686         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2687         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2688         * bindings/scripts/test/JS/JSTestException.cpp:
2689         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2690         * bindings/scripts/test/JS/JSTestInterface.cpp:
2691         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Added.
2692         (WebCore::JSTestJSBuiltinConstructorPrototype::create):
2693         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure):
2694         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
2695         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2696         (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
2697         (WebCore::JSTestJSBuiltinConstructorConstructor::constructJSTestJSBuiltinConstructor):
2698         (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
2699         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2700         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
2701         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
2702         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
2703         (WebCore::JSTestJSBuiltinConstructor::createPrototype):
2704         (WebCore::JSTestJSBuiltinConstructor::getPrototype):
2705         (WebCore::JSTestJSBuiltinConstructor::destroy):
2706         (WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
2707         (WebCore::jsTestJSBuiltinConstructorConstructor):
2708         (WebCore::JSTestJSBuiltinConstructor::getConstructor):
2709         (WebCore::JSTestJSBuiltinConstructor::visitChildren):
2710         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: Added.
2711         (WebCore::JSTestJSBuiltinConstructor::create):
2712         (WebCore::JSTestJSBuiltinConstructor::createStructure):
2713         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2714         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2715         * bindings/scripts/test/JS/JSTestNode.cpp:
2716         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2717         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2718         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2719         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2720         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2721         * bindings/scripts/test/JS/JSattribute.cpp:
2722         * bindings/scripts/test/JS/JSreadonly.cpp:
2723         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h: Added.
2724         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm: Added.
2725         (-[DOMTestJSBuiltinConstructor dealloc]):
2726         (-[DOMTestJSBuiltinConstructor finalize]):
2727         (core):
2728         (kit):
2729         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructorInternal.h: Added.
2730         * bindings/scripts/test/TestJSBuiltinConstructor.idl: Added.
2731
2732 2015-09-29  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2733
2734         [Streams API] [Win] Remove reference to dead CountQueuingStrategy.h
2735         https://bugs.webkit.org/show_bug.cgi?id=149623
2736
2737         Reviewed by Darin Adler.
2738
2739         No new tests needed.
2740
2741         * WebCore.vcxproj/WebCore.vcxproj.filters:
2742
2743 2015-09-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2744
2745         Build WebCore JS Builtins according the ENABLE flags
2746         https://bugs.webkit.org/show_bug.cgi?id=149624
2747
2748         Reviewed by Csaba Osztrogonác.
2749
2750         Created WebCoreJSBuiltins.cpp to include all JSXXBuiltins.cpp files with the right #ifdef.
2751         Added WebCoreJSBuiltins.cpp to CMake, win and mac build systems.
2752
2753         No change in behavior.
2754
2755         * CMakeLists.txt:
2756         * DerivedSources.cpp:
2757         * WebCore.vcxproj/WebCore.vcxproj:
2758         * WebCore.xcodeproj/project.pbxproj:
2759         * bindings/js/WebCoreJSBuiltins.cpp: Added.
2760
2761 2015-09-29  Javier Fernandez  <jfernandez@igalia.com>
2762
2763         [CSS Grid Layout] Flex tracks sizing alg must handle 0fr values
2764         https://bugs.webkit.org/show_bug.cgi?id=148944
2765
2766         Reviewed by Darin Adler.
2767
2768         We don't allow 0 as flexible size value, which is not following current
2769         specs; it just states that it must be a positive value. This patch
2770         adds such change in the parser but some additional logic must be added
2771         as well to handle 0 values during the flex tracks sizing algorithm.
2772
2773         The old algorithm didn't take 0 values into account, so there is the risk
2774         of division by zero. Additionally, it was not handling fraction values
2775         in the best way. The last versions of the spec changed this algorithm in
2776         order to handle fraction values so that they don't cause exponential
2777         grow of tracks using values bigger than 1.
2778
2779         This patch implements also such new algorithm, so we can deal not only
2780         with 0 values, but managing fraction values properly.
2781
2782         No new tests, just some additional test cases and some of them rebaselined.
2783
2784         * rendering/RenderGrid.cpp:
2785         (WebCore::normalizedFlexFraction):
2786         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2787         (WebCore::RenderGrid::computeFlexFactorUnitSize): Added.
2788         (WebCore::RenderGrid::findFlexFactorUnitSize): Added.
2789         (WebCore::RenderGrid::GridTrackForNormalization): Deleted.
2790         (WebCore::RenderGrid::computeNormalizedFractionBreadth): Deleted.
2791         * rendering/RenderGrid.h:
2792
2793 2015-09-29  Csaba Osztrogonác  <ossy@webkit.org>
2794
2795         Fix the broken !ENABLE(STREAM_API) build
2796         https://bugs.webkit.org/show_bug.cgi?id=149525
2797
2798         Reviewed by Darin Adler.
2799
2800         * bindings/js/WebCoreJSClientData.h: Revert r190225.
2801
2802
2803 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2804
2805         printing does not use minimum page zoom factor
2806         https://bugs.webkit.org/show_bug.cgi?id=108507
2807
2808         Reviewed by Darin Adler.
2809
2810         * page/PrintContext.cpp:
2811         (WebCore::PrintContext::beginAndComputePageRectsWithPageSize):
2812         Helper function to share common code from numberOfPages() and
2813         spoolAllPagesWithBoundaries().
2814         (WebCore::PrintContext::numberOfPages): Use beginAndComputePageRectsWithPageSize().
2815         (WebCore::PrintContext::spoolAllPagesWithBoundaries): Use
2816         beginAndComputePageRectsWithPageSize() and don't flip the Y axis
2817         for non Cocoa platforms.
2818         * page/PrintContext.h:
2819
2820 2015-09-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2821
2822         Add support for WebIDL JSBuiltin attributes
2823         https://bugs.webkit.org/show_bug.cgi?id=149554
2824
2825         Reviewed by Darin Adler.
2826
2827         Covered by bindings tests.
2828
2829         * bindings/scripts/CodeGeneratorGObject.pm:
2830         (SkipAttribute): Disabled GObject binding generation of JSBuiltin attribute.
2831         * bindings/scripts/CodeGeneratorJS.pm:
2832         (GetAttributeGetterName): Handling of Builtin function to retrieve BuiltinGenerator.
2833         (GetAttributeSetterName): Ditto.
2834         (GenerateAttributesHashTable): Set JSBuiltin attributes as "Accessor | Builtin".
2835         (GenerateImplementation): Skip implementation for JSBuiltin attributes
2836         * bindings/scripts/test/JS/JSTestObj.cpp: Adding binding test for JSBuiltin attributes.
2837         * bindings/scripts/test/ObjC/DOMTestObj.h:
2838         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2839         (-[DOMTestObj jsBuiltinAttribute]):
2840         (-[DOMTestObj setJsBuiltinAttribute:]):
2841         (-[DOMTestObj jsBuiltinReadOnlyAttribute]):
2842         * bindings/scripts/test/TestObj.idl: Ditto.
2843
2844 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
2845
2846         [Win] Fix build after r190295.
2847
2848         * PlatformWin.cmake: Add missing Forwarding Header.
2849
2850 2015-09-28  Brady Eidson  <beidson@apple.com>
2851
2852         Add an IDB Server that can roundtrip a request back to the client.
2853         https://bugs.webkit.org/show_bug.cgi?id=149603
2854
2855         Reviewed by NOBODY (Build fix).
2856
2857         * Modules/indexeddb/IDBRequest.h: Remove unneeded #include, fixing the WK/WK2 builds.
2858
2859 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
2860
2861         Expose 'geometryFlipped' state for debugging/logging purposes
2862         https://bugs.webkit.org/show_bug.cgi?id=149557
2863
2864         Reviewed by Simon Fraser.
2865
2866         No new tests: No new behavior.
2867
2868         * platform/graphics/ca/PlatformCALayer.h:
2869         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2870         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2871         (PlatformCALayerCocoa::geometryFlipped): Added.
2872         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2873         (PlatformCALayerWin::geometryFlipped): Added.
2874         (printLayer): Log flipped state of geometry.
2875         * platform/graphics/ca/win/PlatformCALayerWin.h:
2876
2877 2015-09-28  Brady Eidson  <beidson@apple.com>
2878
2879         Add an IDB Server that can roundtrip a request back to the client.
2880         https://bugs.webkit.org/show_bug.cgi?id=149603
2881
2882         Reviewed by Alex Christensen.
2883
2884         Test: storage/indexeddb/modern/deletedatabase-request-event.html
2885
2886         This is a critical piece of IDB infrastructure that:
2887         - Puts a database client/server divide in place.
2888         - Client synchronously sends requests to the server, and asynchronously receives a response back from it.
2889         - Introduces a class structure that makes it easy for WebKit2 to add a thin layer to replace the 
2890           in-process server with an out-of-process server.
2891
2892         To allow for the most basic of tests, the "delete database" request is hard coded as always failing 
2893         with an indeterminate error.
2894
2895         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2896         (WebCore::DOMWindowIndexedDatabase::indexedDB):
2897
2898         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
2899         (WebCore::IDBDatabaseIdentifier::debugString):
2900         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2901
2902         * Modules/indexeddb/client/IDBConnectionToServer.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
2903         (WebCore::IDBClient::IDBConnectionToServer::create):
2904         (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):
2905         (WebCore::IDBClient::IDBConnectionToServer::identifier):
2906         (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
2907         (WebCore::IDBClient::IDBConnectionToServer::didDeleteDatabase):
2908
2909         * Modules/indexeddb/client/IDBConnectionToServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2910         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2911         (WebCore::IDBClient::IDBConnectionToServerDelegate::~IDBConnectionToServerDelegate):
2912
2913         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
2914         (WebCore::IDBClient::IDBFactory::create):
2915         (WebCore::IDBClient::IDBFactory::IDBFactory):
2916         (WebCore::IDBClient::IDBFactory::openInternal):
2917         (WebCore::IDBClient::IDBFactory::deleteDatabase):
2918         * Modules/indexeddb/client/IDBFactoryImpl.h:
2919
2920         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2921         (WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
2922         (WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
2923         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
2924         (WebCore::IDBClient::IDBOpenDBRequest::~IDBOpenDBRequest):
2925         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
2926         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
2927         (WebCore::IDBClient::IDBOpenDBRequest::databaseIdentifier):
2928         (WebCore::IDBClient::IDBOpenDBRequest::version):
2929         (WebCore::IDBClient::IDBOpenDBRequest::create): Deleted.
2930
2931         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2932         (WebCore::IDBClient::IDBRequest::IDBRequest):
2933         (WebCore::IDBClient::IDBRequest::enqueueEvent):
2934         * Modules/indexeddb/client/IDBRequestImpl.h:
2935         (WebCore::IDBClient::IDBRequest::requestIdentifier):
2936
2937         * Modules/indexeddb/server/IDBConnectionToClient.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
2938         (WebCore::IDBServer::IDBConnectionToClient::create):
2939         (WebCore::IDBServer::IDBConnectionToClient::IDBConnectionToClient):
2940         (WebCore::IDBServer::IDBConnectionToClient::identifier):
2941         (WebCore::IDBServer::IDBConnectionToClient::didDeleteDatabase):
2942         * Modules/indexeddb/server/IDBConnectionToClient.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2943         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2944         (WebCore::IDBServer::IDBConnectionToClientDelegate::~IDBConnectionToClientDelegate):
2945
2946         * Modules/indexeddb/server/IDBServer.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp.
2947         (WebCore::IDBServer::IDBServer::create):
2948         (WebCore::IDBServer::IDBServer::IDBServer):
2949         (WebCore::IDBServer::IDBServer::registerConnection):
2950         (WebCore::IDBServer::IDBServer::unregisterConnection):
2951         (WebCore::IDBServer::IDBServer::deleteDatabase):
2952         * Modules/indexeddb/server/IDBServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2953
2954         * Modules/indexeddb/shared/IDBError.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp.
2955         (WebCore::idbExceptionEntry):
2956         (WebCore::IDBError::IDBError):
2957         (WebCore::IDBError::operator=):
2958         (WebCore::IDBError::name):
2959         (WebCore::IDBError::message):
2960         * Modules/indexeddb/shared/IDBError.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp.
2961         (WebCore::IDBError::IDBError):
2962         (WebCore::IDBError::isNull):
2963
2964         * Modules/indexeddb/shared/IDBRequestData.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
2965         (WebCore::IDBRequestData::IDBRequestData):
2966         * Modules/indexeddb/shared/IDBRequestData.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2967         (WebCore::IDBRequestData::requestIdentifier):
2968         (WebCore::IDBRequestData::databaseIdentifier):
2969
2970         * Modules/indexeddb/shared/IDBRequestIdentifier.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp.
2971         (WebCore::nextRequestNumber):
2972         (WebCore::IDBRequestIdentifier::IDBRequestIdentifier):
2973         (WebCore::IDBRequestIdentifier::emptyValue):
2974         (WebCore::IDBRequestIdentifier::deletedValue):
2975         (WebCore::IDBRequestIdentifier::isHashTableDeletedValue):
2976         * Modules/indexeddb/shared/IDBRequestIdentifier.h: Added.
2977         (WebCore::IDBRequestIdentifier::isEmpty):
2978         (WebCore::IDBRequestIdentifier::hash):
2979         (WebCore::IDBRequestIdentifier::operator==):
2980         (WebCore::IDBRequestIdentifier::connectionIdentifier):
2981         (WebCore::IDBRequestIdentifierHash::hash):
2982         (WebCore::IDBRequestIdentifierHash::equal):
2983         (WebCore::IDBRequestIdentifierHashTraits::emptyValue):
2984         (WebCore::IDBRequestIdentifierHashTraits::isEmptyValue):
2985         (WebCore::IDBRequestIdentifierHashTraits::constructDeletedValue):
2986         (WebCore::IDBRequestIdentifierHashTraits::isDeletedValue):
2987
2988         * Modules/indexeddb/shared/IDBResultData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
2989         (WebCore::IDBResultData::IDBResultData):
2990         * Modules/indexeddb/shared/IDBResultData.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2991         (WebCore::IDBResultData::requestIdentifier):
2992         (WebCore::IDBResultData::error):
2993
2994         * Modules/indexeddb/shared/InProcessIDBServer.cpp: Added.
2995         (WebCore::InProcessIDBServer::create):
2996         (WebCore::InProcessIDBServer::InProcessIDBServer):
2997         (WebCore::InProcessIDBServer::identifier):
2998         (WebCore::InProcessIDBServer::connectionToServer):
2999         (WebCore::InProcessIDBServer::connectionToClient):
3000         (WebCore::InProcessIDBServer::deleteDatabase):
3001         (WebCore::InProcessIDBServer::didDeleteDatabase):
3002         * Modules/indexeddb/shared/InProcessIDBServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h.
3003
3004         * CMakeLists.txt:
3005         * WebCore.xcodeproj/project.pbxproj:
3006
3007         * loader/EmptyClients.cpp:
3008
3009         * page/DatabaseProvider.h:
3010
3011         * page/Page.cpp:
3012         (WebCore::Page::idbConnection):
3013         * page/Page.h:
3014
3015         * page/SecurityOriginData.cpp:
3016         (WebCore::SecurityOriginData::debugString):
3017         * page/SecurityOriginData.h:
3018
3019 2015-09-28  Ryosuke Niwa  <rniwa@webkit.org>
3020
3021         relatedNode should be retargeted respecting slots
3022         https://bugs.webkit.org/show_bug.cgi?id=149591
3023
3024         Reviewed by Antti Koivisto.
3025
3026         This patch retargets relatedNode with respect to shadow boundaries after r190214 as specified in
3027         https://w3c.github.io/webcomponents/spec/shadow/#retargeting-relatedtarget
3028
3029         Naively implementing the spec'ed behavior can result in O(n^2) behavior since we need to find the common tree scope
3030         ancestor for each target in the event path. This patch avoids this by implementing an O(1) incremental update step
3031         for when target's tree scope changes in the event path. See the description for moveToNewTreeScope below.
3032
3033         Test: fast/shadow-dom/event-with-related-target.html
3034
3035         * dom/EventContext.h: Replaced toMouseOrFocusEventContext by downcast<MouseOrFocusEventContext>.
3036         * dom/EventDispatcher.cpp:
3037         (WebCore::EventRelatedNodeResolver): Removed the code for relatedNode. This class is now only used for touch events.
3038         (WebCore::EventPath): Added m_event as a member variable.
3039
3040         (WebCore::RelatedNodeRetargeter): Added.
3041
3042         (WebCore::RelatedNodeRetargeter::RelatedNodeRetargeter): Does the initial retargeting of relatedNode. When the
3043         tree scope of relatedNode and the target are the same, we immediately exit without collecting ancestor tree scopes
3044         of relatedNode as an optimization. We also special case when the relatedNode and the target are in two different
3045         documents (relatedNode should be nullptr) and when one is in document and the other one is not in the document
3046         (relatedNode should be the host of the outermost shadow root). Otherwise we have to do the real work by collecting
3047         all tree scope ancestors and walking downwards from the document tree scope (note target and relatedNode share the
3048         same document scope here since we would have exited early otherwise).
3049
3050         (WebCore::RelatedNodeRetargeter::currentNode): Returned relatedNode retargeted for the current tree scope.
3051
3052         (WebCore::RelatedNodeRetargeter::moveToNewTreeScope): Moves to a new tree scope. If the original target and
3053         relatedNode were in different trees, there is nothing to be done. Note that we can only move out of a shadow root
3054         to its host or move into a slot so newTreeScope (current target's tree scope) and previousTreeScope (previous
3055         target's tree scope) must have a child-parent relationship.
3056
3057         If previousTreeScope did not contain the retargeted relatedNode, then neither can its child shadow trees. Thus,
3058         there is nothing to be done when moving into a slot in this case. If we're moving out of previousTreeScope, then
3059         newTreeScope may contain the retargeted relatedNode but that still doesn't require any work. So we exit early in
3060         both cases.
3061
3062         Otherwise (previousTreeScope contained retargeted relatedNode), if we're moving out of a child shadow root
3063         (previousTreeScope) then relatedNode should also move to previousTreeScope's shadow host since previousTreeScope
3064         is a direct-child shadow tree of newTreeScope and previousTreeScope's shadow host resides in newTreeScope.
3065
3066         If we're moving into a child shadow root via a slot, then there are three possibilities: relatedNode is in
3067         previousTreeScope, newTreeScope and its child shadow trees, or newTreeScope's sibling tree scopes and its children.
3068         If it is in previousTreeScope (m_lowestCommonAncestorIndex is zero) or in newTreeScope's sibling, then
3069         previousTreeScope is the lowest common tree scope ancestor so there is nothing to be done. If relatedNode is in
3070         newTreeScope, then the retargeted relatedNode is either the shadow host of the shadow tree that contains
3071         relatedNode or relatedNode itself.
3072
3073         (WebCore::RelatedNodeRetargeter::checkConsistency): Finds the retargeted relatedNode in the simplest way to verify
3074         the correctness of the algorithm. We can disable this consistency check if it slows down debug builds too much.
3075         (WebCore::RelatedNodeRetargeter::nodeInLowestCommonAncestor): Finds the 
3076         (WebCore::RelatedNodeRetargeter::collectTreeScopes):
3077         (WebCore::EventPath::setRelatedTarget): Rewritten using RelatedNodeRetargeter.
3078
3079 2015-09-28  Alex Christensen  <achristensen@webkit.org>
3080
3081         Build WK1 with CMake on Mac
3082         https://bugs.webkit.org/show_bug.cgi?id=149604
3083
3084         Reviewed by Chris Dumez.
3085
3086         * CMakeLists.txt:
3087         * PlatformMac.cmake:
3088         Make a list of IDL files for the ObjC bindings.
3089
3090 2015-09-28  Chris Dumez  <cdumez@apple.com>
3091
3092         Drop support for legacy EventException
3093         https://bugs.webkit.org/show_bug.cgi?id=149597
3094         <rdar://problem/22879795>
3095
3096         Reviewed by Sam Weinig.
3097
3098         Drop support for legacy EventException. Both Firefox and Chrome do not
3099         support it, and our implementation no longer throws such exceptions.
3100
3101         No new tests, already covered by existing test.
3102
3103         * CMakeLists.txt:
3104         * DerivedSources.cpp:
3105         * DerivedSources.make:
3106         * Modules/indexeddb/legacy/LegacyRequest.cpp:
3107         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
3108         * Modules/websockets/WebSocket.cpp:
3109         * WebCore.vcxproj/WebCore.vcxproj:
3110         * WebCore.vcxproj/WebCore.vcxproj.filters:
3111         * WebCore.xcodeproj/project.pbxproj:
3112         * bindings/gobject/WebKitDOMPrivate.cpp:
3113         * bindings/js/JSExceptionBase.cpp:
3114         (WebCore::toExceptionBase): Deleted.
3115         * dom/DOMAllInOne.cpp:
3116         * dom/DOMExceptions.in:
3117         * dom/EventException.cpp: Removed.
3118         * dom/EventException.h:
3119         (WebCore::EventException::EventException): Deleted.
3120         * dom/EventException.idl:
3121         * dom/EventListenerMap.cpp:
3122         * dom/EventTarget.cpp:
3123         * dom/MessagePort.cpp:
3124         * dom/Node.cpp:
3125         * loader/appcache/DOMApplicationCache.cpp:
3126         * page/DOMWindow.cpp:
3127         * page/EventSource.cpp:
3128         * page/PerformanceUserTiming.h:
3129         * workers/AbstractWorker.cpp:
3130         * workers/Worker.cpp:
3131         * workers/WorkerGlobalScope.cpp:
3132         * xml/XMLHttpRequest.cpp:
3133         * xml/XMLHttpRequestUpload.cpp:
3134
3135 2015-09-28  Chris Dumez  <cdumez@apple.com>
3136
3137         Object.getOwnPropertyNames() does not return named properties
3138         https://bugs.webkit.org/show_bug.cgi?id=149562
3139         <rdar://problem/22879779>
3140
3141         Reviewed by Darin Adler.
3142
3143         Previously, Object.getOwnPropertyNames() did not return named properties
3144         for interfaces with named property getters. This patch adds support for
3145         this in the JS bindings generator and uses it for HTMLCollection only
3146         for now. Other interfaces will be taken care of independently.
3147
3148         Note that currently, even though the named properties are returned by
3149         Object.getOwnPropertyNames(), these properties are still not enumerated.
3150         This is because these are always unenumerable for existing DOM interfaces:
3151         - https://dom.spec.whatwg.org/#interface-htmlcollection
3152         - https://dom.spec.whatwg.org/#namednodemap
3153
3154         In the future, we may need to extend support if some interfaces require
3155         those to be enumerable.
3156
3157         Test: fast/dom/htmlcollection-getownpropertynames.html
3158
3159         * Modules/mediastream/RTCStatsResponse.cpp:
3160         (WebCore::WebCore::RTCStatsResponse::supportedPropertyNames):
3161         * Modules/mediastream/RTCStatsResponse.h:
3162         * bindings/scripts/CodeGeneratorJS.pm:
3163         (GenerateHeader):
3164         (GenerateImplementation):
3165         * css/StyleSheetList.cpp:
3166         (WebCore::StyleSheetList::supportedPropertyNames):
3167         * css/StyleSheetList.h:
3168         * dom/DOMNamedFlowCollection.cpp:
3169         (WebCore::DOMNamedFlowCollection::supportedPropertyNames):
3170         * dom/DOMNamedFlowCollection.h:
3171         * dom/NamedNodeMap.cpp:
3172         (WebCore::NamedNodeMap::supportedPropertyNames):
3173         * dom/NamedNodeMap.h:
3174         * html/HTMLCollection.cpp:
3175         (WebCore::HTMLCollection::supportedPropertyNames):
3176         * html/HTMLCollection.h:
3177         (WebCore::CollectionNamedElementCache::propertyNames):
3178         (WebCore::CollectionNamedElementCache::appendToIdCache):
3179         (WebCore::CollectionNamedElementCache::appendToNameCache):
3180         (WebCore::CollectionNamedElementCache::memoryCost):
3181         (WebCore::CollectionNamedElementCache::append):
3182         * plugins/DOMMimeTypeArray.cpp:
3183         (WebCore::DOMMimeTypeArray::supportedPropertyNames):
3184         * plugins/DOMMimeTypeArray.h:
3185         * plugins/DOMPlugin.cpp:
3186         (WebCore::DOMPlugin::supportedPropertyNames):
3187         * plugins/DOMPlugin.h:
3188         * plugins/DOMPluginArray.cpp:
3189         (WebCore::DOMPluginArray::supportedPropertyNames):
3190         * plugins/DOMPluginArray.h:
3191
3192 2015-09-28  Per Arne Vollan  <peavo@outlook.com>
3193
3194         [Curl] Deadlock when downloading.
3195         https://bugs.webkit.org/show_bug.cgi?id=149596
3196
3197         Reviewed by Alex Christensen.
3198
3199         Avoid grabbing the same lock twice.
3200
3201         * platform/network/curl/CurlDownload.cpp:
3202         (WebCore::CurlDownload::init):
3203         (WebCore::CurlDownload::addHeaders):
3204
3205 2015-09-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
3206
3207         An SVG inherits the container size of the previously drawn HTMLImageElement when drawing it on a canvas
3208         https://bugs.webkit.org/show_bug.cgi?id=148845
3209
3210         Reviewed by Darin Adler.
3211
3212         When drawing an SVG image on a canvas we need to make sure that the container
3213         size of the SVG is set to the image source size. If we do not do that, the
3214         previous container size will be used as the size of the image. When drawing
3215         it as HTMLImageElement, the renderer calls SVGImage::drawForContainer() which
3216         calls setContainerSize() and then calls draw(). This call ensures that the
3217         size is set correctly for cached images. But when drawing the SVGImage on
3218         CanvasRenderingContext2D, the SVGImage::draw() is called directly because
3219         it calls it through the base class method Image::draw().
3220         
3221         If the image.isSVGImage(), CanvasRenderingContext2D::drawImage() has to call
3222         SVGImage::setContainerSize() before calling Image::draw().
3223
3224         Test: svg/as-image/svg-cached-draw-canvas.html
3225
3226         * html/canvas/CanvasRenderingContext2D.cpp:
3227         (WebCore::CanvasRenderingContext2D::drawImage):
3228         Call SVGImage::setContainerSize() before calling Image::draw().
3229
3230 2015-09-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
3231
3232         Rename all the variables and parameters of type HTMLImageElement in CanvasRenderingContext2D.cpp from 'image' to 'imageElement'
3233
3234         Reviewed by Darin Adler.
3235
3236         This does not change functionality in this file. It is a preparation for
3237         the fix of the https://bugs.webkit.org/show_bug.cgi?id=148845.
3238
3239         * html/canvas/CanvasRenderingContext2D.cpp:
3240         (WebCore::size):
3241         (WebCore::normalizeRect):
3242         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
3243         (WebCore::CanvasRenderingContext2D::setAlpha):
3244         (WebCore::CanvasRenderingContext2D::createRadialGradient):
3245         (WebCore::CanvasRenderingContext2D::createPattern):
3246         (WebCore::CanvasRenderingContext2D::drawImage):
3247
3248 2015-09-27  Yusuke Suzuki  <utatane.tea@gmail.com>
3249
3250         [ES6] Implement ES6 Module loader hook stubs in WebCore
3251         https://bugs.webkit.org/show_bug.cgi?id=149574
3252
3253         Reviewed by Ryosuke Niwa.
3254
3255         In this patch, we implement the loader hooks in the WebCore side.
3256         Since the fetcher and actual evaluation code are separated from
3257         this patch, they become empty.
3258
3259         Here, WebCore implements 3 loader hooks.
3260
3261         1. resolve hook
3262
3263             Takes the module name and resolve it to the unique module key.
3264             In WebCore, we use URL as a module key.
3265             And for the inlined module tag (e.g. <script type="module">import ...</script>),
3266             we use the ES6 symbol as a module key.
3267             In WebCore, we take the module name like "./hello.js" and resolve it by using
3268             the URL of the importer module.
3269             This functionality is implemented in this patch.
3270
3271         2. fetch hook
3272
3273             Fetches the resource specified by the module key. In WebCore, the module key is
3274             URL. We use CachedResource loading system to load the resource of the modules.
3275             The actual code of the fetch hook will be implemented in the subsequent patch.
3276
3277         3. evaluate hook
3278
3279             This is additional hook to instrument the module's execution for the inspector.
3280             The actual code of the evaluate hook will be implemented in the subsequent patch.
3281
3282         In addition to that, we added required JSC forward headers for the module loader
3283         implementation.
3284
3285         * CMakeLists.txt:
3286         * ForwardingHeaders/runtime/JSInternalPromise.h: Added.
3287         * ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Added.
3288         * ForwardingHeaders/runtime/JSModuleRecord.h: Added.
3289         * ForwardingHeaders/runtime/Symbol.h: Added.
3290         * WebCore.vcxproj/WebCore.vcxproj:
3291         * WebCore.vcxproj/WebCore.vcxproj.filters:
3292         * WebCore.xcodeproj/project.pbxproj:
3293         * bindings/js/JSBindingsAllInOne.cpp:
3294         * bindings/js/JSDOMWindowBase.cpp:
3295         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
3296         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
3297         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
3298         * bindings/js/JSDOMWindowBase.h:
3299         * bindings/js/JSModuleLoader.cpp: Added.
3300         (WebCore::JSModuleLoader::JSModuleLoader):
3301         (WebCore::JSModuleLoader::resolve):
3302         (WebCore::JSModuleLoader::fetch):
3303         (WebCore::JSModuleLoader::evaluate):
3304         * bindings/js/JSModuleLoader.h: Added.
3305         (WebCore::JSModuleLoader::document):
3306         * dom/Document.cpp:
3307         (WebCore::Document::Document):
3308         (WebCore::Document::~Document):
3309         * dom/Document.h:
3310         (WebCore::Document::moduleLoader):
3311
3312 2015-09-26  Hunseop Jeong  <hs85.jeong@samsung.com>
3313
3314         Use modern for-loops in WebCore/inspector.
3315         https://bugs.webkit.org/show_bug.cgi?id=149579
3316
3317         Reviewed by Darin Adler.
3318
3319         No new tests because there is no behavior change.
3320
3321         * inspector/DOMPatchSupport.cpp:
3322         (WebCore::DOMPatchSupport::diff):
3323         (WebCore::DOMPatchSupport::innerPatchChildren):
3324         (WebCore::DOMPatchSupport::removeChildAndMoveToNew):
3325         (WebCore::DOMPatchSupport::markNodeAsUsed):
3326         * inspector/InspectorCSSAgent.cpp:
3327         (WebCore::computePseudoClassMask):
3328         (WebCore::ChangeRegionOversetTask::timerFired):
3329         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3330         (WebCore::InspectorCSSAgent::resetPseudoStates):
3331         * inspector/InspectorDOMAgent.cpp:
3332         (WebCore::RevalidateStyleAttributeTask::timerFired):
3333         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
3334         (WebCore::InspectorDOMAgent::getEventListenersForNode):
3335         (WebCore::InspectorDOMAgent::getEventListeners):
3336         (WebCore::InspectorDOMAgent::performSearch):
3337         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
3338         * inspector/InspectorDOMDebuggerAgent.cpp:
3339         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
3340         * inspector/InspectorDatabaseAgent.cpp:
3341         (WebCore::InspectorDatabaseAgent::enable):
3342         (WebCore::InspectorDatabaseAgent::disable):
3343         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
3344         (WebCore::InspectorDatabaseAgent::databaseId):
3345         (WebCore::InspectorDatabaseAgent::findByFileName):
3346         * inspector/InspectorFrontendClientLocal.cpp:
3347         (WebCore::InspectorFrontendClientLocal::frontendLoaded):
3348         * inspector/InspectorFrontendHost.cpp:
3349         * inspector/InspectorIndexedDBAgent.cpp:
3350         * inspector/InspectorOverlay.cpp:
3351         (WebCore::buildRendererHighlight):
3352         (WebCore::buildObjectForHighlight):
3353         * inspector/InspectorPageAgent.cpp:
3354         (WebCore::InspectorPageAgent::getCookies):
3355         * inspector/InspectorReplayAgent.cpp:
3356         (WebCore::buildInspectorObjectForSession):
3357         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3358         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
3359         * inspector/InspectorResourceAgent.cpp:
3360         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
3361         (WebCore::InspectorResourceAgent::willRecalculateStyle):
3362         * inspector/InspectorStyleSheet.cpp:
3363         (flattenSourceData):
3364         (WebCore::InspectorStyle::buildArrayForComputedStyle):
3365         (WebCore::InspectorStyle::populateAllProperties):
3366         (WebCore::selectorsFromSource):
3367         (WebCore::InspectorStyleSheet::ruleIndexByStyle):
3368         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
3369         * inspector/InspectorWorkerAgent.cpp:
3370         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers):
3371         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
3372         * inspector/NetworkResourcesData.cpp:
3373         (WebCore::NetworkResourcesData::removeCachedResource):
3374         (WebCore::NetworkResourcesData::clear):
3375         * inspector/PageRuntimeAgent.cpp:
3376         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3377         * inspector/PageScriptDebugServer.cpp:
3378         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
3379         * inspector/WebConsoleAgent.cpp:
3380         (WebCore::WebConsoleAgent::frameWindowDiscarded):
3381         * inspector/WebInjectedScriptManager.cpp:
3382         (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
3383
3384 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
3385
3386         Clean up user media request internal API
3387         https://bugs.webkit.org/show_bug.cgi?id=149527
3388
3389         Reviewed by Tim Horton.
3390
3391         No new tests, no functional change.
3392
3393         * Modules/mediastream/UserMediaRequest.cpp:
3394         (WebCore::UserMediaRequest::constraintsValidated): Use track persistent ID to create vectors
3395           as that is what the platform code needs to map to a capture device.
3396         (WebCore::UserMediaRequest::userMediaAccessGranted): m_chosenXXDeviceUID -> m_XXDeviceUIDAllowed.
3397           Use the device IDs to create the MediaStream. Switch audio/video parameter order.
3398         (WebCore::UserMediaRequest::didCreateStream): Don't assume constraints are valid.
3399         * Modules/mediastream/UserMediaRequest.h:
3400         (WebCore::UserMediaRequest::videoDeviceUIDs):
3401         (WebCore::UserMediaRequest::audioDeviceUIDs):
3402         (WebCore::UserMediaRequest::allowedVideoDeviceUID):
3403         (WebCore::UserMediaRequest::allowedAudioDeviceUID):
3404         (WebCore::UserMediaRequest::requiresAudio): Deleted.
3405         (WebCore::UserMediaRequest::requiresVideo): Deleted.
3406         (WebCore::UserMediaRequest::firstVideoDeviceUID): Deleted.
3407         (WebCore::UserMediaRequest::firstAudioDeviceUID): Deleted.
3408
3409         * platform/mediastream/mac/AVMediaCaptureSource.mm:
3410         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Call setPersistentId.
3411
3412 2015-09-25  Antti Koivisto  <antti@apple.com>
3413
3414         Implement scoped styling for shadow DOM
3415         https://bugs.webkit.org/show_bug.cgi?id=149230
3416
3417         Reviewed by Ryosuke Niwa.
3418
3419         Test: fast/shadow-dom/css-scoping-shadow-with-rules-no-style-leak.html
3420
3421         * css/ElementRuleCollector.cpp:
3422         (WebCore::ElementRuleCollector::collectMatchingRules):
3423
3424             Only use special path here for user agent shadow trees.
3425
3426         * dom/AuthorStyleSheets.cpp:
3427         (WebCore::AuthorStyleSheets::AuthorStyleSheets):
3428         (WebCore::AuthorStyleSheets::removePendingSheet):
3429         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
3430
3431             Basic support for ShadowRoot scoped stylesheets.
3432
3433         * dom/AuthorStyleSheets.h:
3434         (WebCore::AuthorStyleSheets::activeStyleSheets):
3435         * dom/InlineStyleSheetOwner.cpp:
3436         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
3437         (WebCore::authorStyleSheetsForElement):
3438         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
3439         (WebCore::InlineStyleSheetOwner::removedFromDocument):
3440         (WebCore::InlineStyleSheetOwner::clearDocumentData):
3441         (WebCore::InlineStyleSheetOwner::childrenChanged):
3442         (WebCore::InlineStyleSheetOwner::createSheet):